:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #1c1917;
  --muted: #525252;
  --line: #e5e5e5;
  --card: #ffffff;
  --soft: #f5f5f5;
  --gold: #4b5563;
  --blue: #2f6bff;
  --bar: rgba(255, 255, 255, 0.94);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414;
  --ink: #f2f2f2;
  --muted: #a3a3a3;
  --line: #3a3a3a;
  --card: #1d1d1d;
  --soft: #262626;
  --gold: #a3a3a3;
  --blue: #2f6bff;
  --bar: rgba(20, 20, 20, 0.94);
}

* { box-sizing: border-box; }

html { scrollbar-gutter: stable; }

body.hub {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  overflow: auto;
}

img { max-width: 100%; display: block; }

img[hidden],
.rent-err[hidden],
.info-link[hidden] { display: none; }

button { font: inherit; color: inherit; }

a { color: inherit; }

.home-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.home-bar-inner,
.home-frame {
  width: min(920px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.home-bar-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex: none;
  text-decoration: none;
  min-height: 44px;
}

.home-brand img { width: 76px; height: 42px; flex: none; }

.home-brand h1 {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.45;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.home-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.home-actions button {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}

.home-actions button:hover,
.home-card:hover { border-color: var(--ink); }

.home-actions button:focus-visible,
.home-card:focus-visible,
.home-copy a:focus-visible,
.home-foot a:focus-visible,
.home-chips a:focus-visible,
.home-search input:focus-visible,
.box-hit button:focus-visible,
.box-row button:focus-visible,
.box-row select:focus-visible,
.box-row a:focus-visible {
  outline: 1px solid #9ca3af;
  outline-offset: 3px;
}

.home-frame { padding: 1.5rem 0 2.5rem; }

.home-tagline {
  margin: 0.2rem 0 1.25rem;
  color: var(--gold);
  font-size: 1.12rem;
  font-weight: 500;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.home-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.6rem 0.6rem 0.95rem;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.home-art {
  aspect-ratio: 320 / 180;
  height: auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
}

.home-art svg {
  width: 100%;
  height: auto;
  display: block;
}

.home-card h2,
.home-card h3 {
  margin: 0.85rem 0.3rem 0.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home-card p {
  margin: 0 0.3rem 0.85rem;
  min-height: 2.8em;
  color: var(--muted);
  font-size: 0.95rem;
}

.home-go {
  margin: auto 0.3rem 0.15rem;
  align-self: flex-start;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home-copy {
  margin: 1.6rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  max-width: 40rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.home-copy h2 {
  margin: 1.15rem 0 0.35rem;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.home-copy h2:first-child { margin-top: 0; }

.home-copy p { margin: 0 0 0.7rem; }

.home-copy a { color: var(--ink); }

.home-prose {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.home-prose ul {
  margin: 0 0 0.7rem;
  padding-left: 1.15rem;
}

.home-prose li { margin: 0 0 0.28rem; }

.home-prose strong {
  color: var(--ink);
  font-weight: 600;
}

.home-foot {
  border-top: 1px solid var(--line);
  padding: 0.4rem 0 1.6rem;
}

.home-foot nav {
  width: min(920px, calc(100% - 2.5rem));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
}

.home-foot.is-center nav {
  justify-content: center;
}

.home-foot a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.85rem;
}

.home-foot a:hover { border-color: var(--ink); }

.home-share-card {
  width: min(420px, calc(100vw - 2rem));
  background: #14161c;
  color: #f5f7fb;
  border: 0;
  border-radius: 18px;
  padding: 1.2rem;
}

.home-share-card::backdrop { background: rgba(12, 10, 14, 0.55); }

.home-share-card img { width: 92px; height: 52px; }

.home-share-card strong {
  display: block;
  margin-top: 0.8rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.home-share-card p { margin: 0.35rem 0 1rem; color: #c5c8d4; word-break: break-all; }

.home-share-card menu {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.home-share-card button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #f5f7fb;
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}

.home-sheet {
  width: min(36rem, 100%);
}

.home-sheet.is-center {
  margin-inline: auto;
}

.home-sheet .home-form,
.home-sheet .home-lead,
.home-sheet .home-copy {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.home-page-title {
  margin: 0.15rem 0 0.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.home-lead {
  margin: 0 0 1.2rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1rem;
}

.home-lead a { color: var(--ink); }

.home-form {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
}

.home-form label,
.home-field {
  display: grid;
  gap: 0.4rem;
}

.home-form label span,
.home-field legend {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.home-form em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
}

.home-form input,
.home-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
}

.home-form textarea { min-height: 9.5rem; resize: vertical; }

.home-form input::placeholder,
.home-form textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.home-form input:focus-visible,
.home-form textarea:focus-visible,
.home-choice input:focus-visible + span {
  outline: 1px solid #9ca3af;
  outline-offset: 2px;
}

.home-choice {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.home-choice legend { grid-column: 1 / -1; }

.home-choice label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
}

.home-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.home-choice label:has(input:checked) {
  border-color: var(--ink);
  background: var(--soft);
}

.home-send {
  appearance: none;
  justify-self: start;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  cursor: pointer;
}

.home-send:hover { border-color: var(--ink); }

.home-send:disabled { opacity: 0.62; cursor: wait; }

.home-send.is-sent {
  background: #1a7a38;
  border-color: #1a7a38;
  color: #ffffff;
}

.home-status { min-height: 1.3em; margin: 0; font-weight: 500; }

.home-status.ok { color: #1a7a38; }

[data-theme="dark"] .home-status.ok { color: #8ee0a8; }

.home-status.err { color: #b42318; }

[data-theme="dark"] .home-status.err { color: #ffb4a8; }

.adwall-stage {
  width: min(640px, 100%);
  margin: 0 auto 1rem;
}

.adwall-stats {
  margin: 0 0 0.7rem;
  text-align: center;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.billboard {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  width: 100%;
  aspect-ratio: 1;
  background: #111;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.billboard > button,
.billboard > a {
  position: relative;
  appearance: none;
  display: block;
  border: 0;
  background: #fff;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.28);
  font: 700 0.45rem "IBM Plex Sans", sans-serif;
  color: #111;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

.billboard > button img.tile,
.billboard > a img.tile {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.billboard > button.taken,
.billboard > a.taken { color: #f2f2f2; }

.billboard > a.taken:hover,
.billboard > button:hover,
.billboard > a:hover {
  outline: 2px solid #111;
  outline-offset: -2px;
  z-index: 1;
}

.billboard > button.selected,
.billboard > a.selected {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
  box-shadow: inset 0 0 0 2px #111;
  z-index: 2;
}

.billboard > button.blocked,
.billboard > a.blocked {
  outline: 3px solid #b42318;
  outline-offset: -3px;
  z-index: 2;
  cursor: not-allowed;
}

.billboard > button.logo,
.billboard > a.logo {
  color: transparent;
  box-shadow: none;
  background-size: cover;
  background-position: center;
}

.rent-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(12, 10, 14, 0.55);
}

.rent-overlay[hidden] { display: none; }

.rent-sheet {
  width: min(420px, 100%);
  display: grid;
  gap: 0.7rem;
  padding: 1.15rem;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  font-family: "IBM Plex Sans", sans-serif;
}

.rent-cell {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
}

.rent-price,
.rent-rules,
.info-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.rent-sheet label {
  display: grid;
  gap: 0.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.rent-sheet input {
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
}

.logo-preview,
.info-zoom {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.info-zoom {
  width: min(72vw, 320px);
  height: min(72vw, 320px);
  object-fit: contain;
  justify-self: center;
}

.info-link {
  color: var(--ink);
  font-weight: 600;
  word-break: break-all;
}

.color-pick { position: relative; display: grid; gap: 0.35rem; }

.color-label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.color-row { display: flex; align-items: center; gap: 0.55rem; }

.color-swatch {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
}

.color-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  z-index: 5;
  display: grid;
  gap: 0.4rem;
  padding: 0.5rem;
  width: 236px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  touch-action: none;
}

.color-pop[hidden] { display: none; }

.hue-bar {
  position: relative;
  width: 100%;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
  touch-action: none;
  background: linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
}

.hue-thumb {
  position: absolute;
  top: 50%;
  left: calc(9px + (100% - 18px) * var(--h, 14) / 360);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--thumb, #ff0000);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#color-hex { font-weight: 600; }

.rent-row { display: flex; gap: 0.5rem; justify-content: flex-end; }

.rent-row button {
  appearance: none;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  cursor: pointer;
}

.rent-row .rent-go {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.rent-row .rent-go:disabled {
  opacity: 0.45;
  cursor: wait;
}

.rent-err { margin: 0; color: #b42318; font-size: 0.9rem; }

[data-theme="dark"] .rent-err { color: #ffb4a8; }

.home-note {
  margin: 0.4rem auto 0;
  max-width: 36rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.home-note a { color: var(--ink); }

.home-search {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.home-search span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.home-search input {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  font: inherit;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.home-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.home-count,
.home-empty {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.35rem;
}

.home-chips a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.85rem;
}

.home-chips a:hover { border-color: var(--ink); }

.home-genre {
  margin: 0 0 1.45rem;
  scroll-margin-top: 5.2rem;
}

.home-genre-title {
  margin: 0 0 0.7rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home-card[hidden],
.home-genre[hidden],
.home-empty[hidden],
.box-results[hidden],
.box-empty[hidden] { display: none; }

.box-add {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}

.box-results,
.box-list {
  display: grid;
  gap: 0.45rem;
}

.box-hit,
.box-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.35rem 0.45rem 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.box-hit span,
.box-row a {
  flex: 1;
  min-width: 0;
}

.box-row a {
  color: inherit;
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
}

.box-kind {
  color: var(--muted);
  font-size: 0.85rem;
}

.box-hit button,
.box-row button,
.box-row select {
  appearance: none;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 0 0.85rem;
  cursor: pointer;
}

.box-row select { cursor: pointer; max-width: 9rem; }

.box-hit button:hover,
.box-row button:hover,
.box-row select:hover { border-color: var(--ink); }

.box-group { margin: 0 0 1.25rem; }

.box-group h2 {
  margin: 0 0 0.55rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.box-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 700px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-choice { grid-template-columns: 1fr; }
  .box-hit,
  .box-row { flex-wrap: wrap; }
  .box-row select { max-width: none; }
}

/* header-unify 2026-10-14: one-row header on every page; same lockup + pill buttons as game-chrome.css. */
.home-brand { gap: 0.85rem; flex: none; }
.home-brand img { width: 76px; height: 42px; flex: none; }
.home-brand h1 { font-size: 1.1rem; white-space: nowrap; }
.home-actions { gap: 0.4rem; flex: none; }
.home-actions button {
  border: 1px solid #e5e5e5;
  background: #ffffff;
  color: #1c1917;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 0.95rem;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  white-space: nowrap;
}
[data-theme="dark"] .home-actions button { background: #1d1d1d; border-color: #3a3a3a; color: #f2f2f2; }
.home-actions button:hover { border-color: currentColor; }
@media (max-width: 700px) {
  .home-bar-inner { gap: 0.5rem; }
  .home-brand { gap: 0.5rem; }
  .home-brand img { width: 58px; height: 32px; }
  .home-brand h1 { font-size: 0.875rem; }
  .home-actions { gap: 0.3rem; }
  .home-actions button {
    min-height: 36px;
    padding: 0 0.6rem;
    font-size: 0.8125rem;
  }
}

/* 2026-10-15: card title spacing +0.1-0.15rem (picture->title, title->line); home-cards.css is generated from these rules */
/* card-size switch 2026-10-14: Small / Medium / Large on index, games, utilities, toolbox.
   html[data-cards] is set in <head> from localStorage "sh-card-size" (default medium). */
/* card-size header button (menu pages only), first item in .home-actions */
.card-size-btn {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #ffffff;
  color: #1c1917;
  cursor: pointer;
}
.card-size-btn:hover { border-color: currentColor; }
.card-size-btn:focus-visible { outline: 1px solid #9ca3af; outline-offset: 2px; }
[data-theme="dark"] .card-size-btn { background: #1d1d1d; border-color: #3a3a3a; color: #f2f2f2; }

@media (max-width: 700px) {
  .card-size-btn { width: 36px; height: 36px; }
  .card-size-btn svg { width: 16px; height: 16px; }
}

/* columns: medium is the default */
:root .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:root[data-cards="small"] .home-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
:root[data-cards="large"] .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1023px) {
  :root .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :root[data-cards="small"] .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  :root[data-cards="large"] .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  :root .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  :root[data-cards="small"] .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
  :root[data-cards="large"] .home-grid { grid-template-columns: minmax(0, 1fr); gap: 0.85rem; }
}
.home-card h2, .home-card h3, .home-card p { overflow-wrap: anywhere; }

/* medium: picture, title, one-liner */
:root:not([data-cards="small"]):not([data-cards="large"]) .home-card h2,
:root:not([data-cards="small"]):not([data-cards="large"]) .home-card h3 {
  font-size: 1.05rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
:root:not([data-cards="small"]):not([data-cards="large"]) .home-card p {
  min-height: 0;
  font-size: 0.9rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (max-width: 700px) {
  :root:not([data-cards="small"]):not([data-cards="large"]) .home-card { padding: 0.45rem 0.45rem 0.7rem; }
  :root:not([data-cards="small"]):not([data-cards="large"]) .home-card h2,
  :root:not([data-cards="small"]):not([data-cards="large"]) .home-card h3 { margin: 0.7rem 0.2rem 0.3rem; font-size: 0.95rem; }
  :root:not([data-cards="small"]):not([data-cards="large"]) .home-card p { margin: 0 0.2rem; font-size: 0.82rem; }
  :root:not([data-cards="small"]):not([data-cards="large"]) .home-go { display: none; }
}

/* small: picture and title only */
:root[data-cards="small"] .home-card { padding: 0.35rem 0.35rem 0.5rem; border-radius: 12px; }
:root[data-cards="small"] .home-art { border-radius: 8px; }
:root[data-cards="small"] .home-card p,
:root[data-cards="small"] .home-go { display: none; }
:root[data-cards="small"] .home-card h2,
:root[data-cards="small"] .home-card h3 {
  margin: 0.55rem 0.15rem 0;
  font-size: 0.85rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* toolbox saved rows follow the same column counts */
:root #box-saved .box-group { display: grid; gap: 0.45rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
:root[data-cards="small"] #box-saved .box-group { grid-template-columns: repeat(6, minmax(0, 1fr)); }
:root[data-cards="large"] #box-saved .box-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#box-saved .box-group h2 { grid-column: 1 / -1; }
:root:not([data-cards="large"]) #box-saved .box-row { flex-direction: column; align-items: stretch; padding: 0.5rem; }
:root:not([data-cards="large"]) #box-saved .box-row a { overflow-wrap: anywhere; }
:root:not([data-cards="large"]) #box-saved .box-row select { max-width: none; width: 100%; }
@media (max-width: 1023px) {
  :root #box-saved .box-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :root[data-cards="small"] #box-saved .box-group { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  :root[data-cards="large"] #box-saved .box-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  :root #box-saved .box-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root[data-cards="small"] #box-saved .box-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :root[data-cards="large"] #box-saved .box-group { grid-template-columns: minmax(0, 1fr); }
}

/* My toolbox rebuild 2026-10-14 (toolbox.html + toolbox-page.js) */
.box-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.box-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.1rem; }
.box-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 0.95rem;
  border: 1px solid #e5e5e5; border-radius: 999px; background: #ffffff; color: #1c1917;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif; font-weight: 400; font-size: 0.95rem; line-height: 1;
  white-space: nowrap; cursor: pointer;
}
.box-btn:hover { border-color: currentColor; }
.box-btn-main { background: #1c1917; border-color: #1c1917; color: #ffffff; }
.box-btn-sm { min-height: 32px; padding: 0 0.7rem; font-size: 0.85rem; }
[data-theme="dark"] .box-btn { background: #1d1d1d; border-color: #3a3a3a; color: #f2f2f2; }
[data-theme="dark"] .box-btn-main { background: #f2f2f2; border-color: #f2f2f2; color: #141414; }
.box-btn:focus-visible, .box-x:focus-visible, .box-pick:focus-visible, .box-move select:focus-visible { outline: 1px solid #9ca3af; outline-offset: 2px; }
.box-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 1.1rem; }
.box-name[hidden] { display: none; }
.box-name label { width: 100%; font-size: 0.9rem; color: var(--muted); }
.box-name input {
  flex: 1 1 10rem; min-width: 0; min-height: 40px; padding: 0 0.85rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit;
}
.box-err { width: 100%; margin: 0; color: #b42318; font-size: 0.88rem; }
.box-err:empty { display: none; }
[data-theme="dark"] .box-err { color: #ff8a7a; }
.box-empty { margin: 0.5rem 0 1.5rem; }
.box-empty p { margin: 0 0 0.75rem; color: var(--muted); }
.box-sec { margin: 0 0 1.6rem; }
.box-sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.65rem; min-height: 40px; }
.box-sec-head h2 { margin: 0; flex: 1 1 auto; min-width: 0; font-family: "Space Grotesk", sans-serif; font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.box-sec-tools { display: flex; gap: 0.35rem; }
.box-rename { margin: 0; width: 100%; }
.box-tile-link { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; }
.box-tile:hover { border-color: var(--ink); }
.box-art-blank { display: grid; place-items: center; width: 100%; height: 100%; font-family: "Space Grotesk", sans-serif; font-size: 2rem; font-weight: 600; color: var(--muted); }
.home-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.box-x {
  position: absolute; top: 0.95rem; right: 0.95rem; z-index: 2;
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid #e5e5e5; border-radius: 999px; background: #ffffff; color: #1c1917; cursor: pointer;
}
.box-x:hover { border-color: currentColor; }
[data-theme="dark"] .box-x { background: #1d1d1d; border-color: #3a3a3a; color: #f2f2f2; }
.box-move { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 0.3rem 0; font-size: 0.82rem; color: var(--muted); min-width: 0; }
.box-move span { flex: none; }
.box-move select {
  flex: 1 1 auto; min-width: 0; min-height: 34px; padding: 0 0.5rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 0.85rem; cursor: pointer;
}
:root[data-cards="small"] .box-x { top: 0.5rem; right: 0.5rem; width: 28px; height: 28px; }
:root[data-cards="small"] .box-move { margin: 0.3rem 0 0; }
:root[data-cards="small"] .box-move span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:root[data-cards="small"] .box-move select { min-height: 30px; font-size: 0.75rem; padding: 0 0.25rem; }
@media (max-width: 700px) {
  :root:not([data-cards="large"]) .box-x { top: 0.6rem; right: 0.6rem; width: 30px; height: 30px; }
  :root:not([data-cards="small"]):not([data-cards="large"]) .box-move span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  :root:not([data-cards="small"]):not([data-cards="large"]) .box-move { margin: 0.4rem 0.2rem 0; }
}
.box-picker {
  width: min(640px, calc(100% - 1.5rem)); max-height: min(80vh, 720px);
  padding: 1rem; border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); color: var(--ink);
}
.box-picker::backdrop { background: rgba(20, 18, 16, 0.45); }
.box-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.75rem; }
.box-picker-head h2 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 1.25rem; }
.box-picker .box-note { margin: 0 0 0.5rem; }
.box-picker-list { display: grid; gap: 0.45rem; }
.box-pick {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: 56px; padding: 0.4rem 0.6rem 0.4rem 0.4rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink);
  text-align: left; font: inherit; cursor: pointer;
}
.box-pick:hover { border-color: var(--ink); }
.box-pick-art { flex: none; width: 88px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: transparent; }
.box-pick-art svg, .box-pick-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.box-pick-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 0.1rem; }
.box-pick-text strong { font-family: "Space Grotesk", sans-serif; font-weight: 600; overflow-wrap: anywhere; }
.box-pick-text em { font-style: normal; font-size: 0.82rem; color: var(--muted); }
.box-pick-state { flex: none; min-height: 32px; display: inline-flex; align-items: center; padding: 0 0.75rem; border: 1px solid #e5e5e5; border-radius: 999px; font-size: 0.85rem; }
.box-pick.is-added .box-pick-state { background: #1c1917; border-color: #1c1917; color: #fff; }
[data-theme="dark"] .box-pick-state { border-color: #3a3a3a; }
[data-theme="dark"] .box-pick.is-added .box-pick-state { background: #f2f2f2; border-color: #f2f2f2; color: #141414; }
#box-saved .home-grid { margin: 0; }

/* transparent art panels 2026-10-14: card pictures take the card colour in light and dark.
   SVG background rects are fill="none"; game screenshots have transparent padding. */
.home-art,
.box-pick-art,
.home-art img,
.box-pick-art img { background: transparent; }
/* keep card art readable on transparent panels: dark ink turns light in dark mode,
   white shapes get a thin #d4d4d4 outline in light mode. */
[data-theme="dark"] .home-art [fill="#1c1917"],
[data-theme="dark"] .box-pick-art [fill="#1c1917"] { fill: #f2f2f2; }
[data-theme="dark"] .home-art [stroke="#1c1917"],
[data-theme="dark"] .box-pick-art [stroke="#1c1917"] { stroke: #f2f2f2; }
:root:not([data-theme="dark"]) .home-art :is(rect, circle, path, ellipse, polygon)[fill="#fff"]:not([stroke]),
:root:not([data-theme="dark"]) .box-pick-art :is(rect, circle, path, ellipse, polygon)[fill="#fff"]:not([stroke]) { stroke: #d4d4d4; stroke-width: 1.5; }
:root:not([data-theme="dark"]) .home-art [stroke="#fff"],
:root:not([data-theme="dark"]) .box-pick-art [stroke="#fff"] { stroke: #d4d4d4; }

/* no cream 2026-10-14: art uses neutral greys in light; dark keeps its old warm art tones */
[data-theme="dark"] .home-art [fill="#9ca3af"], [data-theme="dark"] .box-pick-art [fill="#9ca3af"] { fill: #a3a3a3; }
[data-theme="dark"] .home-art [stroke="#e5e5e5"], [data-theme="dark"] .box-pick-art [stroke="#e5e5e5"] { stroke: #d4d4d4; }
[data-theme="dark"] .home-art [fill="#e5e5e5"], [data-theme="dark"] .box-pick-art [fill="#e5e5e5"] { fill: #d4d4d4; }
[data-theme="dark"] .home-art [fill="#d4d4d4"], [data-theme="dark"] .box-pick-art [fill="#d4d4d4"] { fill: #bdbdbd; }
[data-theme="dark"] .home-art [stroke="#d4d4d4"], [data-theme="dark"] .box-pick-art [stroke="#d4d4d4"] { stroke: #bdbdbd; }
[data-theme="dark"] .home-art stop[stop-color="#9ca3af"], [data-theme="dark"] .box-pick-art stop[stop-color="#9ca3af"] { stop-color: #a3a3a3; }

/* header px caps 2026-10-14: at phone widths the top bar stays one row and does not grow with root/iOS text size. */
@media (max-width: 600px) {
  html body .game-bar-inner, html body .home-bar-inner { flex-wrap: nowrap !important; gap: 6px !important; min-width: 0 !important; }
  html body .game-brand, html body .home-brand { gap: 6px !important; min-width: 0 !important; flex: 0 1 auto !important; overflow: hidden !important; }
  html body .game-brand img, html body .home-brand img { height: 28px !important; width: auto !important; max-width: 52px !important; flex: 0 0 auto !important; }
  html body .game-brand span, html body .home-brand h1 { font-size: 13px !important; line-height: 16px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; min-width: 0 !important; letter-spacing: 0 !important; }
  html body .game-actions, html body .home-actions { gap: 4px !important; flex: 0 0 auto !important; flex-wrap: nowrap !important; margin-left: auto !important; }
  html body .game-actions > a, html body .game-actions > button, html body .home-actions > a, html body .home-actions > button {
    font-size: 12px !important; line-height: 1 !important; height: 32px !important; min-height: 32px !important; padding: 0 9px !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important; white-space: nowrap !important; flex: 0 0 auto !important; }
  html body .home-actions > .card-size-btn, html body .game-actions > .card-size-btn { width: 32px !important; min-width: 32px !important; padding: 0 !important; }
  html body .home-actions svg, html body .game-actions svg { width: 16px !important; height: 16px !important; }
}
@media (max-width: 360px) {
  html body .game-brand span, html body .home-brand h1 { font-size: 12px !important; }
  html body .game-brand img, html body .home-brand img { height: 24px !important; }
}
/* control rows may wrap (large text) */
html body:not(.war) .indent-row { flex-wrap: wrap !important; }

/* ===== Easy read (site-wide, 2026-10-15): same as the homepage trial ===== */
html[data-theme="easy"] {
  color-scheme: light;
  --bg: #e8eef4; --card: #f4f7fa; --ink: #2b2f36; --muted: #2b2f36; --line: #c9d3dd; --soft: #f4f7fa; --gold: #2b2f36;
  --bar: rgba(232, 238, 244, 0.96);
}
html[data-theme="easy"] body { background: #e8eef4; color: #2b2f36; }
html[data-theme="easy"] body,
html[data-theme="easy"] body :is(p, a, span, li, h1, h2, h3, h4, small, strong, b, button, input, textarea, label, dd, dt) {
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
  font-style: normal !important;
  letter-spacing: 0.03em;
  word-spacing: 0.1em;
}
html[data-theme="easy"] body :is(p, li, dd, .home-tagline) { line-height: 1.7; }
html[data-theme="easy"] body :is(em, i, cite, address) { font-style: normal !important; }
html[data-theme="easy"] :is(.home-card, .home-tile, .home-grid > a, .home-actions button, .home-actions a) {
  background: #f4f7fa; border-color: #c9d3dd; color: #2b2f36;
}
html[data-theme="easy"] .home-actions :is(a, button) { white-space: nowrap; }

/* 2026-10-15 collapsible categories on the Games and Utilities menus */
.home-genre-title .genre-tog { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; cursor: pointer; font: inherit; color: inherit; }
.home-genre-title .genre-tog:focus-visible { outline: 1px solid #9ca3af; outline-offset: 2px; border-radius: 8px; }
.home-genre-title .genre-chev { flex: 0 0 auto; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 8px 4px 0; transition: transform .15s ease; }
.home-genre.is-collapsed .genre-chev { transform: rotate(-45deg); margin-bottom: 0; }
.home-genre.is-collapsed .home-grid { display: none !important; }
.is-searching .home-genre.is-collapsed .home-grid { display: grid !important; }
.is-searching .home-genre.is-collapsed .genre-chev { transform: rotate(45deg); }

/* LOCKED PALETTE: blue only on text-input focus (and slider) */
.home-search input:focus-visible, form :is(input:not([type="radio"]):not([type="checkbox"]), textarea, select):focus { outline: 1px solid #2f6bff !important; outline-offset: 1px; }
.home-copy a, .home-lead a, .home-note a { text-decoration: underline; }
/* SHARE SHEET: centred, clamped to viewport, neutral in every theme */
dialog.home-share-card{position:fixed !important;inset:0 !important;margin:auto !important;height:fit-content;max-height:calc(100dvh - 2rem);width:min(420px,calc(100vw - 2rem)) !important;box-sizing:border-box;overflow:auto;background:#ffffff !important;color:#1c1917 !important;border:1px solid #e5e5e5 !important;box-shadow:0 12px 32px rgba(0,0,0,.28)}
dialog.home-share-card p{color:#525252 !important}
dialog.home-share-card button{color:#1c1917 !important;border-color:#d4d4d4 !important;background:#f5f5f5 !important}
html[data-theme="dark"] dialog.home-share-card{background:#1d1d1d !important;color:#f2f2f2 !important;border-color:#3a3a3a !important}
html[data-theme="dark"] dialog.home-share-card p{color:#a3a3a3 !important}
html[data-theme="dark"] dialog.home-share-card button{color:#f2f2f2 !important;border-color:#3a3a3a !important;background:#262626 !important}
html[data-easy="1"] dialog.home-share-card{background:#f4f7fa !important;color:#2b2f36 !important;border-color:#c9d3dd !important}
html[data-easy="1"] dialog.home-share-card p{color:#4a5260 !important}
html[data-easy="1"] dialog.home-share-card button{color:#2b2f36 !important;border-color:#c9d3dd !important;background:#e8eef4 !important}
dialog.home-share-card img{filter:none}
/* SHARE SHEET: centre on the full viewport width, independent of scrollbar gutter */
dialog.home-share-card{inset:auto !important;top:50% !important;left:50vw !important;right:auto !important;bottom:auto !important;transform:translate(-50%,-50%) !important;margin:0 !important;width:min(420px,calc(100vw - 2rem)) !important}
