:root {
  --ink: #1A1423;
  --muted: #4A4352;
  --red: #D1321E;
  --red-text: #C22D1A;
  --yellow: #FFC53D;
  --line: #D5CEDA;
  --display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--body);
  -webkit-text-size-adjust: 100%;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #2F6FEB; outline-offset: 2px; }

.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: #FFFFFF;
}

.screen { display: none; min-height: 100vh; min-height: 100dvh; flex-direction: column; }
.screen.active { display: flex; }

.cloth {
  background-color: #FFFFFF;
  background-image:
    linear-gradient(90deg, rgba(209, 50, 30, 0.5) 50%, transparent 50%),
    linear-gradient(rgba(209, 50, 30, 0.5) 50%, transparent 50%);
  background-size: 44px 44px;
}

.red { color: var(--red); }
.mono { font-family: var(--mono); font-weight: 500; }
.muted { margin: 0; font-size: 16px; line-height: 1.4; color: var(--muted); }

.kicker {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-text);
}
.kicker-light { color: #CFC8D6; font-size: 12px; }

.h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Buttons */

.btn {
  width: 100%;
  min-height: 64px;
  border-radius: 18px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:disabled { opacity: 0.7; cursor: progress; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-sunk { border: none; box-shadow: 0 5px 0 #A87708; margin-bottom: 5px; }
.btn-sunk:active { transform: translateY(4px); box-shadow: 0 1px 0 #A87708; }
.btn-shadow { border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); width: calc(100% - 5px); }
.btn-shadow:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
/* Second choice on the dark start sheet: outlined, so the yellow button stays the main one. */
.btn-ghost { background: transparent; color: #FFFFFF; border: 2px solid rgba(255, 255, 255, 0.5); min-height: 52px; font-size: 18px; margin-top: -4px; }
.btn-ghost:active { background: rgba(255, 255, 255, 0.1); }
.btn-white { background: #FFFFFF; border: 3px solid var(--ink); min-height: 52px; font-size: 18px; width: calc(100% - 5px); }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 700;
}
.pill-dark { background: var(--ink); color: #FFFFFF; }
.pill-light { background: #FFFFFF; border: 2.5px solid var(--ink); }

.error {
  margin: 0;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 2.5px solid var(--red-text);
  border-radius: 12px;
  color: var(--red-text);
  font-weight: 700;
  font-size: 15px;
}

/* 1. Start */

.screen-start {
  background-color: #FFFFFF;
  background-image:
    linear-gradient(90deg, rgba(209, 50, 30, 0.5) 50%, transparent 50%),
    linear-gradient(rgba(209, 50, 30, 0.5) 50%, transparent 50%);
  background-size: 44px 44px;
}
.start-top { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 44px 20px 20px; }
.sticker {
  padding: 8px 16px;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}
.faces { display: flex; gap: 14px; }
.face {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.place-setting { display: flex; align-items: center; gap: 10px; }
.cutlery { flex: none; }
.plate {
  width: 262px;
  height: 262px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(26, 20, 35, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.plate-inner {
  width: 212px;
  height: 212px;
  border-radius: 50%;
  border: 2px solid #DDD6E2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 50px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-align: center;
}
.start-sheet {
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 28px 28px 0 0;
  padding: 26px 28px calc(34px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.lede { margin: 0; font-size: 18px; line-height: 1.45; text-wrap: pretty; }
.fine { margin: 0; font-size: 14px; color: #CFC8D6; text-align: center; }

@media (max-width: 360px) {
  .plate { width: 220px; height: 220px; }
  .plate-inner { width: 180px; height: 180px; }
  .title { font-size: 42px; }
  .cutlery { height: 140px; }
}

/* 2. Pick */

.screen-pick { padding: 44px 20px calc(34px + env(safe-area-inset-bottom)); justify-content: space-between; gap: 18px; }
.card {
  padding: 22px 16px 16px;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--ink);
  margin-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card-head { display: flex; flex-direction: column; gap: 8px; padding: 0 6px; }
.situations { display: flex; flex-direction: column; gap: 6px; }
.situation {
  width: 100%;
  min-height: 62px;
  padding: 8px 12px;
  text-align: left;
  background: #FFFFFF;
  border: 2.5px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.situation[aria-pressed='true'] { background: var(--yellow); border-color: var(--ink); }
.s-text { display: flex; flex-direction: column; gap: 3px; }
.s-title { font-size: 17px; font-weight: 700; }
.s-hint { font-size: 14px; color: var(--muted); }
.s-mark {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  background: #FFFFFF;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.situation[aria-pressed='true'] .s-mark { background: var(--ink); }
.own { display: flex; flex-direction: column; gap: 6px; }
.own label { padding: 0 6px; font-size: 14px; font-weight: 700; }
.own input {
  width: 100%;
  height: 54px;
  padding: 0 14px;
  background: #FFFFFF;
  border: 2.5px solid var(--line);
  border-radius: 14px;
  font-size: 17px;
}
.own input.chosen { border-color: var(--ink); }
.own input::placeholder { color: #6B6372; opacity: 1; }
.pick-foot { display: flex; flex-direction: column; gap: 12px; }

/* 2b. Guests */

.screen-guests { padding: 28px 20px calc(30px + env(safe-area-inset-bottom)); justify-content: space-between; gap: 14px; }
.guests-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.guests-title-row .pill { flex: none; white-space: nowrap; }
.guest-list { display: flex; flex-direction: column; gap: 6px; }
.guest {
  min-height: 62px;
  padding-right: 4px;
  background: #FFFFFF;
  border: 2.5px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.guest.on { background: var(--yellow); border-color: var(--ink); }
.guest-pick {
  flex: 1;
  min-width: 0;
  min-height: 57px;
  padding: 7px 4px 7px 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.guest-face {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guest-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.guest-name { font-size: 16px; font-weight: 700; }
.guest-line { font-size: 13px; color: var(--muted); }
.tone-btn { flex: none; min-height: 44px; padding: 0; border: none; background: transparent; display: flex; align-items: center; }
.tone-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: #FFFFFF;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tone-tag.tough { background: var(--red-text); border-color: var(--red-text); color: #FFFFFF; }
.tone-tag.ally { background: var(--ink); color: #FFFFFF; }
.guest-check { flex: none; width: 34px; min-height: 44px; padding: 0; border: none; background: transparent; display: flex; align-items: center; justify-content: center; }
.guest-check .s-mark { width: 24px; height: 24px; }
.guest.on .s-mark { background: var(--ink); }
.difficulty {
  margin-right: 5px;
  padding: 10px 14px 12px;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.difficulty-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 700; }
.difficulty-label { font-family: var(--display); font-weight: 800; font-size: 18px; }
.difficulty-label.hot { color: var(--red-text); }
.difficulty-meter { height: 14px; border: 2.5px solid var(--ink); border-radius: 8px; background: #FFFFFF; overflow: hidden; }
.difficulty-fill { height: 100%; width: 50%; background: var(--red); border-right: 2.5px solid var(--ink); transition: width 250ms ease; }

/* 3. Play */

.screen-play { background: var(--yellow); }
.wall { padding: 44px 24px 0; display: flex; flex-direction: column; gap: 14px; }
.play-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.play-top-right { display: flex; gap: 8px; }
.leave { min-height: 44px; }
.tension { display: flex; flex-direction: column; gap: 6px; }
.tension-labels { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; }
.meter { height: 20px; border: 2.5px solid var(--ink); border-radius: 10px; background: #FFFFFF; overflow: hidden; }
.meter-fill { height: 100%; width: 20%; background: var(--red); border-right: 2.5px solid var(--ink); transition: width 400ms ease; }
.tension-right { display: flex; align-items: center; gap: 6px; }
.tension-delta {
  padding: 2px 8px;
  border-radius: 10px;
  color: #FFFFFF;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
}
.tension-delta.up { background: var(--red-text); }
.tension-delta.down { background: var(--ink); }
.tension-delta.same { background: var(--muted); }
.faces-row {
  position: relative;
  z-index: 2;
  height: 136px;
  margin-bottom: -30px;
  padding: 0 4px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.relative { height: 136px; }
.side-face { width: 84px; height: 84px; transform-origin: 50% 100%; }
.side-face.show { animation: lean-in 420ms cubic-bezier(.3,1.6,.6,1); }
@keyframes lean-in { 0% { transform: none; } 40% { transform: translateY(-10px) scale(1.08); } 100% { transform: none; } }
.table {
  position: relative;
  z-index: 1;
  flex: 1;
  border-top: 3px solid var(--ink);
  padding: 58px 16px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.bubble {
  position: relative;
  margin-right: 5px;
  padding: 16px 20px 18px;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 5px 5px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.bubble::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  background: #FFFFFF;
  border-left: 3px solid var(--ink);
  border-top: 3px solid var(--ink);
  transform: rotate(45deg);
}
.reaction { display: flex; flex-direction: column; gap: 12px; animation: pop-in 260ms cubic-bezier(.3,1.6,.6,1); }
.clouds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cloud {
  position: relative;
  padding: 12px 14px 14px;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  border-radius: 26px;
  box-shadow: 4px 4px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tail { position: absolute; border-radius: 50%; background: #FFFFFF; border: 3px solid var(--ink); }
.tail-big { top: -20px; width: 14px; height: 14px; }
.tail-small { top: -34px; width: 9px; height: 9px; border-width: 2.5px; }
.cloud-left .tail-big { left: 30px; }
.cloud-left .tail-small { left: 22px; }
.cloud-right .tail-big { right: 30px; }
.cloud-right .tail-small { right: 22px; }
.cloud-who { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cloud-text { font-size: 16px; font-weight: 700; line-height: 1.3; }
.stamp-row { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.react-stamp {
  padding: 6px 14px;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}
.react-stamp.up { border-color: var(--red-text); color: var(--red-text); }
.react-stamp.down { background: var(--yellow); }
.delta-pill { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 16px; background: var(--ink); color: #FFFFFF; font-size: 14px; font-weight: 700; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reaction { animation: none; }
  .side-face.show { animation: none; }
}
.question {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  min-height: 2.3em;
}
.you {
  padding: 14px 18px 16px;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.you p { margin: 0; font-size: 17px; line-height: 1.4; min-height: 1.4em; }
.mic-area { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mic {
  width: 84px;
  height: 84px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--red);
  color: #FFFFFF;
  box-shadow: 0 5px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mic[aria-pressed='true'] { background: #FFFFFF; color: var(--ink); }
.mic[aria-pressed='false'] { animation: listen 1.6s ease-in-out infinite; }
@keyframes listen {
  0%, 100% { box-shadow: 0 5px 0 var(--ink), 0 0 0 0 rgba(209, 50, 30, 0.45); }
  50% { box-shadow: 0 5px 0 var(--ink), 0 0 0 12px rgba(209, 50, 30, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .mic[aria-pressed='false'] { animation: none; }
  .meter-fill { transition: none; }
}

/* 4. Result */

.screen-result { padding: 36px 20px calc(30px + env(safe-area-inset-bottom)); justify-content: space-between; align-items: center; gap: 16px; }
.receipt-wrap { width: 100%; max-width: 318px; display: flex; flex-direction: column; filter: drop-shadow(6px 6px 0 rgba(26, 20, 35, 0.35)); }
.receipt {
  padding: 20px 22px 16px;
  background: #FFFFFF;
  border-radius: 6px 6px 0 0;
  font-family: var(--mono);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.receipt-head { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
.receipt-brand { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.01em; }
.receipt-small { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.receipt-small.center { text-align: center; text-transform: none; }
.rule { border-top: 2px dashed var(--ink); }
.receipt-score { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.receipt-score-left { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.receipt-score .receipt-small { color: var(--ink); font-size: 13px; }
.score { font-family: var(--display); font-weight: 800; font-size: 76px; line-height: 0.85; letter-spacing: -0.03em; }
.stamp {
  margin: 0;
  max-width: 150px;
  padding: 4px 10px;
  border: 3px solid var(--red-text);
  border-radius: 8px;
  color: var(--red-text);
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transform: rotate(-5deg);
}
.receipt-edge {
  height: 8px;
  background-image:
    linear-gradient(135deg, #FFFFFF 5.66px, transparent 0),
    linear-gradient(225deg, #FFFFFF 5.66px, transparent 0);
  background-size: 16px 8px;
  background-repeat: repeat-x;
}
.result-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.drive-home { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.drive-kicker {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 14px;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.thoughts { display: flex; flex-direction: column; gap: 10px; }
.thought { display: flex; align-items: center; gap: 14px; }
.thought-face {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--yellow);
  border: 3px solid var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thought-bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 9px 14px 10px;
  background: #FFFFFF;
  border: 3px solid var(--ink);
  border-radius: 22px;
  box-shadow: 4px 4px 0 var(--ink);
  margin-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.thought-bubble::before {
  content: '';
  position: absolute;
  left: -13px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--ink);
}
.thought-head { display: flex; justify-content: space-between; gap: 8px; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.thought-who { color: var(--muted); }
.thought-outcome.bad { color: var(--red-text); }
.thought-text { font-size: 15px; font-weight: 700; line-height: 1.3; }

[hidden] { display: none !important; }

/* ---------- Languages ---------- */
/* DM Sans and DM Mono have no Vietnamese accents. Bricolage Grotesque does. */
:root:lang(vi) {
  --body: 'Be Vietnam Pro', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
:root:lang(vi) .title { font-size: 44px; line-height: 1.02; }
:root:lang(zh) {
  --display: 'PingFang SC', 'Noto Sans SC', 'Noto Sans CJK SC', 'Microsoft YaHei', system-ui, sans-serif;
  --body: 'PingFang SC', 'Noto Sans SC', 'Noto Sans CJK SC', 'Microsoft YaHei', system-ui, sans-serif;
  --mono: 'PingFang SC', 'Noto Sans SC', 'Noto Sans CJK SC', 'Microsoft YaHei', system-ui, sans-serif;
}
:root:lang(zh) .title { letter-spacing: 0; }
@media (max-height: 700px) {
  :root:lang(vi) .title { font-size: 36px; }
}
:root:lang(vi) .tone-tag { letter-spacing: 0.01em; }
:root:lang(vi) .guests-title-row .h1 { font-size: 26px; }

/* Language switch on the start screen */
.start-top { position: relative; }
.lang-switch {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  background: #fff;
  border: 2.5px solid var(--ink, #1A1423);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 3px 0 var(--ink, #1A1423);
}
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1A1423;
  font: 700 13px/1 system-ui, sans-serif;
  padding: 0 12px;
  min-height: 36px;
  min-width: 44px;
  cursor: pointer;
}
.lang-btn + .lang-btn { border-left: 2px solid #1A1423; }
.lang-btn[aria-pressed="true"] { background: #1A1423; color: #fff; cursor: default; }
.lang-btn:focus-visible { outline: 3px solid #FFC53D; outline-offset: -3px; }

/* Who is who at the table */
.name-row { position: absolute; top: 30px; left: 6px; right: 6px; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.face-name { max-width: 31%; padding: 3px 8px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; font: 700 11px/1.2 var(--body); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.face-name.host { max-width: 36%; background: var(--yellow); font-size: 12px; }

/* Account and sign-in */
.account { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; align-items: center; gap: 6px; max-width: 55%; padding: 3px 4px 3px 4px; background: #fff; border: 2.5px solid #1A1423; border-radius: 999px; box-shadow: 0 3px 0 #1A1423; }
.account-pic { width: 28px; height: 28px; border-radius: 50%; }
.account-name { font: 700 13px/1 var(--body); padding-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-out { appearance: none; border: 0; border-left: 2px solid #1A1423; background: transparent; color: #1A1423; font: 500 12px/1 var(--body); padding: 0 10px; min-height: 30px; cursor: pointer; white-space: nowrap; }
.link-btn { appearance: none; border: 0; background: transparent; color: #FFC53D; font: 700 14px/1 var(--body); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 12px; align-self: center; cursor: pointer; }
.link-btn:focus-visible, .account-out:focus-visible { outline: 3px solid #FFC53D; outline-offset: 2px; }
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(26, 20, 35, 0.6); padding: 16px; }
.sheet[hidden] { display: none; }
.sheet-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); background: #fff; border: 3px solid #1A1423; border-radius: 24px; box-shadow: 6px 6px 0 #1A1423; }
.sheet-card .h1, .sheet-card .muted { margin: 0; }
.google-btn { display: flex; justify-content: center; min-height: 44px; }
@media (min-height: 700px) { .sheet { align-items: center; } }
.pack-list { display: flex; flex-direction: column; gap: 12px; }
.signin-btn { margin-top: 4px; color: #1A1423; width: 100%; }
.sheet .btn-white { color: #1A1423; }
.share-note { margin: 0; padding: 12px 16px; background: #fff; border: 2.5px solid #1A1423; border-radius: 14px; font: 500 14px/1.4 var(--body); color: #1A1423; text-align: center; }
.screen-pick { position: relative; padding-top: 64px; }
.lang-switch-pick { top: 12px; right: 20px; }
.screen-guests { position: relative; padding-top: 64px; }
.back-btn { position: absolute; top: 12px; left: 20px; z-index: 2; appearance: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; background: #fff; color: #1A1423; border: 2.5px solid #1A1423; border-radius: 999px; box-shadow: 0 3px 0 #1A1423; font: 700 14px/1 var(--body); cursor: pointer; }
.back-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #1A1423; }
.back-btn:focus-visible { outline: 3px solid #FFC53D; outline-offset: 2px; }

/* "Open in your browser" screen for in-app browsers */
.inapp-gate { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); }
.inapp-gate[hidden] { display: none; }
.gate-card { display: flex; flex-direction: column; gap: 14px; }
.gate-card .h1, .gate-card .muted { margin: 0; }
.gate-steps { margin: 0; padding: 14px 16px 14px 36px; background: #FFF4D6; border: 2.5px solid #1A1423; border-radius: 16px; font: 600 16px/1.45 var(--body); color: #1A1423; }
.gate-steps li + li { margin-top: 6px; }
.gate-card a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; color: #1A1423; }
.gate-copied { margin: 0; font: 500 14px/1.4 var(--body); color: #1A1423; text-align: center; word-break: break-all; }
.gate-anyway { color: #1A1423; background: #fff; border-radius: 999px; padding: 0 16px; }

/* Privacy, terms and cookie links under the start button */
.legal-links { margin: 0; display: flex; justify-content: center; align-items: center; gap: 8px; font: 500 13px/1 var(--body); color: #CFC8D6; }
.legal-links a, .legal-links button { appearance: none; border: 0; background: transparent; padding: 8px 2px; font: inherit; color: #CFC8D6; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.legal-links a:focus-visible, .legal-links button:focus-visible { outline: 3px solid #FFC53D; outline-offset: 2px; }

/* Cookie banner: both buttons the same size, so declining is as easy as accepting */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; max-width: 420px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fff; color: #1A1423; border: 3px solid #1A1423; border-radius: 18px; box-shadow: 5px 5px 0 #1A1423; font: 500 14px/1.4 var(--body); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; }
.cookie-banner a { color: #C22D1A; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn { appearance: none; flex: 1; min-height: 44px; border: 2.5px solid #1A1423; border-radius: 12px; background: #fff; color: #1A1423; font: 700 15px/1 var(--body); cursor: pointer; }
.cookie-btn-yes { background: #FFC53D; }
.cookie-btn:focus-visible { outline: 3px solid #D1321E; outline-offset: 2px; }

/* Foot of the start sheet: the fine print and "Get more dinners" share a line, links sit close under. */
.start-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 10px; }
.start-meta .link-btn { min-height: 32px; padding: 0 2px; }
.start-sheet { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.start-sheet .legal-links { margin-top: -8px; }

/* Start screen on short phones: shrink the table so both start buttons stay on screen. */
@media (max-height: 900px) {
  .screen-start .start-top { gap: 16px; padding-bottom: 14px; }
  .screen-start .plate { width: 236px; height: 236px; }
  .screen-start .plate-inner { width: 192px; height: 192px; }
  .screen-start .title { font-size: 46px; }
  :root:lang(vi) .screen-start .title { font-size: 40px; }
  .screen-start .cutlery { height: 150px; width: auto; }
  .screen-start .start-sheet { gap: 14px; padding-top: 22px; }
}
@media (max-height: 800px) {
  .screen-start .start-top { gap: 14px; padding: 66px 20px 14px; } /* clears the account pill and language switch */
  .screen-start .face { width: 64px; height: 64px; }
  .screen-start .face svg { width: 54px; height: 54px; }
  .screen-start .plate { width: 196px; height: 196px; }
  .screen-start .plate-inner { width: 160px; height: 160px; }
  .screen-start .title, :root:lang(vi) .screen-start .title { font-size: 36px; }
  .screen-start .cutlery { height: 124px; width: auto; }
  .screen-start .start-sheet { gap: 14px; padding-top: 20px; }
  .screen-start .lede { font-size: 17px; line-height: 1.4; }
}
@media (max-height: 640px) {
  .screen-start .start-top { gap: 10px; padding-bottom: 10px; }
  .screen-start .sticker { display: none; }
  .screen-start .face { width: 52px; height: 52px; }
  .screen-start .face svg { width: 44px; height: 44px; }
  .screen-start .plate { width: 150px; height: 150px; }
  .screen-start .plate-inner { width: 122px; height: 122px; }
  .screen-start .title, :root:lang(vi) .screen-start .title { font-size: 28px; }
  .screen-start .cutlery { height: 96px; }
  .screen-start .btn-sunk { min-height: 58px; }
}
