/* Daily Duck — warm paper, soft ink, lots of air. */
/* Palette: misty sage pastel, chestnut ink, butter + coral accents. Rainy-café morning. */
:root {
  --bg: #E4ECD9;
  --bg-2: #EEF0DF;
  --ink: #4A3428;
  --ink-soft: #7C6A5A;
  --line: rgba(74, 52, 40, .15);
  --card: #FBF7EA;
  --brand: #D4593F;         /* wordmark coral */
  --heart: #D95F4B;
  --heart-bg: #FAD9CF;
  --focus: #F1C453;
  --switch-on: #6FA07B;
  --btn-bg: #5B3E2E;
  --btn-ink: #FFF6E2;
  --tabs-bg: rgba(228, 236, 217, .86);
  --grain-opacity: .32;
  --duck-halo-rare: #F8DF98;
  --duck-halo: #FBEDD2;     /* warm cream glow behind the duck art, close to its own white/cream/yellow tones */

  --font-display: 'Patrick Hand', 'Marker Felt', 'Chalkboard SE', ui-rounded, 'Segoe Print', sans-serif;
  --font-ui: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --tab-h: 64px;
  --stage: min(64vw, 260px, 36dvh);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* Dark green theme: follows the device (Auto), unless the user picked Light or Dark in Settings. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1F2A26;
    --bg-2: #24312C;
    --ink: #F3EBDD;
    --ink-soft: #B7B09F;
    --line: rgba(255, 255, 255, .12);
    --card: #2B3934;
    --brand: #F2A48B;
    --heart: #F08C77;
    --heart-bg: #4A3230;
    --btn-bg: #F3E7CF;
    --btn-ink: #2B2019;
    --tabs-bg: rgba(31, 42, 38, .86);
    --grain-opacity: .16;
    --duck-halo-rare: #5E4B1C;
    --duck-halo: #3C3322;    /* same idea, darkened: a warm pool of light rather than a bright patch */
  }
}
:root[data-theme="dark"] {
  --bg: #1F2A26;
  --bg-2: #24312C;
  --ink: #F3EBDD;
  --ink-soft: #B7B09F;
  --line: rgba(255, 255, 255, .12);
  --card: #2B3934;
  --brand: #F2A48B;
  --heart: #F08C77;
  --heart-bg: #4A3230;
  --btn-bg: #F3E7CF;
  --btn-ink: #2B2019;
  --tabs-bg: rgba(31, 42, 38, .86);
  --grain-opacity: .16;
  --duck-halo-rare: #5E4B1C;
  --duck-halo: #3C3322;    /* same idea, darkened: a warm pool of light rather than a bright patch */
}

* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; color: var(--ink); }
body { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%) fixed; }
/* soft paper grain over everything */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: var(--grain-opacity); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .22 0 0 0 .55 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 12px; }
[hidden] { display: none !important; }

.app { min-height: 100dvh; max-width: 480px; margin: 0 auto; position: relative; display: flex; flex-direction: column; }

#screen {
  flex: 1; display: flex; flex-direction: column; outline: none;
  padding: calc(env(safe-area-inset-top) + 24px) 24px calc(var(--tab-h) + env(safe-area-inset-bottom) + 20px);
}
body[data-chrome="bare"] #screen { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
#screen.enter > * { animation: screenIn .45s var(--ease-out) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- boot ---------- */
.boot { margin: auto; display: flex; gap: 8px; }
.boot-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--focus); animation: bob 1s ease-in-out infinite; }
.boot-dot:nth-child(2) { animation-delay: .15s; } .boot-dot:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-6px); opacity: 1; } }

/* ---------- tab bar ---------- */
.tabs {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 5;
  display: flex; justify-content: space-around;
  padding: 6px 16px calc(env(safe-area-inset-bottom) + 6px);
  background: var(--tabs-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; max-width: 120px; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-soft); text-decoration: none; font-size: 12px; font-weight: 600; border-radius: 16px;
  transition: color .2s, background .2s;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] svg { stroke-width: 2.1; }

/* ---------- shared bits ---------- */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; }
.page-title { font-family: var(--font-display); font-weight: 400; font-size: 42px; line-height: 1.1; margin: 8px 0 4px; }
.page-sub { margin: 0 0 24px; color: var(--ink-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 32px; border-radius: 999px; border: 0;
  background: var(--btn-bg); color: var(--btn-ink); font-weight: 700; font-size: 17px;
  transition: transform .2s var(--ease-out), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-ghost { background: none; color: var(--ink-soft); min-height: 48px; font-weight: 600; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 20px); transform: translate(-50%, 12px);
  background: var(--btn-bg); color: var(--btn-ink); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease-out); z-index: 10; width: max-content; max-width: min(88vw, 340px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- onboarding ---------- */
.onboard { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.onboard-art { width: min(58vw, 230px); margin-bottom: 20px; animation: float 4.5s ease-in-out infinite; }
.onboard-art svg { width: 100%; height: auto; overflow: visible; }
.onboard h1 { font-size: 64px; line-height: 1; margin: 0; color: var(--brand); letter-spacing: 0; }
.onboard h2 { font-size: 36px; line-height: 1.12; margin: 0; max-width: 14em; text-wrap: balance; }
.onboard p { margin: 8px 0 0; color: var(--ink-soft); font-size: 18px; max-width: 20em; text-wrap: balance; }
.onboard .btn { margin-top: 32px; min-width: 240px; }
.onboard .btn-ghost { margin-top: 4px; }
.onboard .note { font-size: 14px; margin-top: 12px; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }

/* ---------- home ---------- */
.home { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px; }
.copy { display: grid; place-items: center; min-height: 92px; }
.copy > * { grid-area: 1 / 1; }
.headline { font-family: var(--font-display); font-weight: 400; font-size: 42px; line-height: 1.08; margin: 0; text-wrap: balance; }
.date { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); opacity: 0; }

.stage { position: relative; width: var(--stage); aspect-ratio: 1; flex: none; }
/* soft organic puddle behind the art, so a PNG's hard rectangular edge reads as sitting
   on a deliberate warm "stage" instead of showing its own crop line against the sage page bg */
.duck-halo {
  position: absolute; top: 50%; left: 50%; width: 122%; height: 116%;
  transform: translate(-50%, -50%) rotate(-4deg);
  background: var(--duck-halo);
  border-radius: 46% 54% 61% 39% / 42% 38% 62% 58%;
  filter: blur(9px);
  opacity: 0;
  pointer-events: none;
}
.duck-layer { position: absolute; inset: 0; opacity: 0; }
.duck-layer svg, .duck-layer img { width: 100%; height: 100%; object-fit: contain; overflow: visible; }

.gift-btn { position: absolute; inset: 0; padding: 0; border: 0; background: none; border-radius: 28px; touch-action: manipulation; }
.gift-wrap { width: 100%; height: 100%; animation: idle 3.6s ease-in-out infinite; }
.gift-wrap svg { width: 100%; height: 100%; overflow: visible; }
.gift-btn:active .gift-wrap { transform: scale(.97); }
.gift-body, .gift-lid { transform-box: fill-box; transform-origin: center; }
@keyframes idle { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }

.foot { display: grid; place-items: start center; min-height: 168px; width: 100%; }
.foot > * { grid-area: 1 / 1; }
.hint { margin: 6px 0 0; font-size: 17px; font-weight: 600; color: var(--ink-soft); animation: hint 2.4s ease-in-out infinite; }
@keyframes hint { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.foot-reveal { visibility: hidden; opacity: 0; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.message { font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1.1; margin: 0; max-width: 12em; text-wrap: balance; }
/* quotes over ~80 characters get smaller type so five-line quotes still clear the buttons and tab bar */
.message-long { font-size: 32px; max-width: 14em; }
@media (max-height: 720px) {
  :root { --stage: min(64vw, 260px, 30dvh); }
  .home { gap: 12px; }
  .foot { min-height: 0; }
  .foot-reveal { gap: 14px; }
  .message { font-size: 32px; }
  .message-long { font-size: 28px; }
}

.actions { display: flex; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 132px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: 16px; color: var(--ink);
  transition: transform .2s var(--ease-out), background .25s, color .25s, border-color .25s;
}
.pill:active { transform: scale(.96); }
.pill svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill[aria-busy="true"] { opacity: .6; pointer-events: none; }
.pill.save[aria-pressed="true"] { background: var(--heart-bg); border-color: transparent; color: var(--heart); }
.pill.save[aria-pressed="true"] svg { fill: currentColor; }
.pill.save.pop svg { animation: pop .5s var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---- rare ducks: gold glow, a shimmering "Rare" tag, and slow gold sparkles ---- */
.date-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.home.is-rare .duck-halo { background: var(--duck-halo-rare); box-shadow: 0 0 46px 14px rgba(243, 198, 79, .38); }
.rare-tag {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px 5px 10px;
  border-radius: 999px; border: 1.5px solid rgba(91, 62, 46, .28); color: #5B3E2E; opacity: 0;
  font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(110deg, #F2C14E, #FBE7A1 45%, #F2C14E);
}
.rare-tag svg { width: 15px; height: 15px; fill: #5B3E2E; }
.rare-tag::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%);
  animation: tagShine 3.8s ease-in-out 2.2s infinite;
}
@keyframes tagShine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.rare-sparkles { position: absolute; inset: -6%; pointer-events: none; }
.rare-sparkles .sparkle { opacity: 0; animation: rareTwinkle 3.2s ease-in-out infinite; }
.rare-sparkles .sparkle:nth-child(1) { left: 4%;  top: 18%; width: 22px; height: 22px; animation-delay: 1.3s; }
.rare-sparkles .sparkle:nth-child(2) { right: 6%; top: 10%; width: 28px; height: 28px; animation-delay: 1.8s; }
.rare-sparkles .sparkle:nth-child(3) { right: 0;  top: 46%; width: 16px; height: 16px; animation-delay: 2.4s; }
.rare-sparkles .sparkle:nth-child(4) { left: 0;   top: 58%; width: 18px; height: 18px; animation-delay: 1.5s; }
.rare-sparkles .sparkle:nth-child(5) { left: 28%; top: 0;   width: 14px; height: 14px; animation-delay: 2.1s; }
.rare-sparkles .sparkle:nth-child(6) { right: 22%; top: 90%; width: 20px; height: 20px; animation-delay: 2.7s; }
.rare-sparkles .sparkle:nth-child(7) { left: 12%; top: 86%; width: 14px; height: 14px; animation-delay: 1.9s; }
.rare-sparkles .sparkle:nth-child(8) { right: 14%; top: 30%; width: 12px; height: 12px; animation-delay: 2.5s; }
@keyframes rareTwinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 35% { opacity: 1; transform: scale(1.1) rotate(25deg); } 65% { opacity: .85; transform: scale(.85) rotate(50deg); } }
.home[data-phase="opening"] .rare-tag { animation: fadeIn .5s 1.4s forwards; }
.home[data-phase="open"] .rare-tag { opacity: 1; }
.home:not([data-phase="open"]):not([data-phase="opening"]) .rare-sparkles { display: none; }
.saved-art { position: relative; }
.saved-rare { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgba(91, 62, 46, .28); background: linear-gradient(135deg, #F2C14E, #FBE7A1); }
.saved-rare svg { width: 15px; height: 15px; fill: #5B3E2E; }

/* first-open hint: a hand taps the box (fingertip sits on the wrapper's origin, at the box's center) */
.tap-pointer { position: absolute; left: 54%; top: 56%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.tap-pointer svg { position: absolute; left: -26px; top: -3px; width: 52px; height: 61px; fill: #FFF6E2; stroke: #4A3428; stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); animation: tapHand 1.9s ease-in-out infinite; }
.tap-ripple { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #F1C453; opacity: 0; animation: tapRipple 1.9s ease-out infinite; }
.home:not([data-phase="closed"]) .tap-pointer { display: none; }
@keyframes tapHand { 0%, 100% { transform: translate(14px, 22px); } 38% { transform: translate(0, 0) scale(.93); } 52% { transform: translate(0, 0) scale(.93); } }
@keyframes tapRipple { 0%, 36% { transform: scale(.3); opacity: 0; } 42% { opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }

/* asked once, right after the first reveal */
.notif-card {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 10px); z-index: 20;
  width: min(calc(100vw - 24px), 456px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 16px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16); animation: cardUp .45s var(--spring) both;
}
.notif-card.leaving { animation: cardDown .25s ease-in forwards; }
.notif-title { margin: 0; flex: 1; font-size: 15px; font-weight: 700; line-height: 1.25; text-align: left; text-wrap: balance; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; flex: none; }
.notif-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--ink-soft); display: grid; place-items: center; }
.notif-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@keyframes cardUp { from { opacity: 0; transform: translate(-50%, -24px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes cardDown { to { opacity: 0; transform: translate(-50%, -24px); } }

.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkle { position: absolute; width: 20px; height: 20px; opacity: 0; fill: #F3C64F; }
.sparkle:nth-child(1) { left: 6%;  top: 22%; } .sparkle:nth-child(2) { right: 6%; top: 14%; width: 26px; height: 26px; }
.sparkle:nth-child(3) { right: 0;  top: 56%; width: 14px; height: 14px; } .sparkle:nth-child(4) { left: 0; top: 60%; width: 16px; height: 16px; }
.sparkle:nth-child(5) { left: 30%; top: 2%; width: 14px; height: 14px; }

/* ---- phases ---- */
/* closed: the gift sits there, gently breathing */
.home[data-phase="closed"] .headline { opacity: 1; }

/* opening (~1.9s): bounce → shake → lid off → duck rises → words fade in */
.home[data-phase="opening"] .gift-btn { pointer-events: none; }
.home[data-phase="opening"] .gift-wrap { animation: bounce .36s ease-out forwards, shake .44s ease-in-out .36s forwards; }
.home[data-phase="opening"] .gift-lid { animation: lidOff .55s cubic-bezier(.3, 1.3, .5, 1) .8s forwards; }
.home[data-phase="opening"] .gift-body { animation: boxSink .45s ease-in 1.05s forwards; }
.home[data-phase="opening"] .duck-layer { animation: duckPop .7s var(--spring) .9s both; }
.home[data-phase="opening"] .duck-halo { animation: haloBloom .7s var(--spring) .9s both; }
.home[data-phase="opening"] .sparkle { animation: twinkle .9s ease-out 1.05s both; }
.home[data-phase="opening"] .sparkle:nth-child(2n) { animation-delay: 1.2s; }
.home[data-phase="opening"] .hint { animation: fadeOut .25s forwards; }
.home[data-phase="opening"] .headline { animation: fadeOut .3s .8s forwards; }
.home[data-phase="opening"] .date { animation: fadeIn .5s 1.4s forwards; }
.home[data-phase="opening"] .foot-reveal { animation: fadeUp .55s var(--ease-out) 1.4s both; }
.home[data-phase="opening"] .actions { animation: fadeUp .5s var(--ease-out) 1.6s both; }

/* open: static end state (also what you get when you return later the same day) */
.home[data-phase="open"] .gift-btn, .home[data-phase="open"] .hint, .home[data-phase="open"] .headline, .home[data-phase="open"] .sparkles { display: none; }
.home[data-phase="open"] .duck-layer { opacity: 1; }
.home[data-phase="open"] .duck-halo { opacity: 1; }
.home[data-phase="open"] .date { opacity: 1; }
.home[data-phase="open"] .foot-reveal { visibility: visible; opacity: 1; }
.home[data-phase="open"].restored .stage, .home[data-phase="open"].restored .copy, .home[data-phase="open"].restored .foot { animation: fadeIn .5s ease-out both; }

@keyframes bounce {
  0% { transform: none; } 25% { transform: translateY(2%) scale(1.08, .9); }
  55% { transform: translateY(-7%) scale(.96, 1.06); } 80% { transform: translateY(0) scale(1.04, .96); } 100% { transform: none; }
}
@keyframes shake {
  0% { transform: rotate(0); } 15% { transform: rotate(-6deg); } 32% { transform: rotate(6deg); }
  50% { transform: rotate(-5deg); } 68% { transform: rotate(4deg); } 84% { transform: rotate(-2deg); } 100% { transform: rotate(0); }
}
@keyframes lidOff {
  0% { transform: none; opacity: 1; } 55% { transform: translate(-6%, -70%) rotate(-12deg); opacity: 1; }
  100% { transform: translate(-10%, -95%) rotate(-18deg); opacity: 0; }
}
@keyframes boxSink { to { transform: translateY(14%) scale(.94); opacity: 0; } }
@keyframes duckPop { 0% { opacity: 0; transform: translateY(24%) scale(.35); } 35% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes haloBloom { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-4deg) scale(.6); } 100% { opacity: 1; transform: translate(-50%, -50%) rotate(-4deg) scale(1); } }
@keyframes twinkle { 0% { opacity: 0; transform: scale(0) rotate(0); } 40% { opacity: 1; transform: scale(1.1) rotate(20deg); } 100% { opacity: 0; transform: scale(.4) rotate(50deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; visibility: visible; transform: translateY(10px); } to { opacity: 1; visibility: visible; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .gift-wrap, .onboard-art, .hint, .boot-dot, .tap-ripple { animation: none !important; }
  .tap-pointer svg { animation: none !important; transform: translate(6px, 10px); }
  .rare-tag::after { animation: none !important; }
  .rare-sparkles .sparkle { animation: none !important; opacity: .85; transform: scale(.9); }
  .notif-card, .notif-card.leaving { animation: none !important; }
  .home[data-phase="opening"] .gift-wrap, .home[data-phase="opening"] .gift-lid, .home[data-phase="opening"] .gift-body,
  .home[data-phase="opening"] .sparkle { animation: none !important; }
  .home[data-phase="opening"] .gift-btn { animation: fadeOut .3s forwards; }
  .home[data-phase="opening"] .duck-layer { animation: fadeIn .4s ease-out .2s both; }
  .home[data-phase="opening"] .duck-halo { animation: fadeIn .4s ease-out .2s both; }
  .home[data-phase="opening"] .headline { animation-delay: 0s; }
  .home[data-phase="opening"] .date, .home[data-phase="opening"] .foot-reveal { animation-delay: .35s; animation-duration: .3s; }
  .home[data-phase="opening"] .actions { animation: none; }
  .pill.save.pop svg { animation: none; }
}

/* ---------- saved ---------- */
.saved-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0; margin: 0; list-style: none; }
.saved-card { background: var(--card); border: 1.5px solid var(--line); border-radius: 24px; padding: 10px 10px 16px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.saved-art { aspect-ratio: 1; padding: 2px 0 0; }
.saved-art svg, .saved-art img { width: 100%; height: 100%; object-fit: contain; }
.saved-msg { font-family: var(--font-display); font-size: 22px; line-height: 1.12; margin: 0 4px; text-wrap: balance; }
.saved-date { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }

.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding-bottom: 40px; }
.empty-art { width: 170px; margin-bottom: 8px; }
.empty-art svg, .empty-art img { width: 100%; height: auto; }
.empty h2 { font-family: var(--font-display); font-weight: 400; font-size: 34px; margin: 0; }
.empty p { margin: 0; color: var(--ink-soft); max-width: 16em; text-wrap: balance; }

/* ---------- settings ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--line); flex: none; }
.seg button { border: 0; background: none; color: var(--ink-soft); font-weight: 700; font-size: 14px; padding: 8px 13px; min-height: 36px; border-radius: 999px; }
.seg button[aria-checked="true"] { background: var(--btn-bg); color: var(--btn-ink); }
.list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.row { background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.row.is-off { opacity: .5; }
.row-title { font-weight: 700; margin: 0; }
.row-sub { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }
.switch { flex: none; width: 56px; height: 34px; border-radius: 999px; border: 0; background: var(--line); position: relative; transition: background .25s; padding: 0; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .3s var(--spring); }
.switch[aria-checked="true"] { background: var(--switch-on); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }
.time-input { border: 1.5px solid var(--line); background: var(--bg); border-radius: 14px; padding: 8px 12px; min-height: 44px; font-weight: 700; font-size: 16px; }
.time-input:disabled { pointer-events: none; }
.notice { font-size: 14px; color: var(--ink-soft); margin: -4px 6px 0; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--ink-soft); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; align-self: flex-start; margin-left: 6px; }

.section-title { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 4px 6px 10px; }
.about { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 14px 18px; margin-bottom: 12px; }
.about-art { width: 60px; flex: none; }
.about-art svg, .about-art img { width: 100%; height: auto; }
.about h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.about p { margin: 2px 0 0; color: var(--ink-soft); font-size: 15px; }
.privacy { background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 0 18px; }
.privacy summary { list-style: none; min-height: 56px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; cursor: pointer; }
.privacy summary::-webkit-details-marker { display: none; }
.privacy summary::after { content: '›'; font-size: 22px; color: var(--ink-soft); transition: transform .2s; }
.privacy[open] summary::after { transform: rotate(90deg); }
.privacy p { margin: 0 0 16px; color: var(--ink-soft); font-size: 15px; }
.version { text-align: center; color: var(--ink-soft); font-size: 12px; margin: 28px 0 0; opacity: .7; }

@media (max-height: 700px) {
  .headline { font-size: 34px; } .message { font-size: 32px; } .home { gap: 12px; } .foot { min-height: 150px; } .copy { min-height: 72px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

/* ---------- skins ---------- */
.skin-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.skin-card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; padding: 12px 14px;
  display: flex; align-items: center; gap: 14px; transition: border-color .25s, background .25s;
}
.skin-card.is-active { border-color: var(--switch-on); background: color-mix(in srgb, var(--switch-on) 10%, var(--card)); }
.skin-art { width: 60px; height: 60px; flex: none; background: var(--bg-2); border-radius: 16px; padding: 4px; }
.skin-art svg, .skin-art img { width: 100%; height: 100%; object-fit: contain; }
.skin-info { flex: 1; min-width: 0; text-align: left; }
.skin-name { margin: 0; font-weight: 700; }
.skin-sub { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.skin-badge {
  flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; color: var(--switch-on);
}
.skin-badge svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.skin-card .pill { flex: none; min-width: 0; min-height: 44px; padding: 0 16px; font-size: 14px; }
.skin-card .pill.skin-unlock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.skin-bundle { display: block; width: 100%; text-align: center; margin-bottom: 16px; }
.skin-notice { text-align: center; margin: 0 0 8px; }
