/* The Summy — Yotsuba B bones, Comic Sans soul, four coats of paint */

/* ---------- themes ---------- */
:root, html[data-theme="burning-eyes"] {
  /* text colour inside form fields. Defaults to the page text colour, but a
     theme with a light input background can override just this one value
     instead of fighting specificity on every individual form rule. */
  --input-text: var(--text);
  --bg: #EEF2FF;
  --cell: #D6DAF0;
  --cell-border: #B7C5D9;
  --link: #34345C;
  --link-hover: #DD0000;
  --title: #AF0A0F;
  --name: #117743;
  --subject: #0F0C5D;
  --quote: #789922;
  --text: #000000;
  --muted: #707070;
  --faint: #8899AA;
  --input-bg: #FFFFFF;
  --input-border: #AAAAAA;
  --btn-top: #f4f6ff;
  --btn-bottom: #c9cfec;
  --btn-border: #ccccdd;
  --th-bg: #9988AA;
  --th-text: #FFFFFF;
  --capcode: #F00000;
  --glow: none;
}

html[data-theme="jay"] {
  --bg: #1D1F21;
  --cell: #282A2E;
  --cell-border: #111214;
  --link: #81A2BE;
  --link-hover: #FF4444;
  --title: #C05555;
  --name: #7FB27F;
  --subject: #9E9ECE;
  --quote: #B5BD68;
  --text: #C5C8C6;
  --muted: #8A8D8A;
  --faint: #5F6360;
  --input-bg: #151617;
  --input-border: #3A3D41;
  --btn-top: #33363B;
  --btn-bottom: #232529;
  --btn-border: #44474D;
  --th-bg: #33363B;
  --th-text: #C5C8C6;
  --capcode: #FF4040;
  --glow: none;
}

html[data-theme="glowie"] {
  --bg: #101210;
  --cell: #182018;
  --cell-border: #0A0D0A;
  --link: #33FF33;
  --link-hover: #AAFFAA;
  --title: #44FF44;
  --name: #77FF77;
  --subject: #55EE55;
  --quote: #99FF66;
  --text: #33EE33;
  --muted: #2AAA2A;
  --faint: #1F7A1F;
  --input-bg: #0B0F0B;
  --input-border: #1F4A1F;
  --btn-top: #1D2A1D;
  --btn-bottom: #131C13;
  --btn-border: #2A552A;
  --th-bg: #163116;
  --th-text: #66FF66;
  --capcode: #FF5555;
  --glow: 0 0 6px rgba(60, 255, 60, .75), 0 0 14px rgba(40, 255, 40, .35);
}
html[data-theme="glowie"] body,
html[data-theme="glowie"] a,
html[data-theme="glowie"] .name,
html[data-theme="glowie"] .subject,
html[data-theme="glowie"] .greentext,
html[data-theme="glowie"] h1, html[data-theme="glowie"] h2, html[data-theme="glowie"] h3 {
  text-shadow: var(--glow);
}

/* Frutiger: web 2.0 gloss + blue-to-white sky, nothing else changes */
html[data-theme="frutiger"] {
  --bg: #D9EFFF;
  --cell: rgba(255, 255, 255, 0.55);
  --cell-border: rgba(255, 255, 255, 0.85);
  --link: #0B5FA5;
  --link-hover: #DD0000;
  --title: #0A6FC2;
  --name: #117743;
  --subject: #0F4C8C;
  --quote: #4E9A06;
  --text: #10365C;
  --muted: #557799;
  --faint: #6E93B5;
  --input-bg: rgba(255, 255, 255, 0.85);
  --input-border: #9FC6E8;
  --btn-top: #FFFFFF;
  --btn-bottom: #A8D4F5;
  --btn-border: #CFE9FF;
  --th-bg: rgba(120, 190, 245, 0.75);
  --th-text: #FFFFFF;
  --capcode: #F00000;
  --glow: none;
}
html[data-theme="frutiger"] body {
  background: linear-gradient(180deg, #6FB9EE 0%, #B7E0FB 40%, #FFFFFF 100%) fixed;
}
html[data-theme="frutiger"] .post.reply,
html[data-theme="frutiger"] .home-box,
html[data-theme="frutiger"] .mod-queue-item {
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.45) 50%, rgba(210,238,255,.55) 51%, rgba(255,255,255,.65));
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(40, 110, 175, .18), inset 0 1px 0 rgba(255,255,255,.95);
}
html[data-theme="frutiger"] .wmm-button {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(205,235,255,.85) 50%, rgba(130,195,245,.85) 51%, rgba(225,245,255,.95));
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(40, 110, 175, .3), inset 0 1px 0 rgba(255,255,255,1);
}
html[data-theme="frutiger"] .post-form input[type="text"],
html[data-theme="frutiger"] .post-form input[type="password"],
html[data-theme="frutiger"] .post-form input[type="number"],
html[data-theme="frutiger"] .post-form textarea,
html[data-theme="frutiger"] #theme-select,
html[data-theme="frutiger"] #font-select {
  border-radius: 8px;
}
html[data-theme="frutiger"] .boardlist {
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(190,225,250,.8));
  border-radius: 0 0 10px 10px;
  box-shadow: 0 2px 10px rgba(40, 110, 175, .2);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  padding: 0 8px 24px;
  background: var(--bg);
  color: var(--text);
  font-family: "Comic Sans MS", "Comic Sans", "Comic Neue", cursive;
  font-size: 13px;
  /* NOTE: no perspective here — it would break position:fixed on the lightbox */
}

a { color: var(--link); text-decoration: underline; }
a:hover { color: var(--link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px dashed var(--title); outline-offset: 2px;
}

hr { border: none; border-top: 1px solid var(--cell-border); clear: both; margin: 10px 0; }

/* ---------- sticky top boardlist ---------- */
.boardlist {
  position: sticky;
  top: 0;
  z-index: 100;
  font-size: 12px;
  color: var(--faint);
  margin: 0 -8px 6px;
  padding: 4px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--cell-border);
  /* flex-wrap: at small widths (or with wide fonts like Courier New) the
     pickers drop onto their own row INSIDE the bar, instead of the old
     floats overlapping the links or bleeding out over the banner. */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
}
.nav-links { flex: 1 1 auto; min-width: 0; }
/* v181: namefag personal emoji + admin queue + shekel grant messages */
.namefag-emoji { height: 1.3em; width: auto; vertical-align: -0.3em; border-radius: 3px; }
.namefag-emoji-preview, .namefag-emoji-queue img { height: 32px; width: auto; vertical-align: middle; margin-right: 6px; border-radius: 4px; }
.shop-nf-emoji { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--cell-border); border-radius: 8px; background: var(--cell); }
.shop-nf-emoji h3 { margin: 0 0 6px; }
.shop-nf-current { margin: 4px 0; }
.ok-msg { color: #2e7d32; font-weight: bold; }
.err-msg { color: #c62828; font-weight: bold; }
/* v180: poll announcements */
.news-poll { margin: 8px 0 2px; display: flex; flex-direction: column; gap: 5px; max-width: 460px; }
.news-poll-opt {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left; cursor: pointer;
  padding: 7px 10px; font: inherit;
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--cell-border); border-radius: 6px;
}
.news-poll-opt:hover { border-color: var(--link); }
.news-poll-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--quote); opacity: .22;
  transition: width .3s ease; z-index: 0;
}
.news-poll-opt.mine { border-color: var(--link); font-weight: bold; }
.news-poll-opt.mine .news-poll-bar { opacity: .34; }
.news-poll-label { position: relative; z-index: 1; flex: 1 1 auto; }
.news-poll-count { position: relative; z-index: 1; color: var(--muted); font-size: 12px; white-space: nowrap; }
.news-poll-total { color: var(--muted); font-size: 12px; }
.news-poll.voting { opacity: .6; pointer-events: none; }
.news-poll-tag { color: var(--capcode); font-weight: bold; font-size: 12px; }
.news-edit { display: inline-block; vertical-align: top; }
.news-edit > summary { cursor: pointer; display: inline; list-style: none; }
.news-edit > summary::-webkit-details-marker { display: none; }
/* v178: admin/janny name badges as images (were ☀️/🔨 emoji) */
.capcode-badge {
  height: 1.25em; width: auto; vertical-align: -0.28em;
  image-rendering: auto;
}
/* =========================================================
   v175: MOBILE-ONLY top bar. On phones the desktop .boardlist is hidden and a
   bigger .mobile-bar takes over: a horizontally-scrollable board strip (with tap
   click-sounds, wired in summy.js) + a gear that opens the settings popup (the
   pickers move OUT of the bar into a modal). Desktop is untouched.
   ========================================================= */
.mobile-bar { display: none; }
@media (max-width: 700px) {
  .boardlist { display: none !important; }
  .mobile-bar {
    display: flex;
    align-items: stretch;
    position: sticky; top: 0; z-index: 120;
    margin: 0 -8px 6px;
    background: var(--bg);
    border-bottom: 2px solid var(--cell-border);
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
  }
  .mobile-boardstrip {
    flex: 1 1 auto; min-width: 0;
    display: flex; gap: 4px;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 6px;
  }
  .mobile-boardstrip::-webkit-scrollbar { display: none; }
  .mobile-board {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 46px; height: 40px; padding: 0 12px;
    font-size: 16px; font-weight: bold; text-decoration: none;
    color: var(--link);
    background: linear-gradient(var(--btn-top), var(--btn-bottom));
    border: 1px solid var(--btn-border); border-radius: 8px;
    white-space: nowrap;
  }
  .mobile-board:active { transform: translateY(1px); filter: brightness(.94); }
  .mobile-settings-btn {
    flex: 0 0 auto;
    width: 52px; border: none; border-left: 1px solid var(--cell-border);
    background: linear-gradient(var(--btn-top), var(--btn-bottom));
    color: var(--link); font-size: 24px; cursor: pointer;
  }
  .mobile-settings-btn:active { filter: brightness(.9); }
}
/* the settings popup (rendered always, shown when toggled; only reachable on
   mobile since the gear that opens it is mobile-only) */
.mobile-settings-modal { position: fixed; inset: 0; z-index: 10000; }
.mobile-settings-modal.hidden { display: none; }
.mobile-settings-bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.mobile-settings-panel {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 480px; box-sizing: border-box;
  background: var(--cell); color: var(--text);
  border: 1px solid var(--cell-border); border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 12px 14px 20px;
  max-height: 80vh; overflow-y: auto;
  animation: mobile-settings-up .22s cubic-bezier(.22,1,.36,1) both;
}
@keyframes mobile-settings-up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.mobile-settings-head { display: flex; align-items: center; justify-content: space-between; font-size: 18px; margin-bottom: 10px; }
.mobile-settings-head button { background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.mobile-settings-body { display: flex; flex-direction: column; gap: 14px; }
/* the pickers, laid out as full-width rows inside the popup */
.mobile-settings-body .theme-picker { display: flex; align-items: center; gap: 8px; white-space: normal; font-size: 15px; }
.mobile-settings-body select { flex: 1 1 auto; max-width: none !important; font-size: 15px !important; padding: 6px; min-height: 38px; }
.mobile-settings-body a { font-size: 16px; }
.mobile-settings-account { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--cell-border); font-size: 15px; color: var(--muted); }
.mobile-settings-account strong { color: var(--name); }
.mobile-settings-account .linklike { font-size: 15px; }
/* v174: collapsible Admin tools in the mod panel */
.admin-tools { border: 1px solid var(--cell-border); border-radius: 5px; margin: 6px 0; background: var(--cell); }
.admin-tools-summary {
  cursor: pointer; list-style: none; user-select: none;
  padding: 8px 12px; font-size: 18px; font-weight: bold;
  color: var(--title);
  display: flex; align-items: center; gap: 8px;
}
.admin-tools-summary::-webkit-details-marker { display: none; }
.admin-tools-caret { font-size: 12px; transition: transform .15s ease; display: inline-block; }
.admin-tools[open] > .admin-tools-summary .admin-tools-caret { transform: rotate(90deg); }
.admin-tools-summary:hover { color: var(--link); }
.admin-tools-body { padding: 0 12px 10px; }
.admin-tools-body > h2.mod-h2:first-child { margin-top: 4px; }
/* v172: /o/ overboard — a small board tag above each aggregated thread */
.overboard-tag {
  display: inline-block;
  font-size: 12px; font-weight: bold;
  color: var(--link);
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 4px;
  padding: 1px 7px;
  margin: 0 0 4px;
}
.overboard-tag::before { content: ""; }
/* v167: homepage sign-in status + sign-out */
/* v234: centred under the home header on the default layout */
.home-signin { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: center; }
.home-signin strong { color: var(--name); }
.inline-form { display: inline; margin: 0; }
.linklike {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  color: var(--link); font: inherit; text-decoration: underline;
}
.linklike:hover { color: var(--link-hover); }
/* v167: vichan-style quote-link hover preview */
.quote-preview {
  position: absolute;
  z-index: 9000;
  max-width: min(680px, 92vw);
  pointer-events: none;
  /* The popup carries its OWN opaque background + border. It used to rely
     entirely on the cloned .post inside it for a surface, but several themes
     make individual posts transparent / semi-transparent (they tint the board
     background instead), so the floating clone had nothing solid behind it and
     the page showed through — the preview looked broken on those themes. A
     solid --cell backing (with --bg fallback) fixes it everywhere. */
  background: var(--bg);
  background: var(--cell);
  border: 1px solid var(--cell-border);
  box-shadow: 0 6px 22px rgba(0,0,0,.4);
  border-radius: 4px;
}
/* make the cloned post transparent so the wrapper's solid background is what
   shows — this keeps a consistent surface across every theme */
.quote-preview .post {
  margin: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
/* the preview fragment comes wrapped in .postcontainer (16px indent + a ">>"
   sidearrow column); strip both so the previewed post doesn't have a big empty
   gap on its left */
.quote-preview .postcontainer { margin: 0 !important; display: block !important; }
.quote-preview .sidearrow { display: none !important; }
/* v230: a previewed post is a static snapshot — never let the scroll-in bubble
   animation (which starts at opacity:0) apply inside the popup, or the preview
   shows up blank. */
.quote-preview .post,
.quote-preview .post.bubble-wait,
.quote-preview .post.bubble-in {
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
}
/* v165: self-edit UI + (edited) marker */
.post-edited { color: var(--muted); font-size: 11px; font-style: italic; }
.edit-link { cursor: pointer; }
.edit-box { margin: 4px 0; }
.edit-box .edit-area {
  width: 100%; box-sizing: border-box; min-height: 70px; resize: vertical;
  font: inherit; padding: 6px 8px;
  background: var(--input-bg); color: var(--input-text);
  border: 1px solid var(--input-border); border-radius: 4px;
}
.edit-box .edit-actions { margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.edit-box .edit-err { color: var(--capcode); font-size: 12px; }
/* v165: top-bar slide transitions. bar-slide-down plays on page load, bar-slide-up
   plays when you click through to another board/page. transform-origin top so it
   tucks up under the viewport edge. */
@keyframes bar-slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes bar-slide-up {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-100%); opacity: 0; }
}
.boardlist.bar-slide-down { animation: bar-slide-down .34s cubic-bezier(.22,1,.36,1) both; }
.boardlist.bar-slide-up { animation: bar-slide-up .32s cubic-bezier(.55,0,.67,.2) both; }
.nav-pickers { /* v219: superseded by .settings-menu below */ }
.boardlist a { text-decoration: none; }
.theme-picker { white-space: nowrap; }
#theme-select, #font-select, #anim-select, .move-select {
  /* v170: DON'T inherit the site font here — a wide font like Verdana made
     these selects blow out and break the nav bar at low resolution. Pin them to
     a compact UI font and cap their width so the bar always fits. */
  font-family: Arial, "Segoe UI", Tahoma, sans-serif !important;
  font-size: 11px;
  max-width: 40vw;
  background: var(--input-bg); color: var(--input-text);
  border: 1px solid var(--input-border);
}
/* keep every picker (all use .theme-picker) tidy and let them wrap as whole
   units instead of overflowing the row */
.nav-pickers { row-gap: 3px; }
.theme-picker { min-width: 0; }
@media (max-width: 700px) {
  #theme-select, #font-select, #anim-select, .move-select { max-width: 46vw; font-size: 10px; }
  .nav-pickers { width: 100%; margin-left: 0; }
}

/* ---------- headers (text animations live here) ---------- */
.board-header h1, .home-header h1 {
  font-size: 28px;
  color: var(--title);
  letter-spacing: -1px;
  text-align: center;
  margin: 12px 0 2px;
}
.board-header .subtitle, .home-header .tagline {
  text-align: center;
  font-size: 13px;
  color: var(--subject);
  margin-bottom: 8px;
}
.home-header .tagline { font-weight: bold; font-size: 15px; }

#site-title {
  font-size: 44px;
  background: linear-gradient(90deg, var(--title) 30%, #ff9a3c 50%, var(--title) 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: title-shine 4s linear infinite;
}
html[data-theme="glowie"] #site-title {
  background: linear-gradient(90deg, var(--title) 30%, #CCFFCC 50%, var(--title) 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="frutiger"] #site-title {
  background: linear-gradient(90deg, var(--title) 30%, #7FDBFF 50%, var(--title) 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes title-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.wmm-title { animation: title-zoom .7s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes title-zoom {
  from { opacity: 0; transform: scale(2.2) rotate(2deg); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* ---------- logo: centered, untouchable, motionless ---------- */
.mascot-frame { text-align: center; margin: 6px auto 10px; }
#mascot {
  /* Framed look: white matte + border behind the logo. The GIF itself is
     transparent, so this matte is what you actually see behind it. */
  display: inline-block;
  /* min() keeps the bigger size from overflowing a narrow phone — there's no
     mobile-specific mascot rule, so this base value is what mobile uses too. */
  max-width: min(310px, 82vw);
  border: 2px solid var(--cell-border);
  background: #fff;
  padding: 4px;
  pointer-events: none;
  user-select: none;
  animation: none;
  transition: none;
}

/* ---------- board slide transitions ---------- */
.thread.slide-in { animation: thread-slide .45s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes thread-slide {
  from { opacity: 0; transform: translateX(120px); }
  to   { opacity: 1; transform: translateX(0); }
}
body.leaving-left {
  animation: page-slide-left .35s cubic-bezier(.65, 0, .35, 1) both;
}
@keyframes page-slide-left {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-10vw); }
}

/* ---------- home layout ---------- */
.home-cols { display: flex; gap: 12px; flex-wrap: wrap; }
.home-box {
  flex: 1 1 300px;
  background: var(--cell);
  border: 1px solid var(--cell-border);
  padding: 8px 12px;
}
.home-box h2 {
  font-size: 14px; color: var(--title); margin: 6px 0 4px;
  border-bottom: 1px solid var(--cell-border); padding-bottom: 2px;
}
.board-list, .recent-list { margin: 4px 0; padding-left: 18px; }
.board-list li, .recent-list li { margin: 3px 0; }
.recent-images { display: flex; gap: 6px; flex-wrap: wrap; }
.post-image.mini { max-width: 72px; max-height: 72px; }

/* ---------- posts ---------- */
.post {
  background: var(--cell);
  border: 1px solid var(--cell-border);
  display: inline-block;
  max-width: 100%;
  padding: 6px 10px 8px;
  margin: 2px 0;
  vertical-align: top;
}
.post.op { background: transparent; border: none; display: block; padding: 0; }
.postcontainer { margin-left: 16px; display: flex; align-items: flex-start; gap: 4px; }
.sidearrow { color: var(--cell-border); font-size: 13px; padding-top: 8px; }

.intro { margin: 2px 0 4px; }
.subject { color: var(--subject); font-weight: bold; }
.name { color: var(--name); font-weight: bold; }
.capcode { color: var(--capcode); font-weight: bold; }
.intro time { color: var(--text); margin: 0 4px; }
.post_no { color: var(--text); text-decoration: none; }
.post_no:hover { color: var(--link-hover); }
.replylink { margin-left: 4px; }

.body { margin: 4px 0; word-wrap: break-word; line-height: 1.35; }
.greentext { color: var(--quote); }
.redquote { color: #d02929; } /* v179: &-prefixed red quote (mirrors greentext/orangetext) */
.quotelink { color: var(--link-hover); }
.omitted { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.empty { color: var(--muted); font-style: italic; }

.fileinfo { font-size: 11px; color: var(--muted); margin: 2px 0; }
.file-link { display: inline-block; float: left; margin: 4px 16px 8px 0; }
.op .file-link img { max-width: 250px; max-height: 250px; }
.reply .file-link img { max-width: 200px; max-height: 200px; }
/* v167: a floated image taller than the post text used to poke out the bottom
   of the cell in some themes (the box didn't grow to contain the float). Clear
   the float inside every post so the cell always wraps its image. */
.post::after { content: ""; display: block; clear: both; }

/* images: hover = dropshadow only; click = 3D lightbox */
.post-image {
  display: block;
  border: none;
  cursor: pointer;
  transition: box-shadow .25s ease;
}
.post-image:hover { box-shadow: -8px 10px 18px rgba(0,0,0,.35); }

.post-media { display: block; max-width: min(480px, 92vw); margin: 4px 0; }
.post-media.audio { width: min(360px, 92vw); }

/* ---------- error banner ---------- */
.err-banner {
  max-width: 560px;
  margin: 6px auto;
  padding: 6px 12px;
  text-align: center;
  font-weight: bold;
  color: var(--capcode);
  background: var(--cell);
  border: 1px dashed var(--capcode);
}

/* ---------- forms ---------- */
.post-form { margin: 0 auto; }
.post-form table { margin: 0 auto; border-collapse: collapse; }
.post-form th {
  background: var(--th-bg);
  color: var(--th-text);
  font-size: 12px;
  text-align: left;
  padding: 3px 8px;
  border: 1px solid var(--cell-border);
}
.post-form td { padding: 2px 4px; }
.post-form input[type="text"], .post-form input[type="password"], .post-form input[type="number"], .post-form textarea {
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--input-text);
  padding: 3px 5px;
  font-family: inherit;
  font-size: 13px;
  width: min(320px, 70vw);
}
.post-form textarea { width: min(420px, 80vw); }
.hint { font-size: 11px; color: var(--muted); }
.sage-label { margin: 0 8px; white-space: nowrap; }

.wmm-button {
  font-family: inherit;
  font-size: 13px;
  padding: 4px 14px;
  border: 1px outset var(--btn-border);
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  color: var(--text);
  cursor: pointer;
}
.wmm-button:active { border-style: inset; }
.wmm-button.deny { color: var(--link-hover); }

.thread-nav { font-size: 12px; margin: 6px 0; }

/* ---------- data tables (bans, stats) ---------- */
.data-table {
  margin: 0 auto;
  border-collapse: collapse;
  min-width: min(560px, 95vw);
}
.data-table th {
  background: var(--th-bg);
  color: var(--th-text);
  font-size: 12px;
  text-align: left;
  padding: 3px 10px;
  border: 1px solid var(--cell-border);
}
.data-table td {
  padding: 3px 10px;
  border: 1px solid var(--cell-border);
  background: var(--cell);
}

/* ---------- ban page ---------- */
.ban-box {
  max-width: 520px;
  margin: 20px auto;
  padding: 14px 20px;
  text-align: center;
  background: var(--cell);
  border: 2px solid var(--capcode);
}

/* ---------- mod panel ---------- */
.mod-h2 { color: var(--title); font-size: 16px; }
.mod-queue-item { display: block; }
.mod-actions { display: flex; gap: 8px; margin-top: 6px; clear: both; }
.inline-mod { display: inline; }
.mod-del {
  background: none; border: none; padding: 0;
  color: var(--link-hover); cursor: pointer;
  font-family: inherit; font-size: 12px; text-decoration: underline;
}
.ban-form { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.ban-form input[type="text"] { width: 180px; }
.ban-form input[type="number"] { width: 120px; }
.ban-form input {
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--input-text);
  padding: 2px 5px;
  font-family: inherit;
  font-size: 12px;
}
.mod-latest .ban-form { margin: 2px 0 6px 18px; }

/* ---------- rules ---------- */
.rules { max-width: 760px; margin: 0 auto; }
.rules h2 { color: var(--title); font-size: 18px; border-bottom: 1px solid var(--cell-border); }
.rules h3 { color: var(--subject); font-size: 14px; margin-bottom: 4px; }
.rules ul, .rules ol { margin-top: 2px; }
.rules li { margin: 3px 0; line-height: 1.4; }

.footer { text-align: center; font-size: 11px; color: var(--faint); margin-top: 24px; }

/* ---------- 3D lightbox — fixed to the viewport, immune to scroll ---------- */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 998;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 40, .82);
  perspective: 1400px;
  cursor: zoom-out;
}
#lightbox.open { display: flex; }
/* v151: high anim — the backdrop DIMS IN (fades from clear to dark) as the
   image flips + zooms to the middle, instead of appearing already-dark. */
#lightbox.open { animation: lb-dim .5s ease both; }
@keyframes lb-dim { from { background: rgba(10,12,40,0); } to { background: rgba(10,12,40,.82); } }
#lightbox-stage { transform-style: preserve-3d; }
#lightbox-stage img {
  max-width: 88vw;
  max-height: 86vh;
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
  /* transparent PNGs/GIFs must stay transparent when zoomed — a white plate
     here painted a box behind every cut-out jak */
  background: transparent;
}
/* high anim: HORIZONTAL flip (rotateY) while zooming up from small to full,
   as it settles into the centre. */
#lightbox.open #lightbox-stage {
  animation: lb-flip-zoom .6s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes lb-flip-zoom {
  0%   { opacity: 0; transform: rotateY(-90deg) scale(.25); }
  55%  { opacity: 1; transform: rotateY(12deg) scale(1.05); }
  100% { opacity: 1; transform: rotateY(0deg) scale(1); }
}
#lightbox.closing { animation: lb-undim .4s ease both; }
@keyframes lb-undim { from { background: rgba(10,12,40,.82); } to { background: rgba(10,12,40,0); } }
#lightbox.closing #lightbox-stage {
  animation: lb-flip-zoom-out .4s cubic-bezier(.65, 0, .35, 1) both;
}
@keyframes lb-flip-zoom-out {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: rotateY(90deg) scale(.25); }
}

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 640px) {
  .postcontainer { margin-left: 4px; }
  .op .file-link img { max-width: 46vw; }
  .home-cols { flex-direction: column; }
  .nav-pickers { margin-left: 0; }
}

/* =========================================================
   v5 ADDITIONS
   ========================================================= */

/* ---------- Fall theme: autumn holiday, aggressively skeuomorphic ---------- */
html[data-theme="fall"] {
  --bg: #F4E4C1;
  --cell: #F7ECD4;
  --cell-border: #C89A5B;
  --link: #7A3B10;
  --link-hover: #C42B0A;
  --title: #B34700;
  --name: #556B2F;
  --subject: #8B4513;
  --quote: #6B8E23;
  --text: #3B2412;
  --muted: #8A6F52;
  --faint: #A98F6E;
  --input-bg: #FFF9EC;
  --input-border: #C89A5B;
  --btn-top: #F5C777;
  --btn-bottom: #C87B2E;
  --btn-border: #A05E1C;
  --th-bg: #8B4513;
  --th-text: #F9EBD0;
  --capcode: #C42B0A;
  --glow: none;
}
/* wooden table surface */
html[data-theme="fall"] body {
  background:
    repeating-linear-gradient(90deg, rgba(90, 50, 15, .06) 0 3px, rgba(0,0,0,0) 3px 26px),
    repeating-linear-gradient(0deg, rgba(120, 70, 25, .05) 0 2px, rgba(0,0,0,0) 2px 60px),
    linear-gradient(180deg, #E8B96E 0%, #D89A4E 35%, #C9853B 100%);
  background-attachment: fixed;
}
/* posts become paper cards laid on the table */
html[data-theme="fall"] .post.reply,
html[data-theme="fall"] .home-box,
html[data-theme="fall"] .mod-queue-item,
html[data-theme="fall"] .ban-box {
  background: linear-gradient(180deg, #FFFBEF 0%, #F7ECD4 80%, #EFDDBB 100%);
  border: 1px solid #C89A5B;
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.85) inset,
    0 -2px 4px rgba(140, 90, 30, .12) inset,
    2px 4px 8px rgba(80, 40, 5, .35);
}
/* carved & varnished buttons */
html[data-theme="fall"] .wmm-button {
  background: linear-gradient(180deg, #F7CE85 0%, #E3A44E 48%, #C87B2E 52%, #B76A22 100%);
  border: 1px solid #8A5217;
  border-radius: 8px;
  color: #3B2005;
  text-shadow: 0 1px 0 rgba(255, 235, 190, .8);
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 -2px 3px rgba(90, 45, 5, .35) inset,
    0 3px 6px rgba(70, 35, 5, .4);
}
html[data-theme="fall"] .wmm-button:active {
  box-shadow: 0 2px 5px rgba(70, 35, 5, .5) inset;
  transform: translateY(1px);
}
/* embossed brass nav plaque */
html[data-theme="fall"] .boardlist {
  background: linear-gradient(180deg, #E9C27C, #CE9A4B);
  border-bottom: 2px solid #8A5217;
  box-shadow: 0 1px 0 rgba(255, 240, 200, .8) inset, 0 3px 8px rgba(70, 35, 5, .3);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .7);
}
html[data-theme="fall"] .post-form input[type="text"],
html[data-theme="fall"] .post-form input[type="password"],
html[data-theme="fall"] .post-form input[type="number"],
html[data-theme="fall"] .post-form textarea,
html[data-theme="fall"] #theme-select,
html[data-theme="fall"] #font-select {
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(120, 70, 20, .3) inset;
}
html[data-theme="fall"] .post-form th,
html[data-theme="fall"] .data-table th {
  text-shadow: 0 -1px 0 rgba(0,0,0,.4);
  border-radius: 3px;
}
html[data-theme="fall"] #site-title {
  background: linear-gradient(90deg, var(--title) 30%, #F2B33D 50%, var(--title) 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html[data-theme="fall"] hr {
  border-top: 2px solid rgba(140, 82, 23, .5);
  border-bottom: 1px solid rgba(255, 235, 190, .6);
}

/* v237: NameFag account settings page */
.acct-box {
  max-width: min(620px, 92vw);
  margin: 14px auto 0;
  padding: 12px 16px;
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 4px;
}
.acct-box h2 { margin: 0 0 6px; font-size: 15px; color: var(--title); }
.acct-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.acct-form input[type="text"], .acct-form input[type="password"] { flex: 1 1 180px; min-width: 0; }
.acct-msg { text-align: center; }

/* v236: ban appeal form / status, shown under the ban notice */
.appeal-box {
  max-width: min(620px, 92vw);
  margin: 14px auto 0;
  padding: 12px 16px;
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 4px;
}
.appeal-box h2 { margin: 0 0 6px; font-size: 15px; color: var(--title); }
.appeal-box textarea { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.appeal-box.appeal-denied { border-color: var(--capcode); }
.appeal-quote {
  margin: 6px 0;
  padding: 6px 10px;
  border-left: 3px solid var(--cell-border);
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.appeal-list li { margin-bottom: 10px; }

/* v235: "(USER WAS BANNED FROM THIS POST)". Borrows the ==redtext== size/weight
   but pins the colour — --capcode is green on a few themes, which would not read
   as a ban notice. */
.ban-mark { margin: 4px 0 2px; }
.ban-mark .redtext { color: #ff0000; text-shadow: 0 0 1px rgba(0,0,0,.55); }

/* ---------- ==redtext== and %%glowtext%% ---------- */
.redtext {
  color: var(--capcode);
  font-size: 1.2em;
  font-weight: bold;
}
.glowtext {
  color: #2ECC40;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(46, 220, 64, .9), 0 0 12px rgba(46, 220, 64, .5);
}

/* ---------- slide-to-post ---------- */
.slide-post { display: inline-block; vertical-align: middle; }
.slide-track {
  position: relative;
  width: min(230px, 60vw);
  height: 34px;
  border-radius: 17px;
  background: linear-gradient(180deg, var(--btn-bottom), var(--btn-top));
  border: 1px solid var(--btn-border);
  box-shadow: 0 3px 6px rgba(0,0,0,.35) inset, 0 1px 0 rgba(255,255,255,.35);
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.slide-fill {
  position: absolute; inset: 0;
  width: 0;
  background: linear-gradient(180deg, rgba(120, 220, 120, .85), rgba(60, 170, 60, .85));
  border-radius: 17px 0 0 17px;
}
.slide-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: var(--text);
  opacity: .75;
  animation: label-shimmer 2.5s linear infinite;
  pointer-events: none;
}
@keyframes label-shimmer { 0%, 100% { opacity: .45; } 50% { opacity: .95; } }
.slide-knob {
  position: absolute;
  top: -1px;
  left: 0;            /* explicit, so the JS resting value matches the initial paint */
  width: 33px; height: 33px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: #333;
  background: linear-gradient(180deg, #FFFFFF, #C9CFDC 55%, #AEB6C8);
  border: 1px solid #8890A5;
  box-shadow: 0 2px 5px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.9) inset;
  cursor: grab;
}
.slide-knob:active { cursor: grabbing; }
.slide-track.armed .slide-fill { width: 100% !important; }
.slide-track.springback .slide-knob { transition: left .3s cubic-bezier(.22, 1, .36, 1); }
.slide-track.springback .slide-fill { transition: width .3s cubic-bezier(.22, 1, .36, 1); }

/* ---------- quote button ---------- */
.quote-full { font-size: 11px; text-decoration: none; }

/* ---------- front page mini media tiles ---------- */
.mini-wrap { display: inline-block; }
.mini-media {
  display: block;
  width: 72px; height: 72px;
  object-fit: cover;
  border: 1px solid var(--cell-border);
  background: #000;
}
.mini-media.audio-tile {
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  color: var(--title);
  background: var(--cell);
}

/* =========================================================
   v6 ADDITIONS
   ========================================================= */

/* Fall background cutoff fix: paint the html element, not the (shorter) body */
html[data-theme="fall"] {
  background:
    repeating-linear-gradient(90deg, rgba(90, 50, 15, .06) 0 3px, rgba(0,0,0,0) 3px 26px),
    repeating-linear-gradient(0deg, rgba(120, 70, 25, .05) 0 2px, rgba(0,0,0,0) 2px 60px),
    linear-gradient(180deg, #E8B96E 0%, #D89A4E 35%, #C9853B 100%);
  background-attachment: fixed;
}
html[data-theme="fall"] body { background: transparent; }
/* same treatment for Frutiger so its sky never cuts off either */
html[data-theme="frutiger"] {
  background: linear-gradient(180deg, #6FB9EE 0%, #B7E0FB 40%, #FFFFFF 100%);
  background-attachment: fixed;
}
html[data-theme="frutiger"] body { background: transparent; }
body { min-height: 100vh; }

/* ---------- rotating board banner ---------- */
.banner-slot { text-align: center; margin: 8px 0 2px; perspective: 800px; }
#board-banner {
  width: 300px; height: 100px;
  object-fit: cover;
  border: 1px solid var(--cell-border);
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,.25);
  transform-origin: center center;
  backface-visibility: hidden;
  transform: translateZ(0); /* own compositor layer so the flip doesn't jitter the border/shadow */
}
/* vertical flip ONLY on click (JS adds .banner-flip and swaps the src at the
   edge-on midpoint). No load/first-appearance animation at all. */
#board-banner.banner-flip {
  animation: banner-vflip .55s ease-in-out both;
  will-change: transform;
}
@keyframes banner-vflip {
  0%   { transform: rotateX(0deg); }
  49.9% { transform: rotateX(90deg); }
  50%  { transform: rotateX(-90deg); }
  100% { transform: rotateX(0deg); }
}

/* ---------- sound toggle ---------- */
#sound-toggle { text-decoration: none; }
#sound-toggle.muted { opacity: .55; text-decoration: line-through; }

/* =========================================================
   v7 ADDITIONS
   ========================================================= */

/* ---------- spoilers ---------- */
.media-wrap { position: relative; display: inline-block; float: left; margin: 4px 16px 8px 0; }
.media-wrap .file-link { float: none; margin: 0; }
.spoiler-cover {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: #000;
  overflow: hidden;
}
.spoiler-cover img { width: 100%; height: 100%; object-fit: cover; }
.spoiler-cover { transition: opacity 1.6s ease; }
.media-wrap.revealed .spoiler-cover { opacity: 0; pointer-events: none; }

/* ---------- pin badge ---------- */
.pin-badge { font-size: 13px; }

/* ---------- file preview + spoiler toggle on the form ---------- */
.file-preview { margin-top: 4px; }
.file-preview { display: flex; gap: 6px; flex-wrap: wrap; }
.file-preview img, .file-preview video {
  max-width: 160px; max-height: 160px;
  border: 1px solid var(--cell-border);
  display: block;
}
.file-preview.spoilered img, .file-preview.spoilered video { filter: blur(10px) brightness(.7); }
.spoiler-toggle { margin-left: 8px; }

/* ---------- rename form ---------- */
.rename-form { margin-left: 8px; }
.rename-form input[type="text"] {
  border: 1px solid var(--input-border); background: var(--input-bg); color: var(--input-text);
  font-family: inherit; font-size: 12px; padding: 1px 4px; width: 130px;
}

/* ---------- v8: thread auto-refresh bar ---------- */
.refresh-bar { margin-left: 10px; color: var(--muted); font-size: 12px; }
#refresh-count { font-weight: bold; color: var(--title); }
#refresh-now { font-size: 12px; }

/* =========================================================
   v9 ADDITIONS
   ========================================================= */

/* ---------- Yotsuba theme: the classic orange/tan 4chan look ---------- */
html[data-theme="yotsuba"] {
  --bg: #FFFFEE;
  --cell: #F0E0D6;
  --cell-border: #D9BFB7;
  --link: #0000EE;
  --link-hover: #DD0000;
  --title: #AF0A0F;
  --name: #117743;
  --subject: #CC1105;
  --quote: #789922;
  --text: #800000;
  --muted: #877;
  --faint: #B86;
  --input-bg: #FFFFFF;
  --input-border: #AAA;
  --btn-top: #FFF6E9;
  --btn-bottom: #EAD6C4;
  --btn-border: #D9BFB7;
  --th-bg: #EA8;
  --th-text: #800000;
  --capcode: #F00000;
  --glow: none;
}
html[data-theme="yotsuba"] body {
  background: #FFE url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="%23ffffee"/><rect width="1" height="1" fill="%23f7f7e0"/></svg>');
}

/* ---------- Winter theme: skeuomorphic frosty glass + snow ---------- */
html[data-theme="winter"] {
  --bg: #E8F2FA;
  --cell: rgba(255, 255, 255, 0.72);
  --cell-border: #B8D4E8;
  --link: #1F6FB2;
  --link-hover: #C0392B;
  --title: #2C6E9E;
  --name: #2E7D5B;
  --subject: #1B5A8A;
  --quote: #5A8F3C;
  --text: #1B3A4B;
  --muted: #6E8CA0;
  --faint: #90AEC4;
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: #A9CCE3;
  --btn-top: #FFFFFF;
  --btn-bottom: #CFE6F5;
  --btn-border: #B8D4E8;
  --th-bg: #7FB2D9;
  --th-text: #FFFFFF;
  --capcode: #C0392B;
  --glow: none;
}
/* frosted winter sky with falling snow layers */
html[data-theme="winter"] {
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.9), transparent),
    radial-gradient(2px 2px at 70% 60%, rgba(255,255,255,.8), transparent),
    radial-gradient(1.5px 1.5px at 45% 80%, rgba(255,255,255,.85), transparent),
    radial-gradient(2px 2px at 85% 20%, rgba(255,255,255,.75), transparent),
    linear-gradient(180deg, #A7CCE5 0%, #CFE6F5 45%, #EAF6FF 100%);
  background-attachment: fixed;
  background-size: 300px 300px, 250px 250px, 200px 200px, 350px 350px, 100% 100%;
  animation: snow-drift 30s linear infinite;
}
@keyframes snow-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 0 300px, 0 250px, 0 200px, 0 350px, 0 0; }
}
html[data-theme="winter"] body { background: transparent; }
/* frosted glass cards */
html[data-theme="winter"] .post.reply,
html[data-theme="winter"] .home-box,
html[data-theme="winter"] .mod-queue-item,
html[data-theme="winter"] .ban-box,
html[data-theme="winter"] .news-item {
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(232,244,252,.6));
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 10px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.95) inset,
    0 6px 16px rgba(70, 120, 160, .22),
    0 0 0 1px rgba(150, 200, 230, .3);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
/* icy 3D buttons */
html[data-theme="winter"] .wmm-button {
  background: linear-gradient(180deg, #FFFFFF 0%, #E4F2FB 48%, #BFE0F3 52%, #DDF0FB 100%);
  border: 1px solid #9FC8E2;
  border-radius: 10px;
  color: #14425F;
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
  box-shadow:
    0 1px 0 rgba(255,255,255,1) inset,
    0 -2px 4px rgba(120, 170, 200, .3) inset,
    0 3px 7px rgba(70, 120, 160, .35);
}
html[data-theme="winter"] .wmm-button:active {
  box-shadow: 0 2px 5px rgba(70, 120, 160, .4) inset;
  transform: translateY(1px);
}
html[data-theme="winter"] .boardlist {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(200,228,244,.85));
  border-bottom: 1px solid #A9CCE3;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 3px 8px rgba(70, 120, 160, .2);
}
html[data-theme="winter"] .post-form input[type="text"],
html[data-theme="winter"] .post-form input[type="password"],
html[data-theme="winter"] .post-form input[type="number"],
html[data-theme="winter"] .post-form textarea,
html[data-theme="winter"] #theme-select,
html[data-theme="winter"] #font-select {
  border-radius: 7px;
  box-shadow: 0 1px 3px rgba(120, 170, 200, .3) inset;
}
html[data-theme="winter"] #site-title {
  background: linear-gradient(90deg, var(--title) 30%, #A0D8F0 50%, var(--title) 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- news tab + home tabs ---------- */
.home-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.home-tab {
  font-family: inherit; font-size: 13px;
  padding: 4px 16px;
  border: 1px solid var(--cell-border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  /* Inactive tabs used opacity:.7, which fades the TEXT toward the button
     background — on the dark themes that left "News" almost unreadable. Dim
     the label with a muted colour instead and leave opacity alone, so the
     text keeps full contrast against the tab. */
  /* Full-strength --text: every theme picks that colour to be readable, so the
     inactive tab is guaranteed legible. The ACTIVE tab is distinguished by
     weight, accent colour and a lifted background instead of by fading the
     inactive one. */
  color: var(--text);
  cursor: pointer;
  opacity: 1;
  transition: color .15s ease, background .15s ease;
}
.home-tab:hover { color: var(--link-hover); }
.home-tab.active {
  font-weight: bold;
  color: var(--title);
  background: linear-gradient(var(--cell), var(--btn-top));
  border-bottom: none;
}
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item {
  background: var(--cell);
  border: 1px solid var(--cell-border);
  padding: 8px 14px;
}
.news-title { color: var(--title); font-size: 16px; margin: 2px 0; }
.news-meta { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.news-body { line-height: 1.4; }

/* ---------- refresh pause link ---------- */
#refresh-pause { font-size: 12px; }

/* ---------- v10: rolls, locks ---------- */
.roll-line {
  color: var(--capcode);
  font-size: 1.2em;
  font-weight: bold;
  margin: 2px 0 4px;
}
.lock-badge { font-size: 13px; }
.locked-note {
  max-width: 460px;
  margin: 8px auto;
  padding: 8px 14px;
  text-align: center;
  font-weight: bold;
  color: var(--capcode);
  background: var(--cell);
  border: 1px dashed var(--capcode);
}

/* ---------- v12: new text colors + spoiler mini ---------- */
.pinkglow {
  color: #FF66CC;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 102, 204, .95), 0 0 12px rgba(255, 102, 204, .55);
}
/* v231: ~~text~~ — glowing yellow with the brimstone icon sitting to its right */
.brimstone {
  color: #FFE14D;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(255, 216, 64, .95), 0 0 12px rgba(255, 196, 0, .6), 0 0 22px rgba(255, 170, 0, .35);
}
.brimstone-icon {
  height: 1.35em; width: auto;
  vertical-align: -0.3em;
  margin-left: 4px;
  filter: drop-shadow(0 0 5px rgba(255, 216, 64, .85));
}
.orangetext {
  color: #FF8C1A;
  font-weight: bold;
}
.graytext {
  color: #9aa0a6;
  font-weight: bold;
}
.mini-spoiler {
  width: 72px; height: 72px;
  object-fit: cover;
  cursor: pointer;
}

/* =========================================================
   v13: Summer theme — Frutiger Aero, sunny summer variant
   ========================================================= */
html[data-theme="summer"] {
  --bg: #CFF3FF;
  --cell: rgba(255, 255, 255, 0.62);
  --cell-border: rgba(255, 255, 255, 0.9);
  --link: #0A86C2;
  --link-hover: #F5591F;
  --title: #0E8C3A;
  --name: #12833E;
  --subject: #0B6FA8;
  --quote: #4E9A06;
  --text: #0E3A3F;
  --muted: #5C8794;
  --faint: #7FB0BE;
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: #9FD8E8;
  --btn-top: #FFFFFF;
  --btn-bottom: #8FD64F;
  --btn-border: #CFF0A8;
  --th-bg: rgba(120, 210, 120, 0.78);
  --th-text: #FFFFFF;
  --capcode: #F00000;
  --glow: none;
}
/* bright summer sky over green — blue up top melting into sunny green grass */
html[data-theme="summer"] {
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 245, 130, 0.95) 0%, rgba(255, 240, 120, 0.5) 6%, transparent 16%),
    linear-gradient(180deg, #38B6F0 0%, #7FD3F5 32%, #CFF3D6 60%, #A7E06A 100%);
  background-attachment: fixed;
}
html[data-theme="summer"] body { background: transparent; }
/* glossy web 2.0 aqua cards */
html[data-theme="summer"] .post.reply,
html[data-theme="summer"] .home-box,
html[data-theme="summer"] .mod-queue-item,
html[data-theme="summer"] .ban-box,
html[data-theme="summer"] .news-item {
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.45) 50%, rgba(200,240,255,.55) 51%, rgba(255,255,255,.7));
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(30, 130, 90, .22), inset 0 1px 0 rgba(255,255,255,.95);
}
/* glossy green gel buttons */
html[data-theme="summer"] .wmm-button {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(180,235,120,.9) 50%, rgba(120,200,60,.92) 51%, rgba(200,240,150,.95));
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 14px;
  color: #16480F;
  text-shadow: 0 1px 0 rgba(255,255,255,.8);
  box-shadow: 0 2px 8px rgba(40, 140, 60, .35), inset 0 1px 0 rgba(255,255,255,1);
}
html[data-theme="summer"] .wmm-button:active { transform: translateY(1px); box-shadow: 0 2px 5px rgba(40,140,60,.4) inset; }
html[data-theme="summer"] .boardlist {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(160,220,240,.85));
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 10px rgba(30, 130, 90, .22);
}
html[data-theme="summer"] .post-form input[type="text"],
html[data-theme="summer"] .post-form input[type="password"],
html[data-theme="summer"] .post-form input[type="number"],
html[data-theme="summer"] .post-form textarea,
html[data-theme="summer"] #theme-select,
html[data-theme="summer"] #font-select {
  border-radius: 9px;
}
html[data-theme="summer"] #site-title {
  background: linear-gradient(90deg, var(--title) 25%, #FFE14D 50%, var(--title) 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* board lock list spacing */
.board-lock-list li { margin: 4px 0; }

/* ---------- v14: board pagination ---------- */
.pager { text-align: center; margin: 12px 0; font-size: 14px; }
.pager a, .pager .pager-cur { margin: 0 3px; text-decoration: none; }
.pager-cur { font-weight: bold; color: var(--title); }

/* =========================================================
   v15 ADDITIONS
   ========================================================= */

/* ---------- front page mascot caption ---------- */
.mascot-caption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin: 4px 0 8px;
}

/* ---------- report link ---------- */
.report-link { font-size: 11px; text-decoration: none; color: var(--capcode); }
.report-link:hover { text-decoration: underline; }
.report-row em { color: var(--capcode); }

/* ---------- admin panel (Anti Raid System) ---------- */
#open-admin-panel { color: var(--capcode); font-weight: bold; text-decoration: none; }
#admin-panel {
  position: fixed;
  top: 60px; right: 20px;
  width: 300px;
  z-index: 100001; /* stays clickable above the movie overlay and the warning */
  background: var(--cell);
  border: 2px solid var(--capcode);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.45);
  font-size: 13px;
  color: var(--text);
}
#admin-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px;
  background: linear-gradient(180deg, var(--capcode), #7d0000);
  color: #fff;
  font-weight: bold;
  letter-spacing: 1px;
  border-radius: 6px 6px 0 0;
  cursor: move;
  user-select: none;
  touch-action: none;
}
#admin-panel-close {
  background: none; border: none;
  color: #fff; font-size: 18px; line-height: 1;
  cursor: pointer; padding: 0 2px;
}
#admin-panel .ap-body {
  padding: 10px 12px;
  /* the panel grew past the viewport on laptops — scroll the body, keep the
     draggable header pinned */
  max-height: min(72vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
#admin-panel .ap-row {
  display: block;
  margin: 0;
  padding: 7px 8px;
  border-radius: 5px;
}
/* toggles read as a list of switches rather than loose checkboxes */
#admin-panel label.ap-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  cursor: pointer;
}
#admin-panel label.ap-row:hover { background: rgba(127, 127, 127, .12); }
#admin-panel label.ap-row input[type="checkbox"] { margin: 2px 0 0; flex: 0 0 auto; }
#admin-panel .ap-row .hint {
  display: block;
  margin-left: 0;
  font-size: 11px;
  line-height: 1.35;
  opacity: .8;
}
#admin-panel label.ap-row > input + .hint { margin-left: 0; }
#admin-panel .ap-row + .ap-row { border-top: 1px solid rgba(127, 127, 127, .18); }
#admin-panel .ap-status {
  text-align: center;
  margin: 8px -12px -10px;
  padding: 6px;
  min-height: 1em;
  font-size: 12px;
  background: rgba(127, 127, 127, .12);
  border-top: 1px solid rgba(127, 127, 127, .2);
  border-radius: 0 0 6px 6px;
}
/* the panic button should not look like the ordinary toggles */
#admin-panel #ar-all-off {
  display: block;
  width: 100%;
  margin: 4px 0 2px;
  font-weight: bold;
}
#admin-panel .ap-flash { padding-top: 9px; }
#admin-panel input[type="text"],
#admin-panel input[type="number"],
#admin-panel input[type="file"],
#admin-panel select {
  max-width: 100%;
  box-sizing: border-box;
}

/* ---------- the big red wavy warning ---------- */
.raid-warning {
  position: fixed; inset: 0;
  z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  pointer-events: none;
  background: rgba(0, 0, 0, .35);
  opacity: 1;
  transition: opacity 2s ease;
}
.raid-warning.fading { opacity: 0; }
.raid-warning-text {
  max-width: 900px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(28px, 6vw, 64px);
  color: #FF1111;
  text-shadow: 0 0 12px rgba(255, 0, 0, .9), 0 0 32px rgba(255, 0, 0, .5), 2px 2px 0 #400;
}
.raid-warning-text span {
  display: inline-block;
  animation: raid-wave 1.1s ease-in-out infinite;
}
@keyframes raid-wave {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-16px) rotate(3deg); }
}

/* ---------- SERIOUS RAID MODE: full rainbow + vigorous shaking + spinning ---------- */
/* Applied to every direct child of body EXCEPT the admin panel and the
   flash-video/lightbox overlays, so the admin's controls stay still and usable.
   Spin + shake are baked into ONE transform keyframe (not the separate `rotate:`
   property), so it works identically in Edge/Chrome/Firefox and in EVERY animation
   setting — including "off". Raid mode intentionally ignores the anim-quality level. */
html.ar-rainbow body > *:not(#admin-panel):not(#flash-video):not(#lightbox) {
  animation: raid-hue 1.2s linear infinite, raid-madness .5s linear infinite !important;
  transform-origin: center center;
}
@keyframes raid-hue {
  from { filter: hue-rotate(0deg) saturate(2.2); }
  to   { filter: hue-rotate(360deg) saturate(2.2); }
}
/* spin (full 360 over the cycle) + shake, combined in a single transform so no
   browser needs the standalone `rotate:` property to make it work */
@keyframes raid-madness {
  0%   { transform: translate(0, 0) rotate(0deg); }
  10%  { transform: translate(-7px, 5px) rotate(36deg); }
  20%  { transform: translate(6px, -6px) rotate(72deg); }
  30%  { transform: translate(-5px, -4px) rotate(108deg); }
  40%  { transform: translate(7px, 6px) rotate(144deg); }
  50%  { transform: translate(-6px, 5px) rotate(180deg); }
  60%  { transform: translate(6px, -5px) rotate(216deg); }
  70%  { transform: translate(-7px, -4px) rotate(252deg); }
  80%  { transform: translate(5px, 6px) rotate(288deg); }
  90%  { transform: translate(-5px, -5px) rotate(324deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}
/* the panel is explicitly frozen: no inherited filter, no transform, always upright */
html.ar-rainbow #admin-panel {
  animation: none !important;
  filter: none !important;
  transform: none !important;
  rotate: 0deg !important;
}
/* even users who asked for reduced motion still get the raid signal, just calmer:
   keep the rainbow, drop the violent spin. (Raid mode is a deliberate admin action.) */
@media (prefers-reduced-motion: reduce) {
  html.ar-rainbow body > *:not(#admin-panel):not(#flash-video):not(#lightbox) {
    animation: raid-hue 1.2s linear infinite !important;
  }
}

/* ---------- scared slider glides when it dodges ---------- */
html.ar-scared .slide-post { transition: transform .18s ease-out; will-change: transform; }
html.ar-scared .slide-knob { cursor: not-allowed; }

/* =========================================================
   v15: Frutiger Jay — Frutiger Aero after dark
   ========================================================= */
html[data-theme="frutiger-jay"] {
  --bg: #0A1826;
  --cell: rgba(18, 42, 66, 0.6);
  --cell-border: rgba(90, 180, 240, 0.4);
  --link: #5FC3F2;
  --link-hover: #7CFFB2;
  --title: #49B8F0;
  --name: #63E0A0;
  --subject: #8FCBEF;
  --quote: #8AD46A;
  --text: #CFE9F8;
  --muted: #7FA6BD;
  --faint: #567A91;
  --input-bg: rgba(8, 24, 40, 0.85);
  --input-border: #2A5F86;
  --btn-top: #1B4A6E;
  --btn-bottom: #0D2A44;
  --btn-border: #3D7FAE;
  --th-bg: rgba(30, 90, 135, 0.85);
  --th-text: #D8F2FF;
  --capcode: #FF5555;
  --glow: none;
}
/* deep aero night sky: aurora glow over dark water */
html[data-theme="frutiger-jay"] {
  background:
    radial-gradient(circle at 75% 12%, rgba(90, 220, 170, 0.22) 0%, transparent 30%),
    radial-gradient(circle at 20% 30%, rgba(70, 160, 240, 0.2) 0%, transparent 35%),
    linear-gradient(180deg, #04101E 0%, #0A2238 45%, #0E3450 75%, #0A4A5E 100%);
  background-attachment: fixed;
}
html[data-theme="frutiger-jay"] body { background: transparent; }
/* dark glossy glass cards, aero highlight kept */
html[data-theme="frutiger-jay"] .post.reply,
html[data-theme="frutiger-jay"] .home-box,
html[data-theme="frutiger-jay"] .mod-queue-item,
html[data-theme="frutiger-jay"] .ban-box,
html[data-theme="frutiger-jay"] .news-item {
  background: linear-gradient(180deg, rgba(70, 140, 200, .28), rgba(20, 55, 90, .34) 50%, rgba(10, 35, 60, .5) 51%, rgba(22, 60, 95, .38));
  border: 1px solid rgba(120, 200, 250, .45);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(180, 235, 255, .35);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
/* glossy aqua gel buttons, night edition */
html[data-theme="frutiger-jay"] .wmm-button {
  background: linear-gradient(180deg, rgba(150, 220, 255, .55), rgba(45, 120, 180, .8) 50%, rgba(15, 70, 120, .9) 51%, rgba(60, 140, 200, .7));
  border: 1px solid rgba(140, 215, 255, .6);
  border-radius: 13px;
  color: #EAF8FF;
  text-shadow: 0 1px 2px rgba(0, 20, 40, .8);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(200, 240, 255, .55);
}
html[data-theme="frutiger-jay"] .wmm-button:active { transform: translateY(1px); box-shadow: 0 2px 6px rgba(0,0,0,.6) inset; }
html[data-theme="frutiger-jay"] .boardlist {
  background: linear-gradient(180deg, rgba(35, 85, 130, .92), rgba(10, 35, 60, .92));
  border-bottom: 1px solid rgba(120, 200, 250, .5);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(160, 225, 255, .3);
}
html[data-theme="frutiger-jay"] .post-form input[type="text"],
html[data-theme="frutiger-jay"] .post-form input[type="password"],
html[data-theme="frutiger-jay"] .post-form input[type="number"],
html[data-theme="frutiger-jay"] .post-form textarea,
html[data-theme="frutiger-jay"] #theme-select,
html[data-theme="frutiger-jay"] #font-select {
  border-radius: 8px;
}
html[data-theme="frutiger-jay"] #site-title {
  background: linear-gradient(90deg, var(--title) 25%, #7CFFC9 50%, var(--title) 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================================
   v15: Metal — skeuomorphic brushed steel
   ========================================================= */
html[data-theme="metal"] {
  --bg: #9CA3AB;
  --cell: #C7CCD2;
  --cell-border: #6E757D;
  --link: #1F4E79;
  --link-hover: #B22222;
  --title: #3A424B;
  --name: #2E6B4F;
  --subject: #23405C;
  --quote: #4E7A2A;
  --text: #1D2126;
  --muted: #5A626B;
  --faint: #7E868F;
  --input-bg: #E9ECEF;
  --input-border: #7E868F;
  --btn-top: #F2F4F6;
  --btn-bottom: #9AA2AB;
  --btn-border: #5F676F;
  --th-bg: #565E67;
  --th-text: #F2F4F6;
  --capcode: #C22B2B;
  --glow: none;
}
/* brushed steel plate */
html[data-theme="metal"] {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, rgba(0,0,0,0) 1px 3px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.04) 0 2px, rgba(0,0,0,0) 2px 7px),
    linear-gradient(180deg, #B9BFC7 0%, #8E959E 40%, #A6ADB6 70%, #7E858E 100%);
  background-attachment: fixed;
}
html[data-theme="metal"] body { background: transparent; }
/* riveted steel panels */
html[data-theme="metal"] .post.reply,
html[data-theme="metal"] .home-box,
html[data-theme="metal"] .mod-queue-item,
html[data-theme="metal"] .ban-box,
html[data-theme="metal"] .news-item {
  background:
    radial-gradient(circle 3px at 8px 8px, #71787f 2px, rgba(0,0,0,0) 3px),
    radial-gradient(circle 3px at calc(100% - 8px) 8px, #71787f 2px, rgba(0,0,0,0) 3px),
    radial-gradient(circle 3px at 8px calc(100% - 8px), #71787f 2px, rgba(0,0,0,0) 3px),
    radial-gradient(circle 3px at calc(100% - 8px) calc(100% - 8px), #71787f 2px, rgba(0,0,0,0) 3px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, rgba(0,0,0,0) 1px 4px),
    linear-gradient(160deg, #DDE1E6 0%, #C2C8CF 45%, #AEB5BD 55%, #CBD0D6 100%);
  border: 1px solid #6E757D;
  border-radius: 6px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.75) inset,
    0 -2px 4px rgba(40, 45, 52, .3) inset,
    0 4px 9px rgba(20, 24, 30, .45);
}
/* machined chrome buttons */
html[data-theme="metal"] .wmm-button {
  background: linear-gradient(180deg, #FAFBFC 0%, #D3D8DD 45%, #A2AAB3 52%, #C6CCD3 100%);
  border: 1px solid #565E67;
  border-radius: 7px;
  color: #22262B;
  text-shadow: 0 1px 0 rgba(255,255,255,.85);
  box-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 -2px 4px rgba(45, 52, 60, .35) inset,
    0 3px 6px rgba(20, 24, 30, .5);
}
html[data-theme="metal"] .wmm-button:active {
  box-shadow: 0 2px 6px rgba(20, 24, 30, .55) inset;
  transform: translateY(1px);
}
/* engraved steel nav rail */
html[data-theme="metal"] .boardlist {
  background: linear-gradient(180deg, #D9DDE2, #A8AFB8 55%, #8F97A0);
  border-bottom: 2px solid #565E67;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 3px 9px rgba(20, 24, 30, .4);
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
html[data-theme="metal"] .post-form input[type="text"],
html[data-theme="metal"] .post-form input[type="password"],
html[data-theme="metal"] .post-form input[type="number"],
html[data-theme="metal"] .post-form textarea,
html[data-theme="metal"] #theme-select,
html[data-theme="metal"] #font-select {
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(40, 45, 52, .4) inset;
}
html[data-theme="metal"] .post-form th,
html[data-theme="metal"] .data-table th {
  text-shadow: 0 -1px 0 rgba(0,0,0,.5);
}
html[data-theme="metal"] #site-title {
  background: linear-gradient(180deg, #F5F7F9 15%, #B9C0C8 48%, #79828B 52%, #D2D7DC 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 1px rgba(20, 24, 30, .5));
}
html[data-theme="metal"] hr {
  border-top: 2px solid rgba(70, 78, 86, .6);
  border-bottom: 1px solid rgba(255, 255, 255, .55);
}

/* =========================================================
   v15: Space — a normal space theme
   ========================================================= */
html[data-theme="space"] {
  --bg: #05060F;
  --cell: #10142A;
  --cell-border: #2A3160;
  --link: #7FA8FF;
  --link-hover: #FFB65C;
  --title: #9D7BFF;
  --name: #6FE0C8;
  --subject: #A8B8FF;
  --quote: #8AD46A;
  --text: #D8DEF5;
  --muted: #7C86B0;
  --faint: #4A5378;
  --input-bg: #0A0D1E;
  --input-border: #333D73;
  --btn-top: #2A3160;
  --btn-bottom: #151A38;
  --btn-border: #414C8C;
  --th-bg: #232A55;
  --th-text: #D8DEF5;
  --capcode: #FF6161;
  --glow: none;
}
/* starfield with a slow drift and a faint nebula */
html[data-theme="space"] {
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.95), transparent),
    radial-gradient(1px 1px at 38% 64%, rgba(255,255,255,.8), transparent),
    radial-gradient(2px 2px at 62% 18%, rgba(200,220,255,.9), transparent),
    radial-gradient(1px 1px at 78% 48%, rgba(255,255,255,.75), transparent),
    radial-gradient(1.5px 1.5px at 88% 82%, rgba(255,240,200,.85), transparent),
    radial-gradient(1px 1px at 24% 88%, rgba(255,255,255,.7), transparent),
    radial-gradient(circle at 70% 25%, rgba(120, 70, 220, .18) 0%, transparent 40%),
    radial-gradient(circle at 25% 75%, rgba(40, 120, 200, .14) 0%, transparent 45%),
    linear-gradient(180deg, #030410 0%, #070A1E 55%, #0A0C22 100%);
  background-attachment: fixed;
  background-size: 260px 260px, 200px 200px, 320px 320px, 240px 240px, 300px 300px, 220px 220px, 100% 100%, 100% 100%, 100% 100%;
  animation: star-drift 90s linear infinite;
}
@keyframes star-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 260px 260px, 200px 200px, 320px 320px, 240px 240px, 300px 300px, 220px 220px, 0 0, 0 0, 0 0; }
}
html[data-theme="space"] body { background: transparent; }
html[data-theme="space"] .post.reply,
html[data-theme="space"] .home-box,
html[data-theme="space"] .mod-queue-item,
html[data-theme="space"] .ban-box,
html[data-theme="space"] .news-item {
  background: linear-gradient(180deg, rgba(24, 30, 62, .92), rgba(13, 17, 38, .94));
  border: 1px solid #2A3160;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(140, 160, 255, .18);
}
html[data-theme="space"] .wmm-button {
  background: linear-gradient(180deg, #3A4380 0%, #232A55 55%, #1A2044 100%);
  border: 1px solid #4A56A0;
  border-radius: 9px;
  color: #E4E9FF;
  text-shadow: 0 1px 2px rgba(0, 0, 10, .8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(160, 180, 255, .35);
}
html[data-theme="space"] .wmm-button:active { transform: translateY(1px); box-shadow: 0 2px 6px rgba(0,0,0,.6) inset; }
html[data-theme="space"] .boardlist {
  background: linear-gradient(180deg, rgba(30, 36, 74, .95), rgba(12, 15, 34, .95));
  border-bottom: 1px solid #333D73;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .55);
}
html[data-theme="space"] .post-form input[type="text"],
html[data-theme="space"] .post-form input[type="password"],
html[data-theme="space"] .post-form input[type="number"],
html[data-theme="space"] .post-form textarea,
html[data-theme="space"] #theme-select,
html[data-theme="space"] #font-select {
  border-radius: 6px;
}
html[data-theme="space"] #site-title {
  background: linear-gradient(90deg, var(--title) 25%, #6FE0C8 50%, var(--title) 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* =========================================================
   v16: download link
   ========================================================= */
.dl-link { font-size: 11px; text-decoration: none; }
.dl-link:hover { text-decoration: underline; }

/* =========================================================
   v17: post form fade-in + bubble-in posts on scroll
   ========================================================= */
/* the posting area eases in to match the rest of the page choreography */
.board-page .post-form,
.thread-page .post-form {
  animation: form-fade-in .6s cubic-bezier(.22, 1, .36, 1) .15s both;
}
@keyframes form-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* posts gently bubble up as they scroll into view */
.post.bubble-wait { opacity: 0; }
.post.bubble-in {
  animation: post-bubble .5s cubic-bezier(.34, 1.45, .5, 1) both;
}
@keyframes post-bubble {
  0%   { opacity: 0; transform: scale(.92) translateY(14px); }
  70%  { opacity: 1; transform: scale(1.015) translateY(-2px); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .post.bubble-wait { opacity: 1; }
}


/* =========================================================
   v19: movie mode — the angry birds intervention
   ========================================================= */
#raid-movie {
  position: fixed; inset: 0;
  z-index: 99990; /* above everything except the warning text and the admin panel */
  background: #000;
  opacity: 0;
  transition: opacity 1.1s ease;
  display: flex; align-items: center; justify-content: center;
}
#raid-movie.showing { opacity: 1; }
#raid-movie video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
#raid-movie .movie-bar {
  position: absolute; top: 0; left: 0; right: 0;
  background: #000;
  color: #fff;
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  padding: 14px 10px;
  letter-spacing: .5px;
  border-bottom: 2px solid #222;
}


/* =========================================================
   v20: banners page + culture page + panel sound row
   ========================================================= */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 banners per row, stacking downward */
  gap: 18px;
  max-width: 720px;
  margin: 14px auto 30px;
}
.banner-cell {
  text-align: center;
  padding: 10px;
  background: var(--cell-bg);
  border: 1px solid var(--cell-border);
}
.banner-cell img {
  width: 100%;
  max-width: 300px;
  height: auto;
  image-rendering: auto;
  border: 1px solid var(--cell-border);
}
@media (max-width: 520px) {
  .banner-grid { grid-template-columns: 1fr; }
}

.culture ul li { margin-bottom: 8px; }

.ap-sound input[type="file"] { max-width: 150px; font-size: 11px; }

/* v21: extra images sit beside the primary one */
.media-wrap.extra .post-image { max-width: 180px; max-height: 180px; }


/* =========================================================
   v22: font picker — Comic Sans stays the default
   ========================================================= */
html[data-font="comic"][data-font] body    { font-family: "Comic Sans MS", "Comic Sans", "Comic Neue", cursive; }
html[data-font="arial"][data-font] body    { font-family: Arial, Helvetica, sans-serif; }
/* Papyrus is only installed on macOS and some Windows builds, so the old
   font-family stack silently fell back to a generic on most browsers. Shipping
   the face ourselves makes it work everywhere. */
@font-face {
  font-family: "Summy Papyrus";
  src: url("assets/fonts/papyrus.woff2") format("woff2"),
       url("assets/fonts/papyrus.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
html[data-font="papyrus"][data-font] body  { font-family: "Summy Papyrus", Papyrus, "Papyrus EF", fantasy; }
html[data-font="times"][data-font] body    { font-family: "Times New Roman", Times, serif; }
html[data-font="courier"][data-font] body  { font-family: "Courier New", Courier, monospace; }
/* Courier New runs ~20% wider than the other fonts; without this the nav bar
   and pickers wrap constantly. Tighter size + spacing keeps it on one row at
   normal desktop widths, and the flex bar handles anything narrower. */
html[data-font="courier"] .boardlist { font-size: 11px; letter-spacing: -0.4px; }
html[data-font="courier"] .boardlist select { font-size: 10px; }
html[data-font="courier"] .wmm-title { letter-spacing: 0; }
html[data-font="verdana"][data-font] body  { font-family: Verdana, Geneva, sans-serif; }
html[data-font="georgia"][data-font] body  { font-family: Georgia, "Times New Roman", serif; }
html[data-font="impact"][data-font] body   { font-family: Impact, "Arial Black", sans-serif; }
html[data-font="trebuchet"][data-font] body{ font-family: "Trebuchet MS", "Lucida Grande", sans-serif; }
/* v152: purchasable per-post fonts. Applied via [data-postfont] on the post
   body (and the composer textarea for live preview). Using a selector that
   targets the element directly beats the reader's `html[data-font=x] body`
   rule (which only matches <body>), so a post's own font is never overridden
   by whatever global font the viewer picked. */
@font-face { font-family: "Summy OldEng"; src: url("assets/fonts/oldenglish.woff2") format("woff2"), url("assets/fonts/oldenglish.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Script"; src: url("assets/fonts/script.woff2") format("woff2"), url("assets/fonts/script.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Bubble"; src: url("assets/fonts/bubble.woff2") format("woff2"), url("assets/fonts/bubble.ttf") format("truetype"); font-display: swap; }
/* v166: purchased per-post fonts MUST beat the reader's global font choice. The
   global font is set as `html[data-font=x] body { font-family }` (specificity
   0,1,1). We match the post body AND everything inside it, with !important and a
   higher-specificity selector, so neither the body rule nor inherited spans win. */
html [data-postfont="wingdings"], html [data-postfont="wingdings"] * { font-family: "Wingdings", "Webdings", fantasy !important; }
html [data-postfont="oldeng"],   html [data-postfont="oldeng"] *   { font-family: "Summy OldEng", "Old English Text MT", "UnifrakturCook", fantasy !important; }
html [data-postfont="script"],   html [data-postfont="script"] *   { font-family: "Summy Script", "Segoe Script", "Brush Script MT", cursive !important; }
html [data-postfont="mono"],     html [data-postfont="mono"] *     { font-family: "Courier New", Courier, monospace !important; }
html [data-postfont="bubble"],   html [data-postfont="bubble"] *   { font-family: "Comic Sans MS", "Comic Neue", "Summy Bubble", cursive !important; }
textarea[data-postfont=""] { font-family: inherit; }
.post-font-select { max-width: 200px; }
/* v152: post-maker selection highlight bubble (green-glow / shake / echo) */
.fx-bubble {
  position: absolute;
  z-index: 1200;
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--cell, #fff);
  border: 1px solid var(--cell-border, #888);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.fx-bubble[hidden] { display: none; }
.fx-bubble::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -5px; transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--cell-border, #888);
}
.fx-btn {
  width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--cell-border, #999);
  border-radius: 5px;
  background: var(--input-bg, #f4f4f4);
  cursor: pointer; overflow: hidden;
}
.fx-btn img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.fx-btn:hover { border-color: var(--link, #06c); transform: scale(1.12); }
html[data-font="system"][data-font] body   { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }


/* v23: janny note on the login page */
.janny-note { max-width: 460px; margin: 14px auto 0; text-align: center; }

/* =========================================================
   v26: per-file spoiler checkboxes in the upload preview
   ========================================================= */
.preview-cell { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.preview-cell.spoilered img, .preview-cell.spoilered video { filter: blur(8px) saturate(.4); }
.per-spoiler { cursor: pointer; user-select: none; }

/* =========================================================
   v29: brainrot mode — 4 videos in the corners, audio on
   ========================================================= */
#brainrot-layer {
  position: fixed; inset: 0;
  z-index: 99980; /* above the page, below the warning (99999) and admin panel (100001) */
  pointer-events: none; /* the site stays usable — this is torment, not a lock */
  opacity: 0;
  transition: opacity .45s ease;
}
#brainrot-layer.showing { opacity: 1; }
.brainrot-vid {
  position: fixed;
  width: 240px;
  max-width: 32vw;
  height: auto;
  border: 2px solid #000;
  box-shadow: 0 0 18px rgba(0, 0, 0, .6);
  background: #000;
}
.brainrot-vid.br-tl { top: 8px; left: 8px; }
.brainrot-vid.br-tr { top: 8px; right: 8px; }
.brainrot-vid.br-bl { bottom: 8px; left: 8px; }
.brainrot-vid.br-br { bottom: 8px; right: 8px; }
@media (max-width: 560px) {
  .brainrot-vid { width: 42vw; }
}

/* v29: reveal-IP button in the mod panel */
.reveal-ip {
  background: #7a1420; color: #fff; border: 1px solid #b5202f;
  font-size: 11px; padding: 1px 6px; cursor: pointer; border-radius: 3px;
}
.reveal-ip:hover { background: #9a1a2a; }
.reveal-ip[disabled] { opacity: .5; cursor: default; }
.revealed-ip { font-family: monospace; font-weight: bold; color: #d33; margin-left: 4px; }

/* v30: trust button + trusted list form */
.trust-ip {
  background: #14532d; color: #fff; border: 1px solid #1f7a44;
  font-size: 11px; padding: 1px 6px; cursor: pointer; border-radius: 3px;
}
.trust-ip:hover { background: #1a6b3a; }
.trust-ip[disabled] { opacity: .6; cursor: default; }
.trust-form { margin-top: 8px; display: block; }
.trust-form input[type="text"] { font-size: 12px; padding: 2px 5px; }

/* =========================================================
   v33: Halloween — skeuomorphic, glowing jack-o'-lantern night
   ========================================================= */
html[data-theme="halloween"] {
  --bg: #170d1f;
  --cell: #241430;
  --cell-border: #ff7518;
  --link: #ff8c1a;
  --link-hover: #b026ff;
  --title: #ff7518;
  --name: #8aff5a;
  --subject: #ff9e3d;
  --quote: #7aff42;
  --text: #ffe7cf;
  --muted: #b98a6f;
  --faint: #7a5a48;
  --input-bg: #2c1a3a;
  --input-border: #ff7518;
  --btn-top: #3a2050;
  --btn-bottom: #1e0f2a;
  --btn-border: #ff7518;
  --th-bg: #3a1d17;
  --th-text: #ff9e3d;
  --capcode: #b026ff;
  --glow: 0 0 6px rgba(255, 117, 24, .8), 0 0 16px rgba(255, 140, 26, .45);
}
/* misty moonlit graveyard sky */
html[data-theme="halloween"] {
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 244, 200, .22) 0 3%, rgba(255, 244, 200, .06) 4%, rgba(0,0,0,0) 12%),
    radial-gradient(ellipse at 50% 120%, rgba(255, 117, 24, .18) 0%, rgba(0,0,0,0) 55%),
    linear-gradient(180deg, #1a0f24 0%, #22102e 45%, #140a1c 100%);
  background-attachment: fixed;
}
html[data-theme="halloween"] body { background: transparent; }
/* carved-pumpkin panels with an inner ember glow */
html[data-theme="halloween"] .post.reply,
html[data-theme="halloween"] .home-box,
html[data-theme="halloween"] .mod-queue-item,
html[data-theme="halloween"] .ban-box,
html[data-theme="halloween"] .news-item {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 117, 24, .16) 0%, rgba(0,0,0,0) 60%),
    linear-gradient(165deg, #2c1a3a 0%, #22132e 55%, #190f22 100%);
  border: 1px solid #52305e;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 117, 24, .18) inset,
    0 0 14px rgba(255, 117, 24, .12) inset,
    0 4px 12px rgba(0, 0, 0, .6);
}
/* glowing ember title */
html[data-theme="halloween"] #site-title,
html[data-theme="halloween"] .wmm-title {
  color: #ff7518;
  text-shadow: 0 0 8px rgba(255, 117, 24, .9), 0 0 22px rgba(255, 140, 26, .55), 0 0 40px rgba(176, 38, 255, .3);
  animation: hw-flicker 3.6s ease-in-out infinite;
}
@keyframes hw-flicker {
  0%, 100% { opacity: 1; text-shadow: 0 0 8px rgba(255,117,24,.9), 0 0 22px rgba(255,140,26,.55); }
  47% { opacity: .92; }
  50% { opacity: .74; text-shadow: 0 0 5px rgba(255,117,24,.6), 0 0 12px rgba(255,140,26,.3); }
  53% { opacity: .95; }
  70% { opacity: .85; }
}
/* board names + quotes glow faintly */
html[data-theme="halloween"] .board-link { text-shadow: 0 0 6px rgba(255, 140, 26, .5); }
html[data-theme="halloween"] .greentext { text-shadow: 0 0 6px rgba(122, 255, 66, .55); }
html[data-theme="halloween"] .orangetext { text-shadow: var(--glow); }
html[data-theme="halloween"] .name { text-shadow: 0 0 6px rgba(138, 255, 90, .5); }
html[data-theme="halloween"] .capcode { text-shadow: 0 0 7px rgba(176, 38, 255, .7); }
/* pressed-iron nav bar */
html[data-theme="halloween"] .boardlist {
  background: linear-gradient(180deg, #2a1738 0%, #1c1026 100%);
  border-bottom: 2px solid #ff7518;
  box-shadow: 0 0 10px rgba(255, 117, 24, .25), 0 2px 8px rgba(0,0,0,.6);
}
/* carved-glow buttons */
html[data-theme="halloween"] .wmm-button {
  background: linear-gradient(180deg, #3a2050 0%, #2a1638 55%, #1e0f2a 100%);
  border: 1px solid #ff7518;
  border-radius: 7px;
  color: #ffb066;
  text-shadow: 0 0 6px rgba(255, 117, 24, .7);
  box-shadow: 0 0 8px rgba(255, 117, 24, .25), 0 0 10px rgba(255,117,24,.15) inset, 0 3px 7px rgba(0,0,0,.55);
}
html[data-theme="halloween"] .wmm-button:hover {
  box-shadow: 0 0 14px rgba(255, 117, 24, .5), 0 0 12px rgba(255,117,24,.25) inset, 0 3px 7px rgba(0,0,0,.55);
}
html[data-theme="halloween"] .wmm-button:active { transform: translateY(1px); }
html[data-theme="halloween"] hr {
  border-top: 1px solid rgba(255, 117, 24, .45);
  border-bottom: 1px solid rgba(176, 38, 255, .2);
  box-shadow: 0 0 8px rgba(255, 117, 24, .3);
}
html[data-theme="halloween"] a { transition: text-shadow .15s; }
html[data-theme="halloween"] a:hover { text-shadow: 0 0 8px rgba(176, 38, 255, .8); }

/* =========================================================
   v33: Windows XP — Luna blue, that classic desktop
   ========================================================= */
html[data-theme="winxp"] {
  --bg: #3a6ea5;
  --cell: #ffffff;
  --cell-border: #0054e3;
  --link: #0842a0;
  --link-hover: #d24726;
  --title: #0842a0;
  --name: #217346;
  --subject: #0f0c5d;
  --quote: #3a7d1e;
  --text: #000000;
  --muted: #5a5a5a;
  --faint: #808080;
  --input-bg: #ffffff;
  --input-border: #7f9db9;
  --btn-top: #f5f9ff;
  --btn-bottom: #cfe0f6;
  --btn-border: #003c74;
  --th-bg: #0a246a;
  --th-text: #ffffff;
  --capcode: #d24726;
  --glow: none;
}
/* the Bliss-style desktop: green hill under blue sky */
html[data-theme="winxp"] {
  background:
    linear-gradient(180deg, #5a8fd6 0%, #4a82cf 40%, #7fb04a 60%, #5f9e35 78%, #4e8a2a 100%);
  background-attachment: fixed;
}
html[data-theme="winxp"] body { background: transparent; }
/* window panes with the classic blue title-bar top edge */
html[data-theme="winxp"] .post.reply,
html[data-theme="winxp"] .home-box,
html[data-theme="winxp"] .mod-queue-item,
html[data-theme="winxp"] .ban-box,
html[data-theme="winxp"] .news-item {
  background: #ffffff;
  border: 1px solid #0054e3;
  border-top: 3px solid #0054e3;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 0 0 1px #003c9d, 0 3px 8px rgba(0, 30, 90, .35);
}
/* glossy Luna start-button-style buttons */
html[data-theme="winxp"] .wmm-button {
  background: linear-gradient(180deg, #f6faff 0%, #dcebfb 45%, #b8d6f5 52%, #dcebfb 100%);
  border: 1px solid #003c74;
  border-radius: 4px;
  color: #002b6b;
  font-weight: bold;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 4px rgba(0, 30, 90, .3);
}
html[data-theme="winxp"] .wmm-button:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e6f2ff 45%, #c8e0fa 52%, #e6f2ff 100%);
}
html[data-theme="winxp"] .wmm-button:active { transform: translateY(1px); box-shadow: 0 2px 4px rgba(0, 30, 90, .35) inset; }
/* blue Luna taskbar as the nav rail */
html[data-theme="winxp"] .boardlist {
  background: linear-gradient(180deg, #3f8be8 0%, #2a75da 8%, #1c5fc4 50%, #245fbe 92%, #1a4fa8 100%);
  border-bottom: 2px solid #0a3a86;
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 2px 6px rgba(0, 20, 70, .4);
}
html[data-theme="winxp"] .boardlist a { color: #ffffff; }
html[data-theme="winxp"] .boardlist a:hover { color: #ffe680; }
html[data-theme="winxp"] #theme-select,
html[data-theme="winxp"] #font-select,
html[data-theme="winxp"] .move-select {
  background: #fff; color: #000; border: 1px solid #7f9db9; border-radius: 3px;
}
html[data-theme="winxp"] #site-title {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 30, 90, .8), 0 0 1px #0a3a86;
}
html[data-theme="winxp"] .data-table th,
html[data-theme="winxp"] .post-form th {
  background: linear-gradient(180deg, #0a58c8, #0a246a);
}
html[data-theme="winxp"] hr {
  border-top: 1px solid #0054e3;
  border-bottom: 1px solid rgba(255,255,255,.6);
}

/* v34: move-thread dropdown in mod controls */
.move-form { display: inline-flex; align-items: center; gap: 2px; }
.move-select { max-width: 90px; }

/* =========================================================
   v36: Xbox 360 NXE — green blades, glossy dashboard
   ========================================================= */
html[data-theme="xbox360"] {
  --bg: #0d1a0d;
  --cell: #1a2a1a;
  --cell-border: #6cc24a;
  --link: #8bd450;
  --link-hover: #b6ff5e;
  --title: #9bd83c;
  --name: #6cc24a;
  --subject: #cfeeae;
  --quote: #7ac943;
  --text: #e8f4e0;
  --muted: #93a888;
  --faint: #5e7052;
  --input-bg: #12240f;
  --input-border: #4c7d33;
  --btn-top: #eafbe0;
  --btn-bottom: #a9d98a;
  --btn-border: #4c7d33;
  /* v235: light chrome buttons need dark text; --text here is near-white, which
     made /jan/ "mine" bubbles unreadable (1.05:1). Matches .wmm-button below. */
  --btn-text: #1f3d10;
  --th-bg: #244a18;
  --th-text: #d6f5bd;
  --capcode: #b6ff5e;
  --glow: 0 0 6px rgba(124, 201, 67, .7), 0 0 14px rgba(124, 201, 67, .35);
}
/* the NXE radial dashboard light */
html[data-theme="xbox360"] {
  background:
    radial-gradient(circle at 50% 42%, #3a6a2a 0%, #1f3d16 34%, #12240d 66%, #0a1608 100%);
  background-attachment: fixed;
}
html[data-theme="xbox360"] body { background: transparent; }
/* glossy dashboard tiles */
html[data-theme="xbox360"] .post.reply,
html[data-theme="xbox360"] .home-box,
html[data-theme="xbox360"] .mod-queue-item,
html[data-theme="xbox360"] .ban-box,
html[data-theme="xbox360"] .news-item {
  background:
    linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 46%),
    linear-gradient(180deg, #21331b 0%, #182713 100%);
  border: 1px solid #4c7d33;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(124,201,67,.2) inset, 0 0 12px rgba(124,201,67,.12), 0 3px 8px rgba(0,0,0,.5);
}
/* glossy chrome buttons with a green sheen */
html[data-theme="xbox360"] .wmm-button {
  background: linear-gradient(180deg, #eafbe0 0%, #cdeeb0 48%, #a9d98a 52%, #cdeeb0 100%);
  border: 1px solid #4c7d33;
  border-radius: 20px;
  color: #1f3d10;
  font-weight: bold;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 2px 5px rgba(0,0,0,.4);
}
html[data-theme="xbox360"] .wmm-button:hover { box-shadow: 0 0 10px rgba(124,201,67,.6), 0 1px 0 rgba(255,255,255,.7) inset; }
html[data-theme="xbox360"] .wmm-button:active { transform: translateY(1px); }
/* the signature green orb glow on the title */
html[data-theme="xbox360"] #site-title,
html[data-theme="xbox360"] .wmm-title {
  color: #b6ff5e;
  text-shadow: 0 0 10px rgba(124,201,67,.9), 0 0 26px rgba(124,201,67,.5);
}
html[data-theme="xbox360"] .boardlist {
  background: linear-gradient(180deg, #1c3313 0%, #12240d 100%);
  border-bottom: 2px solid #6cc24a;
  box-shadow: 0 0 12px rgba(124,201,67,.25);
}
html[data-theme="xbox360"] .board-link { text-shadow: 0 0 6px rgba(124,201,67,.5); }
html[data-theme="xbox360"] hr { border-top: 1px solid rgba(124,201,67,.4); border-bottom: 1px solid rgba(0,0,0,.3); }

/* =========================================================
   v36: Wood — skeuomorphic varnished planks
   ========================================================= */
html[data-theme="wood"] {
  --bg: #3a2414;
  --cell: #6b4a2b;
  --cell-border: #3d2712;
  --link: #f0c27b;
  --link-hover: #ffe0a3;
  --title: #ffd98a;
  --name: #b6e08a;
  --subject: #ffe6b0;
  --quote: #a9cf6b;
  --text: #f6e9d2;
  --muted: #c4a883;
  --faint: #94724d;
  --input-bg: #f3e4c8;
  --input-border: #5c3d20;
  --btn-top: #a9764a;
  --btn-bottom: #7a5230;
  --btn-border: #3d2712;
  --th-bg: #4a2f18;
  --th-text: #ffe6b0;
  --capcode: #ffcf6e;
  --glow: none;
}
/* deep wood grain via layered gradients */
html[data-theme="wood"] {
  background:
    repeating-linear-gradient(92deg, rgba(0,0,0,.10) 0 2px, rgba(0,0,0,0) 2px 5px, rgba(255,220,160,.05) 5px 7px),
    linear-gradient(180deg, #4a2f18 0%, #3a2414 50%, #2c1b0e 100%);
  background-attachment: fixed;
}
html[data-theme="wood"] body { background: transparent; }
/* varnished plank panels with a grain sheen */
html[data-theme="wood"] .post.reply,
html[data-theme="wood"] .home-box,
html[data-theme="wood"] .mod-queue-item,
html[data-theme="wood"] .ban-box,
html[data-theme="wood"] .news-item {
  background:
    linear-gradient(180deg, rgba(255,240,200,.10) 0%, rgba(0,0,0,0) 30%),
    repeating-linear-gradient(89deg, rgba(0,0,0,.06) 0 3px, rgba(0,0,0,0) 3px 8px),
    linear-gradient(180deg, #7a5230 0%, #5e3d21 100%);
  border: 1px solid #3d2712;
  border-radius: 5px;
  box-shadow: 0 1px 0 rgba(255,220,160,.2) inset, 0 4px 10px rgba(0,0,0,.5);
}
/* carved, beveled buttons */
html[data-theme="wood"] .wmm-button {
  background: linear-gradient(180deg, #a9764a 0%, #855832 55%, #6b4526 100%);
  border: 1px solid #3d2712;
  border-radius: 5px;
  color: #ffe6b0;
  text-shadow: 0 1px 1px rgba(0,0,0,.6);
  box-shadow: 0 1px 0 rgba(255,220,160,.3) inset, 0 3px 6px rgba(0,0,0,.5);
}
html[data-theme="wood"] .wmm-button:active { transform: translateY(1px); box-shadow: 0 2px 5px rgba(0,0,0,.5) inset; }
html[data-theme="wood"] #site-title,
html[data-theme="wood"] .wmm-title { color: #ffd98a; text-shadow: 0 2px 2px rgba(0,0,0,.6); }
html[data-theme="wood"] .boardlist {
  background: linear-gradient(180deg, #5e3d21 0%, #3a2414 100%);
  border-bottom: 3px solid #2c1b0e;
  box-shadow: 0 1px 0 rgba(255,220,160,.15) inset, 0 2px 6px rgba(0,0,0,.5);
}
html[data-theme="wood"] hr { border-top: 1px solid rgba(0,0,0,.4); border-bottom: 1px solid rgba(255,220,160,.15); }

/* =========================================================
   v36: Marble — skeuomorphic polished stone
   ========================================================= */
html[data-theme="marble"] {
  --bg: #d8d8dc;
  --cell: #f4f4f2;
  --cell-border: #b0b0b8;
  --link: #5a4a7a;
  --link-hover: #8a2f4a;
  --title: #3a3a44;
  --name: #4a6a4a;
  --subject: #3a3a5a;
  --quote: #5f7a3a;
  --text: #22222a;
  --muted: #77777f;
  --faint: #9a9aa2;
  --input-bg: #ffffff;
  --input-border: #b0b0b8;
  --btn-top: #ffffff;
  --btn-bottom: #dcdce2;
  --btn-border: #a8a8b2;
  --th-bg: #55555f;
  --th-text: #f4f4f2;
  --capcode: #8a2f4a;
  --glow: none;
}
/* veined polished marble */
html[data-theme="marble"] {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 40%),
    radial-gradient(ellipse at 80% 90%, rgba(180,180,200,.5) 0%, rgba(255,255,255,0) 45%),
    repeating-linear-gradient(48deg, rgba(150,150,170,.08) 0 1px, rgba(0,0,0,0) 1px 26px),
    repeating-linear-gradient(120deg, rgba(120,120,150,.06) 0 1px, rgba(0,0,0,0) 1px 40px),
    linear-gradient(180deg, #e4e4e8 0%, #cfcfd6 100%);
  background-attachment: fixed;
}
html[data-theme="marble"] body { background: transparent; }
/* raised polished slabs */
html[data-theme="marble"] .post.reply,
html[data-theme="marble"] .home-box,
html[data-theme="marble"] .mod-queue-item,
html[data-theme="marble"] .ban-box,
html[data-theme="marble"] .news-item {
  background:
    linear-gradient(135deg, rgba(255,255,255,.8) 0%, rgba(255,255,255,0) 35%),
    repeating-linear-gradient(58deg, rgba(150,150,170,.05) 0 1px, rgba(0,0,0,0) 1px 30px),
    linear-gradient(180deg, #fbfbfa 0%, #ececf0 100%);
  border: 1px solid #c4c4cc;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 12px rgba(80,80,100,.22);
}
/* glossy stone buttons */
html[data-theme="marble"] .wmm-button {
  background: linear-gradient(180deg, #ffffff 0%, #ececf0 50%, #dcdce2 100%);
  border: 1px solid #a8a8b2;
  border-radius: 5px;
  color: #33333c;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 5px rgba(80,80,100,.25);
}
html[data-theme="marble"] .wmm-button:active { transform: translateY(1px); box-shadow: 0 2px 5px rgba(80,80,100,.3) inset; }
html[data-theme="marble"] #site-title,
html[data-theme="marble"] .wmm-title {
  color: #3a3a44;
  text-shadow: 0 1px 0 #ffffff, 0 2px 3px rgba(120,120,150,.4);
}
html[data-theme="marble"] .boardlist {
  background: linear-gradient(180deg, #f0f0f3 0%, #d8d8de 100%);
  border-bottom: 2px solid #b0b0b8;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 2px 6px rgba(80,80,100,.2);
}
html[data-theme="marble"] .boardlist a { color: #5a4a7a; }
html[data-theme="marble"] hr { border-top: 1px solid #c0c0c8; border-bottom: 1px solid #ffffff; }

/* =========================================================
   v36: Christmas — cozy red & green with a little glow
   ========================================================= */
html[data-theme="christmas"] {
  --bg: #0f2417;
  --cell: #14331f;
  --cell-border: #c0392b;
  --link: #ff6b6b;
  --link-hover: #ffd700;
  --title: #ff4d4d;
  --name: #6ee06e;
  --subject: #ffe08a;
  --quote: #7ad97a;
  --text: #f3ede0;
  --muted: #b8a888;
  --faint: #6f8a6f;
  --input-bg: #10291a;
  --input-border: #2e6b3e;
  --btn-top: #e74c3c;
  --btn-bottom: #a5281b;
  --btn-border: #7a1c12;
  --th-bg: #7a1c12;
  --th-text: #ffe08a;
  --capcode: #ffd700;
  --glow: 0 0 6px rgba(255, 215, 0, .6);
}
/* snowfall dots over a deep pine gradient */
html[data-theme="christmas"] {
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.9) 0 1.4px, rgba(255,255,255,0) 2px),
    radial-gradient(circle at 65% 12%, rgba(255,255,255,.8) 0 1.2px, rgba(255,255,255,0) 2px),
    radial-gradient(circle at 82% 34%, rgba(255,255,255,.85) 0 1.5px, rgba(255,255,255,0) 2px),
    radial-gradient(circle at 38% 46%, rgba(255,255,255,.7) 0 1.1px, rgba(255,255,255,0) 2px),
    radial-gradient(circle at 90% 66%, rgba(255,255,255,.8) 0 1.3px, rgba(255,255,255,0) 2px),
    radial-gradient(circle at 24% 74%, rgba(255,255,255,.75) 0 1.2px, rgba(255,255,255,0) 2px),
    linear-gradient(180deg, #123322 0%, #0d2317 55%, #08170e 100%);
  background-attachment: fixed;
}
html[data-theme="christmas"] body { background: transparent; }
/* gift-box panels with a gold hairline */
html[data-theme="christmas"] .post.reply,
html[data-theme="christmas"] .home-box,
html[data-theme="christmas"] .mod-queue-item,
html[data-theme="christmas"] .ban-box,
html[data-theme="christmas"] .news-item {
  background:
    linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(0,0,0,0) 40%),
    linear-gradient(180deg, #16381f 0%, #10291a 100%);
  border: 1px solid #2e6b3e;
  border-top: 2px solid #c0392b;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(255,215,0,.15) inset, 0 3px 9px rgba(0,0,0,.5);
}
/* candy-red glossy buttons */
html[data-theme="christmas"] .wmm-button {
  background: linear-gradient(180deg, #e74c3c 0%, #c0392b 55%, #a5281b 100%);
  border: 1px solid #7a1c12;
  border-radius: 6px;
  color: #fff6e0;
  text-shadow: 0 1px 1px rgba(0,0,0,.5);
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 2px 5px rgba(0,0,0,.45);
}
html[data-theme="christmas"] .wmm-button:hover { box-shadow: 0 0 10px rgba(255,215,0,.5), 0 1px 0 rgba(255,255,255,.3) inset; }
html[data-theme="christmas"] .wmm-button:active { transform: translateY(1px); }
/* twinkling gold title */
html[data-theme="christmas"] #site-title,
html[data-theme="christmas"] .wmm-title {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255,215,0,.8), 0 0 20px rgba(255,77,77,.4);
  animation: xmas-twinkle 2.8s ease-in-out infinite;
}
@keyframes xmas-twinkle {
  0%, 100% { text-shadow: 0 0 8px rgba(255,215,0,.8), 0 0 20px rgba(255,77,77,.4); }
  50% { text-shadow: 0 0 14px rgba(255,215,0,1), 0 0 30px rgba(110,224,110,.5); }
}
html[data-theme="christmas"] .boardlist {
  background: linear-gradient(180deg, #7a1c12 0%, #5a140c 100%);
  border-bottom: 2px solid #ffd700;
  box-shadow: 0 0 10px rgba(255,215,0,.2);
}
html[data-theme="christmas"] .boardlist a { color: #ffe08a; }
html[data-theme="christmas"] .boardlist a:hover { color: #6ee06e; }
html[data-theme="christmas"] .name { text-shadow: 0 0 6px rgba(110,224,110,.5); }
html[data-theme="christmas"] hr { border-top: 1px solid rgba(255,215,0,.4); border-bottom: 1px solid rgba(192,57,43,.4); }

/* =========================================================
   v48: OCEAN — Frutiger Aqua. Deep aqua water fading to seafoam,
   glassy white cells with the classic mid-gloss highlight split,
   pill buttons, bubble-blue headers. Sister theme to Frutiger
   (Aero) but wetter: teal/cyan instead of sky blue.
   ========================================================= */
html[data-theme="ocean"] {
  --input-text: #04303c;
  --bg: #bfeef2;
  --cell: rgba(255, 255, 255, 0.72);
  --cell-border: rgba(255, 255, 255, 0.9);
  --link: #007d92;
  --link-hover: #00b3c8;
  --title: #00879e;
  --name: #0d9488;
  --subject: #045d70;
  --quote: #3f9b4f;
  --text: #04303c;
  --muted: #3c7d8a;
  --faint: #5a99a6;
  --input-bg: rgba(255, 255, 255, 0.88);
  --input-border: #7fd0dc;
  --btn-top: #ffffff;
  --btn-bottom: #8fdde8;
  --btn-border: #c2eef4;
  --th-bg: rgba(0, 150, 175, 0.8);
  --th-text: #FFFFFF;
  --capcode: #F00000;
  --glow: none;
}
html[data-theme="ocean"] body {
  background: linear-gradient(180deg, #0d7f9e 0%, #29b3c8 30%, #8fe0e8 65%, #eafcf6 100%) fixed;
}
html[data-theme="ocean"] .post.reply,
html[data-theme="ocean"] .home-box,
html[data-theme="ocean"] .mod-queue-item,
html[data-theme="ocean"] .mini-reply {
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.5) 50%, rgba(190,240,245,.55) 51%, rgba(255,255,255,.7));
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 100, 125, .22), inset 0 1px 0 rgba(255,255,255,.95);
}
html[data-theme="ocean"] .post.op {
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(210,245,248,.4));
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 12px;
}
html[data-theme="ocean"] .wmm-button {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(190,240,246,.85) 50%, rgba(70,195,215,.85) 51%, rgba(220,250,252,.95));
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 100, 125, .3), inset 0 1px 0 rgba(255,255,255,1);
}
html[data-theme="ocean"] .post-form input[type="text"],
html[data-theme="ocean"] .post-form input[type="password"],
html[data-theme="ocean"] .post-form input[type="number"],
html[data-theme="ocean"] .post-form textarea,
html[data-theme="ocean"] #theme-select,
html[data-theme="ocean"] #font-select,
html[data-theme="ocean"] #anim-select {
  border-radius: 9px;
}
html[data-theme="ocean"] .boardlist {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(160,230,238,.85));
  border-bottom: 1px solid rgba(255,255,255,.9);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 12px rgba(0, 100, 125, .25);
}
html[data-theme="ocean"] .boardlist a { color: #007d92; }
html[data-theme="ocean"] .boardlist a:hover { color: #00b3c8; }
html[data-theme="ocean"] .wmm-title { text-shadow: 0 2px 8px rgba(255,255,255,.8), 0 0 18px rgba(0,180,205,.45); }
html[data-theme="ocean"] .slide-track {
  background: linear-gradient(180deg, rgba(210,245,250,.9), rgba(150,225,236,.9));
  border-radius: 20px;
}
html[data-theme="ocean"] hr { border-top: 1px solid rgba(255,255,255,.75); }

/* =========================================================
   v36: post links + youtube embeds
   ========================================================= */
.postlink { word-break: break-all; }
.boardref { font-weight: bold; text-decoration: none; }
.boardref:hover { text-decoration: underline; }
.yt-embed {
  position: relative;
  display: inline-block;      /* sits in a row alongside images and other embeds */
  vertical-align: top;
  width: 300px;
  max-width: 90%;
  aspect-ratio: 16 / 9;
  margin: 6px 8px 6px 0;
  border: 1px solid var(--cell-border);
  background: #000;
}
.yt-embed.pending { background: var(--cell); }
.yt-pending {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.yt-pending span { font-size: 26px; opacity: .5; }
.yt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* v37: flash-video overlay — fullscreen YouTube, below the admin panel */
#flash-video {
  position: fixed; inset: 0;
  z-index: 99992; /* above the page, below the admin panel (100001) */
  background: #000;
  opacity: 0;
  transition: opacity .3s ease;
  display: flex; align-items: center; justify-content: center;
}
#flash-video.showing { opacity: 1; }
#flash-video iframe { width: 100%; height: 100%; border: 0; }

/* =========================================================
   v38: grab a zoomed image with RIGHT click and spin it in 3D
   ========================================================= */
/* once the user takes hold, the entrance animation must stop fighting our transform */
#lightbox.open:not(.closing) #lightbox-stage.spinning { animation: none !important; }
#lightbox-stage.spinning { will-change: transform; }
#lightbox-stage.grabbing { cursor: grabbing; }
#lightbox.open #lightbox-stage img {
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
}

/* =========================================================
   v39: {{text}} — white echo, rippling outward on a loop
   ========================================================= */
.echotext {
  /* Was hardcoded #ffffff, which is nearly invisible on the light themes —
     including burning-eyes, the default. Following the theme's own text colour
     keeps it dark on light backgrounds and light on dark ones. */
  color: var(--text);
  font-weight: bold;
  text-shadow: 0 0 5px rgba(127, 127, 127, .35);
}
/* the braces pulse in, then slowly fade away before the loop restarts */
.echo-brace {
  display: inline-block;
  animation: echo-brace-fade 2.6s ease-in-out infinite;
}
@keyframes echo-brace-fade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  65%  { opacity: .15; }
  100% { opacity: 0; }
}
/* the word itself stays solid white; ghost copies ripple out from it */
.echo-word {
  position: relative;
  display: inline-block;
  z-index: 1;
}
.echo-word::before,
.echo-word::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  white-space: pre;
  color: currentColor;
  pointer-events: none;
  z-index: -1;
  animation: echo-ripple 2.6s ease-out infinite;
}
/* the second ghost is half a cycle behind, so the echo never stops rolling */
.echo-word::after { animation-delay: 1.3s; }
@keyframes echo-ripple {
  0%   { opacity: .6; transform: scale(1); filter: blur(0); }
  70%  { opacity: .12; }
  100% { opacity: 0; transform: scale(1.75); filter: blur(1.5px); }
}
@media (prefers-reduced-motion: reduce) {
  .echo-brace { animation: none; opacity: 1; }
  .echo-word::before, .echo-word::after { animation: none; opacity: 0; }
}

/* Wood — the input background is cream, so form text must be black.
   Setting --input-text covers every form rule at once; the element selectors
   below catch anything that sets its own colour (file pickers, native widgets). */
html[data-theme="wood"] { --input-text: #000; }
html[data-theme="wood"] input,
html[data-theme="wood"] textarea,
html[data-theme="wood"] select,
html[data-theme="wood"] option,
html[data-theme="wood"] .post-form input[type="text"],
html[data-theme="wood"] .post-form input[type="password"],
html[data-theme="wood"] .post-form input[type="number"],
html[data-theme="wood"] .post-form textarea,
html[data-theme="wood"] .ban-form input,
html[data-theme="wood"] .rename-form input[type="text"],
html[data-theme="wood"] .trust-form input[type="text"],
html[data-theme="wood"] #theme-select,
html[data-theme="wood"] #font-select,
html[data-theme="wood"] #anim-select,
html[data-theme="wood"] .move-select {
  color: #000;
}
html[data-theme="wood"] input::placeholder,
html[data-theme="wood"] textarea::placeholder { color: #6b4a2b; }

/* =========================================================
   v40: Edge / older-browser fallbacks
   ========================================================= */
/* aspect-ratio is Edge 88+; fall back to the padding-box trick */
@supports not (aspect-ratio: 16 / 9) {
  .yt-embed { height: 0; padding-top: 56.25%; }
}
/* prefixed user-select for older engines */
#lightbox.open #lightbox-stage img,
.per-spoiler { -webkit-user-select: none; -ms-user-select: none; }

/* =========================================================
   v40: animation quality — low / medium / high
   High = everything (the original). Medium = simple 3D only.
   Low  = flat, Flash-style tweens, no 3D and no expensive filters.
   ========================================================= */

/* ---------- MEDIUM: keep 3D, but only the simple kind ---------- */
html[data-anim="medium"] #lightbox { perspective: 900px; }
html[data-anim="medium"] #lightbox.open #lightbox-stage {
  animation: cube-spin-lite .5s ease-out both;
}
@keyframes cube-spin-lite {
  from { opacity: 0; transform: rotateY(35deg) scale(.85); }
  to   { opacity: 1; transform: rotateY(0) scale(1); }
}
/* medium needs its OWN close animation — the default cube-spin-out is the heavy
   3D one and left the image frozen/janky on close in medium. */
html[data-anim="medium"] #lightbox.closing #lightbox-stage {
  animation: cube-spin-lite-out .3s ease-in both;
}
@keyframes cube-spin-lite-out {
  from { opacity: 1; transform: rotateY(0) scale(1); }
  to   { opacity: 0; transform: rotateY(-30deg) scale(.85); }
}
/* drop the costly blur/multi-shadow work */
html[data-anim="medium"] .echo-word::before,
html[data-anim="medium"] .echo-word::after { filter: none !important; }
html[data-anim="medium"] .post.bubble-in { animation-duration: .32s; }
html[data-anim="medium"] #site-title { animation: none; }

/* ---------- LOW: flat 2D only ----------
   (except the image viewer: "animations: on" is this set with the full 3D
   lightbox from High, so no lightbox rules here) */
@keyframes flat-pop {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes flat-pop-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(.9); }
}
/* posts appear with a plain snap-in instead of the 3D-ish bubble */
html[data-anim="low"] .post.bubble-in {
  animation: flat-in .14s linear both;
}
@keyframes flat-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
html[data-anim="low"] .board-page .post-form,
html[data-anim="low"] .thread-page .post-form { animation: flat-in .16s linear both; }
/* no backdrop blur anywhere. The text effects (glow, echo, shake, the
   title animations) stay: "animations: on" keeps every text animation. */
html[data-anim="low"] * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* NOTE: raid mode is deliberately NOT downgraded here — it keeps its full
   rainbow + spin + shake in low AND off, because it's an admin action, not decoration. */
/* the transition-heavy bits become instant */
html[data-anim="low"] .spoiler-cover { transition: opacity .2s linear; }
html[data-anim="low"] #raid-movie,
html[data-anim="low"] #brainrot-layer,
html[data-anim="low"] #flash-video { transition: opacity .15s linear; }

/* =========================================================
   v166: HIGH-anim smoothness pass. Only in the "high" setting, add gentle
   transitions to interactive bits that previously snapped, and give /jan/
   messages a slide-in. Never touches low/medium/off.
   ========================================================= */
html[data-anim="high"] a,
html[data-anim="high"] .wmm-button,
html[data-anim="high"] .board-link,
html[data-anim="high"] .react-add,
html[data-anim="high"] .react-chip,
html[data-anim="high"] .jan-react-chip,
html[data-anim="high"] .edit-link,
html[data-anim="high"] .report-link,
html[data-anim="high"] .quote-full,
html[data-anim="high"] .theme-picker select,
html[data-anim="high"] #theme-select,
html[data-anim="high"] #font-select,
html[data-anim="high"] #anim-select,
html[data-anim="high"] .jan-orb,
html[data-anim="high"] .jan-buddy,
html[data-anim="high"] .post-image,
html[data-anim="high"] input,
html[data-anim="high"] textarea,
html[data-anim="high"] .slide-knob {
  transition: color .18s ease, background-color .2s ease, border-color .2s ease,
    box-shadow .2s ease, transform .18s cubic-bezier(.22,1,.36,1), opacity .2s ease, filter .2s ease;
}
html[data-anim="high"] .wmm-button:hover,
html[data-anim="high"] .react-chip:hover,
html[data-anim="high"] .jan-react-chip:hover { transform: translateY(-1px); }
html[data-anim="high"] .post-image:hover { transform: scale(1.015); }
/* focus rings ease in on inputs */
html[data-anim="high"] input:focus,
html[data-anim="high"] textarea:focus { box-shadow: 0 0 0 2px var(--link, #59f) inset; }
/* /jan/ messages slide + fade in as they arrive (server-render + poller both
   get .jan-in; the poller adds it so new messages animate) */
html[data-anim="high"] .jan-msg { animation: jan-msg-in .28s cubic-bezier(.22,1,.36,1) both; }
html[data-anim="high"] .jan-msg.mine { animation-name: jan-msg-in-right; }
@keyframes jan-msg-in {
  from { opacity: 0; transform: translateX(-10px) translateY(4px); }
  to   { opacity: 1; transform: none; }
}
@keyframes jan-msg-in-right {
  from { opacity: 0; transform: translateX(10px) translateY(4px); }
  to   { opacity: 1; transform: none; }
}
/* the members bar orbs get a soft status-change transition (color already eased
   above); reaction chips pop when added */
html[data-anim="high"] .jan-reacts .jan-react-chip { animation: chip-pop .22s ease-out both; }
html[data-anim="high"] .reacts .react-chip { animation: chip-pop .22s ease-out both; }
@keyframes chip-pop {
  0%   { transform: scale(.6); opacity: 0; }
  70%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
/* smooth section reveals: thread/board bodies + home boxes fade-rise once */
html[data-anim="high"] .home-box { animation: soft-rise .3s ease-out both; }
@keyframes soft-rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* v40: relative time + live indicators */
.rel-time { color: var(--muted); font-size: 11px; }
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3fbf3f;
  vertical-align: middle;
  margin-left: 6px;
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
html[data-anim="low"] .live-dot { animation: none; }
.recent-list li.just-in { animation: just-in-flash 2.2s ease-out both; }
@keyframes just-in-flash {
  0%   { background: rgba(120, 255, 120, .35); }
  100% { background: transparent; }
}
html[data-anim="low"] .recent-list li.just-in { animation: none; }
/* remove-file button on upload previews */
.preview-remove {
  display: block;
  margin: 2px auto 0;
  font-size: 11px; line-height: 1;
  padding: 1px 5px;
  cursor: pointer;
}
.preview-note { width: 100%; }

/* =========================================================
   v41: animation OFF — no animations or transitions at all,
   with ONE exception: SERIOUS RAID MODE still runs fully.
   ========================================================= */
/* NOTE ON SPECIFICITY: :not(#admin-panel) carries ID weight, so this rule
   outranks any plain-class override even with !important. Anything that must
   keep moving with animations off has to be excluded HERE rather than
   re-enabled further down — that's why the echo text and the settings drawer
   are named in the :not() list. */
/* v236: .swing-ink/.swing-drip join the exemption list — DEVIL'S SWING is an
   admin raid action, and killing the drip animation left the ink frozen at the
   top of the layer so nothing ever ran down the screen.
   v235: .pvz-sun/.pvz-shout/.pvz-dim are exempt here for the same reason raid
   mode is — Plant's V.S Spammers is an admin action, not decoration, and the sun
   is CLICKABLE. Killing the animation left it parked at top:-90px off-screen, so
   nobody could farm (and therefore nobody could post) with animations off. This
   has to be excluded in THIS selector: the :not(#admin-panel) gives it ID
   weight, so a later re-enable rule would silently lose the specificity fight. */
html[data-anim="off"] *:not(#admin-panel):not(.echo-brace):not(.echo-word):not(.nav-pickers):not(.shaketext):not(.sk):not(.mx-col):not(.mx-rain):not(.news-toast):not(.nudge-toast):not(.react-toast):not(.spoilertext):not(.post-image):not(.post-media):not(.jan-shaking):not(.pvz-sun):not(.pvz-shout):not(.pvz-dim):not(.swing-ink):not(.swing-drip):not(.goofy-flyer):not(.goofy-tank),
html[data-anim="off"] *:not(#admin-panel):not(.echo-word):not(body)::before,
html[data-anim="off"] *:not(#admin-panel):not(.echo-word)::after {
  animation: none !important;
  transition: none !important;
}
/* re-enable ONLY the raid effects, so "keep raid working in any setting" holds */
html[data-anim="off"].ar-rainbow body > *:not(#admin-panel):not(#flash-video):not(#lightbox) {
  animation: raid-hue 1.2s linear infinite, raid-madness .5s linear infinite !important;
}
/* lightbox still opens/closes, just instantly (JS handles the timing) */
html[data-anim="off"] #lightbox { perspective: none; animation: none !important; background: rgba(10,12,40,.82); }
html[data-anim="off"] #lightbox-stage { transform-style: flat; }
html[data-anim="off"] .post.bubble-wait { opacity: 1; }

/* =========================================================
   v41: live new-replies pill
   ========================================================= */
.new-replies-pill {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 900;
  background: var(--capcode, #cc1105);
  color: #fff;
  font-weight: bold;
  padding: 8px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}
.new-replies-pill:hover { filter: brightness(1.1); }
html[data-anim="off"] .new-replies-pill { box-shadow: 0 2px 6px rgba(0,0,0,.4); }
/* a reply that just arrived live gets a brief highlight */
.post.reply.live-new { animation: reply-arrive 2s ease-out both; }
@keyframes reply-arrive {
  0%   { background: rgba(255, 240, 120, .35); }
  100% { background: transparent; }
}
html[data-anim="off"] .post.reply.live-new,
html[data-anim="low"] .post.reply.live-new { animation: none; }

/* =========================================================
   v44: trusted clover badge + gore flag
   ========================================================= */
.trust-badge { font-size: 12px; filter: drop-shadow(0 0 2px #3fa34d); }
.mod-queue-item.gore-flagged { outline: 2px solid #c62828; box-shadow: 0 0 0 4px rgba(198,40,40,.15); }
.gore-tag { color: #fff; background: #c62828; border-radius: 3px; padding: 0 6px; font-size: 11px; font-weight: bold; }

/* =========================================================
   v44: thread typing indicator
   ========================================================= */
.typing-bar { margin-left: 10px; color: var(--muted); font-size: 12px; }
.typing-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--name); display: inline-block; animation: typing-b 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes typing-b { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
html[data-anim="off"] .typing-dots i { animation: none; opacity: .8; }

/* =========================================================
   v44: movable mini reply maker
   ========================================================= */
.mini-reply {
  position: fixed; top: 70px; right: 16px; z-index: 900;
  width: 300px; max-width: 92vw;
  background: var(--cell); border: 1px solid var(--cell-border);
  border-radius: 10px; box-shadow: 0 8px 26px rgba(0,0,0,.35);
  overflow: hidden;
}
.mini-reply { color: var(--text); }
.mini-reply-head {
  /* --th-bg / --th-text is the one colour pair every theme keeps readable
     (it's what table headers use), unlike button gradients which can be
     light while --th-text is white. */
  background: var(--th-bg);
  color: var(--th-text); font-weight: bold; font-size: 13px;
  padding: 6px 10px; cursor: grab; display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.mini-reply-head button { background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; }
.mini-reply-form { margin: 0; padding: 8px; }
.mini-reply-form textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.mini-file-row { margin: 6px 0; font-size: 11px; }
.mini-slide { width: 100%; max-width: 100%; margin-top: 4px; }
.mini-reply.dragging { opacity: .95; }

/* =========================================================
   v44: admin flash image overlay (fast fade)
   ========================================================= */
/* Admin flash: fills the whole viewport and fades in slowly. Deliberately
   NOT gated on the anim setting — it's an admin broadcast, so turning
   animations off must not let a raider opt out of seeing it. */
#flash-image {
  position: fixed; inset: 0; z-index: 100000;
  background: #000; opacity: 0; transition: opacity 1.6s ease-in; pointer-events: none;
}
#flash-image.showing { opacity: 1; }
#flash-image img {
  width: 100%; height: 100%;
  object-fit: cover;      /* stretch to cover the entire screen */
  display: block;
}

/* ---------- v52: banner management in the mod panel ---------- */
.banner-manage {
  display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0;
}
.banner-manage .banner-cell {
  background: var(--cell); border: 1px solid var(--cell-border);
  border-radius: 8px; padding: 8px; text-align: center; max-width: 320px;
}
.banner-manage .banner-cell img {
  max-width: 300px; max-height: 100px; height: auto; display: block; margin: 0 auto 4px;
  border: 1px solid var(--cell-border);
}
.banner-manage .banner-cell .hint { word-break: break-all; margin-bottom: 6px; }
.banner-manage .banner-cell form { margin: 0; }

/* =========================================================
   v54: home page arrival transition
   Reuses the exact keyframes the board threads use, so arriving on
   the home page feels the same as arriving on a board. One-shot with
   `both` fill: it settles and then NOTHING moves afterwards.
   ========================================================= */
.home-page .home-header,
.home-page .mascot-frame,
.home-page .mascot-caption,
.home-page .home-tabs,
.home-page .home-cols,
.home-page .tab-panel {
  animation: thread-slide .45s cubic-bezier(.22, 1, .36, 1) both;
}
/* The sun rides in with its frame on the page transition; the SVG root itself
   takes no animation, so only the ray corona (.sun-rays) turns afterwards. */
.home-page #mascot { animation: none !important; }
html[data-anim="off"] .home-page .home-header,
html[data-anim="off"] .home-page .mascot-frame,
html[data-anim="off"] .home-page .mascot-caption,
html[data-anim="off"] .home-page .home-tabs,
html[data-anim="off"] .home-page .home-cols,
html[data-anim="off"] .home-page .tab-panel { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .home-page .home-header, .home-page .mascot-frame, .home-page .mascot-caption,
  .home-page .home-tabs, .home-page .home-cols, .home-page .tab-panel { animation: none !important; }
}

/* =========================================================
   v54: owner / moderator badges
   ========================================================= */
.owner-badge, .mod-badge { font-size: 12px; vertical-align: baseline; }
.owner-badge { filter: drop-shadow(0 0 3px rgba(255, 190, 40, .85)); }
.mod-badge   { filter: drop-shadow(0 0 2px rgba(160, 160, 160, .8)); }

/* =========================================================
   v54: trusted IP notes in the mod panel
   ========================================================= */
.trusted-list li { padding: 4px 0; }
.trusted-who { font-weight: bold; }
.trust-note-form { display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; }
.trust-note-form input[type="text"] {
  font-size: 12px; padding: 2px 5px; min-width: 190px;
  background: var(--input-bg); color: var(--input-text); border: 1px solid var(--input-border);
}

/* =========================================================
   v54: Fall theme — readable text effects
   The base ==redtext== and %%glowtext%% are tuned for dark themes:
   pure red and neon green both sit too close to Fall's amber
   background to read cleanly. These give them a darker ink colour
   plus a light halo so they stay legible on the warm gradient
   without losing the "shouting" / "glowing" character.
   ========================================================= */
html[data-theme="fall"] .redtext {
  color: #9B1B0E;
  text-shadow: 0 1px 0 rgba(255, 240, 205, .95), 0 0 3px rgba(255, 240, 205, .8);
}
html[data-theme="fall"] .glowtext {
  color: #1F6B2A;
  text-shadow: 0 1px 0 rgba(255, 245, 215, .95), 0 0 6px rgba(120, 230, 130, .55);
}
html[data-theme="fall"] .quote { text-shadow: 0 1px 0 rgba(255, 240, 205, .7); }
html[data-theme="fall"] .spoiler-text { background: #5A3410; color: #5A3410; }
html[data-theme="fall"] .spoiler-text:hover { color: #FFF3DC; }
/* the shimmering title gradient washes out on the amber plaque — anchor it */
html[data-theme="fall"] #site-title {
  background: linear-gradient(90deg, #7A2E06 30%, #C9761B 50%, #7A2E06 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 240, 205, .8));
}
html[data-theme="fall"] .echotext .echo-word { text-shadow: 0 1px 0 rgba(255, 240, 205, .9); }


/* ---------- v57: typing toast (bottom right of any thread) ---------- */
#typing-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 880;
  background: var(--cell); color: var(--text);
  border: 1px solid var(--cell-border); border-radius: 18px;
  padding: 8px 14px; font-size: 13px;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  display: flex; align-items: center; gap: 8px;
  opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
#typing-toast.showing { opacity: 1; transform: translateY(0); }

/* ---------- v57: tiny colour swatch that matches input height ---------- */
input[type="color"].tiny-color {
  width: 26px; height: 24px; padding: 0; border: 1px solid var(--input-border);
  background: none; cursor: pointer; vertical-align: middle; border-radius: 3px;
}
input[type="color"].tiny-color::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"].tiny-color::-webkit-color-swatch { border: none; border-radius: 2px; }

/* ---------- v57: Xbox theme — slide-to-post label readable ---------- */
html[data-theme="xbox360"] .slide-label,
html[data-theme="xbox360"] .slide-knob { color: #000; text-shadow: none; }

/* ---------- v58: inline trust-from-post control ---------- */
.trustpost-form { display: inline-flex; gap: 3px; align-items: center; }
.trustpost-form input[type="text"] {
  font-size: 11px; padding: 1px 4px; width: 90px;
  background: var(--input-bg); color: var(--input-text); border: 1px solid var(--input-border);
}

/* ---------- v58: admin inline post editor ---------- */
.edit-post { display: inline-block; }
.edit-post > summary { cursor: pointer; list-style: none; display: inline; }
.edit-post > summary::-webkit-details-marker { display: none; }
.edit-post-form {
  display: block; margin: 6px 0; padding: 8px;
  background: var(--cell); border: 1px solid var(--cell-border); border-radius: 8px;
}
.edit-post-form input[type="text"], .edit-post-form textarea {
  display: block; width: 100%; box-sizing: border-box; margin-bottom: 6px;
  background: var(--input-bg); color: var(--input-text); border: 1px solid var(--input-border);
}

/* ---------- v58: media on announcements ---------- */
.news-media { margin: 8px 0; }
.news-media img, .news-media video { max-width: 100%; max-height: 340px; border-radius: 6px; display: block; }
.news-media audio { width: 100%; }

/* ---------- v60: chunked upload progress ---------- */
.chunk-progress { margin-top: 8px; }
.chunk-bar {
  height: 12px; border-radius: 6px; overflow: hidden;
  background: var(--input-bg); border: 1px solid var(--input-border);
}
.chunk-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--name), var(--link-hover));
  transition: width .2s ease;
}
.chunk-status { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- v60: login code step ---------- */
.err-line { color: var(--capcode); font-weight: bold; }

/* ---------- v61: unread news dot ---------- */
.news-dot {
  display: inline-block; width: 8px; height: 8px; margin-left: 6px;
  border-radius: 50%; background: #2ecc40;
  box-shadow: 0 0 5px rgba(46, 204, 64, .9);
  vertical-align: middle;
}

/* ---------- v64: banner upload result message ---------- */
.banner-msg { padding: 6px 10px; border-radius: 6px; font-size: 13px; }
.banner-msg.good { background: rgba(46,204,64,.15); border: 1px solid rgba(46,204,64,.5); }
.banner-msg.bad  { background: rgba(255,133,27,.15); border: 1px solid rgba(255,133,27,.6); }

/* ---------- v66: ^bluetext^ ----------
   Fixed light blue in every theme, the same way .glowtext is always green —
   it's a recognisable marker, not a themeable accent. */
.bluetext {
  color: #6FC3FF !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
/* light themes need a touch more contrast against pale backgrounds */
html[data-theme="frutiger"] .bluetext,
html[data-theme="frutiger-jay"] .bluetext,
html[data-theme="ocean"] .bluetext,
html[data-theme="marble"] .bluetext,
html[data-theme="wood"] .bluetext,
html[data-theme="fall"] .bluetext {
  color: #1E8BD1 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

/* =========================================================
   v66: LAVA — Frutiger Aero, but molten. Same glossy glass
   language as Ocean (bubble highlights, mid-gloss split, pill
   buttons) with magma reds and ember orange instead of aqua.
   ========================================================= */
html[data-theme="lava"] {
  --input-text: #2B0A02;
  --bg: #2A0B05;
  --cell: rgba(58, 16, 8, .82);
  --cell-border: rgba(255, 150, 60, .45);
  --link: #FFB347;
  --link-hover: #FFE08A;
  --title: #FF7518;
  --name: #FFA33C;
  --subject: #FFCE6B;
  --quote: #FF9E4F;
  --text: #FFE6CC;
  --muted: #C98A63;
  --faint: #A96B4A;
  --input-bg: rgba(255, 236, 214, .92);
  --input-border: #FF8C42;
  --btn-top: #FFD9A0;
  --btn-bottom: #E2481A;
  --btn-border: #FFB067;
  --btn-text: #3A0C02;   /* v235: same reason as xbox360 — --text is cream, buttons are pale */
  --th-bg: rgba(190, 45, 10, .9);
  --th-text: #FFFFFF;
  --capcode: #FF3B14;
  --glow: 0 0 10px rgba(255, 110, 20, .55);
}
html[data-theme="lava"] body {
  background:
    radial-gradient(circle at 20% 110%, rgba(255, 120, 20, .55), transparent 55%),
    radial-gradient(circle at 80% 115%, rgba(255, 60, 0, .5), transparent 50%),
    linear-gradient(180deg, #1A0603 0%, #45120A 45%, #8C2508 78%, #FF6A16 100%) fixed;
}
html[data-theme="lava"] .post.reply,
html[data-theme="lava"] .home-box,
html[data-theme="lava"] .mod-queue-item,
html[data-theme="lava"] .mini-reply {
  background: linear-gradient(180deg, rgba(255,190,130,.22), rgba(120,32,10,.55) 50%, rgba(80,20,6,.6) 51%, rgba(140,40,12,.5));
  border: 1px solid rgba(255, 160, 70, .5);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,.5), inset 0 1px 0 rgba(255, 210, 160, .45);
}
html[data-theme="lava"] .post.op {
  background: linear-gradient(180deg, rgba(255,170,90,.16), rgba(90,24,8,.5));
  border: 1px solid rgba(255, 150, 60, .42);
  border-radius: 12px;
}
html[data-theme="lava"] .wmm-button {
  background: linear-gradient(180deg, rgba(255,230,190,.95), rgba(255,160,70,.9) 50%, rgba(214,60,12,.92) 51%, rgba(255,190,120,.95));
  border: 1px solid rgba(255, 200, 150, .9);
  border-radius: 14px;
  color: #3A0C02;
  box-shadow: 0 2px 10px rgba(255, 90, 10, .45), inset 0 1px 0 rgba(255,255,255,.85);
}
html[data-theme="lava"] .boardlist {
  background: linear-gradient(180deg, rgba(70,18,8,.96), rgba(150,42,12,.92));
  border-bottom: 1px solid rgba(255, 150, 60, .5);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 14px rgba(255, 80, 10, .35);
}
html[data-theme="lava"] .wmm-title {
  text-shadow: 0 0 10px rgba(255, 120, 20, .8), 0 2px 4px rgba(0,0,0,.6);
}
html[data-theme="lava"] .post-form input[type="text"],
html[data-theme="lava"] .post-form input[type="password"],
html[data-theme="lava"] .post-form input[type="number"],
html[data-theme="lava"] .post-form textarea,
html[data-theme="lava"] #theme-select,
html[data-theme="lava"] #font-select,
html[data-theme="lava"] #anim-select { border-radius: 9px; }
html[data-theme="lava"] .slide-track {
  background: linear-gradient(180deg, rgba(255,200,150,.9), rgba(230,90,20,.9));
  border-radius: 20px;
}
html[data-theme="lava"] hr { border-top: 1px solid rgba(255, 150, 60, .35); }

/* =========================================================
   v66: SHROOM — flat, dark, plain-bordered forum look in the
   vein of soyjak.forum: muted mushroom browns and dull greens,
   square corners, no gloss, small type.
   ========================================================= */
html[data-theme="shroom"] {
  --input-text: #E8E2D6;
  --bg: #1B1A17;
  --cell: #26241F;
  --cell-border: #3D3A32;
  --link: #A8B884;
  --link-hover: #C9D9A2;
  --title: #B8875A;
  --name: #8FA86A;
  --subject: #C0916A;
  --quote: #7E9A5C;
  --text: #D8D2C6;
  --muted: #8A8377;
  --faint: #6B6459;
  --input-bg: #1E1D19;
  --input-border: #46423A;
  --btn-top: #33302A;
  --btn-bottom: #26241F;
  --btn-border: #4A463D;
  --th-bg: #33302A;
  --th-text: #D8D2C6;
  --capcode: #C1553F;
  --glow: none;
}
html[data-theme="shroom"] body { background: var(--bg); }
html[data-theme="shroom"] .post.reply,
html[data-theme="shroom"] .home-box,
html[data-theme="shroom"] .mod-queue-item,
html[data-theme="shroom"] .mini-reply {
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 0;
  box-shadow: none;
}
html[data-theme="shroom"] .post.op {
  background: transparent;
  border: none;
  border-radius: 0;
}
html[data-theme="shroom"] .wmm-button {
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  border: 1px solid var(--btn-border);
  border-radius: 3px;
  color: var(--text);
  box-shadow: none;
}
html[data-theme="shroom"] .boardlist {
  background: #201E1A;
  border-bottom: 1px solid var(--cell-border);
  border-radius: 0;
  box-shadow: none;
}
html[data-theme="shroom"] .wmm-title { text-shadow: none; letter-spacing: 0; }
html[data-theme="shroom"] .post-form input[type="text"],
html[data-theme="shroom"] .post-form input[type="password"],
html[data-theme="shroom"] .post-form input[type="number"],
html[data-theme="shroom"] .post-form textarea,
html[data-theme="shroom"] #theme-select,
html[data-theme="shroom"] #font-select,
html[data-theme="shroom"] #anim-select { border-radius: 2px; }
html[data-theme="shroom"] .slide-track { border-radius: 3px; }
html[data-theme="shroom"] hr { border-top: 1px solid var(--cell-border); border-bottom: none; }

/* =========================================================
   v70: Fall — quote readability on OP posts
   OP posts have no cell background, so their text sits straight on the
   amber plank gradient (#E8B96E to #C9853B). Olive greentext and the
   bright quote/link colours all wash out against it. These give the
   quote styles a much darker ink plus a warm halo so they read on
   both the plank and the lighter reply cells.
   ========================================================= */
html[data-theme="fall"] .greentext {
  color: #24400C;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 245, 220, .85);
}
html[data-theme="fall"] .bluetext {
  color: #0E4066 !important;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 245, 220, .85) !important;
}
html[data-theme="fall"] .quotelink {
  color: #5E2205;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 245, 220, .7);
}
/* the OP block itself: darker body text and a faint plate so long posts
   don't fight the wood grain */
html[data-theme="fall"] .post.op .body,
html[data-theme="fall"] .post.op .intro { text-shadow: 0 1px 0 rgba(255, 245, 220, .55); }
html[data-theme="fall"] .post.op .body { color: #2A190B; }
/* redtext/glowtext already have Fall overrides, but on the plank they need
   the stronger halo too */
html[data-theme="fall"] .post.op .redtext,
html[data-theme="fall"] .post.op .glowtext {
  text-shadow: 0 1px 0 rgba(255, 245, 220, .95), 0 0 4px rgba(255, 245, 220, .8);
}

/* ---------- v71: Fall — dark orange <othertext ----------
   The default #FF8C1A measures 1.04:1 against Fall's amber plank, i.e.
   invisible on OP posts. This dark burnt orange clears WCAG AA (4.97:1)
   while still reading as orange rather than brown. */
html[data-theme="fall"] .orangetext {
  color: #5E2500;
  text-shadow: 0 1px 0 rgba(255, 245, 220, .85);
}


/* ---------- v72: criminal ban flag in the mod panel ---------- */
.criminal-toggle { font-size: 12px; display: inline-flex; align-items: center; gap: 3px; margin: 0 4px; }
.crim-tag {
  font-size: 10px; font-weight: bold; letter-spacing: .5px;
  background: var(--capcode); color: #fff; padding: 1px 5px; border-radius: 3px;
}
.crim-ip {
  font-family: "Courier New", monospace; font-size: 12px;
  background: var(--input-bg); color: var(--input-text);
  border: 1px solid var(--input-border); border-radius: 3px; padding: 0 4px;
  user-select: all;
}

/* =========================================================
   v73: settings drawer in the nav bar
   The pickers sit collapsed behind a small box on the right. Opening
   slides them leftward into the bar. Uses max-width + transform rather
   than display:none so there's something to animate.
   ========================================================= */
.nav-settings-toggle {
  margin-left: auto;
  flex: 0 0 auto;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  padding: 2px 7px;
  cursor: pointer;
  color: var(--link);
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border: 1px solid var(--btn-border);
  border-radius: 3px;
}
.nav-settings-toggle:hover { color: var(--link-hover); }
.nav-settings-toggle.open { color: var(--link-hover); }

.boardlist .nav-pickers { /* v221: removed — settings is an overlay now */ }
.boardlist .nav-pickers.open { pointer-events: auto; }
/* only the very first paint is instant, so the drawer doesn't slide on load */
.boardlist .nav-pickers.no-anim { transition: none !important; }

/* =========================================================
   v73: animations OFF — thumbnails expand in place instead of
   opening the lightbox (classic imageboard behaviour)
   ========================================================= */
/* Expanded in place: the wrap normally floats left so text sits beside the
   thumbnail. Expanding drops the float so the full image takes its own block
   and pushes everything below it down, which is the classic behaviour. */
.media-wrap.expanded {
  float: none;
  display: block;
  margin: 4px 0 8px;
  max-width: 100%;
}
/* .media-wrap.extra .post-image sets max-width:180px at (0,3,0), so these need
   at least that much weight or extras stay stuck at thumbnail size. */
.media-wrap .post-image.inline-expanded,
.media-wrap.extra .post-image.inline-expanded,
.post-image.inline-expanded {
  max-width: 100%;
  max-height: none;
  width: auto;
  height: auto;
  cursor: zoom-out;
  display: block;
}
html[data-anim="off"] .post-image { cursor: zoom-in; }
html[data-anim="off"] .post-image.inline-expanded { cursor: zoom-out; }

/* =========================================================
   v81: mod panel — between the old flat page and the v73 cards.
   The full boxed cards were heavy: every section got a filled header
   bar and a bordered body, which turned a working page into a stack
   of containers. This keeps what actually helped (scannable headings,
   readable rows, aligned inline forms) and drops the boxes.
   ========================================================= */
.mod-page .mod-h2 {
  margin: 26px 0 8px;
  padding: 0 0 5px 10px;
  font-size: 15px;
  letter-spacing: .2px;
  color: var(--subject);
  background: none;
  border: none;
  border-bottom: 1px solid var(--cell-border);
  /* a small accent stripe instead of a filled bar */
  border-left: 3px solid var(--name);
  border-radius: 0;
}
/* lists stay readable — this was the genuinely useful half of v73 */
/* v146: boxed 3-column layout for Media approval queue / Latest 30 Posts /
   Trusted Users, per Mason's mockup — styled like the ANTI RAID SYSTEM panel
   (rounded, red border + shadow, gradient headers), centered as a row. */
.mod-box-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  margin: 20px auto 28px;
}
.mod-box {
  flex: 1 1 340px;
  min-width: 300px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  background: var(--cell);
  border: 2px solid var(--capcode);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.30);
  overflow: hidden;
}
.mod-box-head {
  padding: 8px 12px;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 1px;
  color: #fff;
  text-align: center;
  border-radius: 6px 6px 0 0;
}
.mbox-queue .mod-box-head { background: linear-gradient(180deg, #ff8a1e, #d15e00); }
.mbox-latest .mod-box-head { background: linear-gradient(180deg, #9a9a9a, #5f5f5f); }
.mbox-trusted .mod-box-head { background: linear-gradient(180deg, #3fbf63, #1f8c42); }
.mod-box-body {
  flex: 1 1 auto;
  max-height: 620px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px;
  background: var(--input-bg);
  scrollbar-color: var(--cell-border) transparent;
  scrollbar-width: thin;
}
.mod-box-body::-webkit-scrollbar { width: 10px; }
.mod-box-body::-webkit-scrollbar-thumb { background: var(--cell-border); border-radius: 4px; }
.mod-box-body::-webkit-scrollbar-track { background: transparent; }
.mod-box-body > .empty { margin: 0; }
.mod-box-body .recent-list { margin: 0; }
.mod-box-foot {
  padding: 9px 12px;
  border-top: 1px solid var(--cell-border);
  background: var(--input-bg);
  border-radius: 0 0 6px 6px;
}
.mod-box-foot .trust-form { display: flex; flex-wrap: wrap; gap: 5px; }
@media (max-width: 980px) {
  .mod-box { max-width: none; flex: 1 1 100%; }
}
.mod-page .recent-list { list-style: none; padding-left: 0; margin: 0; }
.mod-page .recent-list > li {
  padding: 6px 8px;
  border-bottom: 1px solid var(--cell-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.mod-page .recent-list > li:last-child { border-bottom: none; }
.mod-page .recent-list > li:nth-child(even) { background: rgba(127, 127, 127, .06); }
.mod-page .inline-mod { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.mod-page .ban-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 0;
}
.mod-page .ban-form input[type="text"] { min-width: 150px; }
.mod-page .ban-form input[type="number"] { width: 120px; }
.mod-page .mod-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mod-page hr { border: none; border-top: 1px solid var(--cell-border); opacity: .3; margin: 20px 0 0; }
.mod-page .hint { margin: 6px 0 8px; }

/* ---------- v75: email verification panel ---------- */
.mail-panel { display: block; }
.mail-table { margin: 8px 0; border-collapse: collapse; }
.mail-table th {
  text-align: right; padding: 4px 10px 4px 0; font-size: 12px;
  color: var(--muted); font-weight: normal; white-space: nowrap;
  background: none; border: none;
}
.mail-table td { padding: 4px 0; }
.mail-set { color: var(--quote); font-weight: bold; }
.mail-unset { color: var(--muted); }
.mail-state { font-size: 12px; margin-left: 8px; }
.mail-state.on { color: var(--quote); font-weight: bold; }
.mail-state.off { color: var(--muted); }

/* ---------- v78: About page signature block ----------
   Box-drawing art, so it needs a monospace font that actually carries the
   U+2500 block and a line-height of exactly 1 — any leading at all and the
   vertical bars stop connecting between rows. Courier New's box glyphs are
   poorly aligned, so it's last in the stack rather than first. */
.about-sig {
  font-family: Consolas, "DejaVu Sans Mono", "Liberation Mono", Menlo, "Courier New", monospace;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--muted);
  background: none;
  border: none;
  margin: 16px 0 0;
  padding: 0;
  overflow: visible;
  white-space: pre;
  display: inline-block;
  /* the theme font choice must not reach in here or the art breaks */
  font-variant-ligatures: none;
  tab-size: 4;
}
/* narrow screens: shrink the art rather than introduce a scrollbar */
@media (max-width: 560px) { .about-sig { font-size: 10px; } }
@media (max-width: 420px) { .about-sig { font-size: 8px; } }


/* ---------- v83: ++text++ shake ----------
   Runs at every animation setting, same reasoning as the echo effect: it's
   part of what the poster wrote, not page decoration. (See the specificity
   note on the anim-off blanket rule — the exclusion has to happen there.) */
@keyframes text-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-1px, 1px) rotate(-.6deg); }
  20% { transform: translate(1px, -1px) rotate(.6deg); }
  30% { transform: translate(-1.5px, 0) rotate(-.4deg); }
  40% { transform: translate(1.5px, 1px) rotate(.5deg); }
  50% { transform: translate(-1px, -1px) rotate(-.5deg); }
  60% { transform: translate(1px, 1px) rotate(.4deg); }
  70% { transform: translate(-1px, 0) rotate(-.6deg); }
  80% { transform: translate(1px, -1px) rotate(.5deg); }
  90% { transform: translate(-.5px, 1px) rotate(-.3deg); }
}
.shaketext {
  display: inline-block;   /* transforms don't apply to inline boxes */
  font-weight: bold;
  animation: text-shake .42s linear infinite;
  will-change: transform;
}
/* v259: RPG-dialog shake. The script splits the text into letters (.sk) and
   each one jitters on its own beat, so the word trembles instead of the whole
   block sliding about. The block itself stops moving once that's happened. */
.shaketext.split { animation: none; will-change: auto; }
.shaketext .sk {
  display: inline-block;
  animation: letter-shake var(--sk-dur, .2s) steps(1, end) infinite;
  animation-delay: var(--sk-delay, 0s);
}
@keyframes letter-shake {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(1px, -1px); }
  40%  { transform: translate(-1px, 1px); }
  60%  { transform: translate(1px, 1px); }
  80%  { transform: translate(-1px, -1px); }
}
@media (prefers-reduced-motion: reduce) {
  .shaketext, .shaketext .sk { animation: none; }
}


/* =========================================================
   v84: OPSEC — 1980s cyberpunk terminal. Near-black background with
   red phosphor text, ones and zeros raining behind the content, and
   CRT scanlines over the top. Post cells stay solid so the rain never
   sits behind body text.
   ========================================================= */
html[data-theme="opsec"] {
  --input-text: #ffd5d5;
  --bg: #0A0204;
  --cell: #14060A;
  --cell-border: #7A1015;
  --link: #FF3B30;
  --link-hover: #FF8A80;
  --title: #FF2B2B;
  --name: #FF5A4E;
  --subject: #FF7A6B;
  --quote: #C21B12;
  --text: #FF6A5E;
  --muted: #A83A34;
  --faint: #7A2A26;
  --input-bg: #1A070B;
  --input-border: #8A1218;
  --btn-top: #2A0A0E;
  --btn-bottom: #14060A;
  --btn-border: #A0141A;
  --th-bg: #2A0A0E;
  --th-text: #FF6A5E;
  --capcode: #FF2B2B;
  --glow: 0 0 8px rgba(255, 43, 43, .6);
}
/* The page gradient lives on <html> so the Matrix rain layer (a fixed child of
   <body>) sits above it. */
html[data-theme="opsec"] {
  background: radial-gradient(ellipse at 50% 0%, #1A0508 0%, #0A0204 65%, #050102 100%);
  background-attachment: fixed;
}
html[data-theme="opsec"] body {
  background: transparent;
  color: var(--text);
  text-shadow: 0 0 3px rgba(255, 43, 43, .35);
}

/* --- Matrix-style digit rain. Falling columns of red 0/1 glyphs with a bright
   leading character and a fading trail. Injected as a <div class="mx-rain"> by
   the client ONLY on the Opsec theme at HIGH animations, so it costs nothing on
   any other theme or setting. z-index 0 with content lifted above it. --- */
html[data-theme="opsec"] .mx-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;               /* the rain can't trigger layout elsewhere */
}
/* Keep real page content above the rain.
   This must NOT touch the fixed/sticky chrome: `position: relative` REPLACES
   `sticky`/`fixed`, which unpinned the top bar, dumped the layout picker below
   the fold, and made content siblings equal-z so #thread-replies painted over
   the OP image and swallowed its clicks. The chrome already sits above the
   rain via its own much higher z-index, so it needs no lift here.
   (The rain can't simply go to z-index:-1 like the Nate portrait did — it's a
   real element and body is transparent, so a negative layer would fall behind
   the html gradient and disappear.)
   #thread-replies is excluded for a different reason: an OP post box can be
   shorter than the image it contains, so the image overflows down into the
   replies container's area. As equal-z siblings, the later one in source order
   (#thread-replies) painted over that overflowing image and ate its clicks.
   It's a plain container and needs no stacking of its own. */
html[data-theme="opsec"] body > *:not(.mx-rain):not(.boardlist):not(#lightbox):not(.layout-picker):not(#admin-panel):not(.css-editor):not(.nudge-toast):not(#flash-video):not(.news-toast):not(#thread-replies):not(.react-picker):not(.shop-scene):not(.games-win):not(.mp3-player):not(.settings-overlay):not(.jak-sheet):not(.swing-layer):not(.react-toast):not(.ach-toast):not(#brainrot-layer):not(.raid-warning):not(.quote-preview) {
  position: relative;
  z-index: 1;
}

html[data-theme="opsec"] .mx-col {
  position: absolute;
  top: 0;
  display: inline-block;
  writing-mode: vertical-rl;     /* stack the glyphs top-to-bottom */
  text-orientation: upright;
  font: 15px/1.05 "Courier New", monospace;
  letter-spacing: 0;
  white-space: nowrap;
  color: #FF2B2B;
  text-shadow: 0 0 6px rgba(255, 43, 43, .7);
  /* fade the tail so each column reads as a streak with a solid head */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 12%, rgba(0,0,0,.15) 55%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 12%, rgba(0,0,0,.15) 55%, transparent 92%);
  animation-name: mx-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
/* the leading glyph burns brighter, like the Matrix head character */
html[data-theme="opsec"] .mx-col > b:first-child {
  color: #FFD9D6;
  text-shadow: 0 0 8px rgba(255,90,80,.95), 0 0 14px rgba(255,43,43,.7);
  font-weight: normal;
}
@keyframes mx-fall {
  from { transform: translateY(-72%); }
  to   { transform: translateY(0%); }
}
/* The rain runs at EVERY animation setting — it's the defining feature of the
   theme, and Off is the default, so gating it meant almost nobody saw it. */
@media (prefers-reduced-motion: reduce) {
  html[data-theme="opsec"] .mx-col { animation: none; }
  html[data-theme="opsec"] .mx-rain { display: none; }
}
/* Vignette only — the CRT scanlines were removed along with the other "lines". */
html[data-theme="opsec"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
}

html[data-theme="opsec"] .post.reply,
html[data-theme="opsec"] .home-box,
html[data-theme="opsec"] .mod-queue-item,
html[data-theme="opsec"] .mini-reply {
  background: #14060A;           /* solid, so the rain stays behind the text */
  border: 1px solid var(--cell-border);
  border-radius: 0;
  box-shadow: 0 0 0 1px rgba(255,43,43,.12), 0 0 14px rgba(255, 43, 43, .13);
}
html[data-theme="opsec"] .post.op {
  background: rgba(20, 6, 10, .92);
  border: 1px solid var(--cell-border);
  border-radius: 0;
}
html[data-theme="opsec"] .wmm-button {
  background: linear-gradient(180deg, #2A0A0E, #14060A);
  border: 1px solid #A0141A;
  border-radius: 0;
  color: #FF6A5E;
  letter-spacing: 1px;
  box-shadow: inset 0 0 8px rgba(255,43,43,.2);
}
html[data-theme="opsec"] .wmm-button:hover {
  color: #FF8A80;
  box-shadow: inset 0 0 12px rgba(255,43,43,.35), 0 0 10px rgba(255,43,43,.3);
}
html[data-theme="opsec"] .boardlist {
  background: rgba(10, 2, 4, .96);
  border-bottom: 1px solid var(--cell-border);
  border-radius: 0;
  box-shadow: 0 0 12px rgba(255, 43, 43, .22);
}
html[data-theme="opsec"] .boardlist a { color: #FF5A4E; }
html[data-theme="opsec"] .boardlist a:hover { color: #FF8A80; text-shadow: 0 0 6px rgba(255,43,43,.8); }
html[data-theme="opsec"] .wmm-title {
  color: #FF2B2B;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(255, 43, 43, .85), 0 0 26px rgba(255, 43, 43, .45);
}
html[data-theme="opsec"] .post-form input[type="text"],
html[data-theme="opsec"] .post-form input[type="password"],
html[data-theme="opsec"] .post-form input[type="number"],
html[data-theme="opsec"] .post-form textarea,
html[data-theme="opsec"] #theme-select,
html[data-theme="opsec"] #font-select,
html[data-theme="opsec"] #anim-select {
  border-radius: 0;
  background: #1A070B;
  color: #ffd5d5;
}
html[data-theme="opsec"] .slide-track {
  background: #14060A;
  border: 1px solid #8A1218;
  border-radius: 0;
}
html[data-theme="opsec"] .slide-knob { background: linear-gradient(180deg, #3A0C12, #14060A); color: #FF6A5E; border-radius: 0; }
html[data-theme="opsec"] hr { border-top: 1px solid rgba(255, 43, 43, .3); border-bottom: none; }
html[data-theme="opsec"] #mascot { border-color: #7A1015; }



/* =========================================================
   v91: front-page layout picker
   Fixed to the bottom right, and only ever rendered on the front page.
   ========================================================= */
.layout-picker {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  font-size: 12px;
  color: var(--muted);
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  opacity: .82;
  transition: opacity .18s ease;
}
.layout-picker:hover { opacity: 1; }
.layout-picker select {
  font: inherit;
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  padding: 1px 4px;
}
@media (max-width: 640px) { .layout-picker { right: 6px; bottom: 6px; font-size: 11px; } }

/* ---------- layout: Swedish Win ----------
   Single narrow column, everything stacked in the order that site uses:
   banner, title, tagline, about/news, boards, recent images, latest posts,
   stats. The tab strip goes away and the news panel is always shown. */


/* the About block only appears in the layouts that have one */
.hb-about { display: none; }
html[data-layout="soyjak"] .hb-about { display: block; }
/* the board TABLE is Soyjak-Party only; every other layout uses the list */
.board-table { display: none; }
html[data-layout="soyjak"] .board-table { display: table; }
html[data-layout="soyjak"] .hb-boards .board-list { display: none; }
/* the table has its own header row, so the section header bar is redundant */
html[data-layout="soyjak"] .hb-boards > h2 { display: none; }

/* =========================================================
   layout: Soyjak Party — built from a screenshot of the real front page.
   Centred logo over a stack of bordered panels: News, About, the board
   table, then Recent Images beside Latest Posts, then Statistics. The
   periwinkle/green header bars are part of the layout's identity, so they
   are set here rather than inherited from the active theme.
   ========================================================= */
/* No page background here on purpose: the active THEME owns the background and
   the body text colour. The layout only supplies structure and the panel
   chrome below, which is built from theme variables so it stays readable on
   every theme rather than being locked to one palette. */
html[data-layout="soyjak"] #tab-news[hidden] { display: block !important; }

/* centred mascot + wordmark masthead */
html[data-layout="soyjak"] .home-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 14px;
  background: none;
  border: none;
}
html[data-layout="soyjak"] .home-header .tagline,
html[data-layout="soyjak"] .home-header .mascot-caption { display: none; }
html[data-layout="soyjak"] #mascot {
  max-width: min(120px, 60vw);
  background: none;
  border: none;
  padding: 0;
}
html[data-layout="soyjak"] #site-title {
  display: block;
  font-size: 26px;
  font-weight: bold;
  letter-spacing: 0;
  color: var(--title);
  text-shadow: none;
  margin: 2px 0 0;
}

/* one narrow column of panels */
html[data-layout="soyjak"] .home-cols,
html[data-layout="soyjak"] #tab-news {
  max-width: 620px;
  margin: 0 auto;
}
html[data-layout="soyjak"] .home-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
/* About and the board table span the full width; the bottom row splits */
html[data-layout="soyjak"] .hb-about  { grid-column: 1 / -1; order: 1; }
html[data-layout="soyjak"] .hb-boards { grid-column: 1 / -1; order: 2; }
/* Recent Images and Stats stack in the LEFT column; Latest Posts fills the
   right column across both of their rows. Previously all three were auto-placed,
   so the row containing Recent Images was stretched to the height of the much
   taller Latest Posts panel — leaving a large empty gap above Stats. Spanning
   the tall panel instead lets Stats sit directly under Recent Images. */
html[data-layout="soyjak"] .hb-media  { grid-column: 1 / 2; order: 3; }
html[data-layout="soyjak"] .hb-latest { grid-column: 2 / 3; grid-row: span 2; order: 4; }
html[data-layout="soyjak"] .hb-stats  { grid-column: 1 / 2; order: 5; }

/* the panels themselves: 1px navy border, tinted header bar, white body */
html[data-layout="soyjak"] .home-box,
html[data-layout="soyjak"] #tab-news {
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 0;
  padding: 0;
  margin: 0 auto 12px;
  box-shadow: none;
  overflow: hidden;
}
html[data-layout="soyjak"] .home-box h2,
html[data-layout="soyjak"] #tab-news > h2 {
  margin: 0;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: bold;
  text-align: left;
  color: var(--th-text);
  background: var(--th-bg);
  border: none;
  border-bottom: 1px solid var(--cell-border);
  letter-spacing: 0;
}
html[data-layout="soyjak"] .home-box > *:not(h2) { padding: 6px 9px; margin: 0; }
/* the board table draws its own edges, so it sits flush in its panel */
html[data-layout="soyjak"] .hb-boards { padding: 0; }
html[data-layout="soyjak"] .home-box p { font-size: 12px; line-height: 1.5; }
/* About is centred on the real site */
html[data-layout="soyjak"] .hb-about p { text-align: center; }

/* News: dated rows with underlined titles */
html[data-layout="soyjak"] .news-list { list-style: none; padding: 0; margin: 0; }
html[data-layout="soyjak"] .news-item {
  padding: 3px 9px;
  border-bottom: 1px solid var(--cell-border);
  font-size: 12px;
}
html[data-layout="soyjak"] .news-item:last-child { border-bottom: none; }
html[data-layout="soyjak"] .news-title { text-decoration: underline; color: var(--link); font-weight: normal; }
/* News attachments show in this layout too. Constrained so a large image
   can't blow out the ~620px panel column, and scoped so video and audio
   players stay usable rather than being squeezed. */
html[data-layout="soyjak"] .news-media {
  display: block;
  margin: 5px 0 2px;
}
html[data-layout="soyjak"] .news-media img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  border: 1px solid var(--cell-border);
}
html[data-layout="soyjak"] .news-media video { max-width: 100%; height: auto; }
html[data-layout="soyjak"] .news-media audio { width: 100%; }

/* the board table */
html[data-layout="soyjak"] .board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  padding: 0 !important;
}
html[data-layout="soyjak"] .board-table th {
  background: var(--th-bg);
  color: var(--th-text);
  text-align: left;
  padding: 3px 7px;
  border-bottom: 1px solid var(--cell-border);
  font-weight: bold;
}
html[data-layout="soyjak"] .board-table td {
  padding: 3px 7px;
  border-bottom: 1px solid var(--cell-border);
  vertical-align: top;
}
html[data-layout="soyjak"] .board-table tr:nth-child(even) td { background: rgba(127, 127, 127, .08); }
html[data-layout="soyjak"] .board-table td:nth-child(n+3) { text-align: right; white-space: nowrap; }
html[data-layout="soyjak"] .board-table a { color: var(--link); text-decoration: underline; }

/* Recent Images: green header, images stacked in a white body */
html[data-layout="soyjak"] .hb-media h2 { background: var(--th-bg); border-bottom-color: var(--cell-border); color: var(--th-text); }
html[data-layout="soyjak"] .recent-images { display: block; text-align: left; }
html[data-layout="soyjak"] .recent-images .post-image.mini {
  max-width: 100%;
  max-height: none;
  width: auto;
  margin: 0 0 6px;
  display: block;
}

/* Latest Posts: teal header over a lavender body, dense small rows */
html[data-layout="soyjak"] .hb-latest h2 { background: var(--th-bg); border-bottom-color: var(--cell-border); color: var(--th-text); }
html[data-layout="soyjak"] .hb-latest { background: var(--cell); }
html[data-layout="soyjak"] .hb-latest .recent-list { list-style: none; padding: 6px 9px; margin: 0; font-size: 11px; line-height: 1.45; }
html[data-layout="soyjak"] .hb-latest .recent-list li { padding: 0 0 2px; border: none; }
html[data-layout="soyjak"] .hb-latest a { color: var(--link); text-decoration: underline; }
html[data-layout="soyjak"] .live-dot { display: none; }

/* Statistics: green header, pale green body */
html[data-layout="soyjak"] .hb-stats h2 { background: var(--th-bg); border-bottom-color: var(--cell-border); color: var(--th-text); }
html[data-layout="soyjak"] .hb-stats { background: var(--cell); }
html[data-layout="soyjak"] .hb-stats .board-list { list-style: none; padding: 6px 9px; margin: 0; font-size: 12px; }

/* the layout picker must stay legible over the pale background */
/* the layout picker inherits the theme's own panel colours */

@media (max-width: 700px) {
  html[data-layout="soyjak"] .home-cols { grid-template-columns: 1fr; }
  html[data-layout="soyjak"] .hb-media,
  html[data-layout="soyjak"] .hb-stats { grid-column: 1 / -1; }
  html[data-layout="soyjak"] .hb-latest { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- v91: Opsec rain fades in and out ---------- */
html[data-theme="opsec"] .mx-rain {
  opacity: 0;
  transition: opacity .9s ease;
}
html[data-theme="opsec"] .mx-rain.mx-in { opacity: 1; }
html[data-theme="opsec"] .mx-rain.mx-out { opacity: 0; }

/* ---------- v91: Opsec CRT bars restored (no toggle) ----------
   Scanlines are part of the terminal look; they're back on permanently,
   layered under the vignette in the same overlay. */
html[data-theme="opsec"] body::after {
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.30) 0 1px, rgba(0,0,0,0) 1px 3px),
    radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
}

/* =========================================================
   v91: METROID — Crateria (Super Metroid's rain-lashed surface).
   Desaturated slate-blue and grey-purple rock, teal-green Chozo
   accents, the orange-amber of Samus's suit for highlights, and a
   perpetual rain streaking down the background. Blocky and hard-edged
   like the SNES tilework, with a thin bevel on panels.
   ========================================================= */
html[data-theme="metroid"] {
  --input-text: #DCE6F0;
  --bg: #10161F;
  --cell: #1B2534;
  --cell-border: #38495F;
  --link: #5FD3C0;
  --link-hover: #9BF2E4;
  --title: #F0A03C;
  --name: #5FD3C0;
  --subject: #F0A03C;
  --quote: #8FD46A;
  --text: #C6D4E4;
  --muted: #7A8CA3;
  --faint: #55647A;
  --input-bg: #131C27;
  --input-border: #3E5169;
  --btn-top: #2A374A;
  --btn-bottom: #1B2534;
  --btn-border: #4A5F7A;
  --th-bg: #253247;
  --th-text: #9BB4D0;
  --capcode: #E8593C;
  --glow: 0 0 8px rgba(95, 211, 192, .5);
}
/* layered rock: a cool vertical wash with faint horizontal strata */
html[data-theme="metroid"] {
  background:
    repeating-linear-gradient(0deg, rgba(120, 150, 190, .035) 0 2px, rgba(0,0,0,0) 2px 9px),
    linear-gradient(180deg, #0C1119 0%, #141C28 45%, #1A2432 100%);
  background-attachment: fixed;
}
html[data-theme="metroid"] body {
  background: transparent;
  color: var(--text);
}
html[data-theme="metroid"] .post.reply,
html[data-theme="metroid"] .home-box,
html[data-theme="metroid"] .mod-queue-item,
html[data-theme="metroid"] .mini-reply {
  background: linear-gradient(180deg, #1F2A3B, #18212E);
  border: 1px solid var(--cell-border);
  border-top-color: #4A5F7A;      /* bevel: lit from above, like the tiles */
  border-left-color: #43566E;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(140, 180, 220, .10), 0 2px 0 rgba(0, 0, 0, .35);
}
html[data-theme="metroid"] .post.op {
  background: rgba(27, 37, 52, .82);
  border: 1px solid var(--cell-border);
  border-radius: 0;
}
/* buttons take the Chozo-statue teal with the suit's amber on hover */
html[data-theme="metroid"] .wmm-button {
  background: linear-gradient(180deg, #2E3D52, #1B2534);
  border: 1px solid #4A5F7A;
  border-radius: 0;
  color: #5FD3C0;
  letter-spacing: .5px;
  box-shadow: inset 0 1px 0 rgba(150, 200, 230, .14);
}
html[data-theme="metroid"] .wmm-button:hover {
  color: #F0A03C;
  border-color: #F0A03C;
  box-shadow: inset 0 1px 0 rgba(240, 160, 60, .2), 0 0 9px rgba(240, 160, 60, .3);
}
html[data-theme="metroid"] .boardlist {
  background: linear-gradient(180deg, rgba(21, 29, 41, .97), rgba(15, 21, 30, .97));
  border-bottom: 2px solid #3E5169;
  border-radius: 0;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .4);
}
html[data-theme="metroid"] .boardlist a { color: #7FC7D9; }
html[data-theme="metroid"] .boardlist a:hover { color: #F0A03C; }
html[data-theme="metroid"] .wmm-title {
  color: #F0A03C;
  letter-spacing: 2px;
  text-shadow: 0 2px 0 #7A3A10, 0 0 14px rgba(240, 160, 60, .45);
}
html[data-theme="metroid"] .post-form input[type="text"],
html[data-theme="metroid"] .post-form input[type="password"],
html[data-theme="metroid"] .post-form input[type="number"],
html[data-theme="metroid"] .post-form textarea,
html[data-theme="metroid"] #theme-select,
html[data-theme="metroid"] #font-select,
html[data-theme="metroid"] #anim-select,
html[data-theme="metroid"] #layout-select {
  border-radius: 0;
  background: #131C27;
  color: #DCE6F0;
}
html[data-theme="metroid"] .slide-track {
  background: #131C27;
  border: 1px solid #3E5169;
  border-radius: 0;
}
html[data-theme="metroid"] .slide-knob {
  background: linear-gradient(180deg, #3A4C64, #222E3F);
  color: #5FD3C0;
  border-radius: 0;
}
html[data-theme="metroid"] hr { border-top: 1px solid #38495F; border-bottom: none; }
html[data-theme="metroid"] #mascot { border-color: #3E5169; }

/* ---------- v93: the Dailyjak (Soyjak Party layout) ----------
   Sits under the About text, centred, one random jak per page load. Hidden
   in every other layout since the About block itself is Soyjak/Swedish only. */
.dailyjak-label, .dailyjak { display: none; }
html[data-layout="soyjak"] .dailyjak-label {
  display: block;
  text-align: center;
  font-weight: bold;
  margin: 14px 0 6px !important;
  font-size: 12px;
}
html[data-layout="soyjak"] .dailyjak {
  display: block;
  text-align: center;
  margin: 0 !important;
  padding-bottom: 10px !important;
}
html[data-layout="soyjak"] .dailyjak img {
  max-width: 260px;
  max-height: 300px;
  width: auto;
  height: auto;
  border: none;
}

/* =========================================================
   v94: Swedish Win / Soyjak Party — page chrome
   Background gradient and nav bar matched to each site, plus a 2-item news
   preview on the front page with the full News tab still reachable.
   ========================================================= */

/* ---- news: 2-item preview inline, everything when the tab is opened ----
   #tab-news carries [hidden] until the visitor clicks the News tab. The
   layout forces it visible regardless, so [hidden] is exactly the signal for
   "this is the inline preview" — and dropping the attribute reveals the rest. */
html[data-layout="soyjak"]  #tab-news[hidden] .news-item:nth-of-type(n+3) { display: none; }
/* the "view all" link belongs to the preview only */
.news-more { display: none; }
html[data-layout="soyjak"]  #tab-news[hidden] .news-more {
  display: block;
  text-align: center;
  font-size: 12px;
  margin: 0 !important;
  padding: 5px 9px !important;
  border-top: 1px solid var(--cell-border);
}

/* the tab strip stays available in both layouts */
html[data-layout="soyjak"] .home-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0 auto 10px;
  max-width: 620px;
}

/* ---------- Swedish Win chrome ----------
   That site sits on a flat light grey (its theme-color is #DDDDDD) with a
   plain bracketed link bar across the top. */
/* The theme owns the background and text colour; see the note on the Soyjak
   layout above. */

/* ---------- Soyjak Party chrome ----------
   Periwinkle bar over the pale lavender gradient already set for this layout. */
/* No nav-bar overrides here: the bar is the site's normal one, styled entirely
   by whichever theme is active, exactly as it looks on every other page. */
/* tabs keep their normal theme styling as well */

/* both layouts recolour their own chrome, so the theme's title glow would
   fight it — flatten the shadow */
html[data-layout="soyjak"] .wmm-title { text-shadow: none; }

/* ---------- v97: per-layout list lengths ----------
   The server sends 27 recent posts and 6 media tiles; each layout shows the
   slice it wants. Capping in CSS (rather than server-side) keeps a single
   query and means the live poller can keep inserting without knowing which
   layout is active. */
/* Default keeps the 10 posts it has always shown. Written as :not(soyjak) so
   it still applies if the layout attribute never gets set (JS disabled). */
html:not([data-layout="soyjak"]) #live-recent > li:nth-of-type(n+11) { display: none; }
/* Soyjak Party: 27 posts, 3 media tiles */
html[data-layout="soyjak"] #live-recent > li:nth-of-type(n+28) { display: none; }
html[data-layout="soyjak"] .recent-images > *:nth-of-type(n+4) { display: none; }


/* =========================================================
   v103: GEM — everything is cut from pale blue crystal. Glassy
   translucent panels with faceted highlights, icy cyan accents, and a
   tiled gem field drifting diagonally behind the page.
   ========================================================= */
html[data-theme="gem"] {
  --input-text: #16394A;
  --bg: #E9F7FD;
  --cell: rgba(255, 255, 255, .72);
  --cell-border: #8ECFE8;
  --link: #1B7FA8;
  --link-hover: #0FA3D6;
  --title: #2A9BC4;
  --name: #2E8FB8;
  --subject: #1B7FA8;
  --quote: #3E9E6B;
  --text: #16394A;
  --muted: #5C8DA3;
  --faint: #8FB4C6;
  --input-bg: rgba(255, 255, 255, .85);
  --input-border: #9BD4EA;
  --btn-top: #FFFFFF;
  --btn-bottom: #CDEDF9;
  --btn-border: #8ECFE8;
  --th-bg: #C6EAF7;
  --th-text: #14556E;
  --capcode: #D4568C;
  --glow: 0 0 10px rgba(90, 200, 240, .55);
}
html[data-theme="gem"] {
  background:
    linear-gradient(180deg, #F2FBFE 0%, #DCF1FB 55%, #C9E9F8 100%);
  background-attachment: fixed;
}
/* the drifting gem field, behind everything */
html[data-theme="gem"] body {
  background: transparent;
  color: var(--text);
}
html[data-theme="gem"] body::before {
  content: "";
  position: fixed;
  inset: -240px;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><polygon points='30,17 39.36,26.1 35.85,41.05 24.15,41.05 20.64,26.1' fill='#8FD8F0' opacity='0.55'/><polyline points='20.64,26.1 30,27.66 39.36,26.1' fill='none' stroke='#fff' stroke-width='1' opacity='0.75'/><polyline points='30,17 30,27.66 24.15,41.05' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/><polyline points='30,27.66 35.85,41.05' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/><polygon points='90,65 97.2,72.0 94.5,83.5 85.5,83.5 82.8,72.0' fill='#B6E6F7' opacity='0.55'/><polyline points='82.8,72.0 90,73.2 97.2,72.0' fill='none' stroke='#fff' stroke-width='1' opacity='0.75'/><polyline points='90,65 90,73.2 85.5,83.5' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/><polyline points='90,73.2 94.5,83.5' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/><polygon points='60,97 65.76,102.6 63.6,111.8 56.4,111.8 54.24,102.6' fill='#6FC6E8' opacity='0.55'/><polyline points='54.24,102.6 60,103.56 65.76,102.6' fill='none' stroke='#fff' stroke-width='1' opacity='0.75'/><polyline points='60,97 60,103.56 56.4,111.8' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/><polyline points='60,103.56 63.6,111.8' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/><polygon points='0,66 6.4799999999999995,72.3 4.05,82.65 -4.05,82.65 -6.4799999999999995,72.3' fill='#A5DFF4' opacity='0.55'/><polyline points='-6.4799999999999995,72.3 0,73.38 6.4799999999999995,72.3' fill='none' stroke='#fff' stroke-width='1' opacity='0.75'/><polyline points='0,66 0,73.38 -4.05,82.65' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/><polyline points='0,73.38 4.05,82.65' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/><polygon points='120,66 126.48,72.3 124.05,82.65 115.95,82.65 113.52,72.3' fill='#A5DFF4' opacity='0.55'/><polyline points='113.52,72.3 120,73.38 126.48,72.3' fill='none' stroke='#fff' stroke-width='1' opacity='0.75'/><polyline points='120,66 120,73.38 115.95,82.65' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/><polyline points='120,73.38 124.05,82.65' fill='none' stroke='#fff' stroke-width='0.8' opacity='0.55'/></svg>");
  background-repeat: repeat;
  background-size: 120px 120px;
  animation: gem-drift 26s linear infinite;
}
@keyframes gem-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(120px, 120px, 0); }
}
html[data-anim="off"][data-theme="gem"] body::before { animation: none; }

/* panels: cut glass — translucent, bevelled, with a facet highlight */
html[data-theme="gem"] .post.reply,
html[data-theme="gem"] .home-box,
html[data-theme="gem"] .mod-queue-item,
html[data-theme="gem"] .mini-reply {
  background:
    linear-gradient(135deg, rgba(255,255,255,.92) 0%, rgba(214,240,251,.78) 42%, rgba(255,255,255,.66) 43%, rgba(190,229,246,.72) 100%);
  border: 1px solid var(--cell-border);
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 0 22px rgba(140, 210, 240, .28),
    0 2px 10px rgba(60, 140, 180, .18);
}
html[data-theme="gem"] .post.op {
  background: linear-gradient(135deg, rgba(255,255,255,.80), rgba(205,236,250,.62));
  border: 1px solid rgba(142, 207, 232, .8);
  border-radius: 3px;
}
/* buttons look like small cut stones */
html[data-theme="gem"] .wmm-button {
  background: linear-gradient(180deg, #FFFFFF 0%, #E4F5FD 48%, #C2E7F8 52%, #FFFFFF 100%);
  border: 1px solid #8ECFE8;
  border-radius: 3px;
  color: #14556E;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 1px 5px rgba(80, 170, 210, .3);
}
html[data-theme="gem"] .wmm-button:hover {
  color: #0FA3D6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 12px rgba(60, 190, 235, .55);
}
html[data-theme="gem"] .boardlist {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(198,234,247,.88));
  border-bottom: 1px solid #9BD4EA;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 10px rgba(70, 160, 200, .2);
}
html[data-theme="gem"] .wmm-title {
  color: #2A9BC4;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #FFFFFF, 0 0 16px rgba(90, 200, 240, .6);
}
html[data-theme="gem"] .post-form input[type="text"],
html[data-theme="gem"] .post-form input[type="password"],
html[data-theme="gem"] .post-form input[type="number"],
html[data-theme="gem"] .post-form textarea,
html[data-theme="gem"] #theme-select,
html[data-theme="gem"] #font-select,
html[data-theme="gem"] #anim-select,
html[data-theme="gem"] #layout-select {
  border-radius: 3px;
  background: rgba(255,255,255,.9);
  color: #16394A;
}
html[data-theme="gem"] .slide-track {
  background: linear-gradient(180deg, #FFFFFF, #D2EEFA);
  border: 1px solid #9BD4EA;
  border-radius: 3px;
}
html[data-theme="gem"] .slide-knob {
  background: linear-gradient(180deg, #FFFFFF, #C2E7F8);
  color: #14556E;
  border-radius: 2px;
}
html[data-theme="gem"] hr { border-top: 1px solid rgba(142, 207, 232, .7); border-bottom: none; }
html[data-theme="gem"] #mascot { border-color: #9BD4EA; }

/* ---------- v103: pinned news + the new-news toast ---------- */
.news-item.pinned { position: relative; }
.news-item.pinned .news-title::before {
  content: "\A0PINNED\A0";
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .5px;
  color: var(--th-text);
  background: var(--th-bg);
  border: 1px solid var(--cell-border);
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}
.mod-pin { background: none; border: none; cursor: pointer; color: var(--link); font: inherit; padding: 0; }
.mod-pin:hover { color: var(--link-hover); }

/* slides down from the top right, sits, slides back up */
.news-toast {
  /* bottom right, sliding UP into view */
  position: fixed;
  bottom: 0;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 260px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-bottom: none;
  border-radius: 7px 7px 0 0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .3);
  transform: translateY(120%);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
}
.news-toast.show { transform: translateY(0); }
.news-toast strong { color: var(--name); }
.news-toast span { color: var(--muted); font-size: 12px; }
/* the toast is feedback, not decoration — it slides at any animation setting */
@media (prefers-reduced-motion: reduce) { .news-toast { transition: none; } }

/* =========================================================
   v104: FRUIT — Frutiger Aero's glass, gloss and bubbles, but in the
   bright Y2K fruit-candy palette instead of sky blue: lime, tangerine,
   grape and watermelon pink over a citrus gradient.
   ========================================================= */
html[data-theme="fruit"] {
  --input-text: #2A1436;
  --bg: #FFF6D8;
  --cell: rgba(255, 255, 255, .80);
  --cell-border: #F2A93B;
  --link: #C7267E;
  --link-hover: #FF3D9A;
  --title: #FF6B2C;
  --name: #7BC62D;
  --subject: #C7267E;
  --quote: #4FAF2E;
  --text: #33203D;
  --muted: #8A6E7C;
  --faint: #B79AA8;
  --input-bg: rgba(255, 255, 255, .92);
  --input-border: #F5B94F;
  --btn-top: #FFF9C4;
  --btn-bottom: #FFB03A;
  --btn-border: #FFD36E;
  --th-bg: #FFD9EC;
  --th-text: #A01760;
  --capcode: #E8253D;
  --glow: 0 0 10px rgba(255, 120, 190, .55);
}
html[data-theme="fruit"] {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 233, 90, .75), transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(255, 120, 190, .55), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(123, 198, 45, .55), transparent 52%),
    linear-gradient(180deg, #FFF9D6 0%, #FFE3F2 45%, #E6FBD2 100%);
  background-attachment: fixed;
}
html[data-theme="fruit"] body { background: transparent; color: var(--text); }

/* glossy bubble panels: the Aero mid-gloss split, in candy colours */
html[data-theme="fruit"] .post.reply,
html[data-theme="fruit"] .home-box,
html[data-theme="fruit"] .mod-queue-item,
html[data-theme="fruit"] .mini-reply {
  background: linear-gradient(180deg,
    rgba(255,255,255,.95) 0%,
    rgba(255,241,180,.78) 48%,
    rgba(255,205,235,.62) 52%,
    rgba(255,255,255,.85) 100%);
  border: 1px solid rgba(242, 169, 59, .75);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    0 3px 14px rgba(220, 120, 60, .18);
}
html[data-theme="fruit"] .post.op {
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,226,244,.6));
  border: 1px solid rgba(199, 38, 126, .35);
  border-radius: 14px;
}
/* pill buttons with the classic gloss highlight */
html[data-theme="fruit"] .wmm-button {
  background: linear-gradient(180deg, #FFFDF0 0%, #FFE585 46%, #FFA92E 54%, #FFD980 100%);
  border: 1px solid #E8912A;
  border-radius: 999px;
  color: #7A2E00;
  font-weight: bold;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 7px rgba(230, 130, 40, .35);
}
html[data-theme="fruit"] .wmm-button:hover {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFEFA8 46%, #FF8FC4 54%, #FFD3E8 100%);
  color: #A01760;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 14px rgba(255, 110, 180, .5);
}
html[data-theme="fruit"] .boardlist {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,214,238,.9));
  border-bottom: 1px solid #F2A93B;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 2px 12px rgba(240, 140, 190, .3);
}
html[data-theme="fruit"] .boardlist a { color: #C7267E; }
html[data-theme="fruit"] .boardlist a:hover { color: #FF6B2C; }
html[data-theme="fruit"] .wmm-title {
  color: #FF6B2C;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #FFFFFF, 0 0 16px rgba(255, 180, 60, .7);
}
html[data-theme="fruit"] .post-form input[type="text"],
html[data-theme="fruit"] .post-form input[type="password"],
html[data-theme="fruit"] .post-form input[type="number"],
html[data-theme="fruit"] .post-form textarea,
html[data-theme="fruit"] #theme-select,
html[data-theme="fruit"] #font-select,
html[data-theme="fruit"] #anim-select,
html[data-theme="fruit"] #layout-select {
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  color: #2A1436;
}
html[data-theme="fruit"] .slide-track {
  background: linear-gradient(180deg, #FFFDF0, #FFCFE9);
  border: 1px solid #F5B94F;
  border-radius: 999px;
}
html[data-theme="fruit"] .slide-knob {
  background: linear-gradient(180deg, #FFFFFF, #FFD36E);
  color: #7A2E00;
  border-radius: 999px;
}
html[data-theme="fruit"] hr { border-top: 1px solid rgba(242, 169, 59, .55); border-bottom: none; }
html[data-theme="fruit"] #mascot { border-color: #F5B94F; }

/* ---------- v105: country flags (/chud/) ---------- */
.post-flag {
  /* 16x11 like vichan; the border stops pale flags vanishing on light themes */
  width: 16px;
  height: 11px;
  vertical-align: -1px;
  border: 1px solid rgba(0, 0, 0, .25);
  image-rendering: -webkit-optimize-contrast;
}

/* ---------- v105: admin presence in stats ---------- */
.admin-status { font-weight: bold; }
.admin-status.on  { color: #2ECC40; }
.admin-status.off { color: var(--muted); }
.admin-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle;
}
.admin-status.on  .admin-dot { background: #2ECC40; box-shadow: 0 0 5px rgba(46,204,64,.9); }
.admin-status.off .admin-dot { background: var(--faint); }

/* ---------- v105: two-item news section on the default front page ---------- */
.home-news-peek { max-width: 900px; margin: 0 auto 4px; }
.home-news-peek > h2 { margin: 0 0 8px; font-size: 16px; }
.home-news-peek .news-item { margin-bottom: 10px; }
.home-news-peek .news-media img { max-width: 100%; max-height: 280px; width: auto; height: auto; }
.home-news-peek .news-more { text-align: center; font-size: 12px; margin: 6px 0 0; }
/* the alternate layouts have their own news treatment, so hide this there */
html[data-layout="soyjak"] .home-news-peek,
html[data-layout="4chan"] .home-news-peek { display: none; }

/* =========================================================
   v105: layout — 4chan (the old pre-2012 front page)
   Yotsuba-B furniture: cream background, centred logo, a boxed news
   block, and the board list as dense bracketed link groups rather than
   a table. Deliberately plain and narrow.
   ========================================================= */
html[data-layout="4chan"] .home-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 6px;
}
html[data-layout="4chan"] .home-header .tagline { font-size: 12px; color: var(--muted); }
html[data-layout="4chan"] #site-title {
  display: block;
  font-family: Tahoma, Geneva, Verdana, sans-serif;
  font-size: 30px;
  font-weight: bold;
  letter-spacing: -1px;
  text-shadow: none;
}
html[data-layout="4chan"] .mascot-frame { text-align: center; }
html[data-layout="4chan"] #mascot { max-width: min(150px, 66vw); }
html[data-layout="4chan"] .mascot-caption { text-align: center; font-size: 11px; }

/* the tab strip is centred and small, like the old nav row */
html[data-layout="4chan"] .home-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  max-width: 720px;
  margin: 6px auto 8px;
}
html[data-layout="4chan"] .home-tabs .home-tab { font-size: 12px; border-radius: 0; }

/* everything sits in one narrow centred column */
html[data-layout="4chan"] .home-cols,
html[data-layout="4chan"] #tab-news {
  max-width: 720px;
  margin: 0 auto;
  display: block;
}
html[data-layout="4chan"] .home-box {
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 14px;
}
/* the old site's section headers: small, centred, on a tinted strip */
html[data-layout="4chan"] .home-box h2 {
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  margin: 0 0 6px;
  padding: 2px 6px;
  color: var(--th-text);
  background: var(--th-bg);
  border: 1px solid var(--cell-border);
  border-radius: 0;
}
/* board list as dense bracketed links on one flowing line */
html[data-layout="4chan"] .hb-boards .board-list {
  /* Flex-wrap rather than inline text. The <li> items are joined with no
     whitespace between them and each is white-space:nowrap, so as inline boxes
     the browser had NO soft-wrap opportunity anywhere in the line and the list
     ran straight off the right edge. Flex items wrap regardless. */
  list-style: none;
  padding: 0 8px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 6px;
  row-gap: 2px;
  font-size: 13px;
  line-height: 1.9;
}
html[data-layout="4chan"] .hb-boards .board-list li {
  /* each entry stays on one line; wrapping happens between entries */
  flex: 0 0 auto;
  white-space: nowrap;
}
html[data-layout="4chan"] .hb-boards .board-list li::before { content: "[ "; color: var(--faint); }
html[data-layout="4chan"] .hb-boards .board-list li::after { content: " ] "; color: var(--faint); }
/* Old 4chan listed boards as bare bracketed links, so the descriptive subtitle
   is dropped here. It lives in its own span precisely so this can hide it —
   without that wrapper the em-dash and description landed inside the brackets
   and the whole section read as a wall of text. */
html[data-layout="4chan"] .hb-boards .board-list .board-sub { display: none; }
html[data-layout="4chan"] .hb-boards .board-list li a { text-decoration: none; }
html[data-layout="4chan"] .board-table { display: none; }

/* news: a plain boxed block, newest first */
html[data-layout="4chan"] #tab-news[hidden] { display: block !important; }
html[data-layout="4chan"] #tab-news[hidden] .news-item:nth-of-type(n+3) { display: none; }
html[data-layout="4chan"] #tab-news[hidden] .news-more { display: block; text-align: center; font-size: 12px; }
html[data-layout="4chan"] .news-list {
  border: 1px solid var(--cell-border);
  padding: 8px 10px;
  background: var(--cell);
}
html[data-layout="4chan"] .news-item { border-bottom: 1px dashed var(--cell-border); padding-bottom: 6px; }
html[data-layout="4chan"] .news-item:last-child { border-bottom: none; }
html[data-layout="4chan"] .news-media img { max-width: 100%; max-height: 260px; width: auto; height: auto; }

/* stats and the lists stay compact and centred */
html[data-layout="4chan"] .hb-stats .board-list,
html[data-layout="4chan"] .hb-latest .recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
}
html[data-layout="4chan"] .hb-stats .board-list { text-align: center; }
html[data-layout="4chan"] .recent-images { text-align: center; }
html[data-layout="4chan"] .hb-about { display: block; }
html[data-layout="4chan"] .hb-about p { text-align: center; font-size: 12px; }
html[data-layout="4chan"] .live-dot { display: none; }

/* =========================================================
   v106: JULY 4TH — dark, skeuomorphic, with fireworks.
   Night-sky navy with embossed leather-ish panels, brass-metal buttons
   and stitched borders, plus bursts going off behind the page. The
   fireworks are CSS-only: layered radial-gradient sparks that scale and
   fade on staggered loops.
   ========================================================= */
html[data-theme="july4"] {
  --input-text: #EAF0FF;
  --bg: #0A0F20;
  --cell: #161C31;
  --cell-border: #3A4468;
  --link: #FF5A6A;
  --link-hover: #FF8F9A;
  --title: #FF4757;
  --name: #6E9BFF;
  --subject: #FFD37A;
  --quote: #5CC98A;
  --text: #DCE3F5;
  --muted: #8B95B8;
  --faint: #5D678C;
  --input-bg: #10152A;
  --input-border: #414C74;
  --btn-top: #2A3252;
  --btn-bottom: #171D33;
  --btn-border: #4E5A85;
  --th-bg: #1D2544;
  --th-text: #FFD37A;
  --capcode: #FF4757;
  --glow: 0 0 10px rgba(255, 71, 87, .5);
}
html[data-theme="july4"] {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(60, 84, 160, .45), transparent 60%),
    linear-gradient(180deg, #0B1024 0%, #080D1C 55%, #05080F 100%);
  background-attachment: fixed;
}
html[data-theme="july4"] body { background: transparent; color: var(--text); }

/* --- the fireworks. Each layer is one burst: a ring of coloured sparks drawn
   with radial gradients, scaled up and faded out on a loop. Three layers on
   staggered delays so bursts overlap the way real ones do. --- */
html:not([data-anim="off"])[data-theme="july4"] body::before,
html:not([data-anim="off"])[data-theme="july4"] body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background:
    radial-gradient(circle 4px at 50% 8%,  #FFE9A8 99%, transparent),
    radial-gradient(circle 4px at 78% 22%, #FF6B7A 99%, transparent),
    radial-gradient(circle 4px at 92% 50%, #8FB6FF 99%, transparent),
    radial-gradient(circle 4px at 78% 78%, #FFE9A8 99%, transparent),
    radial-gradient(circle 4px at 50% 92%, #FF6B7A 99%, transparent),
    radial-gradient(circle 4px at 22% 78%, #8FB6FF 99%, transparent),
    radial-gradient(circle 4px at 8%  50%, #FFE9A8 99%, transparent),
    radial-gradient(circle 4px at 22% 22%, #FF6B7A 99%, transparent),
    radial-gradient(circle 3px at 50% 26%, #FFFFFF 99%, transparent),
    radial-gradient(circle 3px at 74% 50%, #FFFFFF 99%, transparent),
    radial-gradient(circle 3px at 50% 74%, #FFFFFF 99%, transparent),
    radial-gradient(circle 3px at 26% 50%, #FFFFFF 99%, transparent);
  opacity: 0;
  animation: july4-burst 4.5s ease-out infinite;
}
html:not([data-anim="off"])[data-theme="july4"] body::before { top: 8%;  left: 12%; animation-delay: 0s; }
html:not([data-anim="off"])[data-theme="july4"] body::after  { top: 18%; right: 10%; left: auto; animation-delay: 2.2s; }
@keyframes july4-burst {
  0%   { transform: scale(.12); opacity: 0; }
  8%   { opacity: 1; }
  55%  { transform: scale(1); opacity: .85; }
  80%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* embossed, stitched panels — dark leather rather than parchment */
html[data-theme="july4"] .post.reply,
html[data-theme="july4"] .home-box,
html[data-theme="july4"] .mod-queue-item,
html[data-theme="july4"] .mini-reply {
  background: linear-gradient(180deg, #1B2239 0%, #131829 100%);
  border: 1px solid #3A4468;
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(150, 175, 235, .22),
    inset 0 -1px 0 rgba(0, 0, 0, .5),
    0 3px 5px rgba(0, 0, 0, .5);
  outline: 1px dashed rgba(120, 140, 195, .30);
  outline-offset: -4px;
}
html[data-theme="july4"] .post.op {
  background: linear-gradient(180deg, #1A2137, #12172A);
  border: 1px solid #3A4468;
  border-radius: 5px;
  outline: 1px dashed rgba(255, 211, 122, .28);
  outline-offset: -4px;
}
/* brushed brass buttons that actually depress */
html[data-theme="july4"] .wmm-button {
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.06) 0 1px, rgba(0,0,0,0) 1px 3px),
    linear-gradient(180deg, #303A5E 0%, #212940 48%, #171D33 52%, #2A3252 100%);
  border: 1px solid #4E5A85;
  border-radius: 4px;
  color: #FFD37A;
  font-weight: bold;
  text-shadow: 0 -1px 0 rgba(0,0,0,.6);
  box-shadow: inset 0 1px 0 rgba(160, 185, 245, .25), 0 2px 3px rgba(0,0,0,.55);
}
html[data-theme="july4"] .wmm-button:hover { color: #FFE9A8; border-color: #FF5A6A; }
html[data-theme="july4"] .wmm-button:active {
  box-shadow: inset 0 2px 5px rgba(0,0,0,.7);
  transform: translateY(1px);
}
html[data-theme="july4"] .boardlist {
  background: linear-gradient(180deg, #161D38 0%, #0D1224 100%);
  border-bottom: 2px solid #FF4757;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(150,175,235,.18), 0 2px 8px rgba(0,0,0,.6);
}
html[data-theme="july4"] .boardlist a { color: #9FB8FF; text-shadow: 0 -1px 0 rgba(0,0,0,.6); }
html[data-theme="july4"] .boardlist a:hover { color: #FFD37A; }
html[data-theme="july4"] .wmm-title {
  color: #FFD37A;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(255, 211, 122, .55), 0 2px 3px rgba(0,0,0,.7);
}
html[data-theme="july4"] .post-form input[type="text"],
html[data-theme="july4"] .post-form input[type="password"],
html[data-theme="july4"] .post-form input[type="number"],
html[data-theme="july4"] .post-form textarea,
html[data-theme="july4"] #theme-select,
html[data-theme="july4"] #font-select,
html[data-theme="july4"] #anim-select,
html[data-theme="july4"] #layout-select {
  border-radius: 4px;
  background: #10152A;
  color: #EAF0FF;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.6);
}
html[data-theme="july4"] .slide-track {
  background: linear-gradient(180deg, #0D1224, #1B2239);
  border: 1px solid #414C74;
  border-radius: 4px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.6);
}
html[data-theme="july4"] .slide-knob {
  background: linear-gradient(180deg, #2A3252, #171D33);
  border-radius: 3px;
  color: #FFD37A;
  box-shadow: 0 1px 3px rgba(0,0,0,.6);
}
html[data-theme="july4"] hr { border-top: 1px solid rgba(58,68,104,.9); border-bottom: 1px solid rgba(150,175,235,.10); }
html[data-theme="july4"] #mascot { border-color: #3A4468; }

/* =========================================================
   v105: PEPSI — the brand's blue/red/white, kept plain and flat.
   ========================================================= */
html[data-theme="pepsi"] {
  --input-text: #0A1B3D;
  --bg: #F2F6FC;
  --cell: #FFFFFF;
  --cell-border: #C3D4EA;
  --link: #004B93;
  --link-hover: #0A7CD4;
  --title: #004B93;
  --name: #EB1C2D;
  --subject: #004B93;
  --quote: #2C7A3F;
  --text: #14263F;
  --muted: #6C7F99;
  --faint: #9FB2C8;
  --input-bg: #FFFFFF;
  --input-border: #B4CAE4;
  --btn-top: #FFFFFF;
  --btn-bottom: #E4EDF8;
  --btn-border: #B4CAE4;
  --th-bg: #004B93;
  --th-text: #FFFFFF;
  --capcode: #EB1C2D;
  --glow: none;
}
html[data-theme="pepsi"] {
  background: linear-gradient(180deg, #FFFFFF 0%, #EAF1FA 50%, #DCE8F6 100%);
  background-attachment: fixed;
}
html[data-theme="pepsi"] body { background: transparent; color: var(--text); }
html[data-theme="pepsi"] .post.reply,
html[data-theme="pepsi"] .home-box,
html[data-theme="pepsi"] .mod-queue-item,
html[data-theme="pepsi"] .mini-reply {
  background: #FFFFFF;
  border: 1px solid var(--cell-border);
  border-top: 3px solid #004B93;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(20, 60, 110, .12);
}
html[data-theme="pepsi"] .post.op {
  background: #FFFFFF;
  border: 1px solid var(--cell-border);
  border-top: 3px solid #EB1C2D;
  border-radius: 4px;
}
html[data-theme="pepsi"] .wmm-button {
  background: linear-gradient(180deg, #FFFFFF, #E4EDF8);
  border: 1px solid #B4CAE4;
  border-radius: 999px;
  color: #004B93;
  font-weight: bold;
}
html[data-theme="pepsi"] .wmm-button:hover {
  background: linear-gradient(180deg, #FFFFFF, #D6E5F6);
  color: #EB1C2D;
  border-color: #EB1C2D;
}
html[data-theme="pepsi"] .boardlist {
  background: #004B93;
  border-bottom: 3px solid #EB1C2D;
  border-radius: 0;
  box-shadow: none;
}
html[data-theme="pepsi"] .boardlist a { color: #FFFFFF; }
html[data-theme="pepsi"] .boardlist a:hover { color: #FFD2D6; }
html[data-theme="pepsi"] .wmm-title { color: #004B93; letter-spacing: 1px; text-shadow: none; }
html[data-theme="pepsi"] .post-form input[type="text"],
html[data-theme="pepsi"] .post-form input[type="password"],
html[data-theme="pepsi"] .post-form input[type="number"],
html[data-theme="pepsi"] .post-form textarea,
html[data-theme="pepsi"] #theme-select,
html[data-theme="pepsi"] #font-select,
html[data-theme="pepsi"] #anim-select,
html[data-theme="pepsi"] #layout-select { border-radius: 4px; background: #FFFFFF; color: #0A1B3D; }
html[data-theme="pepsi"] .slide-track { background: #EAF1FA; border: 1px solid #B4CAE4; border-radius: 999px; }
html[data-theme="pepsi"] .slide-knob { background: linear-gradient(180deg, #FFFFFF, #DCE8F6); color: #004B93; border-radius: 999px; }
html[data-theme="pepsi"] hr { border-top: 1px solid var(--cell-border); border-bottom: none; }
html[data-theme="pepsi"] #mascot { border-color: #B4CAE4; }

/* ---------- v108: custom CSS editor ---------- */
.css-editor {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100vw - 28px));
  max-height: min(60vh, 520px);
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .4);
  overflow: hidden;
}
.css-editor[hidden] { display: none; }
.css-editor-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--th-bg);
  color: var(--th-text);
  border-bottom: 1px solid var(--cell-border);
  font-size: 13px;
}
.css-editor-head .hint { flex: 1 1 auto; font-size: 11px; opacity: .85; }
.css-editor-head button {
  flex: 0 0 auto;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  color: inherit;
  background: none;
  border: none;
}
.css-editor textarea {
  flex: 1 1 auto;
  min-height: 180px;
  resize: vertical;
  padding: 9px 11px;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: var(--input-text);
  background: var(--input-bg);
  border: none;
  border-radius: 0;
  outline: none;
}
.css-editor-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--cell-border);
}
.css-status { font-size: 11px; color: var(--muted); }
@media (max-width: 640px) {
  .css-editor { right: 6px; bottom: 6px; max-height: 70vh; }
}


/* =========================================================
   v110: MSN — the Messenger window look. Intended for /jan/, though
   nothing stops it being used elsewhere.
   ========================================================= */
html[data-theme="msn"] {
  --input-text: #14304A;
  --bg: #E8F2FB;
  --cell: #FFFFFF;
  --cell-border: #9CBBD6;
  --link: #1B6FB5;
  --link-hover: #2E96E0;
  --title: #1B6FB5;
  --name: #2E7D32;
  --subject: #1B6FB5;
  --quote: #2E7D32;
  --text: #17242E;
  --muted: #6E8A9E;
  --faint: #A6BCCC;
  --input-bg: #FFFFFF;
  --input-border: #A9C6DE;
  --btn-top: #FFFFFF;
  --btn-bottom: #D3E6F7;
  --btn-border: #8FB4D2;
  --th-bg: #2E7CC4;
  --th-text: #FFFFFF;
  --capcode: #E8762C;
  --glow: 0 0 8px rgba(46, 124, 196, .45);
}
html[data-theme="msn"] {
  background: linear-gradient(180deg, #DCEBF9 0%, #C8DDF2 45%, #B7D2EC 100%);
  background-attachment: fixed;
}
html[data-theme="msn"] body { background: transparent; color: var(--text); }
/* the classic blue title bar */
html[data-theme="msn"] .boardlist {
  background: linear-gradient(180deg, #4EA3E4 0%, #2E7CC4 48%, #1F66AC 52%, #2E86CE 100%);
  border-bottom: 1px solid #14486F;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 5px rgba(20, 60, 100, .3);
}
html[data-theme="msn"] .boardlist a { color: #FFFFFF; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
html[data-theme="msn"] .boardlist a:hover { color: #CFE8FF; }
html[data-theme="msn"] .wmm-title {
  color: #1B6FB5;
  letter-spacing: 0;
  text-shadow: 0 1px 0 #FFFFFF;
}
/* panels are the white contact-list card with a soft blue frame */
html[data-theme="msn"] .post.reply,
html[data-theme="msn"] .home-box,
html[data-theme="msn"] .mod-queue-item,
html[data-theme="msn"] .mini-reply,
html[data-theme="msn"] .jan-log,
html[data-theme="msn"] .jan-form {
  background: #FFFFFF;
  border: 1px solid #9CBBD6;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 4px rgba(30, 80, 130, .18);
}
html[data-theme="msn"] .post.op {
  background: #F5FAFF;
  border: 1px solid #9CBBD6;
  border-radius: 6px;
}
/* glossy XP-era buttons */
html[data-theme="msn"] .wmm-button {
  background: linear-gradient(180deg, #FFFFFF 0%, #EAF4FD 46%, #CFE4F7 54%, #FFFFFF 100%);
  border: 1px solid #8FB4D2;
  border-radius: 4px;
  color: #14304A;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 1px 3px rgba(30, 80, 130, .25);
}
html[data-theme="msn"] .wmm-button:hover { border-color: #E8A33C; color: #1B6FB5; }
html[data-theme="msn"] .post-form input[type="text"],
html[data-theme="msn"] .post-form input[type="password"],
html[data-theme="msn"] .post-form input[type="number"],
html[data-theme="msn"] .post-form textarea,
html[data-theme="msn"] .jan-form textarea,
html[data-theme="msn"] #theme-select,
html[data-theme="msn"] #font-select,
html[data-theme="msn"] #anim-select,
html[data-theme="msn"] #layout-select {
  border-radius: 3px;
  background: #FFFFFF;
  color: #14304A;
  border: 1px solid #A9C6DE;
}
/* message bubbles: incoming white, own tinted blue, like the chat window */
html[data-theme="msn"] .jan-msg {
  background: #F7FBFF;
  border: 1px solid #C3DCF0;
  color: #17242E;
}
html[data-theme="msn"] .jan-msg.mine {
  background: linear-gradient(180deg, #E6F2FD, #CFE4F7);
  border-color: #9CBBD6;
  color: #14304A;
}
html[data-theme="msn"] .jan-author.is-admin { color: #E8762C; }
html[data-theme="msn"] .jan-author.is-janny { color: #2E7D32; }
html[data-theme="msn"] .slide-track { background: linear-gradient(180deg, #EAF4FD, #FFFFFF); border: 1px solid #A9C6DE; border-radius: 3px; }
html[data-theme="msn"] .slide-knob { background: linear-gradient(180deg, #FFFFFF, #CFE4F7); color: #14304A; border-radius: 3px; }
html[data-theme="msn"] hr { border-top: 1px solid #9CBBD6; border-bottom: 1px solid #FFFFFF; }
html[data-theme="msn"] #mascot { border-color: #9CBBD6; }

/* ---------- v112: /jan/ replies + nudge ---------- */
.jan-reply-btn {
  font: inherit;
  font-size: 10px;
  padding: 0 4px;
  margin-left: 4px;
  cursor: pointer;
  color: var(--link);
  background: none;
  border: 1px solid transparent;
  border-radius: 3px;
  opacity: 0;
  transition: opacity .12s ease;
}
.jan-msg:hover .jan-reply-btn,
.jan-reply-btn:focus { opacity: 1; }
.jan-reply-btn:hover { color: var(--link-hover); border-color: var(--cell-border); }

.jan-quote {
  font-size: 11px;
  line-height: 1.3;
  margin: 0 0 3px;
  padding: 3px 7px;
  cursor: pointer;
  color: var(--muted);
  background: rgba(127, 127, 127, .12);
  border-left: 3px solid var(--name);
  border-radius: 3px;
  /* one line only — the quote is a pointer, not a copy */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jan-quote:hover { color: var(--text); }
.jan-quote-who { font-weight: bold; color: var(--name); }
.jan-quote-gone { cursor: default; font-style: italic; }
.jan-flash { animation: jan-flash 1.2s ease-out; }
@keyframes jan-flash {
  0% { box-shadow: 0 0 0 2px var(--name); }
  100% { box-shadow: 0 0 0 2px transparent; }
}

.jan-nudge {
  align-self: center;
  max-width: 90%;
  font-size: 11px;
  text-align: center;
  padding: 3px 12px;
  color: var(--capcode);
  background: rgba(127, 127, 127, .1);
  border: 1px dashed var(--capcode);
  border-radius: 999px;
}

.jan-replying {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 8px;
  color: var(--muted);
  background: rgba(127, 127, 127, .12);
  border-left: 3px solid var(--name);
  border-radius: 3px;
}
.jan-replying[hidden] { display: none; }
.jan-replying strong { color: var(--name); }
.jan-replying span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jan-replying button {
  font: inherit; font-size: 14px; line-height: 1;
  padding: 0 3px; cursor: pointer;
  color: inherit; background: none; border: none;
}

/* the nudge shake — the whole window judders, like MSN did */
@keyframes jan-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-6px, 3px); }
  20% { transform: translate(6px, -3px); }
  30% { transform: translate(-5px, -2px); }
  40% { transform: translate(5px, 2px); }
  50% { transform: translate(-4px, 2px); }
  60% { transform: translate(4px, -2px); }
  70% { transform: translate(-3px, 1px); }
  80% { transform: translate(3px, -1px); }
  90% { transform: translate(-2px, 0); }
}
body.jan-shaking { animation: jan-shake .7s ease-in-out; }
@media (prefers-reduced-motion: reduce) { body.jan-shaking { animation: none; } }

/* ---------- v113: /jan/ typing indicator ---------- */
.jan-typing {
  min-height: 15px;
  padding: 0 4px;
  font-size: 11px;
  font-style: italic;
  color: var(--muted);
}
.jan-typing[hidden] { display: none; }

/* ---------- v115: polls ---------- */
.poll {
  /* flow-root makes this a block formatting context so the bordered box sits
     BESIDE the post's floated image instead of sliding underneath it — without
     it the card's background started at the image's left edge and the whole
     poll looked shunted out of place. */
  display: flow-root;
  margin: 6px 0;
  padding: 8px 10px;
  background: rgba(127, 127, 127, .08);
  border: 1px solid var(--cell-border);
  border-radius: 6px;
  max-width: 420px;
}
.poll-head { font-size: 12px; font-weight: bold; color: var(--subject); margin-bottom: 6px; }
.poll-options { display: flex; flex-direction: column; gap: 4px; }
.poll-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 9px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 4px;
}
.poll-opt:hover { border-color: var(--link); }
.poll-opt.voted { border-color: var(--name); font-weight: bold; }
/* the fill sits behind the label rather than beside it */
.poll-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--name);
  opacity: .22;
  transition: width .35s ease;
  pointer-events: none;
}
.poll-label { position: relative; flex: 1 1 auto; }
.poll-count { position: relative; font-size: 11px; color: var(--muted); white-space: nowrap; }
.poll-total { font-size: 11px; color: var(--muted); margin-top: 5px; }
.poll-field { display: block; width: 100%; max-width: 320px; margin-bottom: 3px; }
.poll-fields[hidden] { display: none; }

/* =========================================================
   v115: NATE — skeuomorphic. Built around the man himself: the red and
   charcoal of his shirt, blond hair yellow, and the silver-and-gold of
   that first-place medal. Real depth throughout — embossed panels,
   brushed metal, stitched seams, and Nate watching from the corner.
   ========================================================= */
html[data-theme="nate"] {
  --input-text: #241A0E;
  --bg: #EDE4D2;
  --cell: #F7F0E1;
  --cell-border: #A8987C;
  --link: #B3271F;
  --link-hover: #E04A38;
  --title: #B3271F;
  --name: #8A6A1E;
  --subject: #6E5A2A;
  --quote: #4B6B2A;
  --text: #2B2419;
  --muted: #7B6E58;
  --faint: #A69A82;
  --input-bg: #FFFBF0;
  --input-border: #B5A585;
  --btn-top: #FDF8EA;
  --btn-bottom: #D8CBAE;
  --btn-border: #93825F;
  --th-bg: #3A3A3A;
  --th-text: #F0D77A;
  --capcode: #B3271F;
  --glow: 0 0 8px rgba(179, 39, 31, .35);
}
html[data-theme="nate"] {
  background:
    /* woven canvas texture, like his shirt up close */
    repeating-linear-gradient(90deg, rgba(120, 100, 70, .05) 0 1px, rgba(0,0,0,0) 1px 4px),
    repeating-linear-gradient(0deg, rgba(120, 100, 70, .05) 0 1px, rgba(0,0,0,0) 1px 4px),
    linear-gradient(180deg, #F2EADA 0%, #E6DAC3 55%, #DACBAE 100%);
  background-attachment: fixed;
}
html[data-theme="nate"] body { background: transparent; color: var(--text); }
/* the man himself, parked bottom-right, watching */
html[data-theme="nate"] body::after {
  content: "";
  position: fixed;
  right: 8px;
  bottom: 0;
  width: 118px;
  height: 320px;
  z-index: -1;
  pointer-events: none;
  /* Higher opacity + no muddy drop-shadow so he reads as a clean transparent
     cutout against the textured background rather than a shaded box. A soft
     white halo lifts his outline off the canvas without boxing him in. */
  opacity: .82;
  background: url("assets/img/nate.png") no-repeat bottom right / contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .22));
}
@media (max-width: 900px) { html[data-theme="nate"] body::after { display: none; } }

/* embossed, stitched panels */
html[data-theme="nate"] .post.reply,
html[data-theme="nate"] .home-box,
html[data-theme="nate"] .mod-queue-item,
html[data-theme="nate"] .mini-reply {
  background: linear-gradient(180deg, #FFFBF0 0%, #EFE5CE 100%);
  border: 1px solid #A8987C;
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(130, 110, 70, .3),
    0 2px 4px rgba(90, 70, 35, .3);
  outline: 1px dashed rgba(168, 152, 124, .6);
  outline-offset: -4px;
}
html[data-theme="nate"] .post.op {
  background: linear-gradient(180deg, #FFFBF0, #EADFC4);
  border: 1px solid #A8987C;
  border-radius: 5px;
  outline: 1px dashed rgba(179, 39, 31, .3);
  outline-offset: -4px;
}
/* the medal: brushed silver rim, gold face, and it presses in */
html[data-theme="nate"] .wmm-button {
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.4) 0 1px, rgba(0,0,0,0) 1px 3px),
    linear-gradient(180deg, #FDF8EA 0%, #E8DCBE 46%, #D2C29E 54%, #F5EEDA 100%);
  border: 1px solid #93825F;
  border-radius: 4px;
  color: #3A2E14;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 3px rgba(90, 70, 35, .35);
}
html[data-theme="nate"] .wmm-button:hover { color: #B3271F; border-color: #B3271F; }
html[data-theme="nate"] .wmm-button:active {
  box-shadow: inset 0 2px 5px rgba(90, 70, 35, .5);
  transform: translateY(1px);
}
/* his charcoal shirt with the red sleeves */
html[data-theme="nate"] .boardlist {
  background: linear-gradient(180deg, #4A4A4A 0%, #333333 50%, #2A2A2A 100%);
  border-bottom: 3px solid #B3271F;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 6px rgba(0,0,0,.45);
}
html[data-theme="nate"] .boardlist a { color: #F0D77A; text-shadow: 0 1px 1px rgba(0,0,0,.6); }
html[data-theme="nate"] .boardlist a:hover { color: #FFFFFF; }
html[data-theme="nate"] .wmm-title {
  color: #B3271F;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #FFFFFF, 0 2px 3px rgba(90, 70, 35, .5);
}
html[data-theme="nate"] .post-form input[type="text"],
html[data-theme="nate"] .post-form input[type="password"],
html[data-theme="nate"] .post-form input[type="number"],
html[data-theme="nate"] .post-form textarea,
html[data-theme="nate"] #theme-select,
html[data-theme="nate"] #font-select,
html[data-theme="nate"] #anim-select,
html[data-theme="nate"] #layout-select {
  border-radius: 4px;
  background: #FFFBF0;
  color: #241A0E;
  box-shadow: inset 0 2px 3px rgba(130, 110, 70, .3);
}
html[data-theme="nate"] .slide-track {
  background: linear-gradient(180deg, #E8DCBE, #FDF8EA);
  border: 1px solid #B5A585;
  border-radius: 4px;
  box-shadow: inset 0 2px 3px rgba(130, 110, 70, .35);
}
html[data-theme="nate"] .slide-knob {
  background: linear-gradient(180deg, #FDF8EA, #D2C29E);
  border-radius: 3px;
  color: #3A2E14;
  box-shadow: 0 1px 2px rgba(90, 70, 35, .4);
}
html[data-theme="nate"] hr { border-top: 1px solid rgba(168, 152, 124, .8); border-bottom: 1px solid rgba(255,255,255,.7); }
html[data-theme="nate"] #mascot { border-color: #A8987C; }

/* =========================================================
   v164: "Lars" theme — a companion to Nate for the guy in Mason's drawing.
   Warm military-canvas palette pulled from his art: mustard-gold shirt, olive
   fatigues, charcoal vest, gunmetal accents. Lars himself is parked bottom-right
   (body::after), same as Nate. Same embossed/stitched panel treatment.
   ========================================================= */
html[data-theme="lars"] {
  --input-text: #1E1B0E;
  --bg: #DED8C0;
  --cell: #EFE9D2;
  --cell-border: #948A66;
  --link: #7C6A16;
  --link-hover: #B79A25;
  --title: #6B6A2E;
  --name: #8A6A1E;
  --subject: #55592A;
  --quote: #4B6B2A;
  --text: #262316;
  --muted: #6F6A50;
  --faint: #9E977C;
  --input-bg: #FAF6E6;
  --input-border: #A79C78;
  --btn-top: #F3EFDB;
  --btn-bottom: #C9BE93;
  --btn-border: #857A54;
  --th-bg: #33331F;
  --th-text: #D9B441;
  --capcode: #B3271F;
  --glow: 0 0 8px rgba(124, 106, 22, .35);
}
html[data-theme="lars"] {
  background:
    /* woven canvas / fatigue-cloth texture */
    repeating-linear-gradient(90deg, rgba(90, 80, 40, .05) 0 1px, rgba(0,0,0,0) 1px 4px),
    repeating-linear-gradient(0deg, rgba(90, 80, 40, .05) 0 1px, rgba(0,0,0,0) 1px 4px),
    linear-gradient(180deg, #E6DFC6 0%, #D8CFAF 55%, #C7BC97 100%);
  background-attachment: fixed;
}
html[data-theme="lars"] body { background: transparent; color: var(--text); }
/* the man himself, parked bottom-right (he's holding the gun and the baby) */
html[data-theme="lars"] body::after {
  content: "";
  position: fixed;
  right: 6px;
  bottom: 0;
  width: 300px;
  height: 272px;
  z-index: -1;
  pointer-events: none;
  opacity: .82;
  background: url("assets/img/lars.png") no-repeat bottom right / contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .22));
}
@media (max-width: 1100px) { html[data-theme="lars"] body::after { display: none; } }

/* embossed, stitched panels */
html[data-theme="lars"] .post.reply,
html[data-theme="lars"] .home-box,
html[data-theme="lars"] .mod-queue-item,
html[data-theme="lars"] .mini-reply {
  background: linear-gradient(180deg, #FAF6E6 0%, #E9E0C6 100%);
  border: 1px solid #948A66;
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(110, 95, 55, .3),
    0 2px 4px rgba(70, 60, 30, .3);
  outline: 1px dashed rgba(148, 138, 102, .6);
  outline-offset: -4px;
}
html[data-theme="lars"] .post.op {
  background: linear-gradient(180deg, #FAF6E6, #E4DABC);
  border: 1px solid #948A66;
  border-radius: 5px;
  outline: 1px dashed rgba(124, 106, 22, .35);
  outline-offset: -4px;
}
/* gunmetal buttons — brushed steel like the pistol */
html[data-theme="lars"] .wmm-button {
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.35) 0 1px, rgba(0,0,0,0) 1px 3px),
    linear-gradient(180deg, #F3EFDB 0%, #DDD2AE 46%, #C6BB94 54%, #EFE9D2 100%);
  border: 1px solid #857A54;
  border-radius: 4px;
  color: #33301A;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255,255,255,.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 3px rgba(70, 60, 30, .35);
}
html[data-theme="lars"] .wmm-button:hover { color: #7C6A16; border-color: #7C6A16; }
html[data-theme="lars"] .wmm-button:active {
  box-shadow: inset 0 2px 5px rgba(70, 60, 30, .5);
  transform: translateY(1px);
}
/* his charcoal vest with the mustard trim */
html[data-theme="lars"] .boardlist {
  background: linear-gradient(180deg, #444236 0%, #333127 50%, #2A281F 100%);
  border-bottom: 3px solid #C99A2E;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 2px 6px rgba(0,0,0,.45);
}
html[data-theme="lars"] .boardlist a { color: #D9B441; text-shadow: 0 1px 1px rgba(0,0,0,.6); }
html[data-theme="lars"] .boardlist a:hover { color: #FFF3CC; }
html[data-theme="lars"] .wmm-title {
  color: #6B6A2E;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #FFFFFF, 0 2px 3px rgba(70, 60, 30, .5);
}
html[data-theme="lars"] .post-form input[type="text"],
html[data-theme="lars"] .post-form input[type="password"],
html[data-theme="lars"] .post-form input[type="number"],
html[data-theme="lars"] .post-form textarea,
html[data-theme="lars"] #theme-select,
html[data-theme="lars"] #font-select,
html[data-theme="lars"] #anim-select,
html[data-theme="lars"] #layout-select {
  border-radius: 4px;
  background: #FAF6E6;
  color: #1E1B0E;
  box-shadow: inset 0 2px 3px rgba(110, 95, 55, .3);
}
html[data-theme="lars"] .slide-track {
  background: linear-gradient(180deg, #DDD2AE, #F3EFDB);
  border: 1px solid #A79C78;
  border-radius: 4px;
  box-shadow: inset 0 2px 3px rgba(110, 95, 55, .35);
}
html[data-theme="lars"] .slide-knob {
  background: linear-gradient(180deg, #F3EFDB, #C6BB94);
  border-radius: 3px;
  color: #33301A;
  box-shadow: 0 1px 2px rgba(70, 60, 30, .4);
}
html[data-theme="lars"] hr { border-top: 1px solid rgba(148, 138, 102, .8); border-bottom: 1px solid rgba(255,255,255,.7); }
html[data-theme="lars"] #mascot { border-color: #948A66; }

/* =========================================================
   v165: "Raid" theme — skeuomorphic military JUNGLE. Deep canopy greens, a
   dappled camo backdrop, olive-drab metal panels with rivets/stencil edges,
   ammo-can buttons. Built for /raid/ (SHADOW LEGENDS).
   ========================================================= */
html[data-theme="raid"] {
  --input-text: #E8F0DA;
  --bg: #1C2A16;
  --cell: #26361D;
  --cell-border: #4E6238;
  --link: #A9C24A;
  --link-hover: #D4E86A;
  --title: #C7D98A;
  --name: #8FB24A;
  --subject: #B7C77E;
  --quote: #6FA03A;
  --text: #DCE7C6;
  --muted: #8A9A72;
  --faint: #5E6E48;
  --input-bg: #1A2612;
  --input-border: #4E6238;
  --btn-top: #3C4E2A;
  --btn-bottom: #24331A;
  --btn-border: #5A7038;
  --th-bg: #2A3A1C;
  --th-text: #C7D98A;
  --capcode: #C9A227;
  --glow: 0 0 8px rgba(169, 194, 74, .35);
}
html[data-theme="raid"] {
  background:
    /* skeuomorphic grass: layered blades in varied greens over soil */
    repeating-linear-gradient(88deg, rgba(40, 74, 28, .55) 0 2px, rgba(0,0,0,0) 2px 5px),
    repeating-linear-gradient(92deg, rgba(74, 108, 40, .45) 0 2px, rgba(0,0,0,0) 2px 6px),
    repeating-linear-gradient(90deg, rgba(96, 132, 52, .4) 0 1px, rgba(0,0,0,0) 1px 4px),
    radial-gradient(ellipse 200px 60px at 20% 30%, rgba(120, 160, 66, .35) 0 55%, rgba(0,0,0,0) 60%),
    radial-gradient(ellipse 240px 70px at 74% 66%, rgba(86, 122, 46, .35) 0 55%, rgba(0,0,0,0) 60%),
    linear-gradient(180deg, #3E5A26 0%, #2F4A1E 55%, #24391A 100%);
  background-attachment: fixed;
}
html[data-theme="raid"] body { background: transparent; color: var(--text); }
/* faint dog-tag / palm-frond silhouette watermark bottom-right */
html[data-theme="raid"] body::after {
  content: "";
  position: fixed;
  right: 0; bottom: 0;
  width: 340px; height: 340px;
  z-index: -1; pointer-events: none;
  opacity: .12;
  background:
    conic-gradient(from 210deg at 80% 100%, rgba(169,194,74,.5) 0 18deg, rgba(0,0,0,0) 18deg 42deg,
      rgba(169,194,74,.4) 42deg 60deg, rgba(0,0,0,0) 60deg 84deg, rgba(169,194,74,.35) 84deg 102deg, rgba(0,0,0,0) 102deg 360deg);
}
/* light-brown canvas/wood tiles for threads + replies (riveted, stitched) */
html[data-theme="raid"] .post.reply,
html[data-theme="raid"] .home-box,
html[data-theme="raid"] .mod-queue-item,
html[data-theme="raid"] .mini-reply {
  background:
    radial-gradient(circle at 6px 6px, rgba(90,60,30,.4) 0 2px, rgba(0,0,0,0) 3px),
    radial-gradient(circle at calc(100% - 6px) 6px, rgba(90,60,30,.4) 0 2px, rgba(0,0,0,0) 3px),
    radial-gradient(circle at 6px calc(100% - 6px), rgba(90,60,30,.4) 0 2px, rgba(0,0,0,0) 3px),
    radial-gradient(circle at calc(100% - 6px) calc(100% - 6px), rgba(90,60,30,.4) 0 2px, rgba(0,0,0,0) 3px),
    linear-gradient(180deg, #D8C29A 0%, #CBB185 55%, #BC9F71 100%);
  border: 1px solid #8A6E45;
  border-radius: 4px;
  color: #2E2413;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 220, .55),
    inset 0 -2px 4px rgba(80, 55, 25, .3),
    0 3px 6px rgba(0, 0, 0, .45);
  outline: 1px dashed rgba(120, 90, 50, .45);
  outline-offset: -4px;
}
html[data-theme="raid"] .post.reply,
html[data-theme="raid"] .post.reply .body,
html[data-theme="raid"] .home-box,
html[data-theme="raid"] .mini-reply { color: #2E2413; }
html[data-theme="raid"] .post.op {
  background:
    radial-gradient(circle at 6px 6px, rgba(90,60,30,.4) 0 2px, rgba(0,0,0,0) 3px),
    radial-gradient(circle at calc(100% - 6px) 6px, rgba(90,60,30,.4) 0 2px, rgba(0,0,0,0) 3px),
    linear-gradient(180deg, #DFC9A2, #C9AF82);
  border: 1px solid #9A7B4E;
  border-radius: 4px;
  color: #2E2413;
  outline: 1px dashed rgba(120, 90, 50, .5);
  outline-offset: -4px;
}
html[data-theme="raid"] .post.op .body { color: #2E2413; }
/* readable ink on the light-brown tiles */
html[data-theme="raid"] .post .name,
html[data-theme="raid"] .post .subject { color: #5A3D18; }
html[data-theme="raid"] .post .post_no,
html[data-theme="raid"] .post time,
html[data-theme="raid"] .post .rel-time,
html[data-theme="raid"] .post-edited { color: #6B5836; }
html[data-theme="raid"] .post a { color: #7A4A12; }
html[data-theme="raid"] .post a:hover { color: #A5610F; }
html[data-theme="raid"] .post .greentext { color: #4A6A1E; }
/* ammo-can / stamped-steel buttons */
html[data-theme="raid"] .wmm-button {
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.06) 0 1px, rgba(0,0,0,0) 1px 3px),
    linear-gradient(180deg, #46592F 0%, #33461F 48%, #263519 52%, #3B4E27 100%);
  border: 1px solid #5A7038;
  border-radius: 3px;
  color: #E4EFCB;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-shadow: 0 1px 1px rgba(0,0,0,.6);
  box-shadow: inset 0 1px 0 rgba(180,200,130,.25), 0 2px 3px rgba(0,0,0,.5);
}
html[data-theme="raid"] .wmm-button:hover { color: #D4E86A; border-color: #A9C24A; }
html[data-theme="raid"] .wmm-button:active {
  box-shadow: inset 0 2px 5px rgba(0,0,0,.6);
  transform: translateY(1px);
}
/* the nav = a stencilled ammo crate lid */
html[data-theme="raid"] .boardlist {
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,.12) 0 2px, rgba(0,0,0,0) 2px 6px),
    linear-gradient(180deg, #35471F 0%, #283A18 50%, #1F2C14 100%);
  border-bottom: 3px solid #C9A227;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(180,200,130,.15), 0 2px 8px rgba(0,0,0,.6);
}
html[data-theme="raid"] .boardlist a { color: #C7D98A; text-shadow: 0 1px 1px rgba(0,0,0,.7); }
html[data-theme="raid"] .boardlist a:hover { color: #EEF6C8; }
html[data-theme="raid"] .wmm-title {
  color: #C7D98A;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #101808, 0 2px 4px rgba(0,0,0,.7);
}
html[data-theme="raid"] .post-form input[type="text"],
html[data-theme="raid"] .post-form input[type="password"],
html[data-theme="raid"] .post-form input[type="number"],
html[data-theme="raid"] .post-form textarea,
html[data-theme="raid"] #theme-select,
html[data-theme="raid"] #font-select,
html[data-theme="raid"] #anim-select,
html[data-theme="raid"] #layout-select {
  border-radius: 3px;
  background: #1A2612;
  color: #E8F0DA;
  border: 1px solid #4E6238;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5);
}
html[data-theme="raid"] .slide-track {
  background: linear-gradient(180deg, #26361D, #1A2612);
  border: 1px solid #4E6238;
  border-radius: 3px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.55);
}
html[data-theme="raid"] .slide-knob {
  background: linear-gradient(180deg, #46592F, #26361D);
  border: 1px solid #5A7038;
  border-radius: 3px;
  color: #E4EFCB;
  box-shadow: 0 1px 2px rgba(0,0,0,.6);
}
html[data-theme="raid"] hr { border-top: 1px solid rgba(78, 98, 56, .8); border-bottom: 1px solid rgba(180,200,130,.15); }
html[data-theme="raid"] #mascot { border-color: #5A7038; }

/* =========================================================
   v166: "Farm" theme — Frutiger Aero: glossy glass panels, a bright blue-sky
   to green-meadow gradient, bubbly rounded chrome. Mapped to /farm/ by dynamic.
   ========================================================= */
html[data-theme="farm"] {
  --input-text: #0E2A3A;
  --bg: #BFE8FF;
  --cell: rgba(255, 255, 255, 0.62);
  --cell-border: rgba(120, 180, 210, 0.7);
  --link: #0A78C4;
  --link-hover: #0AA0E0;
  --title: #1B7FB8;
  --name: #2E8B3D;
  --subject: #1C7A46;
  --quote: #3B9A2A;
  --text: #123244;
  --muted: #5E7E8E;
  --faint: #8FB6C6;
  --input-bg: rgba(255, 255, 255, 0.85);
  --input-border: #8FC4DE;
  --btn-top: rgba(255, 255, 255, 0.9);
  --btn-bottom: rgba(200, 235, 250, 0.9);
  --btn-border: #7FB6D6;
  --th-bg: rgba(120, 195, 120, 0.35);
  --th-text: #14603A;
  --capcode: #E8762C;
  --glow: 0 0 10px rgba(120, 200, 255, .5);
}
html[data-theme="farm"] {
  background:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.7) 0 6%, rgba(255,255,255,0) 30%),
    radial-gradient(circle at 82% 10%, rgba(255,255,255,.5) 0 5%, rgba(255,255,255,0) 26%),
    linear-gradient(180deg, #6FC8F5 0%, #A9E4FF 34%, #CFF3D2 60%, #8FD86E 100%);
  background-attachment: fixed;
}
html[data-theme="farm"] body { background: transparent; color: var(--text); }
/* floating glass bubbles watermark */
html[data-theme="farm"] body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 12% 78%, rgba(255,255,255,.45) 0 3%, rgba(255,255,255,0) 4%),
    radial-gradient(circle at 88% 70%, rgba(255,255,255,.4) 0 2.4%, rgba(255,255,255,0) 3.4%),
    radial-gradient(circle at 60% 85%, rgba(255,255,255,.35) 0 2%, rgba(255,255,255,0) 3%),
    radial-gradient(circle at 34% 90%, rgba(255,255,255,.3) 0 1.6%, rgba(255,255,255,0) 2.6%);
}
/* glossy frosted-glass panels */
html[data-theme="farm"] .post.reply,
html[data-theme="farm"] .home-box,
html[data-theme="farm"] .mod-queue-item,
html[data-theme="farm"] .mini-reply,
html[data-theme="farm"] .post.op {
  background:
    linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.5) 45%, rgba(220,240,250,.45) 55%, rgba(255,255,255,.6) 100%);
  border: 1px solid rgba(150, 200, 225, .8);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 4px 14px rgba(60, 130, 175, .28);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
/* glossy aqua gel buttons */
html[data-theme="farm"] .wmm-button {
  background:
    linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(215,240,252,.95) 48%, rgba(175,220,245,.95) 52%, rgba(230,248,255,.95) 100%);
  border: 1px solid #7FB6D6;
  border-radius: 11px;
  color: #0C4A70;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 5px rgba(60,130,175,.35);
}
html[data-theme="farm"] .wmm-button:hover { color: #0AA0E0; border-color: #0AA0E0; }
html[data-theme="farm"] .wmm-button:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(60,130,175,.4); }
/* v227: the proper Frutiger Aero glass nav bar (the /calm/ one) — the old flat
   blue gradient didn't match the rest of the theme's glossy chrome */
html[data-theme="farm"] .boardlist {
  background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(190,230,250,.85) 48%, rgba(140,205,240,.85) 52%, rgba(205,238,255,.9) 100%);
  border-bottom: 2px solid rgba(110, 180, 220, .9);
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 8px rgba(30, 110, 170, .25);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
html[data-theme="farm"] .boardlist a { color: #0a6aa8; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
html[data-theme="farm"] .boardlist a:hover { color: #0e8a4a; }
html[data-theme="farm"] .wmm-title {
  color: #1B7FB8;
  text-shadow: 0 1px 0 #FFFFFF, 0 2px 6px rgba(120, 200, 255, .5);
}
html[data-theme="farm"] .post-form input[type="text"],
html[data-theme="farm"] .post-form input[type="password"],
html[data-theme="farm"] .post-form input[type="number"],
html[data-theme="farm"] .post-form textarea,
html[data-theme="farm"] #theme-select,
html[data-theme="farm"] #font-select,
html[data-theme="farm"] #anim-select,
html[data-theme="farm"] #layout-select {
  border-radius: 8px;
  background: rgba(255,255,255,.85);
  color: #0E2A3A;
  border: 1px solid #8FC4DE;
  box-shadow: inset 0 1px 3px rgba(60,130,175,.25);
}
html[data-theme="farm"] .slide-track {
  background: linear-gradient(180deg, rgba(215,240,252,.9), rgba(255,255,255,.9));
  border: 1px solid #8FC4DE; border-radius: 11px;
  box-shadow: inset 0 1px 3px rgba(60,130,175,.3);
}
html[data-theme="farm"] .slide-knob {
  background: linear-gradient(180deg, #FFFFFF, #BFE3F7);
  border: 1px solid #7FB6D6; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(60,130,175,.4);
}
html[data-theme="farm"] hr { border-top: 1px solid rgba(150,200,225,.7); border-bottom: 1px solid rgba(255,255,255,.8); }
html[data-theme="farm"] #mascot { border-color: #8FC4DE; }

/* ============================================================
   v229: Kirby — a pink/yellow farm-style theme. Same glossy
   frosted-glass structure as Farm, but a bubblegum-pink sky
   fading to buttery yellow, with star sparkles instead of
   bubbles.
   ============================================================ */
html[data-theme="kirby"] {
  --input-text: #5A2138;
  --bg: #FFD6EC;
  --cell: rgba(255, 255, 255, 0.66);
  --cell-border: rgba(240, 160, 200, 0.7);
  --link: #E4498E;
  --link-hover: #F76FB0;
  --title: #E24E97;
  --name: #E68A00;
  --subject: #D2691E;
  --quote: #4FA845;
  --text: #5A2138;
  --muted: #A96B87;
  --faint: #E7A8C8;
  --input-bg: rgba(255, 255, 255, 0.9);
  --input-border: #F2A6CC;
  --btn-top: rgba(255, 255, 255, 0.92);
  --btn-bottom: rgba(255, 224, 240, 0.92);
  --btn-border: #F192BE;
  --th-bg: rgba(255, 214, 90, 0.35);
  --th-text: #9A5A00;
  --capcode: #E24E97;
  --glow: 0 0 10px rgba(255, 170, 210, .6);
}
html[data-theme="kirby"] {
  background:
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.75) 0 6%, rgba(255,255,255,0) 30%),
    radial-gradient(circle at 82% 10%, rgba(255,255,255,.55) 0 5%, rgba(255,255,255,0) 26%),
    linear-gradient(180deg, #FF9CCB 0%, #FFB6D9 32%, #FFE1A8 66%, #FFF3B0 100%);
  background-attachment: fixed;
}
html[data-theme="kirby"] body { background: transparent; color: var(--text); }
/* floating star sparkles watermark */
html[data-theme="kirby"] body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 12% 78%, rgba(255,255,255,.55) 0 2.6%, rgba(255,255,255,0) 3.6%),
    radial-gradient(circle at 88% 70%, rgba(255,248,180,.55) 0 2.2%, rgba(255,248,180,0) 3.2%),
    radial-gradient(circle at 60% 86%, rgba(255,255,255,.45) 0 1.8%, rgba(255,255,255,0) 2.8%),
    radial-gradient(circle at 34% 90%, rgba(255,224,240,.5) 0 1.6%, rgba(255,224,240,0) 2.6%),
    radial-gradient(circle at 74% 92%, rgba(255,248,180,.4) 0 1.4%, rgba(255,248,180,0) 2.4%);
}
/* glossy frosted-glass panels */
html[data-theme="kirby"] .post.reply,
html[data-theme="kirby"] .home-box,
html[data-theme="kirby"] .mod-queue-item,
html[data-theme="kirby"] .mini-reply,
html[data-theme="kirby"] .post.op {
  background:
    linear-gradient(180deg, rgba(255,255,255,.9) 0%, rgba(255,240,248,.55) 45%, rgba(255,230,244,.5) 55%, rgba(255,250,235,.65) 100%);
  border: 1px solid rgba(240, 165, 205, .85);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 4px 14px rgba(220, 110, 165, .28);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
/* glossy pink gel buttons */
html[data-theme="kirby"] .wmm-button {
  background:
    linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,225,240,.96) 48%, rgba(255,190,220,.96) 52%, rgba(255,240,248,.96) 100%);
  border: 1px solid #F192BE;
  border-radius: 13px;
  color: #B23277;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 5px rgba(220,110,165,.35);
}
html[data-theme="kirby"] .wmm-button:hover { color: #F76FB0; border-color: #F76FB0; }
html[data-theme="kirby"] .wmm-button:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(220,110,165,.4); }
/* candy-glass nav bar: pink into yellow */
html[data-theme="kirby"] .boardlist {
  background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(255,200,225,.85) 46%, rgba(255,225,168,.85) 54%, rgba(255,243,176,.9) 100%);
  border-bottom: 2px solid rgba(240, 150, 195, .9);
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 8px rgba(220, 110, 165, .25);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
html[data-theme="kirby"] .boardlist a { color: #D63A85; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
html[data-theme="kirby"] .boardlist a:hover { color: #E68A00; }
html[data-theme="kirby"] .wmm-title {
  color: #E24E97;
  text-shadow: 0 1px 0 #FFFFFF, 0 2px 6px rgba(255, 170, 210, .6);
}
html[data-theme="kirby"] .post-form input[type="text"],
html[data-theme="kirby"] .post-form input[type="password"],
html[data-theme="kirby"] .post-form input[type="number"],
html[data-theme="kirby"] .post-form textarea,
html[data-theme="kirby"] #theme-select,
html[data-theme="kirby"] #font-select,
html[data-theme="kirby"] #anim-select,
html[data-theme="kirby"] #layout-select {
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  color: #5A2138;
  border: 1px solid #F2A6CC;
  box-shadow: inset 0 1px 3px rgba(220,110,165,.22);
}
html[data-theme="kirby"] .slide-track {
  background: linear-gradient(180deg, rgba(255,225,240,.9), rgba(255,255,255,.9));
  border: 1px solid #F2A6CC; border-radius: 11px;
  box-shadow: inset 0 1px 3px rgba(220,110,165,.3);
}
html[data-theme="kirby"] .slide-knob {
  background: linear-gradient(180deg, #FFFFFF, #FFC7E1);
  border: 1px solid #F192BE; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(220,110,165,.4);
}
html[data-theme="kirby"] hr { border-top: 1px solid rgba(240,170,205,.7); border-bottom: 1px solid rgba(255,255,255,.85); }
html[data-theme="kirby"] #mascot { border-color: #F2A6CC; }

/* ---------- v117: catalog ---------- */
.cat-sort { margin: 6px 0 10px; font-size: 12px; }
.cat-sort-cur { color: var(--name); font-weight: bold; }
.cat-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 14px;
}
.cat-tile {
  display: block;
  width: 170px;
  padding: 5px;
  border: 1px solid var(--post-border);
  background: var(--post-bg);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.cat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
  z-index: 2;
  position: relative;
}
/* the hovered tile grows past its box instead of pushing the grid around */
.cat-tile:hover .cat-text { max-height: 220px; }
.cat-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  overflow: hidden;
}
.cat-img { max-width: 100%; max-height: 130px; object-fit: contain; }
/* video tile: the muted metadata <video> paints its first frame, and a play
   badge floats over it so it reads as a clip rather than a still. */
.cat-vidwrap { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.cat-vid-media { max-width: 100%; max-height: 130px; object-fit: contain; background: #000; }
.cat-playbadge {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  padding-left: 3px; /* nudge the triangle to look centered */
  font-size: 17px;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  pointer-events: none;
}
.cat-noimg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  color: var(--muted);
  border: 1px dashed var(--post-border);
}
.cat-noimg.cat-vid, .cat-noimg.cat-aud { font-size: 26px; }
.cat-noimg span { font-size: 11px; }
.cat-stats { font-size: 11px; color: var(--muted); text-align: center; padding: 3px 0 2px; }
.cat-stats strong { color: var(--text); }
.cat-flag { margin-left: 4px; }
.cat-text {
  font-size: 11px;
  line-height: 1.3;
  max-height: 74px;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  transition: max-height .12s ease;
}
.cat-subject { color: var(--subject, var(--name)); font-weight: bold; }
.cat-empty { color: var(--muted); font-style: italic; }
.cat-locked { color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  .cat-tile { width: 46%; }
  .cat-thumb { height: 110px; }
  .cat-img { max-height: 110px; }
}

/* ---------- v117: editing your own /jan/ message ---------- */
.jan-edit-btn {
  background: none;
  border: none;
  padding: 0 2px;
  font: inherit;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
}
.jan-edit-btn:hover { color: var(--link); }
.jan-del-btn {
  background: none;
  border: none;
  padding: 0 2px;
  font: inherit;
  font-size: 11px;
  color: #cc2f26;
  cursor: pointer;
  text-decoration: underline;
}
.jan-del-btn:hover { color: #ff3b30; }
.jan-edited { font-size: 10px; color: var(--muted); font-style: italic; margin-left: 3px; }
.jan-edit-box { margin: 3px 0; }
.jan-edit-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 13px;
  color: var(--input-text, var(--text));
  background: var(--input-bg, #fff);
  border: 1px solid var(--post-border);
  padding: 4px 6px;
  resize: none;
  overflow-y: auto;
}
.jan-edit-hint { font-size: 10px; color: var(--muted); margin-top: 2px; }
.jan-edit-hint a { color: var(--link); }
.jan-legacy-editing { outline: 1px dashed var(--link); outline-offset: 2px; }

/* ---------- v117: the staff nudge popup ---------- */
.nudge-toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 300px;
  padding: 10px 12px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #d8332b 0%, #a1140e 100%);
  border: 1px solid #6d0b07;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.28);
  font-size: 13px;
  transform: translateX(120%);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.nudge-toast.show { transform: translateX(0); }
.nudge-toast-bell { font-size: 17px; line-height: 1; }
.nudge-toast-text { display: flex; flex-direction: column; line-height: 1.25; }
.nudge-toast-text strong { color: #ffe9a8; }
.nudge-toast-text span { font-size: 11px; opacity: .9; }
.nudge-toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
  opacity: .75;
}
.nudge-toast-close:hover { opacity: 1; }
/* a nudge is the whole point of a nudge — it slides no matter the anim setting */
@media (prefers-reduced-motion: reduce) { .nudge-toast { transition: none; } }
/* an empty body div exists on image-only messages so the editor has an anchor;
   make sure [hidden] wins over any theme's block display */
.jan-body[hidden] { display: none; }

/* ---------- v123: post reactions ---------- */
.reacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 3px 0 4px;
  /* NO `clear: both` — the bar now sits under the post header, and the post's
     image is floated left, so clearing would shove it back below the image
     instead of leaving it beside it where it belongs. */
}
.react-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px 1px 3px;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  color: var(--text);
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}
.react-chip:hover { border-color: var(--link); transform: translateY(-1px); }
.react-chip.mine { background: var(--quote-bg, rgba(90,140,220,.22)); border-color: var(--link); }
.react-chip img { height: 22px; width: auto; display: block; }
.react-n { font-variant-numeric: tabular-nums; min-width: 6px; }
/* the + stays subtle until you're on the post */
.react-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  padding: 0;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  background: var(--cell);
  border: 1px dashed var(--cell-border);
  border-radius: 10px;
  cursor: pointer;
  opacity: .45;
  transition: opacity .12s ease, color .12s ease, border-color .12s ease;
}
.post:hover .react-add, .react-add:focus { opacity: 1; }
.react-add:hover { color: var(--link); border-color: var(--link); border-style: solid; }
/* a bar with no reactions yet shouldn't add visual weight to every post */
.reacts.empty { margin: 0 0 2px; }

/* --- picker --- */
.react-picker {
  position: absolute;
  z-index: 999;
  padding: 6px;
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.react-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 70px);
  gap: 3px;
  width: 300px;              /* fixed 4-across width so the popup is consistent */
  max-height: 300px;         /* ~4 rows tall, then it scrolls */
  overflow-y: auto;
  overflow-x: hidden;
}
/* keep the scrollbar unobtrusive */
.react-picker-grid::-webkit-scrollbar { width: 8px; }
.react-picker-grid::-webkit-scrollbar-thumb { background: var(--cell-border); border-radius: 4px; }
/* Each cell shows the jak AND its name — the name used to live only in a title
   tooltip, which made renaming a reaction invisible unless you hovered. */
.react-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  width: 70px;
  padding: 3px 2px 4px;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background .1s ease, transform .1s ease;
}
.react-pick:hover { background: var(--quote-bg, rgba(90,140,220,.22)); border-color: var(--link); transform: scale(1.06); }
.react-pick img { max-width: 100%; max-height: 32px; display: block; }
.react-pick-name {
  font-size: 9px;
  line-height: 1.1;
  color: var(--muted);
  text-align: center;
  width: 100%;
  overflow-wrap: anywhere;
}
.react-pick:hover .react-pick-name { color: var(--text); }

/* --- transient error toast (locked thread, banned, per-post limit) --- */
.react-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(12px);
  z-index: 100001;
  max-width: 84vw;
  padding: 8px 14px;
  font-size: 13px;
  color: #fff;
  background: rgba(20, 20, 24, .93);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.react-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  .react-picker-grid { grid-template-columns: repeat(3, 70px); width: 226px; max-height: 262px; }
  .react-add { opacity: 1; }   /* no hover on touch, so always show it */
}

/* ---------- v127: peek slider ----------
   Blur, not opacity. Fading an image in still shows its full shape and colour
   against the page — you'd recognise gore before you could stop. Blur withholds
   the detail and gives up only a vague mass until you dial it in, which is the
   whole point: get an idea, decide, back out. */
/* NOTE: --pt is deliberately NOT initialised on .media-wrap. In the mod queue a
   .media-wrap sits INSIDE the .peek-zone that owns the slider, and re-declaring
   the variable there reset the inherited value — the blur stayed pinned at max
   until the slider hit the very top. Every use reads var(--pt, 0) instead, so
   the default lives at the point of use and nothing shadows it. */
.peek-zone[data-peek-start="blurred"] .post-image,
.peek-zone[data-peek-start="blurred"] .post-media,
.peek-zone[data-peek-start="blurred"] .jak-queue-preview,
.peek-zone[data-peek-start="blurred"] .namefag-emoji-preview,
.peek-zone[data-peek-start="blurred"] video {
  filter: blur(calc((1 - var(--pt, 0)) * 18px)) saturate(calc(.25 + var(--pt, 0) * .75));
  transition: filter .12s linear;
}
/* Fully revealed (slider at max, or the cover was clicked) drops the filter
   entirely so the image is pixel-exact, not left faintly soft. */
.peek-zone.peek-open .post-image,
.peek-zone.peek-open .post-media,
.peek-zone.peek-open .jak-queue-preview,
.peek-zone.peek-open .namefag-emoji-preview,
.peek-zone.peek-open video { filter: none; }

/* v154: the blur/peek slider sits directly BELOW the image in the mod queue,
   not floated off to its side. Stacking the zone as a column drops the bar
   under the media and keeps it aligned to the image's left edge. */
/* v154: the blur/peek slider sits directly BELOW the image in the mod queue,
   not floated off to its side. The peek-zone stacks image-then-slider as a
   column and floats as a whole, so the comment still wraps to its right. */
.peek-zone { display: flex; flex-direction: column; align-items: flex-start; float: left; margin: 4px 16px 8px 0; }
.peek-zone .fileinfo,
.peek-zone .media-wrap,
.peek-zone .file-link { align-self: flex-start; float: none; margin-right: 0; margin-left: 0; }
.peek-zone .peek-bar { order: 99; margin-top: 6px; } /* always last -> under the image */

.peek-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
  margin: 4px 0 2px;
  padding: 3px 6px;
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 12px;
}
.peek-icon { font-size: 12px; line-height: 1; opacity: .8; }
.peek-slider { flex: 1; min-width: 90px; height: 14px; cursor: ew-resize; accent-color: var(--link); }
.peek-reset {
  padding: 0 4px;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
}
.peek-reset:hover { color: var(--link); }
/* the cover must not eat the slider's pointer events */
.peek-bar { position: relative; z-index: 3; }

/* ---------- v128: /int/ globe watermark ----------
   Fixed to the top-left of the viewport so it stays put while the page scrolls,
   behind everything and click-through. The PNG is already transparent, so the
   board's own background (and whatever theme is active) shows through it. */
/* z-index 0, NOT -1: several themes give <body> an opaque background colour, and
   a negative layer paints behind it — the globe was invisible on those (verified
   pixel-identical to another board on burning-eyes). At 0 it sits above the body
   background; the page's own content is positioned above it in turn. */
body[data-board="int"]::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background: url("assets/img/int-globe.png") no-repeat top left / contain;
}
/* Keep real content above the watermark. Scoped to /int/ and excluding the
   fixed/sticky chrome, because `position: relative` REPLACES sticky/fixed —
   the same trap that broke the Nate and Opsec themes. */
body[data-board="int"] > *:not(.boardlist):not(#lightbox):not(.layout-picker):not(#admin-panel):not(.css-editor):not(.nudge-toast):not(#flash-video):not(.news-toast):not(#thread-replies):not(.react-picker) {
  position: relative;
  z-index: 1;
}
/* it's decoration — don't let it crowd a phone screen */
@media (max-width: 900px) { body[data-board="int"]::before { display: none; } }

/* ---------- v130: ||inline spoiler|| ----------
   Blacked out until hovered. Colour is set to match the background so the text
   is genuinely unreadable rather than merely dark-on-dark, and selection is
   blocked while hidden so you can't drag-select to peek. */
.spoilertext {
  background: #000;
  color: #000;
  border-radius: 2px;
  padding: 0 2px;
  cursor: help;
  user-select: none;
  -webkit-user-select: none;
  transition: color .12s ease, background .12s ease;
}
.spoilertext:hover,
.spoilertext:focus-within,
.spoilertext.revealed {
  background: rgba(127, 127, 127, .18);
  color: var(--text);
  user-select: auto;
  -webkit-user-select: auto;
}
/* any markup inside stays hidden too (a spoilered link shouldn't glow through) */
.spoilertext:not(:hover):not(.revealed) * { color: #000 !important; text-shadow: none !important; }
.spoilertext:not(:hover):not(.revealed) img { visibility: hidden; }

/* ---------- v147: purchasable text formatting (Kareha-style) ---------- */
.fmt-small { font-size: .72em; }
.fmt-big {
  font-size: 1.6em;
  /* line-height must be >= the glyph box or ascenders/descenders get clipped by
     the surrounding lines (this is what cut off big/rainbow spam). Inline-block
     + a matching line-height gives each big run its own tall line box. */
  line-height: 1.5;
  display: inline-block;
  vertical-align: baseline;
}
/* the line that CONTAINS big text needs room too, so neighbouring normal lines
   don't crop the tall glyphs */
.body { overflow: visible; }
.fmt-b { font-weight: 700; }
.fmt-i { font-style: italic; }
.fmt-u { text-decoration: underline; }
.fmt-s { text-decoration: line-through; }
.fmt-code {
  font-family: "Courier New", monospace;
  background: rgba(127,127,127,.16);
  border-radius: 3px;
  padding: 0 3px;
}
.fmt-rainbow {
  background-image: linear-gradient(90deg, #ff2d2d, #ff9a00, #ffe600, #38d430, #2b8cff, #8a5bff, #ff2df0);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: fmt-rainbow-slide 6s linear infinite;
  font-weight: 700;
}
@keyframes fmt-rainbow-slide { to { background-position: 200% center; } }
html[data-anim="off"] .fmt-rainbow { animation: none; }

/* v147: emoji shortcodes rendered in posts */
.emoji-img { height: 1.3em; width: auto; vertical-align: -0.25em; }
/* emoji picker button pinned bottom-right of the comment box. The wrapper
   shrinks to the textarea's own width (min(420px,80vw)) so the box keeps its
   normal size — it does NOT stretch to fill the whole cell. */
.comment-wrap { position: relative; display: inline-block; max-width: 100%; }
.comment-wrap textarea { display: block; }
.emoji-open {
  position: absolute;
  right: 6px; bottom: 6px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  opacity: .75;
  line-height: 0;
}
.emoji-open img { width: 28px; height: 28px; display: block; object-fit: contain; }
.emoji-open:hover { opacity: 1; }

/* gold username glow (shop: goldname) */
.name.goldname, .goldname > .name, .namefag-name.goldname {
  color: #ffcf3f !important;
  text-shadow: 0 0 4px rgba(255,196,0,.85), 0 0 9px rgba(255,150,0,.55);
}

/* ---------- v131: themed video player ----------
   Built entirely from theme variables (--cell, --link, --text…) so an embedded
   clip wears the active theme instead of the browser's default control chrome. */
.vplayer {
  position: relative;
  display: inline-block;
  max-width: min(480px, 92vw);   /* match .post-media so videos never render huge */
  line-height: 0;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.vplayer .post-media { display: block; max-width: 100%; height: auto; cursor: pointer; }
.vp-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  line-height: 1;
  background: linear-gradient(180deg, var(--btn-top, var(--cell)), var(--btn-bottom, var(--cell)));
  border-top: 1px solid var(--cell-border);
}
.vp-btn {
  flex: 0 0 auto;
  min-width: 22px; height: 22px;
  padding: 0 4px;
  font-size: 12px;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 3px;
}
.vp-btn:hover { color: var(--link); background: rgba(127,127,127,.15); }
.vp-time { flex: 0 0 auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vp-seek {
  position: relative;
  flex: 1 1 auto;
  height: 8px;
  min-width: 60px;
  background: rgba(127,127,127,.3);
  border-radius: 4px;
  cursor: pointer;
  touch-action: none;
}
.vp-seek-buf { position: absolute; inset: 0; width: 0; background: rgba(127,127,127,.35); border-radius: 4px; }
.vp-seek-fill {
  position: absolute; inset: 0; width: 0;
  background: var(--link);
  border-radius: 4px;
  z-index: 1;
}
.vp-seek::after {
  content: ""; position: absolute; top: 50%; left: 0; z-index: 2;
  width: 12px; height: 12px; margin-left: -6px;
  transform: translateY(-50%);
  left: var(--vp-knob, 0);
  display: none;
}
.vp-seek:hover .vp-seek-fill, .vp-seek:focus .vp-seek-fill { background: var(--name, var(--link)); }
.vp-vol {
  position: relative;
  flex: 0 0 54px;
  height: 6px;
  background: rgba(127,127,127,.3);
  border-radius: 3px;
  cursor: pointer;
  touch-action: none;
}
.vp-vol-fill { position: absolute; inset: 0; width: 100%; background: var(--link); border-radius: 3px; }
.vplayer:fullscreen { display: flex; flex-direction: column; justify-content: center; background: #000; width: 100%; height: 100%; }
.vplayer:fullscreen .post-media { flex: 1 1 auto; max-height: calc(100% - 34px); margin: auto; }
@media (max-width: 640px) { .vp-vol { flex-basis: 40px; } .vp-time { font-size: 10px; } }

/* ---------- v133: shekel shop ----------
   Layout matches the mockup: nav bar stays on top (it's outside .shop-scene),
   a wood/tatami field fills the rest, the shopkeeper sits bottom-left, and the
   item panel is pinned to the right. */
.shop-page .boardlist { position: relative; z-index: 20; }
.shop-scene {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  top: 0;                    /* fill the whole viewport — the nav (z 100) sits on top,
                                so the wood slides down from behind it with no gap */
  overflow: hidden;
  z-index: 5;
}
/* wood field — slides DOWN from the top on enter */
.shop-wood {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 46px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.06) 0 2px, transparent 2px 46px),
    linear-gradient(180deg, #d9a866, #c8925180 60%, #bb8347);
  background-color: #cf9a5c;
  transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.shop-scene.enter .shop-wood { transform: translateY(0); }

/* shopkeeper — rises UP from the bottom-left */
.shop-keeper {
  position: absolute;
  left: 2vw; bottom: 0;
  height: min(78%, 560px);
  transform: translateY(105%);
  transition: transform .55s cubic-bezier(.22,1,.36,1) .12s;
  z-index: 6;    /* BELOW the item panel (z 8) so the menu overlaps the keeper */
}
.shop-scene.enter .shop-keeper { transform: translateY(0); }
.shop-keeper img { height: 100%; width: auto; display: block; user-select: none; }

/* item panel — slides IN from the right */
.shop-panel {
  position: absolute;
  right: 3vw; top: 6%;
  width: min(46%, 520px);
  max-height: 84%;
  display: flex; flex-direction: column;
  background: rgba(20,20,24,.92);
  color: #f4f4f4;
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
  transform: translateX(130%);
  transition: transform .5s cubic-bezier(.22,1,.36,1) .2s;
  z-index: 8;
}
.shop-scene.enter .shop-panel { transform: translateX(0); }
.shop-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 16px 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
.shop-title { font-size: 20px; font-weight: bold; }
.shop-bal { font-size: 13px; opacity: .85; }
.shop-items { overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.shop-item {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid transparent;
  cursor: default;
}
.shop-item:hover, .shop-item:focus { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.25); outline: none; }
.shop-item.owned { opacity: .6; }
.shop-item-name { font-size: 14px; }
.shop-item-price { font-variant-numeric: tabular-nums; opacity: .9; font-size: 13px; }
.shop-buy {
  padding: 3px 12px; font: inherit; font-size: 13px; cursor: pointer;
  color: #1a1a1a; background: linear-gradient(180deg,#ffe08a,#e6b84b);
  border: 1px solid #b8901f; border-radius: 5px;
}
.shop-buy:hover:not(:disabled) { background: linear-gradient(180deg,#fff0b0,#f0c860); }
.shop-buy:disabled { cursor: default; background: #555; color: #aaa; border-color: #444; }
.shop-hint { padding: 8px 16px 12px; font-size: 11px; opacity: .55; }

/* speech bubble next to the keeper on item hover */
.shop-bubble {
  position: absolute;
  left: min(30vw, 380px); top: 12%;
  width: 240px;
  padding: 10px 13px;
  background: #fff; color: #111;
  border: 2px solid #111; border-radius: 12px;
  font-size: 13px; line-height: 1.35;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  z-index: 25;   /* scene child now — sits above the panel (z 8) and keeper (z 6) */
}
.shop-bubble::after {
  content: ""; position: absolute; left: 24px; bottom: -14px;
  border: 8px solid transparent; border-top-color: #111;
}
.shop-bubble::before {
  content: ""; position: absolute; left: 26px; bottom: -10px; z-index: 1;
  border: 6px solid transparent; border-top-color: #fff;
}
.shop-status {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 6px;
  background: rgba(20,20,24,.94); color: #fff; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 30;
}
.shop-status.show { opacity: 1; }

/* whole shop fades away when leaving to another board/home */
.shop-scene.leaving { opacity: 0; transition: opacity .35s ease; }

@media (max-width: 720px) {
  .shop-panel { width: 90vw; right: 5vw; top: auto; bottom: 4%; max-height: 52%; }
  .shop-keeper { height: 40%; left: 0; }
  .shop-bubble { left: auto; right: 0; bottom: 105%; }
  .shop-bubble::after, .shop-bubble::before { display: none; }
}

/* ---------- v133: Shekels gold theme (shop-purchased) ---------- */
html[data-theme="shekels"] {
  --input-text: #ffe9a8;
  --bg: #1c1608;
  --cell: rgba(60, 48, 16, .82);
  --cell-border: #b8912f;
  --link: #ffd76b;
  --link-hover: #fff0b0;
  --title: #ffcf40;
  --name: #e6b84b;
  --subject: #ffd76b;
  --quote: #b9c26b;
  --text: #f3e6b8;
  --muted: #b9a86a;
  --faint: #7d6c38;
  --input-bg: rgba(30, 24, 8, .9);
  --input-border: #b8912f;
  --btn-top: #ffe08a;
  --btn-bottom: #d0a129;
  --btn-border: #8a6a12;
  --th-bg: #4a3a10;
  --th-text: #ffd76b;
  --capcode: #ff5bbf;
  --glow: 0 0 12px rgba(255, 200, 60, .5);
  background:
    radial-gradient(circle at 50% 0%, #2e2610, #1c1608 70%),
    repeating-linear-gradient(135deg, rgba(255,215,100,.04) 0 8px, transparent 8px 16px);
  background-color: #1c1608;
}
html[data-theme="shekels"] body {
  background:
    linear-gradient(180deg, rgba(255,215,100,.06), transparent 240px);
}
/* the spinning shekel, pinned bottom-right */
html[data-theme="shekels"] body::after {
  content: "";
  position: fixed;
  right: 14px; bottom: 14px;
  width: 84px; height: 84px;
  background: url("assets/shop/shekel-spin.gif") no-repeat center / contain;
  z-index: 0;
  pointer-events: none;
  opacity: .9;
}
/* keep content above the corner gif on this theme (same guarded lift used
   elsewhere — position:relative must not touch the fixed/sticky chrome) */
/* v238: this list MUST exclude every fixed/sticky overlay. `position: relative`
   REPLACES `fixed`, so anything left in drops out of its fixed layer and lands
   inline in the page — that is what broke the settings menu (and the music
   player, games window, quote previews and toasts) on this theme. Kept in sync
   with the opsec list. */
html[data-theme="shekels"] body > *:not(.boardlist):not(#lightbox):not(.layout-picker):not(#admin-panel):not(.css-editor):not(.nudge-toast):not(#flash-video):not(.news-toast):not(#thread-replies):not(.shop-scene):not(.react-picker):not(.mx-rain):not(.settings-overlay):not(.mp3-player):not(.games-win):not(.jak-sheet):not(.swing-layer):not(.react-toast):not(.ach-toast):not(#brainrot-layer):not(.raid-warning):not(.quote-preview) {
  position: relative; z-index: 1;
}

/* ---------- v133: animated gradient namerolls (shop-purchased) ---------- */
@keyframes nameroll-slide { to { background-position: 200% center; } }
.nameroll-grad {
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: nameroll-slide 3s linear infinite;
  font-weight: bold;
}
.nameroll-red    { background-image: linear-gradient(90deg,#ff2b2b,#ff9a9a,#ff2b2b); }
.nameroll-green  { background-image: linear-gradient(90deg,#1fbf4f,#a6f0bd,#1fbf4f); }
.nameroll-blue   { background-image: linear-gradient(90deg,#2b7bff,#a9cbff,#2b7bff); }
.nameroll-yellow { background-image: linear-gradient(90deg,#e6b800,#fff08a,#e6b800); }
.nameroll-purple { background-image: linear-gradient(90deg,#8b2bff,#d3a9ff,#8b2bff); }
.nameroll-brown  { background-image: linear-gradient(90deg,#7a4a1e,#c99a63,#7a4a1e); }

/* v135: a poll you've already voted in is locked — no re-clicking */
.poll.locked .poll-opt { cursor: default; }
.poll.locked .poll-opt:hover { filter: none; }

/* v135: /login two-column layout (mod login | namefag) */
.login-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.login-cols .login-col { flex: 1 1 340px; min-width: 300px; }
.login-page .ok-line { color: var(--quote); }
@media (max-width: 720px) { .login-cols { flex-direction: column; } }

/* ---------- v137: achievements ---------- */
.ach-heading { margin-bottom: 2px; }
.ach-sub { margin-top: 0; font-size: 12px; color: var(--muted); }
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.ach-card {
  text-align: center;
  padding: 12px 8px;
  border: 1px solid var(--cell-border);
  border-radius: 8px;
  background: var(--cell);
  opacity: .45;                 /* locked look */
  filter: grayscale(1);
  transition: opacity .2s ease, filter .2s ease;
}
.ach-card.earned { opacity: 1; filter: none; }
/* v151: difficulty tiers — blue = common (default), yellow = moderate,
   red = hard. Tint the border + name so the difficulty reads at a glance;
   strongest once earned. */
.ach-tier-common   { --ach-tint: #2e7cc4; }
.ach-tier-moderate { --ach-tint: #e0a800; }
.ach-tier-hard     { --ach-tint: #cc2f26; }
.ach-card { border-color: var(--ach-tint, var(--cell-border)); border-width: 2px; }
.ach-card.earned {
  border-color: var(--ach-tint);
  box-shadow: 0 0 0 1px var(--ach-tint), 0 0 10px -2px var(--ach-tint);
  background: color-mix(in srgb, var(--ach-tint) 8%, var(--cell));
}
.ach-card.earned .ach-name { color: var(--ach-tint); }
.ach-icon-wrap {
  position: relative;
  width: 96px; height: 96px;
  margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center;
}
.ach-icon { position: relative; z-index: 2; max-width: 74px; max-height: 74px; }
/* the black sun spins BEHIND the icon, only on earned cards */
.ach-sun {
  position: absolute; inset: 0; margin: auto;
  width: 96px; height: 96px;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}
.ach-card.earned .ach-sun {
  opacity: .5;
  animation: ach-spin 6s linear infinite;
}
@keyframes ach-spin { to { transform: rotate(360deg); } }
.ach-name { font-weight: bold; font-size: 14px; }
.ach-desc { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.3; }

/* unlock toast, bottom-left */
.ach-toast {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 100002; /* above theme overlays (opsec 9998) and AR overlays */
  display: flex; align-items: center; gap: 10px;
  max-width: 320px;
  padding: 10px 14px;
  /* v184: theme-independent colours. Some themes leave --cell/--text/--muted at
     values that make the toast unreadable (or invisible), so the popup carries
     its own guaranteed-contrast palette instead of inheriting from the theme. */
  background: #1b1b1f;
  color: #f4f4f5;
  border: 2px solid #ffb703;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
  transform: translateX(-140%);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.ach-toast.show { transform: translateX(0); }
.ach-toast img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 auto; }
.ach-toast .ach-toast-title { font-weight: bold; font-size: 13px; color: #ffd166; }
.ach-toast .ach-toast-name { font-size: 13px; color: #f4f4f5; }
.ach-toast .ach-toast-sub { font-size: 11px; color: #b7b7bd; }

/* ---------- v140: Gill theme (Nate-style, character bottom-right) ---------- */
html[data-theme="gill"] {
  --input-text: #241a33;
  --bg: #e8e2f2;
  --cell: #f4f0fb;
  --cell-border: #a99bc6;
  --link: #6a4fb0;
  --link-hover: #8a6fd0;
  --title: #5b3fa0;
  --name: #d08a3a;
  --subject: #6a4fb0;
  --quote: #4b6b2a;
  --text: #2b2440;
  --muted: #7a6e94;
  --faint: #a89ec4;
  --input-bg: #fbf9ff;
  --input-border: #b5a5d5;
  --btn-top: #f7f2ff;
  --btn-bottom: #d8cbee;
  --btn-border: #8877ad;
  --th-bg: #5a5a5a;
  --th-text: #d9c9f0;
  --capcode: #6a4fb0;
  --glow: 0 0 8px rgba(106, 79, 176, .35);
}
html[data-theme="gill"] {
  background:
    repeating-linear-gradient(90deg, rgba(106, 79, 176, .04) 0 1px, rgba(0,0,0,0) 1px 5px),
    repeating-linear-gradient(0deg, rgba(106, 79, 176, .04) 0 1px, rgba(0,0,0,0) 1px 5px),
    linear-gradient(180deg, #ece6f6 0%, #e0d8f0 55%, #d4cae8 100%);
  background-attachment: fixed;
}
html[data-theme="gill"] body { background: transparent; color: var(--text); }
/* Gill, parked bottom-right */
html[data-theme="gill"] body::after {
  content: "";
  position: fixed;
  right: 8px; bottom: 0;
  width: 132px; height: 360px;
  z-index: -1;
  pointer-events: none;
  opacity: .82;
  background: url("assets/img/gill.png") no-repeat bottom right / contain;
  filter: drop-shadow(0 2px 3px rgba(50, 30, 80, .22));
}
@media (max-width: 900px) { html[data-theme="gill"] body::after { display: none; } }
/* content lift so Gill sits behind opaque backgrounds, not over content */
/* v238: this list MUST exclude every fixed/sticky overlay. `position: relative`
   REPLACES `fixed`, so anything left in drops out of its fixed layer and lands
   inline in the page — that is what broke the settings menu (and the music
   player, games window, quote previews and toasts) on this theme. Kept in sync
   with the opsec list. */
html[data-theme="gill"] body > *:not(.boardlist):not(#lightbox):not(.layout-picker):not(#admin-panel):not(.css-editor):not(.nudge-toast):not(#flash-video):not(.news-toast):not(#thread-replies):not(.react-picker):not(.shop-scene):not(.mx-rain):not(.settings-overlay):not(.mp3-player):not(.games-win):not(.jak-sheet):not(.swing-layer):not(.react-toast):not(.ach-toast):not(#brainrot-layer):not(.raid-warning):not(.quote-preview) {
  position: relative; z-index: 1;
}
/* soft rounded panels, like his lavender sleeves */
html[data-theme="gill"] .post.reply,
html[data-theme="gill"] .home-box,
html[data-theme="gill"] .mod-queue-item,
html[data-theme="gill"] .mini-reply {
  background: linear-gradient(180deg, #fbf9ff 0%, #ece5fa 100%);
  border: 1px solid #a99bc6;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(90, 70, 130, .2),
    0 2px 4px rgba(70, 50, 110, .2);
}
html[data-theme="gill"] .post.op {
  background: linear-gradient(180deg, #fbf9ff, #e6ddf6);
  border: 1px solid #a99bc6;
  border-radius: 8px;
}
/* the /int/ medal on his chest: gold face, pressed */
html[data-theme="gill"] .wmm-button {
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.35) 0 1px, rgba(0,0,0,0) 1px 3px),
    linear-gradient(180deg, #f7f2ff 0%, #ddd0f2 46%, #c9b9e8 54%, #f2ecfb 100%);
  border: 1px solid #8877ad;
  border-radius: 5px;
  color: #2b2440;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 3px rgba(70, 50, 110, .3);
}
html[data-theme="gill"] .wmm-button:hover { color: #d08a3a; border-color: #d08a3a; }
html[data-theme="gill"] .wmm-button:active {
  box-shadow: inset 0 2px 5px rgba(70, 50, 110, .45);
  transform: translateY(1px);
}
/* his grey tee with lavender trim = nav */
html[data-theme="gill"] .boardlist {
  background: linear-gradient(180deg, #8a7db0 0%, #6f6493 50%, #5f5583 100%);
  border-bottom: 3px solid #d08a3a;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 6px rgba(40,25,70,.4);
}
html[data-theme="gill"] .boardlist a { color: #efe6ff; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
html[data-theme="gill"] .boardlist a:hover { color: #fff; }
html[data-theme="gill"] .wmm-title {
  color: #5b3fa0;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #ffffff, 0 2px 3px rgba(70, 50, 110, .4);
}
html[data-theme="gill"] .post-form input[type="text"],
html[data-theme="gill"] .post-form input[type="password"],
html[data-theme="gill"] .post-form input[type="number"],
html[data-theme="gill"] .post-form textarea,
html[data-theme="gill"] #theme-select,
html[data-theme="gill"] #font-select,
html[data-theme="gill"] #anim-select,
html[data-theme="gill"] #layout-select {
  border-radius: 5px;
  background: #fbf9ff;
  color: #241a33;
  box-shadow: inset 0 2px 3px rgba(90, 70, 130, .25);
}

/* ---------- v140: Awardsan theme (royal blue + gold, character bottom-right) ---------- */
html[data-theme="awardsan"] {
  --input-text: #10143a;
  --bg: #dfe3f5;
  --cell: #eef1fc;
  --cell-border: #8a97cf;
  --link: #1a2fb0;
  --link-hover: #3a52d8;
  --title: #12208f;
  --name: #c79200;
  --subject: #12208f;
  --quote: #2a6b4b;
  --text: #14183f;
  --muted: #6a72a0;
  --faint: #9aa2cf;
  --input-bg: #f7f9ff;
  --input-border: #9aa6d8;
  --btn-top: #ffe08a;
  --btn-bottom: #e6b400;
  --btn-border: #b38a00;
  --th-bg: #12208f;
  --th-text: #ffd23a;
  --capcode: #c79200;
  --glow: 0 0 10px rgba(26, 47, 176, .4);
}
html[data-theme="awardsan"] {
  background:
    radial-gradient(circle at 50% 0%, #e6e9fa, #d4d9f2 70%),
    repeating-linear-gradient(135deg, rgba(26, 47, 176, .04) 0 8px, rgba(0,0,0,0) 8px 16px);
  background-attachment: fixed;
}
html[data-theme="awardsan"] body { background: transparent; color: var(--text); }
/* Awardsan, parked bottom-right */
html[data-theme="awardsan"] body::after {
  content: "";
  position: fixed;
  right: 8px; bottom: 0;
  width: 128px; height: 360px;
  z-index: -1;
  pointer-events: none;
  opacity: .85;
  background: url("assets/img/awardsan.png") no-repeat bottom right / contain;
  filter: drop-shadow(0 2px 4px rgba(18, 32, 143, .28));
}
@media (max-width: 900px) { html[data-theme="awardsan"] body::after { display: none; } }
/* v238: this list MUST exclude every fixed/sticky overlay. `position: relative`
   REPLACES `fixed`, so anything left in drops out of its fixed layer and lands
   inline in the page — that is what broke the settings menu (and the music
   player, games window, quote previews and toasts) on this theme. Kept in sync
   with the opsec list. */
html[data-theme="awardsan"] body > *:not(.boardlist):not(#lightbox):not(.layout-picker):not(#admin-panel):not(.css-editor):not(.nudge-toast):not(#flash-video):not(.news-toast):not(#thread-replies):not(.react-picker):not(.shop-scene):not(.mx-rain):not(.settings-overlay):not(.mp3-player):not(.games-win):not(.jak-sheet):not(.swing-layer):not(.react-toast):not(.ach-toast):not(#brainrot-layer):not(.raid-warning):not(.quote-preview) {
  position: relative; z-index: 1;
}
/* white-cape panels with a gold edge */
html[data-theme="awardsan"] .post.reply,
html[data-theme="awardsan"] .home-box,
html[data-theme="awardsan"] .mod-queue-item,
html[data-theme="awardsan"] .mini-reply {
  background: linear-gradient(180deg, #ffffff 0%, #eef1fc 100%);
  border: 1px solid #8a97cf;
  border-left: 3px solid #e6b400;
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 2px 5px rgba(18, 32, 143, .18);
}
html[data-theme="awardsan"] .post.op {
  background: linear-gradient(180deg, #ffffff, #e6eafb);
  border: 1px solid #8a97cf;
  border-left: 3px solid #1a2fb0;
  border-radius: 6px;
}
/* the award ribbon: gold medallion, pressed */
html[data-theme="awardsan"] .wmm-button {
  background: linear-gradient(180deg, #ffe08a 0%, #f0c030 46%, #e6b400 54%, #ffdf7a 100%);
  border: 1px solid #b38a00;
  border-radius: 5px;
  color: #3a2e00;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 3px rgba(18, 32, 143, .3);
}
html[data-theme="awardsan"] .wmm-button:hover { color: #12208f; border-color: #12208f; }
html[data-theme="awardsan"] .wmm-button:active {
  box-shadow: inset 0 2px 5px rgba(120, 90, 0, .5);
  transform: translateY(1px);
}
/* his royal-blue uniform = nav */
html[data-theme="awardsan"] .boardlist {
  background: linear-gradient(180deg, #2438c8 0%, #1a2aa8 50%, #12208f 100%);
  border-bottom: 3px solid #e6b400;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 2px 6px rgba(10, 18, 80, .5);
}
html[data-theme="awardsan"] .boardlist a { color: #ffd23a; text-shadow: 0 1px 1px rgba(0,0,0,.5); }
html[data-theme="awardsan"] .boardlist a:hover { color: #ffffff; }
html[data-theme="awardsan"] .wmm-title {
  color: #12208f;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #ffffff, 0 2px 3px rgba(18, 32, 143, .4);
}
html[data-theme="awardsan"] .post-form input[type="text"],
html[data-theme="awardsan"] .post-form input[type="password"],
html[data-theme="awardsan"] .post-form input[type="number"],
html[data-theme="awardsan"] .post-form textarea,
html[data-theme="awardsan"] #theme-select,
html[data-theme="awardsan"] #font-select,
html[data-theme="awardsan"] #anim-select,
html[data-theme="awardsan"] #layout-select {
  border-radius: 5px;
  background: #f7f9ff;
  color: #10143a;
  box-shadow: inset 0 2px 3px rgba(18, 32, 143, .2);
}

/* =========================================================
   v163: /jan/ reverted to the classic imageboard-style chat (the v130 look:
   theme-based bubble messages, ## author tags, a simple compose box) — but
   KEEPING the newer features: rename, per-message reactions, multi-image send,
   a staff/buddy list, and the soyjak emoji-insert button on the textarea.
   Everything is driven off the active theme's tokens, so it works on every
   theme (light and dark).
   ========================================================= */
.jan-sub { font-size: 12px; color: var(--muted); margin: 2px 0 0; text-align: center; }
.jan-wrap {
  display: flex;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch;
}
.jan-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.jan-log {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: min(62vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 6px;
}
.jan-log .empty { color: var(--muted); font-style: italic; }
.jan-msg {
  align-self: flex-start;
  max-width: 78%;
  padding: 6px 10px;
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--cell-border);
  border-radius: 10px 10px 10px 2px;
}
/* v235: your own bubble is painted with the BUTTON gradient, so its text has to
   use the button's text colour, not var(--text). Themes whose buttons are light
   chrome while --text is near-white (xbox360 was 1.05:1 — invisible) set
   --btn-text; everything else falls back to --text exactly as before. */
.jan-msg.mine {
  align-self: flex-end;
  border-radius: 10px 10px 2px 10px;
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  color: var(--btn-text, var(--text));
}
.jan-msg.mine .jan-time,
.jan-msg.mine .jan-edited { color: var(--btn-text, var(--muted)); opacity: .75; }
.jan-msg.editing { outline: 1px dashed var(--link); outline-offset: 2px; }
.jan-meta { font-size: 11px; margin-bottom: 2px; }
.jan-author { font-weight: bold; }
.jan-author.is-admin { color: var(--capcode); }
.jan-author.is-janny { color: var(--name); }
.jan-time { color: var(--muted); margin-left: 6px; }
.jan-reply-btn, .jan-edit-btn {
  background: none; border: none; cursor: pointer; padding: 0 2px;
  color: var(--link); font-size: 11px; font-family: inherit;
}
.jan-reply-btn:hover, .jan-edit-btn:hover { color: var(--link-hover); text-decoration: underline; }
.jan-body { font-size: 14px; line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere; }
.jan-body[hidden] { display: none; }
.jan-edited { font-size: 10px; color: var(--muted); font-style: italic; }
.jan-quote {
  font-size: 12px; color: var(--muted); margin: 0 0 3px;
  padding-left: 8px; border-left: 3px solid var(--cell-border); cursor: pointer;
}
.jan-quote-who { font-weight: 700; color: var(--link); }
.jan-quote-gone { font-style: italic; cursor: default; }
.jan-media { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 6px; }
.jan-media img, .jan-img {
  max-width: 260px; max-height: 260px; border-radius: 4px; display: block; cursor: pointer;
}
.jan-media .jan-video { max-width: 320px; max-height: 320px; cursor: default; background: #000; }
/* v191/v193: spoilered media in /jan/. A click reveals it (JS removes
   .jan-spoiled + the cover). While covered, the real media is collapsed to zero
   size so the cover doesn't inherit a huge natural image footprint (which left a
   tiny icon floating in a big empty box); instead the cover is its own compact,
   fixed-size tile like a normal spoiler thumbnail. */
.jan-media { position: relative; }
.jan-media.jan-spoiled > img,
.jan-media.jan-spoiled > .jan-video {
  width: 0 !important; height: 0 !important; max-width: 0 !important; max-height: 0 !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; visibility: hidden;
}
.jan-spoiler-cover {
  position: static; z-index: 2;
  width: 150px; height: 150px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cell); border: 1px solid var(--cell-border); border-radius: 4px;
  cursor: pointer;
}
.jan-spoiler-cover img { width: 90px; height: 90px; max-width: 90px; max-height: 90px; object-fit: contain; opacity: .9; }
.jan-media:not(.jan-spoiled) .jan-spoiler-cover { display: none; }
/* the Spoiler checkbox in the composer controls */
.jan-spoiler-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; user-select: none; }
.jan-spoiler-toggle input { margin: 0; }
.jan-nudge {
  text-align: center; color: var(--capcode); font-size: 12px;
  padding: 4px 0; margin: 2px 0; border-top: 1px dashed var(--cell-border); border-bottom: 1px dashed var(--cell-border);
}
.jan-typing { font-size: 11px; color: var(--text); opacity: .75; font-style: italic; min-height: 16px; padding: 0 4px; }
.jan-typing[hidden] { display: none; }

/* per-message reactions (kept from v160) */
.jan-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 0; align-items: center; }
.jan-react-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px 1px 3px; border-radius: 11px; cursor: pointer;
  background: var(--cell); border: 1px solid var(--cell-border); color: var(--text);
  font-size: 12px; line-height: 1;
}
.jan-react-chip.mine { background: var(--btn-top); border-color: var(--link); }
.jan-react-chip img.emoji-img { width: 16px; height: 16px; vertical-align: middle; }
.jan-react-n { font-weight: 700; }
.jan-react-add {
  border: 1px dashed var(--cell-border); background: transparent; color: var(--muted);
  border-radius: 11px; font-size: 12px; font-weight: 700; line-height: 1; padding: 2px 8px; cursor: pointer;
}
.jan-react-add:hover { color: var(--link); border-color: var(--link); }

/* v195: public reactions on news articles — same look as the /jan/ chips */
.news-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; align-items: center; }
.news-react-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px 1px 3px; border-radius: 11px; cursor: pointer;
  background: var(--cell); border: 1px solid var(--cell-border); color: var(--text);
  font-size: 12px; line-height: 1;
}
.news-react-chip.mine { background: var(--btn-top); border-color: var(--link); }
.news-react-chip img.emoji-img { width: 16px; height: 16px; vertical-align: middle; }
.news-react-n { font-weight: 700; }
.news-react-add {
  border: 1px dashed var(--cell-border); background: transparent; color: var(--muted);
  border-radius: 11px; font-size: 12px; font-weight: 700; line-height: 1; padding: 2px 8px; cursor: pointer;
}
.news-react-add:hover { color: var(--link); border-color: var(--link); }

/* compose box */
.jan-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px;
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 6px;
}
.jan-replying {
  font-size: 12px; color: var(--muted);
  background: var(--input-bg); border: 1px solid var(--cell-border); border-radius: 5px;
  padding: 4px 8px; display: flex; align-items: center; gap: 6px;
}
.jan-replying[hidden] { display: none; }
.jan-replying strong { color: var(--link); }
.jan-replying button { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--muted); font-size: 15px; }
.jan-replying button:hover { color: var(--link); }
/* staged-image preview tray */
.jan-tray { display: flex; flex-wrap: wrap; gap: 6px; }
.jan-tray[hidden] { display: none; }
.jan-thumb { position: relative; width: 56px; height: 56px; border: 1px solid var(--cell-border); border-radius: 5px; overflow: hidden; background: var(--input-bg); }
.jan-thumb img, .jan-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.jan-thumb-x {
  position: absolute; top: 1px; right: 1px; width: 16px; height: 16px; line-height: 14px; text-align: center;
  border: none; border-radius: 3px; background: rgba(180,40,30,.9); color: #fff; cursor: pointer; font-size: 12px;
}
.jan-thumb-x:hover { background: #b5271b; }
/* textarea + the soyjak emoji-insert button pinned to its bottom-right,
   exactly like the post maker's comment box */
.jan-inputwrap { position: relative; }
.jan-form textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font: inherit;
  font-size: 14px;
  padding: 7px 40px 7px 9px;
  color: var(--input-text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 5px;
}
.jan-emoji-btn.emoji-open { position: absolute; right: 8px; bottom: 8px; }
.jan-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jan-file input[type="file"] { display: none; }
.jan-file span {
  display: inline-block;
  font-size: 12px;
  padding: 3px 9px;
  cursor: pointer;
  color: var(--link);
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border: 1px solid var(--btn-border);
  border-radius: 5px;
}
.jan-file span:hover { color: var(--link-hover); }
.jan-filename { font-size: 11px; color: var(--muted); }
.jan-status { flex: 1 1 auto; font-size: 11px; color: var(--capcode); }

/* staff / buddy list (toggleable) */
.jan-buddies {
  flex: 0 0 210px;
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 6px;
  padding: 10px;
  align-self: stretch;
}
.jan-buddies.hidden { display: none; }
.jan-buddies-head { font-size: 12px; font-weight: 700; color: var(--link); margin-bottom: 6px; }
.jan-buddy-list { list-style: none; margin: 0; padding: 0; }
.jan-buddy { display: flex; align-items: center; gap: 7px; padding: 4px 2px; }
.jan-buddy-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--name); flex: 0 0 9px; }
/* v165: Frutiger-Aero glossy status orbs. gray=offline, yellow=online-elsewhere,
   green=on /jan/ now. Glassy highlight via layered radial gradients. */
.jan-orb {
  width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), inset 0 -2px 3px rgba(0,0,0,.25);
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.95) 0 12%, rgba(255,255,255,0) 42%),
    radial-gradient(circle at 50% 120%, rgba(255,255,255,.35) 0 30%, rgba(255,255,255,0) 55%),
    var(--orb, #8a8a8a);
}
.jan-orb[data-status="offline"] { --orb: #8b8f88; }
.jan-orb[data-status="online"]  { --orb: #E8C43A; box-shadow: 0 0 5px rgba(232,196,58,.6), inset 0 -2px 3px rgba(0,0,0,.25); }
.jan-orb[data-status="jan"]     { --orb: #43C13B; box-shadow: 0 0 6px rgba(67,193,59,.7), inset 0 -2px 3px rgba(0,0,0,.25); }
.jan-buddy-name { font-size: 13px; font-weight: 700; }
.jan-buddy-name.is-admin { color: var(--capcode); }
.jan-buddy-name.is-janny { color: var(--name); }
.jan-buddy-role { font-size: 11px; color: var(--muted); }
.jan-buddy.is-me .jan-buddy-name { text-decoration: underline dotted; }

@media (max-width: 620px) {
  .jan-msg { max-width: 92%; }
  .jan-log { height: 60vh; }
  .jan-wrap { flex-direction: column; }
  .jan-buddies { flex: 1 1 auto; width: 100%; box-sizing: border-box; }
}
/* =========================================================
   v145: /calm/ theme — Frutiger Aero
   Glossy glass panels floating over an animated blue sky with drifting
   clouds. Plays its own music (see calmMusic in summy.js).
   ========================================================= */
html[data-theme="calm"] {
  --input-text: #0b3550;
  --bg: #bfe3f7;
  --cell: #eaf6fd;
  --cell-border: #8ec8e8;
  --link: #0a7ab8;
  --link-hover: #12a1e0;
  --title: #0a6aa8;
  --name: #0e8a4a;
  --subject: #0a7ab8;
  --quote: #0e8a4a;
  --text: #123c58;
  --muted: #5b87a3;
  --faint: #9cc4da;
  --input-bg: rgba(255, 255, 255, .82);
  --input-border: #8ec8e8;
  --btn-top: #eefaff;
  --btn-bottom: #b0dcf2;
  --btn-border: #6cb4dc;
  --th-bg: #1187c8;
  --th-text: #eaf8ff;
  --capcode: #0a6aa8;
  --glow: 0 0 10px rgba(18, 161, 224, .45);
}
/* the sky: bright zenith fading to a pale horizon */
html[data-theme="calm"] {
  background: linear-gradient(180deg, #4aa8e8 0%, #7cc4f0 34%, #b4e0f8 68%, #e8f7ee 100%);
  background-attachment: fixed;
}
html[data-theme="calm"] body { background: transparent; color: var(--text); }
/* v151 PERF: the clouds used to animate `background-position` on a fixed
   full-viewport ::before — that repaints the ENTIRE viewport every frame and
   was what made /calm/ chug. Now the cloud layer is a 200%-wide element moved
   with `transform: translate3d`, which the compositor handles on the GPU with
   NO repaint. Same drifting look, a fraction of the cost. */
html[data-theme="calm"] body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 200%; height: 100%;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
  background-image:
    radial-gradient(ellipse 190px 62px at 12% 20%, rgba(255,255,255,.92) 38%, rgba(255,255,255,0) 72%),
    radial-gradient(ellipse 130px 44px at 16% 16%, rgba(255,255,255,.85) 40%, rgba(255,255,255,0) 74%),
    radial-gradient(ellipse 240px 70px at 34% 33%, rgba(255,255,255,.8) 36%, rgba(255,255,255,0) 70%),
    radial-gradient(ellipse 150px 48px at 39% 29%, rgba(255,255,255,.75) 40%, rgba(255,255,255,0) 74%),
    radial-gradient(ellipse 210px 60px at 23% 55%, rgba(255,255,255,.6) 36%, rgba(255,255,255,0) 70%),
    radial-gradient(ellipse 300px 90px at 44% 74%, rgba(255,255,255,.5) 34%, rgba(255,255,255,0) 68%);
  background-repeat: no-repeat;
  animation: calm-drift 90s linear infinite;
}
/* translate by half the element's own width (= one viewport) then reset —
   because the cloud pattern lives in the left 50%, the wrap is seamless. */
@keyframes calm-drift {
  from { transform: translate3d(-50%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}
/* a soft sun glow in the corner */
html[data-theme="calm"] body::after {
  content: "";
  position: fixed;
  top: -140px; right: -140px;
  width: 420px; height: 420px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,230,.9) 0%, rgba(255,244,180,.35) 42%, rgba(255,244,180,0) 70%);
}
@media (max-width: 900px) { html[data-theme="calm"] body::after { display: none; } }
/* content lift so the sky layers stay behind everything */
/* v238: this list MUST exclude every fixed/sticky overlay. `position: relative`
   REPLACES `fixed`, so anything left in drops out of its fixed layer and lands
   inline in the page — that is what broke the settings menu (and the music
   player, games window, quote previews and toasts) on this theme. Kept in sync
   with the opsec list. */
html[data-theme="calm"] body > *:not(.boardlist):not(#lightbox):not(.layout-picker):not(#admin-panel):not(.css-editor):not(.nudge-toast):not(#flash-video):not(.news-toast):not(#thread-replies):not(.react-picker):not(.shop-scene):not(.mx-rain):not(.settings-overlay):not(.mp3-player):not(.games-win):not(.jak-sheet):not(.swing-layer):not(.react-toast):not(.ach-toast):not(#brainrot-layer):not(.raid-warning):not(.quote-preview) {
  position: relative; z-index: 1;
}
/* frosted-glass panels. v151 PERF: dropped `backdrop-filter: blur()` — it was
   applied to EVERY post + the nav, so a long thread recomputed dozens of blur
   regions on every scroll frame. The translucent gradient + inset shine already
   read as glass; the blur was the expensive part, not the look. */
html[data-theme="calm"] .post.reply,
html[data-theme="calm"] .home-box,
html[data-theme="calm"] .mod-queue-item,
html[data-theme="calm"] .mini-reply {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.5) 8%, rgba(234,246,253,.85) 100%);
  border: 1px solid rgba(140, 200, 232, .9);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 4px 14px rgba(30, 110, 170, .22);
}
html[data-theme="calm"] .post.op {
  background:
    linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.5) 9%, rgba(222,242,252,.82) 100%);
  border: 1px solid rgba(120, 190, 228, .95);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 4px 16px rgba(30, 110, 170, .25);
}
/* glossy aqua buttons: shine on top, aqua glass below */
html[data-theme="calm"] .wmm-button {
  background:
    linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.35) 48%, rgba(120,200,245,.55) 52%, rgba(190,236,255,.95) 100%),
    linear-gradient(180deg, #d8f2ff, #9ed6f2);
  border: 1px solid #6cb4dc;
  border-radius: 999px;
  color: #0b3550;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255,255,255,.85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 6px rgba(30, 110, 170, .3);
}
html[data-theme="calm"] .wmm-button:hover { color: #0e8a4a; border-color: #0e8a4a; }
html[data-theme="calm"] .wmm-button:active {
  box-shadow: inset 0 2px 6px rgba(20, 90, 140, .4);
  transform: translateY(1px);
}
/* glass nav bar */
html[data-theme="calm"] .boardlist {
  background: linear-gradient(180deg, rgba(255,255,255,.85) 0%, rgba(190,230,250,.85) 48%, rgba(140,205,240,.85) 52%, rgba(205,238,255,.9) 100%);
  border-bottom: 2px solid rgba(110, 180, 220, .9);
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 8px rgba(30, 110, 170, .25);
}
html[data-theme="calm"] .boardlist a { color: #0a6aa8; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
html[data-theme="calm"] .boardlist a:hover { color: #0e8a4a; }
html[data-theme="calm"] .wmm-title {
  color: #0a6aa8;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 #ffffff, 0 2px 6px rgba(18, 161, 224, .5);
}
html[data-theme="calm"] .post-form input[type="text"],
html[data-theme="calm"] .post-form input[type="password"],
html[data-theme="calm"] .post-form input[type="number"],
html[data-theme="calm"] .post-form textarea,
html[data-theme="calm"] #theme-select,
html[data-theme="calm"] #font-select,
html[data-theme="calm"] #anim-select,
html[data-theme="calm"] #layout-select {
  border-radius: 8px;
  background: rgba(255,255,255,.85);
  color: #0b3550;
  box-shadow: inset 0 2px 4px rgba(30, 110, 170, .2);
}

/* =========================================================
   v197: MOBILE UX PASS — friendlier and lightly modernised for
   phones, same imageboard character (boxy posts, >> arrows,
   bracketed actions, greentext, the slide-to-post). Everything
   here is scoped to narrow screens so the desktop layout is
   untouched, and it's appended last so it wins the cascade over
   the base component styles above.
   ========================================================= */
@media (max-width: 700px) {
  /* readable without pinch-zoom, a touch more breathing room */
  body { font-size: 15px; }

  /* tapping a >>quote link shouldn't drop the post under the sticky bar */
  .post, .postcontainer { scroll-margin-top: 64px; }

  /* posts: full-width cards, clearer separation, never overflow the screen */
  .post.reply {
    display: block;
    padding: 8px 12px 10px;
    border-radius: 6px;
    margin: 0 0 8px;
  }
  .postcontainer { margin-left: 6px; gap: 6px; }
  .sidearrow { font-size: 15px; padding-top: 10px; }
  .body { line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; }

  /* images stack above the text instead of cramping a narrow column */
  .file-link { float: none; display: block; margin: 6px 0; }
  .op .file-link img, .reply .file-link img {
    max-width: 100%; max-height: 62vh; height: auto; width: auto;
  }
  .media-wrap.extra .post-image { max-width: 46vw; max-height: 46vw; }
  .post-media { max-width: 100%; }

  /* the meta line's actions become real tap targets; the post number
     stays plain text like a classic imageboard */
  .intro { line-height: 2.15; }
  .intro .quote-full,
  .intro .report-link,
  .intro .edit-link:not([hidden]),
  .intro .dl-link,
  .intro .replylink,
  .intro .mod-del {
    display: inline-block;
    padding: 4px 9px;
    margin: 1px 0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    background: color-mix(in srgb, var(--cell-border) 22%, transparent);
  }
  .intro .post_no, .intro .quote-me { display: inline-block; padding: 3px 3px; font-size: 15px; }
  .intro time { display: inline-block; margin: 0 2px; }

  /* reactions: comfy tap size, add button always visible (no hover on touch) */
  .reacts { gap: 6px; margin-top: 6px; }
  .react-add { opacity: 1; min-height: 30px; padding: 4px 12px; font-size: 16px; }
  .react-chip { padding: 3px 8px 3px 4px; }
  .react-chip img { width: 18px; height: 18px; }

  /* the posting form: stacked labels, full-width fields, 16px inputs so
     iOS doesn't auto-zoom the page on focus */
  .post-form table, .post-form tbody, .post-form tr:not([hidden]) { display: block; width: 100%; }
  .post-form th, .post-form td { display: block; width: 100%; box-sizing: border-box; }
  .post-form th {
    background: none; color: var(--name);
    border: none; padding: 8px 2px 2px; font-size: 13px;
  }
  .post-form th:empty { display: none; }
  .post-form td { padding: 0 2px 6px; }
  .post-form input[type="text"],
  .post-form input[type="password"],
  .post-form input[type="number"],
  .post-form textarea {
    width: 100%; box-sizing: border-box;
    font-size: 16px !important;
    padding: 9px 10px; min-height: 42px;
    border-radius: 6px;
  }
  .post-form textarea { width: 100%; min-height: 96px; }
  .comment-wrap { display: block; width: 100%; }

  /* slide-to-post: wider + taller so it's easy to drag with a thumb
     (the JS reads track width dynamically, so this is safe) */
  .slide-track { width: min(340px, 86vw); height: 40px; border-radius: 20px; }
  .slide-knob { width: 39px; height: 39px; }
  .slide-label { font-size: 13px; }

  /* general buttons get a proper tap height */
  .wmm-button { min-height: 42px; padding: 8px 16px; font-size: 15px; border-radius: 6px; }

  /* quick-reply docks to the bottom of the screen, within thumb reach */
  .mini-reply {
    top: auto; bottom: 8px; left: 6px; right: 6px;
    width: auto; max-width: none;
  }
  .mini-reply-form textarea { min-height: 84px; font-size: 16px; }

  /* wide tables (bans, stats) scroll sideways instead of blowing out the page */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

  /* pagination / thread nav: bigger and tappable */
  .thread-nav { font-size: 15px; }
  .thread-nav a, .pager a { display: inline-block; padding: 6px 10px; }

  /* kill the accidental grey flash on tap, keep it subtle */
  a, button, .slide-knob, .react-add, .react-chip { -webkit-tap-highlight-color: rgba(0,0,0,.08); }
}

/* very small phones: rein in the big display type a little */
@media (max-width: 430px) {
  #site-title { font-size: 34px; }
  .board-header h1, .home-header h1 { font-size: 23px; }
  .op .file-link img, .reply .file-link img { max-height: 54vh; }
}

/* ---------- home wordmark (replaces the [home] nav text) ---------- */
.home-logo { height: 19px; width: auto; vertical-align: middle; display: inline-block; }
/* the coolmath theme swaps the wordmark for its red/orange logo variant */
html[data-theme="coolmath"] .home-logo { content: url("assets/img/summy-wordmark-coolmath.png"); height: 21px; }
.home-logo-link { line-height: 0; }

/* =========================================================
   v198: "Bored Bro" theme — the dark flash-games-portal look
   (BoredBro.com): near-black chrome with a red underline, a
   charcoal field, glossy red buttons rimmed in gold, and
   orange/gold gaming type.
   ========================================================= */
html[data-theme="boredbro"] {
  --input-text: #f4f4f4;
  --bg: #3a3a3a;
  --cell: #2b2b2b;
  --cell-border: #565656;
  --link: #ffb01f;
  --link-hover: #ffd24d;
  --title: #ffc21a;
  --name: #ff8c1a;
  --subject: #ffcf3a;
  --quote: #8ccf3a;
  --text: #f0f0f0;
  --muted: #b3b3b3;
  --faint: #7d7d7d;
  --input-bg: #1f1f1f;
  --input-border: #d99a2b;
  --btn-top: #e0542a;
  --btn-bottom: #7d1c0d;
  --btn-border: #e8a33d;
  --th-bg: #000000;
  --th-text: #ffc21a;
  --capcode: #ff4b3e;
  --glow: none;
}
/* charcoal field with a soft top glow, like the portal's grey page */
html[data-theme="boredbro"] body {
  background: radial-gradient(ellipse at 50% 0%, #464646 0%, #383838 55%, #2e2e2e 100%);
  background-attachment: fixed;
  color: var(--text);
}
/* the top nav becomes the black BoredBro header with its red underline */
html[data-theme="boredbro"] .boardlist {
  background: #000;
  border-bottom: 3px solid #c0140f;
  box-shadow: 0 2px 8px rgba(0,0,0,.6);
}
html[data-theme="boredbro"] .boardlist a { color: var(--link); text-shadow: 0 1px 1px #000; }
html[data-theme="boredbro"] .mobile-bar { background: #000; border-bottom: 3px solid #c0140f; }
/* posts as dark panels with a thin warm edge */
html[data-theme="boredbro"] .post.reply,
html[data-theme="boredbro"] .home-box,
html[data-theme="boredbro"] .mod-queue-item,
html[data-theme="boredbro"] .mini-reply,
html[data-theme="boredbro"] .ban-box {
  background: linear-gradient(180deg, #333 0%, #292929 100%);
  border: 1px solid #4d4d4d;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 2px 6px rgba(0,0,0,.4);
}
/* glossy red buttons with a gold rim — the "All Games" / action-button look */
html[data-theme="boredbro"] .wmm-button,
html[data-theme="boredbro"] #theme-select,
html[data-theme="boredbro"] #font-select,
html[data-theme="boredbro"] #anim-select,
html[data-theme="boredbro"] #layout-select,
html[data-theme="boredbro"] .move-select {
  background: linear-gradient(180deg, #e85a2c 0%, #c53a1a 48%, #a02410 52%, #7d1c0d 100%);
  border: 1px solid #e8a33d;
  border-radius: 6px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,.5);
  box-shadow: 0 1px 0 rgba(255,220,150,.5) inset, 0 2px 5px rgba(0,0,0,.45);
}
html[data-theme="boredbro"] .wmm-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(0,0,0,.5) inset;
}
/* the mobile board chips + gear inherit the red-gold button look */
html[data-theme="boredbro"] .mobile-board,
html[data-theme="boredbro"] .mobile-settings-btn {
  background: linear-gradient(180deg, #e85a2c 0%, #c53a1a 48%, #a02410 52%, #7d1c0d 100%);
  border-color: #e8a33d;
  color: #ffe;
}
/* inputs stay dark and readable with a gold edge */
html[data-theme="boredbro"] .post-form input[type="text"],
html[data-theme="boredbro"] .post-form input[type="password"],
html[data-theme="boredbro"] .post-form input[type="number"],
html[data-theme="boredbro"] .post-form textarea {
  border: 1px solid #d99a2b;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,.5) inset;
}
/* table headers: black bars with gold text, like the portal's section chrome */
html[data-theme="boredbro"] .post-form th,
html[data-theme="boredbro"] .data-table th {
  background: #000;
  color: #ffc21a;
  border-color: #c0140f;
}
/* title gets the yellow -> orange gaming shine */
html[data-theme="boredbro"] #site-title {
  background: linear-gradient(90deg, #ffcf3a 30%, #ff7a1a 50%, #ffcf3a 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* red dividers to match the header/footer accents */
html[data-theme="boredbro"] hr { border: none; border-top: 2px solid #c0140f; opacity: .7; }

/* =========================================================
   v199: user-uploaded fonts added to the global font picker.
   Each is a woff2 (with the original ttf/otf as fallback).
   ========================================================= */
@font-face { font-family: "Summy Klill"; src: url("assets/fonts/klill.woff2") format("woff2"), url("assets/fonts/klill.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Unkempt"; src: url("assets/fonts/unkempt.woff2") format("woff2"), url("assets/fonts/unkempt.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Vectroid"; src: url("assets/fonts/vectroid.woff2") format("woff2"), url("assets/fonts/vectroid.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Summy White Rabbit"; src: url("assets/fonts/whiterabbit.woff2") format("woff2"), url("assets/fonts/whiterabbit.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Biolinum"; src: url("assets/fonts/biolinum.woff2") format("woff2"), url("assets/fonts/biolinum.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Architects"; src: url("assets/fonts/architects.woff2") format("woff2"), url("assets/fonts/architects.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Bubbler"; src: url("assets/fonts/bubbler.woff2") format("woff2"), url("assets/fonts/bubbler.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Cinzel"; src: url("assets/fonts/cinzel.woff2") format("woff2"), url("assets/fonts/cinzel.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Coda"; src: url("assets/fonts/coda.woff2") format("woff2"), url("assets/fonts/coda.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Comfortaa"; src: url("assets/fonts/comfortaa.woff2") format("woff2"), url("assets/fonts/comfortaa.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy VT323"; src: url("assets/fonts/vt323.woff2") format("woff2"), url("assets/fonts/vt323.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Indie Flower"; src: url("assets/fonts/indieflower.woff2") format("woff2"), url("assets/fonts/indieflower.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Instrument Serif"; src: url("assets/fonts/instrumentserif.woff2") format("woff2"), url("assets/fonts/instrumentserif.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Summy Gruppo"; src: url("assets/fonts/gruppo.woff2") format("woff2"), url("assets/fonts/gruppo.ttf") format("truetype"); font-display: swap; }
html[data-font="klill"][data-font] body { font-family: "Summy Klill", cursive; }
html[data-font="unkempt"][data-font] body { font-family: "Summy Unkempt", cursive; }
html[data-font="vectroid"][data-font] body { font-family: "Summy Vectroid", sans-serif; }
html[data-font="whiterabbit"][data-font] body { font-family: "Summy White Rabbit", monospace; }
html[data-font="biolinum"][data-font] body { font-family: "Summy Biolinum", sans-serif; }
html[data-font="architects"][data-font] body { font-family: "Summy Architects", cursive; }
html[data-font="bubbler"][data-font] body { font-family: "Summy Bubbler", sans-serif; }
html[data-font="cinzel"][data-font] body { font-family: "Summy Cinzel", serif; }
html[data-font="coda"][data-font] body { font-family: "Summy Coda", sans-serif; }
html[data-font="comfortaa"][data-font] body { font-family: "Summy Comfortaa", sans-serif; }
html[data-font="vt323"][data-font] body { font-family: "Summy VT323", monospace; }
html[data-font="indieflower"][data-font] body { font-family: "Summy Indie Flower", cursive; }
html[data-font="instrumentserif"][data-font] body { font-family: "Summy Instrument Serif", serif; }
html[data-font="gruppo"][data-font] body { font-family: "Summy Gruppo", sans-serif; }

/* =========================================================
   v201: "Coolmath" theme — the CLASSIC coolmath.com look: a
   pure-black amusement-park page, bright rainbow colours, big
   yellow headings, cyan/green accent text, bold colourful nav
   pills and red dividers. Comic Sans (the site default) makes
   it land. Built to match the reference screenshot.
   ========================================================= */
html[data-theme="coolmath"] {
  --input-text: #f4f4f4;
  --bg: #000000;
  --cell: #0d0d0d;
  --cell-border: #e01e1e;
  --link: #29c5ff;
  --link-hover: #8fe3ff;
  --title: #ffd400;
  --name: #35d84c;
  --subject: #ffd400;
  --quote: #35d84c;
  --text: #f4f4f4;
  --muted: #b6b6b6;
  --faint: #6f6f6f;
  --input-bg: #141414;
  --input-border: #ffd400;
  --btn-top: #3a8bff;
  --btn-bottom: #1447c4;
  --btn-border: #ffd400;
  --th-bg: #7b1fa2;
  --th-text: #ffe14d;
  --capcode: #ff2a2a;
  --glow: 0 0 6px rgba(255,212,0,.35);
}
/* pure black amusement-park backdrop */
html[data-theme="coolmath"] body { background: #000; color: var(--text); }
/* top nav: black with the site's red rule; links go bright */
html[data-theme="coolmath"] .boardlist,
html[data-theme="coolmath"] .mobile-bar {
  background: #000;
  border-bottom: 4px solid #e01e1e;
  box-shadow: 0 2px 6px rgba(224,30,30,.4);
}
/* nav links cycle bright colours like the coolmath pill menu */
html[data-theme="coolmath"] .boardlist a { color: #ffd400; font-weight: bold; text-shadow: 0 0 4px rgba(0,0,0,.6); }
html[data-theme="coolmath"] .nav-links a:nth-of-type(4n+1) { color: #29c5ff; }
html[data-theme="coolmath"] .nav-links a:nth-of-type(4n+2) { color: #b968ff; }
html[data-theme="coolmath"] .nav-links a:nth-of-type(4n+3) { color: #35d84c; }
html[data-theme="coolmath"] .nav-links a:nth-of-type(4n+4) { color: #ffd400; }
html[data-theme="coolmath"] .mobile-board {
  background: linear-gradient(180deg, #3a8bff, #1447c4);
  border-color: #ffd400; color: #fff; font-weight: bold;
}
/* posts: black panels rimmed in bright red, rounded */
html[data-theme="coolmath"] .post.reply,
html[data-theme="coolmath"] .home-box,
html[data-theme="coolmath"] .mod-queue-item,
html[data-theme="coolmath"] .mini-reply,
html[data-theme="coolmath"] .ban-box {
  background: #0d0d0d;
  border: 2px solid #e01e1e;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(224,30,30,.25);
}
/* headings in the signature bright yellow */
html[data-theme="coolmath"] .mod-h2,
html[data-theme="coolmath"] .board-header h1,
html[data-theme="coolmath"] .home-header h1,
html[data-theme="coolmath"] .home-header .tagline { color: #ffd400; }
html[data-theme="coolmath"] .board-header .subtitle { color: #35d84c; }
/* bold, bright, yellow-rimmed buttons + dropdowns (the pill look) */
html[data-theme="coolmath"] .wmm-button,
html[data-theme="coolmath"] #theme-select,
html[data-theme="coolmath"] #font-select,
html[data-theme="coolmath"] #anim-select,
html[data-theme="coolmath"] #layout-select,
html[data-theme="coolmath"] .move-select {
  background: linear-gradient(180deg, #3a8bff 0%, #1447c4 100%);
  border: 2px solid #ffd400;
  border-radius: 14px;
  color: #fff;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  box-shadow: 0 0 6px rgba(58,139,255,.4);
}
html[data-theme="coolmath"] .wmm-button:active { transform: translateY(1px); }
/* dark inputs with a yellow edge */
html[data-theme="coolmath"] .post-form input[type="text"],
html[data-theme="coolmath"] .post-form input[type="password"],
html[data-theme="coolmath"] .post-form input[type="number"],
html[data-theme="coolmath"] .post-form textarea {
  border: 1px solid #ffd400;
  border-radius: 6px;
}
/* purple section headers with yellow text, like the coloured banners */
html[data-theme="coolmath"] .post-form th,
html[data-theme="coolmath"] .data-table th {
  background: linear-gradient(180deg, #9a3fd0, #6a159a);
  color: #ffe14d;
  border-color: #e01e1e;
}
/* the wordmark title takes the red -> orange -> yellow logo shine */
html[data-theme="coolmath"] #site-title {
  background: linear-gradient(90deg, #ff2a2a 20%, #ff8a00 50%, #ffd400 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* red dividers everywhere, coolmath-style */
html[data-theme="coolmath"] hr { border: none; border-top: 3px solid #e01e1e; opacity: .85; }

/* =========================================================
   v203: "Sonic" theme — the Sonic Mega Collection main-menu
   look: a deep royal-blue swirl, bright yellow logo-style
   headings, cyan and white text, red accents and a Green Hill
   Zone stripe. Pairs with the looping menu music (theme-music
   module in summy.js).
   ========================================================= */
html[data-theme="sonic"] {
  --input-text: #0a2a6a;
  --bg: #0139b4;
  --cell: #0a2f8f;
  --cell-border: #2f6fd6;
  --link: #ffe400;
  --link-hover: #fff27a;
  --title: #ffe400;
  --name: #ffd21a;
  --subject: #ffe400;
  --quote: #6ee06e;
  --text: #eef4ff;
  --muted: #9fc0f0;
  --faint: #5f86c8;
  --input-bg: #eaf1ff;
  --input-border: #ffe400;
  --btn-top: #ff3b3b;
  --btn-bottom: #b81616;
  --btn-border: #ffe400;
  --th-bg: #ffcf00;
  --th-text: #0a2a6a;
  --capcode: #ff3b3b;
  --glow: 0 0 8px rgba(255,228,0,.4);
}
/* the deep blue menu swirl */
html[data-theme="sonic"] body {
  background: radial-gradient(circle at 50% 38%, #1f63d8 0%, #0f47bd 45%, #052a86 100%);
  background-attachment: fixed;
  color: var(--text);
}
/* top nav: darker blue with a Green Hill stripe under it */
html[data-theme="sonic"] .boardlist,
html[data-theme="sonic"] .mobile-bar {
  background: linear-gradient(180deg, #0a3fb5 0%, #052a86 100%);
  border-bottom: 6px solid transparent;
  border-image: repeating-linear-gradient(45deg, #2ea62e 0 10px, #1c7a1c 10px 20px) 6;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
html[data-theme="sonic"] .boardlist a { color: #ffe400; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,20,.6); }
html[data-theme="sonic"] .mobile-board {
  background: linear-gradient(180deg, #ff3b3b, #b81616);
  border-color: #ffe400; color: #fff; font-weight: bold;
}
/* posts: blue panels with a bright rim */
html[data-theme="sonic"] .post.reply,
html[data-theme="sonic"] .home-box,
html[data-theme="sonic"] .mod-queue-item,
html[data-theme="sonic"] .mini-reply,
html[data-theme="sonic"] .ban-box {
  background: linear-gradient(180deg, #0d368f 0%, #0a2a72 100%);
  border: 2px solid #2f6fd6;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,20,80,.5);
}
/* yellow logo-style headings with a blue outline shadow */
html[data-theme="sonic"] #site-title,
html[data-theme="sonic"] .home-header h1,
html[data-theme="sonic"] .board-header h1,
html[data-theme="sonic"] .mod-h2 {
  color: #ffe400;
  text-shadow: 2px 2px 0 #003, -1px -1px 0 #06c, 0 0 8px rgba(255,228,0,.4);
}
html[data-theme="sonic"] .home-header .tagline { color: #7fd0ff; }
html[data-theme="sonic"] .board-header .subtitle { color: #7fd0ff; }
/* glossy red buttons rimmed in yellow (the menu accent colour) */
html[data-theme="sonic"] .wmm-button,
html[data-theme="sonic"] #theme-select,
html[data-theme="sonic"] #font-select,
html[data-theme="sonic"] #anim-select,
html[data-theme="sonic"] #layout-select,
html[data-theme="sonic"] .move-select {
  background: linear-gradient(180deg, #ff4b4b 0%, #d31d1d 52%, #a81414 100%);
  border: 2px solid #ffe400;
  border-radius: 10px;
  color: #fff;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  box-shadow: 0 1px 0 rgba(255,255,180,.5) inset, 0 2px 5px rgba(0,0,40,.4);
}
html[data-theme="sonic"] .wmm-button:active { transform: translateY(1px); }
/* bright inputs with a yellow edge */
html[data-theme="sonic"] .post-form input[type="text"],
html[data-theme="sonic"] .post-form input[type="password"],
html[data-theme="sonic"] .post-form input[type="number"],
html[data-theme="sonic"] .post-form textarea {
  border: 2px solid #ffe400;
  border-radius: 6px;
}
/* yellow section headers with navy text, like the menu banners */
html[data-theme="sonic"] .post-form th,
html[data-theme="sonic"] .data-table th {
  background: linear-gradient(180deg, #ffe14d, #ffcf00);
  color: #0a2a6a;
  border-color: #b81616;
}
/* Green Hill Zone stripe dividers */
html[data-theme="sonic"] hr {
  height: 8px; border: none;
  background: repeating-linear-gradient(45deg, #2ea62e 0 8px, #1c7a1c 8px 16px);
}

/* =========================================================
   v204: /jan/ profile pictures + a mobile-friendly staff chat
   ========================================================= */
.jan-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  object-fit: cover; vertical-align: middle; margin-right: 5px;
  border: 1px solid var(--cell-border); background: var(--cell);
}
.jan-msg.mine .jan-avatar { border-color: rgba(255,255,255,.45); }
/* v232: the strapline and the picture picker both sit centred under the
   /jan/ title rather than hugging the left edge */
.jan-profile {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin: 6px 0 0; font-size: 12px; color: var(--muted);
}
.jan-profile-label { font-weight: 700; }
.jan-profile-current { width: 34px; height: 34px; }
.jan-pfp-file input[type="file"] { display: none; }

/* ---- mobile staff chat ---- */
@media (max-width: 700px) {
  .jan-wrap { flex-direction: column; gap: 8px; }
  .jan-main { gap: 6px; }
  .jan-log { height: min(56vh, 520px); padding: 8px; }
  .jan-msg { max-width: 90%; }
  /* the staff list docks below the log, full width, when opened */
  .jan-buddies { flex: 0 0 auto; width: 100%; }
  /* compose: full-width, 16px so iOS doesn't zoom the page on focus */
  .jan-form textarea, #jan-input { font-size: 16px !important; min-height: 48px; box-sizing: border-box; }
  .jan-controls { gap: 6px; }
  .jan-controls .wmm-button { min-height: 40px; padding: 7px 12px; }
  .jan-file span { min-height: 40px; display: inline-flex; align-items: center; padding: 6px 10px; }
  .jan-emoji-btn { width: 40px; height: 40px; }
  .jan-react-add, .jan-react-chip { min-height: 28px; }
  .jan-profile { gap: 6px; font-size: 13px; }
  .jan-avatar { width: 26px; height: 26px; }
}

/* =========================================================
   v205: readability fixes
   - Native <option> popups are drawn on a white system surface, so a
     theme that gives its <select> light text made the options white-on-white.
     Force dark-on-white options for the settings dropdowns.
   - Poll options now use --input-text (paired with --input-bg) instead of
     --text; a few themes also get explicit opaque poll backgrounds so the
     labels are readable no matter what.
   ========================================================= */
#theme-select option, #font-select option, #anim-select option,
#layout-select option, .move-select option, select option {
  background: #fff; color: #111;
}

/* Sonic: light input surface -> dark navy poll text */
html[data-theme="sonic"] .poll-opt,
html[data-theme="sonic"] .news-poll-opt {
  background: #eaf1ff; color: #0a2a6a;
}
html[data-theme="sonic"] .poll-count, html[data-theme="sonic"] .poll-total,
html[data-theme="sonic"] .news-poll-count, html[data-theme="sonic"] .news-poll-total { color: #4a6aa0; }

/* Xbox: dark input surface -> light green poll text */
html[data-theme="xbox360"] .poll-opt,
html[data-theme="xbox360"] .news-poll-opt {
  background: #12240f; color: #e8f4e0;
}

/* Shekels: fully opaque dark surface -> warm gold poll text */
html[data-theme="shekels"] .poll-opt,
html[data-theme="shekels"] .news-poll-opt {
  background: #1e1808; color: #ffe9a8;
}

/* =========================================================
   v210: "Norman" theme — a Nate-style character theme built
   around his palette: navy shirt, grey skin, black hair and the
   little gold amulet. Cool slate/navy where Nate is warm canvas.
   ========================================================= */
html[data-theme="norman"] {
  --input-text: #14161f;
  --bg: #b7bccd;
  --cell: #dde0ea;
  --cell-border: #8f95a8;
  --link: #2c2a5c;
  --link-hover: #4a478f;
  --title: #2c2a5c;
  --name: #6a6320;
  --subject: #3a3a3a;
  --quote: #4b6b2a;
  --text: #1e2029;
  --muted: #6b7080;
  --faint: #9aa0b0;
  --input-bg: #f4f5fa;
  --input-border: #9aa0b4;
  --btn-top: #f2f3f8;
  --btn-bottom: #c9cddb;
  --btn-border: #787e92;
  --th-bg: #2c2a5c;
  --th-text: #e8c65a;
  --capcode: #b3271f;
  --glow: 0 0 8px rgba(44, 42, 92, .35);
}
/* brushed slate backdrop, cool where Nate's is warm canvas */
html[data-theme="norman"] {
  background:
    repeating-linear-gradient(90deg, rgba(44, 42, 92, .04) 0 1px, rgba(0,0,0,0) 1px 4px),
    repeating-linear-gradient(0deg, rgba(44, 42, 92, .04) 0 1px, rgba(0,0,0,0) 1px 4px),
    linear-gradient(180deg, #c6cad9 0%, #b2b8cb 55%, #9ea5bd 100%);
  background-attachment: fixed;
}
html[data-theme="norman"] body { background: transparent; color: var(--text); }
/* top bar takes the navy of his pants; light text so it reads on the navy */
html[data-theme="norman"] .boardlist,
html[data-theme="norman"] .mobile-bar {
  background: #2c2a5c;
  border-bottom: 1px solid #1b1a3c;
  color: #c9cde0;
}
html[data-theme="norman"] .boardlist a { color: #e8c65a; }
html[data-theme="norman"] .boardlist a:hover { color: #f5dd93; }
html[data-theme="norman"] .boardlist .nav-settings-toggle { color: #23214a; }
/* the man himself, arms crossed, parked bottom-right */
html[data-theme="norman"] body::after {
  content: "";
  position: fixed;
  right: 8px;
  bottom: 0;
  width: 130px;
  height: 340px;
  z-index: -1;
  pointer-events: none;
  opacity: .82;
  background: url("assets/img/norman.png") no-repeat bottom right / contain;
  filter: drop-shadow(0 2px 3px rgba(20, 22, 40, .25));
}
@media (max-width: 900px) { html[data-theme="norman"] body::after { display: none; } }
/* crisp panels with a navy hairline */
html[data-theme="norman"] .post.reply,
html[data-theme="norman"] .home-box,
html[data-theme="norman"] .mod-queue-item,
html[data-theme="norman"] .mini-reply,
html[data-theme="norman"] .ban-box {
  background: linear-gradient(180deg, #f6f7fb 0%, #e5e8f0 100%);
  border: 1px solid #8f95a8;
  border-radius: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(44, 42, 92, .18),
    0 2px 4px rgba(40, 45, 70, .25);
  outline: 1px solid rgba(44, 42, 92, .12);
  outline-offset: -4px;
}
/* navy headers with the amulet's gold lettering */
html[data-theme="norman"] .post-form th,
html[data-theme="norman"] .data-table th {
  background: linear-gradient(180deg, #3a3770, #2c2a5c);
  color: #e8c65a;
  border-color: #23214a;
}
html[data-theme="norman"] #site-title,
html[data-theme="norman"] .home-header h1,
html[data-theme="norman"] .board-header h1,
html[data-theme="norman"] .mod-h2 { color: #2c2a5c; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
html[data-theme="norman"] .home-header .tagline,
html[data-theme="norman"] .board-header .subtitle { color: #6a6320; }
/* buttons: pale slate with a navy edge, gold on press */
html[data-theme="norman"] .wmm-button,
html[data-theme="norman"] #theme-select,
html[data-theme="norman"] #font-select,
html[data-theme="norman"] #anim-select,
html[data-theme="norman"] #layout-select,
html[data-theme="norman"] .move-select {
  background: linear-gradient(180deg, #f2f3f8 0%, #ccd0de 100%);
  border: 1px solid #787e92;
  border-radius: 5px;
  color: #23214a;
}
html[data-theme="norman"] .wmm-button:active { background: linear-gradient(180deg, #e8c65a 0%, #cfa93c 100%); }
html[data-theme="norman"] hr { border-top: 1px solid rgba(44, 42, 92, .35); border-bottom: 1px solid rgba(255,255,255,.7); }
html[data-theme="norman"] #mascot { border-color: #8f95a8; }

/* v217: soyjak-party style bump rolls on replies */
.bumproll {
  display: inline-block; margin-left: 4px; padding: 0 5px;
  border-radius: 3px; font-size: 11px; font-weight: 700; line-height: 1.5;
  vertical-align: middle; letter-spacing: .02em;
}
.bumproll.br-bump { background: #1f8f3a; color: #fff; box-shadow: 0 0 5px rgba(31,143,58,.55); }
.bumproll.br-sage { background: var(--cell); color: var(--muted); border: 1px solid var(--cell-border); }
.bumproll.br-supersage { background: #8b1414; color: #ffd9d9; box-shadow: 0 0 6px rgba(139,20,20,.6); }

/* v217 (F5): search field at the top of every reaction/emoji picker */
.react-search { padding: 6px 6px 4px; position: sticky; top: 0; background: var(--cell); z-index: 2; }
.react-search-input {
  width: 100%; box-sizing: border-box;
  font: inherit; font-size: 12px; padding: 5px 7px;
  color: var(--input-text); background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: 4px;
}
.react-search-empty { padding: 8px; text-align: center; font-size: 12px; color: var(--muted); }

/* v217 (F6): the /jan/ per-message shop-font picker */
.jan-font-pick { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.jan-font-pick select {
  font: inherit; font-size: 12px; padding: 2px 4px;
  color: var(--input-text); background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: 4px;
}

/* =========================================================
   v218: purchased per-post effects (shop)
   ========================================================= */
.post[data-fx] { position: relative; }

/* --- Sparkles: drifting twinkles that fade in and out --- */
.post[data-fx="sparkles"] { overflow: visible; }
.post[data-fx="sparkles"]::before,
.post[data-fx="sparkles"]::after {
  content: "";
  position: absolute; inset: -6px;
  pointer-events: none; z-index: 3;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 2px),
    radial-gradient(circle, #ffe9a8 0 1px, transparent 2px),
    radial-gradient(circle, #cfe9ff 0 1px, transparent 2px),
    radial-gradient(circle, #fff 0 1px, transparent 2px),
    radial-gradient(circle, #ffd7f5 0 1px, transparent 2px);
  background-size: 3px 3px, 3px 3px, 3px 3px, 3px 3px, 3px 3px;
  background-position: 8% 20%, 72% 12%, 40% 82%, 91% 62%, 22% 55%;
  animation: fx-sparkle 3.2s ease-in-out infinite;
}
.post[data-fx="sparkles"]::after {
  background-position: 55% 30%, 15% 74%, 84% 38%, 34% 8%, 66% 90%;
  animation-delay: 1.6s;
}
@keyframes fx-sparkle {
  0%, 100% { opacity: 0; transform: translateY(0) scale(.9); }
  50%      { opacity: 1; transform: translateY(-4px) scale(1.15); }
}

/* --- VHS: scanlines, tracking wobble, colour bleed --- */
.post[data-fx="vhs"] {
  overflow: hidden;
  filter: saturate(1.25) contrast(1.06);
  animation: fx-vhs-track 6s steps(60) infinite;
}
.post[data-fx="vhs"] .body,
.post[data-fx="vhs"] .intro { text-shadow: .6px 0 rgba(255,0,80,.5), -.6px 0 rgba(0,220,255,.5); }
.post[data-fx="vhs"]::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none; z-index: 4;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(255,255,255,.07), transparent 12%);
  mix-blend-mode: overlay;
}
@keyframes fx-vhs-track {
  0%, 92%, 100% { transform: translateX(0); }
  93%           { transform: translateX(-2px) skewX(.4deg); }
  95%           { transform: translateX(2px)  skewX(-.5deg); }
  97%           { transform: translateX(-1px); }
}

/* --- Gradient: the post box becomes a two-colour gradient --- */
.post[data-fx="gradient"] {
  background: linear-gradient(135deg, var(--fx-a, #2b6cb0), var(--fx-b, #6b46c1)) !important;
  border-color: color-mix(in srgb, var(--fx-a, #2b6cb0) 60%, #000) !important;
}
/* keep text legible on an arbitrary user-chosen gradient */
.post[data-fx="gradient"] .body,
.post[data-fx="gradient"] .intro,
.post[data-fx="gradient"] .intro a,
.post[data-fx="gradient"] .post_no { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.65); }

/* --- Confetti: one burst when the post first scrolls into view (JS-driven) --- */
.fx-confetti-layer { position: absolute; inset: 0; overflow: visible; pointer-events: none; z-index: 5; }
.fx-confetti-bit {
  position: absolute; top: 40%; left: 50%;
  width: 7px; height: 10px; border-radius: 1px;
  will-change: transform, opacity;
  animation: fx-confetti-fly var(--dur, 1100ms) cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes fx-confetti-fly {
  0%   { opacity: 1; transform: translate(0,0) rotate(0deg); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}
/* post-maker gradient colour inputs */
.fx-grad-colours input[type="color"] {
  width: 34px; height: 24px; padding: 0; vertical-align: middle;
  border: 1px solid var(--input-border); background: var(--input-bg); cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .post[data-fx="sparkles"]::before, .post[data-fx="sparkles"]::after,
  .post[data-fx="vhs"] { animation: none; }
}

/* =========================================================
   v218: embedded games window (draggable + resizable)
   ========================================================= */
.games-win {
  position: fixed; z-index: 99998;
  display: flex; flex-direction: column;
  min-width: 320px; min-height: 240px;
  background: var(--cell);
  border: 2px solid var(--cell-border);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
  overflow: hidden;
}
.games-win.dragging { user-select: none; }
/* while dragging/resizing the iframe must not swallow the pointer */
.games-win.dragging .games-frame { pointer-events: none; }
.games-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px; cursor: move;
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border-bottom: 1px solid var(--cell-border);
}
.games-title { font-size: 12px; font-weight: 700; color: var(--title); letter-spacing: .04em; }
.games-select {
  flex: 1 1 auto; min-width: 0;
  font: inherit; font-size: 12px; padding: 2px 4px;
  color: var(--input-text); background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: 3px;
}
.games-x {
  flex: 0 0 auto; width: 22px; height: 20px; cursor: pointer;
  font: inherit; font-size: 14px; line-height: 1;
  color: #fff; background: #b5271b; border: 1px solid #7d1a12; border-radius: 3px;
}
.games-x:hover { background: #d43325; }
.games-body { flex: 1 1 auto; background: #000; }
.games-frame { display: block; width: 100%; height: 100%; border: 0; }
.games-resize {
  position: absolute; right: 0; bottom: 0;
  width: 16px; height: 16px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 45%, var(--cell-border) 45%, var(--cell-border) 55%, transparent 55%,
                              transparent 70%, var(--cell-border) 70%, var(--cell-border) 80%, transparent 80%);
}
@media (max-width: 700px) {
  /* on a phone a floating window is useless — fill the screen instead */
  .games-win { left: 2vw !important; top: 8vh !important; width: 96vw !important; height: 74vh !important; }
  .games-resize { display: none; }
}

/* =========================================================
   v218: site-wide MP3 player (hidden until enabled)
   ========================================================= */
.mp3-player {
  position: fixed; left: 10px; bottom: 10px; z-index: 99997;
  width: 232px; padding: 7px 8px 8px;
  background: var(--cell);
  border: 2px solid var(--cell-border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  font-size: 12px; color: var(--text);
}
.mp3-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mp3-label { font-weight: 700; color: var(--title); letter-spacing: .04em; }
.mp3-x {
  width: 18px; height: 18px; cursor: pointer; line-height: 1;
  font: inherit; color: var(--muted); background: transparent;
  border: 1px solid var(--cell-border); border-radius: 3px;
}
.mp3-x:hover { color: var(--link); border-color: var(--link); }
.mp3-title {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--link); margin-bottom: 5px; font-weight: 700;
}
.mp3-row { display: flex; align-items: center; gap: 4px; margin: 3px 0; }
.mp3-b {
  cursor: pointer; font: inherit; font-size: 12px; line-height: 1;
  padding: 3px 7px; min-height: 24px;
  color: var(--input-text); background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border: 1px solid var(--btn-border); border-radius: 3px;
}
.mp3-b:hover { border-color: var(--link); }
.mp3-b.on { color: var(--link); border-color: var(--link); box-shadow: 0 0 4px var(--link); }
.mp3-time { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp3-vlabel { color: var(--muted); }
.mp3-seek, .mp3-vol { width: 100%; accent-color: var(--link); }
.mp3-vol { flex: 1 1 auto; }
.mp3-list {
  width: 100%; margin-top: 5px; font: inherit; font-size: 11px; padding: 2px;
  color: var(--input-text); background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: 3px;
}
/* v235: add-your-own-MP3 row. Purely local — the files are held in IndexedDB in
   this browser and never uploaded, so the note under it is a promise, not chrome. */
.mp3-own { margin-top: 5px; }
.mp3-addbtn {
  flex: 1 1 auto;
  text-align: center;
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  color: var(--btn-text, var(--text));
  border: 1px solid var(--btn-border);
  border-radius: 3px;
}
.mp3-addbtn:hover { border-color: var(--link); }
.mp3-note { font-size: 10px; color: var(--muted); text-align: center; margin-top: 2px; }
@media (max-width: 700px) {
  .mp3-player { left: 6px; right: 6px; width: auto; bottom: 6px; }
}

/* =========================================================
   v218: SOY SLOTS
   ========================================================= */
.slots-title { letter-spacing: .12em; }
.slot-machine { max-width: 760px; margin: 10px auto; }
.slot-window {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 10px; background: #3a2d10;
  border: 4px solid #e8b23a; border-radius: 4px;
  box-shadow: inset 0 0 24px rgba(0,0,0,.6), 0 4px 14px rgba(0,0,0,.4);
}
.slot-reel { display: grid; grid-template-rows: repeat(3, 1fr); gap: 6px; }
.slot-cell {
  aspect-ratio: 1 / 1; overflow: hidden;
  background: #e8862a; border: 2px solid #7a4a12; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
}
.slot-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot-cell.payline { border-color: #ffe14d; box-shadow: 0 0 0 2px rgba(255,225,77,.5) inset; }
.slot-payline-marker {
  position: absolute; left: 4px; right: 4px; top: 50%;
  height: 2px; transform: translateY(-1px);
  background: rgba(255,225,77,.55); pointer-events: none;
}
/* spin animation: the reel blurs vertically while resolving */
.slot-reel.spinning { animation: slot-spin .28s linear infinite; filter: blur(1px); }
@keyframes slot-spin { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
.slot-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 10px;
}
.slot-readout { font-weight: 700; font-size: 17px; letter-spacing: .06em; color: var(--title); }
.slot-spin {
  cursor: pointer; font: inherit; font-size: 22px; font-weight: 700; letter-spacing: .1em;
  padding: 10px 34px; color: #fff;
  background: linear-gradient(180deg, #f2837a, #d8453a);
  border: 2px solid #8f1d15; border-radius: 4px;
  box-shadow: 0 3px 0 #8f1d15;
}
.slot-spin:hover { background: linear-gradient(180deg, #ff9a90, #e2503f); }
.slot-spin:active { transform: translateY(2px); box-shadow: 0 1px 0 #8f1d15; }
.slot-spin[disabled] { opacity: .6; cursor: default; }
.slot-msg { margin-top: 8px; min-height: 22px; font-weight: 700; }
.slot-msg.win { color: #35d84c; }
.slot-msg.big { color: #ffd400; text-shadow: 0 0 8px rgba(255,212,0,.6); }
.slot-msg.lose { color: var(--muted); }
.slots-hint { text-align: center; }
@media (max-width: 700px) {
  .slot-readout { font-size: 14px; }
  .slot-spin { font-size: 18px; padding: 9px 22px; }
}

/* =========================================================
   v218: anti-raid "Devil's Swing" — beat pulse, tilt, ink, lyrics
   ========================================================= */
html.swinging body > *:not(#admin-panel):not(.swing-layer):not(#lightbox):not(.raid-warning) {
  transform-origin: 50% 40%;
  will-change: transform, filter;
}
/* one frame per detected beat: a quick pulse + a small random tilt. Applied to
   body's CHILDREN, NOT body itself — a transform on body would re-anchor the
   fixed admin panel to body and drag it with every beat (and sink it under the
   ink). Excluding the panel here keeps it pinned to the viewport, like SERIOUS
   RAID MODE does. */
html.swing-hit body > *:not(#admin-panel):not(.swing-layer):not(#lightbox):not(.raid-warning) {
  animation: swing-beat 190ms cubic-bezier(.2,.8,.3,1);
}
@keyframes swing-beat {
  0%   { transform: scale(1)      rotate(0deg); filter: saturate(1); }
  35%  { transform: scale(1.018)  rotate(var(--swing-tilt, 1deg)); filter: saturate(1.5) contrast(1.08); }
  100% { transform: scale(1)      rotate(0deg); filter: saturate(1); }
}
/* the panel is explicitly frozen: never bopped, always upright and anchored,
   and above the ink sheet (99990) so it can't be buried by it */
html.swinging #admin-panel {
  animation: none !important;
  transform: none !important;
  z-index: 100001;
}
/* v224: lives on <html> (not body) so the bop's transform can't drag it, and
   is pinned to the viewport so ink always reaches the bottom of the screen on
   any page, at any scroll position. */
.swing-layer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  z-index: 99990; pointer-events: none;
}
/* the ink sheet: darkens as the track runs (--cover is raised over time) */
.swing-ink {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(180deg, rgba(6,6,10,var(--cover, 0)) 0%, rgba(6,6,10,calc(var(--cover, 0) * .35)) 45%, transparent 75%);
  transition: background 1.6s linear;
}
/* each drip stretches down from the top and leaves a rounded blot */
.swing-drip {
  position: absolute; top: -10px;
  width: var(--w, 40px); height: 0;
  background: linear-gradient(180deg, #05050a 0%, #0b0b14 78%, rgba(11,11,20,0) 100%);
  border-radius: 0 0 46% 46% / 0 0 22% 22%;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.55));
  animation: swing-drip var(--dur, 8s) var(--delay, 0s) ease-in forwards;
}
@keyframes swing-drip {
  0%   { height: 0;    opacity: .85; }
  70%  { opacity: .95; }
  100% { height: 130vh; opacity: 1; }   /* overshoot so it clears the bottom */
}
.swing-lyric {
  position: fixed; left: 0; right: 0; bottom: 4vh;
  z-index: 2;
  text-align: center; padding: 0 6vw;
  font-size: clamp(18px, 3.4vw, 40px); font-weight: 800; line-height: 1.25;
  color: #fff; text-shadow: 0 2px 0 #000, 0 0 16px rgba(190,40,40,.8);
  letter-spacing: .02em;
}
.swing-lyric.pop { animation: swing-lyric-pop 260ms cubic-bezier(.2,1,.3,1); }
@keyframes swing-lyric-pop {
  0%   { opacity: 0; transform: translateY(10px) scale(.96); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  html.swing-hit body > *:not(#admin-panel):not(.swing-layer):not(#lightbox):not(.raid-warning) { animation: none; }
  .swing-drip { animation-duration: 14s; }
}

/* v219: SOY SLOTS button, parked bottom-left of the shop */
.shop-slots-btn {
  position: fixed; left: 14px; bottom: 14px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; text-decoration: none;
  font-weight: 700; letter-spacing: .08em; color: #fff;
  background: linear-gradient(180deg, #f2837a, #d8453a);
  border: 2px solid #8f1d15; border-radius: 6px;
  box-shadow: 0 3px 0 #8f1d15, 0 6px 16px rgba(0,0,0,.35);
  transition: transform .12s ease, filter .12s ease;
}
.shop-slots-btn:hover { filter: brightness(1.12); transform: translateY(-2px); color: #fff; }
.shop-slots-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #8f1d15; }
.shop-slots-icon { font-size: 20px; line-height: 1; }
@media (max-width: 700px) {
  .shop-slots-btn { left: 8px; bottom: 8px; padding: 8px 12px; font-size: 13px; }
}
/* the GAMES entry only exists on /vidya/ — make it stand out in the nav */
.games-nav { font-weight: 700; letter-spacing: .06em; }

/* =========================================================
   v220: built-in 'jak picker + music loop button
   ========================================================= */
/* v221: sits on its own row BELOW the file input, inside the same File cell */
.jak-pick-wrap { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.jak-pick-chosen { display: inline-flex; align-items: center; gap: 4px; }
.jak-pick-thumb {
  width: 34px; height: 34px; object-fit: contain; vertical-align: middle;
  background: var(--input-bg); border: 1px solid var(--cell-border); border-radius: 4px;
}
.jak-pick-clear {
  cursor: pointer; font: inherit; line-height: 1; padding: 2px 6px;
  color: #fff; background: #b5271b; border: 1px solid #7d1a12; border-radius: 3px;
}
.jak-sheet {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .5);
}
.jak-sheet-inner {
  width: min(660px, 94vw); max-height: 80vh; display: flex; flex-direction: column;
  background: var(--cell); border: 2px solid var(--cell-border); border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5); overflow: hidden;
}
.jak-sheet-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; font-weight: 700;
  color: var(--th-text); background: var(--th-bg);
  border-bottom: 1px solid var(--cell-border);
}
.jak-search {
  margin-left: auto; font: inherit; font-size: 12px; padding: 4px 7px;
  color: var(--input-text); background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: 4px;
}
.jak-sheet-x {
  cursor: pointer; width: 22px; height: 22px; line-height: 1; font: inherit;
  color: #fff; background: #b5271b; border: 1px solid #7d1a12; border-radius: 3px;
}
.jak-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 6px; padding: 10px; overflow-y: auto;
}
.jak-opt {
  cursor: pointer; padding: 4px; aspect-ratio: 1 / 1;
  background: var(--input-bg); border: 1px solid var(--cell-border); border-radius: 5px;
  transition: transform .1s ease, border-color .1s ease, box-shadow .1s ease;
}
.jak-opt img { width: 100%; height: 100%; object-fit: contain; display: block; }
.jak-opt:hover { transform: translateY(-2px); border-color: var(--link); box-shadow: 0 0 0 2px color-mix(in srgb, var(--link) 45%, transparent); }
.jak-empty { grid-column: 1 / -1; padding: 20px; text-align: center; color: var(--muted); }
@media (max-width: 700px) {
  .jak-grid { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
}

/* v227: submit your own 'jak, from the bottom of the picker sheet */
.jak-submit {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--cell-border);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.jak-submit-head { width: 100%; font-weight: bold; color: var(--title); }
.jak-submit-label {
  flex: 1 1 120px; min-width: 0;
  background: var(--input-bg); color: var(--input-text);
  border: 1px solid var(--input-border); border-radius: 4px; padding: 3px 6px; font: inherit;
}
.jak-submit-msg { width: 100%; }
.jak-queue-preview { height: 42px; width: auto; vertical-align: middle; margin-right: 6px; border-radius: 4px; }
.capcode-preview { margin: 4px 0 8px; }

/* v227: /int/ post translation */
.tl-box {
  margin: 4px 0 2px; padding: 6px 8px;
  background: color-mix(in srgb, var(--cell-border) 18%, transparent);
  border: 1px solid var(--cell-border); border-radius: 6px;
}
.tl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-lang {
  font-family: Arial, "Segoe UI", Tahoma, sans-serif; font-size: 11px; max-width: 45vw;
  background: var(--input-bg); color: var(--input-text);
  border: 1px solid var(--input-border); border-radius: 4px;
}
.tl-out { margin-top: 6px; white-space: pre-wrap; color: var(--text); }
.tl-link { cursor: pointer; }

/* =========================================================
   v221: settings panel — a centred overlay, a sibling of the
   top bar rather than a child of it
   ========================================================= */
.settings-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .5);
  animation: settings-fade .14s ease-out;
}
.settings-overlay[hidden] { display: none; }   /* beat any stray display rule */
@keyframes settings-fade { from { opacity: 0; } to { opacity: 1; } }
.settings-panel {
  display: flex; flex-direction: column;
  width: min(460px, 100%);
  max-height: min(80vh, 640px);
  background: var(--cell);
  border: 2px solid var(--cell-border);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  overflow: hidden;
}
/* v237: the panel spins up to size on open and spins back down on close.
   .closing is held on the overlay for the length of the out animation so the
   panel is still painted while it shrinks — JS hides it once that finishes. */
.settings-overlay.open .settings-panel { animation: settings-pop .34s cubic-bezier(.2, .9, .25, 1.15); }
@keyframes settings-pop {
  from { opacity: 0; transform: scale(.15) rotate(-200deg); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
.settings-overlay.closing { animation: settings-fade-out .26s ease-in forwards; }
@keyframes settings-fade-out { from { opacity: 1; } to { opacity: 0; } }
.settings-overlay.closing .settings-panel { animation: settings-unpop .26s cubic-bezier(.5, -.1, .75, .3) forwards; }
@keyframes settings-unpop {
  from { opacity: 1; transform: scale(1) rotate(0deg); }
  to   { opacity: 0; transform: scale(.15) rotate(200deg); }
}
.settings-panel-head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  font-weight: 700; font-size: 14px; letter-spacing: .05em;
  color: var(--th-text); background: var(--th-bg);
  border-bottom: 1px solid var(--cell-border);
}
.settings-panel-x {
  cursor: pointer; width: 24px; height: 22px; line-height: 1;
  font: inherit; font-size: 16px;
  color: #fff; background: #b5271b; border: 1px solid #7d1a12; border-radius: 3px;
}
.settings-panel-x:hover { background: #d43325; }
.settings-panel-items {
  flex: 1 1 auto; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px;
}
/* each picker is one full-width row that highlights on hover */
.settings-panel-items .theme-picker {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; margin: 0;
  font-size: 13px; line-height: 1.3; white-space: normal;
  border: 1px solid transparent; border-radius: 6px;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
/* v237: THE CLOVER LEAK. `.clover-menu-row` ships with the `hidden` attribute and
   is only un-hidden for trusted users by JS — but [hidden]{display:none} is a UA
   rule, and the author `display:flex` above outranks it, so the row rendered for
   EVERYONE. Same trap in the mobile panel. Restore the attribute's meaning. */
.settings-panel-items .theme-picker[hidden],
.mobile-settings-body .theme-picker[hidden] { display: none !important; }
.settings-panel-items .theme-picker:hover {
  background: color-mix(in srgb, var(--link) 14%, transparent);
  border-color: var(--link);
  transform: translateX(2px);
}
.settings-panel-items .theme-picker select {
  margin-left: auto; max-width: 58%; min-width: 0;
  font: inherit; font-size: 12px;
}
.settings-panel-items .theme-picker a { text-decoration: none; font-weight: 700; }
.settings-panel-items .theme-picker a:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .settings-overlay { padding: 10px; }
  .settings-panel { width: 100%; max-height: 86vh; }
  .settings-panel-items .theme-picker { padding: 10px; font-size: 14px; }
  .settings-panel-items .theme-picker select { min-height: 34px; max-width: 52%; }
}

/* =========================================================
   v231: site-wide alert bar — a black strip above the top
   bar that slides down on load, with the owner's message
   scrolling across it. Owner-editable and switchable at
   /mod#alert-bar.
   ========================================================= */
.alert-bar {
  /* full-bleed: the page body is padded, so pull out to the window edges */
  margin: -8px -8px 0;
  background: #000;
  color: #fff;
  border-bottom: 1px solid #2a2a2a;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.6;
  padding: 5px 0;
  position: relative;
  z-index: 121;             /* just above the sticky top bar (120) */
  animation: bar-slide-down .55s cubic-bezier(.22, 1, .36, 1) both;
}
/* the track holds the message twice and slides one full copy's width, so the
   text runs continuously with no visible jump at the loop point */
.alert-bar-track {
  display: inline-flex;
  align-items: center;
  will-change: transform;
  animation: alert-scroll 38s linear infinite;
}
.alert-bar-text {
  padding-right: 4rem;
  flex: 0 0 auto;
  letter-spacing: .02em;
  text-shadow: 0 0 6px rgba(255, 60, 60, .45);
}
@keyframes alert-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* pause on hover so a long notice can actually be read */
.alert-bar:hover .alert-bar-track { animation-play-state: paused; }
@media (max-width: 700px) {
  .alert-bar { font-size: 12px; }
  .alert-bar-track { animation-duration: 26s; }
}
/* respect reduced-motion and the site's "animations off" setting: no slide, no
   scroll — the message still shows, just static and wrapped. */
@media (prefers-reduced-motion: reduce) {
  .alert-bar { animation: none; white-space: normal; }
  .alert-bar-track { animation: none; display: block; }
  .alert-bar-text + .alert-bar-text { display: none; }
  .alert-bar-text { padding: 0 8px; white-space: normal; }
}
html[data-anim="off"] .alert-bar { animation: none; white-space: normal; }
html[data-anim="off"] .alert-bar-track { animation: none; display: block; }
html[data-anim="off"] .alert-bar-text + .alert-bar-text { display: none; }
html[data-anim="off"] .alert-bar-text { padding: 0 8px; white-space: normal; }

/* =========================================================
   v233: anti-raid "Plant's V.S Spammers"
   Intro cutscene, falling sun, and a sun bank in the corner.
   Lives on <html> (sibling of body) so a body transform from
   another raid effect can't drag the fixed children around.
   ========================================================= */
@font-face {
  font-family: "Summy HouseOfTerror";
  src: url("assets/fonts/houseofterror.woff2") format("woff2"),
       url("assets/fonts/houseofterror.otf") format("opentype");
  font-display: swap;
}
.pvz-layer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  z-index: 99988;
  pointer-events: none;          /* only the suns take clicks */
}
/* the screen dim behind the shout */
.pvz-dim {
  position: absolute; inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.pvz-dim.showing { opacity: .82; }
/* THE ZOMBIES ARE COMING */
.pvz-shout {
  position: absolute; left: 0; right: 0; top: 38%;
  padding: 0 4vw;
  text-align: center;
  font-family: "Summy HouseOfTerror", "Summy OldEng", fantasy, serif;
  font-size: clamp(30px, 8vw, 104px);
  line-height: 1.1;
  color: #d81515;
  text-shadow: 0 0 10px rgba(200,0,0,.9), 0 0 34px rgba(160,0,0,.75), 0 3px 0 #2a0000;
  opacity: 0;
  transition: opacity .5s ease;
}
.pvz-shout.showing {
  opacity: 1;
  animation: pvz-flash 1.05s steps(1, end) infinite;
}
@keyframes pvz-flash {
  0%, 49%  { opacity: 1; }
  50%, 99% { opacity: .18; }
}
/* falling sun */
.pvz-suns { position: absolute; inset: 0; }
.pvz-sun {
  position: absolute;
  top: -90px;
  width: 74px; height: 74px;
  pointer-events: auto;
  cursor: pointer;
  /* v234: on touch, stop the browser treating a tap as a pan/zoom gesture and
     swallowing it before the sun ever sees the pointerdown */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 0 12px rgba(255, 220, 90, .85));
  /* fall to its resting spot, then idle there spinning */
  animation: pvz-fall var(--fall, 8s) linear forwards, pvz-spin 6s linear infinite;
}
@keyframes pvz-fall {
  from { top: -90px; }
  /* dvh so the mobile URL bar collapsing doesn't drop the sun off-screen */
  to   { top: calc(100dvh - 150px); }
}
@keyframes pvz-spin {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}
.pvz-sun:hover { filter: drop-shadow(0 0 18px rgba(255, 235, 120, 1)); }
/* collected: freeze where it is and fly to the counter in the top-left */
/* v235: the fade used to run alongside the flight, so the sun was already
   invisible by the time it reached the counter. Now it shrinks and travels for
   .6s at full opacity and only fades over the last .2s, once it has arrived. */
.pvz-sun.collected {
  animation: none !important;
  transition: transform .6s cubic-bezier(.5, 0, .75, 0), opacity .2s linear .58s;
  transform: translate(var(--fly-x, -200px), var(--fly-y, -200px)) scale(.28) rotate(220deg);
  opacity: 0;
  pointer-events: none;
}
/* ignored for too long: it just fades */
.pvz-sun.gone { transition: opacity .85s ease; opacity: 0; pointer-events: none; }
/* the bank */
.pvz-sun-counter {
  position: fixed; top: 14px; left: 14px;
  z-index: 99989;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 5px;
  background: linear-gradient(180deg, #6b4a1d, #432d10);
  border: 2px solid #c9a227;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,235,150,.35);
  font-family: Verdana, Geneva, sans-serif;
  font-weight: bold;
  font-size: 17px;
  color: #ffe98a;
  text-shadow: 0 1px 0 #000;
  pointer-events: none;
}
.pvz-sun-counter img { width: 30px; height: 30px; }
@media (max-width: 700px) {
  .pvz-sun { width: 72px; height: 72px; }
  .pvz-sun-counter { font-size: 15px; top: 10px; left: 10px; }
  .pvz-sun-counter img { width: 24px; height: 24px; }
}
/* reduced motion: the sun still falls (you must be able to click it) but the
   strobing shout is calmed right down */
@media (prefers-reduced-motion: reduce) {
  .pvz-shout.showing { animation: none; }
  .pvz-sun { animation: pvz-fall var(--fall, 8s) linear forwards; }
}


/* =========================================================
   v242: SKEUOMORPHIC SETTINGS MENU + matching raid panel motion.
   Every surface below is painted as a translucent gloss/bevel layered OVER the
   theme's own tokens (--cell, --th-bg, --link), never a fixed colour — so the
   chrome reads as moulded plastic while still taking on whatever theme is
   active. Appended last so it beats the v221 base rules on equal specificity.
   ========================================================= */
.settings-panel {
  border: 1px solid var(--cell-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, .30) 0%,
      rgba(255, 255, 255, .08) 46%,
      rgba(0, 0, 0, .06) 47%,
      rgba(0, 0, 0, .16) 100%),
    var(--cell);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -2px 3px rgba(0, 0, 0, .22),
    inset 2px 0 3px -2px rgba(0, 0, 0, .18),
    inset -2px 0 3px -2px rgba(0, 0, 0, .18),
    0 1px 0 rgba(255, 255, 255, .18),
    0 20px 46px rgba(0, 0, 0, .58);
}
/* the title bar: brushed strip with a hard gloss split and a lip underneath */
.settings-panel-head {
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, .38) 0%,
      rgba(255, 255, 255, .12) 49%,
      rgba(0, 0, 0, .10) 50%,
      rgba(0, 0, 0, .22) 100%),
    var(--th-bg);
  border-bottom: 1px solid rgba(0, 0, 0, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 1px 0 rgba(255, 255, 255, .16);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .45);
}
/* close button: domed, and it physically sinks when pressed */
.settings-panel-x {
  border-radius: 4px;
  background: linear-gradient(180deg, #e0584a 0%, #c22f21 49%, #ad2417 50%, #8f1b10 100%);
  border: 1px solid #6e150c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 1px 2px rgba(0, 0, 0, .4);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .5);
}
.settings-panel-x:hover { background: linear-gradient(180deg, #ea6d60 0%, #d13a22 49%, #bf2d1e 50%, #a02116 100%); }
.settings-panel-x:active {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .55);
  transform: translateY(1px);
}
/* the rows sit in a recessed well */
.settings-panel-items {
  background: linear-gradient(180deg, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .03) 6%, rgba(0, 0, 0, 0) 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2);
}
/* each row is a raised tile; hovering lifts it, pressing presses it in */
.settings-panel-items .theme-picker {
  border: 1px solid rgba(0, 0, 0, .22);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .04) 50%, rgba(0, 0, 0, .07) 100%),
    color-mix(in srgb, var(--cell-border) 12%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 1px 1px rgba(0, 0, 0, .18);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .22);
}
.settings-panel-items .theme-picker:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .08) 50%, rgba(0, 0, 0, .05) 100%),
    color-mix(in srgb, var(--link) 20%, transparent);
  border-color: var(--link);
  transform: translateX(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 3px rgba(0, 0, 0, .24);
}
.settings-panel-items .theme-picker:active {
  transform: translateX(2px) translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3);
}
/* inset controls, so the selects read as sunk into the tile */
.settings-panel-items .theme-picker select {
  border: 1px solid rgba(0, 0, 0, .32);
  border-radius: 4px;
  padding: 2px 4px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(255, 255, 255, .12)), var(--input-bg);
  color: var(--input-text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .28);
}
.settings-panel-items .theme-picker a { text-shadow: 0 1px 0 rgba(255, 255, 255, .28); }

/* --- the raid panel gets the settings menu's motion --- */
#admin-panel:not([hidden]):not(.ap-closing) {
  animation: settings-pop .34s cubic-bezier(.2, .9, .25, 1.15);
}
#admin-panel.ap-closing {
  animation: settings-unpop .26s cubic-bezier(.5, -.1, .75, .3) forwards;
}

/* =========================================================
   v243: GOOFY AHH RAID — flyers streaming across the screen over a huge
   vibrating tank. Fixed, pointer-events:none, so the site stays usable
   underneath. Exempt from the animations-off blanket for the same reason
   PvS and Devil's Swing are: it is an admin raid action, not decoration.
   ========================================================= */
.goofy-layer {
  position: fixed; inset: 0;
  z-index: 99990;
  overflow: hidden;
  pointer-events: none;
}
.goofy-flyer {
  position: absolute;
  left: 0;
  height: auto;
  will-change: transform;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .55));
}
@keyframes goofy-across-r {
  from { transform: translateX(-30vw) rotate(0deg); }
  25%  { transform: translateX(5vw) rotate(var(--spin, 20deg)); }
  50%  { transform: translateX(40vw) rotate(calc(var(--spin, 20deg) * -1)); }
  75%  { transform: translateX(75vw) rotate(var(--spin, 20deg)); }
  to   { transform: translateX(130vw) rotate(0deg); }
}
@keyframes goofy-across-l {
  from { transform: translateX(130vw) rotate(0deg); }
  25%  { transform: translateX(75vw) rotate(var(--spin, 20deg)); }
  50%  { transform: translateX(40vw) rotate(calc(var(--spin, 20deg) * -1)); }
  75%  { transform: translateX(5vw) rotate(var(--spin, 20deg)); }
  to   { transform: translateX(-30vw) rotate(0deg); }
}
/* the tank: oversized, creeping across, buzzing the whole way. Two animations
   on one element would fight over `transform`, so the crawl lives on the
   element and the vibration on a wrapper-free translate inside the same
   keyframes — combined into a single track below. */
.goofy-tank {
  position: absolute;
  bottom: -4vh;
  left: 0;
  width: min(150vh, 120vw);
  height: auto;
  opacity: .92;
  will-change: transform;
  animation: goofy-tank-crawl 38s linear infinite;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .7));
}
@keyframes goofy-tank-crawl {
  0%   { transform: translateX(-125%) translate(0, 0) rotate(-.4deg); }
  12%  { transform: translateX(-95%)  translate(4px, -3px) rotate(.5deg); }
  25%  { transform: translateX(-65%)  translate(-4px, 3px) rotate(-.5deg); }
  37%  { transform: translateX(-35%)  translate(3px, 4px) rotate(.4deg); }
  50%  { transform: translateX(-5%)   translate(-3px, -4px) rotate(-.4deg); }
  62%  { transform: translateX(25%)   translate(4px, 2px) rotate(.5deg); }
  75%  { transform: translateX(55%)   translate(-4px, -2px) rotate(-.5deg); }
  87%  { transform: translateX(85%)   translate(3px, -4px) rotate(.4deg); }
  100% { transform: translateX(115%)  translate(-3px, 3px) rotate(-.4deg); }
}
/* the buzz itself — fast jitter layered on top via the child shadow trick would
   double the node count, so the crawl track above carries it. This class just
   pins the shake rate for reduced-motion users who still want the effect. */
@media (prefers-reduced-motion: reduce) {
  .goofy-tank { animation-duration: 60s; }
  .goofy-flyer { animation-duration: 9s !important; }
}


/* v244: the 'jak / icon queues reuse the media queue's peek slider. Those queues
   are <li> rows, not floated post bodies, so the zone must not float here or the
   row's buttons wrap up alongside the image. Previews also get a floor size —
   an emoji is tiny, and blurring a 24px image reveals nothing. */
.sub-peek { float: none; margin: 0 0 6px; }
.sub-peek .jak-queue-preview,
.sub-peek .namefag-emoji-preview {
  min-width: 96px; min-height: 96px;
  width: auto; height: 96px;
  object-fit: contain;
}
.submission-ban { margin-top: 4px; }

/* =========================================================
   v245: KETCHUP PERSONA + collapsible Active bans
   ========================================================= */
/* the name rides the same animated-gradient machinery the namerolls use, so it
   matches the site's existing gradient names rather than inventing a new one */
.ketchup-name {
  background-image: linear-gradient(90deg, #b3060f, #ff4d4d, #ff9a9a, #ff4d4d, #b3060f);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: nameroll-slide 3s linear infinite;
  font-weight: 700;
}
.capcode.ketchup-cap {
  color: #e01b1b;
  text-shadow: 0 0 4px rgba(224, 27, 27, .45);
  font-weight: 700;
}
.ketchup-badge { image-rendering: auto; }

/* Active bans collapses — the list gets long and buries everything under it */
.mod-collapse { margin: 6px 0; }
.mod-collapse-summary {
  cursor: pointer;
  list-style: none;
  display: block;
}
.mod-collapse-summary::-webkit-details-marker { display: none; }
.mod-collapse-caret {
  display: inline-block;
  font-size: .8em;
  transition: transform .15s ease;
  margin-right: 4px;
}
.mod-collapse[open] > .mod-collapse-summary .mod-collapse-caret { transform: rotate(90deg); }

/* =========================================================
   v247: OPERA MINI THEME — the black skeuomorphic Opera Mini 7 look as a
   full-site theme. Same palette and chrome as the legacy J2ME face, but
   rendered through the normal token system so the whole site (shop, /jan/,
   mod panel, raid effects) inherits it. The legacy face stays separate: this
   is the LOOK, not the stripped-down mode.
   ========================================================= */
html[data-theme="operamini"] {
  --bg: #050505;
  --cell: #1c1c1c;
  --cell-border: #4a4a4a;
  --link: #7ab8ff;
  --link-hover: #a8d4ff;
  --title: #ffffff;
  --name: #58c168;
  --subject: #d08fd0;
  --quote: #789922;
  --text: #e8e8e8;
  --muted: #8a8a8a;
  --faint: #6a6a6a;
  --input-bg: #0d0d0d;
  --input-text: #ffffff;
  --input-border: #3a3a3a;
  --btn-top: #3d3d3d;
  --btn-bottom: #141414;
  --btn-border: #000000;
  --btn-text: #f0f0f0;
  --th-bg: #b00000;
  --th-text: #ffffff;
  --capcode: #e05050;
  --glow: 0 0 6px rgba(224, 32, 32, .5);
}
html[data-theme="operamini"] {
  background: linear-gradient(180deg, #101010 0%, #050505 60%, #000 100%);
  background-attachment: fixed;
}
html[data-theme="operamini"] body {
  background: transparent;
}
/* the red Opera title strip across the nav bar */
html[data-theme="operamini"] .boardlist {
  background: linear-gradient(180deg, #e02020 0%, #b00000 50%, #8c0000 100%);
  border-bottom: 1px solid #4d0000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
html[data-theme="operamini"] .boardlist a { color: #ffe8e8; }
html[data-theme="operamini"] .boardlist a:hover { color: #fff; }
/* raised black tiles, the Opera Mini menu buttons */
html[data-theme="operamini"] .post.reply,
html[data-theme="operamini"] .home-box,
html[data-theme="operamini"] .mod-queue-item,
html[data-theme="operamini"] .ban-box,
html[data-theme="operamini"] .acct-box,
html[data-theme="operamini"] .appeal-box,
html[data-theme="operamini"] .news-item {
  background: linear-gradient(180deg, #2b2b2b 0%, #101010 100%);
  border: 1px solid #000;
  border-top-color: #4a4a4a;
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 2px 5px rgba(0, 0, 0, .7);
}
html[data-theme="operamini"] .board-header h1,
html[data-theme="operamini"] .home-header h1,
html[data-theme="operamini"] .wmm-title {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .6);
}
/* the rounded bevelled buttons from the menu grid */
html[data-theme="operamini"] .wmm-button {
  background: linear-gradient(180deg, #3d3d3d 0%, #141414 100%);
  border: 1px solid #000;
  border-top-color: #5a5a5a;
  border-radius: 5px;
  color: #f0f0f0;
  font-weight: bold;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .6);
}
html[data-theme="operamini"] .wmm-button:hover {
  background: linear-gradient(180deg, #4a4a4a 0%, #1c1c1c 100%);
  border-top-color: #6a6a6a;
}
html[data-theme="operamini"] .wmm-button:active {
  background: linear-gradient(180deg, #141414 0%, #3d3d3d 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .7);
}
html[data-theme="operamini"] .wmm-button.deny {
  background: linear-gradient(180deg, #d03030 0%, #7c0000 100%);
  border-color: #4d0000; border-top-color: #e86060;
  color: #fff;
}
/* sunken fields */
html[data-theme="operamini"] input[type="text"],
html[data-theme="operamini"] input[type="password"],
html[data-theme="operamini"] input[type="number"],
html[data-theme="operamini"] textarea,
html[data-theme="operamini"] select {
  background: #0d0d0d;
  border: 1px solid #000;
  border-top-color: #333;
  border-radius: 4px;
  color: #fff;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8);
}
/* table headers take the red strip too */
html[data-theme="operamini"] .postform th,
html[data-theme="operamini"] .data-table th {
  background: linear-gradient(180deg, #e02020 0%, #8c0000 100%);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .5);
  border-color: #4d0000;
}

/* =========================================================
   v249: MODERATION PANEL REVAMP.
   Every section is a collapsible skeuomorphic card with a jump bar above it.
   Chrome is painted as translucent gloss over the theme's own tokens, exactly
   like the settings menu, so the panel matches whatever theme is active instead
   of being its own island.
   ========================================================= */
.mod-nav {
  position: sticky; top: 0; z-index: 40;
  margin: 8px 0 12px;
  padding: 7px 9px;
  border: 1px solid var(--cell-border);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.26) 0%, rgba(255,255,255,.06) 48%, rgba(0,0,0,.08) 49%, rgba(0,0,0,.16) 100%),
    var(--cell);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 8px rgba(0,0,0,.4);
}
.mod-nav-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}
.mod-nav-links { display: flex; flex-wrap: wrap; gap: 5px; }
.mod-nav-b {
  display: inline-block;
  padding: 4px 9px;
  font-size: 12px; font-weight: 700; text-decoration: none;
  color: var(--btn-text, var(--text));
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border: 1px solid var(--btn-border);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 1px rgba(0,0,0,.25);
}
.mod-nav-b:hover { border-color: var(--link); color: var(--link); }
.mod-nav-b:active { box-shadow: inset 0 2px 4px rgba(0,0,0,.35); transform: translateY(1px); }

.mod-card {
  margin: 9px 0;
  border: 1px solid var(--cell-border);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.03) 40%, rgba(0,0,0,.05) 41%, rgba(0,0,0,.12) 100%),
    var(--cell);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 7px rgba(0,0,0,.35);
  /* scroll-margin so a jump-bar click doesn't park the header under the bar */
  scroll-margin-top: 74px;
}
.mod-card-head {
  cursor: pointer;
  list-style: none;
  display: block;
  padding: 8px 10px;
  font-size: 14px; font-weight: 700;
  color: var(--title);
  background:
    linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,.08) 49%, rgba(0,0,0,.10) 50%, rgba(0,0,0,.20) 100%),
    var(--th-bg);
  border-bottom: 1px solid rgba(0,0,0,.3);
  border-radius: 8px 8px 0 0;
  text-shadow: 0 -1px 0 rgba(0,0,0,.35);
}
.mod-card-head::-webkit-details-marker { display: none; }
.mod-card:not([open]) .mod-card-head { border-radius: 8px; border-bottom: 0; }
.mod-card-caret { display: inline-block; font-size: .78em; margin-right: 5px; transition: transform .15s ease; }
.mod-card[open] > .mod-card-head .mod-card-caret { transform: rotate(90deg); }
.mod-card-body {
  padding: 9px 11px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.16);
}
.mod-card-body > :first-child { margin-top: 0; }
.mod-card-body > :last-child { margin-bottom: 0; }
.mod-page hr { display: none; }   /* the cards do the separating now */

.mod-allboards { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 10px; }

/* inline ban form on posts — collapsed to a [Ban] link until you need it */
.inline-ban { display: inline-block; }
.inline-ban > summary { list-style: none; cursor: pointer; display: inline; }
.inline-ban > summary::-webkit-details-marker { display: none; }
.inline-ban-form {
  display: block;
  margin: 4px 0;
  padding: 6px 8px;
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 5px rgba(0,0,0,.35);
}
.inline-ban-form input[type="text"] { min-width: 150px; }
.inline-ban-form input[type="number"] { width: 110px; }
.inline-ban-form label { margin: 0 6px; font-size: 12px; white-space: nowrap; }

@media (max-width: 700px) {
  .mod-nav { position: static; }
  .inline-ban-form input[type="text"],
  .inline-ban-form input[type="number"] { width: 100%; min-width: 0; }
}

/* =========================================================
   v249: PERSONA 5 THEME — red / black / white, hard angles.
   ========================================================= */
html[data-theme="persona5"] {
  --bg: #0a0000;
  --cell: #17090a;
  --cell-border: #e60012;
  --link: #ff1a25;
  --link-hover: #ff6b6b;
  --title: #ff1a25;
  --name: #f5f5f5;
  --subject: #ff4d4d;
  --quote: #c8c8c8;
  --text: #f2f2f2;
  --muted: #9a8a8a;
  --faint: #6b5a5a;
  --input-bg: #120607;
  --input-text: #ffffff;
  --input-border: #e60012;
  --btn-top: #ff2a2a;
  --btn-bottom: #9b0009;
  --btn-border: #000000;
  --btn-text: #ffffff;
  --th-bg: #d10010;
  --th-text: #ffffff;
  --capcode: #ff1a25;
  --glow: 0 0 8px rgba(230, 0, 18, .75), 0 0 18px rgba(230, 0, 18, .35);
}
html[data-theme="persona5"] {
  background:
    repeating-linear-gradient(115deg, rgba(230,0,18,.10) 0 22px, transparent 22px 60px),
    radial-gradient(circle at 20% 0%, #2a0004 0%, #120002 45%, #060000 100%);
  background-attachment: fixed;
}
html[data-theme="persona5"] body {
  background: transparent;
}
/* the slanted cut-corner panels */
html[data-theme="persona5"] .post.reply,
html[data-theme="persona5"] .home-box,
html[data-theme="persona5"] .mod-card,
html[data-theme="persona5"] .mod-queue-item,
html[data-theme="persona5"] .ban-box,
html[data-theme="persona5"] .news-item {
  background: linear-gradient(180deg, #1c0a0c 0%, #0d0304 100%);
  border: 2px solid #e60012;
  border-radius: 0;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow: 0 3px 0 #000, 0 0 14px rgba(230, 0, 18, .28);
}
html[data-theme="persona5"] .board-header h1,
html[data-theme="persona5"] .home-header h1,
html[data-theme="persona5"] .wmm-title {
  color: #fff;
  text-shadow: 3px 3px 0 #e60012, -1px -1px 0 #000;
  letter-spacing: .04em;
  transform: rotate(-1.2deg);
}
html[data-theme="persona5"] .boardlist {
  background: linear-gradient(180deg, #1a0002 0%, #000 100%);
  border-bottom: 2px solid #e60012;
}
html[data-theme="persona5"] .wmm-button,
html[data-theme="persona5"] .mod-nav-b {
  background: linear-gradient(180deg, #ff2a2a 0%, #9b0009 100%);
  border: 2px solid #000;
  border-radius: 0;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  box-shadow: 2px 2px 0 #000;
}
html[data-theme="persona5"] .wmm-button:hover,
html[data-theme="persona5"] .mod-nav-b:hover {
  background: linear-gradient(180deg, #ff4a4a 0%, #c00010 100%);
  color: #fff;
}
html[data-theme="persona5"] .wmm-button:active,
html[data-theme="persona5"] .mod-nav-b:active { transform: translate(2px, 2px); box-shadow: none; }
html[data-theme="persona5"] .mod-card-head {
  background: linear-gradient(180deg, #e60012 0%, #8c000b 100%);
  color: #fff;
  border-radius: 0;
  text-shadow: 1px 1px 0 #000;
  text-transform: uppercase;
  letter-spacing: .05em;
}
html[data-theme="persona5"] input[type="text"],
html[data-theme="persona5"] input[type="password"],
html[data-theme="persona5"] input[type="number"],
html[data-theme="persona5"] textarea,
html[data-theme="persona5"] select {
  background: #120607;
  border: 2px solid #e60012;
  border-radius: 0;
  color: #fff;
}
html[data-theme="persona5"] .postform th,
html[data-theme="persona5"] .data-table th {
  background: linear-gradient(180deg, #e60012 0%, #8c000b 100%);
  color: #fff;
  border-color: #000;
  text-transform: uppercase;
}


/* =========================================================
   v250: FONTS ARE THE USER'S CHOICE, full stop.
   Three themes (winxp, operamini, persona5) used to set font-family on body,
   which tied with the user's html[data-font="x"] body rule and won on file
   order — so on those themes the font picker silently did nothing. The theme
   declarations are gone, and every html[data-font="x"] body rule now carries a
   second [data-font] selector: (0,2,2) beats a theme's (0,1,2) no matter where
   either sits in this file, so a future theme can't quietly reintroduce it.
   ========================================================= */
@font-face {
  font-family: "Summy Optima Nova Black";
  src: url("assets/fonts/optima-nova-black-regular.woff2") format("woff2"),
       url("assets/fonts/optima-nova-black-regular.otf") format("opentype");
  font-weight: normal; font-style: normal; font-display: swap;
}
html[data-font="optima"][data-font] body { font-family: "Summy Optima Nova Black", Optima, "Segoe UI", Candara, sans-serif; }

/* v250: MOD PANEL LEGIBILITY. The card header was coloured var(--title), which
   each theme designs to sit on the PAGE background — but the bar is painted
   with --th-bg, and the colour every theme pairs with --th-bg is --th-text
   (that's what keeps table headers readable). 30 of 42 themes failed, several
   at 1.00:1 where --title and --th-bg were literally the same colour. The gloss
   is also toned down: a 30% white wash over a mid-tone bar ate the contrast of
   white header text, so it's lighter now and a text-shadow backs it up. */
.mod-card-head {
  color: var(--mod-head-text, var(--th-text, #fff));
  background:
    linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 49%, rgba(0,0,0,.08) 50%, rgba(0,0,0,.16) 100%),
    var(--th-bg);
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.mod-card-head .mod-card-caret { color: inherit; opacity: .85; }
/* links inside a header (e.g. "view mod log") inherit the header colour too,
   instead of the page link colour that was just as unreadable on --th-bg */
.mod-card-head a { color: inherit; text-decoration: underline; }

/* v250: per-theme corrections, each chosen by computing WCAG contrast rather
   than by eye (see the audit in the v250 notes).
   HEADERS — these four themes pair white --th-text with a LIGHT --th-bg
   (1.86-3.25:1). Scoped to the mod panel via --mod-head-text, so their post-form
   table headers are left exactly as the theme designed them. */
html[data-theme="summer"]       { --mod-head-text: #0e3a3f; }
html[data-theme="frutiger"]     { --mod-head-text: #10365c; }
html[data-theme="winter"]       { --mod-head-text: #000000; }
html[data-theme="burning-eyes"] { --mod-head-text: #000000; }
html[data-theme="summer"] .mod-card-head,
html[data-theme="frutiger"] .mod-card-head,
html[data-theme="winter"] .mod-card-head,
html[data-theme="burning-eyes"] .mod-card-head { text-shadow: 0 1px 0 rgba(255,255,255,.45); }
/* NAV BUTTONS — shekels paired light text with light gold buttons (1.03:1).
   Setting --btn-text also fixes its /jan/ bubble and add-MP3 button, which use
   the same pairing and were just as unreadable. */
html[data-theme="shekels"] { --btn-text: #2a1c04; }
/* These five span light-to-dark: white fails the light top stop and black
   fails the dark bottom one, so NO text colour can pass (best was 3.3-3.9:1).
   The surface is the fix — a thin black wash, just enough for white to clear
   4.5:1 on the lighter stop. Mod nav only; site buttons keep their look. */
html[data-theme="coolmath"]  .mod-nav-b { background: linear-gradient(rgba(0,0,0,.20), rgba(0,0,0,.20)), linear-gradient(var(--btn-top), var(--btn-bottom)); color: #fff; }
html[data-theme="sonic"]     .mod-nav-b { background: linear-gradient(rgba(0,0,0,.17), rgba(0,0,0,.17)), linear-gradient(var(--btn-top), var(--btn-bottom)); color: #fff; }
html[data-theme="wood"]      .mod-nav-b { background: linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.12)), linear-gradient(var(--btn-top), var(--btn-bottom)); color: #fff; }
html[data-theme="christmas"] .mod-nav-b { background: linear-gradient(rgba(0,0,0,.13), rgba(0,0,0,.13)), linear-gradient(var(--btn-top), var(--btn-bottom)); color: #fff; }
html[data-theme="boredbro"]  .mod-nav-b { background: linear-gradient(rgba(0,0,0,.14), rgba(0,0,0,.14)), linear-gradient(var(--btn-top), var(--btn-bottom)); color: #fff; }

/* v250 (pass 2): picked from RENDERED PIXELS, not tokens. These themes use a
   translucent rgba --th-bg, so the bar you see is that colour blended over the
   lighter card underneath — lighter than the token claims. A token-based check
   passed all of them; sampling the real surface showed ocean at 2.41:1. */
html[data-theme="ocean"] { --mod-head-text: #000000; }
html[data-theme="kirby"] { --mod-head-text: #000000; }
html[data-theme="farm"]  { --mod-head-text: #000000; }
html[data-theme="gill"]  { --mod-head-text: #ffffff; }
html[data-theme="ocean"] .mod-card-head,
html[data-theme="kirby"] .mod-card-head,
html[data-theme="farm"]  .mod-card-head { text-shadow: 0 1px 0 rgba(255,255,255,.4); }
/* calm and msn are mid-tone blues where neither white (3.29 / 3.57) nor black
   (4.12 / 3.77) clears 4.5 — so, as with the nav buttons, deepen the surface a
   little and use white. */
html[data-theme="calm"] .mod-card-head {
  --mod-head-text: #ffffff;
  background: linear-gradient(rgba(0,0,0,.22), rgba(0,0,0,.22)),
    linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 49%, rgba(0,0,0,.08) 50%, rgba(0,0,0,.16) 100%),
    var(--th-bg);
}
html[data-theme="msn"] .mod-card-head {
  --mod-head-text: #ffffff;
  background: linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.18)),
    linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 49%, rgba(0,0,0,.08) 50%, rgba(0,0,0,.16) 100%),
    var(--th-bg);
}
/* my own Persona 5 nav buttons: white on #ff2a2a was 4.08 */
html[data-theme="persona5"] .mod-nav-b { background: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.15)), linear-gradient(180deg, #ff2a2a 0%, #9b0009 100%); }
/* v250 (pass 3): last three, also from rendered pixels */
html[data-theme="metroid"] { --mod-head-text: #ffffff; }
html[data-theme="yotsuba"] { --mod-head-text: #1a0800; }
html[data-theme="fruit"]   { --mod-head-text: #000000; }
html[data-theme="yotsuba"] .mod-card-head,
html[data-theme="fruit"]   .mod-card-head { text-shadow: 0 1px 0 rgba(255,255,255,.4); }

/* v252: announcements with several attachments lay them out as a wrapping
   gallery rather than one stacked column. */
.news-media-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}
.news-media-multi .post-image,
.news-media-multi .post-media {
  max-width: min(240px, 100%);
  height: auto;
  flex: 0 1 auto;
}
@media (max-width: 700px) {
  .news-media-multi .post-image,
  .news-media-multi .post-media { max-width: 46%; }
}

/* =========================================================
   v255: SIMPLE MOD PANEL (.modx-*)
   Four tabs (To do / Posts & bans / Site / Staff), flat sections, one kind of
   button, one ban dropdown. Everything is drawn from the active theme's
   tokens so it matches whichever theme is picked.
   ========================================================= */
.modx { max-width: 1100px; margin: 10px auto 30px; padding: 0 8px; }
.modx-tabs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 6px 0 0;
  background: var(--bg);
  border-bottom: 2px solid var(--cell-border);
}
.modx-tab {
  padding: 7px 14px 6px;
  font-weight: 700; font-size: 14px; text-decoration: none;
  color: var(--muted);
  border: 2px solid transparent; border-bottom: 0;
  border-radius: 6px 6px 0 0;
  margin-bottom: -2px;
}
.modx-tab:hover { color: var(--link); }
.modx-tab.active {
  color: var(--text);
  background: var(--cell);
  border-color: var(--cell-border);
  border-bottom: 2px solid var(--cell);
}
.modx-tabs-right { margin-left: auto; font-size: 12px; padding: 0 4px 6px; color: var(--muted); }
.modx-link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.modx-panel {
  background: var(--cell);
  border: 2px solid var(--cell-border); border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 4px 14px 14px;
}
.modx:not(.modx-js) .modx-panel + .modx-panel { margin-top: 14px; border-top: 2px solid var(--cell-border); border-radius: 8px; }
.modx-panel[hidden] { display: none; }
.modx-sec { padding: 12px 0 14px; border-bottom: 1px solid var(--cell-border); scroll-margin-top: 60px; }
.modx-sec:last-child { border-bottom: 0; }
.modx-h2 { margin: 0 0 6px; font-size: 16px; color: var(--title); display: flex; align-items: center; gap: 8px; }
.modx-sec > .hint { margin: 0 0 8px; }
.modx-count {
  display: inline-block; min-width: 18px; padding: 1px 7px;
  font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
  color: #fff; background: var(--capcode); border-radius: 999px;
}
.modx-tab .modx-count { margin-left: 3px; }
.modx-muted { color: var(--muted); font-size: 12px; }

/* one button style */
.modx-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0; }
.modx-btn {
  display: inline-block;
  padding: 4px 10px;
  font: inherit; font-size: 12px; font-weight: 700; line-height: 1.3;
  color: var(--btn-text, var(--text));
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border: 1px solid var(--btn-border);
  border-radius: 5px;
  cursor: pointer; white-space: nowrap;
  list-style: none;
}
.modx-btn::-webkit-details-marker { display: none; }
.modx-btn:hover { border-color: var(--link); color: var(--link); }
.modx-btn:active { transform: translateY(1px); }
.modx-btn.good { background: linear-gradient(#4fc46f, #23883f); border-color: #1d6e33; color: #fff; }
.modx-btn.danger { background: linear-gradient(#e2574c, #a8231a); border-color: #861b14; color: #fff; }
.modx-btn.good:hover, .modx-btn.danger:hover { filter: brightness(1.1); color: #fff; }
.modx-btn.chip { font-weight: 600; border-radius: 999px; }
.modx-btn.chip.on { background: linear-gradient(#e2574c, #a8231a); border-color: #861b14; color: #fff; }
.modx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.modx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 5px; }
td.modx-actions { display: table-cell; white-space: nowrap; }
td.modx-actions > * { margin: 2px 3px 2px 0; vertical-align: middle; }
.modx-addrow { margin: 4px 0 8px; }
.modx-page input[type="text"], .modx-page input[type="number"], .modx-page input[type="email"],
.modx-page input[type="password"], .modx-page select, .modx-page textarea { max-width: 100%; }

.modx-state { font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; }
.modx-state.on { color: #fff; background: var(--capcode); }
.modx-state.off { color: var(--muted); border: 1px solid var(--cell-border); }

/* lists and table */
.modx-list { list-style: none; margin: 0; padding: 0; }
.modx-row { padding: 7px 0; border-bottom: 1px dashed var(--cell-border); }
.modx-row:last-child { border-bottom: 0; }
.modx-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.modx-toggle-row .modx-actions, .modx-toggle-row > .modx-inline { margin: 0; }
.modx-table-wrap { overflow-x: auto; }
.modx-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.modx-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 6px; border-bottom: 2px solid var(--cell-border); }
.modx-table td { padding: 6px; border-bottom: 1px solid var(--cell-border); vertical-align: top; }
.modx-table tr:hover td { background: rgba(127,127,127,.07); }
.modx-who { white-space: nowrap; }
.modx-text { word-break: break-word; min-width: 160px; }

/* media queue items */
.modx-queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.modx-queue > .empty { grid-column: 1 / -1; margin: 0; }
.modx-item { background: var(--input-bg); border: 1px solid var(--cell-border); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.modx-item.gore-flagged { border-color: var(--capcode); box-shadow: 0 0 0 1px var(--capcode) inset; }
.modx-item-head { font-size: 12px; margin-bottom: 6px; }
.modx-item .peek-zone img, .modx-item .peek-zone video { max-width: 100%; height: auto; }
.modx-snippet { font-size: 12px; max-height: 80px; overflow: hidden; margin: 6px 0 0; }

/* dropdowns: Ban…, Edit…, and the per-post [Mod] menu */
.modx-pop { position: relative; display: inline-block; }
.modx-pop > summary { list-style: none; cursor: pointer; }
.modx-pop > summary::-webkit-details-marker { display: none; }
.modx-pop-body {
  position: absolute; z-index: 60; top: calc(100% + 4px); left: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  width: max-content; min-width: 230px; max-width: min(340px, 92vw);
  padding: 9px 10px;
  font-size: 12px; font-weight: normal; text-align: left; white-space: normal;
  color: var(--text);
  background: var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.modx-pop-body input[type="text"], .modx-pop-body select, .modx-pop-body textarea { width: 100%; box-sizing: border-box; }
.modx-pop-body label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.modx-pop-body .modx-inline { flex-wrap: nowrap; }
.modx-pop-body .modx-inline input[type="text"], .modx-pop-body .modx-inline select { flex: 1 1 auto; width: auto; min-width: 0; }
/* a dropdown opened inside another one flows in place instead of floating */
.modx-pop-body .modx-pop { display: block; }
.modx-pop-body .modx-pop .modx-pop-body { position: static; box-shadow: none; margin-top: 6px; max-width: none; width: auto; }
.mod-menu > summary { display: inline; }
.mod-menu-body { min-width: 260px; }
.mod-menu-body .modx-actions { margin: 0; }
td .modx-pop-body, .modx-table .modx-pop-body { right: 0; left: auto; }
@media (max-width: 700px) {
  .modx-pop-body { position: fixed; left: 8px !important; right: 8px !important; top: auto; bottom: 8px; width: auto; max-width: none; max-height: 70vh; overflow-y: auto; }
  .modx-tab { padding: 6px 9px 5px; font-size: 13px; }
  .modx-panel { padding: 4px 9px 12px; }
}
.modx-item .peek-zone { float: none; margin: 0; }
.modx-item > .modx-snippet, .modx-item > .modx-actions { clear: both; }
.modx .post-form table { margin: 4px 0 8px; }
.modx .post-form th { min-width: 70px; }
.modx-more > summary { list-style: none; cursor: pointer; margin: 2px 0 8px; }
.modx-more > summary::-webkit-details-marker { display: none; }

/* the front page wrapper draws no box of its own */
.home-wrap { display: contents; }
html[data-theme="opsec"] .home-wrap > * { position: relative; z-index: 1; }

/* =========================================================
   v257: MOD PANEL IN THE /jan/ LOOK
   Same theme tokens as before, dressed like the staff chat: tabs are glossy
   buttons, each section is a little window with a gradient title strip, queue
   cards and list rows are chat bubbles, buttons and badges get a bevel.
   ========================================================= */
.modx-page .modx-tabs {
  background: none; border-bottom: 0;
  gap: 4px; padding: 6px 8px 0;
}
.modx-page .modx-tab {
  margin-bottom: 0;
  color: var(--btn-text, var(--text));
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border: 1px solid var(--cell-border); border-bottom: 0;
  border-radius: 10px 10px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  opacity: .82;
}
.modx-page .modx-tab:hover { opacity: 1; color: var(--link); }
.modx-page .modx-tab.active {
  opacity: 1;
  color: var(--title);
  background: var(--cell);
  border-bottom: 0;
  position: relative; top: 1px; z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 -2px 5px rgba(0,0,0,.08);
}
.modx-page .modx-tabs-right { align-self: center; padding: 0 4px; }
.modx-page .modx-panel {
  border: 1px solid var(--cell-border);
  border-radius: 10px;
  padding: 8px 12px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 3px 10px rgba(0,0,0,.14);
}
/* each section is a small window */
.modx-page .modx-sec {
  margin: 10px 0 0;
  padding: 0 12px 12px;
  background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,0) 60px), var(--cell);
  border: 1px solid var(--cell-border);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.modx-page .modx-sec:last-child { border-bottom: 1px solid var(--cell-border); }
.modx-page .modx-h2 {
  margin: 0 -12px 10px;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--btn-text, var(--title));
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border-bottom: 1px solid var(--cell-border);
  border-radius: 7px 7px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
/* glossy orb badges, like the /jan/ status orbs */
.modx-page .modx-count {
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.7), rgba(255,255,255,0) 50%),
    var(--capcode);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.25);
}
/* buttons: a raised bevel that presses in */
.modx-btn {
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 1px 2px rgba(0,0,0,.18);
}
.modx-btn:active { box-shadow: inset 0 1px 3px rgba(0,0,0,.3); }
/* queue cards and list rows are chat bubbles */
.modx-page .modx-item,
.modx-page .modx-list > .modx-row {
  background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,0) 40px), var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--cell-border);
  border-radius: 10px 10px 10px 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 3px rgba(0,0,0,.12);
}
.modx-page .modx-list > .modx-row { padding: 7px 10px; margin: 0 0 6px; }
.modx-page .modx-list > .modx-row:last-child { border-bottom: 1px solid var(--cell-border); margin-bottom: 0; }
.modx-page .modx-list > .empty { color: var(--muted); font-style: italic; }
/* tables sit in a framed well with a glossy header row */
.modx-page .modx-table-wrap {
  border: 1px solid var(--cell-border);
  border-radius: 8px;
  background: var(--input-bg);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.12);
}
.modx-page .modx-table { color: var(--input-text); }
.modx-page .modx-table th {
  color: var(--btn-text, var(--text));
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border-bottom: 1px solid var(--cell-border);
}
.modx-page .modx-table tr:last-child td { border-bottom: 0; }
/* text boxes look sunk in, like the /jan/ message box */
.modx-page .modx-sec input[type="text"], .modx-page .modx-sec input[type="number"],
.modx-page .modx-sec input[type="email"], .modx-page .modx-sec input[type="password"],
.modx-page .modx-sec select, .modx-page .modx-sec textarea {
  border-radius: 5px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.15);
}
/* dropdowns (here and in the board [Mod] menus) get the same window sheen */
.modx-pop-body {
  background: linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,0) 50px), var(--cell);
  border-radius: 10px;
}
.modx-page .modx-state.on {
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.6), rgba(255,255,255,0) 55%), var(--capcode);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.25);
}
@media (max-width: 700px) {
  .modx-page .modx-tabs { padding: 4px 4px 0; }
  .modx-page .modx-sec { padding: 0 9px 10px; }
  .modx-page .modx-h2 { margin: 0 -9px 8px; padding: 6px 9px; }
}

/* =========================================================
   v257: FRONT PAGE IN THE /jan/ LOOK (Default layout only)
   Boxes become little windows with a glossy title strip, news posts and the
   achievement cards become bubbles, tabs get the same bevel as /jan/'s
   buttons. Kept at low specificity (:where) so a theme that already dresses
   these boxes its own way still wins; the other layouts copy other sites and
   are left alone.
   ========================================================= */
:where(html[data-layout="default"]) .home-page .home-box {
  padding: 0 12px 10px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,0) 60px), var(--cell);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 6px rgba(0,0,0,.12);
}
:where(html[data-layout="default"]) .home-page .home-box > h2:first-child {
  margin: 0 -12px 8px;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--btn-text, var(--title));
  background: linear-gradient(var(--btn-top), var(--btn-bottom));
  border-bottom: 1px solid var(--cell-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
:where(html[data-layout="default"]) .home-page .home-tab {
  border-radius: 10px 10px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
:where(html[data-layout="default"]) .home-page .home-tab.active {
  background: var(--cell);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 -2px 5px rgba(0,0,0,.08);
}
:where(html[data-layout="default"]) .home-page .news-item {
  background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,0) 40px), var(--input-bg);
  color: var(--input-text);
  border-radius: 10px 10px 10px 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 3px rgba(0,0,0,.12);
}
:where(html[data-layout="default"]) .home-page .ach-card {
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 3px rgba(0,0,0,.12);
}
/* recent media thumbnails sit in a little frame, like the /jan/ pictures */
:where(html[data-layout="default"]) .home-page .recent-images .post-image.mini {
  border: 1px solid var(--cell-border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
:where(html[data-layout="default"]) .home-page .wmm-button {
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 1px 2px rgba(0,0,0,.18);
}

/* =========================================================
   v258: COMPIZ CUBE PAGE TURNS (from the Sriracha edition)
   Part of "animations: on". Clicking a board link turns the page away like a
   desktop cube face; the next page swings in from the other side.
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  html.cube {
    overflow-x: hidden;
    perspective: 1400px;
    perspective-origin: 50% var(--cube-y, 50vh);
    background: radial-gradient(ellipse at 50% var(--cube-y, 50vh), #3b3f52 0%, #14151c 55%, #05050a 100%) fixed;
  }
  html.cube body {
    transform-origin: 50% var(--cube-y, 50vh) -50vw;
    backface-visibility: hidden;
  }
  html.cube.cube-out body { animation: summy-cube-out .42s cubic-bezier(.45, 0, .75, .4) both; }
  html.cube.cube-in body { animation: summy-cube-in .62s cubic-bezier(.2, .6, .3, 1) both; }
}
@keyframes summy-cube-out {
  0% { transform: none; filter: brightness(1); }
  35% { transform: translateZ(-16vw) rotateY(0deg); filter: brightness(1); }
  100% { transform: translateZ(-16vw) rotateY(-90deg); filter: brightness(.45); }
}
@keyframes summy-cube-in {
  0% { transform: translateZ(-16vw) rotateY(90deg); filter: brightness(.45); }
  65% { transform: translateZ(-16vw) rotateY(0deg); filter: brightness(1); }
  100% { transform: none; filter: brightness(1); }
}

/* =========================================================
   v260: WINDOWS XP, PROPERLY — Luna "Blue" chrome
   Boxes and replies are XP windows (blue title bar, thick blue frame, white
   client area), buttons are the cream Luna buttons with the orange hover ring,
   fields have the steel-blue XP border, the nav is the taskbar with the green
   Summy logo as its Start button, and the desktop is a sky-over-hill wallpaper.
   ========================================================= */
html[data-theme="winxp"] {
  background:
    radial-gradient(ellipse 140% 55% at 35% 100%, #73b844 0%, #5a9e2e 45%, #4b8a24 60%, transparent 61%),
    radial-gradient(ellipse 90% 40% at 85% 100%, #6aaf3c 0%, #518f2a 55%, transparent 56%),
    radial-gradient(ellipse 30% 10% at 25% 22%, rgba(255,255,255,.75), transparent 70%),
    radial-gradient(ellipse 22% 7% at 70% 15%, rgba(255,255,255,.6), transparent 70%),
    linear-gradient(180deg, #1d5fd4 0%, #3c86e8 35%, #8ec0f2 70%, #c7e1f8 100%);
  background-attachment: fixed;
}
/* the green Summy pill is the Start button */
/* sits flush on the taskbar's left edge and fills its full height, like the
   real Start button (the bar's 4px/8px padding is eaten by negative margins) */
html[data-theme="winxp"] .home-logo {
  content: url("assets/img/winxp-logo.png");
  height: 30px; width: auto;
  margin: -4px 8px -4px -8px;
  vertical-align: middle;
  filter: drop-shadow(2px 0 2px rgba(0, 20, 70, .5));
}
html[data-theme="winxp"] .home-logo:hover { filter: drop-shadow(2px 0 2px rgba(0, 20, 70, .5)) brightness(1.1); }
html[data-theme="winxp"] .home-logo-link:active .home-logo { filter: brightness(.85); }
html[data-theme="winxp"] .boardlist {
  font-family: Tahoma, Verdana, sans-serif;
  background: linear-gradient(180deg, #3168d5 0%, #4993e6 4%, #2f6ed9 10%, #245edb 50%, #1d50c8 88%, #1941a5 100%);
  border-top: 1px solid #0c37a3;
  border-bottom: 1px solid #0c37a3;
}
/* windows: thick blue frame, rounded top, title bar */
html[data-theme="winxp"] .home-box,
html[data-theme="winxp"] .news-item,
html[data-theme="winxp"] .ban-box,
html[data-theme="winxp"] .post.reply,
html[data-theme="winxp"] .modx-page .modx-sec {
  background: #ece9d8;
  border: 3px solid #0831d9;
  border-top-width: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 3px 8px rgba(0, 20, 70, .45);
  color: #000;
}
html[data-theme="winxp"] .home-box > h2:first-child,
html[data-theme="winxp"] .modx-page .modx-h2,
html[data-theme="winxp"] .post.reply > .intro {
  font-family: Tahoma, Verdana, sans-serif; font-weight: bold;
  color: #fff;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #06f 88%, #0043cf 100%);
  border: 0;
  border-radius: 7px 7px 0 0;
  text-shadow: 1px 1px 0 #0c2a78;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
html[data-theme="winxp"] .post.reply > .intro { margin: 0 -3px 4px; padding: 3px 8px; }
html[data-theme="winxp"] .post.reply > .intro a,
html[data-theme="winxp"] .post.reply > .intro .name,
html[data-theme="winxp"] .post.reply > .intro time,
html[data-theme="winxp"] .post.reply > .intro .rel-time { color: #fff !important; -webkit-text-fill-color: #fff; }
html[data-theme="winxp"] .post.reply > .body { background: #fff; border: 1px solid #a5a196; padding: 6px 8px; margin: 0 6px 6px; }
/* cream Luna buttons with the orange hover ring */
html[data-theme="winxp"] .wmm-button,
html[data-theme="winxp"] .modx-btn,
html[data-theme="winxp"] .home-tab,
html[data-theme="winxp"] input[type="submit"],
html[data-theme="winxp"] button:not(.linklike):not(.jan-reply-btn):not(.jan-edit-btn):not(.jan-del-btn) {
  font-family: Tahoma, Verdana, sans-serif; font-weight: normal;
  color: #000;
  background: linear-gradient(180deg, #fff 0%, #f4f3ee 50%, #ecebe6 80%, #d6d0c5 100%);
  border: 1px solid #003c74;
  border-radius: 3px;
  box-shadow: inset -1px -1px 0 rgba(0,0,0,.08);
  text-shadow: none;
}
html[data-theme="winxp"] .wmm-button:hover,
html[data-theme="winxp"] .modx-btn:hover,
html[data-theme="winxp"] .home-tab:hover,
html[data-theme="winxp"] input[type="submit"]:hover,
html[data-theme="winxp"] button:not(.linklike):hover {
  color: #000; border-color: #003c74;
  box-shadow: inset 0 0 0 1px #ffd87f, inset 0 0 0 2px #f8b636;
}
html[data-theme="winxp"] .modx-btn.danger, html[data-theme="winxp"] .modx-btn.good { color: #000; }
html[data-theme="winxp"] .home-tab.active { background: #ece9d8; font-weight: bold; }
/* steel-blue XP fields */
html[data-theme="winxp"] input[type="text"], html[data-theme="winxp"] input[type="password"],
html[data-theme="winxp"] input[type="email"], html[data-theme="winxp"] input[type="number"],
html[data-theme="winxp"] textarea, html[data-theme="winxp"] select {
  background: #fff; color: #000; border: 1px solid #7f9db9; border-radius: 0; box-shadow: none;
}
html[data-theme="winxp"] .post-form th, html[data-theme="winxp"] .data-table th {
  background: linear-gradient(180deg, #0997ff, #0050ee 40%, #0043cf); color: #fff;
}
html[data-theme="winxp"] .post.op { background: #ece9d8; border: 1px solid #a5a196; }
/* chunky blue XP scrollbars */
html[data-theme="winxp"] { scrollbar-color: #c1d3fb #eef3fd; }

/* =========================================================
   v261: XBOX, THE ORIGINAL 2001 DASHBOARD
   Near-black green void with the glowing core and the faint wireframe tubes,
   panels are dark translucent green slabs with lime piping and a chamfered
   corner, headers are the bright green "SETTINGS" tabs in blocky uppercase,
   the highlighted button is the yellow-lime selection bar, and the green
   "the summy" X logo sits in the top bar.
   ========================================================= */
html[data-theme="xbox360"] {
  --cell: rgba(20, 52, 12, .82);
  --cell-border: #7fd12b;
  --input-bg: #061204;
  --input-text: #d8ffb0;
  --text: #dcf7c4;
  --title: #c6ff3d;
  --link: #a8f03a;
  --link-hover: #f0ff4a;
  background:
    /* the glowing core */
    radial-gradient(circle at 50% 38%, rgba(160, 255, 60, .32) 0%, rgba(70, 160, 20, .18) 18%, transparent 42%),
    /* faint wireframe rings */
    repeating-radial-gradient(circle at 50% 38%, transparent 0 46px, rgba(120, 220, 40, .07) 47px 48px),
    /* the dashboard's scan grid */
    repeating-linear-gradient(0deg, rgba(110, 200, 40, .05) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(110, 200, 40, .05) 0 1px, transparent 1px 22px),
    radial-gradient(ellipse at 50% 40%, #1c3a10 0%, #0a1a06 55%, #020602 100%);
  background-attachment: fixed;
}
/* blocky uppercase dashboard lettering for the chrome */
html[data-theme="xbox360"] #site-title,
html[data-theme="xbox360"] .wmm-title,
html[data-theme="xbox360"] .home-box > h2:first-child,
html[data-theme="xbox360"] .modx-page .modx-h2,
html[data-theme="xbox360"] .home-tab,
html[data-theme="xbox360"] .wmm-button,
html[data-theme="xbox360"] .modx-btn {
  font-family: "Eurostile", "Bank Gothic", "Arial Black", Impact, sans-serif;
  text-transform: uppercase; letter-spacing: .06em;
}
/* the top bar is the dark metal header strip; the logo sits flush left */
html[data-theme="xbox360"] .boardlist {
  background: linear-gradient(180deg, #2c4a1c 0%, #142a0c 45%, #0a1806 100%);
  border-bottom: 2px solid #7fd12b;
  box-shadow: 0 0 12px rgba(127, 209, 43, .45);
}
html[data-theme="xbox360"] .home-logo {
  content: url("assets/img/xbox-logo.png");
  height: 30px; width: auto;
  margin: -4px 10px -4px -2px;
  vertical-align: middle;
  filter: drop-shadow(0 0 4px rgba(160, 255, 60, .55));
}
html[data-theme="xbox360"] .home-logo:hover { filter: drop-shadow(0 0 8px rgba(200, 255, 80, .9)); }
/* panels: translucent green slabs, lime piping, one chamfered corner */
html[data-theme="xbox360"] .home-box,
html[data-theme="xbox360"] .news-item,
html[data-theme="xbox360"] .ban-box,
html[data-theme="xbox360"] .post.reply,
html[data-theme="xbox360"] .mod-queue-item,
html[data-theme="xbox360"] .modx-page .modx-sec,
html[data-theme="xbox360"] .modx-page .modx-panel {
  background: linear-gradient(160deg, rgba(60, 120, 24, .55) 0%, rgba(14, 38, 8, .85) 40%, rgba(6, 20, 4, .9) 100%);
  color: #dcf7c4;
  border: 2px solid #7fd12b;
  border-radius: 14px 4px 14px 4px;
  box-shadow: 0 0 10px rgba(127, 209, 43, .35), inset 0 0 18px rgba(127, 209, 43, .18), inset 0 1px 0 rgba(220, 255, 160, .35);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
/* headers: the bright green tab with dark lettering, like "SETTINGS" */
html[data-theme="xbox360"] .home-box > h2:first-child,
html[data-theme="xbox360"] .modx-page .modx-h2 {
  color: #f2ffd8;
  background: linear-gradient(180deg, #a6f24a 0%, #5fb11e 45%, #2f7a0e 100%);
  border-bottom: 2px solid #c6ff3d;
  text-shadow: 0 0 6px rgba(20, 60, 0, .9), 0 1px 0 #1d4a08;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
html[data-theme="xbox360"] .post.reply > .intro {
  margin: -2px -2px 4px; padding: 3px 10px;
  background: linear-gradient(90deg, rgba(127, 209, 43, .55), rgba(40, 90, 14, .25));
  border-bottom: 1px solid #7fd12b;
}
/* menu buttons: dark green bars; hover/active = the yellow-lime selection bar */
html[data-theme="xbox360"] .wmm-button,
html[data-theme="xbox360"] .modx-btn,
html[data-theme="xbox360"] .home-tab {
  color: #dcf7c4;
  background: linear-gradient(180deg, #2c5a16 0%, #143008 100%);
  border: 1px solid #7fd12b;
  border-radius: 4px 12px 4px 12px;
  box-shadow: inset 0 1px 0 rgba(200, 255, 120, .35), 0 0 6px rgba(127, 209, 43, .35);
  text-shadow: none;
}
html[data-theme="xbox360"] .wmm-button:hover,
html[data-theme="xbox360"] .modx-btn:hover,
html[data-theme="xbox360"] .home-tab:hover,
html[data-theme="xbox360"] .home-tab.active {
  color: #1a2a00;
  background: linear-gradient(180deg, #f6ff8a 0%, #e1f02c 50%, #b8cc12 100%);
  border-color: #f6ff8a;
  box-shadow: 0 0 12px rgba(230, 255, 60, .7);
}
html[data-theme="xbox360"] .modx-btn.danger { background: linear-gradient(180deg, #7a1c10, #3a0a04); color: #ffd9cc; }
html[data-theme="xbox360"] .modx-btn.good { background: linear-gradient(180deg, #5fb11e, #2f7a0e); color: #f2ffd8; }
/* fields: black glass with lime outline */
html[data-theme="xbox360"] input[type="text"], html[data-theme="xbox360"] input[type="password"],
html[data-theme="xbox360"] input[type="email"], html[data-theme="xbox360"] input[type="number"],
html[data-theme="xbox360"] textarea, html[data-theme="xbox360"] select {
  background: #061204; color: #d8ffb0; border: 1px solid #5fb11e; border-radius: 3px;
  box-shadow: inset 0 0 8px rgba(127, 209, 43, .25);
}
html[data-theme="xbox360"] .post-form th, html[data-theme="xbox360"] .data-table th {
  background: linear-gradient(180deg, #5fb11e, #2f7a0e); color: #f2ffd8; text-transform: uppercase;
}
html[data-theme="xbox360"] .post.op { color: #dcf7c4; }
html[data-theme="xbox360"] { scrollbar-color: #7fd12b #061204; }

/* =========================================================
   v262: FRUTIGER = WINDOWS 7 AERO
   Deep-blue Harmony-style wallpaper with light rays and a white swoosh, the
   dark glass taskbar, glass windows (pale blue translucent frame with a
   bright top edge, white client area inside), Win7's silver buttons with the
   blue hover glow, and the soft blue field borders.
   ========================================================= */
html[data-theme="frutiger"] {
  --text: #1e2b3a;
  --title: #1e3f66;
  --link: #0066cc;
  --link-hover: #3399ff;
  background:
    /* the light pouring down from the top */
    radial-gradient(ellipse 60% 70% at 62% -10%, rgba(255,255,255,.55) 0%, rgba(160,215,255,.25) 30%, transparent 60%),
    conic-gradient(from 160deg at 62% -5%, transparent 0deg, rgba(255,255,255,.12) 8deg, transparent 16deg, rgba(255,255,255,.1) 26deg, transparent 34deg, rgba(255,255,255,.08) 44deg, transparent 52deg),
    /* the white swoosh along the bottom */
    radial-gradient(ellipse 80% 22% at 40% 104%, transparent 60%, rgba(255,255,255,.55) 62%, rgba(140,220,255,.25) 66%, transparent 70%),
    radial-gradient(ellipse 120% 90% at 60% 30%, #3fa2e6 0%, #1a73c6 40%, #0c4a9a 75%, #072f6b 100%);
  background-attachment: fixed;
}
/* the dark glass taskbar */
html[data-theme="frutiger"] .boardlist {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: linear-gradient(180deg, rgba(60,90,120,.92) 0%, rgba(25,45,70,.92) 50%, rgba(15,30,50,.95) 51%, rgba(30,55,85,.92) 100%);
  border-bottom: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 8px rgba(0,20,50,.45);
}
html[data-theme="frutiger"] .boardlist a { color: #fff; text-shadow: 0 0 6px rgba(0,0,0,.6); }
html[data-theme="frutiger"] .boardlist a:hover { color: #bfe6ff; }
/* glass windows: translucent pale-blue frame, white client area */
html[data-theme="frutiger"] .home-box,
html[data-theme="frutiger"] .news-item,
html[data-theme="frutiger"] .ban-box,
html[data-theme="frutiger"] .post.reply,
html[data-theme="frutiger"] .post.op,
html[data-theme="frutiger"] .mod-queue-item,
html[data-theme="frutiger"] .modx-page .modx-sec {
  background: linear-gradient(180deg, rgba(220,236,250,.82) 0%, rgba(185,212,238,.78) 100%);
  border: 1px solid rgba(40,70,110,.75);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 6px 18px rgba(0,25,60,.45);
  padding: 0 7px 7px;
  color: #1e2b3a;
}
html[data-theme="frutiger"] .home-box > h2:first-child,
html[data-theme="frutiger"] .modx-page .modx-h2,
html[data-theme="frutiger"] .post.reply > .intro {
  font-family: "Segoe UI", Tahoma, sans-serif; font-weight: normal;
  color: #1e2b3a;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  border: 0; border-radius: 6px 6px 0 0;
  text-shadow: 0 0 8px #fff, 0 0 2px #fff;
  margin: 0 -7px 4px; padding: 5px 10px;
  box-shadow: none;
}
/* silver Win7 buttons, blue glow on hover */
html[data-theme="frutiger"] .wmm-button,
html[data-theme="frutiger"] .modx-btn,
html[data-theme="frutiger"] .home-tab,
html[data-theme="frutiger"] input[type="submit"] {
  font-family: "Segoe UI", Tahoma, sans-serif; font-weight: normal; text-transform: none;
  color: #000;
  background: linear-gradient(180deg, #f2f2f2 0%, #ebebeb 49%, #dddddd 50%, #cfcfcf 100%);
  border: 1px solid #707070; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75);
  text-shadow: none;
}
html[data-theme="frutiger"] .wmm-button:hover,
html[data-theme="frutiger"] .modx-btn:hover,
html[data-theme="frutiger"] .home-tab:hover,
html[data-theme="frutiger"] .home-tab.active,
html[data-theme="frutiger"] input[type="submit"]:hover {
  color: #000;
  background: linear-gradient(180deg, #eaf6fd 0%, #d9f0fc 49%, #bee6fd 50%, #a7d9f5 100%);
  border-color: #3c7fb1;
}
html[data-theme="frutiger"] .modx-btn.danger { background: linear-gradient(180deg, #f6c0b6 0%, #e8806e 50%, #c7432e 51%, #d75a43 100%); color: #fff; border-color: #7a1f10; }
/* soft blue fields */
html[data-theme="frutiger"] input[type="text"], html[data-theme="frutiger"] input[type="password"],
html[data-theme="frutiger"] input[type="email"], html[data-theme="frutiger"] input[type="number"],
html[data-theme="frutiger"] textarea, html[data-theme="frutiger"] select {
  background: #fff; color: #000; border: 1px solid #abadb3; border-top-color: #8e8f8f; border-radius: 2px; box-shadow: none;
}
html[data-theme="frutiger"] input:focus, html[data-theme="frutiger"] textarea:focus { border-color: #3d7bad; outline: none; }
html[data-theme="frutiger"] .post-form th, html[data-theme="frutiger"] .data-table th {
  background: linear-gradient(180deg, rgba(220,236,250,.9), rgba(185,212,238,.9)); color: #1e2b3a;
}
/* the opening post is a glass window too, wrapped around its image */
html[data-theme="frutiger"] .post.op { display: flow-root; padding: 0 10px 8px; margin-bottom: 8px; }
html[data-theme="frutiger"] .post.op > .intro {
  margin: 0 -10px 4px; padding: 5px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  border-radius: 6px 6px 0 0; text-shadow: 0 0 8px #fff, 0 0 2px #fff;
}
/* everything on the glass reads dark, like Win7 window text */
html[data-theme="frutiger"] .post .body,
html[data-theme="frutiger"] .post .intro,
html[data-theme="frutiger"] .post .omitted,
html[data-theme="frutiger"] .post .fileinfo,
html[data-theme="frutiger"] .post .media-info { color: #1e2b3a; }
html[data-theme="frutiger"] .post .subject { color: #0b3d75; }

/* =========================================================
   v263: GAME JOLT RAID (html.ar-gamejolt, set by the raid panel)
   Every theme is overridden while it runs: near-black page, dark rounded
   cards, white text, the lime accent for links and primary buttons, outlined
   white "Follow"-style buttons, pill search fields and a lime wordmark.
   Everything is !important because it has to beat every theme's own rules.
   ========================================================= */
html.ar-gamejolt {
  --bg: #191919; --cell: #242424; --cell-border: #333; --text: #fff; --muted: #9a9a9a;
  --link: #ccff00; --link-hover: #e6ff66; --title: #fff; --name: #ccff00; --input-bg: #2f2f2f;
  --btn-top: #ccff00; --btn-bottom: #ccff00; --btn-text: #191919; --capcode: #ff3dac;
  background: #191919 !important;
  color-scheme: dark;
}
html.ar-gamejolt body {
  background: #191919 !important; color: #fff !important;
  font-family: "Nunito", "Lato", "Segoe UI", Arial, sans-serif !important;
}
html.ar-gamejolt body * { text-shadow: none !important; }
html.ar-gamejolt a { color: #ccff00 !important; -webkit-text-fill-color: #ccff00; }
html.ar-gamejolt a:hover { color: #e6ff66 !important; }
/* the top bar: black strip with a lime "SUMMY JOLT" wordmark */
html.ar-gamejolt .boardlist {
  background: #111 !important; border: 0 !important; border-bottom: 1px solid #2a2a2a !important;
  box-shadow: none !important; padding: 8px 12px !important;
}
html.ar-gamejolt .boardlist a { color: #ddd !important; -webkit-text-fill-color: #ddd; font-weight: 700; }
html.ar-gamejolt .boardlist a:hover { color: #ccff00 !important; -webkit-text-fill-color: #ccff00; }
/* the Game Jolt logo takes the wordmark's place (a joke; it's only up during the raid) */
html.ar-gamejolt .home-logo {
  content: url("assets/img/gamejolt-logo.png") !important;
  height: 22px !important; width: auto !important; margin: 0 12px 0 0 !important;
  filter: none !important; vertical-align: middle;
}
/* titles */
html.ar-gamejolt #site-title, html.ar-gamejolt .wmm-title, html.ar-gamejolt h1, html.ar-gamejolt h2, html.ar-gamejolt h3 {
  color: #fff !important; -webkit-text-fill-color: #fff !important; background: none !important;
  font-family: "Nunito", "Lato", "Segoe UI", sans-serif !important; font-weight: 800 !important; animation: none !important;
}
html.ar-gamejolt .subtitle, html.ar-gamejolt .tagline, html.ar-gamejolt .hint,
html.ar-gamejolt time, html.ar-gamejolt .rel-time, html.ar-gamejolt .omitted { color: #9a9a9a !important; -webkit-text-fill-color: #9a9a9a; }
/* cards: every box, post and panel becomes a dark rounded Game Jolt card */
html.ar-gamejolt .home-box, html.ar-gamejolt .news-item, html.ar-gamejolt .ban-box,
html.ar-gamejolt .post.reply, html.ar-gamejolt .post.op, html.ar-gamejolt .mod-queue-item,
html.ar-gamejolt .modx-panel, html.ar-gamejolt .modx-sec, html.ar-gamejolt .modx-item,
html.ar-gamejolt .modx-row, html.ar-gamejolt .ach-card, html.ar-gamejolt .jan-log,
html.ar-gamejolt .jan-form, html.ar-gamejolt .jan-buddies, html.ar-gamejolt .modx-pop-body,
html.ar-gamejolt .settings-panel, html.ar-gamejolt .catalog-thread {
  background: #242424 !important; color: #fff !important;
  border: 0 !important; border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.45) !important;
  clip-path: none !important;
}
html.ar-gamejolt .post.op { display: flow-root; padding: 12px !important; }
html.ar-gamejolt .post.reply { padding: 4px 12px 10px !important; }
html.ar-gamejolt .home-box > h2:first-child, html.ar-gamejolt .modx-h2, html.ar-gamejolt .post > .intro {
  background: none !important; border: 0 !important; box-shadow: none !important; color: #fff !important;
}
html.ar-gamejolt .post .body, html.ar-gamejolt .post .intro, html.ar-gamejolt .post .name { color: #fff !important; -webkit-text-fill-color: #fff; }
html.ar-gamejolt .post .body { background: none !important; border: 0 !important; }
html.ar-gamejolt .post .capcode { color: #ff3dac !important; -webkit-text-fill-color: #ff3dac; }
html.ar-gamejolt hr { border: 0 !important; border-top: 1px solid #2a2a2a !important; }
/* buttons: lime primary, and the outlined white "Follow" style on hover */
html.ar-gamejolt .wmm-button, html.ar-gamejolt .modx-btn, html.ar-gamejolt input[type="submit"],
html.ar-gamejolt button:not(.linklike):not(.jan-reply-btn):not(.jan-edit-btn):not(.jan-del-btn) {
  background: #ccff00 !important; color: #191919 !important; -webkit-text-fill-color: #191919;
  border: 2px solid #ccff00 !important; border-radius: 999px !important;
  font-family: "Nunito", "Lato", sans-serif !important; font-weight: 800 !important; text-transform: none !important;
  box-shadow: none !important;
}
html.ar-gamejolt .wmm-button:hover, html.ar-gamejolt .modx-btn:hover, html.ar-gamejolt input[type="submit"]:hover,
html.ar-gamejolt button:not(.linklike):hover {
  background: transparent !important; color: #fff !important; -webkit-text-fill-color: #fff; border-color: #fff !important;
}
/* tabs: "Following / For You" pills */
html.ar-gamejolt .home-tab, html.ar-gamejolt .modx-tab {
  background: transparent !important; color: #ddd !important; border: 0 !important; border-radius: 8px !important;
  box-shadow: none !important; opacity: 1 !important; font-weight: 700 !important;
}
html.ar-gamejolt .home-tab.active, html.ar-gamejolt .modx-tab.active {
  background: #333 !important; color: #ccff00 !important; box-shadow: inset 0 -2px 0 #ccff00 !important;
}
/* fields: the dark pill search box */
html.ar-gamejolt input[type="text"], html.ar-gamejolt input[type="password"], html.ar-gamejolt input[type="email"],
html.ar-gamejolt input[type="number"], html.ar-gamejolt textarea, html.ar-gamejolt select {
  background: #2f2f2f !important; color: #fff !important; border: 1px solid #3a3a3a !important;
  border-radius: 8px !important; box-shadow: none !important;
}
html.ar-gamejolt input[type="text"], html.ar-gamejolt select { border-radius: 999px !important; padding-left: 12px; }
html.ar-gamejolt .post-form th, html.ar-gamejolt .data-table th, html.ar-gamejolt .modx-table th {
  background: #242424 !important; color: #9a9a9a !important; border: 0 !important;
}
html.ar-gamejolt img.post-image { border-radius: 8px; }
html.ar-gamejolt { scrollbar-color: #444 #191919; }

/* ---------- v263b: Game Jolt raid, the page LAYOUT ----------
   Game Jolt's frame: a full-width top bar with the logo on the left and the
   search box in the middle, a rail of round icons down the left side (home,
   overboard, shop, rules, then each board as a "community" circle), and the
   content in a centred feed column of cards. The front page's board list
   becomes the store's "Browse Games" tile row. Rail + search are added by
   the script and removed when the raid ends. */
html.ar-gamejolt body { padding-left: 80px !important; }
html.ar-gamejolt .boardlist {
  margin: 0 -8px 10px -80px !important;
  align-items: center; min-height: 46px;
}
html.ar-gamejolt .boardlist .nav-links { order: 0; font-size: 12px; }
html.ar-gamejolt .gj-search { order: 1; flex: 0 1 420px; margin: 0 auto; }
html.ar-gamejolt .boardlist > :not(.nav-links):not(.gj-search) { order: 2; }
html.ar-gamejolt .gj-search input {
  width: 100%; box-sizing: border-box; height: 32px; padding: 0 16px !important;
  background: #2f2f2f !important; border: 1px solid #3a3a3a !important; border-radius: 999px !important; color: #fff !important;
}
html.ar-gamejolt .gj-search input::placeholder { color: #888; }
.gj-rail {
  position: fixed; z-index: 95; left: 0; top: 46px; bottom: 0; width: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px 0; overflow-y: auto; scrollbar-width: none;
  background: #111; border-right: 1px solid #2a2a2a;
  font-family: "Nunito", "Lato", "Segoe UI", sans-serif;
}
.gj-rail-item {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #242424; color: #ddd !important; -webkit-text-fill-color: #ddd;
  font-size: 13px; font-weight: 800; text-decoration: none !important;
  border: 2px solid transparent; box-sizing: border-box;
  transition: border-color .12s, color .12s;
}
.gj-rail-item:hover, .gj-rail-item.on { border-color: #ccff00; color: #ccff00 !important; -webkit-text-fill-color: #ccff00; }
.gj-rail-sep { flex: 0 0 auto; width: 32px; height: 1px; background: #333; }
/* the feed: one centred column of full-width cards */
html.ar-gamejolt .board-header, html.ar-gamejolt .thread-nav,
html.ar-gamejolt .post-form, html.ar-gamejolt .post.op,
html.ar-gamejolt .postcontainer, html.ar-gamejolt #thread-replies > .postcontainer {
  max-width: 760px; margin-left: auto !important; margin-right: auto !important;
}
html.ar-gamejolt .postcontainer { display: block !important; margin-bottom: 10px !important; }
html.ar-gamejolt .postcontainer > .sidearrow { display: none !important; }
html.ar-gamejolt .post.reply { display: block !important; width: auto !important; max-width: none !important; }
html.ar-gamejolt .post.op { margin-bottom: 12px !important; }
html.ar-gamejolt .banner-slot img, html.ar-gamejolt #board-banner { border-radius: 12px; }
/* the front page: columns like the feed + side panels, boards as store tiles */
html.ar-gamejolt .home-cols { max-width: 1200px; margin: 0 auto; gap: 16px !important; }
html.ar-gamejolt .hb-boards { flex: 1 1 100% !important; }
html.ar-gamejolt .hb-boards .board-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px;
  padding: 0 !important; margin: 8px 0 0 !important; list-style: none;
}
html.ar-gamejolt .hb-boards .board-list li {
  margin: 0 !important; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: #2f2f2f; border-radius: 12px; padding: 8px; box-sizing: border-box;
  transition: transform .12s, background .12s;
}
html.ar-gamejolt .hb-boards .board-list li:hover { background: #3a3a3a; transform: translateY(-2px); }
html.ar-gamejolt .hb-boards .board-list li a { font-weight: 800; font-size: 13px; text-decoration: none !important; }
html.ar-gamejolt .hb-boards .board-list .board-sub { display: none !important; }
html.ar-gamejolt .home-tabs { justify-content: center; }
/* phones: no rail, search tucks under the links */
@media (max-width: 800px) {
  html.ar-gamejolt body { padding-left: 8px !important; }
  html.ar-gamejolt .boardlist { margin-left: -8px !important; }
  .gj-rail { display: none; }
  html.ar-gamejolt .gj-search { flex: 1 1 100%; margin: 6px 0 0; }
}
html.ar-gamejolt .alert-bar { margin-left: -80px !important; margin-right: -8px !important; }
@media (max-width: 800px) { html.ar-gamejolt .alert-bar { margin-left: -8px !important; } }
html.ar-gamejolt .mini-reply { background: #242424 !important; border: 0 !important; border-radius: 12px !important; box-shadow: 0 6px 20px rgba(0,0,0,.6) !important; overflow: hidden; }
html.ar-gamejolt .mini-reply-head { background: #111 !important; color: #fff !important; border: 0 !important; font-weight: 800; }

/* =========================================================
   v264: STATS GRAPHS — inline SVG in the theme's own colours
   ========================================================= */
.stat-graphs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.stat-graphs .stat-wide { grid-column: 1 / -1; }
.stat-graphs .home-box { min-width: 0; }
.stat-graphs h2 .hint { font-weight: normal; font-size: 11px; }
.stat-graph { display: block; width: 100%; height: auto; max-height: 260px; margin: 6px 0; overflow: visible; }
.sg-grid { stroke: var(--cell-border); stroke-opacity: .35; stroke-width: 1; }
.sg-axis { stroke: var(--muted); stroke-opacity: .7; stroke-width: 1; }
.sg-tick { fill: var(--muted); font-size: 11px; font-family: inherit; }
.sg-bar { fill: var(--link); }
.sg-hit:hover .sg-bar { fill: var(--link-hover, var(--link)); }
.sg-hit:hover rect { fill: var(--link); fill-opacity: .08; }
.sg-line { fill: none; stroke: var(--link); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sg-area { fill: var(--link); fill-opacity: .15; }
.sg-dot { fill: var(--link); stroke: var(--cell); stroke-width: 2; opacity: 0; }
.sg-cross { stroke: var(--muted); stroke-dasharray: 3 3; opacity: 0; }
.sg-hit:hover .sg-dot, .sg-hit:hover .sg-cross { opacity: 1; }
.rank-bars { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 10px; }
.rank-row { display: grid; grid-template-columns: 70px 1fr 48px; align-items: center; gap: 8px; font-size: 12px; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-track { height: 12px; background: var(--cell-border); background: color-mix(in srgb, var(--cell-border) 30%, transparent); border-radius: 4px; overflow: hidden; }
.rank-fill { display: block; height: 100%; background: var(--link); border-radius: 0 4px 4px 0; }
.rank-row:hover .rank-fill { background: var(--link-hover, var(--link)); }
.rank-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.stat-numbers { margin-top: 4px; font-size: 12px; }
.stat-numbers summary { cursor: pointer; color: var(--muted); }
.stat-numbers table { margin-top: 6px; max-height: 240px; overflow: auto; display: block; }

/* v265: /jan/ reminder when Cloudflare's human check blocks sending */
.jan-cf-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: 7px 10px; font-size: 12px;
  color: #3b2a00; background: #fff4c2; border: 1px solid #e0b100; border-radius: 6px;
}
.jan-cf-note strong { color: #3b2a00; }
.jan-cf-note .wmm-button { margin-left: auto; }

/* v266: the MPA "removing a bad image" tutorial */
.mpa-steps { margin: 0 0 8px; padding-left: 20px; line-height: 1.5; }
.mpa-steps li { margin: 0 0 6px; }
.mpa-steps kbd { font: 11px monospace; padding: 0 4px; border: 1px solid var(--cell-border); border-radius: 3px; background: var(--input-bg); }
.mpa-h3 { margin: 10px 0 4px; font-size: 13px; }

/* =========================================================
   v267: POLISH
   ========================================================= */
/* The page titles zoom in at 2.2x for a moment when a page loads. That moment
   made every page wider than the screen: a sideways scrollbar flashed on
   desktop, and phones widened the whole page to fit and never shrank it back
   (which also pushed the layout picker off-screen). Nothing on the site is
   meant to scroll sideways, so clip it. */
html, body { overflow-x: clip; } /* both: on body alone it gets handed to the window and clips nothing */
.board-header, .home-header { overflow-x: clip; }
/* tables inside a box fit the box instead of forcing it wider than the screen */
.home-box .data-table { min-width: 0; width: 100%; }
.home-box { min-width: 0; }
/* the floating layout picker shouldn't sit on top of the last box */
body.home-page { padding-bottom: 60px; }
