/* =====================================================================
   BROWNIE DIGITAL
   One page, several worlds. Each section keeps to its own look:
   brown (home), plastic (the instrument), Frutiger Aero (about),
   flash photos at night (STONE), GeoCities (the homepage).
   ===================================================================== */
: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");
}
* { 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; 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; 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: 380px) { .nav a { padding: 0 5px; font-size: 12px; } }

/* ---------- 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.cream { background: var(--cream); color: var(--brown-900); }
.btn.cream:hover { background: #fff; }
.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; transform: rotate(2deg); }
.brownie-shot img { border-radius: 6px; box-shadow: 0 40px 80px -30px #000, 0 0 0 10px #f6ead8, 0 0 0 11px #0003; }
.brownie-shot figcaption { position: absolute; right: 22px; bottom: 16px; font-family: var(--pixel); font-size: 24px; color: #ff9b2e; text-shadow: 0 0 6px rgba(255,120,0,.9); }
.brownie-shot .note { position: absolute; left: -18px; bottom: -34px; font-family: var(--pixel); font-size: 19px; color: var(--cream-2); font-size: 15px; transform: rotate(-4deg); }

/* ---------- 2. release 001: 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; } }

/* ---------- 3. about: Frutiger Aero ---------- */
.aero { --aero-font: "Hind", "Frutiger", "Segoe UI", "Myriad Pro", sans-serif; color: #08304d; font-family: var(--aero-font); overflow: hidden; isolation: isolate; padding: 110px 0 120px;
  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 62% / cover no-repeat; opacity: .55; 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: 44px; }
.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-photos { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 48px; align-items: end; }
@media (max-width: 820px) { .aero-photos { grid-template-columns: 1fr 1fr; } }
.aero-photos figure { margin: 0; border-radius: 20px; overflow: hidden; border: 4px solid #fff; box-shadow: 0 24px 40px -20px rgba(0,60,120,.55); position: relative; }
.aero-photos figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 35%); pointer-events: none; }
.aero-photos figcaption { position: absolute; left: 14px; bottom: 10px; z-index: 1; color: #fff; font-size: 14px; text-shadow: 0 1px 4px #0008; }

/* ---------- 4. STONE: flash photos at night ---------- */
.night { background: #050505; color: #ececec; padding: 110px 0 120px; overflow: hidden; }
.night::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .5; pointer-events: none; mix-blend-mode: screen; }
.night .top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: 56px; }
@media (max-width: 880px) { .night .top { grid-template-columns: 1fr; gap: 20px; } }
.stone-logo { width: min(520px, 90%); filter: drop-shadow(0 0 24px rgba(255,255,255,.12)); }
.night .kick { font-family: var(--pixel); font-size: 22px; color: #ff9b2e; text-shadow: 0 0 6px rgba(255,120,0,.8); letter-spacing: .06em; }
.night p { color: #bdbdbd; }
.prints { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 70px; gap: 12px; }
.print { position: relative; margin: 0; overflow: hidden; background: #111; }
.print img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05) saturate(1.05); }
.print .ds { position: absolute; right: 10px; bottom: 6px; font-family: var(--pixel); font-size: 20px; color: #ff9b2e; text-shadow: 0 0 5px rgba(255,120,0,.95); }
.p1 { grid-column: 1 / 6; grid-row: span 5; } .p2 { grid-column: 6 / 10; grid-row: span 3; } .p3 { grid-column: 10 / 13; grid-row: span 4; }
.p4 { grid-column: 6 / 10; grid-row: span 3; } .p5 { grid-column: 10 / 13; grid-row: span 2; } .p6 { grid-column: 1 / 4; grid-row: span 3; }
.p7 { grid-column: 4 / 9; grid-row: span 3; } .p8 { grid-column: 9 / 13; grid-row: span 3; }
@media (max-width: 760px) { .prints { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 60px; }
  .p1 { grid-column: 1 / 7; grid-row: span 4; } .p2, .p4 { grid-column: span 3; grid-row: span 3; } .p3 { grid-column: 1 / 4; grid-row: span 4; } .p5 { grid-column: 4 / 7; grid-row: span 4; }
  .p6 { grid-column: 1 / 4; grid-row: span 3; } .p7 { grid-column: 4 / 7; grid-row: span 3; } .p8 { grid-column: 1 / 7; grid-row: span 4; } }
.albums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 56px; }
@media (max-width: 760px) { .albums { grid-template-columns: repeat(2, 1fr); } }
.albums a { text-decoration: none; color: #ddd; font-size: 14px; }
.albums img { margin-bottom: 8px; transition: transform .2s; }
.albums a:hover img { transform: translateY(-4px); }
.albums b { display: block; color: #fff; }
.player { margin-top: 36px; border: 1px solid #333; }
.player button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 100%; align-items: center; gap: 14px; padding: 14px 16px; color: #fff; }
.player button:hover { background: #111; }
.player .tri { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 2px solid #ff9b2e; display: grid; place-items: center; color: #ff9b2e; }
.player small { display: block; color: #8f8f8f; }
.player iframe { display: block; width: 100%; height: 472px; border: 0; }

/* ---------- 5. the homepage: GeoCities ---------- */
.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: 3px 6px; display: flex; justify-content: space-between; }
.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 table { margin: 0 auto; border-collapse: separate; border: 3px ridge #808080; background: #fff; font-size: 16px; text-align: left; }
.geo td, .geo th { border: 1px solid #808080; padding: 4px 10px; }
.geo th { background: #000080; color: #fff; font-family: Arial, sans-serif; }
.geo tr:nth-child(even) td { background: #eef; }
.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; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.b88 { width: 88px; height: 31px; display: grid; place-items: center; text-align: center; font: 12px/1 Verdana, sans-serif; font-weight: bold; border: 1px solid #000; overflow: hidden; }
.b88.a { background: linear-gradient(#fff, #aaa); color: #000; } .b88.b { background: #000; color: #0f0; font-family: var(--pixel); font-size: 15px; font-weight: 400; }
.b88.c { background: #7a4a2c; color: #ffd27a; } .b88.d { background: #008080; color: #fff; } .b88.e { background: linear-gradient(90deg, #f0f, #0ff); color: #000; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

/* ---------- 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; } }

/* 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; }

/* ---------- 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); }
.aero h2.chunky { font-family: var(--chunky); font-weight: 700; font-size: clamp(2rem, 5.2vw, 3.8rem); }

/* ---------- 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; }

/* ---------- 88x31 badges, redrawn ---------- */
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.b88 { width: 88px; height: 31px; display: flex; align-items: center; justify-content: center; gap: 3px; text-align: center; border: 1px solid #000; overflow: hidden; padding: 0 2px; line-height: 1; }
.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; }
.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; }

/* ---------- STONE additions ---------- */
.night .lights-bg { position: absolute; inset: 0 0 auto 0; height: 560px; z-index: 0; overflow: hidden; opacity: .32; pointer-events: none;
  mask-image: linear-gradient(#000 40%, transparent); -webkit-mask-image: linear-gradient(#000 40%, transparent); }
.night .lights-bg video { width: 100%; height: 100%; object-fit: cover; filter: blur(1px) saturate(1.2); }
.night .wrap { z-index: 1; }
.kiki-photo { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; align-items: center; margin-top: 22px; }
.kiki-photo img { border: 6px solid #f6f2e8; transform: rotate(-3deg); box-shadow: 0 16px 30px -10px #000; }
.kiki-photo p { margin: 0; font-size: 15px; }
.canvases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 56px; }
@media (max-width: 760px) { .canvases { grid-template-columns: repeat(2, 1fr); } }
.canvases figure { margin: 0; position: relative; aspect-ratio: 9 / 16; background: #111; overflow: hidden; }
.canvases video { width: 100%; height: 100%; object-fit: cover; display: block; }
.canvases figcaption { position: absolute; left: 8px; bottom: 6px; font: 18px var(--pixel); color: #fff; text-shadow: 0 1px 3px #000; }
.night h3.kick { margin: 56px 0 14px; }

/* ---------- 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; }
.liminal .strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
@media (max-width: 760px) { .liminal .strip { grid-template-columns: repeat(2, 1fr); } }
.liminal .strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: sepia(.25); }

/* ---------- homepage additions: 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; }
.nav a { white-space: nowrap; }
@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; } }

/* ---------- Kiki's Homepage: a real Windows 95 window ---------- */
.geo .titlebar { align-items: center; padding: 2px 3px 2px 4px; user-select: none; }
.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; }

/* ---------- GIFs everywhere ---------- */
.gif-shrine { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; background: #000; border: 3px ridge #808080; padding: 14px; margin: 0 auto; max-width: 700px; }
.gif-shrine img { image-rendering: pixelated; max-height: 90px; width: auto; }
.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; } }
.home .float-gif { opacity: .95; }
.aero .gif-row img { filter: drop-shadow(0 6px 10px rgba(0,60,120,.35)); }

/* ---------- STONE logo sparkles ---------- */
.stone-mark { position: relative; width: min(520px, 90%); margin-top: 26px; }
.stone-mark .stone-logo { width: 100%; display: block; }
.spk img { position: absolute; width: var(--s); height: auto; transform: translate(-50%, -50%); image-rendering: pixelated; pointer-events: none;
  animation: twinkle 3.2s var(--d) ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 45% { opacity: .3; } 60% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .spk img { animation: none; } }

/* ---------- side quests: GitHub projects, each in its own game's art ---------- */
@font-face { font-family: "Black Chancery"; src: url("fonts/BlackChancery.ttf") format("truetype"); font-display: swap; }
.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-label { display: inline-block; margin: 0; font: 700 15px/1 var(--chunky); color: var(--cream); background: var(--brown-900); padding: 8px 12px; box-shadow: 3px 3px 0 rgba(0,0,0,.45); }
.sq-label span { font-family: var(--round); font-weight: 400; font-size: 13px; color: var(--cream-2); margin-left: 8px; }
.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: 760px; -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 { min-height: calc(min(860px, 66vw) * 1.3086 + 10px); }
.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 { min-height: 0; }
  .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; } }
