/* ==========================================================
   TAP & TASTE — The Dinner Decider
   A little Studio BOLO creation
   ========================================================== */

/* ---------- Font (self-hosted, optional) ----------
   Archivo variable: weight 100–900, width 62–125%.
   If the file is missing, the system fallbacks below take over. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;

  /* Palette */
  --tile: #F8F7F3;
  --paper: #FFFDF8;
  --ink: #252521;
  --ink-soft: #5E5C55;
  --tomato: #D94B38;
  --tomato-deep: #C2402E;
  --tomato-shadow: #9E3324;
  --olive: #64745A;
  --olive-deep: #4F6047;
  --butter: #F2CA72;
  --grout: #D7D4CA;
  --steel: #AEB4B8;
  --steel-light: #DCE0E2;
  --steel-dark: #8D9499;
  --lcd: #2B2C27;

  /* Type */
  --font: "Archivo", "Avenir Next", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-narrow: "Archivo", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;

  /* Spacing — 8pt system (4 for hairline adjustments) */
  --s-half: 4px;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;

  /* Radii — deliberately different per role */
  --r-button: 14px;
  --r-steel: 16px;
  --r-paper: 3px;

  /* Wall */
  --tile-size: 64px;
  --grout-w: 2px;

  /* Motion */
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-press: cubic-bezier(.3, .7, .4, 1);
}

@media (min-width: 400px) {
  :root { --tile-size: 68px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--tile);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }
svg { display: block; }

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

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- The tiled wall ----------
   Covers the whole page and scrolls along with the content. */
.wall {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-color: var(--tile);
  background-image:
    /* grout: vertical + horizontal */
    linear-gradient(90deg, var(--grout) 0 var(--grout-w), transparent var(--grout-w)),
    linear-gradient(180deg, var(--grout) 0 var(--grout-w), transparent var(--grout-w)),
    /* glaze highlight along the top/left edge of each tile */
    linear-gradient(90deg, transparent var(--grout-w), rgba(255,255,255,.95) var(--grout-w) calc(var(--grout-w) + 2px), transparent calc(var(--grout-w) + 2px)),
    linear-gradient(180deg, transparent var(--grout-w), rgba(255,255,255,.95) var(--grout-w) calc(var(--grout-w) + 2px), transparent calc(var(--grout-w) + 2px)),
    /* soft shade along the bottom/right edge */
    linear-gradient(270deg, rgba(120,110,90,.07) 0 2px, transparent 5px),
    linear-gradient(0deg, rgba(120,110,90,.08) 0 2px, transparent 6px),
    /* gloss */
    radial-gradient(90% 70% at 30% 22%, rgba(255,255,255,.75), rgba(255,255,255,0) 60%),
    linear-gradient(135deg, rgba(255,255,255,0) 55%, rgba(110,100,80,.035) 100%);
  background-size: var(--tile-size) var(--tile-size);
  background-position: center top;
}

/* warm overhead light + gentle vignette */
.wall::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 236, 200, .55), rgba(255, 236, 200, 0) 60%),
    radial-gradient(140% 100% at 50% 40%, rgba(0,0,0,0) 55%, rgba(70, 60, 40, .10) 100%);
  pointer-events: none;
}

/* ---------- Layout ---------- */
.kitchen {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top, 0px) + var(--s2))
    calc(env(safe-area-inset-right, 0px) + var(--s2))
    calc(env(safe-area-inset-bottom, 0px) + var(--s3))
    calc(env(safe-area-inset-left, 0px) + var(--s2));
}

@media (min-width: 560px) {
  .kitchen {
    justify-content: center;
    padding-top: calc(env(safe-area-inset-top, 0px) + var(--s5));
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--s5));
  }
}

main { display: flex; flex-direction: column; }

/* ---------- Brand header ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.brand-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--tomato);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.14);
}

.brand-name {
  font-weight: 800;
  font-stretch: 125%;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 13px;
  line-height: 1.2;
  color: var(--ink-soft);
}

.icon-btn {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: rgba(37,37,33,.06); color: var(--ink); }
.icon-btn .when-on { display: none; }
.icon-btn[aria-pressed="true"] { color: var(--ink); }
.icon-btn[aria-pressed="true"] .when-on { display: block; }
.icon-btn[aria-pressed="true"] .when-off { display: none; }

/* ---------- Hero ---------- */
.hero {
  margin: 12px 0 var(--s2);
}

/* "What's for dinner?" now lives on the printer display; the headline only
   appears when the kitchen talks back (decision made, kitchen closed) */
.hero:not(.has-title) .hero-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.hero:not(.has-title) .hero-line { margin-top: 0; }
.hero-line strong { color: var(--ink); font-weight: 700; }
.hero.is-quiet { margin: 0 0 var(--s2); }
.hero.is-quiet .hero-line { display: none; }

.hero-title {
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2rem, 9.6vw, 2.75rem);
  line-height: .98;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-line {
  margin-top: 12px;
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* short phones (iPhone SE etc.): tighten the top so the button stays in view */
@media (max-height: 720px) {
  .hero { margin: 8px 0 12px; }
  .hero-title { font-size: clamp(1.85rem, 8.6vw, 2.4rem); }
  .hero-line { margin-top: 8px; font-size: 15px; }
}

/* when the kitchen talks back, the headline narrows to make room */
.hero.is-voice .hero-title {
  font-stretch: 100%;
  font-size: clamp(1.75rem, 8vw, 2.25rem);
  letter-spacing: -0.02em;
}

/* ---------- Station: printer + ticket ---------- */
.station {
  position: relative;
}

.printer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px 22px;
  border-radius: var(--r-steel) var(--r-steel) 12px 12px;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.16) 0 1px, rgba(255,255,255,0) 1px 3px),
    linear-gradient(180deg, var(--steel-light) 0%, #C4C9CC 40%, var(--steel) 72%, #9EA5AA 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    inset 0 -3px 0 rgba(0,0,0,.10),
    0 2px 0 rgba(37,37,33,.06),
    0 14px 20px -14px rgba(37,37,33,.55);
}

/* the paper slot */
.printer::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 7px;
  height: 7px;
  border-radius: 4px;
  background: #1E1E1B;
  box-shadow: inset 0 2px 2px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.6);
}

/* two screws */
.printer::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  height: 5px;
  background:
    radial-gradient(circle at 2.5px 2.5px, #7F868B 0 1.6px, transparent 2px) left / 5px 5px no-repeat,
    radial-gradient(circle at 2.5px 2.5px, #7F868B 0 1.6px, transparent 2px) right / 5px 5px no-repeat;
  opacity: .8;
}

.printer-led {
  flex: none;
  margin-top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--olive);
  box-shadow: 0 0 0 2px rgba(0,0,0,.12), 0 0 8px rgba(100,116,90,.8);
  transition: background-color .25s, box-shadow .25s;
}

.printer-face {
  flex: 1;
  min-width: 0;
}

.printer-lcd {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--lcd);
  box-shadow: inset 0 2px 3px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.7);
  color: var(--butter);
  font-family: var(--font-narrow);
  font-stretch: 75%;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
}
.lcd-status { overflow: hidden; text-overflow: ellipsis; }
.lcd-count {
  flex: none;
  color: #FFF3D6;
  font-variant-numeric: tabular-nums;
}

/* compact 10-segment indecision indicator in the housing */
.pips {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  margin: 6px 0 0;
  padding: 0 2px;
  list-style: none;
}
.pip {
  height: 5px;
  border-radius: 2px;
  background: rgba(37,37,33,.22);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.25);
  transition: background-color .25s;
}
.pip.t1 { background: var(--olive); box-shadow: none; }
.pip.t2 { background: var(--butter); box-shadow: none; }
.pip.t3 { background: var(--tomato-deep); box-shadow: none; }
.pip.t4 { background: var(--ink); box-shadow: none; }
.pip.is-new { animation: pip-in .4s var(--ease-out); }
@keyframes pip-in {
  0%   { transform: scaleY(.2); opacity: .2; }
  60%  { transform: scaleY(1.8); opacity: 1; }
  100% { transform: none; }
}

/* pick 10: the last segment catches fire — too many options */
.pip { position: relative; }
.pip.fire {
  background: linear-gradient(90deg, #B83A29, #E8562F 30%, #F59B3A 55%, #F2CA72 75%, #D94B38);
  background-size: 220% 100%;
  box-shadow: 0 0 6px 1px rgba(245,155,58,.85), 0 0 14px 2px rgba(217,75,56,.45);
  animation: fire-glow 1.1s ease-in-out infinite alternate;
}
.pip.fire::before,
.pip.fire::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 11px;
  height: 19px;
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: radial-gradient(circle at 50% 75%, #FFF1C4 0 18%, #F2CA72 32%, #F28C38 55%, rgba(217,75,56,.9) 72%, rgba(217,75,56,0) 75%);
  transform-origin: 50% 100%;
  animation: flame .45s ease-in-out infinite alternate;
  pointer-events: none;
}
.pip.fire::before { left: 14%; }
.pip.fire::after { right: 10%; width: 8px; height: 15px; animation-duration: .6s; animation-delay: -.2s; }

.pip .smoke { display: none; }
.pip.fire .smoke {
  display: block;
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 4;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95,93,86,.7), rgba(95,93,86,0) 70%);
  filter: blur(1.5px);
  opacity: 0;
  pointer-events: none;
  animation: smoke 3s ease-out infinite;
}
.pip.fire .smoke:nth-child(2) { margin-left: -2px; animation-delay: 1s; }
.pip.fire .smoke:nth-child(3) { margin-left: -10px; animation-delay: 2s; }

@keyframes fire-glow {
  from { background-position: 0 0; box-shadow: 0 0 5px 1px rgba(245,155,58,.7), 0 0 10px 2px rgba(217,75,56,.35); }
  to   { background-position: 100% 0; box-shadow: 0 0 8px 2px rgba(245,155,58,.95), 0 0 18px 3px rgba(217,75,56,.55); }
}
@keyframes flame {
  0%   { transform: scale(.85, .8) rotate(-5deg); opacity: .85; }
  50%  { transform: scale(1, 1.15) rotate(3deg); }
  100% { transform: translateY(-1px) scale(.9, 1.3) rotate(-2deg); opacity: 1; }
}
@keyframes smoke {
  0%   { transform: translate(0, 0) scale(.5); opacity: 0; }
  15%  { opacity: .75; }
  100% { transform: translate(-14px, -80px) scale(3.2); opacity: 0; }
}

.printer[data-status="printing"] .printer-led {
  background: var(--butter);
  box-shadow: 0 0 0 2px rgba(0,0,0,.12), 0 0 10px rgba(242,202,114,.95);
}
.printer[data-status="closed"] .printer-led {
  background: var(--tomato);
  box-shadow: 0 0 0 2px rgba(0,0,0,.12), 0 0 10px rgba(217,75,56,.8);
}

/* CLOSED sign that swings over the printer display */
.closed-sign {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 3;
  width: 132px;
  margin-left: -50px;
  padding-top: 12px;
  transform-origin: 50% 0;
  pointer-events: none;
}
.closed-sign::before {
  /* the string */
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 18px;
  border: 1.5px solid var(--ink);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.closed-sign span {
  position: relative;
  display: block;
  padding: 5px 0 4px;
  border: 2px solid var(--tomato-deep);
  border-radius: 6px;
  background: var(--paper);
  color: var(--tomato-deep);
  font-family: var(--font-narrow);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 6px 10px -6px rgba(37,37,33,.5);
}
.closed-sign.is-swinging { animation: sign-swing 1.4s var(--ease-out) both; }

@keyframes sign-swing {
  0%   { transform: translateY(-28px) rotate(0deg); opacity: 0; }
  20%  { transform: translateY(0) rotate(14deg); opacity: 1; }
  42%  { transform: rotate(-9deg); }
  62%  { transform: rotate(5deg); }
  80%  { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}

/* the feed — clips the ticket at the slot, lets shadows spill below */
.feed {
  position: relative;
  z-index: 1;
  margin: -14px 7% 0;
  clip-path: inset(0 -24px -40px -24px);
}

.ticket-wrap {
  filter:
    drop-shadow(0 1px 1px rgba(37,37,33,.10))
    drop-shadow(0 10px 14px rgba(37,37,33,.14));
  will-change: transform;
}

/* ---------- The ticket ---------- */
.ticket {
  --zig: 7px;
  position: relative;
  padding: 20px 18px calc(var(--zig) + 12px);
  border-radius: 0 0 var(--r-paper) var(--r-paper);
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(0,0,0,.05) 0, rgba(0,0,0,0) 14px),
    linear-gradient(180deg, #FFFEFA 0%, var(--paper) 60%, #FBF7EE 100%);
  /* perforated, torn-off bottom edge */
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--zig)) var(--zig) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--zig) + 1px) no-repeat;
          mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--zig)) var(--zig) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--zig) + 1px) no-repeat;
}

.t-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-narrow);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.t-rule {
  height: 0;
  margin: 10px 0;
  border: 0;
  border-top: 1.5px dashed rgba(37,37,33,.32);
}

.t-label {
  font-family: var(--font-narrow);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 11.5px;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.t-name {
  margin: 4px 0 4px;
  padding-right: 52px; /* room for the sticker */
  font-family: var(--font-narrow);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 42px;
  line-height: .92;
  letter-spacing: .005em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.t-name.is-long  { font-size: 36px; }
.t-name.is-xlong { font-size: 31px; }

@media (max-width: 359px) {
  .ticket { padding-left: 16px; padding-right: 16px; }
  .t-name { font-size: 36px; padding-right: 42px; }
  .t-name.is-long  { font-size: 30px; }
  .t-name.is-xlong { font-size: 26px; }
  .t-sticker { width: 44px; height: 44px; font-size: 22px; right: 10px; }
  .t-note { font-size: 15px; }
}

.t-desc:empty { display: none; }
.t-desc {
  font-size: 14px;
  line-height: 1.38;
  color: var(--ink-soft);
}

.t-note {
  margin-top: 3px;
  font-size: 15.5px;
  line-height: 1.36;
  font-weight: 560;
  text-wrap: pretty;
}

.t-foot {
  margin-top: 26px;
}

.t-barcode {
  width: 168px;
  height: 20px;
  margin: 0 auto;
  background-repeat: no-repeat;
  opacity: .88;
}

.t-sticker {
  position: absolute;
  top: 40px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--butter);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 2px 3px rgba(37,37,33,.18);
  font-size: 28px;
  line-height: 1;
  transform: rotate(10deg);
}

/* rubber stamp after "We're eating this" */
.t-stamp {
  position: absolute;
  right: 12px;
  bottom: 50px;
  padding: 4px 12px 3px;
  border: 3px solid var(--olive);
  border-radius: 8px;
  color: var(--olive);
  font-family: var(--font-narrow);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  letter-spacing: .1em;
  text-transform: uppercase;
  transform: rotate(-9deg);
  mix-blend-mode: multiply;
  opacity: .92;
  pointer-events: none;
}

/* empty "test print" state */
.ticket.is-empty .t-name { color: rgba(37,37,33,.28); }
.ticket.is-empty .t-sticker { background: var(--grout); }
.ticket.is-empty .t-barcode { opacity: .25; }

/* ---------- Controls ---------- */
.controls {
  margin-top: 20px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-button);
  font-family: var(--font-narrow);
  font-stretch: 80%;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform .12s var(--ease-press), box-shadow .12s var(--ease-press), background-color .2s, color .2s, opacity .2s;
}

.btn-primary {
  width: 100%;
  min-height: 54px;
  font-stretch: 75%;
  font-size: 19px;
  color: #FFFFFF;
  background: var(--tomato);
  box-shadow: 0 4px 0 var(--tomato-shadow), 0 10px 18px -8px rgba(158,51,36,.55);
}
.btn-primary:hover { background: #DE5441; }
.btn-primary:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--tomato-shadow), 0 4px 10px -6px rgba(158,51,36,.5);
}
.btn-primary[aria-busy="true"] { cursor: progress; }
.btn-primary[aria-busy="true"] .btn-label::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: dots 1s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; }
}

.btn-primary.is-locked,
.btn-primary.is-locked:hover,
.btn-primary.is-locked:disabled {
  opacity: 1;
  color: rgba(37,37,33,.62);
  background: var(--grout);
  box-shadow: 0 4px 0 #BDB9AD;
  cursor: not-allowed;
}

.btn .lock { display: none; }
.btn.is-locked .lock { display: block; }

.helper:empty { display: none; }
.helper {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
  text-align: center;
}
.helper strong { color: var(--ink); font-weight: 700; }

.secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s1);
  margin-top: var(--s2);
}
.secondary .btn {
  font-stretch: 66%;
  font-size: 16px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.btn-outline {
  color: var(--ink);
  background: rgba(255,253,248,.85);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.btn-outline:hover { background: var(--paper); }

.btn-ink {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 3px 0 #000;
}
.btn-ink:hover { background: #33332E; }

.btn-outline:active:not([aria-disabled="true"]),
.btn-ink:active:not(:disabled) { transform: translateY(2px); }

.btn-ink:active:not(:disabled) { box-shadow: 0 1px 0 #000; }

/* after a decision, the map becomes the main thing to do */
.btn-outline.is-hot {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 3px 0 #000;
}
.btn-ink.is-done,
.btn-ink.is-done:hover {
  color: #FFFFFF;
  background: var(--olive-deep);
  box-shadow: 0 3px 0 #3B4835;
  cursor: default;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .38;
  cursor: not-allowed;
  box-shadow: inset 0 0 0 2px rgba(37,37,33,.5);
  background: transparent;
  color: var(--ink);
}

.btn .icon { flex: none; }
@media (max-width: 359px) {
  .secondary .btn .icon { display: none; }
  .secondary .btn { font-size: 15px; letter-spacing: .02em; padding: 0 8px; }
}

.share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: var(--s1);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.foot {
  margin-top: var(--s5);
  padding-top: var(--s2);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.foot p + p { margin-top: 2px; }
.foot .studio { font-weight: 700; color: var(--ink); }
.storage-note { margin-top: var(--s1) !important; font-size: 12.5px; }

.noscript {
  margin: var(--s2) 0;
  padding: var(--s2);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--ink);
  font-size: 15px;
}

/* ---------- Page-load moment ---------- */
.is-entering .hero,
.is-entering .controls {
  animation: rise .6s var(--ease-out) both;
}
.is-entering .controls { animation-delay: .12s; }
.is-entering .ticket-wrap { animation: feed-in .9s .15s var(--ease-out) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes feed-in {
  from { transform: translateY(-101%); }
  to   { transform: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .btn-primary[aria-busy="true"] .btn-label::after { content: "…"; animation: none; }
  .pip.fire .smoke { display: none; }
}
