/* Уоки-токи — изглед на истинска радиостанция */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #0c0d10;
  --body-hi: #2b2f36;
  --body: #1d2025;
  --body-lo: #131518;
  --text: #eef1f4;
  --muted: #98a1ab;
  --accent: #ff7a1a;
  --accent-hi: #ffad66;
  --accent-lo: #b84a00;
  --lcd-a: #8fa071;
  --lcd-b: #7b8c60;
  --lcd-lit-a: #d6f292;
  --lcd-lit-b: #b3d86a;
  --seg: #17210d;
  --tx: #ff3b30;
  --rx: #30d158;
  --sheet: #1e2227;
  --field: #2a2f36;
  --line: rgba(255, 255, 255, .08);
  --ptt: min(64vw, 270px, 36vh);
  color-scheme: dark;
}
@supports (height: 1dvh) {
  :root { --ptt: min(64vw, 270px, 36dvh); }
}

html, body { margin: 0; min-height: 100%; background: var(--bg); }
body {
  color: var(--text);
  font: 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  display: flex;
  justify-content: center;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
svg { display: block; }

/* ---------- тялото на станцията ---------- */
.radio {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  background:
    radial-gradient(130% 55% at 50% 0%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(180deg, var(--body-hi), var(--body) 28%, var(--body-lo));
}
@supports (height: 1dvh) { .radio { min-height: 100dvh; } }

/* на компютър — като уред с антена */
@media (min-width: 560px) and (min-height: 700px) {
  body {
    align-items: flex-start;
    padding: 120px 0 40px;
    background: radial-gradient(circle at 50% 35%, #262a31, #0a0b0d 72%);
    min-height: 100vh;
  }
  .radio {
    isolation: isolate;
    min-height: 0;
    height: min(840px, calc(100vh - 160px));
    border-radius: 46px;
    padding: 22px 22px 22px;
    box-shadow:
      0 0 0 2px #08090b,
      0 0 0 10px #2a2e35,
      0 0 0 12px #0d0e10,
      0 40px 90px rgba(0, 0, 0, .65),
      inset 0 1px 0 rgba(255, 255, 255, .09);
  }
  .radio::before {
    content: '';
    position: absolute;
    top: -104px;
    left: 54px;
    width: 38px;
    height: 112px;
    border-radius: 19px 19px 10px 10px;
    background: repeating-linear-gradient(180deg, #1b1d21 0 11px, #262a30 11px 13px);
    box-shadow: inset 0 0 0 2px #0b0c0e, 0 10px 30px rgba(0, 0, 0, .5);
    z-index: -1;
  }
}

.head { display: flex; align-items: center; gap: 10px; padding: 0 4px; min-height: 22px; }
.brand {
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .3em;
  color: #c3c9d1;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .07);
}
.brand b { color: var(--accent); font-weight: 900; }
.spacer { flex: 1; }
.model { font-size: 11px; font-weight: 800; letter-spacing: .18em; color: #6d757f; }
.led {
  width: 12px; height: 12px; border-radius: 50%;
  background: #3b1f1c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7), 0 0 0 2px rgba(0, 0, 0, .35);
  transition: background .15s, box-shadow .15s;
}
.pwr {
  width: 34px; height: 34px;
  margin: -4px -4px -4px 2px;
  padding: 0;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  color: #9aa2ac;
  background: linear-gradient(180deg, #353940, #24272c);
  box-shadow: 0 2px 0 #111316, inset 0 1px 0 rgba(255, 255, 255, .1);
  touch-action: manipulation;
  transition: background .15s, color .15s, box-shadow .15s;
}
.pwr svg { width: 16px; height: 16px; }
.pwr:active { transform: translateY(1px); }
.pwr.armed { color: #fff; background: linear-gradient(180deg, #ff5a4f, #d22d23); box-shadow: 0 0 16px rgba(255, 59, 48, .65); }
.led.on { background: #24502b; }
.led.tx { background: var(--tx); box-shadow: 0 0 14px 3px rgba(255, 59, 48, .8), 0 0 0 2px rgba(0, 0, 0, .35); }
.led.rx { background: var(--rx); box-shadow: 0 0 14px 3px rgba(48, 209, 88, .75), 0 0 0 2px rgba(0, 0, 0, .35); }

/* ---------- LCD ---------- */
.lcd {
  position: relative;
  margin: 6px 6px 2px;
  padding: 10px 14px 11px;
  border-radius: 14px;
  color: var(--seg);
  background: linear-gradient(180deg, var(--lcd-a), var(--lcd-b));
  box-shadow:
    inset 0 2px 7px rgba(0, 0, 0, .5),
    inset 0 0 0 1px rgba(0, 0, 0, .35),
    0 0 0 6px #0c0d0f,
    0 0 0 7px rgba(255, 255, 255, .07);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", "Droid Sans Mono", monospace;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background .4s, box-shadow .4s;
  outline: none;
}
.lcd.lit {
  background: linear-gradient(180deg, var(--lcd-lit-a), var(--lcd-lit-b));
  box-shadow:
    inset 0 2px 7px rgba(0, 0, 0, .3),
    inset 0 0 0 1px rgba(0, 0, 0, .3),
    0 0 0 6px #0c0d0f,
    0 0 0 7px rgba(255, 255, 255, .07),
    0 0 34px rgba(190, 240, 110, .22);
}
.lcd.off { background: linear-gradient(180deg, #5d6a4b, #525d42); }
.lcd.off > * { opacity: .55; }
.lcd::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(255, 255, 255, .24), transparent 36%);
  pointer-events: none;
}
.lcd:focus-visible { box-shadow: 0 0 0 6px #0c0d0f, 0 0 0 9px var(--accent); }

.lcd-top { display: flex; align-items: center; gap: 9px; height: 16px; font-size: 11px; font-weight: 800; }
.sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.sig i { width: 4px; border-radius: 1px; background: currentColor; opacity: .1; }
.sig i:nth-child(1) { height: 4px; }
.sig i:nth-child(2) { height: 7px; }
.sig i:nth-child(3) { height: 10px; }
.sig i:nth-child(4) { height: 13px; }
.sig i.on { opacity: .9; }
.ind { padding: 1px 4px; border-radius: 3px; letter-spacing: .05em; opacity: .1; line-height: 1.15; }
.ind.on { opacity: .9; }
#indTx.on { opacity: 1; background: var(--seg); color: var(--lcd-lit-a); }
.ind-ic { display: inline-grid; place-items: center; padding: 0 2px; }
.ind-ic svg { width: 12px; height: 12px; fill: currentColor; }
.ppl { display: inline-flex; align-items: center; gap: 3px; }
.ppl svg { width: 12px; height: 12px; fill: currentColor; }
.clock { letter-spacing: .04em; }
.bat { position: relative; width: 22px; height: 11px; padding: 1.5px; border: 1.6px solid currentColor; border-radius: 3px; }
.bat::after { content: ''; position: absolute; right: -4.5px; top: 2.5px; width: 2.5px; height: 3.5px; border-radius: 0 1px 1px 0; background: currentColor; }
.bat i { display: block; height: 100%; border-radius: 1px; background: currentColor; }
.bat.low { animation: blink .8s steps(2) infinite; }

.lcd-mid { display: flex; align-items: center; gap: 8px; margin: 7px 0 3px; }
.ch-tag { align-self: flex-start; margin-top: 9px; font-size: 16px; font-weight: 900; letter-spacing: .02em; }
.seg { height: 76px; width: auto; flex: none; }
.seg polygon { fill: currentColor; opacity: .07; }
.seg polygon.on { opacity: 1; }
.lcd-side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 11px; font-weight: 800; }

.lcd-text {
  height: 21px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vu { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 8px; margin-top: 6px; }
.vu i { border-radius: 1px; background: currentColor; opacity: .09; }
.vu i.on { opacity: .85; }

/* ---------- бутони за канал ---------- */
.keys { display: grid; grid-template-columns: 66px 1fr 66px; gap: 10px; }
.key {
  height: 52px;
  border: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: #d8dce2;
  background: linear-gradient(180deg, #3b4048, #2a2e34);
  box-shadow: 0 4px 0 #141619, 0 7px 14px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .11);
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  transition: transform .06s, box-shadow .06s;
}
.key svg { width: 24px; height: 24px; flex: none; }
.key-wide svg { width: 18px; height: 18px; color: var(--accent); }
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 #141619, 0 2px 6px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); }
.key:disabled { opacity: .45; }

/* ---------- решетка на високоговорителя + голям бутон ---------- */
.stage {
  --lvl: 0;
  --glow: transparent;
  position: relative;
  flex: 1 1 auto;
  min-height: calc(var(--ptt) + 36px);
  display: grid;
  place-items: center;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(0, 0, 0, .62) 0 1.8px, transparent 2.4px) 0 0 / 11px 11px,
    linear-gradient(180deg, #1b1e22, #141619);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .05);
}
.stage::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, var(--glow), transparent 68%);
  opacity: calc(var(--lvl) * 1.3);
  pointer-events: none;
}
/* − / + за силата на гласа — в долните ъгли на решетката */
.vol {
  position: absolute;
  bottom: 12px;
  z-index: 1;
  width: 50px; height: 50px;
  padding: 0;
  border: 0; border-radius: 50%;
  display: grid; place-items: center;
  color: #dce0e5;
  background: radial-gradient(circle at 50% 32%, #4a4f57, #2b2e34 72%);
  box-shadow: 0 4px 0 #0f1113, 0 7px 14px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .13);
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform .06s, box-shadow .06s, color .2s;
}
.vol svg { width: 25px; height: 25px; }
.vol:active { transform: translateY(3px); box-shadow: 0 1px 0 #0f1113, 0 2px 6px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08); }
.vol:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vol-dn { left: 12px; }
.vol-up { right: 12px; }
.radio.is-boost .vol-up { color: var(--accent); box-shadow: 0 4px 0 #0f1113, 0 0 16px rgba(255, 122, 26, .45), inset 0 1px 0 rgba(255, 255, 255, .13); }
.field .val { margin-left: 6px; color: var(--text); font-weight: 800; }
.radio.is-rx .stage { --glow: rgba(48, 209, 88, .38); }
.radio.is-tx .stage { --glow: rgba(255, 59, 48, .36); }

.ptt {
  position: relative;
  width: var(--ptt);
  height: var(--ptt);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  outline: none;
}
.ptt-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--accent-hi), var(--accent) 20%, var(--accent-lo) 46%, #ff8a33 72%, var(--accent-hi));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, .62),
    0 0 0 7px rgba(0, 0, 0, .38),
    inset 0 2px 3px rgba(255, 255, 255, .45),
    inset 0 -5px 9px rgba(0, 0, 0, .35);
  transition: filter .2s, box-shadow .2s;
}
.ptt:focus-visible .ptt-ring { box-shadow: 0 0 0 4px #fff, 0 16px 34px rgba(0, 0, 0, .62); }
.ptt-face {
  position: absolute; inset: 10%;
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(var(--ptt) * .018);
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #4a4f58, #25282d 62%, #1a1c20);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .13), inset 0 -11px 20px rgba(0, 0, 0, .55), 0 4px 0 rgba(0, 0, 0, .5);
  transition: transform .08s ease, background .25s;
}
.ptt-face::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .045) 0 1.5px, transparent 1.5px 8px);
}
.ptt-icon { position: relative; width: 26%; height: auto; color: var(--accent); }
.ic-spk { display: none; }
.ptt-label {
  position: relative;
  font-weight: 900;
  font-size: calc(var(--ptt) * .1);
  letter-spacing: .12em;
  color: #f4f6f8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.ptt-sub {
  position: relative;
  max-width: 76%;
  font-size: calc(var(--ptt) * .058);
  color: #aab2bb;
  letter-spacing: .03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ptt.is-tx .ptt-ring {
  filter: hue-rotate(-26deg) saturate(1.35);
  box-shadow: 0 0 0 9px rgba(255, 59, 48, .2), 0 0 60px rgba(255, 59, 48, .55), inset 0 2px 3px rgba(255, 255, 255, .45);
}
.ptt.is-tx .ptt-face {
  transform: translateY(3px) scale(.972);
  background: radial-gradient(circle at 50% 30%, #95231a, #4e0e09 62%, #330804);
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .12), inset 0 -10px 18px rgba(0, 0, 0, .4);
}
.ptt.is-tx .ptt-icon { color: #fff; }
.ptt.is-tx .ptt-sub { color: #ffc9c4; }
.ptt.is-tx::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 3px solid rgba(255, 59, 48, .75);
  animation: ring 1.1s ease-out infinite;
  pointer-events: none;
}
.ptt.is-rx .ptt-ring { background: conic-gradient(from 210deg, #8dffab, var(--rx) 22%, #11802f 48%, #3ee066 72%, #8dffab); }
.ptt.is-rx .ic-mic { display: none; }
.ptt.is-rx .ic-spk { display: block; color: var(--rx); }
.ptt.is-rx .ptt-sub { color: #b8f3c8; }
.ptt.is-off .ptt-ring { filter: grayscale(1) brightness(.5); }
.ptt.is-off .ptt-icon { color: #6b7179; }
.ptt.is-off .ptt-label { color: #9097a0; }
.ptt.is-nomic .ptt-ring { filter: grayscale(.7) brightness(.75); }
.ptt.is-nomic .ptt-icon { color: #ffcc66; }
.ptt.shake { animation: shake .42s; }

@keyframes ring { from { transform: scale(.97); opacity: .9; } to { transform: scale(1.17); opacity: 0; } }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
@keyframes blink { from { opacity: 1; } to { opacity: .25; } }

/* ---------- хората в канала ---------- */
.members {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 7px;
  min-height: 32px; max-height: 74px; overflow-y: auto;
  scrollbar-width: none;
}
.members::-webkit-scrollbar { display: none; }
.chip {
  max-width: 46vw;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: #cfd4da;
  background: #262a30;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip.me { color: #ffd6b8; box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .5); }
.chip.talking { color: #c3f7d1; background: rgba(48, 209, 88, .15); box-shadow: inset 0 0 0 1px rgba(48, 209, 88, .7); }
.chip.talking.me { color: #ffd0cc; background: rgba(255, 59, 48, .16); box-shadow: inset 0 0 0 1px rgba(255, 59, 48, .7); }
.chip.talking::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--rx);
  vertical-align: 1px;
  animation: blink .6s infinite alternate;
}
.chip.talking.me::before { background: var(--tx); }
.members .hint { font-size: 13px; color: #6f7780; align-self: center; }

/* ---------- долни бутони ---------- */
.dock { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dock-btn {
  height: 50px;
  border: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 14px;
  color: #dfe3e8;
  background: #23272d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  touch-action: manipulation;
}
.dock-btn svg { width: 19px; height: 19px; color: var(--accent); flex: none; }
.dock-btn:active { background: #2d3239; }

/* ---------- съобщения ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  z-index: 70;
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 14px; font-weight: 600; text-align: center;
  color: #f3f5f7;
  background: rgba(22, 24, 28, .95);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .09);
  transform: translate(-50%, -24px);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s, opacity .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.resume {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
  z-index: 65;
  max-width: 420px;
  margin: 0 auto;
  padding: 15px;
  border: 0;
  border-radius: 14px;
  font-size: 15px; font-weight: 800;
  color: #1f1800;
  background: #ffcc00;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
}

/* ---------- плъзгащи се панели ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet:not(.open) { pointer-events: none; } /* докато се затваря, не пречи на докосванията */
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .58); opacity: 0; transition: opacity .22s; }
.sheet-panel {
  position: absolute;
  left: 50%; bottom: 0;
  width: 100%; max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 10px 18px calc(env(safe-area-inset-bottom, 0px) + 20px);
  border-radius: 22px 22px 0 0;
  background: var(--sheet);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .5);
  transform: translate(-50%, 100%);
  transition: transform .24s ease;
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: translate(-50%, 0); }
.grabber { width: 42px; height: 5px; margin: 0 auto 10px; border-radius: 3px; background: rgba(255, 255, 255, .18); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-head h2 { margin: 0; font-size: 19px; }
.x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #2c3138; font-size: 15px; color: #c9ced5; }
.sheet-sub { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); }

.chgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.chbtn {
  position: relative;
  aspect-ratio: 1;
  border: 0;
  border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: #2a2f36;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.chbtn b { font-size: 23px; font-weight: 900; line-height: 1.05; }
.chbtn small { font-size: 10.5px; color: #8a929c; }
.chbtn.busy small { color: #ffcfa8; }
.chbtn.cur { background: linear-gradient(180deg, #ff9140, #e46300); color: #1d0d00; box-shadow: 0 6px 18px rgba(228, 99, 0, .35); }
.chbtn.cur small { color: rgba(29, 13, 0, .78); }
.chbtn.live::after {
  content: '';
  position: absolute; top: 8px; right: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--rx);
  box-shadow: 0 0 9px var(--rx);
  animation: blink .7s infinite alternate;
}

.field { display: block; margin: 14px 0; }
.field > span { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); cursor: pointer; }
.row > span { font-weight: 650; }
.row small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.switch {
  -webkit-appearance: none; appearance: none;
  position: relative; flex: none;
  width: 50px; height: 30px; margin: 0;
  border-radius: 15px;
  background: #3a3f47;
  transition: background .2s;
  cursor: pointer;
}
.switch::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .35);
  transition: transform .2s;
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.text-in {
  width: 100%; height: 48px;
  padding: 0 14px;
  border: 0; border-radius: 12px;
  font: inherit; font-size: 16px;
  color: var(--text);
  background: var(--field);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
  outline: none;
}
.text-in:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.text-in.err { box-shadow: inset 0 0 0 2px var(--tx); animation: shake .42s; }
.seg-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: var(--field); }
.seg-ctl button { height: 40px; border: 0; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--muted); background: transparent; }
.seg-ctl button.on { color: var(--text); background: #40464f; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
input[type=range] { width: 100%; height: 30px; margin: 0; accent-color: var(--accent); }
.btn-sec { width: 100%; height: 48px; margin-top: 10px; border: 0; border-radius: 12px; font-weight: 700; background: #2c3138; }
.btn-sec:active { background: #353b43; }
.about { margin: 14px 0 0; font-size: 12.5px; color: #78808a; text-align: center; }

/* ---------- екран „включи“ ---------- */
.power {
  position: fixed; inset: 0;
  z-index: 80;
  display: grid; place-items: center;
  padding: 24px 20px;
  background: radial-gradient(circle at 50% 18%, rgba(255, 122, 26, .2), transparent 55%), rgba(9, 10, 12, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: opacity .35s;
}
.power.gone { opacity: 0; pointer-events: none; }
.power-card { width: 100%; max-width: 360px; text-align: center; }
.power-logo { display: block; width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 26px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55); }
.power h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: .01em; }
.power p { margin: 0 0 20px; color: var(--muted); }
.power-btn {
  width: 100%; height: 58px;
  margin-top: 12px;
  border: 0; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 900; font-size: 18px; letter-spacing: .08em;
  color: #1f0f00;
  background: linear-gradient(180deg, #ff9443, #e86400);
  box-shadow: 0 6px 0 #8a3c00, 0 14px 26px rgba(232, 100, 0, .35);
  transition: transform .06s, box-shadow .06s;
}
.power-btn svg { width: 22px; height: 22px; }
.power-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #8a3c00, 0 6px 14px rgba(232, 100, 0, .3); }
.key-row { margin-top: 10px; }
.power-sec {
  width: 100%; height: 50px;
  margin-top: 12px;
  border: 0; border-radius: 14px;
  font-weight: 800; font-size: 15px;
  color: #ffd6b8;
  background: rgba(255, 122, 26, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .45);
}
.power-sec:active { background: rgba(255, 122, 26, .2); }
.mini-btn {
  flex: none; height: 38px; padding: 0 14px;
  border: 0; border-radius: 10px;
  font-weight: 800; font-size: 13.5px;
  color: #1f0f00;
  background: linear-gradient(180deg, #ff9443, #e86400);
}
.mini-btn:active { transform: translateY(1px); }
.nchips { padding: 0 0 14px; }
.nchips-lbl { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.nchips-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.nchip {
  height: 40px; padding: 0;
  border: 0; border-radius: 10px;
  font-weight: 900; font-size: 15px;
  color: var(--muted);
  background: #2a2f36;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.nchip.on { color: #1d0d00; background: linear-gradient(180deg, #ff9140, #e46300); box-shadow: none; }
.power-ch { margin-top: 16px; font-weight: 700; color: #ffcfa8; }
.power-hint { margin-top: 8px; font-size: 13px; color: var(--muted); }
.power-hint.warn { color: #ffd27a; }

/* ---------- ниски екрани ---------- */
@media (max-height: 680px) {
  .radio { gap: 9px; }
  .lcd { padding: 8px 12px 9px; }
  .seg { height: 60px; }
  .lcd-mid { margin: 4px 0 2px; }
  .key { height: 46px; }
  .dock-btn { height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .ptt.is-tx::after, .chip.talking::before, .chbtn.live::after { animation: none; }
}
