:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --ink: #fff8dc;
  --muted: #b9a97a;
  --panel: rgba(18, 20, 28, 0.88);
  --panel-strong: rgba(8, 10, 16, 0.94);
  --line: rgba(255, 218, 110, 0.24);
  --gold: #f3c84b;
  --blue: #2970ff;
  --cyan: #2fe6de;
  --green: #40ff92;
  --red: #ff4d5d;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  --status-buffer-height: max(18px, var(--safe-top));
  --shell-gap: 3px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: #000;
}

body {
  margin: 0;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(145deg, #05080d 0%, #101820 50%, #07120d 100%);
  background-size: 30px 30px, 30px 30px, auto;
  font-family: "Courier New", Consolas, monospace;
}

html:not(.native-shell) body:not(.site-playing) {
  height: auto;
  min-height: 100vh;
  overflow: auto;
}

html:not(.native-shell) body:not(.site-playing) .app-shell {
  display: none;
}

html.native-shell .site-landing,
html.native-shell .site-footer,
body.site-playing .site-landing,
body.site-playing .site-footer {
  display: none;
}

.site-landing {
  min-height: 100vh;
  padding: 18px clamp(16px, 4vw, 54px) 28px;
  color: #fff8dc;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 72% 18%, rgba(64, 255, 146, 0.12), transparent 34%),
    #05080d;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.site-nav {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-brand,
.site-links,
.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-brand,
.site-links a,
.footer-links a {
  color: inherit;
  text-decoration: none;
}

.site-brand {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.site-brand img {
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(64, 255, 146, 0.34), 0 12px 28px rgba(0, 0, 0, 0.38);
}

.site-links {
  font-size: 0.78rem;
  color: #b9a97a;
}

.site-links a:hover,
.footer-links a:hover {
  color: #40ff92;
}

.site-hero {
  width: min(1180px, 100%);
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: clamp(34px, 7vh, 86px) 0 28px;
}

.site-kicker {
  margin: 0 0 10px;
  color: #f3c84b;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  max-width: 720px;
  color: #ffffff;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(3rem, 8vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-subtitle {
  max-width: 610px;
  margin: 18px 0 0;
  color: #d8d0aa;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.web-entry-button {
  min-height: 42px;
}

.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 10px 16px;
  color: #17212b;
  background: #ffffff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.google-button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #ffffff;
  background: #2970ff;
}

.hero-terminal {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(64, 255, 146, 0.28);
  border-radius: 8px;
  background: rgba(8, 10, 16, 0.94);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46), inset 0 0 56px rgba(47, 230, 222, 0.08);
}

.hero-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100% 7px;
  opacity: 0.18;
}

.hero-terminal-head,
.hero-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 218, 110, 0.18);
}

.hero-terminal-head img {
  border-radius: 12px;
}

.hero-terminal-head strong,
.hero-result-row strong {
  display: block;
  color: #40ff92;
}

.hero-terminal-head span,
.hero-result-row span {
  color: #b9a97a;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.hero-ticker {
  padding: 10px 16px;
  color: #f3c84b;
  border-bottom: 1px solid rgba(255, 218, 110, 0.16);
  white-space: nowrap;
  overflow: hidden;
}

.hero-chart {
  position: relative;
  height: clamp(260px, 42vw, 470px);
  margin: 16px;
  overflow: hidden;
  border: 1px solid rgba(64, 255, 146, 0.15);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #07120d;
  background-size: 36px 36px;
}

.hero-line {
  position: absolute;
  left: 7%;
  right: 7%;
  height: 4px;
  border-radius: 999px;
  background: #40ff92;
  box-shadow: 0 0 18px rgba(64, 255, 146, 0.78);
  transform-origin: left center;
}

.line-one {
  top: 58%;
  transform: rotate(-13deg);
}

.line-two {
  top: 37%;
  transform: rotate(19deg);
  background: #ff4d5d;
  box-shadow: 0 0 18px rgba(255, 77, 93, 0.72);
}

.hero-candles span {
  position: absolute;
  bottom: 12%;
  left: var(--d);
  width: 14px;
  height: var(--h);
  border-radius: 3px;
  background: linear-gradient(180deg, #40ff92, #f3c84b);
  box-shadow: 0 0 18px rgba(64, 255, 146, 0.38);
}

.hero-result-row {
  justify-content: space-between;
  border-top: 1px solid rgba(255, 218, 110, 0.18);
  border-bottom: 0;
}

.leaderboard-preview {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 24px;
  padding: 12px 0 46px;
}

.leaderboard-preview h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  text-transform: uppercase;
}

.leaderboard-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.leaderboard-cards article {
  min-height: 106px;
  border: 1px solid rgba(255, 218, 110, 0.22);
  border-radius: 8px;
  padding: 14px;
  background: rgba(18, 20, 28, 0.82);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
}

.leaderboard-cards span,
.leaderboard-cards em {
  display: block;
  color: #f3c84b;
  font-style: normal;
}

.leaderboard-cards strong {
  display: block;
  margin: 8px 0;
  color: #ffffff;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px clamp(16px, 4vw, 54px);
  color: #b9a97a;
  background: #000;
  border-top: 1px solid rgba(64, 255, 146, 0.2);
  font-size: 0.78rem;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer strong {
  color: #ffffff;
}

@media (max-width: 820px) {
  .site-nav,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-hero,
  .leaderboard-preview {
    grid-template-columns: 1fr;
  }

  .hero-actions > * {
    width: 100%;
  }

  .leaderboard-cards {
    grid-template-columns: 1fr;
  }
}

button,
select,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-rows:
    var(--status-buffer-height)
    minmax(0, 1fr);
  gap: var(--shell-gap);
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  padding:
    0
    max(4px, var(--safe-right))
    max(2px, var(--safe-bottom))
    max(4px, var(--safe-left));
  background: #000;
}

.system-bar-buffer {
  min-height: 0;
  background: #000;
}

.trade-floor {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  row-gap: clamp(5px, 1vh, 10px);
  height: auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(64, 255, 146, 0.22);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(7, 8, 14, 0.74);
  background-size: 44px 44px;
  box-shadow: var(--shadow), inset 0 0 54px rgba(47, 230, 222, 0.08);
}

body:not(.is-trading) .trade-floor {
  width: 100%;
  max-width: 760px;
  justify-self: center;
}

body.skin-light {
  --ink: #17212b;
  --muted: #526170;
  --panel: rgba(248, 251, 247, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(20, 90, 74, 0.22);
  --gold: #956f00;
  --cyan: #067a87;
  --green: #1f9f63;
  --red: #c93646;
  --shadow: 0 14px 28px rgba(25, 40, 50, 0.18);
  color: var(--ink);
  background:
    linear-gradient(rgba(20, 60, 80, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 60, 80, 0.035) 1px, transparent 1px),
    linear-gradient(145deg, #f5f7f1 0%, #e9f0ee 52%, #f8f4e6 100%);
}

body.skin-light .trade-floor {
  border-color: rgba(31, 159, 99, 0.25);
  background:
    linear-gradient(rgba(20, 60, 80, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 60, 80, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow), inset 0 0 36px rgba(31, 159, 99, 0.08);
}

body.skin-marketBell {
  --ink: #fff8dc;
  --muted: #ceb96c;
  --panel: rgba(11, 31, 24, 0.9);
  --panel-strong: rgba(7, 25, 20, 0.96);
  --line: rgba(243, 200, 75, 0.28);
  --gold: #f9d858;
  --cyan: #6fffd1;
  --green: #38f28f;
  --red: #ff5c64;
  background:
    linear-gradient(rgba(255, 216, 88, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 255, 209, 0.04) 1px, transparent 1px),
    linear-gradient(145deg, #02130f 0%, #123526 48%, #1b1405 100%);
}

body.skin-openOutcry {
  --ink: #fff4e6;
  --muted: #e0bca3;
  --panel: rgba(34, 15, 25, 0.9);
  --panel-strong: rgba(23, 9, 17, 0.96);
  --line: rgba(255, 121, 88, 0.26);
  --gold: #ffd166;
  --cyan: #89d7ff;
  --green: #55f29a;
  --red: #ff5a7b;
  background:
    linear-gradient(rgba(255, 209, 102, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137, 215, 255, 0.04) 1px, transparent 1px),
    linear-gradient(145deg, #170911 0%, #3b1424 48%, #1d2435 100%);
}

body.skin-blueChip {
  --ink: #edf7ff;
  --muted: #a9c2d8;
  --panel: rgba(8, 20, 38, 0.9);
  --panel-strong: rgba(4, 13, 28, 0.96);
  --line: rgba(86, 180, 255, 0.26);
  --gold: #ffe28a;
  --cyan: #61d8ff;
  --green: #4af0a4;
  --red: #ff6270;
  background:
    linear-gradient(rgba(97, 216, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 226, 138, 0.035) 1px, transparent 1px),
    linear-gradient(145deg, #030d1f 0%, #0a2445 52%, #0d1828 100%);
}

body.skin-light .scanline {
  opacity: 0.12;
}

body.skin-light .skyline {
  opacity: 0.12;
}

body.skin-light h1,
body.skin-light h2,
body.skin-light .metric-card strong,
body.skin-light .score-line strong,
body.skin-light .profile-name-button,
body.skin-light .panel-header h3,
body.skin-light .icon-copy strong,
body.skin-light .stat-row strong,
body.skin-light .mission-row strong,
body.skin-light .leader-row strong {
  color: #10202a;
}

body.skin-light .segment-button,
body.skin-light select,
body.skin-light .text-input,
body.skin-light .switch-row,
body.skin-light .stat-row,
body.skin-light .icon-option,
body.skin-light .skin-option,
body.skin-light .look-tab,
body.skin-light .profile-menu-stats,
body.skin-light .streak-card,
body.skin-light .achievement-rank-card,
body.skin-light .achievement-card,
body.skin-light .secondary-button,
body.skin-light .text-button,
body.skin-light .speed-tab,
body.skin-light .scope-tab,
body.skin-light .close-button,
body.skin-light .feedback-input,
body.skin-light .legal-document,
body.skin-light .match-options,
body.skin-light .match-player,
body.skin-light .leader-row,
body.skin-light .mission-row {
  color: #17212b;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(6, 122, 135, 0.28);
}

body.skin-light .result-modal,
body.skin-light .profile-modal {
  background: rgba(238, 245, 240, 0.76);
}

body.skin-light .profile-card {
  background: rgba(255, 255, 255, 0.96);
}

body.skin-light .kudos-total,
body.skin-light .profile-kudos-balance,
body.skin-light .room-code {
  background: rgba(255, 255, 255, 0.82);
}

body.skin-light .chart-stage {
  background:
    linear-gradient(180deg, rgba(250, 253, 248, 0.92), rgba(234, 242, 238, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 68px, rgba(6, 122, 135, 0.08) 68px 69px);
  box-shadow: var(--shadow), inset 0 0 34px rgba(6, 122, 135, 0.08);
}

body.skin-light .ticker-tape {
  border-bottom-color: rgba(6, 122, 135, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #956f00;
}

body.skin-light .tap-feedback {
  border-color: rgba(149, 111, 0, 0.28);
  background: rgba(255, 255, 255, 0.84);
  color: #956f00;
}

body.skin-light .brief p:last-child,
body.skin-light #resultCopy,
body.skin-light .profile-message,
body.skin-light .legal-document p,
body.skin-light .legal-document li {
  color: #314351;
}

.skyline {
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  opacity: 0.32;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.92), transparent 75%),
    linear-gradient(90deg,
      transparent 0 5%, #05070b 5% 9%, transparent 9% 12%, #05070b 12% 18%,
      transparent 18% 23%, #05070b 23% 28%, transparent 28% 35%, #05070b 35% 41%,
      transparent 41% 46%, #05070b 46% 53%, transparent 53% 57%, #05070b 57% 62%,
      transparent 62% 68%, #05070b 68% 76%, transparent 76% 82%, #05070b 82% 88%,
      transparent 88% 100%);
}

.scanline {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.045) 0,
    rgba(255, 255, 255, 0.045) 1px,
    transparent 1px,
    transparent 7px
  );
  mix-blend-mode: screen;
  opacity: 0.32;
}

.top-bar {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  justify-self: center;
  width: 100%;
  max-width: 760px;
  padding: clamp(6px, 1.1vw, 10px) calc(clamp(8px, 1.6vw, 14px) + 54px) clamp(6px, 1.1vw, 10px) clamp(8px, 1.6vw, 14px);
}

body.is-trading .top-bar {
  display: none;
}

.profile-button,
.profile-avatar {
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(64, 255, 146, 0.44);
  background: #f7f7f0;
  color: #07120d;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.profile-button {
  position: absolute;
  top: clamp(6px, 1.1vw, 10px);
  right: clamp(8px, 1.6vw, 14px);
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 0;
}

.kudos-badge {
  position: absolute;
  right: 28px;
  bottom: -3px;
  min-width: 58px;
  max-width: 86px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(243, 200, 75, 0.72);
  background: #05070b;
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.profile-button-icon,
.profile-button-icon .avatar-art,
.profile-avatar .avatar-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 76%;
  height: 76%;
  overflow: hidden;
  border-radius: inherit;
  color: #07120d;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.profile-button-icon .avatar-art::before,
.profile-avatar .avatar-art::before {
  content: "";
  position: absolute;
  inset: 20% 9% 32%;
  border-bottom: 3px solid var(--red);
  transform: skewY(-17deg);
}

.profile-button-icon .icon-image,
.profile-avatar .icon-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  background: transparent;
}

.profile-button-icon .icon-image.image-missing,
.profile-avatar .icon-image.image-missing {
  background:
    linear-gradient(160deg, transparent 44%, var(--red) 45% 52%, transparent 53%),
    #f7f7f0;
}

.eyebrow,
.terminal-label,
.metric-card span,
.log-title {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Impact, "Arial Narrow", sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  color: white;
  font-size: clamp(1.45rem, 3.4vw, 2.75rem);
  line-height: 0.98;
  text-shadow: 3px 3px 0 rgba(64, 255, 146, 0.24);
}

h2 {
  font-size: clamp(1.08rem, 2.2vw, 1.8rem);
  line-height: 1;
}

.clock-card,
.metric-card,
.setup-panel,
.result-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.clock-card {
  display: grid;
  min-width: 138px;
  padding: 10px 12px;
  text-align: right;
}

.clock-card span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.78rem;
}

.clock-card strong {
  color: var(--cyan);
  font-size: 1.55rem;
}

.setup-panel {
  display: grid;
  grid-template-columns: minmax(0, min(540px, 100%));
  justify-content: center;
  gap: 6px;
  grid-row: 2;
  justify-self: center;
  align-self: center;
  width: min(620px, calc(100% - 10px));
  min-height: 0;
  max-height: calc(100% - clamp(8px, 1.6vh, 14px));
  overflow: hidden;
  margin: 0 auto;
  padding: clamp(7px, 1.1vw, 10px);
}

.brief {
  text-align: center;
}

.brief p:last-child {
  max-width: 780px;
  color: #dfd7b8;
  line-height: 1.1;
  font-size: 0.76rem;
  margin: 4px 0 0;
}

.controls {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 0;
  overflow: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.standard-options {
  display: grid;
  gap: 3px;
}

.match-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px;
  align-items: center;
  padding: 4px;
  border: 1px solid rgba(47, 230, 222, 0.22);
  background: rgba(9, 13, 21, 0.48);
}

.match-options .control-label {
  grid-column: 1 / -1;
}

.match-copy {
  grid-column: 1 / -1;
  margin: 0;
  color: #dfd7b8;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.global-size-control {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}

.gameplay-control {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.controls label,
.control-label {
  color: #f8e9b5;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.mode-control {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segment-button {
  display: grid;
  place-items: center;
  min-height: 23px;
  padding: 2px 5px;
  border-radius: 7px;
  color: var(--ink);
  border: 1px solid rgba(47, 230, 222, 0.34);
  background: rgba(9, 13, 21, 0.88);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.segment-button input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment-button span {
  pointer-events: none;
}

.segment-button:has(input:checked) {
  color: #06100c;
  border-color: rgba(64, 255, 146, 0.7);
  background: var(--green);
}

.segment-button.active {
  color: #06100c;
  border-color: rgba(64, 255, 146, 0.7);
  background: var(--green);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.duration-row {
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 6px;
  align-items: center;
}

input[type="range"] {
  accent-color: var(--green);
  width: 100%;
}

output {
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 700;
}

select {
  min-height: 28px;
  color: var(--ink);
  border: 1px solid rgba(47, 230, 222, 0.38);
  background: #090d15;
  padding: 0 8px;
  font-size: 0.74rem;
}

.primary-button,
.secondary-button,
.trade-button {
  min-height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.primary-button,
.secondary-button {
  width: 100%;
}

.primary-button {
  border: 0;
  color: #04110a;
  background: var(--green);
  box-shadow: 0 10px 22px rgba(64, 255, 146, 0.16);
}

#startButton {
  position: sticky;
  bottom: 0;
  z-index: 4;
}

.secondary-button {
  color: var(--ink);
  border: 1px solid rgba(47, 230, 222, 0.42);
  background: rgba(9, 13, 21, 0.88);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.6);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.trade-button:hover:not(:disabled) {
  filter: brightness(1.08);
}

.trading-screen {
  display: none;
  grid-row: 2;
  height: 100%;
  min-height: 0;
  padding: clamp(4px, 0.8vw, 8px);
}

.trading-screen.active {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 3px;
}

.play-brand {
  margin: 0;
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.trade-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.match-panel {
  position: relative;
  grid-row: 2;
  align-self: center;
  display: grid;
  gap: 8px;
  width: min(520px, calc(100% - 18px));
  margin: 0 auto;
  padding: clamp(12px, 2vw, 18px);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.lobby-close-button {
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  font-size: 0.72rem;
}

.room-code {
  border: 1px solid rgba(243, 200, 75, 0.32);
  background: rgba(5, 7, 11, 0.62);
  color: var(--gold);
  font-size: clamp(1.6rem, 8vw, 3rem);
  font-weight: 900;
  line-height: 1;
  padding: 12px;
  letter-spacing: 0.08em;
}

.room-code-input {
  text-transform: uppercase;
}

.match-players,
.match-leaderboard,
.mission-list {
  display: grid;
  gap: 7px;
}

.match-player,
.leader-row,
.mission-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 13, 21, 0.62);
}

.match-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  background: #f7f7f0;
}

.match-icon.placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(243, 200, 75, 0.5);
  color: var(--gold);
  background: rgba(5, 7, 11, 0.62);
  font-weight: 900;
}

.match-player.open-slot {
  border-style: dashed;
  opacity: 0.78;
}

.leader-row {
  grid-template-columns: 32px 38px minmax(0, 1fr) auto;
  text-align: left;
}

.leader-row.winner {
  border-color: rgba(64, 255, 146, 0.66);
  box-shadow: inset 0 0 0 1px rgba(64, 255, 146, 0.18);
}

.leader-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  background: #f7f7f0;
}

.timer-card {
  border-color: rgba(243, 200, 75, 0.44);
}

.timer-card strong {
  color: var(--cyan);
}

body.is-warning .timer-card {
  border-color: rgba(255, 77, 93, 0.88);
  background: rgba(54, 6, 14, 0.92);
  animation: warningPulse 0.62s steps(2, end) infinite;
}

body.is-warning .timer-card span,
body.is-warning .timer-card strong {
  color: #ff4d5d;
}

body.is-warning .chart-stage {
  border-color: rgba(255, 77, 93, 0.75);
  box-shadow: var(--shadow), inset 0 0 58px rgba(255, 77, 93, 0.22);
}

.metric-card {
  padding: 4px 6px;
}

.metric-card strong {
  display: block;
  color: white;
  font-size: clamp(0.78rem, 1.35vw, 1rem);
  line-height: 1.05;
}

.trade-hud .metric-card span {
  margin-bottom: 2px;
  font-size: 0.58rem;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.chart-stage {
  position: relative;
  display: grid;
  grid-template-rows: 22px minmax(0, 1fr) 30px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(47, 230, 222, 0.24);
  background:
    linear-gradient(180deg, rgba(6, 9, 13, 0.9), rgba(8, 10, 16, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 68px, rgba(47, 230, 222, 0.06) 68px 69px);
  box-shadow: var(--shadow), inset 0 0 46px rgba(47, 230, 222, 0.11);
  touch-action: manipulation;
}

.ticker-tape {
  position: relative;
  z-index: 2;
  height: 22px;
  min-width: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(243, 200, 75, 0.24);
  background: #05070b;
  color: var(--gold);
  white-space: nowrap;
  font-weight: 700;
  line-height: 22px;
  font-size: 0.66rem;
}

.ticker-tape span {
  display: inline-block;
  padding-right: 32px;
  animation: tape 18s linear infinite;
}

@keyframes tape {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes warningPulse {
  0% {
    filter: brightness(1);
    transform: translateY(0);
  }
  50% {
    filter: brightness(1.34);
    transform: translateY(-1px);
  }
  100% {
    filter: brightness(1);
    transform: translateY(0);
  }
}

.chart-plot {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: crosshair;
}

.chart-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: rgba(255, 248, 220, 0.72);
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(1.2rem, 4vw, 2.8rem);
  text-transform: uppercase;
  text-align: center;
  transition: opacity 160ms ease, transform 160ms ease;
}

.chart-overlay.hidden {
  opacity: 0;
  transform: translateY(-8px);
}

.tap-feedback {
  position: relative;
  z-index: 3;
  min-width: 0;
  max-width: 100%;
  padding: 0 8px;
  border: 1px solid rgba(243, 200, 75, 0.28);
  border-width: 1px 0 0;
  background: rgba(5, 7, 11, 0.68);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.68rem;
  line-height: 29px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.tap-feedback span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 8px;
  background: rgba(4, 5, 9, 0.72);
}

.result-modal.open {
  display: grid;
}

.result-card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: clamp(10px, 2vw, 16px);
}

.result-card .terminal-label {
  margin-bottom: 3px;
}

.result-card h2 {
  font-size: clamp(1.1rem, 2.1vw, 1.85rem);
  margin-bottom: 4px;
}

.score-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
}

.score-line span {
  color: var(--muted);
}

.score-line strong {
  color: white;
  text-align: right;
}

.comparison-line {
  margin: 3px 0;
  padding: 7px 8px;
  border: 1px solid rgba(243, 200, 75, 0.28);
  background: rgba(243, 200, 75, 0.08);
}

.comparison-line span,
.comparison-line strong {
  color: var(--gold);
  font-weight: 900;
}

#resultCopy {
  color: #dfd7b8;
  line-height: 1.2;
  margin: 8px 0;
  font-size: 0.82rem;
  padding: 7px 8px;
  border: 1px solid rgba(47, 230, 222, 0.18);
  background: rgba(47, 230, 222, 0.06);
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(4, 5, 9, 0.76);
}

.profile-modal.open {
  display: grid;
}

.profile-card {
  position: relative;
  width: min(480px, 100%);
  max-height: min(680px, calc(100vh - 28px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(64, 255, 146, 0.24);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.onboarding-card {
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
}

.onboarding-card h2,
.onboarding-card .profile-message {
  text-align: center;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--ink);
  background: rgba(9, 13, 21, 0.86);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-head {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 4px 34px 14px;
  text-align: center;
}

.profile-avatar.large {
  width: 82px;
  height: 82px;
  padding: 0;
}

.profile-name-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  align-items: baseline;
}

.profile-name-button {
  min-height: 1.2em;
  border: 0;
  background: transparent;
  color: white;
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-rank {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-kudos-balance,
.profile-streak-pill {
  border: 1px solid rgba(243, 200, 75, 0.34);
  background: rgba(5, 7, 11, 0.62);
  color: var(--gold);
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-streak-pill {
  border-color: rgba(64, 255, 146, 0.28);
  color: var(--green);
}

.profile-menu-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profile-menu-stats div {
  display: grid;
  gap: 2px;
  min-height: 48px;
  align-content: center;
  padding: 7px;
  border: 1px solid rgba(243, 200, 75, 0.28);
  background: rgba(5, 7, 11, 0.54);
  text-align: center;
}

.profile-menu-stats span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-menu-stats strong {
  color: var(--gold);
  font-size: 1rem;
}

.profile-head span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.profile-head span:empty {
  display: none;
}

.profile-view {
  display: none;
}

.profile-view.active {
  display: grid;
  gap: 10px;
}

.panel-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 34px;
}

.panel-header h3 {
  margin: 0;
  color: white;
  font-size: 0.96rem;
  text-transform: uppercase;
}

.text-button {
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(47, 230, 222, 0.34);
  color: var(--ink);
  background: rgba(9, 13, 21, 0.88);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field-label,
.profile-section-title {
  margin: 0;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.text-input {
  min-height: 28px;
  width: 100%;
  border: 1px solid rgba(47, 230, 222, 0.38);
  color: var(--ink);
  background: #090d15;
  padding: 0 7px;
  font-size: 0.74rem;
}

.settings-group,
.settings-links,
.stat-list {
  display: grid;
  gap: 8px;
}

.speed-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.scope-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.speed-tab,
.scope-tab {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(47, 230, 222, 0.34);
  color: var(--ink);
  background: rgba(9, 13, 21, 0.88);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.speed-tab.active,
.scope-tab.active {
  color: #06100c;
  border-color: rgba(64, 255, 146, 0.7);
  background: var(--green);
}

.switch-row,
.stat-row,
.icon-option {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 13, 21, 0.68);
}

.switch-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  color: #f8e9b5;
  font-weight: 700;
  text-transform: uppercase;
}

.switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.settings-links {
  grid-template-columns: 1fr 1fr;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  padding-top: 2px;
}

.legal-links a {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.profile-message {
  min-height: 1.2em;
  margin: 0;
  color: #dfd7b8;
  font-size: 0.76rem;
  line-height: 1.35;
}

.feedback-input,
.legal-document {
  width: 100%;
  border: 1px solid rgba(47, 230, 222, 0.32);
  color: var(--ink);
  background: #090d15;
}

.feedback-input {
  resize: vertical;
  min-height: 104px;
  padding: 10px;
}

.legal-document {
  max-height: 360px;
  overflow: auto;
  padding: 10px;
}

.legal-document p,
.legal-document li {
  color: #dfd7b8;
  font-size: 0.76rem;
  line-height: 1.4;
}

.legal-document h4 {
  margin: 8px 0 4px;
  color: white;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.legal-document ul {
  padding-left: 18px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.look-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.look-tab {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(47, 230, 222, 0.34);
  color: var(--ink);
  background: rgba(9, 13, 21, 0.88);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.look-tab.active {
  color: #06100c;
  border-color: rgba(64, 255, 146, 0.7);
  background: var(--green);
}

.look-panel {
  display: none;
}

.look-panel.active {
  display: block;
}

.skin-grid {
  display: grid;
  gap: 8px;
}

.kudos-total {
  border: 1px solid rgba(243, 200, 75, 0.34);
  background: rgba(5, 7, 11, 0.62);
  color: var(--gold);
  padding: 9px 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.streak-card,
.achievement-rank-card,
.achievement-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(64, 255, 146, 0.18);
  background: rgba(9, 13, 21, 0.58);
  padding: 9px 10px;
}

.streak-card strong,
.achievement-rank-card strong,
.achievement-card strong {
  color: white;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.streak-card small,
.achievement-rank-card small,
.achievement-card small,
.achievement-card span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.streak-card .primary-button {
  min-height: 34px;
}

.achievement-list {
  display: grid;
  gap: 8px;
}

.achievement-card {
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 8px;
  width: 4px;
  background: rgba(185, 169, 122, 0.28);
}

.achievement-card.unlocked {
  border-color: rgba(243, 200, 75, 0.42);
}

.achievement-card.unlocked::before {
  background: var(--gold);
}

.achievement-card > * {
  margin-left: 10px;
}

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

.mission-row strong,
.leader-row strong {
  color: white;
  text-transform: uppercase;
}

.mission-row small,
.leader-row small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.icon-option,
.skin-option {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 70px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.icon-option:disabled,
.skin-option:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.48;
}

.icon-option.selected,
.skin-option.selected {
  border-color: rgba(64, 255, 146, 0.72);
  box-shadow: inset 0 0 0 1px rgba(64, 255, 146, 0.3);
}

.skin-swatch {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.dark-swatch {
  background:
    linear-gradient(135deg, #05080d 0 50%, #40ff92 50% 58%, #101820 58% 100%);
}

.light-swatch {
  background:
    linear-gradient(135deg, #f5f7f1 0 50%, #1f9f63 50% 58%, #ffffff 58% 100%);
}

.bell-swatch {
  background:
    linear-gradient(135deg, #02130f 0 46%, #f9d858 46% 56%, #38f28f 56% 100%);
}

.outcry-swatch {
  background:
    linear-gradient(135deg, #170911 0 46%, #ff5a7b 46% 56%, #ffd166 56% 100%);
}

.chip-swatch {
  background:
    linear-gradient(135deg, #030d1f 0 46%, #61d8ff 46% 56%, #ffe28a 56% 100%);
}

.icon-copy {
  display: grid;
  gap: 3px;
}

.icon-copy strong,
.stat-row strong {
  color: white;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.icon-copy small,
.stat-row span,
.stat-row small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.avatar-art.icon-default {
  background: #fbfbf4;
}

.avatar-art:not(.icon-default) {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #101820;
  color: var(--gold);
}

.avatar-art:not(.icon-default)::before {
  display: none;
}

.avatar-art.icon-bull {
  background: #0f2a1e;
  color: var(--green);
}

.avatar-art.icon-bear,
.avatar-art.icon-pig {
  background: #2a1118;
  color: var(--red);
}

.avatar-art.icon-rabbit,
.avatar-art.icon-chicken {
  background: #10232c;
  color: var(--cyan);
}

.avatar-art.icon-turtle,
.avatar-art.icon-sheep {
  background: #2c260f;
  color: var(--gold);
}

.avatar-art.icon-stag,
.avatar-art.icon-whale {
  background: #101833;
  color: #9eb8ff;
}

.stat-row {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
}

.stat-row strong {
  display: block;
  margin-top: 2px;
}

.positive {
  color: var(--green) !important;
}

.negative {
  color: var(--red) !important;
}

@media (max-width: 900px) {
  .top-bar,
  .setup-panel {
    grid-template-columns: 1fr;
  }

  .setup-panel {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .top-bar {
    display: grid;
  }

  .clock-card {
    text-align: left;
  }

  .trade-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding:
      0
      max(3px, var(--safe-right))
      max(2px, var(--safe-bottom))
      max(3px, var(--safe-left));
    gap: 2px;
  }

  .trade-floor {
    height: auto;
    border: 0;
  }

  .top-bar {
    padding: 5px 60px 5px 8px;
    gap: 5px;
  }

  h1 {
    font-size: clamp(1.25rem, 7.5vw, 1.75rem);
  }

  h2 {
    font-size: 1.02rem;
  }

  .setup-panel {
    margin: 0 4px;
    max-height: calc(100% - 8px);
    padding: 6px;
    gap: 4px;
  }

  .segmented-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-control,
  .gameplay-control {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .global-size-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-options {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brief p:last-child {
    line-height: 1.15;
    margin: 3px 0 0;
  }

  .trade-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
  }

  .metric-card {
    padding: 3px 5px;
  }

  .metric-card strong {
    font-size: 0.86rem;
  }

  .trading-screen {
    padding: 3px;
  }

  .ticker-tape {
    height: 20px;
    line-height: 20px;
    font-size: 0.62rem;
  }

  .chart-stage {
    grid-template-rows: 20px minmax(0, 1fr) 28px;
  }

  .tap-feedback {
    line-height: 27px;
    font-size: 0.64rem;
  }

  .result-actions {
    grid-template-columns: 1fr 1fr;
  }

  .profile-modal {
    padding: 8px;
  }

  .profile-card {
    padding: 14px;
    max-height: calc(100dvh - 16px);
  }

  .icon-grid,
  .settings-links,
  .scope-tabs {
    grid-template-columns: 1fr;
  }

  .score-line {
    padding: 4px 0;
    font-size: 0.78rem;
  }
}

@media (max-height: 700px) {
  .app-shell {
    padding:
      0
      max(3px, var(--safe-right))
      max(2px, var(--safe-bottom))
      max(3px, var(--safe-left));
    gap: 2px;
  }

  .trade-floor {
    height: auto;
  }

  .top-bar {
    padding: 5px 60px 5px 8px;
    gap: 5px;
  }

  h1 {
    font-size: clamp(1.25rem, 4.8vw, 2rem);
  }

  h2 {
    font-size: clamp(1rem, 2.5vw, 1.45rem);
  }

  .clock-card {
    min-width: 126px;
    padding: 10px 12px;
  }

  .clock-card strong {
    font-size: 1.65rem;
  }

  .setup-panel {
    gap: 4px;
    padding: 6px;
    margin: 0 4px;
  }

  .brief p:last-child {
    margin: 3px 0 0;
    line-height: 1.15;
  }

  .controls {
    gap: 4px;
  }

  .primary-button {
    min-height: 28px;
  }
}
