:root {
  color-scheme: dark;
  --ink: #e9e1c8;
  --muted: #a8a18c;
  --canvas: #0c0e0d;
  --panel: #1a1c18;
  --metal: #252821;
  --metal-dark: #141613;
  --line: #44483b;
  --amber: #ffb02e;
  --amber-dim: #8d5a13;
  --green: #79e287;
  --red: #ef4b3f;
  --cream: #d9c895;
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--canvas); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, #25291f 0, #111310 42%, #090a09 100%);
  background-size: 100% 4px, 100% 100%;
}

button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px clamp(16px, 3vw, 46px) 16px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 28px;
  padding: 0 4px 18px;
  border-bottom: 1px solid #34382e;
}

.brand-lockup { display: flex; min-width: 0; align-items: center; gap: 13px; }
.brand-logo {
  display: block;
  width: clamp(132px, 15vw, 190px);
  height: 58px;
  object-fit: contain;
  object-position: left center;
}
.brand-copy { flex: 0 0 auto; }

h1, h2, p { margin: 0; }
.brand-lockup h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand-lockup p { margin-top: 5px; color: var(--muted); font-size: .78rem; text-transform: uppercase; }

.callsign-field { display: grid; gap: 5px; width: min(230px, 32vw); }
.callsign-field span, .eyebrow { color: var(--muted); font-size: .76rem; text-transform: uppercase; }
.callsign-field input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #666851;
  border-radius: 0;
  outline: none;
  padding: 6px 2px;
  color: var(--cream);
  background: transparent;
  font-size: 1rem;
}
.callsign-field input:focus { border-color: var(--amber); }

.ether-state { justify-self: end; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .85rem; }
.access-button {
  border: 1px solid #6d6446;
  border-radius: 2px;
  padding: 7px 10px;
  color: #ded7b7;
  background: #24261f;
  font: 700 .62rem/1 Arial, sans-serif;
  cursor: pointer;
}
.access-button:hover { border-color: var(--amber); color: var(--amber); }
body.guest .channel-controls, body.guest .channel-presets, body.guest .scan-button, body.guest .ptt-button { cursor: not-allowed; }
body.guest .callsign-field input { color: #8d8a78; }
.status-lamp {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid #090a08;
  border-radius: 50%;
  background: #34372f;
  box-shadow: inset 0 1px 2px #050605;
}
.status-lamp.online, .status-lamp.active { background: var(--green); box-shadow: 0 0 9px rgba(121,226,135,.75); }
.status-lamp.red.active { background: var(--red); box-shadow: 0 0 9px rgba(239,75,63,.8); }
.status-lamp.amber.active { background: var(--amber); box-shadow: 0 0 9px rgba(255,176,46,.8); }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 380px);
  gap: clamp(20px, 3vw, 46px);
  align-items: stretch;
  padding-top: clamp(28px, 5vh, 62px);
}

.radio-wrap { position: relative; align-self: center; padding-bottom: 18px; }
.radio-shadow { position: absolute; inset: 24px 2% 0; background: #000; filter: blur(22px); opacity: .75; }
.radio {
  position: relative;
  overflow: hidden;
  border: 1px solid #505448;
  border-radius: 6px;
  background:
    linear-gradient(100deg, transparent 0 47%, rgba(255,255,255,.025) 50%, transparent 53%),
    linear-gradient(rgba(48,52,43,.44), rgba(29,32,27,.54) 48%, rgba(23,25,22,.64)),
    url("assets/radio-leather-texture.png") center / cover no-repeat;
  background-color: #20231d;
  background-blend-mode: screen, normal, normal;
  box-shadow: inset 0 1px 0 #626656, inset 0 -2px 0 #090a09, 0 14px 36px #000;
}
.radio::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background: radial-gradient(ellipse at 50% 28%, rgba(255,255,255,.07), transparent 62%);
}

.radio-topline, .radio-footer {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  color: #aaa68e;
  background: rgba(0,0,0,.22);
  font: 700 .68rem/1.2 Arial, sans-serif;
  text-transform: uppercase;
}
.radio-topline { border-bottom: 1px solid #0c0d0b; }
.radio-footer { border-top: 1px solid #414438; }
.serial { color: #747765; }
#radioStatus { color: var(--cream); }

.radio-main {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr 1fr;
  gap: clamp(16px, 2.5vw, 38px);
  align-items: center;
  padding: clamp(25px, 4vw, 54px) clamp(18px, 3vw, 42px) 34px;
}

.meter-section { min-width: 0; }
.radio-brand-burn {
  display: block;
  width: min(142px, 64%);
  height: 36px;
  margin: -12px auto 22px;
  background: linear-gradient(#dacb98, #aa8c4d);
  opacity: .9;
  -webkit-mask: url("assets/wazel-logo.png") center / contain no-repeat;
  mask: url("assets/wazel-logo.png") center / contain no-repeat;
  filter: drop-shadow(0 1px 0 #050605) drop-shadow(0 0 3px rgba(218,203,152,.2));
}
.meter-bezel { padding: 10px; border: 2px solid #090a09; background: #35382e; box-shadow: inset 0 0 0 1px #5c604f; }
.meter-face {
  position: relative;
  height: 145px;
  overflow: hidden;
  border: 1px solid #5b5848;
  background: linear-gradient(#e3dabd, #b6ab8d);
  box-shadow: inset 0 4px 14px rgba(55,40,17,.35);
  color: #302e25;
}
.meter-face strong { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: .76rem; }
.meter-scale { display: flex; justify-content: space-between; padding: 23px 17px 0; font: 700 .7rem/1 Arial, sans-serif; }
.meter-scale span:last-child { color: #a31f17; }
.meter-arc { position: absolute; width: 88%; height: 140px; left: 6%; top: 36px; border-top: 2px solid #3a392f; border-radius: 50%; }
.needle {
  position: absolute;
  width: 43%;
  height: 2px;
  left: 50%;
  bottom: 18px;
  transform: rotate(-66deg);
  transform-origin: 0 50%;
  background: #c3261c;
  transition: transform .16s cubic-bezier(.2,.8,.3,1);
  box-shadow: 0 0 1px rgba(0,0,0,.4);
}
.meter-pivot { position: absolute; width: 12px; height: 12px; left: calc(50% - 6px); bottom: 12px; border-radius: 50%; background: #28271f; }
.indicator-row { display: flex; justify-content: center; gap: 20px; margin-top: 12px; color: #beb9a0; font: 700 .7rem/1 Arial, sans-serif; }
.indicator-row div { display: flex; align-items: center; gap: 6px; }

.display-section { display: grid; justify-items: center; gap: 17px; }
.channel-display {
  display: grid;
  width: 128px;
  min-height: 112px;
  place-items: center;
  align-content: center;
  border: 7px solid #11120f;
  background: #0b0a07;
  box-shadow: inset 0 0 18px #000, 0 0 0 1px #555747;
}
.display-label { color: #827253; font: 700 .63rem/1 Arial, sans-serif; }
#channelNumber { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.seven-segment-display { display: flex; height: 58px; align-items: center; gap: 7px; }
.seven-digit { position: relative; display: block; width: 32px; height: 56px; }
.seven-digit i {
  position: absolute;
  display: block;
  background: #332410;
  opacity: .34;
  transition: background-color .08s, opacity .08s, box-shadow .08s;
}
.seven-digit i.on { background: var(--amber); opacity: 1; box-shadow: 0 0 5px rgba(255,176,46,.75), 0 0 12px rgba(255,176,46,.32); }
.seven-digit i[data-segment="a"],
.seven-digit i[data-segment="g"],
.seven-digit i[data-segment="d"] { left: 4px; width: 24px; height: 5px; clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%); }
.seven-digit i[data-segment="a"] { top: 0; }
.seven-digit i[data-segment="g"] { top: 25px; }
.seven-digit i[data-segment="d"] { bottom: 0; }
.seven-digit i[data-segment="b"],
.seven-digit i[data-segment="c"],
.seven-digit i[data-segment="e"],
.seven-digit i[data-segment="f"] { width: 5px; height: 24px; clip-path: polygon(50% 0, 100% 10%, 100% 90%, 50% 100%, 0 90%, 0 10%); }
.seven-digit i[data-segment="b"] { top: 3px; right: 0; }
.seven-digit i[data-segment="c"] { right: 0; bottom: 3px; }
.seven-digit i[data-segment="e"] { bottom: 3px; left: 0; }
.seven-digit i[data-segment="f"] { top: 3px; left: 0; }
.channel-tag { min-height: 13px; color: #a88a49; font: 700 .62rem/1 Arial, sans-serif; text-transform: uppercase; }

.channel-controls { display: flex; align-items: center; gap: 8px; }
.step-button {
  width: 34px;
  height: 34px;
  border: 1px solid #0a0b09;
  border-radius: 3px;
  background: linear-gradient(#4a4d40, #24261f);
  box-shadow: inset 0 1px #686b5a, 0 2px 2px #080908;
  font-size: 1.3rem;
  cursor: pointer;
}
.step-button:active { transform: translateY(1px); box-shadow: inset 0 1px 4px #070807; }
.channel-knob { position: relative; display: block; width: 72px; height: 72px; }
.channel-knob input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: ew-resize; }
.knob-face {
  display: block;
  width: 72px;
  height: 72px;
  border: 2px solid #090a08;
  border-radius: 50%;
  background: repeating-conic-gradient(#30332b 0 5deg, #141612 5deg 9deg);
  box-shadow: inset 0 0 0 7px #24271f, inset 0 0 0 9px #090a08, 0 3px 4px #080908;
  transform: rotate(-44deg);
  pointer-events: none;
}
.knob-face i { position: absolute; width: 3px; height: 18px; top: 7px; left: calc(50% - 1px); background: var(--cream); }
.control-caption { color: #8e8b78; font: 700 .62rem/1 Arial, sans-serif; }
.channel-presets {
  display: grid;
  grid-template-columns: repeat(3, 58px);
  gap: 6px;
  margin-top: 2px;
}
.preset-button {
  display: grid;
  width: 58px;
  height: 46px;
  place-items: center;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  border: 1px solid #090a08;
  border-radius: 3px;
  padding: 0;
  background: linear-gradient(#464a3d, #25271f);
  box-shadow: inset 0 1px #666a58, 0 3px 2px #080908;
  color: #c0bba3;
  cursor: pointer;
}
.preset-button strong { font: 800 .95rem/1 Arial, sans-serif; }
.preset-button span { font: 700 .53rem/1 Arial, sans-serif; }
.preset-button:hover { color: var(--cream); }
.preset-button:active { transform: translateY(2px); box-shadow: inset 0 2px 4px #090a08, 0 1px #080908; }
.preset-button.active {
  color: var(--amber);
  background: #11120e;
  box-shadow: inset 0 0 9px #000, 0 0 0 1px var(--amber-dim), 0 2px 2px #080908;
  text-shadow: 0 0 7px rgba(255,176,46,.42);
}
.scan-button {
  display: grid;
  grid-template-columns: 10px auto 1fr;
  width: 186px;
  height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid #090a08;
  border-radius: 3px;
  padding: 0 10px;
  background: linear-gradient(#3e4237, #22241d);
  box-shadow: inset 0 1px #606451, 0 3px 2px #080908;
  color: #c0bba3;
  cursor: pointer;
}
.scan-button strong { font: 800 .72rem/1 Arial, sans-serif; }
.scan-button small { justify-self: end; color: #858876; font: 700 .58rem/1 Arial, sans-serif; }
.scan-lamp { width: 8px; height: 8px; border: 1px solid #080908; border-radius: 50%; background: #34372f; box-shadow: inset 0 1px 2px #050605; }
.scan-button:active { transform: translateY(2px); box-shadow: inset 0 2px 4px #090a08, 0 1px #080908; }
.scan-button.active { color: var(--amber); background: #10110e; box-shadow: inset 0 0 9px #000, 0 0 0 1px var(--amber-dim); }
.scan-button.active .scan-lamp { background: var(--green); box-shadow: 0 0 8px rgba(121,226,135,.8); animation: scanPulse .8s steps(2, end) infinite; }
.scan-button.holding .scan-lamp { background: var(--amber); box-shadow: 0 0 9px rgba(255,176,46,.85); animation: none; }
@keyframes scanPulse { 50% { opacity: .35; } }

.ptt-section { display: grid; justify-items: center; gap: 11px; }
.ptt-button {
  position: relative;
  width: min(172px, 100%);
  aspect-ratio: 1.22;
  overflow: hidden;
  border: 2px solid #090a08;
  border-radius: 5px;
  padding: 0;
  background: linear-gradient(145deg, #4a4d43, #272a23 65%, #171915);
  box-shadow: inset 0 2px 1px #65695a, inset 0 -6px 10px #12130f, 0 5px 0 #090a08, 0 8px 14px rgba(0,0,0,.5);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.ptt-ridge { position: absolute; inset: 14px; border: 1px solid #0e100d; border-radius: 3px; box-shadow: inset 0 0 0 1px #55594a; }
.ptt-copy { position: relative; display: grid; place-items: center; gap: 5px; }
.ptt-copy strong { color: var(--cream); font: 800 2rem/1 Arial, sans-serif; }
.ptt-copy small { color: #9f9b84; font: 700 .62rem/1 Arial, sans-serif; }
.ptt-button.transmitting { transform: translateY(4px); background: linear-gradient(145deg, #5d2924, #351815); box-shadow: inset 0 3px 8px #160908, 0 1px 0 #080908; }
.ptt-button.transmitting .ptt-copy strong { color: #ff8175; text-shadow: 0 0 9px rgba(239,75,63,.5); }
#pttHint { min-height: 17px; color: #aaa68f; text-align: center; font-size: .78rem; }
.microphone-select { display: grid; width: min(190px, 100%); gap: 5px; color: #8e8b78; font: 700 .59rem/1 Arial, sans-serif; }
.microphone-select select {
  width: 100%;
  min-width: 0;
  border: 1px solid #090a08;
  border-radius: 2px;
  padding: 7px 24px 7px 8px;
  color: #c8c3aa;
  background: #171914;
  box-shadow: inset 0 1px 3px #080908, 0 1px #4a4e40;
  font: 700 .67rem/1 Arial, sans-serif;
}
.microphone-select select:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.microphone-select select:disabled { opacity: .45; }

.radio-controls {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(68px, 84px)) minmax(76px, .75fr) minmax(150px, 1.4fr);
  gap: 12px;
  align-items: center;
  padding: 21px clamp(18px, 3vw, 42px) 25px;
  border-top: 1px solid #464a3d;
  background: rgba(0,0,0,.12);
}
.dial-control { display: grid; min-width: 0; justify-items: center; gap: 7px; }
.dial-label { display: flex; width: 100%; max-width: 78px; justify-content: space-between; color: #9e9b87; font-size: .66rem; }
.dial-label output { color: var(--cream); }
.rotary-knob { position: relative; display: block; width: 68px; height: 68px; }
.rotary-knob input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: none; }
.rotary-face {
  position: relative;
  display: block;
  width: 68px;
  height: 68px;
  border: 2px solid #090a08;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 31%, rgba(255,255,255,.18) 0 3%, transparent 4%),
    repeating-conic-gradient(#3b3f34 0 6deg, #171914 6deg 10deg);
  box-shadow: inset 0 0 0 7px #292c24, inset 0 0 0 9px #0b0c0a, inset 0 -8px 12px rgba(0,0,0,.35), 0 3px 4px #080908;
  transform: rotate(-135deg);
  pointer-events: none;
}
.rotary-face i { position: absolute; width: 3px; height: 17px; top: 6px; left: calc(50% - 1px); background: var(--cream); box-shadow: 0 0 3px rgba(245,241,229,.32); }
.rotary-knob input:focus-visible + .rotary-face { outline: 2px solid var(--amber); outline-offset: 3px; }
.switch-control { display: grid; justify-items: start; gap: 8px; color: #9e9b87; font-size: .7rem; cursor: pointer; }
.switch-control input { position: absolute; opacity: 0; }
.switch-control i { position: relative; width: 44px; height: 22px; border: 1px solid #090a08; background: #12130f; }
.switch-control i::after { content: ""; position: absolute; width: 18px; height: 16px; top: 2px; left: 3px; background: #55594a; transition: transform .15s; }
.switch-control input:checked + i::after { transform: translateX(18px); background: var(--amber); }
.speaker-grille { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; align-self: stretch; padding: 6px 0; }
.speaker-grille span {
  min-height: 13px;
  overflow: hidden;
  border-radius: 50%;
  background:
    repeating-linear-gradient(45deg, rgba(122,126,105,.34) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-45deg, rgba(88,92,77,.3) 0 1px, transparent 1px 4px),
    #080908;
  box-shadow: inset 0 1px 3px #000, inset 0 0 0 1px rgba(0,0,0,.75), 0 1px #4e5244;
}

.traffic-panel {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  border-left: 1px solid #42463a;
  padding-left: clamp(20px, 3vw, 38px);
}
.panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 4px 0 18px; border-bottom: 1px solid #393d33; }
.panel-heading h2 { margin-top: 5px; font-size: 1.55rem; text-transform: uppercase; }
.clear-button { border: 0; padding: 6px 0; background: transparent; color: #979480; font-size: .78rem; cursor: pointer; }
.clear-button:hover { color: var(--ink); }
.traffic-log { flex: 1; max-height: 530px; overflow-y: auto; overflow-anchor: none; overscroll-behavior: contain; scrollbar-color: #545848 transparent; scrollbar-gutter: stable; }
.empty-state { display: grid; min-height: 330px; place-items: center; align-content: center; gap: 12px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--ink); font-size: 1rem; }
.empty-state p { max-width: 260px; line-height: 1.55; font-size: .85rem; }
.empty-signal { display: flex; align-items: end; gap: 4px; height: 27px; }
.empty-signal i { display: block; width: 5px; background: #686b58; }
.empty-signal i:nth-child(1) { height: 8px; }
.empty-signal i:nth-child(2) { height: 17px; }
.empty-signal i:nth-child(3) { height: 26px; }
.message-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid #292c25; }
.play-button { width: 38px; height: 38px; border: 1px solid #555846; border-radius: 50%; background: #1b1d18; color: var(--amber); cursor: pointer; }
.play-button.playing { color: var(--red); border-color: #7c3d35; }
.message-copy { min-width: 0; }
.message-copy > div { display: flex; justify-content: space-between; gap: 8px; }
.message-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.message-copy time { color: #777a69; font-size: .72rem; }
.message-meta { display: block; margin-top: 5px; color: #8f8c79; font-size: .76rem; }
.mini-meter { display: flex; align-items: end; gap: 2px; height: 20px; }
.mini-meter i { width: 3px; background: #5b5e4e; }
.mini-meter i:nth-child(1) { height: 5px; }
.mini-meter i:nth-child(2) { height: 9px; }
.mini-meter i:nth-child(3) { height: 14px; }
.mini-meter i:nth-child(4) { height: 19px; background: var(--amber-dim); }
.channel-note { display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid #393d33; color: #96937f; font-size: .8rem; }
.channel-dot { width: 8px; height: 8px; border-radius: 50%; background: #777b68; }
.channel-dot.special { background: var(--amber); box-shadow: 0 0 7px rgba(255,176,46,.5); }

.key-strip { display: flex; justify-content: center; gap: 28px; margin-top: 24px; color: #777b6b; font-size: .74rem; }
kbd { display: inline-block; min-width: 22px; margin-right: 4px; border: 1px solid #3e4237; border-bottom-width: 2px; padding: 2px 5px; color: #aaa793; background: #171916; text-align: center; font: inherit; }

button:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.registration-dialog {
  position: fixed;
  z-index: 101;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(650px, calc(100% - 28px));
  max-height: min(820px, calc(100dvh - 28px));
  overflow: hidden;
  border: 1px solid #676956;
  border-radius: 4px;
  padding: 0;
  color: #e6e0c9;
  background: #20221c;
  box-shadow: 0 26px 80px #000, inset 0 0 0 1px #11130f;
}
body.modal-open::before { content: ""; position: fixed; z-index: 100; inset: 0; background: rgba(4,5,4,.82); backdrop-filter: blur(3px); }
.registration-head { display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid #414439; padding: 22px 24px 18px; }
.registration-head span { color: var(--amber); font: 700 .63rem/1 Arial, sans-serif; }
.registration-head h2 { margin-top: 7px; font-size: 1.45rem; }
.dialog-close { width: 34px; height: 34px; border: 1px solid #555846; color: #bbb69c; background: #151712; font-size: 1.35rem; cursor: pointer; }
.sign-in-step { display: grid; gap: 22px; padding: 26px 24px 30px; }
.sign-in-step p { color: #b8b49d; line-height: 1.6; }
.sign-in-button, .register-submit { border: 1px solid #a76f18; border-radius: 2px; padding: 13px 16px; color: #17130a; background: var(--amber); text-align: center; text-decoration: none; font: 800 .72rem/1 Arial, sans-serif; cursor: pointer; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #4d5042; }
.auth-switch button { border: 0; padding: 11px; color: #a9a58e; background: #151712; font: 800 .68rem/1 Arial, sans-serif; cursor: pointer; }
.auth-switch button + button { border-left: 1px solid #4d5042; }
.auth-switch button.active { color: #17130a; background: var(--amber); }
.account-form { display: grid; gap: 14px; }
.account-form[hidden], .reset-password-form[hidden] { display: none !important; }
.account-form label { display: grid; gap: 6px; }
.account-form label span { color: #a9a58e; font: 700 .62rem/1 Arial, sans-serif; }
.account-form input { width: 100%; min-width: 0; border: 1px solid #4d5042; border-radius: 2px; padding: 11px; color: #eee8d0; background: #151712; font: 400 .9rem/1.2 Arial, sans-serif; }
.text-button { border: 0; padding: 5px; color: #d6ae61; background: transparent; font: 700 .66rem/1 Arial, sans-serif; cursor: pointer; }
.account-message { min-height: 18px; margin: 0; color: #d9c48e !important; font-size: .8rem; }
.registration-form { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: min(730px, calc(100dvh - 105px)); overflow: hidden; }
.registration-form[hidden], .sign-in-step[hidden] { display: none !important; }
.registration-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; overflow-y: auto; overscroll-behavior: contain; padding: 24px; }
.registration-fields > label { display: grid; gap: 6px; }
.registration-fields > label:nth-of-type(1), .registration-fields > label:nth-of-type(2), .registration-fields > label:nth-of-type(3), .form-pair, .subscription-options, .form-error { grid-column: 1 / -1; }
.registration-form label span { color: #a9a58e; font: 700 .62rem/1 Arial, sans-serif; }
.registration-form input, .registration-form select { width: 100%; min-width: 0; border: 1px solid #4d5042; border-radius: 2px; padding: 10px 11px; color: #eee8d0; background: #151712; font: 400 .9rem/1.2 Arial, sans-serif; }
.registration-form input[readonly] { color: #9eab91; background: #191d17; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-pair label { display: grid; gap: 6px; }
.subscription-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0; border: 1px solid #4d5042; padding: 14px; }
.subscription-options legend { padding: 0 7px; color: var(--amber); font: 700 .64rem/1 Arial, sans-serif; }
.subscription-options label { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 9px; min-height: 62px; border: 1px solid #414438; padding: 9px 10px; background: #181a15; cursor: pointer; }
.subscription-options label:has(input:checked) { border-color: var(--amber); background: #232116; box-shadow: inset 3px 0 var(--amber); }
.subscription-options input { width: 16px; min-width: 16px; margin: 0; border: 0; padding: 0; background: transparent; accent-color: var(--amber); }
.subscription-options span { display: grid; gap: 5px; }
.subscription-options strong { color: #eee8d0; font: 800 .7rem/1.2 Arial, sans-serif; }
.subscription-options small { color: #9f9b86; font: 400 .7rem/1.25 Arial, sans-serif; }
.subscription-options p { grid-column: 1 / -1; margin: 3px 2px 0; color: #858271; font-size: .7rem; line-height: 1.4; }
.form-error { min-height: 18px; color: #ff8b7e; font-size: .78rem; }
.registration-footer { display: grid; gap: 8px; border-top: 1px solid #414439; padding: 14px 24px 16px; background: #20221c; box-shadow: 0 -12px 24px rgba(0,0,0,.28); }
.privacy-note { color: #858271; text-align: center; font-size: .7rem; line-height: 1.45; }

@media (max-width: 1040px) {
  .workspace { grid-template-columns: 1fr; }
  .traffic-panel { min-height: 340px; border-left: 0; border-top: 1px solid #42463a; padding: 28px 0 0; }
  .traffic-log { max-height: 330px; }
}

@media (max-width: 760px) {
  .app-shell { padding: 14px 12px 16px; }
  .topbar { grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
  .callsign-field { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .brand-logo { width: 145px; height: 48px; }
  .brand-copy { display: none; }
  .ether-state { font-size: .76rem; }
  .ether-state > #onlineCount { display: none; }
  .workspace { padding-top: 24px; }
  .radio-main { grid-template-columns: 1fr 1fr; }
  .meter-section { grid-column: 1 / -1; }
  .meter-face { height: 125px; }
  .radio-controls { grid-template-columns: 1fr 1fr; }
  .speaker-grille { grid-column: 1 / -1; min-height: 70px; }
  .radio-footer { font-size: .58rem; }
  .key-strip { flex-wrap: wrap; gap: 12px 20px; justify-content: flex-start; }
}

@media (max-width: 560px) {
  .registration-fields, .form-pair { grid-template-columns: 1fr; }
  .registration-fields > label { grid-column: 1 / -1; }
  .subscription-options { grid-template-columns: 1fr; }
}

@media (max-width: 440px) {
  .radio-main { grid-template-columns: 1fr; }
  .display-section, .ptt-section { border-top: 1px solid #404438; padding-top: 22px; }
  .ptt-button { width: 168px; }
  .radio-controls { gap: 18px 14px; }
  .radio-topline .serial, .radio-footer span:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .scan-button.active .scan-lamp { animation: none; }
}
