:root {
  --bg: #061522;
  --panel: rgba(8, 34, 48, 0.82);
  --panel-soft: rgba(8, 28, 41, 0.72);
  --line: rgba(104, 255, 214, 0.28);
  --line-strong: rgba(104, 255, 214, 0.52);
  --glow: #2af7c7;
  --glow-strong: #85ff64;
  --text: #ecfffb;
  --text-soft: rgba(236, 255, 251, 0.72);
  --safe-top: max(14px, env(safe-area-inset-top));
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 18%, rgba(28, 214, 189, 0.18), transparent 22%),
    radial-gradient(circle at 50% 72%, rgba(28, 214, 189, 0.1), transparent 32%),
    linear-gradient(180deg, #071420 0%, #05111a 100%);
  color: var(--text);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

img { display: block; max-width: 100%; }

.bg-grid {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(97,255,214,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97,255,214,0.05) 1px, transparent 1px),
    url("../assets/bg_circuit.svg") center/cover no-repeat;
  background-size: 40px 40px, 40px 40px, cover;
  opacity: 0.45;
  pointer-events: none;
}

.app-shell {
  min-height: 100vh;
  padding: var(--safe-top) 10px var(--safe-bottom);
  display: grid;
  place-items: center;
}

.phone-app {
  position: relative;
  isolation: isolate;
  width: min(100%, 520px);
  height: min(100vh - var(--safe-top) - var(--safe-bottom), 980px);
  padding: 10px;
  border-radius: 32px;
  border: 1px solid rgba(159, 255, 233, 0.18);
  background: linear-gradient(180deg, rgba(5, 23, 35, 0.82), rgba(4, 17, 29, 0.94));
  box-shadow:
    0 0 0 1px rgba(104,255,214,0.14),
    0 0 40px rgba(19, 195, 168, 0.18),
    inset 0 0 34px rgba(19, 195, 168, 0.08);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
  overflow: hidden;
}

.phone-app > *:not(.gameplay-gif):not(.glow-ring) {
  position: relative;
  z-index: 1;
}

.phone-app::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 12, 20, 0.18), rgba(3, 12, 20, 0.54)),
    radial-gradient(circle at 50% 55%, rgba(42,247,199,0.08), transparent 42%);
  z-index: 0;
  pointer-events: none;
}

.gameplay-gif {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.06);
  filter: saturate(1.15) contrast(1.02);
  pointer-events: none;
}

.glow-ring {
  position: absolute;
  inset: 32% 12% 22%;
  border-radius: 50%;
  border: 1px solid rgba(104,255,214,0.12);
  filter: blur(12px);
  pointer-events: none;
  z-index: 0;
}

.neon-panel,
.neon-soft,
.store-card,
.employee-card,
.restart-button,
.tab-button {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 42, 58, 0.88), rgba(7, 27, 39, 0.9));
  box-shadow:
    0 0 0 1px rgba(104,255,214,0.1),
    0 0 18px rgba(42,247,199,0.08),
    inset 0 0 18px rgba(42,247,199,0.05);
}

.section-kicker,
.stat-label {
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.message-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 22px;
  min-height: 104px;
}

.message-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  align-self: start;
}

.message-copy {
  min-width: 0;
  padding-right: 46px;
}

.message-name,
.store-title,
.employee-name {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.message-role-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.message-role {
  margin-top: 4px;
  color: var(--glow);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}

.message-timer {
  margin-top: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 216, 102, 0.42);
  background: rgba(53, 38, 3, 0.42);
  color: #fff1a8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 0 14px rgba(255, 214, 92, 0.16);
}

.message-text,
.store-desc,
.employee-desc {
  margin: 6px 0 0;
  color: var(--text-soft);
  line-height: 1.35;
  font-size: 12px;
}

.pause-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1px solid rgba(104,255,214,0.26);
  background: linear-gradient(180deg, rgba(10, 37, 53, 0.96), rgba(5, 18, 28, 0.92));
  box-shadow: 0 0 0 1px rgba(104,255,214,0.08), 0 0 16px rgba(42,247,199,0.08), inset 0 0 12px rgba(42,247,199,0.05);
  touch-action: manipulation;
}

.pause-button:active {
  transform: scale(0.96);
}

.pause-button-gear {
  font-size: 18px;
  line-height: 1;
  color: var(--glow);
  text-shadow: 0 0 12px rgba(42,247,199,0.28);
}

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

.event-option-button {
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 223, 122, 0.38);
  background: linear-gradient(180deg, rgba(69, 53, 8, 0.92), rgba(37, 27, 4, 0.92));
  color: #fff5bf;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 0 16px rgba(255, 214, 92, 0.12), inset 0 0 16px rgba(255, 239, 166, 0.04);
}

.event-option-button:active {
  transform: scale(0.985);
}

.message-card.is-offer {
  border-color: rgba(255, 223, 122, 0.44);
  box-shadow: 0 0 0 1px rgba(255, 214, 92, 0.14), 0 0 22px rgba(255, 214, 92, 0.1), inset 0 0 18px rgba(255, 214, 92, 0.05);
}

.message-card.is-bonus {
  border-color: rgba(255, 223, 122, 0.58);
  box-shadow: 0 0 0 1px rgba(255, 214, 92, 0.16), 0 0 28px rgba(255, 214, 92, 0.16), inset 0 0 24px rgba(255, 214, 92, 0.08);
}

.message-avatar.is-gold {
  box-shadow: 0 0 0 1px rgba(255, 214, 92, 0.24), 0 0 18px rgba(255, 214, 92, 0.26);
}

.command-scroll {
  min-height: 0;
  overflow: auto;
  padding: 10px;
  border-radius: 24px;
  display: grid;
  align-content: start;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(104,255,214,0.45) transparent;
}

.store-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.store-header h1,
.victory-panel h2 {
  margin: 4px 0 0;
  font-size: clamp(20px, 3.2vw, 28px);
  line-height: 1.05;
}


.menu-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(11, 58, 71, 0.66), rgba(6, 25, 36, 0.88));
}

.summary-box {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.summary-box span,
.compact-box span,
.pill-caption span {
  color: var(--text-soft);
  font-size: 12px;
}

.summary-box strong {
  font-size: 24px;
  line-height: 1.05;
  color: var(--glow);
}

.compact-box {
  align-content: center;
  justify-items: end;
  gap: 6px;
}

.compact-box-wide {
  justify-items: start;
}

.compact-box span,
.pill-caption span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(6, 20, 31, 0.72);
  border: 1px solid rgba(104,255,214,0.14);
}

.tabs-switcher {
  position: sticky;
  top: -10px;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 2px;
  background: linear-gradient(180deg, rgba(6, 23, 34, 0.94), rgba(6, 23, 34, 0));
}

.tab-button {
  padding: 10px 12px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.tab-button.is-active {
  color: #071420;
  border-color: rgba(140,255,114,0.72);
  background: linear-gradient(180deg, rgba(154,255,116,0.98), rgba(57,244,130,0.92));
  box-shadow: 0 0 18px rgba(126,255,71,0.24), inset 0 0 8px rgba(255,255,255,0.18);
}

.tab-button-label {
  min-width: 0;
}

.tab-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 216, 107, 0.18);
  border: 1px solid rgba(255, 216, 107, 0.45);
  box-shadow: inset 0 0 10px rgba(255, 216, 107, 0.12);
  color: #ffd86b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
}

.tab-button.is-active .tab-badge {
  background: rgba(7, 20, 32, 0.16);
  border-color: rgba(7, 20, 32, 0.24);
  color: #071420;
}

.tab-badge[hidden] {
  display: none;
}

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

.hidden-tab {
  display: none;
}

.store-list,
.employees-list {
  display: grid;
  gap: 10px;
}

.store-card,
.employee-card {
  width: 100%;
  border-radius: 18px;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 8px;
  transition: transform 140ms ease, border-color 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

.store-card:active,
.employee-card:active,
.pill-button:active,
.tab-button:active,
.restart-button:active {
  transform: scale(0.985);
}

.store-main,
.employee-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-copy,
.employee-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 8px;
}

.employee-copy {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'name effect'
    'title action';
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
}

.store-icon,
.employee-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.store-inline-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.store-title {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-effect {
  flex: 0 0 auto;
  color: var(--glow);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.store-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.system-level-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 18, 28, 0.78);
  border: 1px solid rgba(104,255,214,0.16);
  min-height: 24px;
  flex: 0 0 auto;
}

.signal-meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 124px;
  height: 14px;
  transform: scaleY(0.58);
  transform-origin: left bottom;
}

.signal-bar {
  flex: 1 1 0;
  height: calc(4px + (var(--step, 1) * 1px));
  min-width: 0;
  border-radius: 999px 999px 3px 3px;
  background: rgba(104,255,214,0.12);
  box-shadow: inset 0 0 0 1px rgba(104,255,214,0.06);
  opacity: 0.5;
}

.signal-bar[data-step="1"] { --step: 1; }
.signal-bar[data-step="2"] { --step: 2; }
.signal-bar[data-step="3"] { --step: 3; }
.signal-bar[data-step="4"] { --step: 4; }
.signal-bar[data-step="5"] { --step: 5; }
.signal-bar[data-step="6"] { --step: 6; }
.signal-bar[data-step="7"] { --step: 7; }
.signal-bar[data-step="8"] { --step: 8; }
.signal-bar[data-step="9"] { --step: 9; }
.signal-bar[data-step="10"] { --step: 10; }

.signal-bar.is-active {
  background: var(--signal-accent);
  box-shadow: 0 0 10px rgba(104,255,214,0.24), inset 0 0 6px rgba(255,255,255,0.24);
  opacity: 1;
}

.system-level-value {
  min-width: 16px;
  text-align: center;
  font-size: 15px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--glow);
  text-shadow: 0 0 12px rgba(104,255,214,0.26);
}

.card-actions {
  display: flex;
  justify-content: flex-end;
}

.buy-button {
  min-width: 126px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid rgba(104,255,214,0.22);
  background: rgba(5, 18, 28, 0.82);
  color: var(--text-soft);
  box-shadow: inset 0 0 10px rgba(42,247,199,0.05);
}

.buy-button.is-ready {
  color: #071420;
  border-color: rgba(140,255,114,0.72);
  background: linear-gradient(180deg, rgba(154,255,116,0.98), rgba(57,244,130,0.92));
  box-shadow: 0 0 18px rgba(126,255,71,0.24), inset 0 0 8px rgba(255,255,255,0.18);
}

.buy-button.is-owned {
  color: var(--glow-strong);
  border-color: rgba(140,255,114,0.52);
}

.buy-button.is-max {
  color: #201404;
  border-color: rgba(255,216,107,0.72);
  background: linear-gradient(180deg, rgba(255,232,146,0.98), rgba(255,194,84,0.94));
  box-shadow: 0 0 18px rgba(255,216,107,0.22), inset 0 0 8px rgba(255,255,255,0.24);
}

.buy-button:disabled,
.buy-button.is-locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.store-card.is-disabled,
.employee-card.is-disabled {
  opacity: 0.56;
}

.store-card.is-maxed {
  border-color: rgba(255,216,107,0.54);
  box-shadow:
    0 0 0 1px rgba(255,216,107,0.14),
    0 0 24px rgba(255,216,107,0.12),
    inset 0 0 18px rgba(255,216,107,0.07);
}

.store-card.is-affordable,
.employee-card.is-affordable {
  border-color: var(--line-strong);
  box-shadow:
    0 0 0 1px rgba(104,255,214,0.12),
    0 0 24px rgba(42,247,199,0.08),
    inset 0 0 18px rgba(42,247,199,0.06);
}

.employee-card.is-bought {
  border-color: rgba(140,255,114,0.58);
  box-shadow:
    0 0 0 1px rgba(140,255,114,0.14),
    0 0 18px rgba(140,255,114,0.12),
    inset 0 0 18px rgba(140,255,114,0.08);
}


.pill-zone {
  position: relative;
  min-height: 170px;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 6px;
  padding-bottom: 4px;
  isolation: isolate;
}

.pill-button {
  position: relative;
  width: min(45vw, 194px);
  aspect-ratio: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.pill-halo {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 3px solid rgba(84,255,211,0.48);
  box-shadow: 0 0 22px rgba(42,247,199,0.2), inset 0 0 18px rgba(42,247,199,0.08);
  animation: pulseHalo 2.8s ease-in-out infinite;
}

.pill-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.28)) drop-shadow(0 0 18px rgba(42,247,199,0.18));
}

@keyframes pulseHalo {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.035); opacity: 1; }
}

.pill-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.golden-pill {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  background: transparent;
  border: none;
  box-shadow: none;
  animation: goldenPillPulse 0.7s ease-in-out infinite;
}

.golden-pill-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 214, 92, 0.52)) drop-shadow(0 0 28px rgba(255, 214, 92, 0.28));
  pointer-events: none;
}

.golden-pill.is-burst {
  pointer-events: none;
  animation: goldenPillBurst 0.38s ease-out forwards;
}

.golden-pill.is-fading {
  pointer-events: none;
  animation: goldenPillFade 0.18s ease-out forwards;
}

@keyframes goldenPillPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes goldenPillBurst {
  0% { opacity: 1; transform: scale(1); box-shadow: 0 0 18px rgba(255, 214, 92, 0.44); }
  70% { opacity: 1; transform: scale(1.38); box-shadow: 0 0 34px rgba(255, 223, 122, 0.82); }
  100% { opacity: 0; transform: scale(1.7); box-shadow: 0 0 52px rgba(255, 223, 122, 0); }
}

@keyframes goldenPillFade {
  from { opacity: 1; }
  to { opacity: 0; transform: scale(0.82); }
}

.floating-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-hit {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(126, 255, 221, 0.72);
  animation: floatUp 0.85s ease-out forwards;
  white-space: nowrap;
}

.floating-hit.is-golden {
  color: #fff3a3;
  text-shadow: 0 0 12px rgba(255, 222, 110, 0.92), 0 0 24px rgba(255, 198, 62, 0.42);
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.85); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -84px) scale(1.05); }
}

.progress-panel {
  padding: 10px 12px 12px;
  border-radius: 20px;
  display: grid;
  gap: 8px;
}

.progress-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.progress-stat-block {
  min-width: 0;
  display: grid;
  gap: 3px;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.progress-stat-block strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.progress-goal-block {
  text-align: right;
}

.progress-track {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(104,255,214,0.32);
  background: rgba(3, 15, 23, 0.8);
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(42,247,199,0.08);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7eff47, #38f482 42%, #28f6c7 100%);
  box-shadow: 0 0 18px rgba(126,255,71,0.34);
  transition: width 220ms ease;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: 20px;
}

.stat-box {
  min-width: 0;
  border-right: 1px solid rgba(104,255,214,0.12);
  text-align: center;
  padding: 7px 4px 8px;
}

.stat-box:last-child { border-right: none; }

.stat-value {
  margin-top: 5px;
  font-size: clamp(14px, 3.5vw, 19px);
  line-height: 1.1;
  font-weight: 900;
}


.pause-overlay {
  place-items: center;
  align-items: center;
  justify-items: center;
  padding: 18px;
}

.pause-panel {
  width: min(100%, 420px);
  gap: 14px;
  border-radius: 28px;
  margin: 0;
  align-self: center;
  justify-self: center;
}

.pause-panel.hidden {
  display: none;
}

.pause-head h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.05;
}

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

.pause-action-button {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border-radius: 18px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(104,255,214,0.22);
  background: linear-gradient(180deg, rgba(10, 37, 53, 0.96), rgba(5, 18, 28, 0.92));
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(104,255,214,0.08), 0 0 16px rgba(42,247,199,0.08), inset 0 0 12px rgba(42,247,199,0.05);
}

.pause-action-button.is-primary {
  color: #071420;
  border-color: rgba(140,255,114,0.72);
  background: linear-gradient(180deg, rgba(154,255,116,0.98), rgba(57,244,130,0.92));
  box-shadow: 0 0 18px rgba(126,255,71,0.24), inset 0 0 8px rgba(255,255,255,0.18);
}

.pause-action-button:active,
.pause-help-close:active {
  transform: scale(0.985);
}

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

.pause-help-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pause-help-head h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.05;
}

.pause-help-close {
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(104,255,214,0.18);
  background: rgba(5, 18, 28, 0.84);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}

.pause-help-scroll {
  max-height: min(54vh, 420px);
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(104,255,214,0.45) transparent;
}

.help-tip-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(104,255,214,0.14);
  background: rgba(6, 23, 34, 0.74);
}

.help-tip-card strong {
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.help-tip-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.42;
}
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(1, 9, 16, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  align-items: end;
  padding: 10px;
}

.sheet-overlay.hidden { display: none; }


.intro-overlay {
  z-index: 32;
  backdrop-filter: blur(8px);
}

.intro-panel {
  width: min(100%, 480px);
  max-height: min(88vh, 820px);
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
}

.intro-head {
  padding-right: 0;
}

.intro-scroll {
  max-height: min(56vh, 520px);
}

.intro-start-button {
  width: 100%;
  min-height: 56px;
}

.sheet-panel {
  width: min(100%, 520px);
  max-height: min(88vh, 880px);
  margin: 0 auto;
  border-radius: 28px 28px 20px 20px;
  padding: 14px;
  display: grid;
  gap: 12px;
  overflow: auto;
}

.store-buy-button,
.employee-buy-button {
  min-width: 92px;
}

.employee-actions {
  justify-content: flex-end;
}

.employee-buy-button.is-owned {
  color: #201404;
  border-color: rgba(255,216,107,0.72);
  background: linear-gradient(180deg, rgba(255,232,146,0.98), rgba(255,194,84,0.94));
  box-shadow: 0 0 18px rgba(255,216,107,0.22), inset 0 0 8px rgba(255,255,255,0.24);
}

.victory-panel p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
  font-size: 14px;
}

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

.victory-stats div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(7, 24, 35, 0.72);
  border: 1px solid rgba(104,255,214,0.14);
}

.victory-stats span {
  color: var(--text-soft);
}

.restart-button {
  cursor: pointer;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  font-weight: 900;
  font-size: 16px;
}

@media (min-width: 680px) {
  .phone-app {
    height: min(94vh, 980px);
    padding: 12px;
    gap: 12px;
  }

  .pill-button {
    width: min(36vw, 214px);
  }
}

@media (max-width: 420px) {
  .phone-app {
    padding: 8px;
    gap: 8px;
    border-radius: 24px;
  }

  .message-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .command-scroll,
  .sheet-panel {
    padding: 9px;
  }

  .store-header h1,
  .victory-panel h2 {
    font-size: 20px;
  }


  .message-card {
    grid-template-columns: 56px 1fr;
    padding: 10px;
    gap: 10px;
  }

  .pause-button {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .message-copy {
    padding-right: 40px;
  }

  .message-avatar {
    width: 56px;
    height: 56px;
  }

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

  .compact-box {
    justify-items: start;
  }


  .pill-zone {
    min-height: 160px;
  }

  .pill-button {
    width: min(44vw, 170px);
  }

  .floating-hit {
    font-size: 18px;
  }

  .buy-button {
    min-width: 118px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .store-inline-row {
    gap: 6px;
  }

  .signal-meter {
    width: 96px;
  }

  .system-level-indicator {
    padding: 4px 7px;
  }

  .store-effect {
    font-size: 10px;
  }

  .store-bottom-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .employee-copy {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'name'
      'title'
      'effect'
      'action';
  }

  .employee-effect,
  .employee-buy-button {
    justify-self: start;
    text-align: left;
  }

  .employee-buy-button,
  .store-buy-button {
    width: 100%;
  }
}

.store-bottom-row .store-desc {
  margin: 0;
}

.employee-title {
  margin: 0;
  grid-area: title;
}

.employee-name {
  grid-area: name;
  min-width: 0;
}

.employee-effect {
  grid-area: effect;
  justify-self: end;
  text-align: right;
  color: var(--glow);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.employee-buy-button {
  grid-area: action;
  justify-self: end;
  min-width: 96px;
}

.employee-buy-button,
.store-buy-button {
  align-self: end;
}
