:root {
  --ink: #332F0A;        /* sampled from the invitation */
  --ink-soft: #5b5636;
  --black: #1E1E1E;      /* program card ink */
  --line: #3a3a3a;
  --paper: #ffffff;
  --hair: #e7e4d8;
  --mono: "Courier Prime", "Courier New", Courier, monospace;
  --nav-h: 52px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
b, .strong { font-weight: 700; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: var(--nav-h);
  display: flex; align-items: center; justify-content: center; gap: clamp(14px, 4vw, 40px);
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .3s, transform .35s;
  font-size: 13px; letter-spacing: .22em; text-transform: lowercase;
}
.nav.scrolled { border-bottom-color: var(--hair); }
.nav a { text-decoration: none; padding: 8px 2px; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: .22em; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transition: transform .3s; transform-origin: left; }
.nav a.active::after, .nav a:hover::after { transform: scaleX(1); }
.nav-mark { font-weight: 700; letter-spacing: .1em !important; }

@media (max-width: 640px) {
  /* thumb-friendly bottom bar on phones */
  .nav { top: auto; bottom: 0; height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
         border-top: 1px solid var(--hair); border-bottom: 0; gap: 0; justify-content: space-around; font-size: 12px; letter-spacing: .12em; }
  .nav-mark { display: none; }
  html { scroll-padding-top: 0; }
  body { padding-bottom: 58px; }
}

/* ---------- cards / sections ---------- */
.card {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 40px) 24px 72px; text-align: center;
  max-width: 980px; margin: 0 auto;
}
.card + .card { border-top: 1px solid var(--hair); }
.kicker { font-weight: 700; font-size: 15px; letter-spacing: .45em; text-transform: lowercase; margin: 0 0 18px; color: var(--black); }
.sub { margin: 0 0 28px; color: var(--ink-soft); }
.lede { font-size: clamp(16px, 2.6vw, 22px); line-height: 1.6; max-width: 34em; margin: 0; }
.lede.small { font-size: clamp(15px, 2.2vw, 19px); }
@media (max-width: 640px) { br.wide { display: none; } }

.script { margin: 0; font-weight: normal; }
.logo { height: auto; }
.logo-hero { width: min(64vw, 560px); margin: 0 auto 7vh; }
.logo-small { width: min(52vw, 260px); margin: 0 auto 10px; }

/* hand-written reveal: wipe the lettering on left→right, top line then bottom */
.logo-hero {
  -webkit-mask-image: linear-gradient(100deg, #000 45%, transparent 55%);
          mask-image: linear-gradient(100deg, #000 45%, transparent 55%);
  -webkit-mask-size: 260% 100%; mask-size: 260% 100%;
  -webkit-mask-position: 100% 0; mask-position: 100% 0;
  animation: write 2.6s cubic-bezier(.45,.05,.3,1) .25s forwards;
}
@keyframes write { to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
.cover .lede { opacity: 0; animation: fade 1.2s ease 2.4s forwards; }
@keyframes fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .logo-hero { animation: none; -webkit-mask-image: none; mask-image: none; }
  .cover .lede { animation: none; opacity: 1; }
}

.status { margin: 28px 0 0; font-size: 14px; letter-spacing: .18em; text-transform: lowercase; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); margin-right: 10px; vertical-align: 2px; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .2; } }

.scroll-cue { margin-top: 8vh; width: 22px; height: 36px; border: 1.5px solid var(--ink); border-radius: 12px; position: relative; opacity: .55; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px; background: var(--ink); border-radius: 1px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- details ---------- */
.details { gap: 10vh; }
.details .block p { margin: 0 0 6px; font-size: clamp(17px, 2.8vw, 24px); }
.details .notes p { font-size: clamp(16px, 2.5vw, 21px); max-width: 30em; margin: 0 auto 1.4em; }
.actions { margin-top: 22px !important; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px;
  font: 700 14px/1 var(--mono); letter-spacing: .12em; text-transform: lowercase; text-decoration: none;
  color: var(--ink); background: transparent; border: 1.5px solid var(--ink); border-radius: 0; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover, .btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: #1f1c05; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- program (timeline) ---------- */
.program { color: var(--black); }
.timeline { list-style: none; margin: 10px 0 0; padding: 18px 0 26px; position: relative; width: min(100%, 860px); }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--line); }
.timeline li {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: start;
  min-height: 150px; opacity: 0; transform: translateY(14px); transition: opacity .7s, transform .7s;
}
.timeline li + li { margin-top: -38px; }
.timeline li.in { opacity: 1; transform: none; }
.timeline li::before { /* tick from the centre line */
  content: ""; position: absolute; top: 44px; width: 56px; height: 2px; background: var(--line);
}
.timeline li.r::before { left: 50%; }
.timeline li.l::before { right: 50%; }
.timeline li > img { width: 96px; height: 96px; object-fit: contain; position: absolute; top: -4px; }
.timeline li.r > img { left: calc(50% + 66px); }
.timeline li.l > img { right: calc(50% + 66px); }
.timeline li > div { display: flex; flex-direction: column; font-size: clamp(15px, 2vw, 19px); letter-spacing: .28em; line-height: 1.5; }
.timeline li > div b { letter-spacing: .32em; }
.timeline li.r > div { grid-column: 2; text-align: left; padding-left: 182px; }
.timeline li.l > div { grid-column: 1; text-align: right; padding-right: 182px; align-items: flex-end; }
.end { margin: 0; display: flex; flex-direction: column; letter-spacing: .3em; font-size: clamp(15px, 2vw, 19px); gap: 6px; }
.end b { letter-spacing: .32em; }

/* now / done states (driven by Asia/Manila time) */
.timeline li.done, .end.done { opacity: .45; }
.timeline li.now > div b::after, .end.now b::after {
  content: "now"; display: inline-block; margin-left: 12px; padding: 2px 6px 1px; font-size: .62em; letter-spacing: .2em;
  background: var(--ink); color: #fff; vertical-align: 3px;
}

@media (max-width: 760px) {
  .timeline { width: 100%; max-width: 420px; padding-top: 8px; }
  .timeline::before { left: 18px; }
  .timeline li { display: flex; align-items: center; gap: 16px; min-height: 0; padding: 18px 0 18px 46px; text-align: left; }
  .timeline li + li { margin-top: 0; }
  .timeline li::before, .timeline li.r::before, .timeline li.l::before { left: 19px; right: auto; top: 50%; width: 20px; }
  .timeline li > img, .timeline li.r > img, .timeline li.l > img { position: static; width: 62px; height: 62px; flex: none; }
  .timeline li.r > div, .timeline li.l > div { padding: 0; text-align: left; align-items: flex-start; letter-spacing: .16em; }
  .end { align-self: stretch; max-width: 420px; margin: 0 auto; letter-spacing: .2em; }
}

/* ---------- gallery ---------- */
.gallery, .messages { justify-content: flex-start; }
.gallery { max-width: 1200px; }

input[type=text], textarea {
  font: 16px/1.5 var(--mono); color: var(--ink); background: #fff;
  border: 1.5px solid #cfcab6; border-radius: 0; padding: 10px 12px; min-height: 44px; outline: none; transition: border-color .2s;
}
input[type=text]:focus, textarea:focus { border-color: var(--ink); }
::placeholder { color: #a29d86; }

.g-bar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
         border-bottom: 1px solid var(--hair); margin-bottom: 18px; padding-bottom: 6px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { font: 13px var(--mono); letter-spacing: .16em; background: none; border: 0; padding: 10px 10px; cursor: pointer; color: var(--ink-soft);
               position: relative; text-transform: lowercase; }
.tabs button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -7px; height: 1.5px; background: var(--ink); transform: scaleX(0); transition: transform .35s; }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.tabs small { font-size: 11px; letter-spacing: .05em; opacity: .6; font-weight: 400; }
.g-play { min-height: 38px; padding: 0 16px; gap: 8px; font-size: 12px; }
.g-play svg { width: 11px; height: 11px; }

/* justified rows: each tile grows in proportion to its aspect ratio */
.grid { --row: 230px; width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.grid::after { content: ""; flex-grow: 999999; }
.tile {
  --ar: 1.333; flex-grow: var(--ar); flex-basis: calc(var(--ar) * var(--row)); max-width: calc(var(--ar) * var(--row) * 1.6);
  position: relative; display: block; padding: 0; border: 0; cursor: zoom-in; overflow: hidden; background: #f3f0e6;
  opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .7s ease;
}
.tile.in { opacity: 1; transform: none; }
.tile::before { content: ""; display: block; padding-bottom: calc(100% / var(--ar)); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02);
            transition: opacity .6s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.tile img.loaded { opacity: 1; transform: none; }
.tile:hover img.loaded { transform: scale(1.035); }
.tile .by { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 9px; font-size: 12px; letter-spacing: .08em; color: #fff; text-align: left;
            background: linear-gradient(transparent, rgba(20,18,4,.5)); opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.tile:hover .by, .tile:focus-visible .by { opacity: 1; transform: none; }
.tile .badge { position: absolute; top: 8px; left: 8px; font-size: 10px; letter-spacing: .18em; background: rgba(255,255,255,.92); color: var(--ink); padding: 3px 7px 2px; }
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 900px) { .grid { --row: 170px; gap: 6px; } }
@media (max-width: 640px) {
  .gallery { padding-left: 10px; padding-right: 10px; }
  .grid { --row: 118px; gap: 4px; }
  .tile .by { opacity: 1; transform: none; padding: 18px 8px 6px; font-size: 10px; }
  .g-bar { justify-content: center; border-bottom: 0; }
  .tabs { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .tile, .tile img { transition: none; transform: none; } }

.g-empty { padding: 34px 0 6px; display: flex; flex-direction: column; align-items: center; animation: fade .9s ease both; }
.frames { position: relative; width: 300px; height: 190px; margin-bottom: 30px; }
.frame { position: absolute; top: 18px; width: 116px; height: 136px; background: #fff; border: 1px solid #dcd7c4;
         box-shadow: 0 14px 30px -16px rgba(51,47,10,.35); padding: 10px 10px 30px; display: block; }
.frame::before { content: ""; position: absolute; inset: 10px 10px 30px; background: #f6f3ea; }
.frame img { position: relative; width: 62%; height: 62%; object-fit: contain; margin: 18% auto 0; opacity: .55; }
.f1 { left: 8px;  transform: rotate(-8deg); animation: float1 6s ease-in-out infinite; }
.f2 { left: 92px; top: 0; z-index: 2; transform: rotate(2deg); animation: float2 7s ease-in-out infinite; }
.f3 { left: 176px; transform: rotate(9deg); animation: float3 6.5s ease-in-out infinite; }
@keyframes float1 { 50% { transform: rotate(-6deg) translateY(-6px); } }
@keyframes float2 { 50% { transform: rotate(0deg) translateY(-9px); } }
@keyframes float3 { 50% { transform: rotate(7deg) translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .frame { animation: none; } }
.g-empty-title { margin: 0 0 8px; font-weight: 700; font-size: 14px; letter-spacing: .34em; color: var(--ink); }
.g-empty-text { margin: 0 0 22px; color: var(--ink-soft); max-width: 26em; }
.gallery.is-empty .g-bar { display: none; }
.gallery.is-empty .upload { margin-top: 28px; }
@media (max-width: 640px) { .frames { transform: scale(.85); margin-bottom: 18px; } }

/* reception screen waiting for its first photo */
.v-wait { position: absolute; inset: 0; z-index: 5; background: #fffefa; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4vh 6vw; animation: fade 1s ease both; }
.w-logo { width: min(34vw, 46vh); margin-bottom: 4vh; }
.w-qr { padding: 18px; border: 1px solid #dcd7c4; background: #fff; box-shadow: 0 18px 40px -22px rgba(51,47,10,.4); margin-bottom: 3.5vh; }
.w-qr img { width: min(18vw, 24vh); }
.w-title { margin: 0 0 1.4vh; font-weight: 700; letter-spacing: .4em; font-size: clamp(14px, 1.6vw, 22px); }
.w-text { margin: 0; color: var(--ink-soft); font-size: clamp(14px, 1.4vw, 20px); line-height: 1.7; }
.viewer.waiting .v-brand, .viewer.waiting .v-cap, .viewer.waiting .v-progress { visibility: hidden; }

#grid-more { margin-top: 22px; }

.upload { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; width: 100%; max-width: 560px;
          margin-top: 48px; padding: 26px 22px 18px; border: 1px dashed #cfcab6; }
.upload-title { flex-basis: 100%; margin: 0 0 4px; font-weight: 700; font-size: 13px; letter-spacing: .3em; }
.upload input[type=text] { flex: 1 1 200px; }
.upload-progress { flex-basis: 100%; height: 2px; background: var(--hair); overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s; }
.upload-status, .form-status { flex-basis: 100%; margin: 4px 0 0; min-height: 1.4em; font-size: 14px; color: var(--ink-soft); }

/* ---------- viewer / slideshow ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 60; background: #fff; color: var(--ink);
  display: grid; grid-template-rows: auto 2px 1fr auto auto; height: 100vh; height: 100dvh;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  opacity: 0; transition: opacity .35s ease; touch-action: none; user-select: none; -webkit-user-select: none;
}
.viewer.open { opacity: 1; }
.v-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 10px 22px; transition: opacity .5s; }
.v-count { font-size: 13px; letter-spacing: .3em; }
.v-actions { display: flex; gap: 2px; }
.v-actions button, .v-actions a { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--ink); cursor: pointer; border-radius: 50%; transition: background .2s; }
.v-actions button:hover, .v-actions a:hover { background: #f3f0e6; }
.v-actions svg { width: 17px; height: 17px; }
.viewer .i-pause, .viewer.playing .i-play { display: none; }
.viewer.playing .i-pause { display: block; }
.v-progress { background: transparent; }
.v-progress span { display: block; height: 100%; width: 0; background: var(--ink); opacity: .6; }

.v-stage { position: relative; overflow: hidden; min-height: 0; }
.v-track { position: absolute; inset: 0; }
.v-slide { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px clamp(14px, 7vw, 96px);
           opacity: 0; transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.v-slide.on { opacity: 1; z-index: 1; }
.v-slide img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 18px 50px -18px rgba(40,36,10,.35);
               opacity: 0; transition: opacity .5s ease; }
.v-slide img.loaded { opacity: 1; }
.v-slide.kb img.loaded { animation: kb 7s ease-out forwards; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.03); } }
.v-slide .spin { position: absolute; width: 22px; height: 22px; border: 1.5px solid var(--hair); border-top-color: var(--ink); border-radius: 50%; animation: spin .9s linear infinite; }
.v-slide img.loaded + .spin { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.v-nav { position: absolute; top: 50%; z-index: 3; width: 56px; height: 56px; margin-top: -28px; display: grid; place-items: center;
         background: rgba(255,255,255,.85); border: 1px solid var(--hair); border-radius: 50%; color: var(--ink); cursor: pointer;
         transition: opacity .4s, background .2s, transform .2s; }
.v-nav:hover { background: #fff; transform: scale(1.05); }
.v-nav svg { width: 18px; height: 18px; }
.v-prev { left: 18px; } .v-next { right: 18px; }

.v-cap { margin: 0; padding: 8px 16px 0; text-align: center; font-size: 14px; font-style: italic; min-height: 1.6em; color: var(--ink-soft); transition: opacity .5s; }
.v-strip { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px 14px; scrollbar-width: none; scroll-behavior: smooth; justify-content: safe center; transition: opacity .5s; }
.v-strip::-webkit-scrollbar { display: none; }
.v-strip button { flex: none; width: 54px; height: 54px; padding: 0; border: 0; background: #f3f0e6; cursor: pointer; opacity: .45; transition: opacity .3s, outline-color .3s;
                  outline: 1.5px solid transparent; outline-offset: 2px; }
.v-strip button.on { opacity: 1; outline-color: var(--ink); }
.v-strip button:hover { opacity: .85; }
.v-strip img { width: 100%; height: 100%; object-fit: cover; }
.v-brand { display: none; }

/* idle: controls fade away while the slideshow plays */
.viewer.idle { cursor: none; }
.viewer.idle .v-top, .viewer.idle .v-nav, .viewer.idle .v-strip { opacity: 0; }
.viewer.idle .v-nav { pointer-events: none; }

@media (max-width: 640px) {
  .v-top { padding: 4px 6px 4px 16px; }
  .v-nav { display: none; }                         /* swipe on phones */
  .v-slide { padding: 6px 0; }
  .v-slide img { box-shadow: none; }
  .v-strip button { width: 44px; height: 44px; }
  .v-strip { justify-content: flex-start; }
}
@media (hover: none) { .v-nav { display: none; } }

/* big-screen mode for the reception (/slideshow) */
.viewer.screen { grid-template-rows: 2px 1fr auto auto; background: #fffefa; }
.viewer.screen .v-top, .viewer.screen .v-strip, .viewer.screen .v-nav { display: none; }
.viewer.screen .v-cap { font-size: 18px; padding-top: 14px; }
.viewer.screen .v-brand { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 6px 0 22px; font-size: 15px; letter-spacing: .25em; }
.viewer.screen .v-brand img { width: 110px; }
.viewer.screen .v-slide { padding: 4vh 6vw 0; }

@media (prefers-reduced-motion: reduce) { .v-slide, .v-slide img { transition: none; } .v-slide.kb img.loaded { animation: none; } }

/* ---------- messages ---------- */
.note-form { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 560px; margin-bottom: 40px; }
.note-form textarea { resize: vertical; }
.note-form .btn { align-self: center; margin-top: 4px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.board { columns: 2 300px; column-gap: 18px; width: 100%; text-align: left; }
.note {
  break-inside: avoid; margin: 0 0 18px; padding: 22px 22px 18px; border: 1px solid var(--hair); background: #fffef9;
  animation: fade .6s ease both;
}
.note p { margin: 0 0 14px; white-space: pre-wrap; word-wrap: break-word; font-size: 16px; }
.note footer { font-size: 13px; letter-spacing: .1em; color: var(--ink-soft); }
.note footer b { color: var(--ink); }

/* ---------- closing ---------- */
.closing .date { font-size: clamp(20px, 3vw, 28px); letter-spacing: .06em; margin: 6px 0 30px; color: var(--ink); }
.closing { padding-bottom: 110px; }
.status.quiet::before { display: none; }
[hidden] { display: none !important; }
button { font-family: inherit; }
.board:empty { columns: auto; text-align: center; }
.board:empty::before { content: "No notes yet. Yours could be the very first."; display: block; font-style: italic; color: var(--ink-soft); padding: 8px 0 20px; }

/* ---------- message handwriting ---------- */
.f-typewriter  { --ff: var(--mono);                                   --fs: 16px; --lh: 1.6;  --fst: normal; --fw: 400; }
.f-monoline    { --ff: "Sacramento", cursive;                         --fs: 31px; --lh: 1.2;  --fst: normal; --fw: 400; }
.f-calligraphy { --ff: "Great Vibes", cursive;                        --fs: 28px; --lh: 1.28; --fst: normal; --fw: 400; }
.f-handwritten { --ff: "Caveat", cursive;                             --fs: 24px; --lh: 1.3;  --fst: normal; --fw: 400; }
.f-classic     { --ff: "Cormorant Garamond", Georgia, serif;          --fs: 21px; --lh: 1.45; --fst: italic; --fw: 500; }
.f-pen         { --ff: "Homemade Apple", cursive;                     --fs: 16px; --lh: 1.95; --fst: normal; --fw: 400; }
.note[class*="f-"] p, .chip-face { font-family: var(--ff); font-style: var(--fst); font-weight: var(--fw); }
.note[class*="f-"] p { font-size: var(--fs); line-height: var(--lh); }
@media (max-width: 640px) { .note[class*="f-"] p { font-size: calc(var(--fs) * .92); } }

.fonts { border: 0; padding: 0; margin: 6px 0 0; min-width: 0; }
.fonts legend { padding: 0; margin: 0 0 10px; font-size: 12px; letter-spacing: .3em; color: var(--ink-soft); width: 100%; text-align: center; }
.chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.chip { position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
        padding: 10px 4px 8px; border: 1px solid var(--hair); background: #fff; transition: border-color .2s, background .2s, transform .2s; }
.chip:hover { border-color: #cfcab6; transform: translateY(-1px); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip-face { font-size: 26px; line-height: 1.2; height: 34px; display: flex; align-items: center; color: var(--ink); }
.chip .f-typewriter { font-size: 22px; } .chip .f-pen { font-size: 15px; } .chip .f-classic { font-size: 26px; }
.chip small { font-size: 10px; letter-spacing: .08em; color: var(--ink-soft); white-space: nowrap; }
.chip:has(input:checked) { border-color: var(--ink); background: #fffef9; box-shadow: inset 0 0 0 1px var(--ink); }
.chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 640px) {
  .chips { grid-template-columns: repeat(3, 1fr); }
}

.preview { margin-top: 6px; text-align: left; }
.preview-label { margin: 0 0 8px; font-size: 12px; letter-spacing: .3em; color: var(--ink-soft); text-align: center; }
.preview .note { margin: 0; animation: none; transition: box-shadow .3s; box-shadow: 0 14px 34px -22px rgba(51,47,10,.45); }
.preview #pv-msg:empty::before { content: "Your message will look like this…"; opacity: .45; }
.preview .note p { transition: font-size .2s; min-height: 1.4em; }
