/* ==========================================================================
   boredatwork.fun — solo game pages (Daily Word, Coffee Run): shared CRT
   chrome matching the landing page's arcade aesthetic. Each page sets its
   cabinet neon via  :root { --ac: ... }  in its own <style> block.

   Deliberately lighter-touch than css/arcade.css: faint static scanlines,
   no boot sequence, no bezel vignette, no flicker — play areas stay clean.
   The privacy page and any non-game pages keep css/style.css.
   ========================================================================== */

:root {
  --bg: #0a0e0a;                               /* CRT black */
  --phos: #ffb000;                             /* phosphor amber */
  --phos-hot: #ffd34d;
  --phos-white: #fff3d6;
  --phos-dim: rgba(255, 176, 0, 0.30);
  --phos-faint: rgba(255, 176, 0, 0.10);
  --text: #ecd9a8;
  --muted: #b08d57;
  --ac: var(--phos);                           /* per-game neon, set per page */
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                  Helvetica, Arial, sans-serif;
  --font-pixel: "Press Start 2P", "Courier New", monospace;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas,
               Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

/* faint phosphor wash, tinted toward the cabinet's neon */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 10%,
      color-mix(in srgb, var(--ac) 5%, transparent), transparent 60%);
}

/* static scanlines — light enough to read as texture, not interference */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.10) 0px,
    rgba(0, 0, 0, 0.10) 1px,
    transparent 1px,
    transparent 3px
  );
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--phos); }

::selection { background: var(--phos); color: #0a0e0a; }

:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Header — same service rail as the landing page (coin slot included)
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--phos-dim);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--phos-white);
  text-shadow: 0 0 10px rgba(255, 176, 0, 0.45);
}

.logo span { color: var(--phos); }
.logo .tld { color: var(--muted); font-weight: 600; }

.coin-slot {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  color: var(--phos);
  background: transparent;
  border: 2px solid var(--phos-dim);
  border-radius: 3px;
  padding: 0.5rem 0.8rem 0.42rem;
  cursor: pointer;
  text-shadow: 0 0 8px rgba(255, 176, 0, 0.5);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.coin-slot:hover {
  border-color: var(--phos);
  box-shadow: 0 0 14px rgba(255, 176, 0, 0.25);
}

.coin-slot.coin-bump { animation: coin-bump 0.3s steps(3, jump-none); }

@keyframes coin-bump {
  0%   { color: var(--phos-white); box-shadow: 0 0 22px rgba(255, 176, 0, 0.6); }
  100% { color: var(--phos); }
}

/* --------------------------------------------------------------------------
   Game masthead — pixel title lit in the cabinet's neon
   -------------------------------------------------------------------------- */

.game-head { text-align: center; padding: 1.9rem 0 0.5rem; }

.game-head h1 {
  font-family: var(--font-pixel);
  font-size: clamp(1.05rem, 4vw, 1.5rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
  color: var(--ac);
  text-shadow:
    0 0 14px color-mix(in srgb, var(--ac) 60%, transparent),
    0 0 48px color-mix(in srgb, var(--ac) 25%, transparent);
}

.game-head .sub { color: var(--muted); font-size: 0.85rem; margin: 0; }
.game-head .puzzle-no { color: var(--ac); font-weight: 700; }

.back-link {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--phos-dim);
  border-radius: 3px;
  padding: 0.45rem 0.8rem 0.38rem;
  margin-top: 0.9rem;
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--phos);
  border-color: var(--phos);
  box-shadow: 0 0 14px rgba(255, 176, 0, 0.25);
}

/* --------------------------------------------------------------------------
   Shared bits: panels, how-to, kbd, ad slot, footer
   -------------------------------------------------------------------------- */

.panel {
  background:
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.10) 0px, rgba(0, 0, 0, 0.10) 1px,
      transparent 1px, transparent 3px),
    rgba(255, 176, 0, 0.035);
  border: 1px solid var(--phos-dim);
  border-radius: 5px;
}

.how { color: var(--muted); font-size: 0.8rem; }

.how summary {
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.how summary:hover { color: var(--phos); }
.how ul { margin: 0.6rem 0 0; padding-left: 1.1rem; }
.how li { margin: 0.3rem 0; }

kbd {
  display: inline-block;
  min-width: 1.7em;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.95em;
  color: var(--phos-hot);
  background: rgba(255, 176, 0, 0.08);
  border: 1px solid var(--phos-dim);
  border-bottom-width: 3px;
  border-radius: 4px;
  padding: 0.08rem 0.4rem 0.05rem;
  text-shadow: 0 0 6px rgba(255, 176, 0, 0.5);
}

/* INSERT COIN-style action button (share, play again) */
.pixel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ac);
  background: transparent;
  border: 2px solid var(--ac);
  border-radius: 3px;
  padding: 0.7rem 1.2rem 0.6rem;
  cursor: pointer;
  text-shadow: 0 0 8px color-mix(in srgb, var(--ac) 55%, transparent);
  transition: background-color 0.12s ease, color 0.12s ease,
              box-shadow 0.12s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .pixel-btn { animation: btn-pulse 1.4s steps(1) infinite; }
}

@keyframes btn-pulse {
  0%, 64%   { box-shadow: 0 0 14px color-mix(in srgb, var(--ac) 30%, transparent); }
  65%, 100% { box-shadow: 0 0 3px color-mix(in srgb, var(--ac) 10%, transparent); }
}

.pixel-btn:hover,
.pixel-btn:focus-visible {
  background: var(--ac);
  color: #0a0e0a;
  text-shadow: none;
  box-shadow: 0 0 26px color-mix(in srgb, var(--ac) 55%, transparent);
  animation: none;
}

.ad-slot { margin: 0 0 2.5rem; }

.ad-slot-inner:not(:empty) {
  min-height: 90px;
  display: flex;
  justify-content: center;
  border: 1px solid var(--phos-dim);
  border-radius: 5px;
  overflow: hidden;
}

.ad-slot:has(.ad-slot-inner:empty) { display: none; }

.site-footer {
  border-top: 1px solid var(--phos-dim);
  margin-top: 2.5rem;
  padding: 1.3rem 0 1.6rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.footer-inner p { margin: 0.15rem 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--phos); }
.footer-tag { opacity: 0.75; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .coin-slot, .back-link, .pixel-btn { transition: none; }
  .coin-slot.coin-bump { animation: none; }
}

/* ==========================================================================
   BOSS MODE — the fake spreadsheet. Deliberately NOT themed. (Copied from
   style.css so these pages stand alone; keep the copies in sync.)
   ========================================================================== */

#boss-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  color: #222222;
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  cursor: cell;
}

#boss-screen[hidden] { display: none; }

.xl-ribbon {
  background: #f3f2f1;
  border-bottom: 1px solid #d4d2d0;
  padding: 4px 8px 0;
  user-select: none;
}

.xl-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 6px;
  font-size: 12px;
  color: #444;
}

.xl-logo {
  background: #107c41;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  border-radius: 3px;
  padding: 2px 5px;
}

.xl-menus {
  display: flex;
  gap: 2px;
  font-size: 12.5px;
  color: #333;
  overflow-x: auto;
  scrollbar-width: none;
}

.xl-menus span {
  padding: 5px 10px 7px;
  border-radius: 4px 4px 0 0;
  white-space: nowrap;
}

.xl-menus span:hover { background: #e6e4e2; }

.xl-menus .active {
  background: #ffffff;
  border: 1px solid #d4d2d0;
  border-bottom: none;
  color: #107c41;
  font-weight: 600;
}

.xl-formulabar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #d4d2d0;
  background: #ffffff;
  font-size: 12px;
  user-select: none;
}

.xl-namebox {
  width: 72px;
  padding: 4px 8px;
  border-right: 1px solid #d4d2d0;
  color: #333;
  flex-shrink: 0;
}

.xl-fx {
  padding: 4px 8px;
  color: #888;
  border-right: 1px solid #e8e6e4;
  font-style: italic;
  font-family: Georgia, serif;
  flex-shrink: 0;
}

.xl-formula {
  padding: 4px 8px;
  font-family: Calibri, "Segoe UI", sans-serif;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
}

.xl-grid-wrap { flex: 1; overflow: auto; background: #ffffff; }

.xl-grid { border-collapse: collapse; table-layout: fixed; }

.xl-grid th,
.xl-grid td {
  border: 1px solid #e2e0de;
  padding: 2px 6px;
  height: 20px;
  white-space: nowrap;
  overflow: hidden;
  font-weight: normal;
  text-align: left;
}

.xl-grid th {
  background: #f3f2f1;
  border-color: #d4d2d0;
  color: #555;
  text-align: center;
  font-size: 11.5px;
  user-select: none;
  position: sticky;
}

.xl-grid thead th { top: 0; z-index: 2; }
.xl-grid tbody th { left: 0; z-index: 1; width: 36px; }
.xl-grid thead th:first-child { left: 0; z-index: 3; }

.xl-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.xl-grid td.neg { color: #c00000; }
.xl-grid td.head { font-weight: 700; background: #f8f8f8; }
.xl-grid tr.total td { font-weight: 700; border-top: 2px solid #555; }

.xl-grid td.selected {
  outline: 2px solid #107c41;
  outline-offset: -2px;
}

.xl-tabs {
  display: flex;
  align-items: center;
  gap: 1px;
  background: #f3f2f1;
  border-top: 1px solid #d4d2d0;
  padding: 0 6px;
  font-size: 12px;
  user-select: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.xl-tabs span {
  padding: 4px 12px;
  border: 1px solid #d4d2d0;
  border-top: none;
  background: #eae8e6;
  color: #444;
  white-space: nowrap;
}

.xl-tabs .active {
  background: #ffffff;
  color: #107c41;
  font-weight: 600;
  border-bottom: 2px solid #107c41;
}

.xl-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #107c41;
  color: #ffffff;
  font-size: 11.5px;
  padding: 3px 12px;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}
