@font-face {
  font-family: Manrope;
  src: url('/assets/manrope.woff2') format('woff2');
  font-display: swap;
  font-weight: 200 800;
}

:root {
  color-scheme: light;
  --canvas: oklch(96% .01 230);
  --ink: oklch(28% .025 235);
  --muted: oklch(47% .025 235);
  --blue: oklch(43% .105 240);
  --blue-deep: oklch(36% .1 240);
  --blue-wash: oklch(93% .025 230 / .65);
  --line: oklch(60% .025 230 / .2);
  --rim: oklch(99% .004 230 / .85);
  --surface: oklch(99% .006 230 / .55);
  --surface-solid: oklch(98% .006 230);
  --success: oklch(39% .09 170);
  --danger: oklch(43% .15 27);
  --glass-shadow: 0 10px 32px -18px oklch(36% .045 230 / .24), inset 0 1px 0 var(--rim), inset 0 -1px 0 oklch(76% .025 230 / .14);
  --radius: 20px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  font-family: Manrope, 'Microsoft YaHei UI', 'PingFang SC', sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, .button {
  min-height: 44px; padding: 10px 20px; border: 1px solid var(--rim); border-radius: 999px;
  background: oklch(99% .008 245 / .68); box-shadow: 0 2px 6px oklch(36% .08 250 / .05), inset 0 1px 0 var(--rim);
  font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; position: relative;
  transition: background .22s cubic-bezier(.22, 1, .36, 1), border-color .22s cubic-bezier(.22, 1, .36, 1), color .18s ease, box-shadow .26s cubic-bezier(.22, 1, .36, 1), transform .22s cubic-bezier(.22, 1, .36, 1);
}
button:hover:not(:disabled), .button:hover { background: oklch(100% 0 0 / .92); box-shadow: 0 6px 16px -4px oklch(36% .08 250 / .13), inset 0 1px 0 var(--rim); }
button:active:not(:disabled), .button:active { transform: scale(.98); transition-duration: .06s; }
button:disabled { cursor: not-allowed; opacity: .52; box-shadow: none; transform: none; }
button.primary, .button.primary { color: oklch(99% .004 230); background: linear-gradient(170deg, oklch(51% .105 235), var(--blue)); border-color: oklch(44% .08 235 / .5); box-shadow: 0 6px 16px -5px oklch(43% .11 235 / .34), inset 0 1px 0 oklch(84% .06 230 / .45); }
button.primary:hover:not(:disabled), .button.primary:hover { background: linear-gradient(170deg, oklch(45% .105 238), var(--blue-deep)); box-shadow: 0 8px 20px -5px oklch(38% .12 238 / .42), inset 0 1px 0 oklch(86% .06 230 / .5); }
button.ghost { background: transparent; border-color: transparent; box-shadow: none; }
button.ghost:hover:not(:disabled) { background: var(--blue-wash); box-shadow: none; }
button.small, .button.small { min-height: 36px; padding: 7px 14px; font-size: 12px; }
button.danger { color: var(--danger); }
button[data-copied=true] { color: var(--success) !important; border-color: oklch(65% .09 170 / .45) !important; background: oklch(95% .03 170 / .88) !important; }
button[aria-busy=true]:not(:has(.icon))::before { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .65s linear infinite; }
input, select {
  min-width: 0; width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: oklch(99% .003 230 / .65); box-shadow: inset 0 1px 3px oklch(36% .04 230 / .02);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
input:hover, select:hover { border-color: oklch(57% .09 250 / .45); }
input:focus, select:focus { background: oklch(100% 0 0 / .85); }
input::placeholder { color: oklch(50% .035 250); opacity: 1; }
input[readonly], input:disabled, select:disabled { background: oklch(92% .018 250 / .6); }
input[type=number] { font-variant-numeric: tabular-nums; }
input[type=checkbox] { width: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--blue); box-shadow: none; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; }
p, h1, h2, h3 { margin: 0; }
h1 { font-size: 32px; line-height: 1.35; letter-spacing: -1px; font-weight: 650; }
h2 { font-size: 21px; line-height: 1.45; letter-spacing: -.5px; }
h3 { font-size: 16px; }
p { max-width: 72ch; }
::selection { background: oklch(80% .09 250 / .6); }
.muted, .help { color: var(--muted); }
.help { font-size: 12px; line-height: 1.9; }
.eyebrow { font-size: 10px; letter-spacing: 2.2px; font-weight: 750; color: var(--muted); }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 20% 15%, oklch(88% .045 205 / .6), transparent 55%), radial-gradient(ellipse at 90% 75%, oklch(91% .03 80 / .55), transparent 50%), var(--canvas); }

.sidebar, .parse-station, .quota-panel, .auth-panel {
  border: 1px solid var(--rim); background: var(--surface); border-radius: var(--radius); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2);
}
.glass-interactive { position: relative; isolation: isolate; }
.glass-interactive::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: radial-gradient(ellipse at var(--light-x, 25%) var(--light-y, 0%), oklch(100% 0 0 / .5), transparent 60%); opacity: .45; transition: opacity .3s; }
.glass-interactive:hover::before { opacity: 1; }
.app-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 24px; max-width: 1920px; min-height: 100dvh; margin: 0 auto; padding: 20px; }
.sidebar { grid-column: 1; grid-row: 1 / 3; position: sticky; top: 20px; height: calc(100dvh - 40px); padding: 24px 12px 20px; display: flex; flex-direction: column; background: oklch(99% .006 230 / .4); }
.brand { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; align-items: center; margin: 0 10px 32px; font-size: 23px; line-height: 1.2; font-weight: 750; }
.brand-symbol { grid-row: span 2; width: 40px; height: 40px; fill: none; stroke: var(--blue); stroke-width: 4.5; stroke-linecap: round; }
.brand-en { font-size: 8px; letter-spacing: 2px; margin-top: 7px; color: var(--muted); }
#brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-caption { color: var(--muted); padding: 0 20px; margin-bottom: 14px; font-size: 10px; letter-spacing: 2px; }
.navigation { display: flex; flex-direction: column; gap: 4px; }
.navigation a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: 13px; font-size: 13px; font-weight: 600; color: var(--muted); transition: color .18s, background .18s, box-shadow .18s; }
.navigation a:hover { color: var(--blue); background: oklch(100% 0 0 / .35); }
.navigation a[aria-current=page] { color: var(--blue); background: linear-gradient(150deg, oklch(100% 0 0 / .95), oklch(95% .025 250 / .5)); border-color: var(--rim); box-shadow: 0 4px 12px -3px oklch(36% .08 250 / .12), inset 0 1px 0 var(--rim); }
.navigation a[aria-current=page]::after { content: ''; width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: currentColor; }
.nav-active { display: none; }
.sidebar-bottom { margin: auto 14px 0; padding-top: 36px; color: var(--muted); font-size: 11px; }
.sidebar-monogram { display: none; }
.sidebar-bottom strong { color: var(--ink); font-weight: 500; }
.sidebar-bottom a { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: .5px; }
.workspace { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; min-width: 0; }
.topbar { grid-column: 2; grid-row: 1; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; padding: 0 8px; color: var(--muted); font-size: 11px; }
.breadcrumb-wrap { display: flex; align-items: center; gap: 10px; }
.workspace-dot { width: 7px; height: 7px; border: 1.5px solid var(--blue); border-radius: 50%; }
.account { display: flex; align-items: center; gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.appearance-button { color: var(--muted); font-size: 10px !important; gap: 6px; }
.appearance-button .icon { width: 16px; height: 16px; }
.appearance-button[aria-pressed=true] { color: var(--blue); }
.guest-label { font-size: 11px; }
.account-login { color: var(--blue); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--rim); border-radius: 50%; color: var(--blue); background: var(--surface); box-shadow: var(--glass-shadow); font-weight: 700; }
.account-name { color: var(--ink); font-weight: 650; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { flex: 1; width: 100%; min-width: 0; max-width: 1440px; margin: 0 auto; padding: 12px 8px 28px; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 12px 4px; color: var(--muted); font-size: 10px; letter-spacing: .25px; }
footer a { white-space: nowrap; }
.footer-divider { margin: 0 10px; opacity: .6; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 0 0 18px; }
.page-head .eyebrow { display: block; margin-bottom: 4px; }
.page-head p { color: var(--muted); margin-top: 5px; font-size: 13px; }

.parse-layout { display: grid; grid-template-columns: minmax(0, 1fr) 224px; gap: 20px; align-items: stretch; }
.parse-station { padding: 22px; }
.station-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.station-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 650; }
.station-title .icon { color: var(--blue); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid oklch(65% .07 170 / .15); border-radius: 999px; background: oklch(95% .025 170 / .7); color: var(--success); font-size: 10px; font-weight: 650; white-space: nowrap; }
.pill::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.pill.off { color: oklch(43% .09 55); border-color: oklch(70% .08 55 / .2); background: oklch(96% .025 70 / .8); }
.url-row { display: flex; gap: 10px; margin-top: 10px; }
.url-input { position: relative; flex: 1; min-width: 0; }
.url-row input { min-height: 48px; padding-right: 78px; font-size: 14px; border-radius: 12px; }
.url-row .clear-input, .url-row .paste-input { position: absolute; inset: 3px 3px 3px auto; min-height: 42px; border-radius: 10px; color: var(--muted); transition: opacity .18s ease, transform .18s cubic-bezier(.22, 1, .36, 1), background .18s; }
.url-row .clear-input { width: 42px; min-width: 42px; padding: 0; font-size: 21px; }
.url-row .paste-input { min-width: 68px; padding: 0 10px; font-size: 12px; gap: 5px; }
.url-row .paste-input .icon { width: 15px; height: 15px; }
.url-input input:placeholder-shown ~ .clear-input { visibility: hidden; opacity: 0; pointer-events: none; transform: scale(.86); }
.url-input input:not(:placeholder-shown) ~ .paste-input { visibility: hidden; opacity: 0; pointer-events: none; transform: scale(.86); }
.url-row > button { min-width: 132px; border-radius: 16px; }
.parse-options { display: flex; gap: 16px; align-items: flex-end; margin-top: 12px; }
.parse-advanced { margin-top: 6px; }
.parse-advanced summary { display: list-item; width: fit-content; min-height: 44px; padding-block: 11px; cursor: pointer; font-size: 12px; color: var(--muted); }
.service-state { margin-bottom: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--blue-wash); font-size: 12px; }
.service-state a { color: var(--blue); text-decoration: underline; }
.parse-options label { flex: 1; max-width: 200px; color: var(--muted); font-size: 11px; font-weight: 500; }
.parse-options input, .parse-options select { min-height: 40px; padding: 8px 12px; font-size: 12px; color: var(--ink); }
.station-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-list { display: flex; gap: 8px; flex-wrap: wrap; }
.site-badge { display: inline-block; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: oklch(100% 0 0 / .42); font-size: 10px; transition: border-color .18s, background .18s, transform .18s; }
.site-badge:hover { border-color: oklch(55% .08 240 / .35); background: oklch(100% 0 0 / .78); }
.quota-panel { padding: 22px; background: linear-gradient(145deg, oklch(98% .014 245 / .75), oklch(93% .04 250 / .45)); }
.quota-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; }
.quota-title .icon { width: 17px; height: 17px; color: var(--blue); }
.quota-numbers { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; margin-top: 16px; }
.quota-numbers strong { font-size: 32px; font-weight: 650; letter-spacing: -1.5px; line-height: 1.25; }
.quota-numbers span { color: var(--muted); font-size: 11px; }
meter { appearance: none; display: block; width: 100%; height: 5px; margin-top: 22px; border: 0; border-radius: 5px; background: oklch(82% .035 250 / .45); }
meter::-webkit-meter-bar { background: oklch(82% .035 250 / .45); border: 0; height: 5px; }
meter::-webkit-meter-optimum-value { background: var(--blue); border-radius: 5px; transition: width .35s cubic-bezier(.22, 1, .36, 1); }
meter::-moz-meter-bar { background: var(--blue); }
.quota-caption { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: 9px; color: var(--muted); }
.quota-lower { margin-top: 12px; }
.quota-lower a { display: flex; align-items: center; gap: 5px; min-height: 44px; font-size: 11px; color: var(--blue); font-weight: 650; }
.quota-lower .icon { width: 15px; height: 15px; }

.table-wrap, .creation-panel, .key-row, .management-row, .group-form, .stats, .secret-panel {
  border: 1px solid var(--line); border-radius: 14px; background: oklch(99% .006 230 / .6);
}
.result { margin-top: 24px; }
.result-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.result-heading .pill { margin-left: auto; }
.result-copy-summary .icon { width: 14px; height: 14px; }
.video-summary { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--rim); border-radius: 16px; margin-bottom: 12px; background: var(--surface); box-shadow: var(--glass-shadow); }
.video-summary>div { min-width: 0; }
.video-summary img { flex: none; width: 128px; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; background: var(--blue-wash); }
.video-summary h3 { font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
.video-summary p { color: var(--muted); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.media-collection { margin-top: var(--space-md); }
.collection-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.collection-heading h3 { margin-right: auto; font-size: 15px; }
.collection-heading .download-progress { flex-basis: 100%; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); align-items: start; gap: 12px; }
.media-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: transform .24s cubic-bezier(.22, 1, .36, 1), box-shadow .24s cubic-bezier(.22, 1, .36, 1), border-color .2s; }
.media-card:hover { border-color: oklch(58% .06 235 / .32); box-shadow: 0 12px 26px -16px oklch(36% .06 235 / .24); }
.media-preview, .media-placeholder { position: relative; width: 100%; height: 220px; background: var(--blue-wash); overflow: hidden; }
.media-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.media-preview img[data-loaded=true] { animation: fade-in .28s ease-out; }
.preview-fallback { display: grid; place-content: center; justify-items: center; gap: 8px; height: 100%; padding: 12px; color: var(--muted); font-size: 12px; }
.live-badge { position: absolute; top: 8px; right: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; background: var(--surface-solid); font-size: 10px; }
.media-entry { display: grid; gap: 8px; }
.media-entry+.media-entry { border-top: 1px solid var(--line); padding-top: 10px; }
.media-audio .media-placeholder { height: 64px; }
.media-placeholder { display: grid; place-items: center; color: var(--muted); }
.media-placeholder .icon { width: 32px; height: 32px; }
.media-card-info { display: grid; gap: 10px; padding: 12px; }
.media-card-info strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.media-card-info span:not(.download-progress) { color: var(--muted); font-size: 11px; }
.media-card-info .actions { justify-content: space-between; }
.media-card-info .actions .primary { flex: 1; }
@media (max-width: 560px) {
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .media-preview, .media-placeholder { height: 170px; }
  .media-card-info { padding: 8px; gap: 8px; }
  .media-card-info .actions { gap: 4px; }
  .media-card .small { min-height: 44px; padding: 7px 9px; }
  .media-card .actions .icon { width: 14px; height: 14px; }
  .collection-heading .actions { flex-wrap: wrap; }
  .collection-heading .small { min-height: 44px; }
}
@media (max-width: 340px) { .media-grid { grid-template-columns: 1fr; } }
.result-note { margin-top: 12px; }
.download-activity { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: var(--blue-wash); font-size: 12px; color: var(--muted); }
.table-wrap { width: 100%; overflow: auto; scrollbar-width: thin; scrollbar-color: oklch(69% .06 250 / .6) transparent; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { background: oklch(92% .025 250 / .45); color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .3px; white-space: nowrap; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: oklch(93% .035 250 / .26); }
td.code { font-size: 10px; font-variant-numeric: tabular-nums; }
.url-cell { max-width: 280px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .small { white-space: nowrap; }
.actions [data-action=download], .actions [data-action=download-media] { min-width: 96px; }
.actions [data-action=copy-stream], .actions [data-action=copy-media]:not([aria-label]) { min-width: 104px; }
.actions .icon { width: 15px; height: 15px; }
[aria-busy=true] { cursor: progress; }
.download-progress { display: block; max-width: 240px; margin-top: 8px; white-space: normal; font-variant-numeric: tabular-nums; }
.download-progress:not([data-progress]):has(.dp-text:empty) { display: none; }
.download-progress progress, .preview-wait progress { appearance: none; display: block; width: 100%; height: 4px; margin-top: 5px; border: 0; border-radius: 999px; overflow: hidden; background: oklch(82% .035 250 / .38); color: var(--blue); }
.download-progress progress::-webkit-progress-bar, .preview-wait progress::-webkit-progress-bar { background: oklch(82% .035 250 / .38); border-radius: 999px; }
.download-progress progress::-webkit-progress-value, .preview-wait progress::-webkit-progress-value { background: var(--blue); border-radius: 999px; transition: width .25s ease; }
.download-progress progress::-moz-progress-bar, .preview-wait progress::-moz-progress-bar { background: var(--blue); border-radius: 999px; }
.download-progress progress:indeterminate, .preview-wait progress:indeterminate { background: linear-gradient(90deg, oklch(82% .035 250 / .35) 15%, var(--blue) 50%, oklch(82% .035 250 / .35) 85%); background-size: 200% 100%; animation: progress-shimmer 1.15s ease-in-out infinite; }
.download-progress[data-progress=ready] progress::-webkit-progress-value { background: var(--success); }
.download-progress[data-progress=ready] progress::-moz-progress-bar { background: var(--success); }
.parse-feedback { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--glass-shadow); }
.parse-feedback .loading { padding: 0; font-size: 13px; }
.parse-feedback.error { border-color: oklch(76% .08 30 / .5); background: oklch(97% .02 30 / .8); }
.parse-feedback p { margin-top: 4px; color: var(--danger); font-size: 13px; overflow-wrap: anywhere; }
.parse-feedback small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.parse-feedback button { flex: none; }
.empty { padding: 64px 24px; text-align: center; background: oklch(99% .008 245 / .35); border: 1px solid var(--rim); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 18px; margin-bottom: 10px; }
.empty p { margin: 0 auto 24px; font-size: 13px; }
.notice { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; justify-content: space-between; align-items: center; gap: 12px; width: max-content; max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 10px 12px 10px 18px; border: 1px solid oklch(68% .08 250 / .32); border-radius: 999px; background: oklch(98% .018 245 / .9); color: var(--ink); box-shadow: 0 14px 34px -10px oklch(28% .06 250 / .18), inset 0 1px 0 var(--rim); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.notice.error { color: var(--danger); background: oklch(97% .02 30 / .94); border-color: oklch(76% .08 30 / .5); border-radius: 16px; }
.notice button { flex: none; width: 26px; min-width: 26px; min-height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; font-size: 18px; color: var(--muted); }
.notice button:hover:not(:disabled) { background: oklch(50% .03 240 / .1); color: var(--ink); box-shadow: none; transform: none; }
.notice .request { display: block; margin-top: 2px; font-size: 10px; font-weight: 500; opacity: .82; }
#content { position: relative; }
#content[aria-busy=true]::before {
  content: ''; position: absolute; top: -6px; left: 0; right: 0; height: 2px; border-radius: 999px; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  background-size: 200% 100%;
  /* Only reveal the busy hints if loading takes longer than a blink. */
  animation: busy-in .2s ease .3s forwards, progress-shimmer 1.1s linear infinite;
  pointer-events: none;
}
#content[aria-busy=true] > * { animation: busy-dim .2s ease .3s forwards; }
.loading { display: flex; align-items: center; gap: 12px; padding: 32px 0; color: var(--muted); }
.loading::before { content: ''; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
.form-stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1/-1; }
.form-actions { display: flex; align-items: center; gap: 14px; }
.check-label { display: flex; align-items: center; gap: 9px; min-height: 40px; font-weight: 500; }
.check-label input { flex: none; }
.creation-panel { padding: 12px 16px; margin-bottom: 16px; }
.creation-panel summary { min-height: 28px; cursor: pointer; font-weight: 650; font-size: 13px; color: var(--blue); }
.creation-panel[open] summary { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.creation-panel form { margin-top: 16px; }
.key-list, .management-list { display: grid; gap: 8px; }
.key-row { padding: 0; }
.key-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.key-top strong { font-size: 14px; }
.key-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.key-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, 180px); gap: 16px; align-items: flex-end; padding: 18px; border-top: 1px solid var(--line); }
.key-controls .form-actions { grid-column: 1/-1; justify-content: flex-end; }
.key-controls label { font-size: 11px; }
.key-controls .check-label { margin-right: auto; }
.secret-panel { padding: 24px; margin-bottom: 24px; background: oklch(94% .04 250 / .9); border-color: oklch(70% .08 250 / .4); }
.secret-panel h3 { margin-bottom: 8px; }
.secret-panel code { display: block; padding: 18px 0; font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); align-items: center; gap: 48px; max-width: 960px; margin: 36px auto; }
.auth-intro h1 { margin-top: 20px; font-size: 36px; line-height: 1.5; letter-spacing: -1.5px; font-weight: 600; }
.auth-intro p { margin-top: 16px; color: var(--muted); font-size: 13px; }
.auth-intro img { display: block; width: 250px; max-width: 90%; height: auto; margin-top: 12px; }
.auth-intro > a { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--blue); }
.auth-intro > a .icon { width: 16px; height: 16px; transform: rotate(180deg); }
.auth-panel { padding: 32px; }
.auth-panel h2 { font-size: 21px; margin-bottom: 24px; }
.auth-tabs { display: flex; padding: 4px; gap: 4px; margin-bottom: 26px; border: 1px solid var(--line); border-radius: 999px; background: oklch(87% .035 250 / .22); box-shadow: inset 0 1px 4px oklch(40% .05 250 / .05); }
.auth-tabs button { flex: 1; min-height: 36px; padding: 6px 12px; background: transparent; border-color: transparent; box-shadow: none; font-size: 12px; color: var(--muted); }
.auth-tabs .selected { background: oklch(100% 0 0 / .8); color: var(--blue); border-color: var(--rim); box-shadow: 0 2px 7px oklch(36% .08 250 / .08); }
.auth-panel .form-stack > button { margin-top: 4px; }
.auth-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; color: var(--muted); font-size: 10px; }
.auth-note .icon { width: 14px; height: 14px; }

.admin-layout { display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-content { min-width: 0; }
.admin-content .page-head { margin-bottom: 20px; }
.admin-content .page-head h1 { font-size: 26px; }
.admin-content .eyebrow { font-size: 9px; letter-spacing: 1px; }
.admin-nav { position: sticky; top: 32px; padding-top: 4px; }
.admin-nav-group { display: grid; gap: 2px; margin-bottom: 20px; }
.admin-nav-group:has(>span:only-child) { display: none; }
.admin-nav-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 0 4px; color: oklch(55% .02 235); font-size: 10px; font-weight: 750; letter-spacing: 1.6px; cursor: default; user-select: none; -webkit-user-select: none; pointer-events: none; }
.admin-nav-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.admin-nav-group > a { margin-left: 10px; padding-left: 14px; }
.admin-nav a { display: flex; align-items: center; min-height: 36px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; color: var(--muted); transition: color .18s, background .18s; }
.admin-nav a:hover { color: var(--blue); background: var(--blue-wash); }
.admin-nav a[aria-current=page] { color: var(--blue); border-color: var(--rim); background: var(--surface); font-weight: 700; }
.admin-mobile-nav { display: none; }
.record { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: oklch(99% .006 230 / .7); transition: border-color .18s, box-shadow .18s; }
.record:hover { border-color: oklch(58% .06 235 / .28); }
.record>summary { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 16px; cursor: pointer; list-style: none; }
.record>summary::-webkit-details-marker { display: none; }
.record>summary>span:first-child { flex: 1; min-width: 0; }
.record>summary strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.record>summary small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.record>summary::after { content: ''; flex: none; width: 6px; height: 6px; border-inline-end: 1px solid var(--muted); border-block-end: 1px solid var(--muted); transform: rotate(45deg); transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.record[open]>summary::after { transform: rotate(225deg); }
.record .management-row, .record .group-form { padding: 18px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.record .sub-actions { margin-bottom: 14px; }
.fixed-record { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 16px; font-size: 13px; }
.section-note { margin-top: 16px; }
.module-list { border: 1px solid var(--line); border-radius: 16px; background: oklch(99% .006 230 / .7); overflow: hidden; }
.module-item { padding: 20px; }
.module-item+.module-item { border-top: 1px solid var(--line); }
.module-item header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.module-item header>div { min-width: 0; }
.module-item h2 { font-size: 16px; overflow-wrap: anywhere; }
.module-item header p { margin-top: 4px; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.module-item header code { margin-right: 8px; }
.module-toggle { flex: none; gap: 8px; background: transparent; box-shadow: none; border-color: var(--line); }
.module-toggle>span { position: relative; width: 28px; height: 16px; border-radius: 10px; background: var(--line); transition: background .2s cubic-bezier(.22, 1, .36, 1); }
.module-toggle>span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-solid); transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.module-toggle[aria-checked=true] { color: var(--blue); }
.module-toggle[aria-checked=true]>span { background: var(--blue); }
.module-toggle[aria-checked=true]>span::after { transform: translateX(12px); }
.module-details { margin-top: 16px; font-size: 12px; }
.module-details summary { cursor: pointer; color: var(--muted); }
.module-details dl { display: grid; gap: 8px; margin: 16px 0; }
.module-details dl>div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; }
.module-details dt { color: var(--muted); }
.module-details dd { margin: 0; overflow-wrap: anywhere; }
.runtime-details { display: grid; gap: 0; font-size: 13px; }
.runtime-details>div { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.runtime-details dt { color: var(--muted); }
.runtime-details dd { margin: 0; overflow-wrap: anywhere; }
.module-config { display: flex; align-items: end; gap: 12px; padding: 12px 0; }
.module-config label { flex: 1; max-width: 320px; }
.module-config button { flex: none; }
.module-error { color: var(--danger); font-size: 12px; margin-top: 12px; }
input[type=file] { font-size: 12px; padding: 8px; }
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.toolbar input { max-width: 280px; }
.management-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: end; gap: 18px; padding: 24px; }
.management-row .identity { grid-column: 1/-1; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.identity strong { display: block; font-size: 15px; }
.identity small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.management-row label { font-size: 11px; }
.management-row > button { justify-self: start; }
.website-row { grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.5fr) 110px; }
.website-row > .help { grid-column: 1/-1; }
.module-row { grid-template-columns: minmax(180px, 1fr) auto auto; align-items: end; }
.sub-actions { padding: 12px 24px 4px; color: var(--muted); font-size: 11px; }
.sub-actions summary { cursor: pointer; }
.password-form { display: flex; align-items: end; gap: 12px; max-width: 480px; padding: 16px 0; }
.password-form label { flex: 1; }
.password-form button { white-space: nowrap; }
.permission-grid { min-width: 0; grid-column: 1/-1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; }
.permission-grid legend { padding: 0 8px; font-size: 11px; color: var(--muted); }
.permission-grid label { font-size: 12px; }
.group-form { padding: 24px; }
.group-form .actions { align-items: center; }
.group-form .actions .help { margin-right: auto; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; overflow: hidden; }
.stat { padding: 18px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat p { color: var(--muted); font-size: 11px; }
.stat strong { display: block; margin-top: 8px; font-size: 26px; line-height: 1.3; letter-spacing: -1px; font-weight: 650; font-variant-numeric: tabular-nums; }
.section-block { margin-top: 32px; }
.section-block h2 { margin-bottom: 18px; }
.section-block > p { margin-bottom: 16px; }
.section-block > button { margin-top: 20px; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 36px; }
.doc-layout > div { min-width: 0; }
.doc-section { margin-bottom: 36px; }
.doc-section h2 { font-size: 18px; margin-bottom: 16px; }
.doc-section p { color: var(--muted); font-size: 13px; margin-bottom: 14px; overflow-wrap: anywhere; }
.code-block { position: relative; margin-bottom: 14px; }
.code-block .copy-code { position: absolute; top: 10px; right: 10px; z-index: 2; color: oklch(90% .02 240); background: oklch(38% .045 250 / .72); border-color: oklch(70% .04 250 / .22); min-height: 30px; padding: 4px 10px; font-size: 11px; }
.code-block .copy-code:hover:not(:disabled) { background: oklch(46% .06 245 / .9); color: oklch(99% 0 0); }
.code-block .copy-code .icon { width: 13px; height: 13px; }
pre { max-width: 100%; overflow: auto; padding: 24px; border: 1px solid oklch(45% .07 250 / .3); border-radius: 20px; background: oklch(28% .045 255 / .95); color: oklch(94% .025 250); font-size: 12px; line-height: 1.9; tab-size: 2; box-shadow: 0 8px 24px -12px oklch(28% .06 250 / .25), inset 0 1px 0 oklch(70% .04 250 / .2); }
code { font-family: 'Cascadia Code', Consolas, monospace; }
p code, td code { padding: 2px 6px; border-radius: 5px; background: var(--blue-wash); font-size: 11px; }
.doc-aside { align-self: start; padding: 20px; border: 1px solid var(--rim); border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 11px; }
.doc-aside a { display: block; padding: 10px 0 0; color: var(--blue); font-weight: 600; }
details.headers { margin-top: 16px; font-size: 12px; }
details.headers summary { cursor: pointer; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; padding-top: 24px; color: var(--muted); font-size: 11px; }
.settings-form { max-width: 800px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.settings-switches { border-top: 1px solid var(--line); }
.settings-switch { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-switch label { display: block; font-size: 13px; }
.settings-switch small { display: block; color: var(--muted); font-size: 11px; margin-top: 5px; }
.settings-switch > input { appearance: none; flex: none; width: 42px; height: 25px; min-height: 25px; border: 1px solid oklch(63% .035 250 / .3); border-radius: 999px; background: oklch(84% .025 250); cursor: pointer; box-shadow: inset 0 1px 3px oklch(30% .05 250 / .1); transition: background .2s; }
.settings-switch > input::before { content: ''; display: block; width: 19px; height: 19px; margin: 2px; border-radius: 50%; background: oklch(99% .008 245); box-shadow: 0 1px 4px oklch(30% .05 250 / .2), inset 0 1px 0 var(--rim); transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.settings-switch > input:checked { background: var(--blue); border-color: var(--blue); }
.settings-switch > input:checked::before { transform: translateX(17px); }
.skip-link { position: fixed; top: -80px; left: 24px; z-index: 30; padding: 12px 20px; border-radius: 999px; background: var(--blue); color: oklch(99% .004 250); }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }
@keyframes notice-in { from { opacity: 0; transform: translate(-50%, -10px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes pane-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes view-in { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes busy-in { to { opacity: 1; } }
@keyframes busy-dim { to { opacity: .6; } }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlay-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes dialog-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.97); } }
@keyframes progress-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: no-preference) {
  .result, .parse-feedback { animation: reveal .36s cubic-bezier(.16, 1, .3, 1) both; }
  .rendition-table tbody tr { animation: reveal .34s cubic-bezier(.16, 1, .3, 1) both; }
  .rendition-table tbody tr:nth-child(2) { animation-delay: 32ms; }
  .rendition-table tbody tr:nth-child(3) { animation-delay: 64ms; }
  .rendition-table tbody tr:nth-child(n+4) { animation-delay: 96ms; }
  .media-card { animation: reveal .38s cubic-bezier(.16, 1, .3, 1) both; }
  .media-card:nth-child(2) { animation-delay: 35ms; }
  .media-card:nth-child(3) { animation-delay: 70ms; }
  .media-card:nth-child(4) { animation-delay: 105ms; }
  .media-card:nth-child(n+5) { animation-delay: 140ms; }
  .result-pane:not([hidden]) { animation: pane-in .18s ease both; }
  .preview-overlay:not([hidden]) { animation: overlay-in .2s ease both; }
  .preview-overlay:not([hidden]) .preview-dialog { animation: dialog-in .3s cubic-bezier(.16, 1, .3, 1) both; }
  .preview-overlay[data-closing=true] { animation: overlay-out .16s ease both; }
  .preview-overlay[data-closing=true] .preview-dialog { animation: dialog-out .16s ease both; }
  .notice { animation: notice-in .24s cubic-bezier(.22, 1, .36, 1) both; }
}

@media (min-width: 1500px) {
  .app-shell { grid-template-columns: 212px minmax(0, 1fr); column-gap: 28px; padding: 24px; }
  .sidebar { top: 24px; height: calc(100dvh - 48px); }
  main { padding-top: 16px; }
  .admin-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 32px; }
  .parse-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; }
  .parse-station, .quota-panel { padding: 24px; }
}
@media (max-width: 1150px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .admin-nav { display: none; }
  .admin-mobile-nav { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .admin-mobile-nav select { width: min(100%, 280px); }
  .app-shell { grid-template-columns: 194px minmax(0, 1fr); column-gap: 20px; padding: 20px; }
  .sidebar { top: 20px; height: calc(100dvh - 40px); padding-inline: 12px; }
  .brand { margin-inline: 8px; column-gap: 8px; }
  .navigation a { padding-inline: 14px; gap: 10px; font-size: 12px; }
  main { padding-inline: 4px; }
  .parse-layout { grid-template-columns: minmax(0, 1fr) 194px; gap: 16px; }
  .parse-station, .quota-panel { padding: 20px; }
  .url-row { flex-wrap: wrap; }
  .url-row .url-input { flex-basis: 100%; }
  .url-row > button { min-height: 44px; margin-left: auto; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .doc-aside { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
  .doc-aside a { padding: 0; }
  .auth-layout { gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
  .auth-intro h1 { font-size: 29px; }
  .auth-panel { padding: 28px; }
  .website-row { grid-template-columns: 1fr 1fr; }
  .stat { padding: 22px; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr; gap: 10px 8px; padding: 16px; }
  .sidebar { display: contents; }
  .sidebar::before { display: none; }
  .brand { grid-column: 1; grid-row: 1; grid-template-columns: 32px minmax(0, 1fr); align-self: center; max-width: 210px; margin: 0 4px; font-size: 20px; }
  .brand-symbol { width: 32px; height: 32px; }
  .brand-en { font-size: 7px; margin-top: 4px; }
  .nav-caption, .sidebar-bottom { display: none; }
  .navigation { grid-column: 1 / -1; grid-row: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 5px; border: 1px solid var(--rim); border-radius: 16px; background: var(--surface-solid); box-shadow: var(--glass-shadow); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root[data-material=glass] .navigation { background: var(--surface); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
  }
  .navigation a { min-width: 0; justify-content: center; gap: 6px; padding: 9px 4px; border-radius: 11px; min-height: 44px; white-space: nowrap; }
  .navigation a[aria-current=page]::after { display: none; }
  .navigation .icon { width: 18px; height: 18px; }
  .topbar { grid-column: 2; min-width: 0; min-height: 44px; justify-content: flex-end; padding: 0; }
  .breadcrumb-wrap, .guest-label { display: none; }
  .topbar-actions, .account { gap: 6px; }
  .appearance-button { min-width: 44px; min-height: 44px !important; padding: 8px !important; }
  .appearance-button span, .account .avatar { display: none; }
  .account-name { display: inline-flex; align-items: center; min-height: 44px; max-width: 80px; font-size: 12px; }
  .account button, .account .button { min-height: 44px; padding: 7px 10px; font-size: 12px; }
  .workspace { grid-column: 1 / -1; grid-row: 3; }
  main { padding: 4px 2px 24px; }
  .page-head { margin-bottom: 14px; }
  .page-head .eyebrow { display: none; }
  .page-head h1 { font-size: 26px; }
  footer { padding-inline: 8px; }
  .parse-layout { grid-template-columns: minmax(0, 1fr) 215px; }
  .url-row { flex-wrap: nowrap; }
  .url-row .url-input { flex-basis: auto; }
  .url-row > button { min-width: 112px; min-height: 48px; padding-inline: 16px; margin: 0; }
  .module-row { grid-template-columns: minmax(160px, 1fr) auto auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .auth-layout { max-width: 740px; margin-top: 20px; gap: 32px; }
}
@media (max-width: 680px) {
  .module-item { padding: 16px; }
  .module-toggle { min-height: 44px; }
  .admin-content .page-head h1 { font-size: 24px; }
  .rendition-table { display: block; min-width: 0; }
  .rendition-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .rendition-table tbody { display: block; }
  .rendition-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .rendition-table tr:last-child { border-bottom: 0; }
  .rendition-table td { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: 0; overflow-wrap: anywhere; }
  .rendition-table td::before { content: attr(data-label); font-size: 10px; color: var(--muted); }
  .rendition-table .rendition-actions { grid-column: 1/-1; }
  .rendition-table .rendition-quality { flex-direction: row; align-items: baseline; gap: 12px; }
  .rendition-quality::before { display: none; }
  .rendition-table td:nth-child(2) { flex-direction: row; justify-content: flex-end; align-items: baseline; flex-wrap: wrap; }
  .rendition-table td:nth-child(2)::before { margin-right: 4px; }
  .rendition-table td:nth-child(5) { grid-column: 1/-1; flex-direction: row; align-items: baseline; gap: 8px; }
  .rendition-quality strong { font-size: 18px; color: var(--blue); }
  .rendition-actions .actions { width: 100%; }
  .rendition-actions .actions button { flex: 1; min-height: 44px; }
  .rendition-actions::before { display: none; }
  .rendition-actions .download-progress { max-width: 100%; }
  .parse-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .quota-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 12px 18px 6px; }
  .quota-title { grid-column: 1; grid-row: 1; }
  .quota-numbers { grid-column: 2; grid-row: 1; justify-content: flex-end; margin: 0; }
  .quota-numbers strong { font-size: 25px; letter-spacing: -.7px; }
  .quota-panel meter { grid-column: 1 / -1; grid-row: 2; margin: 4px 0 0; }
  .quota-caption { grid-column: 1; grid-row: 3; justify-content: flex-start; flex-wrap: wrap; gap: 0 8px; margin: 0; font-size: 10px; }
  .quota-lower { grid-column: 2; grid-row: 3; margin: 0; }
  .quota-lower a { margin: 0; }
  .auth-layout { display: flex; flex-direction: column; align-items: stretch; gap: 28px; max-width: 440px; margin: 12px auto; }
  .auth-intro { position: relative; }
  .auth-intro img { display: none; }
  .auth-intro h1 { font-size: 30px; margin-top: 12px; }
  .auth-intro > a { margin-top: 14px; }
  .auth-panel { padding: 28px; }
}
@media (max-width: 480px) {
  button.small, .button.small, .navigation a, .auth-tabs button { min-height: 44px; }
  .app-shell { padding: 12px; }
  .brand { column-gap: 8px; }
  .brand-en { letter-spacing: 1px; font-size: 6px; }
  .navigation { gap: 2px; padding: 4px; }
  .navigation a { flex-direction: column; min-height: 54px; padding: 5px 2px; font-size: 11px; gap: 3px; }
  .navigation .icon { width: 16px; height: 16px; }
  .parse-station { padding: 16px; border-radius: 18px; }
  .station-top { margin-bottom: 12px; gap: 8px; }
  .station-title { font-size: 13px; gap: 8px; }
  .pill { font-size: 9px; padding: 4px 8px; }
  .url-row { flex-direction: column; gap: 8px; margin-top: 6px; }
  .url-row input { font-size: 16px; min-height: 48px; }
  .url-row > button { min-height: 44px; border-radius: 12px; }
  .parse-options { gap: 12px; margin-top: 2px; }
  .parse-options label { max-width: none; }
  .parse-options input, .parse-options select { min-height: 44px; font-size: 16px; }
  .quota-panel { padding-inline: 14px; border-radius: 18px; }
  .page-head { margin: 0 0 12px; gap: 12px; flex-wrap: wrap; }
  .page-head h1 { font-size: 24px; }
  .page-head p { font-size: 12px; }
  .video-summary { align-items: flex-start; padding: 12px; gap: 12px; }
  .video-summary img { width: 80px; aspect-ratio: 4/3; }
  .video-summary h3 { font-size: 14px; line-height: 1.5; }
  .video-summary p { font-size: 11px; }
  .parse-feedback { flex-wrap: wrap; padding: 14px; }
  .result-heading h2 { font-size: 20px; }
  table { min-width: 580px; }
  th, td { padding: 14px; font-size: 11px; }
  .table-wrap { border-radius: 18px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .creation-panel { padding: 12px 16px; }
  .group-form { padding: 16px; }
  .key-row { padding: 0; }
  .record>summary { padding: 12px 14px; gap: 10px; }
  .form-actions { flex-wrap: wrap; gap: 12px; }
  .key-top { align-items: flex-start; gap: 12px; }
  .key-meta { gap: 5px 10px; }
  .key-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .key-controls > label:first-child { grid-column: 1/-1; }
  .management-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px; gap: 16px; }
  .management-row > button { min-height: 44px; }
  .management-row > .help { grid-column: 1/-1; }
  .website-row > label:nth-child(2) { grid-column: 1/-1; grid-row: 2; }
  .module-row > label:first-child { grid-column: 1/-1; }
  .password-form { flex-direction: column; align-items: stretch; }
  .sub-actions { padding-inline: 20px; }
  .admin-mobile-nav select { min-height: 44px; }
  .toolbar { flex-wrap: wrap; align-items: end; }
  .toolbar > label { flex: 1; }
  .stats .stat { padding: 20px; }
  .stat strong { font-size: 28px; }
  .settings-form { padding: 18px; }
  .settings-switch { gap: 16px; }
  .settings-switch small { max-width: 25ch; }
  .permission-grid { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  pre { padding: 20px; border-radius: 18px; font-size: 11px; }
  .doc-aside { gap: 12px 18px; padding: 18px; }
  .doc-section h2 { font-size: 17px; }
  .doc-section p { font-size: 12px; }
  .auth-panel h2 { font-size: 20px; }
  .empty { padding: 48px 20px; }
  .notice { top: 12px; padding: 9px 10px 9px 14px; }
  .secret-panel { padding: 20px; }
  .secret-panel code { font-size: 11px; }
  .pagination { gap: 8px; font-size: 10px; }
  footer { padding: 16px 4px 4px; gap: 12px; font-size: 8px; }
  .footer-divider { margin-inline: 5px; }
}
@media (max-width: 360px) {
  .account-name { max-width: 58px; }
  .brand { grid-template-columns: 26px minmax(0, 1fr); column-gap: 5px; font-size: 18px; }
  .brand-symbol { width: 26px; height: 30px; }
  .navigation .icon { width: 14px; height: 14px; }
  .station-top .pill { font-size: 8px; padding-inline: 6px; }
  .quota-panel { gap: 0 12px; }
  .quota-title { font-size: 11px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar, .parse-station, .quota-panel, .auth-panel, .notice { background: var(--surface-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  :root:not([data-material=glass]) :is(.sidebar, .parse-station, .quota-panel, .auth-panel, .notice, .table-wrap, .creation-panel, .key-row, .management-row, .group-form, .stats, .settings-form, .record, .module-list) { background: var(--surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  :root:not([data-material=glass]) .glass-interactive::before { display: none; }
}
:root[data-material=solid] :is(.sidebar, .parse-station, .quota-panel, .auth-panel, .notice, .table-wrap, .creation-panel, .key-row, .management-row, .group-form, .stats, .settings-form, .record, .module-list) { background: var(--surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-material=solid] .glass-interactive::before { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .ambient { display: none; }
  .sidebar, .parse-station, .quota-panel, .auth-panel, .table-wrap, .creation-panel, .key-row, .management-row, .group-form, .stats, .settings-form { border-color: CanvasText; }
  .navigation a[aria-current=page], .admin-nav a[aria-current=page] { outline: 2px solid Highlight; }
  .settings-switch > input { appearance: auto; }
  .settings-switch > input::before { display: none; }
}

/* Result tabs */
.result-tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 4px 0 12px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 999px; background: oklch(87% .035 250 / .22); box-shadow: inset 0 1px 4px oklch(40% .05 250 / .05); scrollbar-width: none; }
.result-tabs::-webkit-scrollbar { display: none; }
.result-tabs .result-tab { min-height: 34px; padding: 5px 16px; gap: 6px; border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.result-tabs .result-tab em { min-width: 18px; padding: 0 6px; border-radius: 999px; background: oklch(100% 0 0 / .6); color: var(--muted); font-size: 10px; font-style: normal; line-height: 18px; }
.result-tabs .result-tab:hover:not(:disabled) { background: oklch(100% 0 0 / .45); box-shadow: none; transform: none; }
.result-tabs .result-tab[aria-selected=true], .result-tabs .result-tab[aria-selected=true]:hover:not(:disabled) { border-color: var(--rim); background: oklch(100% 0 0 / .88); color: var(--blue); box-shadow: 0 2px 8px oklch(36% .08 250 / .1); }
.result-tabs .result-tab[aria-selected=true] em { background: var(--blue-wash); color: var(--blue); }
.result-pane { min-width: 0; }
.result-pane > * + * { margin-top: 12px; }
.collection-heading { margin-bottom: 0; }

/* Info and cover panes */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.info-grid > div { padding: 12px 16px; background: oklch(99% .006 230 / .86); }
.info-grid dt { color: var(--muted); font-size: 11px; }
.info-grid dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.info-description { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: oklch(99% .006 230 / .6); }
.info-description h3 { margin-bottom: 6px; font-size: 13px; }
.info-description p { max-width: none; max-height: 220px; overflow: auto; color: var(--muted); font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.info-link { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; }
.info-link > span { flex: none; color: var(--muted); }
.info-link > a { flex: 1; min-width: 0; overflow: hidden; color: var(--blue); text-overflow: ellipsis; white-space: nowrap; }
.info-link > a:hover { text-decoration: underline; }
.cover-stage { display: grid; justify-items: start; gap: 14px; }
.cover-open { display: block; width: min(100%, 480px); min-height: 0; padding: 0; overflow: hidden; border-radius: 16px; cursor: zoom-in; }
.cover-open img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; }

/* Image card enlarge trigger */
.live-badge { z-index: 2; pointer-events: none; }
.preview-trigger { position: absolute; inset: 0; z-index: 1; display: none; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: zoom-in; }
.media-preview:has(img[data-loaded=true]) .preview-trigger { display: block; }
.preview-trigger:hover:not(:disabled) { background: oklch(25% .04 245 / .14); box-shadow: none; transform: none; }

/* Preview dialog */
html { scrollbar-gutter: stable; }
body:has(.preview-overlay:not([hidden])) { overflow: hidden; }
.preview-overlay { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 24px; background: oklch(24% .04 245 / .5); -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15); cursor: zoom-out; }
.preview-overlay[data-closing=true] { pointer-events: none; }
.preview-dialog { display: flex; flex-direction: column; width: min(960px, 100%); max-height: min(88dvh, 920px); overflow: hidden; border: 1px solid var(--rim); border-radius: 22px; background: oklch(98% .01 235 / .94); box-shadow: 0 30px 80px -24px oklch(20% .06 250 / .5), inset 0 1px 0 var(--rim); cursor: default; }
.preview-overlay[data-kind=audio] .preview-dialog { width: min(520px, 100%); }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--line); }
.preview-head strong { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.preview-close { flex: none; width: 36px; min-width: 36px; min-height: 36px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1; }
.preview-body { position: relative; display: grid; place-items: center; min-height: 160px; overflow: auto; background: oklch(21% .03 250 / .95); }
.preview-overlay[data-kind=audio] .preview-body { background: var(--surface-solid); }
.preview-stage { display: grid; place-items: center; width: 100%; min-height: 240px; }
.preview-stage::before { content: ''; position: absolute; width: 22px; height: 22px; border: 2px solid oklch(100% 0 0 / .25); border-top-color: oklch(100% 0 0 / .9); border-radius: 50%; animation: spin .7s linear infinite; }
.preview-stage:has(img[data-loaded=true])::before, .preview-stage:has(.preview-error:not([hidden]))::before { display: none; }
.preview-image { position: relative; display: block; max-width: 100%; max-height: calc(88dvh - 64px); object-fit: contain; }
.preview-image[data-loaded=true] { animation: fade-in .28s ease-out; }
.preview-player { display: block; width: 100%; max-height: calc(88dvh - 64px); background: #000; outline: none; }
audio.preview-player { height: 54px; margin: 28px 0; padding: 0 20px; background: transparent; }
.preview-wait { display: grid; gap: 12px; width: min(420px, 100%); padding: 52px 28px; color: oklch(94% .02 240); }
.preview-overlay[data-kind=audio] .preview-wait { color: var(--ink); }
.preview-wait .loading { justify-content: center; padding: 0; color: inherit; font-size: 13px; }
.preview-wait .loading::before { border-color: oklch(100% 0 0 / .25); border-top-color: currentColor; }
.preview-error { padding: 48px 24px; color: oklch(90% .04 40); text-align: center; font-size: 13px; }
.preview-error p { margin: 0 auto; }
.preview-overlay[data-kind=audio] .preview-error { color: var(--danger); }
@media (max-width: 560px) {
  .preview-overlay { padding: 12px; }
  .preview-dialog { border-radius: 18px; }
  .result-tabs .result-tab { min-height: 40px; padding-inline: 14px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .preview-overlay { background: oklch(24% .04 245 / .72); }
}
@media (forced-colors: active) {
  .result-tabs .result-tab[aria-selected=true] { outline: 2px solid Highlight; }
  .preview-dialog { border-color: CanvasText; }
}
/* ==========================================================================
   Theme (Light / Dark), Material (Glass / Solid), & Responsive 2-Col Layouts
   ========================================================================== */

:root {
  --line-strong: oklch(56% .03 235 / .28);
}

textarea {
  font: inherit;
  color: inherit;
  min-width: 0;
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: oklch(99% .003 230 / .65);
  box-shadow: inset 0 1px 3px oklch(36% .04 230 / .02);
  resize: vertical;
  line-height: 1.6;
  transition: border-color .18s, background .18s, box-shadow .18s;
  -webkit-tap-highlight-color: transparent;
}
textarea:hover { border-color: oklch(57% .09 250 / .45); }
textarea:focus { background: oklch(100% 0 0 / .88); }
textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
textarea::placeholder { color: oklch(50% .035 250); opacity: 1; }
textarea[readonly], textarea:disabled { background: oklch(92% .018 250 / .6); }

/* --- Enhanced Glass vs Solid Material Contrast (Light Mode) --- */
:root[data-material=glass] {
  --canvas: oklch(95.5% .015 232);
  --surface: oklch(99.5% .006 230 / .44);
  --rim: oklch(100% 0 0 / .92);
  --glass-shadow: 0 14px 36px -16px oklch(34% .06 235 / .22), inset 0 1px 0 0 var(--rim), inset 1px 0 0 0 oklch(100% 0 0 / .45), inset 0 -1px 0 0 oklch(72% .03 230 / .16);
}
:root[data-material=glass] .ambient {
  background:
    radial-gradient(ellipse 62% 54% at 16% 12%, oklch(84% .085 215 / .78), transparent 62%),
    radial-gradient(ellipse 55% 50% at 86% 18%, oklch(85% .075 258 / .62), transparent 58%),
    radial-gradient(ellipse 60% 55% at 78% 82%, oklch(89% .055 68 / .65), transparent 60%),
    radial-gradient(ellipse 50% 45% at 22% 85%, oklch(87% .06 190 / .52), transparent 55%),
    var(--canvas);
}
:root[data-material=glass] :is(.sidebar, .parse-station, .quota-panel, .auth-panel, .table-wrap, .creation-panel, .record, .module-item, .stats, .settings-form, .video-summary, .doc-aside, .account-card, .website-guide-card, .cleanup-bar, .appearance-picker) {
  -webkit-backdrop-filter: blur(28px) saturate(1.65);
  backdrop-filter: blur(28px) saturate(1.65);
}

:root[data-material=solid] {
  --canvas: oklch(94.5% .008 235);
  --surface: oklch(99.5% .003 235);
  --surface-solid: oklch(99.5% .003 235);
  --line: oklch(52% .025 235 / .26);
  --rim: oklch(52% .025 235 / .24);
  --glass-shadow: 0 3px 10px -3px oklch(28% .03 240 / .08);
}
:root[data-material=solid] .ambient {
  background: var(--canvas);
}
:root[data-material=solid] :is(.sidebar, .parse-station, .quota-panel, .auth-panel, .notice, .table-wrap, .creation-panel, .key-row, .management-row, .group-form, .stats, .settings-form, .record, .module-list, .module-item, .video-summary, .doc-aside, .account-card, .website-guide-card, .cleanup-bar, .appearance-picker) {
  background: var(--surface-solid);
  border-color: var(--line);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* --- Complete Dark Theme (Black/Dark Mode) --- */
:root[data-theme=dark] {
  color-scheme: dark;
  --canvas: oklch(14.5% .022 248);
  --ink: oklch(95% .008 240);
  --muted: oklch(70% .02 242);
  --blue: oklch(68% .148 242);
  --blue-deep: oklch(60% .155 242);
  --blue-wash: oklch(25% .045 245 / .62);
  --line: oklch(75% .025 240 / .16);
  --line-strong: oklch(75% .025 240 / .26);
  --rim: oklch(88% .025 240 / .22);
  --surface: oklch(20.5% .028 248 / .52);
  --surface-solid: oklch(19% .022 248);
  --success: oklch(75% .13 165);
  --danger: oklch(70% .16 25);
  --glass-shadow: 0 16px 40px -16px oklch(6% .02 250 / .72), inset 0 1px 0 0 var(--rim), inset 0 -1px 0 0 oklch(10% .02 250 / .45);
}
:root[data-theme=dark] .ambient {
  background:
    radial-gradient(ellipse 62% 54% at 16% 14%, oklch(29% .095 235 / .68), transparent 62%),
    radial-gradient(ellipse 55% 50% at 86% 20%, oklch(27% .085 275 / .56), transparent 58%),
    radial-gradient(ellipse 58% 52% at 76% 84%, oklch(26% .065 200 / .52), transparent 60%),
    var(--canvas);
}
:root[data-theme=dark][data-material=solid] {
  --canvas: oklch(12.5% .016 248);
  --surface: oklch(18.5% .02 248);
  --surface-solid: oklch(18.5% .02 248);
  --line: oklch(75% .02 242 / .2);
  --rim: oklch(75% .02 242 / .2);
  --glass-shadow: 0 4px 14px -4px oklch(5% .015 250 / .55);
}
:root[data-theme=dark][data-material=solid] .ambient {
  background: var(--canvas);
}
:root[data-theme=dark] .glass-interactive::before {
  background: radial-gradient(ellipse at var(--light-x, 25%) var(--light-y, 0%), oklch(76% .08 235 / .18), transparent 60%);
}
:root[data-theme=dark] :is(button, .button) {
  background: oklch(25% .03 248 / .78);
  border-color: var(--rim);
  box-shadow: 0 2px 8px oklch(6% .02 250 / .35), inset 0 1px 0 var(--rim);
}
:root[data-theme=dark] :is(button:hover:not(:disabled), .button:hover) {
  background: oklch(30% .038 248 / .92);
  box-shadow: 0 6px 16px -4px oklch(6% .02 250 / .5), inset 0 1px 0 var(--rim);
}
:root[data-theme=dark] :is(button.primary, .button.primary) {
  color: oklch(99% .004 240);
  background: linear-gradient(170deg, oklch(58% .15 240), oklch(47% .15 242));
  border-color: oklch(68% .12 240 / .45);
  box-shadow: 0 6px 18px -5px oklch(48% .15 240 / .48), inset 0 1px 0 oklch(88% .06 235 / .38);
}
:root[data-theme=dark] :is(button.primary:hover:not(:disabled), .button.primary:hover) {
  background: linear-gradient(170deg, oklch(62% .155 240), oklch(51% .155 242));
}
:root[data-theme=dark] button.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
:root[data-theme=dark] button.ghost:hover:not(:disabled) {
  background: var(--blue-wash);
  box-shadow: none;
}
:root[data-theme=dark] button[data-copied=true] {
  color: var(--success) !important;
  border-color: oklch(65% .12 165 / .45) !important;
  background: oklch(26% .05 165 / .85) !important;
}
:root[data-theme=dark] :is(input, select, textarea) {
  background: oklch(16.5% .024 248 / .76);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: inset 0 1px 3px oklch(6% .02 250 / .35);
}
:root[data-theme=dark] :is(input:hover, select:hover, textarea:hover) {
  border-color: oklch(68% .11 242 / .5);
}
:root[data-theme=dark] :is(input:focus, select:focus, textarea:focus) {
  background: oklch(19% .028 248 / .95);
}
:root[data-theme=dark] :is(input::placeholder, textarea::placeholder) {
  color: oklch(56% .02 242);
}
:root[data-theme=dark] :is(input[readonly], input:disabled, select:disabled, textarea[readonly], textarea:disabled) {
  background: oklch(15% .015 248 / .5);
  color: var(--muted);
}
:root[data-theme=dark] .sidebar {
  background: oklch(19% .026 248 / .48);
}
:root[data-theme=dark][data-material=solid] .sidebar {
  background: var(--surface-solid);
}
:root[data-theme=dark] .navigation a:hover {
  background: oklch(28% .035 248 / .5);
}
:root[data-theme=dark] .navigation a[aria-current=page] {
  background: linear-gradient(150deg, oklch(28% .05 245 / .92), oklch(23% .04 248 / .65));
  border-color: var(--rim);
  box-shadow: 0 4px 14px -3px oklch(6% .02 250 / .45), inset 0 1px 0 var(--rim);
}
:root[data-theme=dark] .quota-panel {
  background: linear-gradient(145deg, oklch(22% .038 245 / .72), oklch(18% .045 252 / .48));
}
:root[data-theme=dark][data-material=solid] .quota-panel {
  background: var(--surface-solid);
}
:root[data-theme=dark] meter,
:root[data-theme=dark] meter::-webkit-meter-bar {
  background: oklch(30% .03 248 / .65);
}
:root[data-theme=dark] .pill {
  background: oklch(26% .055 168 / .65);
  border-color: oklch(65% .1 168 / .28);
}
:root[data-theme=dark] .pill.off {
  color: oklch(78% .11 70);
  background: oklch(27% .05 65 / .65);
  border-color: oklch(68% .09 65 / .28);
}
:root[data-theme=dark] .site-badge {
  background: oklch(25% .03 248 / .55);
}
:root[data-theme=dark] .site-badge:hover {
  background: oklch(30% .04 248 / .85);
  border-color: oklch(68% .1 242 / .4);
}
:root[data-theme=dark] :is(.table-wrap, .creation-panel, .key-row, .management-row, .group-form, .stats, .record, .module-item, .account-card, .website-guide-card, .cleanup-bar, .appearance-picker) {
  background: var(--surface);
}
:root[data-theme=dark][data-material=solid] :is(.table-wrap, .creation-panel, .key-row, .management-row, .group-form, .stats, .record, .module-item, .account-card, .website-guide-card, .cleanup-bar, .appearance-picker) {
  background: var(--surface-solid);
}
:root[data-theme=dark] th {
  background: oklch(24% .03 248 / .65);
}
:root[data-theme=dark] tbody tr:hover {
  background: oklch(26% .035 248 / .42);
}
:root[data-theme=dark] .secret-panel {
  background: oklch(23% .05 245 / .88);
  border-color: oklch(62% .1 242 / .4);
}
:root[data-theme=dark] .auth-tabs,
:root[data-theme=dark] .result-tabs {
  background: oklch(16% .025 248 / .65);
}
:root[data-theme=dark] .auth-tabs .selected,
:root[data-theme=dark] .result-tabs .result-tab[aria-selected=true],
:root[data-theme=dark] .result-tabs .result-tab[aria-selected=true]:hover:not(:disabled) {
  background: oklch(27% .04 246 / .92);
  color: var(--blue);
  border-color: var(--rim);
}
:root[data-theme=dark] .result-tabs .result-tab em {
  background: oklch(26% .03 248 / .75);
}
:root[data-theme=dark] .info-grid > div,
:root[data-theme=dark] .info-description {
  background: oklch(20% .025 248 / .78);
}
:root[data-theme=dark] .parse-feedback.error {
  background: oklch(24% .055 28 / .82);
  border-color: oklch(62% .12 28 / .45);
}
:root[data-theme=dark] .empty {
  background: oklch(19% .025 248 / .42);
}
:root[data-theme=dark] .notice {
  background: oklch(22% .032 248 / .92);
  border-color: oklch(65% .08 242 / .35);
  box-shadow: 0 16px 36px -10px oklch(4% .02 250 / .65), inset 0 1px 0 var(--rim);
}
:root[data-theme=dark] .notice.error {
  background: oklch(24% .06 28 / .94);
  border-color: oklch(65% .12 28 / .5);
}
:root[data-theme=dark] .settings-switch > input {
  background: oklch(30% .03 248);
  border-color: oklch(65% .03 248 / .35);
}
:root[data-theme=dark] .settings-switch > input::before {
  background: oklch(94% .01 240);
}
:root[data-theme=dark] .settings-switch > input:checked {
  background: var(--blue);
  border-color: var(--blue);
}
:root[data-theme=dark] .preview-dialog {
  background: oklch(19% .025 248 / .95);
}

/* --- Topbar Appearance Compact Dropdown --- */
.topbar-actions {
  gap: 12px;
}
.appearance-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 11px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
  color: var(--ink);
  transition: border-color .18s, background .18s;
}
.appearance-picker:hover {
  border-color: oklch(58% .09 242 / .45);
}
.appearance-picker .icon {
  width: 15px;
  height: 15px;
  color: var(--blue);
  pointer-events: none;
}
.appearance-select {
  width: auto;
  min-height: 32px;
  padding: 4px 4px 4px 2px;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.appearance-select:focus-visible {
  outline: none;
}
.appearance-picker:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
:root[data-theme=dark] .appearance-select option {
  background: oklch(19% .022 248);
  color: var(--ink);
}

/* --- Cleanup & Cache Maintenance Toolbar --- */
.cleanup-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
}
.cleanup-bar strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}
.cleanup-bar .help {
  margin: 0;
  line-height: 1.6;
}

/* --- Announcement Banner --- */
.announcement-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid oklch(58% .1 240 / .32);
  border-radius: 14px;
  background: var(--blue-wash);
  box-shadow: var(--glass-shadow);
  font-size: 12px;
}
.announcement-banner .icon {
  color: var(--blue);
  margin-top: 2px;
}
.announcement-banner strong {
  display: inline-block;
  margin-right: 8px;
  color: var(--blue);
  font-weight: 700;
}

/* --- Website Feature Guide Cards (2 per row) --- */
.website-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.website-guide-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
}
.website-guide-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 12px;
}
.website-guide-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  max-width: none;
}

/* --- Two-Per-Row ("两个一行") & Multi-Resolution Grid Layouts --- */
.key-list,
.management-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.record .management-row,
.record .key-controls,
.record .group-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
  padding: 16px;
}
.record .management-row > .help,
.record .management-row > .permission-grid,
.record .key-controls > .permission-grid,
.record .group-form > .permission-grid,
.record .key-controls > .form-actions,
.record .group-form > .actions {
  grid-column: 1 / -1;
}
.record .sub-actions {
  margin-bottom: 0;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
}
.fixed-record {
  min-height: 64px;
  align-items: center;
}

/* Modules: 2 per row card grid */
.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  align-items: start;
}
.module-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
}
.module-item + .module-item {
  border-top: 1px solid var(--line);
}

/* Overview Runtime Details: 2 per row */
.runtime-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.runtime-details > div {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

/* Account Page: 2 per row (Password + Sessions) */
.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.account-card {
  margin-top: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
  display: grid;
  gap: 14px;
}
.account-card h2,
.account-card > p,
.account-card > button {
  margin: 0;
}

/* Enriched Platform Settings Layout (Full Width + 2 per row sections) */
.settings-form {
  max-width: 100%;
  padding: 24px;
  gap: 24px;
  box-shadow: var(--glass-shadow);
}
.settings-section {
  display: grid;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.settings-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}
.settings-section-head h2 {
  font-size: 16px;
}
.settings-switches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border-top: 0;
}
.settings-switch {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: oklch(99% .006 230 / .42);
}
:root[data-theme=dark] .settings-switch {
  background: oklch(17% .024 248 / .58);
}
:root[data-material=solid] .settings-switch {
  background: var(--canvas);
}
.settings-switch-inline {
  margin-top: 2px;
}

/* --- Multi-Resolution Responsive Breakpoints --- */
@media (max-width: 960px) {
  .key-list,
  .management-list,
  .module-list,
  .website-guide,
  .account-grid,
  .settings-switches,
  .runtime-details {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 680px) {
  .record .management-row,
  .record .key-controls,
  .record .group-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-form {
    padding: 16px;
  }
}
/* --- v19 Polish: Custom Select Chevron, Log Filter, Section Head, & 2-Col Alignment --- */
.appearance-picker {
  padding-right: 12px;
}
.appearance-picker::after {
  content: '';
  width: 5px;
  height: 5px;
  margin-left: -2px;
  border-inline-end: 1.5px solid var(--muted);
  border-block-end: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-1px);
  pointer-events: none;
}
.appearance-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 8px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
}
.log-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(140px, 220px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}
.log-filter input {
  max-width: none;
}
.record .management-row > .form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}
.record .management-row > .form-actions .check-label {
  margin-right: auto;
}
.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 860px) {
  .appearance-picker {
    min-height: 36px;
    padding: 0 10px;
  }
  .log-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .log-filter > .actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
@media (max-width: 680px) {
  .info-grid,
  .log-filter {
    grid-template-columns: minmax(0, 1fr);
  }
  .cleanup-bar {
    padding: 12px 14px;
  }
}
/* --- v20 Layout, Card Hierarchy & Functional Polish --- */
.parse-advanced > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.option-badge {
  padding: 1px 8px;
  font-size: 10px;
}
.parse-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
}
.parse-options-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}
.site-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.site-badge small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}
.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}
.stat-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}
details.record,
details.creation-panel {
  transition: border-color .18s, box-shadow .18s, background .18s;
}
details.record:hover,
details.creation-panel:hover {
  border-color: oklch(58% .09 242 / .38);
}
details.record[open],
details.creation-panel[open] {
  border-color: oklch(58% .12 242 / .46);
}
details.record[open] > summary,
details.creation-panel[open] > summary {
  border-bottom: 1px solid var(--line);
  background: oklch(58% .08 240 / .05);
}
:root[data-theme=dark] details.record[open] > summary,
:root[data-theme=dark] details.creation-panel[open] > summary {
  background: oklch(68% .1 242 / .09);
}
:root[data-theme=dark] .code-block pre {
  background: oklch(15% .022 248 / .88);
  border-color: var(--line);
}
.runtime-details > div {
  transition: border-color .18s, transform .18s;
}
.runtime-details > div:hover {
  border-color: oklch(58% .09 242 / .36);
}
@media (max-width: 680px) {
  .parse-options {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* --- v21 Custom Appearance Popover Menu & Full-Width User/Group Layout --- */
.appearance-menu {
  position: relative;
}
.appearance-trigger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.appearance-trigger::-webkit-details-marker {
  display: none;
}
.appearance-trigger:hover {
  border-color: oklch(58% .1 242 / .48);
}
.appearance-trigger:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.appearance-menu[open] .appearance-trigger {
  border-color: oklch(58% .12 242 / .55);
}
.appearance-trigger .icon {
  width: 15px;
  height: 15px;
  color: var(--blue);
  flex-shrink: 0;
}
.appearance-chevron {
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-inline-end: 1.6px solid var(--muted);
  border-block-end: 1.6px solid var(--muted);
  transform: rotate(45deg) translateY(-1px);
  transition: transform .18s ease;
}
.appearance-menu[open] .appearance-chevron {
  transform: rotate(-135deg) translateY(-1px);
}
.appearance-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 264px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: oklch(99% .005 235 / .92);
  box-shadow: 0 20px 44px -12px oklch(25% .05 240 / .26), inset 0 1px 0 var(--rim);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  backdrop-filter: blur(28px) saturate(1.7);
  display: grid;
  gap: 12px;
}
:root[data-theme=dark] .appearance-popover {
  background: oklch(20% .028 248 / .94);
  border-color: oklch(72% .04 242 / .28);
  box-shadow: 0 22px 48px -12px oklch(4% .02 250 / .78), inset 0 1px 0 var(--rim);
}
:root[data-material=solid] .appearance-trigger,
:root[data-material=solid] .appearance-popover {
  background: var(--surface-solid);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.appearance-group {
  display: grid;
  gap: 6px;
}
.appearance-group-title {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  padding-left: 2px;
}
.appearance-seg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: oklch(94% .012 235 / .65);
}
:root[data-theme=dark] .appearance-seg {
  background: oklch(14.5% .022 248 / .78);
}
.appearance-seg .seg-btn {
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.appearance-seg .seg-btn .icon {
  width: 13px;
  height: 13px;
}
.appearance-seg .seg-btn:hover:not(:disabled) {
  color: var(--ink);
  background: oklch(99% .004 235 / .5);
  box-shadow: none;
  transform: none;
}
:root[data-theme=dark] .appearance-seg .seg-btn:hover:not(:disabled) {
  background: oklch(25% .03 248 / .55);
}
.appearance-seg .seg-btn[aria-pressed=true],
.appearance-seg .seg-btn.selected {
  color: var(--blue);
  background: oklch(100% 0 0 / .96);
  border-color: var(--rim);
  box-shadow: 0 2px 6px oklch(30% .04 240 / .1);
  font-weight: 700;
}
:root[data-theme=dark] .appearance-seg .seg-btn[aria-pressed=true],
:root[data-theme=dark] .appearance-seg .seg-btn.selected {
  color: var(--blue);
  background: oklch(27% .042 246 / .95);
  border-color: var(--rim);
  box-shadow: 0 2px 8px oklch(6% .02 250 / .45);
}

/* Fix Management List (Users, User Groups, Admin Groups, Websites) to clean 1-per-row full-width layout */
.management-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.record .user-row {
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 1fr) auto;
  align-items: end;
  gap: 14px 16px;
}
.record .user-row > .form-actions {
  grid-column: auto;
  justify-content: flex-end;
  padding-bottom: 1px;
}
.readonly-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
}
.readonly-field span {
  color: var(--muted);
}
.creation-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  align-items: start;
}
.creation-bar > .creation-panel {
  margin-bottom: 0;
}
.group-section + .group-section {
  margin-top: 24px;
}
.fixed-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
}
.fixed-record small {
  display: block;
  margin-top: 3px;
}
@media (max-width: 860px) {
  .record .user-row,
  .creation-bar {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- v22 Standalone audio download card --- */
.audio-standalone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--glass-shadow);
}
.audio-standalone-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.audio-standalone-info strong { font-size: 14px; }
.audio-standalone-info span { color: var(--muted); font-size: 12px; }
.audio-standalone > .download-progress { grid-column: 1 / -1; }
@media (max-width: 680px) {
  .audio-standalone { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   v23 Interaction & Motion System
   ========================================================================== */
@property --rr { syntax: '<length>'; inherits: false; initial-value: 0px; }
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* Unified keyboard focus ring (mouse clicks stay clean) */
:where(button, .button, a, summary, select, input, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  transition: outline-offset .15s var(--ease-out);
}
:where(button, .button, a, summary):focus:not(:focus-visible) { outline: none; }

/* Buttons: lift on hover, press on active, ripple on click */
button:hover:not(:disabled), .button:hover { transform: translateY(-1px); }
button:active:not(:disabled), .button:active { transform: translateY(0) scale(.97); }
button.ghost:hover:not(:disabled), .appearance-seg .seg-btn:hover:not(:disabled),
.notice button:hover:not(:disabled), .preview-close:hover:not(:disabled) { transform: none; }
button .icon, .button .icon { transition: transform .25s var(--ease-spring); }
button:hover:not(:disabled) .icon, .button:hover .icon { transform: scale(1.12); }
button:active:not(:disabled) .icon { transform: scale(.92); }
button[data-action=reload]:hover:not(:disabled) .icon { transform: rotate(180deg); }
button.primary .icon:last-child, .button.primary .icon:last-child { transition: transform .25s var(--ease-out); }
button.primary:hover:not(:disabled) .icon:last-child, .button.primary:hover .icon:last-child { transform: translateX(3px); }

button.is-rippling::after, .button.is-rippling::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), oklch(100% 0 0 / .42) 0, oklch(100% 0 0 / .18) calc(var(--rr) * .55), transparent var(--rr));
  animation: ripple .55s var(--ease-out) forwards;
}
button:not(.primary).is-rippling::after, .button:not(.primary).is-rippling::after {
  background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), oklch(58% .12 240 / .22) 0, oklch(58% .12 240 / .08) calc(var(--rr) * .55), transparent var(--rr));
}
@keyframes ripple { from { --rr: 0px; opacity: 1; } to { --rr: 260px; opacity: 0; } }

/* Busy buttons keep their icon but show a spinner instead of blocking text */
button[aria-busy=true] { pointer-events: none; }
button[aria-busy=true]:has(.icon)::before {
  content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .65s linear infinite; flex: none;
}
button[aria-busy=true]:has(.icon) > .icon { display: none; }

/* Copied / success pop */
button[data-copied=true] { animation: pop-in .35s var(--ease-spring); }
@keyframes pop-in { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* Navigation & tabs */
.navigation a { transition: background .2s var(--ease-out), color .2s ease, transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.navigation a:hover { transform: translateX(3px); }
.navigation a:active { transform: translateX(1px) scale(.98); }
.navigation a .icon { transition: transform .25s var(--ease-spring); }
.navigation a:hover .icon { transform: scale(1.15) rotate(-4deg); }
.admin-nav a { transition: background .2s var(--ease-out), color .2s ease, transform .2s var(--ease-out); }
.admin-nav a:hover { transform: translateX(2px); }
.result-tabs .result-tab { transition: background .22s var(--ease-out), color .18s ease, box-shadow .22s var(--ease-out), transform .15s var(--ease-out); }
.result-pane:not([hidden]) { animation: pane-slide .3s var(--ease-out); }
@keyframes pane-slide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Cards: gentle lift, and cascaded entrance for lists */
details.record, .module-item, .stat, .website-guide-card, .runtime-details > div, .audio-standalone, .media-card {
  transition: border-color .2s ease, box-shadow .25s var(--ease-out), transform .25s var(--ease-out), background .2s ease;
}
details.record:not([open]):hover, .module-item:hover, .stat:hover, .media-card:hover { transform: translateY(-2px); }
.management-list > *, .key-list > *, .module-list > *, .stats > *, .media-grid > *, .runtime-details > * {
  animation: card-in .45s var(--ease-out) backwards;
}
.management-list > :nth-child(2), .key-list > :nth-child(2), .module-list > :nth-child(2), .stats > :nth-child(2), .media-grid > :nth-child(2), .runtime-details > :nth-child(2) { animation-delay: .04s; }
.management-list > :nth-child(3), .key-list > :nth-child(3), .module-list > :nth-child(3), .stats > :nth-child(3), .media-grid > :nth-child(3), .runtime-details > :nth-child(3) { animation-delay: .08s; }
.management-list > :nth-child(4), .key-list > :nth-child(4), .module-list > :nth-child(4), .stats > :nth-child(4), .media-grid > :nth-child(4), .runtime-details > :nth-child(4) { animation-delay: .12s; }
.management-list > :nth-child(n+5), .key-list > :nth-child(n+5), .module-list > :nth-child(n+5), .media-grid > :nth-child(n+5), .runtime-details > :nth-child(n+5) { animation-delay: .16s; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

/* Expanding panels: content eases in */
details[open] > :not(summary) { animation: detail-in .3s var(--ease-out); }
@keyframes detail-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.creation-panel > summary, .sub-actions > summary, .parse-advanced > summary { transition: color .18s ease; }
.creation-panel > summary:hover, .parse-advanced > summary:hover { color: var(--blue-deep); }

/* Inputs: soft glow on focus */
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px oklch(58% .12 240 / .14); transition: box-shadow .2s var(--ease-out), border-color .2s ease, background .2s ease; }

/* Switches & checkboxes spring */
.settings-switch > input::before { transition: transform .28s var(--ease-spring), background .2s ease; }
input[type=checkbox]:not([role=switch]) { transition: transform .15s var(--ease-spring); }
input[type=checkbox]:not([role=switch]):active { transform: scale(.85); }

/* Toast: countdown bar */
.notice { overflow: hidden; }
.notice::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: currentColor; opacity: .28; transform-origin: left; animation: notice-timer 2.6s linear forwards;
}
.notice.error::after { animation-duration: 4.8s; }
.notice.notice-restart::after { animation-name: notice-timer-b; }
@keyframes notice-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes notice-timer-b { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* Appearance popover */
.appearance-popover { transform-origin: top right; animation: popover-in .22s var(--ease-out); }
@keyframes popover-in { from { opacity: 0; transform: translateY(-6px) scale(.95); } to { opacity: 1; transform: none; } }
.appearance-seg .seg-btn { transition: background .2s var(--ease-out), color .18s ease, box-shadow .2s ease, transform .15s var(--ease-spring); }
.appearance-seg .seg-btn:active:not(:disabled) { transform: scale(.94); }

/* Parse button breathing hint when ready */
@media (prefers-reduced-motion: no-preference) {
  #parse-form button.primary[type=submit]:not(:disabled):focus-visible { animation: pulse-ring 1.4s ease-out infinite; }
  @keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 oklch(58% .12 240 / .4); } 100% { box-shadow: 0 0 0 12px oklch(58% .12 240 / 0); } }
}

/* Honour reduced motion everywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  button:hover:not(:disabled), .button:hover, .navigation a:hover, details.record:hover, .module-item:hover, .stat:hover { transform: none !important; }
}
