/*
Theme Name: Desktop 85
Theme URI: https://example.com/desktop85
Author: Desktop 85
Description: A retro 1980s desktop-style theme for games blogs. Teal desktop, bevelled grey windows, navy title bars and pixel fonts. Every post is its own little window.
Version: 1.9.2
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: desktop85
Tags: blog, custom-menu, featured-images, threaded-comments, retro
*/

@font-face { font-family: "VT323"; src: url("fonts/vt323.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("fonts/pixelify-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("fonts/pixelify-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Clear pixel numbers: Pixelify's 2 looks like an 8, so digits come from Jersey 10 */
@font-face { font-family: "D85 Digits"; src: url("fonts/jersey10.woff2") format("woff2"); unicode-range: U+0030-0039; size-adjust: 118%; font-display: swap; }

:root {
  --desk: #008080;
  --face: #c0c0c0;
  --light: #ffffff;
  --mid: #808080;
  --dark: #000000;
  --title: #000080;
  --title-2: #1084d0;
  --title-off: #808080;
  --ink: #000000;
  --link: #0000ee;
  --visited: #551a8b;
  --sel: #000080;
  --pixel: "VT323", "Courier New", monospace;
  --ui: "D85 Digits", "Pixelify Sans", "MS Sans Serif", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html, body { overflow-x: clip; }

html { font-size: 18px; }

body {
  margin: 0;
  background: var(--desk);
  background-image: radial-gradient(rgba(0,0,0,.08) 1px, transparent 1px);
  background-size: 4px 4px;
  color: var(--ink);
  font-family: var(--pixel);
  font-size: 1.15rem;
  line-height: 1.35;
  padding-bottom: 48px; /* room for taskbar */
}

::selection { background: var(--sel); color: #fff; }

a { color: var(--link); }
a:visited { color: var(--visited); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 1px dotted #000;
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; image-rendering: auto; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 9998; width: auto; height: auto;
  clip: auto; background: var(--face); padding: 6px 10px; color: #000;
}

/* ---------- Bevel helpers ---------- */
.raised {
  background: var(--face);
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--mid),
    inset 2px 2px 0 #dfdfdf;
}
.sunken {
  background: #fff;
  box-shadow:
    inset -1px -1px 0 var(--light),
    inset 1px 1px 0 var(--mid),
    inset -2px -2px 0 #dfdfdf,
    inset 2px 2px 0 var(--dark);
}

/* ---------- Layout ---------- */
.desktop {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.desktop.no-sidebar { grid-template-columns: 1fr; max-width: 900px; }

@media (max-width: 860px) {
  .desktop { grid-template-columns: 1fr; }
}

/* ---------- Windows ---------- */
.window {
  background: var(--face);
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--mid),
    inset 2px 2px 0 #dfdfdf,
    6px 6px 0 rgba(0,0,0,.35);
  padding: 3px;
  margin-bottom: 24px;
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 3px 3px 6px;
  background: linear-gradient(90deg, var(--title), var(--title-2));
  color: #fff;
  font-family: var(--ui);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .02em;
  min-height: 24px;
}
.window:not(:first-of-type) .title-bar.inactive,
.title-bar.inactive {
  background: linear-gradient(90deg, var(--title-off), #b5b5b5);
  color: #dcdcdc;
}
.title-bar-text {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.title-bar-text .ico {
  width: 16px; height: 16px; flex: none;
  background: #fff; border: 1px solid #000;
  box-shadow: inset -3px -3px 0 var(--face);
}
.title-bar-controls { display: flex; gap: 2px; flex: none; }
.title-bar-controls span {
  width: 18px; height: 16px;
  background: var(--face);
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--mid);
  position: relative;
}
.title-bar-controls .min::after {
  content: ""; position: absolute; left: 4px; bottom: 3px; width: 7px; height: 2px; background: #000;
}
.title-bar-controls .max::after {
  content: ""; position: absolute; left: 3px; top: 2px; width: 9px; height: 7px;
  border: 1px solid #000; border-top-width: 2px;
}
.title-bar-controls .close::before,
.title-bar-controls .close::after {
  content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 2px; background: #000;
}
.title-bar-controls .close { margin-left: 2px; }
.title-bar-controls .close::before { transform: rotate(45deg); }
.title-bar-controls .close::after { transform: rotate(-45deg); }

.menu-bar {
  display: flex; gap: 14px; padding: 2px 6px;
  font-family: var(--ui); font-size: .8rem;
  border-bottom: 1px solid var(--mid);
  box-shadow: 0 1px 0 var(--light);
  margin-bottom: 4px;
}
.menu-bar { position: relative; z-index: 30; }
.mb-item { position: relative; }
.menu-bar .mb-btn {
  background: none !important; border: 0 !important; box-shadow: none !important;
  padding: 1px 6px; font-family: var(--ui); font-size: .8rem; color: inherit !important; cursor: pointer;
}
.menu-bar .mb-btn::first-letter { text-decoration: underline; }
.menu-bar .mb-btn:active { padding: 1px 6px; }
.menu-bar .mb-btn[aria-expanded="true"], .menu-bar .mb-btn:hover { background: var(--sel) !important; color: #fff !important; }
.mb-drop {
  position: absolute; top: 100%; left: 0; z-index: 40; list-style: none; margin: 0; padding: 3px;
  min-width: 190px; background: var(--face);
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff, inset -2px -2px 0 #808080, 3px 3px 0 rgba(0,0,0,.3);
}
.mb-drop[hidden] { display: none; }
.mb-drop a, .mb-drop button {
  display: block; width: 100%; text-align: left; padding: 4px 18px; font-family: var(--ui); font-size: .8rem;
  color: #000 !important; text-decoration: none; background: none !important; box-shadow: none !important; border: 0 !important;
}
.mb-drop a:hover, .mb-drop a:focus, .mb-drop button:hover, .mb-drop button:focus { background: var(--sel) !important; color: #fff !important; outline: none; }
.mb-sep { margin: 3px 2px; border-top: 1px solid var(--mid); border-bottom: 1px solid #fff; }

.window-body { padding: 10px 12px 12px; }

.window-body .sunken,
.content-well {
  padding: 16px 18px;
  background: #fff;
  box-shadow:
    inset -1px -1px 0 var(--light),
    inset 1px 1px 0 var(--mid),
    inset -2px -2px 0 #dfdfdf,
    inset 2px 2px 0 var(--dark);
}

.status-bar {
  display: flex; gap: 3px; margin-top: 4px;
  font-family: var(--ui); font-size: .75rem;
}
.status-bar > * {
  flex: 1; padding: 2px 6px;
  box-shadow: inset -1px -1px 0 var(--light), inset 1px 1px 0 var(--mid);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-bar a { color: inherit; }

/* ---------- Header window ---------- */
.site-header { max-width: 1180px; margin: 24px auto 0; padding: 0 16px; }
.site-header .window { margin-bottom: 0; }
.site-branding { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-title {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1;
  text-shadow: 3px 3px 0 #c0c0c0, 4px 4px 0 #808080;
}
.site-title a { color: var(--title); text-decoration: none; }
.site-description { margin: 4px 0 0; color: #333; font-size: 1.2rem; }
.blink-cursor::after {
  content: "_"; animation: blink 1s steps(1) infinite; margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .blink-cursor::after { animation: none; } }

.custom-logo { max-height: 72px; width: auto; image-rendering: pixelated; }

/* Primary menu as toolbar buttons */
.main-nav ul {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.main-nav li { position: relative; }
.main-nav a, .btn, button, input[type="submit"], .wp-block-button__link {
  display: inline-block;
  padding: 4px 14px;
  font-family: var(--ui);
  font-size: .8rem;
  color: #000 !important;
  text-decoration: none;
  background: var(--face);
  border: 0;
  cursor: pointer;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--mid),
    inset 2px 2px 0 #dfdfdf;
}
.main-nav a:active, .btn:active, button:active, input[type="submit"]:active {
  box-shadow:
    inset -1px -1px 0 var(--light),
    inset 1px 1px 0 var(--dark),
    inset -2px -2px 0 #dfdfdf,
    inset 2px 2px 0 var(--mid);
  padding: 5px 13px 3px 15px;
}
.main-nav .current-menu-item > a { font-weight: 700; outline: 1px dotted #000; outline-offset: -5px; }
.main-nav ul ul {
  display: none; position: absolute; top: 100%; left: 0; z-index: 20;
  flex-direction: column; gap: 0; margin: 0; padding: 3px; min-width: 180px;
  background: var(--face);
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff, 3px 3px 0 rgba(0,0,0,.3);
}
.main-nav li:hover > ul, .main-nav li:focus-within > ul { display: flex; }
.main-nav ul ul a { box-shadow: none; display: block; width: 100%; }
.main-nav ul ul a:hover { background: var(--sel); color: #fff !important; }

/* ---------- Posts ---------- */
.entry-title { margin: 0 0 6px; font-size: 2rem; line-height: 1.05; }
.entry-title a { color: var(--title); text-decoration: none; }
.entry-title a:hover { background: var(--sel); color: #fff; }
.entry-meta {
  font-family: var(--ui); font-size: .72rem; color: #444;
  margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px;
}
.entry-meta a { color: #444; }
.post-thumb {
  display: block; margin: 0 0 14px; padding: 4px; background: var(--face);
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080;
}
.post-thumb img { display: block; width: 100%; }

.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 {
  color: var(--title); line-height: 1.1; margin: 1.4em 0 .4em;
}
.entry-content h2 { font-size: 1.7rem; }
.entry-content h3 { font-size: 1.45rem; }
.entry-content blockquote {
  margin: 1em 0; padding: 10px 14px;
  background: #ffffe1; border: 1px solid #000;
  box-shadow: 3px 3px 0 rgba(0,0,0,.25);
}
.entry-content pre, .entry-content code {
  font-family: var(--pixel); background: #000; color: #33ff33;
}
.entry-content pre { padding: 12px; overflow-x: auto; }
.entry-content code { padding: 0 4px; }
.entry-content pre code { padding: 0; }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border: 1px solid #808080; padding: 4px 8px; text-align: left; }
.entry-content th { background: var(--face); font-family: var(--ui); font-size: .8rem; }
.entry-content hr { border: 0; border-top: 1px solid var(--mid); border-bottom: 1px solid #fff; }
.entry-content figure { margin: 1em 0; }
.entry-content figcaption, .wp-caption-text { font-size: .95rem; color: #555; text-align: center; }
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.sticky .title-bar { background: linear-gradient(90deg, #800000, #d01010); }

.more-link { margin-top: 12px; }

.tags-links a {
  display: inline-block; margin: 2px 4px 2px 0; padding: 0 8px;
  background: var(--face); color: #000; text-decoration: none; font-size: 1rem;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff;
}

/* ---------- Pagination ---------- */
.pagination, .post-navigation .nav-links {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0 24px;
}
.page-numbers, .post-navigation a {
  display: inline-block; padding: 4px 12px; background: var(--face);
  color: #000; text-decoration: none; font-family: var(--ui); font-size: .8rem;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff, inset -2px -2px 0 #808080;
}
.page-numbers.current { background: var(--sel); color: #fff; }
.post-navigation { margin-bottom: 24px; }

/* ---------- Sidebar widgets ---------- */
/* Works for classic widgets (.widget-title) and block widgets (first heading) */
.widget > .window-body { padding-top: 0; }
.widget .widget-title,
.widget > .window-body > .wp-block-heading:first-child,
.widget > .window-body > .wp-block-group > .wp-block-group__inner-container > .wp-block-heading:first-child,
.widget > .window-body > .wp-block-group > .wp-block-heading:first-child,
.widget > .window-body > .wp-block-search > .wp-block-search__label {
  display: block;
  margin: 0 -12px 10px;
  padding: 3px 6px;
  background: linear-gradient(90deg, var(--title-off), #b5b5b5);
  color: #fff;
  font-family: var(--ui);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.4;
}
.widget > .window-body > :first-child:not(.widget-title):not(.wp-block-heading):not(.wp-block-group):not(.wp-block-search) { margin-top: 10px; }
.widget:hover .widget-title,
.widget:hover > .window-body > .wp-block-heading:first-child,
.widget:hover > .window-body > .wp-block-group .wp-block-heading:first-child,
.widget:hover > .window-body > .wp-block-search > .wp-block-search__label {
  background: linear-gradient(90deg, var(--title), var(--title-2));
}
.widget .wp-block-search__inside-wrapper { display: flex; gap: 6px; }
.widget .wp-block-search__button { margin: 0; }
.widget .window-body { font-size: 1.1rem; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 3px 0 3px 22px; position: relative; }
.widget li::before {
  content: ""; position: absolute; left: 2px; top: 8px; width: 12px; height: 10px;
  background: #ffd700; border: 1px solid #000;
  box-shadow: inset 0 3px 0 #ffef80;
}
.widget li a { color: #000; text-decoration: none; }
.widget li a:hover { background: var(--sel); color: #fff; }
.widget select, .widget input { max-width: 100%; }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="password"], input[type="number"], textarea, select {
  font-family: var(--pixel); font-size: 1.1rem; padding: 4px 6px; border: 0; width: 100%;
  background: #fff;
  box-shadow:
    inset -1px -1px 0 var(--light),
    inset 1px 1px 0 var(--mid),
    inset -2px -2px 0 #dfdfdf,
    inset 2px 2px 0 var(--dark);
}
.search-form { display: flex; gap: 6px; }
.search-form label { flex: 1; }

/* ---------- Comments ---------- */
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { margin-left: 24px; }
.comment-body {
  margin-bottom: 12px; padding: 10px 12px; background: #fff;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
}
.comment-meta { font-family: var(--ui); font-size: .72rem; display: flex; gap: 10px; align-items: center; }
.comment-meta img { border: 1px solid #000; image-rendering: pixelated; }
.comment-form p { margin: 0 0 10px; }
.comment-form label { display: block; font-family: var(--ui); font-size: .75rem; margin-bottom: 2px; }

/* ---------- Taskbar ---------- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
  height: 40px; display: flex; align-items: center; gap: 6px; padding: 4px 6px;
  background: var(--face);
  box-shadow: inset 0 1px 0 #dfdfdf, inset 0 2px 0 #fff;
  font-family: var(--ui); font-size: .8rem;
}
.start-btn {
  display: flex; align-items: center; gap: 6px; font-weight: 700; height: 30px;
}
.start-btn .logo {
  width: 16px; height: 16px; position: relative; flex: none;
  background: #000080; border: 1px solid #000;
}
.start-btn .logo::before { /* label */
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 1px; height: 6px; background: #fff;
}
.start-btn .logo::after { /* shutter */
  content: ""; position: absolute; left: 4px; top: 0; width: 6px; height: 5px; background: #c0c0c0;
}
.taskbar .task {
  flex: 0 1 220px; height: 30px; display: flex; align-items: center; padding: 0 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #000, inset 2px 2px 0 #808080;
  background: repeating-conic-gradient(#c0c0c0 0 25%, #fff 0 50%) 0 0/2px 2px;
  font-weight: 700;
}
.taskbar .spacer { flex: 1; }
.taskbar .tray {
  height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080;
}
@media (max-width: 600px) {
  .taskbar .task { display: none; }
}

/* Start menu */
.start-menu {
  display: none; position: fixed; left: 4px; bottom: 40px; z-index: 9001;
  width: 240px; padding: 3px; background: var(--face);
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff, inset -2px -2px 0 #808080, 4px 4px 0 rgba(0,0,0,.3);
}
.start-menu.open { display: flex; }
.start-menu .stripe {
  width: 28px; background: linear-gradient(0deg, var(--title), var(--title-2));
  color: #c0c0c0; writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--ui); font-weight: 700; font-size: 1rem; padding: 8px 0;
}
.start-menu ul { list-style: none; margin: 0; padding: 2px; flex: 1; }
.start-menu a {
  display: block; padding: 6px 10px; color: #000; text-decoration: none;
  font-family: var(--ui); font-size: .8rem;
}
.start-menu a:hover, .start-menu a:focus { background: var(--sel); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; color: #fff; font-family: var(--ui); font-size: .72rem; padding: 0 16px 24px; }
.site-footer a { color: #fff; }

/* ---------- Error dialog (404) ---------- */
.dialog { max-width: 460px; margin: 40px auto; }
.dialog .window-body { display: flex; gap: 16px; align-items: flex-start; }
.dialog .stop {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: #d00; color: #fff; display: grid; place-items: center;
  font-family: var(--ui); font-weight: 700; font-size: 1.4rem; border: 1px solid #600;
}

/* ---------- Start menu extras & shut down ---------- */
.start-items { flex: 1; display: flex; flex-direction: column; }
.start-sep { margin: 3px 4px; border-top: 1px solid var(--mid); border-bottom: 1px solid #fff; }
.start-menu .shutdown-btn {
  display: block; width: 100%; text-align: left; box-shadow: none; background: none;
  padding: 6px 10px;
}
.start-menu .shutdown-btn:hover, .start-menu .shutdown-btn:focus { background: var(--sel); color: #fff !important; }

.shutdown-dialog {
  position: fixed; z-index: 9003; left: 50%; top: 40%; transform: translate(-50%, -50%);
  width: min(380px, calc(100vw - 32px)); margin: 0;
}
.shutdown-dialog .shutdown-ico { background: #000080; border-color: #000040; }
.dialog-buttons { display: flex; gap: 8px; margin: 14px 0 0; }
.dialog-buttons button { min-width: 80px; }
body.dimmed::before {
  content: ""; position: fixed; inset: 0; z-index: 9002;
  background: repeating-conic-gradient(rgba(0,0,0,.45) 0 25%, transparent 0 50%) 0 0/2px 2px;
}

.shutdown-screen {
  position: fixed; inset: 0; z-index: 9999; background: #000; color: #ff9a2e;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; font-family: var(--pixel); font-size: clamp(1.4rem, 4vw, 2.4rem);
  padding: 24px; cursor: pointer;
  animation: crt-off .45s ease-in both;
}
.shutdown-screen[hidden] { display: none; }
.shutdown-screen .shutdown-msg { color: #c0c0c0; }
.shutdown-screen small { display: block; margin-top: 18px; font-size: .55em; color: #888; }
@keyframes crt-off {
  0% { clip-path: inset(0 0 0 0); filter: brightness(2); }
  60% { clip-path: inset(49.5% 0 49.5% 0); filter: brightness(3); }
  100% { clip-path: inset(0 0 0 0); filter: none; }
}
@media (prefers-reduced-motion: reduce) { .shutdown-screen { animation: none; } }


/* ======================================================================
   TERMINAL THEME (green phosphor on black). Applied with html.phosphor
   ====================================================================== */
html.phosphor {
  --desk: var(--bg); --face: var(--bg); --light: var(--g); --mid: var(--gdim); --dark: var(--g);
  --title: var(--g); --title-2: var(--g); --title-off: var(--bg);
  --ink: var(--g); --link: var(--g); --visited: var(--gdim); --sel: var(--g);
  --ui: var(--pixel);
}

/* Palettes for the screen-style themes */
html.theme-terminal { --g: #33ff33; --gdim: #1d9a1d; --bg: #000; --glow: rgba(51,255,51,.55); --glow-strong: rgba(51,255,51,.7); --glow-soft: rgba(51,255,51,.25); --scan: rgba(0,0,0,.28); }
html.theme-amber    { --g: #ffb000; --gdim: #b07800; --bg: #0d0800; --glow: rgba(255,176,0,.5); --glow-strong: rgba(255,176,0,.7); --glow-soft: rgba(255,176,0,.22); --scan: rgba(0,0,0,.3); }
html.theme-blue     { --g: #b3acff; --gdim: #8378d8; --bg: #40318d; --glow: rgba(179,172,255,.25); --glow-strong: rgba(179,172,255,.4); --glow-soft: rgba(0,0,0,.2); --scan: rgba(0,0,30,.18); }
html.theme-mono     { --g: #000; --gdim: #555; --bg: #fff; --glow: transparent; --glow-strong: transparent; --glow-soft: rgba(0,0,0,.35); --scan: transparent; }

/* 8-bit Blue: thick light-blue border round the screen, like the old boot screen */
html.theme-blue body { box-shadow: inset 0 0 0 14px #8378d8; }
/* Monochrome: 1-bit dither desktop, hard drop shadows, no glow */
html.phosphor.theme-mono body {
  background: #fff repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0/2px 2px !important;
  text-shadow: none !important;
}
html.phosphor.theme-mono .window { box-shadow: 4px 4px 0 #000 !important; }
html.phosphor.theme-mono .content-well { border-style: solid !important; }
html.phosphor.theme-mono .site-title { text-shadow: none; }
html.phosphor body {
  background: var(--bg) !important;
  color: var(--g);
  text-shadow: 0 0 3px var(--glow);
}
/* scanlines */
html.phosphor body::after {
  content: ""; position: fixed; inset: 0; z-index: 9500; pointer-events: none;
  background: repeating-linear-gradient(var(--scan) 0 1px, transparent 1px 3px);
}
html.phosphor ::selection { background: var(--g); color: var(--bg); text-shadow: none; }

/* boxes: flat black with a green outline instead of grey bevels */
html.phosphor .window,
html.phosphor .content-well,
html.phosphor .window-body .sunken,
html.phosphor .status-bar > *,
html.phosphor input[type="text"], html.phosphor input[type="email"],
html.phosphor input[type="url"], html.phosphor input[type="search"],
html.phosphor input[type="password"], html.phosphor input[type="number"], html.phosphor textarea, html.phosphor select,
html.phosphor button, html.phosphor input[type="submit"],
html.phosphor .main-nav a, html.phosphor .btn, html.phosphor .wp-block-button__link,
html.phosphor .page-numbers, html.phosphor .post-navigation a,
html.phosphor .tags-links a, html.phosphor .comment-body, html.phosphor .post-thumb,
html.phosphor .taskbar .task, html.phosphor .taskbar .tray,
html.phosphor .start-menu, html.phosphor .entry-content blockquote,
html.phosphor .entry-content pre, html.phosphor .entry-content th,
html.phosphor .entry-content td {
  background: var(--bg) !important;
  color: var(--g) !important;
  box-shadow: none !important;
  border: 1px solid var(--g) !important;
}
html.phosphor .window { box-shadow: 0 0 10px var(--glow-soft) !important; }
html.phosphor .content-well { border-style: dashed !important; border-color: var(--gdim) !important; }
html.phosphor a, html.phosphor .entry-title a,
html.phosphor .entry-meta, html.phosphor .entry-meta a,
html.phosphor .site-description, html.phosphor .site-footer,
html.phosphor .site-footer a, html.phosphor .widget li a,
html.phosphor .entry-content figcaption, html.phosphor .menu-bar { color: var(--g); }
html.phosphor a:visited { color: var(--visited); }
html.phosphor .entry-meta, html.phosphor .entry-meta a { color: var(--gdim); }
html.phosphor .site-title { text-shadow: 0 0 8px var(--glow-strong); }
html.phosphor .site-title a { color: var(--g); }
html.phosphor .site-title a::before { content: "> "; }
html.phosphor .menu-bar { border-bottom: 1px dashed var(--gdim); box-shadow: none; }
html.phosphor hr, html.phosphor .entry-content hr { border-top-color: var(--gdim); border-bottom: 0; }

/* title bars: solid green when active, outlined when inactive */
html.phosphor .title-bar { background: var(--g) !important; color: var(--bg) !important; text-shadow: none; }
html.phosphor .title-bar.inactive { background: var(--bg) !important; color: var(--gdim) !important; border-bottom: 1px dashed var(--gdim); }
html.phosphor .title-bar-text .ico { background: var(--bg); border-color: var(--bg); box-shadow: none; }
html.phosphor .title-bar.inactive .title-bar-text .ico { border-color: var(--gdim); }
html.phosphor .title-bar-controls span { background: var(--bg); box-shadow: none; border: 1px solid var(--bg); }
html.phosphor .title-bar.inactive .title-bar-controls span { border-color: var(--gdim); }
html.phosphor .title-bar-controls .min::after,
html.phosphor .title-bar-controls .close::before,
html.phosphor .title-bar-controls .close::after { background: var(--g); }
html.phosphor .title-bar-controls .max::after { border-color: var(--g); }
html.phosphor .sticky .title-bar:not(.inactive) { background: var(--g) !important; }

/* widget and sidebar headings */
html.phosphor .widget .widget-title,
html.phosphor .widget > .window-body > .wp-block-heading:first-child,
html.phosphor .widget > .window-body > .wp-block-group .wp-block-heading:first-child,
html.phosphor .widget > .window-body > .wp-block-search > .wp-block-search__label {
  background: var(--bg) !important; color: var(--gdim); border-bottom: 1px dashed var(--gdim);
}
html.phosphor .widget:hover .widget-title,
html.phosphor .widget:hover > .window-body > .wp-block-heading:first-child,
html.phosphor .widget:hover > .window-body > .wp-block-group .wp-block-heading:first-child,
html.phosphor .widget:hover > .window-body > .wp-block-search > .wp-block-search__label {
  background: var(--g) !important; color: var(--bg); text-shadow: none;
}
html.phosphor .widget li::before { content: ">"; background: none; border: 0; box-shadow: none; top: 3px; width: auto; height: auto; color: var(--g); }

/* hover / selected states: inverse video */
html.phosphor .entry-title a:hover, html.phosphor .widget li a:hover,
html.phosphor .start-menu a:hover, html.phosphor .start-menu a:focus,
html.phosphor .start-menu .shutdown-btn:hover, html.phosphor .start-menu .shutdown-btn:focus,
html.phosphor .main-nav ul ul a:hover, html.phosphor .page-numbers.current,
html.phosphor .main-nav a:hover, html.phosphor .btn:hover, html.phosphor button:hover {
  background: var(--g) !important; color: var(--bg) !important; text-shadow: none;
}
html.phosphor .start-menu a, html.phosphor .start-menu .shutdown-btn { color: var(--g) !important; border: 0 !important; }
html.phosphor .mb-drop { box-shadow: none; border: 1px solid var(--g); }
html.phosphor .mb-drop a, html.phosphor .mb-drop button { color: var(--g) !important; }
html.phosphor .mb-drop a:hover, html.phosphor .mb-drop a:focus, html.phosphor .mb-drop button:hover, html.phosphor .mb-drop button:focus,
html.phosphor .menu-bar .mb-btn[aria-expanded="true"], html.phosphor .menu-bar .mb-btn:hover { background: var(--g) !important; color: var(--bg) !important; text-shadow: none; }
html.phosphor .mb-sep { border-top-color: var(--gdim); border-bottom: 0; }
html.phosphor .start-menu .stripe { background: var(--g); color: var(--bg); text-shadow: none; }
html.phosphor .start-sep { border-top-color: var(--gdim); border-bottom: 0; }
html.phosphor .main-nav .current-menu-item > a { outline-color: var(--g); }

/* taskbar */
html.phosphor .taskbar { background: var(--bg); box-shadow: none; border-top: 1px solid var(--g); }
html.phosphor .start-btn .logo { background: var(--bg); border-color: var(--g); }
html.phosphor .start-btn .logo::before { background: var(--g); }
html.phosphor .start-btn .logo::after { background: var(--gdim); }

/* dialogs */
html.phosphor .dialog .stop { background: var(--bg); color: var(--g); border: 1px solid var(--g); }
html.phosphor .shutdown-screen { text-shadow: none; }

/* misc */
html.phosphor .entry-content code { background: transparent; color: var(--g); border: 1px dashed var(--gdim); }
html.phosphor .entry-content pre code { border: 0; }
html.phosphor .comment-meta img { border-color: var(--g); }
html.phosphor input::placeholder { color: var(--gdim); }
html.phosphor .comment-form label { color: var(--g); }

/* ======================================================================
   KETCHUP: a deliberately garish red & yellow desktop scheme
   ====================================================================== */
html.theme-ketchup {
  --desk: #ff0000; --face: #ffff00; --title: #ff0000; --title-2: #ff0000;
  --title-off: #000; --sel: #ff0000; --mid: #000;
}
html.theme-ketchup body { background: #ff0000 !important; background-image: none; }
html.theme-ketchup .title-bar { background: #ff0000; color: #fff; }
html.theme-ketchup .title-bar.inactive { background: #000; color: #ffff00; }
html.theme-ketchup .content-well { background: #fff; }
html.theme-ketchup .site-title { text-shadow: 3px 3px 0 #ff0000; }
html.theme-ketchup .site-title a { color: #000; }
html.theme-ketchup .entry-title a { color: #ff0000; }
html.theme-ketchup .taskbar { background: #ffff00; }
html.theme-ketchup .site-footer, html.theme-ketchup .site-footer a { color: #ffff00; }

/* ---------- Display settings dialog ---------- */
.display-dialog .window-body { display: block; }
.display-dialog fieldset { border: 1px solid var(--mid); box-shadow: 1px 1px 0 #fff, inset 1px 1px 0 #fff; padding: 8px 12px 12px; margin: 0; }
.display-dialog legend { font-family: var(--ui); font-size: .8rem; padding: 0 4px; }
.display-dialog label { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-family: var(--ui); font-size: .85rem; }
.display-dialog .swatch { width: 44px; height: 30px; flex: none; border: 1px solid #000; }
.display-dialog .swatch-desktop { background: linear-gradient(#000080 0 7px, #c0c0c0 7px 22px, #008080 22px); }
.display-dialog .swatch-terminal { background: #000; box-shadow: inset 0 0 0 1px #33ff33; position: relative; }
.display-dialog .swatch-terminal::after { content: ">_"; position: absolute; left: 4px; top: 4px; color: #33ff33; font: 12px var(--pixel); }
.display-dialog .dialog-buttons { justify-content: flex-end; }
html.phosphor .display-dialog fieldset { border-color: var(--gdim); box-shadow: none; }
.display-dialog .swatch-amber { background: #0d0800; box-shadow: inset 0 0 0 1px #ffb000; position: relative; }
.display-dialog .swatch-amber::after { content: ">_"; position: absolute; left: 4px; top: 4px; color: #ffb000; font: 12px var(--pixel); }
.display-dialog .swatch-blue { background: #40318d; box-shadow: inset 0 0 0 4px #8378d8; position: relative; }
.display-dialog .swatch-blue::after { content: "_"; position: absolute; left: 8px; top: 4px; color: #b3acff; font: 12px var(--pixel); }
.display-dialog .swatch-mono { background: #fff repeating-conic-gradient(#000 0 25%, #fff 0 50%) 0 0/2px 2px; }
.display-dialog .swatch-ketchup { background: linear-gradient(#ff0000 0 7px, #ffff00 7px 22px, #ff0000 22px); }
.display-dialog label { padding: 4px 0; }

/* ---------- Stories: reading font, chapter nav, contents ---------- */
@font-face { font-family: "Courier Prime"; src: url("fonts/courier-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/courier-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/courier-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
.is-story .entry-content {
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 1.02rem; line-height: 1.75; max-width: 66ch;
}
.is-story .entry-content p { margin: 0 0 1.1em; }
.is-story.single .content-well { padding: 28px 32px; }
@media (max-width: 600px) { .is-story.single .content-well { padding: 18px 16px; } }

.chapter-nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
.chapter-nav .btn { padding: 6px 14px; }
.chapter-nav .is-disabled { color: #808080 !important; text-shadow: 1px 1px 0 #fff; cursor: default; }
html.phosphor .chapter-nav .is-disabled { color: var(--gdim) !important; text-shadow: none; border-style: dashed !important; }

.file-list { width: 100%; border-collapse: collapse; margin-top: 16px; font-family: var(--ui); font-size: .82rem; }
.file-list th { text-align: left; padding: 3px 8px; background: var(--face); box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff; font-weight: 400; }
.file-list td { padding: 4px 8px; border-bottom: 1px dotted #c0c0c0; }
.file-list tr:hover td { background: var(--sel); color: #fff; }
.file-list tr:hover a { color: #fff; }
.file-list a { text-decoration: none; color: #000; }
.file-list .fl-size, .file-list .fl-date { white-space: nowrap; }
.fl-ico { display: inline-block; width: 12px; height: 14px; margin-right: 6px; vertical-align: -2px; background: #fff; border: 1px solid #000; box-shadow: inset 0 3px 0 #fff, inset 0 4px 0 #808080, inset 0 7px 0 #fff, inset 0 8px 0 #808080; }
@media (max-width: 600px) { .file-list .fl-size, .file-list .fl-date { display: none; } }
html.phosphor .file-list th { background: var(--bg); box-shadow: none; border-bottom: 1px solid var(--g); }
html.phosphor .file-list td { border-bottom-color: var(--gdim); }
html.phosphor .file-list a { color: var(--g); }
html.phosphor .file-list tr:hover td, html.phosphor .file-list tr:hover a { background: var(--g); color: var(--bg); text-shadow: none; }
html.phosphor .fl-ico { background: var(--bg); border-color: var(--g); box-shadow: none; }

/* ---------- Boot screen ---------- */
.boot-screen { display: none; }
html.d85-boot .boot-screen, .boot-screen.manual {
  display: flex; flex-direction: column; justify-content: space-between;
  position: fixed; inset: 0; z-index: 99999; background: #000; color: #c0c0c0;
  font-family: var(--pixel); font-size: clamp(1rem, 2.4vw, 1.4rem); padding: 24px 28px; cursor: pointer;
  /* safety net: never get stuck if the script fails to load */
  animation: boot-safety 0s linear 6s forwards;
}
html.d85-boot body { overflow: hidden; }
.boot-text { margin: 0; white-space: pre-wrap; font: inherit; line-height: 1.35; }
.boot-skip { margin: 0; text-align: center; color: #808080; font-size: .8em; }
.boot-screen.fade { transition: opacity .35s; opacity: 0; }
@keyframes boot-safety { to { visibility: hidden; opacity: 0; pointer-events: none; } }
html.phosphor .boot-screen { color: var(--g); background: var(--bg); text-shadow: 0 0 3px var(--glow); }

/* ---------- Screensaver ---------- */
.screensaver { position: fixed; inset: 0; z-index: 99990; background: #000; cursor: none; }
.screensaver[hidden] { display: none; }
.screensaver .stars { position: absolute; inset: 0; overflow: hidden; }
.screensaver .star { position: absolute; left: 50%; top: 50%; width: 2px; height: 2px; background: #fff; will-change: transform, opacity; }
.saver-text {
  position: absolute; left: 0; top: 0; margin: 0; white-space: nowrap;
  font-family: var(--pixel); font-size: clamp(1.6rem, 5vw, 3rem); color: #fff;
  text-shadow: 0 0 10px currentColor; will-change: transform;
}

/* ---------- Review box ---------- */
.entry-content .review-box { margin: 1.4em 0; max-width: 460px; font-family: var(--ui); }
.review-box .window-body { padding: 10px 12px 12px; }
.review-game { margin: 0 0 8px; font-weight: 700; font-size: .95rem; }
.review-table { width: 100%; border-collapse: collapse; font-size: .8rem; margin-bottom: 10px; }
.entry-content .review-table th, .entry-content .review-table td { border: 0; border-bottom: 1px dotted #808080; padding: 3px 4px; background: none; font-size: inherit; }
.entry-content .review-table th { width: 40%; font-weight: 400; color: #333; font-family: var(--ui); }
.review-score { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.review-bar {
  flex: 1; display: flex; gap: 2px; padding: 3px; background: #fff;
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080, inset -2px -2px 0 #dfdfdf, inset 2px 2px 0 #000;
}
.review-bar .seg { flex: 1; height: 14px; }
.review-bar .seg.on { background: var(--title); }
.review-score-num { font-weight: 700; min-width: 3.5em; text-align: right; }
.review-verdict { margin: 10px 0 0; font-family: var(--pixel); font-size: 1.1rem; }
html.phosphor .review-bar { background: var(--bg); box-shadow: none; border: 1px solid var(--g); }
html.phosphor .review-bar .seg.on { background: var(--g); box-shadow: 0 0 4px var(--glow); }
html.phosphor .entry-content .review-table th { color: var(--gdim); }
html.phosphor .entry-content .review-table th, html.phosphor .entry-content .review-table td { border: 0 !important; border-bottom: 1px dashed var(--gdim) !important; }
.is-story .entry-content .review-box { font-family: var(--ui); }

/* ---------- Photo viewer ---------- */
.entry-content img.viewable { cursor: zoom-in; }
.photo-viewer {
  position: fixed; z-index: 9003; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 70px);
  display: flex; flex-direction: column; margin: 0;
}
.photo-viewer[hidden] { display: none; }
.photo-viewer .pv-stage {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  background: #000; margin: 4px 0; padding: 6px;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
}
.photo-viewer .pv-stage img { max-width: 100%; max-height: calc(100vh - 190px); object-fit: contain; display: block; }
.photo-viewer .pv-tools { display: flex; gap: 6px; justify-content: center; padding: 4px 0 2px; }
.photo-viewer .pv-tools button { min-width: 44px; }
html.phosphor .photo-viewer .pv-stage { border: 1px solid var(--gdim); box-shadow: none; }
.entry-content .review-box .window-body > p.review-game { margin: 0 0 8px; }
.entry-content .review-box .window-body > :last-child { margin-bottom: 0; }
html.phosphor .mb-drop a, html.phosphor .mb-drop button { border: 0 !important; background: none !important; }
html.phosphor .mb-drop a:hover, html.phosphor .mb-drop a:focus, html.phosphor .mb-drop button:hover, html.phosphor .mb-drop button:focus { background: var(--g) !important; color: var(--bg) !important; }
.entry-content .review-table td { font-family: var(--pixel); font-size: 1.05rem; }

/* ---------- Dice roller ---------- */
.dice-launch-wrap { margin: 1em 0; }
.btn.dice-launch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: .85rem; }
.dice-launch-ico {
  width: 16px; height: 16px; flex: none; background: #fff; border: 1px solid #000; position: relative;
  background-image: radial-gradient(#000 1.5px, transparent 2px), radial-gradient(#000 1.5px, transparent 2px), radial-gradient(#000 1.5px, transparent 2px);
  background-size: 16px 16px; background-position: -4px -4px, 0 0, 4px 4px; background-repeat: no-repeat;
}
.dice-window {
  position: fixed; z-index: 9003; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 60px); overflow-y: auto; margin: 0;
  font-family: var(--ui);
}
.dice-window[hidden] { display: none; }
.dice-window .title-bar-controls .dice-x {
  width: 18px; height: 16px; padding: 0; margin-left: 2px; position: relative; cursor: pointer;
  background: var(--face); border: 0;
  box-shadow: inset -1px -1px 0 var(--dark), inset 1px 1px 0 var(--light), inset -2px -2px 0 var(--mid);
}
.dice-window .title-bar-controls .dice-x::before, .dice-window .title-bar-controls .dice-x::after {
  content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 2px; background: #000;
}
.dice-window .title-bar-controls .dice-x::before { transform: rotate(45deg); }
.dice-window .title-bar-controls .dice-x::after { transform: rotate(-45deg); }

.dice-types {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px;
  border: 1px solid var(--mid); box-shadow: 1px 1px 0 #fff, inset 1px 1px 0 #fff; padding: 8px 10px 10px; margin: 0 0 10px;
}
.dice-types legend, .dice-field label { font-size: .75rem; padding: 0 4px; }
.dice-type { display: flex; flex-direction: column; gap: 3px; }
.die-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; padding: 6px 4px 4px !important;
  font-size: .75rem; cursor: pointer;
}
.dice-type.on .die-btn {
  background: #fff; font-weight: 700;
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #000, inset -2px -2px 0 #dfdfdf, inset 2px 2px 0 #808080;
}
.die-count { display: flex; align-items: stretch; }
.die-count button { flex: none; width: 20px; padding: 0 !important; font-size: .85rem; line-height: 1.2; }
.die-count .dc-val {
  flex: 1; text-align: center; font-family: var(--pixel); font-size: 1.15rem; line-height: 1.1; background: #fff;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
}
.dice-type:not(.on) .dc-val { color: #808080; }

/* die shapes (used in the picker and on rolled dice) */
.die-shape { display: block; width: 22px; height: 22px; background: var(--title); }
.die-shape.d4   { clip-path: polygon(50% 4%, 96% 92%, 4% 92%); }
.die-shape.d6   { clip-path: inset(6%); }
.die-shape.d8   { clip-path: polygon(50% 0, 96% 50%, 50% 100%, 4% 50%); }
.die-shape.d10  { clip-path: polygon(50% 0, 98% 42%, 50% 100%, 2% 42%); }
.die-shape.d12  { clip-path: polygon(50% 0, 98% 36%, 80% 96%, 20% 96%, 2% 36%); }
.die-shape.d20  { clip-path: polygon(50% 0, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%); }
.die-shape.d100 { clip-path: circle(46%); }

.dice-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 10px; }
.dice-field { display: flex; flex-direction: column; gap: 2px; }
.spinner { display: flex; }
.spinner button { padding: 2px 10px; min-width: 32px; font-size: 1rem; }
.spinner input { width: 58px; text-align: center; font-size: 1.2rem; padding: 2px 4px; -moz-appearance: textfield; }
.spinner input::-webkit-outer-spin-button, .spinner input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dice-window .dice-clear { margin-left: auto; padding: 8px 14px; }
.dice-window .dice-roll { padding: 8px 22px; font-size: 1rem; font-weight: 700; }

.dice-tray {
  min-height: 110px; padding: 12px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-content: center;
  background: #006400 radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px) 0 0/4px 4px;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff, inset 2px 2px 0 #000;
}
.dice-hint { margin: 0; color: #cfe8cf; font-family: var(--pixel); font-size: 1.2rem; }
.dice-tray .die-gap { width: 1px; align-self: stretch; margin: 0 6px; background: rgba(255,255,255,.25); }
html.phosphor .dice-tray .die-gap { background: var(--gdim); }
.die {
  width: 54px; height: 54px; display: grid; place-items: center; position: relative;
  font-family: var(--pixel); font-size: 1.6rem; color: #fff; line-height: 1;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,.45));
}
.die::before { content: ""; position: absolute; inset: 0; background: #b00000; clip-path: inherit; }
.die > span { position: relative; }
.die.d4   { clip-path: polygon(50% 4%, 96% 92%, 4% 92%); }
.die.d4 > span { top: 9px; font-size: 1.3rem; }
.die.d6   { clip-path: inset(4% round 6px); }
.die.d8   { clip-path: polygon(50% 0, 98% 50%, 50% 100%, 2% 50%); }
.die.d10  { clip-path: polygon(50% 0, 98% 42%, 50% 100%, 2% 42%); }
.die.d10 > span { top: -2px; }
.die.d12  { clip-path: polygon(50% 0, 98% 36%, 80% 96%, 20% 96%, 2% 36%); }
.die.d12 > span { top: 3px; }
.die.d20  { clip-path: polygon(50% 0, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%); }
.die.d100 { clip-path: circle(48%); }
.die.d100 > span { font-size: 1.3rem; }
.die.max::before { background: #d4a000; }
.die.min::before { background: #333; }
.die.rolling > span { opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .die.landed { animation: die-land .25s ease-out; }
  @keyframes die-land { 0% { transform: scale(1.25) rotate(-12deg); } 100% { transform: none; } }
}

.dice-total { margin: 10px 0 0; text-align: center; font-family: var(--pixel); font-size: 1.9rem; min-height: 1.2em; }
.dice-total small { display: block; font-size: .55em; line-height: 1.3; color: #444; margin-top: 2px; }
.dice-quip { margin: 2px 0 0; text-align: center; font-family: var(--pixel); font-size: 1.15rem; min-height: 1.2em; color: #800000; }
.dice-history { margin-top: 8px; font-size: .75rem; }
.dice-history summary { cursor: pointer; }
.dice-history ol { margin: 6px 0 0; padding-left: 22px; font-family: var(--pixel); font-size: 1.05rem; max-height: 140px; overflow-y: auto; }

/* screen themes */
html.phosphor .dice-types { border-color: var(--gdim); box-shadow: none; }
html.phosphor .die-btn { background: var(--bg); color: var(--g); box-shadow: none; border: 1px solid var(--gdim); }
html.phosphor .dice-type.on .die-btn { background: var(--g) !important; color: var(--bg) !important; text-shadow: none; }
html.phosphor .dice-type.on .die-btn .die-shape { background: var(--bg); }
html.phosphor .die-count .dc-val { background: var(--bg); box-shadow: none; border-top: 1px solid var(--gdim); border-bottom: 1px solid var(--gdim); }
html.phosphor .dice-type:not(.on) .dc-val { color: var(--gdim); }
html.phosphor .die-shape { background: var(--g); }
html.phosphor .dice-tray { background: var(--bg); box-shadow: none; border: 1px solid var(--g); }
html.phosphor .dice-hint { color: var(--gdim); }
html.phosphor .die { color: var(--bg); text-shadow: none; filter: none; }
html.phosphor .die::before { background: var(--g); }
html.phosphor .die.max::before { background: var(--g); box-shadow: none; }
html.phosphor .die.max { filter: drop-shadow(0 0 6px var(--g)); }
html.phosphor .die.min::before { background: var(--gdim); }
html.phosphor .dice-total small { color: var(--gdim); }
html.phosphor .dice-quip { color: var(--g); }
html.phosphor .dice-window .title-bar-controls .dice-x { background: var(--bg); box-shadow: none; border: 1px solid var(--bg) !important; }
html.phosphor .dice-window .title-bar-controls .dice-x::before, html.phosphor .dice-window .title-bar-controls .dice-x::after { background: var(--g); }
html.phosphor .dice-launch-ico { background-color: var(--bg); border-color: var(--g); background-image: radial-gradient(var(--g) 1.5px, transparent 2px), radial-gradient(var(--g) 1.5px, transparent 2px), radial-gradient(var(--g) 1.5px, transparent 2px); }
html.phosphor.theme-mono .die { color: #fff; }
/* Plain zeros for numbers in the dice roller (VT323's zero has a dot in it) */
.die-count .dc-val, .spinner input, .die { font-family: var(--ui); }
.die-count .dc-val { font-size: .95rem; line-height: 1.4; }
.spinner input { font-size: 1rem; }
.die { font-size: 1.25rem; font-weight: 400; }
.die.d4 > span, .die.d100 > span { font-size: 1rem; }
/* Box labels sit on a solid patch so the border highlight doesn't run through the text */
.dice-types legend, .display-dialog legend { background: var(--face); position: relative; z-index: 1; }
html.phosphor .dice-types legend, html.phosphor .display-dialog legend { background: var(--bg); }

/* Advantage / disadvantage */
.dice-modes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: .8rem; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check small { color: #555; font-size: .9em; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box {
  width: 14px; height: 14px; flex: none; background: #fff; position: relative;
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080, inset -2px -2px 0 #dfdfdf, inset 2px 2px 0 #000;
}
.check input:checked + .box::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid #000; border-width: 0 2px 2px 0; transform: rotate(40deg);
}
.check input:focus-visible + .box { outline: 1px dotted #000; outline-offset: 2px; }
.dice-window.locked .die-count button { opacity: .45; }
.die.dropped { opacity: 1; color: #e6e6e6; }
.die.dropped::before { background: #5a5a5a !important; }
.die.dropped::after {
  content: ""; position: absolute; left: 6%; right: 6%; top: calc(50% - 1px); height: 2px; background: #ff5050;
  transform: rotate(-35deg);
}
.die.kept { outline: none; filter: drop-shadow(0 0 0 #fff) drop-shadow(2px 2px 0 rgba(0,0,0,.45)); }
.dice-mode-tag { display: inline-block; margin-left: 10px; position: relative; top: -3px; padding: 0 6px; font-size: .5em; vertical-align: middle; background: var(--title); color: #fff; font-family: var(--ui); }
html.phosphor .check small { color: var(--gdim); }
html.phosphor .check .box { background: var(--bg); box-shadow: none; border: 1px solid var(--g); }
html.phosphor .check input:checked + .box::after { border-color: var(--g); }
html.phosphor .die.dropped::before { background: var(--gdim) !important; opacity: .45; }
html.phosphor .die.dropped { color: var(--g); filter: none; }
html.phosphor .die.dropped::after { background: var(--g); }
html.phosphor .dice-mode-tag { background: var(--g); color: var(--bg); text-shadow: none; }

/* ---------- Desktop icons (left of the windows, wide screens only) ---------- */
.desktop-icons { display: none; }
@media (min-width: 1400px) {
  .desktop-icons {
    display: flex; flex-direction: column; gap: 18px;
    position: fixed; left: 18px; top: 24px; z-index: 5; width: 84px;
  }
}
.desk-icon {
  display: flex !important; flex-direction: column; align-items: center; gap: 4px;
  width: 84px; padding: 4px 2px !important; cursor: default;
  background: none !important; border: 0 !important; box-shadow: none !important; color: #fff !important;
}
.desk-icon:active { padding: 4px 2px !important; }
.desk-icon-img { display: block; width: 32px; height: 32px; }
.desk-icon-img svg { display: block; width: 32px; height: 32px; image-rendering: pixelated; }
.desk-icon-label {
  font-family: var(--ui); font-size: .78rem; line-height: 1.2; padding: 1px 3px; text-align: center;
  color: #fff; text-shadow: 1px 1px 0 #000;
}
.desk-icon.selected .desk-icon-label, .desk-icon:focus-visible .desk-icon-label {
  background: var(--sel); text-shadow: none; outline: 1px dotted #fff; outline-offset: 0;
}
.desk-icon.selected .desk-icon-img, .desk-icon:focus-visible .desk-icon-img { filter: sepia(1) hue-rotate(190deg) saturate(4) brightness(.7); }
.desk-icon:focus-visible { outline: none !important; }
html.phosphor .desk-icon-label { color: var(--g); text-shadow: 0 0 3px var(--glow); }
html.phosphor .desk-icon.selected .desk-icon-label, html.phosphor .desk-icon:focus-visible .desk-icon-label { background: var(--g); color: var(--bg); outline-color: var(--g); }
html.phosphor .desk-icon-img { filter: grayscale(1) brightness(1.1); }
html.phosphor.theme-mono .desk-icon-label { color: #000; background: #fff; }
html.theme-ketchup .desk-icon-label { color: #ffff00; }
/* Desktop icons must never look like buttons, whatever the theme */
html .desktop-icons .desk-icon, html .desktop-icons .desk-icon:hover, html .desktop-icons .desk-icon:focus, html .desktop-icons .desk-icon:active {
  background: none !important; border: 0 !important; box-shadow: none !important; text-shadow: none;
}
html.phosphor .desk-icon.selected .desk-icon-img, html.phosphor .desk-icon:focus-visible .desk-icon-img { filter: grayscale(1) brightness(.7); }
html.theme-ketchup .desk-icon.selected .desk-icon-label, html.theme-ketchup .desk-icon:focus-visible .desk-icon-label { background: #000; color: #ffff00; outline-color: #ffff00; }

/* Shortcut icons (links) */
a.desk-icon { text-decoration: none; }
a.desk-icon:visited { color: #fff; }
.start-links { list-style: none; margin: 0; padding: 2px; }
.start-links a { display: flex !important; align-items: center; gap: 8px; }
.start-ico { width: 16px; height: 16px; flex: none; }
.start-ico svg { width: 16px; height: 16px; display: block; }
html.phosphor .start-ico svg { filter: grayscale(1) brightness(1.2); }
/* Dark screen themes: invert icons so black outlines turn light (mono-monitor look) */
html.phosphor:not(.theme-mono) .desk-icon-img, html.phosphor:not(.theme-mono) .start-ico svg { filter: grayscale(1) invert(1) brightness(1.15); }
html.phosphor:not(.theme-mono) .desk-icon.selected .desk-icon-img, html.phosphor:not(.theme-mono) .desk-icon:focus-visible .desk-icon-img { filter: grayscale(1) invert(1) brightness(.7); }

/* ---------- App windows (Recycle Bin, Initiative) ---------- */
.app-window {
  position: fixed; z-index: 9003; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 60px); overflow-y: auto; margin: 0;
  font-family: var(--ui);
}
.app-window[hidden] { display: none; }
.app-window .title-bar-controls .app-x {
  width: 18px; height: 16px; padding: 0; margin-left: 2px; position: relative; cursor: pointer;
  background: var(--face); border: 0;
  box-shadow: inset -1px -1px 0 var(--dark), inset 1px 1px 0 var(--light), inset -2px -2px 0 var(--mid);
}
.app-window .title-bar-controls .app-x::before, .app-window .title-bar-controls .app-x::after {
  content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 2px; background: #000;
}
.app-window .title-bar-controls .app-x::before { transform: rotate(45deg); }
.app-window .title-bar-controls .app-x::after { transform: rotate(-45deg); }
html.phosphor .app-window .title-bar-controls .app-x { background: var(--bg); box-shadow: none; border: 1px solid var(--bg) !important; }
html.phosphor .app-window .title-bar-controls .app-x::before, html.phosphor .app-window .title-bar-controls .app-x::after { background: var(--g); }

/* Recycle Bin */
.bin-list { padding: 0 !important; max-height: 220px; overflow-y: auto; }
.bin-table { margin-top: 0; }
.bin-row { cursor: default; }
.bin-row:focus { outline: 1px dotted #000; outline-offset: -2px; }
.bin-row.selected td, .bin-row.selected td * { background: var(--sel); color: #fff !important; }
.chr-ico { background: #fff; box-shadow: none !important; position: relative; }
.chr-ico::after { content: ""; position: absolute; left: 3px; top: 3px; width: 4px; height: 4px; border-radius: 50%; background: #800000; }
.bin-detail { margin-top: 10px; padding: 10px 12px; min-height: 84px; background: #ffffe1; border: 1px solid #000; font-size: .85rem; }
.bin-detail p { margin: 0 0 4px; }
.bin-name { font-weight: 700; font-size: .95rem; }
.bin-words { margin: 8px 0 0; font-family: var(--pixel); font-size: 1.25rem; font-style: italic; }
.bin-hint { color: #555; }
.bin-empty { text-align: center; padding: 24px !important; }
.bin-buttons { justify-content: flex-end; }
@media (max-width: 560px) { .bin-death-col { display: none; } }
html.phosphor .bin-detail { background: var(--bg); border-color: var(--g); color: var(--g); }
html.phosphor .bin-hint { color: var(--gdim); }
html.phosphor .bin-row.selected td, html.phosphor .bin-row.selected td * { background: var(--g); color: var(--bg) !important; text-shadow: none; }
html.phosphor .chr-ico { background: var(--bg); }
html.phosphor .chr-ico::after { background: var(--g); }

/* Initiative tracker */
.init-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.init-add input { width: 70px; font-size: 1rem; }
.init-name-field { flex: 1 1 140px; }
.init-name-field input { width: 100%; }
.init-npc-check { font-size: .8rem; padding-bottom: 6px; }
.init-add-btn { padding: 6px 16px; }
.init-tip { margin: 6px 0 8px; font-size: .72rem; color: #555; }
.init-list-wrap { padding: 4px !important; min-height: 120px; max-height: 260px; overflow-y: auto; }
.init-list { list-style: none; margin: 0; padding: 0; }
.init-row {
  display: grid; grid-template-columns: 18px 44px 1fr auto 26px; align-items: center; gap: 8px;
  padding: 4px 6px; border-bottom: 1px dotted #c0c0c0; font-size: .9rem;
}
.init-row.current { background: var(--sel); color: #fff; }
.init-row.npc .init-who { color: #a00000; }
.init-row.current.npc .init-who { color: #ffd0d0; }
.init-row.down .init-who { text-decoration: line-through; opacity: .6; }
.init-marker { font-size: .8rem; }
.init-score { font-family: var(--ui); font-weight: 700; font-size: 1.05rem; text-align: right; }
.init-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--pixel); font-size: 1.2rem; }
.init-hpbox { display: flex; align-items: center; gap: 4px; font-size: .8rem; white-space: nowrap; }
.init-hpbox button, .init-del { padding: 0 6px !important; min-width: 22px; font-size: .8rem; line-height: 1.4; }
.init-empty { margin: 30px 8px; text-align: center; color: #666; font-size: .85rem; }
.init-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.init-spacer { flex: 1; }
.init-next { font-weight: 700; }
html.phosphor .init-tip, html.phosphor .init-empty { color: var(--gdim); }
html.phosphor .init-row { border-bottom-color: var(--gdim); }
html.phosphor .init-row.current { background: var(--g); color: var(--bg); text-shadow: none; }
html.phosphor .init-row.current button { color: var(--bg) !important; border-color: var(--bg) !important; }
html.phosphor .init-row.npc .init-who { color: var(--g); }
html.phosphor .init-row.current.npc .init-who { color: var(--bg); }

/* "Use knife" counter: [knife] */
.knife-counter {
  display: inline-flex; align-items: center; gap: 12px; margin: 1em 0; padding: 8px 12px;
  background: var(--face); font-family: var(--ui); font-size: .8rem;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #fff, inset -2px -2px 0 #808080, inset 2px 2px 0 #dfdfdf;
}
.knife-led {
  position: relative; display: inline-block; padding: 4px 10px; background: #1a0000;
  font-family: var(--ui); font-size: 2rem; line-height: 1; letter-spacing: 4px;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff, inset 2px 2px 0 #000;
}
.knife-ghost { color: #3a0000; }
.knife-num { position: absolute; left: 10px; top: 4px; color: #ff2020; text-shadow: 0 0 6px rgba(255, 32, 32, .8); }
html.phosphor .knife-counter { background: var(--bg); box-shadow: none; border: 1px solid var(--g); color: var(--g); }
html.phosphor .knife-led { background: var(--bg); box-shadow: none; border: 1px solid var(--gdim); }
html.phosphor .knife-ghost { color: transparent; }
html.phosphor .knife-num { color: var(--g); text-shadow: 0 0 6px var(--glow); }

/* ---------- Photo galleries: a folder window of thumbnails ---------- */
.gallery-window { margin: 1.4em 0; }
.gallery-window .title-bar { font-family: var(--ui); }
.gallery-well {
  background: #fff; padding: 10px; max-height: 70vh; overflow-y: auto;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff, inset 2px 2px 0 #000;
  margin: 0 3px;
}
.gallery-well .wp-block-gallery {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px !important; margin: 0 !important;
}
.gallery-well .wp-block-gallery figure.wp-block-image {
  width: auto !important; margin: 0 !important; background: #fff; padding: 4px; border: 1px dotted transparent;
  display: flex !important; flex-direction: column !important; flex-grow: 0 !important;
}
.gallery-well .wp-block-gallery figure.wp-block-image:hover, .gallery-well .wp-block-gallery figure.wp-block-image:focus-within { border-color: #000; }
.gallery-well .wp-block-gallery figure.wp-block-image img {
  width: 100% !important; height: 110px !important; object-fit: cover !important; border: 1px solid #000; flex: none !important;
}
.gallery-well .wp-block-gallery figure.wp-block-image figcaption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-well .wp-block-gallery figure.wp-block-image::before { display: none !important; }
.gallery-well .wp-block-gallery figure figcaption {
  position: static !important; background: none !important; color: #000 !important; padding: 4px 0 0 !important;
  font-family: var(--ui); font-size: .72rem !important; text-align: center; max-height: none !important;
}
.gallery-well .blocks-gallery-caption { display: none; }
.gallery-window .status-bar { font-family: var(--ui); }
.gallery-hint { color: #555; }
.folder-ico { background: #ffd700 !important; box-shadow: inset 0 3px 0 #ffef80, 0 0 0 1px #000 !important; }
html.phosphor .gallery-well { background: var(--bg); box-shadow: none; border: 1px solid var(--gdim); }
html.phosphor .gallery-well figure.wp-block-image { background: var(--bg) !important; }
html.phosphor .gallery-well figure.wp-block-image img { border-color: var(--gdim); filter: grayscale(1) sepia(.2); }
html.phosphor .gallery-well figure figcaption { color: var(--g) !important; }
html.phosphor .gallery-hint { color: var(--gdim); }
html.phosphor .folder-ico { background: var(--g) !important; box-shadow: none !important; }

/* Photo viewer extras */
.photo-viewer .pv-strip {
  display: flex; gap: 4px; overflow-x: auto; padding: 4px; margin: 4px 0 0; background: #fff;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
}
.photo-viewer .pv-strip[hidden] { display: none; }
.photo-viewer:has(.pv-strip:not([hidden])) .pv-stage img { max-height: calc(100vh - 260px); }
.pv-thumb { flex: 0 0 auto; padding: 2px !important; min-width: 0 !important; line-height: 0; }
.pv-thumb img { width: 56px; height: 42px; object-fit: cover; display: block; }
.pv-thumb.on { outline: 2px solid var(--sel); outline-offset: -2px; }
.photo-viewer .status-bar .pv-camera { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-viewer .status-bar .pv-count { flex: 0 0 auto; }
@media (max-width: 600px) { .photo-viewer .status-bar .pv-camera { display: none; } }
html.phosphor .photo-viewer .pv-strip { background: var(--bg); box-shadow: none; border: 1px solid var(--gdim); }
html.phosphor .pv-thumb img { filter: grayscale(1); }
html.phosphor .pv-thumb.on { outline-color: var(--g); }

/* ---------- Visitor counter ---------- */
.footer-counter { margin: 6px 0 0; }
.hit-counter { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ui); font-size: .8rem; }
.hit-digits {
  display: inline-block; padding: 3px 6px; background: #000; color: #fff;
  font-family: "D85 Digits", var(--ui); font-size: 1.25rem; line-height: 1; letter-spacing: 3px;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
}
html.phosphor .hit-digits { background: var(--bg); color: var(--g); border: 1px solid var(--gdim); text-shadow: 0 0 6px var(--glow); }
html.theme-ketchup .hit-digits { color: #ffff00; }
.hit-counter-wrap { text-align: center; }

/* ---------- Steam "Now Playing" (taskbar tray) ---------- */
.taskbar .now-playing {
  display: inline-flex; align-items: center; gap: 4px; max-width: 220px; height: 22px; padding: 0 4px !important;
  background: none !important; box-shadow: none !important; border: 0 !important; font-size: .75rem; cursor: pointer;
}
.taskbar .now-playing[hidden] { display: none; }
.now-playing .np-ico svg { width: 16px; height: 16px; display: block; image-rendering: pixelated; }
.now-playing .np-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing.live .np-ico { animation: np-blink 1.2s steps(2, start) infinite; }
@keyframes np-blink { to { visibility: hidden; } }
@media (max-width: 700px) { .now-playing .np-text { display: none; } }
@media (prefers-reduced-motion: reduce) { .now-playing.live .np-ico { animation: none; } }
html.phosphor .now-playing .np-ico svg { filter: grayscale(1) invert(1) brightness(1.15); }

/* ---------- Solitaire ---------- */
.sol-window { width: min(640px, calc(100vw - 16px)); }
.sol-window .window-body, .sol-window { font-family: var(--ui); }
.sol-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 6px; }
.sol-menu button { padding: 3px 12px; }
.sol-menu [hidden], .photo-viewer [hidden] { display: none !important; }
.sol-draw3-check { font-size: .8rem; }
.sol-table {
  position: relative; margin: 0 3px; min-height: 320px; overflow: hidden; touch-action: none;
  background: #008000; box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff, inset 2px 2px 0 #000;
  user-select: none; -webkit-user-select: none;
}
.sol-table .slot, .sol-table .card {
  position: absolute; width: var(--cw); height: var(--ch); border-radius: 4px; box-sizing: border-box;
}
.sol-table .slot {
  border: 1px solid #004000; background: rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.35); font-size: calc(var(--cw) * .38); font-weight: 700;
}
.sol-table .stock-slot { cursor: pointer; }
.sol-table .card { background: #fff; border: 1px solid #000; color: #000; cursor: pointer; }
.sol-table .card.red { color: #c00000; }
.sol-table .card.down {
  background-color: #000080;
  background-image:
    linear-gradient(45deg, #2a6fdb 25%, transparent 25%, transparent 75%, #2a6fdb 75%),
    linear-gradient(45deg, #2a6fdb 25%, transparent 25%, transparent 75%, #2a6fdb 75%);
  background-size: 8px 8px; background-position: 0 0, 4px 4px;
  box-shadow: inset 0 0 0 3px #fff; cursor: default;
}
.sol-table .card.stock-card { cursor: pointer; }
.sol-table .card.stack { box-shadow: inset 0 0 0 3px #fff, 2px 2px 0 #000; }
.sol-table .card:focus-visible, .sol-table .slot:focus-visible { outline: 2px solid #ffff00; outline-offset: 1px; }
.sol-table .card.dragging { z-index: 50; box-shadow: 3px 3px 0 rgba(0,0,0,.4); }
.sol-table .card.nope { animation: sol-nope .3s; }
@keyframes sol-nope { 25% { margin-left: -3px; } 75% { margin-left: 3px; } }
.card .cr { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 700; font-size: calc(var(--cw) * .2); letter-spacing: -1px; }
.card .cr.tl { left: 3px; top: 3px; }
.card .cr.br { right: 3px; bottom: 3px; transform: rotate(180deg); }
.card .cs { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--cw) * .48); }
.card i.s { font-style: normal; }
.card[data-s="0"] i.s::before { content: "\2660"; }
.card[data-s="1"] i.s::before { content: "\2665"; }
.card[data-s="2"] i.s::before { content: "\2666"; }
.card[data-s="3"] i.s::before { content: "\2663"; }
.sol-cascade { position: absolute; inset: 0; z-index: 100; pointer-events: none; }
.sol-cascade .card { cursor: default; }
@media (prefers-reduced-motion: reduce) { .sol-table .card.nope { animation: none; } }
/* Phosphor looks: one colour, so hearts and diamonds are drawn hollow to tell them apart */
html.phosphor .sol-table { background: var(--bg); box-shadow: none; border: 1px solid var(--gdim); }
html.phosphor .sol-table .slot { border-color: var(--gdim); background: none; color: var(--gdim); }
html.phosphor .sol-table .card { background: var(--bg); border-color: var(--g); color: var(--g); text-shadow: 0 0 4px var(--glow); }
html.phosphor .sol-table .card.down { background-image: repeating-linear-gradient(45deg, var(--gdim) 0 1px, transparent 1px 5px); background-color: var(--bg); box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 3px var(--gdim); }
html.phosphor .card[data-s="1"] i.s::before { content: "\2661"; }
html.phosphor .card[data-s="2"] i.s::before { content: "\2662"; }
html.theme-ketchup .sol-table { background: #ff0000; }
