/* Mars game page. One deliberate dark look (space + rust). Final art comes in Stage 8.
   Layout: phone = globe with a bottom control bar; wide screen = globe + right control column. */
:root {
  --space: #0a0b10;
  --panel: #16130f;
  --panel-2: #221c16;
  --line: #3a2e24;
  --text: #f3e6d8;
  --muted: #b39d89;
  --accent: #e8743b;
  --danger: #ff6a55;
  --ok: #7fcf8a;
  --you: #408cff;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans CJK SC',
          'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans', 'Malgun Gothic', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--space); color: var(--text); font: 15px/1.4 var(--font);
  overflow: hidden; -webkit-tap-highlight-color: transparent; user-select: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: 0.4; cursor: default; }
[hidden] { display: none !important; }

#app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; height: 100%; }

/* Top bar: round, players, menu */
#bar {
  display: flex; align-items: center; gap: 10px;
  padding-block: 6px;
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
  background: var(--panel); border-bottom: 1px solid var(--line);
}
#round { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
#round .short { display: none; }
#chips { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.chip {
  flex: none; display: flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 12px;
  border: 1px solid var(--line); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chip.cur { border-color: var(--text); background: var(--panel-2); }
.chip.out { opacity: 0.4; text-decoration: line-through; }
.iconbtn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); padding: 8px; flex: none; }
.iconbtn svg { width: 100%; height: 100%; stroke: var(--text); stroke-width: 2; fill: none; stroke-linecap: round; }

/* Globe */
#stage { position: relative; min-height: 0; overflow: hidden; }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
#banner {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-radius: 20px;
  background: rgba(22, 19, 15, 0.92); border: 1px solid var(--line); white-space: nowrap;
}
#banner button { border: 0; border-radius: 14px; padding: 4px 12px; background: var(--accent); color: #1a0d05; font-weight: 600; }
#badge {
  position: absolute; top: 8px; left: 8px; z-index: 3; max-width: calc(100% - 16px);
  background: rgba(18, 15, 12, 0.9); border: 1px solid var(--line); border-radius: 14px; padding: 6px 8px 6px;
  font-size: 13px; box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
#badge .wl { display: flex; gap: 6px; }
#badge .wp { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 10px; background: rgba(255,255,255,0.05); }
#badge .ico { width: 26px; height: 26px; flex: none; }
#badge .wp div { display: flex; flex-direction: column; line-height: 1.1; }
#badge .wp b { font-size: 20px; font-variant-numeric: tabular-nums; }
#badge .wp span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
#badge .wp.neg span { color: var(--danger); font-weight: 600; }
#badge .wr { font-size: 11px; color: var(--muted); margin: 0 2px 4px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
#badge .warn { color: var(--danger); font-weight: 600; margin: 4px 2px 0; font-size: 12.5px; max-width: 290px; }
#badge .muted { color: var(--muted); }
#banner:not([hidden]) ~ #badge { top: 48px; }
#minimap {
  position: absolute; left: max(8px, env(safe-area-inset-left, 0px)); bottom: 8px;
  width: min(34vw, 200px); aspect-ratio: 2 / 1; max-width: 100%;
  border: 1px solid var(--line); border-radius: 6px; touch-action: none; background: var(--panel);
}
#zoom { position: absolute; right: max(8px, env(safe-area-inset-right, 0px)); bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
#zoom button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(22, 19, 15, 0.85); font-size: 20px; line-height: 1;
}

/* Controls */
#controls {
  display: flex; flex-direction: column; gap: 8px; background: var(--panel); border-top: 1px solid var(--line);
  padding-block: 8px calc(8px + env(safe-area-inset-bottom, 0px));
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
}
#msg { min-height: 2.8em; color: var(--muted); font-size: 14px; }
#msg.bad { color: var(--danger); }
#msg.good { color: var(--text); }
#actions { display: flex; gap: 8px; }
#actions[hidden] { display: none; }
.act {
  flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2);
}
.act .cost { color: var(--muted); font-variant-numeric: tabular-nums; }
#turnBtns { display: flex; gap: 8px; }
#turnBtns button { flex: 1; min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 600; }
#turnBtns .primary { background: var(--accent); color: #1a0d05; border: 0; flex: 2; }

/* Overlays */
.overlay {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 11, 16, 0.78); z-index: 20;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.overlay[hidden] { display: none; }
.card {
  width: min(360px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; text-align: center;
}
.card h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: 0.08em; text-transform: uppercase; text-wrap: balance; }
.card p { margin: 0; }
.card .tag { color: var(--muted); margin-bottom: 6px; }
.card .note { color: var(--muted); font-size: 13px; }
.card button, .card a {
  min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2);
  font-weight: 600; display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--text);
}
.card .primary { background: var(--accent); color: #1a0d05; border: 0; }
.card button[hidden] { display: none; }
#soundBtn .mute { display: none; }
#soundBtn[aria-pressed="false"] .wave { display: none; }
#soundBtn[aria-pressed="false"] .mute { display: inline; }
#soundBtn svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#soundBtn svg .spk { fill: currentColor; }
.help { max-height: calc(100vh - 32px); text-align: left; }
.help h1 { text-align: center; }
.helpBody { overflow-y: auto; max-height: min(60vh, 560px); padding-right: 4px; }
.helpBody h2 { font-size: 15px; margin: 12px 0 4px; color: var(--accent); }
.helpBody p { margin: 0; font-size: 14px; line-height: 1.45; }
#tut { position: absolute; left: 12px; right: 72px; bottom: 84px; z-index: 4; background: rgba(20, 17, 13, 0.94);
  border: 1px solid var(--accent); border-radius: 14px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0,0,0,0.45); }
#tut p { margin: 0 0 10px; font-size: 15px; line-height: 1.4; }
.tutBtns { display: flex; gap: 8px; justify-content: flex-end; }
.tutBtns button { min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 600; }
.tutBtns .primary { background: var(--accent); color: #1a0d05; border: 0; }
.tutBtns button[hidden] { display: none; }
@media (min-width: 900px) { #tut { left: 268px; right: auto; width: 380px; bottom: 16px; } }
.langRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.langRow select { flex: 1; max-width: 60%; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 0 10px; font: inherit; }
#updateBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  background: var(--accent); color: #1a0d05; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 700; box-shadow: 0 6px 24px rgba(0,0,0,0.5); max-width: calc(100% - 32px); }
.card { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
.about { text-align: left; font-size: 13px; color: var(--muted); }
.about summary { cursor: pointer; text-align: center; padding: 4px 0; }
.about p { margin: 6px 0 0; line-height: 1.45; }
.card .sublabel { font-size: 12px; color: var(--muted); margin-top: -4px; }
.missions { display: flex; flex-direction: column; gap: 6px; max-height: min(60vh, 520px); overflow-y: auto; }
.card .missions button { justify-content: space-between; padding: 0 14px; text-align: left; gap: 10px; }
.missions .st { color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.missions .won .st { color: #7fd49a; }
.card .missions button:disabled { opacity: 0.45; }
.brief { text-align: left; }
.brief h1 { text-align: left; font-size: 22px; }
.brief dl { margin: 4px 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.brief dt { color: var(--muted); }
.brief dd { margin: 0; }
#goal { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); max-width: calc(100% - 32px);
  background: rgba(20, 17, 13, 0.82); border: 1px solid var(--accent); color: var(--text); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 3; pointer-events: none; }
@media (max-width: 560px) { #goal { top: auto; bottom: 84px; left: 16px; transform: none; max-width: calc(100% - 96px); } }
.card .label { margin-top: 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.card .seg button { margin: 0; padding: 10px 4px; }
.card .seg button[aria-checked="true"] { border-color: var(--accent); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
#startScreen { background: radial-gradient(ellipse at 50% 40%, rgba(232, 116, 59, 0.18), rgba(10, 11, 16, 0.85) 70%); }

/* Wide screens: controls become a right column */
@media (min-width: 900px) {
  #app { grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; }
  #bar { grid-column: 1 / -1; }
  #controls { grid-column: 2; grid-row: 2; border-top: 0; border-left: 1px solid var(--line); justify-content: flex-end; }
  #msg { min-height: 0; flex: 1; }
  #actions { flex-direction: column; }
  #minimap { width: 240px; }
  #badge { max-width: 300px; font-size: 14px; }
}
/* Narrow phones: AI chips show only colour and cell count */
@media (max-width: 430px) {
  .chip:not(.you) .nm { display: none; }
  #round .long { display: none; }
  #round .short { display: inline; }
  #bar { gap: 8px; }
  .chip { padding: 3px 7px; }
}
@media (max-width: 380px) {
  #bar { gap: 5px; padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px)); }
  #chips { gap: 4px; }
  .chip { padding: 3px 5px; gap: 4px; }
  .iconbtn { width: 36px; height: 36px; padding: 7px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Stage 11: home screen, quick game, settings, campaign cards ---------- */
body.home #bar, body.home #controls, body.home #badge, body.home #minimap, body.home #zoom,
body.home #goal, body.home #tut, body.home #banner { display: none !important; }
body.home #app { grid-template-rows: minmax(0, 60%) 1fr; }
body.home #stage { margin-top: var(--homeTop, 92px); }
#startScreen.home { background: none; pointer-events: none; flex-direction: column; justify-content: space-between; align-items: stretch;
  padding-top: max(14px, env(safe-area-inset-top, 0px)); padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
#startScreen.home > * { pointer-events: auto; }
.homeGear { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  background: rgba(22, 19, 15, 0.7); }
.homeTop { text-align: center; pointer-events: none !important; padding: 6px 16px 0; }
.homeTop .logo { padding: 0 44px; }
.logo { margin: 0; font-size: clamp(28px, 8vw, 44px); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800;
  background: linear-gradient(180deg, #fff3e4 10%, #f0a46a 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 18px rgba(232, 116, 59, 0.25); }
.homeTop .tag { margin: 4px auto 0; max-width: 30em; color: var(--muted); font-size: 13.5px; line-height: 1.35; text-wrap: balance; }
.homePanel { width: min(480px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 10px;
  padding: 18px 0 0; background: linear-gradient(180deg, rgba(10, 11, 16, 0) 0, rgba(10, 11, 16, 0.92) 26px); }
.newHere { align-self: center; margin: 0 0 -2px; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #1a0d05; background: #ffd27a; }
.play { min-height: 68px; border: 0; border-radius: 16px; background: var(--accent); color: #1a0d05;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 16px;
  box-shadow: 0 8px 28px rgba(232, 116, 59, 0.28); }
.play .pl { font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
.play .ps { font-size: 13px; font-weight: 600; opacity: 0.8; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play.glow { animation: playGlow 1.8s ease-in-out infinite; }
@keyframes playGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 122, 0.55); } 50% { box-shadow: 0 0 0 8px rgba(255, 210, 122, 0); } }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { min-height: 96px; border-radius: 14px; border: 1px solid var(--line); background: rgba(34, 28, 22, 0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 10px 6px; text-align: center; }
.tile svg { width: 28px; height: 28px; stroke: var(--accent); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 2px; }
.tile .tl { font-weight: 700; font-size: 14px; line-height: 1.2; }
.tile .ts { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.homePanel .note { text-align: center; color: var(--muted); font-size: 12px; margin: 0; }
@media (min-width: 900px) {
  body.home #app { grid-template-columns: minmax(0, 1fr) 460px; grid-template-rows: 1fr; }
  body.home #stage { grid-column: 1; grid-row: 1; margin-top: 112px; margin-bottom: 24px; }
  #startScreen.home { justify-content: center; align-items: flex-end; padding-right: 40px; }
  .homeTop { position: absolute; top: 28px; left: 0; right: 460px; padding: 0; }
  .homePanel { width: 400px; margin: 0; background: rgba(22, 19, 15, 0.86); border: 1px solid var(--line);
    border-radius: 18px; padding: 20px; gap: 12px; }
  .tile { min-height: 104px; }
}
@media (max-height: 640px) and (max-width: 899px) {
  body.home #app { grid-template-rows: minmax(0, 52%) 1fr; }
  .tile { min-height: 78px; } .tile .ts { display: none; }
}

/* Quick game sheet */
.seg.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card .seg button.big { flex-direction: column; gap: 2px; padding: 12px 6px; min-height: 92px; }
.big b { font-size: 17px; }
.big small { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.25; }
.dots { display: flex; gap: 4px; margin-bottom: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; }
.dots .p0 { background: rgb(64, 140, 255); } .dots .p1 { background: rgb(245, 205, 60); }
.dots .p2 { background: rgb(214, 112, 196); } .dots .p3 { background: rgb(64, 196, 140); }

/* Settings */
.card .switchRow { justify-content: space-between; padding: 0 12px; }
.switch { width: 46px; height: 26px; border-radius: 13px; background: var(--line); position: relative; flex: none; transition: background 0.15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform 0.15s; }
.switchRow[aria-checked="true"] .switch { background: var(--accent); }
.switchRow[aria-checked="true"] .switch i { transform: translateX(20px); background: #1a0d05; }

/* In-game menu */
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack p { margin: 2px 0; }
.card .danger { background: var(--danger); color: #1a0d05; border: 0; }

/* Campaign cards */
.card .missions button.mission { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  justify-content: stretch; padding: 9px 12px; text-align: left; min-height: 62px; }
.mission .mi { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); color: var(--muted); }
.mission .mi svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mission .num { font-weight: 800; font-size: 15px; }
.mission .mt { display: flex; flex-direction: column; min-width: 0; }
.mission .mt b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mission .mt small { font-size: 12.5px; color: var(--muted); font-weight: 500; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mission .mc { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.mission.won .mi { background: rgba(127, 207, 138, 0.16); border-color: var(--ok); color: var(--ok); }
.mission.next { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mission.next .mi { background: var(--accent); border-color: var(--accent); color: #1a0d05; }
.mission.next .mc { color: #1a0d05; background: var(--accent); border-radius: 999px; padding: 2px 9px; }
.mission.open .mi { border-color: var(--muted); color: var(--text); }
.mission.training .mi { border-color: #ffd27a; color: #ffd27a; }
.card .missions button.mission:disabled { opacity: 0.5; }
.missions { max-height: min(64vh, 560px); padding: 2px; }

/* ---------- Stage 12: info card, income pop-up, map guide ---------- */
#cellInfo { position: absolute; left: 8px; top: 104px; z-index: 3; width: min(330px, calc(100% - 76px));
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start;
  background: rgba(18, 15, 12, 0.94); border: 1px solid var(--line); border-radius: 14px; padding: 8px 30px 8px 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
#banner:not([hidden]) ~ #cellInfo { top: 144px; }
#ciPic { width: 56px; height: 56px; border-radius: 10px; background: rgba(255,255,255,0.05); }
.ciText { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ciText b { font-size: 15px; }
#ciOwner { font-size: 12.5px; font-weight: 600; color: var(--muted); }
#ciLines { margin: 3px 0 0; padding: 0 0 0 16px; font-size: 12.5px; line-height: 1.35; color: var(--text); }
#ciLines li::marker { color: var(--accent); }
.ciX { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font-size: 18px; line-height: 1; }
#toast { position: absolute; left: 50%; top: 104px; transform: translateX(-50%); z-index: 5; pointer-events: none;
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(18, 15, 12, 0.94); border: 1px solid var(--accent); box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  transition: opacity 0.4s; font-size: 14px; }
#toast.out { opacity: 0; }
#toast .ico { width: 20px; height: 20px; }
#toast b { font-size: 16px; margin-right: 4px; font-variant-numeric: tabular-nums; }
#toast b.neg { color: var(--danger); }
#toast span { color: var(--muted); margin-right: 2px; }
#cellInfo:not([hidden]) ~ #toast { top: auto; bottom: 96px; }
.guide { width: min(460px, 100%); text-align: left; }
.guide h1 { text-align: center; }
.guide .note { text-align: center; }
.guideList { overflow-y: auto; max-height: min(64vh, 620px); display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.guideList h2 { font-size: 13px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin: 10px 0 2px; }
.gRow { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 6px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.gRow canvas { width: 52px; height: 52px; }
.gText { display: flex; flex-direction: column; gap: 1px; }
.gText b { font-size: 14.5px; }
.gText span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
#guideBtn { font-weight: 800; font-size: 18px; }
@media (min-width: 900px) { #cellInfo { top: 112px; } #toast { top: 52px; } }

/* ---------- Stage 13: Next unit, settings rows ---------- */
#nextUnitBtn { display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; flex: 1.3 !important; padding: 0 6px; }
#nextUnitBtn .nuIco { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
@media (max-width: 430px) { #nextUnitBtn .nuLbl { display: none; } #nextUnitBtn { flex: 0.8 !important; } #turnBtns button { padding: 0 6px; } }
#nextUnitBtn .cnt { min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: #1a0d05;
  font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
#nextUnitBtn .cnt:empty { display: none; }
.card .switchRow .swText { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.card .switchRow .swText small { font-size: 12px; color: var(--muted); font-weight: 500; }
.card #adaptRow { min-height: 58px; }
