/* =====================================================================
   BROWNIE DIGITAL: the shared stylesheet
   One site, several worlds. Each section keeps to its own look.
   Rules are in the order things appear on the home page:

     tokens, fonts, base
     top       the classic Mac OS menu bar            (every page)
     1         home: brown
     2         releases: molded plastic (001, 002 .ts, 003 .tr)
     3         the site directory: a folder of thumbnails
     4         about: Frutiger Aero
     5         level 0: the hallway
     6         side quests: Rule the Kingdom, Midnight Mansion
     7         Kiki's Homepage: GeoCities in a Windows 95 window
     bottom    an old browser's status bar            (every page)
     shared    GIFs, text effects, lo-fi type, the secret
     help      the help page: plain brown paper

   Each product page has its own stylesheet next to it (kiki/kiki.css,
   microsampler-85/ms85.css, tinroof/tinroof.css, turboswine/turboswine.css).
   See README.md for the house rules.
   ===================================================================== */
:root {
  --brown-900: #1c110b;
  --brown-800: #2a1a12;
  --brown-700: #3d2619;
  --brown-500: #7a4a2c;
  --brown-300: #c08a5c;
  --cream: #f3e3cc;
  --cream-2: #e6cfae;
  --serif: "Press Start 2P", ui-monospace, monospace;
  --chunky: "Silkscreen", "Press Start 2P", monospace;
  --round: "DotGothic16", ui-monospace, Menlo, monospace;
  --pixel: "VT323", ui-monospace, Menlo, monospace;
  --wrap: 1160px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@font-face { font-family: "Black Chancery"; src: url("fonts/BlackChancery.ttf") format("truetype"); font-display: swap; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--brown-800); color: var(--cream); font: 400 17px/1.7 var(--round); overflow-x: hidden; -webkit-font-smoothing: none; font-smooth: never; }
img { max-width: 100%; height: auto; display: block; }
img.gif { display: inline-block; image-rendering: pixelated; vertical-align: middle; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.05; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; position: relative; }
section { position: relative; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- top: a classic Mac OS menu bar (brownie where the apple was) ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: linear-gradient(#f4f1ec, #dcd6cc); border-bottom: 2px solid #1c110b; box-shadow: 0 1px 0 #fff inset; color: #111; }
.topbar .wrap { display: flex; align-items: center; gap: 4px; height: 34px; max-width: none; padding: 0 10px; }
.mark { display: flex; flex-shrink: 0; white-space: nowrap; align-items: center; gap: 8px; text-decoration: none; color: #111; font-family: var(--chunky); font-weight: 700; font-size: 15px; padding: 0 10px 0 4px; height: 34px; }
.mark img { width: 24px; height: 24px; image-rendering: pixelated; }
.nav { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap; gap: 2px; font-family: var(--chunky); font-size: 14px; }
.nav a { text-decoration: none; color: #111; padding: 0 10px; line-height: 34px; display: block; }
.nav a:hover, .nav a[aria-current="page"] { background: #1c110b; color: #f3e3cc; }
.clock { margin-left: auto; font-family: var(--chunky); font-size: 14px; padding: 0 6px; white-space: nowrap; }
@media (max-width: 640px) { .mark span, .clock { display: none; } .nav a { padding: 0 8px; font-size: 13px; } }
@media (max-width: 480px) { .topbar .wrap { padding: 0 4px; gap: 0; } .mark { padding: 0 6px 0 2px; } .nav a { padding: 0 5px; font-size: 11px; } }

/* ---------- 1. home: brown ---------- */
.home { background: radial-gradient(900px 600px at 80% 30%, #4a2e1e 0%, transparent 70%), var(--brown-800); padding: 72px 0 96px; overflow: hidden; }
.home::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .35; pointer-events: none; mix-blend-mode: overlay; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 880px) { .home-grid { grid-template-columns: 1fr; gap: 36px; } .home { padding: 44px 0 72px; } }
.wordmark { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 7.4vw, 5.6rem); line-height: 1; margin: 0 0 26px; color: var(--cream); }
.wordmark .ln + .ln { color: var(--brown-300); }
.lede { font-family: var(--pixel); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; color: var(--cream); max-width: 22em; margin-bottom: 18px; }
.home p.small { color: var(--cream-2); max-width: 32em; }
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .8em 1.4em; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .12s, background .12s; }
.btn:active { transform: translateY(1px); }
.btn.white { background: #fff; color: var(--brown-900); }
.btn.white:hover { background: #f29a3a; }
.btn.line { border: 2px solid var(--cream-2); color: var(--cream); }
.btn.line:hover { background: #ffffff12; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.brownie-shot { position: relative; margin: 0; }
.brownie-shot img { width: min(440px, 100%); margin: 0 auto; image-rendering: pixelated; }
.home .float-gif { opacity: .95; }

/* ---------- 2. releases: molded plastic ---------- */
.plastic {
  --plastic: #1e1e20;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 30%, rgba(0,0,0,.25)),
    var(--grain), var(--plastic);
  color: #e9e9ec; padding: 0; border-block: 2px solid #000; position: relative;
}
/* the guinea pigs on the section's top edge (js/pigs.js) */
.plastic .pigs { position: absolute; left: 0; z-index: 5; pointer-events: none; image-rendering: pixelated; }
.plastic-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 0; align-items: stretch; }
@media (max-width: 880px) { .plastic-inner { grid-template-columns: 1fr; } }
.plastic .panel { position: relative; padding: 56px 36px; border-right: 2px solid #0b0b0c; box-shadow: inset -1px 0 0 #ffffff12; }
@media (max-width: 880px) { .plastic .panel { border-right: 0; border-bottom: 2px solid #0b0b0c; padding: 44px 20px; } }
.screw { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #9a9aa0, #3a3a3e 70%); box-shadow: inset 0 0 0 1px #000a; }
.screw::after { content: ""; position: absolute; left: 3px; right: 3px; top: 6px; height: 2px; background: #111; transform: rotate(35deg); }
.screw.tl { top: 14px; left: 14px; } .screw.tr { top: 14px; right: 14px; } .screw.bl { bottom: 14px; left: 14px; } .screw.br { bottom: 14px; right: 14px; }
.label-blue { color: #3fb2e6; font-weight: 900; font-size: 15px; letter-spacing: .06em; text-transform: lowercase; }
.plastic .ms-logo { width: min(340px, 100%); margin: 14px 0 20px; }
.plastic p { color: #c9c9cf; }
.key-btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 900; }
.key-btn i { width: 64px; height: 22px; border-radius: 3px; background: linear-gradient(#ffe46a, #e5c51c); box-shadow: 0 3px 0 #8d7a0f, inset 0 1px 0 #fff8; display: block; transition: transform .08s, box-shadow .08s; }
.key-btn:hover i { filter: brightness(1.08); }
.key-btn:active i { transform: translateY(3px); box-shadow: 0 0 0 #8d7a0f; }
.grille { display: grid; gap: 7px; margin: 26px 0; }
.grille span { height: 5px; border-radius: 3px; background: #0c0c0d; box-shadow: inset 0 1px 1px #000, 0 1px 0 #ffffff14; }
.plastic .shot { padding: 36px; display: flex; align-items: center; background: linear-gradient(180deg, #161618, #101011); }
.plastic .shot img { border-radius: 4px; box-shadow: 0 30px 50px -20px #000; }
@media (max-width: 880px) { .plastic .shot { padding: 20px 12px 28px; } }
/* releases 002 (.ts, grey 1988 plastic) and 003 (.tr, on the tin roof): same build as 001 */
.plastic.ts { --plastic: #c9c9c9; color: #111; }
.plastic.ts .panel { border-right-color: #8a8a8a; box-shadow: inset -1px 0 0 #ffffff55; }
.plastic.ts p { color: #222; }
.plastic.ts .label-blue { color: #c0285a; }
.plastic.ts .key-btn { color: #111; }
.plastic.ts .shot { background: linear-gradient(180deg, #b9b9b9, #a4a4a4); }
.plastic.ts .shot img { image-rendering: pixelated; border: 2px solid #111; border-radius: 0; box-shadow: 8px 8px 0 #111; }
.plastic.ts .grille span { background: #8a8a8a; box-shadow: inset 0 1px 1px #555, 0 1px 0 #fff8; }
.ts-logo { display: flex; align-items: center; gap: 14px; margin: 14px 0 20px; font: 700 clamp(22px, 7vw, 34px)/1.05 var(--chunky); color: #111; min-width: 0; }
.ts-logo span { min-width: 0; overflow-wrap: anywhere; }
.ts-logo img { width: 84px; height: 84px; image-rendering: pixelated; }
.plastic.tr { background: linear-gradient(rgba(10,14,20,.5), rgba(10,14,20,.68)), url("tinroof/img/tin.png") 0 0 / 160px 160px; }
.plastic.tr .label-blue { color: #ff0; }
.plastic.tr .tr-logo { width: min(340px, 100%); margin: 14px 0 20px; }
.plastic.tr .shot { background: rgba(0,0,0,.45); }
.plastic.tr .shot img { width: 100%; image-rendering: pixelated; border: 4px solid #000; border-radius: 0; box-shadow: 8px 8px 0 #000; }
.plastic.tr .key-btn i { background: linear-gradient(#ff5a3a, #c41a10); box-shadow: 0 3px 0 #6a0a05, inset 0 1px 0 #fff8; }
.plastic.tr .key-btn:active i { box-shadow: 0 0 0 #6a0a05; }
.plastic .price { font-size: 22px; margin-bottom: 18px; color: #3fb2e6; }
.plastic.ts .price { color: #c0285a; }
.plastic.tr .price { color: #ff0; }

/* ---------- 3. the site directory: a folder in thumbnail view ---------- */
.sitemap { background: #3d2619 url("img/stars.png") 0 0 / 320px; background-blend-mode: screen; padding: 70px 0; border-block: 2px solid #000; }
.xwin { max-width: 980px; margin: 0 auto; background: #c0c0c0; border: 3px outset #e8e8e8; padding: 3px; color: #111; font: 13px Tahoma, Verdana, sans-serif; }
.xbar { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(90deg, #7a4a2c, #e07b28); color: #fff; font: bold 14px Tahoma, Verdana, sans-serif; padding: 3px 6px; }
.xbar span:first-child { display: flex; align-items: center; gap: 6px; }
.xbar img { image-rendering: pixelated; }
.xbtn { letter-spacing: 3px; }
.xaddr { margin: 4px 0; padding: 3px 6px; background: #fff; border: 2px inset #e8e8e8; }
.thumbs { list-style: none; margin: 0; padding: 18px 14px 10px; background: #fff; border: 2px inset #e8e8e8; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.thumbs li { margin: 0; }
.thumbs a { display: block; text-align: center; text-decoration: none; color: #111; padding: 4px; }
.thumbs .th { display: block; aspect-ratio: 4 / 3; border: 1px solid #808080; box-shadow: 1px 1px 0 #fff, inset 1px 1px 0 #000; background: #000; overflow: hidden; margin-bottom: 6px; }
.thumbs .th.white { background: #fff; }
.thumbs .th img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .th.white img { object-fit: contain; }
.thumbs .th.px img { image-rendering: pixelated; }
.thumbs b { display: inline-block; padding: 1px 4px; font-size: 13px; }
.thumbs small { display: block; color: #555; font-size: 11.5px; margin-top: 2px; }
.thumbs a:hover b, .thumbs a:focus-visible b { background: #7a4a2c; color: #fff; outline: 1px dotted #fff; }
.thumbs a:hover .th { outline: 2px solid #7a4a2c; }
.xstatus { display: flex; justify-content: space-between; margin-top: 3px; }
.xstatus span { flex: 1; padding: 2px 6px; border: 1px solid; border-color: #808080 #fff #fff #808080; }
.xstatus span + span { flex: 0 0 auto; margin-left: 3px; }

/* ---------- 4. about: Frutiger Aero (the sky part of the photo) ---------- */
.aero { --aero-font: "Hind", "Frutiger", "Segoe UI", "Myriad Pro", sans-serif; color: #08304d; font-family: var(--aero-font); overflow: hidden; isolation: isolate; padding: 70px 0 64px;
  background: linear-gradient(180deg, #2f8fe0 0%, #7cc8f6 38%, #d9f3ff 62%, #ffffff 100%); }
.aero .bg { position: absolute; inset: 0; z-index: -2; background: url("img/k/beach.webp") center 8% / cover no-repeat; opacity: .7; mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 80%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 80%, transparent 100%); }
@media (max-width: 700px) { .aero .bg { background-image: url("img/k/beach-m.webp"); } }
.swoosh { position: absolute; left: -10%; width: 120%; z-index: -1; pointer-events: none; }
.aero-bubbles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.aero-bubbles span { position: absolute; bottom: -100px; border-radius: 50%; animation: rise linear infinite;
  background: radial-gradient(circle at 30% 28%, #fff 0 7%, rgba(255,255,255,.3) 13%, rgba(190,240,255,.1) 55%, rgba(255,255,255,.6) 71%, rgba(255,255,255,0) 73%); }
@keyframes rise { 50% { transform: translate(22px, -60vh); } to { transform: translate(-8px, -130vh); } }
.aero h2 { font-family: var(--aero-font); font-weight: 300; font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 12px rgba(0,60,120,.35); margin-bottom: 10px; }
.aero .intro { font-size: 1.2rem; color: #fff; max-width: 34em; text-shadow: 0 1px 6px rgba(0,60,120,.4); margin-bottom: 30px; }
.glass-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .glass-row { grid-template-columns: 1fr; } }
.glass {
  position: relative; padding: 26px 24px 24px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(235,248,255,.7));
  border: 1px solid rgba(255,255,255,.95); box-shadow: 0 20px 40px -18px rgba(0,70,140,.45), inset 0 1px 0 #fff;
}
.glass::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 46%; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,0)); pointer-events: none; }
.glass > * { position: relative; }
.glass h3 { font-weight: 600; font-size: 1.35rem; color: #063a63; margin: 12px 0 6px; }
.glass p { margin: 0; color: #24506f; }
.orb { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 600;
  background: radial-gradient(circle at 50% 30%, #c7f1ff 0 10%, #39b6f4 45%, #0b6fc6 80%); box-shadow: inset 0 -6px 12px rgba(0,40,100,.35), 0 8px 16px -6px rgba(0,80,160,.6); text-shadow: 0 1px 2px #0005; }
.orb.green { background: radial-gradient(circle at 50% 30%, #eaffc4 0 10%, #7fd13b 45%, #3a8f12 80%); }
.orb.teal { background: radial-gradient(circle at 50% 30%, #c9fff4 0 10%, #2fc7b0 45%, #0b7e78 80%); }
.aero h2.chunky { font-family: var(--chunky); font-weight: 700; font-size: clamp(2rem, 5.2vw, 3.8rem); }

/* ---------- 5. level 0: the hallway ---------- */
.liminal { background: #2a2614; color: #f1e7b5; padding: 0; overflow: hidden; }
.liminal .screen { position: relative; min-height: min(78vh, 720px); display: grid; place-items: center; text-align: center; padding: 70px 16px; }
.liminal video, .liminal .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; filter: sepia(.35) saturate(1.2) contrast(1.05); }
.liminal .screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.55)); }
.liminal .osd { position: absolute; z-index: 2; font: 26px var(--pixel); color: #fff; text-shadow: 2px 2px 0 #000; }
.liminal .osd.tl { left: 18px; top: 14px; } .liminal .osd.br { right: 18px; bottom: 14px; }
.liminal .msg { position: relative; z-index: 2; max-width: 640px; }
.liminal h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 4vw, 2.6rem); color: #fff6c8; text-shadow: 3px 3px 0 #000; margin: 0 0 16px; line-height: 1.25; }
.liminal p { color: #fff; text-shadow: 1px 1px 2px #000; font-size: 1.05rem; }

/* ---------- 6. side quests: GitHub projects, each in its own game's art ---------- */
.sidequests { background: var(--brown-900); padding: 64px 0 56px; border-top: 2px dashed var(--brown-700); }
.sq-head { font-family: var(--chunky); font-weight: 700; font-size: 26px; color: var(--brown-300); margin: 0 0 6px; text-transform: lowercase; }
.sq-intro { color: var(--cream-2); max-width: 40em; font-size: 16px; margin: 0 0 34px; }
.sq-intro a { color: var(--cream); }
.sq-note { margin: 40px 0 0; font-size: 14px; line-height: 1.7; color: var(--cream-2); max-width: 52em; }
.sq-note b { color: var(--brown-300); font-weight: 400; }

/* Rule the Kingdom: the city as the ground, the game's own dialog boxes on top */
.rtk { position: relative; padding: 56px 0 64px; overflow: hidden; isolation: isolate; -webkit-font-smoothing: antialiased;
  background: #84922a url("img/gh/rtk/grass.webp") 0 0 / 256px repeat; }
.rtk::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 40%, rgba(20,40,10,0), rgba(15,25,5,.35)); }
.rtk .wrap { max-width: 860px; text-align: center; }
.rtk-logo { width: min(340px, 72%); margin: 0 auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
/* nameplate: the game's task-window header, text sits in its cream box */
.rtk-plaque { position: relative; z-index: 1; width: min(471px, 100%); aspect-ratio: 471 / 62; margin: -16px auto 0; padding: 2.4% 11% 0; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; background: url("img/gh/rtk/plaque.webp") 0 0 / 100% 100% no-repeat;
  font: 700 clamp(15px, 4.6vw, 21px)/1 "Trebuchet MS", Arial, sans-serif; letter-spacing: .02em; color: #4a2e10; text-shadow: 0 1px 0 #fff; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.rtk-sub { margin: 6px 0 26px; font: 700 14px "Trebuchet MS", Arial, sans-serif; color: #fff6d8; text-shadow: 0 1px 2px #2d3a08, 0 0 6px rgba(30,40,5,.6); }
.rtk-dlg { position: relative; margin: 0 auto 16px; max-width: 680px; padding: 16px 26px 14px; text-align: center;
  background: linear-gradient(#fdf8ec, #f1e3c4); border: 3px solid #c79a4e; border-radius: 6px;
  box-shadow: 0 0 0 2px #6e4a1c, 0 8px 18px rgba(0,0,0,.4); color: #2e2416; font: 700 15.5px/1.5 "Trebuchet MS", Arial, sans-serif; }
.rtk-dlg p { margin: 0; }
.rtk-dlg.has-face { padding-left: 120px; text-align: left; }
.rtk-face { position: absolute; left: -14px; top: 50%; width: 112px; height: 112px; transform: translateY(-50%); border-radius: 50%; object-fit: cover;
  border: 5px solid #d9b46a; box-shadow: 0 0 0 2px #6e4a1c, 0 4px 10px rgba(0,0,0,.4); background: radial-gradient(circle at 50% 35%, #7fc0ef, #3a7bbd); }
.rtk-tap { display: block; margin-top: 8px; font-size: 12.5px; color: #7a5a2a; }
.rtk-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin: 26px 0 26px; align-items: start; }
.rtk-tv { margin: 0; border: 4px solid #d9b46a; box-shadow: 0 0 0 2px #6e4a1c, 0 8px 18px rgba(0,0,0,.45); background: #000; }
.rtk-tv video { display: block; width: 100%; aspect-ratio: 480 / 326; object-fit: cover; }
.rtk-tv figcaption { font: 700 12.5px "Trebuchet MS", Arial, sans-serif; color: #f6e6b8; background: #4a3214; padding: 4px 8px; }
.rtk-promo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rtk-promo img { width: 100%; border: 2px solid #e8c56a; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
/* the kingdom's island from the world map, with its name plate */
.rtk-map { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.rtk-map i { display: block; width: 240px; aspect-ratio: 261 / 184; background: url("img/gh/rtk/kingdom.webp") 0 0 / 100% 100% no-repeat;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,.35)); transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.rtk-map span { position: relative; margin-top: -12px; width: 250px; height: 45px; display: flex; align-items: center; justify-content: center;
  background: url("img/gh/rtk/nameplate.webp") 0 0 / 100% 100% no-repeat; font: 700 15px/1 "Trebuchet MS", Arial, sans-serif; color: #3d2a12; text-shadow: 0 1px 0 #fff; }
.rtk-map:hover i, .rtk-map:focus-visible i { transform: translateY(-4px); filter: brightness(1.08) drop-shadow(0 12px 10px rgba(0,0,0,.35)); }
.rtk-map:active i { transform: scale(.97); }
/* the villagers: game sprites walking and working on the grass around the text */
.rtk .wrap { z-index: 1; }
.rtk-folk { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.rtk-guy, .rtk-prop { position: absolute; left: 0; top: 0; background-repeat: no-repeat; will-change: transform; }
.rtk-guy { pointer-events: auto; cursor: grab; touch-action: none; }
.rtk-guy:hover { filter: brightness(1.15) drop-shadow(0 0 2px #fff6c0); }
.rtk-guy.held { cursor: grabbing; filter: brightness(1.1) drop-shadow(0 12px 6px rgba(0,0,0,.35)); }
.rtk-say { position: absolute; left: 0; top: 0; z-index: 9999; max-width: 200px; padding: 6px 11px; white-space: nowrap;
  background: linear-gradient(#fdf8ec, #f1e3c4); border: 2px solid #c79a4e; border-radius: 6px; box-shadow: 0 0 0 1.5px #6e4a1c, 0 4px 8px rgba(0,0,0,.35);
  color: #2e2416; font: 700 13px/1.3 "Trebuchet MS", Arial, sans-serif; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.rtk-say::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -7px; width: 10px; height: 10px; margin-left: -6px;
  background: #f1e3c4; border: solid #c79a4e; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rtk-say.on { opacity: 1; transform: none; }
@media (max-width: 680px) {
  .rtk-row { grid-template-columns: 1fr; }
  .rtk-dlg.has-face { padding: 64px 18px 14px; text-align: center; margin-top: 60px; }
  .rtk-face { left: 50%; top: -52px; transform: translateX(-50%); width: 96px; height: 96px; }
}

/* Midnight Mansion: the game's title screen, rebuilt from its layers */
.mm { position: relative; overflow: hidden; isolation: isolate; padding: 64px 0 80px; min-height: calc(min(860px, 66vw) * 1.3086 + 10px); -webkit-font-smoothing: antialiased;
  background: #0b1630 url("img/gh/mm/stars.webp") center / cover; }
.mm::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; box-shadow: inset 0 0 120px 20px rgba(0,0,0,.6); }
.mm > img { position: absolute; pointer-events: none; }
.mm-moon { width: 190px; left: 6%; top: 70px; z-index: 0; filter: drop-shadow(0 0 40px rgba(140,230,230,.45)); }
.mm-cloud { z-index: 1; opacity: .5; animation: mm-drift 70s linear infinite; }
.mm-cloud.c1 { width: 170px; top: 60px; left: -10%; }
.mm-cloud.c2 { width: 190px; top: 220px; left: -20%; animation-duration: 95s; animation-delay: -40s; }
@keyframes mm-drift { to { transform: translateX(130vw); } }
.mm-fog { z-index: 2; left: 0; bottom: -20px; width: 100%; height: 300px; object-fit: cover; opacity: .85; -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); }
.mm-scene { position: absolute; z-index: 1; right: 0; bottom: 0; width: min(860px, 66vw); aspect-ratio: 1280 / 1675; pointer-events: none; }
.mm-scene .mm-house { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%); mask-image: linear-gradient(to right, transparent 0, #000 30%); }
.mm-scene.front { z-index: 3; }
.mm-flag, .mm-jack { position: absolute; background-repeat: no-repeat; background-size: 100% 300%; animation-timing-function: steps(1, end); animation-iteration-count: infinite; }
.mm-flag { left: 77.27%; top: 0; width: 7.8125%; aspect-ratio: 100 / 70; background-image: url("img/gh/mm/flag.webp"); animation-name: mm-frames; animation-duration: .57s; }
.mm-jack { left: 50%; top: 88%; width: 12.5%; aspect-ratio: 160 / 96; background-image: url("img/gh/mm/jack.webp"); animation-name: mm-frames; animation-duration: .4s; }
@keyframes mm-frames { 0% { background-position: 0 0; } 25% { background-position: 0 50%; } 50% { background-position: 0 100%; } 75% { background-position: 0 50%; } }
.mm-new { display: flex; gap: 14px; align-items: center; margin: 4px 0 14px; padding: 10px 12px; background: rgba(20,10,4,.45); border: 1px solid rgba(241,223,138,.25); }
.mm-new p { margin: 0 !important; font-size: 15px; }
.mm-new b { font: 400 21px/1 "Black Chancery", serif; color: #f1df8a; }
.mm-henry { flex: none; width: 74px; height: auto; filter: drop-shadow(0 3px 3px rgba(0,0,0,.6)); }
.mm .wrap { z-index: 3; }
.mm-col { max-width: 560px; }
.mm-logo { width: 100%; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.mm-sub { font: 400 40px/1 "Black Chancery", serif; color: #f1df8a; text-shadow: 0 2px 0 #3a2a05, 0 0 12px rgba(0,0,0,.8); margin: 4px 0 18px; text-align: center; }
.mm-board { position: relative; padding: 26px 30px 22px; background: url("img/gh/mm/wood.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); color: #f6ead0; font: 400 16px/1.6 Georgia, "Times New Roman", serif; text-shadow: 0 1px 2px rgba(0,0,0,.9); }
.mm-board p { margin: 0 0 12px; }
.mm-shot { width: 100%; margin: 6px 0 12px; border: 3px solid #2a170a; box-shadow: 0 0 0 1px #8a6234; }
.mm-credit { font: 400 20px/1.3 "Black Chancery", serif; color: #f1df8a; margin: 0 !important; }
.mm-open { position: relative; display: block; margin: 20px auto 0; width: 300px; max-width: 90%; }
.mm-open img { width: 100%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.8)); }
.mm-open .hi { position: absolute; inset: 0; opacity: 0; transition: opacity .12s; }
.mm-open:hover .hi, .mm-open:focus-visible .hi { opacity: 1; }
@media (max-width: 880px) {
  .mm { min-height: 0; padding-bottom: 300px; }
  .mm-scene { width: 110%; }
  .mm-sub { font-size: 32px; }
  .mm-moon { width: 120px; left: auto; right: 6%; top: 20px; }
}
@media (max-width: 480px) { .mm-board { padding: 20px 18px 16px; } }

/* ---------- 7. Kiki's Homepage: GeoCities, in a real Windows 95 window ---------- */
.geo { background: #04041a url("img/stars.png") repeat; padding: 70px 0; font-family: "Times New Roman", Times, serif; color: #000; }
.geo .page { max-width: 760px; margin: 0 auto; background: #c0c0c0; border: 4px outset #e8e8e8; padding: 4px; }
.geo .titlebar { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font: bold 14px Tahoma, Verdana, sans-serif; padding: 2px 3px 2px 4px; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.geo .titlebar span:last-child { letter-spacing: 2px; }
.geo .inner { background: #fffff0; border: 2px inset #e8e8e8; padding: 22px 18px; text-align: center; }
.geo h2 { font-family: "Comic Sans MS", "Comic Neue", cursive; color: #c00; font-size: 2.1rem; margin: 6px 0; }
.geo h3 { font-family: Arial, Helvetica, sans-serif; color: #000080; font-size: 1.15rem; margin: 22px 0 8px; text-decoration: underline; }
.geo p { font-size: 17px; margin: 0 0 10px; }
.geo a { color: #0000ee; } .geo a:visited { color: #551a8b; }
.geo .row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin: 10px 0; }
.geo hr.gif { border: 0; height: 10px; margin: 18px auto; background: url("img/gif/bluebarlitedivider.gif") center / auto 10px no-repeat; }
.geo .marq { overflow: hidden; white-space: nowrap; background: #000; color: #0f0; font: 18px "Courier New", monospace; padding: 3px 0; border: 2px inset #888; }
.geo .marq span { display: inline-block; padding-left: 100%; animation: marq 22s linear infinite; }
@keyframes marq { to { transform: translateX(-100%); } }
.geo .counter { display: inline-block; background: #000; color: #f00; font: 22px var(--pixel); padding: 0 8px; letter-spacing: 3px; border: 2px inset #888; }
.geo .small { font-size: 13px; color: #444; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }
/* about me, guestbook, artist wall, workbench */
.geo .about { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center; text-align: left; margin: 10px auto; max-width: 600px; }
.geo .about img { background: #fff; border: 3px ridge #888; }
@media (max-width: 480px) { .geo .about { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.geo .wall { text-align: center; line-height: 1.9; background: #fff; border: 3px ridge #808080; padding: 12px 10px; margin: 0 auto; max-width: 680px; }
.geo .wall b { color: #aaa; font-weight: 400; margin: 0 4px; }
.geo .gbook { background: #ffffe0; border: 3px double #000080; padding: 14px; max-width: 560px; margin: 0 auto; }
.geo .gbook a.gbtn { display: inline-block; margin-top: 8px; padding: 6px 16px; background: #c0c0c0; color: #000; text-decoration: none; border: 3px outset #eee; font: bold 15px Tahoma, Verdana, sans-serif; }
.geo .gbook a.gbtn:active { border-style: inset; }
.geo .workbench-item { display: inline-block; max-width: 220px; background: #fff; border: 3px ridge #888; padding: 6px; margin-top: 8px; }
/* the artist wall: every name gets a font (f-), a colour (c-) and a size (s-); add b and/or i for bold and italic */
.wall .f-comic { font-family: 'Comic Sans MS', 'Comic Neue', cursive; }
.wall .f-courier { font-family: 'Courier New', monospace; }
.wall .f-impact { font-family: Impact, 'Arial Black', sans-serif; }
.wall .f-verdana { font-family: Verdana, sans-serif; }
.wall .f-arial { font-family: Arial, sans-serif; }
.wall .f-georgia { font-family: Georgia, serif; }
.wall .f-times { font-family: 'Times New Roman', serif; }
.wall .c-000 { color: #000; } .wall .c-0060a0 { color: #0060a0; } .wall .c-00c { color: #00c; } .wall .c-080 { color: #080; } .wall .c-088 { color: #088; } .wall .c-5a2d0c { color: #5a2d0c; } .wall .c-808 { color: #808; } .wall .c-a50 { color: #a50; } .wall .c-c00 { color: #c00; } .wall .c-d0006f { color: #d0006f; }
.wall .s13 { font-size: 13px; } .wall .s14 { font-size: 14px; } .wall .s15 { font-size: 15px; } .wall .s16 { font-size: 16px; } .wall .s17 { font-size: 17px; } .wall .s18 { font-size: 18px; } .wall .s20 { font-size: 20px; } .wall .s22 { font-size: 22px; } .wall .s25 { font-size: 25px; } .wall .s28 { font-size: 28px; }
.wall .bold { font-weight: bold; } .wall .ital { font-style: italic; }
/* the window's buttons: minimize rolls it up, maximize goes full width, close leaves a taskbar button (js/site.js) */
.geo .titlebar .ttl { display: flex; align-items: center; gap: 5px; }
.geo .titlebar .ttl img { image-rendering: pixelated; }
.tb-btns { display: flex; gap: 2px; letter-spacing: 0 !important; }
.tb { width: 18px; height: 16px; padding: 0; background: #c0c0c0; border: 0; cursor: pointer; position: relative;
  box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.tb:active { box-shadow: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px #808080, inset -2px -2px #dfdfdf; }
.tb.close { margin-left: 2px; }
.tb::before { content: ""; position: absolute; }
.tb.min::before { left: 4px; bottom: 3px; width: 6px; height: 2px; background: #000; }
.tb.max::before { left: 3px; top: 2px; width: 9px; height: 7px; border: 1px solid #000; border-top-width: 2px; }
.tb.close::before, .tb.close::after { content: ""; position: absolute; left: 4px; top: 7px; width: 10px; height: 2px; background: #000; }
.tb.close::before { transform: rotate(45deg); } .tb.close::after { transform: rotate(-45deg); }
.geo .page.minimized .inner { display: none; }
.geo .page.maximized { max-width: none; }
.taskbtn { display: flex; align-items: center; gap: 6px; margin: 0 auto; padding: 4px 12px; background: #c0c0c0; border: 0; font: bold 13px Tahoma, Verdana, sans-serif; cursor: pointer;
  box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.taskbtn img { image-rendering: pixelated; }
.taskbtn[hidden] { display: none; }
.gb-frame { display: block; width: 100%; height: 560px; border: 2px inset #c0c0c0; background: #fff; margin: 6px 0 10px; }
/* 88x31 badges, redrawn */
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.b88 { width: 88px; height: 31px; display: flex; place-items: center; justify-content: center; gap: 3px; text-align: center; font: bold 12px/1 Verdana, sans-serif; border: 1px solid #000; overflow: hidden; padding: 0 2px; }
.b88 img { flex: none; image-rendering: pixelated; }
.b88 span { font: 12px/1 var(--pixel); letter-spacing: .02em; }
.b88.a { background: linear-gradient(#fff, #c9c4b8); color: #000; }
.b88.b { background: #000; color: #5bf03c; font: 400 15px/1 var(--pixel); }
.b88.c { background: #f6ead8; color: #5a2d0c; }
.b88.c span { font: 700 14px/1 "Dancing Script", "Brush Script MT", cursive; }
.b88.d { background: #1b1446; color: #ffe; }
.b88.e { background: linear-gradient(90deg, #f0f, #0ff); color: #000; }

/* ---------- bottom: an old browser's status bar ---------- */
footer.site { background: #c3c0bb; color: #111; border-top: 2px solid #fff; box-shadow: 0 -2px 0 #1c110b; padding: 4px 6px; font: 13px Tahoma, Verdana, sans-serif; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 4px; align-items: stretch; max-width: none; padding: 0; }
footer.site .cell { border: 1px solid; border-color: #7b7873 #fff #fff #7b7873; padding: 3px 8px; display: flex; align-items: center; gap: 6px; min-height: 24px; }
footer.site .grow { flex: 1 1 auto; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 12px; }
footer.site a { color: #00c; }
footer.site img { width: 18px; height: 18px; image-rendering: pixelated; }
@media (max-width: 640px) { footer.site .zone { display: none; } }

/* ---------- shared: GIFs ---------- */
.gif-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; margin: 14px 0; }
.gif-row img { image-rendering: pixelated; max-height: 64px; width: auto; }
.float-gif { position: absolute; z-index: 1; image-rendering: pixelated; pointer-events: none; max-height: 80px; width: auto; }
@media (max-width: 700px) { .float-gif.hide-m { display: none; } }

/* ---------- text effects: a few words per paragraph pop out, on every page ---------- */
.fx-mark { color: #1c1c1e; padding: 0 .22em; margin: 0 -.05em; background: linear-gradient(transparent 8%, var(--fxm, #f3d22a) 8%, var(--fxm, #f3d22a) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; transform: rotate(-.4deg); display: inline; }
.fx-wave { text-decoration: underline wavy var(--fxw, #3fb2e6); text-decoration-thickness: 2px; text-underline-offset: .22em; text-decoration-skip-ink: none; }
.fx-pop { color: var(--fxp, #ffe970); text-shadow: 2px 2px 0 #000; -webkit-text-stroke: .4px currentColor; }
.fx-box { color: #1c1c1e; background: var(--cream, #f3e3cc); padding: 0 .35em; box-shadow: 3px 3px 0 #000; }
.fx-jit { display: inline-block; animation: fxjit 1.1s steps(1) infinite; }
@keyframes fxjit { 0% { transform: translate(0, 0); } 25% { transform: translate(1px, -1px); } 50% { transform: translate(-1px, 0); } 75% { transform: translate(0, 1px); } }
.home .fx-mark, .about .fx-mark { --fxm: #c08a5c; }
.home .fx-wave { --fxw: #f3d22a; }
.home .fx-pop { --fxp: #ffd9a0; }

/* animated "..." for loading text */
.dots::after { content: ""; display: inline-block; width: 1.5em; text-align: left; animation: dots 1.2s steps(1) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- lo-fi type (see js/site.js) ---------- */
[data-lofi] .ln { display: block; }
.lofi-on .ln { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lofi-c { display: block; }
.lofi-c canvas { display: block; max-width: 100%; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; }
.pix { font-family: var(--pixel); }
.chunky { font-family: var(--chunky); }

/* the secret: type "stone" */
html.stone-mode { filter: invert(1) hue-rotate(180deg); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translateX(-50%); background: #000; color: #ff9b2e; font: 24px var(--pixel); padding: 6px 16px; border: 2px solid #ff9b2e; }

/* ---------- help page: plain brown paper ---------- */
.doc { padding: 56px 0 90px; background: var(--brown-800); }
.doc .wrap { max-width: 780px; }
.doc h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.05; margin: 0 0 18px; color: var(--cream); }
.doc .lede { color: var(--cream-2); margin-bottom: 30px; }
.doc .card { background: var(--brown-700); border: 2px solid var(--brown-900); box-shadow: 5px 5px 0 var(--brown-900); padding: 20px 22px; margin: 0 0 16px; }
.doc .card h2, .doc .sub { font-family: var(--chunky); font-weight: 700; font-size: 1.4rem; color: var(--cream); margin: 0 0 10px; }
.doc .sub { margin: 34px 0 14px; }
.doc .card p { color: var(--cream-2); }
.doc .card a { color: #ffd27a; }
.doc details.card { padding: 0; }
.doc summary { cursor: pointer; padding: 14px 22px; font-family: var(--pixel); font-size: 22px; color: var(--cream); list-style: none; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::before { content: "▶ "; color: var(--brown-300); }
.doc details[open] summary::before { content: "▼ "; }
.doc details p { padding: 0 22px 16px; margin: 0; }
