/* SOLO — feuille de style commune (portail utilisateur et administration). Aucune ressource externe. */
@font-face { font-family: "Atkinson"; src: url("../vendor/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../vendor/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url("../vendor/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../vendor/fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
  --ink: #1B2430;          /* texte, rail */
  --ink-2: #4A5565;        /* texte secondaire */
  --ink-3: #7A8494;        /* texte discret */
  --paper: #F4F5F7;        /* fond */
  --surface: #FFFFFF;      /* panneaux */
  --surface-2: #ECEEF2;    /* survol, champs */
  --line: #DCE0E6;         /* séparateurs */
  --brass: #B8862B;        /* accent principal (laiton) */
  --brass-ink: #FFFFFF;
  --brass-soft: #F3E9D4;
  --sage: #4F7A6A;         /* état OK */
  --sage-soft: #DFEBE5;
  --alert: #B4443A;        /* erreur */
  --alert-soft: #F6E1DE;
  --rail: #1B2430;
  --rail-ink: #C9D0DA;
  --rail-active: #2A3646;
  --shadow: 0 1px 2px rgba(27, 36, 48, .06), 0 8px 24px rgba(27, 36, 48, .06);
  --radius-s: 6px; --radius: 10px; --radius-l: 16px;
  --font: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E4E8EE; --ink-2: #AEB6C2; --ink-3: #7F8896;
    --paper: #12171E; --surface: #1A212B; --surface-2: #232C38; --line: #2C3644;
    --brass: #D6A54A; --brass-ink: #1A1408; --brass-soft: #3A2F1A;
    --sage: #79A895; --sage-soft: #1E2E28; --alert: #E07A6F; --alert-soft: #3A2220;
    --rail: #0E1218; --rail-ink: #9AA4B2; --rail-active: #1F2733;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E4E8EE; --ink-2: #AEB6C2; --ink-3: #7F8896;
  --paper: #12171E; --surface: #1A212B; --surface-2: #232C38; --line: #2C3644;
  --brass: #D6A54A; --brass-ink: #1A1408; --brass-soft: #3A2F1A;
  --sage: #79A895; --sage-soft: #1E2E28; --alert: #E07A6F; --alert-soft: #3A2220;
  --rail: #0E1218; --rail-ink: #9AA4B2; --rail-active: #1F2733;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); font-size: var(--fs); line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 560; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 .75em; }
small, .muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }

/* ------------------------------------------------ boutons & champs */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 700; font-size: .92rem; line-height: 1.2; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--alert); border-color: color-mix(in srgb, var(--alert) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: .35rem .6rem; font-size: .84rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.iconbtn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--radius-s); border: 0; background: transparent; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn svg { width: 20px; height: 20px; }

label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .3rem; }
.field { margin-bottom: 1rem; }
.field .hint { font-weight: 400; color: var(--ink-3); font-size: .82rem; margin-top: .25rem; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], select, textarea {
  width: 100%; padding: .55rem .7rem; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 18%, transparent); }
textarea { resize: vertical; min-height: 5rem; }
input[type=range] { width: 100%; accent-color: var(--brass); }
input[type=checkbox], input[type=radio] { accent-color: var(--brass); width: 1.05rem; height: 1.05rem; vertical-align: -2px; }
.check { display: flex; align-items: center; gap: .55rem; font-weight: 400; margin: .35rem 0; cursor: pointer; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: .45rem .8rem; cursor: pointer; font-weight: 700; font-size: .86rem; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--sage-soft); color: var(--sage); }
.tag.bad { background: var(--alert-soft); color: var(--alert); }
.tag.brass { background: var(--brass-soft); color: color-mix(in srgb, var(--brass) 80%, var(--ink)); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); display: inline-block; flex: none; }
.dot.ok { background: var(--sage); } .dot.bad { background: var(--alert); } .dot.warn { background: var(--brass); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.panel + .panel { margin-top: 1rem; }
.grid2 > .panel, .grid3 > .panel { margin-top: 0; }
.panel > h3:first-child, .panel > h2:first-child { margin-top: 0; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-2); }
.empty h2 { color: var(--ink); }

table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 700; padding: .5rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.tablewrap { overflow-x: auto; }

.meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--brass); border-radius: 99px; transition: width .4s; }
.meter.ok > i { background: var(--sage); } .meter.bad > i { background: var(--alert); }

/* ------------------------------------------------ fenêtres, notifications */
dialog { border: 1px solid var(--line); border-radius: var(--radius-l); padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(14, 18, 24, .45); }
dialog .dlg-head { padding: 1.1rem 1.2rem .4rem; display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
dialog .dlg-head h2 { margin: 0; }
dialog .dlg-body { padding: .6rem 1.2rem 1rem; overflow: auto; max-height: calc(100vh - 220px); }
dialog .dlg-foot { padding: .8rem 1.2rem 1.1rem; display: flex; justify-content: flex-end; gap: .6rem; border-top: 1px solid var(--line); }
dialog.wide { width: min(860px, calc(100vw - 32px)); }

#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: .5rem; z-index: 100; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--paper); padding: .7rem 1rem; border-radius: var(--radius); box-shadow: var(--shadow); font-size: .92rem; animation: toastin .2s ease-out; }
.toast.bad { background: var(--alert); color: #fff; }
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ------------------------------------------------ écran de connexion */
.login { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--rail); color: #EDEFF3; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .wordmark { font-family: var(--display); font-size: clamp(4rem, 11vw, 9rem); font-weight: 300; letter-spacing: -0.04em; line-height: .9; color: #F4F5F7; }
.login-art .wordmark b { font-weight: 300; color: #D6A54A; }
.login-art p { max-width: 34ch; color: #AEB6C2; font-size: 1.05rem; }
.login-art .paths { display: grid; gap: .6rem; font-size: .92rem; color: #AEB6C2; }
.login-art .paths span { display: flex; align-items: center; gap: .6rem; }
.login-form { display: grid; place-items: center; padding: 2rem 16px; }
.login-form form { width: min(360px, 100%); }
.login-form h1 { font-size: 1.6rem; }
.login-error { color: var(--alert); font-size: .92rem; min-height: 1.4em; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login-art { padding: 2rem 16px; min-height: 38vh; } }

/* ------------------------------------------------ squelette de l'application */
.app { height: 100%; display: grid; grid-template-columns: 76px 280px minmax(0, 1fr); grid-template-rows: 100%; }
.app.no-side { grid-template-columns: 76px minmax(0, 1fr); }
.app.no-side .side { display: none; }
.rail { background: var(--rail); color: var(--rail-ink); display: flex; flex-direction: column; align-items: center; padding: .8rem 0; gap: .25rem; }
.rail .brand { font-family: var(--display); white-space: nowrap; color: #F4F5F7; font-size: 1.15rem; font-weight: 400; letter-spacing: -0.02em; margin-bottom: .8rem; text-decoration: none; }
.rail a.brand { display: block; text-align: center; }
.rail .brand b { color: #D6A54A; font-weight: 400; }
.rail a, .rail button { width: 64px; padding: .5rem 0 .4rem; border-radius: var(--radius); display: grid; justify-items: center; gap: .2rem; color: var(--rail-ink); text-decoration: none; font-size: .7rem; font-weight: 700; border: 0; background: transparent; cursor: pointer; }
.rail a svg, .rail button svg { width: 22px; height: 22px; }
.rail a:hover, .rail button:hover { background: var(--rail-active); color: #fff; }
.rail a[aria-current="page"] { background: var(--rail-active); color: #fff; box-shadow: inset 3px 0 0 #D6A54A; }
.rail .spacer { flex: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--brass); color: var(--brass-ink); flex: none; }

.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-head { padding: 1rem 1rem .6rem; display: grid; gap: .6rem; }
.side-head .btn.primary { justify-content: center; }
.side-scroll { overflow-y: auto; padding: 0 .5rem 1rem; flex: 1; }
.side h4 { font-size: .78rem; color: var(--ink-3); margin: 1rem .5rem .35rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.side h4 button { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 0 .2rem; font-size: 1.1rem; line-height: 1; }
.item { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; padding: .45rem .55rem; border-radius: var(--radius-s); border: 0; background: transparent; cursor: pointer; color: var(--ink); font-size: .92rem; text-decoration: none; }
.item:hover { background: var(--surface-2); }
.item[aria-current="true"] { background: var(--brass-soft); }
.item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item svg, .svc svg { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.item .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.item .more { opacity: 0; }
.item:hover .more, .item:focus-within .more { opacity: 1; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: 60px; flex: none; display: flex; align-items: center; gap: .75rem; padding: 0 1.2rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar h1 { font-size: 1.15rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .menu-btn { display: none; }
.content { flex: 1; overflow-y: auto; min-height: 0; }
.wrap { max-width: 980px; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; }
.wrap.narrow { max-width: 780px; }

/* Le chemin d'accès : Wi-Fi SOLO / Maison / Internet — l'élément signature de l'interface */
.path { display: inline-flex; align-items: center; gap: 0; font-size: .78rem; font-weight: 700; color: var(--ink-3); border: 1px solid var(--line); border-radius: 99px; padding: .2rem .35rem; background: var(--paper); }
.path span { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .55rem; border-radius: 99px; }
.path span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.path span.on { background: var(--ink); color: var(--paper); }
.path span.on::before { background: var(--brass); border-color: var(--brass); }
.path i { width: 10px; height: 1.5px; background: var(--line); }

/* ------------------------------------------------ chat */
.chat { display: flex; flex-direction: column; height: 100%; }
.thread { flex: 1; overflow-y: auto; }
.thread .wrap { padding-bottom: 1rem; }
.msg { margin: 0 0 1.4rem; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: .8rem; }
.msg .who { font-weight: 700; font-size: .88rem; margin-bottom: .15rem; display: flex; gap: .5rem; align-items: baseline; }
.msg .who small { font-weight: 400; }
.msg.user .avatar { background: var(--surface-2); color: var(--ink); }
.msg.assistant .avatar { background: var(--ink); color: #D6A54A; font-family: var(--display); font-weight: 500; }
.msg .body { overflow-wrap: anywhere; }
.msg .body p:last-child { margin-bottom: 0; }
.msg .body pre { background: var(--rail); color: #E4E8EE; padding: .8rem 1rem; border-radius: var(--radius-s); overflow-x: auto; font-size: .86rem; }
.msg .body code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .05rem .3rem; border-radius: 4px; }
.msg .body pre code { background: none; padding: 0; }
.msg .body table { border-collapse: collapse; margin: .6rem 0; }
.msg .body td, .msg .body th { border: 1px solid var(--line); padding: .3rem .6rem; }
.msg .body blockquote { border-left: 3px solid var(--brass); margin: .5rem 0; padding-left: .9rem; color: var(--ink-2); }
.msg .tools { display: flex; gap: .2rem; margin-top: .3rem; opacity: 0; }
.msg:hover .tools, .msg:focus-within .tools { opacity: 1; }
.msg .tools .iconbtn { width: 30px; height: 30px; }
.msg .tools .iconbtn svg { width: 16px; height: 16px; }
.attach-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.attach { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: var(--radius-s); padding: .25rem .55rem; font-size: .84rem; background: var(--surface); max-width: 260px; }
.attach span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach button { border: 0; background: none; cursor: pointer; color: var(--ink-3); padding: 0 .1rem; }
.thinking { font-size: .86rem; color: var(--ink-3); border-left: 2px solid var(--line); padding-left: .7rem; margin-bottom: .5rem; white-space: pre-wrap; max-height: 8rem; overflow: auto; }
.caret::after { content: "▍"; color: var(--brass); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.composer { flex: none; padding: .6rem 1.2rem 1rem; background: linear-gradient(to bottom, transparent, var(--paper) 30%); }
.composer .box { max-width: 780px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: .5rem .5rem .5rem .9rem; box-shadow: var(--shadow); }
.composer .box:focus-within { border-color: var(--brass); }
.composer textarea:focus-visible { outline: none; }
.composer textarea, .composer textarea:focus { border: 0 !important; padding: .45rem 0; min-height: 2.6rem; max-height: 14rem; resize: none; box-shadow: none !important; background: transparent; }
.composer .bar { display: flex; align-items: center; gap: .3rem; }
.composer select { width: auto; padding: .3rem .5rem; font-size: .84rem; border-color: transparent; background: var(--surface-2); }
.composer .send { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--brass); color: var(--brass-ink); cursor: pointer; display: grid; place-items: center; }
.composer .send:disabled { opacity: .4; cursor: not-allowed; }
.composer .send svg { width: 18px; height: 18px; }
.composer .note { text-align: center; font-size: .76rem; color: var(--ink-3); margin-top: .4rem; }
.starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: 1.5rem; }
.starters button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: .8rem .9rem; cursor: pointer; font-size: .92rem; color: var(--ink-2); }
.starters button:hover { border-color: var(--brass); color: var(--ink); }
.starters b { display: block; color: var(--ink); margin-bottom: .1rem; }
.hello { padding-top: 12vh; }
.hello h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 400; }
@media (max-width: 600px) { .starters { grid-template-columns: 1fr; } }

/* ------------------------------------------------ création (image, vidéo, audio) */
.studio { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: 100%; min-height: 0; }
.studio .controls { border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding: 1.2rem; }
.studio .results { overflow-y: auto; padding: 1.2rem; min-width: 0; }
.ratio { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.ratio button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: .4rem 0 .3rem; cursor: pointer; display: grid; justify-items: center; gap: .25rem; font-size: .74rem; font-weight: 700; color: var(--ink-2); }
.ratio button i { display: block; border: 1.5px solid currentColor; border-radius: 2px; }
.ratio button[aria-pressed="true"] { border-color: var(--brass); color: var(--ink); background: var(--brass-soft); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.tile { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.tile img, .tile video { display: block; width: 100%; height: auto; aspect-ratio: auto; }
.tile .cap { padding: .5rem .6rem; font-size: .82rem; display: flex; justify-content: space-between; gap: .5rem; align-items: center; background: var(--surface); }
.tile .cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job { border: 1px dashed var(--line); border-radius: var(--radius); padding: .9rem; display: grid; gap: .5rem; background: var(--surface); }
.job .row { justify-content: space-between; }
.tracks { display: grid; gap: .6rem; }
.track { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: .8rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; }
.track .disc { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(from 30deg, var(--brass), var(--ink), var(--brass)); position: relative; }
.track .disc::after { content: ""; position: absolute; inset: 16px; border-radius: 50%; background: var(--surface); }
.track audio { width: 100%; height: 36px; margin-top: .3rem; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; height: auto; } .studio .controls { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ------------------------------------------------ cartes de statistiques */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.stat .v { font-family: var(--display); font-size: 1.7rem; font-weight: 500; line-height: 1.1; margin: .2rem 0 .4rem; }
.stat .l { font-size: .84rem; color: var(--ink-2); font-weight: 700; }
.svc { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.svc:last-child { border-bottom: 0; }
.ann { border-left: 3px solid var(--brass); padding: .5rem .9rem; background: var(--brass-soft); border-radius: 0 var(--radius-s) var(--radius-s) 0; margin-bottom: .6rem; }
.ann.maintenance { border-color: var(--alert); background: var(--alert-soft); }
.ann b { display: block; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: .5rem; }
.bars div { flex: 1; background: var(--brass); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars div:hover { filter: brightness(1.15); }
.bars-x { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-3); margin-top: .3rem; }
.logbox { font-family: var(--mono); font-size: .8rem; background: var(--rail); color: #D7DCE3; padding: 1rem; border-radius: var(--radius-s); overflow: auto; max-height: 60vh; white-space: pre-wrap; line-height: 1.45; }

/* ------------------------------------------------ mobile */
.bottom-nav { display: none; }
@media (max-width: 820px) {
  .app, .app.no-side { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .rail { display: none; }
  .side { position: fixed; inset: 0 20% 0 0; z-index: 50; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .app.no-side .side { display: flex; }
  .topbar { padding: 0 .6rem 0 .3rem; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar .path { display: none; }
  .bottom-nav { display: flex; justify-content: space-around; background: var(--rail); padding: .3rem 0 calc(.3rem + env(safe-area-inset-bottom)); }
  .bottom-nav a { color: var(--rail-ink); text-decoration: none; font-size: .66rem; font-weight: 700; display: grid; justify-items: center; gap: .1rem; padding: .25rem .4rem; border-radius: var(--radius-s); }
  .bottom-nav a svg { width: 21px; height: 21px; }
  .bottom-nav a[aria-current="page"] { color: #fff; background: var(--rail-active); }
  .wrap { padding: 1rem 16px 2rem; }
  .composer { padding: .5rem .6rem .6rem; }
  .studio .controls, .studio .results { padding: 1rem 16px; }
}
.scrim { position: fixed; inset: 0; background: rgba(14, 18, 24, .4); z-index: 40; }

/* ------------------------------------------------ administration */
.admin .rail a[aria-current="page"] { box-shadow: inset 3px 0 0 #D6A54A; }
.admin-tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.admin-tabs button { border: 0; background: none; padding: .6rem .8rem; font-weight: 700; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.admin-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brass); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .2rem 1rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .92rem; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.demo-banner { background: var(--brass); color: var(--brass-ink); text-align: center; font-size: .82rem; font-weight: 700; padding: .3rem 16px; }
