/*
File: /escwasd/demo/assets/new-gameboy.css
Purpose: Single-source Game Boy stylesheet for 2:8 shell migration demo (home as base).
Policy: Keep only styles used by the current demo shell, grouped for future AI traceability.
*/

/* ===== About Page ===== */
.about-section-title,
.section-title {
  font-family: Rajdhani, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #8ea85c;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 2px solid #8ea85c;
  padding-bottom: 0.35rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}
.about-section-title:first-of-type,
.section-title:first-of-type {
  margin-top: 0;
}
.about-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--home-text-main);
  margin-bottom: 0.5rem;
}
.about-signature {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--home-text-muted);
}

html[data-theme="dark"] .about-section-title,
html[data-theme="dark"] .section-title {
  color: #94b54f;
  border-bottom-color: #94b54f;
}

/* ===== Changelog Card ===== */
.changelog-card {
  background: var(--home-card-bg);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #8ea85c;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 1rem;
}
.changelog-card:last-child { margin-bottom: 0; }
.changelog-date {
  font-family: Rajdhani, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #8ea85c;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.changelog-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--home-text-main);
}

html[data-theme="dark"] .changelog-card {
  border-left-color: #94b54f;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
html[data-theme="dark"] .changelog-date {
  color: #94b54f;
}

/* Common */
:root {
  --layout-sidebar-expanded: 380px;
  --layout-sidebar-collapsed: 200px;
  --layout-sidebar-mobile: min(82vw, 320px);
  --layout-sidebar-collapse-breakpoint: 900px;
  --layout-mobile-breakpoint: 768px;
  --layout-content-standard: 1200px;
  --layout-content-wide: 1520px;
  --layout-content-narrow: 880px;
  --layout-content-padding: 2rem;
  --layout-content-padding-mobile: 1rem;
  --home-bg-page: #f0ede6;
  --home-text-main: #2d2d2d;
  --home-text-muted: #666;
  --home-card-bg: #ffffff;
  --home-card-soft-bg: #fafaf8;
  --home-sidebar-bg: rgb(230, 227, 222);
  --home-sidebar-border: rgb(149, 146, 146);
  --home-menu-primary-text: #2b2f36;
  --home-menu-primary-hover-bg: rgba(0, 0, 0, 0.05);
  --home-menu-primary-active-bg: rgba(142, 168, 92, 0.15);
  --home-menu-secondary-text: #5a5a5a;
  --home-menu-secondary-hover-bg: rgba(0, 0, 0, 0.05);
  --home-menu-secondary-hover-text: #2b2f36;
  --home-menu-secondary-active-bg: linear-gradient(145deg, rgba(142, 168, 92, 0.18), rgba(90, 125, 46, 0.12));
  --home-menu-secondary-active-border: rgba(90, 125, 46, 0.45);
  --home-menu-meta-text: #999;
  --home-divider: #e0ddd5;
  --home-lang-divider: #e0ddd5;
  --home-lang-btn-text: #7e7b77;
  --home-lang-btn-hover-text: #4a4845;
  --home-lang-btn-border: rgba(149, 146, 146, 0.18);
  --home-lang-btn-hover-border: rgba(149, 146, 146, 0.35);
  --home-lang-btn-active-bg: rgba(142, 168, 92, 0.1);
  --home-lang-btn-active-border: rgba(142, 168, 92, 0.35);
  --home-lang-btn-active-hover-bg: rgba(142, 168, 92, 0.16);
  --home-lang-btn-active-hover-border: rgba(142, 168, 92, 0.5);
  --home-lang-btn-active-text: #4a6a28;
  --home-lang-btn-active-hover-text: #3d5920;
  --home-lang-summary-text: #68727c;
  --home-lang-summary-hover-text: #55606b;
}

html[data-theme="dark"] {
  --home-bg-page: #1f2228;
  --home-text-main: #e6e9ee;
  --home-text-muted: #acb4c0;
  --home-card-bg: #2a2f37;
  --home-card-soft-bg: #232831;
  --home-sidebar-bg: #2a2d33;
  --home-sidebar-border: #4d5561;
  --home-menu-primary-text: #d2d8e2;
  --home-menu-primary-hover-bg: rgba(255, 255, 255, 0.06);
  --home-menu-primary-active-bg: rgba(148, 181, 79, 0.22);
  --home-menu-secondary-text: #b8c0cc;
  --home-menu-secondary-hover-bg: rgba(255, 255, 255, 0.07);
  --home-menu-secondary-hover-text: #edf2f8;
  --home-menu-secondary-active-bg: linear-gradient(145deg, rgba(148, 181, 79, 0.3), rgba(90, 125, 46, 0.2));
  --home-menu-secondary-active-border: rgba(148, 181, 79, 0.55);
  --home-menu-meta-text: #8e98a8;
  --home-divider: #3f4651;
  --home-lang-divider: #3f4651;
  --home-lang-btn-text: #c2c8d2;
  --home-lang-btn-hover-text: #e0e4ea;
  --home-lang-btn-border: rgba(194, 200, 210, 0.28);
  --home-lang-btn-hover-border: rgba(208, 214, 223, 0.5);
  --home-lang-btn-active-bg: rgba(148, 181, 79, 0.2);
  --home-lang-btn-active-border: rgba(148, 181, 79, 0.45);
  --home-lang-btn-active-hover-bg: rgba(148, 181, 79, 0.27);
  --home-lang-btn-active-hover-border: rgba(167, 204, 92, 0.6);
  --home-lang-btn-active-text: #d5f08e;
  --home-lang-btn-active-hover-text: #e1f8a3;
  --home-lang-summary-text: #bcc4cf;
  --home-lang-summary-hover-text: #e2e8f0;
  --home-surface-1: #252a31;
  --home-surface-2: #2d333b;
  --home-surface-3: #353d47;
  --home-border-soft: rgba(161, 173, 190, 0.28);
  --home-border-strong: rgba(175, 189, 208, 0.45);
  --home-shadow-ambient: rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --home-bg-page: #1f2228;
    --home-text-main: #e6e9ee;
    --home-text-muted: #acb4c0;
    --home-card-bg: #2a2f37;
    --home-card-soft-bg: #232831;
    --home-sidebar-bg: #2a2d33;
    --home-sidebar-border: #4d5561;
    --home-menu-primary-text: #d2d8e2;
    --home-menu-primary-hover-bg: rgba(255, 255, 255, 0.06);
    --home-menu-primary-active-bg: rgba(148, 181, 79, 0.22);
    --home-menu-secondary-text: #b8c0cc;
    --home-menu-secondary-hover-bg: rgba(255, 255, 255, 0.07);
    --home-menu-secondary-hover-text: #edf2f8;
    --home-menu-secondary-active-bg: linear-gradient(145deg, rgba(148, 181, 79, 0.3), rgba(90, 125, 46, 0.2));
    --home-menu-secondary-active-border: rgba(148, 181, 79, 0.55);
    --home-menu-meta-text: #8e98a8;
    --home-divider: #3f4651;
    --home-lang-divider: #3f4651;
    --home-lang-btn-text: #c2c8d2;
    --home-lang-btn-hover-text: #e0e4ea;
    --home-lang-btn-border: rgba(194, 200, 210, 0.28);
    --home-lang-btn-hover-border: rgba(208, 214, 223, 0.5);
    --home-lang-btn-active-bg: rgba(148, 181, 79, 0.2);
    --home-lang-btn-active-border: rgba(148, 181, 79, 0.45);
    --home-lang-btn-active-hover-bg: rgba(148, 181, 79, 0.27);
    --home-lang-btn-active-hover-border: rgba(167, 204, 92, 0.6);
    --home-lang-btn-active-text: #d5f08e;
    --home-lang-btn-active-hover-text: #e1f8a3;
    --home-lang-summary-text: #bcc4cf;
    --home-lang-summary-hover-text: #e2e8f0;
    --home-surface-1: #252a31;
    --home-surface-2: #2d333b;
    --home-surface-3: #353d47;
    --home-border-soft: rgba(161, 173, 190, 0.28);
    --home-border-strong: rgba(175, 189, 208, 0.45);
    --home-shadow-ambient: rgba(0, 0, 0, 0.35);
  }
}

/* Tailwind preflight resets (equivalent to what old game-boy.css provided) */
*, ::before, ::after { box-sizing: border-box; }
html { font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; line-height: 1.5; -webkit-text-size-adjust: 100%; -moz-tab-size: 4; tab-size: 4; }
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; background: var(--home-bg-page); color: var(--home-text-main); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
button, [role="button"] { cursor: pointer; }
button, input, optgroup, select, textarea { font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; letter-spacing: inherit; color: inherit; margin: 0; padding: 0; }
button, select { text-transform: none; }

/* Prevent first-paint blue focus/tap flash before init finishes */
html.ui-preload *,
html.ui-preload *::before,
html.ui-preload *::after {
  transition: none !important;
  animation: none !important;
}

html.ui-preload a,
html.ui-preload button,
html.ui-preload input,
html.ui-preload select,
html.ui-preload textarea,
html.ui-preload summary,
html.ui-preload [tabindex] {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.panel-raised {
  position: relative;
  border-radius: 0.375rem;
  border: 1px solid var(--home-sidebar-border);
  background: var(--home-sidebar-bg);
  padding: 1.25rem;
  box-shadow:
    8px 8px 16px rgba(78, 76, 80, 0.18),
    -6px -6px 11px rgba(250, 248, 245, 0.78),
    inset 1px 1px 0 rgba(249, 247, 244, 0.82),
    inset -1px -1px 0 rgba(149, 146, 146, 0.2);
}

html[data-theme="dark"] .panel-raised {
  box-shadow:
    8px 8px 16px rgba(0, 0, 0, 0.26),
    inset 1px 1px 0 rgba(255, 255, 255, 0.08),
    inset -1px -1px 0 rgba(0, 0, 0, 0.35);
  border-color: var(--home-border-soft);
  background: var(--home-surface-2);
}

/* ===== Project Buttons ===== */
.core-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 36px;
  padding: 0.5rem 1rem;
  border: 1px solid rgb(149, 146, 146);
  border-radius: 0.375rem;
  font-family: Rajdhani, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2b2f36;
  background: linear-gradient(145deg, #ebe8e3, #d6d2cc);
  box-shadow:
    5px 5px 10px rgba(93, 90, 94, 0.2),
    -3px -3px 6px rgba(249, 247, 243, 0.78),
    inset 1px 1px 0 rgba(250, 248, 246, 0.7),
    inset -1px -1px 0 rgba(149, 146, 146, 0.35);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
  user-select: none;
}

.core-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.core-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow:
    inset 3px 3px 6px rgba(111, 108, 111, 0.24),
    inset -2px -2px 5px rgba(248, 246, 242, 0.6);
}

.core-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.core-btn-green {
  border-color: rgba(148, 181, 79, 0.7);
  background: linear-gradient(145deg, #bed26c, #8ba153);
  color: #1f232a;
  box-shadow:
    5px 5px 10px rgba(70, 90, 40, 0.25),
    -3px -3px 6px rgba(220, 240, 180, 0.6),
    inset 1px 1px 0 rgba(230, 245, 190, 0.55),
    inset -1px -1px 0 rgba(100, 130, 60, 0.35);
}

.core-btn-purple {
  border-color: rgba(195, 66, 141, 0.6);
  background: linear-gradient(145deg, #d85ba1, #ab2f79);
  color: #2b2f36;
  box-shadow:
    6px 6px 11px rgba(86, 36, 66, 0.28),
    -3px -3px 6px rgba(248, 216, 232, 0.52),
    inset 1px 1px 0 rgba(245, 185, 220, 0.5),
    inset -1px -1px 0 rgba(143, 36, 95, 0.4);
}

.core-btn-gray {
  border-color: rgba(149, 146, 146, 0.75);
  background: linear-gradient(145deg, #ebe8e3, #d6d2cc);
  color: #2b2f36;
}

.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(149, 146, 146);
  border-radius: 0.125rem;
  font-family: Rajdhani, sans-serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #40498d;
  background: rgba(247, 245, 241, 0.34);
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.outline-btn-green {
  border-color: rgba(148, 181, 79, 0.7);
  color: #708d3d;
  background: rgba(190, 210, 108, 0.18);
}

.outline-btn-green:hover:not(:disabled) {
  border-color: #708d3d;
  background: rgba(168, 196, 93, 0.25);
}

html[data-theme="dark"] .core-btn {
  border-color: var(--home-border-soft);
  color: #dbe3ed;
  background: linear-gradient(145deg, var(--home-surface-3), var(--home-surface-2));
  box-shadow:
    5px 5px 10px rgba(0, 0, 0, 0.26),
    inset 1px 1px 0 rgba(255, 255, 255, 0.06),
    inset -1px -1px 0 rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .core-btn-green {
  border-color: rgba(148, 181, 79, 0.72);
  color: #101410;
  background: linear-gradient(145deg, #a9c76a, #708d3d);
}

html[data-theme="dark"] .core-btn-purple {
  border-color: rgba(217, 79, 159, 0.7);
  color: #fff8fb;
  background: linear-gradient(145deg, #d94f9f, #8f245f);
}

html[data-theme="dark"] .core-btn-gray {
  border-color: var(--home-border-soft);
  color: #dbe3ed;
  background: linear-gradient(145deg, var(--home-surface-3), var(--home-surface-2));
}

html[data-theme="dark"] .outline-btn {
  border-color: var(--home-border-soft);
  color: #c8d0b0;
  background: rgba(255, 255, 255, 0.04);
}

/* ===== Project Keyboard ===== */
.project-keyboard-wrapper {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  width: 100%;
}

.project-keyboard-canvas {
  position: relative;
  flex: 0 0 auto;
  display: block;
  background: #f0f0f0;
  border: 2px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform-origin: center top;
  transition: transform 0.2s ease;
}

.project-keyboard-keycap {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f5f5f5 0%, #e0e0e0 100%);
  border: 1px solid #ccc;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  user-select: none;
  transition: all 0.1s ease;
}

.project-keyboard-keycap:hover {
  background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%);
}

.project-keyboard-keycap.is-pressed {
  background: linear-gradient(180deg, #94b54f 0%, #708d3d 100%);
  color: #fff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(1px);
}

.project-keyboard-keycap.is-ever:not(.is-pressed) {
  background: linear-gradient(180deg, #e8f0d0 0%, #d0e8a0 100%);
  border-color: #a0c060;
  color: #4a6a2a;
}

html[data-theme="dark"] .project-keyboard-canvas {
  background: #202420;
  border-color: #3a3e3a;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .project-keyboard-keycap {
  color: #c8d0b0;
  background: linear-gradient(180deg, #2f362f 0%, #252b25 100%);
  border-color: #444a44;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .project-keyboard-keycap:hover {
  background: linear-gradient(180deg, #353a35 0%, #252925 100%);
  border-color: #4a4e4a;
  color: #aaba7a;
}

html[data-theme="dark"] .project-keyboard-keycap.is-pressed {
  color: #fff;
  background: linear-gradient(180deg, #94b54f 0%, #708d3d 100%);
  border-color: #a9c76a;
}

html[data-theme="dark"] .project-keyboard-keycap.is-ever:not(.is-pressed) {
  background: linear-gradient(180deg, #2a3a1a 0%, #1e2e10 100%);
  border-color: #3a4e2a;
  color: #7aaa4a;
}


.main-layout {
  display: flex;
  min-height: 100vh;
  background: var(--home-bg-page);
  overflow: visible;
}

.content-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-width: 0;
  min-height: 100vh;
}

.theme-toggle-btn {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 2200;
  width: 54px;
  height: 54px;
  padding: 0;
  color: #333;
  font: 700 24px/1 Rajdhani, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Ensure keycap reuse does not override fixed top-right placement */
.theme-toggle-btn.keycap-clean {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 2200;
}

.theme-toggle-btn .theme-icon {
  position: relative;
  z-index: 2;
  line-height: 1;
  display: inline-block;
  font-size: 24px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.45));
}

html[data-theme="dark"] .theme-toggle-btn {
  color: #f5f7fb;
}

html[data-theme="dark"] .theme-toggle-btn .theme-icon {
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45));
}

.hamburger-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 2000;
  width: 44px;
  height: 44px;
  background: var(--home-sidebar-bg);
  border: 2px solid var(--home-sidebar-border);
  border-radius: 8px;
  cursor: pointer;
  padding: 10px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: var(--home-menu-primary-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-active .hamburger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-active .hamburger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Sidebar */
.sidebar {
  flex: 0 0 var(--layout-sidebar-expanded);
  width: var(--layout-sidebar-expanded);
  min-width: var(--layout-sidebar-expanded);
  max-width: var(--layout-sidebar-expanded);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: var(--home-sidebar-bg);
  overflow: visible;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-bottom: none;
  border-right: 1px solid var(--home-sidebar-border);
  box-shadow:
    8px 8px 16px rgba(78, 76, 80, 0.18),
    inset 1px 1px 0 rgba(249, 247, 244, 0.82),
    inset -1px -1px 0 rgba(149, 146, 146, 0.2);
  padding: 0;
  position: relative;
  z-index: 50;
}

html[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, var(--home-surface-2), var(--home-surface-1));
  border-right-color: var(--home-border-soft);
  box-shadow:
    8px 8px 18px var(--home-shadow-ambient),
    inset 1px 1px 0 rgba(255, 255, 255, 0.06),
    inset -1px -1px 0 rgba(0, 0, 0, 0.28);
}

.sidebar-collapsed,
html.sidebar-prefers-collapsed .sidebar-initial-collapsible {
  flex-basis: var(--layout-sidebar-collapsed);
  width: var(--layout-sidebar-collapsed);
  min-width: var(--layout-sidebar-collapsed);
  max-width: var(--layout-sidebar-collapsed);
}

.logo-area {
  display: flex;
  justify-content: center;
  width: 100%;
  border-bottom: 2px solid var(--home-lang-divider);
  text-decoration: none;
  padding: 0;
  position: relative;
}

.logo-devices {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 16px 14px 20px;
  border-bottom: 2px solid var(--home-lang-divider);
  background: transparent;
}

.logo-mouse-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 20px;
}

.logo-wave {
  width: 108px;
  height: 53px;
  flex-shrink: 0;
  overflow: visible;
  transform: translateX(-30px);
  margin-top: -8px;
}

.logo-kb {
  width: 220px;
  height: 92px;
  margin-left: 8px;
  padding: 7px;
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 2.5px;
  background: linear-gradient(180deg, #d9d5cc, #cbc6bb);
  border-radius: 5px;
  border: 1.5px solid #b0aca2;
  box-shadow:
    2px 3px 6px rgba(0, 0, 0, 0.1),
    -1px -1px 3px rgba(255, 255, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.logo-kb span {
  border-radius: 2px;
  background: linear-gradient(165deg, #e6e3db, #d6d2c8);
  box-shadow:
    1px 1px 2px rgba(0, 0, 0, 0.12),
    -0.5px -0.5px 1px rgba(255, 255, 255, 0.4),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.22);
}

.logo-kb span:nth-child(1),
.logo-kb span:nth-child(14),
.logo-kb span:nth-child(24),
.logo-kb span:nth-child(25),
.logo-kb span:nth-child(26) {
  background: linear-gradient(165deg, #a8ce76, #7fa542);
  box-shadow:
    1px 1px 2px rgba(0, 0, 0, 0.12),
    -0.5px -0.5px 1px rgba(180, 215, 130, 0.5),
    inset 0 0.5px 0 rgba(215, 245, 170, 0.35),
    0 0 4px rgba(148, 181, 79, 0.3);
}

.logo-mouse {
  position: relative;
  width: 64px;
  height: 96px;
  flex-shrink: 0;
}

.logo-m-body {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 68px;
  background: linear-gradient(to bottom, #e8e4db, #d5d1c5);
  border-radius: 0 0 24px 24px;
  border: 1.5px solid rgba(158, 155, 150, 0.65);
  border-top: none;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.08), -1px -1px 2px rgba(255, 255, 255, 0.4);
}

.logo-m-btns {
  position: absolute;
  top: 0;
  width: calc(100% + 6px);
  left: -3px;
  height: 26px;
  display: flex;
  gap: 4px;
  z-index: 1;
}

.logo-m-btn {
  flex: 1;
  height: 100%;
  background: linear-gradient(180deg, #c4c0b8, #b5b1a8);
  border: 1px solid rgba(158, 155, 150, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.logo-m-btn.left,
.logo-m-btn.right { border-radius: 6px 6px 4px 4px; }

.gb-frame {
  position: relative;
  width: 100%;
  padding: 16px 28px 6px 28px;
  background: linear-gradient(180deg, #4a4a4a 0%, #3d3d3d 15%, #353535 50%, #2d2d2d 85%, #252525 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.15),
    inset 0 -2px 3px rgba(0, 0, 0, 0.4),
    inset 2px 0 3px rgba(0, 0, 0, 0.3),
    inset -2px 0 3px rgba(0, 0, 0, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.3);
  border-radius: 2px 2px 24px 2px;
}

.screen-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 25% 40%, #89a153, #6a9e3a);
  border: 3px solid #2a2a2a;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.5),
    inset 0 0 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.screen-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(38, 38, 38, 0.15) 0, rgba(38, 38, 38, 0.15) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(55, 94, 46, 0.2) 0, rgba(55, 94, 46, 0.2) 1px, transparent 1px, transparent 4px);
  pointer-events: none;
  z-index: 1;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0px, rgba(0, 0, 0, 0.12) 1px, transparent 1px, transparent 2px);
  pointer-events: none;
  z-index: 2;
  animation: scanlineMove 10s linear infinite;
  opacity: 0.25;
}

@keyframes scanlineMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(8px); }
}

.text-container {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  overflow: hidden;
}

.esc-corner {
  position: absolute;
  top: 16px;
  left: 16px;
  opacity: 1;
}

.esc-line {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-family: Rajdhani, sans-serif;
  font-size: clamp(1rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: #1a3a0a;
  background: rgba(65, 95, 35, 0.25);
  border: 2px solid rgba(180, 212, 94, 0.75);
  border-radius: 3px;
  box-shadow:
    0 0 8px rgba(148, 181, 79, 0.5),
    0 0 12px rgba(148, 181, 79, 0.3),
    inset 0 0 4px rgba(169, 224, 122, 0.15);
  text-shadow: 0 0 3px #a9e07a, 1px 1px 0 #4c702c;
}

.wasd-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 0;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 8px;
  transform: translateY(0);
  opacity: 1;
  transition: transform 2s linear, opacity 0.5s ease;
}

.wasd-row { display: flex; gap: 6px; }

.wasd-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  font-family: Rajdhani, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #1a3a0a;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 181, 79, 0.5);
  border-radius: 6px;
  text-shadow: 0 0 3px #a9e07a, 1px 1px 0 #4c702c;
  box-shadow: inset 0 0 8px rgba(169, 224, 122, 0.2), 0 2px 3px rgba(0, 0, 0, 0.2);
}

.wasd-grid.animating .wasd-key { animation: wasdDropGlow 2s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

@keyframes wasdDropGlow {
  0% { box-shadow: inset 0 0 8px rgba(169, 224, 122, 0.2), 0 2px 3px rgba(0, 0, 0, 0.2), 0 -60px 20px rgba(76, 112, 44, 0.95), 0 -100px 30px rgba(76, 112, 44, 0.75), 0 -140px 40px rgba(76, 112, 44, 0.55); }
  50% { box-shadow: inset 0 0 8px rgba(169, 224, 122, 0.2), 0 2px 3px rgba(0, 0, 0, 0.2), 0 -20px 10px rgba(76, 112, 44, 0.7), 0 -35px 15px rgba(76, 112, 44, 0.5); }
  100% { box-shadow: inset 0 0 8px rgba(169, 224, 122, 0.2), 0 2px 3px rgba(0, 0, 0, 0.2); }
}

.power-indicator {
  position: absolute;
  top: calc(50% - 20px);
  left: 8px;
  transform: translateY(-50%);
  z-index: 10;
}

.power-led {
  display: block;
  width: 7px;
  height: 7px;
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #66ff66, #00cc00);
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow:
    0 0 4px rgba(0, 204, 0, 0.9),
    0 0 8px rgba(12, 0, 12, 0.04),
    inset 0 -1px 2px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  animation: powerPulse 2s ease-in-out infinite;
}

@keyframes powerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.sidebar-toggle-buttons {
  position: absolute;
  right: -35px;
  top: 400px;
  z-index: 1000;
}

.toggle-btn {
  width: 36px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--home-sidebar-bg);
  border: none;
  border-right: 1px solid var(--home-sidebar-border);
  border-top: 1px solid var(--home-sidebar-border);
  border-bottom: 1px solid var(--home-sidebar-border);
  border-left: 2px solid var(--home-sidebar-bg);
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
}

.toggle-icon {
  font-size: 0.75rem;
  color: #94b54f;
  user-select: none;
}

.menu-container { flex: 1; padding: 0.8rem 0 1rem; }
.cat-group { position: relative; margin-bottom: 0.55rem; width: 100%; padding: 0 1rem; box-sizing: border-box; }
.cat-group-single { margin-bottom: 0.45rem; }
.cat-toggle { display: none; }

.cat-strip {
  width: 100% !important;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 54px;
  padding: 9px 12px;
  cursor: pointer;
  border-radius: 0 0 8px 0;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background:
    linear-gradient(145deg, #ebe8e3, #d6d2cc),
    repeating-linear-gradient(90deg, rgba(82, 87, 99, 0.03) 0, rgba(82, 87, 99, 0.03) 1px, transparent 1px, transparent 18px);
  box-shadow:
    4px 4px 8px rgba(82, 87, 99, 0.12),
    -2px -2px 4px rgba(248, 246, 242, 0.45),
    inset 1px 1px 0 rgba(248, 246, 242, 0.5),
    inset -1px -1px 0 rgba(110, 107, 110, 0.14);
}

html[data-theme="dark"] .cat-strip {
  border-color: var(--home-border-soft);
  background:
    linear-gradient(145deg, var(--home-surface-3), var(--home-surface-2)),
    repeating-linear-gradient(90deg, rgba(184, 194, 208, 0.05) 0, rgba(184, 194, 208, 0.05) 1px, transparent 1px, transparent 18px);
  box-shadow:
    5px 5px 10px var(--home-shadow-ambient),
    inset 1px 1px 0 rgba(255, 255, 255, 0.06),
    inset -1px -1px 0 rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .cat-strip::after { border-color: rgba(198, 208, 223, 0.2); }

.cat-strip::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(82, 87, 99, 0.16);
  border-radius: 2px;
  pointer-events: none;
}

.cat-strip-link { text-decoration: none; }
.cat-strip-link-active { background: var(--home-menu-primary-active-bg); border-color: rgba(112, 141, 61, 0.38); box-shadow: 4px 4px 8px rgba(82,87,99,0.16), -2px -2px 4px rgba(248,246,242,0.45), inset 2px 2px 3px rgba(148,181,79,0.08); }
.cat-strip:hover { background: var(--home-menu-primary-hover-bg); border-color: rgba(112, 141, 61, 0.22); }
.cat-toggle:checked + .cat-strip {
  background: var(--home-menu-primary-active-bg);
  border-color: rgba(112, 141, 61, 0.38);
  transform: translateX(2px);
  box-shadow:
    4px 4px 8px rgba(82, 87, 99, 0.16),
    -2px -2px 4px rgba(248, 246, 242, 0.45),
    inset 1px 1px 0 rgba(248, 246, 242, 0.36),
    inset -1px -1px 0 rgba(110, 107, 110, 0.16);
}

html[data-theme="dark"] .cat-toggle:checked + .cat-strip {
  border-color: var(--home-border-strong);
  background: linear-gradient(145deg, rgba(74, 93, 56, 0.68), rgba(56, 74, 42, 0.62));
  box-shadow:
    5px 5px 10px var(--home-shadow-ambient),
    inset 1px 1px 0 rgba(183, 209, 148, 0.18),
    inset -1px -1px 0 rgba(0, 0, 0, 0.34);
}
.cat-toggle:checked + .cat-strip .cat-module {
  border-color: rgba(55, 94, 46, 0.28);
  background:
    linear-gradient(145deg, rgba(220, 226, 206, 0.96), rgba(183, 193, 166, 0.92)),
    repeating-linear-gradient(0deg, rgba(55, 94, 46, 0.06) 0, rgba(55, 94, 46, 0.06) 1px, transparent 1px, transparent 5px);
}

.cat-lamp {
  position: relative;
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 999px;
  background: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 0 4px 1px rgba(165, 15, 15, 0.85), 0 0 2px 1px rgba(165, 15, 15, 0.75);
  transition: box-shadow 0.18s ease;
}

.cat-toggle:checked + .cat-strip .cat-lamp { box-shadow: 0 0 4px 1px rgba(123, 181, 66, 0.9), 0 0 2px 1px rgba(123, 181, 66, 0.75); }
.cat-title { flex: 1 1 0%; font-family: Rajdhani, sans-serif; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--home-menu-primary-text); }

.cat-module {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: 74px;
  height: 32px;
  flex: 0 0 74px;
  border-radius: 2px;
  border: 1px solid rgb(149, 146, 146);
  background:
    linear-gradient(145deg, #c3c1bc, #afaca7),
    repeating-linear-gradient(0deg, rgba(82, 87, 99, 0.06) 0, rgba(82, 87, 99, 0.06) 1px, transparent 1px, transparent 5px);
  box-shadow: inset 1px 1px 0 rgba(248, 246, 242, 0.18), inset -1px -1px 0 rgba(110, 107, 110, 0.11);
  overflow: hidden;
}

.module-trophy,
.module-guides,
.cat-module.module-mouse,
.cat-module.module-pad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 32px;
}

.cat-module.module-mouse { position: relative; }

.cat-icon-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.e-badge { position: relative; width: 24px; height: 18px; }
.e-core { position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; transform: translate(-50%, -50%) rotate(45deg); border: 1px solid rgba(90, 125, 46, 0.7); background: linear-gradient(145deg, rgba(167, 204, 92, 0.55), rgba(112, 141, 61, 0.5)); box-shadow: 0 0 4px rgba(148, 181, 79, 0.35); }
.e-wing { position: absolute; top: 50%; width: 9px; height: 2px; margin-top: -1px; background: rgba(112, 141, 61, 0.72); }
.e-wing-l { left: 0; }
.e-wing-r { right: 0; }

.g-stack { position: absolute; width: 22px; height: 18px; }
.g-stack span { position: absolute; left: 50%; width: 13px; height: 10px; transform: translateX(-50%); border: 1px solid rgba(82, 92, 168, 0.6); background: linear-gradient(160deg, rgba(130, 142, 212, 0.28), rgba(82, 92, 168, 0.14)); border-radius: 1px; }
.g-stack span:nth-child(1) { top: 0; }
.g-stack span:nth-child(2) { top: 3px; }
.g-stack span:nth-child(3) { top: 6px; }

.icon-kb { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; width: 40px; height: 22px; padding: 3px; box-sizing: border-box; border: 1px solid rgba(43, 47, 54, 0.45); border-radius: 3px; background: linear-gradient(180deg, rgba(248, 246, 242, 0.65), rgba(188, 185, 180, 0.4)); box-shadow: inset 1px 1px 0 rgba(248, 246, 242, 0.45); }
.icon-kb span { background: rgba(82, 87, 99, 0.5); border-radius: 1px; }
.m-body { width: 18px; height: 22px; border-radius: 8px; border: 1px solid rgba(82, 87, 99, 0.28); background: #d3d1cc; position: relative; z-index: 2; }
.m-wheel { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); width: 3px; height: 5px; background: #6e6d6f; border-radius: 2px; z-index: 3; }
.m-track { position: absolute; z-index: 1; right: 10px; width: 18px; height: 2px; background: rgba(82, 87, 99, 0.45); border-radius: 2px; }
.m-track.t1 { top: 9px; }
.m-track.t2 { top: 14px; }

.cat-icon-slot .module-pad { display: flex; align-items: center; gap: 10px; width: auto; height: auto; flex: 0 0 auto; justify-content: center; }
.m-dpad { position: relative; width: 14px; height: 14px; }
.m-dpad::before,
.m-dpad::after { content: ""; position: absolute; background: #525763; border-radius: 1px; }
.m-dpad::before { left: 5px; top: 0; width: 4px; height: 14px; }
.m-dpad::after { left: 0; top: 5px; width: 14px; height: 4px; }
.m-buttons { display: flex; gap: 4px; }
.m-buttons span { width: 6px; height: 6px; background: #c3428d; border-radius: 50%; box-shadow: inset 0 1px 0 rgba(246, 196, 224, 0.45); }

.cat-sub-b {
  width: calc(100% - 26px);
  margin-left: 14px;
  margin-top: 0.5rem;
  border: 1px solid rgba(148, 181, 79, 0.35);
  border-radius: 0.125rem;
  padding: 0.25rem 0.65rem 0.35rem !important;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-3px);
  background:
    linear-gradient(180deg, rgba(123, 181, 66, 0.12), rgba(55, 94, 46, 0.06)),
    repeating-linear-gradient(
      0deg,
      rgba(17, 25, 123, 0.04) 0,
      rgba(17, 25, 123, 0.04) 1px,
      transparent 1px,
      transparent 7px
    );
  box-shadow:
    inset 3px 3px 7px rgba(38, 38, 38, 0.1),
    inset -2px -2px 5px rgba(236, 240, 228, 0.4);
  transition: max-height 560ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 420ms ease, transform 420ms ease;
}

html[data-theme="dark"] .cat-sub-b {
  border-color: rgba(148, 181, 79, 0.38);
  background:
    linear-gradient(180deg, rgba(74, 93, 56, 0.24), rgba(36, 49, 34, 0.2)),
    repeating-linear-gradient(0deg, rgba(184, 194, 208, 0.04) 0, rgba(184, 194, 208, 0.04) 1px, transparent 1px, transparent 7px);
  box-shadow:
    inset 3px 3px 7px rgba(0, 0, 0, 0.32),
    inset -1px -1px 4px rgba(170, 194, 134, 0.09);
}

.cat-sub-b > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

.cat-toggle:checked + .cat-strip + .cat-sub-b {
  max-height: 520px;
  opacity: 1;
  transform: translateY(0);
  padding: 0.25rem 0.65rem 0.35rem !important;
}

.cat-sub-b-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  margin-left: 0;
  font-size: 14px;
  color: rgb(55, 94, 46);
  text-decoration: none;
  border-radius: 0.125rem;
  border: 1px solid rgba(82, 87, 99, 0.22);
  overflow: hidden;
  background: linear-gradient(145deg, #ebe8e3, #d6d2cc), repeating-linear-gradient(0deg, rgba(17, 25, 123, 0.04) 0, rgba(17, 25, 123, 0.04) 1px, transparent 1px, transparent 6px);
  box-shadow:
    inset 2px 2px 4px rgba(110, 107, 110, 0.16),
    inset -1px -1px 2px rgba(248, 246, 242, 0.5);
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
  position: relative;
  font-family: Rajdhani, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

html[data-theme="dark"] .cat-sub-b-item {
  border-color: rgba(173, 184, 198, 0.32);
  color: #d2d8e2;
  background:
    linear-gradient(145deg, #333b45, #2b323b),
    repeating-linear-gradient(0deg, rgba(184, 194, 208, 0.04) 0, rgba(184, 194, 208, 0.04) 1px, transparent 1px, transparent 6px);
  box-shadow:
    inset 2px 2px 4px rgba(0, 0, 0, 0.24),
    inset -1px -1px 2px rgba(219, 227, 236, 0.08);
}

.cat-sub-b-item::before,
.cat-sub-b-item-active::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 2px;
  border: 1px solid rgba(38, 38, 38, 0.28);
  background: linear-gradient(145deg, rgba(232, 230, 224, 0.85), rgba(201, 198, 191, 0.88));
  box-shadow: inset 1px 1px 0 rgba(248, 246, 242, 0.48);
}

.cat-sub-b-item::after,
.cat-sub-b-item-active::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 18px;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(82, 87, 99, 0.2), transparent);
}

.cat-sub-b-item:hover {
  border-color: rgba(55, 94, 46, 0.34);
  color: rgb(38, 38, 38);
  background:
    linear-gradient(145deg, rgba(238, 235, 229, 1), rgba(213, 209, 202, 0.94)),
    repeating-linear-gradient(
      0deg,
      rgba(17, 25, 123, 0.04) 0,
      rgba(17, 25, 123, 0.04) 1px,
      transparent 1px,
      transparent 6px
    );
  transform: translateX(5px);
}

html[data-theme="dark"] .cat-sub-b-item:hover {
  border-color: rgba(167, 204, 92, 0.46);
  color: #eef4ff;
  background:
    linear-gradient(145deg, #3a4551, #303946),
    repeating-linear-gradient(0deg, rgba(184, 194, 208, 0.04) 0, rgba(184, 194, 208, 0.04) 1px, transparent 1px, transparent 6px);
}
.cat-sub-b-item-active {
  border: 1px solid rgba(55, 94, 46, 0.4);
  color: rgb(55, 94, 46);
  background:
    linear-gradient(145deg, rgba(214, 228, 164, 0.8), rgba(175, 197, 110, 0.55)),
    repeating-linear-gradient(
      0deg,
      rgba(17, 25, 123, 0.04) 0,
      rgba(17, 25, 123, 0.04) 1px,
      transparent 1px,
      transparent 6px
    );
  box-shadow:
    2px 2px 5px rgba(82, 87, 99, 0.12),
    inset 1px 1px 0 rgba(234, 243, 200, 0.55);
  font-weight: 600;
}

html[data-theme="dark"] .cat-sub-b-item-active {
  border-color: rgba(167, 204, 92, 0.55);
  color: #dff2b0;
  background:
    linear-gradient(145deg, rgba(104, 129, 73, 0.62), rgba(75, 95, 53, 0.56)),
    repeating-linear-gradient(0deg, rgba(184, 194, 208, 0.04) 0, rgba(184, 194, 208, 0.04) 1px, transparent 1px, transparent 6px);
  box-shadow:
    2px 2px 5px rgba(0, 0, 0, 0.3),
    inset 1px 1px 0 rgba(216, 236, 170, 0.28);
}

.cat-sub-b-item-active::before {
  border-color: rgba(55, 94, 46, 0.45);
  background: linear-gradient(145deg, rgba(214, 228, 164, 0.95), rgba(175, 197, 110, 0.78));
  box-shadow: inset 1px 1px 0 rgba(234, 243, 200, 0.6);
}

.cat-sub-b-item-active::after {
  background: linear-gradient(90deg, rgba(55, 94, 46, 0.38), transparent);
}

.cat-sub-b-item-active .cat-sub-b-meta {
  color: rgba(55, 94, 46, 0.72);
}
.cat-sub-b-meta {
  margin-left: auto;
  font-family: IBM Plex Mono, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(82, 87, 99, 0.46);
}
.cat-sub-b-placeholder { padding: 0.75rem 1.5rem; color: var(--home-menu-meta-text); font-size: 0.85rem; font-style: italic; text-align: center; }

.menu-divider { height: 1px; background: var(--home-divider); margin: 1rem 1.5rem; }
.static-link { padding: 0.75rem 1.5rem; display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--home-menu-secondary-text); font-size: 0.95rem; transition: all 0.2s; border-radius: 0.25rem; }
.static-link:hover { background: var(--home-menu-secondary-hover-bg); color: var(--home-menu-secondary-hover-text); }

.language-section { padding: 14px 16px 12px 16px; border-bottom: 2px solid var(--home-lang-divider); }
.lang-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lang-btn-subtle { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 7px 6px; min-height: 36px; width: 100%; border: 1px solid var(--home-lang-btn-border); background: transparent; color: var(--home-lang-btn-text); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: all 0.18s ease; font-family: Rajdhani, sans-serif; border-radius: 0.25rem; }
.lang-btn-subtle:hover { background: rgba(0, 0, 0, 0.03); border-color: var(--home-lang-btn-hover-border); color: var(--home-lang-btn-hover-text); }
.lang-btn-subtle.lang-btn-active { background: var(--home-lang-btn-active-bg); border-color: var(--home-lang-btn-active-border); color: var(--home-lang-btn-active-text); font-weight: 700; }
.lang-btn-subtle.lang-btn-active:hover { background: var(--home-lang-btn-active-hover-bg); border-color: var(--home-lang-btn-active-hover-border); color: var(--home-lang-btn-active-hover-text); }
.lang-flag { font-size: 14px; line-height: 1; flex-shrink: 0; }
.lang-summary { list-style: none; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 0; width: 100%; padding: 3px 0 2px; border: none; border-radius: 0; background: transparent; font-family: Rajdhani, sans-serif; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--home-lang-summary-text); transition: all 0.15s ease; user-select: none; }
.lang-summary:hover { background: transparent; border: none; color: var(--home-lang-summary-hover-text); }
.lang-summary::-webkit-details-marker { display: none; }
.lang-summary-main { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: auto; min-width: 0; max-width: 100%; flex: 0 1 auto; white-space: nowrap; text-transform: uppercase; letter-spacing: 0; }
.lang-summary-icon { font-size: 11px; line-height: 1; }
.lang-summary-main::after { display: none; }
.lang-summary-plus { font-weight: 700; font-size: 10px; line-height: 1; opacity: 0.72; }
.lang-summary-word { font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: 0.07em; }
.lang-summary-chevron { display: inline-block; font-weight: 700; font-size: 10px; line-height: 1; opacity: 0.84; transition: transform 0.18s ease; }
.lang-details[open] .lang-summary-chevron { transform: rotate(180deg); }
.lang-details { border: none; margin-top: 12px; padding: 12px 0 0; text-align: center; }
.lang-grid-extra { margin-top: 14px; }
.lang-summary-badge { font-size: 9px; font-weight: 700; padding: 1px 5px; margin-left: 2px; background: rgba(142, 168, 92, 0.15); color: #5a782e; border-radius: 3px; letter-spacing: 0; }

.lang-section-narrow { display: none; }
.lang-grid-narrow-row { display: flex; gap: 8px; align-items: stretch; }
.lang-grid-narrow-row > .lang-btn-subtle { flex: 1; min-width: 0; }
.lang-btn-more { flex: 0 0 auto !important; min-width: 42px !important; width: auto !important; padding: 7px 8px !important; font-weight: 700; background: rgba(0,0,0,0.04); }
.lang-btn-more span { font-size: 10px; letter-spacing: 0; }
.lang-details-narrow { margin-top: 0 !important; flex: 0 0 auto; }
.lang-details-narrow .lang-grid-extra { margin-top: 8px; grid-template-columns: repeat(3, 1fr); }

/* Narrow layout for hamburger menu (≤768px): current language + English + A/文 */
@media (max-width: 768px) {
  .lang-section-wide { display: none; }
  .lang-section-narrow { display: block; }
  .lang-details-narrow { display: flex !important; }
  .lang-details-narrow .lang-grid-extra { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .lang-details-narrow[open] .lang-grid-extra {
    display: grid;
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 12px;
    z-index: 1600;
    background: var(--home-surface-1, #2a2f37);
    border: 1px solid var(--home-lang-btn-hover-border);
    border-radius: 8px;
    padding: 12px;
    margin: 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.35);
  }
}

.sidebar-footer { padding: 1rem 1.5rem; text-align: center; border-top: 1px solid var(--home-divider); color: var(--home-menu-meta-text); font-size: 0.75rem; }

.sidebar-collapsed .sidebar-content { padding: 0; }
.sidebar-collapsed .gb-frame { padding: 12px 18px 8px; border-radius: 2px 2px 18px 2px; }
.sidebar-collapsed .screen-card { border-width: 2px; }
.sidebar-collapsed .esc-corner { top: 8px; left: 8px; }
.sidebar-collapsed .esc-line { padding: 0.14rem 0.48rem; font-size: 0.82rem; border-width: 1px; letter-spacing: 0.06em; color: #f7f5ee; text-shadow: 0 0 3px rgba(255, 255, 255, 0.62); }
.sidebar-collapsed .text-container { padding: 8px 8px 5px; }
.sidebar-collapsed .wasd-grid { gap: 3px; padding-bottom: 0; transform: none !important; opacity: 1 !important; transition: none; }
.sidebar-collapsed .wasd-row { gap: 3px; }
.sidebar-collapsed .wasd-key { width: 30px; height: 30px; font-size: 0.94rem; border-radius: 3px; color: #f7f5ee; text-shadow: 0 0 3px rgba(255, 255, 255, 0.62); }
.sidebar-collapsed .power-indicator { display: none; }
.sidebar-collapsed .logo-devices { justify-content: center; padding: 8px 12px 12px; }
.sidebar-collapsed .logo-kb { width: 176px; height: 72px; margin-left: 0; padding: 5px; gap: 2px; }
.sidebar-collapsed .logo-mouse-group { display: none; }
.sidebar-collapsed .language-section { padding: 10px 12px; }
.sidebar-collapsed .lang-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sidebar-collapsed .lang-btn-subtle { padding: 6px 4px; min-height: 32px; gap: 3px; font-size: 9.5px; border-radius: 0.2rem; }
.sidebar-collapsed .lang-summary { font-size: 10px; padding: 2px 0; }
.sidebar-collapsed .lang-details { margin-top: 8px; padding: 8px 0 0; }
.sidebar-collapsed .lang-flag { display: none; }
.sidebar-collapsed .menu-container { padding: 0.75rem 0; }
.sidebar-collapsed .cat-group { padding: 0 2px 0 3px; margin-bottom: 0.5rem; }
.sidebar-collapsed .cat-strip { min-height: 54px; padding: 8px 10px; gap: 8px; align-items: center; flex-direction: row; justify-content: space-between; border-radius: 0 0 5px 0; border: 1px solid rgba(110, 109, 111, 0.34); box-shadow: none; outline: none; }
.sidebar-collapsed .cat-strip:hover,
.sidebar-collapsed .cat-toggle:checked + .cat-strip { border-color: rgba(110, 109, 111, 0.34); box-shadow: none; outline: none; }
.sidebar-collapsed .cat-strip::after,
.sidebar-collapsed .cat-lamp { display: none; content: none; }
.sidebar-collapsed .cat-title { display: inline-flex; align-items: center; min-width: 0; width: auto; flex: 1 1 auto; font-size: 1rem; line-height: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-collapsed .cat-module,
.sidebar-collapsed .module-trophy,
.sidebar-collapsed .module-guides,
.sidebar-collapsed .cat-module.module-mouse,
.sidebar-collapsed .cat-module.module-pad { width: 52px; height: 32px; flex: 0 0 52px; margin-left: auto; border: none; background: transparent; box-shadow: none; }
.sidebar-collapsed .cat-icon-slot { width: 100%; height: 100%; justify-content: flex-end; }
.sidebar-collapsed .icon-kb,
.sidebar-collapsed .e-badge,
.sidebar-collapsed .g-stack,
.sidebar-collapsed .m-body,
.sidebar-collapsed .cat-icon-slot .module-pad { transform: scale(0.92); }
.sidebar-collapsed .cat-sub-b { display: block; width: auto; margin-left: 0; padding: 0 !important; max-height: 0; overflow: hidden; background: none !important; border: none !important; box-shadow: none !important; }
.sidebar-collapsed .cat-toggle:checked + .cat-strip + .cat-sub-b { max-height: 420px; padding: 0 !important; }
.sidebar-collapsed .cat-sub-b-item { display: block; padding: 0.18rem 0 0.18rem 0.65rem !important; margin-left: 0; font-size: 0.84rem; line-height: 1.2; text-align: left; color: var(--home-menu-secondary-text) !important; background: none !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; outline: none; font-weight: 400 !important; transition: color 0.15s ease; }
.sidebar-collapsed .cat-sub-b-item:hover { color: var(--home-menu-secondary-hover-text) !important; background: none !important; }
.sidebar-collapsed .cat-sub-b-item-active { color: var(--home-menu-secondary-text) !important; background: none !important; border: none !important; box-shadow: none !important; font-weight: 400 !important; }
.sidebar-collapsed .cat-sub-b-item::before,
.sidebar-collapsed .cat-sub-b-item::after,
.sidebar-collapsed .cat-sub-b-item-active::before,
.sidebar-collapsed .cat-sub-b-item-active::after { display: none; content: none; }
.sidebar-collapsed .cat-sub-b-meta { display: none; }
.sidebar-collapsed .cat-sub-b-placeholder { padding: 0.18rem 0 0.18rem 0.65rem; font-size: 0.82rem; color: var(--home-menu-secondary-text); background: none; border: none; box-shadow: none; text-align: left; }
.sidebar-collapsed .menu-divider,
.sidebar-collapsed .static-link .link-icon,
.sidebar-collapsed .sidebar-footer { display: none; }
.sidebar-collapsed .static-link { padding: 8px 6px; justify-content: center; }
.sidebar-collapsed .static-link span:not(.link-icon) { display: block; font-size: 0.84rem; line-height: 1; }

/* Header */
.page-header {
  padding: 1rem 2rem;
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.breadcrumb {
  display: flex;
  gap: 3px;
  align-items: center;
}

.breadcrumb .key {
  background-color: #f0f0f0;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  box-shadow:
    rgba(0, 0, 0, 0.4) 0px 2px 4px,
    rgba(0, 0, 0, 0.3) 0px 7px 13px -3px,
    rgba(0, 0, 0, 0.2) 0px -1px 0px inset;
  min-width: 35px;
  text-align: center;
  padding: 8px 10px;
  font-size: 11px;
  color: #333;
  cursor: pointer;
  transition: box-shadow 0.2s, background-color 0.2s, transform 0.1s;
  text-decoration: none;
}

.breadcrumb .key:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
  box-shadow:
    rgba(0, 0, 0, 0.4) 0px 2px 5px,
    rgba(0, 0, 0, 0.3) 0px 7px 16px -3px,
    rgba(0, 0, 0, 0.2) 0px -1px 0px inset;
}

.breadcrumb .key:active {
  transform: translateY(1px);
  box-shadow:
    rgba(0, 0, 0, 0.4) 0px 2px 3px,
    rgba(0, 0, 0, 0.3) 0px 5px 10px -3px,
    rgba(0, 0, 0, 0.2) 0px -1px 0px inset;
}

.breadcrumb .separator {
  color: #888;
  font-size: 12px;
  padding: 0 4px;
}

html[data-theme="dark"] .breadcrumb .key {
  background-color: #343942;
  border-color: rgba(255, 255, 255, 0.14);
  color: #e6e9ee;
  box-shadow:
    rgba(0, 0, 0, 0.55) 0px 2px 4px,
    rgba(0, 0, 0, 0.4) 0px 7px 13px -3px,
    rgba(255, 255, 255, 0.08) 0px -1px 0px inset;
}

html[data-theme="dark"] .breadcrumb .key:hover { background-color: #3e4550; }
html[data-theme="dark"] .breadcrumb .separator { color: #8e98a8; }
/* Footer */
.page-footer {
  padding: 0;
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.keyboard-footer {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px;
  padding-bottom: 19px;
  border-radius: 0;
  background-color: rgb(49, 57, 117);
  background-image: linear-gradient(to bottom, rgb(49, 57, 117), rgb(40, 47, 100));
  box-shadow: none;
  width: 100%;
  margin: 0;
  user-select: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
  padding-left: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.keyboard-footer .key {
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  box-shadow:
    rgba(0, 0, 0, 0.3) 0px 2px 4px,
    rgba(0, 0, 0, 0.2) 0px 7px 13px -3px,
    rgba(255, 255, 255, 0.1) 0px -1px 0px inset;
  min-width: 35px;
  width: fit-content;
  text-align: center;
  padding: 8px 10px;
  font-size: 10px;
  color: rgb(49, 57, 117);
  cursor: pointer;
  transition: box-shadow 0.2s, background-color 0.2s, transform 0.1s;
  text-decoration: none;
  display: inline-block;
}

.keyboard-footer .key:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow:
    rgba(0, 0, 0, 0.3) 0px 2px 5px,
    rgba(0, 0, 0, 0.2) 0px 7px 16px -3px,
    rgba(255, 255, 255, 0.15) 0px -1px 0px inset;
}

.keyboard-footer .key:active {
  transform: translateY(1px);
  box-shadow:
    rgba(0, 0, 0, 0.3) 0px 2px 3px,
    rgba(0, 0, 0, 0.2) 0px 5px 10px -3px,
    rgba(255, 255, 255, 0.1) 0px -1px 0px inset;
}

.keyboard-footer .key.coming-soon {
  opacity: 0.5;
  cursor: not-allowed;
  font-style: italic;
}

/* ═══ Cookie Consent Banner (global, footer-style navy+white) ═══ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: rgb(49, 57, 117);
  background-image: linear-gradient(to bottom, rgb(49, 57, 117), rgb(40, 47, 100));
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.35);
  padding: 0;
  animation: cookieSlideUp 0.35s ease-out;
}

@keyframes cookieSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.cookie-banner-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
  min-width: 240px;
}

.cookie-privacy-link {
  color: var(--screen-green, #94b54f);
  text-decoration: underline;
  font-weight: 600;
}

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.cookie-btn:active {
  transform: scale(0.96);
}

.cookie-btn-accept {
  background: var(--screen-green, #94b54f);
  color: #fff;
}

.cookie-btn-accept:hover {
  background: var(--screen-dark, #7a9a3f);
}

.cookie-btn-reject {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

[data-theme="dark"] .cookie-banner {
  background-color: rgb(30, 35, 70);
  background-image: linear-gradient(to bottom, rgb(30, 35, 70), rgb(25, 30, 60));
}

[data-theme="dark"] .cookie-banner-text {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .cookie-btn-reject {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 1rem;
    gap: 0.85rem;
  }
  .cookie-banner-text {
    font-size: 0.8rem;
  }
  .cookie-banner-actions {
    justify-content: center;
  }
}
}

.space-key {
  flex: 5;
  padding: 8px;
  min-width: 100px;
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.privacy-link {
  color: var(--screen-green, #94b54f);
  text-decoration: none;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.privacy-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--screen-light, #b5d46e);
}

.footer-copyright {
  display: flex;
  justify-content: center;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 769px) and (max-width: 899px) {
  :root {
    --layout-content-padding: 1.5rem;
  }

  .sidebar,
  html.sidebar-prefers-expanded .sidebar-initial-collapsible {
    flex-basis: var(--layout-sidebar-collapsed);
    width: var(--layout-sidebar-collapsed);
    min-width: var(--layout-sidebar-collapsed);
    max-width: var(--layout-sidebar-collapsed);
  }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .keyboard-footer { padding: 12px; }
  .keyboard-footer .key {
    min-width: 28px;
    padding: 6px 8px;
    font-size: 9px;
  }
  .space-key {
    min-width: 60px;
    font-size: 9px;
    padding: 6px 16px;
  }
  .theme-toggle-btn { top: 14px; right: 14px; width: 48px; height: 48px; font-size: 21px; }
  .page-header { padding: 1rem; }
  .content { padding: var(--layout-content-padding-mobile); }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    flex-basis: var(--layout-sidebar-mobile);
    width: var(--layout-sidebar-mobile);
    min-width: var(--layout-sidebar-mobile);
    max-width: var(--layout-sidebar-mobile);
    height: 100vh;
    z-index: 1500;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-content.mobile-hidden { opacity: 0; pointer-events: none; }
  .hamburger-btn { display: flex; }
  .sidebar-toggle-buttons { display: none; }
}

/* Content */
.content {
  flex: 1;
  padding: var(--layout-content-padding);
  min-width: 0;
}

.home-view {
  width: min(100%, var(--layout-content-standard));
  margin: 0 auto;
}

.home-view .page-header {
  margin-bottom: 3rem;
  text-align: center;
}

.home-view .page-header h1 {
  font-size: 2.5rem;
  color: var(--home-text-main);
  margin-bottom: 0.5rem;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
}



.keycap-clean {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f0f0f0, #e8e8e8);
  border: 1px solid rgba(0, 0, 0, 0.15);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.keycap-clean .letter {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #333;
  font-size: 16px;
}

.keycap-clean::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  bottom: 14px;
  right: 12px;
  background: linear-gradient(90deg, #e0e0e0, #fafafa);
  border-radius: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.5333333333);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2666666667);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.wasd-layout {
  display: grid;
  grid-template-columns: 80px 80px 80px;
  grid-template-rows: 80px 80px;
  gap: 8px;
  justify-content: center;
}

.wasd-layout .wasd-w { grid-column: 2; grid-row: 1; }
.wasd-layout .wasd-a { grid-column: 1; grid-row: 2; }
.wasd-layout .wasd-s { grid-column: 2; grid-row: 2; }
.wasd-layout .wasd-d { grid-column: 3; grid-row: 2; }

.subtitle {
  font-size: 1.3rem;
  color: #525ca8;
  margin-bottom: 1rem;
  font-family: Rajdhani, sans-serif;
  font-weight: 600;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  line-height: 1.2;
}

.subtitle .keycap-clean,
.subtitle .wasd-layout { flex-shrink: 0; }

.description {
  font-size: 1.1rem;
  color: var(--home-text-muted);
  margin: 0 auto;
  line-height: 1.6;
}

.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.category-section {
  background: var(--home-card-bg);
  padding: 2rem;
  border-radius: 8px;
}

html[data-theme="dark"] .category-section {
  background: linear-gradient(180deg, var(--home-surface-2), var(--home-surface-1));
  border: 1px solid var(--home-border-soft);
}

.category-title {
  font-size: 1.5rem;
  color: var(--home-text-main);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: Rajdhani, sans-serif;
  font-weight: 600;
}

.category-icon { font-size: 1.8rem; }

.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--home-card-soft-bg);
  border-radius: 8px;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow:
    12px 12px 24px rgba(78, 76, 80, 0.2),
    -8px -8px 16px rgba(250, 248, 245, 0.9);
}

html[data-theme="dark"] .tool-card:hover {
  box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.28), -8px -8px 16px rgba(255, 255, 255, 0.03);
}

.tool-name {
  font-size: 1.25rem;
  color: var(--home-text-main);
  font-weight: 600;
  font-family: Rajdhani, sans-serif;
  margin: 0;
}

.tool-description {
  font-size: 0.95rem;
  color: var(--home-text-muted);
  line-height: 1.5;
  flex: 1;
  margin: 0;
}

.tool-link-text {
  font-size: 0.9rem;
  color: #8ea85c;
  font-weight: 600;
  margin-top: auto;
}


/* === A11y: skip-link + focus === */
.skip-link{position:absolute;top:-40px;left:8px;background:var(--gb-green,#198754);color:#fff;padding:8px 16px;border-radius:0 0 6px 0;z-index:1000;text-decoration:none;font-weight:500}
.skip-link:focus{top:0}
:focus-visible{outline:3px solid var(--gb-green,#198754);outline-offset:2px}

/* === Privacy Page === */
.privacy-card{padding:2rem 2.5rem}
.privacy-section{margin-bottom:2rem}
.privacy-section h2{font-family:'Rajdhani',sans-serif;font-size:1.25rem;font-weight:600;color:var(--screen-green,#94b54f);margin:0 0 0.75rem;text-transform:uppercase;letter-spacing:0.04em}
.privacy-section p,.privacy-section li{font-size:0.92rem;line-height:1.7;color:var(--home-text-muted,#444);margin:0 0 0.5rem}
.privacy-section ul{padding-left:1.25rem;margin:0.5rem 0 1rem}
.privacy-section li{margin-bottom:0.35rem}
.cookie-types,.third-party-info{display:flex;gap:1rem;margin:0.75rem 0 1.25rem;flex-wrap:wrap}
.cms-card{flex:1;min-width:220px;background:var(--fog-100,#f0ede8);border:1px solid var(--fog-200,#e0ddd5);border-radius:8px;padding:1rem 1.25rem}
.cms-card-green{border-color:var(--screen-green,#94b54f)}
.cookie-type-title,.service-title{font-family:'Rajdhani',sans-serif;font-size:1.05rem;font-weight:600;margin:0 0 0.4rem;color:var(--home-text-primary,#1a1a1a)}
.cookie-type-desc,.service-desc{font-size:0.85rem;line-height:1.55;color:var(--home-text-muted,#6b7280);margin:0}
.last-updated{font-size:0.82rem;color:var(--home-text-muted,#9ca3af);text-align:right;margin-top:2rem;font-style:italic}
[data-theme="dark"] .cms-card{background:#1a1e18;border-color:#3a3e3a}
[data-theme="dark"] .privacy-section h2{color:var(--screen-green,#94b54f)}
[data-theme="dark"] .privacy-section p,[data-theme="dark"] .privacy-section li{color:#b0b0a0}
@media(max-width:600px){.privacy-card{padding:1.25rem 1rem}.cookie-types,.third-party-info{flex-direction:column}}
