/* Alpha-War shared design tokens: Studio and Avatar (and any later add-on) use these, so both apps look
   like one product. Navy and gold by default, light and dark modes, four colour schemes; theme.js sets
   data-mode / data-scheme on <html> from the person's choice (kept per browser, shared by both apps). */
:root {
  --r: 14px; --r-lg: 18px; --r-sm: 10px; font-size: 15px;
  --head: 'Inter Display', 'Inter', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', Arial, sans-serif; /* self-hosted, see /fonts/ */
  --body: 'Inter', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, Arial, sans-serif;
  --navy: #0F1A30; --on-navy: #F7F5EF; --on-navy-dim: #C9D3E3; --navy-line: #3A4766;
  /* dark (default): the site's navy */
  --bg: #0F1A30; --panel: #16223D; --panel2: #1C2A48; --field: #12203A; --line: #2E3D60; --text: #F7F5EF; --muted: #A9B5CB;
  --ok: #4CC08A; --ok-ink: #04150c; --ok-line: #2c5a43; --warn: #E8A45C; --bad: #F07C74; --bad-line: #8a3a3a; --info: #74AEEB;
  --notice-bg: #2A2618; --notice-info-bg: #18284A; --media-bg: #000;
  --accent: #E0B44C; --btn: #E0B44C; --btn-ink: #0F1A30; --btn-hover: #EBC56A; --top-accent: #E0B44C;
  color-scheme: dark;
}
html[data-mode="light"] {
  /* light: the site's warm ground and white cards */
  --bg: #F7F5EF; --panel: #FFFFFF; --panel2: #FBFAF6; --field: #FBFAF6; --line: #E3DED1; --text: #14213D; --muted: #4A5568;
  --ok: #1D7342; --ok-ink: #ffffff; --ok-line: #9fd0b3; --warn: #9A4F00; --bad: #B8322A; --bad-line: #e2a6a1; --info: #1F5FBF;
  --notice-bg: #FFF4E0; --notice-info-bg: #EAF1FB; --media-bg: #111;
  --accent: #8A6100; --btn: #E0B44C; --btn-ink: #0F1A30; --btn-hover: #EBC56A;
  color-scheme: light;
}
/* four colour schemes; gold is the site's own */
html[data-scheme="ocean"]  { --accent: #4FB3E8; --btn: #4FB3E8; --btn-ink: #04151f; --btn-hover: #73C4EE; --top-accent: #4FB3E8; }
html[data-mode="dark"][data-scheme="ocean"]  { --bg: #0B1622; --panel: #11202F; --panel2: #172A3B; --field: #0E1B28; --line: #263C52; }
html[data-scheme="sakura"] { --accent: #F08FB0; --btn: #F08FB0; --btn-ink: #2a0a16; --btn-hover: #F4A8C2; --top-accent: #F08FB0; }
html[data-mode="dark"][data-scheme="sakura"] { --bg: #171019; --panel: #201722; --panel2: #2A1E2C; --field: #1A121C; --line: #3D2C3F; }
html[data-scheme="forest"] { --accent: #6CC28A; --btn: #6CC28A; --btn-ink: #06180d; --btn-hover: #89CFA1; --top-accent: #6CC28A; }
html[data-mode="dark"][data-scheme="forest"] { --bg: #0D1612; --panel: #13201A; --panel2: #192A22; --field: #101B16; --line: #29402F; }
html[data-mode="light"][data-scheme="ocean"]  { --accent: #0B5F8A; --btn: #0B5F8A; --btn-ink: #ffffff; --btn-hover: #0E73A6; --bg: #F3F7FA; --panel2: #F6FAFC; --field: #F6FAFC; --line: #D3DFE8; }
html[data-mode="light"][data-scheme="sakura"] { --accent: #AD2757; --btn: #AD2757; --btn-ink: #ffffff; --btn-hover: #C2305F; --bg: #FAF5F7; --panel2: #FCF8FA; --field: #FCF8FA; --line: #E8D6DE; }
html[data-mode="light"][data-scheme="forest"] { --accent: #1F7044; --btn: #1F7044; --btn-ink: #ffffff; --btn-hover: #258452; --bg: #F4F8F5; --panel2: #F7FAF8; --field: #F7FAF8; --line: #D2E2D7; }


/* Shared components used by both apps */
.hint { display: block; font-size: .78rem; font-weight: 400; color: var(--muted); line-height: 1.45; }
/* Status bar: where a project or avatar is, what is running and what to do next (Studio and Avatar) */
.statusbar { display: grid; gap: .55rem; padding: .7rem .95rem; margin: 0 0 1.1rem; background: var(--panel); border: 1px solid var(--line);
  border-left: 4px solid var(--btn); border-radius: var(--r); }
.statusbar.busy { border-left-color: var(--info); }
.statusbar.warn { border-left-color: var(--warn); }
.statusbar.ok { border-left-color: var(--ok); }
.sb-main { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; font-size: .9rem; }
.sb-main b { font-weight: 600; }
.sb-meta { color: var(--muted); font-size: .82rem; }
.sb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--btn); flex: none; }
.sb-dot.busy { background: var(--info); animation: sb-pulse 1.2s ease-in-out infinite; }
.sb-dot.warn { background: var(--warn); }
.sb-dot.ok { background: var(--ok); }
.sb-track { display: flex; gap: 3px; height: 6px; }
.sb-seg { flex: 1; border-radius: 999px; background: var(--line); }
.sb-seg.done { background: var(--ok); }
.sb-seg.now { background: var(--btn); }
.sb-seg.busy { background: var(--info); animation: sb-pulse 1.2s ease-in-out infinite; }
.sb-seg.warn { background: var(--warn); }
.sb-progress { width: 100%; height: 6px; accent-color: var(--info); }
@keyframes sb-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .sb-dot.busy, .sb-seg.busy { animation: none; } }
/* Guided / Advanced (theme.js sets data-ui on <html>): Guided hides the individual settings marked .adv */
html[data-ui="guided"] .adv { display: none !important; }
.wizard-steps { display: flex; flex-wrap: wrap; gap: .4rem; grid-column: 1 / -1; margin: 0 0 .4rem; padding: 0; list-style: none; }
.wizard-steps li { font-size: .8rem; font-weight: 600; color: var(--muted); padding: .25rem .75rem; border: 1px solid var(--line); border-radius: 999px; }
.wizard-steps li.on { color: var(--btn-ink); background: var(--btn); border-color: var(--btn); }
.wizard-steps li.done { color: var(--ok); border-color: var(--ok); }
.mode-note { font-size: .8rem; color: var(--muted); }
