/* Shared styles for the _Days web pages.
 *
 * Design tokens mirror the Flutter app's `AppColors` where relevant so
 * the viewer feels like the same product without importing anything.
 * See `.claude/Styles/colors.md` in the Flutter repo for the source. */
:root {
  --d0: #101010;
  --d1: #1E1E1E;
  --d2: #2A2A2A;
  --l0: #FCFCFC;
  --l1: #EFEFEF;
  --l2: #DADADA;
  --accent: #6EA8FE;
  --card-bg: #2A2A2A;

  --radius-card: 24px;
  --radius-btn: 14px;
  --stroke: 1.5px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--d0); color: var(--l0); }
body {
  font-family: 'Inter', 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}
main.wrap {
  width: 100%;
  max-width: 480px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0));
}

/* ---------- index --------------------------------------------------- */
.page-index .brand {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.page-index .tagline {
  font-size: 16px;
  line-height: 1.5;
  color: var(--l2);
  margin: 0 0 24px;
}
.page-index .links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.page-index .links a {
  color: var(--l0);
  text-decoration: none;
  padding: 10px 14px;
  border: var(--stroke) solid var(--d2);
  border-radius: var(--radius-btn);
  transition: background 160ms ease;
}
.page-index .links a:hover { background: var(--d1); }

/* ---------- share viewer -------------------------------------------- */
.page-share .card,
.page-share .error,
.page-share .loader {
  transition: opacity 200ms ease;
}
.page-share[data-state="loading"] .card,
.page-share[data-state="error"]   .card { display: none; }
.page-share[data-state="ready"]   .loader,
.page-share[data-state="error"]   .loader { display: none; }
.page-share[data-state="loading"] .error,
.page-share[data-state="ready"]   .error { display: none; }

.loader {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid var(--d2);
  border-top-color: var(--l0);
  margin: 80px auto;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 28px 24px 20px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
  /* Entry animation — subtle rise + fade, mirrors the SCF's easeOutCubic. */
  animation: card-in 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 20px;
  border-bottom: var(--stroke) solid rgba(255,255,255,0.08);
}
.verb {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.65);
  margin: 0;
  text-transform: lowercase;
}
.count {
  font-size: 64px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  /* Count number entry — cascade after the card lift. */
  animation: rise 480ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
}
.count-word {
  font-size: 18px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.01em;
}
.until {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  margin: 6px 0 0;
  color: var(--l0);
  animation: rise 480ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}
.date {
  font-size: 14px;
  margin: 4px 0 0;
  color: rgba(255,255,255,0.55);
  animation: rise 480ms cubic-bezier(0.16, 1, 0.3, 1) 280ms both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.card-body {
  padding: 20px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise 480ms cubic-bezier(0.16, 1, 0.3, 1) 340ms both;
}
.description {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,0.85);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.location {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.20);
  border-radius: 12px;
}
.location .pin {
  flex: 0 0 auto;
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
}
.location .loc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.location .loc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--l0);
  margin: 0;
  word-break: break-word;
}
.location .loc-address {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin: 0;
  word-break: break-word;
}

.card-foot {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.open-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  background: var(--l0);
  color: var(--d0);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: transform 120ms ease;
  animation: rise 480ms cubic-bezier(0.16, 1, 0.3, 1) 360ms both;
}
.open-btn:active { transform: scale(0.98); }
.store-btn {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13px;
}
.store-btn:hover { color: var(--l0); }
.brand-foot {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
}

.error {
  text-align: center;
  padding: 40px 0;
  color: var(--l2);
}
.error h1 { font-size: 22px; margin: 0 0 8px; color: var(--l0); }
.error a  { color: var(--accent); text-decoration: none; }
