/* Nerdcore Dayz 2027 — Pixelville H.O.A. "90s government web site" */

:root {
  --navy: #000066;
  --gold: #c9a227;
  --red: #cc0000;
  --gray: #c0c0c0;
  --link: #0000cc;
  --visited: #551a8b;
  --notice: #fffbe6;
  --th: #dde3f0;
  --serif: "Times New Roman", Times, serif;
  --sans: Arial, Helvetica, sans-serif;
  --mono: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }
html { background: #808080; }
body {
  margin: 0 auto;
  max-width: 1000px;
  background: #fff;
  color: #000;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
}
a { color: var(--link); }
a:hover { color: var(--red); }
:focus-visible { outline: 2px dotted #000; outline-offset: 2px; }
.site-header :focus-visible, .site-footer :focus-visible, .offair :focus-visible { outline: 2px dotted #fff; box-shadow: 0 0 0 4px #000; }
img { max-width: 100%; }
h2, h3 { color: var(--navy); }
h2.section, h3.section { margin: 0; font-size: 20px; border-bottom: 2px solid var(--navy); padding-bottom: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; padding: 8px 12px; font-family: var(--sans); }
.skip:focus { left: 8px; top: 8px; }
.ext { font-family: var(--sans); font-size: 0.75em; margin-left: 2px; text-decoration: none; display: inline-block; }

/* ---------- Header ---------- */
.gov-strip {
  background: #eee; font-family: var(--sans); font-size: 11px; color: #333;
  padding: 4px 10px; border-bottom: 1px solid #ccc;
}
.site-header {
  background: var(--navy); display: flex; align-items: center; gap: 20px;
  padding: 18px 20px; border-bottom: 6px solid var(--gold);
}
.site-header .seal { width: 108px; height: 108px; flex-shrink: 0; }
.site-header .dept { color: var(--gold); font-family: var(--sans); font-size: 12px; letter-spacing: 3px; font-weight: bold; margin: 0; }
.site-title {
  margin: 0; color: #fff; font-size: 52px; font-weight: bold; letter-spacing: 2px;
  text-shadow: 3px 3px 0 #000; line-height: 1.05;
}
.site-title a { color: inherit; text-decoration: none; }
.tagline { color: #fff; font-size: 18px; font-style: italic; margin: 4px 0 0; }

/* ---------- Bevel ---------- */
.bev {
  display: inline-block; background: var(--gray); color: #000; text-decoration: none;
  font-family: var(--sans); font-weight: bold;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #404040; border-bottom: 2px solid #404040;
  padding: 6px 14px; font-size: 13px; cursor: pointer; line-height: 1.3;
}
a.bev:hover, button.bev:hover { color: #000; background: #d0d0d0; }
.bev:active, .bev[aria-current="page"] {
  border-top-color: #404040; border-left-color: #404040; border-right-color: #fff; border-bottom-color: #fff;
}
.bev[aria-current="page"] { background: #a8a8a8; }
button.bev[disabled] { color: #808080; cursor: not-allowed; text-shadow: 1px 1px 0 #fff; }
.bev.big { padding: 10px 24px; font-size: 15px; }

/* ---------- Nav + construction ---------- */
.main-nav { background: var(--gray); padding: 6px; border-bottom: 1px solid #808080; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.construction {
  background: repeating-linear-gradient(45deg, #ffcc00 0 18px, #000 18px 36px);
  padding: 6px 4px; display: flex; justify-content: center;
}
.construction span {
  background: #ffcc00; color: #000; font-family: var(--sans); font-weight: bold; font-size: 13px;
  padding: 3px 14px; border: 2px solid #000; text-align: center;
}

/* ---------- Layout ---------- */
main { display: block; padding: 16px 12px; }
.grid-3col { display: flex; gap: 16px; align-items: flex-start; padding: 16px 12px; }
.grid-3col > main { flex: 1; min-width: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.col-left { order: -1; width: 180px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.col-right { width: 210px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.page-h1 { margin: 0 0 12px; font-size: 30px; color: var(--navy); }
.lede { font-family: var(--sans); font-size: 12px; color: #333; margin: 6px 0 10px; }
main > section + section { margin-top: 18px; }
.grid-3col > main > section + section { margin-top: 0; }
hr.groove { border: 0; border-top: 2px groove var(--gray); margin: 12px 0; }

/* ---------- Boxes ---------- */
.box { border: 1px solid var(--navy); background: #fff; }
.boxhead {
  background: var(--navy); color: #fff; font-family: var(--sans); font-weight: bold;
  font-size: 13px; padding: 4px 8px; letter-spacing: 1px; margin: 0;
}
.box-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.box-body ul { margin: 0; padding-left: 18px; }
.box-body p { margin: 0; }
.box-body .bev { text-align: center; }
.sponsor-ask { border: 2px dashed var(--red); padding: 8px; font-size: 13px; text-align: center; line-height: 1.4; }

/* ---------- Notices ---------- */
.notice {
  border: 3px double var(--navy); background: var(--notice); padding: 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.notice > * { margin: 0; }
.notice .kicker { font-family: var(--sans); font-size: 12px; font-weight: bold; color: var(--red); letter-spacing: 2px; }
.notice h2 { font-size: 26px; }
.notice.red { border-color: var(--red); }
.notice.red h2 { color: var(--red); }
.notice-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.notice-table th, .notice-table td { border: 1px solid #808080; padding: 6px 8px; text-align: left; vertical-align: top; }
.notice-table th { background: var(--th); font-weight: bold; width: 140px; }
.stamp {
  display: inline-block; border: 3px solid var(--red); color: var(--red); font-family: var(--sans);
  font-weight: bold; font-size: 14px; letter-spacing: 1px; padding: 2px 8px; transform: rotate(-5deg);
  background: rgba(255,255,255,.6);
}
.new-badge {
  background: var(--red); color: #fff; font-family: var(--sans); font-size: 10px; font-weight: bold;
  padding: 1px 4px; margin-right: 4px;
}
.news ul, ul.news { margin: 0; padding-left: 22px; font-size: 15px; line-height: 1.6; }

/* ---------- Registry ---------- */
.registry { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.vacant { border: 1px dashed #808080; background: #fafafa; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.vacant .lot {
  aspect-ratio: 1 / 1; background: repeating-linear-gradient(45deg, #eee 0 10px, #e0e0e0 10px 20px);
  display: flex; align-items: center; justify-content: center; font-family: var(--sans);
  font-size: 11px; font-weight: bold; color: #555; text-align: center;
}
.vacant .lot { position: relative; flex-direction: column; gap: 6px; }
.vacant .lot-no { font-size: 13px; letter-spacing: 1px; }
.vacant .sold {
  border: 3px double var(--red); color: var(--red); background: rgba(255, 255, 255, 0.7);
  font-size: 18px; letter-spacing: 3px; padding: 2px 8px; transform: rotate(-12deg);
}
.vacant .pending { font-size: 13px; font-style: italic; color: #555; }
.resident { border: 1px solid #808080; background: #fff; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.resident a { display: flex; flex-direction: column; gap: 4px; }
.resident .lot {
  aspect-ratio: 1 / 1; background: #e0e0e0; display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-family: var(--sans); font-size: 11px; font-weight: bold; color: #555;
}
.resident .lot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resident .name { font-weight: bold; font-size: 15px; }
.resident .day { font-size: 13px; color: #555; }

/* ---------- Broadcast ---------- */
.offair {
  aspect-ratio: 16 / 9; background: #000; border: 4px solid #404040; color: #33ff33;
  font-family: var(--mono); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; text-align: center; padding: 8px;
}
.offair .big { font-size: 30px; font-weight: bold; letter-spacing: 4px; }
.offair a { color: #33ff33; }
.tv { background: var(--gray); border: 2px solid; border-color: #fff #404040 #404040 #fff; padding: 10px 10px 6px; }
.tv-label { font-family: var(--sans); font-size: 11px; font-weight: bold; letter-spacing: 2px; margin: 6px 0 0; text-align: right; }
.tv-row { display: flex; gap: 10px; }
.tv-screen { flex: 1; min-width: 0; position: relative; aspect-ratio: 16 / 9; background: #000; border: 4px solid #404040; }
.tv-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tv-chat { width: 340px; flex-shrink: 0; border: 2px inset #808080; background: #fff; }
.tv-chat iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ---------- Counter ---------- */
.counter { font-family: var(--sans); font-size: 11px; color: #333; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; }
.counter .digits {
  background: #000; color: #33ff33; font-family: var(--mono); font-size: 18px; padding: 2px 6px;
  letter-spacing: 3px; border: 2px inset #808080;
}

/* ---------- Partners ---------- */
.partners { margin: 0 12px; border-top: 2px groove var(--gray); padding: 14px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.partners .thanks { font-size: 16px; font-style: italic; color: var(--navy); margin: 0; }
.venue-badge {
  width: 176px; height: 62px; background: var(--navy); color: #fff; font-family: var(--sans);
  font-size: 12px; font-weight: bold; display: flex; align-items: center; justify-content: center;
  border: 2px outset var(--gray); text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy); color: #fff; padding: 16px 20px; display: flex; flex-direction: column;
  gap: 8px; font-family: var(--sans); font-size: 12px; align-items: center; text-align: center;
}
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.site-footer .footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.site-footer .best-viewed { color: var(--gold); }

/* ---------- FAQ / definition lists ---------- */
dl.faq dt { font-weight: bold; color: var(--navy); margin-top: 14px; font-size: 17px; }
dl.faq dd { margin: 4px 0 0 20px; }

/* ---------- Effects (blink + burst) ---------- */
@keyframes ncdzBlink { 50% { visibility: hidden; } }
html:not(.no-effects) .blink { animation: ncdzBlink 1s steps(1, end) infinite; }
@keyframes ncdzBurst {
  0% { transform: translate(0, 0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
.burst-dot { position: fixed; width: 4px; height: 4px; pointer-events: none; z-index: 10000; animation: ncdzBurst 450ms steps(5, end) forwards; }
@media (prefers-reduced-motion: reduce) {
  .blink, .burst-dot { animation: none !important; }
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .grid-3col { flex-direction: column; }
  .grid-3col > main { order: 1; width: 100%; }
  .col-left { order: 2; width: 100%; }
  .col-right { order: 3; width: 100%; }
  .tv-row { flex-direction: column; }
  .tv-chat { width: 100%; }
}
@media (max-width: 640px) {
  .site-header { padding: 12px; gap: 12px; }
  .site-header .seal { width: 64px; height: 64px; }
  .site-title { font-size: 30px; }
  .tagline { font-size: 14px; }
  .site-header .dept { font-size: 10px; letter-spacing: 2px; }
  .main-nav ul { display: grid; grid-template-columns: 1fr 1fr; }
  .main-nav .bev { display: flex; align-items: center; justify-content: center; min-height: 44px; width: 100%; font-size: 14px; }
  .registry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice-table th { width: 96px; }
  .bev { min-height: 44px; }
  .site-footer .footer-links a { display: inline-block; padding: 12px 4px; }
}

/* ---------- Retro cursors (desktop mouse only, effects on) ---------- */
@media (hover: hover) and (pointer: fine) {
  html:not(.no-effects), html:not(.no-effects) body {
    cursor: url(/assets/cursors/gray-arrow-1x.png) 0 0, default;
    cursor: -webkit-image-set(url(/assets/cursors/gray-arrow-1x.png) 1x, url(/assets/cursors/gray-arrow-2x.png) 2x) 0 0, default;
    cursor: image-set(url(/assets/cursors/gray-arrow-1x.png) 1x, url(/assets/cursors/gray-arrow-2x.png) 2x) 0 0, default;
  }
  html:not(.no-effects) a, html:not(.no-effects) a *, html:not(.no-effects) button, html:not(.no-effects) .bev, html:not(.no-effects) summary {
    cursor: url(/assets/cursors/gray-hand-1x.png) 11 0, pointer;
    cursor: -webkit-image-set(url(/assets/cursors/gray-hand-1x.png) 1x, url(/assets/cursors/gray-hand-2x.png) 2x) 11 0, pointer;
    cursor: image-set(url(/assets/cursors/gray-hand-1x.png) 1x, url(/assets/cursors/gray-hand-2x.png) 2x) 11 0, pointer;
  }
  html:not(.no-effects) button[disabled] { cursor: not-allowed; }
  html:not(.no-effects) input, html:not(.no-effects) textarea { cursor: text; }
}

/* ---------- Visitor Info eggs ---------- */
.arrivals { background: #000; color: #ffcc00; font-family: var(--mono); }
.arrivals caption { text-align: left; font-family: var(--sans); font-weight: bold; color: var(--navy); padding: 4px 0; }
.arrivals th { background: #222; color: #fff; font-family: var(--sans); width: auto; }
.arrivals td { border-color: #444; }
.arrivals .delayed { color: #ff5555; }
.eta { font-family: var(--mono); font-weight: bold; color: var(--red); }
progress { width: 100%; max-width: 360px; height: 18px; }
.form-error { color: var(--red); font-weight: bold; }
.fine-print { font-family: var(--sans); font-size: 12px; color: #333; }
input[type="text"] { font-family: var(--mono); font-size: 16px; padding: 4px; border: 2px inset #808080; }

/* ---------- Message board ---------- */
.board { font-size: 16px; }
.forum { width: 100%; border-collapse: collapse; border: 2px solid var(--navy); font-family: var(--sans); }
.forum th { background: var(--navy); color: #fff; font-size: 14px; text-align: left; padding: 8px 10px; }
.forum td { padding: 14px 10px; border-top: 1px solid var(--gray); vertical-align: top; }
.forum tbody tr:nth-child(odd) { background: var(--notice); }
.forum .topic a { font-size: 18px; }
.forum .starter { display: block; font-size: 13px; color: #444; margin-top: 4px; }
.forum .preview { display: block; font-size: 15px; color: #222; margin-top: 8px; line-height: 1.5; }
.forum .replies { width: 80px; text-align: center; font-size: 18px; font-weight: bold; }
.forum th.replies { font-size: 14px; }
.forum .last { width: 170px; font-size: 13px; }
@media (max-width: 600px) {
  .forum .last { display: none; }
  .forum .replies { width: 56px; }
}
.post .msg { border: 1px solid var(--gray); border-left: 4px solid var(--gold); background: #fff; padding: 10px 12px; margin: 10px 0 0; }
.post .msg .msg { margin-left: 24px; background: var(--notice); }
.post .msg.is-target { outline: 3px solid var(--red); outline-offset: 2px; }
.post .msg-title { font-family: var(--sans); font-size: 16px; color: var(--navy); margin: 0 0 4px; }
.post .post-body p { font-size: 16px; line-height: 1.6; margin: 6px 0; }
@media (max-width: 600px) { .post .msg .msg { margin-left: 10px; } }
.board a:visited, .board a:active { color: var(--visited); }
.board .when { font-size: 13px; color: #444; }
.post { border: 2px solid var(--navy); margin-top: 16px; }
.post .post-title { background: var(--navy); color: #fff; font-family: var(--sans); font-size: 14px; font-weight: bold; padding: 4px 8px; margin: 0; }
.post .post-inner { padding: 10px 12px; }
.post .post-meta { font-family: var(--sans); font-size: 12px; color: #333; margin-top: 0; }
.post .locked { font-family: var(--sans); font-size: 12px; color: #555; }

/* ---------- Content pages ---------- */
.registry-page { margin-top: 16px; }
main ol, main ul:not(.registry):not(.news) { padding-left: 24px; }
main ol li, main ul li { margin: 4px 0; }

/* ---------- Recreation Center: game window ---------- */
.gw-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; padding: 12px; overflow: auto; }
.game-window { background: var(--gray); border: 2px solid; border-color: #fff #404040 #404040 #fff; box-shadow: 2px 2px 0 #000; max-width: 100%; max-height: 100%; overflow: auto; font-family: var(--sans); }
.title-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--navy); color: #fff; padding: 3px 4px 3px 8px; }
.title-bar h2 { margin: 0; font-size: 15px; font-family: var(--sans); color: #fff; }
.gw-buttons { display: flex; gap: 4px; }
.gw-buttons .bev { padding: 2px 8px; font-size: 13px; min-height: 26px; }
.gw-stage { position: relative; padding: 10px; }
.pause-cover { position: absolute; inset: 0; background: var(--gray); display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-weight: bold; }
.pause-cover[hidden] { display: none; }
@media (max-width: 600px) {
  .gw-backdrop { padding: 0; align-items: flex-start; }
  .game-window { width: 100%; }
}

/* ---------- Recreation Center: Program Manager ---------- */
.progman { background: var(--gray); border: 2px solid; border-color: #fff #404040 #404040 #fff; box-shadow: 2px 2px 0 #000; font-family: var(--sans); margin: 16px 0; }
.progman > .title-bar { justify-content: center; }
.pm-title { font-weight: bold; font-size: 15px; }
.pm-menu { display: flex; gap: 14px; padding: 3px 8px; background: #fff; border-bottom: 1px solid #808080; font-size: 13px; }
.pm-menu span:first-letter { text-decoration: underline; }
.pm-group { margin: 10px; background: #fff; border: 2px solid; border-color: #404040 #fff #fff #404040; }
.pm-group-title { margin: 0; font-size: 14px; justify-content: center; background: #808080; color: #fff; }
.icon-grid { list-style: none; margin: 0; padding: 16px 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 6px 4px; background: none; border: 1px dotted transparent; font: 13px var(--sans); color: #000; cursor: pointer; text-align: center; }
.app-icon svg { width: 48px; height: 48px; image-rendering: pixelated; }
.app-icon:hover span, .app-icon:focus-visible span { background: var(--navy); color: #fff; }
.app-icon:focus-visible { outline: 1px dotted #000; outline-offset: 2px; }
.app-icon.disabled svg { opacity: 0.45; filter: grayscale(1); }
.app-icon.disabled span { color: #555; }
.gw-message { margin: 16px 8px; font-size: 15px; }

/* ---------- Recreation Center: Code Enforcement ---------- */
.ce { display: flex; flex-direction: column; gap: 10px; width: max-content; max-width: 100%; margin: 0 auto; }
.ce-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.ce-left, .ce-time { font-family: var(--mono); font-weight: bold; background: #000; color: #ff3333; padding: 3px 6px; border: 2px solid; border-color: #404040 #fff #fff #404040; }
.ce-time { min-width: 52px; text-align: center; }
.ce-status .bev { padding: 4px 10px; font-size: 13px; }
.ce-flag-mode[aria-pressed="true"] { background: #a8a8a8; border-color: #404040 #fff #fff #404040; }
.ce-board { display: grid; gap: 0; border: 3px solid; border-color: #404040 #fff #fff #404040; background: #808080; width: max-content; margin: 0 auto; }
.ce-board [role="row"] { display: flex; }
.ce-board [role="gridcell"] { display: block; }
.ce-lot {
  width: 40px; height: 40px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center;
  font: bold 18px var(--sans); color: #000; background: var(--gray); cursor: pointer;
  border: 3px solid; border-color: #fff #808080 #808080 #fff; border-radius: 0; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.ce-lot:focus-visible { outline: 2px dotted #000; outline-offset: -6px; }
.ce-lot.ce-open { background: #e8e8e8; border: 1px solid #a0a0a0; cursor: default; }
.ce-lot.ce-flagged { font-size: 18px; }
.ce-n1 { color: #0000cc; } .ce-n2 { color: #006600; } .ce-n3 { color: #b00000; } .ce-n4 { color: #000066; }
.ce-n5 { color: #660000; } .ce-n6 { color: #005f5f; } .ce-n7 { color: #000; } .ce-n8 { color: #555; }
.ce-lot.ce-cited { background: var(--red); color: #fff; border: 1px solid #660000; font-size: 9px; letter-spacing: 0.5px; }
.ce-lot.ce-wrong { color: var(--red); background: #e8e8e8; border: 1px solid #a0a0a0; }
.ce-notice { background: var(--notice); border: 2px solid var(--navy); outline: 1px solid var(--navy); outline-offset: 3px; padding: 10px 14px; font-family: var(--mono); font-size: 14px; max-width: 340px; margin: 4px auto 0; }
.ce-notice p { margin: 4px 0; }
.ce-notice .ce-notice-h { font-family: var(--sans); font-weight: bold; letter-spacing: 1px; color: var(--red); }
.ce-certificate .ce-notice-h { color: var(--navy); }
.ce-notice.slide { animation: ce-slide 0.35s ease-out; }
@keyframes ce-slide { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 420px) {
  .ce-lot { width: 36px; height: 36px; font-size: 16px; }
  .ce-lot.ce-cited { font-size: 8px; }
}

/* The visitor counter secretly opens the Recreation Center: no link look. */
.counter-link { color: inherit; text-decoration: none; cursor: default; }
.counter-link:focus-visible { outline: 1px dotted #000; outline-offset: 2px; }

/* ---------- Recreation Center: Route 2 ---------- */
.r2 { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.r2-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 14px; }
.r2-counter { font-family: var(--mono); font-weight: bold; background: #000; color: #ffcc00; padding: 3px 6px; border: 2px solid; border-color: #404040 #fff #fff #404040; }
.r2-status .bev { padding: 4px 10px; font-size: 13px; }
.r2-board {
  --cell: 20px;
  display: grid; grid-template-columns: repeat(16, var(--cell)); grid-auto-rows: var(--cell);
  border: 4px solid; border-color: #9a9a9a #4a4a4a #4a4a4a #9a9a9a; outline: 2px solid #6b6b6b;
  background-color: #b8b8b8;
  background-image: linear-gradient(#ccc 1px, transparent 1px), linear-gradient(90deg, #ccc 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.r2-cell { position: relative; }
.r2-bus { background: #e6b800; border: 2px solid #7a5c00; border-radius: 3px; }
.r2-bus::after { content: ""; position: absolute; background: #5a8fbf; }
.r2-face-right::after { right: 1px; top: 3px; bottom: 3px; width: 4px; }
.r2-face-left::after { left: 1px; top: 3px; bottom: 3px; width: 4px; }
.r2-face-up::after { top: 1px; left: 3px; right: 3px; height: 4px; }
.r2-face-down::after { bottom: 1px; left: 3px; right: 3px; height: 4px; }
.r2-line::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px solid #000; }
.r2-c0::after { background: var(--red); } .r2-c1::after { background: var(--navy); } .r2-c2::after { background: #2e8b57; }
.r2-stop::before { content: ""; position: absolute; left: 3px; top: 2px; width: 3px; height: 16px; background: #555; }
.r2-stop::after { content: ""; position: absolute; left: 8px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #c47a2c; border: 1px solid #000; box-shadow: 0 7px 0 -1px var(--navy); }
.r2-hint { margin: 0; font-size: 14px; font-weight: bold; }
.r2-hint[hidden] { display: none; }
.r2-pad { display: grid; grid-template-columns: repeat(3, 48px); grid-template-areas: ". up ." "left . right" ". down ."; gap: 4px; }
.r2-pad .bev { width: 48px; height: 44px; padding: 0; font-size: 18px; }
.r2-pad .r2-up { grid-area: up; } .r2-pad .r2-left { grid-area: left; } .r2-pad .r2-right { grid-area: right; } .r2-pad .r2-down { grid-area: down; }
.r2-report { background: var(--notice); border: 2px solid var(--navy); outline: 1px solid var(--navy); outline-offset: 3px; padding: 10px 14px; font-family: var(--mono); font-size: 14px; max-width: 340px; }
.r2-report p { margin: 4px 0; }
.r2-report .r2-report-h { font-family: var(--sans); font-weight: bold; letter-spacing: 1px; color: var(--navy); }
.r2-report .r2-zero { font-weight: bold; color: var(--red); }
.r2-report.slide { animation: ce-slide 0.35s ease-out; }
@media (max-width: 420px) { .r2-board { --cell: 18px; } }
@media (hover: hover) and (pointer: fine) { .r2-pad { display: none; } }
