:root {
  --bg: #e7e1d8;
  --paper: #fbf7f1;
  --paper-2: #f2ece5;
  --ink: #18252c;
  --muted: #68747c;
  --line: rgba(24, 37, 44, 0.12);
  --shadow: 0 26px 90px rgba(31, 42, 52, 0.15);
  --box-red: #d95c52;
  --box-orange: #e28f38;
  --box-yellow: #d8bd47;
  --box-green: #4eaf66;
  --box-cyan: #37b1bf;
  --box-blue: #5277d4;
  --box-violet: #8e5ccf;
  --danger: #d75454;
  --gold: #c59b43;
  --tile: #f6f2eb;
  --lane: rgba(255, 255, 255, 0.84);
  --counter-top: #cba786;
  --counter-face: #9e6847;
  --counter-trim: #68422e;
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shell-pad-x: clamp(12px, 2.6vw, 18px);
  --shell-pad-y: clamp(14px, 2.6vw, 18px);
  --panel-pad: clamp(16px, 2.4vw, 28px);
  --panel-radius: clamp(28px, 3vw, 40px);
  --stage-min-h: clamp(640px, 82svh, 780px);
  --stage-radius: clamp(28px, 2.8vw, 34px);
  --queue-gap: clamp(10px, 1.4vw, 14px);
  --queue-pad-top: clamp(56px, 8vw, 78px);
  --queue-pad-x: clamp(12px, 1.8vw, 22px);
  --queue-pad-bottom: clamp(14px, 1.8vw, 22px);
  --board-max-w: 580px;
  --board-pad: clamp(14px, 1.6vw, 18px);
  --board-radius: clamp(26px, 2.6vw, 32px);
  --board-gap: clamp(8px, 1vw, 12px);
  --board-lane-offset: clamp(10px, 1.1vw, 12px);
  --board-lane-width: clamp(7px, 0.8vw, 9px);
  --cell-radius: clamp(20px, 2vw, 24px);
  --cell-inner-inset: clamp(8px, 1vw, 10px);
  --cell-inner-radius: clamp(16px, 1.6vw, 18px);
  --customer-scale: 1;
  --scene-dialogue-max-w: 420px;
  --scene-dialogue-gap: 24px;
  --scene-dialogue-pad-x: clamp(14px, 1.4vw, 18px);
  --scene-dialogue-pad-top: clamp(12px, 1.2vw, 14px);
  --scene-dialogue-pad-bottom: clamp(14px, 1.3vw, 16px);
  --scene-dialogue-radius: clamp(20px, 2vw, 24px);
  --scene-dialogue-font: clamp(1.08rem, 2vw, 1.8rem);
  --cat-dialogue-width: clamp(156px, 18vw, 190px);
  --cat-dialogue-top: -36px;
  --cat-dialogue-pad-x: clamp(10px, 1vw, 12px);
  --cat-dialogue-pad-top: clamp(8px, 1vw, 10px);
  --cat-dialogue-pad-bottom: clamp(10px, 1vw, 12px);
  --cat-dialogue-font: clamp(0.82rem, 0.95vw, 0.94rem);
  --counter-max-w: 700px;
  --counter-top-pad: clamp(28px, 4vw, 42px);
  --counter-left-col: clamp(84px, 10vw, 120px);
  --counter-center-min: clamp(170px, 30vw, 340px);
  --counter-right-col: clamp(72px, 8vw, 100px);
  --counter-gap: clamp(10px, 1.6vw, 18px);
  --counter-min-h: clamp(184px, 28vw, 230px);
  --counter-pad-top: clamp(22px, 2vw, 28px);
  --counter-pad-x: clamp(14px, 2vw, 26px);
  --counter-pad-bottom: clamp(16px, 2vw, 26px);
  --active-order-min-h: clamp(132px, 20vw, 176px);
  --active-order-pad-top: clamp(8px, 1vw, 10px);
  --active-order-pad-bottom: clamp(22px, 2vw, 30px);
  --active-order-badge-w: clamp(126px, 17vw, 176px);
  --active-order-badge-h: clamp(104px, 14vw, 140px);
  --active-order-symbol-size: clamp(108px, 14vw, 146px);
  --score-clock-min-h: clamp(122px, 16vw, 152px);
  --score-clock-case-min-h: clamp(96px, 14vw, 126px);
  --score-clock-font: clamp(1.56rem, 2.2vw, 2.18rem);
  --score-clock-font-compact: clamp(1.2rem, 1.7vw, 1.7rem);
  --score-clock-font-tight: clamp(1.06rem, 1.45vw, 1.42rem);
  --score-clock-font-ultra: clamp(0.92rem, 1.25vw, 1.18rem);
  --speaker-min-h: clamp(96px, 14vw, 126px);
  --font-head: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  --font-body: "Manrope", "Avenir Next", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html[data-platform="yandex"],
html[data-platform="yandex"] body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(circle at top left, rgba(78, 175, 102, 0.12), transparent 20%),
    radial-gradient(circle at bottom right, rgba(82, 119, 212, 0.12), transparent 28%),
    linear-gradient(180deg, #f0ece6 0%, #e5ddd3 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

body.platform-yandex {
  overflow: hidden;
  overscroll-behavior: none;
  position: fixed;
  inset: 0;
  width: 100%;
  --shell-pad-x: clamp(8px, 1.2vw, 12px);
  --shell-pad-y: clamp(8px, 1.2vw, 12px);
  --panel-pad: clamp(10px, 1.4vw, 14px);
  --panel-radius: clamp(20px, 2.2vw, 24px);
  --stage-min-h: clamp(480px, calc(100dvh - 128px), 660px);
  --queue-gap: clamp(6px, 0.8vw, 10px);
  --queue-pad-top: clamp(24px, 3.6dvh, 36px);
  --queue-pad-x: clamp(8px, 1vw, 14px);
  --queue-pad-bottom: clamp(8px, 1.2dvh, 14px);
  --board-max-w: clamp(296px, min(42dvh, 34vw), 396px);
  --board-pad: clamp(8px, 0.9vw, 12px);
  --board-gap: clamp(5px, 0.65vw, 8px);
  --board-lane-offset: clamp(8px, 0.9vw, 10px);
  --board-lane-width: clamp(6px, 0.65vw, 8px);
  --scene-dialogue-max-w: clamp(300px, 28vw, 340px);
  --scene-dialogue-gap: 14px;
  --scene-dialogue-font: clamp(0.94rem, 1.2vw, 1.18rem);
  --cat-dialogue-width: clamp(150px, 16vw, 182px);
  --cat-dialogue-top: -26px;
  --counter-max-w: clamp(360px, min(56dvh, 46vw), 520px);
  --counter-top-pad: clamp(14px, 1.8dvh, 20px);
  --counter-left-col: clamp(82px, 10dvh, 104px);
  --counter-center-min: clamp(156px, 22dvh, 232px);
  --counter-right-col: clamp(64px, 7.5dvh, 84px);
  --counter-gap: clamp(6px, 0.8vw, 10px);
  --counter-min-h: clamp(134px, 17.5dvh, 184px);
  --counter-pad-top: clamp(12px, 1.2dvh, 16px);
  --counter-pad-x: clamp(8px, 0.9vw, 12px);
  --counter-pad-bottom: clamp(10px, 1.2dvh, 14px);
  --active-order-min-h: clamp(92px, 12dvh, 126px);
  --active-order-pad-top: clamp(4px, 0.5dvh, 6px);
  --active-order-pad-bottom: clamp(8px, 1dvh, 12px);
  --active-order-badge-w: clamp(84px, 10.5dvh, 110px);
  --active-order-badge-h: clamp(70px, 8.8dvh, 92px);
  --active-order-symbol-size: clamp(74px, 9.5dvh, 98px);
  --score-clock-min-h: clamp(94px, 11dvh, 118px);
  --score-clock-case-min-h: clamp(74px, 8.6dvh, 96px);
  --score-clock-font: clamp(1.18rem, 1.5vw, 1.66rem);
  --score-clock-font-compact: clamp(0.96rem, 1.15vw, 1.22rem);
  --score-clock-font-tight: clamp(0.82rem, 0.98vw, 1.04rem);
  --score-clock-font-ultra: clamp(0.72rem, 0.86vw, 0.9rem);
  --speaker-min-h: clamp(84px, 9.8dvh, 104px);
}

body.overlay-open {
  overflow: hidden;
  overscroll-behavior: none;
}

button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: max(var(--shell-pad-y), env(safe-area-inset-top)) var(--shell-pad-x)
    max(var(--shell-pad-y), env(safe-area-inset-bottom));
}

body.platform-yandex .app-shell {
  height: 100dvh;
  min-height: 100dvh;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.45;
  pointer-events: none;
}

.ambient-left {
  top: 4%;
  left: -80px;
  width: 260px;
  height: 260px;
  background: rgba(78, 175, 102, 0.16);
}

.ambient-right {
  right: -90px;
  bottom: 10%;
  width: 340px;
  height: 340px;
  background: rgba(82, 119, 212, 0.14);
}

.game-layout {
  position: relative;
  z-index: 1;
  width: min(100%, 1320px);
  margin: 0 auto;
}

.game-panel,
.overlay-card {
  background: rgba(251, 247, 241, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.game-panel {
  padding: var(--panel-pad);
  border-radius: var(--panel-radius);
}

body.platform-yandex .game-panel {
  display: flex;
  height: calc(
    100dvh - max(var(--shell-pad-y), env(safe-area-inset-top)) -
      max(var(--shell-pad-y), env(safe-area-inset-bottom))
  );
  min-height: calc(
    100dvh - max(var(--shell-pad-y), env(safe-area-inset-top)) -
      max(var(--shell-pad-y), env(safe-area-inset-bottom))
  );
  flex-direction: column;
  overflow: hidden;
}

body.platform-yandex .game-layout {
  width: min(100%, 1080px);
  height: 100%;
}

body.platform-yandex .hud {
  gap: 10px;
}

body.platform-yandex .brand-card {
  gap: 8px;
}

body.platform-yandex .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

body.platform-yandex .brand-mark img {
  width: 40px;
  height: 40px;
}

body.platform-yandex .brand-card h1 {
  font-size: clamp(1.36rem, 2vw, 2rem);
}

.eyebrow,
.brief-label,
.stat-label,
.results-grid span {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.hud,
.hud-metrics,
.status-ribbon,
.overlay-actions,
.results-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hud {
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 232, 223, 0.92));
  border: 1px solid rgba(33, 48, 57, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 16px 28px rgba(33, 48, 57, 0.12);
}

.brand-mark img {
  width: 52px;
  height: 52px;
  display: block;
}

.brand-card h1,
.intro-card h2,
.overlay-card h2 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 0.96;
}

.brand-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.hud-metrics {
  align-items: stretch;
  justify-content: flex-end;
}

.intro-copy {
  max-width: 22rem;
  margin: 10px auto 0;
  color: rgba(29, 38, 44, 0.72);
  font-size: 0.98rem;
  line-height: 1.35;
}

.intro-best-score {
  margin: 12px 0 0;
  color: rgba(29, 38, 44, 0.82);
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.stat-card,
.status-pill,
.intro-card,
.results-grid > div {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

.stat-card {
  min-width: 124px;
  padding: 14px 16px;
}

.stat-card strong,
.results-grid strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-head);
  font-size: 1.24rem;
}

.combo-card strong {
  color: #eb6b43;
}

.primary-action,
.secondary-action {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.secondary-action {
  padding: 0 18px;
  color: var(--ink);
}

.primary-action {
  padding: 16px 24px;
  border-radius: 999px;
  background: linear-gradient(145deg, #eb9146, #d95c52);
  color: white;
  font-family: var(--font-head);
  font-weight: 700;
  box-shadow: 0 18px 26px rgba(217, 92, 82, 0.24);
}

.secondary-action {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.status-ribbon {
  margin-top: 12px;
}

.status-pill {
  padding: 11px 14px;
  font-size: 0.92rem;
  font-weight: 700;
}

.play-area {
  margin-top: 20px;
}

body.platform-yandex .play-area {
  flex: 1;
  min-height: 0;
  margin-top: 8px;
}

.scene-panel {
  display: grid;
  gap: 16px;
}

body.platform-yandex .scene-panel {
  gap: 10px;
  min-height: 100%;
  height: 100%;
}

.author-plaque {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px 14px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 24px;
  border: 1px solid rgba(29, 38, 44, 0.1);
  background:
    radial-gradient(circle at top left, rgba(82, 119, 212, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(241, 233, 226, 0.92));
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 14px 26px rgba(29, 38, 44, 0.08);
}

.author-plaque-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 236, 223, 0.94));
  border: 1px solid rgba(29, 38, 44, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 18px rgba(29, 38, 44, 0.08);
}

.author-plaque-mark img {
  display: block;
  width: 40px;
  height: 40px;
}

.author-plaque-copy {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.author-plaque-label {
  display: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.author-plaque strong {
  flex: 1 0 100%;
  display: block;
  margin-top: 0;
  font-family: var(--font-head);
  font-size: 1rem;
}

.author-plaque-role,
.author-plaque-license,
.author-plaque-summary,
.author-plaque-link {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.3;
}

.author-plaque-role {
  color: var(--ink);
  font-weight: 700;
}

.author-plaque-license {
  color: var(--ink);
  font-weight: 700;
}

.author-plaque-summary {
  color: var(--muted);
  flex: 1 1 300px;
}

.author-plaque-link {
  color: #2f7fd6;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.author-plaque-link:hover,
.author-plaque-link:focus-visible {
  text-decoration: underline;
}

body.platform-yandex .author-plaque {
  display: none;
}

body.platform-yandex,
body.platform-yandex * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.stills-mode {
  overflow: hidden;
  overscroll-behavior: none;
}

body.stills-clean .author-plaque,
body.stills-clean .speaker-toggle {
  display: none;
}

body.stills-clean .game-layout {
  width: 100%;
  max-width: none;
}

body.stills-clean .app-shell {
  min-height: 100vh;
}

body.stills-clean .game-panel {
  display: flex;
  min-height: calc(
    100vh - max(var(--shell-pad-y), env(safe-area-inset-top)) -
      max(var(--shell-pad-y), env(safe-area-inset-bottom))
  );
  flex-direction: column;
  overflow: hidden;
}

body.stills-clean {
  --board-max-w: 640px;
  --counter-max-w: 820px;
  --stage-min-h: min(760px, calc(100vh - 128px));
  --queue-pad-top: clamp(28px, 4vw, 46px);
  --queue-pad-bottom: clamp(10px, 1.2vw, 16px);
  --counter-top-pad: clamp(18px, 2.4vw, 26px);
}

body.stills-clean .scene-panel {
  min-height: 100%;
  height: 100%;
}

body.stills-clean .play-area {
  flex: 1;
  min-height: 0;
  margin-top: 12px;
}

body.stills-clean .queue-zone {
  height: 100%;
  align-content: center;
  justify-items: center;
  padding-left: var(--queue-pad-x);
  padding-right: var(--queue-pad-x);
}

body.stills-clean .board-shell,
body.stills-clean .counter-set {
  margin-left: auto;
  margin-right: auto;
}

body.stills-clean .frontal-counter .counter-desk {
  grid-template-columns: var(--counter-left-col) minmax(var(--counter-center-min), 1fr);
  justify-content: center;
}

body.stills-clean .frontal-counter .active-order {
  justify-self: center;
}

body.stills-clean .frontal-counter {
  padding-top: 18px;
}

body.stills-clean .facility-stage {
  min-height: 100%;
  height: 100%;
}

body.stills-clean .hud {
  justify-content: center;
}

body.stills-clean .brand-card {
  justify-content: center;
  text-align: center;
}

body.stills-clean.stills-portrait .queue-zone {
  justify-items: center;
  padding-left: var(--queue-pad-x);
}

body.stills-clean.stills-portrait .app-shell,
body.stills-clean.stills-portrait .game-layout {
  display: flex;
  min-height: 100vh;
  align-items: center;
}

body.stills-clean.stills-portrait .game-layout {
  width: 100%;
}

body.stills-clean.stills-portrait .game-panel {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  margin-bottom: auto;
}

body.stills-clean.stills-portrait .play-area {
  flex: 0 0 auto;
}

body.stills-clean.stills-portrait .scene-panel {
  min-height: auto;
  height: auto;
}

body.stills-clean.stills-portrait .facility-stage {
  min-height: min(940px, calc(100vh - 140px));
  height: auto;
}

body.stills-clean.stills-portrait .board-shell,
body.stills-clean.stills-portrait .counter-set {
  margin-left: auto;
  margin-right: auto;
}

body.stills-clean.stills-portrait .toast-stack {
  top: 10px;
  right: 10px;
  width: min(260px, calc(100vw - 20px));
  gap: 8px;
  transform: scale(0.88);
  transform-origin: top right;
}

.facility-stage {
  position: relative;
  overflow: hidden;
  min-height: var(--stage-min-h);
  border-radius: var(--stage-radius);
  border: 1px solid rgba(29, 38, 44, 0.08);
  background: linear-gradient(180deg, #f4ede5 0%, #ece1d3 18%, #e6d7c5 18%, #e0cfbc 100%);
}

body.platform-yandex .facility-stage,
body.platform-yandex .facility-stage * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.platform-yandex .facility-stage {
  touch-action: manipulation;
  min-height: 0;
  height: 100%;
}

body.platform-yandex .overlay,
body.platform-yandex .overlay-card {
  overflow: hidden;
  overscroll-behavior: none;
}

.facility-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 12%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 84px,
      rgba(255, 255, 255, 0.18) 84px,
      rgba(255, 255, 255, 0.18) 86px
    );
  pointer-events: none;
}

.facility-stage.board-burst {
  animation: boardBurst 0.36s cubic-bezier(0.2, 0.82, 0.28, 1) 1;
}

.facility-stage.is-tutorial .cell.has-customer:not(.tutorial-target) {
  opacity: 0.58;
}

.queue-zone {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--queue-gap);
  min-height: 100%;
  padding: var(--queue-pad-top) var(--queue-pad-x) var(--queue-pad-bottom);
}

body.platform-yandex .queue-zone {
  align-content: space-between;
  justify-items: center;
  min-height: 100%;
}

body.platform-yandex .intro-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 18px;
}

body.platform-yandex .intro-copy {
  max-width: 19rem;
  margin-top: 8px;
  font-size: 0.92rem;
}

body.platform-yandex .intro-best-score {
  margin-top: 10px;
  font-size: 0.9rem;
}

body.platform-yandex .board-shell,
body.platform-yandex .counter-set {
  width: min(100%, var(--board-max-w));
}

body.platform-yandex .counter-set {
  width: min(100%, var(--counter-max-w));
}

body.platform-yandex .frontal-counter .cat-mascot {
  left: 10px;
  top: -34px;
  width: 100px;
  height: 80px;
}

body.platform-yandex .frontal-counter .cat-tail {
  right: 24px;
  top: 44px;
}

body.platform-yandex .frontal-counter .score-clock-case {
  padding: 12px 10px 10px;
}

body.platform-yandex .frontal-counter .score-clock-display {
  padding-top: 28px;
}

body.platform-yandex .frontal-counter .speaker-toggle {
  border-radius: 24px;
}

body.platform-yandex .cat-dialogue {
  left: calc(100% - 6px);
  top: -18px;
}

.board-shell {
  position: relative;
  width: min(100%, var(--board-max-w));
  margin: 0 auto;
  padding: var(--board-pad);
  border-radius: var(--board-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.14) 0,
      rgba(255, 255, 255, 0.14) 76px,
      rgba(24, 37, 44, 0.04) 76px,
      rgba(24, 37, 44, 0.04) 77px
    );
  border: 1px solid rgba(24, 37, 44, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 24px 40px rgba(58, 48, 36, 0.12);
}

.lane-strip {
  position: absolute;
  top: var(--board-lane-offset);
  bottom: var(--board-lane-offset);
  width: var(--board-lane-width);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.1));
}

.lane-strip-left {
  left: var(--board-lane-offset);
}

.lane-strip-right {
  right: var(--board-lane-offset);
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--board-gap);
}

.cell {
  position: relative;
  aspect-ratio: 0.92 / 1;
  border-radius: var(--cell-radius);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(247, 241, 233, 0.9)),
    linear-gradient(180deg, rgba(24, 37, 44, 0.03), rgba(24, 37, 44, 0));
  border: 1px solid rgba(24, 37, 44, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.cell::before {
  content: "";
  position: absolute;
  inset: var(--cell-inner-inset);
  border-radius: var(--cell-inner-radius);
  border: 1px dashed rgba(24, 37, 44, 0.1);
}

.cell.accessible {
  background:
    linear-gradient(180deg, rgba(245, 229, 204, 0.8), rgba(255, 245, 234, 0.94)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(24, 37, 44, 0.02));
  border-color: rgba(217, 92, 82, 0.24);
  animation: accessPulse 1.7s ease-in-out infinite;
}

.cell.has-customer {
  cursor: pointer;
}

.cell.quarrel {
  box-shadow:
    inset 0 0 0 2px rgba(222, 79, 79, 0.34),
    0 0 0 1px rgba(222, 79, 79, 0.08);
}

.cell .spark {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  font-size: 1rem;
  color: var(--danger);
  animation: sparkFlash 0.36s linear infinite alternate;
}

.cell-inner {
  position: absolute;
  inset: 0;
}

.customer-shadow {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 56px;
  height: 18px;
  transform: translateX(-50%);
  scale: var(--customer-scale);
  transform-origin: center;
  border-radius: 999px;
  background: rgba(29, 38, 44, 0.16);
  filter: blur(3px);
}

.customer-figure {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 84px;
  height: 106px;
  transform: translateX(-50%);
  scale: var(--customer-scale);
  transform-origin: bottom center;
}

.customer-figure.idle-calm {
  animation: customerBob 2.2s ease-in-out infinite;
}

.customer-figure.idle-shift {
  animation: customerShift 2.5s ease-in-out infinite;
}

.customer-figure.idle-fidget {
  animation: customerFidget 1.35s ease-in-out infinite;
}

.customer-figure.angry {
  animation: shakeTop 0.28s linear 2;
}

.customer-accessory,
.customer-arm,
.customer-body,
.customer-legs,
.customer-head,
.customer-hair,
.customer-detail,
.customer-feet {
  position: absolute;
  display: block;
}

.customer-body {
  left: 50%;
  bottom: 24px;
  width: 50px;
  height: 46px;
  transform: translateX(-50%);
  border-radius: 46% 46% 36% 36%;
  background: var(--shirt);
  box-shadow:
    inset 0 -6px 0 rgba(29, 38, 44, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.customer-body::before,
.customer-body::after,
.customer-hair::before,
.customer-hair::after,
.customer-accessory::before,
.customer-accessory::after,
.customer-detail::before,
.customer-detail::after,
.customer-legs::before,
.customer-legs::after {
  content: "";
  position: absolute;
  display: block;
}

.customer-legs {
  left: 50%;
  bottom: 12px;
  width: 30px;
  height: 28px;
  transform: translateX(-50%);
}

.customer-legs::before,
.customer-legs::after {
  bottom: 0;
  width: 10px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--shirt) 72%, #32414a);
}

.customer-legs::before {
  left: 2px;
}

.customer-legs::after {
  right: 2px;
}

.customer-head {
  left: 50%;
  top: 10px;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--skin);
  z-index: 2;
}

.customer-hair {
  left: 50%;
  top: 8px;
  width: 30px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 12px 12px 8px 8px;
  background: var(--hair);
  z-index: 3;
}

.customer-arm {
  top: 42px;
  width: 14px;
  height: 28px;
  border-radius: 999px;
  background: var(--skin);
}

.arm-left {
  left: 8px;
  transform: rotate(22deg);
}

.arm-right {
  right: 8px;
  transform: rotate(-22deg);
}

.customer-feet {
  left: 50%;
  bottom: 8px;
  width: 34px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--shoe);
}

.customer-accessory {
  display: none;
  z-index: 1;
}

.customer-detail {
  display: none;
  z-index: 4;
}

.customer-figure.body-slim .customer-body {
  width: 44px;
  height: 44px;
}

.customer-figure.body-slim .customer-legs {
  width: 26px;
}

.customer-figure.body-average .customer-body {
  width: 50px;
}

.customer-figure.body-broad .customer-body {
  width: 56px;
  height: 50px;
  border-radius: 40% 40% 28% 28%;
}

.customer-figure.body-broad .customer-legs {
  width: 34px;
}

.customer-figure.posture-upright .customer-body {
  transform: translateX(-50%);
}

.customer-figure.posture-upright .customer-head {
  top: 8px;
}

.customer-figure.posture-lean .customer-body {
  transform: translateX(-50%) rotate(4deg);
}

.customer-figure.posture-lean .customer-head {
  left: calc(50% + 2px);
  top: 11px;
}

.customer-figure.posture-lean .customer-arm.arm-left {
  transform: rotate(14deg);
}

.customer-figure.posture-lean .customer-arm.arm-right {
  transform: rotate(-30deg);
}

.customer-figure.posture-slouch .customer-body {
  bottom: 22px;
  transform: translateX(-50%) rotate(-4deg);
}

.customer-figure.posture-slouch .customer-head {
  top: 13px;
  left: calc(50% - 2px);
}

.customer-figure.posture-slouch .customer-arm.arm-left {
  top: 44px;
  transform: rotate(34deg);
}

.customer-figure.posture-slouch .customer-arm.arm-right {
  top: 44px;
  transform: rotate(-12deg);
}

.customer-figure.top-tee .customer-body {
  border-radius: 42% 42% 34% 34%;
}

.customer-figure.top-shirt .customer-body {
  border-radius: 34% 34% 30% 30%;
}

.customer-figure.top-shirt .customer-body::before {
  left: 50%;
  top: 5px;
  width: 16px;
  height: 10px;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, transparent 0 20%, rgba(255, 255, 255, 0.72) 20% 80%, transparent 80%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0));
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.customer-figure.top-hoodie .customer-body {
  height: 48px;
  border-radius: 42% 42% 28% 28%;
}

.customer-figure.top-hoodie .customer-body::before {
  left: 50%;
  top: -1px;
  width: 22px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 0 0 12px 12px;
  border: 4px solid color-mix(in srgb, var(--shirt) 84%, #2c3640);
  border-top: 0;
}

.customer-figure.top-coat .customer-body {
  height: 56px;
  border-radius: 28% 28% 16% 16%;
}

.customer-figure.top-coat .customer-body::before {
  left: 50%;
  top: 2px;
  width: 18px;
  height: calc(100% - 6px);
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(244, 231, 201, 0.88), rgba(222, 201, 166, 0.78));
  opacity: 0.8;
}

.customer-figure.hair-short .customer-hair {
  width: 28px;
  height: 14px;
  border-radius: 12px 12px 6px 6px;
}

.customer-figure.hair-bob .customer-hair {
  width: 34px;
  height: 22px;
  border-radius: 14px 14px 10px 10px;
}

.customer-figure.hair-bob .customer-hair::after {
  left: 3px;
  right: 3px;
  bottom: -5px;
  height: 8px;
  border-radius: 0 0 10px 10px;
  background: var(--hair);
}

.customer-figure.hair-long .customer-hair {
  width: 34px;
  height: 18px;
  border-radius: 14px 14px 6px 6px;
}

.customer-figure.hair-long .customer-hair::after {
  left: 6px;
  right: 6px;
  top: 8px;
  height: 20px;
  border-radius: 0 0 12px 12px;
  background: var(--hair);
  z-index: -1;
}

.customer-figure.hair-bun .customer-hair {
  width: 30px;
  height: 16px;
}

.customer-figure.hair-bun .customer-hair::after {
  left: 50%;
  top: -7px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--hair);
}

.customer-figure.hair-cap .customer-hair {
  width: 32px;
  height: 14px;
  border-radius: 12px 12px 6px 6px;
}

.customer-figure.hair-cap .customer-hair::before {
  left: -2px;
  right: -2px;
  top: -2px;
  height: 12px;
  border-radius: 10px 10px 4px 4px;
  background: color-mix(in srgb, var(--hair) 80%, #4a5d73);
}

.customer-figure.hair-cap .customer-hair::after {
  right: -7px;
  top: 5px;
  width: 12px;
  height: 5px;
  border-radius: 0 999px 999px 0;
  background: color-mix(in srgb, var(--hair) 82%, #4a5d73);
}

.customer-figure.hair-hood .customer-hair {
  width: 38px;
  height: 22px;
  border-radius: 18px 18px 12px 12px;
  background: color-mix(in srgb, var(--shirt) 78%, #25313a);
}

.customer-figure.hair-hood .customer-hair::after {
  left: 6px;
  right: 6px;
  top: 3px;
  height: 11px;
  border-radius: 10px 10px 8px 8px;
  background: var(--hair);
}

.customer-figure.accessory-backpack .customer-accessory {
  display: block;
  left: 14px;
  top: 40px;
  width: 18px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bag) 82%, white), var(--bag));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.customer-figure.accessory-backpack .customer-accessory::before,
.customer-figure.accessory-backpack .customer-accessory::after {
  top: 3px;
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bag) 84%, #202830);
}

.customer-figure.accessory-backpack .customer-accessory::before {
  left: -3px;
}

.customer-figure.accessory-backpack .customer-accessory::after {
  right: -3px;
}

.customer-figure.accessory-shopper .customer-accessory {
  display: block;
  right: 8px;
  top: 50px;
  width: 18px;
  height: 24px;
  border-radius: 4px 4px 8px 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bag) 82%, white), var(--bag));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.customer-figure.accessory-shopper .customer-accessory::before {
  left: 3px;
  right: 3px;
  top: -7px;
  height: 10px;
  border: 2px solid color-mix(in srgb, var(--bag) 78%, #1f272e);
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.customer-figure.accessory-phone .customer-accessory {
  display: block;
  right: 12px;
  top: 54px;
  width: 10px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, #4f5d6d, #232d37);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.customer-figure.persona-shurik .customer-detail,
.customer-figure.persona-bureaucrat .customer-detail,
.customer-figure.persona-it-hoodie .customer-detail {
  display: block;
  left: 50%;
  top: 26px;
  width: 28px;
  height: 10px;
  transform: translateX(-50%);
}

.customer-figure.persona-shurik .customer-detail::before,
.customer-figure.persona-shurik .customer-detail::after,
.customer-figure.persona-bureaucrat .customer-detail::before,
.customer-figure.persona-bureaucrat .customer-detail::after,
.customer-figure.persona-it-hoodie .customer-detail::before,
.customer-figure.persona-it-hoodie .customer-detail::after {
  top: 0;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(63, 49, 37, 0.88);
  background: rgba(255, 255, 255, 0.06);
}

.customer-figure.persona-shurik .customer-detail::before,
.customer-figure.persona-bureaucrat .customer-detail::before,
.customer-figure.persona-it-hoodie .customer-detail::before {
  left: 0;
}

.customer-figure.persona-shurik .customer-detail::after,
.customer-figure.persona-bureaucrat .customer-detail::after,
.customer-figure.persona-it-hoodie .customer-detail::after {
  right: 0;
}

.customer-figure.persona-shurik .customer-detail {
  background: linear-gradient(
    90deg,
    transparent 0 40%,
    rgba(63, 49, 37, 0.88) 40% 60%,
    transparent 60% 100%
  );
}

.customer-figure.persona-shurik .customer-detail::before,
.customer-figure.persona-shurik .customer-detail::after {
  border-radius: 50%;
}

.customer-figure.persona-bureaucrat .customer-detail {
  background: linear-gradient(
    90deg,
    transparent 0 38%,
    rgba(58, 47, 38, 0.8) 38% 62%,
    transparent 62% 100%
  );
}

.customer-figure.persona-bureaucrat .customer-detail::before,
.customer-figure.persona-bureaucrat .customer-detail::after {
  border-radius: 3px;
}

.customer-figure.persona-neo .customer-detail {
  display: block;
  left: 50%;
  top: 25px;
  width: 30px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(51, 59, 68, 0.96), rgba(19, 23, 27, 0.94));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.customer-figure.persona-neo .customer-detail::before,
.customer-figure.persona-neo .customer-detail::after {
  top: 1px;
  width: 11px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(107, 126, 112, 0.92), rgba(62, 83, 69, 0.96));
}

.customer-figure.persona-neo .customer-detail::before {
  left: 2px;
}

.customer-figure.persona-neo .customer-detail::after {
  right: 2px;
}

.customer-figure.persona-it-hoodie .customer-detail {
  background: linear-gradient(
    90deg,
    transparent 0 40%,
    rgba(49, 59, 68, 0.86) 40% 60%,
    transparent 60% 100%
  );
}

.customer-figure.persona-it-hoodie .customer-detail::before,
.customer-figure.persona-it-hoodie .customer-detail::after {
  border-radius: 4px;
  border-color: rgba(49, 59, 68, 0.9);
}

.customer-figure.persona-punk .customer-detail {
  display: block;
  left: 50%;
  top: 49px;
  width: 22px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(38, 40, 44, 0.96), rgba(19, 21, 25, 0.96));
}

.customer-figure.persona-punk .customer-detail::before,
.customer-figure.persona-punk .customer-detail::after {
  top: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(205, 206, 210, 0.86);
}

.customer-figure.persona-punk .customer-detail::before {
  left: 4px;
}

.customer-figure.persona-punk .customer-detail::after {
  right: 4px;
}

.customer-figure.persona-service-aunt .customer-detail {
  display: block;
  left: 50%;
  top: 45px;
  width: 26px;
  height: 18px;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(228, 196, 138, 0.92), rgba(184, 124, 78, 0.9)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.customer-figure.persona-gopnik .customer-detail {
  display: block;
  left: 50%;
  top: 52px;
  width: 24px;
  height: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(205, 174, 88, 0.92), rgba(161, 126, 46, 0.94));
}

.customer-figure.persona-gopnik .customer-body::after {
  left: 8px;
  right: 8px;
  top: 9px;
  height: 5px;
  background: linear-gradient(
    90deg,
    rgba(248, 244, 236, 0.92) 0 18%,
    transparent 18% 41%,
    rgba(248, 244, 236, 0.92) 41% 59%,
    transparent 59% 82%,
    rgba(248, 244, 236, 0.92) 82% 100%
  );
  opacity: 0.9;
}

.customer-figure.persona-shurik .customer-body {
  bottom: 25px;
}

.customer-figure.persona-bureaucrat .customer-body {
  height: 54px;
}

.customer-figure.persona-neo .customer-body {
  height: 58px;
}

.customer-figure.persona-punk .customer-hair {
  width: 36px;
  transform: translateX(-50%) rotate(-3deg);
}

.customer-figure.persona-service-aunt .customer-body {
  width: 58px;
}

.customer-figure.persona-service-aunt .customer-accessory {
  top: 48px;
  width: 20px;
  height: 26px;
}

.scene-dialogue {
  --dialogue-tail-left: 50%;
  position: absolute;
  left: 50%;
  top: 24px;
  z-index: 8;
  width: min(var(--scene-dialogue-max-w), calc(100% - var(--scene-dialogue-gap) * 2));
  transform: translateX(-50%);
  padding: var(--scene-dialogue-pad-top) var(--scene-dialogue-pad-x)
    var(--scene-dialogue-pad-bottom);
  border-radius: var(--scene-dialogue-radius);
  pointer-events: none;
  border: 1px solid rgba(24, 37, 44, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(252, 247, 242, 0.48));
  backdrop-filter: blur(8px) saturate(1.02);
  box-shadow:
    0 14px 26px rgba(29, 38, 44, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.scene-dialogue::after {
  content: "";
  position: absolute;
  left: var(--dialogue-tail-left);
  bottom: -12px;
  width: 22px;
  height: 22px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(24, 37, 44, 0.12);
  border-bottom: 1px solid rgba(24, 37, 44, 0.12);
  background: rgba(252, 248, 244, 0.56);
}

.scene-dialogue.is-below::after {
  top: -12px;
  bottom: auto;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid rgba(24, 37, 44, 0.12);
  border-top: 1px solid rgba(24, 37, 44, 0.12);
}

.scene-dialogue-text {
  margin-top: 0;
  font-family: var(--font-head);
  font-size: var(--scene-dialogue-font);
  line-height: 1.2;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
  text-wrap: balance;
}

.cat-dialogue {
  position: absolute;
  left: calc(100% - 8px);
  top: var(--cat-dialogue-top);
  z-index: 5;
  width: var(--cat-dialogue-width);
  padding: var(--cat-dialogue-pad-top) var(--cat-dialogue-pad-x) var(--cat-dialogue-pad-bottom);
  border-radius: 16px;
  border: 1px solid rgba(18, 24, 30, 0.12);
  background: linear-gradient(180deg, rgba(30, 40, 47, 0.92), rgba(19, 25, 30, 0.9));
  box-shadow:
    0 10px 18px rgba(17, 22, 27, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.cat-dialogue::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 28px;
  width: 16px;
  height: 16px;
  transform: rotate(45deg);
  border-left: 1px solid rgba(18, 24, 30, 0.12);
  border-bottom: 1px solid rgba(18, 24, 30, 0.12);
  background: rgba(24, 33, 38, 0.94);
}

.cat-dialogue-text {
  margin: 0;
  color: rgba(247, 244, 239, 0.96);
  font-family: var(--font-head);
  font-size: var(--cat-dialogue-font);
  line-height: 1.2;
  text-wrap: balance;
}

.cell.speaker-active {
  box-shadow:
    inset 0 0 0 2px rgba(47, 127, 214, 0.34),
    0 0 0 4px rgba(47, 127, 214, 0.12),
    0 12px 22px rgba(29, 38, 44, 0.08);
}

.cell.tutorial-target {
  box-shadow:
    inset 0 0 0 2px rgba(84, 184, 100, 0.42),
    0 0 0 4px rgba(84, 184, 100, 0.14),
    0 12px 22px rgba(84, 184, 100, 0.14);
  animation: tutorialPulse 1.05s ease-in-out infinite;
}

.active-order {
  position: relative;
  display: grid;
  align-content: center;
  place-items: center;
  min-height: 128px;
  padding: 18px 12px 26px;
  overflow: visible;
  pointer-events: none;
}

.active-order-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 112px;
  padding: 0;
  pointer-events: none;
  background: transparent;
  box-shadow: none;
}

.active-order-badge.is-tutorial {
  animation: tutorialPulse 1.05s ease-in-out infinite;
}

.active-order-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.type-box {
  position: relative;
  display: block;
  width: 68%;
  height: 52%;
  margin-top: 24%;
  margin-left: 2%;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 248, 233, 0.16), rgba(255, 248, 233, 0) 18%),
    linear-gradient(
      90deg,
      transparent 0 44%,
      rgba(241, 222, 186, 0.94) 44% 56%,
      transparent 57% 100%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--box-color) 86%, white),
      color-mix(in srgb, var(--box-color) 92%, black 8%)
    );
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    inset 0 -7px 0 rgba(80, 57, 40, 0.14),
    0 12px 16px rgba(44, 29, 18, 0.16);
}

.type-box::before,
.type-box::after {
  content: "";
  position: absolute;
  display: block;
}

.type-box::before {
  left: 4%;
  right: 8%;
  top: -18%;
  height: 24%;
  border-radius: 8px 8px 2px 2px;
  transform: skewX(-38deg);
  transform-origin: bottom left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.04)),
    linear-gradient(
      90deg,
      transparent 0 44%,
      rgba(241, 222, 186, 0.88) 44% 56%,
      transparent 56% 100%
    ),
    color-mix(in srgb, var(--box-color) 68%, white);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 2px 0 rgba(65, 43, 28, 0.08);
}

.type-box::after {
  top: -8%;
  right: -18%;
  width: 18%;
  height: 100%;
  border-radius: 0 8px 8px 0;
  transform: skewY(-39deg);
  transform-origin: top left;
  background:
    linear-gradient(180deg, rgba(255, 247, 228, 0.16), rgba(255, 247, 228, 0)),
    color-mix(in srgb, var(--box-color) 70%, black 30%);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(85, 59, 39, 0.18);
}

.active-order-symbol {
  display: block;
  width: 116px;
  height: 116px;
  filter: drop-shadow(0 3px 0 rgba(255, 244, 226, 0.18))
    drop-shadow(0 12px 14px rgba(40, 26, 18, 0.2));
}

.counter-set {
  position: relative;
  width: min(100%, var(--counter-max-w));
  margin: 0 auto;
  padding-top: var(--counter-top-pad);
}

.cat-mascot {
  position: absolute;
  left: 32px;
  top: -22px;
  z-index: 4;
  width: 96px;
  height: 78px;
}

.cat-mascot span {
  position: absolute;
  display: block;
}

.cat-tail {
  right: 22px;
  top: 42px;
  width: 18px;
  height: 20px;
  border-radius: 999px 999px 999px 10px;
  border: 6px solid #20313b;
  border-left: 0;
  border-bottom: 0;
  transform: rotate(42deg);
}

.cat-body {
  left: 20px;
  bottom: 10px;
  width: 50px;
  height: 32px;
  border-radius: 28px 28px 18px 18px;
  background: linear-gradient(180deg, #243841, #18262e);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(21, 31, 38, 0.16);
}

.cat-head {
  left: 30px;
  top: 18px;
  width: 34px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2a404a, #1b2a33);
}

.cat-ears::before,
.cat-ears::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 12px;
  height: 18px;
  background: linear-gradient(180deg, #2a404a, #1b2a33);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='20 0 12 16'%3E%3Cpath fill='black' d='M21.7 15.1c-.4-2.3.1-4.9 1.4-7.6 1-2 2.3-3.8 3.9-5.4.6-.6 1.6-.4 2 .3 1 2 1.4 4 1.2 5.9-.2 2.3-1.3 4.3-3.1 5.8-1.4 1.2-3.2 1.6-5.4 1z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='20 0 12 16'%3E%3Cpath fill='black' d='M21.7 15.1c-.4-2.3.1-4.9 1.4-7.6 1-2 2.3-3.8 3.9-5.4.6-.6 1.6-.4 2 .3 1 2 1.4 4 1.2 5.9-.2 2.3-1.3 4.3-3.1 5.8-1.4 1.2-3.2 1.6-5.4 1z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.cat-ears {
  left: 30px;
  top: 6px;
  width: 34px;
  height: 18px;
}

.cat-ears::before {
  left: 0;
}

.cat-ears::after {
  right: 0;
  transform: scaleX(-1);
  transform-origin: center;
}

.cat-eyes {
  left: 39px;
  top: 29px;
  width: 16px;
  height: 6px;
}

.cat-eyes::before,
.cat-eyes::after {
  content: "";
  position: absolute;
  top: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7efff0;
  box-shadow: 0 0 8px rgba(126, 255, 240, 0.72);
}

.cat-eyes::before {
  left: 0;
}

.cat-eyes::after {
  right: 0;
}

.cat-paws {
  left: 28px;
  bottom: 6px;
  width: 34px;
  height: 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 8px 50%, #16232b 0 5px, transparent 5px),
    radial-gradient(circle at 17px 50%, #16232b 0 5px, transparent 5px),
    radial-gradient(circle at 26px 50%, #16232b 0 5px, transparent 5px);
}

.counter-desk {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 126px minmax(220px, 1.35fr) 92px 106px;
  align-items: center;
  gap: 14px;
  min-height: 170px;
  padding: 34px 20px 20px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 11%),
    linear-gradient(180deg, #ecd8bf 0, #dfc29f 18%, #bc8c64 18%, #9f6b46 68%, #74492f 100%);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.38),
    inset 0 -22px 30px rgba(73, 45, 28, 0.2),
    0 22px 34px rgba(84, 52, 29, 0.2);
  border: 1px solid rgba(113, 74, 49, 0.3);
}

.desk-item {
  min-height: 62px;
  border-radius: 22px;
}

.score-clock {
  position: relative;
  min-height: 132px;
  overflow: visible;
}

.score-clock-case {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 102px;
  padding: 14px 12px 12px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #2c2b2c, #171617 58%, #242223);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -14px 18px rgba(0, 0, 0, 0.28),
    0 4px 0 rgba(88, 58, 39, 0.18),
    0 16px 18px rgba(32, 20, 15, 0.14);
}

.score-clock-display {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  padding-top: 28px;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  color: rgba(247, 247, 242, 0.96);
  font-family: "JetBrains Mono", "Roboto Mono", "Menlo", monospace;
  font-size: 1.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums slashed-zero;
  letter-spacing: 0.12em;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 0.12),
    0 0 14px rgba(255, 255, 255, 0.06);
}

.score-clock-display.is-compact {
  font-size: 1.46rem;
  letter-spacing: 0.06em;
}

.score-clock-display.is-tight {
  font-size: 1.24rem;
  letter-spacing: 0.03em;
}

.score-clock-display.is-ultra {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.speaker-toggle {
  position: relative;
  min-height: 120px;
  padding: 0;
  border: 0;
  cursor: pointer;
  appearance: none;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 255, 255, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #41454a, #202327 62%, #17191c);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -16px 20px rgba(0, 0, 0, 0.28),
    0 4px 0 rgba(88, 58, 39, 0.18),
    0 16px 20px rgba(32, 20, 15, 0.14);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.speaker-toggle:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -16px 20px rgba(0, 0, 0, 0.28),
    0 20px 26px rgba(32, 20, 15, 0.2);
}

.speaker-toggle:focus-visible {
  outline: 2px solid rgba(47, 127, 214, 0.56);
  outline-offset: 3px;
}

.speaker-led,
.speaker-notch,
.speaker-grill {
  position: absolute;
  display: block;
  z-index: 1;
}

.speaker-led {
  right: 16px;
  top: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(188, 255, 177, 0.98), rgba(67, 194, 90, 0.84));
  box-shadow:
    0 0 16px rgba(87, 224, 98, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.speaker-notch {
  left: 50%;
  top: 16px;
  width: 34px;
  height: 10px;
  transform: translateX(-50%);
  border-radius: 999px 999px 7px 7px;
  background:
    radial-gradient(circle at 8px 50%, rgba(223, 228, 230, 0.82) 0 1.6px, transparent 1.6px),
    radial-gradient(circle at 17px 50%, rgba(223, 228, 230, 0.82) 0 1.6px, transparent 1.6px),
    radial-gradient(circle at 26px 50%, rgba(223, 228, 230, 0.82) 0 1.6px, transparent 1.6px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.24));
}

.speaker-grill {
  left: 50%;
  bottom: 14px;
  width: 62px;
  height: 62px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at center,
      rgba(0, 0, 0, 0) 0 28%,
      rgba(255, 255, 255, 0.08) 28% 30%,
      transparent 30%
    ),
    radial-gradient(
      circle at center,
      rgba(18, 20, 22, 0.96) 0 48%,
      rgba(9, 10, 12, 0.98) 49% 58%,
      rgba(57, 60, 65, 0.7) 59% 64%,
      rgba(18, 20, 22, 0.96) 65% 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -10px 12px rgba(0, 0, 0, 0.32),
    0 6px 10px rgba(0, 0, 0, 0.2);
}

.speaker-toggle.is-off .speaker-led {
  background: radial-gradient(circle, rgba(255, 209, 163, 0.8), rgba(181, 92, 49, 0.7));
  box-shadow:
    0 0 10px rgba(214, 123, 74, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.frontal-counter {
  padding-top: 28px;
}

.frontal-counter .cat-mascot {
  left: 8px;
  top: -42px;
  width: 108px;
  height: 86px;
  z-index: 2;
  transform: scale(1);
  transform-origin: top left;
}

.frontal-counter .cat-tail {
  right: 26px;
  top: 46px;
  width: 16px;
  height: 18px;
  border-width: 5px;
  transform: rotate(48deg);
}

.frontal-counter .counter-desk {
  position: relative;
  grid-template-columns:
    var(--counter-left-col)
    minmax(var(--counter-center-min), 1.9fr)
    var(--counter-right-col);
  gap: var(--counter-gap);
  min-height: var(--counter-min-h);
  padding: var(--counter-pad-top) var(--counter-pad-x) var(--counter-pad-bottom);
  border-radius: 38px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 12%),
    linear-gradient(180deg, #ead7c7 0, #d2b18d 18%, #b27f59 18%, #935f42 64%, #73442f 100%);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.42),
    inset 0 -28px 30px rgba(67, 42, 30, 0.24),
    0 26px 40px rgba(72, 47, 31, 0.22);
}

.frontal-counter .active-order {
  min-height: var(--active-order-min-h);
  padding: var(--active-order-pad-top) 8px var(--active-order-pad-bottom);
}

.frontal-counter .active-order-badge {
  width: var(--active-order-badge-w);
  height: var(--active-order-badge-h);
}

.frontal-counter .active-order-symbol {
  width: var(--active-order-symbol-size);
  height: var(--active-order-symbol-size);
  filter: drop-shadow(0 4px 0 rgba(255, 248, 238, 0.22))
    drop-shadow(0 16px 18px rgba(43, 29, 20, 0.24));
}

.frontal-counter .score-clock {
  min-height: var(--score-clock-min-h);
}

.frontal-counter .score-clock-case {
  min-height: var(--score-clock-case-min-h);
  border-radius: 22px;
}

.frontal-counter .score-clock-display {
  padding-top: 34px;
  font-size: var(--score-clock-font);
  letter-spacing: 0.12em;
}

.frontal-counter .score-clock-display.is-compact {
  font-size: var(--score-clock-font-compact);
  letter-spacing: 0.05em;
}

.frontal-counter .score-clock-display.is-tight {
  font-size: var(--score-clock-font-tight);
  letter-spacing: 0.03em;
}

.frontal-counter .score-clock-display.is-ultra {
  font-size: var(--score-clock-font-ultra);
  letter-spacing: 0.01em;
}

.frontal-counter .speaker-toggle {
  min-height: var(--speaker-min-h);
  border-radius: 28px;
}

.intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 22px;
  background: linear-gradient(180deg, rgba(18, 24, 30, 0.18), rgba(18, 24, 30, 0.32));
  backdrop-filter: blur(4px);
}

.rotate-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 24, 30, 0.72);
  backdrop-filter: blur(8px);
}

.rotate-card {
  width: min(100%, 320px);
  padding: 22px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(251, 246, 239, 0.94);
  text-align: center;
  box-shadow: 0 18px 34px rgba(18, 24, 30, 0.2);
}

.rotate-card h2,
.rotate-card p {
  margin: 0;
}

.rotate-card h2 {
  margin-top: 6px;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.rotate-card p:last-child {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.intro-card {
  width: min(100%, 380px);
  padding: 20px 22px;
  text-align: center;
  box-shadow: 0 24px 40px rgba(18, 24, 30, 0.14);
}

.intro-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.toast-stack {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  z-index: 30;
  pointer-events: none;
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 28px));
}

.toast {
  pointer-events: none;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(29, 38, 44, 0.52);
  color: white;
  backdrop-filter: blur(8px) saturate(1.02);
  box-shadow: 0 10px 22px rgba(29, 38, 44, 0.12);
  animation: slideIn 180ms ease-out;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(18, 24, 30, 0.34);
  backdrop-filter: blur(6px);
}

.overlay-card {
  width: min(100%, 620px);
  max-height: min(calc(100svh - 40px), 100%);
  padding: 28px;
  border-radius: 34px;
  text-align: center;
  overflow: auto;
  overscroll-behavior: contain;
}

.overlay-card h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.results-grid {
  justify-content: center;
  margin-top: 20px;
}

.results-grid > div {
  min-width: 124px;
  padding: 14px;
}

.overlay-actions {
  justify-content: center;
  margin-top: 24px;
}

@keyframes customerBob {
  0%,
  100% {
    transform: translateX(-50%) translateY(-2px);
  }
  50% {
    transform: translateX(-50%) translateY(2px);
  }
}

@keyframes customerShift {
  0%,
  100% {
    transform: translateX(calc(-50% - 1px)) translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateX(calc(-50% + 1px)) translateY(-2px) rotate(1deg);
  }
}

@keyframes customerFidget {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  25% {
    transform: translateX(calc(-50% - 1px)) translateY(-2px);
  }
  50% {
    transform: translateX(-50%) translateY(1px);
  }
  75% {
    transform: translateX(calc(-50% + 1px)) translateY(-1px);
  }
}

@keyframes shakeTop {
  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }
  25% {
    transform: translateX(calc(-50% - 2px)) rotate(-4deg);
  }
  75% {
    transform: translateX(calc(-50% + 2px)) rotate(4deg);
  }
}

@keyframes boardBurst {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  18% {
    transform: translate3d(-7px, 0, 0);
  }
  36% {
    transform: translate3d(8px, -2px, 0);
  }
  54% {
    transform: translate3d(-6px, 1px, 0);
  }
  72% {
    transform: translate3d(5px, 0, 0);
  }
}

@keyframes accessPulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 rgba(239, 90, 77, 0.18);
  }
  50% {
    box-shadow: inset 0 0 0 2px rgba(239, 90, 77, 0.22);
  }
}

@keyframes tutorialPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
  50% {
    transform: translateY(-1px) scale(1.02);
    filter: saturate(1.08);
  }
}

@keyframes sparkFlash {
  from {
    opacity: 0.34;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  :root {
    --stage-min-h: 720px;
    --customer-scale: 0.96;
  }
}

@media (min-width: 1280px) and (min-aspect-ratio: 16/10) {
  :root {
    --stage-min-h: clamp(620px, calc(100svh - 220px), 780px);
    --queue-pad-top: clamp(34px, 4.4svh, 52px);
    --queue-pad-bottom: clamp(12px, 1.8svh, 20px);
    --board-max-w: clamp(320px, 40svh, 420px);
    --board-pad: clamp(10px, 1.2svh, 14px);
    --board-gap: clamp(6px, 0.8svh, 10px);
    --cell-radius: clamp(16px, 1.8svh, 22px);
    --cell-inner-inset: clamp(6px, 0.7svh, 8px);
    --cell-inner-radius: clamp(12px, 1.2svh, 16px);
    --customer-scale: 1;
    --scene-dialogue-max-w: clamp(320px, 30svh, 420px);
    --scene-dialogue-font: clamp(1rem, 0.8svh, 1.18rem);
    --counter-top-pad: clamp(18px, 2.2svh, 28px);
    --counter-max-w: clamp(430px, 54svh, 600px);
    --counter-left-col: clamp(72px, 9svh, 92px);
    --counter-center-min: clamp(170px, 28svh, 260px);
    --counter-right-col: clamp(58px, 7svh, 80px);
    --counter-gap: clamp(8px, 0.9svh, 12px);
    --counter-min-h: clamp(132px, 17svh, 188px);
    --counter-pad-top: clamp(14px, 1.6svh, 18px);
    --counter-pad-x: clamp(10px, 1.2svh, 14px);
    --counter-pad-bottom: clamp(10px, 1.2svh, 14px);
    --active-order-min-h: clamp(98px, 12svh, 128px);
    --active-order-pad-top: clamp(4px, 0.6svh, 8px);
    --active-order-pad-bottom: clamp(10px, 1.4svh, 16px);
    --active-order-badge-w: clamp(92px, 12svh, 116px);
    --active-order-badge-h: clamp(76px, 10svh, 96px);
    --active-order-symbol-size: clamp(82px, 10svh, 102px);
    --score-clock-min-h: clamp(88px, 11svh, 116px);
    --score-clock-case-min-h: clamp(72px, 9svh, 94px);
    --score-clock-font: clamp(1.16rem, 1.5svh, 1.52rem);
    --score-clock-font-compact: clamp(0.96rem, 1.2svh, 1.22rem);
    --score-clock-font-tight: clamp(0.82rem, 1.02svh, 1.06rem);
    --score-clock-font-ultra: clamp(0.7rem, 0.9svh, 0.9rem);
    --speaker-min-h: clamp(78px, 10svh, 102px);
  }

  .play-area {
    margin-top: 12px;
  }

  .facility-stage {
    min-height: var(--stage-min-h);
  }

  .customer-shadow {
    bottom: 7px;
    width: 38px;
    height: 11px;
  }

  .customer-figure {
    bottom: 6px;
    width: 62px;
    height: 76px;
  }

  .customer-body {
    bottom: 18px;
    width: 36px;
    height: 34px;
  }

  .customer-legs {
    bottom: 7px;
    width: 22px;
    height: 22px;
  }

  .customer-legs::before,
  .customer-legs::after {
    width: 7px;
    height: 20px;
  }

  .customer-legs::before {
    left: 2px;
  }

  .customer-legs::after {
    right: 2px;
  }

  .customer-head {
    top: 6px;
    width: 22px;
    height: 22px;
  }

  .customer-hair {
    top: 5px;
    width: 24px;
    height: 12px;
  }

  .customer-arm {
    top: 31px;
    width: 10px;
    height: 22px;
  }

  .arm-left {
    left: 7px;
  }

  .arm-right {
    right: 7px;
  }

  .customer-feet {
    bottom: 4px;
    width: 26px;
    height: 8px;
  }

  .customer-figure.body-slim .customer-body {
    width: 32px;
    height: 32px;
  }

  .customer-figure.body-slim .customer-legs {
    width: 18px;
  }

  .customer-figure.body-average .customer-body {
    width: 36px;
  }

  .customer-figure.body-broad .customer-body {
    width: 40px;
    height: 36px;
  }

  .customer-figure.body-broad .customer-legs {
    width: 24px;
  }

  .customer-figure.posture-upright .customer-head {
    top: 6px;
  }

  .customer-figure.posture-lean .customer-body {
    transform: translateX(-50%) rotate(3deg);
  }

  .customer-figure.posture-lean .customer-head {
    left: calc(50% + 1px);
    top: 8px;
  }

  .customer-figure.posture-lean .customer-arm.arm-left {
    transform: rotate(12deg);
  }

  .customer-figure.posture-lean .customer-arm.arm-right {
    transform: rotate(-24deg);
  }

  .customer-figure.posture-slouch .customer-body {
    bottom: 17px;
    transform: translateX(-50%) rotate(-3deg);
  }

  .customer-figure.posture-slouch .customer-head {
    top: 10px;
    left: calc(50% - 1px);
  }

  .customer-figure.posture-slouch .customer-arm.arm-left,
  .customer-figure.posture-slouch .customer-arm.arm-right {
    top: 33px;
  }

  .customer-figure.top-shirt .customer-body::before {
    top: 4px;
    width: 12px;
    height: 8px;
  }

  .customer-figure.top-hoodie .customer-body {
    height: 36px;
  }

  .customer-figure.top-hoodie .customer-body::before {
    top: 0;
    width: 16px;
    height: 10px;
    border-width: 3px;
  }

  .customer-figure.top-coat .customer-body {
    height: 42px;
  }

  .customer-figure.top-coat .customer-body::before {
    top: 2px;
    width: 14px;
    height: calc(100% - 5px);
  }

  .customer-figure.hair-short .customer-hair {
    width: 22px;
    height: 11px;
  }

  .customer-figure.hair-bob .customer-hair {
    width: 28px;
    height: 16px;
  }

  .customer-figure.hair-bob .customer-hair::after {
    left: 3px;
    right: 3px;
    bottom: -4px;
    height: 6px;
  }

  .customer-figure.hair-long .customer-hair {
    width: 28px;
    height: 14px;
  }

  .customer-figure.hair-long .customer-hair::after {
    left: 5px;
    right: 5px;
    top: 7px;
    height: 16px;
  }

  .customer-figure.hair-bun .customer-hair {
    width: 24px;
    height: 12px;
  }

  .customer-figure.hair-bun .customer-hair::after {
    top: -5px;
    width: 10px;
    height: 10px;
  }

  .customer-figure.hair-cap .customer-hair {
    width: 26px;
    height: 11px;
  }

  .customer-figure.hair-cap .customer-hair::before {
    top: -2px;
    height: 10px;
  }

  .customer-figure.hair-cap .customer-hair::after {
    right: -6px;
    top: 4px;
    width: 10px;
    height: 4px;
  }

  .customer-figure.hair-hood .customer-hair {
    width: 30px;
    height: 18px;
  }

  .customer-figure.hair-hood .customer-hair::after {
    left: 5px;
    right: 5px;
    top: 3px;
    height: 9px;
  }

  .customer-figure.accessory-backpack .customer-accessory {
    left: 9px;
    top: 30px;
    width: 14px;
    height: 22px;
  }

  .customer-figure.accessory-backpack .customer-accessory::before,
  .customer-figure.accessory-backpack .customer-accessory::after {
    top: 3px;
    width: 4px;
    height: 14px;
  }

  .customer-figure.accessory-shopper .customer-accessory {
    right: 5px;
    top: 36px;
    width: 14px;
    height: 19px;
  }

  .customer-figure.accessory-shopper .customer-accessory::before {
    left: 2px;
    right: 2px;
    top: -6px;
    height: 8px;
  }

  .customer-figure.accessory-phone .customer-accessory {
    right: 7px;
    top: 39px;
    width: 8px;
    height: 13px;
  }

  .customer-figure.persona-shurik .customer-detail,
  .customer-figure.persona-bureaucrat .customer-detail,
  .customer-figure.persona-it-hoodie .customer-detail {
    top: 20px;
    width: 22px;
    height: 8px;
  }

  .customer-figure.persona-shurik .customer-detail::before,
  .customer-figure.persona-shurik .customer-detail::after,
  .customer-figure.persona-bureaucrat .customer-detail::before,
  .customer-figure.persona-bureaucrat .customer-detail::after,
  .customer-figure.persona-it-hoodie .customer-detail::before,
  .customer-figure.persona-it-hoodie .customer-detail::after {
    width: 8px;
    height: 8px;
  }

  .customer-figure.persona-neo .customer-detail {
    top: 19px;
    width: 24px;
    height: 7px;
  }

  .customer-figure.persona-neo .customer-detail::before,
  .customer-figure.persona-neo .customer-detail::after {
    top: 1px;
    width: 9px;
    height: 5px;
  }

  .customer-figure.persona-punk .customer-detail {
    top: 36px;
    width: 18px;
    height: 5px;
  }

  .customer-figure.persona-punk .customer-detail::before,
  .customer-figure.persona-punk .customer-detail::after {
    top: 1px;
    width: 3px;
    height: 3px;
  }

  .customer-figure.persona-service-aunt .customer-detail {
    top: 34px;
    width: 20px;
    height: 14px;
  }

  .customer-figure.persona-gopnik .customer-detail {
    top: 40px;
    width: 20px;
    height: 7px;
  }

  .customer-figure.persona-shurik .customer-body {
    bottom: 19px;
  }

  .customer-figure.persona-bureaucrat .customer-body {
    height: 40px;
  }

  .customer-figure.persona-neo .customer-body {
    height: 42px;
  }

  .customer-figure.persona-punk .customer-hair {
    width: 30px;
  }

  .customer-figure.persona-service-aunt .customer-body {
    width: 42px;
  }

  .customer-figure.persona-service-aunt .customer-accessory {
    top: 34px;
    width: 15px;
    height: 20px;
  }
}

@media (max-width: 760px) {
  body.platform-yandex {
    --shell-pad-x: 8px;
    --shell-pad-y: 10px;
    --panel-pad: 6px;
    --panel-radius: 24px;
    --stage-min-h: 520px;
    --queue-gap: 6px;
    --queue-pad-top: 24px;
    --queue-pad-x: 4px;
    --queue-pad-bottom: 10px;
    --board-max-w: 100%;
    --board-pad: 6px;
    --board-radius: 18px;
    --board-gap: 4px;
    --board-lane-offset: 5px;
    --board-lane-width: 5px;
    --scene-dialogue-max-w: 252px;
    --scene-dialogue-gap: 8px;
    --scene-dialogue-font: 0.94rem;
    --cat-dialogue-width: 132px;
    --cat-dialogue-top: -12px;
    --counter-top-pad: 16px;
    --counter-max-w: 320px;
    --counter-left-col: 68px;
    --counter-center-min: 122px;
    --counter-right-col: 54px;
    --counter-gap: 7px;
    --counter-min-h: 124px;
    --counter-pad-top: 12px;
    --counter-pad-x: 8px;
    --counter-pad-bottom: 10px;
    --speaker-min-h: 72px;
    --active-order-min-h: 92px;
    --active-order-pad-top: 6px;
    --active-order-pad-bottom: 12px;
    --active-order-badge-w: 88px;
    --active-order-badge-h: 72px;
    --active-order-symbol-size: 74px;
    --score-clock-min-h: 90px;
    --score-clock-case-min-h: 70px;
    --score-clock-font: 1.1rem;
    --score-clock-font-compact: 0.9rem;
    --score-clock-font-tight: 0.78rem;
    --score-clock-font-ultra: 0.68rem;
  }

  body.platform-yandex .queue-zone {
    grid-auto-rows: max-content;
    align-content: start;
    justify-items: stretch;
  }

  body.platform-yandex .board-shell,
  body.platform-yandex .counter-set {
    width: 100%;
    max-width: none;
  }

  body.platform-yandex .counter-set {
    width: 100%;
  }

  :root {
    --shell-pad-x: 8px;
    --shell-pad-y: 10px;
    --panel-pad: 6px;
    --panel-radius: 24px;
    --stage-min-h: 520px;
    --queue-gap: 6px;
    --queue-pad-top: 24px;
    --queue-pad-x: 4px;
    --queue-pad-bottom: 10px;
    --board-max-w: 100%;
    --board-pad: 6px;
    --board-radius: 18px;
    --board-gap: 4px;
    --board-lane-offset: 5px;
    --board-lane-width: 5px;
    --cell-radius: 14px;
    --cell-inner-inset: 5px;
    --cell-inner-radius: 10px;
    --customer-scale: 1;
    --scene-dialogue-max-w: 252px;
    --scene-dialogue-gap: 8px;
    --scene-dialogue-pad-x: 12px;
    --scene-dialogue-pad-top: 9px;
    --scene-dialogue-pad-bottom: 10px;
    --scene-dialogue-radius: 18px;
    --scene-dialogue-font: 0.94rem;
    --cat-dialogue-width: 132px;
    --cat-dialogue-top: -12px;
    --cat-dialogue-pad-x: 8px;
    --cat-dialogue-pad-top: 6px;
    --cat-dialogue-pad-bottom: 7px;
    --cat-dialogue-font: 0.72rem;
    --counter-top-pad: 16px;
    --counter-max-w: 320px;
    --counter-left-col: 68px;
    --counter-center-min: 122px;
    --counter-right-col: 54px;
    --counter-gap: 7px;
    --counter-min-h: 124px;
    --counter-pad-top: 12px;
    --counter-pad-x: 8px;
    --counter-pad-bottom: 10px;
    --speaker-min-h: 72px;
    --active-order-min-h: 92px;
    --active-order-pad-top: 6px;
    --active-order-pad-bottom: 12px;
    --active-order-badge-w: 88px;
    --active-order-badge-h: 72px;
    --active-order-symbol-size: 74px;
    --score-clock-min-h: 90px;
    --score-clock-case-min-h: 70px;
    --score-clock-font: 1.1rem;
    --score-clock-font-compact: 0.9rem;
    --score-clock-font-tight: 0.78rem;
    --score-clock-font-ultra: 0.68rem;
  }

  .game-panel,
  .overlay-card {
    border-radius: var(--panel-radius);
  }

  .app-shell {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .hud {
    align-items: stretch;
    gap: 8px;
  }

  .brand-card {
    gap: 6px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-mark img {
    width: 28px;
    height: 28px;
  }

  .brand-card h1 {
    font-size: 1.26rem;
    line-height: 0.9;
  }

  .eyebrow {
    font-size: 0.56rem;
    letter-spacing: 0.12em;
  }

  .play-area {
    margin-top: 6px;
  }

  body.platform-yandex .app-shell {
    height: auto;
    min-height: 100dvh;
    padding-top: max(14px, env(safe-area-inset-top));
  }

  body.platform-yandex .game-layout {
    width: min(100%, 1320px);
    height: auto;
  }

  body.platform-yandex .game-panel {
    display: block;
    min-height: 0;
    height: auto;
    overflow: visible;
    padding: var(--panel-pad);
    border-radius: var(--panel-radius);
  }

  body.platform-yandex .hud {
    align-items: stretch;
    gap: 8px;
  }

  body.platform-yandex .brand-card {
    gap: 6px;
  }

  body.platform-yandex .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  body.platform-yandex .brand-mark img {
    width: 28px;
    height: 28px;
  }

  body.platform-yandex .brand-card h1 {
    font-size: 1.26rem;
    line-height: 0.9;
  }

  body.platform-yandex .play-area {
    display: block;
    flex: none;
    min-height: auto;
    margin-top: 6px;
  }

  body.platform-yandex .scene-panel {
    display: grid;
    gap: 16px;
    min-height: auto;
    height: auto;
  }

  body.platform-yandex .facility-stage {
    flex: none;
    min-height: var(--stage-min-h);
    height: auto;
    border-radius: 24px;
  }

  .facility-stage {
    border-radius: 24px;
  }

  .queue-zone {
    justify-items: stretch;
  }

  .board-shell,
  .counter-set {
    width: 100%;
    max-width: none;
  }

  body.platform-yandex .board-shell,
  body.platform-yandex .counter-set {
    width: 100%;
    max-width: none;
  }

  body.platform-yandex .counter-set {
    width: 100%;
    padding-top: var(--counter-top-pad);
  }

  .speaker-toggle {
    border-radius: 18px;
  }

  .speaker-led {
    right: 10px;
    top: 10px;
    width: 14px;
    height: 14px;
  }

  .speaker-notch {
    top: 10px;
    width: 20px;
    height: 6px;
  }

  .speaker-grill {
    width: 34px;
    height: 34px;
    bottom: 8px;
  }

  .cat-mascot {
    left: 8px;
    top: -6px;
    width: 74px;
    height: 60px;
    transform: scale(0.84);
    transform-origin: top left;
  }

  .frontal-counter .cat-mascot {
    left: 4px;
    top: -14px;
    width: 78px;
    height: 62px;
    transform: scale(0.84);
  }

  body.platform-yandex .frontal-counter .cat-mascot {
    left: 4px;
    top: -14px;
    width: 78px;
    height: 62px;
    transform: scale(0.84);
  }

  .frontal-counter .cat-tail {
    right: 18px;
    top: 38px;
    width: 14px;
    height: 16px;
    border-width: 4px;
    transform: rotate(46deg);
  }

  .cell {
    aspect-ratio: 0.88 / 1;
  }

  .customer-shadow {
    left: 50%;
    bottom: 6px;
    width: 32px;
    height: 8px;
  }

  .customer-figure {
    left: 50%;
    bottom: 4px;
    width: 54px;
    height: 62px;
  }

  .customer-body {
    bottom: 12px;
    width: 30px;
    height: 24px;
  }

  .customer-legs {
    bottom: 3px;
    width: 16px;
    height: 14px;
  }

  .customer-legs::before,
  .customer-legs::after {
    width: 5px;
    height: 12px;
  }

  .customer-legs::before {
    left: 2px;
  }

  .customer-legs::after {
    right: 2px;
  }

  .customer-head {
    top: 10px;
    width: 14px;
    height: 14px;
  }

  .customer-hair {
    top: 9px;
    width: 16px;
    height: 7px;
  }

  .customer-arm {
    top: 22px;
    width: 7px;
    height: 14px;
  }

  .arm-left {
    left: 8px;
  }

  .arm-right {
    right: 8px;
  }

  .customer-feet {
    bottom: 1px;
    width: 18px;
    height: 5px;
  }

  .customer-figure.body-slim .customer-body {
    width: 26px;
    height: 22px;
  }

  .customer-figure.body-slim .customer-legs {
    width: 14px;
  }

  .customer-figure.body-average .customer-body {
    width: 30px;
  }

  .customer-figure.body-broad .customer-body {
    width: 34px;
    height: 26px;
  }

  .customer-figure.body-broad .customer-legs {
    width: 18px;
  }

  .customer-figure.posture-upright .customer-head {
    top: 10px;
  }

  .customer-figure.posture-lean .customer-body {
    transform: translateX(-50%) rotate(2deg);
  }

  .customer-figure.posture-lean .customer-head {
    left: calc(50% + 1px);
    top: 11px;
  }

  .customer-figure.posture-lean .customer-arm.arm-left {
    transform: rotate(10deg);
  }

  .customer-figure.posture-lean .customer-arm.arm-right {
    transform: rotate(-18deg);
  }

  .customer-figure.posture-slouch .customer-body {
    bottom: 11px;
    transform: translateX(-50%) rotate(-2deg);
  }

  .customer-figure.posture-slouch .customer-head {
    top: 12px;
    left: calc(50% - 1px);
  }

  .customer-figure.posture-slouch .customer-arm.arm-left,
  .customer-figure.posture-slouch .customer-arm.arm-right {
    top: 24px;
  }

  .customer-figure.top-shirt .customer-body::before {
    top: 3px;
    width: 7px;
    height: 5px;
  }

  .customer-figure.top-hoodie .customer-body {
    height: 26px;
  }

  .customer-figure.top-hoodie .customer-body::before {
    top: 0;
    width: 10px;
    height: 6px;
    border-width: 2px;
  }

  .customer-figure.top-coat .customer-body {
    height: 30px;
  }

  .customer-figure.top-coat .customer-body::before {
    top: 2px;
    width: 9px;
    height: calc(100% - 4px);
  }

  .customer-figure.hair-short .customer-hair {
    width: 15px;
    height: 6px;
  }

  .customer-figure.hair-bob .customer-hair {
    width: 18px;
    height: 9px;
  }

  .customer-figure.hair-bob .customer-hair::after {
    left: 3px;
    right: 3px;
    bottom: -3px;
    height: 4px;
  }

  .customer-figure.hair-long .customer-hair {
    width: 18px;
    height: 8px;
  }

  .customer-figure.hair-long .customer-hair::after {
    left: 4px;
    right: 4px;
    top: 5px;
    height: 10px;
  }

  .customer-figure.hair-bun .customer-hair {
    width: 16px;
    height: 6px;
  }

  .customer-figure.hair-bun .customer-hair::after {
    top: -3px;
    width: 6px;
    height: 6px;
  }

  .customer-figure.hair-cap .customer-hair {
    width: 16px;
    height: 6px;
  }

  .customer-figure.hair-cap .customer-hair::before {
    top: -2px;
    height: 6px;
  }

  .customer-figure.hair-cap .customer-hair::after {
    right: -4px;
    top: 3px;
    width: 6px;
    height: 3px;
  }

  .customer-figure.hair-hood .customer-hair {
    width: 19px;
    height: 10px;
  }

  .customer-figure.hair-hood .customer-hair::after {
    left: 4px;
    right: 4px;
    top: 2px;
    height: 5px;
  }

  .customer-figure.accessory-backpack .customer-accessory {
    left: 9px;
    top: 21px;
    width: 10px;
    height: 14px;
  }

  .customer-figure.accessory-backpack .customer-accessory::before,
  .customer-figure.accessory-backpack .customer-accessory::after {
    top: 2px;
    width: 3px;
    height: 10px;
  }

  .customer-figure.accessory-shopper .customer-accessory {
    right: 6px;
    top: 25px;
    width: 10px;
    height: 12px;
  }

  .customer-figure.accessory-shopper .customer-accessory::before {
    left: 2px;
    right: 2px;
    top: -4px;
    height: 6px;
  }

  .customer-figure.accessory-phone .customer-accessory {
    right: 7px;
    top: 27px;
    width: 6px;
    height: 9px;
  }

  .customer-figure.persona-shurik .customer-detail,
  .customer-figure.persona-bureaucrat .customer-detail,
  .customer-figure.persona-it-hoodie .customer-detail {
    top: 14px;
    width: 14px;
    height: 5px;
  }

  .customer-figure.persona-shurik .customer-detail::before,
  .customer-figure.persona-shurik .customer-detail::after,
  .customer-figure.persona-bureaucrat .customer-detail::before,
  .customer-figure.persona-bureaucrat .customer-detail::after,
  .customer-figure.persona-it-hoodie .customer-detail::before,
  .customer-figure.persona-it-hoodie .customer-detail::after {
    width: 5px;
    height: 5px;
  }

  .customer-figure.persona-neo .customer-detail {
    top: 13px;
    width: 15px;
    height: 5px;
  }

  .customer-figure.persona-neo .customer-detail::before,
  .customer-figure.persona-neo .customer-detail::after {
    top: 1px;
    width: 6px;
    height: 3px;
  }

  .customer-figure.persona-punk .customer-detail {
    top: 24px;
    width: 12px;
    height: 4px;
  }

  .customer-figure.persona-punk .customer-detail::before,
  .customer-figure.persona-punk .customer-detail::after {
    top: 1px;
    width: 3px;
    height: 3px;
  }

  .customer-figure.persona-service-aunt .customer-detail {
    top: 23px;
    width: 14px;
    height: 9px;
  }

  .customer-figure.persona-gopnik .customer-detail {
    top: 26px;
    width: 14px;
    height: 5px;
  }

  .customer-figure.persona-shurik .customer-body {
    bottom: 13px;
  }

  .customer-figure.persona-bureaucrat .customer-body {
    height: 28px;
  }

  .customer-figure.persona-neo .customer-body {
    height: 30px;
  }

  .customer-figure.persona-punk .customer-hair {
    width: 18px;
  }

  .customer-figure.persona-service-aunt .customer-body {
    width: 34px;
  }

  .customer-figure.persona-service-aunt .customer-accessory {
    top: 24px;
    width: 11px;
    height: 13px;
  }

  .scene-dialogue {
    box-shadow:
      0 10px 18px rgba(29, 38, 44, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.62);
  }

  .scene-dialogue-text {
    line-height: 1.14;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .frontal-counter .score-clock-case {
    padding: 10px 8px 8px;
    border-radius: 18px;
  }

  .frontal-counter .score-clock-display {
    padding-top: 22px;
    letter-spacing: 0.1em;
  }

  .frontal-counter .score-clock-display.is-compact {
    letter-spacing: 0.04em;
  }

  .cat-dialogue {
    left: calc(100% - 12px);
    top: -8px;
    width: 122px;
  }

  body.platform-yandex .cat-dialogue {
    left: calc(100% - 12px);
    top: -8px;
    width: 122px;
  }

  .author-plaque {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    margin-top: 14px;
    margin-bottom: max(8px, env(safe-area-inset-bottom));
    padding: 12px;
    border-radius: 20px;
  }

  .author-plaque-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .author-plaque-mark img {
    width: 34px;
    height: 34px;
  }

  .author-plaque strong {
    font-size: 1rem;
  }

  .author-plaque-role {
    font-size: 0.8rem;
  }

  .author-plaque-license {
    font-size: 0.8rem;
  }

  .author-plaque-summary {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .author-plaque-link {
    font-size: 0.8rem;
  }

  .overlay {
    place-items: start center;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }

  .overlay-card {
    width: 100%;
    max-height: calc(100svh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    padding: 18px 16px;
    border-radius: 24px;
  }

  .overlay-card h2 {
    font-size: clamp(1.5rem, 7.2vw, 2.2rem);
  }

  .results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
  }

  .results-grid > div {
    min-width: 0;
    padding: 12px 10px;
  }

  .results-grid strong {
    font-size: 1.08rem;
  }

  .overlay-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 18px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    padding: 14px 16px;
  }
}

@media (min-width: 761px) and (max-height: 760px) {
  body.platform-yandex {
    --shell-pad-y: 6px;
    --panel-pad: 8px;
    --stage-min-h: clamp(430px, calc(100dvh - 112px), 580px);
    --queue-pad-top: clamp(18px, 2.8dvh, 28px);
    --queue-pad-bottom: clamp(6px, 0.9dvh, 10px);
    --board-max-w: clamp(280px, min(38dvh, 31vw), 352px);
    --board-pad: clamp(6px, 0.7vw, 10px);
    --board-gap: clamp(4px, 0.55vw, 6px);
    --scene-dialogue-max-w: clamp(260px, 24vw, 320px);
    --cat-dialogue-width: clamp(136px, 14vw, 160px);
    --counter-max-w: clamp(360px, min(50dvh, 44vw), 490px);
    --counter-top-pad: clamp(12px, 1.4dvh, 16px);
    --counter-left-col: clamp(76px, 8.8dvh, 94px);
    --counter-right-col: clamp(58px, 6.8dvh, 74px);
    --counter-min-h: clamp(122px, 15dvh, 164px);
    --counter-pad-top: clamp(10px, 1dvh, 14px);
    --counter-pad-bottom: clamp(8px, 0.9dvh, 12px);
    --active-order-min-h: clamp(84px, 10.5dvh, 110px);
    --active-order-badge-w: clamp(78px, 9.4dvh, 100px);
    --active-order-badge-h: clamp(64px, 7.8dvh, 84px);
    --active-order-symbol-size: clamp(68px, 8.5dvh, 88px);
    --score-clock-min-h: clamp(82px, 9.2dvh, 102px);
    --score-clock-case-min-h: clamp(66px, 7.3dvh, 84px);
    --score-clock-font: clamp(1.04rem, 1.24vw, 1.42rem);
    --speaker-min-h: clamp(76px, 8.4dvh, 92px);
  }

  body.platform-yandex .brand-card h1 {
    font-size: clamp(1.18rem, 1.5vw, 1.66rem);
  }

  body.platform-yandex .play-area {
    margin-top: 6px;
  }

  body.platform-yandex .frontal-counter .cat-mascot {
    top: -28px;
    width: 92px;
    height: 74px;
  }

  body.platform-yandex .cat-dialogue {
    top: -14px;
  }
}
