/* =================================================================================================
   kai.fun looks: chosen in the ⚙️ Settings menu (settings.js). Classes live on <html>:
   .theme-cardboard, .theme-crayon, and .kid-mode. Everything here is CSS + inline SVG filters.
   ================================================================================================= */

/* ---------- kid-friendly mode ---------- */
html.kid-mode .game-tile[data-mature],
html.kid-mode .kfad { display: none !important; }

/* ---------- settings button and menu (same in every look) ---------- */
#kfSettingsBtn {
  position: fixed; top: 14px; right: 16px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; border: 2px solid #141414; box-shadow: 3px 3px 0 #141414;
  font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: transform .15s;
}
#kfSettingsBtn:hover { transform: rotate(40deg); }
#kfSettingsBtn:active { transform: rotate(40deg) translate(2px, 2px); box-shadow: 1px 1px 0 #141414; }
#kfSettings {
  position: fixed; top: 70px; right: 16px; z-index: 61; width: min(340px, calc(100vw - 32px));
  background: #fff; border: 2px solid #141414; border-radius: 16px; box-shadow: 5px 5px 0 #141414;
  padding: 16px; font-family: "Trebuchet MS", system-ui, sans-serif; color: #141414; text-align: left;
}
#kfSettings[hidden] { display: none; }
#kfSettings h3 { font-family: "Comic Sans MS", "Trebuchet MS", sans-serif; font-size: 20px; margin: 0 0 10px; }
#kfSettings .lab { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #8a8a8a; margin: 12px 0 6px; }
#kfSettings .looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#kfSettings .look {
  border: 2px solid #e2e2e2; border-radius: 12px; background: #fff; padding: 6px 4px 8px; cursor: pointer;
  font: 700 13px "Trebuchet MS", sans-serif; color: #141414; display: flex; flex-direction: column; align-items: center; gap: 5px;
}
#kfSettings .look:hover { border-color: #141414; }
#kfSettings .look[aria-pressed="true"] { border-color: #141414; box-shadow: 3px 3px 0 #141414; }
#kfSettings .sw { width: 100%; height: 46px; border-radius: 8px; position: relative; overflow: hidden; }
#kfSettings .sw.normal { background: #fff; border: 2px solid #6fb85c; box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 30px #4aa9d8; }
#kfSettings .sw.cardboard {
  background: repeating-linear-gradient(90deg, rgba(90,55,20,.18) 0 2px, transparent 2px 6px), #c49a6c;
}
#kfSettings .sw.cardboard::after { content: ""; position: absolute; left: 30%; top: -4px; width: 40%; height: 14px; background: rgba(240,226,182,.85); transform: rotate(-4deg); }
#kfSettings .sw.crayon { background: #fdfaf1; }
#kfSettings .sw.crayon::before, #kfSettings .sw.crayon::after {
  content: ""; position: absolute; left: 10%; right: 10%; height: 6px; border-radius: 6px; transform: rotate(-6deg);
}
#kfSettings .sw.crayon::before { top: 12px; background: #e63b2e; }
#kfSettings .sw.crayon::after { top: 26px; background: #2b6fd6; transform: rotate(4deg); }
#kfSettings .toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; }
#kfSettings .toggle input { width: 20px; height: 20px; accent-color: #6fb85c; }
#kfSettings .hint { font-size: 12px; color: #8a8a8a; margin: 4px 0 0 30px; line-height: 1.4; }

/* =================================================================================================
   CARDBOARD: kraft background, every game cut out of corrugated cardboard and taped on
   ================================================================================================= */
html.theme-cardboard { --hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", "Chalkboard SE", cursive; --kraft: #c49a6c; --brownink: #2b1d10; }
html.theme-cardboard body {
  background-color: var(--kraft);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .25  0 0 0 0 .16  0 0 0 0 .07  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    repeating-linear-gradient(90deg, rgba(90,55,20,.07) 0 3px, rgba(255,232,196,.07) 3px 10px),
    radial-gradient(ellipse at 25% 0%, rgba(255,236,204,.45), transparent 60%);
  color: var(--brownink);
}
html.theme-cardboard .wordmark { font-family: var(--hand); color: var(--brownink); text-shadow: 3px 3px 0 rgba(255,238,206,.45); }
html.theme-cardboard .wordmark .face { filter: drop-shadow(3px 3px 0 var(--brownink)) sepia(.55); }
html.theme-cardboard .subtitle, html.theme-cardboard .intro, html.theme-cardboard .contact, html.theme-cardboard .fine { font-family: var(--hand); color: #4a3420; }
html.theme-cardboard .contact a, html.theme-cardboard .fine a { color: var(--brownink); }
html.theme-cardboard .game-tile {
  background: #b98a57 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .2  0 0 0 0 .12  0 0 0 0 .05  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>") !important;
  border: 0 !important;
  border-radius: 4px 10px 3px 8px / 8px 3px 10px 4px !important;
  box-shadow: 2px 5px 0 rgba(50,30,10,.35), inset 0 0 0 2px rgba(70,42,14,.3), inset 0 -3px 0 rgba(70,42,14,.25) !important;
  overflow: visible !important;
}
html.theme-cardboard .game-tile:nth-child(4n+1) { transform: rotate(-.8deg); }
html.theme-cardboard .game-tile:nth-child(4n+2) { transform: rotate(.6deg); }
html.theme-cardboard .game-tile:nth-child(4n+3) { transform: rotate(-.35deg); }
html.theme-cardboard .game-tile:nth-child(4n) { transform: rotate(1deg); }
html.theme-cardboard .game-tile:hover, html.theme-cardboard .game-tile:focus-visible { transform: rotate(0) translateY(-4px); }
/* the game picture is "printed" on a cardboard panel with a frame of cardboard around it */
html.theme-cardboard .game-tile img, html.theme-cardboard .game-tile iframe {
  position: absolute !important; inset: 11px !important; width: calc(100% - 22px) !important; height: calc(100% - 22px) !important;
  border-radius: 3px !important; filter: sepia(.28) saturate(.85) contrast(.95);
}
/* corrugation showing through the print */
html.theme-cardboard .game-tile::after {
  content: ""; position: absolute; inset: 11px; z-index: 2; pointer-events: none; border-radius: 3px;
  background: repeating-linear-gradient(90deg, rgba(80,48,18,.13) 0 2px, rgba(255,236,204,.06) 2px 7px);
  mix-blend-mode: multiply;
}
/* a strip of packing tape holding it to the wall */
html.theme-cardboard .game-tile::before {
  content: ""; position: absolute; top: -11px; left: 50%; width: 96px; height: 26px; z-index: 3; pointer-events: none;
  background: rgba(238,224,182,.78); transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
}
html.theme-cardboard .game-tile:nth-child(odd)::before { transform: translateX(-50%) rotate(4deg); left: 38%; }
html.theme-cardboard .link-btn {
  background: #b98a57; border: 2px dashed rgba(43,29,16,.6); color: var(--brownink); font-family: var(--hand);
  border-radius: 4px 10px 3px 8px / 8px 3px 10px 4px; box-shadow: 2px 4px 0 rgba(50,30,10,.3);
}
html.theme-cardboard #quote { background: #e4c79c; border-color: var(--brownink); box-shadow: 4px 4px 0 rgba(50,30,10,.45); font-family: var(--hand); }
html.theme-cardboard #quote::after { border-bottom-color: #e4c79c; }
html.theme-cardboard #scrambleBtn .scr-face {
  background: #b98a57; color: #b3261e; text-shadow: none; font-family: var(--hand);
  border-color: var(--brownink); border-radius: 4px 12px 3px 9px / 9px 3px 12px 4px;
  box-shadow: inset 0 2px 0 rgba(255,236,204,.4), 0 6px 0 #6e4a24, 0 6px 0 3px var(--brownink), 0 14px 14px rgba(0,0,0,.3);
}
html.theme-cardboard #kfSettingsBtn { background: #b98a57; border-color: var(--brownink); box-shadow: 3px 3px 0 var(--brownink); }
html.theme-cardboard .sandwich-link .cap { font-family: var(--hand); }

/* =================================================================================================
   CRAYON: drawing paper, wobbly waxy crayon outlines, crayon-textured pictures
   (the #kf-crayon-* SVG filters are added to the page by settings.js)
   ================================================================================================= */
html.theme-crayon { --hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", "Chalkboard SE", cursive; }
html.theme-crayon body {
  background-color: #fdfaf1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .55  0 0 0 0 .5  0 0 0 0 .4  0 0 0 .16 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color: #2a2a2a;
}
html.theme-crayon .wordmark { font-family: var(--hand); filter: url(#kf-crayon-text); }
html.theme-crayon .wordmark span:first-child { color: #e63b2e; }
html.theme-crayon .wordmark span:last-child { color: #2b6fd6; }
html.theme-crayon .wordmark .face { filter: url(#kf-crayon-text); }
html.theme-crayon .subtitle, html.theme-crayon .intro, html.theme-crayon .contact, html.theme-crayon .fine { font-family: var(--hand); }
html.theme-crayon .game-tile {
  --c: #e63b2e;
  background: transparent !important; border: 0 !important; box-shadow: none !important; overflow: visible !important;
}
html.theme-crayon .game-tile:nth-child(6n+1) { --c: #e63b2e; transform: rotate(-.7deg); }
html.theme-crayon .game-tile:nth-child(6n+2) { --c: #2b6fd6; transform: rotate(.5deg); }
html.theme-crayon .game-tile:nth-child(6n+3) { --c: #2fa84f; transform: rotate(-.3deg); }
html.theme-crayon .game-tile:nth-child(6n+4) { --c: #f39c1f; transform: rotate(.8deg); }
html.theme-crayon .game-tile:nth-child(6n+5) { --c: #8e44ad; transform: rotate(-.9deg); }
html.theme-crayon .game-tile:nth-child(6n) { --c: #e84393; transform: rotate(.4deg); }
html.theme-crayon .game-tile:hover, html.theme-crayon .game-tile:focus-visible { transform: rotate(0) scale(1.02); }
html.theme-crayon .game-tile img, html.theme-crayon .game-tile iframe {
  position: absolute !important; inset: 9px !important; width: calc(100% - 18px) !important; height: calc(100% - 18px) !important;
  border-radius: 14px 6px 12px 8px !important; filter: saturate(1.15) contrast(1.04);
}
/* the waxy crayon outline, drawn twice for that pressed-hard look */
html.theme-crayon .game-tile::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border: 6px solid var(--c); border-radius: 22px 8px 18px 10px / 10px 20px 8px 18px;
  filter: url(#kf-crayon-line);
}
/* crayon wax over the picture */
html.theme-crayon .game-tile::after {
  content: ""; position: absolute; inset: 9px; z-index: 2; pointer-events: none; border-radius: 14px 6px 12px 8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='.012 .55' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .32  0 0 0 0 .28  0 0 0 1.3 -.45'/></filter><rect width='100%' height='100%' filter='url(%23w)'/></svg>");
  mix-blend-mode: multiply; opacity: .55;
}
html.theme-crayon .link-btn { background: transparent; border: 0; position: relative; font-family: var(--hand); }
html.theme-crayon .link-btn::before {
  content: ""; position: absolute; inset: 0; border: 4px solid #2a2a2a; border-radius: 18px 8px 16px 10px / 10px 16px 8px 18px;
  filter: url(#kf-crayon-line); pointer-events: none;
}
html.theme-crayon #quote { background: #fffdf4; border: 0; box-shadow: none; font-family: var(--hand); }
html.theme-crayon #quote::before { border-bottom-color: #2a2a2a; }
html.theme-crayon #quote { outline: 4px solid #2a2a2a; outline-offset: -2px; border-radius: 14px; filter: url(#kf-crayon-soft); }
html.theme-crayon #scrambleBtn .scr-face {
  font-family: var(--hand); background: #ff6b5e; border-color: #b3261e; text-shadow: none;
  box-shadow: 0 5px 0 #b3261e; filter: url(#kf-crayon-soft); border-radius: 18px 8px 16px 10px / 10px 16px 8px 18px;
}
html.theme-crayon #kfSettingsBtn { background: #fffdf4; filter: url(#kf-crayon-soft); }
html.theme-crayon .sandwich-link .cap { font-family: var(--hand); }

@media (prefers-reduced-motion: reduce) {
  html.theme-cardboard .game-tile, html.theme-crayon .game-tile { transform: none !important; }
}

/* ---------- menu swatches for the newer looks ---------- */
#kfSettings .sw.chalkboard { background: #2f4a3a; box-shadow: inset 0 0 0 4px #8a5a2b; }
#kfSettings .sw.chalkboard::before {
  content: "a+b"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #f2efe6; font: 700 17px "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; opacity: .9; filter: url(#kf-chalk-text);
}
#kfSettings .sw.inverted { background: linear-gradient(90deg, #fff 50%, #111 50%); border: 2px solid #111; }
#kfSettings .sw.inverted::before, #kfSettings .sw.inverted::after {
  content: ""; position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translateY(-50%);
}
#kfSettings .sw.inverted::before { left: 22%; background: #111; }
#kfSettings .sw.inverted::after { right: 22%; background: #fff; }
#kfSettings .sw.gravity { background: linear-gradient(#e9f5ff, #e9f5ff 78%, #6fb85c 78%); }
#kfSettings .sw.gravity::before, #kfSettings .sw.gravity::after {
  content: ""; position: absolute; bottom: 22%; width: 34%; height: 34%; border: 2px solid #141414; border-radius: 4px;
}
#kfSettings .sw.gravity::before { left: 14%; background: #ffd23d; transform: rotate(-14deg); }
#kfSettings .sw.gravity::after { right: 14%; background: #ff6f91; transform: rotate(22deg); bottom: 26%; }

/* =================================================================================================
   CHALKBOARD: a slate board in a wooden frame, chalk writing, every game re-drawn in chalk
   (the pictures are redrawn by settings.js; the #kf-chalk-* SVG filters are added there too)
   ================================================================================================= */
html.theme-chalkboard { --hand: "Segoe Print", "Bradley Hand", "Chalkboard SE", "Comic Sans MS", cursive; --chalk: #f2efe6; }
html.theme-chalkboard body {
  background-color: #2b4235;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .22 -.06'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(ellipse 40% 18% at 22% 12%, rgba(255,255,255,.07), transparent 70%),
    radial-gradient(ellipse 35% 14% at 78% 40%, rgba(255,255,255,.06), transparent 70%),
    radial-gradient(ellipse 45% 20% at 40% 75%, rgba(255,255,255,.05), transparent 70%);
  background-attachment: fixed;
  color: var(--chalk);
}
/* the wooden frame around the board */
html.theme-chalkboard body::before {
  content: ""; position: fixed; inset: 0; z-index: 55; pointer-events: none;
  border: 12px solid #8a5a2b; border-image: repeating-linear-gradient(90deg, #8a5a2b 0 40px, #9b6834 40px 70px, #7c4f24 70px 110px) 12;
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.35), inset 0 0 40px rgba(0,0,0,.45);
}
html.theme-chalkboard .wordmark { font-family: var(--hand); color: var(--chalk); filter: url(#kf-chalk-text); text-shadow: 0 0 8px rgba(255,255,255,.18); }
html.theme-chalkboard .wordmark span:first-child { color: #fff3a8; }
html.theme-chalkboard .wordmark span:last-child { color: #bfe3ff; }
html.theme-chalkboard .wordmark .face { filter: invert(.94) url(#kf-chalk-text); }
html.theme-chalkboard .subtitle, html.theme-chalkboard .intro, html.theme-chalkboard .contact, html.theme-chalkboard .fine { font-family: var(--hand); color: rgba(242,239,230,.86); }
html.theme-chalkboard .contact a, html.theme-chalkboard .fine a { color: #fff3a8; }
html.theme-chalkboard .game-count { background: transparent; color: var(--chalk); border: 2px dashed rgba(242,239,230,.75); box-shadow: none; font-family: var(--hand); }
html.theme-chalkboard .game-tile {
  --c: #f2efe6; color: var(--chalk) !important;
  background: transparent !important; border: 0 !important; box-shadow: none !important; overflow: visible !important;
}
html.theme-chalkboard .game-tile:nth-child(5n+1) { --c: #f2efe6; transform: rotate(-.5deg); }
html.theme-chalkboard .game-tile:nth-child(5n+2) { --c: #fff3a8; transform: rotate(.4deg); }
html.theme-chalkboard .game-tile:nth-child(5n+3) { --c: #ffc2d4; transform: rotate(-.3deg); }
html.theme-chalkboard .game-tile:nth-child(5n+4) { --c: #bfe3ff; transform: rotate(.6deg); }
html.theme-chalkboard .game-tile:nth-child(5n) { --c: #c8f5c0; transform: rotate(-.7deg); }
html.theme-chalkboard .game-tile:hover, html.theme-chalkboard .game-tile:focus-visible { transform: rotate(0) scale(1.02); }
html.theme-chalkboard .game-tile h2, html.theme-chalkboard .game-tile p { color: var(--chalk) !important; font-family: var(--hand); }
html.theme-chalkboard .game-tile img, html.theme-chalkboard .game-tile iframe {
  position: absolute !important; inset: 9px !important; width: calc(100% - 18px) !important; height: calc(100% - 18px) !important;
  border-radius: 12px 6px 10px 8px !important;
}
/* the live iframe tiles can't be redrawn, so they are toned down to sit on the board */
html.theme-chalkboard .game-tile iframe { filter: grayscale(.6) brightness(.85) contrast(.9); }
/* the chalk outline, drawn twice for that pressed-hard look */
html.theme-chalkboard .game-tile::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border: 5px solid var(--c); border-radius: 20px 8px 16px 10px / 10px 18px 8px 16px;
  filter: url(#kf-chalk-line); opacity: .92;
}
/* chalk dust over the picture */
html.theme-chalkboard .game-tile::after {
  content: ""; position: absolute; inset: 9px; z-index: 2; pointer-events: none; border-radius: 12px 6px 10px 8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='d'><feTurbulence type='fractalNoise' baseFrequency='.02 .6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 -.2'/></filter><rect width='100%' height='100%' filter='url(%23d)'/></svg>");
  mix-blend-mode: screen; opacity: .35;
}
html.theme-chalkboard .link-btn { background: transparent; color: var(--chalk); border: 0; position: relative; font-family: var(--hand); box-shadow: none; }
html.theme-chalkboard .link-btn::before {
  content: ""; position: absolute; inset: 0; border: 3px solid var(--chalk); border-radius: 18px 8px 16px 10px / 10px 16px 8px 18px;
  filter: url(#kf-chalk-line); pointer-events: none;
}
html.theme-chalkboard #quote { background: rgba(0,0,0,.12); color: var(--chalk); border: 0; box-shadow: none; font-family: var(--hand); outline: 3px solid var(--chalk); outline-offset: -2px; border-radius: 14px; filter: url(#kf-chalk-line); }
html.theme-chalkboard #quote::before, html.theme-chalkboard #quote::after { border-bottom-color: var(--chalk); }
html.theme-chalkboard #scrambleBtn .scr-face {
  font-family: var(--hand); background: #3b5a48; color: #fff3a8; text-shadow: none; border-color: var(--chalk);
  box-shadow: 0 5px 0 #1d2e25; border-radius: 18px 8px 16px 10px / 10px 16px 8px 18px; filter: url(#kf-chalk-line);
}
html.theme-chalkboard #kfSettingsBtn { background: #2b4235; border-color: var(--chalk); box-shadow: 3px 3px 0 rgba(0,0,0,.4); }
html.theme-chalkboard .sandwich-link { color: var(--chalk); }
html.theme-chalkboard .sandwich-link .cap { font-family: var(--hand); }
html.theme-chalkboard .sandwich-link .sub { color: rgba(242,239,230,.7); }

/* =================================================================================================
   INVERTED: the whole page as a colour negative, game pictures included
   (a filter on the root element keeps fixed things like the settings button where they are)
   ================================================================================================= */
html.theme-inverted { filter: invert(1); background: #fff; min-height: 100%; }

/* =================================================================================================
   GRAVITY: settings.js turns every tile into a physics body and drops them into a heap
   ================================================================================================= */
html.theme-gravity .game-tile { transition: box-shadow .12s ease !important; will-change: transform; }
html.theme-gravity #scrambleBtn { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html.theme-chalkboard .game-tile { transform: none !important; }
}
html.theme-gravity main.games::before {
  content: "everything fell to the bottom \2B07"; position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  font: 900 20px "Comic Sans MS", "Trebuchet MS", sans-serif; color: #8a8a8a; white-space: nowrap;
  animation: kfFell 1.2s ease-in-out infinite alternate;
}
@keyframes kfFell { to { transform: translate(-50%, 10px); } }

/* ---------- menu swatches: Kai mode, Dark, Deleted.Fun, 150 party ---------- */
#kfSettings .sw.kai { background: radial-gradient(circle at 50% 50%, #ffe15a 0 14px, transparent 15px), repeating-conic-gradient(#fff3a0 0 15deg, #ffe680 15deg 30deg); }
#kfSettings .sw.kai::before { content: "🙂"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; }
#kfSettings .sw.candle { background: radial-gradient(circle at 50% 60%, #ffcf70 0 3px, #a0601a 7px, #1a0f05 22px, #000 34px); }
#kfSettings .sw.candle::before { content: "🕯️"; position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: 18px; }
#kfSettings .sw.deleted { background: repeating-linear-gradient(0deg, transparent 0 3px, #0000000d 3px 4px), #d9d2c3; }
#kfSettings .sw.deleted::before { content: "RIP"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 15px "Comic Sans MS", sans-serif; color: #5a5243; text-decoration: line-through; text-decoration-color: #a33; }
#kfSettings .sw.party { background: radial-gradient(circle at 20% 30%, #ff5a4a 0 3px, transparent 4px), radial-gradient(circle at 70% 20%, #4aa9d8 0 3px, transparent 4px), radial-gradient(circle at 40% 75%, #6fb85c 0 3px, transparent 4px), radial-gradient(circle at 85% 70%, #9b7fd4 0 3px, transparent 4px), #fff3c2; }
#kfSettings .sw.party::before { content: "150🎉"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 14px "Trebuchet MS", sans-serif; color: #c0281a; }

/* =================================================================================================
   KAI MODE: sunshine, a smiley cursor, and a little Kai face on every game watching your mouse
   ================================================================================================= */
html.theme-kai body {
  background: radial-gradient(circle at 50% -10%, #fff7c2 0%, transparent 60%), repeating-conic-gradient(from 0deg at 50% -10%, #fff3a0 0 6deg, #ffeb7a 6deg 12deg);
  background-attachment: fixed;
}
html.theme-kai, html.theme-kai * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'><circle cx='17' cy='17' r='15' fill='%23ffd23d' stroke='%23141414' stroke-width='2.5'/><circle cx='12' cy='14' r='4' fill='white' stroke='%23141414' stroke-width='1.5'/><circle cx='22' cy='14' r='4' fill='white' stroke='%23141414' stroke-width='1.5'/><circle cx='13' cy='15' r='1.8' fill='%23141414'/><circle cx='23' cy='15' r='1.8' fill='%23141414'/><path d='M10 21 Q17 27 24 21' fill='none' stroke='%23141414' stroke-width='2.2' stroke-linecap='round'/></svg>") 17 17, auto !important;
}
html.theme-kai .wordmark { animation: kfKaiBounce 1.6s ease-in-out infinite; }
html.theme-kai .wordmark span:first-child { color: #ff6b5e; }
@keyframes kfKaiBounce { 50% { transform: translateY(-8px) rotate(-1.5deg); } }
html.theme-kai .game-tile:hover { animation: kfWiggle .4s ease-in-out; }
@keyframes kfWiggle { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
.kf-kaiface { position: absolute; right: 10px; top: 10px; z-index: 6; width: 52px; height: 52px; border-radius: 50%; background: #ffd23d; border: 3px solid #141414;
  box-shadow: 2px 2px 0 #141414; pointer-events: none; display: flex; justify-content: center; gap: 4px; padding-top: 12px; }
.kf-kaiface i { width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 2px solid #141414; display: grid; place-items: center; }
.kf-kaiface b { width: 7px; height: 7px; border-radius: 50%; background: #141414; display: block; }
.kf-kaiface u { position: absolute; left: 50%; bottom: 9px; width: 20px; height: 9px; margin-left: -10px; border: 3px solid #141414; border-top: 0; border-radius: 0 0 14px 14px; }

/* =================================================================================================
   DARK: everything goes black, and you carry a candle
   ================================================================================================= */
html.theme-candle body { background: #0b0704; }
#kfDark { position: fixed; inset: 0; z-index: 58; pointer-events: none; background: #000; }
#kfCandle { position: fixed; left: 0; top: 0; z-index: 59; pointer-events: none; width: 26px; height: 80px; will-change: transform; }
#kfCandle .glow { position: absolute; left: 50%; top: -14px; width: 70px; height: 70px; margin-left: -35px; border-radius: 50%; background: radial-gradient(circle, rgba(255,200,90,.55), rgba(255,140,30,0) 70%); animation: kfGlow .18s infinite alternate; }
#kfCandle .flame { position: absolute; left: 50%; top: 2px; width: 14px; height: 24px; margin-left: -7px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(circle at 50% 75%, #fff 0 18%, #ffe07a 30%, #ff9a1f 65%, rgba(255,80,0,.0) 72%); animation: kfFlame .13s infinite alternate; transform-origin: 50% 90%; }
#kfCandle .wick { position: absolute; left: 50%; top: 23px; width: 2px; height: 6px; margin-left: -1px; background: #2a1a0a; }
#kfCandle .wax { position: absolute; left: 1px; top: 28px; width: 24px; height: 46px; border-radius: 6px 6px 3px 3px; background: linear-gradient(90deg, #e8dcc0, #fff8e6 45%, #d7c8a6); box-shadow: 0 0 18px rgba(255,180,80,.35); }
#kfCandle .wax::before { content: ""; position: absolute; left: 4px; top: -2px; width: 7px; height: 14px; border-radius: 0 0 6px 6px; background: #fff8e6; }
@keyframes kfFlame { from { transform: scale(1, 1) rotate(-2deg); } to { transform: scale(.92, 1.08) rotate(2deg); } }
@keyframes kfGlow { to { transform: scale(1.08); opacity: .85; } }
html.theme-candle #kfSettingsBtn { z-index: 60; background: #2a1a0a; border-color: #ffcf70; box-shadow: 0 0 18px rgba(255,190,90,.7); }

/* =================================================================================================
   DELETED.FUN: a dusty, forgotten website (the style of the Deleted.Fun page)
   ================================================================================================= */
html.theme-deleted body {
  background-color: #d9d2c3; color: #3b3629;
  background-image: radial-gradient(ellipse at 20% 10%, #00000010, transparent 50%), radial-gradient(ellipse at 80% 90%, #00000014, transparent 50%), repeating-linear-gradient(0deg, transparent 0 3px, #0000000a 3px 4px);
  background-attachment: fixed;
}
html.theme-deleted .wordmark { color: #5a5243; filter: grayscale(.7) contrast(.85); text-shadow: 2px 2px 0 #b9b19f; animation: kfFlicker 7s infinite; }
html.theme-deleted .wordmark span:last-child { text-decoration: line-through; text-decoration-color: #a33; text-decoration-thickness: 6px; }
@keyframes kfFlicker { 0%, 91%, 93%, 95%, 100% { opacity: 1; } 92%, 94% { opacity: .35; } }
html.theme-deleted .subtitle, html.theme-deleted .intro, html.theme-deleted .contact, html.theme-deleted .fine { color: #7a7160; font-style: italic; }
html.theme-deleted .game-count { background: #e9e3d5; border-color: #8e8570; box-shadow: 3px 3px 0 #a39a85; color: #5a5243; }
html.theme-deleted .game-tile {
  background: #e9e3d5 !important; border: 2px solid #8e8570 !important; border-radius: 14px 14px 4px 4px !important; box-shadow: 4px 4px 0 #a39a85 !important;
}
html.theme-deleted .game-tile:nth-child(odd) { transform: rotate(-.6deg); }
html.theme-deleted .game-tile:nth-child(even) { transform: rotate(.5deg); }
html.theme-deleted .game-tile img, html.theme-deleted .game-tile iframe { filter: grayscale(.9) sepia(.35) contrast(.88) brightness(1.02); opacity: .82; transition: filter .4s, opacity .4s; }
html.theme-deleted .game-tile:hover img, html.theme-deleted .game-tile:hover iframe { filter: grayscale(.2) sepia(.1); opacity: 1; }
html.theme-deleted .game-tile:hover { transform: rotate(0) translate(-2px, -2px); }
html.theme-deleted .game-tile::after { content: "DELETED"; position: absolute; right: 12px; top: 10px; z-index: 5; font: 900 13px "Trebuchet MS", sans-serif; color: #a33; border: 2px solid #a33; border-radius: 3px; padding: 1px 7px; transform: rotate(8deg); background: rgba(233,227,213,.85); pointer-events: none; }
html.theme-deleted .game-tile::before { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: inherit; background: repeating-linear-gradient(135deg, transparent 0 12px, #0000000a 12px 13px); pointer-events: none; }
html.theme-deleted .link-btn, html.theme-deleted #quote { filter: grayscale(.8); }
html.theme-deleted #scrambleBtn .scr-face { background: #a39a85; color: #e9e3d5; text-decoration: line-through; }
.kf-dust { position: fixed; top: -10px; z-index: 40; width: 3px; height: 3px; border-radius: 50%; background: #fff8; pointer-events: none; animation: kfDrift linear infinite; }
@keyframes kfDrift { 0% { transform: translateY(-10px) translateX(0); opacity: 0; } 20% { opacity: .8; } 100% { transform: translateY(110vh) translateX(40px); opacity: 0; } }
.kf-web { position: fixed; width: 170px; height: 170px; z-index: 40; pointer-events: none; opacity: .4;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 170 170' fill='none' stroke='%235a5243' stroke-width='1.2'><path d='M0 0 L170 30 M0 0 L150 90 M0 0 L95 150 M0 0 L30 170'/><path d='M40 7 Q35 22 34 33 Q22 37 6 40'/><path d='M80 14 Q70 45 66 64 Q42 72 12 80'/><path d='M120 21 Q105 68 98 96 Q62 108 18 120'/><path d='M158 28 Q140 92 128 128 Q80 142 26 160'/></svg>") no-repeat; }
.kf-web.tl { left: -4px; top: -4px; }
.kf-web.br { right: -4px; bottom: -4px; transform: rotate(180deg); }

/* =================================================================================================
   150 GAMES PARTY: confetti, balloons, party hats and a banner
   ================================================================================================= */
html.theme-party body {
  background-color: #fff6e0;
  background-image: radial-gradient(circle at 12% 20%, #ffd23d55 0 6px, transparent 7px), radial-gradient(circle at 80% 35%, #ff7ab655 0 5px, transparent 6px), radial-gradient(circle at 40% 80%, #4aa9d855 0 6px, transparent 7px), radial-gradient(circle at 65% 65%, #6fb85c55 0 4px, transparent 5px);
  background-size: 180px 180px; background-attachment: fixed;
}
#kfParty { margin: 14px auto 0; text-align: center; position: relative; }
#kfParty .flags { display: flex; justify-content: center; margin-bottom: 4px; }
#kfParty .flags::before { content: "🎈 🎊 🎉 🥳 🎂 🎉 🎊 🎈"; font-size: 26px; letter-spacing: 6px; }
#kfParty .big { font: 900 clamp(34px, 7vw, 64px)/1 "Comic Sans MS", "Trebuchet MS", sans-serif; background: linear-gradient(90deg, #ff5a4a, #ff9f1c, #ffd23d, #6fb85c, #4aa9d8, #9b7fd4, #ff5a4a); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px #141414; animation: kfRainbow 3s linear infinite; }
#kfParty .small { font: 800 16px "Trebuchet MS", sans-serif; color: #7a4a2a; margin-top: 6px; }
@keyframes kfRainbow { to { background-position: 200% 0; } }
html.theme-party .wordmark { animation: kfKaiBounce 1.2s ease-in-out infinite; }
html.theme-party .game-tile { border-color: #c98a00 !important; box-shadow: 5px 5px 0 #f5b829, 0 0 0 3px #fff3c2 !important; overflow: visible !important; }
html.theme-party .game-tile.tile-img img { border-radius: 12px; }
html.theme-party .game-tile::before { content: ""; position: absolute; left: 14px; top: -30px; z-index: 6; width: 34px; height: 44px; pointer-events: none; transform: rotate(-14deg);
  background: repeating-linear-gradient(135deg, #ff5a4a 0 7px, #ffd23d 7px 14px); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(1px 1px 0 #141414); }
html.theme-party .game-tile::after { content: ""; position: absolute; left: 25px; top: -38px; z-index: 7; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #141414; transform: rotate(-14deg); pointer-events: none; }
html.theme-party .game-tile:nth-child(3n)::before { background: repeating-linear-gradient(135deg, #4aa9d8 0 7px, #fff 7px 14px); }
html.theme-party .game-tile:nth-child(3n+1)::before { background: repeating-linear-gradient(135deg, #9b7fd4 0 7px, #6fb85c 7px 14px); }
html.theme-party .game-tile:hover { animation: kfHop .45s ease-out; }
@keyframes kfHop { 40% { transform: translateY(-10px) rotate(-1deg); } }
#kfConfetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 45; pointer-events: none; }
.kf-balloon { position: fixed; bottom: -120px; z-index: 46; width: 54px; height: 66px; border: 0; padding: 0; cursor: pointer; border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 35% 30%, #fff9 0 6px, transparent 14px), var(--c); box-shadow: inset -6px -8px 0 #0002; animation: kfFloat 11s linear forwards, kfSway 2.4s ease-in-out infinite alternate; }
.kf-balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 60px; background: #5559; }
.kf-balloon.pop { animation: kfPop .25s ease-out forwards; }
@keyframes kfFloat { to { bottom: 115vh; } }
@keyframes kfSway { from { margin-left: -12px; } to { margin-left: 12px; } }
@keyframes kfPop { to { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html.theme-kai .wordmark, html.theme-party .wordmark, html.theme-deleted .wordmark { animation: none; }
}

/* ---------- menu swatches: 3D, Parallax, No games ---------- */
#kfSettings .sw.threed { background: linear-gradient(#bfe6ff, #fff); }
#kfSettings .sw.threed::before { content: ""; position: absolute; left: 50%; top: 50%; width: 30px; height: 22px; margin: -11px 0 0 -15px; background: #ff6b5e; border: 2px solid #141414; transform: perspective(60px) rotateY(-28deg) rotateX(12deg); box-shadow: 2px 2px 0 #141414, 4px 4px 0 #141414; }
#kfSettings .sw.parallax { background: #1b2340; }
#kfSettings .sw.parallax::before { content: "✦  ●  ★"; position: absolute; inset: 0; display: grid; place-items: center; color: #ffd23d; font-size: 15px; letter-spacing: 3px; }
#kfSettings .sw.nogames { background: #fbfbf7; border: 3px solid #b8bcc4; }
#kfSettings .sw.nogames::before { content: "x²+y²"; position: absolute; inset: 0; display: grid; place-items: center; color: #1f5fd1; font: 700 14px "Segoe Print", "Comic Sans MS", cursive; }

/* =================================================================================================
   3D: thick cards that tilt towards your mouse, a 3D logo and a grid floor
   ================================================================================================= */
html.theme-threed body { background: linear-gradient(#bfe6ff 0%, #f2f9ff 55%, #ffffff 100%); background-attachment: fixed; }
html.theme-threed body::after { content: ""; position: fixed; left: -50vw; right: -50vw; bottom: -10vh; height: 60vh; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(74,169,216,.45) 0 2px, transparent 2px 80px), repeating-linear-gradient(0deg, rgba(74,169,216,.45) 0 2px, transparent 2px 80px);
  transform: perspective(500px) rotateX(62deg); transform-origin: 50% 100%; }
html.theme-threed .wordmark { text-shadow: 1px 1px 0 #6a6a6a, 2px 2px 0 #5e5e5e, 3px 3px 0 #525252, 4px 4px 0 #474747, 5px 5px 0 #3c3c3c, 6px 6px 0 #313131, 7px 7px 0 #262626, 12px 14px 18px rgba(0,0,0,.35); }
html.theme-threed .game-tile {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .14s ease-out;
  box-shadow: 1px 1px 0 #141414, 2px 2px 0 #141414, 3px 3px 0 #141414, 4px 4px 0 #141414, 5px 5px 0 #141414, 6px 6px 0 #141414, 7px 7px 0 #141414, 8px 8px 0 #141414, 16px 22px 26px rgba(0,0,0,.28) !important;
}
html.theme-threed .game-tile:hover, html.theme-threed .game-tile:focus-visible { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(46px) scale(1.03); }
html.theme-threed .game-count, html.theme-threed .link-btn { box-shadow: 1px 1px 0 #141414, 2px 2px 0 #141414, 3px 3px 0 #141414, 4px 4px 0 #141414, 5px 5px 0 #141414; }

/* =================================================================================================
   PARALLAX: background layers and tiles moving at different depths
   ================================================================================================= */
html.theme-parallax body { background: linear-gradient(#1b2340, #2c1f45 60%, #3b2154); background-attachment: fixed; color: #f2f2f8; }
html.theme-parallax .subtitle, html.theme-parallax .intro, html.theme-parallax .contact, html.theme-parallax .fine { color: #c8c6e0; }
html.theme-parallax .wordmark { color: #fff; text-shadow: 4px 4px 0 #9b7fd4; }
html.theme-parallax .game-tile { transition: box-shadow .12s ease, filter .3s; will-change: transform; }
#kfPara { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#kfPara .kf-layer { position: absolute; inset: 0; will-change: transform; }
#kfPara .kf-layer span { position: absolute; }

/* =================================================================================================
   NO GAMES: the games are gone, there's a whiteboard, and it says do your homework
   ================================================================================================= */
html.theme-nogames main.games, html.theme-nogames #scrambleBtn, html.theme-nogames #kfvBar { display: none !important; }
#kfBoard { max-width: 1000px; margin: 26px auto 60px; padding: 0 12px; }
#kfBoard .wb { position: relative; background: linear-gradient(135deg, #ffffff, #f3f5f8 60%, #ffffff); border: 14px solid #b8bcc4; border-radius: 10px;
  box-shadow: inset 0 0 0 2px #d9dce2, 0 2px 0 #8d929b, 0 18px 40px rgba(0,0,0,.18); padding: 30px 34px 70px; font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; min-height: 420px; }
#kfBoard .wb::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 70% 30%, rgba(31,95,209,.05), transparent 40%), radial-gradient(ellipse at 20% 80%, rgba(20,20,20,.04), transparent 40%); }
#kfBoard .eqs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 40px; }
#kfBoard .eq { font-size: clamp(18px, 2.6vw, 28px); font-weight: 700; white-space: nowrap; overflow: hidden; clip-path: inset(0 100% 0 0); animation: kfWrite .7s steps(18) forwards; transform: rotate(-.6deg); }
#kfBoard .eq:nth-child(even) { transform: rotate(.5deg); }
#kfBoard .hw { margin-top: 28px; text-align: center; font-size: clamp(40px, 8vw, 86px); font-weight: 900; color: #c0281a; letter-spacing: .02em; line-height: 1;
  clip-path: inset(0 100% 0 0); animation: kfWrite 1.1s steps(22) forwards; text-decoration: underline; text-decoration-thickness: 6px; text-underline-offset: 10px; transform: rotate(-2deg); }
#kfBoard .sign { text-align: right; margin-top: 18px; font-size: 18px; color: #555; opacity: 0; animation: kfFadeIn .6s forwards; }
@keyframes kfWrite { to { clip-path: inset(0 0 0 0); } }
@keyframes kfFadeIn { to { opacity: 1; } }
#kfBoard .tray { position: absolute; left: 10%; right: 10%; bottom: -14px; height: 26px; background: #a7acb5; border-radius: 0 0 6px 6px; display: flex; align-items: center; gap: 14px; padding: 0 20px; box-shadow: 0 6px 10px rgba(0,0,0,.15); }
#kfBoard .tray i { width: 70px; height: 13px; border-radius: 3px 7px 7px 3px; background: linear-gradient(90deg, var(--c) 0 78%, #eee 78% 82%, var(--c) 82%); }
#kfBoard .tray b { margin-left: auto; width: 90px; height: 20px; border-radius: 4px; background: linear-gradient(#2b2b2b 0 55%, #e0e0e0 55%); }
#kfBoard .done { text-align: center; margin-top: 34px; font: 700 16px "Trebuchet MS", sans-serif; }
#kfBoard .done button { font: 800 17px "Trebuchet MS", sans-serif; border: 2px solid #141414; border-radius: 12px; padding: 9px 16px; background: #fff; box-shadow: 3px 3px 0 #141414; cursor: pointer; }
#kfBoard .done .q { font: 700 22px "Segoe Print", "Comic Sans MS", cursive; margin: 16px 0 8px; }
#kfBoard .done input { font: 800 20px "Trebuchet MS", sans-serif; width: 120px; padding: 6px 10px; border: 2px solid #141414; border-radius: 10px; text-align: center; }
#kfBoard .done .r { margin-top: 10px; font: 800 18px "Trebuchet MS", sans-serif; }
@media (max-width: 640px) { #kfBoard .eqs { grid-template-columns: 1fr; } #kfBoard .wb { padding: 20px 16px 60px; border-width: 10px; } }

/* ---------- menu swatches: OG and VERY OG kai.fun ---------- */
#kfSettings .sw.og { background: #fff; border: 2px solid #6fb85c; box-shadow: 3px 3px 0 #6fb85c; }
#kfSettings .sw.og::before { content: "Kai.fun"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 15px "Comic Sans MS", "Trebuchet MS", sans-serif; color: #141414; }
#kfSettings .sw.veryog { background: linear-gradient(90deg, #fdefd9 0 33%, #e3fbf6 33% 66%, #e8fbe8 66%); }
#kfSettings .sw.veryog::before { content: "Kai.fun"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 15px Arial, Helvetica, sans-serif; color: #000; }

/* ---------- shared by both retro looks ---------- */
.kf-retromark, .kf-retro, #kfNextRow { display: none; }
html.theme-og .wordmark > :not(.kf-retromark), html.theme-veryog .wordmark > :not(.kf-retromark) { display: none !important; }
html.theme-og .kf-retromark, html.theme-veryog .kf-retromark { display: inline; }
html.theme-og .game-count, html.theme-og #quote, html.theme-og #kfvBar, html.theme-og #scrambleBtn,
html.theme-veryog .game-count, html.theme-veryog #quote, html.theme-veryog #kfvBar, html.theme-veryog #scrambleBtn,
html.theme-og .kfad, html.theme-veryog .kfad, html.theme-og .kfmine-tag, html.theme-veryog .kfmine-tag { display: none !important; }
html.theme-og .game-tile img, html.theme-og .game-tile iframe, html.theme-veryog .game-tile img, html.theme-veryog .game-tile iframe { display: none !important; }

/* =================================================================================================
   OG KAI.FUN: the old front page (kai-fun.html), card for card
   ================================================================================================= */
html.theme-og header { margin: 20px 0 56px; }
html.theme-og .wordmark { font-family: "Comic Sans MS", "Trebuchet MS", sans-serif; font-weight: 900; transform: rotate(-1.5deg); }
html.theme-og main.games { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 22px; max-width: 1240px; margin-left: auto; margin-right: auto; }
html.theme-og .game-tile { width: 280px !important; max-width: 280px; min-height: 150px; padding: 18px !important; overflow: visible !important; background: #fff !important;
  border: 2px solid #6fb85c !important; border-radius: 14px !important; box-shadow: 5px 5px 0 #6fb85c !important; display: flex !important; flex-direction: column; justify-content: flex-end; }
html.theme-og .game-tile:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 #6fb85c !important; }
html.theme-og .kf-retro { display: flex; flex-direction: column; }
html.theme-og .kf-retro .emoji { position: absolute; top: 14px; left: 16px; font-size: 42px; }
html.theme-og .kf-retro .t { font: 700 22px/1.05 "Trebuchet MS", system-ui, sans-serif; color: #141414; margin-top: 52px; }
html.theme-og .kf-retro .d { font: 13px "Trebuchet MS", system-ui, sans-serif; color: #8a8a8a; margin-top: 4px; }

/* =================================================================================================
   VERY OG KAI.FUN: Arial, pastel cards, nine at a time
   ================================================================================================= */
html.theme-veryog body { background: #fff; font-family: Arial, Helvetica, sans-serif; }
html.theme-veryog header { margin: 30px 0 46px; }
html.theme-veryog .wordmark { font: 700 clamp(56px, 9vw, 88px)/1 Arial, Helvetica, sans-serif !important; letter-spacing: -1px; transform: none; color: #000; }
html.theme-veryog .subtitle { font: 400 clamp(18px, 2.4vw, 26px) Arial, Helvetica, sans-serif; color: #333; margin-top: 26px; }
html.theme-veryog #kfNextRow { display: inline-block; margin-top: 26px; font: 400 clamp(18px, 2.2vw, 26px) Arial, Helvetica, sans-serif; color: #3b7ddd; background: #fff; border: 1.5px solid #3b7ddd; border-radius: 4px; padding: 10px 22px; cursor: pointer; }
html.theme-veryog #kfNextRow:hover { background: #f0f6ff; }
html.theme-veryog main.games { grid-template-columns: repeat(3, minmax(0, 476px)) !important; gap: 34px 36px !important; }
html.theme-veryog .game-tile.kf-off { display: none !important; }
html.theme-veryog .game-tile { min-height: 268px; border: 0 !important; border-radius: 14px !important; box-shadow: none !important; padding: 0 !important; overflow: hidden !important;
  display: flex !important; align-items: center; justify-content: center; transition: transform .15s; }
html.theme-veryog .game-tile:hover { transform: translateY(-3px); }
html.theme-veryog .game-tile:nth-child(6n+1) { background: #fdefd9 !important; } html.theme-veryog .game-tile:nth-child(6n+2) { background: #e3fbf6 !important; }
html.theme-veryog .game-tile:nth-child(6n+3) { background: #e8fbe8 !important; } html.theme-veryog .game-tile:nth-child(6n+4) { background: #d8fbea !important; }
html.theme-veryog .game-tile:nth-child(6n+5) { background: #f2e9d6 !important; } html.theme-veryog .game-tile:nth-child(6n) { background: #e6f1ff !important; }
html.theme-veryog .kf-retro { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 20px; text-align: center; }
html.theme-veryog .kf-retro .emoji { font-size: 52px; line-height: 1; }
html.theme-veryog .kf-retro .t { font: 700 clamp(20px, 2vw, 27px) Arial, Helvetica, sans-serif; color: #222; }
html.theme-veryog .kf-retro .d { display: none; }
html.theme-veryog .game-tile > .emoji, html.theme-veryog .game-tile > h2 { position: static; }
html.theme-veryog .game-tile:not(.tile-img) { flex-direction: column; gap: 16px; text-align: center; }
html.theme-veryog .game-tile:not(.tile-img) p { display: none; }
@media (max-width: 1000px) { html.theme-veryog main.games { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) { html.theme-veryog main.games { grid-template-columns: 1fr !important; } html.theme-veryog .game-tile { min-height: 180px; } }

html.theme-og .game-tile[href*="workfor."], html.theme-veryog .game-tile[href*="workfor."] { display: none !important; }
html.theme-veryog .kf-retro .emoji { position: static !important; }

/* =================================================================================================
   UNDERWATER: deep blue sea, light rays, seaweed, fish, bubbles and floating tiles
   ================================================================================================= */
#kfSettings .sw.underwater { background: linear-gradient(#5fd0f0, #0b4f86 70%, #08345c); }
#kfSettings .sw.underwater::before { content: "🐠  🫧"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; }
html.theme-underwater body { background: linear-gradient(180deg, #5fd0f0 0%, #1a86c4 22%, #0b4f86 55%, #062b4d 100%); background-attachment: fixed; color: #eaf8ff; }
html.theme-underwater .wordmark { color: #ffffff; text-shadow: 0 0 18px rgba(160,230,255,.7), 3px 3px 0 #0b4f86; animation: kfSway 5s ease-in-out infinite alternate; }
html.theme-underwater .subtitle, html.theme-underwater .intro, html.theme-underwater .contact, html.theme-underwater .fine { color: #cdeefe; }
html.theme-underwater .contact a, html.theme-underwater .fine a { color: #fff; }
html.theme-underwater .game-count, html.theme-underwater #kfvBar > * { background: rgba(255,255,255,.85); color: #0b4f86 !important; }
html.theme-underwater .game-tile { border-color: #083a63 !important; box-shadow: 5px 5px 0 #083a63, 0 0 26px rgba(120,220,255,.35) !important; animation: kfBob 4.6s ease-in-out infinite; }
html.theme-underwater .game-tile:nth-child(3n) { animation-delay: -1.5s; } html.theme-underwater .game-tile:nth-child(3n+1) { animation-delay: -3s; }
html.theme-underwater .game-tile:nth-child(4n) { animation-duration: 5.4s; }
html.theme-underwater .game-tile:hover { animation-play-state: paused; }
html.theme-underwater .game-tile img { filter: saturate(.9) hue-rotate(-6deg) brightness(.96); }
@keyframes kfBob { 0%, 100% { transform: translateY(0) rotate(-.4deg); } 50% { transform: translateY(-9px) rotate(.4deg); } }
#kfSea { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#kfSea .rays { position: absolute; left: -20%; right: -20%; top: -10%; height: 90%;
  background: repeating-linear-gradient(100deg, rgba(255,255,255,0) 0 60px, rgba(255,255,255,.10) 60px 90px, rgba(255,255,255,0) 90px 170px);
  -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent); animation: kfRays 14s ease-in-out infinite alternate; }
@keyframes kfRays { to { transform: translateX(6%) skewX(-4deg); } }
#kfSea .weed { position: absolute; bottom: 18px; width: 34px; transform-origin: 50% 100%; animation: kfWeed 3.5s ease-in-out infinite alternate; }
@keyframes kfWeed { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
#kfSea .sand { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: radial-gradient(circle at 20% 0, #e8d29a 0 30px, transparent 31px) 0 0 / 120px 30px, linear-gradient(#d9bd7a, #b89850); }
.kf-fish { position: fixed; z-index: 44; pointer-events: none; animation-timing-function: linear; animation-fill-mode: forwards; line-height: 1; }
@keyframes kfSwimR { from { left: -90px; transform: scaleX(var(--flip)) translateY(0); } 50% { transform: scaleX(var(--flip)) translateY(-18px); } to { left: calc(100vw + 90px); transform: scaleX(var(--flip)) translateY(0); } }
@keyframes kfSwimL { from { left: calc(100vw + 90px); transform: scaleX(var(--flip)) translateY(0); } 50% { transform: scaleX(var(--flip)) translateY(16px); } to { left: -90px; transform: scaleX(var(--flip)) translateY(0); } }
.kf-bubble { position: fixed; z-index: 45; pointer-events: none; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.85) 0 18%, rgba(255,255,255,.08) 40%, rgba(160,230,255,.18) 100%);
  animation: kfRise linear forwards; }
@keyframes kfRise { to { transform: translate(14px, -110vh); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { html.theme-underwater .game-tile, html.theme-underwater .wordmark { animation: none; } }

/* =================================================================================================
   WINDOWS 98: teal desktop, game icons, a Start menu, a taskbar and error boxes
   ================================================================================================= */
#kfSettings .sw.win98 { background: #008080; }
#kfSettings .sw.win98::before { content: "😊Start"; position: absolute; left: 0; right: 0; bottom: 0; height: 15px; background: #c0c0c0; border-top: 1px solid #fff; font: 700 10px Tahoma, Arial, sans-serif; color: #000; padding-left: 3px; line-height: 15px; }
#kfSettings .sw.win98::after { content: ""; position: absolute; left: 10px; top: 7px; width: 18px; height: 14px; background: #fff; box-shadow: 26px 0 0 #fff, 52px 0 0 #fff; opacity: .85; }
html.theme-win98 body { background: #008080; color: #fff; font-family: Tahoma, "MS Sans Serif", Geneva, Verdana, sans-serif; padding-bottom: 70px; }
html.theme-win98 header { width: min(640px, 100%); margin: 0 auto 34px; padding: 34px 16px 18px; background: #c0c0c0; color: #000; transform: none;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff; }
html.theme-win98 header.kf-max { width: 100%; }
html.theme-win98 header.kf-min { display: none; }
html.theme-win98 .kf-tbar { position: absolute; top: 3px; left: 3px; right: 3px; height: 22px; display: flex; align-items: center; justify-content: space-between; padding: 0 3px 0 6px;
  background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font: 700 12px Tahoma, Arial, sans-serif; text-align: left; user-select: none; }
html.theme-win98 .kf-tbar .wb { display: flex; gap: 2px; }
html.theme-win98 .kf-tbar .wb button, html.theme-win98 .kf-taskbar button, html.theme-win98 .kf-dlg .btns button {
  background: #c0c0c0; color: #000; border: 0; border-radius: 0; cursor: pointer; font: 700 11px Tahoma, Arial, sans-serif;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
html.theme-win98 .kf-tbar .wb button { width: 18px; height: 16px; line-height: 12px; padding: 0; }
html.theme-win98 .kf-tbar .wb button:active, html.theme-win98 .kf-taskbar button:active, html.theme-win98 .kf-dlg .btns button:active,
html.theme-win98 .kf-taskbar button.on { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080; }
html.theme-win98 .wordmark { transform: none; color: #000; font-size: clamp(44px, 9vw, 92px); }
html.theme-win98 .subtitle { color: #000; font-family: Tahoma, Arial, sans-serif; }
html.theme-win98 .game-count, html.theme-win98 #kfvBar .kfv-n, html.theme-win98 #kfvBar .kfv-l, html.theme-win98 footer .link-btn {
  background: #c0c0c0 !important; color: #000 !important; border: 0 !important; border-radius: 0 !important; transform: none !important; font-family: Tahoma, Arial, sans-serif !important;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf !important; }
html.theme-win98 .game-count { font-size: 13px; }
html.theme-win98 #kfSettingsBtn { border-radius: 0; background: #c0c0c0; border: 0; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
html.theme-win98 #kfSettingsBtn:hover { transform: none; }
html.theme-win98 #scrambleBtn { display: none !important; }
html.theme-win98 footer, html.theme-win98 .intro, html.theme-win98 .contact, html.theme-win98 .fine, html.theme-win98 .contact a, html.theme-win98 .fine a { color: #fff; }
/* the icons */
html.theme-win98 main.games { grid-template-columns: repeat(auto-fill, 100px) !important; gap: 18px 10px !important; justify-content: center; max-width: 1180px; margin: 0 auto 60px; }
html.theme-win98 main.games > .game-tile { width: 100px !important; max-width: 100px; min-height: 0 !important; height: auto !important; padding: 4px 2px !important; margin: 0 !important;
  background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; overflow: visible !important; transform: none !important;
  display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start; color: #fff !important; cursor: default; animation: none !important; }
html.theme-win98 main.games > .game-tile > :not(.kf-ico) { display: none !important; }
html.theme-win98 main.games > .game-tile:focus-visible { outline: none; }
.kf-ico { display: none; }
html.theme-win98 .kf-ico { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; }
html.theme-win98 .kf-ico .pic { position: relative; width: 64px; height: 48px; background: #fff center / cover no-repeat; border: 1px solid #000; image-rendering: pixelated; }
html.theme-win98 .kf-ico .pic.emo { display: grid; place-items: center; font-size: 34px; background: none; border: 0; }
html.theme-win98 .kf-ico .pic::after { content: "↗"; position: absolute; left: -2px; bottom: -2px; width: 13px; height: 13px; background: #fff; border: 1px solid #000; color: #000; font: 700 10px/12px Arial, sans-serif; text-align: center; }
html.theme-win98 .kf-ico .lbl { font: 11px/1.25 Tahoma, "MS Sans Serif", Arial, sans-serif; color: #fff; text-align: center; padding: 1px 2px; max-width: 98px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
html.theme-win98 .game-tile.kf-sel .pic { filter: sepia(1) hue-rotate(190deg) saturate(4) brightness(.55); }
html.theme-win98 .game-tile.kf-sel .lbl, html.theme-win98 .game-tile:focus-visible .lbl { background: #000080; outline: 1px dotted #ff0; -webkit-line-clamp: 4; }
/* taskbar and Start menu */
.kf-taskbar { position: fixed; left: 0; right: 0; bottom: 0; height: 32px; z-index: 55; display: flex; align-items: center; gap: 4px; padding: 3px 3px 2px;
  background: #c0c0c0; box-shadow: inset 0 1px #dfdfdf, inset 0 2px #fff; font: 11px Tahoma, Arial, sans-serif; color: #000; }
.kf-taskbar button { height: 25px; padding: 0 8px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.kf-taskbar .start { font-size: 12px !important; }
.kf-taskbar .start .logo { font-size: 15px; }
.kf-taskbar .sep { width: 2px; height: 24px; box-shadow: inset 1px 0 #808080, inset -1px 0 #fff; margin: 0 2px; }
.kf-taskbar .task { flex: 0 1 220px; overflow: hidden; text-overflow: ellipsis; justify-content: flex-start; font-weight: 400 !important; }
.kf-taskbar .task.on { background: repeating-conic-gradient(#fff 0 25%, #c0c0c0 0 50%) 0 0 / 2px 2px !important; font-weight: 700 !important; }
.kf-taskbar .tray { margin-left: auto; height: 25px; display: flex; align-items: center; gap: 8px; padding: 0 10px; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }
#kfStart { position: fixed; left: 2px; bottom: 31px; z-index: 58; display: flex; width: 230px; background: #c0c0c0; color: #000; font: 12px Tahoma, Arial, sans-serif;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff; padding: 3px; }
#kfStart[hidden] { display: none; }
#kfStart .side { width: 26px; background: linear-gradient(0deg, #000080, #1084d0); color: #c0c0c0; writing-mode: vertical-rl; transform: rotate(180deg); font: 700 18px Arial, sans-serif; padding: 8px 0; }
#kfStart .side b { color: #fff; }
#kfStart .items { flex: 1; display: flex; flex-direction: column; }
#kfStart .items button { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; background: none; border: 0; text-align: left; font: 12px Tahoma, Arial, sans-serif; color: #000; cursor: pointer; }
#kfStart .items button i { font-style: normal; font-size: 20px; width: 24px; text-align: center; }
#kfStart .items button:hover, #kfStart .items button:focus-visible { background: #000080; color: #fff; outline: none; }
#kfStart hr { border: 0; margin: 3px 2px; height: 2px; box-shadow: inset 0 1px #808080, inset 0 -1px #fff; }
/* error boxes */
.kf-dlg { position: fixed; z-index: 59; width: min(370px, calc(100vw - 16px)); background: #c0c0c0; color: #000; font: 12px Tahoma, Arial, sans-serif; padding: 3px 3px 12px;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff, 4px 4px 0 rgba(0,0,0,.25); }
.kf-dlg .kf-tbar { position: static !important; cursor: move; touch-action: none; }
.kf-dlg .body { display: flex; gap: 14px; align-items: flex-start; padding: 16px 14px 8px; }
.kf-dlg .ic { font-size: 32px; line-height: 1; }
.kf-dlg .msg { line-height: 1.4; }
.kf-dlg .btns { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.kf-dlg .btns button { min-width: 76px; height: 24px; padding: 0 10px; font-weight: 400 !important; }
.kf-dlg .btns button:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.kf-dlg .det { margin: 6px 12px 0; padding: 6px; background: #fff; font: 11px/1.3 "Courier New", monospace; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; white-space: pre-wrap; }
.kf-off { position: fixed; inset: 0; z-index: 70; background: #000; display: grid; place-items: center; text-align: center; cursor: pointer; }
.kf-off p { color: #ff8c00; font: 700 clamp(22px, 4vw, 40px)/1.35 Tahoma, Arial, sans-serif; }
.kf-off small { position: absolute; bottom: 24px; left: 0; right: 0; color: #555; font: 13px Tahoma, Arial, sans-serif; }
.kf-off.boot { background: #000; }
.kf-off .b { color: #c0c0c0; font: 18px "Courier New", monospace; }

/* =================================================================================================
   MUSEUM: a gallery wall, gold frames, spotlights, plaques, wall panels and a velvet rope
   ================================================================================================= */
#kfSettings .sw.museum { background: #e9e3d6; }
#kfSettings .sw.museum::before { content: ""; position: absolute; left: 50%; top: 7px; width: 40px; height: 28px; transform: translateX(-50%); background: #6d8fb3;
  border: 5px solid #c9a24a; box-shadow: 0 0 0 1px #7a5a1c, 0 4px 6px rgba(0,0,0,.3); }
html.theme-museum body { background: radial-gradient(ellipse at 50% -10%, #fbf7ee 0, transparent 60%), #e9e3d6; background-attachment: fixed; color: #2b2520; padding-bottom: 90px; }
html.theme-museum .kf-mthe { font: italic 400 clamp(18px, 2.6vw, 26px) Georgia, "Times New Roman", serif; letter-spacing: .3em; text-transform: uppercase; color: #6b5d4c; margin-bottom: 10px; }
.kf-mthe { display: none; }
html.theme-museum .kf-mthe { display: block; }
html.theme-museum .wordmark { transform: none; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: .12em; color: #2b2520; }
html.theme-museum .wordmark .face { filter: sepia(.5) drop-shadow(2px 2px 0 #2b2520); }
html.theme-museum .subtitle { font: italic clamp(15px, 2vw, 19px) Georgia, "Times New Roman", serif; color: #6b5d4c; letter-spacing: .04em; }
html.theme-museum .game-count, html.theme-museum #kfvBar .kfv-n, html.theme-museum #kfvBar .kfv-l {
  background: linear-gradient(#efd98f, #c39b45) !important; color: #2b1d08 !important; border: 1px solid #7a5c1e !important; border-radius: 2px !important;
  box-shadow: 0 2px 3px rgba(0,0,0,.25) !important; transform: none !important; font-family: Georgia, "Times New Roman", serif !important; }
html.theme-museum #scrambleBtn { display: none !important; }
html.theme-museum footer .link-btn { font-family: Georgia, serif; border-radius: 2px; }
/* the paintings */
html.theme-museum main.games { gap: 120px 64px !important; padding-top: 40px; margin-bottom: 120px; }
html.theme-museum main.games > .game-tile { min-height: 250px; border: 16px solid #c9a24a !important; border-radius: 0 !important; background: #f8f4ea !important; overflow: visible !important;
  border-image: linear-gradient(135deg, #6e4f16, #e8c66a 22%, #9a7428 45%, #f3d98a 70%, #7a5a1c) 1 !important;
  box-shadow: 0 22px 30px -8px rgba(40,25,5,.45), 0 0 0 1px #5a4010 !important; color: #2b2520; transform: none; }
html.theme-museum main.games > .game-tile:hover, html.theme-museum main.games > .game-tile:focus-visible { transform: none; box-shadow: 0 30px 40px -8px rgba(40,25,5,.55), 0 0 0 1px #5a4010, 0 0 0 4px #fff6d8 !important; }
html.theme-museum main.games > .game-tile.tile-img img { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); border-radius: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
html.theme-museum main.games > .game-tile::before { content: ""; position: absolute; left: -10%; right: -10%; top: -110px; height: 230px; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 50% 60% at 50% 0, rgba(255,236,190,.75), rgba(255,236,190,0) 75%); }
html.theme-museum main.games > .game-tile::after { content: ""; position: absolute; left: 50%; top: -58px; width: 70px; height: 10px; margin-left: -35px; border-radius: 0 0 8px 8px;
  background: linear-gradient(#3a3a3a, #1a1a1a); box-shadow: 0 -14px 0 -3px #2a2a2a; pointer-events: none; }
.kf-plaque { display: none; }
html.theme-museum .kf-plaque { display: block; position: absolute; top: calc(100% + 30px); left: 50%; transform: translateX(-50%); width: 240px; z-index: 2;
  background: #fbf8f1; border: 1px solid #cfc6b4; box-shadow: 0 2px 4px rgba(0,0,0,.18); padding: 7px 11px 8px; text-align: left;
  font: 12px/1.35 Georgia, "Times New Roman", serif; color: #3b342c; }
html.theme-museum .kf-plaque b { display: block; font-style: italic; font-size: 13px; color: #1d1915; }
html.theme-museum .kf-plaque .by, html.theme-museum .kf-plaque .med { display: block; }
html.theme-museum .kf-plaque .med { color: #7d7265; font-size: 11px; }
html.theme-museum .kf-plaque .note { display: none; margin-top: 6px; padding-top: 6px; border-top: 1px solid #e2dacb; }
html.theme-museum .game-tile:hover .kf-plaque, html.theme-museum .game-tile:focus-visible .kf-plaque { z-index: 6; box-shadow: 0 8px 18px rgba(0,0,0,.25); }
html.theme-museum .game-tile:hover .kf-plaque .note, html.theme-museum .game-tile:focus-visible .kf-plaque .note { display: block; }
/* the wall panels */
.kf-panel { display: none; }
html.theme-museum .kf-panel { display: block; grid-column: 1 / -1; justify-self: center; width: min(860px, 100%); margin: 10px 0 -40px; padding: 30px 40px 26px;
  background: #1e2b3a; color: #f4efe4; text-align: left; box-shadow: 0 14px 26px -10px rgba(0,0,0,.5); font-family: Georgia, "Times New Roman", serif; }
html.theme-museum .kf-panel.g1 { background: #5a1f22; }
html.theme-museum .kf-panel.g2 { background: #203a2c; }
html.theme-museum .kf-panel.entry { background: #f8f4ea; color: #2b2520; border-top: 6px solid #2b2520; border-bottom: 1px solid #cfc6b4; }
html.theme-museum .kf-panel.shop { background: #2b2520; margin: 0; }
html.theme-museum .kf-panel .k { font: 700 12px Georgia, serif; letter-spacing: .32em; text-transform: uppercase; opacity: .75; }
html.theme-museum .kf-panel h3 { font: 400 clamp(26px, 3.6vw, 40px)/1.1 Georgia, "Times New Roman", serif; margin: 8px 0 12px; }
html.theme-museum .kf-panel p { font-size: 17px; line-height: 1.55; max-width: 640px; }
html.theme-museum .kf-panel .f { margin-top: 16px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
html.theme-museum .kf-panel .shopl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
html.theme-museum .kf-panel .shopl a { color: #2b1d08; background: linear-gradient(#efd98f, #c39b45); border: 1px solid #7a5c1e; padding: 8px 14px; text-decoration: none; font: 15px Georgia, serif; }
html.theme-museum .kf-panel .shopl a:hover { filter: brightness(1.08); }
/* floor and velvet rope */
#kfMuseum { position: fixed; left: 0; right: 0; bottom: 0; height: 74px; z-index: 40; pointer-events: none;
}
#kfMuseum::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28px; background: repeating-linear-gradient(90deg, #6e472a 0 118px, #4a2e1a 118px 120px), #5b3a22; }
#kfMuseum svg { position: absolute; left: 0; bottom: 8px; display: block; }
@media (max-width: 600px) { html.theme-museum .kf-panel { padding: 22px 20px; } html.theme-museum main.games { gap: 120px 0 !important; } }
