/* =====================================================================
   Juliana & Irvens — Baby Shower
   One stationery suite: cream stock, navy ink, gold foil, on the
   envelope's powder-blue liner. Bodoni Moda · Petit Formal Script · Hanken Grotesk
   ===================================================================== */
:root {
  --liner: #cddbe8;
  --liner-deep: #b9cbdc;
  --liner-ink: #5b7a99;
  --stock: #fbf7f0;
  --stock-2: #f3ede3;
  --plate: #ffffff;
  --ink: #1f2a44;
  --ink-soft: #3f4a66;
  --muted: #5f6b83;
  --gold: #b08a3e;
  --gold-ink: #85662a;
  --gold-soft: #e2cf9a;
  --blush: #dcbfc0;
  --error: #9c3a3a;
  --rule: rgba(31, 42, 68, .22);
  --hair: rgba(176, 138, 62, .55);

  --shadow: 0 18px 40px -18px rgba(31, 42, 68, .35), 0 3px 8px -2px rgba(31, 42, 68, .12);
  --shadow-soft: 0 10px 24px -14px rgba(31, 42, 68, .3), 0 1px 3px rgba(31, 42, 68, .08);
  --radius: 4px;

  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --script: "Petit Formal Script", "Snell Roundhand", cursive;
  --body: "Hanken Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur: 700ms;

  /* legacy aliases so host.css keeps working */
  --paper: var(--liner); --paper-2: var(--stock-2); --cream: var(--stock); --card: var(--stock);
  --serif: var(--display); --gold-deep: var(--gold-ink); --blue-ink: var(--liner-ink); --blue-deep: var(--liner-ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--liner);
  min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.locked { overflow: hidden; height: 100vh; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
[hidden] { display: none !important; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
::selection { background: var(--ink); color: var(--stock); }
input, textarea { caret-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--liner-ink); border: 3px solid var(--liner); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-color: var(--liner-ink) transparent; scrollbar-width: thin; }

i { font-style: normal; color: var(--gold-ink); padding: 0 .1em; }
.fr { display: block; font-size: max(.78em, 14px); font-weight: 400; color: var(--muted); letter-spacing: .01em; margin-top: 2px; }
.h2 { font-family: var(--display); font-size: clamp(30px, 5vw, 40px); line-height: 1.08; letter-spacing: -.005em; text-wrap: balance; color: var(--ink); }
.h2 .fr { font-family: var(--body); font-size: 15px; margin-top: 6px; }
.h3 { font-family: var(--display); font-size: 24px; line-height: 1.15; color: var(--ink); }
.h3 .fr { font-family: var(--body); font-size: 14px; margin-top: 2px; }
.on-liner, .on-liner .fr { color: var(--ink); }
.on-liner .fr { color: var(--ink-soft); }
.lede { color: var(--ink-soft); font-size: 16px; max-width: 58ch; }
.lede .fr { margin-top: 6px; font-size: 14px; }
.label { display: block; font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--ink); }
.label .fr, .field label .fr { display: inline; font-size: 14px; font-weight: 400; color: var(--muted); margin: 0 0 0 6px; }
.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.ico-sm { width: 14px; height: 14px; margin-left: 4px; vertical-align: -2px; }
.tiny { font-size: 14px; color: var(--ink-soft); text-decoration: none; }

/* ---------- the liner ---------- */
.liner { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--liner);
  background-image:
    radial-gradient(110% 70% at 10% 0%, rgba(255, 255, 255, .35), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(91, 122, 153, .16), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23b08a3e' fill-opacity='.22'%3E%3Cpath d='M20 12l1.4 4.6L26 18l-4.6 1.4L20 24l-1.4-4.6L14 18l4.6-1.4z'/%3E%3Cpath d='M86 54l1.1 3.4 3.4 1.1-3.4 1.1L86 63l-1.1-3.4-3.4-1.1 3.4-1.1z'/%3E%3Cpath d='M48 96l1.2 3.8 3.8 1.2-3.8 1.2L48 106l-1.2-3.8-3.8-1.2 3.8-1.2z'/%3E%3Ccircle cx='100' cy='16' r='1.3'/%3E%3Ccircle cx='10' cy='70' r='1.3'/%3E%3Ccircle cx='66' cy='30' r='1'/%3E%3C/g%3E%3C/svg%3E"); }
.flowers { position: absolute; inset: 0; }
.flowers svg { position: absolute; opacity: .75; animation: drift var(--t, 60s) linear infinite; }
@keyframes drift { from { transform: translate(0, 108vh) rotate(0); } to { transform: translate(var(--dx, 30px), -14vh) rotate(var(--rot, 160deg)); } }

/* ---------- paper: the shared stock every piece is printed on ---------- */
.piece { position: relative; background: var(--stock); box-shadow: var(--shadow); border-radius: 3px; color: var(--ink);
  background-image: radial-gradient(rgba(150, 130, 90, .045) 1px, transparent 1px); background-size: 6px 6px; }
.piece::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--hair); pointer-events: none; border-radius: 1px; }

/* the invitation card */
.card { aspect-ratio: 5 / 7; width: 100%; overflow: hidden; }
.card-text { position: relative; z-index: 1; height: 100%; display: grid; align-content: center; justify-items: center; text-align: center; gap: 5px; padding: 13% 10% 14%; }
.names { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 8.4vw, 38px); line-height: .98; letter-spacing: .01em; color: var(--ink); display: grid; justify-items: center; gap: 0; text-wrap: balance; }
.names .amp { font-family: var(--display); font-style: italic; color: var(--gold-ink); font-size: .7em; line-height: .9; margin: 2px 0 0; }
.script { font-family: var(--script); font-size: clamp(30px, 8.4vw, 38px); line-height: 1.1; color: var(--ink); margin-top: 4px; white-space: nowrap; }
.caps { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: #46648a; font-weight: 500; margin-top: 6px; padding-left: .22em; line-height: 1.6; }
.caps i { display: block; height: 0; overflow: hidden; }
.rule { width: 56px; height: 2px; background: var(--gold); margin: 10px 0 8px; border-radius: 1px; }
.date { font-family: var(--display); font-style: italic; font-size: clamp(16px, 4.4vw, 18px); color: var(--ink); line-height: 1.3; }
.date-fr { font-family: var(--display); font-style: italic; font-size: 15px; color: var(--ink-soft); }
.invited { font-size: 14px; color: var(--ink-soft); margin-top: 10px; line-height: 1.4; max-width: 30ch; }
.invited i { display: block; height: 0; overflow: hidden; }
.hang { position: absolute; top: 0; right: 14%; width: 30px; height: 21%; pointer-events: none; color: var(--gold); z-index: 1; }
.hang i { position: absolute; left: 50%; top: 0; width: 1px; height: 62%; background: var(--gold); opacity: .8; }
.hang .moon { position: absolute; left: 50%; top: 60%; width: 24px; height: 24px; translate: -50%; transform-origin: top center; animation: sway 6s ease-in-out infinite; }
.hang .star { position: absolute; width: 8px; height: 8px; }
.hang .s1 { left: -12px; top: 34%; animation: twinkle 3.4s ease-in-out infinite; }
.hang .s2 { left: 32px; top: 74%; width: 6px; height: 6px; animation: twinkle 4s ease-in-out infinite -1.2s; }
@keyframes sway { 50% { transform: rotate(5deg); } }
@keyframes twinkle { 50% { opacity: .35; } }
.seal { position: absolute; left: 50%; bottom: -22px; translate: -50%; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--stock); z-index: 2;
  background: radial-gradient(circle at 35% 30%, #d9bf7c, var(--gold) 55%, #8f6f2f); box-shadow: 0 6px 14px -6px rgba(90, 70, 40, .55), inset 0 -2px 4px rgba(90, 70, 40, .3), inset 0 2px 3px rgba(255, 255, 255, .45); }
.seal svg { width: 20px; height: 20px; }
.seal-big { position: static; translate: none; margin: 0 auto 14px; width: 64px; height: 64px; }
.seal-big svg { width: 28px; height: 28px; }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 30; background: #ece6dc; overflow: hidden; transition: opacity 1s var(--ease); }
.intro.leaving { opacity: 0; pointer-events: none; }
.intro-frames { position: absolute; inset: 0; }
.intro-frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 46%; opacity: 0; transition: opacity .12s linear; }
.intro-frames img.on { opacity: 1; }
.intro-tap { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; padding: 0; display: grid; align-content: end; justify-items: center; padding-bottom: max(14vh, 64px); transition: opacity .5s var(--ease); }
.intro-tap:focus-visible { outline-offset: -6px; }
.tap-label { font-size: 16px; font-weight: 500; letter-spacing: .02em; color: var(--ink); background: rgba(251, 247, 240, .82); padding: 12px 20px; border-radius: 999px; box-shadow: var(--shadow-soft); animation: fadeUp 1.2s var(--ease) .4s both; }
.intro-skip { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; border: 0; background: rgba(251, 247, 240, .82); color: var(--ink); font-size: 15px; min-height: 44px; padding: 10px 18px; border-radius: 999px; opacity: 0; animation: fadeUp 1s var(--ease) 1.6s both; }
.intro.opened .intro-tap, .intro.opened .intro-skip { opacity: 0; pointer-events: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; } }
.intro-card { pointer-events: none; position: absolute; left: 50%; top: 50%; width: min(88vw, 400px); translate: -50% -50%;
  opacity: 0; transform: scale(.6) translateY(14%); transition: opacity .9s var(--ease), transform 1.6s var(--ease); }
.intro.ended .intro-card { opacity: 1; transform: scale(1) translateY(-4%); }
.intro.ended .intro-frames { filter: blur(3px); transition: filter 1.2s var(--ease); }
.intro.ended .intro-frames::after { content: ""; position: absolute; inset: 0; background: rgba(205, 219, 232, .55); }

/* ---------- page shell ---------- */
.page { position: relative; z-index: 1; opacity: 0; transition: opacity 1s var(--ease); }
.page.in { opacity: 1; }

/* the suite: card + side */
.suite { min-height: 100svh; display: grid; align-content: start; padding: calc(max(16px, env(safe-area-inset-top)) + 8px) 16px 56px; }
.suite-grid { width: 100%; max-width: 1080px; margin: 0 auto; display: grid; gap: 22px; justify-items: center; grid-template-areas: "card" "side" "insert"; }
.invitation { grid-area: card; width: min(88vw, 400px); animation: rise 1.4s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
.suite-side { grid-area: side; width: min(88vw, 400px); display: grid; gap: 14px; justify-items: stretch; text-align: center; animation: fadeUp 1s var(--ease) .5s both; }
.insert { grid-area: insert; margin-top: 34px; }
.deadline-line { font-size: 14px; color: var(--ink); }
.deadline-line b { font-weight: 600; }
.deadline-line .fr { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.deadline-line.small { margin-top: 12px; text-align: center; }
.live-count { font-family: var(--display); font-style: italic; font-size: 18px; color: var(--ink); }
.countdown { font-size: 14px; color: var(--ink-soft); }
@media (min-width: 900px) {
  .suite { padding-top: 48px; padding-bottom: 40px; place-content: center; }
  .suite-grid { grid-template-columns: 420px minmax(0, 1fr); grid-template-areas: "card insert" "card side"; gap: 26px 64px; align-items: start; align-content: center; }
  .invitation { width: 420px; align-self: center; grid-row: 1 / span 2; }
  .insert { margin-top: 0; width: 100%; max-width: 560px; justify-self: start; }
  .suite-side { width: 100%; max-width: 560px; justify-self: start; text-align: left; }
}

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--ink); border-radius: 999px; padding: 13px 24px; min-height: 48px;
  font-family: var(--body); font-weight: 600; font-size: 15px; letter-spacing: .01em; text-decoration: none; color: var(--ink); background: transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s, color .25s; }
.btn i { color: inherit; opacity: .55; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--stock); border-color: transparent; box-shadow: 0 10px 22px -12px rgba(31, 42, 68, .5); }
.btn-primary:hover { background: #172037; }
.btn-line { background: transparent; }
.btn-line:hover { background: rgba(31, 42, 68, .06); }
.btn-wide { width: 100%; min-height: 52px; }
.btn-sm { padding: 9px 16px; min-height: 44px; font-size: 14px; }
.btn.loading { pointer-events: none; color: transparent; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(251, 247, 240, .4); border-top-color: var(--stock); animation: spin .8s linear infinite; }
.btn-line.loading::after { border-color: rgba(31, 42, 68, .3); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.textlink { display: inline-flex; align-items: center; font-weight: 500; color: var(--ink); text-decoration: underline; }

/* ---------- the details insert ---------- */
.insert { width: min(100%, 760px); padding: clamp(26px, 5vw, 40px); }
.insert .h2 { margin-bottom: 22px; }
.facts { margin: 0; display: grid; gap: 22px; }
@media (min-width: 640px) { .facts { grid-template-columns: 1fr 1fr; gap: 26px 40px; } }
.fact { display: grid; gap: 6px; align-content: start; padding-top: 14px; border-top: 1px solid rgba(31, 42, 68, .16); }
.fact dt { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--ink); }
.fact dt .fr { display: inline; font-size: 14px; margin: 0; }
.fact dt .fr::before { content: "· "; color: var(--gold); }
.fact dd { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.fact dd b { color: var(--ink); font-weight: 600; font-family: var(--display); font-size: 20px; }
.fact-action { margin-top: 4px !important; }
.host-note { margin: 28px 0 0; padding: 22px 0 0; border-top: 1px solid var(--hair); }
.host-note p { font-family: var(--display); font-size: 20px; line-height: 1.4; color: var(--ink); font-style: italic; }
.host-note footer { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- photo prints ---------- */
.photos { padding: 64px 0 24px; }
.photos .h2 { text-align: center; padding: 0 16px; margin-bottom: 20px; }
.strip-wrap { position: relative; max-width: 1080px; margin: 0 auto; }
.strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px calc(50% - min(38vw, 150px)) 30px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.strip::-webkit-scrollbar { display: none; }
.print { flex: 0 0 min(76vw, 300px); scroll-snap-align: center; margin: 0; background: var(--plate); padding: 10px 10px 34px; box-shadow: var(--shadow); border-radius: 2px; transform: rotate(var(--r, 0)); }
.print img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; }
.print figcaption { margin-top: 12px; text-align: center; font-family: var(--display); font-style: italic; font-size: 15px; color: var(--ink-soft); }
.strip-nav { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); background: var(--stock); color: var(--ink); display: none; place-items: center; box-shadow: var(--shadow-soft); z-index: 2; }
.strip-nav svg { width: 20px; height: 20px; }
.strip-nav.prev { left: 8px; } .strip-nav.next { right: 8px; }
@media (min-width: 900px) { .strip-nav { display: grid; } .strip { padding-inline: 60px; } }

/* ---------- the reply card ---------- */
.reply-wrap { padding: 48px 16px 24px; display: grid; justify-items: center; perspective: 1600px; }
.reply { position: relative; width: min(100%, 720px); display: grid; transform-style: preserve-3d; transition: transform var(--dur) var(--ease); }
.reply.flipped { transform: rotateY(180deg); }
.reply > .piece { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: clamp(26px, 5vw, 48px); }
.reply-back { transform: rotateY(180deg); display: grid; align-content: center; justify-items: center; text-align: center; }
.reply.flipped .reply-front { pointer-events: none; }
.reply:not(.flipped) .reply-back { pointer-events: none; }
.reply.settled .reply-front { display: none; }
.reply.settled .reply-back { min-height: 420px; }
.reply-front .h2 { margin-bottom: 8px; }
.reply-front .lede { margin-bottom: 26px; }
.reply-back .lede { margin: 6px 0 18px; max-width: 42ch; }
.summary { margin: 0 0 22px; display: grid; gap: 4px; font-size: 15px; color: var(--ink-soft); }
.summary div { display: flex; gap: 8px; justify-content: center; }
.summary dt { font-weight: 600; color: var(--ink); }
.summary dt::after { content: ":"; }
.summary dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* fields as ruled lines on the stock */
.field { display: grid; gap: 6px; margin-bottom: 20px; }
.field label, .field .label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field label em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 6px; }
.field input, .field textarea { width: 100%; font: inherit; font-size: 17px; padding: 10px 2px 8px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: 0 1px 0 0 var(--ink); }
.field textarea { resize: vertical; min-height: 78px; line-height: 1.45; }
.field.invalid input, .field.invalid textarea { border-color: var(--error); box-shadow: 0 1px 0 0 var(--error); }
.hint { font-size: 14px; color: var(--error); line-height: 1.35; }
.form-error { background: #f4e3e1; color: var(--error); padding: 12px 14px; border-radius: var(--radius); font-size: 15px; margin: 0 0 14px; }

.choice { border: 0; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.choice legend { padding: 0; margin-bottom: 10px; }
.tick { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius); cursor: pointer; background: transparent; transition: border-color .2s, background .2s; min-height: 56px; }
.tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick .box { width: 24px; height: 24px; border: 1px solid var(--ink); border-radius: 3px; display: grid; place-items: center; color: var(--stock); flex: 0 0 auto; background: transparent; transition: background .2s; }
.tick .box svg { width: 16px; height: 16px; opacity: 0; transition: opacity .15s; }
.tick .t { display: grid; gap: 1px; line-height: 1.25; }
.tick .t b { font-weight: 600; font-size: 16px; color: var(--ink); }
.tick .t small { font-size: 14px; color: var(--muted); }
.tick:hover { border-color: var(--ink); }
.tick:has(input:checked) { border-color: var(--ink); background: rgba(31, 42, 68, .05); }
.tick:has(input:checked) .box { background: var(--ink); }
.tick:has(input:checked) .box svg { opacity: 1; }
.tick:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (min-width: 640px) { .choice:not(.mode) { grid-template-columns: repeat(3, 1fr); } .choice:not(.mode) legend { grid-column: 1 / -1; } .choice .hint { grid-column: 1 / -1; } }

.when-yes { display: grid; }
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stepper { justify-items: start; }
.step { display: inline-flex; align-items: center; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--stock); }
.step button { width: 46px; height: 46px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink); }
.step button svg { width: 18px; height: 18px; }
.step button:hover { background: rgba(31, 42, 68, .06); }
.step output { min-width: 44px; text-align: center; font-family: var(--display); font-size: 22px; color: var(--ink); }

.check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--ink-soft); margin: 0 0 22px; cursor: pointer; line-height: 1.4; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { width: 22px; height: 22px; border: 1px solid var(--ink); border-radius: 3px; display: grid; place-items: center; color: var(--stock); flex: 0 0 auto; margin-top: 1px; }
.check .box svg { width: 15px; height: 15px; opacity: 0; }
.check:has(input:checked) .box { background: var(--ink); }
.check:has(input:checked) .box svg { opacity: 1; }
.check:has(input:focus-visible) .box { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- the registry insert ---------- */
.registry { width: min(100% - 32px, 1080px); margin: 48px auto 0; padding: clamp(26px, 5vw, 48px); }
.registry .h2 { margin-bottom: 8px; }
.registry > .lede { margin-bottom: 30px; }
.registry-group + .registry-group { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--hair); }
.registry-group .h3 { margin-bottom: 4px; }
.group-note { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.registry-group .h3 + .tiles { margin-top: 16px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; } }
.tiles-big { grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles-big { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.tile { position: relative; display: grid; grid-template-rows: auto 1fr; text-align: left; padding: 0; border: 1px solid rgba(31, 42, 68, .14); border-radius: var(--radius); background: var(--stock); color: var(--ink); overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .2s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(31, 42, 68, .3); }
.tiles-big .tile { grid-template-columns: 120px 1fr; grid-template-rows: none; }
.plate { aspect-ratio: 1; background: var(--plate); display: grid; place-items: center; overflow: hidden; color: var(--liner-ink); }
.plate img { width: 100%; height: 100%; object-fit: contain; padding: 12px; mix-blend-mode: multiply; }
.plate svg { width: 40%; height: 40%; }
.tile-body { padding: 12px 12px 14px; display: grid; gap: 4px; align-content: start; }
.tile-title { font-family: var(--display); font-size: 17px; line-height: 1.2; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-price { font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.tile-meta b { color: var(--ink-soft); font-weight: 500; }
.tile-state { position: absolute; top: 8px; left: 8px; z-index: 1; font-family: var(--display); font-style: italic; font-size: 14px; letter-spacing: .01em; padding: 6px 12px; border-radius: 999px; color: var(--ink);
  background: radial-gradient(circle at 30% 25%, #ead9a8, var(--gold-soft) 55%, #cdb271); box-shadow: 0 2px 5px -1px rgba(90, 70, 40, .35), inset 0 -1px 2px rgba(90, 70, 40, .25), inset 0 1px 2px rgba(255, 255, 255, .5); transform: rotate(-3deg); max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.mine .tile-state { background: radial-gradient(circle at 30% 25%, #d9bf7c, var(--gold) 55%, #8f6f2f); color: var(--stock); transform: rotate(-3deg); }
.tile.taken .plate { background: var(--liner); }
.tile.taken .plate img { opacity: .7; }
.tile.taken .tile-title, .tile.taken .tile-price { color: var(--ink-soft); }
.tile.mine { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.tiles-big .tile { height: 100%; grid-template-rows: auto 1fr; align-content: start; }
.tiles-big .tile::before { content: ""; grid-column: 1 / -1; height: 12px; }
.tiles-big .tile-state { position: static; grid-column: 1 / -1; grid-row: 1; justify-self: start; margin: 12px 12px 0; transform: rotate(-2deg); }
.tiles-big .tile .plate { align-self: start; }
.tiles-big .tile-body { padding: 16px; }
.names-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.avatars { display: flex; }
.avatars i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 600; color: var(--stock); background: var(--liner-ink); border: 2px solid var(--stock); margin-left: -7px; padding: 0; }
.avatars i:first-child { margin-left: 0; }

/* ---------- guest book ---------- */
.guestbook { padding: 64px 16px 24px; max-width: 1080px; margin: 0 auto; }
.guestbook .h2 { text-align: center; margin-bottom: 24px; }
.guestbook .lede { text-align: center; margin: 0 auto; }
.notes { columns: 1; column-gap: 16px; }
@media (min-width: 640px) { .notes { columns: 2; } }
@media (min-width: 960px) { .notes { columns: 3; } }
.note-slip { break-inside: avoid; margin-bottom: 16px; padding: 22px 24px 18px; background: var(--stock); box-shadow: var(--shadow-soft); border-radius: 2px; transform: rotate(var(--tilt, 0)); }
.note-slip p { font-family: var(--display); font-size: 19px; line-height: 1.4; color: var(--ink); }
.note-slip footer { margin-top: 12px; font-family: var(--display); font-style: italic; font-size: 16px; color: var(--ink-soft); }
.note-slip footer::before { content: "— "; color: var(--gold); }

/* ---------- footer ---------- */
.foot { text-align: center; padding: 56px 16px 72px; display: grid; gap: 18px; justify-items: center; }
.foot-script { font-size: 40px; color: var(--ink); }
.foot .tiny { margin-top: 10px; opacity: .75; }

/* ---------- gift dialog ---------- */
.sheet { border: 0; padding: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; background: var(--stock); color: var(--ink); border-radius: 12px 12px 0 0; box-shadow: var(--shadow); overflow: auto; }
.sheet::backdrop { background: rgba(31, 42, 68, .5); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheetUp .55s var(--ease); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 640px) { .sheet { margin: auto; max-width: 480px; border-radius: 6px; } }
.sheet-body { padding: 22px 22px 28px; display: grid; gap: 10px; }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: var(--stock); display: grid; place-items: center; z-index: 1; }
.sheet-x svg { width: 18px; height: 18px; }
.sheet .plate { height: 170px; aspect-ratio: auto; border: 1px solid rgba(31, 42, 68, .1); border-radius: var(--radius); }
.sheet .plate img { height: 100%; width: auto; }
.sheet .h3 { margin-top: 4px; padding-right: 36px; }
.price { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.note { color: var(--ink-soft); font-size: 15px; }
.who { margin-top: 8px; display: grid; gap: 0; }
@media (min-width: 640px) { .who { grid-template-columns: 1fr 1fr; gap: 0 16px; } }
.mode { margin: 4px 0 8px; }
.chip-amount { display: grid; gap: 6px; padding: 0 0 4px 38px; }
.chip-amount label { font-size: 14px; font-weight: 600; }
.chip-amount label .fr { display: inline; font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.money { display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--ink); width: 140px; }
.money b { font-size: 18px; }
.money input { width: 100%; border: 0; background: transparent; font: inherit; font-size: 18px; padding: 8px 0; color: var(--ink); }
.money input:focus { outline: none; }
.release { margin-top: 6px; display: grid; gap: 10px; }
.confirm { padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius); display: grid; gap: 12px; text-align: center; }
.confirm p { font-size: 15px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); translate: -50% 16px; z-index: 70; background: var(--ink); color: var(--stock); padding: 13px 20px; border-radius: 999px; font-size: 15px; opacity: 0; transition: opacity .35s var(--ease), translate .5s var(--ease); pointer-events: none; max-width: 92vw; text-align: center; box-shadow: var(--shadow); }
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- legacy classes host.css relies on ---------- */
.eyebrow { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.btn-ghost { background: transparent; }
.btn-big { width: 100%; min-height: 52px; }
.btn-danger { color: var(--error); border-color: var(--error); }
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--liner); }
.light { display: none; }
.card.login-card, .card.add-gift { aspect-ratio: auto; overflow: visible; }
.card.login-card::before, .card.add-gift::before { content: none; }
.host-body .card { background: var(--stock); box-shadow: var(--shadow-soft); border: 1px solid rgba(31, 42, 68, .1); border-radius: var(--radius); }
@keyframes giftIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .reply { transition: none; }
  .flowers { display: none; }
}
