/* Direction candidates for owner choice (2026-10-10). Loaded after n.css; scoped by html[data-dir]. */

/* =============== A · Midnight (Deals + OpenPanel) =============== */
html:root[data-dir="a"] {
  --frame: #070708; --bg: #0e0e10; --panel: #141416; --panel-2: #18181b; --sunken: #1c1c20;
  --line: #232327; --line-soft: #1b1b1f; --text: #f4f4f5; --text-2: #c9c9cf; --muted: #8e8e98; --faint: #5f5f69;
  --accent: #22c55e; --accent-hover: #16a34a; --accent-soft: rgb(34 197 94 / 0.14); --accent-text: #4ade80; --on-accent: #04130a;
  --chip: #1c1c20; --chip-line: #2a2a30; --track: #0b0b0d; --track-line: #232327;
  color-scheme: dark;
}
html[data-dir="a"] .panel { box-shadow: none; }
html[data-dir="a"] .btn { background: #18181b; border-color: #2a2a30; color: var(--text); box-shadow: none; }
html[data-dir="a"] .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
html[data-dir="a"] .top .icon-btn { background: #18181b; border-color: #2a2a30; }
html[data-dir="a"] .tag { font-weight: 500; }
html[data-dir="a"] .tag.t-blue { background: rgb(59 130 246 / 0.18); color: #7cb0ff; }
html[data-dir="a"] .tag.t-amber { background: rgb(249 115 22 / 0.18); color: #ffa45c; }
html[data-dir="a"] .tag.t-red { background: rgb(239 68 68 / 0.18); color: #ff8080; }
html[data-dir="a"] .tag.t-violet { background: rgb(168 85 247 / 0.2); color: #cf9bff; }
html[data-dir="a"] .tag.t-green { background: rgb(34 197 94 / 0.16); color: #57e08e; }
html[data-dir="a"] .tag.t-pink { background: rgb(236 72 153 / 0.18); color: #ff7ac0; }
html[data-dir="a"] .pill { background: transparent; }
.mid-hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.mid-hero .big { font-size: 64px; line-height: 64px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mid-bars { display: flex; align-items: flex-end; gap: 3px; height: 84px; }
.mid-bars i { flex: 1; border-radius: 2px; background: linear-gradient(180deg, #4ade80, #16a34a); }
.mid-bars i.p { background: #232327; }
.mid-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: 18px; }
.mid-kpis > div { padding: 14px 0 0; display: flex; flex-direction: column; gap: 2px; }
.mid-kpis small { color: var(--muted); font-size: 12px; }
.mid-kpis b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mid-kpis b.up { color: #4ade80; } .mid-kpis b.down { color: #ff8080; }
.stream a { display: block; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.stream a:hover { background: var(--panel-2); }
.stream .u { font-size: 11.5px; color: var(--faint); }
.stream b { display: block; font-weight: 600; font-size: 13.5px; margin-top: 1px; }
.stream .row { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #4ade80; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgb(34 197 94 / 0.18); }
html[data-dir="a"] .dtbl tr.bar { background: linear-gradient(to var(--bar-dir, left), rgb(255 255 255 / 0.05) var(--w), transparent var(--w)); }
.prob { display: flex; align-items: center; gap: 8px; }
.prob .track { width: 110px; height: 6px; border-radius: 99px; background: #232327; overflow: hidden; }
.prob .track i { display: block; height: 100%; border-radius: inherit; background: #2dd4bf; }

/* =============== B · Atelier (Library) =============== */
html:root[data-dir="b"] {
  --frame: transparent; --bg: #ffffff; --panel: #ffffff; --panel-2: #fafafa; --sunken: #f4f4f5;
  --line: #ececee; --line-soft: #f2f2f4; --text: #09090b; --text-2: #3f3f46; --muted: #71717a; --faint: #a1a1aa;
  --chip: #f4f4f5; --chip-line: #e4e4e7; --track: #f4f4f5; --track-line: #e4e4e7;
  --accent: #1b8354; --accent-soft: #ecf7f1; --accent-text: #146c43;
  --ok-bg: #ecfdf3; --ok-fg: #15803d; --warn-bg: #fff4ea; --warn-fg: #c2410c; --bad-bg: #fef1f1; --bad-fg: #b91c1c;
  --info-bg: #eef4ff; --info-fg: #1d4ed8; --violet-bg: #f5effe; --violet-fg: #7e22ce;
  color-scheme: light;
}
html[data-dir="b"] body {
  /* Decorative pixel mosaic in Masar greens, echoing the Library backdrop */
  background-color: #cfe7d8;
  background-image:
    linear-gradient(90deg, rgb(255 255 255 / 0.22) 50%, transparent 0),
    linear-gradient(rgb(255 255 255 / 0.22) 50%, transparent 0),
    radial-gradient(120% 80% at 10% 0%, #9fd3b5 0, transparent 55%),
    radial-gradient(90% 70% at 100% 100%, #7cc39e 0, transparent 60%),
    linear-gradient(160deg, #e6f4ec, #b9dcc8);
  background-size: 14px 14px, 14px 14px, 100% 100%, 100% 100%, 100% 100%;
}
html[data-dir="b"] .app { padding: 28px; gap: 20px; grid-template-columns: 280px minmax(0, 1fr); }
html[data-dir="b"] .side { position: sticky; top: 28px; height: calc(100vh - 56px); border-radius: 20px; background: rgb(244 244 245 / 0.92); backdrop-filter: blur(12px); box-shadow: 0 20px 50px rgb(16 40 28 / 0.18); padding: 14px; }
html[data-dir="b"] .main { margin: 0; border: 0; border-radius: 20px; min-height: calc(100vh - 56px); box-shadow: 0 20px 50px rgb(16 40 28 / 0.18); }
html[data-dir="b"] .top { border-radius: 20px 20px 0 0; }
html[data-dir="b"] .btn.primary { background: #111113; border-color: #111113; color: #fff; }
html[data-dir="b"] .btn.primary .ic { color: #fff; }
html[data-dir="b"] .nav a[aria-current="page"] { background: #e4e4e7; }
.grad { color: #fff !important; border: 0 !important; }
.grad.g1 { background: linear-gradient(135deg, #34d399, #059669) !important; }
.grad.g2 { background: linear-gradient(135deg, #f472b6, #db2777) !important; }
.grad.g3 { background: linear-gradient(135deg, #818cf8, #4f46e5) !important; }
.grad.g4 { background: linear-gradient(135deg, #fbbf24, #f97316) !important; }
.lib-stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.lib-stat .h { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text-2); }
.lib-stat .h .tile { width: 24px; height: 24px; border-radius: 7px; }
.lib-stat .h .tile .ic { width: 14px; height: 14px; }
.lib-stat b { font-size: 18px; font-weight: 600; display: block; }
.lib-stat small { color: var(--muted); font-size: 12.5px; }
.src-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.src { background: var(--sunken); border: 1px solid var(--line); border-radius: 16px; padding: 4px; display: flex; flex-direction: column; }
.src .t { padding: 12px 12px 10px; }
.src .t b { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.src .t b::before { content: ""; width: 10px; height: 4px; border-radius: 2px; background: var(--c, #f59e0b); }
.src .t p { color: var(--muted); font-size: 13px; line-height: 20px; margin-top: 4px; }
.src .kvs { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; box-shadow: 0 1px 2px rgb(9 9 11 / 0.04); }
.src .kvs div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; font-size: 13px; color: var(--text-2); }
.src .kvs .v { display: inline-flex; align-items: center; height: 24px; padding-inline: 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; color: var(--text-2); background: var(--panel); }
.stack-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--sunken); display: grid; place-items: center; color: var(--muted); flex: none; }
html[data-dir="b"] .tbl th { background: #f4f4f5; }

/* =============== C · Studio (Shopify) =============== */
html:root[data-dir="c"] {
  --frame: #161617; --bg: #1c1c1e; --panel: #222224; --panel-2: #262628; --sunken: #2a2a2d;
  --line: #303034; --line-soft: #29292c; --text: #f2f2f3; --text-2: #cfcfd4; --muted: #9b9ba3; --faint: #6c6c74;
  --accent: #2fb06e; --accent-hover: #27975e; --accent-soft: rgb(47 176 110 / 0.16); --accent-text: #5fd598; --on-accent: #ffffff;
  --chip: #2a2a2d; --chip-line: #36363a; --track: #18181a; --track-line: #303034;
  color-scheme: dark;
}
html[data-dir="c"] .panel { box-shadow: none; }
html[data-dir="c"] .btn { background: transparent; border-color: #3a3a3f; color: var(--text); box-shadow: none; }
html[data-dir="c"] .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-dir="c"] .top .icon-btn { background: transparent; border-color: #3a3a3f; }
.studio { max-width: 920px; margin-inline: auto; width: 100%; display: flex; flex-direction: column; gap: 28px; }
.studio-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.studio-head .logo { width: 64px; height: 64px; border-radius: 16px; font-size: 28px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08); }
.studio-head h1 { font-size: 28px; line-height: 36px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.studio-head p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.studio-head .acts { margin-inline-start: auto; display: flex; gap: 10px; }
.status-ok { display: inline-flex; align-items: center; height: 26px; padding-inline: 10px; border-radius: 7px; background: rgb(47 176 110 / 0.16); color: #5fd598; font-size: 13px; font-weight: 500; }
.banner { border-radius: 20px; padding: 44px 24px; display: grid; place-items: center;
  background:
    radial-gradient(60% 120% at 15% 20%, rgb(230 240 200 / 0.95), transparent 60%),
    radial-gradient(50% 120% at 85% 80%, rgb(170 220 205 / 0.95), transparent 60%),
    radial-gradient(40% 80% at 60% 10%, rgb(250 235 200 / 0.9), transparent 70%),
    linear-gradient(120deg, #dfeccf, #bfe1d6); }
.banner .prompt { display: flex; align-items: center; gap: 12px; max-width: 760px; width: 100%; padding: 8px 8px 8px 18px; padding-inline-start: 8px; border-radius: 999px; background: #18181a; color: #f2f2f3; font-size: 15px; box-shadow: 0 10px 30px rgb(0 0 0 / 0.25); }
.banner .prompt .chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 12px; border-radius: 999px; background: rgb(47 176 110 / 0.2); color: #6ee0a6; font-weight: 600; font-size: 13px; white-space: nowrap; }
.banner .prompt span.t { flex: 1; min-width: 0; }
.banner .prompt .go { width: 34px; height: 34px; border-radius: 50%; background: #2fb06e; color: #fff; display: grid; place-items: center; flex: none; }
.s-title { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.kv-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.kv-card .r { display: grid; grid-template-columns: 300px minmax(0, 1fr); border-top: 1px solid var(--line); }
.kv-card .r:first-child { border-top: 0; }
.kv-card .r > div { padding: 16px 20px; display: flex; align-items: center; gap: 12px; }
.kv-card .r > div:first-child { color: var(--text-2); border-inline-end: 1px solid var(--line); }
.kv-card .r > div:first-child .ic { color: var(--muted); }
.kv-card .r a { text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
.list-card { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.list-card > .r { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--line); }
.list-card > .r:first-child { border-top: 0; }
.list-card .r .m { color: var(--muted); font-size: 13px; margin-inline-start: auto; white-space: nowrap; }
.list-card .r a.u { color: #7cb0ff; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.nested { margin: 0 20px 18px; padding: 18px 20px; border-radius: 14px; background: var(--sunken); display: flex; flex-direction: column; gap: 16px; }
.nested h3 { font-size: 15px; font-weight: 600; }
.nested .opt-row { display: flex; align-items: center; gap: 16px; }
.nested .opt-row .grow { flex: 1; min-width: 0; }
.nested .opt-row b { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.nested .opt-row p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ok-badge { width: 16px; height: 16px; border-radius: 5px; background: #22c55e; color: #fff; display: inline-grid; place-items: center; }
.ok-badge .ic { width: 11px; height: 11px; stroke-width: 3; }
html[data-dir="c"] .switch input:checked { background: #3b82f6; }

@media (max-width: 960px) {
  .mid-hero { grid-template-columns: minmax(0, 1fr); }
  .src-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-dir="b"] .app { padding: 0; gap: 0; grid-template-columns: minmax(0, 1fr); }
  html[data-dir="b"] .side { position: fixed; top: 0; height: 100vh; border-radius: 0; }
  html[data-dir="b"] .main { border-radius: 0; min-height: 100vh; }
  html[data-dir="b"] .top { border-radius: 0; }
}
@media (max-width: 640px) {
  .mid-hero .big { font-size: 48px; line-height: 52px; }
  .mid-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .src-grid { grid-template-columns: minmax(0, 1fr); }
  .kv-card .r { grid-template-columns: minmax(0, 1fr); }
  .kv-card .r > div:first-child { border-inline-end: 0; padding-bottom: 0; }
  .studio-head .acts { margin-inline-start: 0; width: 100%; }
  .banner { padding: 24px 12px; }
  .banner .prompt { font-size: 13px; }
}
