:root {
  color-scheme: dark;
  --bg: #070907;
  --panel: #101510;
  --panel-strong: #172017;
  --line: #31513a;
  --line-hot: #4df27d;
  --text: #e8ffe9;
  --muted: #a9c8ad;
  --green: #46f06f;
  --amber: #f6bb47;
  --cyan: #45c8f4;
  --red: #ff5c5c;
  --paper: #f2e9c8;
  --shadow: rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(70, 240, 111, 0.12), transparent 34rem),
    linear-gradient(135deg, #070907 0%, #0b120d 44%, #130f0a 100%);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

button {
  font: inherit;
  touch-action: manipulation;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0.04;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
}

body.guest-screen .scanlines {
  display: none;
}

.app-shell {
  width: min(1440px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: calc(12px + env(safe-area-inset-top)) auto calc(12px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  overflow: hidden;
}

.topbar,
.statusline,
.panel,
.terminal-panel {
  border: 1px solid var(--line);
  background: rgba(16, 21, 16, 0.94);
  box-shadow: 0 14px 36px var(--shadow), inset 0 0 0 1px rgba(77, 242, 125, 0.05);
}

.topbar {
  min-height: 74px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  position: relative;
  overflow: hidden;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 2px solid var(--green);
  display: grid;
  place-items: center;
  background: #07130b;
  box-shadow: inset 0 0 0 1px rgba(7, 19, 11, 0.22), 0 0 16px rgba(70, 240, 111, 0.16);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-mark span {
  position: absolute;
  right: 2px;
  bottom: 2px;
  padding: 1px 3px;
  border: 1px solid rgba(7, 19, 11, 0.64);
  border-radius: 3px;
  color: #07130b;
  background: rgba(246, 187, 71, 0.9);
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.08rem, 2vw, 1.72rem);
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--green);
  text-shadow: 0 0 14px rgba(70, 240, 111, 0.3);
}

#tagline {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #0b120d;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(70, 240, 111, 0.2);
}

.icon-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-button {
  width: auto;
  min-width: 108px;
  white-space: nowrap;
}

.tips-button {
  width: auto;
  min-width: 102px;
  white-space: nowrap;
}

.tips-button.off {
  color: var(--muted);
}

.rating-button {
  width: auto;
  min-width: 82px;
  white-space: nowrap;
}

.account-button {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, max-content);
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  min-width: 78px;
  max-width: 220px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.account-avatar {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid rgba(69, 200, 244, 0.6);
  border-radius: 50%;
  object-fit: cover;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--line-hot);
  color: var(--green);
  outline: none;
}

.game-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
  grid-template-areas:
    "terminal side"
    "map map";
  align-items: start;
  gap: 10px;
  overflow: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  padding: 1px;
}

.panel,
.terminal-panel {
  border-radius: var(--radius);
}

.panel {
  min-width: 0;
  padding: 10px;
}

.panel-heading,
.terminal-header,
.statusline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.map-panel {
  grid-area: map;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.real-cafes {
  display: grid;
  gap: 10px;
}

.real-cafes-intro {
  padding: 10px;
  border: 1px solid rgba(70, 240, 111, 0.34);
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, rgba(70, 240, 111, 0.06) 0 8px, transparent 8px 16px),
    rgba(5, 18, 9, 0.86);
}

.real-cafes-intro h3 {
  margin-top: 5px;
  color: var(--green);
  font-size: 1rem;
  line-height: 1.18;
}

.real-cafes-intro p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.real-cafes-main-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 9px;
  padding: 6px 9px;
  border: 1px solid rgba(69, 200, 244, 0.52);
  border-radius: 6px;
  background: rgba(69, 200, 244, 0.1);
  color: var(--cyan);
  text-decoration: none;
}

.real-cafes-main-link:hover,
.real-cafes-main-link:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.real-cafe-list {
  display: grid;
  gap: 8px;
}

.real-cafe-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  padding: 8px 9px;
  border: 1px solid rgba(115, 150, 123, 0.36);
  border-radius: 6px;
  background: rgba(6, 15, 8, 0.78);
}

.real-cafe-row.current {
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(70, 240, 111, 0.18);
}

.real-cafe-row b {
  min-width: 0;
  color: var(--paper);
  font-size: 0.86rem;
  line-height: 1.16;
}

.real-cafe-row span {
  color: var(--amber);
  font-size: 0.74rem;
  line-height: 1.18;
  text-align: right;
}

.real-cafe-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.real-cafe-copy a,
.real-cafe-row a,
.help-card a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terminal-panel {
  grid-area: terminal;
  position: sticky;
  top: 10px;
  z-index: 3;
  min-height: min(580px, calc(100vh - 148px));
  max-height: calc(100vh - 112px);
  display: grid;
  grid-template-rows: auto minmax(92px, auto) auto 1fr auto;
  padding: 12px;
  overflow: auto;
  overflow-anchor: none;
  background:
    linear-gradient(90deg, rgba(70, 240, 111, 0.04) 50%, transparent 50%) 0 0 / 10px 10px,
    rgba(7, 10, 7, 0.96);
}

.terminal-header {
  min-height: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.terminal-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px var(--green);
}

.scene-art {
  min-height: 86px;
  margin: 10px 0 3px;
  color: var(--cyan);
  font-size: clamp(0.58rem, 1.22vw, 0.82rem);
  line-height: 1.05;
  white-space: pre;
  overflow: hidden;
}

.compact-guest-scene .terminal-header {
  min-height: 14px;
  padding-bottom: 6px;
}

.compact-guest-scene .scene-art {
  display: none;
}

.order-stage {
  display: none;
}

.guest-screen .order-stage:not(:empty) {
  display: block;
  grid-column: 1 / -1;
  grid-row: auto;
  min-width: 0;
  margin-top: 1px;
}

.order-stage-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(69, 200, 244, 0.44);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(69, 200, 244, 0.05) 50%, transparent 50%) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(8, 20, 19, 0.94), rgba(5, 10, 7, 0.98));
  box-shadow: inset 0 0 0 1px rgba(70, 240, 111, 0.05);
}

.stage-speech {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 3;
  width: clamp(158px, 30%, 238px);
  min-height: 38px;
  max-height: 58px;
  padding: 5px 8px 6px;
  border: 1px solid rgba(70, 240, 111, 0.72);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(70, 240, 111, 0.06) 50%, transparent 50%) 0 0 / 8px 8px,
    rgba(5, 13, 7, 0.94);
  box-shadow: 0 0 14px rgba(70, 240, 111, 0.1);
}

.stage-speech::before {
  content: "";
  position: absolute;
  left: 16px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid rgba(70, 240, 111, 0.72);
  border-bottom: 1px solid rgba(70, 240, 111, 0.72);
  background: rgba(5, 13, 7, 0.94);
  transform: rotate(45deg);
}

.stage-speech::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 6px;
  height: 12px;
  background: var(--green);
  opacity: 0.72;
}

.stage-speech.is-done::after {
  opacity: 0;
  animation: none;
}

.stage-speech span,
.stage-speech b {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.stage-speech span {
  color: var(--amber);
  font-size: 0.48rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.stage-speech b {
  display: -webkit-box;
  padding-right: 10px;
  color: var(--paper);
  font-size: 0.56rem;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.stage-rail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(56px, 0.15fr) minmax(92px, 0.22fr) minmax(0, 1fr) minmax(74px, 0.18fr);
  gap: 7px;
  align-items: end;
  min-height: 144px;
  padding: 51px 7px 7px;
}

.stage-rail::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  height: 20px;
  border-top: 1px solid rgba(246, 187, 71, 0.5);
  background:
    repeating-linear-gradient(90deg, rgba(246, 187, 71, 0.14) 0 9px, transparent 9px 18px),
    rgba(18, 22, 12, 0.78);
}

.stage-person,
.stage-counter,
.stage-tray,
.stage-cash {
  position: relative;
  z-index: 1;
}

.stage-prep-flow {
  pointer-events: none;
  position: absolute;
  left: 32%;
  right: 18%;
  top: 55%;
  z-index: 2;
  height: 18px;
  opacity: 0;
}

.stage-prep-flow::before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  top: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 187, 71, 0.72), rgba(70, 240, 111, 0.74), transparent);
}

.stage-prep-flow i {
  position: absolute;
  left: 0;
  top: 3px;
  width: 9px;
  height: 9px;
  border: 1px solid rgba(246, 187, 71, 0.92);
  border-radius: 3px;
  background: rgba(70, 240, 111, 0.18);
  box-shadow: 0 0 10px rgba(70, 240, 111, 0.34);
}

.stage-prep-flow i:nth-child(2) {
  animation-delay: 150ms;
}

.stage-prep-flow i:nth-child(3) {
  animation-delay: 300ms;
}

.stage-person {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  min-height: 72px;
  animation: stageGuestIdle 1900ms ease-in-out infinite;
}

.stage-guest > .person-head,
.stage-guest > .person-body,
.stage-guest > b {
  position: relative;
  z-index: 4;
}

.person-head {
  position: relative;
  width: 27px;
  height: 24px;
  border: 1px solid rgba(227, 242, 218, 0.78);
  border-radius: 4px 4px 6px 6px;
  background: #d9b58d;
  box-shadow: inset 0 -5px 0 rgba(88, 49, 28, 0.18);
}

.person-head::before,
.person-head::after {
  content: "";
  position: absolute;
  top: 9px;
  width: 3px;
  height: 3px;
  background: #07130b;
}

.person-head::before {
  left: 7px;
}

.person-head::after {
  right: 7px;
}

.face-hair {
  position: absolute;
  top: -4px;
  right: 2px;
  left: 2px;
  height: 7px;
  border-radius: 6px 6px 2px 2px;
  background: #4b2a15;
}

.face-mouth {
  position: absolute;
  left: 9px;
  bottom: 5px;
  width: 9px;
  height: 4px;
  border-bottom: 1px solid #07130b;
  border-radius: 0 0 10px 10px;
}

.is-warm .stage-guest .face-mouth,
.is-cheerful .stage-guest .face-mouth,
.guest-carry .face-mouth {
  bottom: 4px;
  height: 5px;
  border-bottom-width: 2px;
  transform: rotate(0deg);
}

.is-tense .stage-guest .face-mouth {
  bottom: 3px;
  border-top: 1px solid #07130b;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.order-stage-shell[data-stage-guest="flow"] .stage-guest .face-hair {
  right: 7px;
  left: 1px;
  background: #2f2312;
  transform: skewX(-16deg);
}

.order-stage-shell[data-stage-guest="friend"] .stage-guest .face-hair,
.order-stage-shell[data-stage-guest="event"] .stage-guest .face-hair {
  background: #3c1a54;
}

.order-stage-shell[data-stage-guest="tourist"] .stage-guest .face-hair,
.order-stage-shell[data-stage-guest="gift"] .stage-guest .face-hair {
  background: #18445a;
}

.order-stage-shell[data-stage-guest="strange"] .stage-guest .face-hair {
  right: 8px;
  left: 0;
  background: #101010;
  transform: rotate(-5deg);
}

.order-stage-shell[data-stage-guest="dog"] .stage-guest .face-hair {
  background: #6b3c1a;
}

.person-body {
  width: 34px;
  height: 34px;
  margin-top: -1px;
  border: 1px solid rgba(69, 200, 244, 0.58);
  border-radius: 5px 5px 2px 2px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 8px),
    #123543;
}

.stage-person b {
  margin-top: 3px;
  color: var(--cyan);
  font-size: 0.58rem;
  line-height: 1;
}

.guest-crowd {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 1;
  width: 82px;
  height: 54px;
  transform: translateX(-50%);
}

.crowd-person {
  position: absolute;
  bottom: 0;
  display: grid;
  justify-items: center;
  opacity: 0.92;
  filter: drop-shadow(0 0 7px rgba(69, 200, 244, 0.12));
  animation: crowdBob 1800ms ease-in-out infinite;
}

.crowd-person em,
.crowd-person strong {
  display: block;
  position: relative;
}

.crowd-person em {
  width: 17px;
  height: 15px;
  border: 1px solid rgba(227, 242, 218, 0.55);
  border-radius: 4px 4px 6px 6px;
  background: #d9b58d;
  box-shadow: inset 0 -3px 0 rgba(88, 49, 28, 0.14);
}

.crowd-person em::before,
.crowd-person em::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 2px;
  height: 2px;
  background: #07130b;
}

.crowd-person em::before {
  left: 5px;
}

.crowd-person em::after {
  right: 5px;
}

.crowd-person strong {
  width: 20px;
  height: 19px;
  margin-top: -1px;
  border: 1px solid rgba(69, 200, 244, 0.42);
  border-radius: 4px 4px 2px 2px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 7px),
    #123543;
}

.crowd-person-1 {
  left: 2px;
  bottom: 2px;
  --crowd-scale: 0.86;
  animation-delay: 110ms;
}

.crowd-person-2 {
  right: 2px;
  bottom: 3px;
  --crowd-scale: 0.84;
  animation-delay: 240ms;
}

.crowd-person-3 {
  left: 17px;
  bottom: 18px;
  --crowd-scale: 0.72;
  animation-delay: 360ms;
}

.crowd-person-4 {
  right: 17px;
  bottom: 17px;
  --crowd-scale: 0.7;
  animation-delay: 490ms;
}

.crowd-person-5 {
  left: 35px;
  bottom: 7px;
  --crowd-scale: 0.78;
  animation-delay: 620ms;
}

.guest-crowd-flow .crowd-person strong {
  border-color: rgba(246, 187, 71, 0.58);
  background: #463918;
}

.guest-crowd-event .crowd-person strong,
.guest-crowd-friend .crowd-person strong {
  border-color: rgba(184, 115, 255, 0.62);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0 3px, transparent 3px 6px),
    #351c54;
}

.guest-crowd-tourist .crowd-person strong,
.guest-crowd-gift .crowd-person strong {
  border-color: rgba(69, 200, 244, 0.7);
  background: #153f4d;
}

.guest-crowd-dog .crowd-person strong,
.guest-crowd-regular .crowd-person strong,
.guest-crowd-coffee .crowd-person strong {
  border-color: rgba(70, 240, 111, 0.62);
  background: #173d25;
}

.guest-crowd-strange .crowd-person strong {
  border-color: rgba(255, 89, 168, 0.62);
  background: #4b183a;
}

.order-stage-shell[data-stage-guest="flow"] .stage-guest .person-body {
  border-color: rgba(246, 187, 71, 0.72);
  background: #463918;
}

.order-stage-shell[data-stage-guest="friend"] .stage-guest .person-body,
.order-stage-shell[data-stage-guest="event"] .stage-guest .person-body {
  border-color: rgba(184, 115, 255, 0.82);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 4px, transparent 4px 8px),
    #351c54;
}

.order-stage-shell[data-stage-guest="dog"] .stage-guest .person-body {
  border-color: rgba(246, 187, 71, 0.72);
  background:
    repeating-linear-gradient(90deg, rgba(70, 240, 111, 0.16) 0 4px, transparent 4px 9px),
    #25421d;
}

.guest-dog {
  position: absolute;
  left: -13px;
  bottom: 12px;
  z-index: 5;
  width: 29px;
  height: 17px;
  border: 1px solid rgba(227, 242, 218, 0.78);
  border-radius: 10px 8px 5px 5px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 6px, transparent 6px 100%),
    #8a683e;
  box-shadow: 0 0 12px rgba(246, 187, 71, 0.16);
  animation: dogWag 620ms ease-in-out infinite;
}

.guest-dog::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 1px;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(227, 242, 218, 0.68);
  border-radius: 50% 50% 4px 4px;
  background: #a57b4a;
}

.guest-dog::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 4px;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: #a57b4a;
  transform-origin: left center;
  animation: dogTailWag 360ms ease-in-out infinite;
}

.guest-dog i {
  position: absolute;
  left: -5px;
  top: 5px;
  width: 2px;
  height: 2px;
  background: #07130b;
}

.guest-dog em {
  position: absolute;
  right: -13px;
  top: -19px;
  padding: 2px 4px;
  border: 1px solid rgba(246, 187, 71, 0.72);
  border-radius: 5px;
  color: var(--amber);
  background: rgba(7, 13, 8, 0.92);
  font-size: 0.43rem;
  font-style: normal;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  animation: dogBarkBubble 2600ms ease-in-out infinite;
}

.order-stage-shell[data-stage-guest="strange"] .stage-guest .person-body {
  border-color: rgba(255, 89, 168, 0.82);
  background: #4b183a;
}

.order-stage-shell[data-stage-guest="regular"] .stage-guest .person-body,
.order-stage-shell[data-stage-guest="coffee"] .stage-guest .person-body {
  border-color: rgba(70, 240, 111, 0.74);
  background: #173d25;
}

.order-stage-shell[data-stage-guest="tourist"] .stage-guest .person-body,
.order-stage-shell[data-stage-guest="gift"] .stage-guest .person-body {
  border-color: rgba(69, 200, 244, 0.82);
  background:
    repeating-linear-gradient(90deg, rgba(246, 187, 71, 0.2) 0 4px, transparent 4px 8px),
    #153f4d;
}

.order-stage-shell[data-stage-guest="boss"] .stage-guest {
  animation: stageBossBreathe 900ms ease-in-out infinite;
}

.order-stage-shell[data-stage-guest="boss"] .stage-guest .person-body {
  border-color: rgba(246, 187, 71, 0.9);
  background: #6a3511;
}

.order-stage-shell.is-idle .stage-guest .person-head {
  animation: guestTalk 1200ms steps(2, end) infinite;
}

.stage-counter {
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 5px;
  align-items: end;
  min-height: 74px;
  padding: 6px;
  border: 1px solid rgba(49, 81, 58, 0.86);
  border-radius: 6px;
  background: rgba(4, 12, 8, 0.84);
}

.stage-machine {
  position: relative;
  overflow: hidden;
  min-height: 55px;
  border: 1px solid rgba(69, 200, 244, 0.5);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(69, 200, 244, 0.16), rgba(69, 200, 244, 0.03)),
    #081416;
}

.stage-brand-mark {
  position: absolute;
  left: 5px;
  bottom: 5px;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(227, 242, 218, 0.76);
  border-radius: 3px;
  background: #07130b url("./assets/brand/coffee18plus-mark-dark.png") center / cover no-repeat;
  box-shadow: 0 0 10px rgba(70, 240, 111, 0.2);
}

.stage-machine::before {
  content: "COFFEE";
  position: absolute;
  top: 5px;
  left: 6px;
  color: var(--cyan);
  font-size: 0.48rem;
}

.stage-machine::after {
  content: "";
  position: absolute;
  right: 19px;
  bottom: 24px;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber), rgba(246, 187, 71, 0.1));
  opacity: 0;
}

.machine-cup {
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 24px;
  height: 15px;
  border: 2px solid #f06aa6;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.machine-cup::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 2px;
  width: 7px;
  height: 7px;
  border: 2px solid #f06aa6;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.machine-steam,
.machine-steam::before,
.machine-steam::after {
  position: absolute;
  bottom: 25px;
  width: 2px;
  height: 14px;
  border-radius: 999px;
  background: rgba(227, 242, 218, 0.72);
  animation: steamRise 950ms ease-in-out infinite;
}

.machine-steam {
  right: 23px;
}

.machine-steam::before,
.machine-steam::after {
  content: "";
  bottom: 0;
}

.machine-steam::before {
  right: 8px;
  animation-delay: 140ms;
}

.machine-steam::after {
  left: 8px;
  animation-delay: 260ms;
}

.machine-sparks {
  pointer-events: none;
  position: absolute;
  right: 12px;
  bottom: 27px;
  width: 34px;
  height: 22px;
  opacity: 0;
}

.machine-sparks i {
  position: absolute;
  left: 14px;
  bottom: 2px;
  width: 5px;
  height: 5px;
  border: 1px solid rgba(246, 187, 71, 0.86);
  border-radius: 50%;
  background: rgba(70, 240, 111, 0.38);
  box-shadow: 0 0 9px rgba(246, 187, 71, 0.42);
}

.machine-sparks i:nth-child(2) {
  --spark-x: -1;
  animation-delay: 90ms;
}

.machine-sparks i:nth-child(3) {
  --spark-x: 2;
  animation-delay: 170ms;
}

.machine-sparks i:nth-child(4) {
  --spark-x: -2;
  animation-delay: 250ms;
}

.stage-barista {
  display: grid;
  justify-items: center;
  align-content: end;
  min-height: 58px;
}

.stage-barista .person-head {
  width: 22px;
  height: 20px;
  background: #e4bd93;
  box-shadow: inset 0 -4px 0 rgba(105, 58, 34, 0.15);
}

.stage-barista .face-hair {
  left: 1px;
  right: 1px;
  height: 6px;
  border-radius: 6px 6px 2px 2px;
  background: #271a12;
}

.stage-barista .face-mouth {
  bottom: 4px;
  height: 5px;
  border-bottom-width: 2px;
}

.stage-barista .person-body {
  position: relative;
  width: 28px;
  height: 29px;
  border-color: rgba(227, 242, 218, 0.72);
  background:
    linear-gradient(180deg, transparent 0 9px, rgba(70, 240, 111, 0.72) 9px 100%),
    linear-gradient(90deg, transparent 0 9px, rgba(7, 19, 11, 0.6) 9px 19px, transparent 19px 100%),
    #171717;
}

.stage-barista .person-body::before,
.stage-barista .person-body::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 7px;
  height: 1px;
  background: rgba(227, 242, 218, 0.5);
}

.stage-barista .person-body::before {
  left: 4px;
  transform: rotate(-28deg);
}

.stage-barista .person-body::after {
  right: 4px;
  transform: rotate(28deg);
}

.barista-apron-logo {
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(7, 19, 11, 0.55);
  border-radius: 3px;
  background: #07130b url("./assets/brand/coffee18plus-mark-dark.png") center / cover no-repeat;
  transform: translateX(-50%);
}

.stage-barista b {
  color: var(--green);
}

.stage-tray {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 100px;
  padding: 6px;
  border: 1px solid rgba(246, 187, 71, 0.52);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(246, 187, 71, 0.08), rgba(246, 187, 71, 0.02)),
    rgba(7, 9, 7, 0.86);
}

.stage-tray::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 38%, rgba(246, 187, 71, 0.05) 48%, transparent 58% 100%);
  opacity: 0.08;
}

.tray-title {
  display: flex;
  justify-content: space-between;
  color: var(--amber);
  font-size: 0.58rem;
  line-height: 1;
}

.tray-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 5px;
  margin-top: 5px;
}

.order-item {
  position: relative;
  min-width: 0;
  min-height: 45px;
  padding: 4px 4px 3px;
  border: 1px solid rgba(115, 150, 123, 0.46);
  border-radius: 5px;
  background: rgba(7, 13, 8, 0.8);
  text-align: center;
}

.order-item.is-new {
  border-color: var(--green);
  animation: orderItemPop 520ms cubic-bezier(0.18, 0.72, 0.16, 1) both;
}

.order-fly {
  pointer-events: none;
  position: fixed;
  z-index: 90;
  backface-visibility: hidden;
  contain: paint;
  width: 62px;
  min-height: 50px;
  margin-left: -31px;
  margin-top: -25px;
  padding: 5px 4px 3px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: rgba(7, 13, 8, 0.94);
  text-align: center;
  box-shadow: 0 0 18px rgba(70, 240, 111, 0.28);
  animation: orderFlyToTray 1050ms cubic-bezier(0.18, 0.72, 0.16, 1) both;
  will-change: transform, opacity;
}

.guest-carry {
  pointer-events: none;
  position: fixed;
  z-index: 92;
  display: grid;
  justify-items: center;
  width: 50px;
  margin-left: -25px;
  margin-top: -30px;
  filter: drop-shadow(0 0 12px rgba(70, 240, 111, 0.24));
  animation: guestCarryOrder 1050ms cubic-bezier(0.18, 0.72, 0.18, 1) both;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.guest-carry .person-head {
  width: 22px;
  height: 20px;
}

.guest-carry .person-body {
  width: 29px;
  height: 30px;
  border-color: rgba(70, 240, 111, 0.74);
  background: #173d25;
}

.guest-carry .guest-crowd {
  bottom: 19px;
  width: 62px;
  height: 42px;
  transform: translateX(-50%) scale(0.82);
  transform-origin: bottom center;
}

.guest-carry .guest-dog {
  left: -8px;
  bottom: 7px;
  width: 23px;
  height: 14px;
}

.guest-carry .guest-dog em {
  display: none;
}

.order-stage-shell[data-stage-guest="default"] .stage-guest .person-head,
.guest-carry-default .person-head {
  background: #d9b58d;
}

.order-stage-shell[data-stage-guest="flow"] .stage-guest .person-head,
.guest-carry-flow .person-head {
  background: #d7a56f;
}

.order-stage-shell[data-stage-guest="friend"] .stage-guest .person-head,
.order-stage-shell[data-stage-guest="event"] .stage-guest .person-head,
.guest-carry-friend .person-head,
.guest-carry-event .person-head {
  background: #d8a7bd;
}

.order-stage-shell[data-stage-guest="tourist"] .stage-guest .person-head,
.order-stage-shell[data-stage-guest="gift"] .stage-guest .person-head,
.guest-carry-tourist .person-head,
.guest-carry-gift .person-head {
  background: #d8bf87;
}

.order-stage-shell[data-stage-guest="strange"] .stage-guest .person-head,
.guest-carry-strange .person-head {
  background: #b6a4bd;
}

.order-stage-shell[data-stage-guest="dog"] .stage-guest .person-head,
.guest-carry-dog .person-head {
  background: #dfb685;
}

.order-stage-shell[data-stage-guest="boss"] .stage-guest .person-head,
.guest-carry-boss .person-head {
  background: #bf7658;
}

.guest-carry-flow .face-hair {
  right: 7px;
  left: 1px;
  background: #2f2312;
  transform: skewX(-16deg);
}

.guest-carry-friend .face-hair,
.guest-carry-event .face-hair {
  background: #3c1a54;
}

.guest-carry-tourist .face-hair,
.guest-carry-gift .face-hair {
  background: #18445a;
}

.guest-carry-strange .face-hair {
  right: 8px;
  left: 0;
  background: #101010;
  transform: rotate(-5deg);
}

.guest-carry-dog .face-hair {
  background: #6b3c1a;
}

.guest-carry-flow .person-body {
  border-color: rgba(246, 187, 71, 0.72);
  background: #463918;
}

.guest-carry-default .person-body {
  border-color: rgba(69, 200, 244, 0.58);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 8px),
    #123543;
}

.guest-carry-friend .person-body,
.guest-carry-event .person-body {
  border-color: rgba(184, 115, 255, 0.82);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 4px, transparent 4px 8px),
    #351c54;
}

.guest-carry-tourist .person-body,
.guest-carry-gift .person-body {
  border-color: rgba(69, 200, 244, 0.82);
  background:
    repeating-linear-gradient(90deg, rgba(246, 187, 71, 0.2) 0 4px, transparent 4px 8px),
    #153f4d;
}

.guest-carry-dog .person-body {
  border-color: rgba(246, 187, 71, 0.72);
  background:
    repeating-linear-gradient(90deg, rgba(70, 240, 111, 0.16) 0 4px, transparent 4px 9px),
    #25421d;
}

.guest-carry-strange .person-body {
  border-color: rgba(255, 89, 168, 0.82);
  background: #4b183a;
}

.guest-carry-regular .person-body,
.guest-carry-coffee .person-body {
  border-color: rgba(70, 240, 111, 0.74);
  background: #173d25;
}

.guest-carry-boss .person-body {
  border-color: rgba(246, 187, 71, 0.9);
  background: #6a3511;
}

.carry-order {
  position: absolute;
  right: 4px;
  bottom: 8px;
  width: 18px;
  height: 15px;
  border: 1px solid var(--amber);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(70, 240, 111, 0.26) 0 5px, transparent 5px 8px),
    rgba(7, 13, 8, 0.96);
  box-shadow: 0 0 10px rgba(246, 187, 71, 0.28);
  animation: carryOrderBob 450ms ease-in-out infinite;
}

.carry-order-dessert {
  border-color: #f6bb47;
  border-radius: 50% 50% 5px 5px;
  background:
    radial-gradient(circle at 7px 7px, rgba(240, 106, 166, 0.7) 0 4px, transparent 4px),
    rgba(246, 187, 71, 0.35);
}

.carry-order-beans,
.carry-order-box {
  border-color: var(--cyan);
  border-radius: 4px;
  background:
    repeating-linear-gradient(135deg, rgba(69, 200, 244, 0.35) 0 4px, rgba(246, 187, 71, 0.2) 4px 8px),
    #10131a;
}

.carry-design-aphro {
  border-color: #d99cff;
  box-shadow: 0 0 12px rgba(217, 156, 255, 0.34);
}

.pay-burst {
  pointer-events: none;
  position: fixed;
  z-index: 94;
  width: 1px;
  height: 1px;
  contain: paint;
}

.pay-burst b {
  position: absolute;
  left: -28px;
  top: -32px;
  min-width: 56px;
  color: var(--amber);
  font-size: 0.58rem;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 8px rgba(246, 187, 71, 0.46);
  animation: payTextRise 980ms ease-out both;
}

.pay-coin {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 242, 187, 0.86);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px),
    #f6bb47;
  box-shadow: 0 0 10px rgba(246, 187, 71, 0.34);
  animation: payCoinPop 880ms cubic-bezier(0.18, 0.72, 0.16, 1) both;
  animation-delay: var(--coin-delay, 0ms);
}

.order-fly b {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  color: var(--paper);
  font-size: 0.48rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item b,
.order-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item b {
  margin-top: 2px;
  color: var(--paper);
  font-size: 0.5rem;
  line-height: 1.08;
}

.order-item small {
  color: var(--muted);
  font-size: 0.46rem;
}

.order-item-shape {
  position: relative;
  display: block;
  width: 28px;
  height: 23px;
  margin: 0 auto;
}

.order-item-drink .order-item-shape {
  width: 24px;
  height: 18px;
  border: 2px solid #f06aa6;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(240, 106, 166, 0.12);
}

.order-item-drink .order-item-shape::before,
.order-item-drink .order-item-shape::after {
  content: "";
  position: absolute;
}

.order-item-drink .order-item-shape::before {
  right: -8px;
  top: 3px;
  width: 7px;
  height: 7px;
  border: 2px solid #f06aa6;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.order-item-drink .order-item-shape::after {
  left: 5px;
  top: -10px;
  width: 13px;
  height: 9px;
  border-top: 2px solid rgba(227, 242, 218, 0.75);
  border-radius: 50%;
  animation: steamRise 1200ms ease-in-out infinite;
}

.order-design-cold.order-item-drink .order-item-shape,
.order-design-shake.order-item-drink .order-item-shape,
.order-design-milk.order-item-drink .order-item-shape {
  border-color: var(--cyan);
  background: rgba(69, 200, 244, 0.14);
}

.order-design-cold.order-item-drink .order-item-shape::after,
.order-design-shake.order-item-drink .order-item-shape::after {
  left: 4px;
  top: -7px;
  width: 16px;
  height: 11px;
  border: 0;
  border-radius: 2px;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(227, 242, 218, 0.78) 42% 56%, transparent 56% 100%),
    radial-gradient(circle at 4px 7px, rgba(69, 200, 244, 0.92) 0 2px, transparent 2px),
    radial-gradient(circle at 11px 5px, rgba(227, 242, 218, 0.8) 0 2px, transparent 2px);
  animation: iceFloat 1200ms ease-in-out infinite;
}

.order-design-tea.order-item-drink .order-item-shape {
  border-color: var(--amber);
  background: rgba(246, 187, 71, 0.16);
}

.order-design-foam.order-item-drink .order-item-shape {
  box-shadow: inset 0 7px 0 rgba(227, 242, 218, 0.45);
}

.order-item-dessert .order-item-shape {
  width: 30px;
  height: 20px;
  border-bottom: 4px solid #f6bb47;
}

.order-item-dessert .order-item-shape::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 3px;
  width: 20px;
  height: 14px;
  border: 1px solid #f06aa6;
  border-radius: 12px 12px 3px 3px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 55%),
    rgba(240, 106, 166, 0.24);
}

.order-design-porridge.order-item-dessert .order-item-shape {
  width: 29px;
  height: 18px;
  border: 2px solid rgba(227, 242, 218, 0.7);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(246, 187, 71, 0.22);
}

.order-design-porridge.order-item-dessert .order-item-shape::before {
  left: 7px;
  bottom: 12px;
  width: 14px;
  height: 8px;
  border: 0;
  border-top: 2px solid rgba(227, 242, 218, 0.7);
  background: transparent;
  animation: steamRise 1200ms ease-in-out infinite;
}

.order-design-croissant.order-item-dessert .order-item-shape::before {
  left: 3px;
  bottom: 3px;
  width: 24px;
  height: 14px;
  border-color: var(--amber);
  border-radius: 50% 50% 8px 8px;
  background:
    linear-gradient(90deg, transparent 0 30%, rgba(7, 9, 7, 0.24) 30% 34%, transparent 34% 63%, rgba(7, 9, 7, 0.22) 63% 67%, transparent 67% 100%),
    rgba(246, 187, 71, 0.42);
}

.order-design-salad.order-item-dessert .order-item-shape::before {
  left: 4px;
  bottom: 2px;
  width: 22px;
  height: 15px;
  border-color: var(--green);
  border-radius: 4px 4px 12px 12px;
  background:
    radial-gradient(circle at 7px 6px, rgba(70, 240, 111, 0.7) 0 3px, transparent 3px),
    radial-gradient(circle at 15px 5px, rgba(246, 187, 71, 0.7) 0 3px, transparent 3px),
    rgba(70, 240, 111, 0.16);
}

.order-design-panini.order-item-dessert .order-item-shape::before,
.order-design-sandwich.order-item-dessert .order-item-shape::before {
  left: 4px;
  bottom: 4px;
  width: 22px;
  height: 13px;
  border-color: var(--amber);
  border-radius: 3px;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(70, 240, 111, 0.62) 48% 55%, transparent 55%),
    rgba(246, 187, 71, 0.3);
  transform: skewX(-9deg);
}

.order-design-pancakes.order-item-dessert .order-item-shape::before {
  left: 5px;
  bottom: 4px;
  width: 20px;
  height: 10px;
  border-color: var(--amber);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(227, 242, 218, 0.22) 0 3px, transparent 3px 6px, rgba(227, 242, 218, 0.18) 6px),
    rgba(246, 187, 71, 0.28);
}

.order-design-cookie.order-item-dessert .order-item-shape::before {
  left: 6px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  border-color: #9a6834;
  border-radius: 50%;
  background:
    radial-gradient(circle at 6px 6px, #2a160c 0 2px, transparent 2px),
    radial-gradient(circle at 12px 11px, #2a160c 0 2px, transparent 2px),
    rgba(154, 104, 52, 0.56);
}

.order-design-macaron.order-item-dessert .order-item-shape::before {
  left: 5px;
  bottom: 4px;
  width: 20px;
  height: 12px;
  border-color: #d99cff;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(217, 156, 255, 0.58) 0 48%, rgba(227, 242, 218, 0.46) 48% 58%, rgba(217, 156, 255, 0.32) 58%);
}

.order-design-tart.order-item-dessert .order-item-shape::before {
  left: 5px;
  bottom: 2px;
  width: 20px;
  height: 16px;
  border-color: var(--amber);
  border-radius: 10px 10px 5px 5px;
  background:
    radial-gradient(circle at 10px 6px, #f06aa6 0 5px, transparent 5px),
    rgba(246, 187, 71, 0.28);
}

.order-design-gingerbread.order-item-dessert .order-item-shape::before {
  left: 7px;
  bottom: 2px;
  width: 16px;
  height: 19px;
  border-color: #9a6834;
  border-radius: 8px 8px 5px 5px;
  background:
    radial-gradient(circle at 5px 6px, #07130b 0 1.5px, transparent 1.5px),
    radial-gradient(circle at 11px 6px, #07130b 0 1.5px, transparent 1.5px),
    linear-gradient(90deg, transparent 0 40%, rgba(227, 242, 218, 0.7) 40% 60%, transparent 60%),
    rgba(154, 104, 52, 0.58);
}

.order-design-combo.order-item-dessert .order-item-shape::before {
  left: 5px;
  bottom: 3px;
  width: 21px;
  height: 17px;
  border-color: rgba(227, 242, 218, 0.7);
  border-radius: 50%;
  background:
    radial-gradient(circle at 7px 8px, rgba(246, 187, 71, 0.75) 0 4px, transparent 4px),
    radial-gradient(circle at 14px 8px, rgba(70, 240, 111, 0.64) 0 4px, transparent 4px),
    rgba(227, 242, 218, 0.14);
}

.order-item-additive .order-item-shape {
  width: 17px;
  height: 24px;
  border: 2px solid var(--green);
  border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, rgba(70, 240, 111, 0.28), rgba(70, 240, 111, 0.06));
}

.order-design-aphro.order-item-additive .order-item-shape {
  border-color: #d99cff;
  background: linear-gradient(180deg, rgba(217, 156, 255, 0.35), rgba(217, 156, 255, 0.08));
}

.order-item-beans .order-item-shape {
  width: 25px;
  height: 24px;
  border: 2px solid #f6bb47;
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(7, 9, 7, 0.18) 50%, transparent 50%) 0 0 / 7px 7px,
    #3f2a16;
}

.order-item-beans .order-item-shape::after {
  content: "18+";
  position: absolute;
  inset: 7px 0 auto;
  color: #fff2bb;
  font-size: 0.42rem;
  line-height: 1;
}

.order-design-ground.order-item-beans .order-item-shape {
  border-radius: 9px 9px 3px 3px;
}

.order-design-aphro.order-item-beans .order-item-shape {
  border-color: #d99cff;
}

.order-item-box .order-item-shape {
  width: 28px;
  height: 23px;
  border: 2px solid var(--cyan);
  border-radius: 4px;
  background:
    repeating-linear-gradient(135deg, rgba(69, 200, 244, 0.28) 0 4px, rgba(246, 187, 71, 0.18) 4px 8px),
    #10131a;
  box-shadow: 0 -5px 0 rgba(246, 187, 71, 0.28);
}

.order-item-box .order-item-shape::after {
  content: "18+";
  position: absolute;
  inset: 7px 0 auto;
  color: #fff2bb;
  font-size: 0.46rem;
  line-height: 1;
}

.order-design-wave.order-item-box .order-item-shape {
  background:
    radial-gradient(circle at 4px 5px, rgba(69, 200, 244, 0.4) 0 3px, transparent 3px 8px),
    #10131a;
}

.order-design-dot.order-item-box .order-item-shape {
  background:
    radial-gradient(circle, rgba(246, 187, 71, 0.48) 0 2px, transparent 2px 7px),
    #10131a;
  background-size: 8px 8px;
}

.order-design-bolt.order-item-box .order-item-shape {
  border-color: var(--amber);
  background:
    linear-gradient(120deg, transparent 0 35%, rgba(246, 187, 71, 0.55) 35% 50%, transparent 50% 100%),
    #10131a;
}

.order-design-window.order-item-box .order-item-shape {
  border-color: var(--green);
  background:
    linear-gradient(90deg, rgba(70, 240, 111, 0.3) 0 6px, transparent 6px 10px),
    #10131a;
}

.stage-cash {
  appearance: none;
  display: grid;
  position: relative;
  overflow: hidden;
  align-content: center;
  justify-items: center;
  min-height: 74px;
  border: 1px solid rgba(70, 240, 111, 0.44);
  border-radius: 6px;
  background: rgba(4, 12, 8, 0.84);
  color: inherit;
  cursor: pointer;
  font: inherit;
  touch-action: manipulation;
}

.stage-cash:disabled {
  cursor: default;
}

.stage-cash:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 0 14px rgba(70, 240, 111, 0.22);
}

.stage-cash::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0 38%, rgba(70, 240, 111, 0.12) 38% 44%, transparent 44% 100%);
  opacity: 0.08;
}

.cash-screen {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 25px;
  padding: 3px;
  color: var(--green);
  font-size: 0.55rem;
  line-height: 1;
  text-align: center;
}

.cash-ticket {
  width: 28px;
  height: 28px;
  margin-top: 4px;
  border: 1px solid rgba(227, 242, 218, 0.7);
  background:
    linear-gradient(180deg, rgba(227, 242, 218, 0.92), rgba(227, 242, 218, 0.48));
  transform-origin: top center;
}

.stage-caption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px 6px;
  border-top: 1px solid rgba(49, 81, 58, 0.76);
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.15;
}

.stage-caption b {
  color: var(--amber);
  white-space: nowrap;
}

.stage-caption span {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-stage-shell.is-success .stage-tray,
.order-stage-shell.is-checkout .stage-tray {
  animation: stageTrayPulse 1000ms ease-out;
}

.order-stage-shell.is-prep .stage-counter {
  border-color: rgba(246, 187, 71, 0.78);
  box-shadow: 0 0 14px rgba(246, 187, 71, 0.14);
}

.order-stage-shell.is-prep .stage-prep-flow,
.order-stage-shell.is-success .stage-prep-flow,
.order-stage-shell.is-checkout .stage-prep-flow {
  opacity: 1;
}

.order-stage-shell.is-prep .stage-prep-flow i,
.order-stage-shell.is-success .stage-prep-flow i,
.order-stage-shell.is-checkout .stage-prep-flow i {
  animation: prepDotMove 980ms cubic-bezier(0.18, 0.72, 0.16, 1) both;
}

.order-stage-shell.is-prep .stage-machine,
.order-stage-shell.is-success .stage-machine,
.order-stage-shell.is-checkout .stage-machine {
  animation: machineWork 520ms ease-in-out 2;
}

.order-stage-shell.is-prep .stage-machine::after,
.order-stage-shell.is-success .stage-machine::after,
.order-stage-shell.is-checkout .stage-machine::after {
  animation: coffeePour 980ms ease-in-out both;
}

.order-stage-shell.is-prep .machine-cup,
.order-stage-shell.is-success .machine-cup,
.order-stage-shell.is-checkout .machine-cup {
  animation: cupFill 980ms ease-out both;
}

.order-stage-shell.is-prep .machine-sparks,
.order-stage-shell.is-success .machine-sparks {
  opacity: 1;
}

.order-stage-shell.is-prep .machine-sparks i,
.order-stage-shell.is-success .machine-sparks i {
  animation: machineSpark 640ms ease-out both;
}

.order-stage-shell.is-prep .stage-barista,
.order-stage-shell.is-success .stage-barista {
  animation: baristaHands 500ms ease-in-out 2;
}

.order-stage-shell.is-success .stage-guest {
  animation: guestLeanIn 1000ms ease-out;
}

.order-stage-shell.is-fail .stage-counter {
  border-color: rgba(246, 187, 71, 0.78);
  animation: stageShake 260ms ease-in-out;
}

.order-stage-shell.is-checkout .stage-cash {
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(70, 240, 111, 0.18);
  animation: cashPulse 1000ms ease-out;
}

.order-stage-shell.is-checkout .cash-ticket {
  animation: ticketPrint 1000ms ease-out both;
}

.order-stage-shell.is-checkout .cash-screen {
  animation: cashScreenFlash 820ms ease-out both;
}

.order-stage-shell.is-checkout .stage-barista {
  animation: baristaHandoff 920ms ease-in-out both;
}

.order-stage-shell.is-checkout .stage-guest {
  animation: guestCheckoutLeave 1000ms ease-in both;
}

.shift-strip:empty {
  display: none;
}

.shift-strip {
  display: grid;
  position: sticky;
  top: 0;
  z-index: 7;
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1fr);
  gap: 7px;
  margin: 5px 0;
  padding: 1px 0;
  background:
    linear-gradient(90deg, rgba(70, 240, 111, 0.04) 50%, transparent 50%) 0 0 / 10px 10px,
    rgba(7, 10, 7, 0.96);
}

.shift-metrics,
.shift-event {
  border: 1px solid rgba(49, 81, 58, 0.85);
  border-radius: 6px;
  background: rgba(7, 9, 7, 0.42);
}

.shift-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shift-metrics span,
.shift-event {
  min-height: 34px;
  padding: 6px 7px;
}

.shift-metrics span + span {
  border-left: 1px solid rgba(49, 81, 58, 0.75);
}

.shift-metrics b,
.shift-event b {
  display: block;
  color: var(--amber);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.shift-metrics span,
.shift-event span {
  color: var(--paper);
  font-size: 0.73rem;
  line-height: 1.25;
}

.shift-event {
  display: grid;
  align-content: center;
}

.scene-copy {
  align-self: start;
  padding: 9px 0 14px;
}

.scene-copy h2 {
  margin-bottom: 9px;
  color: var(--paper);
  font-size: clamp(1.1rem, 1.85vw, 1.55rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.scene-copy p {
  margin-top: 8px;
  color: var(--text);
  line-height: 1.46;
  overflow-wrap: anywhere;
}

.scene-copy .meta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 9px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--amber);
  background: rgba(246, 187, 71, 0.08);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.brand-stamp {
  display: inline-grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  max-width: min(100%, 420px);
  margin: 2px 0 8px;
  padding: 5px 7px;
  border: 1px solid rgba(246, 187, 71, 0.44);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(246, 187, 71, 0.1), rgba(70, 240, 111, 0.04)),
    rgba(7, 9, 7, 0.52);
}

.brand-stamp img {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(227, 242, 218, 0.62);
  border-radius: 4px;
  object-fit: cover;
  background: #07130b;
}

.brand-stamp span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.brand-stamp b {
  color: var(--paper);
  font-size: 0.72rem;
  line-height: 1;
}

.brand-stamp small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-dialog {
  display: grid;
  gap: 7px;
  align-items: start;
}

.dialog-bubble {
  position: relative;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(49, 81, 58, 0.86);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(70, 240, 111, 0.04) 50%, transparent 50%) 0 0 / 10px 10px,
    rgba(6, 14, 8, 0.86);
  animation: dialogBubbleIn 180ms ease-out both;
}

.dialog-bubble::before {
  content: "";
  position: absolute;
  top: 14px;
  width: 10px;
  height: 10px;
  border: inherit;
  background: inherit;
  transform: rotate(45deg);
}

.dialog-bubble-guest {
  justify-self: start;
  width: min(680px, 92%);
  border-color: rgba(70, 240, 111, 0.68);
}

.dialog-bubble-guest::before {
  left: -6px;
  border-top: 0;
  border-right: 0;
}

.dialog-bubble-order {
  justify-self: end;
  width: min(680px, 92%);
  border-color: rgba(69, 200, 244, 0.58);
  background:
    linear-gradient(90deg, rgba(69, 200, 244, 0.05) 50%, transparent 50%) 0 0 / 10px 10px,
    rgba(5, 16, 18, 0.88);
}

.dialog-bubble-order::before {
  right: -6px;
  border-bottom: 0;
  border-left: 0;
}

.dialog-bubble-system {
  width: 100%;
  padding: 7px;
  border-color: rgba(246, 187, 71, 0.42);
  background: rgba(7, 9, 7, 0.52);
}

.dialog-bubble-system::before {
  display: none;
}

.dialog-kicker {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 4px;
  color: var(--amber);
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.dialog-bubble h2 {
  margin-bottom: 5px;
}

.dialog-bubble p {
  margin-top: 4px;
}

.dialog-bubble p b {
  color: var(--paper);
}

.dialog-bubble .battle-meter {
  margin: 0;
}

.roll-line {
  margin-top: 10px;
  color: var(--cyan);
  font-size: 0.84rem;
}

.effects-line {
  margin-top: 9px;
  color: var(--amber);
  font-size: 0.84rem;
}

.guest-history {
  margin-top: 8px;
  padding: 7px;
  border: 1px solid rgba(246, 187, 71, 0.58);
  border-radius: 6px;
  background: rgba(246, 187, 71, 0.06);
}

.guest-history-title {
  color: var(--amber);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guest-history ul {
  display: grid;
  gap: 4px;
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
}

.guest-history li {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  color: var(--text);
}

.guest-history li b {
  color: var(--paper);
  font-size: 0.68rem;
}

.guest-history li span {
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1.22;
}

.guest-history li.compact span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-history li.success b,
.guest-history li.contact b,
.guest-history li.friend b {
  color: var(--green);
}

.guest-history li.fail b {
  color: var(--amber);
}

.legal-links {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.legal-links a {
  color: var(--cyan);
}

.battle-meter {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 8px;
  border: 1px solid rgba(49, 81, 58, 0.9);
  border-radius: 6px;
  background: rgba(7, 9, 7, 0.42);
}

.battle-meter div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.battle-meter small {
  color: var(--muted);
}

.choice-grid {
  display: grid;
  gap: 8px;
}

.choice-grid > * {
  animation: choiceIn 180ms ease-out both;
}

.choice-grid > *:nth-child(2) {
  animation-delay: 20ms;
}

.choice-grid > *:nth-child(3) {
  animation-delay: 40ms;
}

.choice-grid > *:nth-child(4) {
  animation-delay: 60ms;
}

.choice-grid > .clicker-overlay {
  animation: clickerOverlayIn 180ms ease-out both;
}

.guest-screen .choice-grid > *,
.guest-screen .choice-grid > .clicker-overlay,
.guest-screen .dialog-bubble {
  animation: none;
}

.guest-screen .machine-steam,
.guest-screen .machine-steam::before,
.guest-screen .machine-steam::after,
.guest-screen .order-item-drink .order-item-shape::after,
.guest-screen .order-design-cold.order-item-drink .order-item-shape::after,
.guest-screen .order-design-shake.order-item-drink .order-item-shape::after,
.guest-screen .guest-dog em {
  animation: none;
}

.guest-screen .machine-steam,
.guest-screen .machine-steam::before,
.guest-screen .machine-steam::after,
.guest-screen .order-item-drink .order-item-shape::after {
  opacity: 0.58;
}

.guest-screen .guest-dog em {
  opacity: 0.82;
}

.choice-button,
.hero-button,
.route-card,
.small-action {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  line-height: 1.25;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
  -webkit-tap-highlight-color: rgba(70, 240, 111, 0.2);
}

.choice-button,
.hero-button,
.route-card {
  padding: 9px 10px;
}

.choice-button:hover,
.choice-button:focus-visible,
.hero-button:hover,
.hero-button:focus-visible,
.route-card:hover,
.route-card:focus-visible,
.small-action:hover,
.small-action:focus-visible {
  transform: translateY(-1px);
  border-color: var(--green);
  background: #132015;
  outline: none;
}

.choice-button:active,
.hero-button:active,
.route-card:active,
.small-action:active {
  transform: translateY(1px) scale(0.97);
}

.choice-button[disabled],
.hero-button[disabled] {
  cursor: default;
  opacity: 0.58;
}

.choice-button[disabled]:hover,
.hero-button[disabled]:hover {
  transform: none;
  border-color: var(--line);
  background: var(--panel-strong);
}

.choice-button b,
.hero-button b,
.route-card b {
  color: var(--green);
}

.choice-button.ad-button {
  border-color: rgba(174, 88, 255, 0.72);
  background:
    repeating-linear-gradient(135deg, rgba(174, 88, 255, 0.12) 0 8px, transparent 8px 16px),
    rgba(22, 13, 34, 0.96);
}

.choice-button.ad-button b {
  color: #d8a0ff;
}

.choice-button.ad-button:hover,
.choice-button.ad-button:focus-visible {
  border-color: #d8a0ff;
  background:
    repeating-linear-gradient(135deg, rgba(174, 88, 255, 0.18) 0 8px, transparent 8px 16px),
    rgba(31, 17, 48, 0.98);
}

.choice-button.ad-button[disabled]:hover {
  border-color: rgba(174, 88, 255, 0.72);
  background:
    repeating-linear-gradient(135deg, rgba(174, 88, 255, 0.12) 0 8px, transparent 8px 16px),
    rgba(22, 13, 34, 0.96);
}

.choice-button span,
.hero-button span,
.route-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.choice-button small {
  display: block;
  margin-top: 2px;
  color: rgba(246, 187, 71, 0.86);
  font-size: 0.68rem;
  line-height: 1.25;
}

.choice-button[data-upsell="store"],
.choice-button[data-upsell="promo"] {
  position: relative;
  overflow: hidden;
  border-color: rgba(69, 200, 244, 0.82);
  background:
    linear-gradient(135deg, rgba(69, 200, 244, 0.22), rgba(246, 187, 71, 0.12)),
    repeating-linear-gradient(
      135deg,
      rgba(69, 200, 244, 0.16) 0 6px,
      rgba(7, 9, 7, 0.08) 6px 12px,
      rgba(246, 187, 71, 0.12) 12px 18px,
      rgba(7, 9, 7, 0.08) 18px 24px
    ),
    #07161b;
  box-shadow: inset 0 0 0 1px rgba(69, 200, 244, 0.12);
}

.choice-button[data-upsell="store"] b,
.choice-button[data-upsell="promo"] b {
  color: #7ee6ff;
}

.choice-button[data-upsell="store"] span,
.choice-button[data-upsell="promo"] span {
  color: #e6d59a;
}

.choice-button[data-upsell="store"]::after,
.choice-button[data-upsell="promo"]::after {
  content: "МАГАЗИН";
  position: absolute;
  right: 5px;
  bottom: 4px;
  display: inline-flex;
  width: fit-content;
  padding: 1px 5px;
  border: 1px solid rgba(246, 187, 71, 0.68);
  color: var(--amber);
  background: rgba(7, 9, 7, 0.5);
  font-size: 0.58rem;
  line-height: 1.25;
}

.choice-button[data-upsell="store"]:hover,
.choice-button[data-upsell="store"]:focus-visible,
.choice-button[data-upsell="promo"]:hover,
.choice-button[data-upsell="promo"]:focus-visible {
  border-color: #7ee6ff;
  background:
    linear-gradient(135deg, rgba(69, 200, 244, 0.3), rgba(246, 187, 71, 0.18)),
    repeating-linear-gradient(
      135deg,
      rgba(69, 200, 244, 0.2) 0 6px,
      rgba(7, 9, 7, 0.1) 6px 12px,
      rgba(246, 187, 71, 0.16) 12px 18px,
      rgba(7, 9, 7, 0.1) 18px 24px
    ),
    #0a1d22;
}

.choice-button[data-upsell="store"][disabled],
.choice-button[data-upsell="promo"][disabled],
.choice-button[data-upsell="store"][disabled]:hover,
.choice-button[data-upsell="promo"][disabled]:hover {
  border-color: rgba(69, 200, 244, 0.42);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(69, 200, 244, 0.08) 0 6px,
      rgba(7, 9, 7, 0.04) 6px 12px,
      rgba(246, 187, 71, 0.06) 12px 18px,
      rgba(7, 9, 7, 0.04) 18px 24px
    ),
    #101510;
}

.friend-invite-button {
  border-color: rgba(174, 88, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(174, 88, 255, 0.18), rgba(19, 32, 21, 0.96)),
    var(--panel-strong);
}

.friend-invite-button b {
  color: #d6a0ff;
}

.friend-invite-button:hover,
.friend-invite-button:focus-visible {
  border-color: #d985ff;
  background:
    linear-gradient(135deg, rgba(174, 88, 255, 0.26), rgba(19, 32, 21, 0.98)),
    #132015;
}

.boss-clicker-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.24fr);
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid rgba(255, 92, 92, 0.76);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 92, 92, 0.18), rgba(246, 187, 71, 0.08)),
    rgba(7, 9, 7, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 92, 92, 0.08);
}

.boss-clicker-panel > div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
}

.boss-clicker-panel b {
  color: #ff9a73;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.boss-clicker-panel span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.boss-clicker-button {
  min-height: 68px;
  border: 1px solid #ff7b55;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.24), transparent 28px),
    linear-gradient(180deg, #ff5c5c 0%, #8d1e24 100%);
  color: #fff7ee;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 0 18px rgba(255, 92, 92, 0.28), inset 0 -3px 0 rgba(66, 8, 14, 0.58);
  transition: transform 90ms ease, filter 90ms ease, box-shadow 90ms ease;
  -webkit-tap-highlight-color: rgba(255, 92, 92, 0.28);
}

.boss-clicker-button:hover,
.boss-clicker-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
  outline: none;
}

.boss-clicker-button b,
.boss-clicker-button span {
  display: block;
}

.boss-clicker-button b {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.1;
}

.boss-clicker-button span {
  margin-top: 3px;
  color: rgba(255, 247, 238, 0.84);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.boss-clicker-button[disabled] {
  cursor: default;
  filter: saturate(0.65);
  opacity: 0.72;
}

.boss-clicker-button.tap-pop {
  animation: bossTapPop 150ms ease-out;
}

.clicker-overlay {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 70;
  width: min(580px, calc(100vw - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 18px;
  transform: translate(-50%, -50%);
  overflow: auto;
}

.boss-clicker-panel.clicker-overlay {
  background:
    linear-gradient(135deg, rgba(255, 92, 92, 0.26), rgba(246, 187, 71, 0.12)),
    #170908;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.74), 0 0 34px rgba(255, 92, 92, 0.34), inset 0 0 0 1px rgba(255, 92, 92, 0.16);
}

.friend-energy-panel.clicker-overlay {
  background:
    linear-gradient(135deg, rgba(174, 88, 255, 0.3), rgba(69, 200, 244, 0.09)),
    #12091e;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.74), 0 0 34px rgba(174, 88, 255, 0.34), inset 0 0 0 1px rgba(214, 160, 255, 0.16);
}

.clicker-overlay::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: -100vmax;
  z-index: -1;
  background: rgba(0, 0, 0, 0.48);
}

.clicker-overlay > div {
  justify-items: center;
  text-align: center;
}

.clicker-overlay > div b {
  font-size: clamp(1.05rem, 2.4vw, 1.38rem);
}

.clicker-overlay > div span {
  max-width: 44ch;
  font-size: 0.9rem;
}

.clicker-overlay .boss-clicker-button,
.clicker-overlay .friend-tap-button {
  min-height: 154px;
  width: 100%;
}

.clicker-overlay .boss-clicker-button b,
.clicker-overlay .friend-tap-button b {
  font-size: clamp(2.15rem, 9vw, 4.2rem);
}

.clicker-overlay .boss-clicker-button span,
.clicker-overlay .friend-tap-button span {
  margin-top: 8px;
  font-size: clamp(0.82rem, 2.8vw, 1.05rem);
}

@keyframes bossTapPop {
  0% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(255, 92, 92, 0.28), inset 0 -3px 0 rgba(66, 8, 14, 0.58);
  }

  45% {
    transform: scale(0.93);
    box-shadow: 0 0 28px rgba(255, 123, 85, 0.55), inset 0 -1px 0 rgba(66, 8, 14, 0.48);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(255, 92, 92, 0.28), inset 0 -3px 0 rgba(66, 8, 14, 0.58);
  }
}

.friend-energy-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.24fr);
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid rgba(174, 88, 255, 0.72);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(174, 88, 255, 0.16), rgba(69, 200, 244, 0.05)),
    rgba(7, 9, 7, 0.72);
  box-shadow: inset 0 0 0 1px rgba(214, 160, 255, 0.08);
}

.friend-energy-panel > div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 3px;
}

.friend-energy-panel b {
  color: #d6a0ff;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.friend-energy-panel span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.friend-tap-button {
  min-height: 68px;
  border: 1px solid #d985ff;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.28), transparent 28px),
    linear-gradient(180deg, #9d39ff 0%, #5c1ca3 100%);
  color: #fff8ff;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 0 18px rgba(174, 88, 255, 0.28), inset 0 -3px 0 rgba(34, 8, 62, 0.56);
  transition: transform 90ms ease, filter 90ms ease, box-shadow 90ms ease;
  -webkit-tap-highlight-color: rgba(217, 133, 255, 0.28);
}

.friend-tap-button:hover,
.friend-tap-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
  outline: none;
}

.friend-tap-button b,
.friend-tap-button span {
  display: block;
}

.friend-tap-button b {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.1;
}

.friend-tap-button span {
  margin-top: 3px;
  color: rgba(255, 248, 255, 0.82);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.friend-tap-button[disabled] {
  cursor: default;
  filter: saturate(0.65);
  opacity: 0.72;
}

.friend-tap-button.tap-pop {
  animation: friendTapPop 150ms ease-out;
}

@keyframes friendTapPop {
  0% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(174, 88, 255, 0.28), inset 0 -3px 0 rgba(34, 8, 62, 0.56);
  }

  45% {
    transform: scale(0.93);
    box-shadow: 0 0 28px rgba(217, 133, 255, 0.55), inset 0 -1px 0 rgba(34, 8, 62, 0.46);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(174, 88, 255, 0.28), inset 0 -3px 0 rgba(34, 8, 62, 0.56);
  }
}

.level-boss-panel,
.level-boss-arena {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(246, 187, 71, 0.72);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(246, 187, 71, 0.08) 50%, transparent 50%) 0 0 / 10px 10px,
    rgba(22, 18, 7, 0.82);
  box-shadow: inset 0 0 0 1px rgba(246, 187, 71, 0.08);
}

.level-boss-panel-title,
.level-boss-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--amber);
}

.level-boss-panel-title b,
.level-boss-head b {
  color: var(--paper);
}

.level-boss-panel p,
.level-boss-arena p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.level-boss-list {
  display: grid;
  gap: 6px;
}

.level-boss-card.level-boss-ready {
  border-color: rgba(246, 187, 71, 0.88);
  background:
    linear-gradient(135deg, rgba(246, 187, 71, 0.16), rgba(69, 200, 244, 0.08)),
    #171407;
}

.level-boss-card.level-boss-ready b {
  color: var(--amber);
}

.level-boss-progress {
  height: 12px;
  border: 1px solid rgba(246, 187, 71, 0.74);
  background: #080908;
  overflow: hidden;
}

.level-boss-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--green));
  transition: width 90ms ease;
}

.level-boss-hit {
  min-height: 168px;
  border: 1px solid #f6bb47;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.24), transparent 42px),
    linear-gradient(180deg, #f6bb47 0%, #8a4d12 100%);
  color: #fff8dc;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 0 24px rgba(246, 187, 71, 0.32), inset 0 -4px 0 rgba(56, 25, 6, 0.58);
  animation: levelBossPulse 980ms ease-in-out infinite;
  -webkit-tap-highlight-color: rgba(246, 187, 71, 0.3);
}

.level-boss-hit b,
.level-boss-hit span {
  display: block;
}

.level-boss-hit b {
  color: #fffdf0;
  font-size: clamp(2.4rem, 10vw, 4.6rem);
  line-height: 1;
}

.level-boss-hit span {
  margin-top: 8px;
  color: rgba(255, 248, 220, 0.9);
  font-size: clamp(0.8rem, 2.8vw, 1rem);
  text-transform: uppercase;
}

.level-boss-hit:hover,
.level-boss-hit:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.level-boss-hit.tap-pop {
  animation: levelBossTap 150ms ease-out;
}

.level-boss-screen .terminal-panel {
  background:
    linear-gradient(90deg, rgba(246, 187, 71, 0.08) 50%, transparent 50%) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(51, 30, 8, 0.34), rgba(7, 10, 7, 0.97));
}

.level-boss-screen .scene-art {
  min-height: 42px;
  max-height: 56px;
  margin: 7px 0 2px;
  font-size: clamp(0.5rem, 1vw, 0.66rem);
}

.level-boss-screen .scene-copy {
  padding: 6px 0 8px;
}

.level-boss-screen .scene-copy h2 {
  margin-bottom: 6px;
  font-size: clamp(1rem, 1.65vw, 1.32rem);
}

.level-boss-screen .scene-copy p {
  margin-top: 5px;
  line-height: 1.3;
}

@keyframes choiceIn {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes levelBossPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(246, 187, 71, 0.28), inset 0 -4px 0 rgba(56, 25, 6, 0.58);
  }

  50% {
    transform: scale(1.015);
    box-shadow: 0 0 34px rgba(246, 187, 71, 0.48), inset 0 -4px 0 rgba(56, 25, 6, 0.58);
  }
}

@keyframes levelBossTap {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(0.93);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes stageGuestIdle {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes stageBossBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-1px) scale(1.04);
  }
}

@keyframes steamRise {
  0% {
    opacity: 0;
    transform: translateY(5px) scaleY(0.7);
  }

  45% {
    opacity: 0.95;
  }

  100% {
    opacity: 0;
    transform: translateY(-6px) scaleY(1);
  }
}

@keyframes machineWork {
  0%,
  100% {
    transform: translateX(0);
    box-shadow: none;
  }

  35% {
    transform: translateX(-1px);
    box-shadow: 0 0 18px rgba(69, 200, 244, 0.18);
  }

  70% {
    transform: translateX(1px);
  }
}

@keyframes coffeePour {
  0% {
    height: 0;
    opacity: 0;
  }

  22%,
  76% {
    height: 18px;
    opacity: 1;
  }

  100% {
    height: 2px;
    opacity: 0;
  }
}

@keyframes cupFill {
  0% {
    box-shadow: inset 0 0 0 rgba(246, 187, 71, 0);
  }

  55% {
    box-shadow: inset 0 -10px 0 rgba(246, 187, 71, 0.56), 0 0 12px rgba(246, 187, 71, 0.24);
  }

  100% {
    box-shadow: inset 0 -7px 0 rgba(246, 187, 71, 0.42);
  }
}

@keyframes prepDotMove {
  0% {
    left: 0;
    opacity: 0;
    transform: scale(0.7) rotate(-10deg);
  }

  18%,
  72% {
    opacity: 1;
  }

  100% {
    left: calc(100% - 8px);
    opacity: 0;
    transform: scale(0.42) rotate(10deg);
  }
}

@keyframes baristaHands {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  40% {
    transform: translateY(-2px) rotate(-2deg);
  }

  75% {
    transform: translateY(1px) rotate(2deg);
  }
}

@keyframes guestLeanIn {
  0%,
  100% {
    transform: translateX(0);
  }

  55% {
    transform: translateX(4px) translateY(-1px);
  }
}

@keyframes cashScan {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(100%);
  }
}

@keyframes cashPulse {
  0%,
  100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.03);
  }
}

@keyframes trayGlide {
  0%,
  42% {
    transform: translateX(-120%);
  }

  72%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes speechTyping {
  0% {
    max-width: 0;
  }

  100% {
    max-width: 100%;
  }
}

@keyframes speechCaret {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

@keyframes guestTalk {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-1px);
  }
}

@keyframes dogWag {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-1px);
  }
}

@keyframes dogTailWag {
  0%,
  100% {
    transform: rotate(-16deg);
  }

  50% {
    transform: rotate(22deg);
  }
}

@keyframes dogBarkBubble {
  0%,
  62%,
  100% {
    opacity: 0;
    transform: translateY(2px) scale(0.92);
  }

  70%,
  86% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes crowdBob {
  0%,
  100% {
    transform: translateY(0) scale(var(--crowd-scale, 1));
  }

  50% {
    transform: translateY(-1px) scale(var(--crowd-scale, 1));
  }
}

@keyframes iceFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }

  50% {
    transform: translateY(2px) rotate(5deg);
  }
}

@keyframes machineSpark {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.55);
  }

  25%,
  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc((var(--spark-x, 1) * 8px) - 4px), -18px) scale(0.2);
  }
}

@keyframes payCoinPop {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.55) rotate(0);
  }

  20%,
  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--coin-x), var(--coin-y), 0) scale(0.72) rotate(180deg);
  }
}

@keyframes payTextRise {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }

  20%,
  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-22px) scale(1);
  }
}

@keyframes orderItemPop {
  0% {
    opacity: 1;
    transform: translateY(-8px) scale(0.94) rotate(-2deg);
  }

  55% {
    opacity: 1;
    transform: translateY(1px) scale(1.02) rotate(1deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes orderFlyToTray {
  0% {
    opacity: 0.96;
    transform: translate3d(0, 0, 0) scale(0.62) rotate(-5deg);
  }

  20% {
    opacity: 1;
    transform: translate3d(0, -7px, 0) scale(0.84) rotate(-3deg);
  }

  34% {
    opacity: 1;
    transform: translate3d(0, -9px, 0) scale(0.96) rotate(-2deg);
  }

  68% {
    opacity: 1;
    transform: translate3d(var(--fly-mid-x), var(--fly-mid-y), 0) scale(0.96) rotate(5deg);
  }

  100% {
    opacity: 0.72;
    transform: translate3d(var(--fly-x), var(--fly-y), 0) scale(0.52) rotate(0);
  }
}

@keyframes guestCarryOrder {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.84);
  }

  14% {
    opacity: 1;
  }

  48% {
    opacity: 1;
    transform: translate3d(var(--carry-mid-x), var(--carry-mid-y), 0) scale(1.02);
  }

  82% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--carry-x), var(--carry-y), 0) scale(0.76);
  }
}

@keyframes carryOrderBob {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-2px) rotate(3deg);
  }
}

@keyframes stageTrayPulse {
  0%,
  100% {
    box-shadow: none;
  }

  45% {
    box-shadow: 0 0 22px rgba(70, 240, 111, 0.22), inset 0 0 0 1px rgba(70, 240, 111, 0.18);
  }
}

@keyframes stageShake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-3px);
  }

  50% {
    transform: translateX(3px);
  }

  75% {
    transform: translateX(-2px);
  }
}

@keyframes cashScreenFlash {
  0% {
    color: var(--green);
    transform: scale(0.98);
    text-shadow: none;
  }

  35%,
  70% {
    color: var(--green);
    transform: scale(1.01);
    text-shadow: 0 0 5px rgba(70, 240, 111, 0.24);
  }

  100% {
    color: var(--green);
    transform: scale(1);
    text-shadow: none;
  }
}

@keyframes baristaHandoff {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }

  45% {
    transform: translateX(4px) translateY(-1px);
  }

  70% {
    transform: translateX(2px) translateY(1px);
  }
}

@keyframes ticketPrint {
  0% {
    opacity: 0;
    transform: translateY(-14px) scaleY(0.25);
  }

  45% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }

  100% {
    opacity: 1;
    transform: translateY(5px) rotate(2deg);
  }
}

@keyframes guestCheckoutLeave {
  0% {
    opacity: 1;
    transform: translateX(0);
  }

  58% {
    opacity: 1;
    transform: translateX(6px);
  }

  100% {
    opacity: 0;
    transform: translateX(48px);
  }
}

@keyframes clickerOverlayIn {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 14px)) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes dialogBubbleIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.guest-screen .terminal-panel {
  position: static;
  min-height: auto;
  max-height: none;
  overflow: visible;
  align-content: start;
  align-items: start;
  grid-template-columns: 1fr;
  grid-template-rows: min-content min-content min-content min-content;
  row-gap: 7px;
}

.guest-screen .side-stack {
  min-height: auto;
  max-height: none;
  overflow: visible;
}

.guest-screen[data-guest-scene="flow"] .terminal-panel {
  background:
    linear-gradient(90deg, rgba(246, 187, 71, 0.07) 50%, transparent 50%) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(65, 75, 22, 0.28), rgba(7, 10, 7, 0.96));
}

.guest-screen[data-guest-scene="tourist"] .terminal-panel,
.guest-screen[data-guest-scene="gift"] .terminal-panel {
  background:
    linear-gradient(90deg, rgba(69, 200, 244, 0.06) 50%, transparent 50%) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(18, 48, 58, 0.34), rgba(7, 10, 7, 0.96));
}

.guest-screen[data-guest-scene="regular"] .terminal-panel,
.guest-screen[data-guest-scene="coffee"] .terminal-panel {
  background:
    linear-gradient(90deg, rgba(70, 240, 111, 0.05) 50%, transparent 50%) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(18, 58, 34, 0.28), rgba(7, 10, 7, 0.96));
}

.guest-screen[data-guest-scene="strange"] .terminal-panel {
  background:
    linear-gradient(90deg, rgba(255, 89, 168, 0.07) 50%, transparent 50%) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(58, 18, 46, 0.34), rgba(7, 10, 7, 0.96));
}

.guest-screen[data-guest-scene="friend"] .terminal-panel,
.guest-screen[data-guest-scene="event"] .terminal-panel {
  background:
    linear-gradient(90deg, rgba(184, 115, 255, 0.08) 50%, transparent 50%) 0 0 / 10px 10px,
    linear-gradient(180deg, rgba(42, 24, 70, 0.38), rgba(7, 10, 7, 0.96));
}

.guest-screen[data-guest-scene="flow"] .scene-art {
  color: var(--amber);
}

.guest-screen[data-guest-scene="tourist"] .scene-art,
.guest-screen[data-guest-scene="gift"] .scene-art {
  color: var(--cyan);
}

.guest-screen[data-guest-scene="friend"] .scene-art,
.guest-screen[data-guest-scene="event"] .scene-art,
.guest-screen[data-guest-scene="strange"] .scene-art {
  color: #d99cff;
}

.guest-screen .order-stage,
.guest-screen .scene-copy,
.guest-screen .choice-grid {
  grid-column: 1 / -1;
}

.guest-screen .terminal-header,
.guest-screen .scene-art {
  display: none;
}

.guest-screen .shift-strip {
  grid-column: 1 / -1;
  grid-row: auto;
  margin-top: 0;
}

.guest-screen .scene-copy {
  padding: 0;
}

.guest-screen .scene-copy .meta {
  min-height: 20px;
  margin-bottom: 6px;
  padding: 2px 6px;
  font-size: 0.68rem;
}

.guest-screen .scene-copy h2 {
  margin-bottom: 6px;
  font-size: clamp(0.98rem, 1.45vw, 1.28rem);
}

.guest-screen .scene-copy p {
  margin-top: 5px;
  line-height: 1.28;
}

.guest-screen .battle-meter {
  gap: 4px;
  margin: 5px 0 0;
  padding: 7px;
}

.guest-screen .battle-meter small {
  font-size: 0.7rem;
}

.guest-screen .choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 6px;
  align-content: start;
}

.guest-screen .choice-button {
  min-height: 42px;
  padding: 6px 8px;
}

.guest-screen .choice-button b {
  display: block;
  overflow: hidden;
  font-size: clamp(0.7rem, 0.9vw, 0.84rem);
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-screen .choice-button span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 0.62rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guest-screen .choice-button small {
  display: none;
}

.guest-screen .choice-button[data-action="finishGuest"] {
  grid-column: 1 / -1;
  min-height: 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-message {
  margin-top: 10px;
  padding: 8px 9px;
  border: 1px solid rgba(246, 187, 71, 0.8);
  border-radius: 6px;
  background: rgba(246, 187, 71, 0.1);
  color: var(--amber);
}

.auth-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.auth-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.text-input {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #070907;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 8px 10px;
}

.text-input:focus {
  border-color: var(--line-hot);
  outline: none;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vk-link-button {
  margin-bottom: 8px;
  border-color: rgba(69, 200, 244, 0.72);
  background: rgba(69, 200, 244, 0.08);
}

.auth-hint {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(49, 81, 58, 0.82);
  border-radius: 6px;
  background: rgba(7, 9, 7, 0.42);
}

.auth-hint b {
  color: var(--paper);
}

.auth-hint span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.28;
}

.leaderboard-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.leaderboard-summary div,
.leaderboard-row,
.leaderboard-empty {
  border: 1px solid rgba(49, 81, 58, 0.82);
  border-radius: 6px;
  background: rgba(7, 9, 7, 0.42);
}

.leaderboard-summary div {
  min-height: 54px;
  padding: 8px;
}

.leaderboard-summary b {
  display: block;
  color: var(--paper);
  font-size: 1.06rem;
}

.leaderboard-summary span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.leaderboard-table {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 38px minmax(140px, 1fr) minmax(112px, 0.72fr) minmax(116px, 0.72fr) minmax(116px, 0.72fr) minmax(82px, 0.52fr) minmax(120px, 0.7fr);
  gap: 7px;
  align-items: center;
  padding: 7px 8px;
}

.leaderboard-head {
  color: var(--amber);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.leaderboard-row.me {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(70, 240, 111, 0.22);
}

.leaderboard-row b {
  color: var(--paper);
}

.player-cell {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.player-avatar {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(69, 200, 244, 0.78);
  border-radius: 50%;
  object-fit: cover;
  background: #07100f;
}

.player-avatar.fallback {
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
}

.leaderboard-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.22;
}

.rank-cell {
  color: var(--amber);
  font-weight: 700;
}

.leaderboard-empty {
  padding: 11px;
  color: var(--muted);
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.route-card {
  min-height: 120px;
}

.route-card[disabled] {
  cursor: default;
  opacity: 0.62;
}

.route-card[disabled]:hover {
  transform: none;
  border-color: var(--line);
  background: var(--panel-strong);
}

.route-card .route-meta {
  color: var(--amber);
  font-size: 0.7rem;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.rule-card {
  min-height: 62px;
  padding: 8px;
  border: 1px solid rgba(49, 81, 58, 0.8);
  border-radius: 6px;
  background: rgba(7, 9, 7, 0.42);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.28;
}

.rule-card b {
  display: block;
  color: var(--paper);
  margin-bottom: 3px;
}

.side-stack {
  grid-area: side;
  min-height: 0;
  max-height: calc(100vh - 112px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  overflow: auto;
}

.stat-bars {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.stat-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.8fr) minmax(88px, 1fr) 54px;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.bar {
  height: 12px;
  border: 1px solid var(--line);
  background: #070907;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.bar-fill.energy-low {
  background: linear-gradient(90deg, var(--red), var(--amber));
}

.stat-row strong {
  color: var(--paper);
  text-align: right;
}

.stat-row em {
  display: inline-block;
  min-width: 24px;
  margin-left: 4px;
  color: var(--green);
  font-style: normal;
  text-align: right;
}

.stat-row em.down {
  color: var(--red);
}

.stat-row.changed .bar {
  border-color: var(--amber);
  box-shadow: 0 0 12px rgba(246, 187, 71, 0.18);
}

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

.mini-stat {
  min-height: 42px;
  padding: 7px;
  border: 1px solid rgba(49, 81, 58, 0.8);
  border-radius: 6px;
  background: rgba(7, 9, 7, 0.42);
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
}

.mini-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--paper);
  font-size: 0.94rem;
}

.log-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.perk-button {
  width: 100%;
  border: 1px solid rgba(49, 81, 58, 0.82);
  border-radius: 6px;
  background: rgba(7, 9, 7, 0.42);
  color: var(--text);
  cursor: pointer;
}

.perk-button:hover,
.perk-button:focus-visible {
  border-color: var(--line-hot);
  outline: none;
}

.perk-button.learned {
  border-color: rgba(246, 187, 71, 0.9);
}

.perk-button.locked {
  opacity: 0.62;
}

.perk-button .perk-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cyan);
  border-radius: 4px;
  color: var(--cyan);
  font-weight: 900;
}

.perk-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.perk-button {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 5px;
}

.perk-button small {
  display: block;
  margin-top: 2px;
  color: var(--amber);
  font-size: 0.62rem;
}

.perk-button.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(70, 240, 111, 0.18);
}

.perk-detail {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(49, 81, 58, 0.8);
  border-radius: 6px;
  background: rgba(7, 9, 7, 0.42);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.28;
}

.perk-detail b {
  display: block;
  margin-bottom: 2px;
  color: var(--paper);
}

.help-flow,
.help-map,
.help-matrix {
  margin-top: 11px;
}

.help-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.help-flow div,
.help-card,
.help-matrix div {
  border: 1px solid rgba(49, 81, 58, 0.82);
  border-radius: 6px;
  background: rgba(7, 9, 7, 0.42);
}

.help-flow div {
  min-height: 60px;
  display: grid;
  place-items: center;
  padding: 7px;
  text-align: center;
}

.help-flow b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--cyan);
  border-radius: 4px;
  color: var(--cyan);
}

.help-flow span {
  color: var(--paper);
  font-size: 0.72rem;
}

.help-map,
.help-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.help-card,
.help-matrix div {
  padding: 8px;
  min-height: 74px;
}

.help-card b,
.help-matrix b {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
}

.help-card span,
.help-matrix span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.32;
}

.log-panel {
  min-height: 180px;
  overflow: hidden;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.log-list li {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.28;
}

.log-list li:first-child {
  color: var(--text);
}

.small-action {
  min-height: 36px;
  padding: 7px 8px;
  text-align: center;
}

.statusline {
  min-height: 36px;
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  min-width: min(360px, calc(100vw - 32px));
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: #0d160f;
  color: var(--text);
  transform: translate(-50%, 22px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.coach-focus {
  position: relative;
  z-index: 20;
  border-color: var(--amber) !important;
  box-shadow: 0 0 0 3px rgba(246, 187, 71, 0.28), 0 0 26px rgba(246, 187, 71, 0.44) !important;
}

.coach-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  padding: 14px;
  background: rgba(1, 4, 2, 0.18);
}

.coach-overlay.show {
  display: grid;
  align-items: start;
  justify-items: center;
}

.coach-pointer {
  position: fixed;
  left: var(--coach-x, 50%);
  top: var(--coach-y, 96px);
  z-index: 32;
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 22px solid var(--amber);
  filter: drop-shadow(0 0 12px rgba(246, 187, 71, 0.72));
  transform: translate(-50%, -50%) rotate(var(--coach-arrow-rotate, 0deg));
  animation: coachPointerPulse 900ms ease-in-out infinite;
}

@keyframes coachPointerPulse {
  0%,
  100% {
    opacity: 0.78;
  }

  50% {
    opacity: 1;
  }
}

.coach-card {
  pointer-events: none;
  position: fixed;
  z-index: 31;
  top: var(--coach-card-top, 92px);
  left: 50%;
  width: min(520px, calc(100vw - 28px));
  padding: 13px;
  border: 2px solid var(--amber);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(246, 187, 71, 0.08) 50%, transparent 50%) 0 0 / 10px 10px,
    #161407;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.58), 0 0 30px rgba(246, 187, 71, 0.28);
  transform: translateX(-50%);
}

.coach-kicker {
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.coach-card h2 {
  margin-top: 5px;
  color: var(--paper);
  font-size: clamp(0.98rem, 1.85vw, 1.24rem);
  line-height: 1.2;
}

.coach-card p {
  margin-top: 6px;
  color: var(--text);
  line-height: 1.34;
}

.coach-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.coach-actions button {
  pointer-events: auto;
  min-height: 36px;
  border: 1px solid rgba(246, 187, 71, 0.8);
  border-radius: 6px;
  background: rgba(246, 187, 71, 0.12);
  color: var(--paper);
  cursor: pointer;
}

.coach-actions button:hover,
.coach-actions button:focus-visible {
  border-color: var(--green);
  outline: none;
}

.danger {
  color: var(--red);
}

.good {
  color: var(--green);
}

.amber {
  color: var(--amber);
}

@media (max-width: 1080px) {
  .game-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "terminal"
      "side"
      "map";
  }

  .side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .terminal-panel {
    position: static;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .log-list {
    max-height: 170px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .real-cafe-row {
    grid-template-columns: 1fr;
  }

  .real-cafe-row span {
    text-align: left;
  }

  .app-shell {
    width: calc(100vw - 8px - env(safe-area-inset-left) - env(safe-area-inset-right));
    height: calc(100dvh - 8px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 8px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    margin: calc(4px + env(safe-area-inset-top)) auto calc(4px + env(safe-area-inset-bottom));
    gap: 5px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    min-height: 0;
    padding: 5px 6px;
  }

  .brand {
    gap: 6px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-width: 2px;
  }

  .brand-mark span {
    right: 1px;
    bottom: 1px;
    padding: 1px 2px;
    font-size: 0.42rem;
  }

  h1 {
    font-size: clamp(0.82rem, 4vw, 1rem);
    line-height: 1.05;
  }

  #tagline {
    margin-top: 1px;
    font-size: clamp(0.58rem, 2.9vw, 0.68rem);
    line-height: 1.12;
  }

  .top-actions {
    align-self: stretch;
    display: grid;
    grid-template-columns: 28px minmax(58px, 0.8fr) minmax(54px, 0.75fr) minmax(82px, 1.12fr) minmax(62px, 0.88fr) 28px;
    flex-wrap: initial;
    gap: 3px;
    justify-content: stretch;
  }

  .icon-button,
  .music-button,
  .tips-button,
  .rating-button,
  .account-button {
    min-width: 0;
    height: 25px;
    width: 100%;
    padding-inline: 2px;
    border-radius: 5px;
    font-size: clamp(0.46rem, 2.35vw, 0.56rem);
  }

  .account-button {
    gap: 3px;
    line-height: 1;
  }

  .account-avatar {
    width: 16px;
    height: 16px;
    min-width: 16px;
  }

  .game-grid {
    gap: 6px;
    padding: 1px 1px 6px;
  }

  .game-grid,
  .side-stack {
    grid-template-columns: 1fr;
  }

  .side-stack {
    gap: 6px;
  }

  .side-stack .panel {
    padding: 7px;
  }

  .side-stack .panel-heading {
    gap: 6px;
    font-size: 0.64rem;
    line-height: 1.1;
  }

  .side-stack .stat-bars {
    gap: 4px;
    margin-top: 6px;
  }

  .side-stack .stat-row {
    grid-template-columns: minmax(68px, 0.72fr) minmax(86px, 1fr) 42px;
    gap: 5px;
    font-size: 0.64rem;
  }

  .side-stack .bar {
    height: 9px;
  }

  .side-stack .stat-row em {
    min-width: 18px;
    margin-left: 2px;
  }

  .side-stack .mini-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-top: 7px;
  }

  .side-stack .mini-stat {
    min-height: 32px;
    padding: 5px;
  }

  .side-stack .mini-stat span {
    font-size: 0.54rem;
  }

  .side-stack .mini-stat strong {
    margin-top: 2px;
    font-size: 0.72rem;
  }

  .side-stack .perk-strip {
    gap: 5px;
    margin-top: 7px;
  }

  .side-stack .perk-button {
    min-height: 33px;
    padding: 4px;
  }

  .side-stack .perk-button .perk-icon {
    width: 21px;
    height: 21px;
    font-size: 0.66rem;
  }

  .side-stack .perk-button small {
    margin-top: 1px;
    font-size: 0.5rem;
  }

  .side-stack .perk-detail {
    margin-top: 7px;
    padding: 6px;
    font-size: 0.62rem;
    line-height: 1.18;
  }

  .game-grid {
    grid-template-areas:
      "terminal"
      "side"
      "map";
  }

  .terminal-panel {
    position: static;
    display: block;
    min-height: auto;
    max-height: none;
    overflow: visible;
    padding: 8px;
  }


  .guest-screen .terminal-panel {
    min-height: auto;
  }

  .guest-screen .terminal-header,
  .guest-screen .scene-art,
  .guest-screen .order-stage,
  .guest-screen .shift-strip,
  .guest-screen .scene-copy,
  .guest-screen .choice-grid {
    grid-column: auto;
    grid-row: auto;
  }

  .guest-screen .scene-art {
    min-height: 0;
    margin: 8px 0 6px;
  }

  .guest-screen .order-stage:not(:empty) {
    margin-top: 6px;
  }

  .stage-speech {
    top: 6px;
    left: 9px;
    width: clamp(128px, 42vw, 164px);
    min-height: 36px;
    max-height: 48px;
    padding: 4px 6px 5px;
  }

  .stage-speech span {
    font-size: 0.42rem;
  }

  .stage-speech b {
    font-size: 0.48rem;
    line-height: 1.12;
    -webkit-line-clamp: 3;
  }

  .stage-speech::after {
    right: 6px;
    bottom: 6px;
    width: 5px;
    height: 10px;
  }

  .stage-rail {
    grid-template-columns: 43px 58px minmax(0, 1fr) 50px;
    gap: 4px;
    min-height: 134px;
    padding: 50px 5px 5px;
  }

  .stage-person {
    min-height: 62px;
  }

  .guest-crowd {
    bottom: 21px;
    width: 62px;
    height: 44px;
  }

  .crowd-person em {
    width: 14px;
    height: 12px;
  }

  .crowd-person strong {
    width: 17px;
    height: 16px;
  }

  .crowd-person-1 {
    left: 0;
    bottom: 1px;
    --crowd-scale: 0.82;
  }

  .crowd-person-2 {
    right: 0;
    bottom: 2px;
    --crowd-scale: 0.8;
  }

  .crowd-person-3 {
    left: 12px;
    bottom: 14px;
    --crowd-scale: 0.68;
  }

  .crowd-person-4 {
    right: 12px;
    bottom: 13px;
    --crowd-scale: 0.66;
  }

  .crowd-person-5 {
    left: 26px;
    bottom: 5px;
    --crowd-scale: 0.72;
  }

  .guest-dog {
    left: -8px;
    bottom: 10px;
    width: 23px;
    height: 14px;
  }

  .guest-dog::before {
    left: -7px;
    width: 8px;
    height: 8px;
  }

  .guest-dog::after {
    right: -6px;
    width: 8px;
  }

  .guest-dog em {
    right: -11px;
    top: -16px;
    padding: 1px 3px;
    font-size: 0.37rem;
  }

  .person-head {
    width: 21px;
    height: 19px;
  }

  .person-body {
    width: 27px;
    height: 28px;
  }

  .stage-person b {
    font-size: 0.48rem;
  }

  .stage-counter {
    grid-template-columns: minmax(0, 1fr) 18px;
    gap: 2px;
    min-height: 62px;
    padding: 4px;
  }

  .stage-barista {
    display: grid;
    min-height: 48px;
    transform: scale(0.78);
    transform-origin: bottom center;
  }

  .stage-machine {
    min-height: 52px;
  }

  .stage-machine::before {
    left: 4px;
    font-size: 0.4rem;
  }

  .stage-tray,
  .stage-cash {
    min-height: 84px;
  }

  .stage-tray {
    padding: 4px;
  }

  .tray-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 3px;
    margin-top: 4px;
  }

  .order-item {
    min-height: 35px;
    padding: 3px 2px 2px;
  }

  .order-item-shape {
    transform: scale(0.82);
    transform-origin: top center;
  }

  .order-item b {
    margin-top: -2px;
    font-size: 0.42rem;
  }

  .order-item small {
    display: none;
  }

  .cash-screen {
    min-height: 20px;
    font-size: 0.44rem;
  }

  .cash-ticket {
    width: 22px;
    height: 22px;
  }

  .stage-caption {
    padding: 4px 5px;
    gap: 5px;
    font-size: 0.52rem;
  }

  .guest-screen .scene-copy {
    margin-top: 6px;
  }

  .guest-dialog {
    gap: 5px;
  }

  .dialog-bubble-system {
    padding: 5px;
  }

  .guest-screen .shift-strip {
    margin: 0 0 6px;
  }

  .guest-screen .choice-grid {
    margin-top: 8px;
  }

  .shift-strip {
    grid-template-columns: 1fr;
  }

  .shift-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .guest-screen .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .guest-screen .choice-button {
    min-height: 40px;
    padding: 5px 6px;
  }

  .guest-screen .choice-button b {
    font-size: 0.66rem;
  }

  .guest-screen .choice-button span {
    font-size: 0.54rem;
  }

  .guest-history {
    padding: 6px;
  }

  .guest-history li {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .guest-history li span {
    font-size: 0.64rem;
  }

  .boss-clicker-panel,
  .friend-energy-panel {
    grid-template-columns: 1fr;
  }

  .boss-clicker-button,
  .friend-tap-button {
    min-height: 60px;
  }

  .level-boss-hit {
    min-height: 118px;
  }

  .level-boss-panel,
  .level-boss-arena {
    padding: 7px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  .route-grid,
  .rule-grid,
  .help-map,
  .help-matrix {
    grid-template-columns: 1fr;
  }

  .leaderboard-summary {
    grid-template-columns: 1fr;
  }

  .leaderboard-head {
    display: none;
  }

  .leaderboard-row {
    grid-template-columns: 34px 1fr;
  }

  .leaderboard-row > span:nth-child(n + 3) {
    grid-column: 2;
  }

  .help-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .statusline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 28px;
    padding: 5px 7px;
    gap: 8px;
    font-size: 0.58rem;
    line-height: 1.12;
  }

  .statusline span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .coach-overlay {
    padding: 8px;
  }

  .coach-pointer {
    border-left-width: 9px;
    border-right-width: 9px;
    border-top-width: 15px;
  }

  .coach-card {
    pointer-events: auto;
    width: calc(100vw - 24px);
    max-height: min(42dvh, 300px);
    overflow: auto;
    padding: 9px;
    border-radius: 6px;
  }

  .coach-kicker {
    font-size: 0.58rem;
  }

  .coach-card h2 {
    margin-top: 3px;
    font-size: clamp(0.78rem, 4.2vw, 0.98rem);
    line-height: 1.12;
  }

  .coach-card p {
    margin-top: 4px;
    font-size: clamp(0.72rem, 3.8vw, 0.9rem);
    line-height: 1.22;
  }

  .coach-actions {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-top: 7px;
  }

  .coach-actions button {
    min-height: 30px;
    font-size: 0.72rem;
  }
}

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