:root[data-skin=mesa] {
  --k-bg: #100b09;
  --k-scr: #110d0b;
  --k-text: #f7e4cf;
  --k-dim: #d5b89d;
  --k-digits: #ffe9cc;
  --k-acc: #ffc084;
  --k-hi: #ffebc8;
  --k-glow: #f58d4b80;
  --k-soft: #f58d4b37;
  --k-line: #694630;
}

:root[data-skin=mesa] .radio {
  container-type: size;
  align-items: center;
  overflow: hidden auto;
  scrollbar-width: none;
  background: #100b09;
}

:root[data-skin=mesa] .mesa-console {
  --mesa-safe: max(0px, calc(env(safe-area-inset-top, 0px) - 34px));
  --mesa-y: calc((100cqh - var(--mesa-safe)) / 1536);
  container-type: inline-size;
  width: min(100%, 460px);
  padding-top: var(--mesa-safe);
  flex: none;
  color: var(--k-text);
  background: #171410;
}

/* Each plate is cut on a housing seam. The controls are laid out in the
   same coordinates as their artwork, with height floors for short screens. */
:root[data-skin=mesa] .radio .mesa-console > :is(.head, .mesa-display, .mesa-talk, .mesa-presets, .mesa-menu) {
  position: relative;
  display: block;
  height: var(--mesa-height);
  margin: 0;
  padding: 0;
  background: var(--mesa-plate) center / 100% 100% no-repeat;
}

:root[data-skin=mesa] .mesa-console > .head {
  --mesa-height: max(114px, calc(264 * var(--mesa-y)));
  --mesa-plate: url(../img/walkies/mesa/head.webp);
}

:root[data-skin=mesa] .mesa-console .head > :is(.iconbtn, .chanbtn) {
  position: absolute;
  top: 52%;
  left: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 12.2%;
  height: 28%;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: none;
  box-shadow: none;
  color: var(--k-text);
}

:root[data-skin=mesa] .mesa-console .head > .iconbtn:first-child { left: 11.4%; }
:root[data-skin=mesa] .mesa-console .head > .iconbtn:last-child { left: 88.4%; }
:root[data-skin=mesa] .mesa-console .head > .chanbtn { width: 47%; height: 50%; }
:root[data-skin=mesa] .mesa-console .head .rlogo { display: none; }
:root[data-skin=mesa] .mesa-console .head .icon svg { width: clamp(19px, 6.3cqw, 29px); height: auto; }
:root[data-skin=mesa] .mesa-console .head > .iconbtn:last-child circle { fill: currentColor; stroke: none; }

:root[data-skin=mesa] .mesa-console > .mesa-display {
  --mesa-height: max(249px, calc(579 * var(--mesa-y)));
  --mesa-plate: url(../img/walkies/mesa/display.webp);
}

:root[data-skin=mesa] .mesa-display-top {
  position: absolute;
  z-index: 1;
  inset: 14.35% 13.4% auto 12.8%;
  translate: 0 -50%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 2.8cqw;
}
:root[data-skin=mesa] .mesa-display-top > .icon svg { width: clamp(19px, 6cqw, 28px); height: auto; }
:root[data-skin=mesa] .mesa-channel {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 500 clamp(11px, 3cqw, 16px)/1.2 var(--font);
}
:root[data-skin=mesa] .mesa-count-button {
  display: inline-flex;
  align-items: center;
  gap: 1.45cqw;
  min-height: 40px;
  padding: 0 1.5cqw;
  flex: none;
  font-size: clamp(11px, 3cqw, 16px);
}
:root[data-skin=mesa] .mesa-count-button .icon svg { width: clamp(16px, 4.8cqw, 24px); height: auto; }
:root[data-skin=mesa] .mesa-display .lcdright { position: relative; margin-left: 1.4cqw; }
:root[data-skin=mesa] .mesa-display .lcdsig { height: auto; gap: .48cqw; }
:root[data-skin=mesa] .mesa-display .lcdsig i { width: .78cqw; border-radius: 4px; background: #4d3727; }
:root[data-skin=mesa] .mesa-display .lcdsig i:nth-child(1) { height: 1.5cqw !important; }
:root[data-skin=mesa] .mesa-display .lcdsig i:nth-child(2) { height: 2.45cqw !important; }
:root[data-skin=mesa] .mesa-display .lcdsig i:nth-child(3) { height: 3.35cqw !important; }
:root[data-skin=mesa] .mesa-display .lcdsig i:nth-child(4) { height: 4.3cqw !important; }
:root[data-skin=mesa] .mesa-display .lcdsig i.on { background: #ffc68e; box-shadow: 0 0 5px #ff934360; }
:root[data-skin=mesa] .mesa-display .lamp {
  position: absolute;
  inset: calc(100% + 3px) 0 auto auto;
  padding: 0 4px;
  font-size: 9px;
  line-height: 12px;
}
:root[data-skin=mesa] .mesa-display .lamp.tx { background: #5d3015; color: #fff0c4; box-shadow: 0 0 6px #ff9d5470; }
:root[data-skin=mesa] .mesa-display .lamp.rx { background: #41301a; color: #ffdaa5; box-shadow: 0 0 6px #eab86870; }
:root[data-skin=mesa] .mesa-display .lamp:not(.tx, .rx) { display: none; }

:root[data-skin=mesa] .mesa-display .lcdbox {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  pointer-events: none;
}
:root[data-skin=mesa] .mesa-display .lcdbot { display: none; }
:root[data-skin=mesa] .mesa-display .lcd {
  position: absolute;
  inset: 23% 9% auto;
  width: auto;
  height: 18%;
  min-height: 44px;
  padding: 0;
  pointer-events: auto;
}
:root[data-skin=mesa] .mesa-readout {
  width: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2.25cqw;
  padding-left: 7%;
}
:root[data-skin=mesa] .mesa-readout .lcdfreq {
  width: 63%;
  min-width: 0;
  height: auto;
  margin: 0;
  color: var(--k-digits);
  font: 600 clamp(15px, 6cqw, 37px)/1.12 var(--k-digit-font);
  text-align: center;
  text-shadow: 0 0 10px #f4975980;
}
:root[data-skin=mesa] .mesa-readout .lcdfreq.word { width: 100%; }
:root[data-skin=mesa] .mesa-display .lcdbox.none .lcdfreq { color: #b78a6b; }
:root[data-skin=mesa] .mesa-segments { display: block; line-height: 0; }
:root[data-skin=mesa] .mesa-segments svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 6px #e98248); }
:root[data-skin=mesa] .mesa-unit { flex: none; padding-bottom: .25cqw; font: 500 clamp(12px, 3.55cqw, 18px)/1 var(--font); }

:root[data-skin=mesa] .mesa-display .lcdart {
  position: absolute;
  inset: 62.35% 11.75% auto 11.88%;
  height: 17.27%;
  margin: 0;
}
:root[data-skin=mesa] .mesa-display .lcdart::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url(../img/walkies/mesa/idle-wave.webp) center / 100% 100% no-repeat;
}
:root[data-skin=mesa] .radio[data-air]:not([data-air=""]) .mesa-display .lcdart::before { visibility: hidden; }
:root[data-skin=mesa] .mesa-display .lwave {
  --wave-style: mesa;
  color: #ffc58b;
  filter: drop-shadow(0 0 3px #ff8b4c);
}
:root[data-skin=mesa] .mesa-display .deaf {
  position: absolute;
  z-index: 1;
  inset: 62% 11.5% auto;
  width: auto;
  padding: 3px 6px;
  border-radius: 7px;
  background: #241609e8;
  color: #ffd8b5;
  text-align: center;
  pointer-events: auto;
}

:root[data-skin=mesa] .mesa-display .airline {
  position: absolute;
  inset: 80.4% 9.6% auto;
  display: grid;
  grid-template-columns: minmax(0, 25fr) minmax(0, 45fr) minmax(0, 25fr);
  gap: 2%;
  width: auto;
  height: 10.6%;
  min-height: 28px;
  align-items: stretch;
}
:root[data-skin=mesa] .mesa-display .airline::before,
:root[data-skin=mesa] .mesa-display .airline .wave { display: none; }
:root[data-skin=mesa] .mesa-display .airtext {
  display: grid;
  align-content: center;
  position: relative;
  padding: 0 .4cqw 0 7.8cqw;
}
:root[data-skin=mesa] .mesa-display .airtext::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3.5cqw;
  width: clamp(6px, 2.5cqw, 13px);
  aspect-ratio: 1;
  translate: 0 -50%;
  border-radius: 50%;
  background: #7ff14e;
  box-shadow: 0 0 8px #52c93aa6;
}
:root[data-skin=mesa] .mesa-display .airtext:is(.wait, .turn)::before { background: #ffbe67; box-shadow: 0 0 8px #ff8b42; }
:root[data-skin=mesa] .mesa-display .airtext:is(.tx, .rx)::before { background: #8af849; box-shadow: 0 0 9px #77e54c; }
:root[data-skin=mesa] .mesa-display .airtext:is(.err, .busy)::before { background: #f38475; box-shadow: 0 0 6px #f074626a; }
:root[data-skin=mesa] .mesa-display .airtext.standby::before { background: #8f785c; box-shadow: none; }
:root[data-skin=mesa] .mesa-display .airline :is(.wstatus, .actlbl, .btn.replay) {
  color: var(--k-text);
  font: 600 clamp(7.5px, 2.16cqw, 13px)/1.12 var(--font);
  letter-spacing: 0;
  text-transform: uppercase;
}
:root[data-skin=mesa] .mesa-display .airline :is(.wstatus, .actlbl) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:root[data-skin=mesa] .mesa-display .airline .wsub {
  margin: 1px 0 0;
  color: var(--k-dim);
  font: 500 clamp(7px, 1.65cqw, 10px)/1 var(--mono);
}
:root[data-skin=mesa] .mesa-display .airline .wsub:empty { display: none; }
:root[data-skin=mesa] .mesa-display .airline :is(.action, .btn.replay) {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 1.2cqw, 7px);
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 .6cqw;
  border: 0;
  border-radius: 18px;
  color: var(--k-text);
  background: none;
  box-shadow: none;
}
:root[data-skin=mesa] .mesa-display .airline :is(.action, .btn.replay):disabled { opacity: .47; }
:root[data-skin=mesa] .mesa-display .airline .action .iconbtn {
  flex: none;
  width: auto;
  height: auto;
  border: 0;
  color: inherit;
  background: none;
  box-shadow: none;
}
:root[data-skin=mesa] .mesa-display .airline :is(.action, .replay) .icon svg { width: clamp(13px, 4cqw, 23px); height: auto; }
:root[data-skin=mesa] .mesa-display .airline .unavail:not(:empty) {
  position: absolute;
  z-index: 1;
  bottom: calc(100% + 3px);
  right: 0;
  justify-content: flex-end;
  max-width: 100%;
}
:root[data-skin=mesa] .mesa-display .airline .unavail .btn { min-height: 34px; height: auto; white-space: normal; }
:root[data-skin=mesa] .mesa-display .airline .unavail .qfix { flex-shrink: 1; }

:root[data-skin=mesa] .mesa-console > .mesa-talk {
  --mesa-height: max(155px, calc(327 * var(--mesa-y)));
  --mesa-plate: url(../img/walkies/mesa/talk.webp);
}
:root[data-skin=mesa] .radio .mesa-talk .stage {
  position: absolute;
  inset: 0;
  display: block;
  min-height: 0;
  padding: 0;
}
:root[data-skin=mesa] .radio .mesa-talk .ptt-wrap {
  position: absolute;
  inset: 9% 30% 12%;
  display: block;
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  container-type: normal;
}
:root[data-skin=mesa] .radio .mesa-talk .ptt {
  isolation: isolate;
  display: grid;
  grid-template-rows: 52% 48%;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  justify-items: center;
  gap: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #ffe4b2;
  background: none;
  box-shadow: none;
  transform: none;
}
:root[data-skin=mesa] .radio .mesa-talk .ptt::before {
  z-index: -1;
  inset: 0;
  border: 0;
  background: radial-gradient(ellipse at 50% 69%, #ff8e2509 50%, #ff8e254a 75%, #ffbb5c65 89%, #ff972b21);
  opacity: 0;
  animation: none;
  transition: opacity .2s ease;
}
:root[data-skin=mesa] .radio .mesa-talk .ptt[data-held]::before { opacity: .43; }
:root[data-skin=mesa] .radio .mesa-talk .ptt[data-state=transmitting]::before {
  opacity: 1;
  animation: mesa-underlight 2.2s ease-in-out infinite;
}
:root[data-skin=mesa] .radio .mesa-talk .ptt > .icon {
  display: inline-grid;
  color: inherit;
  filter: drop-shadow(0 0 6px #f9ac5f85);
}
:root[data-skin=mesa] .radio .mesa-talk .ptt > .icon svg {
  width: clamp(32px, 13.4cqw, 68px);
  height: clamp(32px, calc(94 * var(--mesa-y)), 68px);
  stroke-width: 1.25;
}
:root[data-skin=mesa] .radio .mesa-talk .ptt .lbl {
  align-self: start;
  display: block;
  margin-top: 2.3cqw;
  max-width: 88%;
  color: #ffedde;
  font: 500 clamp(9px, 3.03cqw, 15px)/1.14 var(--font);
  letter-spacing: .13em;
  text-wrap: balance;
}
:root[data-skin=mesa] .radio .mesa-talk .ptt[data-state=idle] .lbl { white-space: pre-line; }
:root[data-skin=mesa] .radio .mesa-talk .ptt.face { grid-template-rows: 48% auto auto; align-content: center; }
:root[data-skin=mesa] .radio .mesa-talk .ptt.face .lsub { display: block; color: var(--k-dim); }
:root[data-skin=mesa] .radio .mesa-talk .ptt .pttface {
  width: clamp(25px, 10cqw, 55px) !important;
  height: clamp(25px, 10cqw, 55px) !important;
  border-color: #ffc680;
}
:root[data-skin=mesa] .radio .mesa-talk .ptt:disabled { opacity: .55; }
@keyframes mesa-underlight { 50% { opacity: .71; } }

:root[data-skin=mesa] .mesa-side {
  position: absolute;
  top: var(--key-y, 28.6%);
  left: var(--key-x, 15.15%);
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 18.25%;
  height: 27.4%;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  color: var(--k-text);
}
:root[data-skin=mesa] .mesa-side.sound, :root[data-skin=mesa] .mesa-side.invite { --key-y: 64%; }
:root[data-skin=mesa] .mesa-side.tune, :root[data-skin=mesa] .mesa-side.invite { --key-x: 84.85%; }
:root[data-skin=mesa] .mesa-side .icon svg { width: clamp(21px, 7.5cqw, 35px); height: auto; stroke-width: 1.38; }
:root[data-skin=mesa] .mesa-side:disabled,
:root[data-skin=mesa] .mesa-side.sound[aria-pressed=false] { opacity: .49; }
:root[data-skin=mesa] .mesa-side.voice[aria-pressed=true] { color: #ffcf93; }
:root[data-skin=mesa] .mesa-console button:not(:disabled):active:is(.mesa-side, .iconbtn, .action, .replay) {
  transform: none;
  background: #ffc49315;
}

:root[data-skin=mesa] .radio .mesa-console > .mesa-presets {
  --mesa-height: max(70px, calc(130 * var(--mesa-y)));
  --mesa-plate: url(../img/walkies/mesa/presets.webp);
  display: flex;
  align-items: center;
  padding: 0 4.75% 3.1%;
}
:root[data-skin=mesa] .mesa-preset-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 1;
  gap: 1.75cqw;
  min-width: 0;
}
:root[data-skin=mesa] .mesa-preset {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #efdeca;
  font: 600 clamp(9px, 2.8cqw, 15px)/1 var(--font);
}
:root[data-skin=mesa] .mesa-preset.on { color: #fff1d5; text-shadow: 0 0 7px #ef9d54; }
:root[data-skin=mesa] .mesa-preset.on::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 14% 0;
  border: 1px solid #ffc093;
  border-radius: 9px;
  background: radial-gradient(ellipse at 50% 95%, #ffa438a0, #d8774252 62%, #eda95530);
  box-shadow: inset 0 1px 2px #ffdeab99, inset 0 -3px 10px #ffb25f87, 0 0 8px #ec81379b;
}
:root[data-skin=mesa] .mesa-preset:disabled { color: #9a7e6b; }
:root[data-skin=mesa] .mesa-page-arrow {
  width: 10.8%;
  min-width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--k-text);
}
:root[data-skin=mesa] .mesa-page-arrow.prev .icon { transform: rotate(180deg); }
:root[data-skin=mesa] .mesa-page-arrow[aria-disabled=true] { opacity: .4; }

:root[data-skin=mesa] .radio .mesa-console > .mesa-menu {
  --mesa-height: max(111px, calc(236 * var(--mesa-y)));
  --mesa-plate: url(../img/walkies/mesa/menu.webp);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: 49.6%;
  padding: 1.4cqw 4.2% 0;
}
:root[data-skin=mesa] .mesa-menu .action {
  min-width: 0;
  min-height: 44px;
  width: 100%;
  height: 100%;
  gap: clamp(4px, 1.1cqw, 7px);
  justify-content: center;
  color: var(--k-text);
}
:root[data-skin=mesa] .mesa-menu .action.on { color: #ffd58b; }
:root[data-skin=mesa] .mesa-menu .action:disabled { opacity: .53; }
:root[data-skin=mesa] .mesa-menu .action .iconbtn {
  width: auto;
  height: auto;
  border: 0;
  color: inherit;
  background: none;
  box-shadow: none;
}
:root[data-skin=mesa] .mesa-menu .action .icon svg { width: clamp(19px, 6.7cqw, 32px); height: auto; stroke-width: 1.4; }
:root[data-skin=mesa] .mesa-menu .actlbl { font-size: clamp(9px, 2.8cqw, 14px); white-space: nowrap; }

:root[data-skin=mesa] .mesa-console button:focus-visible { outline: 2px solid #ffd29f; outline-offset: -3px; }
:root[data-skin=mesa] .mesa-console :is(.rbanner, .tipcard, .stcard.compact) { margin-bottom: 6px; }
/* The empty walkie: the chassis has no room for the help card (under it, it
   would be out of sight); the big key says SET FREQUENCY and the display
   says what to do. */
:root[data-skin=mesa] .radio > .howto { display: none; }
:root[data-skin=mesa] .radio > :is(.hint-line, .sfxbar) { width: 100%; max-width: 460px; flex: none; }

.skinpic.sp-mesa {
  background: url(../img/walkies/mesa/display.webp) center 53% / cover no-repeat #1b130c;
}
.skinpic.sp-mesa > :is(i, b, u) { display: none; }

@media (prefers-reduced-motion: reduce) {
  :root[data-skin=mesa] .radio .mesa-talk .ptt::before,
  :root[data-skin=mesa] .radio .mesa-talk .ptt .pttface { animation: none; transition: none; }
}

/* ---------------------------------------------------------- the interface colour on its pictures' lights
   While a colour is chosen (:root[data-tint], theme.js), the lights drawn
   in its pictures take it: a layer of the colour over each picture, cut to
   its lights (<picture>-lights.webp, made by tools/art-lights.py: the light
   pixels alone, the body round them left out) and blended in «color» (the
   picture's lightness, the colour's hue). In «Original» there is no layer:
   the pictures as drawn. */
:root[data-tint][data-skin=mesa] :is(.mesa-console > :is(.head, .mesa-display, .mesa-talk, .mesa-menu), .mesa-display .lcdart)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--tint-vivid);
  -webkit-mask: var(--ms-lights) center / 100% 100% no-repeat;
  mask: var(--ms-lights) center / 100% 100% no-repeat;
  mix-blend-mode: color;
}
:root[data-tint][data-skin=mesa] .mesa-console > .head { --ms-lights: url(../img/walkies/mesa/head-lights.webp); }
:root[data-tint][data-skin=mesa] .mesa-console > .mesa-display { --ms-lights: url(../img/walkies/mesa/display-lights.webp); }
:root[data-tint][data-skin=mesa] .mesa-console > .mesa-talk { --ms-lights: url(../img/walkies/mesa/talk-lights.webp); }
:root[data-tint][data-skin=mesa] .mesa-console > .mesa-menu { --ms-lights: url(../img/walkies/mesa/menu-lights.webp); }
:root[data-tint][data-skin=mesa] .mesa-display .lcdart { --ms-lights: url(../img/walkies/mesa/idle-wave-lights.webp); }
:root[data-tint][data-skin=mesa] .radio[data-air]:not([data-air=""]) .mesa-display .lcdart::after { visibility: hidden; }
