/* =========================================================================
   COMPONENTS
   Hover styles live inside @media (hover: hover). Touch sees the same
   information without hovering.
   ========================================================================= */

/* ---- Buttons ----------------------------------------------------------- */

/* The one filled button: brown pill, engraved capitals */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--control); padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  font-family: var(--font-label); font-size: var(--label-size); font-weight: var(--label-weight);
  letter-spacing: var(--label-tracking); text-transform: uppercase; line-height: 1;
  white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.btn svg { width: var(--icon-sm); height: var(--icon-sm); flex: none; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--line { box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (hover: hover) {
  .btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 86%, black); }
  .btn--line:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ink); }
}

.spinner {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid currentColor; border-right-color: transparent;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center;
  width: var(--control); height: var(--control); border-radius: var(--r-pill);
  transition: background-color var(--dur-1) var(--ease);
}
.icon-btn svg { width: var(--icon); height: var(--icon); }
@media (hover: hover) { .icon-btn:hover { background: var(--fill-hover); } }

/* ---- Monogram (initial in a hairline circle) + seal -------------------- */
.monogram {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px currentColor;
  font-family: var(--font-serif); font-style: italic; font-size: 14px; line-height: 1;
  color: var(--mono, var(--ink));
}
.monogram--sm { width: 22px; height: 22px; font-size: 12px; }
/* The family "G". White artwork + difference blend = always the opposite of what's behind it
   (dark on paper, light on a dark photo). */
.seal { width: auto; height: 44px; mix-blend-mode: difference; user-select: none; -webkit-user-drag: none; }

/* ---- Header: label · wordmark · label ---------------------------------- */
/* The whole header stays pinned: this row at the very top, the section bar right under it. */
.header { position: sticky; top: 0; z-index: calc(var(--z-sticky) + 1); background: var(--paper); }
.header__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--header-h); gap: var(--s-4);
}
.header__left { display: flex; align-items: center; gap: var(--s-5); justify-self: start; }
.header__right { justify-self: end; }
.wordmark {
  font-family: var(--font-script); font-size: var(--fs-wordmark); line-height: 1;
  padding: var(--s-2) var(--s-3) 0; white-space: nowrap;
}
.header .label-link .label-text { display: inline; }
@media (max-width: 743px) {
  .header__left { gap: var(--s-1); margin-left: calc(-1 * var(--s-2)); }
  .header .label-link .label-text { display: none; }
  .header .label-link { width: var(--control); justify-content: center; }
  .header .label-link::after { display: none; }
  .header .label-link svg { width: var(--icon); height: var(--icon); }
  .header .menu--right .label-link { width: auto; }
}

/* ---- Menus -------------------------------------------------------------- */
.menu { position: relative; }
.menu__panel {
  position: absolute; top: calc(100% + var(--s-1)); left: 0; z-index: var(--z-menu);
  width: 260px; padding: var(--s-3) 0;
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.menu--right .menu__panel { left: auto; right: 0; }
.menu.is-open .menu__panel { opacity: 1; visibility: visible; transform: none; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.menu__heading { padding: var(--s-1) var(--s-5) var(--s-2); color: var(--text-tertiary); }
.menu__item {
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%; min-height: 44px; padding: 0 var(--s-5);
  font-size: 15px; text-align: left;
  transition: background-color var(--dur-1) var(--ease);
}
.menu__item svg { width: var(--icon-sm); height: var(--icon-sm); }
.menu__item[aria-current="page"] { font-style: italic; }
.menu__item:focus-visible { box-shadow: none; background: var(--fill-hover); }
@media (hover: hover) { .menu__item:hover { background: var(--fill-hover); } }
.menu__hint { margin-left: auto; color: var(--text-tertiary); }
.menu__rule { height: 1px; margin: var(--s-2) var(--s-5); background: var(--line); }
@media (max-width: 743px) {
  .header__inner { position: relative; }
  .header .menu { position: static; }
  .header .menu__panel, .header .menu--right .menu__panel { left: var(--grid-margin); right: var(--grid-margin); width: auto; top: calc(100% - var(--s-3)); }
}

/* ---- Local nav: sticky row of section labels -------------------------- */
.localnav {
  position: sticky; top: var(--header-h); z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease);
}
.localnav.is-stuck { border-bottom-color: var(--line); }
.localnav__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--localnav-h); gap: var(--s-4); }
.localnav__links { display: flex; gap: var(--s-6); overflow-x: auto; scrollbar-width: none; min-width: 0; }
.localnav__links::-webkit-scrollbar { display: none; }
.localnav__links .label-link { flex: none; color: var(--text-secondary); transition: color var(--dur-1) var(--ease); }
.localnav__links .label-link[aria-current="true"] { color: var(--ink); }
.localnav__action { justify-self: end; }

/* Action slot swap: Preview (on Gifts) ⇄ Add a gift (past Gifts). Slow-quick-slow cross-slide. */
.swap { display: grid; justify-items: end; }
.swap > * { grid-area: 1 / 1; transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease), visibility 0s linear var(--dur-3); }
.swap__b, .swap.is-b .swap__a { opacity: 0; transform: translateY(-10px); visibility: hidden; }
.swap.is-b .swap__a { transform: translateY(10px); }
.swap.is-b .swap__b, .swap__a { opacity: 1; transform: none; visibility: visible; }
.swap.is-b .swap__b { transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }
.swap:not(.is-b) .swap__a { transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }
@media (max-width: 743px) {
  .localnav__inner { grid-template-columns: 1fr auto; }
  .localnav__spacer { display: none; }
  .localnav__links { gap: var(--s-5); }
  .localnav__action .label-text { display: none; }
}

/* ---- Page head + sections (everything centred, like a catalogue) -------- */
.page-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); padding: var(--s-8) 0 var(--s-9); }
.page-head .lead { max-width: var(--measure); }
@media (max-width: 743px) { .page-head { padding: var(--s-6) 0 var(--s-7); gap: var(--s-3); } }

.section { padding-bottom: var(--s-10); }
.section__head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); margin-bottom: var(--s-6); }
.section__head .label { font-size: calc(var(--label-size) * 2); line-height: 28px; letter-spacing: 0.14em; }
@media (max-width: 743px) { .section { padding-bottom: var(--s-9); } .section__head { margin-bottom: var(--s-6); } }

/* 4 across ≥1128 · 3 across 744–1127 · 2 across on phones */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-7) var(--grid-gutter); }
@media (max-width: 1127px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 743px)  { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--grid-gutter); } }

/* ---- Photo treatment ------------------------------------------------------
   Product on studio paper: a soft coloured backdrop, a vignette, and edges
   that fade into the page. Cut-out products (white background) are multiplied
   onto the backdrop; scene photos fill the frame and fade the same way.     */
@property --photo-fade { syntax: "<percentage>"; inherits: true; initial-value: 62%; }

.photo {
  position: absolute; inset: 0; overflow: hidden;
  --bd: var(--bd-1); --bd-edge: var(--bd-1-edge);
  background: radial-gradient(ellipse 80% 75% at 50% 44%, var(--bd) 0%, var(--bd) 30%, var(--bd-edge) 115%);
  -webkit-mask-image: radial-gradient(ellipse 71% 71% at 50% 50%, #000 var(--photo-fade), transparent 100%);
          mask-image: radial-gradient(ellipse 71% 71% at 50% 50%, #000 var(--photo-fade), transparent 100%);
  transition: --photo-fade var(--dur-3) var(--ease);
}
.photo[data-tone="2"] { --bd: var(--bd-2); --bd-edge: var(--bd-2-edge); }
.photo[data-tone="3"] { --bd: var(--bd-3); --bd-edge: var(--bd-3-edge); }
.photo[data-tone="4"] { --bd: var(--bd-4); --bd-edge: var(--bd-4-edge); }

.photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: var(--photo-pad);
  mix-blend-mode: multiply;
  filter: sepia(0.12) saturate(0.9) contrast(0.97);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
  -webkit-user-drag: none; user-select: none;
}
.photo img.is-loaded { opacity: 1; }
/* lift off-white shop backgrounds to pure white so they vanish into the backdrop */
.photo--cutout img { filter: sepia(0.12) saturate(0.9) brightness(1.07) contrast(1.06); }
.photo--scene img { object-fit: cover; padding: 0; mix-blend-mode: normal; filter: sepia(0.16) saturate(0.85) contrast(0.95) brightness(1.03); }
/* soft shadow pooling under a cut-out product */
.photo--cutout::before {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 17%; height: 9%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, #2b1d14 26%, transparent), transparent 70%);
  filter: blur(6px);
}
/* vignette on top of everything */
.photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 70% at 50% 48%, transparent 55%, color-mix(in srgb, #2b1d14 16%, transparent) 100%);
}
.photo svg { position: absolute; inset: 0; margin: auto; }

/* ---- Gift tile ----------------------------------------------------------- */
.gift { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }

.tile {
  position: relative; display: grid; place-items: center;
  width: 100%; aspect-ratio: 1;
  border: var(--stroke-dotted) dotted var(--line-strong);
  border-radius: var(--r-xs);
  transition: border-color var(--dur-2) var(--ease);
  -webkit-touch-callout: none;
}
.tile > .photo { inset: 8px; border-radius: 2px; }
/* A gift with a photo: no dotted line; the photo fills right to where the line was.
   The edge fade + vignette stay (they're part of .photo). If the photo fails, the line comes back. */
.tile--photo { border-color: transparent; }
.tile--photo > .photo { inset: 0; border-radius: var(--r-xs); }
.tile--photo.tile--noimg { border-color: var(--line-strong); }
.tile--readonly { border-color: var(--line); }
.tile--draft { border-style: dashed; }

.tile__add { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); }
.tile__plus {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--ink);
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease), transform var(--dur-3) var(--ease);
}
.tile__plus svg { width: var(--icon); height: var(--icon); }

.tile__fallback { display: none; padding: var(--s-5); font-size: 20px; line-height: 1.3; font-style: italic; text-align: center; overflow-wrap: anywhere; }

/* Photo couldn't load (or no link): set the title in the box instead */
.tile--noimg .tile__fallback { display: block; }
.tile--noimg .photo { display: none; }

/* Price tag: a small paper tag tucked in the corner */
.tag {
  position: absolute; z-index: 2; left: var(--s-4); bottom: var(--s-4);
  padding: 5px 9px 4px;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line), 0 6px 14px -8px color-mix(in srgb, #2b1d14 40%, transparent);
  font-size: 14px; line-height: 18px; font-style: italic;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.tile__corner {
  position: absolute; z-index: 2; top: var(--s-4); right: var(--s-4);
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-pill);
  background: var(--surface); opacity: 0; transition: opacity var(--dur-2) var(--ease); pointer-events: none;
}
.tile__corner svg { width: 13px; height: 13px; }

@media (hover: hover) {
  .tile:hover { border-color: var(--ink); }
  .tile--photo:not(.tile--noimg):hover { border-color: transparent; }
  .tile--readonly:hover { border-color: var(--line); }
  .tile:hover .tile__plus { background: var(--ink); color: var(--paper); transform: rotate(90deg); }
  .tile:hover .photo { --photo-fade: 78%; }
  .tile:hover .photo img { transform: scale(1.04); }
  .tile:hover .tile__corner { opacity: 1; }
  .tag { opacity: 0; transform: translateY(4px); }
  .tile:hover .tag, .tile:focus-visible .tag { opacity: 1; transform: none; }
}

.gift__caption { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gift__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gift__meta { display: flex; gap: var(--s-1); color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Drag to reorder */
[data-sortable] { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
[data-sortable] .tile { cursor: var(--cursor-drag); }
.gift.is-pressing .tile { transform: scale(0.97); transition: transform var(--dur-2) var(--ease); }
.gift.is-dragging { position: relative; z-index: 10; pointer-events: none; }
.gift.is-dragging .tile { cursor: var(--cursor-dragging); background: var(--paper); border-color: var(--ink); box-shadow: var(--shadow-float); }
.is-sorting, .is-sorting * { cursor: var(--cursor-dragging) !important; }
.is-sorting .tag, .is-sorting .tile__corner { opacity: 0 !important; }

/* ---- Skeleton + empty --------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--fill-hover) 0%, color-mix(in srgb, var(--ink) 2%, transparent) 50%, var(--fill-hover) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: var(--r-xs);
}
.skeleton--tile { aspect-ratio: 1; }
.skeleton--line { height: 12px; border-radius: var(--r-pill); }

.empty { grid-column: 1 / -1; color: var(--text-secondary); padding: var(--s-2) 0; max-width: var(--measure); }

/* ---- Ideas: an inline list, like a client list -------------------------- */
.ideas { max-width: var(--measure); margin: 0 0 var(--s-6); font-style: italic; color: var(--text-secondary); }
.ideas button {
  font-style: italic; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--dur-1) var(--ease);
}
@media (hover: hover) { .ideas button:hover { text-decoration-color: var(--ink); } }

/* ---- Gifts you can't buy: an illustrated "photo" per idea -------------- */
.nt-card { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; text-align: left; }
.nt-card .tile { border-style: dotted; }
.nt-card .photo svg { width: 30%; height: 30%; stroke-width: 1.2; color: var(--ink); }
.nt-card__notes { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-card--readonly .tile { cursor: default; }
@media (hover: hover) { .nt-card--readonly .tile:hover { border-color: var(--line-strong); } }

/* ---- Sheet ---------------------------------------------------------------- */
.sheet {
  width: min(560px, calc(100vw - 2 * var(--s-5)));
  max-width: none; max-height: min(88dvh, 780px);
  margin: auto; padding: 0; border: 0;
  border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in var(--dur-3) var(--ease) backwards; }
.sheet.is-closing { animation: sheet-out var(--dur-2) var(--ease) forwards; }
.sheet::backdrop { background: var(--scrim); }
.sheet[open]::backdrop { animation: fade var(--dur-3) var(--ease) backwards; }
.sheet.is-closing::backdrop { animation: fade var(--dur-2) var(--ease) reverse forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(24px); } }

.sheet__header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 64px; padding: 0 var(--s-5); flex: none;
}
.sheet__header > :first-child { justify-self: start; margin-left: calc(-1 * var(--s-3)); }
.sheet__header > :last-child { justify-self: end; }
.sheet__body { display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-2) var(--s-6) var(--s-5); overflow-y: auto; overscroll-behavior: contain; }
.sheet__footer { display: flex; align-items: center; gap: var(--s-5); padding: var(--s-4) var(--s-6) var(--s-5); flex: none; border-top: 1px solid var(--line); }
.sheet__footer .spacer { flex: 1; }
.sheet__error { min-height: var(--lh-caption); color: var(--cranberry); }
.sheet__remove.is-confirming { color: var(--cranberry); }

.sheet__hero { position: relative; aspect-ratio: 5 / 4; margin: 0 calc(-1 * var(--s-3)); }
.sheet__notes { white-space: pre-wrap; }

@media (max-width: 743px) {
  .sheet {
    width: 100vw; max-height: 92dvh;
    margin: auto 0 0; border-radius: var(--r-md) var(--r-md) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
  .sheet__body { padding: var(--s-2) var(--s-5) var(--s-5); }
  .sheet__footer { padding: var(--s-4) var(--s-5); gap: var(--s-4); }
  .sheet__footer .btn { height: var(--control-lg); }
}

/* ---- Fields: rows on ruled paper ---------------------------------------- */
.fieldset { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.fieldset > :not(:first-child) { border-top: 1px solid var(--line); }
.fieldset__row { display: grid; grid-template-columns: 1fr 1fr; }
.fieldset__row > :not(:first-child) { border-left: 1px solid var(--line); }

.field {
  display: block; width: 100%; min-height: 56px; padding: 15px 0;
  border: 0; border-radius: 0; background: transparent;
  font-family: var(--font-serif); font-size: var(--fs-body); line-height: var(--lh-body);
  transition: background-color var(--dur-1) var(--ease);
}
.fieldset__row > :not(:first-child) .dropdown__trigger, .fieldset__row > .field:not(:first-child) { padding-left: var(--s-4); }
.field::placeholder { color: var(--text-tertiary); font-style: italic; opacity: 1; }
.field:focus, .field:focus-visible { box-shadow: inset 0 -1px 0 var(--ink); border-radius: 0; }
textarea.field { resize: none; min-height: 104px; }

/* Pop-up form text: Montserrat regular, upright, light and easy to read */
.sheet .field, .sheet .dropdown__trigger, .dropdown__option {
  font-family: var(--font-form); font-weight: 400; font-size: 15px; letter-spacing: 0.01em;
}
.sheet .field::placeholder { font-style: normal; color: var(--text-tertiary); }
.dropdown__option[aria-selected="true"] { font-style: normal; font-weight: 600; }
.dropdown__hint { font-style: normal; font-family: var(--font-form); font-size: 12px; }
.sheet .sheet__form .caption, .sheet .sheet__error { font-family: var(--font-form); font-style: normal; font-size: 12px; letter-spacing: 0.01em; }

/* Photo row: small preview · image address · Upload */
.photo-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: var(--s-3); }
.photo-row__thumb {
  display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden;
  border-radius: var(--r-xs); background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-tertiary);
}
.photo-row__thumb img { width: 100%; height: 100%; object-fit: contain; }
.photo-row__thumb svg { width: var(--icon); height: var(--icon); }
.photo-row__upload { cursor: var(--cursor-action); }
.photo-row__upload[aria-busy="true"] { opacity: 0.55; pointer-events: none; }
.photo-row__upload:focus-within { box-shadow: var(--focus-ring); }
.photo-row .field { min-width: 0; text-overflow: ellipsis; }

/* ---- Dropdown (custom select) ------------------------------------------ */
.dropdown { position: relative; }
.dropdown__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  width: 100%; height: 100%; min-height: 56px;
  font-family: var(--font-serif); font-size: var(--fs-body); text-align: left;
}
.dropdown__trigger svg { width: var(--icon-sm); height: var(--icon-sm); transition: transform var(--dur-2) var(--ease); }
.dropdown__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.dropdown__trigger:focus-visible, .dropdown__trigger[aria-expanded="true"] { box-shadow: inset 0 -1px 0 var(--ink); border-radius: 0; }
.dropdown__list {
  position: fixed; z-index: var(--z-menu);
  width: max-content; max-width: calc(100vw - 16px);
  max-height: 264px; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--s-2) 0;
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.dropdown.is-open .dropdown__list { opacity: 1; visibility: visible; transform: none; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.dropdown__option { white-space: nowrap; display: flex; align-items: baseline; gap: var(--s-3); min-height: 44px; padding: 10px var(--s-5); font-size: 15px; }
.dropdown__option .check { width: var(--icon-sm); height: var(--icon-sm); margin-left: auto; align-self: center; visibility: hidden; }
.dropdown__option[aria-selected="true"] { font-style: italic; }
.dropdown__option[aria-selected="true"] .check { visibility: visible; }
.dropdown__option.is-active { background: var(--fill-hover); }
.dropdown__hint { font-size: var(--fs-caption); font-style: italic; color: var(--text-tertiary); }

/* ---- Toast ---------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: var(--s-6); z-index: var(--z-toast);
  display: flex; align-items: center; gap: var(--s-3);
  max-width: calc(100vw - 2 * var(--s-5));
  height: 44px; padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper);
  font-family: var(--font-label); font-size: var(--label-size); font-weight: var(--label-weight);
  letter-spacing: var(--label-tracking); text-transform: uppercase; white-space: nowrap;
  width: max-content;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.toast svg { width: var(--icon-sm); height: var(--icon-sm); flex: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 743px) {
  .toast { bottom: calc(var(--s-5) + env(safe-area-inset-bottom)); white-space: normal; height: auto; min-height: 44px; padding-block: var(--s-3); border-radius: var(--r-md); line-height: 16px; }
}

/* ---- Stocking illustration (kept for later use) ------------------------ */
.stocking { overflow: visible; transform-origin: 75% 6%; }
.stocking__gift { transition: transform var(--dur-3) var(--ease); }
.stocking__name { font-family: var(--font-stitch); font-weight: 700; }

/* ---- Gratitude jar ---------------------------------------------------------- */
.jar-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--grid-gutter); row-gap: var(--s-7); align-items: start; }
.jar-layout__side { grid-column: 1 / span 5; }
.jar-layout__game { grid-column: 7 / span 6; display: grid; grid-template-columns: 200px 1fr; gap: var(--s-5); align-items: start; }
.jar-layout__side { display: flex; flex-direction: column; gap: var(--s-5); }
.jar-frame { position: relative; aspect-ratio: 1; width: 100%; }
.jar-frame .photo svg { width: 46%; height: auto; }
.jar-stage { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); padding-top: var(--s-3); }
.jar-stage > * { animation: rise var(--dur-3) var(--ease) backwards; }
.jar-stage > :nth-child(2) { animation-delay: calc(1 * var(--stagger)); }
.jar-stage > :nth-child(3) { animation-delay: calc(2 * var(--stagger)); }
.jar-stage > :nth-child(4) { animation-delay: calc(3 * var(--stagger)); }
@media (max-width: 1127px) {
  .jar-layout__side, .jar-layout__game { grid-column: 1 / -1; max-width: var(--measure); }
}
@media (max-width: 743px) { .jar-layout__game { grid-template-columns: 120px 1fr; gap: var(--s-4); } .drawn-slip { font-size: 20px; } }

.line-input { display: flex; align-items: center; gap: var(--s-4); border-bottom: 1px solid var(--line-strong); transition: border-color var(--dur-1) var(--ease); }
.line-input:focus-within { border-color: var(--ink); }
.line-input input { flex: 1; min-width: 0; height: 52px; border: 0; background: none; font-family: var(--font-serif); font-size: var(--fs-body); }
.line-input input::placeholder { font-style: italic; color: var(--text-tertiary); }
.line-input input:focus-visible { box-shadow: none; }

.slips { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-style: italic; }
.slip { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--text-secondary); }
.slip button { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--text-tertiary); }
.slip button svg { width: 12px; height: 12px; }
@media (hover: hover) { .slip button:hover { color: var(--ink); background: var(--fill-hover); } }
.slip.reveal--new { animation: rise var(--dur-3) var(--ease) backwards; }

.jar.is-shaking { animation: shake var(--dur-4) var(--ease); transform-origin: 50% 100%; }
@keyframes shake { 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(1.5deg); } }

.drawn-slip { font-size: 24px; line-height: 1.35; font-style: italic; max-width: 26ch; overflow-wrap: anywhere; }
.guess-row { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }

/* ---- Footer: caption left, seal right ------------------------------------ */
.footer__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5); padding: var(--s-7) 0 calc(var(--s-6) + env(safe-area-inset-bottom)); }

