:root {
  --bg: #1b1f1a;
  --panel: #252a24;
  --panel-2: #2e352d;
  --line: #3c463a;
  --ink: #ece7da;
  --muted: #a2a593;
  --accent: #d9a441;
  --me: #b3261e;
  --me-soft: #f6e4dc;
  --foe: #1f4f8f;
  --foe-soft: #dfe8f4;
  --paper: #efe2c2;
  --paper-2: #e5d4ad;
  --board-ink: #6b5432;
  --ok: #3f8f4a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
}
button {
  font: inherit;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 12px;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); color: #1d1a12; border-color: var(--accent); font-weight: 700; }
button.ghost { background: transparent; }
button.small { padding: 3px 9px; font-size: 13px; }
input[type="text"], textarea, select {
  font: inherit; color: var(--ink); background: #1a1e19;
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px;
}
textarea { width: 100%; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; resize: vertical; }

/* ---------- 版面 ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 20px; border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; font-size: 18px; letter-spacing: .08em; flex: 1; min-width: 8em; }
.topbar .back { color: var(--muted); text-decoration: none; }
.topbar .back:hover { color: var(--ink); }
.topbar .ghost { white-space: nowrap; font-size: 13px; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  padding: 16px 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; padding: 12px 16px; }
}
.board-area { position: relative; display: flex; justify-content: center; }
.board {
  position: relative;
  width: min(100%, calc((100dvh - 92px) * var(--ar, 0.6)));
  container-type: inline-size;
  user-select: none;
}
.panel { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.card-title, .cheat summary { font-weight: 700; margin-bottom: 6px; }
.cheat summary { cursor: pointer; color: var(--accent); margin: 0; }
.cheat[open] summary { margin-bottom: 8px; }
.sub-title { color: var(--muted); font-size: 12px; margin: 10px 0 4px; letter-spacing: .05em; }
.muted { color: var(--muted); font-size: 12.5px; margin: 4px 0; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; cursor: pointer; }
.check input { margin-top: 4px; }
.check.indent { margin-left: 24px; font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg.wrap {
  flex-wrap: wrap; overflow: visible; row-gap: 0;
  max-width: 100%;
}
.seg.wrap button { border-top: 1px solid var(--line); }
.seg.wrap button:nth-child(-n+4) { border-top: 0; }
.seg button { border: 0; border-radius: 0; background: transparent; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #1d1a12; font-weight: 700; }
.seg.small button { padding: 4px 9px; font-size: 13px; }
.dim { opacity: .4; pointer-events: none; }
.phase { font-size: 20px; font-weight: 800; letter-spacing: .05em; }
.phase.you { color: var(--accent); }
.phase.foe { color: #8fb4e6; }
.phase.end.win { color: #7fd38a; }
.phase.end.lose { color: #f08a7e; }
.flash { color: #f3b26b; margin: 8px 0 0; min-height: 0; }
.flash:empty { display: none; }
.losses div { margin: 2px 0; }
.me-c { color: #f08a7e; }
.foe-c { color: #8fb4e6; }
.log { max-height: 240px; overflow-y: auto; font-size: 13px; color: #cfcbbd; }
.log div { padding: 1px 0; border-bottom: 1px dashed #333a31; }

/* ---------- 盤面 ---------- */
.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.lines .half { fill: var(--paper); stroke: var(--board-ink); stroke-width: 2; }
.lines .river { fill: #9cc3c9; }
.lines .mtn { fill: #7a6a4c; stroke: #574a33; stroke-width: 2; }
.lines .river-title { fill: #2f5d66; font-size: 22px; text-anchor: middle; letter-spacing: 6px; font-weight: 700; }
.lines .river-label { fill: #4b3a20; font-size: 15px; text-anchor: middle; font-weight: 700; }
.lines .road { stroke: var(--board-ink); stroke-width: 2; }
.lines .bridge { stroke: var(--board-ink); stroke-width: 2; }
.lines .bridge-deck { fill: #b48a52; stroke: #6b5432; stroke-width: 2; }
.lines .rail-bed { fill: none; stroke: #3a2e1d; stroke-width: 9; stroke-linejoin: round; }
.lines .rail-tie { fill: none; stroke: var(--paper); stroke-width: 4; stroke-dasharray: 8 8; }
.lines .post { fill: var(--paper-2); stroke: var(--board-ink); stroke-width: 1.5; }
.lines .camp { fill: #f3ead3; stroke: var(--board-ink); stroke-width: 2.5; }
.lines .hq { fill: #f1d9a6; stroke: var(--board-ink); stroke-width: 2.5; }

.cells { position: absolute; inset: 0; }
.cell {
  position: absolute;
  width: calc(var(--u) * 80);
  height: calc(var(--u) * 48);
  transform: translate(-50%, -50%);
  padding: 0; border: 0; border-radius: calc(var(--u) * 8);
  background: transparent;
  display: grid; place-items: center;
}
.cell.camp { border-radius: 50%; width: calc(var(--u) * 58); height: calc(var(--u) * 58); }
.cell:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cell:hover { border-color: transparent; }

.piece {
  position: relative;
  width: calc(var(--u) * 70);
  height: calc(var(--u) * 40);
  border-radius: calc(var(--u) * 6);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: calc(var(--u) * 19);
  letter-spacing: calc(var(--u) * 1);
  box-shadow: 0 calc(var(--u) * 3) 0 rgba(0, 0, 0, .35);
  line-height: 1;
}
.cell.camp .piece { width: calc(var(--u) * 54); height: calc(var(--u) * 40); font-size: calc(var(--u) * 17); }
.piece.me { background: var(--me-soft); color: var(--me); border: calc(var(--u) * 2.5) solid var(--me); }
.piece.foe { background: var(--foe-soft); color: var(--foe); border: calc(var(--u) * 2.5) solid var(--foe); }
.piece.foe.hidden {
  background: repeating-linear-gradient(45deg, #2c5c9c 0 calc(var(--u) * 5), #24508a calc(var(--u) * 5) calc(var(--u) * 10));
  border-color: #173d6e;
}
.piece.foe.marked { background: #fff4c9; color: #7a4b00; border-color: var(--foe); border-style: dashed; }
.piece.foe.known { background: var(--foe-soft); }
.piece.foe.revealed { opacity: .9; border-style: dotted; }
.piece .ph {
  position: absolute; bottom: calc(var(--u) * -2); right: calc(var(--u) * 2);
  font-size: calc(var(--u) * 11); font-weight: 700; letter-spacing: 0;
  color: #fff; background: rgba(15, 30, 55, .8); padding: 0 calc(var(--u) * 3);
  border-radius: calc(var(--u) * 3);
}
.piece.marked .ph, .piece.known .ph { background: rgba(31, 79, 143, .85); }
.piece .pb {
  position: absolute; top: calc(var(--u) * -9); left: calc(var(--u) * -6);
  font-size: calc(var(--u) * 11); background: #fff4c9; color: #7a4b00;
  border: 1px solid #b07a12; border-radius: calc(var(--u) * 4); padding: 0 calc(var(--u) * 3);
}
.piece.exposed::after {
  content: ""; position: absolute; top: calc(var(--u) * -5); right: calc(var(--u) * -5);
  width: calc(var(--u) * 11); height: calc(var(--u) * 11); border-radius: 50%;
  background: #e0453a; border: calc(var(--u) * 2) solid #fff;
}
.piece.spent { opacity: .85; }

/* 選取與可走格 */
.cell.sel .piece { outline: calc(var(--u) * 4) solid var(--accent); outline-offset: calc(var(--u) * 2); }
.cell.last-from::before, .cell.last-to::before {
  content: ""; position: absolute; inset: calc(var(--u) * -3);
  border: calc(var(--u) * 2.5) dashed #c47b1b; border-radius: inherit; pointer-events: none;
}
.cell.last-from::before { opacity: .55; }
/* 格子上的文字小標籤（可爆破、上一手是不移動的動作） */
.ctags {
  position: absolute; bottom: calc(var(--u) * -13); left: 50%; transform: translateX(-50%);
  display: flex; gap: calc(var(--u) * 2); pointer-events: none; z-index: 3; white-space: nowrap;
}
.ctag { font-size: calc(var(--u) * 11); color: #fff; padding: 0 calc(var(--u) * 4); border-radius: calc(var(--u) * 4); line-height: 1.35; }
.ctag-blast { background: #b05a1e; }
.ctag-last { background: #c47b1b; }
.ctag-def { background: #3d6b8f; }
.ctag-danger { background: #b03a2e; }
.cell.t-move::after, .cell.t-deploy::after, .cell.t-drop::after, .cell.t-add::after {
  content: ""; width: calc(var(--u) * 18); height: calc(var(--u) * 18); border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 calc(var(--u) * 4) rgba(63, 143, 74, .3);
  position: absolute; pointer-events: none;
}
.cell.t-deploy:has(.piece)::after { width: calc(var(--u) * 12); height: calc(var(--u) * 12); top: calc(var(--u) * -4); right: calc(var(--u) * -4); }
.cell.t-drop::after { background: #8a4fc4; box-shadow: 0 0 0 calc(var(--u) * 4) rgba(138, 79, 196, .3); }
.cell.t-add::after { background: transparent; border: calc(var(--u) * 2.5) dashed var(--ok); box-shadow: none; }
.cell.t-attack .piece { outline: calc(var(--u) * 4) solid #e0453a; outline-offset: calc(var(--u) * 2); animation: pulse 1s infinite alternate; }
.cell.t-scout .piece::before {
  content: "偵"; position: absolute; top: calc(var(--u) * -10); left: calc(var(--u) * -8);
  font-size: calc(var(--u) * 11); background: #8a4fc4; color: #fff; padding: 0 calc(var(--u) * 3);
  border-radius: calc(var(--u) * 4);
}
.cell.t-del .piece { outline: calc(var(--u) * 3) dashed #e0453a; }
.cell.t-move, .cell.t-attack, .cell.t-deploy, .cell.t-drop, .cell.t-scout, .cell.t-add, .cell.t-del { cursor: pointer; }
@keyframes pulse { from { outline-color: #e0453a; } to { outline-color: #ffb3a8; } }

/* 浮動選單 */
.popover {
  position: absolute; z-index: 20; background: #20251f; border: 1px solid var(--accent);
  border-radius: 10px; padding: 8px; width: max-content; max-width: min(320px, 92vw);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.pop-title { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.mk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mk { padding: 4px 6px; font-size: 13px; }
.mk.on { background: var(--accent); color: #1d1a12; }
.mk.impossible { opacity: .4; text-decoration: line-through; }
.mk.clear { color: #f08a7e; }

/* 對話框 */
.modal-back {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50;
  display: grid; place-items: center; padding: 16px;
}
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; width: min(640px, 100%); max-height: 90dvh; overflow-y: auto;
}
.modal h2 { margin: 0 0 8px; font-size: 18px; }
.modal .field { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.modal .field input { flex: 1; }
.modal input[type="file"] { margin: 8px 0; }
.rules h3 { margin: 14px 0 4px; font-size: 15px; color: var(--accent); }
.rules p, .rules ul { margin: 4px 0; }
.rules ul { padding-left: 20px; }

/* 拖曳 */
.board.editing .cells, .board.deploying .cells { touch-action: none; }
.drag-ghost {
  position: absolute; z-index: 30; pointer-events: none;
  transform: translate(-50%, -50%) scale(1.08); opacity: .92;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .5);
}
.cell.dragging .piece { opacity: .3; }
.cell.drop-over::before {
  content: ""; position: absolute; inset: calc(var(--u) * -4);
  border: calc(var(--u) * 3.5) solid var(--accent); border-radius: inherit; pointer-events: none;
}
.board.editing .cell .piece, .cell .piece { cursor: inherit; }

/* ---------- 改版：地形、明棋、翻倒、新動作、計數軌、複盤、統計 ---------- */
.lines .forest { fill: #a9c98f; stroke: #5d7f45; stroke-width: 2; }
.lines .tree { fill: #3f6b2f; }
.lines .bunker { fill: none; stroke: #4a4a4a; stroke-width: 5; }
.lines .bunker-tooth { fill: #4a4a4a; }
.lines .bridge-x { stroke: #c0392b; stroke-width: 6; stroke-linecap: round; display: none; }
.lines .bridge-g.broken .bridge, .lines .bridge-g.broken .bridge-deck { opacity: .35; }
.lines .bridge-g.broken .bridge-x { display: inline; }

.piece.faceup { box-shadow: 0 0 0 calc(var(--u) * 3) #e6b422, 0 calc(var(--u) * 3) 0 rgba(0, 0, 0, .35); }
.piece.stunned { transform: rotate(90deg) scale(.62); }
.piece .pm {
  position: absolute; bottom: calc(var(--u) * -6); left: calc(var(--u) * -6);
  font-size: calc(var(--u) * 11); background: #6b3fa0; color: #fff;
  border-radius: 50%; width: calc(var(--u) * 17); height: calc(var(--u) * 17);
  display: grid; place-items: center; letter-spacing: 0;
}
.cell.t-snipe .piece::before, .cell.t-blow::after {
  position: absolute; font-size: calc(var(--u) * 11); color: #fff; padding: 0 calc(var(--u) * 3);
  border-radius: calc(var(--u) * 4); pointer-events: none;
}
.cell.t-snipe .piece::before { content: "狙"; top: calc(var(--u) * -10); right: calc(var(--u) * -8); background: #b03a2e; }
.cell.t-blow::after { content: "炸橋"; top: calc(var(--u) * -12); background: #b03a2e; }
.cell.t-snipe, .cell.t-blow, .cell.t-blast { cursor: pointer; }
.cell.t-blast .piece { outline: calc(var(--u) * 3) dashed #e08a3a; outline-offset: calc(var(--u) * 2); }
.cell.t-snipe .piece { outline: calc(var(--u) * 3) dashed #e0453a; outline-offset: calc(var(--u) * 2); }

.track { height: 8px; border-radius: 4px; background: #1a1e19; border: 1px solid var(--line); margin-top: 8px; overflow: hidden; }
.track-fill { height: 100%; background: linear-gradient(90deg, #6f9a5a, #d9a441, #c0392b); }

.replay-ctl { gap: 6px; }
.replay-ctl button { padding: 4px 10px; }
.rp-pos { min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.rp-slider { width: 100%; margin-top: 8px; accent-color: var(--accent); }
.board.replaying .cells { pointer-events: none; }

table.stats { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
table.stats th, table.stats td { padding: 3px 6px; border-bottom: 1px solid var(--line); text-align: right; }
table.stats td:first-child, table.stats th:first-child { text-align: left; }

.rules-card summary { cursor: pointer; font-weight: 700; color: #8fb4e6; }
.rules-card[open] summary { margin-bottom: 6px; }
.row.indent { margin-left: 24px; margin-top: 2px; }

/* 標示 AI 建議 */
.cell.sug-from .piece { box-shadow: 0 0 0 calc(var(--u) * 3) #fff, 0 0 0 calc(var(--u) * 6) #2f7fd6; }
.cell.sug-to::before {
  content: "建議"; position: absolute; top: calc(var(--u) * -12); left: 50%; transform: translateX(-50%);
  font-size: calc(var(--u) * 11); color: #fff; background: #2f7fd6; padding: 0 calc(var(--u) * 4);
  border-radius: calc(var(--u) * 4); pointer-events: none; z-index: 2; white-space: nowrap;
}
.cell.sug-move::before { content: "建議移動"; }
.cell.sug-attack::before { content: "建議攻擊"; }
.cell.sug-blast::before { content: "建議爆破"; }
.cell.sug-scout::before { content: "建議偵察"; }
.cell.sug-snipe::before { content: "建議狙擊"; }
.cell.sug-drop::before { content: "建議空降"; }
.cell.sug-blow::before { content: "建議炸橋"; }
.cell.sug-to { outline: calc(var(--u) * 3) dashed #2f7fd6; outline-offset: calc(var(--u) * 2); border-radius: calc(var(--u) * 8); }

/* ---------- 地圖與新地形 ---------- */
.lines .swamp { fill: #b9c9b0; stroke: #4f6b55; stroke-width: 2; }
.lines .swamp-wave { fill: none; stroke: #3d5a45; stroke-width: 1.6; }
.lines .plain { fill: #f1e6b8; stroke: #a58a3c; stroke-width: 1.5; stroke-dasharray: 6 4; }
.lines .plain-dot { fill: #8a6d22; }
.lines .village { fill: #ead9c6; stroke: #8b6a47; stroke-width: 2; }
.lines .house { fill: #fff8ee; stroke: #6b4a2b; stroke-width: 1.8; }
.lines .house-door { fill: #6b4a2b; }
.lines .peak { fill: #8f8577; stroke: #4c443a; stroke-width: 2.5; }
.lines .peak-snow { fill: #ffffff; stroke: #4c443a; stroke-width: 1; }
/* 軌距：標準軌＝原樣；寬軌＝雙線；窄軌＝細、枕木密 */
.lines .rail-bed.g-narrow { stroke-width: 5; }
.lines .rail-tie.g-narrow { stroke-width: 2.5; stroke-dasharray: 4 4; }
.lines .rail-bed.g-wide { stroke-width: 13; }
.lines .rail-tie.g-wide { stroke-width: 7; stroke-dasharray: 10 6; }
.lines .rail-wide-inner { fill: none; stroke: #3a2e1d; stroke-width: 2; }
.lines .gauge-break { fill: none; stroke: #7a3fa0; stroke-width: 3.5; stroke-dasharray: 7 4; }

.map-card summary { cursor: pointer; font-weight: 700; color: #c9a45a; }
.map-card[open] summary { margin-bottom: 6px; }
.map-card select { max-width: 100%; }
.small-link { color: #8fb4e6; font-size: 13px; align-self: center; }
ul.legend { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
ul.legend li { margin: 3px 0; }

/* 黑白列印：只印棋盤，地形靠圖示與花紋分辨（桌遊條件：地圖印得出來） */
@media print {
  body { background: #fff; color: #000; }
  .topbar, .panel, .popover, .modal-back { display: none !important; }
  .layout { display: block; padding: 0; }
  .board { width: 100% !important; filter: grayscale(1); }
  .cells { display: none; }
}

/* ---------- 地圖編輯器 ---------- */
.board .edit-layer { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.edit-layer .ed-hit-cell { fill: transparent; cursor: crosshair; }
.edit-layer .ed-hit-cell:hover { fill: rgba(217, 164, 65, .18); }
.edit-layer .ed-hit-road { stroke: transparent; stroke-width: 22; cursor: pointer; }
.edit-layer .ed-hit-road:hover { stroke: rgba(217, 164, 65, .45); }
.edit-layer .ed-removed { stroke: #c0392b; stroke-width: 4; stroke-dasharray: 6 6; }
.edit-layer .ed-bad { fill: rgba(192, 57, 43, .18); stroke: #c0392b; stroke-width: 3; pointer-events: none; }
.edit-layer .ed-region { fill: rgba(47, 127, 214, .12); stroke: #2f7fd6; stroke-width: 3; stroke-dasharray: 8 5; pointer-events: none; }
.edit-layer .ed-hit-cross { fill: rgba(255, 255, 255, .08); stroke: #d9a441; stroke-width: 2; stroke-dasharray: 5 4; cursor: pointer; }
.edit-layer .ed-hit-cross:hover { fill: rgba(217, 164, 65, .3); }
.edit-layer .ed-cross-label { fill: #1d1a12; font-size: 14px; text-anchor: middle; font-weight: 700; pointer-events: none; }
.layout.editor .field.small input { width: 4em; }
.tool-opts { margin-top: 8px; }
.tool-opts .seg { margin-bottom: 4px; }
.ok-c { color: #7fd38a; }
.bad-c { color: #f08a7e; }

/* ---------- AI 設置 ---------- */
.ai-set { padding-bottom: 8px; }
.ai-set + .ai-set { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 2px; }
.ai-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--accent); color: #1d1a12; font-size: 11px; letter-spacing: 0; }
.ai-est { min-height: 1.3em; }
.ai-limit { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; font-size: 13px; color: var(--muted); }
.ai-adv { margin-top: 6px; }
.ai-adv summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.ai-knob { display: grid; grid-template-columns: 4em 1fr 3em; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.ai-knob input[type=range] { width: 100%; min-width: 0; }
.ai-knob output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.think-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; font-size: 14px; }
.think-sec { font-variant-numeric: tabular-nums; min-width: 2.5em; display: inline-block; text-align: right; }
.ai-limit select { min-width: 0; max-width: 100%; flex: 1; }
.advice-row { margin: 6px 0; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 7px; font-size: 14px; }
.advice-row .row { margin-top: 6px; }
.settings-card .indent { margin-left: 24px; }

/* 被工兵爆破的防護格：斜線破損紋（黑白列印也看得出來） */
.cell.ruined { background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(120, 60, 30, .55) 6px 9px); }
.cell.ruined::after { content: "已炸毀"; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%); font-size: calc(var(--u) * 11); color: #7a3b1d; pointer-events: none; }

/* AI 建議列、排除標記 */
.sug-row { margin: 6px 0; padding: 8px 10px; border: 1px dashed var(--accent); border-radius: 7px; font-size: 14px; }
.sug-row .row { margin: 6px 0 2px; align-items: center; gap: 6px; }
.piece .px { position: absolute; left: -4px; top: -6px; font-size: calc(var(--u) * 12); background: #7a1d1d; color: #fff; border-radius: 4px; padding: 0 3px; }
