/* Theme backgrounds applied via body[data-theme] */
body[data-theme] {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body[data-theme="default"] {
  background-image: url("../img/themes/default.svg");
}
body[data-theme="ocean"] {
  background-image: url("../img/themes/ocean.svg");
  --paper: #e6f3f8;
  --accent: #0e6f8f;
  --accent-2: #0f7a62;
}
body[data-theme="forest"] {
  background-image: url("../img/themes/forest.svg");
  --paper: #e8f0e6;
  --accent: #2f6b45;
  --accent-2: #1f4d32;
  color: #102016;
}
body.theme-dark {
  --ink: #e8eef5;
  --ink-soft: #c5d0dc;
  --paper: #151c27;
  --paper-2: #1c2533;
  --line: #2c3a4d;
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --dk-nav: rgba(15, 20, 30, 0.88);
  --dk-glass: rgba(22, 30, 42, 0.92);
  --dk-card: #13202b;
  --dk-line: #26394a;
  --dk-muted: #9fb0c0;
  --dk-soft: #c6d3e0;
  --dk-glow: rgba(45, 212, 191, 0.12);
  color: var(--ink);
}
body[data-theme="midnight"] { background-image: url("../img/themes/midnight.svg"); }
body.theme-dark .arena-nav {
  background: var(--dk-nav);
  border-bottom-color: var(--dk-line);
}
body.theme-dark .nav-links a { color: var(--dk-soft); }
body.theme-dark .nav-links a.active,
body.theme-dark .nav-links a:hover { background: var(--dk-glow); color: var(--accent); }
body.theme-dark .nav-links .dropdown-menu .dropdown-item { color: var(--dk-soft); }
body.theme-dark .nav-links .dropdown-menu .dropdown-item:hover { background: var(--dk-glow); color: var(--accent); }
body.theme-dark .nav-links .pl-menu .pl-row .pl-item:hover { background: transparent; color: inherit; }
body.theme-dark .pl-row:not(.is-current):hover { background: var(--dk-glow); }
body.theme-dark .pl-divider { background: var(--dk-line); }
body.theme-dark .acct-who small,
body.theme-dark .arena-footer { color: var(--dk-muted); }
body.theme-dark .acct-btn { background: var(--dk-card); border-color: var(--dk-line); color: var(--dk-soft); }
body.theme-dark .acct-btn:hover,
body.theme-dark .acct-btn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
body.theme-dark .acct-menu { background: var(--dk-card); border-color: var(--dk-line); color: var(--ink); }
body.theme-dark .acct-item { color: var(--dk-soft); }
body.theme-dark .acct-item:hover,
body.theme-dark .acct-item:focus,
body.theme-dark .acct-head:hover { background: var(--dk-glow); color: var(--accent); }
body.theme-dark .acct-logout { color: #ff8a80; }
body.theme-dark .acct-menu .dropdown-divider { border-color: var(--dk-line); }
body.theme-dark .arena-footer { background: rgba(0, 0, 0, 0.25); border-top-color: var(--dk-line); }
body.theme-dark .rank-chip,
body.theme-dark .badge-chip,
body.theme-dark .continue-lesson { background: var(--dk-card); border-color: var(--dk-line); color: var(--ink); }
body.theme-dark .rank-chip small,
body.theme-dark .continue-lesson small { color: var(--dk-muted); }
body.theme-dark .nav-bell,
body.theme-dark .nav-toggle { background: var(--dk-card); color: var(--dk-soft); }
body.theme-dark .panel,
body.theme-dark .auth-card,
body.theme-dark .stat-card,
body.theme-dark .level-card,
body.theme-dark .mission-card,
body.theme-dark .class-card,
body.theme-dark .hub-action,
body.theme-dark .snav,
body.theme-dark .snav-menu,
body.theme-dark .scope-bar,
body.theme-dark .guide-note,
body.theme-dark .nav-links .dropdown-menu,
body.theme-dark .join-code-box {
  background: var(--dk-glass);
  border-color: var(--line);
  color: var(--ink);
}
body.theme-dark .snav-btn,
body.theme-dark .snav-tabs a { color: var(--dk-soft); }
body.theme-dark .snav-btn:hover,
body.theme-dark .snav-menu .dropdown-item:hover { background: var(--dk-glow); }
body.theme-dark .dash-kpi,
body.theme-dark .dash-flag { background: var(--dk-card); border-color: var(--dk-line); color: #e2e8f0; }
body.theme-dark .dash-donut::after { background: var(--dk-card); }
body.theme-dark .dash-attention { background: rgba(234, 88, 12, 0.08); border-color: rgba(234, 88, 12, 0.35); }
body.theme-dark .dash-kpi small,
body.theme-dark .dash-kpi-label,
body.theme-dark .dash-legend { color: var(--dk-muted); }
body.theme-dark .dash-bar-track { background: #1f2f3d; }
body.theme-dark .dash-line .dash-grid { stroke: var(--dk-line); }
body.theme-dark .dash-feed li { border-color: var(--dk-line); }
body.theme-dark .dash-kpi.is-warn { border-color: rgba(234, 88, 12, 0.45); }
body.theme-dark .dash-kpi.is-warn .dash-kpi-ico { background: rgba(234, 88, 12, 0.15); }
body.theme-dark .class-card-ico { background: var(--dk-glow); }
body.theme-dark .class-card-meta,
body.theme-dark .class-card .class-card-stats { color: var(--dk-muted); }
body.theme-dark .class-card-code { border-color: #36506a; }
body.theme-dark .class-card-actions { border-color: var(--dk-line); }
body.theme-dark .class-card.is-archived { background: rgba(22, 30, 42, 0.6); }
body.theme-dark .about-lab { background: var(--dk-card); border-color: var(--dk-line); }
body.theme-dark .about-lab small,
body.theme-dark .about-list,
body.theme-dark .about-commit span,
body.theme-dark .about-stats span { color: var(--dk-muted); }
body.theme-dark .landing-minimal-card,
body.theme-dark .landing-lab { background: var(--dk-card); border-color: var(--dk-line); color: #e2e8f0; }
body.theme-dark .landing-split .landing-lead { color: var(--dk-muted); }
body.theme-dark .ic-rank { background: var(--dk-line); color: var(--dk-soft); }
body.theme-dark .ic-sig { background: #2a2620; color: #f0c9a0; }
body.theme-dark .ic-top a { color: #e2e8f0; }
body.theme-dark .ic-stack { background: var(--dk-line); }
body.theme-dark .ic-decision { border-color: var(--dk-line); }
body.theme-dark .ic-decision small { color: var(--dk-muted); }
body.theme-dark .sec-card { background: var(--dk-card); border-color: var(--dk-line); color: #e2e8f0; }
body.theme-dark .sec-card span,
body.theme-dark .sec-card small,
body.theme-dark .admin-pager-info { color: var(--dk-muted); }
body.theme-dark .admin-pager .page-link { background: var(--dk-card); border-color: var(--dk-line); color: var(--dk-soft); }
body.theme-dark .admin-pager .page-item.active .page-link { background: var(--accent); color: #fff; }
body.theme-dark .server-bar.server-live { background: rgba(16, 80, 50, 0.55); color: #c9f5dc; border-bottom-color: rgba(61, 220, 151, 0.25); }
body.theme-dark .server-bar.server-local { background: rgba(110, 70, 0, 0.5); color: #ffe3a8; border-bottom-color: rgba(243, 198, 107, 0.3); }
body.theme-dark .text-secondary,
body.theme-dark .brand-text small {
  color: #9aadc0 !important;
}
body.theme-dark .form-control,
body.theme-dark .form-select {
  background: #0f1621;
  border-color: #2c3a4d;
  color: #e8eef5;
}
body.theme-dark .table {
  --bs-table-bg: transparent;
  --bs-table-color: #e8eef5;
  --bs-table-border-color: #2c3a4d;
}
body[data-theme="sunrise"] {
  background-image: url("../img/themes/sunrise.svg");
  --paper: #fff6ea;
  --accent: #c45c26;
  --accent-2: #b4541e;
}
body[data-theme="circuit"] {
  background-image: url("../img/themes/circuit.svg");
  --ink: #d7fbe8;
  --paper: #10241b;
  --paper-2: #163226;
  --line: #1f4a38;
  --accent: #3ddc97;
  --accent-2: #2dd4bf;
  color: var(--ink);
}
body[data-theme="circuit"] .arena-nav {
  background: rgba(13, 31, 24, 0.9);
  border-bottom-color: rgba(61, 220, 151, 0.2);
}
body[data-theme="circuit"] .panel,
body[data-theme="circuit"] .auth-card,
body[data-theme="circuit"] .stat-card {
  background: rgba(16, 36, 27, 0.92);
  border-color: var(--line);
}
body[data-theme="circuit"] .text-secondary { color: #8fbfa8 !important; }
body[data-theme="ember"] {
  background-image: url("../img/themes/ember.svg");
  --paper: #f8ebe4;
  --accent: #c45c26;
  --accent-2: #a1262f;
}
body[data-theme="arctic"] {
  background-image: url("../img/themes/arctic.svg");
  --paper: #eef3f8;
  --accent: #3d6f95;
  --accent-2: #5b7c99;
}
body[data-theme="violet"] {
  background-image: url("../img/themes/violet.svg");
  --paper: #f3eef9;
  --accent: #6d4c9a;
  --accent-2: #5b3a7a;
}
body[data-theme="sandstone"] {
  background-image: url("../img/themes/sandstone.svg");
  --paper: #f6efe4;
  --accent: #8a5a2b;
  --accent-2: #6b4423;
}
body[data-theme="neon"] {
  background-image: url("../img/themes/neon.svg");
  --paper: #120f26;
  --paper-2: #1a1535;
  --line: #2e2752;
  --accent: #22d3ee;
  --accent-2: #d946ef;
  --dk-nav: rgba(13, 11, 30, 0.9);
  --dk-glass: rgba(22, 18, 44, 0.92);
  --dk-card: #1a1535;
  --dk-line: #2e2752;
  --dk-muted: #a99cc9;
  --dk-soft: #d6ccf0;
  --dk-glow: rgba(217, 70, 239, 0.16);
}
body[data-theme="aurora"] {
  background-image: url("../img/themes/aurora.svg");
  --paper: #0b1a1f;
  --paper-2: #10252b;
  --line: #1f3d44;
  --accent: #34d399;
  --accent-2: #a78bfa;
  --dk-nav: rgba(8, 20, 24, 0.9);
  --dk-glass: rgba(14, 32, 38, 0.92);
  --dk-card: #102229;
  --dk-line: #1f3d44;
  --dk-muted: #93b5b0;
  --dk-soft: #c8e6e0;
  --dk-glow: rgba(52, 211, 153, 0.13);
}
body[data-theme="graphite"] {
  background-image: url("../img/themes/graphite.svg");
  --paper: #18191c;
  --paper-2: #212226;
  --line: #34363c;
  --accent: #f59e0b;
  --accent-2: #d97706;
  --dk-nav: rgba(20, 21, 24, 0.92);
  --dk-glass: rgba(30, 31, 35, 0.93);
  --dk-card: #1f2024;
  --dk-line: #34363c;
  --dk-muted: #a1a1aa;
  --dk-soft: #d4d4d8;
  --dk-glow: rgba(245, 158, 11, 0.13);
}
body[data-theme="sakura"] {
  background-image: url("../img/themes/sakura.svg");
  --paper: #fdf0f4;
  --paper-2: #f8e3ea;
  --line: #ecc9d5;
  --accent: #c2416b;
  --accent-2: #9d3b6c;
}
body[data-theme="coral"] {
  background-image: url("../img/themes/coral.svg");
  --paper: #fff3ee;
  --paper-2: #fde4da;
  --line: #f3cbbb;
  --accent: #d0532f;
  --accent-2: #0f8a8a;
}

.theme-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.theme-card.active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-preview {
  height: 110px;
  background-size: cover;
  background-position: center;
}
.theme-card .theme-meta {
  padding: 0.85rem 1rem;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
/* Technology */
body[data-theme="matrix"] {
  background-image: url("../img/themes/matrix.svg");
  --paper: #07110b; --paper-2: #0c1a11; --line: #1a3524; --accent: #22c55e; --accent-2: #16a34a;
  --dk-nav: rgba(4, 10, 6, 0.92); --dk-glass: rgba(8, 20, 12, 0.92); --dk-card: #0c1a11; --dk-line: #1a3524;
  --dk-muted: #86b896; --dk-soft: #c4e8cf; --dk-glow: rgba(34, 197, 94, 0.13);
}
body[data-theme="cyberpunk"] {
  background-image: url("../img/themes/cyberpunk.svg");
  --paper: #140c1f; --paper-2: #1d1230; --line: #3a2352; --accent: #ec4899; --accent-2: #facc15;
  --dk-nav: rgba(16, 9, 26, 0.92); --dk-glass: rgba(26, 15, 40, 0.92); --dk-card: #1d1230; --dk-line: #3a2352;
  --dk-muted: #b9a2cf; --dk-soft: #e7d8f5; --dk-glow: rgba(250, 204, 21, 0.14);
}
body[data-theme="hologram"] {
  background-image: url("../img/themes/hologram.svg");
  --paper: #081627; --paper-2: #0c1f36; --line: #1b3a5c; --accent: #38bdf8; --accent-2: #818cf8;
  --dk-nav: rgba(6, 16, 30, 0.92); --dk-glass: rgba(10, 26, 46, 0.92); --dk-card: #0c1f36; --dk-line: #1b3a5c;
  --dk-muted: #93b4d4; --dk-soft: #cfe3f7; --dk-glow: rgba(56, 189, 248, 0.14);
}
body[data-theme="quantum"] { background-image: url("../img/themes/quantum.svg"); --paper: #f3f2fd; --paper-2: #e6e4fb; --line: #d0cdf3; --accent: #4f46e5; --accent-2: #0891b2; }
body[data-theme="datastream"] { background-image: url("../img/themes/datastream.svg"); --paper: #eef5fa; --paper-2: #dcebf5; --line: #c3d9ea; --accent: #0369a1; --accent-2: #0f766e; }

/* Feminine */
body[data-theme="rosegold"] { background-image: url("../img/themes/rosegold.svg"); --paper: #fbf1ee; --paper-2: #f5e1db; --line: #ebcdc4; --accent: #b76e79; --accent-2: #a8763e; }
body[data-theme="lavender"] { background-image: url("../img/themes/lavender.svg"); --paper: #f5f1fd; --paper-2: #ebe3fb; --line: #dacdf5; --accent: #7c3aed; --accent-2: #a855f7; }
body[data-theme="blush"] { background-image: url("../img/themes/blush.svg"); --paper: #fff1f5; --paper-2: #fde2ea; --line: #f7c9d7; --accent: #db2777; --accent-2: #be185d; }
body[data-theme="pearl"] { background-image: url("../img/themes/pearl.svg"); --paper: #faf7f4; --paper-2: #f1ebe5; --line: #e2d8cf; --accent: #9d6b8a; --accent-2: #7a5a74; }
body[data-theme="orchid"] {
  background-image: url("../img/themes/orchid.svg");
  --paper: #1a0f1f; --paper-2: #24152b; --line: #42284d; --accent: #e879f9; --accent-2: #c026d3;
  --dk-nav: rgba(20, 11, 24, 0.92); --dk-glass: rgba(32, 18, 38, 0.92); --dk-card: #24152b; --dk-line: #42284d;
  --dk-muted: #c3a5cc; --dk-soft: #ecd8f1; --dk-glow: rgba(232, 121, 249, 0.14);
}

/* Kikay and kids */
body[data-theme="bubblegum"] { background-image: url("../img/themes/bubblegum.svg"); --paper: #fff0f7; --paper-2: #ffdced; --line: #fbc2dc; --accent: #ec4899; --accent-2: #8b5cf6; }
body[data-theme="candy"] { background-image: url("../img/themes/candy.svg"); --paper: #fff3f3; --paper-2: #ffe1e3; --line: #fbc6cb; --accent: #e11d48; --accent-2: #0d9488; }
body[data-theme="rainbow"] { background-image: url("../img/themes/rainbow.svg"); --paper: #eff8ff; --paper-2: #dbeefe; --line: #c0dcf5; --accent: #2563eb; --accent-2: #db2777; }
body[data-theme="unicorn"] { background-image: url("../img/themes/unicorn.svg"); --paper: #f8f2ff; --paper-2: #efe3ff; --line: #e0cdfa; --accent: #9333ea; --accent-2: #ec4899; }
body[data-theme="sunshine"] { background-image: url("../img/themes/sunshine.svg"); --paper: #fffaeb; --paper-2: #fff0c7; --line: #f8dc93; --accent: #ea580c; --accent-2: #16a34a; }

/* Gen Z */
body[data-theme="y2k"] { background-image: url("../img/themes/y2k.svg"); --paper: #f3f4fb; --paper-2: #e5e7f6; --line: #cfd3ee; --accent: #6366f1; --accent-2: #ec4899; }
body[data-theme="vaporwave"] {
  background-image: url("../img/themes/vaporwave.svg");
  --paper: #1c1030; --paper-2: #261644; --line: #44306b; --accent: #f472b6; --accent-2: #2dd4bf;
  --dk-nav: rgba(22, 12, 38, 0.92); --dk-glass: rgba(34, 20, 58, 0.92); --dk-card: #261644; --dk-line: #44306b;
  --dk-muted: #bba8dc; --dk-soft: #e8dcfb; --dk-glow: rgba(45, 212, 191, 0.14);
}
body[data-theme="matcha"] { background-image: url("../img/themes/matcha.svg"); --paper: #f3f6ec; --paper-2: #e5ecd6; --line: #d0dcb8; --accent: #4d7c0f; --accent-2: #a16207; }
body[data-theme="lofi"] {
  background-image: url("../img/themes/lofi.svg");
  --paper: #141526; --paper-2: #1c1d33; --line: #33355a; --accent: #fb923c; --accent-2: #a78bfa;
  --dk-nav: rgba(16, 17, 32, 0.92); --dk-glass: rgba(26, 27, 48, 0.92); --dk-card: #1c1d33; --dk-line: #33355a;
  --dk-muted: #a9abcf; --dk-soft: #dcdcf3; --dk-glow: rgba(251, 146, 60, 0.13);
}
body[data-theme="pastelgrid"] { background-image: url("../img/themes/pastelgrid.svg"); --paper: #f7f7fb; --paper-2: #ebeef7; --line: #d6dcee; --accent: #0891b2; --accent-2: #db2777; }

body[data-theme]:not([data-theme="default"]) .btn-arena {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #000));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 25%, transparent);
}

.theme-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.theme-filter button {
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.7); color: inherit; border-radius: 999px;
  padding: 0.35rem 0.85rem; font-size: 0.85rem; font-weight: 600;
}
.theme-filter button span { opacity: 0.6; font-weight: 500; margin-left: 0.15rem; }
.theme-filter button.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
body.theme-dark .theme-filter button:not(.is-active) { background: var(--dk-card); border-color: var(--dk-line); color: var(--dk-soft); }
.theme-card { cursor: pointer; position: relative; }
.theme-card:has(input:checked) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 991.98px) {
  .arena-nav .dropstart .dropdown-toggle::before { display: none; }
  .arena-nav .dropstart .dropdown-toggle::after,
  .arena-nav .dropend .dropdown-toggle::after {
    display: inline-block; vertical-align: 0.255em;
    border-top: 0.3em solid; border-right: 0.3em solid transparent; border-bottom: 0; border-left: 0.3em solid transparent;
  }
}
.theme-preview .theme-dark-tag {
  position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.1rem 0.5rem; border-radius: 999px;
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(0, 0, 0, 0.55); color: #fff;
}
body.theme-dark .theme-card { background: var(--dk-card); border-color: var(--dk-line); }

/* Personal appearance: text size, page width, own background and menu orientation */
html.text-compact { font-size: 15px; }
html.text-large { font-size: 17.5px; }

body.width-wide .arena-main > .container-xl,
body.width-wide .arena-footer > .container-xl,
body.width-wide:not(.layout-side) .arena-nav > .container-xl,
body.width-wide .server-bar > .container-xl { max-width: none; padding-left: clamp(1rem, 3vw, 2.5rem); padding-right: clamp(1rem, 3vw, 2.5rem); }
body.width-focus .arena-main > .container-xl { max-width: 1040px; }

body.has-user-bg {
  --veil: 246, 248, 247;
  background-image: linear-gradient(rgba(var(--veil), var(--veil-a, 0.35)), rgba(var(--veil), var(--veil-a, 0.35))), var(--user-bg) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}
body.theme-dark.has-user-bg { --veil: 8, 12, 20; }
body.bg-dim-none { --veil-a: 0; }
body.bg-dim-soft { --veil-a: 0.35; }
body.bg-dim-strong { --veil-a: 0.65; }

@media (min-width: 992px) {
  body.layout-side { --side-w: 15.5rem; }
  body.layout-left { padding-left: var(--side-w); }
  body.layout-right { padding-right: var(--side-w); }
  body.layout-side .arena-nav {
    position: fixed; top: 0; bottom: 0; width: var(--side-w); z-index: 1030;
    backdrop-filter: none; border-bottom: 0;
  }
  body.layout-left .arena-nav { left: 0; border-right: 1px solid var(--line); }
  body.layout-right .arena-nav { right: 0; border-left: 1px solid var(--line); }
  body.layout-side .arena-nav > .container-xl {
    height: 100%; max-width: none; padding: 1.25rem 0.85rem;
    flex-direction: column; align-items: stretch; justify-content: flex-start !important; gap: 1.1rem !important;
    overflow-y: auto;
  }
  body.layout-side .nav-links { flex-direction: column; gap: 0.15rem; }
  body.layout-side .nav-links > a:not(.nav-mobile-only),
  body.layout-side .nav-links .nav-dropdown > .dropdown-toggle {
    display: flex; align-items: center; justify-content: space-between; border-radius: 10px; padding: 0.55rem 0.8rem;
  }
  body.layout-side .nav-links .nav-dropdown { display: block; }
  body.layout-side .user-chip {
    margin-top: auto; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.9rem; border-top: 1px solid var(--line);
  }
  body.layout-side .acct { order: -1; flex: 1 1 100%; }
  body.layout-side .acct-btn { width: 100%; }
  body.layout-side .acct-name { display: inline; max-width: none; }
  body.layout-side .acct-caret { margin-left: auto; transform: rotate(180deg); }
  body.layout-side .acct-btn[aria-expanded="true"] .acct-caret { transform: none; }
  body.layout-side .acct-menu { margin-bottom: 0.4rem !important; }
}

.ap-section { scroll-margin-top: 5rem; }
.ap-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; }
.ap-choice {
  display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem; border: 1px solid var(--line);
  border-radius: 14px; background: rgba(255, 255, 255, 0.6); cursor: pointer;
}
.ap-choice:has(input:checked) { outline: 2px solid var(--accent); outline-offset: 1px; }
.ap-choice small { color: #5b6d66; line-height: 1.3; }
.ap-choice input { margin: 0; }
.ap-pic { height: 64px; border-radius: 10px; background: var(--paper-2, #e7eee9); display: grid; gap: 4px; padding: 6px; }
.ap-pic i { display: block; border-radius: 4px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.ap-pic i.c { background: rgba(255, 255, 255, 0.85); }
.ap-pic.top { grid-template-rows: 12px 1fr; }
.ap-pic.left { grid-template-columns: 28% 1fr; }
.ap-pic.right { grid-template-columns: 1fr 28%; }
.ap-pic.w-standard { padding: 6px 18px; }
.ap-pic.w-wide { padding: 6px; }
.ap-pic.w-focus { padding: 6px 34px; }
.ap-pic.txt { place-items: center; font-weight: 600; color: var(--accent); background: rgba(255, 255, 255, 0.7); }
.ap-bg-preview {
  height: 150px; border-radius: 14px; border: 1px dashed var(--line);
  background: var(--paper-2, #e7eee9) center/cover no-repeat; display: grid; place-items: center; color: #5b6d66;
}
body.theme-dark .ap-choice { background: var(--dk-card); border-color: var(--dk-line); }
body.theme-dark .ap-choice small,
body.theme-dark .ap-bg-preview { color: var(--dk-muted); }
body.theme-dark .ap-pic i.c { background: rgba(255, 255, 255, 0.18); }
body.theme-dark .ap-pic.txt { background: rgba(255, 255, 255, 0.06); }
