:root {
  color-scheme: light;
  font: 14px/1.5 system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
  --page: #f2f6fb; --paper: #fff; --quiet: #f8fafc; --edge: #dbe5f0; --control: #c6d4e4;
  --ink: #1d3046; --muted: #546982; --blue: #205fb1; --blue-dark: #174d94; --soft: #edf5ff; --focus: #2f76cd;
  --danger: #9e3438; --danger-bg: #fff3f2; --live: #196346; --live-bg: #ebf6ef;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
h1, h2, h3, p, ul { margin: 0; }
h1 { font-size: 25px; line-height: 1.28; font-weight: 690; letter-spacing: -.025em; }
h2 { font-size: 16px; line-height: 1.4; }
h3 { font-size: 14px; line-height: 1.35; font-weight: 650; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:where(a, button, input, textarea, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(calc(100% - 40px), 1080px); margin-inline: auto; }
.site-head { background: var(--paper); border-bottom: 1px solid var(--edge); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; min-width: 0; font-weight: 680; text-decoration: none; color: var(--ink); }
.icon { display: block; inline-size: 17px; block-size: 17px; flex: 0 0 17px; }
.brand .icon { inline-size: 21px; block-size: 21px; flex-basis: 21px; color: var(--blue); }
.main { padding-block: 24px 36px; }
.page-heading { margin-block-end: 14px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; }
.page-heading p { margin-top: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.panel { min-width: 0; padding: 15px; border: 1px solid var(--edge); border-radius: 13px; background: var(--paper); overflow-wrap: anywhere; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; }
.panel-head p { margin-top: 2px; }
.admin-grid { display: grid; grid-template-columns: minmax(305px, .82fr) minmax(0, 1.18fr); gap: 12px; align-items: start; }
.channel-list, .result-list { list-style: none; padding: 0; }
.channels .channel-list, .result-list { margin-top: 8px; }
.channel-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(95px,auto) auto; align-items: center; gap: 5px 12px; min-height: 65px; padding: 8px 0; border-top: 1px solid var(--edge); }
.channel-row:last-child { padding-bottom: 0; }
.public-channels .channel-row:first-child { border-top: 0; padding-top: 0; }
.channel-name { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; min-width: 0; gap: 8px; }
.channel-mark { width: 38px; aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; background: var(--soft); border: 1px solid #dce9f8; color: var(--blue-dark); font-size: 11px; font-weight: 700; }
.channel-mark.tun { color: #375270; background: #eff4fa; border-color: #e0eaf4; }
.channel-mark.standard { color: #45627e; background: #f3f6fa; border-color: #e3ebf4; }
code { font: 12px/1.45 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.channel-name code { display: block; color: var(--muted); margin-top: 2px; }
.row-version { min-width: 0; }
.version-line { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 6px; }
.version-line strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.row-action { justify-self: end; }
.row-action form { margin: 0; }
.state { display: inline-block; width: max-content; padding: 1px 6px; border-radius: 5px; color: #506782; background: #f0f4f8; white-space: nowrap; font-size: 12px; font-weight: 550; }
.state.live { color: var(--live); background: var(--live-bg); }
.state.state-error { color: var(--danger); background: var(--danger-bg); }
.contract, .results { margin-block: 12px; }
.contract-line { display: flex; gap: 8px; align-items: flex-start; margin-top: 5px; font-size: 13px; }
.contract-line .icon { margin-top: 2px; color: var(--blue); }
.contract-line p + p { margin-top: 3px; }
.result-list li { display: grid; grid-template-columns: 55px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 0; border-top: 1px solid var(--edge); }
.result-list li:last-child { padding-bottom: 0; }
.result-list strong { font-size: 13px; }
.release-detail { grid-column: 1 / -1; font-size: 13px; }
.release-detail summary { min-height: 30px; width: fit-content; max-width: 100%; padding: 4px 2px; color: var(--blue); cursor: pointer; }
.release-detail :where(p, code) { margin: 4px 0; }
.notes { white-space: pre-wrap; max-width: 76ch; }
.digest { display: block; color: var(--muted); }
.auth { max-width: 445px; margin: 2px auto 0; padding: 18px; }
.auth.setup { max-width: 520px; }
.auth > p { margin-top: 7px; }
.auth > .button { margin-top: 9px; }
.env { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 6px 8px; border-radius: 8px; background: var(--soft); color: var(--blue-dark); font-size: 12.5px; }
.secret { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--quiet); border: 1px solid var(--edge); border-radius: 9px; padding: 9px; margin: 10px 0 0; font-size: 13px; }
.form { display: grid; gap: 10px; margin: 10px 0 0; }
.field { display: grid; min-width: 0; gap: 3px; }
.field > :is(label, span), .field-label { color: var(--ink); font-size: 13px; font-weight: 640; }
.field small { margin-left: 4px; font-weight: 450; }
.field :where(input,textarea), .file-row input { display: block; min-width: 0; width: 100%; min-height: 36px; border: 1px solid var(--control); border-radius: 9px; padding: 6px 9px; background: var(--paper); color: var(--ink); }
.field :where(input,textarea)::placeholder { color: var(--muted); }
.field textarea { resize: vertical; }
.file-group { min-width: 0; }
.file-row { margin-top: 3px; }
.file-row input { padding: 2px 5px; font-size: 12.5px; }
.file-row input::file-selector-button { padding: 5px 9px; margin-inline-end: 8px; border: 0; border-radius: 6px; color: var(--blue-dark); background: var(--soft); font: inherit; cursor: pointer; }
#file-summary { margin-top: 4px; }
#file-summary.bad { color: var(--danger); }
.limit-note { margin-top: 6px; }
.pass-field { display: grid; min-width: 0; grid-template-columns: minmax(0,1fr) auto; border: 1px solid var(--control); border-radius: 9px; background: var(--paper); }
.pass-field:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.field .pass-field input { border: 0; outline: 0; grid-column: 1; grid-row: 1; background: transparent; }
.pass-toggle { position: relative; grid-column: 2; grid-row: 1; display: grid; width: 38px; min-height: 36px; padding: 0; place-items: center; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }
.pass-toggle:hover { background: var(--quiet); color: var(--blue); }
.captcha-row { display: grid; grid-template-columns: minmax(48px,1fr) auto auto; align-items: center; gap: 6px; }
.captcha-row img { display: block; inline-size: 138px; block-size: 36px; object-fit: contain; border-radius: 7px; background: var(--soft); }
.captcha-row img[aria-busy=true] { opacity: .6; }
.check { display: flex; gap: 7px; align-items: center; position: relative; width: max-content; max-width: 100%; min-height: 36px; font-size: 13px; cursor: pointer; }
.check input { position: absolute; inline-size: 17px; block-size: 17px; inset-inline-start: 0; margin: 0; opacity: 0; }
.check .icon { border: 1px solid #829cb9; border-radius: 4px; background: var(--paper); }
.check svg path { opacity: 0; }
.check input:checked + .icon { background: var(--blue); color: #fff; border-color: var(--blue); }
.check input:checked + .icon path { opacity: 1; }
.check input:focus-visible + .icon { outline: 2px solid var(--focus); outline-offset: 2px; }
.actions { display: flex; align-items: center; gap: 5px 8px; flex-wrap: wrap; }
.actions > a:not(.button) { display: inline-flex; align-items: center; min-height: 36px; font-size: 13px; }
.button { position: relative; isolation: isolate; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 5px; min-height: 36px; width: max-content; max-width: 100%; padding: 5px 10px; border: 0; border-radius: 9px; text-decoration: none; white-space: nowrap; font-weight: 640; font-size: 13px; line-height: 1.2; background: transparent; }
.button::before { content: ''; position: absolute; z-index: -1; inset: 1px 0; border: 1px solid var(--button-border, transparent); border-radius: 8px; background: var(--button-fill, transparent); }
.button .icon { inline-size: 16px; block-size: 16px; flex-basis: 16px; }
.button.primary { color: white; --button-fill: var(--blue); --button-border: var(--blue); }
.button.primary:hover { --button-fill: var(--blue-dark); }
.button.quiet { color: var(--blue-dark); --button-fill: var(--paper); --button-border: var(--edge); }
.button.quiet:hover { --button-fill: var(--soft); }
.button:active { --button-border: #92add0; }
.button:disabled { color: var(--muted); --button-fill: #eff3f8; --button-border: var(--edge); }
.button.icon-button { width: 36px; padding: 0; }
.feedback { padding: 7px 9px; color: var(--blue-dark); background: var(--soft); border: 1px solid #cbdff5; border-radius: 8px; margin: 0 0 10px; font-size: 13px; }
.feedback.error { color: var(--danger); background: var(--danger-bg); border-color: #f1d2cf; }
.auth .feedback { margin: 8px 0 0; }
@media (max-width: 840px) {
  .admin-grid { grid-template-columns: minmax(0,1fr); }
  .channel-row { grid-template-columns: minmax(0,1fr) minmax(125px,auto) auto; }
}
@media (max-width: 550px) {
  .shell { width: calc(100% - 22px); }
  .main { padding-block-start: 14px; }
  h1 { font-size: 20px; }
  .panel { padding: 11px; }
  .page-heading { margin-block-end: 9px; }
  .admin-grid { gap: 9px; }
  .head-row { min-height: 51px; }
  .channel-row { grid-template-columns: minmax(0,1fr) auto; gap: 2px 8px; padding: 6px 0; }
  .channel-name { grid-column: 1; grid-template-columns: 32px minmax(0,1fr); gap: 6px; }
  .channel-mark { width: 32px; }
  .row-version { grid-area: 2 / 1; padding-inline-start: 38px; }
  .row-action { grid-area: 1 / 2 / span 2; }
  .row-action:empty { display: none; }
  .release-detail { margin-inline-start: 38px; }
  .release-detail summary, .actions > a:not(.button), .check { min-height: 44px; display: inline-flex; align-items: center; }
  .release-detail summary { display: list-item; align-content: center; }
  .button { min-height: 44px; }
  .button::before { inset-block: 5px; }
  .button.icon-button { width: 44px; }
  .button.icon-button::before { inset-inline: 5px; }
  .pass-toggle { width: 44px; min-height: 44px; }
  .field :where(input, textarea), .file-row input { min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .main:not(.cloud-main), .cloud-main[data-view-enter] { animation: enter-body 160ms ease-out; }
  @keyframes enter-body { from { opacity: 0; } to { opacity: 1; } }
}

/* Administrative workspace: translucent control surfaces, solid content and forms. */
.admin-body {
  --canvas-start:#e7eef8; --canvas-end:#f2f6fb;
  --glass-fallback:#f6f9fe; --glass-edge:#cbd9ea; --rail-width:156px; --head-height:56px;
  background: radial-gradient(ellipse at 3% 2%, #dce9fb 0, transparent 54%), linear-gradient(155deg,var(--canvas-start),var(--canvas-end) 62%);
  background-attachment: fixed;
}
.admin-body .shell { width: min(calc(100% - 46px), 1220px); }
.head-start { display:flex; align-items:center; min-width:0; gap:4px; }
.cloud-glass {
  border:1px solid var(--glass-edge);
  background:var(--glass-fallback);
  box-shadow:0 3px 14px #1f416312, inset 0 1px #ffffff;
}
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .cloud-glass {
    background:radial-gradient(ellipse at 50% 0,#ffffffb8,transparent 70%), linear-gradient(163deg,#f8fbffb0,#f5f9ff82);
    -webkit-backdrop-filter:blur(13px) saturate(115%); backdrop-filter:blur(13px) saturate(115%);
  }
}
.admin-body .site-head { position:sticky; inset-block-start:0; z-index:3; border-width:0 0 1px; }
.admin-body .head-row { min-height:var(--head-height); }
.admin-body .brand { font-size:15px; }
.admin-body .brand .icon { color:#205eae; }
.cloud-shell { display:grid; grid-template-columns:var(--rail-width) minmax(0,1fr); align-items:start; gap:20px; padding-top:19px; }
.cloud-shell[data-collapsed] { --rail-width:60px; }
.cloud-main { min-width:0; padding-block:1px 32px; }
.cloud-main > .page-heading { min-height:54px; margin-block-end:13px; }
.cloud-main .panel { box-shadow:0 2px 9px #213b5910; }
.cloud-sidebar { position:sticky; top:calc(var(--head-height) + 19px); border-radius:17px; min-width:0; padding:7px; max-height:calc(100dvh - var(--head-height) - 38px); display:flex; flex-direction:column; }
.side-heading { display:flex; align-items:center; min-height:34px; justify-content:space-between; gap:4px; padding:0 1px 0 9px; color:var(--muted); font-size:12px; font-weight:650; }
.side-nav { display:flex; flex-direction:column; gap:3px; min-height:0; overflow-y:auto; overscroll-behavior:contain; margin-top:2px; padding:2px; }
.side-link { display:flex; align-items:center; gap:10px; min-width:0; min-height:38px; border:1px solid transparent; border-radius:10px; padding:0 8px; color:#3e5876; text-decoration:none; white-space:nowrap; font-size:13px; font-weight:620; }
.side-link .icon { flex:0 0 17px; margin-inline:1px; }
.side-link:hover { background:#fff9; }
.side-link[aria-current=page] { color:#174e95; background:linear-gradient(170deg,#fbfdff,#e1ecfb); border-color:#c8dbf2; box-shadow:inset 0 1px #fff; }
.side-link:focus-visible { outline-offset:-2px; }
.side-collapse, .side-close, .nav-mobile { display:grid; place-items:center; width:32px; height:32px; padding:0; color:var(--muted); border:0; background:transparent; border-radius:9px; }
.side-collapse:hover, .side-close:hover, .nav-mobile:hover { background:#fff9; color:var(--blue-dark); }
.side-close, .nav-mobile, .nav-backdrop { display:none; }
.cloud-shell[data-collapsed] .side-heading { justify-content:center; padding:0; }
.cloud-shell[data-collapsed] .side-heading > span { display:none; }
.cloud-shell[data-collapsed] .side-collapse .icon { transform:rotate(180deg); }
.cloud-shell[data-collapsed] .side-link { justify-content:center; padding:0; }
.cloud-shell[data-collapsed] .side-link > span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.settings-panel { max-width:495px; }
.settings-panel > .feedback { margin:8px 0 0; }
.source-status { display:flex; gap:10px; align-items:center; min-height:58px; padding:9px 14px; border-radius:14px; margin-bottom:12px; }
.source-status .icon { color:var(--blue-dark); }
.source-status strong { font-size:13px; }
.records-head, .music-editor-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:5px 12px; }
.records-head { margin-bottom:10px; }
.records-head p { margin-top:1px; }
.records-tools, .catalog-search { min-width:0; display:flex; align-items:center; gap:5px 8px; flex-wrap:wrap; }
.records-tools .button { min-height:32px; }
.music-search { display:grid; grid-template-columns:16px minmax(0,1fr); align-items:center; gap:8px; padding-inline:9px 8px; border:1px solid var(--control); border-radius:9px; background:var(--paper); min-width:0; height:30px; }
.music-search .icon { width:16px; height:16px; color:var(--muted); }
.music-search input { width:100%; height:100%; appearance:none; min-width:0; margin:0; padding:0; border:0; border-radius:0; outline:0; background:transparent; color:var(--ink); font-size:13px; }
.music-search input::placeholder { color:var(--muted); }
.music-search input::-webkit-search-cancel-button { appearance:none; }
.music-search:focus-within { outline:2px solid var(--focus); outline-offset:1px; }
.catalog-search .music-search { width:clamp(126px,17vw,180px); }
.music-records { list-style:none; padding:0; }
.music-row { display:grid; grid-template-columns:35px minmax(0,1fr) auto auto; align-items:center; min-height:58px; gap:7px 10px; border-top:1px solid var(--edge); padding:5px 0; }
.record-icon { display:grid; place-items:center; width:35px; aspect-ratio:1; border-radius:10px; background:var(--soft); color:var(--blue-dark); }
.record-text { min-width:0; }
.record-text p { overflow-wrap:anywhere; margin-top:1px; }
.record-actions { display:flex; align-items:center; justify-self:end; gap:2px; }
.empty-records { border-top:1px solid var(--edge); color:var(--muted); padding:15px 4px 9px; }
.empty-records strong { color:var(--ink); }
.empty-records p { margin-top:3px; }
.entity-dialog { color:var(--ink); background:var(--paper); border:1px solid var(--glass-edge); border-radius:17px; box-shadow:0 15px 45px #1c365d2b; padding:16px; width:min(560px,calc(100% - 24px)); max-width:none; max-height:calc(100dvh - 28px); overflow:auto; overscroll-behavior:contain; }
.entity-dialog::backdrop { background:#20364e45; }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.dialog-heading h2 { font-size:17px; }
.entity-dialog .feedback { margin:6px 0 0; }
.dialog-actions { justify-content:flex-end; margin-top:2px; }
.delete-copy { display:grid; gap:9px; margin-top:8px; }
.delete-copy .dialog-actions { margin-top:8px; }
.danger-button { --button-fill:#faeeee; --button-border:#e9c8ca; color:#9b3035; }
.danger-button:hover { --button-fill:#f8e4e6; }
.fields-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; }
.source-chooser { display:grid; min-width:0; gap:7px; margin:0; padding:0; border:0; }
.source-chooser legend { font-weight:640; font-size:13px; margin-bottom:4px; padding:0; }
.source-segments { display:inline-flex; align-items:center; justify-self:start; padding:3px; border:1px solid var(--edge); border-radius:10px; background:#edf2f8; }
.source-segments label { position:relative; cursor:pointer; }
.source-segments input { position:absolute; inset:0; width:100%; height:100%; opacity:0; margin:0; cursor:inherit; }
.source-segments label span { display:flex; align-items:center; border:1px solid transparent; min-height:30px; border-radius:7px; padding:0 10px; color:var(--muted); font-size:13px; white-space:nowrap; }
.source-segments input:checked + span { background:var(--paper); border-color:#d1deef; color:var(--blue-dark); font-weight:640; }
.source-segments input:focus-visible + span { outline:2px solid var(--focus); outline-offset:0; }
.audio-input .small { margin-top:4px; }
.check-options { display:flex; align-items:center; flex-wrap:wrap; gap:0 16px; }
.music-check { width:auto; }
.music-check input:indeterminate + .icon { background:var(--blue); border-color:var(--blue); position:relative; }
.music-check input:indeterminate + .icon path { display:none; }
.music-check input:disabled + .icon { opacity:.45; }
.member-stack { max-height:min(32dvh,245px); overflow:auto; overscroll-behavior:contain; border:1px solid var(--edge); padding-inline:8px; border-radius:9px; }
.member-row { display:grid; grid-template-columns:minmax(0,1fr) 58px; gap:6px; align-items:center; min-height:44px; padding-block:2px; }
.member-row + .member-row { border-top:1px solid var(--edge); }
.member-row .check span { min-width:0; overflow-wrap:anywhere; }
.member-row small { display:block; }
.member-row > input { width:100%; color:var(--ink); border:1px solid var(--control); border-radius:7px; min-height:33px; padding-inline:6px; background:var(--paper); text-align:center; font-size:12px; }
.member-row > input:disabled { color:var(--muted); background:var(--quiet); }
@media (min-width:841px) {
  .cloud-main .admin-grid { grid-template-columns:minmax(272px,.82fr) minmax(0,1.18fr); }
}
@media (max-width: 720px) {
  .admin-body { --head-height:52px; }
  .admin-body .shell { width:calc(100% - 22px); }
  .cloud-shell { display:block; padding-top:13px; }
  .cloud-main > .page-heading { min-height:45px; margin-bottom:9px; }
  .side-collapse { display:none; }
  .side-close, .nav-mobile { display:grid; place-items:center; width:44px; height:44px; }
  .nav-mobile { margin-inline-start:-7px; }
  .nav-mobile .icon { width:19px; height:19px; }
  .admin-body .head-row .button { padding-inline:7px; }
  .cloud-sidebar { position:fixed; z-index:6; inset:7px auto 7px 7px; width:min(240px,calc(100vw - 25px)); max-height:none; border-radius:16px; visibility:hidden; transform:translateX(calc(-100% - 10px)); }
  .cloud-shell[data-drawer-open] .cloud-sidebar { visibility:visible; transform:none; }
  .nav-backdrop:not([hidden]) { display:block; position:fixed; inset:0; z-index:5; background:#21385652; border:0; border-radius:0; }
  .admin-body:has([data-drawer-open]) { overflow:hidden; }
  .side-nav { gap:3px; }
  .side-link { min-height:44px; padding-inline:9px; }
  .cloud-shell[data-collapsed] .side-heading { justify-content:space-between; padding-inline-start:9px; }
  .cloud-shell[data-collapsed] .side-heading > span { display:initial; }
  .cloud-shell[data-collapsed] .side-link { justify-content:flex-start; padding-inline:9px; }
  .cloud-shell[data-collapsed] .side-link > span { position:static; width:auto; height:auto; clip-path:none; }
  .records-tools { justify-content:flex-start; }
}
@media (max-width:550px) {
  .source-status { padding-inline:10px; min-height:51px; }
  .records-head { gap:4px; }
  .records-tools, .catalog-search { gap:2px 5px; }
  .records-tools .button { min-height:44px; }
  .music-search { height:36px; }
  .music-row { grid-template-columns:29px minmax(0,1fr) auto; gap:1px 6px; }
  .record-icon { width:29px; grid-row:1 / span 2; }
  .record-text { grid-column:2; padding-top:3px; }
  .music-row .state { grid-column:2; margin-block-end:2px; }
  .record-actions { grid-area:1 / 3 / span 2; }
  .record-actions .button { width:44px; }
  .entity-dialog { padding:11px; }
  .entity-form { gap:9px; }
  .source-segments label span { min-height:38px; }
  .member-row > input { min-height:44px; }
}
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .admin-body { background:var(--page); }
  .cloud-glass { background:var(--glass-fallback); box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; }
}
@media (forced-colors: active) {
  .side-link[aria-current=page] { border-color:Highlight; }
  .source-segments input:checked + span { border-color:Highlight; }
}
