* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000000;
  --panel: #242424;
  --panel-light: #303030;
  --yellow: #ffd447;
  --red: #d62828;
  --red-dark: #9f1d1d;
  --cream: #fff4d6;
  --white: #ffffff;
  --muted: #b8b8b8;
  --green: #58cc02;
  --blue: #47a8ff;
  --shadow: rgba(0, 0, 0, 0.35);
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--white);
}

button {
  font-family: inherit;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 24px;
}

.active-screen {
  display: block;
}

#titleScreen,
#loadingScreen,
#storyScreen,
#summaryScreen {
  display: none;
  align-items: center;
  justify-content: center;
}

#titleScreen.active-screen,
#loadingScreen.active-screen,
#storyScreen.active-screen,
#summaryScreen.active-screen {
  display: flex;
}

.brand-card,
.loading-card,
.summary-card {
  width: min(720px, 95vw);
  padding: 42px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 212, 71, 0.10), rgba(214, 40, 40, 0.10)),
    var(--panel);
  border: 2px solid rgba(255, 212, 71, 0.3);
  box-shadow: 0 24px 80px var(--shadow);
  text-align: center;
}

.brand-card {
  width: min(920px, 98vw);
  padding: 10px 12px 28px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.title-logo-wrap {
  position: relative;
  width: min(820px, 94vw);
  margin: 0 auto 12px;
}

.title-logo {
  display: block;
  width: 100%;
  height: auto;
}

.employee-id-input {
  position: absolute;
  left: 50%;
  top: 84.4%;
  width: 29%;
  min-width: 142px;
  height: 4.4%;
  min-height: 24px;
  transform: translateX(-50%);
  border: 2px solid rgba(156, 19, 19, 0.55);
  border-radius: 4px;
  background: rgba(255, 210, 42, 0.86);
  color: #9f1d1d;
  font-family: "Courier New", monospace;
  font-size: clamp(16px, 2.4vw, 24px);
  font-weight: 900;
  letter-spacing: 3px;
  text-align: center;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 214, 0.25);
}

.employee-id-input:focus {
  border-color: #fff4d6;
  background: #ffd447;
}

.employee-id-input.employee-id-error {
  border-color: #ffffff;
  background: #d62828;
  color: #ffffff;
}

.employee-id-message {
  min-height: 22px;
  margin: 4px 0 16px;
  color: var(--cream);
  font-size: 15px;
  font-weight: 700;
}

.employee-id-message.employee-id-error {
  color: #ffb4a8;
}

.title-flash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000000;
  color: var(--yellow);
  font-size: clamp(24px, 5vw, 54px);
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.title-flash.active {
  display: flex;
}

.music-controls {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  width: min(300px, calc(100vw - 32px));
}

.compliance-button {
  position: fixed;
  left: 10px;
  top: 50%;
  z-index: 40;
  width: clamp(112px, 12vw, 154px);
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #000000;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transform: translateY(-50%);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.compliance-button:hover {
  filter: brightness(1.08);
}

.compliance-button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.compliance-button img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 180%;
  max-width: none;
  height: auto;
  pointer-events: none;
  user-select: none;
  transform: translate(-50%, -50%);
}

.music-label {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr 74px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--yellow);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.music-label:hover {
  filter: brightness(1.08);
}

.music-label img {
  display: block;
  width: 100%;
  height: 62px;
  object-fit: contain;
}

.music-label.music-playing img {
  transform: scale(2);
  transform-origin: center;
}

.music-panel {
  margin-top: 6px;
  padding: 10px;
  border: 2px solid var(--yellow);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(255, 212, 71, 0.22);
}

.music-buttons {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 6px;
}

.music-buttons button {
  min-height: 34px;
  padding: 6px 8px;
  border: 2px solid #8f1414;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffdf58, var(--yellow));
  color: #7d1010;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.music-buttons button:hover {
  background: #fff4a8;
}

.music-buttons button:active {
  transform: translateY(1px);
}

.music-volume {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.music-volume input {
  width: 100%;
  accent-color: var(--yellow);
  cursor: pointer;
}

.logo-badge {
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 900;
  box-shadow: 0 0 0 8px rgba(255, 212, 71, 0.12);
}

.brand-card h1 {
  font-size: clamp(48px, 8vw, 88px);
  color: var(--yellow);
  letter-spacing: -3px;
}

.brand-card h2 {
  margin-top: -6px;
  font-size: clamp(28px, 5vw, 48px);
  color: var(--cream);
}

.tagline {
  margin-top: 24px;
  font-size: 28px;
  font-weight: bold;
  color: var(--white);
}

.subtitle {
  margin: 18px auto 28px;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.main-btn,
.secondary-btn,
.danger-btn {
  border: none;
  border-radius: 14px;
  padding: 14px 22px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.main-btn {
  background: var(--yellow);
  color: #231900;
}

.secondary-btn {
  background: var(--panel-light);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.main-btn:hover,
.secondary-btn:hover,
.danger-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.small-logo {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.5px;
}

.loading-card h2 {
  font-size: clamp(30px, 5vw, 52px);
  color: var(--cream);
  margin-bottom: 14px;
}

.loading-card p {
  color: var(--muted);
  font-size: 18px;
}

.loading-bar-container {
  width: 100%;
  height: 26px;
  margin: 32px 0 16px;
  border-radius: 999px;
  background: #111;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.loading-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--yellow));
  transition: width 0.2s ease;
}

.loading-footer {
  font-size: 14px !important;
  color: #8f8f8f !important;
}

#storyScreen {
  padding: 0;
  overflow: hidden;
  background: #000000;
}

.story-stage {
  width: 100%;
  min-height: 100vh;
  display: block;
  position: relative;
}

.story-office {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #000000;
  overflow: hidden;
}

.story-office::before {
  content: none;
}

.story-office::after {
  content: none;
}

.story-character,
.story-manager,
.story-manager-title,
.story-video-manager {
  position: absolute;
  z-index: 1;
  transform-origin: bottom center;
}

.story-player {
  display: none;
  left: 8%;
  bottom: 20%;
  width: clamp(110px, 16vw, 190px);
  height: clamp(220px, 33vw, 390px);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.55));
}

.story-head {
  position: absolute;
  left: 50%;
  top: 0;
  width: 44%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #ffd0a6;
  border: 4px solid #29170e;
}

.story-body {
  position: absolute;
  left: 50%;
  top: 24%;
  width: 68%;
  height: 66%;
  transform: translateX(-50%);
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(90deg, transparent 45%, #ffd447 45% 55%, transparent 55%),
    linear-gradient(180deg, #d62828, #8f1414);
  border: 4px solid #29170e;
}

.story-badge {
  position: absolute;
  left: 50%;
  top: 41%;
  transform: translateX(-50%);
  padding: 4px 7px;
  border: 2px solid #111;
  background: #fff4d6;
  color: #111;
  font-family: "Courier New", monospace;
  font-size: clamp(10px, 1.8vw, 14px);
  font-weight: 900;
}

.story-manager {
  right: 4%;
  bottom: 0;
  width: auto;
  height: max(75vh, 620px);
  max-height: 94vh;
  object-fit: contain;
  filter: none;
  pointer-events: none;
  z-index: 2;
}

.story-manager-title {
  left: 50%;
  right: auto;
  top: -36vh;
  bottom: auto;
  width: 144vw;
  max-width: 1860px;
  max-height: none;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  z-index: 10;
  opacity: 1;
  transform: translateX(-50%);
}

.story-video-manager {
  display: none;
  right: 6%;
  bottom: 26%;
  width: clamp(160px, 20vw, 250px);
}

.story-video-frame {
  aspect-ratio: 4 / 3;
  border: 5px solid #111;
  background: #050505;
  box-shadow: 0 0 0 4px #5a554d, 0 18px 30px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.story-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.story-video-stand {
  width: 34%;
  height: 56px;
  margin: 0 auto;
  background:
    linear-gradient(90deg, transparent 0 38%, #5a554d 38% 62%, transparent 62%),
    linear-gradient(180deg, transparent 0 70%, #5a554d 70%);
}

.story-grow .story-player {
  animation: storyGrow 1.8s ease-in-out both;
}

.story-grow .story-manager {
  animation: storyGrow 1.8s ease-in-out 0.12s both;
}

.story-grow .story-manager-title {
  animation: storyTitleAppear 1.8s ease-in-out 0.12s both;
}

.story-grow .story-video-manager {
  animation: storyGrow 1.8s ease-in-out 0.24s both;
}

@keyframes storyGrow {
  0% {
    transform: scale(0.46);
  }

  62% {
    transform: scale(1.16);
  }

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

@keyframes storyTitleAppear {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.82);
  }

  42% {
    opacity: 1;
  }

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

.dialogue-box {
  display: none;
  grid-template-columns: 1fr auto;
  gap: 12px 18px;
  align-items: end;
  min-height: 150px;
  padding: 22px;
  border: 3px solid var(--yellow);
  background: linear-gradient(180deg, #161616, #090909);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.dialogue-speaker {
  grid-column: 1 / -1;
  color: var(--yellow);
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.dialogue-box p {
  min-height: 54px;
  color: var(--cream);
  font-size: clamp(20px, 2.7vw, 31px);
  font-weight: 800;
  line-height: 1.25;
}

.dialogue-box .main-btn {
  min-width: 132px;
  border-radius: 6px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 18px 50px var(--shadow);
}

.top-bar h1 {
  color: var(--yellow);
  font-size: 34px;
}

.top-bar p {
  color: var(--muted);
  margin-top: 4px;
}

.stat-box {
  min-width: 120px;
  padding: 14px 18px;
  border-radius: 18px;
  background: #111;
  text-align: center;
}

.stat-box span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.stat-box strong {
  font-size: 24px;
  color: var(--yellow);
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 20px;
}

.station-card {
  min-height: 220px;
  padding: 28px;
  text-align: left;
  border: 2px solid rgba(255, 212, 71, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 212, 71, 0.08), rgba(255, 255, 255, 0.02)),
    var(--panel);
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 16px 45px var(--shadow);
  transition: transform 0.15s ease, border 0.15s ease;
}

.station-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 212, 71, 0.48);
}

.station-card.locked {
  cursor: not-allowed;
  opacity: 0.45;
}

.station-card.locked:hover {
  transform: none;
  border-color: rgba(255, 212, 71, 0.16);
}

.station-icon {
  display: block;
  font-size: 42px;
  margin-bottom: 18px;
}

.station-card h2 {
  color: var(--cream);
  margin-bottom: 8px;
}

.station-card p {
  color: var(--muted);
  line-height: 1.45;
}

.bottom-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.register-layout,
.burger-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 20px;
}

.customer-panel,
.register-panel,
.receipt-panel,
.recipe-panel,
.ingredient-panel,
.build-panel {
  padding: 22px;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 18px 50px var(--shadow);
}

.customer-panel h2,
.register-panel h2,
.receipt-panel h2,
.recipe-panel h2,
.ingredient-panel h2,
.build-panel h2 {
  color: var(--yellow);
  margin-bottom: 16px;
}

.customer-panel p {
  min-height: 120px;
  padding: 18px;
  border-radius: 18px;
  background: #111;
  color: var(--cream);
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.menu-buttons,
.ingredient-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 12px;
}

.menu-btn,
.ingredient-btn {
  min-height: 86px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--panel-light);
  color: var(--white);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.menu-btn span {
  color: var(--yellow);
  font-size: 14px;
}

.menu-btn:hover,
.ingredient-btn:hover {
  transform: translateY(-2px);
  background: #3d3d3d;
}

#orderList,
#burgerBuildList {
  list-style: none;
  min-height: 180px;
  padding: 14px;
  border-radius: 16px;
  background: #111;
  margin-bottom: 18px;
}

#orderList li,
#burgerBuildList li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  color: var(--cream);
}

#orderList li:last-child,
#burgerBuildList li:last-child {
  border-bottom: none;
}

.total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 212, 71, 0.12);
}

.total-box span {
  color: var(--muted);
}

.total-box strong {
  font-size: 28px;
  color: var(--yellow);
}

.payment-box {
  padding: 16px;
  border-radius: 16px;
  background: #111;
  margin-bottom: 16px;
}

.payment-box label {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.payment-box input {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #1f1f1f;
  color: var(--white);
  font-size: 18px;
}

.payment-box p {
  margin-top: 12px;
  color: var(--cream);
  font-weight: bold;
}

.recipe-panel ol {
  margin-left: 22px;
  color: var(--cream);
  line-height: 1.8;
}

.recipe-panel h3 {
  margin-bottom: 12px;
  color: var(--white);
}

.burger-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#burgerResult {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: #111;
  color: var(--cream);
}

.cup-test-layout {
  min-height: calc(100vh - 130px);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.cup-stage {
  display: flex;
  flex-direction: column;
  place-items: center;
  align-items: center;
  gap: 22px;
  min-height: 0;
  padding: 18px;
  background: #000000;
}

.cup-meter {
  --cup-fill: 100%;
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 640px);
  aspect-ratio: 16 / 9;
}

.cup-meter img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.cup-meter-full {
  clip-path: inset(calc(100% - var(--cup-fill)) 0 0 0);
  z-index: 1;
}

.cup-meter-empty {
  z-index: 2;
}

.cup-meter-large {
  max-width: min(82vw, 720px);
  max-height: calc(100vh - 230px);
}

.performance-meter-test {
  width: min(82vw, 620px);
  text-align: center;
}

.performance-meter-label {
  margin: 0 0 8px;
  color: var(--cream);
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 900;
  text-transform: uppercase;
}

.performance-meter {
  --meter-angle: 0deg;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
}

.performance-meter-face {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.performance-meter-arm {
  position: absolute;
  left: 50%;
  top: 27.2%;
  z-index: 2;
  display: block;
  width: 19.8%;
  height: auto;
  transform: translateX(-50%) rotate(var(--meter-angle));
  transform-origin: 50% 86.5%;
  transition: transform 420ms cubic-bezier(.22, .9, .3, 1.2);
  pointer-events: none;
  user-select: none;
}

.performance-meter-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.meter-condition-btn.active {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #241307;
}

.cup-test-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

#registerScreen {
  padding: 12px;
  background:
    linear-gradient(135deg, #3f3f3f, #171717 42%, #0f0f0f);
}

.pos-shell {
  width: min(1180px, 100%);
  min-height: calc(100vh - 24px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 8px;
  padding: 8px;
  border: 3px solid #111;
  background: #c9c5bc;
  box-shadow: 0 24px 80px var(--shadow);
}

.pos-receipt,
.pos-register {
  border: 2px solid #77736a;
  background: #d4d0c8;
  color: #111;
}

.pos-receipt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px;
}

.pos-receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border: 2px inset #f2eee5;
  background: #ece8df;
  font-size: 14px;
}

.pos-customer {
  margin-top: 8px;
  padding: 8px;
  border: 2px inset #f2eee5;
  background: #fffdf3;
}

.pos-customer span,
.cash-field span {
  display: block;
  margin-bottom: 6px;
  color: #4b473f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.pos-customer p {
  min-height: 74px;
  color: #111;
  font-size: 15px;
  line-height: 1.35;
}

.pos-cup-timer {
  margin-top: 8px;
  padding: 8px;
  border: 2px inset #f2eee5;
  background: #fffdf3;
}

.pos-cup-timer span {
  display: block;
  margin-bottom: 6px;
  color: #9f1d1d;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pos-cup-frame {
  min-height: 124px;
  border: 2px solid #9f1d1d;
  background: #ffffff;
  overflow: hidden;
  width: 100%;
}

.pos-cup-frame img {
  max-width: 100%;
  max-height: 118px;
}

.pos-receipt #orderList {
  flex: 1;
  min-height: 140px;
  margin: 8px 0;
  border: 2px inset #f2eee5;
  border-radius: 0;
  background: #fffdf3;
}

.pos-receipt #orderList li {
  color: #111;
  border-bottom: 1px dotted #8c877c;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.pos-receipt #orderList li.order-modifier {
  padding-left: 16px;
  color: #314f7a;
  font-size: 12px;
  border-bottom: none;
}

.pos-total {
  margin-bottom: 8px;
  border-radius: 0;
  border: 2px inset #f2eee5;
  background: #fffdf3;
}

.pos-total span,
.pos-total strong {
  color: #111;
}

.cash-field {
  display: block;
  padding: 8px;
  border: 2px inset #f2eee5;
  background: #ece8df;
}

.cash-field input {
  width: 100%;
  padding: 10px;
  border: 2px inset #ffffff;
  background: #ffffff;
  color: #111;
  font-size: 18px;
  font-weight: 700;
}

.pos-message {
  margin-top: 8px;
  min-height: 48px;
  padding: 8px;
  border: 2px inset #f2eee5;
  background: #101820;
  color: #b9ffb9;
  font-family: "Courier New", monospace;
  font-size: 13px;
  line-height: 1.35;
}

.pos-register {
  min-width: 0;
  padding: 8px;
}

.pos-top-strip {
  min-height: 72px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 2px inset #f2eee5;
  background: #ebe7dc;
}

.pos-user-badge {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px outset #ffffff;
  background: #ffd447;
  color: #b31313;
  font-size: 34px;
  font-weight: 900;
}

.pos-top-strip h1 {
  color: #111;
  font-size: 24px;
}

.pos-top-strip p {
  margin-top: 3px;
  color: #45413a;
  font-weight: 700;
}

.pos-clock {
  min-width: 116px;
  padding: 8px;
  border: 2px inset #ffffff;
  background: #101820;
  color: #d7f7ff;
  text-align: center;
}

.pos-clock span,
.pos-clock strong {
  display: block;
}

.pos-clock span {
  font-size: 11px;
  color: #ffd447;
}

.pos-clock strong {
  margin-top: 4px;
  font-size: 14px;
}

.pos-category-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin: 8px 0;
}

.pos-category,
.pos-daypart-btn,
.pos-key,
.pos-action {
  border: 2px outset #ffffff;
  border-radius: 0;
  font-weight: 800;
  cursor: pointer;
}

.pos-category {
  min-height: 48px;
  background: #ece8df;
  color: #111;
  font-size: 15px;
}

.pos-daypart {
  display: grid;
  grid-template-rows: 1fr 1fr;
  min-height: 48px;
}

.pos-daypart-btn {
  min-height: 24px;
  background: #ece8df;
  color: #111;
  font-size: 11px;
  line-height: 1;
}

.pos-category.active {
  background: #ffd447;
  color: #111;
}

.pos-daypart-btn.active {
  background: #ffd447;
  color: #111;
}

.pos-content {
  display: grid;
  grid-template-columns: 1fr 142px;
  gap: 8px;
}

.pos-button-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  grid-auto-rows: minmax(82px, 1fr);
  gap: 5px;
}

.pos-key {
  min-height: 82px;
  padding: 8px 6px;
  background: #f6f0d6;
  color: #111;
  font-size: 14px;
  line-height: 1.15;
  transition: filter 0.08s ease, transform 0.08s ease;
}

.pos-key span {
  display: inline-block;
  margin-top: 5px;
  color: #9f1d1d;
  font-size: 13px;
}

.pos-key:hover,
.pos-action:hover,
.pos-category:hover,
.pos-daypart-btn:hover {
  filter: brightness(1.04);
  transform: none;
}

.pos-key:active,
.pos-action:active,
.pos-category:active,
.pos-daypart-btn:active {
  border-style: inset;
  transform: translateY(1px);
}

.pos-product {
  background: linear-gradient(#fff8d9, #efdf88);
}

.pos-modifier {
  background: linear-gradient(#dbeaff, #a8c8f2);
  color: #10213d;
}

.pos-disabled {
  background: #b9b5ac;
  color: #58544d;
  cursor: not-allowed;
}

.hidden-category {
  display: none;
}

.pos-action-pad {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(58px, 1fr);
  gap: 5px;
}

.pos-action {
  padding: 8px 6px;
  color: #111;
  font-size: 13px;
  line-height: 1.15;
}

.pos-blue {
  background: #88c5ff;
}

.pos-green {
  background: #82d66f;
}

.pos-red {
  background: #ff8d7d;
}

.pos-gray {
  background: #ece8df;
}

.summary-card h1 {
  color: var(--yellow);
  font-size: 52px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 30px 0;
}

.summary-stats div {
  padding: 20px;
  border-radius: 18px;
  background: #111;
}

.summary-stats span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.summary-stats strong {
  color: var(--yellow);
  font-size: 30px;
}

@media (max-width: 950px) {
  .register-layout,
  .burger-layout {
    grid-template-columns: 1fr;
  }

  .pos-shell {
    grid-template-columns: 1fr;
  }

  .pos-content {
    grid-template-columns: 1fr;
  }

  .pos-action-pad {
    grid-template-columns: repeat(4, 1fr);
  }

  .pos-button-grid {
    grid-template-columns: repeat(3, minmax(86px, 1fr));
  }

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

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .story-office {
    min-height: 58vh;
  }

  .story-player {
    left: 4%;
  }

  .story-manager {
    left: 34%;
  }

  .story-video-manager {
    right: 3%;
  }
}

@media (max-width: 620px) {
  .screen {
    padding: 12px;
  }

  .story-stage {
    min-height: calc(100vh - 24px);
  }

  .story-office {
    min-height: 55vh;
  }

  .story-player {
    left: -2%;
    bottom: 18%;
  }

  .story-manager {
    left: 26%;
    bottom: 16%;
    width: clamp(190px, 52vw, 260px);
  }

  .story-video-manager {
    right: -3%;
    bottom: 34%;
    width: clamp(130px, 38vw, 180px);
  }

  .dialogue-box {
    grid-template-columns: 1fr;
    min-height: 180px;
    padding: 16px;
  }

  .dialogue-box .main-btn {
    width: 100%;
  }

  #registerScreen {
    padding: 6px;
  }

  .pos-shell {
    min-height: calc(100vh - 12px);
    padding: 5px;
  }

  .pos-top-strip {
    grid-template-columns: 50px 1fr;
  }

  .pos-clock {
    grid-column: 1 / -1;
  }

  .pos-user-badge {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  .pos-category-row,
  .pos-action-pad {
    grid-template-columns: repeat(2, 1fr);
  }

  .pos-button-grid {
    grid-template-columns: repeat(2, minmax(92px, 1fr));
  }
}

#storyScreen .story-office {
  min-height: 100vh;
}

#storyScreen .story-player,
#storyScreen .story-video-manager {
  display: none;
}

#storyScreen .dialogue-box {
  position: fixed;
  left: 4vw;
  bottom: 7vh;
  z-index: 30;
  display: grid;
  width: min(88vw, 1220px);
  min-height: 230px;
  padding: 34px 42px;
  border: 5px solid var(--yellow);
  border-radius: 0;
  background: linear-gradient(180deg, #d62828, #941616);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.58);
  animation: dialogueSlideIn 0.62s cubic-bezier(0.18, 0.86, 0.25, 1) 1.05s both;
}

#storyScreen .dialogue-box .main-btn {
  display: none;
}

#storyScreen .dialogue-speaker {
  color: var(--yellow);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

#storyScreen .dialogue-box p {
  color: #fff4d6;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

@keyframes dialogueSlideIn {
  0% {
    transform: translateX(-120vw);
  }

  100% {
    transform: translateX(0);
  }
}

#storyScreen .story-manager {
  left: auto;
  right: 4%;
  bottom: 0;
  width: auto;
  height: max(75vh, 620px);
  max-width: 58vw;
  max-height: 94vh;
  z-index: 2;
}

#storyScreen .story-manager-title {
  left: 50%;
  right: auto;
  top: -36vh;
  bottom: auto;
  width: 144vw;
  max-width: 1860px;
  max-height: none;
  z-index: 10;
  transform: translateX(-50%);
}

@media (max-width: 620px) {
  #storyScreen .story-manager {
    right: -4%;
    height: 75vh;
    max-width: 72vw;
  }

  #storyScreen .story-manager-title {
    left: 50%;
    right: auto;
    top: -33vh;
    bottom: auto;
    width: 147vw;
    max-width: none;
    max-height: none;
    transform: translateX(-50%);
  }

  #storyScreen .dialogue-box {
    left: 4vw;
    right: 4vw;
    bottom: 5vh;
    width: auto;
    min-height: 220px;
    padding: 24px;
  }
}
