:root {
  --bg: #070b14;
  --card: #0f1628;
  --text: #e8eef8;
  --sub: #8fa3bf;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --gold: #fbbf24;
  --red: #f87171;
  --border: rgba(148, 163, 184, 0.18);
  --font: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
#root { min-height: 100%; }

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 211, 238, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(167, 139, 250, 0.1), transparent),
    var(--bg);
}

/* Match route portal login: game-tile mosaic + veil */
.auth-stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  overflow: hidden;
  background: #050810;
}
.auth-mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
  opacity: 0.38;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.04);
  pointer-events: none;
}
.auth-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  background: #0a1220;
}
.auth-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(5, 8, 16, 0.35), rgba(5, 8, 16, 0.82) 55%, #050810 100%),
    linear-gradient(165deg, rgba(129, 140, 248, 0.12), transparent 40%);
}
.auth-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
}

.card {
  width: min(720px, 100%);
  background: linear-gradient(180deg, rgba(15, 22, 40, 0.98), rgba(8, 12, 22, 0.98));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.card.card-auth {
  width: 100%;
  backdrop-filter: blur(14px);
  background: rgba(17, 29, 51, 0.88);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(129, 140, 248, 0.18);
}

.brand {
  text-align: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 40;
}
.brand-kicker {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 700;
}
.brand-title {
  margin: 10px 0 6px;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-hub-logo {
  display: block;
  width: min(420px, 100%);
  height: auto;
  margin: 4px auto 10px;
}
.brand-sub {
  color: var(--sub);
  font-size: 15px;
  line-height: 1.5;
}

.btn-row { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.btn {
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  color: #041018;
  background: linear-gradient(135deg, var(--cyan), #38bdf8);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
}
.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}
.btn-pulse {
  animation: btnPulse 1.8s ease-in-out infinite;
  will-change: transform, box-shadow, border-color;
}
@keyframes btnPulse {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 0 0 0 rgba(167, 139, 250, 0);
  }
  50% {
    transform: scale(1.03);
    border-color: rgba(167, 139, 250, 0.95);
    box-shadow: 0 0 18px rgba(167, 139, 250, 0.35);
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn-pulse { animation: none; }
}
.btn-ghost {
  color: var(--sub);
  background: transparent;
  border: 1px dashed var(--border);
}

.field-label { font-size: 13px; color: var(--sub); margin-bottom: 8px; font-weight: 600; }
.text-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  color: var(--text);
  margin-bottom: 8px;
}
.text-input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
.text-input::placeholder { color: rgba(143, 163, 191, 0.7); font-weight: 500; }
.field-display {
  font-size: 28px;
  letter-spacing: 0.12em;
  font-weight: 800;
  min-height: 42px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.field-display.empty { color: #4b5563; font-size: 16px; letter-spacing: normal; font-weight: 600; }
.field-display.is-active {
  border-color: rgba(34, 211, 238, 0.85);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.22), 0 0 24px rgba(34, 211, 238, 0.12);
  background: rgba(34, 211, 238, 0.08);
}
.field-display.is-clickable { cursor: pointer; }
.field-label.is-active {
  color: var(--cyan);
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}
.numpad button {
  aspect-ratio: 1.4;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
}
.numpad .wide { grid-column: span 3; aspect-ratio: auto; padding: 14px; font-size: 16px; }

.msg { margin-top: 14px; font-size: 14px; line-height: 1.5; }
.msg.error { color: var(--red); }
.msg.ok { color: var(--cyan); }
.msg.sub { color: var(--sub); }

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(7, 11, 20, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.topbar-title { font-size: 13px; font-weight: 800; color: var(--cyan); letter-spacing: 0.16em; text-transform: uppercase; }
.topbar-meta { font-size: 12px; color: var(--sub); text-align: right; }

.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border); margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--sub); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
tr:last-child td { border-bottom: none; }
.loc-name { color: var(--gold); }
.pick-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  background: rgba(34, 211, 238, 0.15);
  color: var(--cyan);
  font-weight: 700;
  cursor: pointer;
}

.hub-grid {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.hub-tile {
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 18px;
  background: rgba(255,255,255,0.03);
}
.hub-tile + .hub-tile { margin-top: 16px; }
.hub-tile h3 { margin: 0 0 8px; color: var(--violet); font-size: 16px; }
.hub-tile p { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.5; }

.splash-steps {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}
.splash-step {
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 18px;
  text-align: left;
  background: rgba(34, 211, 238, 0.06);
}
.splash-step strong { display: block; font-size: 18px; margin-bottom: 6px; }
.splash-step span { color: var(--sub); font-size: 14px; line-height: 1.45; }

.splash-tiles {
  display: grid;
  gap: 14px;
  margin: 20px 0 8px;
  align-items: stretch;
}
.splash-tiles-single {
  justify-items: center;
}
.splash-tiles-single .splash-tile {
  width: 100%;
  max-width: 380px;
}
.splash-tile {
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px;
  text-align: left;
  background: rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
}
.splash-tile h3 {
  margin: 0 0 8px;
  color: var(--violet);
  font-size: 1.15rem;
}
.splash-tile h3.splash-tile-title-warn {
  color: #fbbf24;
}
.splash-tile p {
  margin: 0 0 28px;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.5;
  flex: 1 1 auto;
}
.splash-tile > .btn {
  margin-top: auto;
}
.splash-tile-body .hub-tile {
  margin-top: 12px;
  padding: 0;
  border: none;
  background: transparent;
}
.splash-tile-body .hub-tile h3 { display: none; }

.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.overlay-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  max-width: 320px;
}

.hub-wide { width: min(960px, 100%); }

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
/* Mobile-first: 2 columns so portrait tiles aren't crushed */
.game-grid--paged {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.game-hub-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.game-hub-page-btn {
  min-width: 72px;
  min-height: 44px;
  font-weight: 700;
  padding-left: 12px;
  padding-right: 12px;
}
.game-hub-page-label {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}
.game-hub-page-label span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sub);
}
.game-card {
  position: relative;
  aspect-ratio: 3 / 4;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  text-align: left;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  -webkit-tap-highlight-color: transparent;
}
.game-card.has-art { background: #070b14; }
.game-card:hover,
.game-card:focus-visible {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
  outline: none;
}
.game-tile-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: scale(1.02);
  transition: transform 0.2s ease;
}
.game-card:hover .game-tile-art,
.game-card:focus-visible .game-tile-art { transform: scale(1.06); }
.game-tile-art-fallback {
  background:
    radial-gradient(circle at 50% 30%, rgba(34, 211, 238, 0.28), transparent 55%),
    linear-gradient(160deg, #1a2440, #070b14);
}
.game-tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.18) 40%,
    rgba(0, 0, 0, 0.82) 72%,
    rgba(0, 0, 0, 0.95) 100%);
  pointer-events: none;
}
.game-tile-meta {
  position: relative;
  z-index: 2;
  padding: 10px 10px 12px;
  min-height: 4.6em;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.game-card h4 {
  margin: 0 0 4px;
  color: #fff;
  font-size: clamp(12px, 3.5vw, 15px);
  line-height: 1.2;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-card p {
  margin: 0;
  color: rgba(34, 211, 238, 0.95);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: #000;
}
.game-overlay-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(7, 11, 20, 0.95);
  border-bottom: 1px solid var(--border);
}
.game-overlay-title { font-size: 14px; font-weight: 700; color: var(--cyan); }
.game-overlay-close {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}
.game-overlay-frame { flex: 1; border: none; width: 100%; }

/* Play-at-home only — not used by arcade/kiosk shells */
.game-overlay.game-overlay-slim {
  /* No outer title bar; game cab owns More Games */
}
.game-overlay.game-overlay-portrait {
  background: #05070c;
  align-items: center;
  justify-content: center;
}
.game-overlay.game-overlay-portrait .game-overlay-stage {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05070c;
}
.game-overlay.game-overlay-portrait .game-overlay-scale-wrap {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 80px rgba(0, 0, 0, 0.55);
  background: #000;
}
.game-overlay.game-overlay-portrait .game-overlay-frame {
  flex: none;
  display: block;
  border: none;
  /* Exact size set in JS (1080×1920); visually scaled via transform */
  width: 1080px;
  height: 1920px;
  max-width: none;
  max-height: none;
  background: #000;
}

.wallet-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.wallet-row .btn { padding: 10px 14px; font-size: 13px; margin: 0; }
.hub-balance-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.hub-balance-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sub);
}
.hub-balance-amount {
  margin: 0;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #4ade80;
  font-variant-numeric: tabular-nums;
}
.hub-store-name {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}
.store-name-gold {
  color: var(--gold);
  font-weight: 700;
}

.audit-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.audit-select {
  width: 100%;
  min-width: 160px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}
.audit-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 4px;
}
.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 820px;
}
.audit-table th, .audit-table td {
  padding: 11px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.audit-table th {
  color: var(--sub);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
}
.audit-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.audit-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-family: ui-monospace, "Cascadia Mono", monospace;
}
.audit-num.in, .audit-type.in { color: #4ade80; font-weight: 700; }
.audit-num.out, .audit-type.out { color: #fbbf24; font-weight: 700; }
.audit-type.play { color: var(--cyan); font-weight: 700; }
.audit-type {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.audit-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.store-maps-link {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 800;
}
.store-maps-link:hover { color: #67e8f9; }

.topbar-back {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  margin-right: 12px;
}

.add-money-screen { justify-content: flex-start; padding-top: 12px; }
.add-money-card { width: min(560px, 100%); }
.add-money-body { margin-top: 8px; }
.add-money-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(167, 139, 250, 0.05));
}
.add-money-balance-label { font-size: 14px; color: var(--sub); }
.add-money-balance-val { font-size: 1.6rem; font-weight: 800; color: #4ade80; }

.btn.add-money-mega {
  width: 100%;
  padding: 28px 22px;
  min-height: 96px;
  border-radius: 24px;
  border: 3px solid rgba(251, 191, 36, 0.75);
  font-size: clamp(19px, 5vw, 26px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #031008;
  background: linear-gradient(165deg, #fffde7 0%, #b9f6ca 18%, #00e676 42%, #00c853 72%, #008a3e 100%);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.add-money-insert-banner {
  text-align: center;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c8ffd5;
  margin: 8px 0 16px;
  animation: amPulse 1.6s ease-in-out infinite;
}
.add-money-timer-label {
  text-align: center;
  font-size: 14px;
  color: var(--sub);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.add-money-timer {
  text-align: center;
  font-size: clamp(4rem, 18vw, 7rem);
  font-weight: 900;
  line-height: 1;
  color: var(--cyan);
  margin: 8px 0 4px;
}

.add-money-toast-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.add-money-toast {
  min-width: 220px;
  max-width: 92vw;
  padding: 14px 18px;
  border-radius: 16px;
  border: 2px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.92), rgba(34, 211, 238, 0.82));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  text-align: center;
  color: #04150c;
}
.add-money-toast-amt { font-weight: 900; font-size: 1.5rem; line-height: 1; margin-bottom: 6px; }
.add-money-toast-sub { font-size: 13px; font-weight: 700; }

@keyframes amPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.88; transform: scale(1.02); }
}

@media (max-width: 699px) {
  .screen { padding: 14px 12px 28px; }
  .card.hub-wide { margin-top: 56px !important; padding: 16px 14px; }
  .hub-tile { padding: 14px; }
  .brand {
  position: relative;
  z-index: 40;
}
.brand-hub-logo { width: min(300px, 92%); margin-left: auto; margin-right: auto; }
  .wallet-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .wallet-row > div:last-child {
    max-width: none !important;
    text-align: left !important;
  }
  .game-card p { letter-spacing: 0.04em; }
  .game-hub-pager { gap: 8px; }
  .game-hub-page-btn { min-width: 64px; font-size: 14px; }
  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .topbar-title { font-size: 0.95rem; }
  .topbar-meta { font-size: 0.78rem; max-width: 46%; }
}

@media (min-width: 700px) {
  .game-grid--paged {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .game-hub-page-btn { min-width: 108px; }
  .game-card h4 { font-size: 15px; }
  .game-card p { font-size: 11px; }
  .game-tile-meta { padding: 12px 12px 14px; min-height: 4.8em; }
}

@media (min-width: 900px) {
  .splash-steps { grid-template-columns: repeat(3, 1fr); }
  .splash-tiles { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .splash-tiles-single { grid-template-columns: 1fr; justify-items: center; }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Hidden technician access hotspot + overlay */

.tech-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 8, 16, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tech-panel {
  width: min(520px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: linear-gradient(180deg, rgba(15, 22, 40, 0.98), rgba(8, 12, 22, 0.98));
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.tech-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px;
  border-bottom: 1px solid var(--border);
}

.tech-panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.tech-close {
  background: transparent;
  border: none;
  color: var(--sub);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.tech-panel-body {
  padding: 16px 18px;
}

.tech-panel-foot {
  padding: 0 18px 18px;
}

.tech-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tech-tab {
  flex: 1;
  border: 1px solid var(--border);
  background: rgba(15, 22, 40, 0.6);
  color: var(--sub);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 0.88rem;
}

.tech-tab.on {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.08);
}

.tech-report {
  font-family: "Courier New", Courier, monospace;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  line-height: 1.55;
}

.tech-report-head {
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.tech-report-period {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.tech-report-line {
  margin: 4px 0;
}

.tech-report-net {
  font-weight: 700;
  margin-top: 8px;
}

.tech-close-period {
  font-size: 1.05rem;
  padding: 14px 16px;
}

.tech-history-item {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 22, 40, 0.55);
  color: var(--text);
  cursor: pointer;
}

.tech-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

.tech-confirm .btn-row {
  margin-top: 12px;
}

@media print {
  .tech-overlay { background: #fff; position: static; display: block; padding: 0; }
  .tech-panel { box-shadow: none; border: none; max-height: none; width: 100%; }
  .no-print { display: none !important; }
  .tech-report { border: none; background: #fff; color: #000; }
}

.tech-logo-trigger {
  -webkit-tap-highlight-color: transparent;
}

.tech-logo-btn {
  display: block;
  width: min(420px, 100%);
  margin: 4px auto 10px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: default;
  position: relative;
  z-index: 41;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tech-logo-btn:focus,
.tech-logo-btn:focus-visible {
  outline: none;
}
.tech-logo-btn .brand-hub-logo {
  width: 100%;
  margin: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.hub-wide .brand {
  margin-bottom: 36px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.btn-tech-access {
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-tech-access:active {
  background: rgba(251, 191, 36, 0.22);
}
.tech-access-row {
  margin: 0 0 14px;
  display: flex;
  justify-content: center;
}
.tech-access-row .btn-tech-access {
  font-size: 14px;
  padding: 12px 20px;
  width: 100%;
  max-width: 360px;
}
