:root {
  --bg: #0d0500;
  --gold: #c8860a;
  --gold-soft: #e8c030;
  --card-bg: rgba(16, 10, 6, 0.92);
  --danger: #c83020;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--gold-soft);
  font-family: Georgia, "Times New Roman", serif;
}

#gameContainer {
  position: relative;
  width: 100vw;
  height: 100vh;
}

.meta-panel {
  position: absolute;
  top: 72px;
  right: 16px;
  z-index: 45;
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100vh - 88px);
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(27, 16, 9, 0.96), rgba(15, 9, 5, 0.94)),
    rgba(17, 11, 8, 0.9);
  border: 1px solid rgba(240, 197, 92, 0.24);
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 241, 214, 0.08);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.meta-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.panel-backdrop {
  position: absolute;
  inset: 0;
  z-index: 44;
  background:
    radial-gradient(circle at 80% 12%, rgba(245, 200, 66, 0.1), transparent 22%),
    rgba(8, 5, 2, 0.42);
  backdrop-filter: blur(7px);
}

.panel-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 46;
  border: 1px solid rgba(240, 197, 92, 0.32);
  border-radius: 999px;
  padding: 11px 17px;
  background: linear-gradient(180deg, rgba(29, 18, 10, 0.92), rgba(17, 11, 8, 0.88));
  color: #f5ede0;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.08em;
}

.panel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(240, 197, 92, 0.12);
}

.panel-title-wrap {
  display: grid;
  gap: 4px;
}

.panel-title-wrap strong {
  color: #f5ede0;
  font-size: 24px;
}

.panel-title-wrap p {
  margin: 0;
  color: #ceb89c;
  font-size: 13px;
  line-height: 1.45;
  max-width: 240px;
}

.panel-close {
  border: 1px solid rgba(240, 197, 92, 0.2);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(200, 98, 42, 0.12);
  color: #f5ede0;
  cursor: pointer;
}

.panel-section + .panel-section {
  margin-top: 18px;
}

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

.panel-tab {
  border: 1px solid rgba(240, 197, 92, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 242, 210, 0.03);
  color: #d9c0a2;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.panel-tab:hover {
  transform: translateY(-1px);
  background: rgba(245, 200, 66, 0.08);
}

.panel-tab.is-active {
  color: #fff2cf;
  background: linear-gradient(180deg, rgba(245, 200, 66, 0.16), rgba(200, 98, 42, 0.14));
  border-color: rgba(245, 200, 66, 0.22);
}

.panel-section {
  display: none;
}

.panel-section.is-active {
  display: grid;
  gap: 12px;
  animation: panelFadeIn 0.2s ease;
}

.panel-section[data-panel-view="progress"].is-active {
  padding-top: 10px;
}

.panel-kicker {
  margin-bottom: 0;
  color: #f5c842;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-left: 2px;
}

.meta-stats {
  display: grid;
  gap: 10px;
}

.meta-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(245, 200, 66, 0.1), rgba(245, 200, 66, 0.04));
  border: 1px solid rgba(245, 200, 66, 0.08);
  border-radius: 16px;
  color: #f5ede0;
}

.meta-stat span {
  color: #d8bea2;
  font-size: 13px;
}

.meta-stat strong {
  color: #f5c842;
  font-size: 20px;
}

.upgrade-list {
  display: grid;
  gap: 10px;
}

.upgrade-card {
  padding: 14px;
  background: linear-gradient(180deg, rgba(45, 27, 16, 0.96), rgba(20, 12, 7, 0.96));
  border: 1px solid rgba(240, 197, 92, 0.12);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 242, 210, 0.04);
}

.upgrade-card.maxed {
  border-color: rgba(91, 211, 107, 0.45);
}

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

.upgrade-head h3 {
  margin: 0;
  color: #f5ede0;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.upgrade-head span {
  color: #f5c842;
  font-size: 12px;
}

.upgrade-card p {
  margin: 8px 0 12px;
  color: #d8bea2;
  font-size: 13px;
  line-height: 1.4;
}

.upgrade-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(245, 200, 66, 0.12);
  font-size: 16px;
}

.upgrade-effect {
  color: #f1d699;
}

.upgrade-card button,
.panel-actions button {
  width: 100%;
  border: 1px solid rgba(200, 134, 10, 0.55);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(200, 98, 42, 0.16);
  color: #f5ede0;
  font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.upgrade-card button:hover,
.panel-actions button:hover {
  transform: translateY(-1px);
  background: rgba(200, 98, 42, 0.28);
}

.upgrade-card button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.panel-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.guide-list {
  display: grid;
  gap: 8px;
  color: #d8bea2;
  font-size: 13px;
}

.guide-list div {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 242, 210, 0.04);
  border: 1px solid rgba(240, 197, 92, 0.08);
}

.panel-actions {
  display: grid;
  gap: 10px;
}

body.hide-hints #controls {
  display: none;
}

body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

.start-screen {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.start-screen.hidden {
  display: none;
}

.start-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 16%, rgba(86, 230, 255, 0.11), transparent 24%),
    radial-gradient(circle at 16% 24%, rgba(84, 152, 255, 0.09), transparent 18%),
    radial-gradient(circle at 84% 18%, rgba(86, 230, 255, 0.08), transparent 16%),
    linear-gradient(180deg, rgba(6, 12, 19, 0.98) 0%, rgba(4, 8, 13, 1) 100%);
  transform: scale(1.03);
}

.start-bg::before,
.start-bg::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  background: rgba(86, 230, 255, 0.08);
  filter: blur(1px);
}

.start-bg::before {
  width: 560px;
  height: 560px;
  left: -160px;
  bottom: -260px;
}

.start-bg::after {
  width: 520px;
  height: 520px;
  right: -120px;
  top: -180px;
}

.start-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 8, 13, 0.2) 0%, rgba(4, 8, 13, 0.58) 100%),
    radial-gradient(circle at center, transparent 0%, rgba(4, 8, 13, 0.24) 100%);
}

.start-hologram {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.92;
}

.start-hologram::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(86, 230, 255, 0.14), rgba(86, 230, 255, 0.03) 42%, transparent 70%);
  filter: blur(10px);
}

.start-hologram::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2%;
  height: 46%;
  background:
    radial-gradient(circle at 18% 72%, rgba(86, 230, 255, 0.1), transparent 12%),
    radial-gradient(circle at 50% 68%, rgba(86, 230, 255, 0.12), transparent 15%),
    radial-gradient(circle at 82% 72%, rgba(86, 230, 255, 0.1), transparent 12%),
    linear-gradient(180deg, transparent 0 46%, rgba(86, 230, 255, 0.08) 46% 47%, transparent 47%),
    linear-gradient(180deg, rgba(11, 22, 32, 0) 0%, rgba(9, 16, 24, 0.92) 54%);
  clip-path: polygon(0% 100%, 0% 74%, 8% 74%, 10% 38%, 12% 38%, 12% 68%, 18% 68%, 22% 52%, 28% 52%, 32% 70%, 39% 70%, 43% 26%, 45% 26%, 45% 58%, 55% 58%, 55% 18%, 57% 18%, 57% 54%, 66% 54%, 70% 40%, 76% 40%, 80% 68%, 88% 68%, 88% 32%, 90% 32%, 92% 76%, 100% 76%, 100% 100%);
  opacity: 0.9;
}

.holo-ring,
.holo-moon,
.holo-minaret,
.holo-counter,
.holo-oven,
.holo-table {
  position: absolute;
  display: block;
}

.holo-ring {
  left: 50%;
  top: 52%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(102, 225, 255, 0.3);
  box-shadow: 0 0 24px rgba(61, 190, 255, 0.14), inset 0 0 16px rgba(91, 241, 255, 0.06);
}

.holo-ring-a {
  width: 500px;
  height: 500px;
  animation: holoPulse 6s ease-in-out infinite;
}

.holo-ring-b {
  width: 380px;
  height: 380px;
  border-style: dashed;
  border-color: rgba(102, 225, 255, 0.2);
  animation: holoRotate 18s linear infinite;
}

.holo-moon {
  left: 50%;
  top: 25%;
  width: 88px;
  height: 88px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 36%, rgba(124, 241, 255, 0.94), rgba(68, 170, 255, 0.56));
  box-shadow: 0 0 36px rgba(74, 213, 255, 0.24);
}

.holo-moon::after {
  content: "";
  position: absolute;
  inset: 8px 0 8px 24px;
  border-radius: 50%;
  background: rgba(4, 8, 13, 0.96);
}

.holo-minaret {
  top: 16%;
  width: 22px;
  height: 320px;
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(94, 243, 214, 0.22);
  background: linear-gradient(180deg, rgba(94, 243, 214, 0.16), rgba(94, 243, 214, 0.03));
}

.holo-minaret::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  width: 14px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 8px 8px 0 0;
  background: rgba(94, 243, 214, 0.24);
}

.holo-minaret-left {
  left: calc(50% - 208px);
}

.holo-minaret-right {
  right: calc(50% - 208px);
}

.holo-counter {
  left: 50%;
  bottom: 18%;
  width: 620px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(74, 213, 255, 0.03), rgba(74, 213, 255, 0.16), rgba(74, 213, 255, 0.03));
}

.holo-oven,
.holo-table {
  bottom: 18%;
  border: 1px solid rgba(102, 225, 255, 0.28);
  background: linear-gradient(180deg, rgba(61, 190, 255, 0.12), rgba(61, 190, 255, 0.03));
  box-shadow: inset 0 0 18px rgba(61, 190, 255, 0.08), 0 0 18px rgba(61, 190, 255, 0.08);
}

.holo-oven {
  width: 88px;
  height: 72px;
  border-radius: 18px;
}

.holo-oven::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 18px;
  bottom: 12px;
  border-radius: 12px;
  border: 1px solid rgba(102, 225, 255, 0.28);
}

.holo-oven-left {
  left: calc(50% - 102px);
}

.holo-oven-right {
  right: calc(50% - 102px);
}

.holo-table {
  width: 108px;
  height: 28px;
  border-radius: 999px;
}

.holo-table::before,
.holo-table::after {
  content: "";
  position: absolute;
  bottom: -22px;
  width: 4px;
  height: 22px;
  background: rgba(102, 225, 255, 0.26);
}

.holo-table::before {
  left: 26px;
}

.holo-table::after {
  right: 26px;
}

.holo-table-left {
  left: calc(50% + 168px);
}

.holo-table-right {
  left: calc(50% + 326px);
}

.start-content {
  position: relative;
  text-align: center;
  color: #effcff;
  padding: 24px 24px 28px;
  width: min(760px, calc(100vw - 56px));
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: introRise 0.7s ease both;
  overflow: hidden;
}

.start-content::before {
  display: none;
}

.start-transition {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 217, 132, 0.22), rgba(255, 217, 132, 0.04) 28%, transparent 42%),
    linear-gradient(180deg, rgba(11, 6, 4, 0), rgba(11, 6, 4, 0));
  opacity: 0;
  z-index: 5;
}

.start-screen.is-starting .start-transition {
  animation: cinematicFade 0.9s ease forwards;
}

.start-screen.is-starting .start-content {
  animation: menuLiftOut 0.72s ease forwards;
}

.start-title {
  margin: 0;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: 0.04em;
  color: #ebfcff;
  text-shadow: 0 0 28px rgba(74, 213, 255, 0.22), 0 16px 36px rgba(0, 0, 0, 0.62);
  animation: introRise 0.95s ease both;
}

.start-subtitle {
  display: none;
}

.start-button {
  border: 1px solid rgba(95, 214, 255, 0.24);
  border-radius: 18px;
  padding: 18px 28px;
  background:
    linear-gradient(135deg, rgba(57, 156, 210, 0.88), rgba(26, 98, 154, 0.72)),
    linear-gradient(180deg, rgba(202, 246, 255, 0.08), transparent);
  color: #ecfdff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.8vw, 34px);
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 22px 40px rgba(117, 45, 12, 0.35), inset 0 1px 0 rgba(255, 241, 214, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  animation: introRise 1.22s ease both;
  position: relative;
  overflow: hidden;
  margin-top: 16px;
}

.start-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 28px 52px rgba(17, 56, 93, 0.38), 0 0 50px rgba(74, 213, 255, 0.18);
  filter: saturate(1.08);
}

.start-button::after {
  content: "";
  position: absolute;
  top: -18%;
  left: -30%;
  width: 42%;
  height: 136%;
  background: linear-gradient(90deg, transparent, rgba(220, 248, 255, 0.65), transparent);
  transform: skewX(-22deg);
  animation: ctaShimmer 2.8s ease-in-out infinite;
}

.start-hero-mark {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.start-crescent {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 35%, rgba(118, 239, 255, 0.95), rgba(68, 170, 255, 0.72));
  box-shadow: 0 0 26px rgba(74, 213, 255, 0.24);
  animation: introRise 0.88s ease both;
}

.start-crescent::after {
  content: "";
  position: absolute;
  inset: 6px 0 6px 14px;
  border-radius: 50%;
  background: rgba(4, 8, 13, 0.92);
}

@keyframes holoRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes holoPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.78;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.04);
    opacity: 1;
  }
}

@keyframes ctaShimmer {
  0%, 12% {
    left: -38%;
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  42% {
    left: 118%;
    opacity: 0;
  }
  100% {
    left: 118%;
    opacity: 0;
  }
}

@keyframes menuLiftOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.04) translateY(-24px);
    filter: blur(6px);
  }
}

@keyframes cinematicFade {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 0.86;
  }
  100% {
    opacity: 0;
  }
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 24px rgba(200, 134, 10, 0.25);
}

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#score {
  position: absolute;
  left: 152px;
  top: 12px;
  transform: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(24, 14, 8, 0.72);
  border: 1px solid rgba(240, 197, 92, 0.16);
  color: #f7e4b2;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.hud-icon {
  font-size: 16px;
}

#score strong {
  font-size: 18px;
  color: #fff0c1;
}

#combo {
  position: absolute;
  left: 16px;
  top: 12px;
  color: #fff0c2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 190, 90, 0.4);
}

#timer {
  position: absolute;
  top: 12px;
  left: 12px;
  transform: none;
  min-width: 132px;
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(19, 12, 8, 0.72);
  border: 1px solid rgba(240, 197, 92, 0.14);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.timer-label {
  display: none;
}

#timer strong {
  color: var(--gold-soft);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

#cycle {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 13, 9, 0.68);
  border: 1px solid rgba(240, 197, 92, 0.12);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

#runStats {
  position: absolute;
  left: 50%;
  top: 42px;
  transform: translateX(-50%);
  min-width: 172px;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(18, 11, 8, 0.68);
  border: 1px solid rgba(240, 197, 92, 0.1);
  color: #d8bea2;
  font-size: 12px;
  display: grid;
  gap: 4px;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.stat-row span {
  color: #cbb394;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-row strong {
  color: #fff0c1;
  font-size: 13px;
}

#orders {
  position: absolute;
  top: 82px;
  left: 16px;
  width: min(238px, calc(100vw - 32px));
  max-height: calc(100vh - 252px);
  pointer-events: auto;
}

.orders-panel {
  display: grid;
  gap: 10px;
  max-height: inherit;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11, 16, 22, 0.92), rgba(8, 12, 17, 0.94));
  border: 1px solid rgba(102, 225, 255, 0.14);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(198, 245, 255, 0.04);
}

.orders-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(102, 225, 255, 0.1);
}

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

.orders-top strong {
  color: #effcff;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.orders-top span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(91, 241, 255, 0.08);
  border: 1px solid rgba(91, 241, 255, 0.16);
  color: #b7f3ff;
  font-size: 11px;
  font-weight: 700;
}

.orders-toggle {
  border: 1px solid rgba(91, 241, 255, 0.16);
  border-radius: 999px;
  min-width: 52px;
  height: 24px;
  padding: 0 10px;
  background: rgba(91, 241, 255, 0.06);
  color: #b7f3ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.orders-stack {
  max-height: calc(100vh - 320px);
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
}

.orders-panel.is-collapsed .orders-stack {
  display: none;
}

.orders-panel.is-collapsed {
  gap: 0;
}

.orders-empty {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(95, 214, 255, 0.04);
  border: 1px solid rgba(95, 214, 255, 0.08);
  color: #88c4d5;
  font-size: 12px;
  text-align: center;
}

.order-card {
  position: relative;
  overflow: hidden;
  padding: 10px 10px 11px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(16, 19, 25, 0.92), rgba(10, 13, 18, 0.94)),
    radial-gradient(circle at top right, rgba(74, 213, 255, 0.08), transparent 34%);
  border: 1px solid rgba(102, 225, 255, 0.14);
  color: #def7ff;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(198, 245, 255, 0.04);
}

.order-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(91, 241, 255, 0.85), rgba(59, 151, 255, 0.45));
}

.order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.order-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 700;
  color: #f1fcff;
}

.order-table,
.order-points,
.order-time {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.order-table {
  background: rgba(91, 241, 255, 0.08);
  border: 1px solid rgba(91, 241, 255, 0.16);
  color: #b7f3ff;
}

.order-points {
  background: rgba(255, 214, 92, 0.08);
  border: 1px solid rgba(255, 214, 92, 0.14);
  color: #ffe39b;
}

.order-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.order-meta {
  font-size: 11px;
  color: #7fb8ca;
}

.order-time {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e5f9ff;
  white-space: nowrap;
}

.order-bar-wrap {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(194, 243, 255, 0.08);
  overflow: hidden;
}

.order-bar {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  transition: width 0.15s linear;
  box-shadow: 0 0 16px currentColor;
}

#notifications {
  position: absolute;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  width: min(70vw, 640px);
  min-height: 26px;
  text-align: center;
  color: #f5dbaa;
  font-size: 22px;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
}

.notification {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(17, 11, 8, 0.8);
  border: 1px solid rgba(200, 134, 10, 0.8);
  border-radius: 8px;
  animation: riseFade 1.6s ease forwards;
}

@keyframes introRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatOrb {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-12px) translateX(6px);
  }
}

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

#controls {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  max-width: min(92vw, 820px);
  padding: 8px 14px;
  background: rgba(17, 11, 8, 0.72);
  border: 1px solid rgba(200, 134, 10, 0.45);
  border-radius: 999px;
  color: #f2ddb0;
  font-size: 14px;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#statusOverlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 5, 2, 0.45);
  pointer-events: auto;
  z-index: 60;
}

#statusOverlay.visible {
  display: flex;
}

.status-card {
  min-width: min(88vw, 460px);
  padding: 28px 30px;
  background: linear-gradient(180deg, rgba(35, 20, 10, 0.96), rgba(16, 9, 5, 0.96));
  border: 2px solid rgba(232, 192, 48, 0.9);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
  color: #f5ede0;
  pointer-events: auto;
}

.status-kicker {
  color: #f5c842;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.status-card h2 {
  margin: 12px 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
}

.status-card p {
  margin: 0 0 10px;
  color: #f0ddb4;
  font-size: 18px;
}

.status-card span {
  color: #d9b56d;
  font-size: 14px;
}

.tutorial-card {
  min-width: min(92vw, 620px);
  padding: 28px 28px 24px;
  background:
    linear-gradient(180deg, rgba(18, 28, 40, 0.96), rgba(9, 14, 22, 0.96)),
    radial-gradient(circle at top, rgba(74, 213, 255, 0.08), transparent 52%);
  border-color: rgba(102, 225, 255, 0.38);
}

.tutorial-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.tutorial-countdown {
  margin-top: 4px;
  color: #8fd7ea;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.tutorial-step {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(95, 214, 255, 0.05);
  border: 1px solid rgba(95, 214, 255, 0.12);
  text-align: left;
}

.tutorial-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(95, 214, 255, 0.08);
  font-size: 20px;
}

.tutorial-step strong {
  color: #eefcff;
  font-size: 14px;
}

.tutorial-step span {
  color: #9fcde0;
  font-size: 12px;
  line-height: 1.45;
}

.tutorial-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 14px;
  flex-wrap: wrap;
}

.tutorial-button {
  border: 1px solid rgba(95, 214, 255, 0.16);
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(95, 214, 255, 0.05);
  color: #dffaff;
  font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
  pointer-events: auto;
}

.tutorial-button.primary {
  background: linear-gradient(135deg, rgba(57, 156, 210, 0.88), rgba(26, 98, 154, 0.72));
}

@keyframes riseFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@media (max-width: 768px) {
  .meta-panel {
    left: 12px;
    right: 12px;
    top: 68px;
    bottom: auto;
    width: auto;
    max-height: min(70vh, 560px);
  }

  .panel-toggle {
    top: 12px;
    right: 12px;
  }

  .panel-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .start-content {
    width: calc(100vw - 32px);
    padding: 20px 18px 24px;
  }

  .tutorial-steps {
    grid-template-columns: 1fr;
  }

  #score,
  #combo,
  #timer,
  #cycle {
    font-size: 16px;
  }

  #timer {
    top: 10px;
    min-width: 118px;
  }

  #score {
    left: 138px;
  }

  #cycle {
    transform: translateX(-50%);
  }

  .start-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .start-lantern {
    display: none;
  }

  .start-skyline {
    height: 128px;
    opacity: 0.5;
  }

  #runStats {
    top: 42px;
    min-width: 142px;
    font-size: 11px;
  }

  #orders {
    top: 86px;
    width: min(232px, calc(100vw - 24px));
    gap: 8px;
  }

  .order-card {
    min-width: 0;
  }

  #controls {
    bottom: 16px;
    border-radius: 16px;
    font-size: 12px;
    max-width: calc(100vw - 24px);
  }

  #notifications {
    bottom: 92px;
    width: min(88vw, 520px);
    font-size: 18px;
  }
}
