/* CAFÉ CALM — an editorial café menu that happens to be a survival game. */

@font-face {
  font-family: "Playfair Display";
  src: url("./assets/fonts/playfair-display-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("./assets/fonts/playfair-display-700-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/fonts/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/fonts/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("./assets/fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("./assets/fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("./assets/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f7ead6;
  --paper-hi: #fff8ea;
  --paper-lo: #ead6bb;
  --ink: #24160f;
  --ink-soft: #4f3a2c;
  --muted: #806a58;
  --red: #c63b2f;
  --red-deep: #8b241d;
  --coral: #e36a4f;
  --gold: #e8b44c;
  --gold-soft: #f3d18f;
  --green: #24473b;
  --noob-yellow: #f3d34a;
  --line: rgba(36, 22, 15, 0.18);
  --line-light: rgba(247, 234, 214, 0.18);
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Space Grotesk", "Segoe UI", sans-serif;
  --font-condensed: "Barlow Condensed", "Arial Narrow", sans-serif;
  --shadow-card: 0 24px 70px rgba(34, 18, 9, 0.28), 0 2px 0 rgba(255, 255, 255, 0.35) inset;
}

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

html {
  height: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.is-hidden {
  display: none !important;
}

#app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 60% 20%, #bd8c7a 0%, transparent 55%),
    var(--ink);
}

#stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.fx {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.fx--grain {
  opacity: 0.055;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

.fx--vignette {
  background:
    radial-gradient(ellipse at center, transparent 44%, rgba(29, 15, 8, 0.32) 100%),
    linear-gradient(180deg, rgba(29, 15, 8, 0.25) 0%, transparent 18%, transparent 76%, rgba(29, 15, 8, 0.28) 100%);
}

.flash {
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  background: #fff5de;
  opacity: 0;
}

.flash.is-flashing {
  animation: screen-flash 0.48s ease-out;
}

@keyframes screen-flash {
  0% { opacity: 0.55; }
  100% { opacity: 0; }
}

/* ============================== loader ============================== */

.loader {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--paper);
  background:
    radial-gradient(ellipse at 50% 44%, rgba(198, 59, 47, 0.2), transparent 50%),
    radial-gradient(ellipse at 50% 120%, rgba(232, 180, 76, 0.16), transparent 55%),
    #1b110c;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.loader::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(247, 234, 214, 0.14);
  pointer-events: none;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__badge {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247, 234, 214, 0.38);
  border-radius: 50%;
  margin-bottom: 10px;
  animation: loader-hover 2.6s ease-in-out infinite;
}

.cup-glyph {
  width: 34px;
  display: block;
  color: var(--gold);
}

.cup-glyph svg {
  width: 100%;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes loader-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.loader__eyebrow {
  margin: 0;
  font-family: var(--font-condensed);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: rgba(247, 234, 214, 0.55);
}

.loader__title {
  margin: 0 0 10px;
  font-family: var(--font-condensed);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.025em;
  color: var(--paper);
}

.loader__title em {
  color: var(--red);
  font-style: normal;
}

.loader__line {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.82rem;
  color: rgba(247, 234, 214, 0.6);
}

.loader__track {
  width: min(220px, 48vw);
  height: 2px;
  margin-top: 14px;
  background: rgba(247, 234, 214, 0.12);
  overflow: hidden;
}

.loader__track i {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--gold);
  animation: loader-line 1.7s ease-in-out infinite;
}

@keyframes loader-line {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(280%); }
}

/* ============================== menu ============================== */

.menu {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(100deg, rgba(18, 11, 7, 0.34) 0%, transparent 48%),
    linear-gradient(0deg, rgba(18, 11, 7, 0.48) 0%, transparent 28%);
}

.topbar {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 4vw, 62px) 18px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(247, 234, 214, 0.96) 0%, rgba(247, 234, 214, 0.78) 64%, rgba(247, 234, 214, 0) 100%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.72;
}

.brand__cup {
  width: 26px;
  height: 26px;
  color: var(--red);
}

.brand__cup svg {
  width: 100%;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__type {
  font-family: var(--font-condensed);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1;
}

.brand__type b {
  color: var(--red);
}

.brand__city {
  margin-left: 5px;
  padding: 4px 7px 3px;
  border: 1px solid rgba(36, 22, 15, 0.35);
  font-family: var(--font-condensed);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.meme-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-condensed);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--red-deep);
}

.meme-pill i {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(198, 59, 47, 0.13);
}

.build-tag {
  font-family: var(--font-condensed);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: rgba(36, 22, 15, 0.55);
}

.menu__layout {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(440px, 640px) minmax(250px, 330px);
  justify-content: space-between;
  align-items: end;
  gap: clamp(30px, 5vw, 90px);
  padding: clamp(12px, 2.5vh, 34px) clamp(20px, 4vw, 62px) 20px;
}

.hero {
  position: relative;
  padding: clamp(24px, 3vw, 38px);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 249, 238, 0.98) 0%, rgba(247, 234, 214, 0.97) 52%, rgba(238, 219, 191, 0.98) 100%);
  border: 1px solid rgba(36, 22, 15, 0.14);
  box-shadow:
    0 32px 80px rgba(24, 12, 6, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  border-radius: 2px 2px 22px 2px;
  transform: rotate(-0.35deg);
  animation: menu-rise 0.85s cubic-bezier(0.2, 0.76, 0.2, 1) both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.12'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.hero::after {
  content: "LE MENU";
  position: absolute;
  right: 22px;
  top: 20px;
  font-family: var(--font-condensed);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: rgba(36, 22, 15, 0.35);
  writing-mode: vertical-rl;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--font-condensed);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.2;
  color: var(--muted);
  text-transform: uppercase;
}

.eyebrow span {
  width: 22px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--red);
}

.hero__title {
  margin: 12px 0 10px;
  font-family: var(--font-condensed);
  font-size: clamp(6.1rem, 9.3vw, 9.4rem);
  font-weight: 800;
  line-height: 0.7;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.hero__cafe {
  display: block;
  margin-left: -0.06em;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.62em;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.hero__calm {
  display: block;
  margin-top: 0.15em;
  color: var(--red);
  letter-spacing: -0.035em;
  line-height: 0.7;
  text-shadow: 1px 2px 0 rgba(139, 36, 29, 0.18);
}

.hero__dot {
  color: var(--gold);
  font-size: 0.92em;
}

.hero__tag {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 26px);
  margin: 16px 0 18px;
}

.stamp {
  flex: 0 0 auto;
  display: inline-block;
  padding: 8px 11px 7px;
  border: 1.5px solid var(--red);
  color: var(--red-deep);
  font-family: var(--font-condensed);
  font-size: clamp(0.82rem, 1.2vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  transform: rotate(-2.2deg);
  box-shadow: 1px 2px 0 rgba(198, 59, 47, 0.15);
}

.hero__tag p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.35vw, 1.3rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.22;
}

.hero__lede {
  max-width: 48ch;
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: clamp(0.78rem, 0.95vw, 0.9rem);
  line-height: 1.68;
}

.hero__lede b {
  color: var(--ink);
  font-weight: 700;
}

.hero__actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 18px;
}

.play-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 246px;
  padding: 13px 16px 13px 13px;
  color: var(--paper-hi);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 4px 4px 0 var(--red);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.play-btn:hover {
  transform: translate(-1px, -2px);
  background: #150c08;
  box-shadow: 6px 7px 0 var(--red);
}

.play-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--red);
}

.play-btn__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red);
  color: var(--paper-hi);
  font-size: 0.7rem;
  padding-left: 2px;
}

.play-btn__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}

.play-btn__copy b {
  font-family: var(--font-condensed);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

.play-btn__copy em {
  color: rgba(247, 234, 214, 0.58);
  font-family: var(--font-condensed);
  font-size: 0.59rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1;
}

.play-btn__arrow {
  margin-left: auto;
  align-self: flex-start;
  color: var(--gold);
  font-size: 1.05rem;
}

.best {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 120px;
}

.best span,
.best em {
  font-family: var(--font-condensed);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.best b {
  margin: 1px 0;
  font-family: var(--font-condensed);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 0.9;
  color: var(--ink);
}

.best em {
  color: rgba(128, 106, 88, 0.65);
  font-weight: 500;
}

.hero__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero__controls > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero__controls em {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--font-condensed);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.hero__controls-touch {
  display: none !important;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid rgba(36, 22, 15, 0.28);
  border-bottom-width: 2px;
  border-radius: 2px;
  color: var(--ink-soft);
  background: rgba(255, 249, 238, 0.46);
  font-family: var(--font-condensed);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 15px;
  font-family: var(--font-sans);
  font-size: 0.63rem;
  line-height: 1.4;
  color: var(--muted);
}

.sources a {
  text-decoration: underline;
  text-decoration-color: rgba(128, 106, 88, 0.42);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.sources a:hover {
  color: var(--red-deep);
}

.sources .sources__label {
  color: rgba(128, 106, 88, 0.7);
  font-family: var(--font-condensed);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.menu__aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: end;
  padding-bottom: 4px;
  animation: menu-rise 0.95s 0.08s cubic-bezier(0.2, 0.76, 0.2, 1) both;
}

.ticket {
  position: relative;
  padding: 18px 20px 0;
  color: var(--ink);
  background: rgba(247, 234, 214, 0.95);
  border: 1px solid rgba(255, 248, 234, 0.6);
  box-shadow: 0 22px 50px rgba(20, 10, 5, 0.3);
  transform: rotate(0.7deg);
  backdrop-filter: blur(8px);
}

.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b98a73;
}
.ticket::before { top: 58px; }
.ticket::after { bottom: 52px; }

.ticket__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(36, 22, 15, 0.28);
  font-family: var(--font-condensed);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.ticket__head b {
  color: var(--red);
  font-size: 0.72rem;
}

.ticket__rules {
  list-style: none;
  margin: 0;
  padding: 8px 0 2px;
}

.ticket__rules li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(36, 22, 15, 0.1);
}

.ticket__rules > li > b {
  flex: 0 0 auto;
  padding-top: 1px;
  color: var(--red);
  font-family: var(--font-condensed);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 0.9;
}

.ticket__rules h3 {
  margin: 0 0 4px;
  font-family: var(--font-condensed);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.ticket__rules p {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.48;
}

.ticket__rules strong {
  color: var(--ink-soft);
  font-weight: 700;
}

.ticket__perf {
  height: 1px;
  margin-top: 10px;
  background-image: linear-gradient(90deg, rgba(36, 22, 15, 0.32) 50%, transparent 50%);
  background-size: 9px 1px;
}

.ticket__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 0 14px;
  color: rgba(36, 22, 15, 0.55);
  font-family: var(--font-condensed);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.aside-notes {
  padding: 14px 16px 15px;
  color: var(--paper);
  background: rgba(26, 16, 11, 0.8);
  border: 1px solid rgba(247, 234, 214, 0.16);
  backdrop-filter: blur(12px);
}

.aside-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 4px 0;
  color: rgba(247, 234, 214, 0.65);
  font-family: var(--font-condensed);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.11em;
}

.aside-note__num {
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 800;
}

.port-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(247, 234, 214, 0.16);
  color: var(--paper);
  transition: color 0.2s ease;
}

.port-link span {
  color: var(--gold);
  font-family: var(--font-condensed);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.port-link b {
  font-size: 0.72rem;
  font-weight: 500;
}

.port-link i {
  color: var(--gold);
  font-style: normal;
}

.port-link:hover {
  color: var(--gold);
}

.menu__foot {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px clamp(20px, 4vw, 62px) 14px;
  color: rgba(247, 234, 214, 0.62);
  font-family: var(--font-condensed);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 5px rgba(20, 10, 5, 0.6);
}

.menu__foot p {
  margin: 0;
}

.menu__disclaimer {
  max-width: 46ch;
  text-align: right;
  opacity: 0.7;
}

.finder {
  position: absolute;
  z-index: 1;
  top: 116px;
  right: 20px;
  bottom: 72px;
  left: 55%;
  pointer-events: none;
  border: 1px solid rgba(255, 243, 223, 0.16);
  opacity: 0.9;
}

.finder__corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(255, 243, 223, 0.75);
  border-style: solid;
}

.finder__corner--tl { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.finder__corner--tr { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.finder__corner--bl { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.finder__corner--br { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.finder__rec {
  position: absolute;
  top: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 243, 223, 0.75);
  font-family: var(--font-condensed);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.finder__rec i,
.rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(198, 59, 47, 0.16);
  animation: rec-pulse 1.4s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.finder__side {
  position: absolute;
  right: 10px;
  bottom: 14px;
  color: rgba(255, 243, 223, 0.5);
  font-family: var(--font-condensed);
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
}

@keyframes menu-rise {
  from { opacity: 0; transform: translateY(18px) rotate(-0.35deg); }
  to { opacity: 1; transform: translateY(0) rotate(-0.35deg); }
}

.menu__aside {
  animation-name: menu-rise-aside;
}
@keyframes menu-rise-aside {
  from { opacity: 0; transform: translateY(18px) rotate(0.7deg); }
  to { opacity: 1; transform: translateY(0) rotate(0.7deg); }
}

/* ============================== hud ============================== */

.hud {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  color: var(--paper);
  padding: max(16px, env(safe-area-inset-top)) clamp(14px, 2.4vw, 34px) max(16px, env(safe-area-inset-bottom));
  opacity: 1;
  transition: opacity 0.35s ease;
}

.hud.is-hidden {
  display: none !important;
}

.hud__top {
  display: grid;
  grid-template-columns: 1fr minmax(210px, 340px) 1fr;
  align-items: start;
  gap: 24px;
}

.hud__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 3px;
  text-shadow: 0 2px 18px rgba(20, 10, 5, 0.5);
}

.brand__cup--small {
  width: 23px;
  height: 23px;
  color: var(--paper);
  filter: drop-shadow(0 1px 6px rgba(20, 10, 5, 0.5));
}

.hud__brand-type {
  font-family: var(--font-condensed);
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.hud__brand-type b {
  color: var(--gold);
}

.take-clock {
  padding-top: 2px;
  text-align: center;
}

.take-clock__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.take-clock__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(247, 234, 214, 0.7);
  font-family: var(--font-condensed);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.take-clock__meta b {
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(1.5rem, 2.3vw, 2.05rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 16px rgba(20, 10, 5, 0.5);
}

.take-clock__track,
.calm-track {
  position: relative;
  overflow: hidden;
  height: 5px;
  background: rgba(20, 12, 8, 0.48);
  border: 1px solid rgba(247, 234, 214, 0.15);
}

.take-clock__track {
  margin-top: 8px;
}

.take-clock__meta b.is-low {
  color: #ff9a7f;
}

.take-clock__track i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--red) 100%);
  transform-origin: left center;
  transition: transform 0.25s linear;
}

.hud__tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.hud-tool {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 8px 10px;
  color: rgba(247, 234, 214, 0.72);
  background: rgba(24, 15, 11, 0.32);
  border: 1px solid rgba(247, 234, 214, 0.18);
  backdrop-filter: blur(8px);
  font-family: var(--font-condensed);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hud-tool:hover {
  color: var(--paper);
  background: rgba(24, 15, 11, 0.6);
  border-color: rgba(247, 234, 214, 0.38);
}

.pause-glyph {
  display: inline-block;
  color: var(--gold);
  font-size: 0.74rem;
  letter-spacing: -0.12em;
}

.hud-act {
  position: absolute;
  top: 84px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  color: rgba(247, 234, 214, 0.68);
  background: rgba(24, 15, 11, 0.36);
  border: 1px solid rgba(247, 234, 214, 0.12);
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
  font-family: var(--font-condensed);
  font-size: 0.57rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.hud-act span {
  color: var(--gold);
  font-weight: 700;
}

.hud-act b {
  font-weight: 500;
}

.hud__side {
  position: absolute;
  top: 132px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: clamp(170px, 15vw, 214px);
}

.hud__side--left {
  left: clamp(14px, 2.4vw, 34px);
}

.hud__side--right {
  right: clamp(14px, 2.4vw, 34px);
  align-items: stretch;
}

.stat-panel {
  position: relative;
  padding: 11px 13px 10px;
  color: var(--paper);
  background: rgba(24, 15, 11, 0.66);
  border: 1px solid rgba(247, 234, 214, 0.16);
  box-shadow: 0 12px 30px rgba(20, 10, 5, 0.14);
  backdrop-filter: blur(14px);
}

.stat-panel__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stat-panel__top > span,
.stat-panel > span {
  color: rgba(247, 234, 214, 0.6);
  font-family: var(--font-condensed);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.stat-panel__top b {
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}

.calm-track {
  margin: 9px 0 7px;
  height: 6px;
}

.calm-track i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, #e8894d 55%, var(--red) 100%);
  transform-origin: left center;
  transition: transform 0.2s ease;
}

.calm-panel.is-low .calm-track i {
  animation: low-pulse 0.8s ease-in-out infinite;
}

.calm-panel.is-low .stat-panel__top b {
  color: #ff8c70;
}

@keyframes low-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.38; }
}

.stat-panel__foot {
  margin: 0;
  color: rgba(247, 234, 214, 0.42);
  font-family: var(--font-condensed);
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.calm-panel.is-low .stat-panel__foot {
  color: #ff9e86;
}

.aura-panel .stat-panel__top b {
  color: var(--gold);
}

.aura-pips {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin: 10px 0 8px;
}

.aura-pips i {
  display: block;
  height: 6px;
  background: rgba(247, 234, 214, 0.16);
  transform: skewX(-14deg);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.aura-pips i.is-on {
  background: var(--gold);
  box-shadow: 0 0 9px rgba(232, 180, 76, 0.45);
}

.views-panel {
  padding: 11px 13px 12px;
  text-align: right;
}

.views-panel > span {
  display: block;
  margin-bottom: 2px;
}

.views-panel > b {
  display: block;
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(2.1rem, 3.4vw, 2.9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.views-panel > em {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-family: var(--font-condensed);
  font-size: 0.63rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.peak-panel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.peak-panel > b {
  color: var(--gold);
  font-family: var(--font-condensed);
  font-size: 1.1rem;
  font-weight: 800;
}

.views-pop {
  position: absolute;
  right: 14px;
  top: 10px;
  color: var(--gold);
  font-family: var(--font-condensed);
  font-size: 0.95rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
}

.views-pop.is-pop {
  animation: views-pop 0.9s ease-out;
}

@keyframes views-pop {
  0% { opacity: 0; transform: translateY(8px); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-18px); }
}

.hud__center {
  position: absolute;
  left: 50%;
  bottom: 25%;
  width: min(560px, 72vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.prompt {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  color: var(--paper);
  background: rgba(24, 15, 11, 0.72);
  border: 1px solid rgba(247, 234, 214, 0.26);
  box-shadow: 0 8px 30px rgba(20, 10, 5, 0.22);
  backdrop-filter: blur(12px);
  font-family: var(--font-condensed);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.prompt kbd {
  min-width: 22px;
  height: 22px;
  border-color: rgba(247, 234, 214, 0.5);
  color: var(--paper);
  background: rgba(247, 234, 214, 0.1);
  font-size: 0.72rem;
}

.prompt span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.prompt em {
  color: var(--gold);
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.prompt.is-hidden {
  opacity: 0;
  transform: translateY(6px);
}

.callout {
  min-height: 1.2em;
  color: var(--gold);
  font-family: var(--font-condensed);
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 18px rgba(20, 10, 5, 0.62);
  opacity: 0;
  transform: translateY(6px);
}

.callout.is-showing {
  animation: callout-in 0.28s ease-out both;
}

.callout.callout--hit {
  color: #ff9279;
}

.callout small {
  display: block;
  margin-top: 5px;
  color: rgba(247, 234, 214, 0.72);
  font-family: var(--font-sans);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

@keyframes callout-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ticker {
  position: absolute;
  left: 50%;
  bottom: 57px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(760px, 80vw);
  padding: 6px 10px;
  transform: translateX(-50%);
  color: rgba(247, 234, 214, 0.64);
  background: rgba(24, 15, 11, 0.3);
  border-top: 1px solid rgba(247, 234, 214, 0.12);
  border-bottom: 1px solid rgba(247, 234, 214, 0.12);
  font-family: var(--font-condensed);
  font-size: 0.59rem;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.ticker__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
  font-weight: 700;
}

.ticker__live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: rec-pulse 1.4s ease-in-out infinite;
}

.ticker p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}

.ticker__credit {
  color: rgba(247, 234, 214, 0.34);
  font-size: 0.52rem;
}

.hud__hints {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 13px;
  transform: translateX(-50%);
  color: rgba(247, 234, 214, 0.5);
  font-family: var(--font-condensed);
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.hud__hints span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hud__hints kbd {
  border-color: rgba(247, 234, 214, 0.24);
  color: rgba(247, 234, 214, 0.74);
  background: rgba(24, 15, 11, 0.3);
}

.toast-stack {
  position: absolute;
  right: clamp(14px, 2.4vw, 34px);
  bottom: 122px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.toast {
  padding: 7px 10px;
  color: var(--paper);
  background: rgba(24, 15, 11, 0.68);
  border-left: 2px solid var(--gold);
  font-family: var(--font-condensed);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  animation: toast-in 0.22s ease-out both;
}

.toast--gold {
  border-left-color: var(--gold);
  color: var(--gold-soft);
}

.toast.is-out {
  animation: toast-out 0.28s ease-in both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(8px); }
}

.hud__hurt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(158, 29, 18, 0.62) 100%),
    linear-gradient(0deg, rgba(158, 29, 18, 0.28), transparent 45%);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.hud__hurt.is-hurt {
  opacity: 1;
  transition: opacity 0.06s ease;
}

.hud__warmth {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 54%, transparent 38%, rgba(58, 26, 12, 0.18) 100%);
}

.touch-ui {
  display: none;
}

.act-curtain {
  position: absolute;
  inset: 0;
  z-index: 36;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--paper);
  background:
    linear-gradient(180deg, transparent 22%, rgba(24, 15, 11, 0.48) 38%, rgba(24, 15, 11, 0.48) 62%, transparent 78%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.act-curtain.is-showing {
  visibility: visible;
  animation: curtain 2.45s ease both;
}

.act-curtain p {
  margin: 0;
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.act-curtain h2 {
  margin: 0;
  padding: 14px 30px 11px;
  border-top: 1px solid rgba(247, 234, 214, 0.35);
  border-bottom: 1px solid rgba(247, 234, 214, 0.35);
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(2.3rem, 5.2vw, 4.6rem);
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 0.9;
  text-align: center;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

.act-curtain p:last-child {
  color: rgba(247, 234, 214, 0.7);
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
}

@keyframes curtain {
  0% { opacity: 0; transform: translateY(5px); }
  12% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================== pause ============================== */

.pause {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 10, 7, 0.58);
  backdrop-filter: blur(14px);
}

.pause__card {
  width: min(430px, 100%);
  padding: 30px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 249, 238, 0.98), rgba(240, 221, 192, 0.98));
  border: 1px solid rgba(255, 248, 234, 0.7);
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  animation: card-in 0.32s cubic-bezier(0.2, 0.76, 0.2, 1) both;
}

.pause__card h2 {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.pause__copy {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.pause__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pause__hint {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--font-condensed);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

/* ============================== buttons ============================== */

.solid-btn,
.ghost-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 11px 16px;
  border-radius: 2px;
  font-family: var(--font-condensed);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.solid-btn {
  color: var(--paper-hi);
  background: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--red);
}

.solid-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--red);
}

.solid-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--red);
}

.solid-btn--big {
  min-height: 48px;
  padding: 13px 20px;
  font-size: 0.9rem;
}

.solid-btn--big span {
  color: var(--gold);
  font-size: 1rem;
}

.ghost-btn {
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(36, 22, 15, 0.3);
}

.ghost-btn:hover {
  background: rgba(36, 22, 15, 0.06);
  border-color: rgba(36, 22, 15, 0.55);
}

.text-btn {
  min-height: 42px;
  padding: 10px 4px;
  color: var(--muted);
  background: none;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(128, 106, 88, 0.35);
  text-underline-offset: 4px;
}

.text-btn:hover {
  color: var(--red-deep);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ============================== end ============================== */

.end {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(36, 22, 15, 0.2), rgba(17, 10, 7, 0.7) 70%);
  backdrop-filter: blur(8px);
}

.end__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.8;
}

.end__confetti::before,
.end__confetti::after {
  content: "";
  position: absolute;
  top: -20%;
  left: 15%;
  width: 7px;
  height: 18px;
  background: var(--gold);
  box-shadow:
    18vw 4vh 0 -1px var(--red),
    31vw 14vh 0 0 var(--paper),
    46vw 1vh 0 1px var(--gold),
    61vw 17vh 0 0 var(--coral),
    76vw 5vh 0 -1px var(--paper);
  transform: rotate(24deg);
  animation: confetti-fall 5s linear infinite;
}

.end__confetti::after {
  left: 8%;
  top: -10%;
  background: var(--paper);
  box-shadow:
    22vw 10vh 0 0 var(--coral),
    38vw 22vh 0 1px var(--gold),
    55vw 9vh 0 0 var(--red),
    68vw 25vh 0 -1px var(--paper),
    82vw 12vh 0 0 var(--gold);
  animation-duration: 7s;
  animation-delay: -2.3s;
}

@keyframes confetti-fall {
  to { transform: translateY(115vh) rotate(390deg); }
}

.end--lost .end__confetti {
  display: none;
}

.end__card {
  position: relative;
  z-index: 1;
  width: min(650px, 100%);
  margin: auto;
  padding: clamp(24px, 4vw, 38px);
  color: var(--ink);
  background:
    linear-gradient(138deg, rgba(255, 250, 240, 0.99), rgba(245, 231, 211, 0.99));
  border: 1px solid rgba(255, 248, 234, 0.8);
  border-radius: 2px;
  box-shadow: 0 38px 100px rgba(13, 6, 3, 0.55);
  animation: card-in 0.45s cubic-bezier(0.2, 0.76, 0.2, 1) both;
}

.end__card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 64%, var(--gold) 64%, var(--gold) 100%);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.end__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.grade {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  margin-top: -4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  transform: rotate(7deg);
}

.grade span {
  font-family: var(--font-condensed);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 0.8;
}

.grade em {
  font-family: var(--font-condensed);
  font-size: 0.46rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.end--lost .grade {
  border-color: var(--muted);
  color: var(--muted);
}

.end__card h2 {
  margin: 16px 0 8px;
  font-family: var(--font-condensed);
  font-size: clamp(3.2rem, 8vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.82;
}

.end--lost .end__card h2 {
  color: var(--red-deep);
}

.end__sub {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.4;
}

.end__views {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  margin: 22px 0 0;
  color: var(--paper);
  background: var(--ink);
}

.end__views > div {
  padding: 14px 16px;
}

.end__views > div + div {
  border-left: 1px solid rgba(247, 234, 214, 0.16);
}

.end__views span {
  display: block;
  color: rgba(247, 234, 214, 0.48);
  font-family: var(--font-condensed);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.end__views b {
  display: block;
  margin-top: 2px;
  color: var(--paper);
  font-family: var(--font-condensed);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 800;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.end__rank b {
  color: var(--gold);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  line-height: 1.05;
}

.end__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.end__stats > div {
  padding: 12px 11px;
}

.end__stats > div + div {
  border-left: 1px solid var(--line);
}

.end__stats span {
  display: block;
  color: var(--muted);
  font-family: var(--font-condensed);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.end__stats b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-family: var(--font-condensed);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.end__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
}

.end__actions .text-btn {
  margin-left: auto;
}

.end__source {
  margin: 18px 0 0;
  color: rgba(128, 106, 88, 0.7);
  font-family: var(--font-condensed);
  font-size: 0.53rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.end__strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  width: min(650px, 100%);
  color: rgba(247, 234, 214, 0.42);
  font-family: var(--font-condensed);
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

/* ============================== responsive ============================== */

@media (max-width: 1200px) {
  .menu__layout {
    grid-template-columns: minmax(420px, 590px) minmax(230px, 300px);
    gap: 28px;
  }
  .finder {
    left: 60%;
  }
  .hero__title {
    font-size: clamp(5.7rem, 9vw, 8.4rem);
  }
}

@media (max-width: 980px) {
  .topbar {
    padding-top: 16px;
    padding-bottom: 12px;
  }
  .build-tag,
  .meme-pill {
    display: none;
  }
  .menu__layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding-top: 6px;
    padding-bottom: 16px;
  }
  .hero {
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    transform: none;
    animation-name: menu-rise-mobile;
  }
  @keyframes menu-rise-mobile {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .menu__aside {
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 12px;
    padding-bottom: 0;
    animation-name: menu-rise-mobile;
  }
  .ticket {
    transform: none;
  }
  .aside-notes {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .menu__foot {
    flex-direction: column;
    gap: 4px;
    padding-top: 6px;
  }
  .menu__disclaimer {
    text-align: left;
  }
  .finder {
    display: none;
  }
  .hud__top {
    grid-template-columns: 1fr minmax(160px, 240px) 1fr;
    gap: 10px;
  }
  .hud__brand-type {
    font-size: 1.2rem;
  }
  .hud__side {
    top: 118px;
  }
}

@media (max-width: 680px) {
  .menu {
    background: linear-gradient(0deg, rgba(18, 11, 7, 0.5) 0%, transparent 30%);
  }
  .topbar {
    padding: 12px 14px 10px;
  }
  .brand__type {
    font-size: 1.15rem;
  }
  .brand__city {
    display: none;
  }
  .menu__layout {
    padding: 4px 12px 12px;
  }
  .hero {
    padding: 20px 18px 18px;
    border-radius: 2px 2px 16px 2px;
  }
  .hero::after {
    display: none;
  }
  .hero__title {
    font-size: clamp(5.2rem, 25vw, 7.2rem);
    margin-top: 10px;
  }
  .hero__tag {
    flex-wrap: wrap;
    gap: 10px;
    margin: 13px 0 14px;
  }
  .hero__tag p {
    font-size: 0.94rem;
  }
  .stamp {
    font-size: 0.8rem;
  }
  .hero__lede {
    font-size: 0.76rem;
    line-height: 1.58;
    margin-bottom: 16px;
  }
  .hero__actions {
    gap: 12px;
  }
  .play-btn {
    min-width: 0;
    flex: 1 1 100%;
  }
  .best {
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
  }
  .best span,
  .best em {
    font-size: 0.53rem;
  }
  .best b {
    font-size: 1.3rem;
  }
  .hero__controls {
    gap: 7px 11px;
    margin-top: 15px;
    padding-top: 13px;
  }
  .hero__controls > span:nth-child(4) {
    display: none;
  }
  .hero__controls-touch {
    display: inline-flex !important;
  }
  .hero__controls-touch kbd {
    min-width: 22px;
  }
  .sources {
    font-size: 0.58rem;
  }
  .menu__aside {
    grid-template-columns: 1fr;
  }
  .aside-notes {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2px 14px;
    padding: 11px 13px;
  }
  .aside-note {
    padding: 2px 0;
  }
  .port-link {
    width: 100%;
    margin-top: 6px;
    padding-top: 8px;
  }
  .ticket {
    padding: 15px 16px 0;
  }
  .ticket__rules li {
    padding: 8px 0;
  }
  .menu__foot {
    padding: 8px 14px max(12px, env(safe-area-inset-bottom));
    font-size: 0.48rem;
  }
  .menu__foot > p:first-child {
    display: none;
  }
  .meme-pill {
    display: inline-flex;
  }
  .topbar__right {
    display: none;
  }

  .hud {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  }
  .hud__top {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
  }
  .hud__brand {
    gap: 5px;
    padding: 0;
  }
  .brand__cup--small {
    width: 18px;
    height: 18px;
  }
  .hud__brand-type {
    font-size: 0.92rem;
    letter-spacing: 0;
  }
  .hud__brand-type {
    font-size: 0.82rem;
  }
  .hud__brand-type b {
    display: inline;
  }
  .take-clock {
    text-align: center;
  }
  .take-clock__meta {
    justify-content: center;
    gap: 8px;
  }
  .take-clock__meta > span {
    display: none;
  }
  .take-clock__meta b {
    font-size: 1.15rem;
  }
  .take-clock__track {
    margin-top: 5px;
    height: 4px;
  }
  .hud__tools {
    gap: 4px;
    padding: 0;
  }
  .hud-tool {
    min-height: 26px;
    padding: 6px 7px;
    font-size: 0.5rem;
    letter-spacing: 0.06em;
    background: rgba(24, 15, 11, 0.48);
  }
  .hud-tool--pause span {
    display: none;
  }
  .hud-act {
    top: 51px;
    padding: 3px 8px;
    font-size: 0.48rem;
    letter-spacing: 0.08em;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hud__side {
    top: 82px;
    width: 40vw;
    max-width: 154px;
    gap: 6px;
  }
  .hud__side--left {
    left: 10px;
  }
  .hud__side--right {
    right: 10px;
  }
  .stat-panel {
    padding: 8px 9px 7px;
    background: rgba(24, 15, 11, 0.58);
  }
  .stat-panel__top > span,
  .stat-panel > span {
    font-size: 0.48rem;
    letter-spacing: 0.1em;
  }
  .stat-panel__top b {
    font-size: 1.25rem;
  }
  .calm-track {
    margin: 7px 0 5px;
    height: 5px;
  }
  .stat-panel__foot {
    font-size: 0.42rem;
    letter-spacing: 0.07em;
  }
  .aura-pips {
    gap: 2px;
    margin: 7px 0 6px;
  }
  .aura-pips i {
    height: 4px;
  }
  .views-panel {
    padding: 8px 9px 9px;
  }
  .views-panel > b {
    font-size: 1.7rem;
  }
  .views-panel > em {
    font-size: 0.5rem;
    margin-top: 3px;
  }
  .peak-panel {
    padding: 7px 9px;
  }
  .peak-panel > b {
    font-size: 0.9rem;
  }
  .hud__center {
    bottom: 184px;
    width: calc(100vw - 28px);
    gap: 6px;
  }
  .prompt {
    padding: 6px 9px;
    gap: 6px;
  }
  .prompt span {
    font-size: 0.7rem;
  }
  .prompt em {
    display: none;
  }
  .prompt kbd {
    display: none;
  }
  .prompt::before {
    content: "☕";
    font-size: 0.82rem;
  }
  .callout {
    font-size: 1.45rem;
  }
  .callout small {
    font-size: 0.56rem;
  }
  .ticker,
  .hud__hints {
    display: none;
  }
  .toast-stack {
    right: 10px;
    bottom: 172px;
    max-width: 56vw;
  }
  .toast {
    font-size: 0.56rem;
  }
  .touch-ui {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: max(34px, env(safe-area-inset-bottom));
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    pointer-events: none;
  }
  .joystick {
    position: relative;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    border: 1px solid rgba(247, 234, 214, 0.28);
    background:
      radial-gradient(circle at 50% 50%, rgba(247, 234, 214, 0.08) 0%, rgba(24, 15, 11, 0.45) 64%, rgba(24, 15, 11, 0.22) 100%);
    backdrop-filter: blur(8px);
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }
  .joystick::after {
    content: "MOVE";
    position: absolute;
    left: 50%;
    bottom: -17px;
    transform: translateX(-50%);
    color: rgba(247, 234, 214, 0.48);
    font-family: var(--font-condensed);
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.16em;
  }
  .joystick__cross::before,
  .joystick__cross::after {
    content: "";
    position: absolute;
    background: rgba(247, 234, 214, 0.15);
  }
  .joystick__cross::before {
    left: 50%;
    top: 16px;
    bottom: 16px;
    width: 1px;
  }
  .joystick__cross::after {
    top: 50%;
    left: 16px;
    right: 16px;
    height: 1px;
  }
  .joystick__knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    border: 1px solid rgba(247, 234, 214, 0.62);
    background: rgba(247, 234, 214, 0.14);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.04s linear;
  }
  .joystick.is-active .joystick__knob {
    background: rgba(232, 180, 76, 0.42);
    border-color: var(--gold);
  }
  .touch-ui__actions {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    pointer-events: none;
  }
  .touch-btn {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.08s ease, background 0.12s ease;
  }
  .touch-btn:active,
  .touch-btn.is-pressed {
    transform: scale(0.94);
  }
  .touch-btn b {
    font-family: var(--font-condensed);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    line-height: 1;
  }
  .touch-btn em {
    margin-top: 2px;
    font-style: normal;
    font-size: 0.86rem;
    line-height: 1;
  }
  .touch-btn--jump {
    width: 62px;
    height: 62px;
    color: rgba(247, 234, 214, 0.82);
    border: 1px solid rgba(247, 234, 214, 0.3);
    background: rgba(24, 15, 11, 0.4);
    backdrop-filter: blur(8px);
  }
  .touch-btn--sip {
    width: 82px;
    height: 82px;
    color: var(--ink);
    background: var(--gold);
    border: 1px solid rgba(255, 248, 226, 0.58);
    box-shadow: 0 4px 0 var(--red-deep);
  }
  .touch-btn--sip em {
    font-size: 1.05rem;
  }
  .touch-btn--sip b {
    font-size: 0.55rem;
  }

  .end {
    padding: 12px;
    justify-content: flex-start;
  }
  .end__card {
    padding: 22px 18px;
  }
  .end__card h2 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }
  .end__sub {
    font-size: 0.84rem;
  }
  .grade {
    width: 62px;
    height: 62px;
  }
  .grade span {
    font-size: 1.9rem;
  }
  .end__views {
    margin-top: 16px;
  }
  .end__views > div {
    padding: 11px 12px;
  }
  .end__views b {
    font-size: 1.7rem;
  }
  .end__stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .end__stats > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .end__stats > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .end__stats b {
    font-size: 1.25rem;
  }
  .end__actions {
    gap: 7px;
  }
  .end__actions .solid-btn--big {
    flex: 1 1 100%;
  }
  .end__actions .text-btn {
    margin-left: 0;
  }
  .end__strip {
    font-size: 0.46rem;
    gap: 5px 12px;
    padding: 8px 0;
  }
  .act-curtain h2 {
    font-size: clamp(1.9rem, 9.5vw, 3rem);
    padding: 9px 14px 7px;
  }
  .pause__card {
    padding: 24px 20px;
  }
  .pause__actions {
    flex-direction: column;
  }
  .pause__actions .solid-btn,
  .pause__actions .ghost-btn {
    width: 100%;
  }
}

@media (max-height: 760px) and (min-width: 981px) {
  .topbar {
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .menu__layout {
    padding-top: 4px;
    padding-bottom: 10px;
  }
  .hero {
    padding: 22px 28px;
  }
  .hero__title {
    font-size: clamp(5.2rem, 8vw, 7.4rem);
  }
  .hero__tag {
    margin: 11px 0 13px;
  }
  .hero__controls {
    margin-top: 13px;
    padding-top: 12px;
  }
  .sources {
    margin-top: 10px;
  }
  .ticket__rules li {
    padding: 7px 0;
  }
  .menu__foot {
    padding-bottom: 8px;
  }
}

@media (hover: none) and (pointer: coarse) and (min-width: 681px) {
  .hud__hints {
    display: none;
  }
  .touch-ui {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
  }
  .joystick {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    pointer-events: auto;
    border: 1px solid rgba(247, 234, 214, 0.3);
    background: rgba(24, 15, 11, 0.4);
    touch-action: none;
    overflow: visible;
  }
  .joystick::after {
    content: "MOVE";
    position: absolute;
    left: 50%;
    bottom: -17px;
    transform: translateX(-50%);
    color: rgba(247, 234, 214, 0.48);
    font-family: var(--font-condensed);
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.16em;
  }
  .joystick__knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    border: 1px solid rgba(247, 234, 214, 0.6);
    background: rgba(247, 234, 214, 0.12);
  }
  .touch-ui__actions {
    display: flex;
    gap: 10px;
    pointer-events: none;
  }
  .touch-btn {
    pointer-events: auto;
    border-radius: 50%;
  }
  .touch-btn--jump {
    width: 68px;
    height: 68px;
    border: 1px solid rgba(247, 234, 214, 0.3);
    background: rgba(24, 15, 11, 0.4);
    color: var(--paper);
  }
  .touch-btn--sip {
    width: 88px;
    height: 88px;
    color: var(--ink);
    background: var(--gold);
  }
  .touch-btn b,
  .touch-btn em {
    display: block;
    text-align: center;
    font-family: var(--font-condensed);
    font-style: normal;
    line-height: 1.1;
  }
  .touch-btn b {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
  }
  .touch-btn em {
    font-size: 1rem;
  }
  .touch-btn--sip b {
    font-size: 0.58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* Touch devices: keep the HUD crisp and avoid per-panel backdrop passes. */
@media (hover: none) and (pointer: coarse) {
  .stat-panel,
  .hud-tool,
  .prompt,
  .ticker,
  .toast,
  .hud-act {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .stat-panel {
    background: rgba(24, 15, 11, 0.84);
  }
  .prompt,
  .hud-tool,
  .ticker,
  .hud-act,
  .toast {
    background: rgba(24, 15, 11, 0.8);
  }
}
