.jjam-theme {
  --bg: #0a1122;
  --bg-soft: #101c32;
  --bg-card: #131f38;
  --line: #344a71;
  --text: #f1f5ff;
  --text-dim: #b8c9e5;
  --section-color: #83d9ff;
  color-scheme: dark;
  background-color: var(--bg);
  color: var(--text);
}
.section-shop { --section-color: #ffd28b; }
.section-tools { --section-color: #85e3c1; }
.section-games { --section-color: #c6afff; }
.section-guide { --section-color: #9bbdff; }
.section-saju { --section-color: #f1aecf; }
.jjam-theme header.site {
  background: #0e192e;
  border-bottom-color: #325688;
}
.jjam-theme .logo { color: var(--text); }
.jjam-theme .nav nav a { color: var(--text-dim); }
.jjam-theme .nav nav a:is(.on, [aria-current]) {
  color: var(--section-color);
  background: color-mix(in srgb, var(--section-color) 14%, #0e192e);
  box-shadow: inset 0 -2px var(--section-color);
}
.jjam-theme :focus-visible {
  outline: 2px solid var(--section-color);
  outline-offset: 3px;
}
.jjam-theme:not(.section-home) main h1 {
  margin-block: 12px 10px;
  padding-inline-start: 12px;
  border-inline-start: 4px solid var(--section-color);
  color: var(--text);
}
.jjam-theme main .lead { color: var(--text-dim); }
.jjam-theme .grid .card {
  --tool-accent: var(--section-color);
  background: linear-gradient(155deg, color-mix(in srgb, var(--tool-accent) 12%, var(--bg-card)), var(--bg-soft));
  border-color: color-mix(in srgb, var(--tool-accent) 64%, var(--line));
  border-radius: 12px;
  box-shadow: 0 0 14px color-mix(in srgb, var(--tool-accent) 12%, transparent);
}
.jjam-theme .grid .card:hover { border-color: var(--tool-accent); }
.jjam-theme .grid .card[data-cat="brand"] { --tool-accent: #83d9ff; }
.jjam-theme .grid .card[data-cat="life"] { --tool-accent: #85e3c1; }
.jjam-theme .grid .card[data-cat="accent"] { --tool-accent: #ffd28b; }
.jjam-theme .grid .card[data-cat="fun"] { --tool-accent: #c6afff; }
.jjam-theme .grid .card h3 { color: var(--text); }
.jjam-theme .grid .card p { color: var(--text-dim); }
.guide-library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 10px;
}
.guide-library .chip {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 10px 14px;
  white-space: normal;
  border-radius: 9px;
  border-color: color-mix(in srgb, var(--section-color) 64%, var(--line));
  background: var(--bg-card);
  color: var(--text);
}
.jjam-theme .catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.jjam-theme #all:has(.item[hidden]) {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.jjam-theme .catalog-grid .ith { aspect-ratio: 16 / 10; }
.jjam-theme .catalog-grid .itx { padding: 9px 10px; }
.jjam-theme .catalog-grid .itx b { font-size: .9rem; line-height: 1.35; }
.jjam-theme .catalog-grid .itx em { font-size: .79rem; line-height: 1.45; }
.jjam-theme .catalog-grid .iar { padding: 9px 10px; }
@media (max-width: 1100px) {
  .jjam-theme .catalog-grid, .jjam-theme #all:has(.item[hidden]) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  .jjam-theme .catalog-grid, .jjam-theme #all:has(.item[hidden]) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .jjam-theme .catalog-grid, .jjam-theme #all:has(.item[hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
