/* ============================================================
   bedlam shared site styles
   Generated from former per-page style blocks.
   ============================================================ */

:root {
  --green-dark:   #1a2e1a;
  --green-mid:    #2d4a2d;
  --green-light:  #3d6b3d;
  --green-pale:   #c8d8c0;
  --cream:        #f4f0e4;
  --red:          #9b1c1c;
  --red-bright:   #c0392b;
  --text:         #1e1e1e;
  --text-light:   #f4f0e4;
  --border:       #4a6a4a;
  --console-bg:   #00ff01;
  --font-title:   Georgia, 'Times New Roman', serif;
  --font-body:    'Helvetica Neue', Arial, sans-serif;
  --radius:       4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* index.html */
body.bedlam-home *, body.bedlam-home *::before, body.bedlam-home *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.bedlam-home {
      font-family: var(--font-body);
      font-size: 16px;
      line-height: 1.65;
      color: var(--text);
      background:
        radial-gradient(circle at 16% 0%, rgba(192,57,43,0.10), transparent 25rem),
        radial-gradient(circle at 84% 8%, rgba(61,107,61,0.18), transparent 30rem),
        linear-gradient(180deg, #f8f4ea 0%, var(--cream) 46%, #dfe8d6 100%);
    }

body.bedlam-home img { max-width: 100%; height: auto; display: block; }

body.bedlam-home a { color: var(--red); text-decoration: underline; }

body.bedlam-home a:hover { color: var(--red-bright); }

body.bedlam-home h1, body.bedlam-home h2, body.bedlam-home h3 { font-family: var(--font-title); line-height: 1.2; }

body.bedlam-home .site-nav {
      background: var(--green-dark);
      border-bottom: 3px solid var(--red);
      position: sticky;
      top: 0;
      z-index: 100;
    }

body.bedlam-home .nav-inner {
      max-width: 900px;
      margin: 0 auto;
      padding: 0 clamp(1.5rem, 3vw, 2.25rem);
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 56px;
    }

body.bedlam-home .nav-logo {
      font-family: var(--font-title);
      font-size: 1.4rem;
      color: var(--red-bright);
      text-decoration: none;
      letter-spacing: 2px;
      text-transform: uppercase;
    }

body.bedlam-home .nav-links {
      display: flex;
      gap: 1.5rem;
      list-style: none;
    }

body.bedlam-home .nav-links a {
      color: var(--green-pale);
      text-decoration: none;
      font-size: 0.9rem;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      transition: color 0.2s;
    }

body.bedlam-home .nav-links a:hover { color: #fff; }

body.bedlam-home .lightbox-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.92);
      z-index: 999;
      align-items: center;
      justify-content: center;
      cursor: zoom-out;
      padding: 1rem;
    }

body.bedlam-home .lightbox-overlay.open { display: flex; }

body.bedlam-home .lightbox-inner {
      display: flex;
      gap: 1.5rem;
      align-items: flex-start;
      justify-content: center;
      cursor: default;
      max-width: 96vw;
      max-height: 92vh;
      overflow: auto;
    }

body.bedlam-home .lightbox-inner img {
      max-height: 88vh;
      max-width: 46vw;
      width: auto;
      height: auto;
      border: 3px solid var(--border);
      box-shadow: 0 8px 40px rgba(0,0,0,0.8);
      flex-shrink: 0;
    }

body.bedlam-home .lightbox-close {
      position: fixed;
      top: 1rem;
      right: 1.25rem;
      color: #fff;
      font-size: 2.5rem;
      line-height: 1;
      cursor: pointer;
      background: none;
      border: none;
      opacity: 0.8;
      z-index: 1000;
    }

body.bedlam-home .lightbox-close:hover { opacity: 1; }

body.bedlam-home .hero-covers img { cursor: zoom-in; }

body.bedlam-home .nav-toggle {
      display: none;
      width: 42px;
      height: 42px;
      background: rgba(0,0,0,0.16);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      cursor: pointer;
      padding: 8px;
    }

body.bedlam-home .nav-toggle span {
      display: block;
      width: 24px;
      height: 2px;
      background: var(--green-pale);
      margin: 5px 0;
      transition: 0.3s;
    }

body.bedlam-home .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }

body.bedlam-home .nav-toggle.is-open span:nth-child(2) { opacity: 0; }

body.bedlam-home .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
body.bedlam-home .nav-toggle { display: block; }

body.bedlam-home .nav-inner { padding: 0 1.5rem; }

body.bedlam-home .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0; right: 0;
        background: var(--green-dark);
        border-bottom: 3px solid var(--red);
        padding: 1rem 1.5rem;
        gap: 0.75rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.2s, transform 0.2s;
      }

body.bedlam-home .nav-links.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
      }

body.bedlam-home .nav-links a {
        display: block;
        padding: 0.45rem 0;
      }

}

body.bedlam-home .hero {
      background:
        radial-gradient(circle at 50% 8%, rgba(192,57,43,0.18), transparent 22rem),
        radial-gradient(circle at 82% 70%, rgba(200,216,192,0.12), transparent 24rem),
        linear-gradient(180deg, #132713 0%, var(--green-dark) 58%, var(--green-mid) 100%);
      color: var(--text-light);
      padding: 4rem 1.5rem 3rem;
      text-align: center;
      position: relative;
      overflow: hidden;
    }

body.bedlam-home .hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.08) 3px,
        rgba(0,0,0,0.08) 4px
      );
      pointer-events: none;
    }

body.bedlam-home .hero-title {
      font-size: clamp(2.4rem, 6vw, 4rem);
      color: var(--red-bright);
      letter-spacing: 6px;
      text-transform: uppercase;
      text-shadow: 3px 3px 0 #000, 0 0 30px rgba(192,57,43,0.4);
      margin-bottom: 0.5rem;
    }

body.bedlam-home .hero-subtitle {
      font-family: var(--font-title);
      font-size: clamp(0.9rem, 2.5vw, 1.2rem);
      color: var(--green-pale);
      letter-spacing: 1px;
      margin-bottom: 2.5rem;
    }

body.bedlam-home .hero-covers {
      display: flex;
      justify-content: center;
      gap: 2rem;
      flex-wrap: wrap;
    }

body.bedlam-home .hero-covers figure {
      text-align: center;
    }

body.bedlam-home .hero-covers img {
      height: 560px;
      width: auto;
      border: 3px solid var(--border);
      box-shadow: 4px 4px 16px rgba(0,0,0,0.6);
      transition: transform 0.2s, box-shadow 0.2s;
    }

body.bedlam-home .hero-covers img:hover {
      transform: translateY(-4px);
      box-shadow: 4px 8px 24px rgba(0,0,0,0.7);
    }

body.bedlam-home .hero-covers figcaption {
      margin-top: 0.5rem;
      font-size: 0.78rem;
      color: var(--green-pale);
      letter-spacing: 0.3px;
    }

body.bedlam-home .container {
      max-width: 900px;
      margin: 0 auto;
      padding: 0 1.5rem;
    }

body.bedlam-home .section {
      padding: 1.5rem 0;
    }

body.bedlam-home .section .container {
      background: rgba(250, 246, 232, 0.82);
      border: 1px solid #d4c9b0;
      border-top: 3px solid var(--green-light);
      border-radius: var(--radius);
      box-shadow: 0 12px 30px rgba(15,13,12,0.12);
      padding: clamp(1.5rem, 3vw, 2.25rem);
    }

body.bedlam-home .section h2 {
      font-size: clamp(1.4rem, 4vw, 2rem);
      color: var(--green-dark);
      margin-bottom: 1rem;
    }

body.bedlam-home .section h3 {
      font-size: 1.15rem;
      color: var(--green-dark);
      margin: 1.5rem 0 0.6rem;
    }

body.bedlam-home .section p { margin-bottom: 1rem; }

body.bedlam-home .section p:last-child { margin-bottom: 0; }

body.bedlam-home #play .container {
      text-align: center;
    }

body.bedlam-home .play-wrapper {
      display: flex;
      gap: 2rem;
      align-items: flex-start;
      justify-content: center;
      flex-wrap: wrap;
    }

body.bedlam-home .console-wrap {
      flex-shrink: 0;
      text-align: center;
    }

body.bedlam-home #bedlamConsole {
      background-color: #00FF01;
      color: #000;
      font-family: monospace;
      font-size: 16px;
      width: 33ch;
      max-width: 100%;
      border: 3px solid var(--green-dark);
      resize: none;
      padding: 6px;
      display: block;
      margin-left: auto;
      margin-right: auto;
    }

body.bedlam-home .console-hint {
      font-size: 0.8rem;
      color: #555;
      margin-top: 0.4rem;
    }

body.bedlam-home .key-table {
      border-collapse: collapse;
      font-size: 0.82rem;
      flex: 1;
      min-width: 260px;
    }

body.bedlam-home .key-table th, body.bedlam-home .key-table td {
      border: 1px solid var(--border);
      padding: 5px 10px;
      text-align: left;
    }

body.bedlam-home .key-table th {
      background: var(--green-mid);
      color: var(--green-pale);
    }

body.bedlam-home .key-table tr:nth-child(even) td { background: #dce8d4; }

body.bedlam-home .also-play {
      margin-top: 1.5rem;
      padding: 1rem;
      background: #fff;
      border-left: 4px solid var(--green-light);
      font-size: 0.9rem;
    }

body.bedlam-home .resource-list {
      display: inline-block;
      list-style: none;
      margin: 0.35rem auto 0.9rem;
      max-width: 42rem;
      text-align: left;
      width: min(100%, 42rem);
    }

body.bedlam-home #play .resource-heading {
      text-align: left;
      width: min(100%, 42rem);
      margin-left: auto;
      margin-right: auto;
    }

body.bedlam-home .indented-resource-list {
      padding-left: 1.5rem;
    }

body.bedlam-home .resource-list li {
      padding: 0.28rem 0;
      font-size: 0.95rem;
    }

body.bedlam-home .card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 1rem;
      margin-top: 1rem;
    }

body.bedlam-home .card {
      background: #fff;
      border: 1px solid #d4c9b0;
      border-top: 3px solid var(--green-light);
      border-radius: var(--radius);
      padding: 1.25rem;
    }

body.bedlam-home .card h3 {
      font-size: 1rem;
      color: var(--green-dark);
      margin-bottom: 0.5rem;
    }

body.bedlam-home .card p, body.bedlam-home .card a {
      font-size: 0.88rem;
    }

body.bedlam-home .card a { display: block; margin-bottom: 0.25rem; word-break: break-all; }

body.bedlam-home .btn {
      display: inline-block;
      background: var(--green-mid);
      color: var(--cream) !important;
      text-decoration: none;
      padding: 0.6rem 1.4rem;
      border-radius: var(--radius);
      font-size: 0.9rem;
      font-weight: bold;
      letter-spacing: 0.5px;
      transition: background 0.2s;
      margin-top: 0.5rem;
    }

body.bedlam-home .btn:hover { background: var(--green-light); }

body.bedlam-home .btn-red {
      background: var(--red);
    }

body.bedlam-home .btn-red:hover { background: var(--red-bright); }

body.bedlam-home .about-pull {
      font-family: var(--font-title);
      font-size: 1.1rem;
      border-left: 4px solid var(--red);
      padding-left: 1rem;
      color: #333;
      margin-bottom: 1.25rem;
      font-style: italic;
    }

body.bedlam-home .info-table {
      width: 100%;
      border-collapse: collapse;
      font-family: 'Helvetica Neue', Arial, sans-serif;
      font-size: 0.92rem;
      margin: 1.2rem 0;
    }

body.bedlam-home .info-table td {
      padding: 0.5rem 0.75rem;
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.46);
      vertical-align: top;
    }

body.bedlam-home .info-table td:first-child {
      color: var(--green-dark);
      font-weight: 700;
      white-space: nowrap;
      background: rgba(93,126,64,0.12);
      width: 35%;
    }

body.bedlam-home .site-footer {
      background: rgba(15, 13, 12, 0.94);
      color: #dfc89d;
      text-align: center;
      padding: 2rem 1.5rem 1.5rem;
      font-size: 0.88rem;
      border-top: 3px solid var(--red);
    }

body.bedlam-home .site-footer a { color: #b28b51; }

body.bedlam-home .site-footer a:hover { color: #dfc89d; }

body.bedlam-home .footer-heading {
      font-family: var(--font-body);
      font-size: 0.78rem;
      font-weight: 700;
      color: #dfc89d;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      margin-bottom: 1.35rem;
    }

body.bedlam-home .games-footer-grid {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 1rem;
      margin-bottom: 1.5rem;
    }

body.bedlam-home .game-footer-link {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      text-decoration: none;
      width: 220px;
      transition: transform 0.2s;
    }

body.bedlam-home .game-footer-link:hover { transform: translateY(-4px); }

body.bedlam-home .game-footer-link img {
      width: 220px;
      height: auto;
      display: block;
      border: 1px solid #b28b51;
      border-radius: 5px;
      box-shadow: 0 3px 10px rgba(0,0,0,0.5);
      transition: border-color 0.2s, box-shadow 0.2s;
    }

body.bedlam-home .game-footer-link:hover img {
      border-color: var(--red-bright);
      box-shadow: 0 4px 20px rgba(192,57,43,0.18);
    }

body.bedlam-home .game-footer-link span {
      color: #dfc89d;
      text-align: center;
      font-size: 0.78rem;
      line-height: 1.3;
      letter-spacing: 0.04em;
    }

body.bedlam-home .game-footer-link:hover span { color: #fff; }

body.bedlam-home .footer-byline {
      border-top: 1px solid rgba(178,139,81,0.32);
      padding-top: 1.25rem;
      margin-top: 0.5rem;
    }

@media (max-width: 640px) {
body.bedlam-home .games-footer-grid { gap: 0.85rem; }

body.bedlam-home .game-footer-link { width: min(220px, 86vw); }

body.bedlam-home .game-footer-link img { width: min(220px, 86vw); }

}

/* manual.html */
body.bedlam-manual *, body.bedlam-manual *::before, body.bedlam-manual *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.bedlam-manual {
      font-family: var(--font-body);
      font-size: 16px;
      line-height: 1.7;
      color: var(--text);
      background:
        radial-gradient(circle at 16% 0%, rgba(192,57,43,0.10), transparent 25rem),
        radial-gradient(circle at 84% 8%, rgba(61,107,61,0.18), transparent 30rem),
        linear-gradient(180deg, #f8f4ea 0%, var(--cream) 46%, #dfe8d6 100%);
    }

body.bedlam-manual img { max-width: 100%; height: auto; display: block; }

body.bedlam-manual a { color: var(--red); text-decoration: underline; }

body.bedlam-manual a:hover { color: var(--red-bright); }

body.bedlam-manual h1, body.bedlam-manual h2, body.bedlam-manual h3 { font-family: var(--font-title); line-height: 1.2; }

body.bedlam-manual .site-nav {
      background: var(--green-dark);
      border-bottom: 3px solid var(--red);
      position: sticky; top: 0; z-index: 100;
    }

body.bedlam-manual .nav-inner {
      max-width: 860px; margin: 0 auto; padding: 0 1.5rem;
      display: flex; align-items: center; justify-content: space-between; height: 56px;
    }

body.bedlam-manual .nav-logo { font-family: var(--font-title); font-size: 1.4rem; color: var(--red-bright); text-decoration: none; letter-spacing: 2px; text-transform: uppercase; }

body.bedlam-manual .nav-links { display: flex; gap: 1.5rem; list-style: none; }

body.bedlam-manual .nav-links a { color: var(--green-pale); text-decoration: none; font-size: 0.9rem; letter-spacing: 0.5px; text-transform: uppercase; transition: color 0.2s; }

body.bedlam-manual .nav-links a:hover { color: #fff; }

body.bedlam-manual .nav-toggle { display: none; width: 42px; height: 42px; background: rgba(0,0,0,0.16); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; padding: 8px; }

body.bedlam-manual .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--green-pale); margin: 5px 0; transition: 0.3s; }

body.bedlam-manual .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }

body.bedlam-manual .nav-toggle.is-open span:nth-child(2) { opacity: 0; }

body.bedlam-manual .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
body.bedlam-manual .nav-toggle { display: block; }

body.bedlam-manual .nav-links { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--green-dark); border-bottom: 3px solid var(--red); padding: 1rem 1.5rem; gap: 0.75rem; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s; }

body.bedlam-manual .nav-links.open { opacity: 1; pointer-events: auto; transform: translateY(0); }

body.bedlam-manual .nav-links a { display: block; padding: 0.45rem 0; }

}

body.bedlam-manual .page-header {
      background:
        radial-gradient(circle at 50% 8%, rgba(192,57,43,0.18), transparent 22rem),
        radial-gradient(circle at 82% 70%, rgba(200,216,192,0.12), transparent 24rem),
        linear-gradient(180deg, #132713 0%, var(--green-dark) 58%, var(--green-mid) 100%);
      color: var(--text-light);
      padding: 2.5rem 1.5rem;
      text-align: center;
      border-bottom: 3px solid var(--red);
    }

body.bedlam-manual .page-header h1 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--red-bright); letter-spacing: 3px; text-transform: uppercase; }

body.bedlam-manual .page-header p { color: var(--green-pale); margin-top: 0.5rem; font-size: 0.95rem; }

body.bedlam-manual .container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }

body.bedlam-manual .page-body { padding: 3rem 0; }

body.bedlam-manual .toc {
      background: #e8ede4;
      border: 1px solid #c8d8c0;
      border-left: 4px solid var(--green-mid);
      padding: 1.25rem 1.5rem;
      margin-bottom: 2.5rem;
      border-radius: var(--radius);
    }

body.bedlam-manual .toc h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--green-dark); margin-bottom: 0.75rem; }

body.bedlam-manual .toc ol { padding-left: 1.25rem; }

body.bedlam-manual .toc li { margin-bottom: 0.3rem; }

body.bedlam-manual .toc a { font-size: 0.9rem; }

body.bedlam-manual .manual-section { margin-bottom: 3rem; }

body.bedlam-manual .manual-jump-links {
      display: flex;
      gap: 0.75rem;
      justify-content: center;
      flex-wrap: wrap;
      margin: 0 0 2rem;
    }

body.bedlam-manual .manual-jump-links a {
      background: var(--green-mid);
      border: 1px solid var(--green-dark);
      border-radius: var(--radius);
      color: var(--cream);
      font-size: 0.9rem;
      font-weight: bold;
      padding: 0.55rem 1rem;
      text-decoration: none;
      transition: background 0.2s, border-color 0.2s;
    }

body.bedlam-manual .manual-jump-links a:hover {
      background: var(--green-dark);
      border-color: var(--red);
      text-decoration: none;
    }

body.bedlam-manual .manual-about {
      background: #e8ede4;
      border: 1px solid #c8d8c0;
      border-left: 4px solid var(--green-mid);
      padding: 1.25rem 1.5rem;
      margin-bottom: 2rem;
      border-radius: var(--radius);
      scroll-margin-top: 5rem;
    }

body.bedlam-manual .manual-about-layout {
      display: flex;
      gap: 1rem;
      align-items: center;
      flex-wrap: wrap;
    }

body.bedlam-manual .manual-cover-link {
      display: block;
      flex: 0 0 auto;
    }

body.bedlam-manual .manual-cover-link img {
      width: min(120px, 36vw);
      aspect-ratio: 3 / 4;
      object-fit: contain;
      background: #d6decf;
      border: 1px solid #b7c9a5;
      border-radius: var(--radius);
      box-shadow: 0 8px 18px rgba(35,61,35,0.22);
    }

body.bedlam-manual .manual-about-text {
      flex: 1 1 260px;
      align-self: center;
    }

body.bedlam-manual .manual-solution-cta {
      text-align: center;
      margin-top: 1rem;
    }

body.bedlam-manual .manual-solution-button {
      display: inline-block;
      background: var(--green-mid);
      border: 1px solid var(--green-dark);
      border-radius: var(--radius);
      color: var(--cream);
      font-size: 0.92rem;
      font-weight: bold;
      padding: 0.55rem 1.05rem;
      text-decoration: none;
      transition: background 0.18s, border-color 0.18s, transform 0.18s;
    }

body.bedlam-manual .manual-solution-button:hover {
      background: var(--green-dark);
      border-color: var(--red);
      color: var(--cream);
      text-decoration: none;
      transform: translateY(-1px);
    }

body.bedlam-manual .manual-about-toc {
      background: transparent;
      border: 0;
      border-top: 1px solid #c8d8c0;
      border-radius: 0;
      padding: 1rem 0 0;
      margin: 1rem 0 0;
    }

body.bedlam-manual .manual-about-toc h3 {
      margin-top: 0;
    }

body.bedlam-manual .manual-section h2 {
      font-size: clamp(1.3rem, 3vw, 1.7rem);
      color: var(--green-dark);
      border-bottom: 2px solid var(--green-light);
      padding-bottom: 0.4rem;
      margin-bottom: 1.25rem;
    }

body.bedlam-manual .manual-section h3 {
      font-size: 1.05rem;
      color: var(--red);
      margin: 1.5rem 0 0.5rem;
    }

body.bedlam-manual .manual-section p { margin-bottom: 1rem; }

body.bedlam-manual .manual-section ul, body.bedlam-manual .manual-section ol { padding-left: 1.5rem; margin-bottom: 1rem; }

body.bedlam-manual .manual-section li { margin-bottom: 0.4rem; }

body.bedlam-manual code {
      background: #e8ede4;
      border: 1px solid #b7c9a5;
      border-radius: 3px;
      color: var(--green-dark);
      font-family: monospace;
      font-size: 0.9em;
      padding: 1px 5px;
    }

body.bedlam-manual .copyright-block {
      background: #fff;
      border: 1px solid #d4c9b0;
      padding: 0.75rem 1rem;
      font-size: 0.82rem;
      color: #555;
      margin-bottom: 1.25rem;
      border-radius: var(--radius);
    }

body.bedlam-manual .code-block {
      font-family: monospace;
      font-size: 0.88rem;
      background: #1a2e1a;
      color: #00ff01;
      padding: 1rem 1.25rem;
      border-radius: var(--radius);
      overflow-x: auto;
      margin: 1rem 0;
      white-space: pre;
    }

body.bedlam-manual .questionnaire {
      background: #fff;
      border: 1px solid #d4c9b0;
      border-radius: var(--radius);
      overflow: hidden;
      margin-bottom: 1.5rem;
    }

body.bedlam-manual .questionnaire-header {
      background: var(--green-mid);
      color: var(--green-pale);
      padding: 0.6rem 1.25rem;
      font-family: var(--font-title);
      font-size: 0.9rem;
      letter-spacing: 0.5px;
    }

body.bedlam-manual .q-item {
      padding: 0.75rem 1.25rem;
      border-bottom: 1px solid #e8e0d0;
      font-size: 0.9rem;
    }

body.bedlam-manual .q-item:last-child { border-bottom: none; }

body.bedlam-manual .q-item strong { color: var(--green-dark); }

body.bedlam-manual .q-choices {
      display: flex;
      gap: 1.5rem;
      margin-top: 0.3rem;
      font-size: 0.82rem;
      color: #666;
    }

body.bedlam-manual .scoring-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.88rem;
      margin: 1rem 0;
    }

body.bedlam-manual .scoring-table th, body.bedlam-manual .scoring-table td {
      border: 1px solid var(--border);
      padding: 6px 12px;
    }

body.bedlam-manual .scoring-table th { background: var(--green-mid); color: var(--green-pale); }

body.bedlam-manual .scoring-table tr:nth-child(even) td { background: #e8ede4; }

body.bedlam-manual .section-badge {
      display: inline-block;
      background: var(--green-mid);
      color: var(--green-pale);
      font-size: 0.7rem;
      font-weight: bold;
      letter-spacing: 2px;
      text-transform: uppercase;
      padding: 2px 10px;
      margin-bottom: 0.6rem;
      border-radius: var(--radius);
    }

body.bedlam-manual .site-footer { background: rgba(15, 13, 12, 0.94); color: #dfc89d; text-align: center; padding: 2rem 1.5rem 1.5rem; font-size: 0.88rem; border-top: 3px solid var(--red); }

body.bedlam-manual .site-footer a { color: #b28b51; }

body.bedlam-manual .site-footer a:hover { color: #dfc89d; }

body.bedlam-manual .footer-heading { font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; color: #dfc89d; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1.35rem; }

body.bedlam-manual .games-footer-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }

body.bedlam-manual .game-footer-link { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; width: 220px; transition: transform 0.2s; }

body.bedlam-manual .game-footer-link:hover { transform: translateY(-4px); }

body.bedlam-manual .game-footer-link img { width: 220px; height: auto; display: block; border: 1px solid #b28b51; border-radius: 5px; box-shadow: 0 3px 10px rgba(0,0,0,0.5); transition: border-color 0.2s, box-shadow 0.2s; }

body.bedlam-manual .game-footer-link:hover img { border-color: var(--red-bright); box-shadow: 0 4px 20px rgba(192,57,43,0.18); }

body.bedlam-manual .game-footer-link span { color: #dfc89d; text-align: center; font-size: 0.78rem; line-height: 1.3; letter-spacing: 0.04em; }

body.bedlam-manual .game-footer-link:hover span { color: #fff; }

body.bedlam-manual .footer-byline { border-top: 1px solid rgba(178,139,81,0.32); padding-top: 1.25rem; margin-top: 0.5rem; }

@media (max-width: 640px) {
body.bedlam-manual .games-footer-grid { gap: 0.85rem; }

body.bedlam-manual .game-footer-link { width: min(220px, 86vw); }

body.bedlam-manual .game-footer-link img { width: min(220px, 86vw); }

}

/* solution.html */
body.bedlam-solution *, body.bedlam-solution *::before, body.bedlam-solution *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.bedlam-solution {
      font-family: var(--font-body);
      font-size: 16px;
      line-height: 1.7;
      color: var(--text);
      background:
        radial-gradient(circle at 16% 0%, rgba(192,57,43,0.10), transparent 25rem),
        radial-gradient(circle at 84% 8%, rgba(61,107,61,0.18), transparent 30rem),
        linear-gradient(180deg, #f8f4ea 0%, var(--cream) 46%, #dfe8d6 100%);
    }

body.bedlam-solution img { max-width: 100%; height: auto; display: block; }

body.bedlam-solution a { color: var(--red); text-decoration: underline; }

body.bedlam-solution a:hover { color: var(--red-bright); }

body.bedlam-solution h1, body.bedlam-solution h2, body.bedlam-solution h3 { font-family: var(--font-title); line-height: 1.2; }

body.bedlam-solution .site-nav { background: var(--green-dark); border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 100; }

body.bedlam-solution .nav-inner { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 56px; }

body.bedlam-solution .nav-logo { font-family: var(--font-title); font-size: 1.4rem; color: var(--red-bright); text-decoration: none; letter-spacing: 2px; text-transform: uppercase; }

body.bedlam-solution .nav-links { display: flex; gap: 1.5rem; list-style: none; }

body.bedlam-solution .nav-links a { color: var(--green-pale); text-decoration: none; font-size: 0.9rem; letter-spacing: 0.5px; text-transform: uppercase; transition: color 0.2s; }

body.bedlam-solution .nav-links a:hover { color: #fff; }

body.bedlam-solution .lightbox-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 999; align-items: center; justify-content: center; cursor: zoom-out; }

body.bedlam-solution .lightbox-overlay.open { display: flex; }

body.bedlam-solution .lightbox-overlay img { max-width: 95vw; max-height: 95vh; width: auto; height: auto; border: 3px solid var(--border); box-shadow: 0 8px 40px rgba(0,0,0,0.8); cursor: default; }

body.bedlam-solution .lightbox-close { position: absolute; top: 1rem; right: 1.25rem; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; background: none; border: none; opacity: 0.8; }

body.bedlam-solution .lightbox-close:hover { opacity: 1; }

body.bedlam-solution .nav-toggle { display: none; width: 42px; height: 42px; background: rgba(0,0,0,0.16); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; padding: 8px; }

body.bedlam-solution .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--green-pale); margin: 5px 0; transition: 0.3s; }

body.bedlam-solution .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }

body.bedlam-solution .nav-toggle.is-open span:nth-child(2) { opacity: 0; }

body.bedlam-solution .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
body.bedlam-solution .nav-toggle { display: block; }

body.bedlam-solution .nav-links { display: flex; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--green-dark); border-bottom: 3px solid var(--red); padding: 1rem 1.5rem; gap: 0.75rem; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s; }

body.bedlam-solution .nav-links.open { opacity: 1; pointer-events: auto; transform: translateY(0); }

body.bedlam-solution .nav-links a { display: block; padding: 0.45rem 0; }

}

body.bedlam-solution .page-header {
      background:
        radial-gradient(circle at 50% 8%, rgba(192,57,43,0.18), transparent 22rem),
        radial-gradient(circle at 82% 70%, rgba(200,216,192,0.12), transparent 24rem),
        linear-gradient(180deg, #132713 0%, var(--green-dark) 58%, var(--green-mid) 100%);
      color: var(--text-light);
      padding: 2.5rem 1.5rem;
      text-align: center;
      border-bottom: 3px solid var(--red);
    }

body.bedlam-solution .page-header h1 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--red-bright); letter-spacing: 3px; text-transform: uppercase; }

body.bedlam-solution .page-header p { color: var(--green-pale); margin-top: 0.5rem; font-size: 0.95rem; }

body.bedlam-solution .container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }

body.bedlam-solution .page-body { padding: 3rem 0; }

body.bedlam-solution .spoiler-warning {
      background: var(--red);
      color: #fff;
      padding: 0.75rem 1.25rem;
      border-radius: var(--radius);
      font-size: 0.9rem;
      margin-bottom: 2rem;
      text-align: center;
    }

body.bedlam-solution .map-section {
      margin-bottom: 3rem;
      text-align: center;
    }

body.bedlam-solution .map-section h2 {
      font-size: clamp(1.3rem, 3vw, 1.7rem);
      color: var(--green-dark);
      margin-bottom: 0.5rem;
    }

body.bedlam-solution .map-section figcaption {
      font-size: 0.82rem;
      color: #666;
      margin-top: 0.5rem;
    }

body.bedlam-solution .map-scroll {
      border: 2px solid var(--border);
      border-radius: var(--radius);
      background: #fff;
      padding: 1rem;
    }

body.bedlam-solution .map-scroll img { max-width: 100%; height: auto; cursor: zoom-in; }

body.bedlam-solution .map-scroll img:hover { opacity: 0.9; }

body.bedlam-solution .ending-screenshot img { cursor: zoom-in; }

body.bedlam-solution .ending-screenshot img:hover { opacity: 0.9; }

body.bedlam-solution .section-badge { display: inline-block; background: var(--green-mid); color: var(--green-pale); font-size: 0.7rem; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; padding: 2px 10px; margin-bottom: 0.6rem; border-radius: var(--radius); }

body.bedlam-solution .endings-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 2rem;
      margin-bottom: 3rem;
    }

body.bedlam-solution .ending-card {
      background: #fff;
      border: 1px solid #d4c9b0;
      border-top: 4px solid var(--green-light);
      border-radius: var(--radius);
      overflow: hidden;
    }

body.bedlam-solution .ending-card.red-top { border-top-color: var(--red); }

body.bedlam-solution .ending-card.gold-top { border-top-color: #c0862b; }

body.bedlam-solution .ending-header {
      background: #f0ede4;
      padding: 1rem 1.5rem;
      border-bottom: 1px solid #d4c9b0;
      display: flex;
      align-items: center;
      gap: 1rem;
    }

body.bedlam-solution .ending-number {
      font-family: var(--font-title);
      font-size: 2rem;
      color: var(--green-light);
      font-weight: bold;
      line-height: 1;
    }

body.bedlam-solution .red-top .ending-number { color: var(--red); }

body.bedlam-solution .gold-top .ending-number { color: #c0862b; }

body.bedlam-solution .ending-title {
      font-family: var(--font-title);
      font-size: 1.2rem;
      color: var(--green-dark);
    }

body.bedlam-solution .ending-body {
      padding: 1.25rem 1.5rem;
    }

body.bedlam-solution .ending-body p { margin-bottom: 0.9rem; }

body.bedlam-solution .ending-body p:last-child { margin-bottom: 0; }

body.bedlam-solution .ending-body ul { padding-left: 1.4rem; margin-bottom: 0.9rem; }

body.bedlam-solution .ending-body li { margin-bottom: 0.4rem; }

body.bedlam-solution .ending-screenshot {
      text-align: center;
      margin-top: 1rem;
    }

body.bedlam-solution .ending-screenshot img {
      max-width: 100%;
      border: 2px solid var(--border);
      border-radius: var(--radius);
      display: inline-block;
    }

body.bedlam-solution .ending-screenshot figcaption {
      font-size: 0.78rem;
      color: #666;
      margin-top: 0.4rem;
    }

body.bedlam-solution .step-list {
      list-style: none;
      padding: 0;
      counter-reset: step;
    }

body.bedlam-solution .step-list li {
      counter-increment: step;
      display: flex;
      gap: 0.75rem;
      margin-bottom: 0.6rem;
      align-items: flex-start;
    }

body.bedlam-solution .step-list li::before {
      content: counter(step);
      background: var(--green-mid);
      color: var(--green-pale);
      font-size: 0.75rem;
      font-weight: bold;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin-top: 2px;
    }

body.bedlam-solution code {
      font-family: monospace;
      font-size: 0.9em;
      background: #1a2e1a;
      color: #00ff01;
      padding: 1px 6px;
      border-radius: 3px;
    }

body.bedlam-solution .site-footer { background: rgba(15, 13, 12, 0.94); color: #dfc89d; text-align: center; padding: 2rem 1.5rem 1.5rem; font-size: 0.88rem; border-top: 3px solid var(--red); }

body.bedlam-solution .site-footer a { color: #b28b51; }

body.bedlam-solution .site-footer a:hover { color: #dfc89d; }

body.bedlam-solution .footer-heading { font-family: var(--font-body); font-size: 0.78rem; font-weight: 700; color: #dfc89d; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1.35rem; }

body.bedlam-solution .games-footer-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }

body.bedlam-solution .game-footer-link { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; width: 220px; transition: transform 0.2s; }

body.bedlam-solution .game-footer-link:hover { transform: translateY(-4px); }

body.bedlam-solution .game-footer-link img { width: 220px; height: auto; display: block; border: 1px solid #b28b51; border-radius: 5px; box-shadow: 0 3px 10px rgba(0,0,0,0.5); transition: border-color 0.2s, box-shadow 0.2s; }

body.bedlam-solution .game-footer-link:hover img { border-color: var(--red-bright); box-shadow: 0 4px 20px rgba(192,57,43,0.18); }

body.bedlam-solution .game-footer-link span { color: #dfc89d; text-align: center; font-size: 0.78rem; line-height: 1.3; letter-spacing: 0.04em; }

body.bedlam-solution .game-footer-link:hover span { color: #fff; }

body.bedlam-solution .footer-byline { border-top: 1px solid rgba(178,139,81,0.32); padding-top: 1.25rem; margin-top: 0.5rem; }

@media (max-width: 640px) {
body.bedlam-solution .games-footer-grid { gap: 0.85rem; }

body.bedlam-solution .game-footer-link { width: min(220px, 86vw); }

body.bedlam-solution .game-footer-link img { width: min(220px, 86vw); }

}

/* Consolidated former inline styles */
body.bedlam-manual .manual-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-mid);
  color: var(--cream);
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: bold;
  margin-bottom: 1.25rem;
}

body.bedlam-manual .loading-table {
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1rem 0;
}

body.bedlam-manual .loading-table thead tr {
  background: var(--green-mid);
  color: var(--green-pale);
}

body.bedlam-manual .loading-table th,
body.bedlam-manual .loading-table td {
  padding: 5px 10px;
  border: 1px solid var(--border);
}

body.bedlam-manual .loading-table tbody tr:nth-child(even) {
  background: #e8ede4;
}

body.bedlam-manual .section-rule {
  border: none;
  border-top: 2px solid #c8d8c0;
  margin: 2rem 0;
}

body.bedlam-manual .final-score {
  background: #e8ede4;
  font-weight: bold;
}

body.bedlam-manual .questionnaire-note {
  font-size: 0.88rem;
  color: #555;
}

body.bedlam-solution .solution-intro {
  margin-bottom: 2rem;
}

body.bedlam-solution .solution-about {
  background: #e8ede4;
  border: 1px solid #c8d8c0;
  border-left: 4px solid var(--green-mid);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

body.bedlam-solution .solution-about h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--green-dark);
  border-bottom: 2px solid var(--green-light);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}

body.bedlam-solution .info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.92rem;
}

body.bedlam-solution .info-table td {
  border: 1px solid #c8d8c0;
  padding: 0.55rem 0.75rem;
  vertical-align: top;
}

body.bedlam-solution .info-table td:first-child {
  width: 34%;
  color: var(--green-dark);
  font-weight: bold;
  white-space: nowrap;
}

body.bedlam-solution .routes-title {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: var(--green-dark);
  margin-bottom: 1.5rem;
}

body.bedlam-solution .ending-quote {
  border-left: 3px solid var(--green-light);
  padding: 0.5rem 1rem;
  margin: 0.75rem 0;
  font-style: italic;
  color: #444;
  background: #f0ede4;
  border-radius: var(--radius);
}
