/* ─────────────────────────────────────────────────────────────
   Merry Listmas: Edwardian Christmas cards on green felt
   ───────────────────────────────────────────────────────────── */
@font-face { font-family: 'UnifrakturMaguntia'; src: url(fonts/unifrakturmaguntia-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Pinyon Script'; src: url(fonts/pinyon-script-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'IM Fell English'; src: url(fonts/im-fell-english-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'IM Fell English'; font-style: italic; src: url(fonts/im-fell-english-latin-400-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Homemade Apple'; src: url(fonts/homemade-apple-latin-400-normal.woff2) format('woff2'); font-display: swap; }

:root {
  --felt: #17241d;
  --cream: #f4e8cf;
  --cream-2: #e6d8bb;
  --ink: #2b1d14;
  --ink-soft: #5c4a35;
  --ink-faded: #6e5a40;
  --blue-ink: #1f3a6b;
  --red: #b3242a;
  --red-deep: #6f1519;
  --green: #2d5a3a;
  --green-line: #4a6b52;
  --gold: #c49a3c;
  --gold-light: #e9cc7a;
  --rose: #ee9ab2;
  --muted: #d9ccb0;
  --black: 'UnifrakturMaguntia', 'Old English Text MT', serif;
  --script: 'Pinyon Script', cursive;
  --serif: 'IM Fell English', Georgia, 'Times New Roman', serif;
  --hand: 'Homemade Apple', cursive;
  --k: 1;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--felt);
  background-image:
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.4px),
    radial-gradient(rgba(0,0,0,.25) 1px, transparent 1.4px),
    radial-gradient(ellipse at 50% 0%, rgba(80,120,90,.18), transparent 60%);
  background-size: 5px 5px, 7px 7px, 100% 100%;
  background-position: 0 0, 2px 3px, 0 0;
  color: var(--cream);
  font: 17px/1.4 var(--serif);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }

#app { width: 100%; max-width: 430px; padding: 0 16px 8px; flex: 1; }
.credit { padding: 10px 0 22px; font-size: 13px; color: #a9bcae; }
.credit a { color: #c9d6cb; text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ── paper & card stock ─────────────────────────── */
.paper {
  background-image:
    url(img/paper.png),
    radial-gradient(circle at 84% 12%, rgba(140,92,36,.16) 0 5px, transparent 13px),
    radial-gradient(circle at 10% 86%, rgba(140,92,36,.13) 0 8px, transparent 18px),
    radial-gradient(ellipse at center, transparent 55%, rgba(122,80,32,.30) 100%);
  background-size: 320px 320px, 100% 100%, 100% 100%, 100% 100%;
}
.deckle { clip-path: polygon(0.0% 0.52%, 2.94% 0.72%, 5.88% 0.73%, 8.82% 0.16%, 11.76% 0.01%, 14.71% 0.41%, 17.65% 0.3%, 20.59% 0.89%, 23.53% 0.76%, 26.47% 0.66%, 29.41% 0.61%, 32.35% 0.73%, 35.29% 0.16%, 38.24% 0.48%, 41.18% 0.18%, 44.12% 1.0%, 47.06% 0.06%, 50.0% 0.9%, 52.94% 0.08%, 55.88% 0.76%, 58.82% 0.37%, 61.76% 0.45%, 64.71% 0.93%, 67.65% 0.02%, 70.59% 0.07%, 73.53% 1.01%, 76.47% 0.56%, 79.41% 0.1%, 82.35% 1.09%, 85.29% 1.04%, 88.24% 0.12%, 91.18% 0.47%, 94.12% 0.15%, 97.06% 0.34%, 99.32% 0.0%, 99.82% 2.94%, 99.23% 5.88%, 99.94% 8.82%, 99.81% 11.76%, 99.1% 14.71%, 99.56% 17.65%, 99.54% 20.59%, 99.34% 23.53%, 99.48% 26.47%, 99.58% 29.41%, 99.97% 32.35%, 99.2% 35.29%, 98.94% 38.24%, 98.93% 41.18%, 99.27% 44.12%, 99.61% 47.06%, 99.6% 50.0%, 99.24% 52.94%, 99.26% 55.88%, 99.87% 58.82%, 99.74% 61.76%, 99.6% 64.71%, 99.44% 67.65%, 99.11% 70.59%, 99.45% 73.53%, 99.97% 76.47%, 99.1% 79.41%, 99.53% 82.35%, 99.43% 85.29%, 99.76% 88.24%, 99.53% 91.18%, 99.57% 94.12%, 99.15% 97.06%, 100.0% 99.89%, 97.06% 99.4%, 94.12% 99.8%, 91.18% 99.23%, 88.24% 99.96%, 85.29% 99.7%, 82.35% 99.62%, 79.41% 99.3%, 76.47% 99.94%, 73.53% 99.49%, 70.59% 99.77%, 67.65% 99.69%, 64.71% 99.48%, 61.76% 98.95%, 58.82% 99.47%, 55.88% 98.95%, 52.94% 99.82%, 50.0% 98.98%, 47.06% 99.6%, 44.12% 99.79%, 41.18% 99.18%, 38.24% 99.0%, 35.29% 99.99%, 32.35% 99.7%, 29.41% 99.15%, 26.47% 99.62%, 23.53% 99.73%, 20.59% 99.99%, 17.65% 99.96%, 14.71% 99.32%, 11.76% 98.92%, 8.82% 98.9%, 5.88% 99.45%, 2.94% 99.97%, 0.35% 100.0%, 0.87% 97.06%, 0.92% 94.12%, 0.7% 91.18%, 0.25% 88.24%, 0.58% 85.29%, 0.53% 82.35%, 0.69% 79.41%, 0.29% 76.47%, 1.04% 73.53%, 0.98% 70.59%, 0.18% 67.65%, 0.32% 64.71%, 0.96% 61.76%, 0.31% 58.82%, 1.04% 55.88%, 0.57% 52.94%, 0.77% 50.0%, 0.78% 47.06%, 0.24% 44.12%, 0.31% 41.18%, 0.28% 38.24%, 0.75% 35.29%, 0.76% 32.35%, 0.14% 29.41%, 0.98% 26.47%, 0.46% 23.53%, 0.27% 20.59%, 0.48% 17.65%, 1.08% 14.71%, 0.62% 11.76%, 0.69% 8.82%, 1.01% 5.88%, 1.06% 2.94%); }
.print {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background-image: url(img/paper.png), radial-gradient(rgba(40,20,0,.10) .8px, transparent 1.3px);
  background-size: 320px 320px, 4px 4px;
}
.panel {
  background-color: var(--cream); color: var(--ink);
  border: 3px double var(--gold); border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

/* ── type ─────────────────────────── */
.script { font-family: var(--script); color: var(--rose); line-height: 1; }
.black { font-family: var(--black); font-weight: 400; }
.eyebrow { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; }
.hand { font-family: var(--hand); }
.small { font-size: 15px; color: var(--muted); }
.center { text-align: center; }

/* ── buttons ─────────────────────────── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 20px; width: 100%;
  border: 0; border-radius: 8px; text-decoration: none;
  font: 20px/1.1 var(--serif); text-align: center;
  transition: transform .08s, box-shadow .08s, opacity .2s;
}
.btn:active:not(:disabled) { transform: translateY(3px); }
.btn-red { background: var(--red); color: var(--cream); box-shadow: 0 4px 0 var(--red-deep); }
.btn-red:active:not(:disabled) { box-shadow: 0 1px 0 var(--red-deep); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 #7d6020; }
.btn-gold:active:not(:disabled) { box-shadow: 0 1px 0 #7d6020; }
.btn-green { background: var(--green); color: var(--cream); box-shadow: 0 4px 0 #17331f; }
.btn-line { background: transparent; color: var(--cream); border: 1.5px solid var(--green-line); min-height: 48px; font-size: 17px; }
.btn:disabled { opacity: .45; cursor: default; }
.round {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--green-line); background: transparent; color: var(--cream); text-decoration: none;
}
.round svg { width: 18px; height: 18px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; }
.topbar .eyebrow { font-size: 14px; letter-spacing: .2em; }

/* ── header ornaments + title ─────────────────────────── */
.ornaments { display: block; width: calc(100% + 32px); max-width: 430px; height: auto; margin: 0 -16px; }
.title-block { text-align: center; margin-top: -6px; }
.title-block .script { font-size: 30px; }
.title-block h1 { margin: 0; font-family: var(--black); font-weight: 400; font-size: 62px; line-height: 1.05; }
.title-block p { margin: 4px auto 0; max-width: 330px; font-style: italic; font-size: 16px; color: var(--muted); }

/* ── coming soon ─────────────────────────── */
.soon { display: flex; flex-direction: column; gap: 18px; padding-bottom: 6px; }
.soon-env { position: relative; width: 300px; height: 200px; margin: 6px auto 0; filter: drop-shadow(0 16px 26px rgba(0,0,0,.55)); }
.soon-env .body { position: absolute; inset: 0; border-radius: 6px; background-color: #8e1f24; }
.soon-env svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.soon-env .label { position: absolute; left: 18px; bottom: 18px; padding: 6px 10px; background-color: var(--cream); color: var(--blue-ink); transform: rotate(-3deg); box-shadow: 0 2px 4px rgba(0,0,0,.35); font: 11px/1.7 var(--hand); }
.soon-env { animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-.6deg); } }
.countdown { padding: 14px 16px 16px; text-align: center; }
.countdown .eyebrow { color: var(--red); }
.cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.cd div { display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; border: 1px solid #d6c7a6; background: rgba(255,250,235,.55); }
.cd b { font: 400 34px/1 var(--black); color: var(--ink); }
.cd span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; color: var(--muted); }
.steps li b { color: var(--cream); font-weight: 400; }
.steps .num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: var(--cream); font: 400 17px/1 var(--black); box-shadow: 0 0 0 2px var(--gold); }

/* ── calendar ─────────────────────────── */
.home { display: flex; flex-direction: column; gap: 14px; }
.cal { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; }
.cal-head .streak { font-style: italic; font-size: 15px; color: #8e2f3a; }
.stamps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.stamp {
  position: relative; aspect-ratio: 1 / 1.08; padding: 3px;
  background-color: #fffaf0; border: 2px dotted #b9a27a; text-decoration: none;
}
.stamp .in { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.stamp .n { font: 400 20px/1 var(--black); }
.stamp .s { font: 9px/1.5 var(--hand); }
.stamp.past .in, .stamp.posted .in { color: var(--cream); }
.stamp.past .mark, .stamp.posted .mark { position: absolute; right: -6px; top: 4px; width: 34px; height: 22px; opacity: .45; }
.stamp.lost .in { background: #e2d4b6; color: var(--ink-faded); }
.stamp.lost .s { font: italic 10px/1.2 var(--serif); }
.stamp.before { opacity: .55; }
.stamp.before .in { background: #ece0c4; color: #6e5a40; }
.stamp.future .in { background: #efe2c6; color: var(--ink-faded); }
.stamp.today { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(196,154,60,.8); animation: glow 2.4s ease-in-out infinite; }
.stamp.today .in { background: var(--red); color: var(--cream); }
.stamp.today .s { font: 9px/1.3 var(--serif); letter-spacing: .14em; }
.stamp.finale { border-color: var(--gold); }
.stamp.finale .in { background: var(--gold); color: var(--ink); }
@keyframes glow { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(233,204,122,.95); } }

/* ── card stage (envelope → front → back) ─────────────────────────── */
.stage-wrap { width: calc(358px * var(--k)); height: calc(604px * var(--k)); margin: 0 auto; }
.stage { position: relative; width: 358px; height: 604px; transform: scale(var(--k)); transform-origin: 0 0; }
.stage.is-sealed { cursor: pointer; }
.mover {
  position: absolute; inset: 0; z-index: 3; perspective: 1400px;
  transform: translateY(118px) scale(.4); opacity: 0;
  transition: transform 1s cubic-bezier(.2,.75,.2,1) .45s, opacity .01s linear .3s;
}
.stage:not(.is-sealed) .mover { transform: none; opacity: 1; }
.flipper { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3,.7,.2,1); }
.stage.is-back .flipper { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face.back { transform: rotateY(180deg); }
.face .shadow { position: absolute; inset: 10px 8px 4px; box-shadow: 0 16px 36px rgba(0,0,0,.6); }
.sheet {
  position: absolute; inset: 0; background-color: var(--cream); color: var(--ink);
  box-shadow: inset 0 0 0 7px var(--cream), inset 0 0 0 8px rgba(196,154,60,.75);
}
.front .sheet { padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.art { position: relative; width: 330px; height: 446px; flex: none; }
.art svg { display: block; width: 100%; height: 100%; }
.greet { display: flex; flex-direction: column; align-items: center; margin-top: 4px; text-align: center; }
.greet .bl { font: 400 30px/1.05 var(--black); color: var(--red); }
.greet .sc { font: 26px/1.05 var(--script); color: var(--green); }
.greet .sub { margin-top: 2px; font-style: italic; font-size: 15px; color: var(--ink); }

.env { position: absolute; left: 0; top: 300px; width: 358px; height: 240px; z-index: 4; transition: transform .7s ease-in .85s, opacity .5s ease .95s; }
.env .body { position: absolute; inset: 0; border-radius: 6px; background-color: #8e1f24; box-shadow: 0 18px 36px rgba(0,0,0,.55), inset 0 0 0 1px rgba(0,0,0,.35); }
.env svg { position: absolute; inset: 0; }
.env .label { position: absolute; left: 22px; bottom: 22px; width: 160px; padding: 8px 10px; background-color: var(--cream); color: var(--blue-ink); transform: rotate(-3deg); box-shadow: 0 2px 4px rgba(0,0,0,.35); font: 11px/1.7 var(--hand); }
.env .postage { position: absolute; right: 22px; bottom: 26px; width: 46px; height: 56px; padding: 3px; background-color: #fffaf0; border: 2px dotted #b9a27a; transform: rotate(4deg); }
.env .postage div { height: 100%; display: grid; place-items: center; background: var(--green); }
.flap-wrap {
  position: absolute; left: 0; top: 300px; width: 358px; height: 134px; z-index: 5;
  perspective: 900px; perspective-origin: 50% 0;
  transition: transform .7s ease-in .85s, opacity .5s ease .95s, z-index 0s linear .26s;
}
.flap { position: absolute; inset: 0; transform-origin: 50% 0; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.45,.05,.3,1); }
.flap svg { position: absolute; inset: 0; overflow: visible; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flap svg.lining { transform: rotateX(180deg); }
.stage:not(.is-sealed) .env, .stage:not(.is-sealed) .flap-wrap { transform: translateY(380px); opacity: 0; pointer-events: none; }
.stage:not(.is-sealed) .flap-wrap { z-index: 1; }
.stage:not(.is-sealed) .flap { transform: rotateX(180deg); }
.stage.instant *, .stage.instant { transition: none !important; }

/* back of the card */
.back .sheet { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 9px; }
.bk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.bk-head .txt { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.bk-head .pc { font-size: 13px; letter-spacing: .3em; text-transform: uppercase; }
.bk-head .which { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.bk-head .prompt { font-style: italic; font-size: 20px; line-height: 1.2; min-height: 48px; }
.timer { position: relative; flex: none; width: 82px; height: 98px; }
.timer .perf { position: absolute; inset: 0; padding: 4px; background-color: #fffaf0; border: 3px dotted #b9a27a; }
.timer .face-val { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--red); color: var(--cream); box-shadow: inset 0 0 0 2px rgba(244,232,207,.5); transition: background .3s; }
.timer .face-val b { font: 400 36px/1 var(--serif); }
.timer .face-val span { font-size: 9px; letter-spacing: .14em; }
.timer.low .face-val { background: var(--red-deep); animation: tick 1s steps(1) infinite; }
@keyframes tick { 50% { background: #8e1f24; } }
.timer .postmark { position: absolute; left: -34px; bottom: -28px; width: 84px; height: 58px; opacity: .3; transition: opacity .4s; }
.posted-card .timer .postmark { opacity: 1; }
.write { display: flex; gap: 8px; align-items: flex-end; }
.write label { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.write label span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.write input {
  height: 42px; width: 100%; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: transparent;
  font: 15px var(--hand); color: var(--blue-ink); outline: none; padding: 0 2px;
}
.write input::placeholder { color: #8a7558; }
.write input:focus { border-bottom-color: var(--red); }
.write .btn { width: auto; min-height: 46px; padding: 0 14px; font-size: 17px; border-radius: 6px; }
.note { min-height: 20px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 14px; color: var(--ink-soft); }
.note .msg { font-style: italic; }
.note .msg.good { color: var(--green); }
.note .x { font: 11px/1.6 var(--hand); text-decoration: line-through; color: var(--ink-faded); }
.meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); border-top: 1px solid #d6c7a6; padding-top: 6px; }
.meta strong { color: var(--ink); font-weight: 400; }
.lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
.line { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; border-bottom: 1px solid #b9a27a; padding-bottom: 2px; overflow: hidden; }
.line .t { font: 12px/1.5 var(--hand); color: var(--blue-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line .p { font-size: 12px; color: var(--red); }
.line.new .t { animation: write .6s ease-out both; }
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.bk-foot { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--red); opacity: .8; pointer-events: none; }
.bk-foot span { font: 22px/1 var(--script); }
.bk-foot svg { width: 26px; height: 22px; }
.many .bk-foot { display: none; }
.posted-stamp {
  position: absolute; right: 26px; bottom: 74px; z-index: 2; pointer-events: none;
  font: 400 34px/1.1 var(--black); color: var(--red); border: 3px solid var(--red); border-radius: 6px; padding: 0 12px;
  transform: rotate(-8deg) scale(1.6); opacity: 0; transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .2s; mix-blend-mode: multiply;
}
.posted-card .posted-stamp { opacity: .85; transform: rotate(-8deg) scale(1); }
.posted-card .write { opacity: .35; pointer-events: none; }

.card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; min-height: 84px; }
.card-actions .small { text-align: center; font-style: italic; font-size: 14px; }

/* ── results ─────────────────────────── */
.results { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.results .hero { text-align: center; }
.results .hero .script { font-size: 34px; }
.results .hero h1 { margin: 0; font: 400 64px/1.05 var(--black); }
.results .hero .sub { font-size: 17px; color: var(--gold-light); }
.answers { padding: 8px 14px; display: flex; flex-direction: column; }
.answers .q { padding: 6px 0 8px; border-bottom: 1px solid #d6c7a6; font-style: italic; font-size: 15px; color: var(--ink-soft); }
.ans { display: flex; align-items: center; gap: 10px; min-height: 34px; border-bottom: 1px solid #e0d2b3; }
.ans:last-child { border-bottom: 0; }
.ans svg { flex: none; width: 16px; height: 16px; }
.ans .nm { flex: 1; min-width: 0; }
.ans.got .nm { font: 12px/1.6 var(--hand); color: var(--blue-ink); }
.ans.miss .nm { font-size: 15px; color: var(--ink-faded); }
.ans .pc { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.ans .pt { width: 26px; text-align: right; font-size: 14px; color: var(--red); }
.ans.miss .pt { color: var(--ink-faded); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.chips i { width: 9px; height: 12px; border: 1px solid var(--gold); border-radius: 1px; }
.chips i.on { background: var(--red); }
.share-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.two { display: flex; gap: 10px; }
.two .btn { flex: 1; }
.next-card { text-align: center; font-size: 14px; font-style: italic; color: var(--muted); }
.next-card b { font-style: normal; font-weight: 400; color: var(--cream); }

/* ── album ─────────────────────────── */
.album { display: flex; flex-direction: column; gap: 12px; padding: 14px 0 8px; }
.leather {
  position: relative; height: 118px; border-radius: 6px 10px 10px 6px; background-color: #5c1a1e;
  background-image: url(img/leather.png), radial-gradient(ellipse at 50% 35%, rgba(255,190,150,.16) 0%, transparent 60%), radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.45) 100%);
  background-size: 320px 320px, 100% 100%, 100% 100%;
  box-shadow: 0 10px 24px rgba(0,0,0,.55), inset 6px 0 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,200,170,.18);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.leather::before { content: ''; position: absolute; inset: 9px 9px 9px 15px; border: 1.5px solid rgba(214,174,88,.85); border-radius: 3px; box-shadow: inset 0 0 0 3px #5c1a1e, inset 0 0 0 4px rgba(214,174,88,.55); pointer-events: none; }
.foil { background-image: linear-gradient(100deg,#8a6a22 0%,#f7e3a1 22%,#c49a3c 40%,#fff2c4 55%,#b88a2e 72%,#e9cc7a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.leather .t1 { font-size: 11px; letter-spacing: .34em; text-transform: uppercase; }
.leather .t2 { font: 400 40px/1.05 var(--black); filter: drop-shadow(0 1px 0 rgba(0,0,0,.6)); }
.leather .t3 { font-size: 13px; font-style: italic; }
.leather .round { position: absolute; right: 14px; top: 14px; border-color: rgba(214,174,88,.85); background: rgba(0,0,0,.2); }
.page {
  position: relative; border-radius: 4px; background-color: #1d1a17; padding: 14px 12px 12px 30px;
  background-image: url(img/paper.png), radial-gradient(ellipse at center, rgba(255,255,255,.04) 0%, transparent 70%);
  background-size: 220px 220px, 100% 100%;
  box-shadow: 0 10px 24px rgba(0,0,0,.5), inset 0 0 30px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 10px;
}
.page .holes { position: absolute; left: 9px; top: 0; bottom: 0; width: 12px; display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; }
.page .holes i { width: 9px; height: 9px; border-radius: 50%; background: #0c0a09; box-shadow: inset 0 1px 1px rgba(255,255,255,.2); }
.page-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.page-head .hand { font-size: 13px; color: #ece6da; }
.page-head .eyebrow { font-size: 12px; letter-spacing: .14em; color: #b9b1a2; }
.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.slot .holder { position: relative; width: 108px; height: 146px; border: 0; padding: 0; background: none; }
.slot .holder:disabled { cursor: default; }
.slot .mini { position: absolute; inset: 0; background-color: var(--cream); padding: 6px 6px 5px; display: flex; flex-direction: column; gap: 3px; box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px rgba(196,154,60,.7); }
.slot .mini .pic { position: relative; flex: 1; overflow: hidden; }
.slot .mini .pic svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.slot .mini .ttl { font: italic 11px/1.15 var(--serif); color: var(--ink); text-align: center; height: 26px; display: flex; align-items: center; justify-content: center; }
.slot .shade { position: absolute; inset: 6px 4px 0; box-shadow: 0 8px 14px rgba(0,0,0,.7); }
.slot .corner { position: absolute; width: 20px; height: 20px; }
.slot .corner.tl { left: -5px; top: -5px; } .slot .corner.tr { right: -5px; top: -5px; transform: rotate(90deg); }
.slot .corner.br { right: -5px; bottom: -5px; transform: rotate(180deg); } .slot .corner.bl { left: -5px; bottom: -5px; transform: rotate(270deg); }
.slot .empty { position: absolute; inset: 0; border: 1.5px dashed #5f584e; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #9c9486; text-align: center; font-size: 12px; }
.slot .empty b { font: 400 18px/1 var(--black); }
.slot .cap { font: 10px/1.5 var(--hand); color: #ece6da; white-space: nowrap; }
.sticker { position: absolute; z-index: 2; right: -10px; top: -10px; width: 42px; height: 42px; border-radius: 50%; background: var(--gold); color: var(--ink); box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 0 0 2px var(--gold-light), inset 0 0 0 4px #a88230; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(12deg); font-size: 8px; letter-spacing: .08em; line-height: 1.15; text-align: center; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.pager .round { border-color: #5f584e; color: #ece6da; }
.pager .round:disabled { opacity: .3; cursor: default; }
.dots { display: flex; gap: 7px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #5f584e; }
.dots i.on { background: var(--gold-light); }
.summary { margin: 2px 6px 0; padding: 12px 14px; border: 1px dashed #5f584e; font: 12px/1.8 var(--hand); color: #ece6da; }

/* album card viewer */
.viewer { position: fixed; inset: 0; z-index: 20; background: rgba(8,12,10,.82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; overflow-y: auto; }
.viewer .stage-wrap { flex: none; }
.viewer .row { display: flex; gap: 10px; width: min(358px, 100%); }
.viewer .row .btn { flex: 1; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 30; background: var(--cream); color: var(--ink); padding: 10px 18px; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.45); font-size: 16px; }
.loading { display: flex; justify-content: center; padding: 120px 0; }
.loading svg { width: 46px; height: 46px; animation: swing 1.2s ease-in-out infinite alternate; transform-origin: 50% 0; }
@keyframes swing { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
.err { margin-top: 60px; padding: 20px; text-align: center; }
.err h2 { margin: 0 0 6px; font: 400 32px/1 var(--black); color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
