/* BorderGuessr · an atlas plate on a survey office desk */

@font-face { font-family: 'IM Fell English'; src: url('../fonts/im-fell-english-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IM Fell English'; src: url('../fonts/im-fell-english-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('../fonts/courier-prime-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('../fonts/courier-prime-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --paper: #f1e9d6;
  --paper-hi: #f7f1e3;
  --paper-lo: #e8ddc5;
  --ink: #211d18;
  --ink-2: #51483c;
  --ink-3: #8c8170;
  --rule: rgba(33, 29, 24, 0.3);
  --red: #b3341f;
  --red-d: #8c2614;
  --blue: #234a72;
  --green: #4f6d2c;
  --ochre: #ad7a1c;
  --sienna: #9a5226;
  --grey: #8f877a;
  /* score bands: excellent → poor */
  --s5: #1d7a3a;
  --s4: #5f961a;
  --s3: #cf8a00;
  --s2: #d95f16;
  --s1: #c0261d;
  --serif: 'IM Fell English', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --type: 'Courier Prime', 'Courier New', Courier, monospace;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.19 0 0 0 0 0.12 0 0 0 0.11 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --boundary: repeating-linear-gradient(90deg, var(--ink) 0 13px, transparent 13px 18px, var(--ink) 18px 20px, transparent 20px 25px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--paper); color: var(--ink); font: 17px/1.45 var(--serif); -webkit-font-smoothing: antialiased; }
/* thin ink scrollbars on paper (standard properties; the -webkit rules are for Safari) */
* { scrollbar-width: thin; scrollbar-color: rgba(81, 72, 60, 0.42) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(81, 72, 60, 0.38); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(81, 72, 60, 0.6); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-d); }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
h2 { font-size: 30px; line-height: 1.1; margin: 2px 0 8px; }
h3 { font-size: 23px; line-height: 1.15; }
h4 { font: 19px/1.25 var(--serif); color: var(--ink); margin: 22px 0 6px; }
p { margin: 8px 0; }
em { font-style: italic; }
.hidden { display: none !important; }
.small { font-size: 14px; }
.center { text-align: center; }
.up { color: var(--green); }
.down { color: var(--red); }
.ck { font: italic 15px/1.3 var(--serif); color: var(--ink-2); }
.lede { font-style: italic; font-size: 18px; color: var(--ink-2); margin: 4px 0 12px; }
.note { font-style: italic; color: var(--ink-2); }
.note.small { font-size: 14px; }

/* ------------------------------------------------------------ map */

#map { position: fixed; inset: 0; z-index: 0; touch-action: none; overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none; background: var(--paper); }
#map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#map canvas.frame { pointer-events: none; }
#map.drawing { cursor: crosshair; }
#map.grabbing, #map.space-pan { cursor: grabbing; }

/* ------------------------------------------------------------ shell */

#topbar { position: fixed; top: 24px; left: 30px; right: 30px; z-index: 20; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
#topbar > * { pointer-events: auto; }
.mark-small { font: 15px var(--serif); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); text-decoration: none; background: var(--paper-hi); padding: 3px 9px; border: 1px solid var(--ink); }
.mark-small:hover { color: var(--red); }
.top-left { display: flex; gap: 8px; align-items: center; }
.leave-btn { font: italic 16px/1 var(--serif); color: var(--ink); background: var(--paper-hi); border: 1px solid var(--ink); padding: 5px 12px 4px; cursor: pointer; white-space: nowrap; }
.leave-btn:hover { color: var(--red); border-color: var(--red); }
/* the player's card: name, then where from and rating, like the title block of a map */
.idcard { display: grid; justify-items: end; padding: 6px 14px 6px; cursor: pointer; text-align: right; color: var(--ink);
  background: var(--grain), var(--paper-hi); border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 2px var(--paper-hi), inset 0 0 0 3px var(--rule), 0 8px 16px -12px rgba(60, 40, 15, 0.5); }
.idcard .id-name { font: 18px/1.15 var(--serif); max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idcard .id-meta { font: italic 14px/1.25 var(--serif); color: var(--ink-2); white-space: nowrap; }
.idcard:hover .id-name { color: var(--red); }
.confirm h2 { margin-top: 0; }

#screen { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#screen > * { pointer-events: auto; }
#screen > .hud-top, #screen > .hud-bottom, #screen > .hud-answer, #screen > .wire { pointer-events: none; }
.hud-top > *, .hud-bottom > *, .hud-answer > * { pointer-events: auto; }
.hud-top, .hud-top * { pointer-events: none !important; }

.cc { display: inline-block; font: 700 10.5px/1 var(--type); letter-spacing: 0.06em; border: 1px solid var(--ink-3); color: var(--ink-2); padding: 2px 3px 1px; vertical-align: 2px; background: var(--paper-hi); }

/* ------------------------------------------------------------ paper slips */

.slip {
  background: var(--grain), var(--paper-hi);
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--paper-hi), inset 0 0 0 4px var(--rule), 0 1px 0 rgba(60, 40, 15, 0.12), 0 14px 26px -16px rgba(60, 40, 15, 0.55);
  padding: 20px 22px;
}
.center-slip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(500px, 92vw); text-align: center; animation: settle 0.3s ease-out; }
.small-slip { padding: 10px 16px; font-style: italic; }
.boot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-style: italic; font-size: 20px; color: var(--ink-2); }
@keyframes settle { from { opacity: 0; transform: translate(-50%, -48%); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.rule { height: 1px; background: var(--rule); margin: 14px 0; }

/* ------------------------------------------------------------ buttons & fields */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 17px 6px; border: 1.5px solid var(--ink); background: transparent; cursor: pointer;
  font: 18px/1.15 var(--serif); letter-spacing: 0.01em; color: var(--ink); transition: background 0.12s, color 0.12s; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--ink); color: var(--paper-hi); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.primary { background: var(--red); border-color: var(--red-d); color: var(--paper-hi); }
.btn.primary:hover:not(:disabled) { background: var(--red-d); }
.btn.quiet { border-color: transparent; text-decoration: underline; text-underline-offset: 4px; padding-left: 4px; padding-right: 4px; color: var(--ink-2); }
.btn.quiet:hover:not(:disabled) { background: transparent; color: var(--red); }
.btn.wide { width: 100%; margin-top: 12px; }
.linkish { background: none; border: 0; padding: 0; color: var(--red); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font: inherit; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 20px; line-height: 1; color: var(--ink-3); padding: 0 4px; }
.icon-btn:hover { color: var(--red); }
.ico { display: inline-flex; }

input, select, textarea { background: transparent; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; padding: 7px 2px; outline: none; font: 15px var(--type); min-width: 0; }
input:focus, select:focus { border-bottom-color: var(--red); }
select { cursor: pointer; padding-right: 18px; }
select option { background: var(--paper-hi); }
textarea.copy { width: 100%; border: 1px solid var(--rule); font: 13px var(--type); padding: 8px; }
label { display: block; font: italic 16px/1.3 var(--serif); color: var(--ink-2); margin: 16px 0 6px; }
label.inline { font: italic 17px var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.row { display: flex; gap: 12px; align-items: flex-end; }
.row > input { flex: 1; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.actions.right { justify-content: flex-end; }
.actions.center { justify-content: center; }
.actions.between { justify-content: space-between; }

.opts { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 14px var(--type); }
.opt { background: none; border: 0; padding: 3px 0; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.opt::before { content: ''; width: 9px; height: 9px; border: 1.3px solid var(--ink-2); flex: none; }
.opt:hover:not(:disabled) { color: var(--ink); }
.opt.on { color: var(--red); font-weight: 700; }
.opt.on::before { background: var(--red); border-color: var(--red); }
.opts.disabled .opt { cursor: default; }
.opts.disabled .opt:not(.on) { opacity: 0.45; }

/* ledger line: label ........ value */
.ledger { margin: 8px 0; }
.leader { display: flex; align-items: baseline; gap: 6px; font: 14px/1.6 var(--type); width: 100%; background: none; border: 0; padding: 1px 0; text-align: left; color: inherit; }
.leader .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62%; }
.leader:not(:has(.n)) .l { max-width: 84%; }
.leader .dots { flex: 1; border-bottom: 1.5px dotted var(--ink-3); transform: translateY(-4px); min-width: 12px; }
.leader .n { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.leader .v { font-weight: 700; white-space: nowrap; }
.leader.link { cursor: pointer; }
.leader.link:hover .l { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ title page */

.title-page { position: absolute; left: 46px; top: 66px; bottom: 40px; width: min(600px, calc(100% - 92px)); overflow-y: auto; overflow-x: hidden; padding: 34px 32px 26px; animation: rise 0.45s ease-out; scrollbar-gutter: stable both-edges; }
.masthead { text-align: center; margin-bottom: 22px; }
.wordmark { font: min(46px, 7.4vw)/1 var(--serif); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; margin: 0 0 0 0.12em; }
.boundary { height: 2px; background: var(--boundary); margin: 14px auto 12px; width: 78%; }
.subtitle { font-style: italic; font-size: 21px; margin: 0; }
.edition { font: 16px var(--serif); letter-spacing: 0.04em; color: var(--ink-2); margin: 8px 0 0; }
.warmup { text-align: center; font-style: italic; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 8px 0; margin: 0 0 14px; }
.contents { display: flex; flex-direction: column; }
.entry { display: grid; grid-template-columns: 42px auto minmax(12px, 1fr) minmax(0, auto) auto; align-items: baseline; gap: 0 8px; background: none; border: 0; padding: 7px 4px; cursor: pointer; text-align: left; color: var(--ink); }
.entry .num { font-style: italic; color: var(--ink-2); font-size: 18px; text-align: right; padding-right: 6px; }
.entry .title { font-size: 25px; line-height: 1.1; white-space: nowrap; }
.entry .dots { border-bottom: 1.5px dotted var(--ink-3); transform: translateY(-5px); min-width: 16px; }
.entry .desc { font-style: italic; font-size: 16.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .status { font: italic 15px var(--serif); color: var(--ink-2); margin-left: 8px; white-space: nowrap; }
.entry .status.open { color: var(--red); }
.entry:hover .title { color: var(--red); }
.entry:hover .dots { border-bottom-color: var(--red); }
.contents-sub { font: italic 16px var(--serif); color: var(--ink-3); margin: 16px 0 0 54px; }
.appendix { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 18px 0 0; font-size: 18px; align-items: baseline; }
.appendix span { color: var(--ink-3); }
.appendix a, .appendix .linkish { color: var(--ink); text-decoration-color: var(--ink-3); font-size: 18px; }
.appendix a:hover, .appendix .linkish:hover { color: var(--red); }
.edition-foot { text-align: center; font-style: italic; color: var(--ink-2); font-size: 15px; margin: 24px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); min-height: 1.4em; }

/* ------------------------------------------------------------ cartouche & HUD */

.hud-top { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 9px; width: max-content; max-width: 92vw; }
.cartouche { background: var(--grain), var(--paper-hi); border: 1px solid var(--ink); box-shadow: inset 0 0 0 3px var(--paper-hi), inset 0 0 0 4px var(--rule), 0 12px 22px -16px rgba(60, 40, 15, 0.55);
  padding: 11px 30px 13px; text-align: center; min-width: 300px; transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.25, 1); transform-origin: top center; }
.cartouche.intro { transform: translateY(26vh) scale(1.45); }
.cartouche .cs { font-style: italic; font-size: 16px; color: var(--ink-2); margin-top: 3px; }
.cartouche .ct { font-size: 33px; line-height: 1.1; letter-spacing: 0.09em; text-transform: uppercase; margin-top: 1px; }
.cartouche .cn { font-style: italic; font-size: 14px; color: var(--ink-2); }
.note-strip { font: 13px var(--type); background: var(--ink); color: var(--paper-hi); padding: 5px 12px; animation: rise 0.2s ease-out; }

.scalebar { width: 300px; background: var(--paper-hi); border: 1px solid var(--ink); padding: 5px 7px 3px; box-shadow: 0 8px 16px -12px rgba(60, 40, 15, 0.5); }
.sb-track { height: 7px; border: 1px solid var(--ink); position: relative; }
.scalebar .sb-fill { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--ink) 0 14px, var(--paper-hi) 14px 28px); }
.scalebar.hurry .sb-fill { background: repeating-linear-gradient(90deg, var(--red) 0 7px, var(--paper-hi) 7px 14px); }
.sb-ticks { display: flex; justify-content: space-between; font: 11px var(--type); color: var(--ink-2); margin-top: 2px; }
.scalebar.hurry .sb-text { color: var(--red); font-weight: 700; }

.hud-bottom { position: absolute; bottom: max(30px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); }
.toolbar { display: flex; align-items: center; gap: 2px; padding: 6px; background: var(--grain), var(--paper-hi); border: 1px solid var(--ink); box-shadow: inset 0 0 0 3px var(--paper-hi), inset 0 0 0 4px var(--rule), 0 12px 22px -16px rgba(60, 40, 15, 0.55); }
.tool { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid transparent; padding: 6px 10px; cursor: pointer; font: 17px var(--serif); color: var(--ink-2); }
.tool:hover:not(:disabled) { color: var(--ink); border-color: var(--rule); }
.tool.on { background: var(--ink); color: var(--paper-hi); }
.tool:disabled { opacity: 0.35; cursor: default; }
.tsep { width: 1px; align-self: stretch; background: var(--rule); margin: 4px 6px; }
.shape-count { font: 12px var(--type); color: var(--ink-3); padding: 0 6px; }
.submit { margin-left: 8px; }
.zoom { position: absolute; right: 34px; bottom: 112px; display: flex; flex-direction: column; border: 1px solid var(--ink); background: var(--paper-hi); }
.zoom button { width: 36px; height: 36px; background: none; border: 0; cursor: pointer; display: grid; place-items: center; }
.zoom button + button { border-top: 1px solid var(--rule); }
.zoom button:hover { background: var(--ink); color: var(--paper-hi); }
.tip { position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%); width: min(560px, 92vw); font-size: 16px; cursor: pointer; animation: rise 0.4s ease-out; padding: 12px 18px; }

/* answer slips (Outline, Passage) */
.hud-answer { position: absolute; left: 50%; bottom: max(34px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(470px, 92vw); }
.answer-slip { padding: 14px 18px; }
.outline-meter { position: relative; text-align: center; margin: -2px 0 8px; }
.outline-meter .om-num { display: inline-block; font: 700 56px/1 var(--type); transition: color 0.4s; }
.outline-meter .om-num.tick { animation: tick 0.5s ease-out; }
.outline-meter .om-cap { font: italic 15px var(--serif); color: var(--ink-2); margin-top: 2px; }
.outline-meter.hurry .om-num { color: var(--red); }
.om-pen { position: absolute; left: calc(50% + 86px); top: 6px; font: 700 26px var(--type); color: var(--s1); animation: penalty 1.3s ease-out forwards; pointer-events: none; }
@keyframes penalty { 0% { opacity: 0; transform: translateY(8px) scale(1.4); } 15% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-34px); } }
@keyframes tick { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
.countdown { position: fixed; left: 50%; top: 47%; transform: translate(-50%, -50%); pointer-events: none; z-index: 6; }
.countdown span { display: block; font: 700 170px/1 var(--type); color: var(--ink); text-shadow: 0 0 18px var(--paper), 0 0 2px var(--paper); animation: count 1s ease-out both; }
@keyframes count { 0% { opacity: 0; transform: scale(1.7); } 18% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(0.9); } }
.answer-wrap { position: relative; }
input.answer { width: 100%; font: 19px var(--type); padding: 8px 2px 6px; }
.suggest { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--paper-hi); border: 1px solid var(--ink); z-index: 6; box-shadow: 0 10px 20px -12px rgba(60, 40, 15, 0.5); }
.hud-side .suggest, .atlas .suggest { bottom: auto; top: calc(100% + 4px); }
.suggest-item { display: block; width: 100%; text-align: left; padding: 7px 12px; background: none; border: 0; cursor: pointer; font: 15px var(--type); }
.suggest-item + .suggest-item { border-top: 1px solid var(--rule); }
.suggest-item.on, .suggest-item:hover { background: var(--ink); color: var(--paper-hi); }
.wrong-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.struck { font: 14px var(--type); color: var(--red); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.hud-side { position: absolute; right: 34px; top: 200px; width: 360px; }
.passage-slip input.answer { font-size: 17px; }
.route-list { margin: 10px 0 2px; }
.route-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; align-items: baseline; font: 14px/1.7 var(--type); border-bottom: 1px dotted var(--rule); }
.ri-n { color: var(--ink-3); }
.ri-st { font-size: 12px; font-style: normal; display: inline-flex; align-items: center; gap: 6px; }
.ri-st::before { content: ''; width: 9px; height: 9px; flex: none; }
.route-item.route .ri-st { color: var(--green); } .route-item.route .ri-st::before { background: var(--green); }
.route-item.near .ri-st { color: var(--ochre); } .route-item.near .ri-st::before { background: var(--ochre); transform: rotate(45deg) scale(0.85); }
.route-item.off .ri-st { color: var(--grey); } .route-item.off .ri-st::before { border: 1.5px solid var(--grey); }

/* ------------------------------------------------------------ reports */

.hud-report { position: absolute; right: 34px; top: 96px; width: 410px; max-height: calc(100% - 130px); overflow-y: auto; animation: rise 0.35s ease-out; } /* below the player card */
.report-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.report-head h3 { margin-top: 3px; }
/* the score stamp takes the colour of its band and lands with a thump */
.stamp { --sc: var(--red); border: 2.5px solid var(--sc); outline: 1px solid var(--sc); outline-offset: 2px; color: var(--sc); background: color-mix(in srgb, var(--sc) 10%, transparent);
  padding: 5px 14px 6px; transform: rotate(-4deg); text-align: center; margin: 6px 6px 0 0; flex: none; animation: thump 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.stamp.b5 { --sc: var(--s5); } .stamp.b4 { --sc: var(--s4); } .stamp.b3 { --sc: var(--s3); } .stamp.b2 { --sc: var(--s2); } .stamp.b1 { --sc: var(--s1); }
@keyframes thump { 0% { opacity: 0; transform: rotate(-12deg) scale(1.9); } 60% { opacity: 1; } 100% { transform: rotate(-4deg) scale(1); } }
.stamp-grade { font: 700 11.5px var(--type); letter-spacing: 0.2em; text-transform: uppercase; }
.stamp-row { display: flex; align-items: baseline; justify-content: center; }
.stamp-num { font: 46px/1 var(--serif); }
.stamp-max { font: 12px var(--type); margin-left: 2px; opacity: 0.8; }
.report { border-top: 5px solid var(--ink); }
.report.b5 { border-top-color: var(--s5); } .report.b4 { border-top-color: var(--s4); } .report.b3 { border-top-color: var(--s3); } .report.b2 { border-top-color: var(--s2); } .report.b1 { border-top-color: var(--s1); }

/* score bar: a ruler filled to the score */
.scorebar { --sc: var(--ink); position: relative; height: 12px; border: 1px solid var(--ink); margin: 12px 0 4px; background: var(--paper); }
.scorebar.b5 { --sc: var(--s5); } .scorebar.b4 { --sc: var(--s4); } .scorebar.b3 { --sc: var(--s3); } .scorebar.b2 { --sc: var(--s2); } .scorebar.b1 { --sc: var(--s1); }
.scorebar .sb-fill { position: absolute; inset: 0 auto 0 0; background: var(--sc); transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); animation: grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.scorebar .sb-ruler { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--ink) calc(25% - 1px) 25%); opacity: 0.5; }
@keyframes grow { from { width: 0; } }
.report .ledger { margin: 14px 0 6px; }
.crowd { margin-top: 6px; }
.crowd .btn.quiet { padding-left: 0; }

.results { margin: 12px 0; }
.rrow { display: grid; grid-template-columns: 26px 14px 1fr auto auto; gap: 6px 8px; align-items: baseline; font: 14px/1.5 var(--type); padding: 5px 0; border-bottom: 1px dotted var(--rule); }
.rrow .rank { font: italic 15px var(--serif); color: var(--ink-3); }
.rrow .rname { overflow: hidden; text-overflow: ellipsis; }
.rrow .rdetail { grid-column: 3; grid-row: 2; font-size: 12px; color: var(--ink-3); font-style: italic; font-family: var(--serif); }
.rrow .rpts { grid-column: 4; grid-row: 1; }
.rrow .dmg { grid-column: 5; grid-row: 1; color: var(--red); font-size: 12px; min-width: 40px; text-align: right; }
.rrow.me .rname { font-weight: 700; }
.rrow .rpts { font-size: 17px; }
.rrow { box-shadow: inset 4px 0 0 var(--bandc, transparent); padding-left: 8px; }
.rrow.b5 { --bandc: var(--s5); } .rrow.b4 { --bandc: var(--s4); } .rrow.b3 { --bandc: var(--s3); } .rrow.b2 { --bandc: var(--s2); } .rrow.b1 { --bandc: var(--s1); }
.swatch { width: 12px; height: 12px; display: inline-block; border: 1px solid var(--pc, var(--ink)); background: repeating-linear-gradient(45deg, var(--pc, var(--ink)) 0 1.5px, transparent 1.5px 3.5px); flex: none; align-self: center; }
.nextbar { height: 3px; background: var(--rule); margin-top: 10px; overflow: hidden; }
.nextbar > div { height: 100%; background: var(--ink); transform-origin: left; transition: transform 0.1s linear; }

/* ------------------------------------------------------------ summaries */

.summary { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: min(780px, 94vw); max-height: 84vh; overflow-y: auto; text-align: center; animation: settle 0.35s ease-out; }
.total { margin: 4px 0 8px; }
.total-num { font: 62px/1 var(--serif); }
.summary > .scorebar { max-width: 460px; margin: 6px auto 4px; }
.total-max { font: 14px var(--type); color: var(--ink-2); }
.plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; margin: 18px 0 6px; text-align: left; }
.plate canvas { border: 1px solid var(--ink); width: 100% !important; height: auto !important; aspect-ratio: 3 / 2; display: block; }
.plate { border-top: 4px solid var(--ink); padding-top: 4px; }
.plate.b5 { border-top-color: var(--s5); } .plate.b4 { border-top-color: var(--s4); } .plate.b3 { border-top-color: var(--s3); } .plate.b2 { border-top-color: var(--s2); } .plate.b1 { border-top-color: var(--s1); }
.plate-cap b { font: 700 15px var(--type); }
.daily-bars { max-width: 460px; margin: 10px auto 6px; text-align: left; }
.dbar { display: grid; grid-template-columns: 34px 74px 1fr 50px; gap: 10px; align-items: center; font: 14px var(--type); }
.dbar .scorebar { margin: 4px 0; }
.dbar b { text-align: right; font-size: 15px; }
.dbar-n { font: italic 16px var(--serif); color: var(--ink-2); text-align: right; }
.plate-cap { display: flex; flex-direction: column; gap: 1px; margin-top: 5px; }
.plate-cap span { font: 15px/1.2 var(--serif); }
pre.bars { font: 13px/1.6 var(--type); text-align: left; display: inline-block; margin: 6px auto 4px; padding: 8px 14px; border: 1px solid var(--rule); background: var(--paper); }
.daily-rank { max-width: 470px; margin: 8px auto; }
.plate-list { text-align: left; margin: 16px 0 6px; border-top: 1px solid var(--rule); }
.plate-line { display: grid; grid-template-columns: 38px 92px 1fr; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px dotted var(--rule); }
.plate-line .num { font-style: italic; color: var(--ink-2); text-align: right; }
.plate-line .title { font-size: 20px; }
.plate-line .desc { font-style: italic; color: var(--ink-2); font-size: 15px; }
.histo { display: flex; align-items: flex-end; gap: 2px; height: 58px; margin: 10px 0 2px; border-bottom: 1px solid var(--ink); }
.histo .bar { flex: 1; background: repeating-linear-gradient(-45deg, var(--ink-2) 0 1px, transparent 1px 3px); border: 1px solid var(--ink-2); border-bottom: 0; min-height: 2px; }
.histo .bar.mark { background: var(--red); border-color: var(--red); }
.axis { display: flex; justify-content: space-between; font: 11px var(--type); color: var(--ink-3); }
.endgame h2 { font-size: 36px; }
.rating-change { font: 15px var(--type); }
.standings { max-width: 480px; margin: 14px auto; text-align: left; }
.srow { display: grid; grid-template-columns: 30px 14px 1fr auto auto auto; gap: 8px; align-items: center; font: 15px var(--type); padding: 6px 0; border-bottom: 1px dotted var(--rule); }
.srow .rank { font: italic 17px var(--serif); color: var(--ink-2); }
.srow.me { font-weight: 700; }
.history { overflow-x: auto; margin: 12px 0; }
.history table { border-collapse: collapse; margin: 0 auto; font: 13px var(--type); }
.history th, .history td { padding: 4px 10px; border-bottom: 1px solid var(--rule); text-align: right; }
.history th:first-child, .history td:first-child { text-align: left; color: var(--ink-2); }
.history th { font-weight: 700; }

/* ------------------------------------------------------------ parties & duels */

.lobby { position: absolute; left: 34px; top: 84px; max-height: calc(100% - 118px); width: min(880px, calc(100% - 68px)); overflow-y: auto; animation: rise 0.35s ease-out;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 34px; align-items: start; }
.lobby-settings h4 { margin-top: 0; }
.lobby-main .btn.wide { margin-top: 16px; }
.room-code { font: 50px/1 var(--serif); letter-spacing: 0.2em; margin: 8px 0 10px; }
.share { display: flex; gap: 10px; align-items: flex-end; }
.share-link { flex: 1; font-size: 13px; }
.players .prow { display: flex; align-items: center; gap: 8px; font: 15px var(--type); padding: 5px 0; border-bottom: 1px dotted var(--rule); }
.prow .pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .mark { font: italic 13px var(--serif); border: 1px solid var(--ink-3); padding: 0 5px; color: var(--ink-2); }
.prow .mark.away { color: var(--ochre); border-color: var(--ochre); }
.settings > label:first-child { margin-top: 4px; }
.strip { position: absolute; top: 84px; left: 34px; width: 250px; display: flex; flex-direction: column; gap: 6px; }
.strip .prow.compact { display: flex; align-items: center; gap: 8px; font: 13px var(--type); background: var(--paper-hi); border: 1px solid var(--ink); padding: 6px 9px; }
.strip .prow.compact.me { box-shadow: inset 3px 0 0 var(--pc); }
.st-status { font-size: 11px; color: var(--ink-3); font-style: italic; font-family: var(--serif); white-space: nowrap; }
.pscore { font-weight: 700; }
.standing { background: var(--paper-hi); border: 1px solid var(--ink); padding: 7px 9px; font: 13px var(--type); }
.standing.me { box-shadow: inset 3px 0 0 var(--pc); }
.standing.out { opacity: 0.45; }
.st-top { display: flex; align-items: center; gap: 6px; }
.st-top .pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hpbar { height: 8px; border: 1px solid var(--ink); margin: 6px 0 2px; position: relative; }
.hpfill { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(45deg, var(--pc) 0 2px, transparent 2px 4px); border-right: 1.5px solid var(--pc); transition: width 0.9s ease; }
.st-num { font-size: 11px; color: var(--ink-3); }
.queue .queue-time { font: 30px var(--type); margin: 4px 0; }
.ghost-hint { font-size: 15px; }
.queue { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(460px, 92vw); text-align: center; animation: rise 0.3s ease-out; }
.queue h2 { margin: 2px 0 0; }
@keyframes needle { 0% { transform: rotate(-40deg); } 50% { transform: rotate(50deg); } 100% { transform: rotate(-40deg); } }

/* chat */
.chat-log { max-height: 160px; overflow-y: auto; padding: 4px 0 6px; font: 14px/1.45 var(--type); }
.chat-log:empty::before { content: 'No messages yet.'; font: italic 15px var(--serif); color: var(--ink-3); }
.chat-line { padding: 1px 0; overflow-wrap: anywhere; }
.chat-name { font-weight: 700; color: var(--pc, var(--ink)); }
.chat-name::after { content: ':'; color: var(--ink-3); }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form input { flex: 1; font: 15px var(--type); }
.chat-send { padding: 5px 13px 3px; font-size: 16px; }
.chat-dock { position: absolute; left: 34px; bottom: 30px; width: min(340px, 34vw); padding: 8px 12px 10px; background: var(--grain), var(--paper-hi); border: 1px solid var(--ink); box-shadow: 0 10px 18px -12px rgba(60, 40, 15, 0.6); }
.chat-dock .chat-log { max-height: 110px; }
.wire { position: absolute; inset: 0; overflow: hidden; pointer-events: none !important; }
.chat-pop { position: absolute; left: 34px; bottom: 74px; width: 260px; background: var(--paper-hi); border: 1px solid var(--ink); padding: 8px 12px; font: 13px/1.4 var(--type); box-shadow: 0 10px 18px -12px rgba(60, 40, 15, 0.6); border-left: 4px solid var(--pc); animation: wire 5s ease-out forwards; overflow-wrap: anywhere; }
.cp-from { font-weight: 700; color: var(--pc); }
.rrow .rready { display: none; margin-left: 8px; font: italic 13px var(--serif); color: var(--green); border: 1px solid var(--green); padding: 0 5px; }
.rrow .rready.on { display: inline; }
.ready-count { text-align: center; margin: 6px 0 0; min-height: 1.2em; }
@keyframes wire { 0% { opacity: 0; transform: translateY(14px) rotate(-1deg); } 12% { opacity: 1; transform: translateY(0) rotate(-1deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-80px) rotate(-1deg); } }

/* ------------------------------------------------------------ atlas */

.atlas { position: absolute; left: 34px; top: 84px; bottom: 34px; width: 450px; overflow-y: auto; animation: rise 0.35s ease-out; padding-top: 18px; }
.atlas h2 { margin-bottom: 2px; }
.tabs { display: flex; gap: 0; margin: 14px -22px 6px; padding: 0 16px; border-bottom: 1px solid var(--ink); position: sticky; top: -18px; background: var(--paper-hi); z-index: 3; }
.tab { background: none; border: 1px solid transparent; border-bottom: 0; padding: 6px 9px 5px; cursor: pointer; font: 16px var(--serif); color: var(--ink-2); margin-bottom: -1px; white-space: nowrap; }
.tab.on { border-color: var(--ink); background: var(--paper-hi); color: var(--ink); box-shadow: 0 1px 0 var(--paper-hi); }
.tab:hover:not(.on) { color: var(--red); }
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 14px 0 8px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.figure { text-align: center; padding: 8px 4px; }
.figure + .figure { border-left: 1px solid var(--rule); }
.figure b { display: block; font: 30px/1.1 var(--serif); font-weight: 400; }
.figure span { font: italic 14px var(--serif); color: var(--ink-2); }
.finding { margin-top: 22px; }
.finding h4 { color: var(--ink); margin: 0 0 2px; font-size: 20px; }
.finding h4 .num { font: italic 16px var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink-2); margin-right: 8px; }
.country-head { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.legend-line { font-size: 14px; font-style: italic; line-height: 1.9; color: var(--ink-2); }
.sw { display: inline-block; width: 26px; height: 9px; margin-right: 8px; vertical-align: 1px; }
.sw.heat { background: linear-gradient(90deg, rgba(214, 160, 120, 0.6), #b3341f, #6e160e); }
.sw.blue { height: 0; border-top: 2.5px solid var(--blue); }
.sw.ink { height: 0; border-top: 2px solid var(--ink); }
.tier { font: italic 14px var(--serif); border: 1px solid var(--ink-3); padding: 0 6px; color: var(--ink-2); }
.empty { text-align: center; padding: 16px 6px; font-style: italic; }
.colophon-note { font-size: 13px; font-style: italic; color: var(--ink-3); margin-top: 26px; border-top: 1px solid var(--rule); padding-top: 10px; }
.key { position: absolute; right: 34px; bottom: 34px; width: 230px; padding: 10px 14px 10px; }
.key-bar { height: 10px; margin: 8px 0 4px; border: 1px solid var(--ink); background: linear-gradient(90deg, rgb(239, 227, 192), rgb(218, 207, 156), rgb(169, 191, 142), rgb(111, 159, 134), rgb(63, 122, 124), rgb(31, 77, 99)); }
.key-ends { display: flex; justify-content: space-between; font: 10.5px var(--type); color: var(--ink-2); }
.maptip { position: absolute; left: 0; top: 0; padding: 7px 11px; font: 13px var(--type); pointer-events: none !important; z-index: 5; }
.maptip b { font: 17px var(--serif); font-weight: 400; display: block; }

/* Hall of fame */
.margin { font: 700 14px var(--type); white-space: nowrap; }
.margin.up { color: var(--s5); }
.margin.dn { color: var(--s1); }
.podium { list-style: none; margin: 12px 0 6px; padding: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.podium li + li { border-top: 1px solid var(--rule); }
.podium-row { display: grid; grid-template-columns: 46px 1fr auto; align-items: baseline; column-gap: 10px; width: 100%; padding: 10px 2px 9px; background: none; border: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.podium-row .pr-num { grid-row: 1 / 3; align-self: center; text-align: right; font: italic 28px/1 var(--serif); color: var(--ink-2); }
.podium-row .pr-name { font: 22px/1.2 var(--serif); min-width: 0; }
.podium-row .pr-name .cc { vertical-align: 4px; }
.podium-row .margin { font-size: 17px; }
.podium-row .pr-note { grid-column: 2 / 4; font: italic 14px/1.3 var(--serif); color: var(--ink-2); }
.podium li:first-child .pr-num { font-size: 40px; color: var(--ink); }
.podium li:first-child .pr-name { font-size: 28px; }
.podium li:first-child .margin { font-size: 20px; }
.podium-row:hover .pr-name, .champion:hover .ch-nation, .record:hover .rec-t { color: var(--red); }
.btn.quiet.more { margin: 4px 0 0 -4px; font-size: 16px; }
.champions { border-top: 1px solid var(--ink); }
.champion { display: grid; grid-template-columns: 76px 1fr auto; align-items: baseline; column-gap: 10px; width: 100%; padding: 8px 2px 7px; background: none; border: 0; border-bottom: 1px solid var(--rule); text-align: left; color: inherit; font: inherit; cursor: pointer; }
.champion .ch-plate { grid-row: 1 / 3; align-self: center; font: italic 16px var(--serif); color: var(--ink-2); }
.champion .ch-nation { font: 19px/1.2 var(--serif); }
.champion .ch-stat { grid-column: 2 / 4; font: italic 14px var(--serif); color: var(--ink-2); }
.records-list { border-top: 1px solid var(--ink); }
.record { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; width: 100%; padding: 9px 2px 8px; background: none; border: 0; border-bottom: 1px solid var(--rule); text-align: left; color: inherit; font: inherit; cursor: pointer; }
.record .rec-k { font: italic 14px var(--serif); color: var(--ink-2); }
.record .rec-v { grid-column: 2; grid-row: 1 / 3; align-self: center; display: flex; flex-direction: column; align-items: flex-end; }
.record .rec-v b { font: 28px/1 var(--serif); font-weight: 400; white-space: nowrap; }
.record .rec-v small { font: 10.5px var(--type); color: var(--ink-3); margin-top: 4px; white-space: nowrap; }
.record .rec-t { font: 18px/1.3 var(--serif); color: var(--ink); }
.method { margin-top: 22px; }

/* Findings chapters, plate tables, nations */
.chapter { margin: 34px 0 0; padding: 10px 0 8px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); text-align: center; }
.chapter h3 { font: 25px/1.1 var(--serif); letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 2px; }
.chapter p { margin: 0; font: italic 15px/1.35 var(--serif); color: var(--ink-2); }
.chapter .chapter-sum { font: 12px var(--type); font-style: normal; letter-spacing: 0.04em; color: var(--ink); margin-top: 5px; }
.plate-table { border-top: 1px solid var(--ink); }
.plate-row { display: grid; grid-template-columns: 70px 1fr auto auto; align-items: baseline; column-gap: 10px; padding: 7px 0 6px; border-bottom: 1px solid var(--rule); }
.plate-row .pk { font: italic 15px var(--serif); color: var(--ink-2); }
.plate-row .ps { font: 16px/1.3 var(--serif); }
.plate-row .ps2 { color: var(--ink-3); font-size: 14px; font-style: italic; }
.plate-row .prk { font: 12px var(--type); color: var(--ink-3); white-space: nowrap; }
.nation-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 14px; }
.nation-head h3 { font-size: 28px; margin: 0; }
.nation-head h3 .cc { vertical-align: 6px; }
.nation-rank { font: italic 17px var(--serif); color: var(--ink-2); }
.verdict { font: 18px/1.4 var(--serif); margin: 6px 0 2px; }
.verdict .margin { font-size: 16px; }
.all-nations .leader.here .l { color: var(--red); font-weight: 700; }

/* ------------------------------------------------------------ records, modal, toasts */

.records { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: min(780px, 94vw); max-height: 84vh; overflow-y: auto; animation: settle 0.35s ease-out; }
.records-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(60, 45, 20, 0.28); display: grid; place-items: center; opacity: 0; transition: opacity 0.2s; padding: 16px; }
.modal-back.show { opacity: 1; }
.modal { width: min(520px, 100%); max-height: 88vh; overflow-y: auto; transform: translateY(8px); transition: transform 0.2s; padding: 24px 28px; }
.modal.wide { width: min(660px, 100%); }
.modal-back.show .modal { transform: none; }
.name-prompt h2 { margin-bottom: 6px; }
.name-prompt .row { align-items: center; gap: 10px; margin: 18px 0 6px; }
.name-prompt .note { margin: 4px 0 0; }
.idcard .id-name.unnamed { font-style: italic; color: var(--red); }
.die { flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; cursor: pointer;
  color: var(--ink); background: var(--paper-hi); border: 1.5px solid var(--ink); transition: color 0.12s, border-color 0.12s; }
.die:hover { color: var(--red); border-color: var(--red); }
.die.roll svg { animation: roll 0.45s ease-out; }
@keyframes roll { from { transform: rotate(-220deg) scale(0.75); } to { transform: none; } }
.setup .opts { margin-bottom: 2px; }
#toasts { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--paper-hi); border: 1px solid var(--ink); padding: 8px 14px; font: 13px var(--type); box-shadow: 0 10px 18px -12px rgba(60, 40, 15, 0.6); opacity: 0; transform: translateY(-6px); transition: all 0.25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: none; }
.toast.bad { border-left: 4px solid var(--red); }
.toast.good { border-left: 4px solid var(--green); }

/* ------------------------------------------------------------ phones */

@media (max-width: 720px) {
  html, body { font-size: 16px; }
  #topbar { top: 14px; left: 14px; right: 14px; }
  .idcard { padding: 4px 10px; }
  .idcard .id-name { max-width: 140px; font-size: 16px; }
  .idcard .id-meta { font-size: 12.5px; }
  .leave-btn { padding: 4px 9px 3px; font-size: 14px; }
  /* in a game on a phone, only the way out: the logo and the player's card would cover the prompt */
  .top-left:has(.leave-btn) .mark-small { display: none; }
  body[data-route="survey"] .idcard, body[data-route="daily"] .idcard, body[data-route="duel"] .idcard, body[data-route="r"] .idcard { display: none; }
  .title-page { left: 10px; right: 10px; top: 48px; bottom: 10px; width: auto; padding: 22px 16px 18px; }
  .wordmark { font-size: 33px; letter-spacing: 0.08em; }
  .subtitle { font-size: 17px; }
  .entry { grid-template-columns: 30px auto 1fr; padding: 8px 2px; }
  .entry .title { font-size: 21px; }
  .entry .desc { grid-column: 2 / -1; white-space: normal; font-size: 15px; }
  .entry .status { grid-column: 2 / -1; margin-left: 0; }
  .entry .dots { visibility: hidden; }
  .contents-sub, .appendix { margin-left: 32px; padding-left: 0; }
  .hud-top { top: 46px; gap: 6px; }
  .cartouche { padding: 8px 16px 9px; min-width: 220px; }
  .cartouche .ct { font-size: 22px; }
  .cartouche .cs { font-size: 14px; }
  .cartouche.intro { transform: translateY(24vh) scale(1.25); }
  .scalebar { width: 220px; }
  .toolbar { padding: 4px; }
  .tool { padding: 9px 9px; }
  .tool .lbl { display: none; }
  .shape-count, .tsep { display: none; }
  .zoom { display: none; }
  .hud-bottom { bottom: max(14px, env(safe-area-inset-bottom)); }
  .tip { bottom: 80px; }
  .hud-answer { bottom: 10px; width: calc(100% - 20px); }
  .hud-side { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; max-height: 46vh; overflow-y: auto; }
  .hud-side .suggest { bottom: calc(100% + 6px); top: auto; }
  .hud-report { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 50vh; }
  .hud-report .slip { box-shadow: 0 -8px 20px -14px rgba(60, 40, 15, 0.6); border-left: 0; border-right: 0; border-bottom: 0; }
  .summary, .records { width: 96vw; max-height: 86vh; padding: 16px; }
  .total-num { font-size: 44px; }
  .records-cols { grid-template-columns: 1fr; gap: 6px; }
  .lobby { left: 8px; right: 8px; width: auto; top: 46px; bottom: 8px; max-height: none; grid-template-columns: minmax(0, 1fr); }
  .lobby-settings h4 { margin-top: 22px; }
  .room-code { font-size: 40px; }
  .strip { top: auto; bottom: 74px; left: 8px; right: 8px; width: auto; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .strip > * { flex: none; min-width: 150px; }
  .chat-dock { display: none; }
  .chat-pop { left: 8px; right: 8px; width: auto; bottom: auto; top: 60px; }
  .atlas { left: 0; right: 0; width: auto; top: 50vh; bottom: 0; border-left: 0; border-right: 0; border-bottom: 0; padding: 14px 14px 20px; }
  .tabs { margin-left: -14px; margin-right: -14px; top: -14px; overflow-x: auto; }
  .key { right: 8px; bottom: calc(50vh + 8px); width: 170px; }
  .key-ends span:nth-child(2) { display: none; }
  .plates { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
