/* ===== includes/theme.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================
   GLOBAL THEME VARIABLES
   ============================================ */
:root {
    --accent: #00FF66;
    --text: #00FF66;
    --bg: #000;
}

/* Amber Mode */
body.theme-amber {
    --accent: #FFB000;
    --text: #FFB000;
}

/* Dark Mode */
body.theme-dark {
    --accent: #CCCCCC;
    --text: #FFFFFF;
}

/* Layout safety: nothing may push the page wider than the viewport.
   (The old header was width:100% + padding with no box-sizing, which
   is why the DARK button was cut off and a scrollbar appeared.) */
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100vw; overflow-x: hidden; }
img, svg, video { max-width: 100%; }
body { line-height: 1.5; }

/* Subtle CRT scanlines — fixed overlay, pointer-events none so it
   never blocks clicks. Kept faint on purpose. */
body::after {
    content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px);
    mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) { body::after { display: none; } }

/* Terminal panels: let long content scroll instead of being cut off */
.terminal-panel { height: auto; min-height: 260px; max-height: 560px; overflow-y: auto; overflow-x: hidden; border-radius: 10px; }
.terminal-container { border-radius: 8px; }

/* Page wrapper used by the fixed sub-pages */
.mm-page { max-width: 860px; margin: 0 auto; padding: 20px 16px 40px; }
.mm-page h1 { font-size: 1.6em; }
.mm-card { background: #000; border: 1px solid var(--accent); border-radius: 10px; padding: 20px; box-shadow: 0 0 14px rgba(0,255,102,.18); margin: 16px 0; }
.mm-skip { border-radius: 6px; }
.mm-skip:hover, .mm-skip:focus-visible { background: var(--accent); color: #000; outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px dashed var(--accent); outline-offset: 2px; }

/* ============================================
   GLOBAL PAGE STYLING
   ============================================ */
body {
    background: var(--bg);
    color: var(--text);
    font-family: monospace;
    margin: 0;
    padding: 0;
}

/* ============================================
   HEADINGS
   ============================================ */
h1, h2, h3 {
    color: var(--accent);
    text-shadow: 0 0 6px var(--accent);
}

/* ============================================
   LINKS
   ============================================ */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   BOXES / PANELS
   ============================================ */
.box,
.panel,
.info-box,
.download-box,
.tools-box,
.link-box {
    background: var(--bg);
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 20px;
}

/* ============================================
   BUTTONS / INPUTS / FORMS
   ============================================ */
input,
textarea,
button,
select {
    background: var(--bg);
    border: 1px solid var(--accent);
    color: var(--text);
    padding: 8px;
    font-family: monospace;
}

input[type=submit],
button {
    cursor: pointer;
}

input[type=submit]:hover,
button:hover {
    background: var(--accent);
    color: #000;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.glow {
    text-shadow: 0 0 6px var(--accent);
}

.border-glow {
    box-shadow: 0 0 8px var(--accent);
}
/* ===== includes/mutants.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   MAGICAL MUTATION — FURRY MUTANTS IN TEST TUBES (V4)
   Pure CSS + inline SVG. No external images. Lightweight.
   V2: more bounce behaviours, side rails, random fizz bubbles.
   V3: mutants appear MORE OFTEN — bigger, faster bounces, a pop-up
   that stays up most of its cycle, 7 tubes per side rail, twins.
   V4: mutants STAY VISIBLE — positioning and animation are on
   separate nested SVG groups (see mutants.php), so an animation
   can never knock the mutant out of its tube again; plus hover /
   focus revival — hover a tube and its mutant pops right up.
   V5: mutants DUCK DOWN and POP BACK UP on purpose — a third nested
   group (.mm-duck) runs a randomised 9–14s cycle, up ~75% of the
   time, ducked into the potion for ~1–2s, then popping back up;
   hovering cancels the duck. Reduced-motion keeps them visible.
   ============================================================ */
.mm-tube-row{display:flex;flex-wrap:wrap;gap:18px;justify-content:center;align-items:flex-end;margin:18px auto;padding:6px 4px;max-width:100%}
.mm-tube{margin:0;text-align:center;cursor:pointer;background:transparent;border:0;padding:0;font-family:monospace;color:var(--text,#00FF66);width:118px;flex:0 1 118px;position:relative}
.mm-tube:focus-visible{outline:2px dashed var(--accent,#00FF66);outline-offset:4px}
.mm-tube svg{width:104px;height:auto;max-width:100%;display:block;margin:0 auto;filter:drop-shadow(0 0 8px rgba(0,255,102,.35));transition:transform .25s ease}
.mm-tube:hover svg,.mm-tube:focus-visible svg{transform:translateY(-4px) rotate(-1.5deg)}
.mm-tube figcaption{font-size:.82em;line-height:1.35;margin-top:6px}
.mm-tube figcaption strong{display:block;font-size:1em;text-shadow:0 0 6px var(--accent,#00FF66)}
.mm-tube figcaption span{opacity:.8}
.mm-tube-sm{width:76px;flex-basis:76px;cursor:default}
.mm-tube-sm svg{width:66px}
.mm-tube-lg{width:150px;flex-basis:150px}
.mm-tube-lg svg{width:132px}
/* speech bubble shown on click */
.mm-speech{font-size:.8em;border:1px solid var(--accent,#00FF66);background:#001a08;color:var(--text,#00FF66);padding:6px 8px;margin-top:6px;min-height:2.6em;border-radius:8px;box-shadow:0 0 10px rgba(0,255,102,.25)}
.mm-speech:empty{display:none}
/* V4: the outer positioning group. Its translate is also set as a CSS
 * transform (same value as the transform attribute in mutants.php) so
 * the mutant's place in the tube survives even if the attribute were
 * ever dropped — CSS and attribute are the same property, so there is
 * no double translation, just a belt-and-braces copy. This group must
 * NEVER carry an animation class: animation lives on the inner group. */
.mm-mutant-pos{transform:translate(60px,94px)}
/* V4: hover / focus revival — hovering a tube (or keyboard-focusing it)
 * switches its mutant to a fast pop-up and keeps it up and bouncing
 * for as long as the tube is hovered/focused, even if it was mid-dip
 * when the mouse arrived. Works because the animation is on the inner
 * group; the outer group keeps the mutant in the tube regardless. */
.mm-tube:hover .mm-bob,.mm-tube:hover .mm-bounce-high,.mm-tube:hover .mm-bounce-wild,
.mm-tube:hover .mm-pop,.mm-tube:hover .mm-spin-slow,.mm-tube:hover .mm-wobble,
.mm-tube:hover .mm-floaty,.mm-tube:hover .mm-peek,
.mm-tube:focus-visible .mm-bob,.mm-tube:focus-visible .mm-bounce-high,
.mm-tube:focus-visible .mm-bounce-wild,.mm-tube:focus-visible .mm-pop,
.mm-tube:focus-visible .mm-spin-slow,.mm-tube:focus-visible .mm-wobble,
.mm-tube:focus-visible .mm-floaty,.mm-tube:focus-visible .mm-peek{
  animation-name:mm-pop;animation-duration:.9s;animation-timing-function:ease-in-out;animation-iteration-count:infinite
}
/* V5: duck down and pop back up — ON PURPOSE, as a loop. The mutant
 * is up and bouncing for ~75% of its cycle, ducks down into the potion
 * for ~1–2s, then pops back up. The duck lives on its own middle
 * <g class="mm-duck"> (see mutants.php): its keyframes only ever
 * translateY, never a full translate, so it cannot repeat the V4 bug.
 * Ducked = +72px down: mutant centre 94+72=166, tube clip ends at
 * y=148, so only a tiny fur tuft sliver shows at the bottom — it has
 * clearly ducked INTO the tube, not vanished to the SVG origin.
 * Duration/delay come from --mm-duck-dur / --mm-duck-delay, randomised
 * per tube in PHP (9–14s cycle, negative delay = desynced phases). */
@keyframes mm-duck{
  0%{transform:translateY(0)}
  68%{transform:translateY(0)}
  76%{transform:translateY(72px) scale(1.06,.86)}
  88%{transform:translateY(72px) scale(1.06,.86)}
  96%{transform:translateY(-6px) scale(.97,1.05)}
  100%{transform:translateY(0)}
}
.mm-duck{animation:mm-duck var(--mm-duck-dur,11s) ease-in-out infinite;animation-delay:var(--mm-duck-delay,0s);transform-box:fill-box;transform-origin:center bottom}
/* V5: hover / focus beats a duck-down — hovering a tube cancels the
 * duck entirely (animation:none snaps it straight up) while the V4
 * hover rule above keeps it popping fast for as long as it is hovered. */
.mm-tube:hover .mm-duck,.mm-tube:focus-visible .mm-duck{animation:none;transform:translateY(0)}
/* --- creature animations (V3: bigger, faster, up more of the time) --- */
@keyframes mm-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}
@keyframes mm-bounce-high{0%,100%{transform:translateY(0) scale(1,1)}30%{transform:translateY(-30px) scale(.95,1.06)}55%{transform:translateY(0) scale(1.06,.92)}75%{transform:translateY(-12px) scale(1,1)}}
@keyframes mm-bounce-wild{0%,100%{transform:translateY(0) rotate(-4deg)}25%{transform:translateY(-32px) rotate(5deg) scale(1.05,.95)}50%{transform:translateY(0) rotate(-3deg) scale(.95,1.05)}75%{transform:translateY(-16px) rotate(4deg)}}
/* V3 pop-up: the mutant pops up out of the tube and STAYS up for most
 * of the cycle, dipping down only briefly — so it is visible far more
 * often than a bounce that only peaks for an instant. */
@keyframes mm-pop{0%{transform:translateY(0)}12%{transform:translateY(-30px) scale(1.02,.98)}60%{transform:translateY(-30px) scale(1.02,.98)}78%{transform:translateY(0) scale(1.05,.94)}100%{transform:translateY(0)}}
@keyframes mm-spin-slow{0%{transform:rotate(-8deg)}50%{transform:rotate(8deg)}100%{transform:rotate(-8deg)}}
@keyframes mm-wobble{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}
@keyframes mm-blink{0%,92%,100%{transform:scaleY(1)}95%{transform:scaleY(.08)}}
@keyframes mm-bubble-rise{0%{transform:translateY(0);opacity:0}15%{opacity:.9}100%{transform:translateY(-70px);opacity:0}}
@keyframes mm-wave{0%,100%{transform:rotate(0deg)}50%{transform:rotate(-28deg)}}
@keyframes mm-floaty{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-12px) rotate(2deg)}}
@keyframes mm-stir{0%{transform:rotate(-18deg)}50%{transform:rotate(18deg)}100%{transform:rotate(-18deg)}}
@keyframes mm-zzz{0%{transform:translate(0,0);opacity:0}30%{opacity:1}100%{transform:translate(10px,-22px);opacity:0}}
@keyframes mm-peek{0%,100%{transform:translateY(8px)}50%{transform:translateY(-12px)}}
@keyframes mm-jump{0%{transform:translateY(0) scale(1,1)}30%{transform:translateY(-14px) scale(.94,1.08)}60%{transform:translateY(0) scale(1.08,.9)}100%{transform:translateY(0) scale(1,1)}}
@keyframes mm-antenna-pulse{0%,100%{opacity:1}50%{opacity:.35}}
@keyframes mm-fizz-rise{0%{transform:translateY(0) scale(.6);opacity:0}15%{opacity:.95}100%{transform:translateY(-70px) scale(1.15);opacity:0}}
@keyframes mm-wiggle{0%,100%{transform:rotate(0)}25%{transform:rotate(-7deg)}75%{transform:rotate(7deg)}}
.mm-bob{animation:mm-bob 2s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
.mm-bounce-high{animation:mm-bounce-high 1.5s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}
.mm-bounce-wild{animation:mm-bounce-wild 1.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}
.mm-pop{animation:mm-pop 2.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}
.mm-spin-slow{animation:mm-spin-slow 3.4s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
.mm-wobble{animation:mm-wobble 3.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center bottom}
.mm-eyes{animation:mm-blink 4.2s ease-in-out infinite;transform-box:fill-box;transform-origin:center}
.mm-bubble{animation:mm-bubble-rise 3s linear infinite}
.mm-wave-arm{animation:mm-wave 1.1s ease-in-out infinite;transform-box:fill-box;transform-origin:bottom center}
.mm-floaty{animation:mm-floaty 4s ease-in-out infinite}
.mm-stir-stick{animation:mm-stir 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:top center}
.mm-zzz{animation:mm-zzz 2.8s ease-out infinite}
.mm-peek{animation:mm-peek 2.4s ease-in-out infinite}
.mm-antenna-ball{animation:mm-antenna-pulse 1.4s ease-in-out infinite}
.mm-tube.mm-excited svg{animation:mm-jump .6s ease}
.mm-tube.mm-excited .mm-bob,.mm-tube.mm-excited .mm-bounce-high,.mm-tube.mm-excited .mm-bounce-wild{animation-duration:.7s}
.mm-tube.mm-wiggle svg{animation:mm-wiggle .5s ease-in-out}
/* random fizz bubbles (JS-spawned, capped) — float up out of the tube top */
.mm-fizz{position:absolute;left:0;right:0;top:0;height:70px;overflow:visible;pointer-events:none}
.mm-fizz-bubble{position:absolute;bottom:0;border-radius:50%;background:radial-gradient(circle at 35% 35%,rgba(255,255,255,.95),rgba(255,255,255,.25) 60%,rgba(255,255,255,.05));border:1px solid rgba(255,255,255,.6);animation:mm-fizz-rise linear forwards}
/* --- side rails: tubes down the left & right edges (desktop only) ---
 * V3: 7 tubes a side. The rail is overflow:hidden with slightly smaller
 * tubes, so on a short viewport the bottom tube is simply cut off
 * instead of overlapping the footer — and nothing ever causes a
 * horizontal scrollbar. */
.mm-side-rails{display:none}
@media (min-width:1280px){
  .mm-side-rails{display:block}
  .mm-side-rail{position:fixed;top:118px;bottom:96px;width:92px;z-index:800;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;pointer-events:none;overflow:hidden}
  .mm-side-left{left:6px}
  .mm-side-right{right:6px}
  .mm-side-rail .mm-tube{pointer-events:none;flex:0 0 auto}
  .mm-side-rail .mm-tube-sm{width:64px;flex-basis:64px}
  .mm-side-rail .mm-tube svg{width:58px;filter:drop-shadow(0 0 6px rgba(0,255,102,.3))}
  body.mm-has-rails{padding-left:104px;padding-right:104px}
}
@media (min-width:1600px){
  .mm-side-rail{width:108px}
  body.mm-has-rails{padding-left:122px;padding-right:122px}
}
/* header peeker — tiny mutant peeking over the header */
.mm-peeker{display:inline-flex;align-items:flex-end;margin-left:6px;vertical-align:middle}
.mm-peeker svg{width:34px;height:34px;filter:drop-shadow(0 0 6px rgba(0,255,102,.5))}
/* lab assistant — fixed corner mutant, site-wide via footer */
.mm-assistant{position:fixed;right:14px;bottom:14px;z-index:1200;width:72px;text-align:center;cursor:pointer;background:transparent;border:0;padding:0;font-family:monospace;color:var(--text,#00FF66)}
.mm-assistant svg{width:64px;height:auto;filter:drop-shadow(0 0 10px rgba(0,255,102,.45));animation:mm-floaty 3.4s ease-in-out infinite}
.mm-assistant .mm-speech{position:absolute;right:70px;bottom:38px;width:170px;text-align:left}
.mm-assistant:hover svg{animation-duration:1.2s}
@media (max-width:600px){
  .mm-tube{width:96px;flex-basis:96px}
  .mm-tube svg{width:86px}
  .mm-assistant{width:56px;right:8px;bottom:8px}
  .mm-assistant svg{width:50px}
  .mm-assistant .mm-speech{width:140px;right:54px}
}
@media (prefers-reduced-motion:reduce){
  .mm-bob,.mm-bounce-high,.mm-bounce-wild,.mm-pop,.mm-spin-slow,.mm-wobble,.mm-eyes,.mm-bubble,.mm-wave-arm,.mm-floaty,.mm-stir-stick,.mm-zzz,.mm-peek,.mm-duck,.mm-assistant svg,.mm-antenna-ball{animation:none !important}
  .mm-fizz{display:none}
  .mm-side-rail .mm-tube svg{transform:none}
}

/* ===== css/v7.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V7 — interactive terminal, mutant of the day, "now" panel,
   guestbook. Green-on-black, same as the rest of the site.
   ============================================================ */
.mm-v7-panel{max-width:900px;margin:24px auto;padding:18px 20px;border:1px solid #00FF66;background:#000;color:#00FF66;box-shadow:0 0 12px rgba(0,255,102,.35);font-family:monospace;line-height:1.6}
.mm-v7-panel h2{text-align:center;text-shadow:0 0 6px #00FF66;margin:0 0 10px;font-size:1.2em;letter-spacing:1px}
.mm-v7-panel p{margin:8px 0}
.mm-v7-panel .mm-note{opacity:.8;font-size:.9em}
.mm-motd-tube{display:flex;align-items:center;gap:18px;flex-wrap:wrap;justify-content:center}
.mm-motd-info{max-width:420px}
.mm-motd-info .mm-motd-name{font-size:1.25em;font-weight:bold;text-shadow:0 0 6px #00FF66}
.mm-motd-info .mm-motd-date{opacity:.75;font-size:.9em}
/* Interactive terminal */
.mm-interactive{max-width:900px;margin:24px auto;padding:0;border:1px solid #00FF66;background:#000;color:#00FF66;box-shadow:0 0 12px rgba(0,255,102,.35);font-family:monospace}
.mm-interactive-head{padding:10px 14px;border-bottom:1px solid #00FF66;text-shadow:0 0 6px #00FF66;letter-spacing:1px}
.mm-interactive-out{height:280px;overflow-y:auto;padding:12px 14px;white-space:pre-wrap;word-break:break-word;line-height:1.55;cursor:text}
.mm-interactive-out .mm-cmdline{color:#FFBF00}
.mm-interactive-out .mm-err{color:#FF4444}
.mm-interactive-in{display:flex;align-items:center;border-top:1px solid #00FF66;padding:8px 14px;gap:8px}
.mm-interactive-in .mm-prompt{color:#FFBF00;flex:0 0 auto}
.mm-interactive-in input{flex:1;background:#000;color:#00FF66;border:0;outline:none;font-family:monospace;font-size:1em;min-width:0}
.mm-interactive-hint{max-width:900px;margin:6px auto 0;text-align:center;font-family:monospace;color:#00FF66;opacity:.75;font-size:.9em}
/* Guestbook */
.mm-gb-entry{border:1px solid #00FF66;margin:14px 0;padding:12px 14px;background:#000;box-shadow:0 0 8px rgba(0,255,102,.2)}
.mm-gb-entry .mm-gb-head{color:#FFBF00;margin-bottom:6px}
.mm-gb-entry .mm-gb-msg{white-space:pre-wrap;word-break:break-word;line-height:1.6}
.mm-gb-form label{display:block;margin:12px 0 4px}
.mm-gb-form input[type=text],.mm-gb-form textarea{width:100%;box-sizing:border-box;background:#000;color:#00FF66;border:1px solid #00FF66;font-family:monospace;font-size:1em;padding:8px}
.mm-gb-form textarea{min-height:110px;resize:vertical}
.mm-gb-form button{font-family:monospace;background:#000;color:#00FF66;border:1px solid #00FF66;padding:8px 18px;margin-top:12px;cursor:pointer}
.mm-gb-form button:hover{background:#00FF66;color:#000}
.mm-gb-ok{border:1px solid #00FF66;padding:12px;margin:14px 0;background:#001a08}
.mm-gb-err{border:1px solid #FF4444;color:#FF4444;padding:12px;margin:14px 0}
.mm-gb-honeypot{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
@media (max-width:600px){.mm-interactive-out{height:220px}.mm-v7-panel{margin:16px 12px}}

/* ===== css/v8.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V8 — SYSOP ADMIN page. Green-on-black, same as the rest of
   the site. Only the admin page uses these classes.
   ============================================================ */
.mm-admin-secret{
  border:1px solid #00FF66;
  background:#001a08;
  color:#00FF66;
  font-family:monospace;
  font-size:1.15em;
  letter-spacing:2px;
  padding:14px 16px;
  margin:12px 0;
  word-break:break-all;
  text-align:center;
  box-shadow:0 0 10px rgba(0,255,102,.25);
}
.mm-admin-secret div{letter-spacing:3px;line-height:1.7}
.mm-gb-form input[type=password]{
  width:100%;box-sizing:border-box;background:#000;color:#00FF66;
  border:1px solid #00FF66;font-family:monospace;font-size:1em;padding:8px;
}
.mm-admin-danger{border-color:#FF4444 !important;color:#FF4444 !important;}
.mm-admin-danger:hover{background:#FF4444 !important;color:#000 !important;}
.mm-page{max-width:900px;margin:0 auto;padding:0 12px;font-family:monospace;color:#00FF66;}
.mm-page h1{text-align:center;text-shadow:0 0 8px #00FF66;letter-spacing:2px;}
.mm-page code{color:#FFBF00;}
.mm-page hr{margin:22px 0;}

/* ===== css/v9.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V9 — ADMIN QR BARCODE (and nothing else).
   The authenticator barcode must sit on a white square or no
   phone can scan it, whatever the site theme is doing around it.
   The QR itself is drawn by the vendored js/qrcode-generator.js
   (MIT, Kazuhiko Arase) from the otpauth address on the page —
   no external service, no image download, it works offline.
   ============================================================ */
.mm-qr{
  background:#fff;
  padding:12px;
  display:inline-block;
  margin:12px 0;
  box-shadow:0 0 12px rgba(0,255,102,.35);
  line-height:0;
}
.mm-qr svg{
  display:block;
  max-width:248px;
  width:100%;
  height:auto;
}

/* ===== css/v10.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V10 — scripts library, links categories, admin editors.
   Green-on-black, same as the rest of the site.
   ============================================================ */
.mm-script-item{border:1px solid #00FF66;margin:14px 0;padding:12px 14px;background:#000;box-shadow:0 0 8px rgba(0,255,102,.2);line-height:1.6}
.mm-script-lang{display:inline-block;border:1px solid #FFBF00;color:#FFBF00;font-size:.8em;padding:1px 8px;margin-left:8px;letter-spacing:1px}
.mm-script-code{background:#001a08;border:1px solid #00FF66;color:#00FF66;font-family:monospace;font-size:.95em;padding:14px;overflow-x:auto;white-space:pre;line-height:1.5;margin:14px 0}
.mm-script-btn{font-family:monospace;background:#000;color:#00FF66;border:1px solid #00FF66;padding:8px 18px;margin:6px 6px 6px 0;cursor:pointer;text-decoration:none;display:inline-block;font-size:1em}
.mm-script-btn:hover{background:#00FF66;color:#000}
/* Admin editor forms: selects and datalist inputs match the
   guestbook form inputs already in v7.css. */
.mm-gb-form select{width:100%;box-sizing:border-box;background:#000;color:#00FF66;border:1px solid #00FF66;font-family:monospace;font-size:1em;padding:8px}
.mm-admin-list{border:1px solid #00FF66;margin:14px 0;padding:12px 14px;background:#000;line-height:1.6}
.mm-admin-list .mm-admin-row{border-bottom:1px dashed rgba(0,255,102,.4);padding:8px 0}
.mm-admin-list .mm-admin-row:last-child{border-bottom:0}
.mm-admin-list code{color:#FFBF00}
.mm-admin-small{font-size:.85em;opacity:.85}

/* ===== css/v12.css (V31 consolidated — original file kept in git history) ===== */
/* V12 — Secret Santa form styles. Green-on-black, same as the rest. */
.mm-ss-form label { display: block; margin: 14px 0 4px; color: #00FF66; font-family: monospace; }
.mm-ss-form input[type=text],
.mm-ss-form input[type=email],
.mm-ss-form input[type=number],
.mm-ss-form textarea {
    width: 100%; padding: 8px; background: #111; border: 1px solid #00FF66;
    color: #00FF66; font-family: monospace; box-sizing: border-box;
}
.mm-ss-form input:focus, .mm-ss-form textarea:focus { outline: none; box-shadow: 0 0 8px #00FF66; }
.mm-ss-person {
    border: 1px dashed #00FF66; padding: 12px 14px 14px; margin: 14px 0;
    background: #001a08;
}
.mm-ss-person legend { color: #00FF66; font-family: monospace; padding: 0 6px; letter-spacing: 1px; }
.mm-ss-row2 { display: flex; gap: 12px; }
.mm-ss-row2 > div { flex: 1; min-width: 0; }
.mm-ss-row2 > div:first-child { flex: 0 0 110px; }
@media (max-width: 600px) {
    .mm-ss-row2 { flex-direction: column; gap: 0; }
    .mm-ss-row2 > div:first-child { flex: 1; }
}
.mm-ss-remove {
    margin-top: 10px; background: #000; color: #FF6666; border: 1px solid #FF6666;
    font-family: monospace; padding: 6px 12px; cursor: pointer;
}
.mm-ss-remove:hover:not(:disabled) { background: #FF6666; color: #000; }
.mm-ss-remove:disabled { opacity: .35; cursor: not-allowed; }
.mm-ss-check { display: block; margin: 16px 0; font-family: monospace; color: #00FF66; }
.mm-ss-check input { width: auto; margin-right: 8px; accent-color: #00FF66; }
.mm-ss-pairs { width: 100%; border-collapse: collapse; font-family: monospace; margin-top: 12px; }
.mm-ss-pairs th, .mm-ss-pairs td { border: 1px solid #00FF66; padding: 8px 10px; text-align: left; }
.mm-ss-pairs th { background: #001a08; }
#ssAddPerson:disabled { opacity: .5; cursor: not-allowed; }

/* ===== css/v14.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V14 — Secret Santa snow + the Random Person Picker.
   Pure CSS + the inline SVG in pages/picker.php. No images,
   no libraries. Green-on-black, same as the rest of the site.
   ============================================================ */

/* --- Gentle falling snow (Secret Santa page only) --- */
.mm-snow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}
.mm-snow span {
    position: absolute;
    top: -6%;
    color: #FFFFFF;
    opacity: 0.5;
    animation: mm-snow-fall linear infinite;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}
@keyframes mm-snow-fall {
    0%   { transform: translateY(0) translateX(0); }
    50%  { transform: translateY(55vh) translateX(14px); }
    100% { transform: translateY(110vh) translateX(-10px); }
}

/* --- Random Person Picker --- */
.mm-pick-go {
    font-size: 1.15em;
    padding: 12px 26px;
}
.mm-pick-go:disabled {
    opacity: 0.55;
    cursor: wait;
}

/* The stage: a tall box the mutant can pop up inside of.
 * overflow:hidden is what hides the mutant while it is "in" the
 * tube — it starts translated 460px down (fully below the box)
 * and springs up to its resting place astride the rim. */
.mm-pick-stage {
    margin: 18px auto 0;
    max-width: 420px;
    text-align: center;
}
.mm-pick-tube {
    position: relative;
    height: 470px;
    max-width: 340px;
    margin: 0 auto;
    overflow: hidden;
}
.mm-pick-glass {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 330px;
    width: auto;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(0, 255, 102, 0.35));
}
/* The names, floating in the potion. */
.mm-pick-chips {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    width: 150px;
    height: 170px;
    overflow: hidden;
    z-index: 2;
}
.mm-pick-chip {
    position: absolute;
    display: inline-block;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 7px;
    background: #001a08;
    border: 1px solid var(--accent, #00FF66);
    color: var(--text, #00FF66);
    font-family: monospace;
    font-size: 0.82em;
    border-radius: 10px;
    animation: mm-pick-float 2.2s ease-in-out infinite;
}
/* While the tube is mixing, the chips swirl faster and the whole
 * tube shakes a little — pure theatre, the winner is already
 * chosen by the time the fizzing starts. */
.mm-pick-mixing .mm-pick-chip {
    animation-name: mm-pick-swirl;
    animation-duration: 0.9s;
}
.mm-pick-mixing .mm-pick-tube {
    animation: mm-pick-shake 0.45s ease-in-out infinite;
}
.mm-pick-mixing .mm-pick-glass {
    filter: drop-shadow(0 0 16px rgba(0, 255, 102, 0.55));
}
@keyframes mm-pick-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-9px) rotate(2deg); }
}
@keyframes mm-pick-swirl {
    0%   { transform: translate(0, 0) rotate(-6deg); }
    25%  { transform: translate(6px, -12px) rotate(5deg); }
    50%  { transform: translate(-5px, -4px) rotate(-4deg); }
    75%  { transform: translate(5px, -14px) rotate(6deg); }
    100% { transform: translate(0, 0) rotate(-6deg); }
}
@keyframes mm-pick-shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25%      { transform: translateX(-2px) rotate(-0.6deg); }
    75%      { transform: translateX(2px) rotate(0.6deg); }
}
/* Fizz bubbles rising through the potion. */
.mm-pick-bubble {
    position: absolute;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.25) 60%, rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: mm-pick-bubble-rise 1.8s linear infinite;
}
@keyframes mm-pick-bubble-rise {
    0%   { transform: translateY(0); opacity: 0; }
    15%  { opacity: 0.95; }
    100% { transform: translateY(-170px); opacity: 0; }
}
/* When the mixing ends the chips fade away — the tube has spoken. */
.mm-pick-reveal .mm-pick-chips {
    opacity: 0;
    transition: opacity 0.4s ease;
}
/* The mutant: hidden down inside the tube until the reveal, when
 * it springs up astride the rim, holding the winner's name. */
.mm-pick-mutant {
    position: absolute;
    left: 50%;
    bottom: 300px;
    width: 150px;
    z-index: 3;
    transform: translate(-50%, 460px);
    text-align: center;
}
.mm-pick-mutant svg {
    width: 110px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 255, 102, 0.5));
}
.mm-pick-reveal .mm-pick-mutant {
    transform: translate(-50%, 0);
    transition: transform 0.7s cubic-bezier(0.2, 1.4, 0.4, 1);
}
/* The little sign the mutant holds up. */
.mm-pick-sign {
    display: inline-block;
    margin-top: 2px;
    padding: 5px 12px;
    background: #001a08;
    border: 2px solid var(--accent, #00FF66);
    color: var(--text, #00FF66);
    font-family: monospace;
    font-size: 1.05em;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.4);
    max-width: 100%;
    overflow-wrap: break-word;
}
.mm-pick-sign:empty {
    display: none;
}
/* The big result banner under the tube. */
.mm-pick-result {
    margin: 14px auto 0;
    padding: 12px 16px;
    border: 1px solid var(--accent, #00FF66);
    background: #001a08;
    color: var(--text, #00FF66);
    font-family: monospace;
    font-size: 1.1em;
    line-height: 1.5;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.3);
    min-height: 1.6em;
}
.mm-pick-result:empty {
    display: none;
}

@media (max-width: 600px) {
    .mm-pick-tube { height: 430px; }
    .mm-pick-glass { height: 300px; }
    .mm-pick-mutant { bottom: 270px; }
    .mm-pick-go { font-size: 1em; padding: 10px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .mm-snow { display: none; }
    .mm-pick-chip, .mm-pick-bubble { animation: none !important; }
    .mm-pick-mixing .mm-pick-tube { animation: none; }
    .mm-pick-reveal .mm-pick-mutant { transition: none; }
}

/* ===== css/v11.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V11 — WYSIWYG editors, rich text, welcome message.
   Green-on-black, same as the rest of the site.
   ============================================================ */
/* Rich text as visitors see it — on the homepage, news, links
 * and scripts pages. Pictures can never break the layout. */
.mm-rich img{max-width:100%;height:auto;display:block;margin:12px auto}
.mm-rich h2{color:#00FF66;text-shadow:0 0 6px #00FF66;margin:16px 0 8px}
.mm-rich h3{color:#00FF66;margin:14px 0 6px}
.mm-rich ul,.mm-rich ol{margin:8px 0 8px 22px}
.mm-rich blockquote{border-left:3px solid #00FF66;margin:12px 0;padding:4px 14px;opacity:.9}
.mm-rich code{background:#001a08;border:1px solid #00FF66;padding:1px 5px;font-size:.92em}
.mm-rich pre{background:#001a08;border:1px solid #00FF66;padding:12px;overflow-x:auto;white-space:pre}
.mm-rich p{margin:0 0 1em}
.mm-rich p:last-child{margin-bottom:0}
.welcome-box .mm-rich p{margin:0 0 1em}
.welcome-box .mm-rich p:last-child{margin-bottom:0}
/* The WYSIWYG editor in the admin. Without JavaScript the
 * toolbar and the editable box stay hidden and the plain
 * textarea is what Glyn sees; with JavaScript the textarea
 * hides and the editor takes over. */
.mm-editor{margin:8px 0}
.mm-ed-toolbar{display:none;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.mm-editor.mm-ed-js .mm-ed-toolbar{display:flex}
.mm-ed-toolbar button{font-family:monospace;background:#000;color:#00FF66;border:1px solid #00FF66;padding:6px 10px;cursor:pointer;font-size:.95em}
.mm-ed-toolbar button:hover{background:#00FF66;color:#000}
.mm-ed-sep{width:1px;background:#00FF66;opacity:.5;margin:2px 4px}
.mm-ed-area{display:none;min-height:140px;background:#000;color:#00FF66;border:1px solid #00FF66;font-family:monospace;font-size:1em;padding:10px;line-height:1.6;overflow-y:auto}
.mm-editor.mm-ed-js .mm-ed-area{display:block}
.mm-ed-area:focus{outline:2px dashed #00FF66;outline-offset:2px}
.mm-ed-area:empty:before{content:attr(data-placeholder);opacity:.5}
.mm-ed-area img{max-width:100%;height:auto}
.mm-ed-area h2,.mm-ed-area h3{margin:8px 0}
.mm-ed-field{width:100%;box-sizing:border-box;min-height:140px}
.mm-editor.mm-ed-js .mm-ed-field{display:none}
.mm-ed-image{border:1px dashed #00FF66;padding:10px;margin:6px 0;background:#001a08}
.mm-ed-image label{display:block;margin:8px 0 4px}
.mm-ed-image input[type="text"],.mm-ed-image select{width:100%;box-sizing:border-box;background:#000;color:#00FF66;border:1px solid #00FF66;font-family:monospace;font-size:1em;padding:8px;margin:4px 0}
.mm-ed-image button{font-family:monospace;background:#000;color:#00FF66;border:1px solid #00FF66;padding:8px 14px;margin:4px 6px 4px 0;cursor:pointer}
.mm-ed-image button:hover{background:#00FF66;color:#000}
.mm-ed-img-note{margin:8px 0 0;font-size:.9em}

/* ===== css/v16.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V16 — THE MUTANT ARCADE.
   Five arcade games in vanilla JS + canvas/DOM. No libraries,
   no images, no external anything. Green-on-black, same as the
   rest of the site; mutant colours from the site's own pool.
   ============================================================ */

/* --- Lobby cards --- */
.mm-arcade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 16px 0;
}
.mm-arcade-card {
    border: 2px solid var(--accent, #00FF66);
    background: #001a08;
    padding: 14px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.25);
}
.mm-arcade-card h3 {
    margin: 0 0 6px;
    color: var(--text, #00FF66);
    font-family: monospace;
    letter-spacing: 1px;
}
.mm-arcade-card p {
    margin: 0 0 10px;
    font-size: 0.92em;
    line-height: 1.5;
    opacity: 0.9;
}
.mm-arcade-card .mm-best {
    display: block;
    margin: 8px 0 0;
    font-size: 0.85em;
    opacity: 0.85;
}
.mm-arcade-card .mm-best:empty {
    display: none;
}

/* --- Score bar above every game --- */
.mm-game-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    justify-content: center;
    margin: 10px 0;
    padding: 8px 12px;
    border: 1px solid var(--accent, #00FF66);
    background: #001a08;
    font-family: monospace;
    font-size: 1.05em;
    letter-spacing: 1px;
}
.mm-game-bar span {
    white-space: nowrap;
}

/* --- Canvas + stage --- */
.mm-game-stage {
    margin: 12px auto 0;
    max-width: 520px;
    text-align: center;
}
.mm-game-stage canvas {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 0 auto;
    background: #000;
    border: 2px solid var(--accent, #00FF66);
    box-shadow: 0 0 14px rgba(0, 255, 102, 0.3);
    touch-action: none;
}
.mm-game-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 12px 0 4px;
}
.mm-game-buttons .term-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

/* --- Game-over / win banner --- */
.mm-game-over {
    margin: 12px auto 0;
    padding: 12px 16px;
    border: 2px solid var(--accent, #00FF66);
    background: #001a08;
    font-family: monospace;
    font-size: 1.15em;
    line-height: 1.6;
    box-shadow: 0 0 14px rgba(0, 255, 102, 0.35);
    min-height: 1.6em;
}
.mm-game-over:empty {
    display: none;
}

/* --- On-screen touch buttons (Invaders + Snake) --- */
.mm-touch {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 12px 0 0;
    user-select: none;
    -webkit-user-select: none;
}
.mm-touch .term-btn {
    padding: 10px 18px;
    font-size: 1.1em;
    touch-action: none;
}
.mm-touch .mm-touch-fire {
    border-color: #FF5C8A;
    color: #FF5C8A;
    box-shadow: inset 0 0 6px #FF5C8A, 0 0 8px #FF5C8A;
}

/* --- Whack-a-Mutant tubes --- */
.mm-whack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 460px;
    margin: 14px auto 0;
}
.mm-whack-tube {
    position: relative;
    height: 150px;
    border: 2px solid var(--accent, #00FF66);
    border-radius: 0 0 26px 26px;
    background: linear-gradient(#001a08, #000);
    overflow: hidden;
    cursor: pointer;
    box-shadow: inset 0 0 12px rgba(0, 255, 102, 0.2);
}
.mm-whack-tube::before {
    /* The rim of the test tube */
    content: "";
    position: absolute;
    top: 0;
    left: -2px;
    right: -2px;
    height: 10px;
    border: 2px solid var(--accent, #00FF66);
    border-bottom: none;
    background: #001a08;
    z-index: 3;
}
.mm-whack-tube::after {
    /* The potion at the bottom of the tube */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 34px;
    background: rgba(0, 255, 102, 0.18);
    border-top: 1px solid rgba(0, 255, 102, 0.5);
    z-index: 1;
}
.mm-whack-mutant {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 96px;
    height: 96px;
    margin-left: -48px;
    transform: translateY(130px);
    transition: transform 0.28s cubic-bezier(0.2, 1.3, 0.4, 1);
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(0, 255, 102, 0.45));
}
.mm-whack-tube.up .mm-whack-mutant {
    transform: translateY(0);
}
.mm-whack-tube.whacked .mm-whack-mutant {
    animation: mm-whack-squash 0.25s ease-in;
}
@keyframes mm-whack-squash {
    0%   { transform: translateY(0) scale(1); }
    50%  { transform: translateY(0) scale(1.25, 0.7); }
    100% { transform: translateY(130px) scale(1); }
}
.mm-whack-mutant svg {
    width: 96px;
    height: 96px;
}
.mm-whack-points {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    font-family: monospace;
    font-size: 1.2em;
    font-weight: bold;
    color: #FFD23F;
    text-shadow: 0 0 8px #FFD23F;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
}
.mm-whack-points.show {
    animation: mm-whack-points-float 0.7s ease-out;
}
@keyframes mm-whack-points-float {
    0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-26px); }
}

/* --- Controls note under each game --- */
.mm-controls {
    margin: 12px auto 0;
    max-width: 520px;
    font-size: 0.9em;
    line-height: 1.6;
    opacity: 0.85;
    text-align: center;
}

@media (max-width: 600px) {
    .mm-whack-tube { height: 120px; }
    .mm-whack-mutant, .mm-whack-mutant svg { width: 76px; height: 76px; }
    .mm-whack-mutant { margin-left: -38px; }
    .mm-game-bar { font-size: 0.95em; }
}

@media (prefers-reduced-motion: reduce) {
    .mm-whack-mutant { transition: none; }
    .mm-whack-tube.whacked .mm-whack-mutant { animation: none; }
    .mm-whack-points.show { animation: none; }
}

/* ===== css/v18.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V18 — MUTANT ASTEROIDS + a wider Invaders screen.
   Asteroids needs no new styles (it reuses v16.css), but the
   Invaders canvas is now 720x480, so its stage gets room to
   breathe. The page column is 860px wide, so 720px of canvas
   fits with room to spare; on phones the canvas still scales
   down via the width:100% rule in v16.css.
   ============================================================ */

/* --- Wider stage for Mutant Invaders (720px canvas) --- */
.mm-game-stage-wide {
    max-width: 760px;
}
.mm-game-stage-wide canvas {
    max-width: 720px;
}

/* --- Crosshair cursor for Mutant Missile Command --- */
.mm-game-stage canvas.mm-crosshair {
    cursor: crosshair;
}

/* ===== css/v19.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V19 — SCALABLE ARCADE.
   The game windows grow with the screen instead of stopping
   at their fixed size. The page column on game pages widens
   (but stays clear of the fixed side rails), the stage grows
   with it, and the canvas is backed at display size x DPR
   (js/mm-scale.js) so it stays crisp instead of going soft.
   Game logic still plays in its fixed virtual resolution —
   only the rendering scales, so speeds, sizes, scoring and
   difficulty are exactly as before. Below 1280px nothing
   changes: phones and small laptops play exactly as before.
   ============================================================ */

/* --- Wider page + stage on big screens only --- */
@media (min-width: 1280px) {
    /* Page: up to 1240px, but always 220px narrower than the
       viewport so the fixed side rails (92px a side, 6px in)
       never sit on top of the game. At a 1280px viewport that
       is a 1060px page; at 1600px and up it is the full 1240px. */
    .mm-page.mm-page-wide {
        max-width: min(1240px, calc(100vw - 220px));
    }

    /* Stage + canvas: fill the widened page, up to 1160px of
       game. The old 480/720px caps in v16/v18 are overridden
       here; aspect ratio is kept by height:auto on the canvas. */
    .mm-page-wide .mm-game-stage {
        max-width: 1160px;
    }
    .mm-page-wide .mm-game-stage canvas {
        max-width: none;
    }

    /* Snake is square: cap it lower so it doesn't grow into a
       1160px-tall tower — 780px is still over twice its old size. */
    .mm-page-wide .mm-game-stage-square {
        max-width: 780px;
    }

    /* Whack-a-Mutant: bigger tubes, bigger mutants, same 3x3
       grid, same pop timing and scoring. */
    .mm-page-wide .mm-whack-grid {
        max-width: 900px;
        gap: 16px;
    }
    .mm-page-wide .mm-whack-tube {
        height: 250px;
    }
    .mm-page-wide .mm-whack-tube::after {
        /* The potion at the bottom of the tube */
        height: 48px;
    }
    .mm-page-wide .mm-whack-mutant,
    .mm-page-wide .mm-whack-mutant svg {
        width: 168px;
        height: 168px;
    }
    .mm-page-wide .mm-whack-mutant {
        margin-left: -84px;
        /* Hidden: 168px mutant + 8px from the bottom of a
           250px tube needs 200px down to clear the rim. */
        transform: translateY(200px);
    }
    .mm-page-wide .mm-whack-points {
        font-size: 1.5em;
    }
    .mm-page-wide .mm-whack-tube.whacked .mm-whack-mutant {
        animation: mm-whack-squash-big 0.25s ease-in;
    }
}

@keyframes mm-whack-squash-big {
    0%   { transform: translateY(0) scale(1); }
    50%  { transform: translateY(0) scale(1.25, 0.7); }
    100% { transform: translateY(200px) scale(1); }
}

/* --- Full screen (any viewport) ---
   The whole game page goes full screen, so the score bar stays
   visible; the title and mutant row hide to give the game room.
   The canvas is capped by height too, so a wide-but-short
   screen gets a game that fits instead of one that scrolls. */
.mm-page-wide:fullscreen {
    max-width: none;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background: #000;
    padding: 16px;
}
.mm-page-wide:fullscreen h1,
.mm-page-wide:fullscreen .mm-tube-row {
    display: none;
}
.mm-page-wide:fullscreen .mm-game-stage {
    max-width: none;
}
.mm-page-wide:fullscreen .mm-game-stage canvas {
    max-width: 100%;
    max-height: calc(100vh - 170px);
}
.mm-page-wide:fullscreen .mm-whack-grid {
    max-width: 1100px;
}

/* ===== css/v20.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V20 — TILED HOMEPAGE, SLIM ABOUT TOP, FINGERPRINT PAGE.
   Green-on-black, same as the rest of the site. Nothing here
   changes how anything works — only how it is laid out.
   ============================================================ */

/* ---------- 1. HOMEPAGE TILES ---------- */
/* The homepage is now a tidy tile dashboard instead of a stack
 * of full-width bands. Two columns on desktop, one on phones.
 * Tiles all share one card style (same border/shadow as the
 * site's .mm-card), sized to their content. */
.mm-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 16px 24px;
}
/* Wide screens: keep clear of the fixed side rails (92px a side),
 * same rule as the V19 game pages: 220px narrower than the
 * viewport, up to 1160px. */
@media (min-width: 1280px) {
    .mm-tiles { max-width: min(1160px, calc(100vw - 220px)); }
}
.mm-tile {
    border: 1px solid var(--accent);
    background: #000;
    box-shadow: 0 0 12px rgba(0, 255, 102, .18);
    padding: 16px 18px;
    min-width: 0;
}
.mm-tile-wide { grid-column: span 2; }
.mm-tile-head {
    font-size: .95em;
    letter-spacing: 2px;
    color: var(--accent);
    text-shadow: 0 0 6px var(--accent);
    margin: 0 0 10px;
}
/* The panels that live inside tiles give up their own outer
 * card — the tile IS the card now. Their inner structure
 * (headings, terminal output, input row) is untouched. */
.mm-tiles .welcome-box,
.mm-tiles .mm-lab-intro,
.mm-tiles .mm-v7-panel,
.mm-tiles .mm-interactive {
    margin: 0;
    max-width: none;
    border: 0;
    box-shadow: none;
    padding: 0;
}
.mm-tiles .mm-lab-intro h2 { text-align: center; margin: 0 0 4px; }
.mm-tiles .mm-lab-intro p { margin: 0 0 4px; }
.mm-tiles .mm-v7-panel h2 { margin: 0 0 10px; }
.mm-tiles .mm-interactive-hint { max-width: none; margin: 10px 0 0; }
/* Terminal tiles keep their tall terminal windows — the two
 * panels line up because grid rows stretch to the tallest. */
.mm-tiles .terminal-panel { margin: 0; }
/* Phones: one column, wide tiles go full width. */
@media (max-width: 900px) {
    .mm-tiles { grid-template-columns: 1fr; gap: 14px; }
    .mm-tile-wide { grid-column: auto; }
}

/* ---------- 2. ABOUT PAGE — SLIM TOP ---------- */
/* The story used to start ~900px down: a 3-mutant row with
 * captions AND empty speech bubbles, then a boot panel that
 * typed all 16 motd lines. Now the row is small tubes with
 * captions but no speech bubbles, the h1 is tightened, and
 * the boot panel is a slim two-line strip. The story itself
 * (.mm-card) is untouched. */
.mm-about h1 { margin: 6px 0 2px; }
.mm-about .mm-tube-row { margin: 8px auto 12px; }
.mm-boot-strip {
    border: 1px solid var(--accent);
    background: #000;
    box-shadow: 0 0 10px rgba(0, 255, 102, .18);
    padding: 10px 14px;
    margin: 0 0 18px;
    font-family: monospace;
    line-height: 1.6;
    color: var(--text);
}
.mm-boot-strip .mm-boot-line { display: block; white-space: pre-wrap; word-break: break-word; }
.mm-boot-strip .mm-boot-prompt { color: var(--accent); margin-right: 6px; }
.mm-boot-cursor {
    display: inline-block;
    width: 9px;
    height: 1em;
    background: var(--accent);
    vertical-align: -0.15em;
    animation: mm-boot-blink 1s steps(1) infinite;
}
@keyframes mm-boot-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mm-boot-cursor { animation: none; } }

/* ---------- 3. BROWSER FINGERPRINT PAGE ---------- */
.mm-fp-note {
    border: 1px dashed var(--accent);
    padding: 12px 14px;
    margin: 14px 0 18px;
    line-height: 1.6;
    opacity: .95;
}
.mm-fp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.mm-fp-card { margin: 0; }
.mm-fp-card h2 { font-size: 1.1em; margin: 0 0 10px; letter-spacing: 1px; }
.mm-fp-row {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px dotted rgba(0, 255, 102, .25);
    line-height: 1.5;
}
.mm-fp-row:last-child { border-bottom: 0; }
.mm-fp-row dt {
    flex: 0 0 150px;
    color: var(--accent);
    text-shadow: 0 0 6px var(--accent);
}
.mm-fp-row dd { margin: 0; min-width: 0; word-break: break-word; overflow-wrap: anywhere; }
.mm-fp-copy { margin: 0 0 8px; }
.mm-fp-copy-note { font-size: .9em; opacity: .8; min-height: 1.4em; }
@media (max-width: 700px) {
    .mm-fp-grid { grid-template-columns: 1fr; }
    .mm-fp-row { flex-direction: column; gap: 0; }
    .mm-fp-row dt { flex: none; }
}

/* ===== css/v25.css (V31 consolidated — original file kept in git history) ===== */
/* V25 — Network Tools. Result badges and record lists, in theme. */
.mm-nt-form label { display: block; margin-top: 14px; color: #00FF66; }
.mm-nt-form input[type="text"],
.mm-nt-form select {
    width: 100%;
    padding: 8px;
    background: #111;
    border: 1px solid #00FF66;
    color: #00FF66;
    font-family: monospace;
    box-sizing: border-box;
}
.mm-nt-section { margin-top: 18px; }
.mm-nt-section h3 { margin-bottom: 6px; }
.mm-nt-badge {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid;
    font-size: .85em;
    letter-spacing: 1px;
    margin-right: 6px;
}
.mm-nt-ok   { color: #00FF66; border-color: #00FF66; background: #001900; }
.mm-nt-bad  { color: #ff5555; border-color: #ff5555; background: #190000; }
.mm-nt-warn { color: #FFBF00; border-color: #FFBF00; background: #191100; }
.mm-nt-records { list-style: none; padding-left: 0; }
.mm-nt-records li { padding: 3px 0; overflow-wrap: anywhere; }
.mm-nt-records code {
    background: #111;
    border: 1px solid #00FF66;
    padding: 2px 6px;
    overflow-wrap: anywhere;
}
.mm-nt-pre {
    background: #000;
    border: 1px solid #00FF66;
    padding: 10px;
    overflow-x: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ===== css/v30.css (V31 consolidated — original file kept in git history) ===== */
/* ============================================================
   V30 — REGISTERED ACCOUNTS + DIAGNOSTICS TOOLKIT.
   Plain tables for the account page (game history, sign-in
   log) and the admin users list. Everything else reuses the
   existing panels, cards and badges (v7/v25).
   ============================================================ */

/* Account + admin tables: username, dates, IPs, fingerprints. */
.mm-user-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.95em;
}

.mm-user-table th,
.mm-user-table td {
    border: 1px solid var(--accent);
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

.mm-user-table th {
    background: var(--accent);
    color: #000;
    letter-spacing: 1px;
}

.mm-user-table td code {
    word-break: break-all;
}

/* The admin users list: one user per row, actions inline. */
.mm-admin-user {
    border: 1px solid var(--accent);
    padding: 10px 12px;
    margin: 10px 0;
}

.mm-admin-user .mm-user-grants {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 8px 0;
}

.mm-admin-user .mm-user-grants label {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    font-size: 0.9em;
    white-space: nowrap;
}

.mm-admin-user .mm-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.mm-admin-user .mm-user-actions input[type="number"] {
    width: 80px;
}

/* ===== pages/header.php inline <style> (V31 consolidated) ===== */
        /* ============================================
           HEADER BASE
           ============================================ */
        .term-header {
            width: 100%;
            max-width: 100%;
            background: var(--bg);
            border-bottom: 2px solid var(--accent);
            padding: 10px 16px;
            font-family: monospace;
            color: var(--text);
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            position: sticky;
            top: 0;
            z-index: 999;
            animation: headerGlow 4s infinite alternate;
        }

        @keyframes headerGlow {
            0%   { box-shadow: 0 0 6px var(--accent); }
            100% { box-shadow: 0 0 18px var(--accent); }
        }

        .term-header-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .term-logo {
            height: 42px;
            width: auto;
            image-rendering: pixelated;
            filter: drop-shadow(0 0 10px var(--accent));
        }

        .term-header-title {
            font-size: 1.2em;
            letter-spacing: 1px;
            text-shadow: 0 0 6px var(--accent);
            white-space: nowrap;
        }

        /* ============================================
           MENU BUTTONS
           ============================================ */
        .term-menu {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 10px;
            position: relative;
            flex: 1 1 auto;
            justify-content: flex-end;
            min-width: 0;
        }

        .term-btn {
            padding: 8px 13px;
            border: 2px solid var(--accent);
            background: linear-gradient(#001900, #000);
            color: var(--text);
            text-decoration: none;
            font-size: 0.95em;
            letter-spacing: 1px;
            position: relative;
            transition: 0.2s ease-in-out;
            box-shadow: inset 0 0 6px var(--accent), 0 0 8px var(--accent);
        }

        .term-btn::before,
        .term-btn::after {
            content: "";
            position: absolute;
            width: 6px;
            height: 6px;
            background: var(--accent);
            border-radius: 50%;
            box-shadow: 0 0 6px var(--accent);
        }

        .term-btn::before { top: -4px; left: -4px; }
        .term-btn::after  { bottom: -4px; right: -4px; }

        .term-btn:hover {
            background: var(--accent);
            color: #000;
            box-shadow: inset 0 0 10px #000, 0 0 12px var(--accent);
            transform: translateY(-2px);
        }

        .term-btn.active {
            background: var(--accent);
            color: #000;
            box-shadow: inset 0 0 12px #000, 0 0 16px var(--accent);
            font-weight: bold;
        }

        /* ============================================
           DROPDOWN (IMPROVED)
           ============================================ */
        .dropdown {
            position: relative;
        }

        .dropdown > .term-btn {
            cursor: pointer;
            padding-right: 26px;
        }

        .dropdown:hover,
        .dropdown:focus-within {
            z-index: 1000;
        }

        .dropdown-menu {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            background: var(--bg);
            border: 2px solid var(--accent);
            padding: 12px 10px 10px 10px;
            flex-direction: column;
            gap: 8px;
            min-width: 180px;
            margin-top: 4px;
            box-shadow: 0 0 12px var(--accent);
        }

        .dropdown:hover .dropdown-menu,
        .dropdown:focus-within .dropdown-menu,
        .dropdown.open .dropdown-menu {
            display: flex;
        }

        .dropdown-menu .term-btn {
            width: 100%;
            text-align: left;
            padding: 10px 14px;
        }

        .dropdown-menu .term-btn.active {
            /* Active page inside the dropdown — same look as the main row */
            background: var(--accent);
            color: #000;
        }

        /* ============================================
           THEME SWITCHER
           ============================================ */
        .theme-switcher {
            display: flex;
            gap: 6px;
            margin-left: 10px;
            align-items: center;
            flex: 0 0 auto;
        }

        .theme-label {
            font-size: 0.8em;
            letter-spacing: 2px;
            opacity: 0.75;
        }

        .theme-btn {
            padding: 6px 10px;
            border: 1px solid var(--accent);
            background: #000;
            color: var(--accent);
            font-family: monospace;
            cursor: pointer;
            font-size: 0.8em;
        }

        .theme-btn:hover {
            background: var(--accent);
            color: #000;
        }

        /* The theme currently in use reads as "on" */
        .theme-btn[aria-pressed="true"] {
            background: var(--accent);
            color: #000;
        }

        /* Narrower screens: stack the header into tidy rows
           (title, then menu, then theme) instead of a ragged wrap. */
        @media (max-width: 1200px) {
            .term-header { flex-direction: column; align-items: center; }
            .term-header-left { justify-content: center; }
            .term-menu { justify-content: center; width: 100%; margin-top: 12px; }
            .theme-switcher { margin: 12px 0 0; justify-content: center; }
        }

        /* ============================================
           MOBILE
           ============================================ */
        @media (max-width: 600px) {
            .term-header {
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
            .term-menu {
                justify-content: center;
            }
            .term-btn {
                padding: 6px 10px;
                font-size: 0.85em;
            }
            /* Dropdown opens centred under the menu row, so it can
               never run off the side of a phone screen. */
            .dropdown { position: static; }
            .dropdown-menu {
                left: 50%;
                transform: translateX(-50%);
                top: calc(100% + 4px);
                min-width: 200px;
            }
            .theme-switcher {
                margin-top: 10px;
            }
            .term-header-title {
                font-size: 1.1em;
            }
            .term-logo {
                height: 36px;
            }
        }
/* ============================================================
   V32 — visitor weather + counter, cookie consent, admin
   tabs, visitor stats, messages, signed-in devices.
   ============================================================ */

/* --- homepage weather + counter --- */
.mm-weather { font-family: monospace; line-height: 1.6; }
.mm-weather-main { font-size: 1.25em; }
.mm-weather-symbol { font-size: 1.4em; }
.mm-weather-place, .mm-weather-local, .mm-weather-wind { opacity: .85; }
.mm-counter { margin-top: 12px; font-family: monospace; font-size: 1.1em; color: #FFCC66; letter-spacing: 1px; }

/* --- cookie consent banner (bottom of every page) --- */
.mm-consent {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #001a08; color: #00FF66;
    border-top: 2px solid #00FF66;
    font-family: monospace; font-size: .9em;
    padding: 10px 16px; text-align: center;
}
.mm-consent p { margin: 0 0 8px; }
.mm-consent form { display: inline; }
.mm-consent-btn {
    background: #00FF66; color: #000; border: 1px solid #00FF66;
    font-family: monospace; font-size: 1em; padding: 6px 14px;
    margin: 0 4px; cursor: pointer;
}
.mm-consent-btn-dim { background: transparent; color: #00FF66; }

/* --- unread-message badge in the user menu --- */
.mm-msg-badge {
    display: inline-block; background: #FFCC66; color: #000;
    font-size: .75em; font-weight: bold; line-height: 1;
    padding: 2px 6px; margin-left: 6px; border-radius: 8px;
    vertical-align: middle;
}

/* --- admin tabs --- */
.mm-admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.mm-admin-tabs a {
    font-family: monospace; color: #00FF66; text-decoration: none;
    border: 1px solid #00FF66; padding: 6px 12px; background: #000;
}
.mm-admin-tabs a.active { background: #00FF66; color: #000; font-weight: bold; }

/* --- visitor stats bars --- */
.mm-stats { font-family: monospace; margin: 8px 0 16px; }
.mm-stat-row { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.mm-stat-label { flex: 0 0 110px; text-align: right; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-stat-bar { display: inline-block; height: 12px; background: #00FF66; min-width: 2px; }
.mm-stat-n { flex: 0 0 48px; }

/* --- messages --- */
.mm-message { border: 1px solid #00FF66; padding: 10px; margin: 8px 0; background: #001a08; }
.mm-message-unread { border-left: 4px solid #FFCC66; }
.mm-message p { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; }
