/* ================================================
   newspaper.css — The Verona Gazette
   Full broadsheet aesthetic: cream paper, serif type,
   column rules, drop caps, old-press header rules.
   ================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper:    #f5f0e0;
  --ink:      #1a1806;
  --mid:      #3a3520;
  --rule:     #1a1806;
  --accent:   #8b1a1a;
  --light-bg: #ede8d5;
  --col-gap:  22px;
}

html { scroll-behavior: smooth; }

body {
  background: #c8bfa8;
  font-family: Georgia, 'Times New Roman', Times, serif;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ---- Page wrapper ---- */
.page {
  max-width: 1120px;
  margin: 18px auto;
  background: var(--paper);
  border: 1px solid #999;
  box-shadow: 2px 2px 14px rgba(0,0,0,0.35);
  padding: 28px 34px 42px;
}

/* ---- Masthead ---- */
.masthead {
  text-align: center;
  border-top: 5px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 10px 0 6px;
  margin-bottom: 0;
}
.masthead .above-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mid);
  padding-bottom: 6px;
}
.masthead h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 4px;
}
.masthead .tagline {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--mid);
  margin-bottom: 8px;
}
.masthead .below-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-top: 4px double var(--rule);
  padding-top: 5px;
}

/* ---- Horizontal rules ---- */
.rule-thick { border: none; border-top: 3px solid var(--rule); margin: 12px 0; }
.rule-thin  { border: none; border-top: 1px solid var(--rule); margin: 12px 0; }
.rule-dbl   { border: none; border-top: 4px double var(--rule); margin: 14px 0; }

/* ---- Main grid layouts ---- */
.layout-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0;
}
.layout-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}
.layout-full { width: 100%; }

/* Column dividers via border */
.col { padding: 0 var(--col-gap); }
.col:first-child { padding-left: 0; }
.col:last-child  { padding-right: 0; }
.col + .col { border-left: 1px solid var(--rule); }

/* ---- Headlines ---- */
.kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 4px;
}
.headline {
  font-size: 1.9rem;
  line-height: 1.12;
  margin-bottom: 6px;
}
.headline-lg {
  font-size: 2.6rem;
  line-height: 1.08;
  margin-bottom: 8px;
}
.headline-sm {
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 5px;
}
.byline {
  font-style: italic;
  font-size: 0.82rem;
  color: var(--mid);
  margin-bottom: 12px;
}

/* ---- Story body ---- */
.body-text p { margin-bottom: 10px; text-align: justify; }

.body-text p:first-child::first-letter {
  float: left;
  font-size: 3.8em;
  line-height: 0.72;
  margin-right: 5px;
  margin-top: 4px;
  font-weight: bold;
  color: var(--ink);
}

.pull-quote {
  border-top: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  padding: 8px 12px;
  margin: 14px 0;
  font-style: italic;
  font-size: 1.1rem;
  text-align: center;
  color: var(--accent);
}

.caption {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--mid);
  margin-top: 4px;
  margin-bottom: 10px;
}

/* ---- Sidebar / character notes ---- */
.sidebar-section {
  background: var(--light-bg);
  border: 1px solid var(--rule);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.sidebar-section h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 10px;
  padding-bottom: 4px;
}
.char-note {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: flex-start;
}
.char-note:last-child { margin-bottom: 0; }
.portrait-slot {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border: 1px solid var(--rule);
  background: #d8d0b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--mid);
  text-align: center;
  letter-spacing: 0.5px;
  overflow: hidden;
  position: relative; /* Added: creates positioning context for the image */
}

.portrait-slot img { 
  position: absolute; /* Added: takes image out of flex flow */
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.char-note p { font-size: 0.83rem; }
.char-name { font-weight: bold; color: var(--accent); }

/* ---- Ad slots (inline, in-page) ---- */
.ad-slot {
  border: 1px dashed #999;
  background: var(--light-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #888;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}
.ad-slot::before {
  content: 'ADVERTISEMENT';
  position: absolute;
  top: 5px;
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: #aaa;
}
.ad-slot img { width: 100%; height: 100%; object-fit: cover; }
.ad-banner   { width: 100%; height: 90px;  margin: 14px 0; }
.ad-square   { width: 100%; height: 180px; margin: 14px 0; }
.ad-tall     { width: 100%; height: 260px; margin: 14px 0; }

/* ---- Navigation between acts ---- */
.act-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 3px solid var(--rule);
  margin-top: 28px;
  padding-top: 14px;
  font-size: 0.85rem;
}
.act-nav a {
  border: 1px solid var(--rule);
  padding: 7px 18px;
  background: var(--ink);
  color: var(--paper);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.78rem;
  transition: background 0.2s;
}
.act-nav a:hover { background: var(--accent); }
.act-nav .act-label {
  font-style: italic;
  color: var(--mid);
}

/* ================================================
   INTERACTIVE ELEMENTS
   ================================================ */

/* ---- Shared interactive container ---- */
.interactive-section {
  background: var(--light-bg);
  border: 2px solid var(--rule);
  padding: 20px 24px;
  margin: 18px 0;
}
.interactive-section > .int-header {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
  margin-bottom: 16px;
}
.interactive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 680px) {
  .interactive-grid { grid-template-columns: 1fr; }
}

/* ---- Quiz widget ---- */
.quiz-widget {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 14px 16px;
}
.quiz-widget .quiz-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
}
.quiz-widget .quiz-question {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 12px;
  line-height: 1.3;
}
.quiz-options { list-style: none; }
.quiz-options li { margin-bottom: 7px; }
.quiz-options button {
  width: 100%;
  text-align: left;
  background: var(--light-bg);
  border: 1px solid #bbb;
  padding: 8px 12px;
  font-size: 0.88rem;
  transition: background 0.15s, border-color 0.15s;
}
.quiz-options button:hover:not(:disabled) {
  background: #ddd8c0;
  border-color: var(--ink);
}
.quiz-options button.correct {
  background: #cfe8c9;
  border-color: #3a7a32;
  color: #1e4a1a;
  font-weight: bold;
}
.quiz-options button.wrong {
  background: #f0cfcf;
  border-color: #8b1a1a;
  color: #5a0f0f;
}
.quiz-options button:disabled { cursor: default; }
.quiz-feedback {
  margin-top: 10px;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--mid);
  min-height: 20px;
}

/* ---- Poll widget ---- */
.poll-widget {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 14px 16px;
}
.poll-widget .poll-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
}
.poll-widget .poll-question {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 12px;
  line-height: 1.3;
}
.poll-options { list-style: none; }
.poll-options li { margin-bottom: 7px; }
.poll-options button {
  width: 100%;
  text-align: left;
  background: var(--light-bg);
  border: 1px solid #bbb;
  padding: 8px 12px;
  font-size: 0.88rem;
  transition: background 0.15s;
}
.poll-options button:hover:not(:disabled) {
  background: #ddd8c0;
  border-color: var(--ink);
}
.poll-results { list-style: none; margin-top: 4px; }
.poll-results li { margin-bottom: 9px; }
.poll-result-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 3px;
}
.poll-bar-track {
  background: #d5ceb8;
  height: 14px;
  border: 1px solid #bbb;
  overflow: hidden;
}
.poll-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.7s ease;
}
.poll-bar-fill.mine { background: var(--ink); }

/* ---- Timeline widget ---- */
.timeline-widget { padding: 4px 0; }
.timeline-widget .tl-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
}
.timeline-widget .tl-question {
  font-size: 0.95rem;
  font-weight: bold;
  margin-bottom: 10px;
}
.tl-items { list-style: none; }
.tl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #bbb;
  background: var(--light-bg);
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: grab;
  font-size: 0.85rem;
  user-select: none;
  transition: background 0.15s;
}
.tl-item:active { cursor: grabbing; }
.tl-item.dragging { opacity: 0.5; background: #ddd8c0; }
.tl-item.over { border-color: var(--accent); background: #ede0d0; }
.tl-item .drag-handle { color: #aaa; font-size: 0.9rem; }
.tl-check-btn {
  margin-top: 10px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 8px 18px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tl-check-btn:hover { background: var(--accent); }
.tl-feedback { margin-top: 8px; font-style: italic; font-size: 0.84rem; color: var(--mid); }
.tl-item.tl-correct { background: #cfe8c9; border-color: #3a7a32; }
.tl-item.tl-wrong   { background: #f0cfcf; border-color: #8b1a1a; }

/* ---- Letter-builder widget ---- */
.letter-widget {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 14px 16px;
}
.letter-widget .letter-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}
.letter-template {
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 12px;
  min-height: 80px;
}
.fill-blank {
  display: inline-block;
  min-width: 80px;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font-weight: bold;
  font-style: normal;
  text-align: center;
  padding: 0 4px;
}
.word-choices { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.word-chip {
  background: var(--light-bg);
  border: 1px solid #bbb;
  padding: 5px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}
.word-chip:hover { background: #ddd8c0; }
.word-chip.used  { opacity: 0.4; cursor: default; pointer-events: none; }
.letter-result {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--mid);
  margin-top: 8px;
}

/* ---- Star rating widget ---- */
.rating-widget {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 14px 16px;
}
.rating-widget .rating-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 6px;
}
.rating-widget .rating-question {
  font-size: 0.95rem;
  font-weight: bold;
  margin-bottom: 12px;
}
.stars { display: flex; gap: 6px; }
.star {
  font-size: 1.8rem;
  cursor: pointer;
  color: #bbb;
  transition: color 0.15s, transform 0.1s;
  line-height: 1;
}
.star:hover, .star.active { color: #c8860a; }
.star:hover { transform: scale(1.2); }
.rating-feedback { margin-top: 10px; font-style: italic; font-size: 0.85rem; color: var(--mid); }

/* ================================================
   POPUP ADS
   ================================================ */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.popup-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.popup-window {
  background: var(--paper);
  border: 2px solid var(--rule);
  box-shadow: 4px 4px 20px rgba(0,0,0,0.5);
  max-width: 380px;
  width: 90%;
  position: relative;
}
.popup-titlebar {
  background: var(--ink);
  color: var(--paper);
  padding: 6px 12px;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.popup-close {
  background: none;
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--paper);
  width: 22px;
  height: 22px;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.popup-close:hover { background: var(--accent); border-color: var(--accent); }
.popup-body {
  padding: 0;
}
.popup-ad-slot {
  width: 100%;
  height: 240px;
  background: var(--light-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}
.popup-ad-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.popup-footer {
  padding: 8px 12px;
  font-size: 0.7rem;
  color: #888;
  text-align: right;
  border-top: 1px solid #ddd;
}
.popup-footer button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.7rem;
  cursor: pointer;
  text-decoration: underline;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 760px) {
  .page { padding: 16px 16px 28px; margin: 8px; }
  .layout-main, .layout-three { grid-template-columns: 1fr; }
  .col + .col { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 14px; margin-top: 14px; }
  .headline-lg { font-size: 1.9rem; }
  .interactive-grid { grid-template-columns: 1fr; }
}

/* ================================================
   MEMORY GAME
   ================================================ */
.memory-widget {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 14px 16px;
}
.memory-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 2px; color: var(--accent); margin-bottom: 6px;
}
.memory-question {
  font-size: 0.95rem; font-weight: bold;
  margin-bottom: 12px; line-height: 1.3;
}
.memory-grid {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}
.memory-card {
  height: 72px;
  cursor: pointer;
  perspective: 700px;
  user-select: none;
}
.card-inner {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.38s ease;
}
.memory-card.flipped .card-inner  { transform: rotateY(180deg); }
.card-front, .card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule);
  font-size: 0.8rem; text-align: center; padding: 6px; line-height: 1.3;
}
.card-front {
  background: var(--ink); color: var(--paper); font-size: 1.5rem;
}
.card-back  { background: var(--light-bg); transform: rotateY(180deg); }
.memory-card.matched .card-front { background: #2a5a24; }
.memory-card.matched .card-back  { background: #cfe8c9; border-color: #3a7a32; color: #1a4a14; }
.memory-status {
  font-size: 0.8rem; color: var(--mid); font-style: italic; margin-top: 6px;
}

/* ================================================
   FIND THE DIFFERENCES
   ================================================ */
.diff-widget { }
.diff-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 2px; color: var(--accent); margin-bottom: 6px;
}
.diff-question { font-size: 0.95rem; font-weight: bold; margin-bottom: 10px; }
.diff-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
  cursor: crosshair;
}
.diff-left-panel, .diff-right-panel { position: relative; }
.diff-left-panel svg, .diff-right-panel svg { width: 100%; display: block; }

/* Invisible click targets on right panel */
.diff-target {
  fill: transparent;
  stroke: transparent;
  stroke-width: 4;
  cursor: pointer;
  transition: fill 0.2s, stroke 0.2s;
}
.diff-target:hover        { fill: rgba(255,220,80,0.2); stroke: rgba(255,220,80,0.6); }
.diff-target.diff-found   { fill: rgba(80,180,80,0.3);  stroke: #3a7a32; stroke-width: 2.5; }

.diff-status {
  display: flex; gap: 16px; align-items: center;
  font-size: 0.85rem; margin-top: 8px;
}
.diff-status-text { font-weight: bold; }
.diff-hint {
  font-style: italic; font-size: 0.8rem; color: #888;
  opacity: 0; transition: opacity 0.3s;
}

/* ================================================
   MAZE WIDGET
   ================================================ */
.maze-widget {
  background: #0a0a0a;
  border: 2px solid var(--rule);
  padding: 14px;
  text-align: center;
}
.maze-widget .maze-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 2px; color: #c8a030; margin-bottom: 6px;
}
.maze-widget .maze-intro {
  font-style: italic; color: #aaa; font-size: 0.88rem;
  margin-bottom: 12px; line-height: 1.5;
}
.maze-widget .maze-controls {
  font-size: 0.78rem; color: #777; margin-top: 8px; font-style: italic;
}
#juliet-maze-canvas {
  display: block; margin: 0 auto;
  image-rendering: pixelated;
  border: 1px solid #333;
  cursor: pointer;
}
.maze-start-btn {
  background: #1a1806; color: #d4af60;
  border: 1px solid #d4af60; padding: 10px 24px;
  font-family: Georgia, serif; font-size: 0.9rem;
  cursor: pointer; letter-spacing: 1px;
  margin: 8px 0;
}
.maze-start-btn:hover { background: #3a2a10; }

/* ================================================
   MEMORY CARD GAME
   ================================================ */
.memory-widget { }
.memory-label {
  font-size: .7rem; text-transform: uppercase;
  letter-spacing: 2px; color: var(--accent); margin-bottom: 6px;
}
.memory-question {
  font-size: .95rem; font-weight: bold;
  margin-bottom: 14px; line-height: 1.3;
}
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.memory-card {
  aspect-ratio: 3/4;
  cursor: pointer;
  perspective: 600px;
  user-select: none;
}
.memory-inner {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .4s ease;
}
.memory-card.flipped .memory-inner,
.memory-card.matched .memory-inner {
  transform: rotateY(180deg);
}
.memory-front, .memory-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 6px;
  border: 1px solid var(--rule);
  font-size: .78rem; line-height: 1.3;
}
.memory-front {
  background: var(--ink);
  color: var(--paper);
  font-size: 1.4rem;
  font-weight: bold;
}
.memory-back {
  background: var(--light-bg);
  transform: rotateY(180deg);
  font-family: Georgia, serif;
}
.memory-card.matched .memory-back {
  background: #cfe8c9;
  border-color: #3a7a32;
}
.memory-feedback {
  font-style: italic; font-size: .85rem;
  color: var(--mid); margin-top: 4px;
}

/* ================================================
   FIND THE DIFFERENCES
   ================================================ */
.diff-widget {}
.diff-header-row {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 12px;
}
.diff-label {
  font-size: .7rem; text-transform: uppercase;
  letter-spacing: 2px; color: var(--accent);
}
.diff-counter {
  font-size: .85rem; font-weight: bold;
  background: var(--ink); color: var(--paper);
  padding: 4px 12px;
}
.diff-instruction {
  font-size: .85rem; margin-bottom: 12px;
  font-style: italic; color: var(--mid);
}
.diff-panels {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.diff-panel {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 12px 14px;
  font-size: .82rem;
}
.diff-panel-title {
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: 2px; color: #999;
  border-bottom: 1px solid #ddd; margin-bottom: 8px; padding-bottom: 4px;
}
.diff-panel-headline {
  font-size: 1rem; font-weight: bold; line-height: 1.2;
  margin-bottom: 6px;
}
.diff-panel-meta {
  font-size: .72rem; color: var(--mid);
  margin-bottom: 8px; letter-spacing: .5px;
}
.diff-panel-body { font-size: .82rem; line-height: 1.5; }
.diff-panel-body p { margin-bottom: 6px; }

/* Clickable difference spots on the right panel */
.diff-spot {
  cursor: pointer;
  border-bottom: 2px dashed #bbb;
  transition: background .15s;
  border-radius: 2px;
  padding: 0 2px;
}
.diff-spot:hover { background: rgba(139,26,26,.1); }
.diff-spot.found {
  background: rgba(42,106,34,.18);
  border-bottom: 2px solid #3a7a32;
  cursor: default;
}
.diff-feedback {
  margin-top: 10px; font-style: italic;
  font-size: .85rem; color: var(--mid);
}
@media (max-width: 600px) {
  .diff-panels { grid-template-columns: 1fr; }
  .memory-grid { grid-template-columns: repeat(3,1fr); }
}

/* ================================================
   MAZE WIDGET (inline, not fullscreen)
   ================================================ */
.maze-widget {
  background: #111;
  border: 2px solid var(--rule);
  padding: 14px;
  text-align: center;
}
.maze-widget .maze-label {
  font-size: .7rem; text-transform: uppercase;
  letter-spacing: 2px; color: #d4a017; margin-bottom: 6px;
}
.maze-widget .maze-question {
  font-size: .95rem; color: #e8e0d0;
  margin-bottom: 4px; font-style: italic;
}
.maze-widget .maze-keys {
  font-size: .75rem; color: #888;
  margin-bottom: 10px;
}
#maze-canvas {
  display: block; margin: 0 auto;
  background: #000;
  image-rendering: pixelated;
  max-width: 100%;
}
.maze-result {
  margin-top: 10px; min-height: 22px;
  font-style: italic; font-size: .88rem;
  color: #d4a017;
}