:root {
  --bg: #0a0d0b;
  --surface: #101512;
  --surface-2: #151c18;
  --surface-3: #1d2620;
  --ink: #eef3ef;
  --muted: #93a39a;
  --muted-dim: #6b7a71;
  --hairline: rgba(255, 255, 255, 0.075);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --accent: #34d399;
  --accent-strong: #6ee7b7;
  --accent-ink: #04271c;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --signal: #34d399;
  --signal-soft: rgba(52, 211, 153, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --warn: #f5b544;
  --warn-soft: rgba(245, 181, 68, 0.13);
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; width: 100%; margin: 0; padding: 0; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 13px/1.5 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-variant-numeric: tabular-nums; }

/* ---------- Base controls ---------- */
input, select {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  background: var(--surface-3);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
input::placeholder { color: var(--muted-dim); }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

button, a.btn, summary.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 9px;
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}
button:hover:not(:disabled), a.btn:hover, summary.btn:hover {
  background: var(--surface-3);
  border-color: var(--hairline-strong);
}
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled, select:disabled { opacity: 0.4; cursor: not-allowed; }

button.btn-primary, a.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 600;
}
button.btn-primary:hover:not(:disabled), a.btn-primary:hover {
  background: var(--accent-strong);
  border-color: transparent;
}
button.btn-ghost, a.btn-ghost {
  background: transparent;
  border-color: var(--hairline);
  color: var(--muted);
}
button.btn-ghost:hover:not(:disabled), a.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--hairline-strong);
  color: var(--ink);
}
button.btn-soft, a.btn-soft {
  background: var(--accent-soft);
  border-color: rgba(52, 211, 153, 0.28);
  color: #a7f3d0;
}
button.btn-soft:hover:not(:disabled), a.btn-soft:hover {
  background: rgba(52, 211, 153, 0.22);
  border-color: rgba(52, 211, 153, 0.45);
}
.btn-icon { width: 36px; height: 36px; min-height: 36px; padding: 0; flex-shrink: 0; }
.btn-block { width: 100%; min-height: 42px; font-weight: 600; }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 12px; border-radius: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible { outline: none; }

/* ---------- Top command bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding: 9px 16px;
  padding-top: calc(9px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--hairline);
  position: relative;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: linear-gradient(150deg, #a7f3d0, var(--accent) 55%, #10b981);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.22);
  flex-shrink: 0;
}
.brand-mark-lg { width: 44px; height: 44px; border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.brand-tag {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.topbar-center { flex: 1; display: flex; justify-content: center; min-width: 0; }
.profit-control {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(350px, 100%);
  padding: 6px 8px 6px 13px;
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.055), transparent), var(--surface-2);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 11px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.profit-control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.profit-copy { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.profit-cap {
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.profit-hint { color: var(--muted-dim); font-size: 10px; white-space: nowrap; }
.profit-field {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding-left: 12px;
  border-left: 1px solid var(--hairline);
  min-width: 0;
}
.profit-currency { color: var(--accent); font-size: 13px; font-weight: 600; }
.profit-field input {
  width: 112px;
  min-height: 0;
  padding: 1px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: right;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }

.more-menu { position: relative; }
.more-menu summary { list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 238px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.6);
}
.more-menu:not([open]) .menu-panel { display: none; }
button.menu-item, a.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: normal;
}
button.menu-item:hover:not(:disabled), a.menu-item:hover {
  background: var(--surface-3);
  border-color: transparent;
}
.menu-switch { cursor: pointer; user-select: none; }
.menu-switch input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}
button.menu-item-danger, a.menu-item-danger { color: #fca5a5; }
button.menu-item-danger:hover:not(:disabled), a.menu-item-danger:hover {
  background: var(--danger-soft);
}
button.menu-item-warn { color: #fcd34d; }
button.menu-item-warn:hover:not(:disabled) {
  background: var(--warn-soft);
}

/* ---------- Stage bar ---------- */
.stage-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding: 7px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}
.stage-picker { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.stage-cap {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.stage-picker select {
  width: auto;
  min-width: 158px;
  min-height: 32px;
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
}
.stage-note {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-note b { color: var(--ink); font-weight: 600; }

/* ---------- Full-bleed SportyBet stage ---------- */
#accs { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #070a08; }
.sb-frame {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 390px;
  height: 844px;
  border: 0;
  opacity: 0;
  pointer-events: none;
  background: #fff;
}
.sb-frame.viewing {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: auto;
  border: 0;
}

/* ---------- Sign-in gate ---------- */
#gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(16px, 4vw, 40px);
  background:
    radial-gradient(1100px 560px at 18% 0%, rgba(52, 211, 153, 0.11), transparent 62%),
    radial-gradient(820px 480px at 92% 100%, rgba(245, 181, 68, 0.06), transparent 62%),
    var(--bg);
}
#gate[hidden] { display: none !important; }
.gate-card {
  margin: auto;
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.62);
}
.gate-pitch {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(155deg, rgba(52, 211, 153, 0.13), transparent 58%),
    var(--surface-2);
  border-right: 1px solid var(--hairline);
  overflow: hidden;
}
.gate-pitch::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.18), transparent 66%);
  pointer-events: none;
}
.gate-brand { display: flex; align-items: center; gap: 10px; }
.gate-pitch h1 {
  margin: 0;
  max-width: 12ch;
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.gate-lede {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.62;
}
.gate-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.gate-steps li { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 13px; }
.gate-steps li span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--accent);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
}
.gate-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: clamp(24px, 4vw, 42px);
}
.gate-form h2 {
  margin: 0;
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.gate-sub { margin: -6px 0 4px; color: var(--muted); font-size: 12px; }
.gate-field { display: flex; flex-direction: column; gap: 6px; }
.gate-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gate-field input { padding: 11px 12px; border-radius: 10px; background: var(--surface-3); }
#gateErr { margin: 0; min-height: 1.2em; color: #fca5a5; font-size: 12px; }

/* ---------- Accounts drawer ---------- */
#drawerBackdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 7, 5, 0.68);
  backdrop-filter: blur(4px);
}
#drawerBackdrop[hidden] { display: none; }
#accountsDrawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  width: min(540px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--hairline-strong);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.65);
}
#accountsDrawer[hidden] { display: none; }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.drawer-head h2 { margin: 0; font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif; font-size: 16px; }
.drawer-sub { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.drawer-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 16px;
}
.panel {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}
.panel-head { margin-bottom: 12px; }
.panel-head h3 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.field input, .field select { min-height: 38px; padding: 8px 10px; background: var(--surface-3); }
.field-wide { grid-column: 1 / -1; }
#addAcc { grid-column: 1 / -1; min-height: 40px; }
#accsList { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
#accsList:empty { display: none; }
#accsList li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 5px 4px 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
}
#accsList li button {
  width: 22px;
  height: 22px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 50%;
  background: var(--danger-soft);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1;
}
#accsList li button:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.26);
  border-color: rgba(248, 113, 113, 0.5);
}
.drawer-msg { margin: 10px 0 0; min-height: 0; color: #6ee7b7; font-size: 12px; }
.drawer-msg:empty { display: none; }
.drawer-msg.bad { color: #fca5a5; }

/* ---------- Slot cards ---------- */
#slotCards { display: grid; gap: 10px; }
.slot {
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.slot.viewing {
  border-color: rgba(52, 211, 153, 0.5);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.07), transparent), var(--surface-2);
  box-shadow: inset 3px 0 0 var(--accent);
}
.slot-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.slot-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--muted-dim); }
.slot.viewing .slot-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.slot-name {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.slot.primary .slot-name { color: var(--accent); }
.driver-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.slot-head .state {
  margin-left: auto;
  max-width: 60%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}
.slot-head .state.ok { color: #6ee7b7; font-weight: 500; }
.slot-head .state.bad { color: #fca5a5; font-weight: 500; }
.slot-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-actions .btn { min-height: 32px; padding: 0 10px; font-size: 12px; }
.slot.viewing .slot-actions [data-a="view"] {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}

/* ---------- Status bar ---------- */
.statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  flex-shrink: 0;
  padding: 6px 16px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 11px;
}
#clock { color: var(--muted); letter-spacing: 0.03em; }
.status-spacer { flex: 1 1 0; min-width: 0; }
#stats { color: var(--muted); }
#stats:empty { display: none; }
.user-pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
}
.user-pill:empty { display: none; }

/* ---------- Scrollbars ---------- */
.drawer-scroll, #accsList { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.drawer-scroll::-webkit-scrollbar { width: 8px; }
.drawer-scroll::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
.drawer-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gate-card { grid-template-columns: 1fr; max-width: 460px; }
  .gate-pitch { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .gate-pitch h1 { max-width: none; }
}

@media (max-width: 760px) {
  /* Mobile-first: one compact command row, then a slim slot switcher. */
  .topbar {
    gap: 8px;
    padding: 8px 10px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
  }
  .brand-text { display: none; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .topbar-center { flex: 1 1 auto; min-width: 0; }
  .profit-control {
    width: 100%;
    gap: 6px;
    padding: 4px 6px 4px 9px;
  }
  .profit-cap { font-size: 9px; letter-spacing: 0.06em; }
  .profit-hint { display: none; }
  .profit-field { padding-left: 6px; min-width: 0; }
  .profit-field input { width: 100%; min-width: 0; font-size: 17px; }
  .topbar-actions { gap: 6px; }
  #toggleAccs { max-width: 132px; padding: 0 11px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
  .topbar-actions .btn-icon { width: 34px; height: 34px; min-height: 34px; }

  .stage-bar { gap: 8px; padding: 6px 10px; }
  .stage-cap { font-size: 9px; }
  .stage-note { display: none; }
  .stage-picker { flex: 1 1 auto; min-width: 0; }
  .stage-picker select { width: 100%; min-width: 0; min-height: 30px; }

  #accountsDrawer { width: 100vw; border-left: 0; }
  .drawer-head { padding-left: 14px; padding-right: 14px; }
  .drawer-scroll { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .statusbar { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .user-pill { max-width: 45vw; overflow: hidden; text-overflow: ellipsis; }
  input, select { font-size: 16px; }
  .profit-field input { font-size: 17px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  #addAcc { grid-column: auto; }

  /* Sign-in stays above the fold: compact pitch, full-width form. */
  #gate {
    padding: 12px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .gate-card { max-width: 420px; border-radius: 16px; }
  .gate-pitch { gap: 10px; padding: 20px; }
  .gate-pitch h1 { font-size: 22px; }
  .gate-lede { display: none; }
  .gate-steps { gap: 8px; margin-top: 0; }
  .gate-steps li { font-size: 12px; }
  .gate-form { gap: 10px; padding: 20px; }
}

@media (max-width: 520px) {
  #clock { display: none; }
  #stats { font-size: 10px; }
}

@media (max-width: 430px) {
  .slot-actions .btn { flex: 1 1 calc(50% - 6px); }
  .menu-panel { width: min(238px, calc(100vw - 24px)); }
}

@media (max-width: 380px) {
  /* The naira field is self-explanatory; reclaim the label on tiny phones. */
  .profit-copy { display: none; }
  .profit-field { padding-left: 0; border-left: 0; }
}

@media (max-height: 640px) and (max-width: 760px) {
  .gate-steps { display: none; }
  .gate-pitch, .gate-form { padding: 16px 20px; }
}

@media (max-height: 620px) and (max-width: 900px) and (orientation: landscape) {
  /* Keep sign-in on one screen when a phone is turned sideways. */
  #gate {
    padding: 10px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .gate-card { max-width: 400px; border-radius: 14px; }
  .gate-pitch { display: none; }
  .gate-form { gap: 8px; padding: 18px 22px; }
  .gate-sub { display: none; }
  .gate-field input { padding: 9px 11px; }
}

@media (max-height: 480px) and (max-width: 900px) {
  /* Landscape phones: give the stage every pixel available. */
  .stage-bar, .statusbar { display: none; }
  .topbar {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
