:root {
  color-scheme: dark;
  --bg: #100b1b;
  --panel: #1a1129;
  --line: #44304e;
  --text: #f7f4fb;
  --muted: #b9a8c9;
  --accent: #ff91d5;
  font-family: Poppins, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); line-height: 1.55; }
header { border-bottom: 1px solid var(--line); background: #130c20; }
nav { display: flex; align-items: center; gap: 1.4rem; min-height: 4.4rem; }
nav form { margin-left: auto; }
nav, main { width: min(1120px, calc(100% - 2.5rem)); margin: auto; }
main { padding: 2rem 0 4rem; }
a { color: var(--accent); }
.brand { color: var(--text); font-weight: 900; font-size: 1.3rem; text-decoration: none; letter-spacing: .08em; }
.brand span { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.1; letter-spacing: -.05em; }
h2 { font-size: 1.3rem; margin-bottom: .85rem; }
h3 { overflow-wrap: anywhere; }
p, .project-link span, .quota span { color: var(--muted); }
p + form, p + a { margin-top: 1rem; }
.intro { border-bottom: 1px solid var(--line); padding: 1rem 0 2rem; margin-bottom: 1.5rem; }
.intro p { margin-top: .55rem; }
section { margin-bottom: 1.25rem; }
.panel, .notice { border: 1px solid var(--line); padding: 1.25rem; border-radius: .9rem; background: var(--panel); }
.notice { margin-bottom: 1rem; border-color: var(--accent); }
.split, .project-grid, .media-grid, .quota-grid { display: grid; gap: 1rem; }
.split { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.project-grid, .media-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.quota-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.project-link { display: grid; gap: .3rem; color: var(--text); text-decoration: none; }
.project-link:hover { border-color: var(--accent); }
.project-link strong { font-size: 1.2rem; }
label, progress { display: block; width: 100%; }
label, .quota span, .media-card p { font-size: .9rem; }
label { margin-bottom: .7rem; }
input, button, .button { font: inherit; }
input { width: 100%; display: block; margin-top: .25rem; border-radius: .45rem; border: 1px solid var(--line); background: var(--bg); padding: .55rem .65rem; color: var(--text); }
input[type=file] { border-style: dashed; padding: 1rem; }
input::file-selector-button { padding: .3rem .6rem; margin-right: .55rem; }
button, .button { display: inline-block; border: 1px solid transparent; border-radius: .45rem; background: var(--accent); color: #20121d; font-weight: 700; padding: .48rem .75rem; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { filter: brightness(1.15); }
button.secondary { color: var(--text); background: #261737; border-color: var(--line); }
button.danger { background: transparent; color: var(--accent); border-color: var(--line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.inline, .invite-row, .library-heading { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.inline input { flex: 1 1 12rem; }
.invite-row { justify-content: space-between; border-top: 1px solid var(--line); padding-top: .65rem; margin-top: .65rem; font-size: .9rem; }
.library-heading { justify-content: space-between; }
.quota { min-width: min(100%, 245px); }
progress { accent-color: var(--accent); margin: .4rem 0; }
.media-card { display: grid; gap: .65rem; align-content: start; }
.media-preview { display: grid; place-items: center; aspect-ratio: 16/9; overflow: hidden; background: var(--bg); border-radius: .45rem; }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: contain; }
.media-preview audio { width: 95%; }
.help { margin-top: 1.5rem; scroll-margin-top: 1rem; }
.help details, .context-help { border-top: 1px solid var(--line); padding: .65rem 0; }
details summary { cursor: pointer; color: var(--accent); }
details[open] p { margin-top: .55rem; }
nav { flex-wrap: wrap; padding-block: .6rem; }
.media-pagination { justify-content: space-between; margin-block: .8rem 1rem; }
.media-pagination label { display: flex; align-items: center; gap: .45rem; width: auto; margin: 0; }
.media-pagination select { font: inherit; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 1rem; }
.opening-chart, .media-stats { list-style: none; padding: 0; margin-bottom: 0; }
.opening-chart { max-height: 22rem; overflow: auto; }
.opening-chart li { display: grid; grid-template-columns: minmax(4rem, auto) minmax(2rem, 1fr) minmax(2rem, auto); align-items: center; gap: .5rem; padding: .25rem 0; font-size: .9rem; }
.opening-chart meter { width: 100%; }
.opening-chart strong { text-align: right; }
.media-stats li { display: flex; justify-content: space-between; gap: .8rem; border-top: 1px solid var(--line); padding-block: .5rem; overflow-wrap: anywhere; }
[aria-current="true"] { color: var(--text); font-weight: 700; }
.table-scroll { overflow-x: auto; margin-bottom: 1rem; }
.accounts-table { border-collapse: collapse; width: 100%; text-align: left; }
.accounts-table th, .accounts-table td { border-bottom: 1px solid var(--line); padding: .65rem; vertical-align: top; }
.accounts-table small { display: block; color: var(--muted); }
.accounts-table td:last-child { min-width: 13rem; }
.accounts-table form, .accounts-table details { margin-top: .45rem; }
.account-blocked { color: var(--accent); }
.activity-chart { display: block; width: 100%; margin-top: .55rem; }
.activity-chart rect { fill: var(--accent); }
.activity-chart text { fill: var(--muted); font-size: 11px; }
.activity-chart .chart-gridline { fill: none; stroke: var(--line); stroke-width: 1; }
