@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
    --primary:        #7c6cff;
    --primary-hover:  #9185ff;
    --on-primary:     #ffffff;
    --info:           #3fb8f5;
    --success:        #34d399;
    --danger:         #f2596b;
    --warning:        #f6b94a;
    --on-solid:       #07090d;

    --bg:             #0a0c11;
    --bg-mid:         #0e1117;
    --surface:        #131720;
    --surface-raised: #1a1f2b;
    --surface-high:   #242a39;
    --overlay:        rgba(5, 7, 11, 0.74);

    --border:         rgba(255, 255, 255, 0.07);
    --border-strong:  rgba(255, 255, 255, 0.15);

    --text:           #eceff6;
    --text-muted:     #9aa3b8;
    --text-faint:     #5f697e;

    --shadow-sm:  0 1px 2px rgba(0,0,0,0.35);
    --shadow-md:  0 8px 28px rgba(0,0,0,0.35);
    --shadow-lg:  0 24px 64px rgba(0,0,0,0.55);
    --glow:       radial-gradient(ellipse 70% 45% at 12% -8%, rgba(124,108,255,0.14), transparent 60%),
                  radial-gradient(ellipse 50% 40% at 100% 0%, rgba(63,184,245,0.08), transparent 60%);

    --radius-sm:  8px;
    --radius:     10px;
    --radius-lg:  14px;
    --radius-xl:  18px;

    --ease:       cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast:     120ms;
    --t-mid:      220ms;
    --t-slow:     380ms;
    --transition: all var(--t-mid) var(--ease);

    --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

    --sidebar-w: 236px;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --primary:        #5a47ee;
    --primary-hover:  #4836d6;
    --info:           #0a85c7;
    --success:        #0c9a6b;
    --danger:         #d6334a;
    --warning:        #b3740a;
    --on-solid:       #ffffff;

    --bg:             #f3f4f8;
    --bg-mid:         #f7f8fb;
    --surface:        #ffffff;
    --surface-raised: #f4f5f9;
    --surface-high:   #e7eaf2;
    --overlay:        rgba(20, 24, 36, 0.5);

    --border:         rgba(15, 23, 42, 0.09);
    --border-strong:  rgba(15, 23, 42, 0.2);

    --text:           #12151f;
    --text-muted:     #566078;
    --text-faint:     #959eb2;

    --shadow-sm:  0 1px 2px rgba(15,23,42,0.08);
    --shadow-md:  0 8px 24px rgba(15,23,42,0.08);
    --shadow-lg:  0 24px 64px rgba(15,23,42,0.22);
    --glow:       radial-gradient(ellipse 70% 45% at 12% -8%, rgba(90,71,238,0.1), transparent 60%);
    color-scheme: light;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --primary:        #5a47ee;
        --primary-hover:  #4836d6;
        --info:           #0a85c7;
        --success:        #0c9a6b;
        --danger:         #d6334a;
        --warning:        #b3740a;
        --on-solid:       #ffffff;
        --bg:             #f3f4f8;
        --bg-mid:         #f7f8fb;
        --surface:        #ffffff;
        --surface-raised: #f4f5f9;
        --surface-high:   #e7eaf2;
        --overlay:        rgba(20, 24, 36, 0.5);
        --border:         rgba(15, 23, 42, 0.09);
        --border-strong:  rgba(15, 23, 42, 0.2);
        --text:           #12151f;
        --text-muted:     #566078;
        --text-faint:     #959eb2;
        --shadow-sm:  0 1px 2px rgba(15,23,42,0.08);
        --shadow-md:  0 8px 24px rgba(15,23,42,0.08);
        --shadow-lg:  0 24px 64px rgba(15,23,42,0.22);
        --glow:       radial-gradient(ellipse 70% 45% at 12% -8%, rgba(90,71,238,0.1), transparent 60%);
        color-scheme: light;
    }
}

:root {
    --primary-dim: color-mix(in srgb, var(--primary) 14%, transparent);
    --primary-glow: color-mix(in srgb, var(--primary) 38%, transparent);
    --success-dim: color-mix(in srgb, var(--success) 13%, transparent);
    --danger-dim:  color-mix(in srgb, var(--danger) 13%, transparent);
    --info-dim:    color-mix(in srgb, var(--info) 13%, transparent);
    --warning-dim: color-mix(in srgb, var(--warning) 14%, transparent);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    background-image: var(--glow);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14.5px;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px 24px 40px;
    -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

::selection { background: var(--primary-glow); }

a { color: var(--primary); }

.icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; vertical-align: middle; }
.icon-xs  { width: 14px; height: 14px; }
.icon-xs-closed { width: 14px; height: 14px; }
.icon-sm  { width: 20px; height: 20px; }
.icon-md  { width: 24px; height: 24px; }
.icon-lg  { width: 28px; height: 28px; }
.icon svg { display: block; width: 100%; height: 100%; }

.container {
    position: relative;
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    column-gap: 24px;
    align-items: start;
}

.container > .header,
.container > .footer { grid-column: 1 / -1; }

.container > .auth-grid,
.container > .info-cards-cdn,
.container > .info-cards,
.container > .tab-content-container,
.container > .stats-row { grid-column: 2; }

.container > .info-cards { margin-bottom: 18px; }

.container > .tab-container {
    grid-column: 1;
    grid-row: 2 / span 30;
}

.header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 14px;
    margin-bottom: 22px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border-strong);
}

.logo-link { display: inline-flex; flex: 0 0 auto; border-radius: 12px; transition: opacity var(--t-fast); }
.logo-link:hover { opacity: 0.85; }
.logo-link:focus-visible, .title-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.title-link { color: inherit; text-decoration: none; border-radius: 4px; transition: color var(--t-fast); }
.title-link:hover { color: var(--primary); }

.title-group { flex: 1 1 300px; min-width: 0; }

.title-group h1 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.2;
}

.title-group p {
    color: var(--text-muted);
    font-size: 12.5px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-with-badges { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; white-space: nowrap; }
.title-with-badges .badge { flex: 0 0 auto; white-space: nowrap; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 1.5;
    font-weight: 500;
    border: 1px solid var(--border-strong);
    background: var(--surface-raised);
    color: var(--text-muted);
}

.badge-gray  { background: var(--surface-raised); color: var(--text-muted); }
.badge-green { background: var(--success-dim); border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }

.uptime-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-mid);
    min-height: 34px;
}

.uptime-bar img { height: 22px; display: block; border-radius: 4px; }
.uptime-sep { color: var(--text-faint); font-size: 10px; }

.discord-bot-invite-button,
.telegram-bot-open-button {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 0 14px;
    border-radius: var(--radius);
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    line-height: 1;
    transition: transform var(--t-fast) var(--ease), filter var(--t-fast);
    border: 1px solid transparent;
}

.discord-bot-invite-button { background: #5865f2; }
.telegram-bot-open-button  { background: #229ed9; }
.discord-bot-invite-button:hover,
.telegram-bot-open-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.discord-bot-invite-button > svg.icon,
.telegram-bot-open-button > svg.icon { width: 16px; height: 16px; display: block; }
.discord-bot-invite-button .icon-xs,
.telegram-bot-open-button .icon-xs { display: none; }

.store-buttons-row { display: none; }

.header-tools { display: flex; gap: 8px; margin-left: auto; align-items: center; align-self: center; flex: 0 0 auto; }
.header .uptime-bar { flex: 0 1 auto; }

.icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface-raised);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.icon-btn:hover { color: var(--text); border-color: var(--primary); background: var(--primary-dim); }
.icon-btn svg { width: 17px; height: 17px; display: block; }

.tab-container {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    z-index: 5;
}

.tab-container::before {
    content: attr(data-label);
    padding: 6px 12px 8px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.tab-slider { display: none; }

.tab-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    line-height: 1.2;
    color: var(--text-muted);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.tab-button > svg.icon,
.tab-button .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
    overflow: visible;
}

.tab-button b { font-weight: inherit; font-size: inherit; display: block; }

.tab-button:hover { background: var(--surface-raised); color: var(--text); }

.tab-button.active {
    background: var(--primary-dim);
    color: var(--primary);
    font-weight: 600;
}

.tab-button.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}

.tab-button.new::after {
    content: 'NEW';
    margin-left: auto;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--primary);
    color: var(--on-primary);
}

.tab-content-container { position: relative; min-width: 0; }

.tab-content { display: none; width: 100%; }

.tab-content.active {
    display: block;
    animation: tabEnter 280ms var(--ease) backwards;
}

.tab-content.active.leaving {
    opacity: 0;
    transform: translateX(-18px);
    pointer-events: none;
    animation: none;
    transition: opacity 180ms ease-in, transform 180ms ease-in;
}

@keyframes tabEnter {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

@keyframes tabFade { from { opacity: 0; } to { opacity: 1; } }

.card, .info-card, .folder-card { background: var(--surface); position: relative; }

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}

.form-group { margin-bottom: 18px; }

label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

label svg { flex-shrink: 0; width: 13px; height: 13px; opacity: 0.7; display: block; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.015em; color: var(--text); }
h2 { font-size: 19px; line-height: 1.25; }
h3 { font-size: 15px; line-height: 1.3; }

.input-wrapper { position: relative; }

input, .file-input-label, select, textarea {
    width: 100%;
    padding: 10px 13px;
    background: var(--bg-mid);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: var(--font-body);
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast);
}

input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border-strong)); }

input:focus, select:focus, textarea:focus, .file-input:focus + .file-input-label {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

input::placeholder, textarea::placeholder { color: var(--text-faint); }

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color var(--t-fast), background var(--t-fast);
}
.toggle-password .icon-xs { width: 15px; height: 15px; display: block; }
.toggle-password:hover { color: var(--primary); background: var(--primary-dim); }
.input-wrapper > input[type="password"], .input-wrapper > input[type="text"] { padding-right: 40px; }

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3b8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    cursor: pointer;
}
select::-ms-expand { display: none; }
select option { background: var(--surface); color: var(--text); }

input[type="checkbox"], input[type="radio"] {
    width: 17px !important;
    height: 17px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    accent-color: var(--primary);
    cursor: pointer;
}

.file-input { display: none; }

.file-input-label {
    display: flex;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 92px;
    text-align: center;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 13.5px;
}
.file-input-label .icon { width: 22px; height: 22px; display: block; }
.file-input-label:hover, .file-input-label.drag {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: var(--text);
}

.file-name {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
}

.hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 7px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.45;
}
.hint .icon, .hint svg { width: 13px; height: 13px; margin-top: 2px; flex-shrink: 0; display: block; }

.url-input-wrapper { display: flex; gap: 9px; }
.url-input-wrapper input { flex: 1; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-mid);
}

.upload-button, .delete-button, .download-button, .browse-button {
    width: 100%;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 6px;
    line-height: 1.2;
    transition: transform var(--t-fast) var(--ease), filter var(--t-fast), box-shadow var(--t-fast);
}

.upload-button   { background: var(--primary); color: var(--on-primary); }
.delete-button   { background: var(--danger);  color: var(--on-solid); }
.download-button { background: var(--info);    color: var(--on-solid); }
.browse-button   { background: var(--success); color: var(--on-solid); }

.upload-button:hover, .delete-button:hover,
.download-button:hover, .browse-button:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.upload-button:active, .delete-button:active,
.download-button:active, .browse-button:active { transform: translateY(0); box-shadow: none; }

.upload-button > span, .delete-button > span,
.download-button > span, .browse-button > span { display: block; line-height: 1.2; }

.upload-button > svg, .delete-button > svg,
.download-button > svg, .browse-button > svg { width: 17px; height: 17px; flex-shrink: 0; overflow: visible; display: block; }

.upload-button:disabled, .delete-button:disabled,
.download-button:disabled, .browse-button:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; filter: none !important; }

.google-login-button, .discord-login-button, .github-login-button,
.telegram-login-button, .cdn-login-button {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--text);
    background: var(--surface-raised);
    line-height: 1;
    transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.google-login-button > span, .discord-login-button > span, .github-login-button > span,
.telegram-login-button > span, .cdn-login-button > span { display: block; line-height: 1; }
.google-login-button > svg.icon, .discord-login-button > svg.icon, .github-login-button > svg.icon,
.telegram-login-button > svg.icon, .cdn-login-button > svg.icon { width: 17px; height: 17px; display: block; overflow: visible; }

.google-login-button:hover  { border-color: #4285f4; background: color-mix(in srgb, #4285f4 12%, transparent); }
.discord-login-button:hover { border-color: #5865f2; background: color-mix(in srgb, #5865f2 14%, transparent); }
.github-login-button:hover  { border-color: var(--text-muted); background: var(--surface-high); }
.telegram-login-button:hover{ border-color: #229ed9; background: color-mix(in srgb, #229ed9 14%, transparent); }
.cdn-login-button:hover     { border-color: var(--primary); background: var(--primary-dim); }
.google-login-button:disabled, .discord-login-button:disabled, .github-login-button:disabled,
.telegram-login-button:disabled, .cdn-login-button:disabled { opacity: 0.45; cursor: not-allowed; }

.github-login-button svg path[fill="white"], .github-login-button svg { color: var(--text); }
:root[data-theme="light"] .github-login-button svg path[fill="white"] { fill: var(--text); }

.loading-dots::after { content: ''; animation: loading 1.4s infinite; }
@keyframes loading {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

.result-panel {
    margin-top: 16px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    opacity: 0;
    transform: translateY(-4px);
    height: 0;
    transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.result-panel.show { opacity: 1; transform: none; height: auto; min-height: 52px; }

.result-content { padding: 13px 16px; display: flex; align-items: center; gap: 12px; }
.result-icon { flex-shrink: 0; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.result-text { flex: 1; word-break: break-all; font-size: 13px; font-family: var(--font-mono); line-height: 1.5; }
.result-text a { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
.result-text a:hover { border-bottom-style: solid; }

.copy-button {
    flex-shrink: 0;
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.copy-button:hover { background: var(--surface-high); border-color: var(--primary); }
.copy-button.success { background: var(--success); border-color: var(--success); color: var(--on-solid); }
.copy-button svg { width: 12px; height: 12px; display: block; }

.success-panel { background: var(--success-dim); border: 1px solid color-mix(in srgb, var(--success) 35%, transparent); color: var(--success); }
.error-panel   { background: var(--danger-dim);  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);  color: var(--danger); }
.info-panel    { background: var(--primary-dim); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); color: var(--primary); }
.warning-panel { background: var(--warning-dim); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); color: var(--warning); }

.files-container {
    max-height: 440px;
    overflow-y: auto;
    margin-top: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-mid);
    display: none;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-high) transparent;
}

.no-files { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13.5px; }

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    transition: background var(--t-fast);
}
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--surface); }

.file-info { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.file-icon { width: 22px; height: 22px; opacity: 0.7; }
.file-details { flex: 1; min-width: 0; }
.file-name-display { font-weight: 600; margin-bottom: 2px; word-break: break-all; font-size: 13.5px; }
.file-path { font-size: 11.5px; color: var(--text-muted); font-family: var(--font-mono); }
.file-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.file-action-button {
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    color: var(--text);
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    line-height: 1;
    min-height: 32px;
    white-space: nowrap;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.file-action-button svg.icon-xs { display: block; flex: 0 0 auto; }
.file-action-button .btn-text { display: inline-flex; align-items: center; line-height: 1; }
.file-action-button:hover { background: var(--surface-high); }
.file-action-button.download { background: var(--info-dim); border-color: color-mix(in srgb, var(--info) 40%, transparent); color: var(--info); }
.file-action-button.delete   { background: var(--danger-dim); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.file-action-button.edit     { background: var(--primary-dim); border-color: color-mix(in srgb, var(--primary) 40%, transparent); color: var(--primary); }
.file-action-button.copy.success { background: var(--success); border-color: var(--success); color: var(--on-solid); }
.file-action-button.download:hover { background: color-mix(in srgb, var(--info) 22%, transparent); }
.file-action-button.delete:hover   { background: color-mix(in srgb, var(--danger) 22%, transparent); }
.file-action-button.edit:hover     { background: color-mix(in srgb, var(--primary) 24%, transparent); }

.folders-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 16px; }

.folder-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    transition: border-color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.folder-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.folder-header { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.folder-icon   { font-size: 20px; }
.folder-title  { font-size: 15px; font-weight: 600; color: var(--text); }
.folder-info   { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-bottom: 11px; }
.folder-actions { display: flex; gap: 7px; }

.info-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.info-cards > .info-card:nth-child(1) { grid-column: 1 / -1; }
.info-cards-cdn { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }

.info-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    background: var(--surface-raised);
}
.info-header { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.info-icon { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.info-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.info-content { font-size: 13px; color: var(--text-muted); line-height: 1.65; }
.info-content a { color: var(--primary); text-decoration: none; }
.info-content a:hover { text-decoration: underline; }
.info-content svg { vertical-align: middle; position: relative; top: -1px; margin-right: 3px; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 4px; margin-bottom: 18px; }

.stat-info-card {
    background: var(--surface);
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    overflow: hidden;
}
.stat-info-card::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent 70%);
    opacity: 0.7;
}
.stat-info-header { margin-bottom: 8px; }
.stat-info-card .info-title { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.stat-info-value { font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--text); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.auth-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    align-items: stretch;
}

@media (max-width: 1180px) { .auth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .auth-grid { grid-template-columns: 1fr; } }

.auth-card { margin-bottom: 0; padding: 16px; min-height: 0; display: flex; flex-direction: column; height: 100%; }
.auth-top { display: flex; flex-direction: column; align-items: stretch; gap: 12px; flex: 1; }
.auth-info { width: 100%; min-width: 0; }
.auth-title { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.2; }
.auth-title svg, .auth-title img { flex-shrink: 0; width: 20px; height: 20px; display: block; border-radius: 5px; }
.auth-status { color: var(--text-muted); font-size: 12.5px; line-height: 1.5; }
.auth-actions { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.auth-actions button { width: 100%; min-height: 40px; justify-content: center; margin-top: 0; }

.auth-key-info {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--bg-mid);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 11.5px;
    font-family: var(--font-mono);
    line-height: 1.5;
    word-break: break-word;
}

.auth-bind-container { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.auth-bind-actions, .auth-bound-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.auth-bind-actions button, .auth-bound-actions button { width: 100%; margin-top: 0; }
.auth-bound-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

#cdnAuthCard { grid-column: 1 / -1; }
#cdnLoginContainer .form-group { margin-bottom: 0 !important; }
#cdnApiKeyInput { min-height: 42px; }

.google-auth-card { margin-bottom: 18px; }
.google-auth-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.google-auth-info { flex: 1 1 300px; min-width: 0; }
.google-auth-title { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; }
.google-auth-status { color: var(--text-muted); font-size: 13px; line-height: 1.55; word-break: break-word; }
.google-key-info { margin-top: 9px; padding: 10px 12px; border: 1px solid var(--border); background: var(--bg-mid); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 12px; font-family: var(--font-mono); }
.google-auth-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.google-bind-container { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.google-bind-actions, .google-bound-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 7px; }
.google-bound-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

.footer { text-align: center; padding-top: 22px; margin-top: 8px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12.5px; }
.footer-content { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.footer-text { color: var(--text-faint); font-size: 12px; }
.footer-note { margin-top: 6px; color: var(--text-faint); font-size: 12px; line-height: 1.5; max-width: 920px; }
.footer a { text-decoration: none !important; color: var(--text-muted) !important; transition: color var(--t-fast) !important; }
.footer a:hover { color: var(--primary) !important; }

.editor-modal {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.editor-modal.show { display: flex; animation: tabFade var(--t-mid) var(--ease) both; }

.editor-modal-content {
    width: min(1200px, 100%);
    height: min(86vh, 880px);
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.editor-modal-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.editor-file-path { margin-top: 2px; font-size: 12px; color: var(--text-muted); word-break: break-all; font-family: var(--font-mono); }

.editor-close-button {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface-raised);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.editor-close-button:hover { background: var(--danger-dim); border-color: var(--danger); color: var(--danger); }

.editor-status { padding: 9px 20px; font-size: 12px; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg-mid); font-family: var(--font-mono); }
#editorContainer { flex: 1; min-height: 300px; }

.editor-modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg-mid); }

#legalOverlay .editor-modal-content { max-width: 700px; height: auto; }
#legalOverlay .editor-status { text-align: left; padding: 18px 20px; border-bottom: none; font-family: var(--font-body); }
#legalOverlay .legal-consent { display: flex; align-items: flex-start; gap: 11px; }
#legalOverlay .legal-consent input[type="checkbox"] { margin-top: 3px; flex: 0 0 auto; }
#legalOverlay .legal-label { margin: 0; display: block; color: var(--text); font-size: 14px; line-height: 1.55; cursor: pointer; }
#legalOverlay .legal-label a { color: var(--primary); text-decoration: none; }
#legalOverlay .legal-label a:hover { text-decoration: underline; }
#legalOverlay .legal-hint { margin-top: 9px; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
#legalOverlay .editor-modal-footer { padding: 14px 20px; border-top: none; }
#legalOverlay .upload-button { margin-top: 0; width: auto; padding-inline: 28px; }
.legal-consent-center { display: flex; align-items: flex-start; }

.preview-modal-content { width: min(1100px, 100%); height: min(86vh, 900px); }
.preview-body { padding: 16px; overflow: auto; flex: 1; background: var(--surface); }
.preview-media { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-mid); }
.preview-frame { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-mid); }
.preview-text { white-space: pre-wrap; word-break: break-word; background: var(--bg-mid); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; }
.preview-footer { flex-wrap: wrap; }
.preview-footer .file-action-button { padding: 9px 14px; font-size: 13px; min-height: 38px; }

.conflict-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.conflict-actions button { width: auto; margin-top: 0; }
.conflict-text { color: var(--text-muted); line-height: 1.6; }
#uploadConflictModal .editor-status { font-family: var(--font-body); }

.editor-modal .preview-body a, .editor-modal .conflict-text a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--info) 40%, transparent);
    background: var(--info-dim);
    color: var(--info);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 12.5px;
}

.kv-grid { display: grid; grid-template-columns: 180px 1fr; gap: 8px 14px; font-size: 13px; line-height: 1.5; }
.kv-grid .k { color: var(--text-muted); font-weight: 500; }
.kv-grid .v { color: var(--text); font-weight: 500; word-break: break-word; font-family: var(--font-mono); font-size: 12.5px; }

details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "▾"; margin-left: 8px; color: var(--text-faint); }
details[open] summary::after { content: "▴"; }

.log-line { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 12px; line-height: 1.45; }
.log-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--text-muted); }
.log-badge { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-raised); font-weight: 600; letter-spacing: 0.02em; }
.log-time { color: var(--text-faint); }
.log-msg { color: var(--text); white-space: pre-wrap; word-break: break-word; }

.log-level-info, .log-action-upload, .log-action-validate-ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); background: var(--success-dim); }
.log-level-warning, .log-action-browse, .log-action-move, .log-action-validate { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: var(--warning-dim); }
.log-level-error, .log-action-delete, .log-action-error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-dim); }
.log-level-debug, .log-action-download { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); background: var(--info-dim); }
.log-action-edit { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, transparent); background: var(--primary-dim); }
.log-action-util { color: var(--text-muted); }
.log-action-scan { color: #d946a8; border-color: color-mix(in srgb, #d946a8 40%, transparent); background: color-mix(in srgb, #d946a8 12%, transparent); }

.quota-row { display: flex; gap: 10px; align-items: center; }
.quota-row input { flex: 1 1 auto; min-width: 0; }
.quota-row select { width: 110px; flex: 0 0 auto; }
.quota-current { flex: 0 0 auto; min-width: 190px; text-align: right; font-size: 12px; font-family: var(--font-mono); color: var(--text-muted); user-select: none; }
.quota-current.clickable { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

#domainSelect { width: 100%; }
#customDomainWrapper { animation: tabFade 0.3s var(--ease) both; }
#domainSelect option[disabled] { color: var(--text-faint); }

.upload-separator { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.upload-separator-line { flex: 1; height: 1px; background: var(--border-strong); }
.upload-separator-text { color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

.bulk-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-mid);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 12.5px;
    font-family: var(--font-mono);
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    max-height: 400px;
}
.bulk-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.bulk-url-counter { margin-top: 6px; text-align: right; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.bulk-url-counter .over-limit { color: var(--danger); font-weight: 700; }

.bulk-result-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 12px; font-family: var(--font-mono); gap: 10px; }
.bulk-result-item:last-child { border-bottom: none; }
.bulk-result-url { flex: 1; min-width: 0; word-break: break-all; }
.bulk-result-status { flex-shrink: 0; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.bulk-result-status.ok { background: var(--success-dim); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }
.bulk-result-status.error { background: var(--danger-dim); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.bulk-summary { padding: 11px 14px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bulk-summary-badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.bulk-summary-badge.success { background: var(--success-dim); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }
.bulk-summary-badge.error { background: var(--danger-dim); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--surface-raised);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast), filter var(--t-fast);
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; display: block; }
.btn:hover { background: var(--surface-high); border-color: var(--text-faint); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: var(--danger-dim); border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: var(--on-solid); }
.btn-solid-danger { background: var(--danger); border-color: var(--danger); color: var(--on-solid); }
.btn-solid-danger:hover { filter: brightness(1.1); background: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-raised); color: var(--text); border-color: transparent; }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 12px; }

.fm-card { padding: 0; overflow: hidden; }

.fm-head { padding: 20px 22px 16px; display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; justify-content: space-between; }
.fm-head h2 { margin: 0 0 4px; }
.fm-head p { color: var(--text-muted); font-size: 13px; }

.fm-controls {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 0 22px 18px;
}
.fm-controls .form-group { margin: 0; }
.fm-controls .fm-ctl-actions { display: flex; gap: 8px; }

.fm-quota { display: none; padding: 0 22px 18px; }
.fm-quota.show { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }

.fm-meter { padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-mid); }
.fm-meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; font-size: 12px; color: var(--text-muted); }
.fm-meter-top b { color: var(--text); font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fm-meter-bar { height: 5px; border-radius: 999px; background: var(--surface-high); overflow: hidden; }
.fm-meter-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width var(--t-slow) var(--ease); }
.fm-meter-bar > i.warn { background: var(--warning); }
.fm-meter-bar > i.crit { background: var(--danger); }

.fm-body { display: grid; grid-template-columns: 224px minmax(0, 1fr); border-top: 1px solid var(--border); min-height: 440px; }

.fm-side { border-right: 1px solid var(--border); padding: 14px 10px; background: var(--bg-mid); display: flex; flex-direction: column; gap: 2px; }
.fm-side-title { padding: 4px 10px 8px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }

.fm-folder {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}
.fm-folder:hover { background: var(--surface-raised); color: var(--text); }
.fm-folder.active { background: var(--primary-dim); color: var(--primary); }
.fm-folder .fm-folder-ic { width: 18px; height: 18px; display: block; }
.fm-folder .fm-folder-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-folder .fm-folder-count { font-size: 11px; font-family: var(--font-mono); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.fm-folder.active .fm-folder-count { color: var(--primary); }
.fm-folder-bar { grid-column: 2 / -1; height: 3px; border-radius: 999px; background: var(--surface-high); overflow: hidden; margin-top: -2px; }
.fm-folder-bar > i { display: block; height: 100%; background: var(--text-faint); border-radius: inherit; }
.fm-folder.active .fm-folder-bar > i { background: var(--primary); }
.fm-folder-size { grid-column: 2 / -1; font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); margin-top: -4px; }

.fm-main { min-width: 0; display: flex; flex-direction: column; position: relative; }

.fm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.fm-search { position: relative; flex: 1 1 200px; min-width: 160px; }
.fm-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-faint); pointer-events: none; }
.fm-search input { padding-left: 34px; min-height: 36px; padding-top: 7px; padding-bottom: 7px; }
.fm-toolbar select { width: auto; min-height: 36px; padding-top: 7px; padding-bottom: 7px; font-size: 13px; }

.fm-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.fm-seg button { width: 36px; height: 34px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--t-fast), color var(--t-fast); }
.fm-seg button svg { width: 16px; height: 16px; display: block; }
.fm-seg button:hover { color: var(--text); background: var(--surface-raised); }
.fm-seg button.active { background: var(--primary-dim); color: var(--primary); }

.fm-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px 0; font-size: 12px; color: var(--text-muted); align-items: center; }
.fm-summary b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.fm-selall { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; font-size: 12px; font-weight: 500; }

.fm-selbar {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 16px 0;
    padding: 8px 10px 8px 14px;
    border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
    background: var(--primary-dim);
    border-radius: var(--radius);
}
.fm-selbar.show { display: flex; animation: tabFade var(--t-fast) var(--ease) both; }
.fm-selbar .fm-sel-count { font-weight: 600; font-size: 13px; margin-right: auto; color: var(--text); }

.fm-list { padding: 14px 16px 6px; flex: 1; }

.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }

.fm-item {
    position: relative;
    display: grid;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-raised);
    overflow: hidden;
    transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
    user-select: none;
}
.fm-item:hover { border-color: var(--border-strong); }
.fm-item.selected { border-color: var(--primary); background: var(--primary-dim); box-shadow: 0 0 0 1px var(--primary); }

.fm-grid .fm-item { grid-template-areas: "thumb" "name" "sub"; grid-template-rows: auto auto auto; }
.fm-grid .fm-thumb { grid-area: thumb; aspect-ratio: 4 / 3; }
.fm-grid .fm-name { grid-area: name; padding: 10px 12px 0; }
.fm-grid .fm-sub { grid-area: sub; padding: 2px 12px 11px; }
.fm-grid .fm-size, .fm-grid .fm-date { display: none; }

.fm-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        conic-gradient(var(--surface-high) 25%, transparent 0 50%, var(--surface-high) 0 75%, transparent 0) 0 0 / 14px 14px,
        var(--bg-mid);
    cursor: pointer;
    overflow: hidden;
}
.fm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-thumb img.contain { object-fit: contain; padding: 14%; }

.fm-glyph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); }
.fm-glyph svg { width: 32px; height: 32px; display: block; }
.fm-ext { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; background: var(--surface-high); color: var(--text-muted); }
.t-css .fm-glyph { color: var(--info); }      .t-css .fm-ext { background: var(--info-dim); color: var(--info); }
.t-js .fm-glyph { color: var(--warning); }    .t-js .fm-ext { background: var(--warning-dim); color: var(--warning); }
.t-fonts .fm-glyph { color: var(--success); } .t-fonts .fm-ext { background: var(--success-dim); color: var(--success); }
.t-img .fm-glyph { color: var(--primary); }   .t-img .fm-ext { background: var(--primary-dim); color: var(--primary); }
.t-video .fm-glyph { color: var(--danger); }  .t-video .fm-ext { background: var(--danger-dim); color: var(--danger); }
.t-audio .fm-glyph { color: #d946ef; }        .t-audio .fm-ext { background: color-mix(in srgb, #d946ef 14%, transparent); color: #d946ef; }
.t-docs .fm-glyph { color: #14b8a6; }         .t-docs .fm-ext { background: color-mix(in srgb, #14b8a6 14%, transparent); color: #14b8a6; }

.fm-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; min-width: 0; }
.fm-name:hover { color: var(--primary); }
.fm-sub { font-size: 11.5px; color: var(--text-muted); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-size, .fm-date { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.fm-size { text-align: right; }

.fm-check { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; margin: 0; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(4px); border: 1px solid var(--border-strong); opacity: 0; transition: opacity var(--t-fast); z-index: 2; cursor: pointer; }
.fm-item:hover .fm-check, .fm-item.selected .fm-check, .fm-list.has-sel .fm-check { opacity: 1; }
.fm-check input { margin: 0; }

.fm-more { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 7px; border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(4px); color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity var(--t-fast), color var(--t-fast); z-index: 2; }
.fm-more svg { width: 15px; height: 15px; display: block; }
.fm-item:hover .fm-more, .fm-more:focus-visible, .fm-more.open { opacity: 1; }
.fm-more:hover { color: var(--text); }

.fm-rows .fm-item {
    grid-template-columns: 32px 40px minmax(0, 1fr) 84px 184px 36px;
    grid-template-areas: "check thumb name size date more";
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: var(--radius);
    margin-bottom: 6px;
}
.fm-rows .fm-thumb { grid-area: thumb; width: 40px; height: 40px; border-radius: 8px; }
.fm-rows .fm-glyph svg { width: 20px; height: 20px; }
.fm-rows .fm-glyph .fm-ext { display: none; }
.fm-rows .fm-name { grid-area: name; padding: 0; }
.fm-rows .fm-sub { display: none; }
.fm-rows .fm-size { grid-area: size; }
.fm-rows .fm-date { grid-area: date; }
.fm-rows .fm-check { position: static; grid-area: check; opacity: 1; background: transparent; border: none; backdrop-filter: none; }
.fm-rows .fm-more { position: static; grid-area: more; opacity: 1; background: transparent; border-color: transparent; }
.fm-rows .fm-more:hover { background: var(--surface-high); }

.fm-more-wrap { display: flex; justify-content: center; padding: 8px 0 12px; }

.fm-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 64px 24px; color: var(--text-muted); }
.fm-empty svg { width: 46px; height: 46px; color: var(--text-faint); display: block; margin-bottom: 4px; }
.fm-empty b { color: var(--text); font-size: 15px; font-weight: 600; }
.fm-empty span { font-size: 13px; max-width: 360px; }

.fm-skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.fm-skeleton i { display: block; aspect-ratio: 4 / 3.6; border-radius: var(--radius-lg); background: linear-gradient(100deg, var(--surface-raised) 30%, var(--surface-high) 50%, var(--surface-raised) 70%) 0 0 / 220% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

.fm-drop {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    background: color-mix(in srgb, var(--primary) 16%, var(--surface));
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    margin: 8px;
    color: var(--primary);
    font-weight: 600;
    pointer-events: none;
    backdrop-filter: blur(3px);
}
.fm-drop svg { width: 36px; height: 36px; display: block; }
.fm-main.dragging .fm-drop { display: flex; }

.fm-menu {
    position: fixed;
    z-index: 10000;
    min-width: 214px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    overscroll-behavior: contain;
}
.fm-menu.show { display: block; animation: tabFade var(--t-fast) var(--ease) both; }
.fm-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    border-radius: 7px;
    cursor: pointer;
    text-align: left;
}
.fm-menu button svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-muted); display: block; }
.fm-menu button:hover { background: var(--surface-raised); }
.fm-menu button.danger { color: var(--danger); }
.fm-menu button.danger svg { color: var(--danger); }
.fm-menu hr { border: none; height: 1px; background: var(--border); margin: 5px 4px; }

.fm-dialog { width: min(520px, 100%); height: auto; max-height: 90vh; }
.fm-dialog.wide { width: min(700px, 100%); }
.fm-dialog-body { padding: 18px 20px; overflow-y: auto; }
.fm-dialog-body .form-group:last-child { margin-bottom: 0; }
.fm-dialog-body p { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }
.fm-dialog-body p b { color: var(--text); }
.fm-dialog .editor-modal-footer { flex-wrap: wrap; }
.fm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fm-two .form-group { margin-bottom: 0; }
#adminDomainAssignForm .fm-two { margin-bottom: 18px; }

.fm-list-box { max-height: 180px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-mid); margin-top: 12px; }
.fm-list-box div { padding: 7px 12px; font-size: 12px; font-family: var(--font-mono); border-bottom: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-list-box div:last-child { border-bottom: none; }
.fm-list-box .err { color: var(--danger); white-space: normal; }

.fm-progress { height: 6px; border-radius: 999px; background: var(--surface-high); overflow: hidden; margin: 14px 0 6px; }
.fm-progress > i { display: block; height: 100%; width: 0; background: var(--primary); transition: width var(--t-mid) var(--ease); }
.fm-progress-text { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }

.fm-hash { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-mid); font-family: var(--font-mono); font-size: 12px; word-break: break-all; line-height: 1.5; min-height: 46px; }
.fm-hash span { flex: 1; }

.fm-seg-text { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.fm-seg-text button { padding: 0 14px; height: 32px; border: none; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--font-mono); }
.fm-seg-text button.active { background: var(--primary-dim); color: var(--primary); }
.fm-seg-text button:hover { color: var(--text); }

.fm-textarea { min-height: 150px; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; resize: vertical; margin-top: 12px; }

.fm-detail-preview { display: flex; justify-content: center; padding: 10px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-mid); }
.fm-detail-preview img { max-width: 100%; max-height: 190px; border-radius: 6px; display: block; }

.toasts { position: fixed; right: 18px; bottom: 100px; z-index: 11000; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(420px, calc(100vw - 36px));
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    animation: toastIn var(--t-slow) var(--ease) both;
}
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
.toast.leaving { animation: toastOut var(--t-mid) var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 1100px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
    body { padding: 12px 12px 32px; }

    .container { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
    .container > * { min-width: 0; max-width: 100%; }

    .container > .header { order: 0; }
    .container > .tab-container { order: 1; }
    .container > .auth-grid { order: 2; }
    .container > .tab-content-container { order: 3; }
    .container > .info-cards-cdn { order: 4; }
    .container > .info-cards { order: 5; }
    .container > .stats-row { order: 6; }
    .container > .footer { order: 7; }

    .tab-container {
        position: sticky;
        top: 8px;
        flex-direction: row;
        gap: 4px;
        padding: 6px;
        margin-bottom: 14px;
        overflow-x: auto;
        max-height: none;
        scrollbar-width: none;
        border-radius: var(--radius-lg);
        backdrop-filter: blur(10px);
    }
    .tab-container::-webkit-scrollbar { display: none; }
    .tab-container::before { display: none; }
    .tab-button { width: auto; flex: 0 0 auto; padding: 9px 13px; white-space: nowrap; }
    .tab-button.active::before { display: none; }
    .tab-button.new::after { display: none; }

    .fm-controls { grid-template-columns: 1fr; }
    .fm-controls .fm-ctl-actions { flex-wrap: wrap; }

    .fm-body { grid-template-columns: 1fr; }
    .fm-side { border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; overflow-x: auto; padding: 10px; gap: 6px; scrollbar-width: none; }
    .fm-side-title { display: none; }
    .fm-folder { width: auto; flex: 0 0 auto; border: 1px solid var(--border); }
    .fm-folder-bar, .fm-folder-size { display: none; }
}

@media (max-width: 720px) {
    .card { padding: 18px; }
    .header { padding: 12px 14px; }
    .uptime-bar { display: none; }
    .header-tools { margin-left: 0; }

    .result-content { flex-direction: column; align-items: stretch; gap: 10px; }
    .copy-button { align-self: flex-end; }
    .url-input-wrapper { flex-direction: column; }

    .file-item { flex-direction: column; align-items: flex-start; }
    .file-actions { width: 100%; justify-content: flex-end; }
    .folders-container { grid-template-columns: 1fr; }
    .info-cards, .info-cards-cdn { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .stat-info-value { font-size: 24px; }

    .editor-modal { padding: 10px; }
    .editor-modal-content { height: 90vh; }
    .editor-modal-header, .editor-modal-footer { padding: 12px; }
    .fm-dialog { height: auto; }
    .fm-two { grid-template-columns: 1fr; }

    .quota-row { flex-wrap: wrap; align-items: stretch; }
    .quota-row select { width: 100%; }
    .quota-current { width: 100%; min-width: 0; text-align: left; }
    .kv-grid { grid-template-columns: 1fr; gap: 2px 0; }
    .kv-grid .v { margin-bottom: 8px; }

    .fm-head, .fm-controls, .fm-quota { padding-left: 16px; padding-right: 16px; }
    .fm-rows .fm-item { grid-template-columns: 28px 36px minmax(0, 1fr) 34px; grid-template-areas: "check thumb name more"; }
    .fm-rows .fm-size, .fm-rows .fm-date { display: none; }
    .fm-rows .fm-thumb { width: 36px; height: 36px; }
    .fm-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .fm-check, .fm-more { opacity: 1; }
    .toasts { left: 12px; right: 12px; bottom: 92px; align-items: stretch; }
}

@media (max-width: 480px) {
    body { font-size: 14px; }
    .stats-row { grid-template-columns: 1fr; }
    .discord-bot-invite-button, .telegram-bot-open-button { flex: 1 1 100%; }
    .conflict-actions button { width: 100%; }
    .editor-modal-footer { flex-direction: column; }
    .editor-modal-footer button, .editor-modal-footer .file-action-button { width: 100%; }
    #legalOverlay .upload-button { width: 100%; }
}

.legal-shell { max-width: 1120px; margin: 0 auto; }

.legal-top {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.legal-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 16px; }
.legal-brand .logo { width: 34px; height: 34px; border-radius: 10px; }
.legal-switch { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--border-strong); border-radius: var(--radius); margin-left: 8px; }
.legal-switch a { padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--text-muted); text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.legal-switch a:hover { color: var(--text); }
.legal-switch a.active { background: var(--primary-dim); color: var(--primary); font-weight: 600; }

.legal-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }

.legal-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 14px 8px 14px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); scrollbar-width: thin; }
.legal-toc-title { padding: 0 8px 8px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.legal-toc ol { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.legal-toc a { display: grid; grid-template-columns: 24px 1fr; gap: 6px; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; line-height: 1.4; color: var(--text-muted); text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.legal-toc a span { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); padding-top: 1px; }
.legal-toc a:hover { background: var(--surface-raised); color: var(--text); }
.legal-toc a.active { background: var(--primary-dim); color: var(--primary); font-weight: 600; }
.legal-toc a.active span { color: var(--primary); }

.legal-doc { padding: 36px 40px 28px; margin-bottom: 18px; }
.legal-doc h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.03em; margin-bottom: 18px; }

.legal-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 12px 16px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-mid); font-size: 13px; color: var(--text-muted); }
.legal-meta strong { color: var(--text); font-weight: 600; }

.legal-body { font-size: 15px; line-height: 1.75; color: var(--text-muted); }
.legal-body h2 { margin: 36px 0 10px; padding-top: 6px; font-size: 20px; letter-spacing: -0.02em; scroll-margin-top: 20px; }
.legal-body h3 { margin: 22px 0 6px; font-size: 16px; color: var(--text); }
.legal-body p { margin: 0 0 12px; }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body ul { margin: 0 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.legal-body li { position: relative; padding-left: 22px; }
.legal-body li::before { content: ''; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.legal-body a { color: var(--primary); text-underline-offset: 3px; word-break: break-word; }
.legal-body a:hover { color: var(--primary-hover); }
.legal-body em { color: var(--text-faint); }

.legal-next { display: flex; justify-content: flex-end; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border); }
.legal-next a { font-weight: 600; font-size: 14px; text-decoration: none; color: var(--primary); }
.legal-next a:hover { color: var(--primary-hover); }

@media (max-width: 900px) {
    .legal-layout { grid-template-columns: 1fr; }
    .legal-toc { position: static; max-height: none; }
    .legal-toc ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .legal-doc { padding: 24px 20px 20px; }
    .legal-doc h1 { font-size: 24px; }
    .legal-switch { margin-left: 0; order: 3; width: 100%; }
    .legal-switch a { flex: 1; text-align: center; }
    .legal-top .header-tools { margin-left: auto; }
}

.legal-shell.wide { max-width: 1320px; }
.legal-shell.wide .legal-layout { grid-template-columns: 300px minmax(0, 1fr); }
.legal-shell.wide .legal-toc { padding-top: 12px; }

.toc-filter { margin: 0 8px 10px 0; width: calc(100% - 8px); min-height: 34px; padding: 6px 11px; font-size: 13px; }
.legal-toc li.toc-h2 { margin-top: 8px; }
.legal-toc li.toc-h2:first-child { margin-top: 0; }
.legal-toc li.toc-h2 > a { font-weight: 600; color: var(--text); }
.legal-toc li.toc-ep > a { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 14px; font-size: 12px; }
.legal-toc li.toc-ep code { font-family: var(--font-mono); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legal-toc li.hidden { display: none; }

.m {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 46px;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.5;
    color: var(--mc);
    background: color-mix(in srgb, var(--mc) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--mc) 45%, transparent);
}
.m-get { --mc: var(--info); }
.m-post { --mc: var(--success); }
.m-put { --mc: var(--warning); }
.m-patch { --mc: var(--primary); }
.m-delete { --mc: var(--danger); }
b.m { font-weight: 700; }

.legal-body section.ep { margin: 0 0 20px; padding: 18px 20px 6px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-mid); }
.legal-body h3.ep-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; font-size: 16px; scroll-margin-top: 20px; }
.legal-body h3.ep-title .m { font-size: 11.5px; padding: 3px 10px; }
.legal-body h3.ep-title code { font-size: 15px; color: var(--text); background: none; border: none; padding: 0; word-break: break-all; }

.legal-body code { font-family: var(--font-mono); font-size: 0.86em; padding: 1px 6px; border-radius: 5px; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text); }
.legal-body pre { position: relative; margin: 0 0 14px; padding: 14px 16px; overflow-x: auto; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; line-height: 1.6; scrollbar-width: thin; }
.legal-body pre code { padding: 0; background: none; border: none; font-size: inherit; white-space: pre; color: var(--text); }
.legal-body pre .copy-code { position: absolute; top: 8px; right: 8px; padding: 3px 9px; font-size: 11px; font-weight: 600; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity var(--t-fast), color var(--t-fast); }
.legal-body pre:hover .copy-code, .legal-body pre .copy-code:focus-visible { opacity: 1; }
.legal-body pre .copy-code:hover { color: var(--text); border-color: var(--primary); }
.legal-body pre .copy-code.done { color: var(--success); border-color: var(--success); opacity: 1; }

.legal-body .tbl { margin: 0 0 14px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.legal-body table { width: 100%; border-collapse: collapse; font-size: 13px; }
.legal-body th { text-align: left; padding: 9px 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-raised); white-space: nowrap; }
.legal-body td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: top; }
.legal-body td:first-child { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); white-space: nowrap; }

@media (max-width: 900px) {
    .legal-shell.wide .legal-layout { grid-template-columns: 1fr; }
    .legal-body section.ep { padding: 14px 14px 4px; }
    .legal-body pre .copy-code { opacity: 1; }
}
.legal-toc li.toc-h2 > a { display: block; }
.legal-toc li.toc-h2 > a > span { display: inline-block; width: 30px; }
.legal-body h2.grp { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--border); font-size: 26px; letter-spacing: -0.03em; }
.legal-body h2.grp:first-child { margin-top: 8px; border-top: none; padding-top: 0; }
.legal-toc li.toc-grp { margin-top: 16px; }
.legal-toc li.toc-grp > a { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); }
.err-wrap { min-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.err-main { flex: 1; display: grid; place-items: center; padding: 28px 0 40px; }
.err-card { width: min(100%, 580px); margin: 0; padding: 48px 36px 40px; text-align: center; overflow: hidden; }
.err-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 45% at 50% 0%, color-mix(in srgb, var(--ec, var(--primary)) 16%, transparent), transparent 70%); }
.err-card > * { position: relative; z-index: 1; }
.err-403 { --ec: var(--warning); }
.err-404 { --ec: var(--primary); }
.err-500 { --ec: var(--danger); }

.err-code {
    font-size: clamp(88px, 22vw, 148px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, var(--ec, var(--primary)), color-mix(in srgb, var(--ec, var(--primary)) 35%, var(--info)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.err-title { margin: 14px 0 10px; font-size: 26px; letter-spacing: -0.03em; }
.err-text { max-width: 440px; margin: 0 auto 20px; color: var(--text-muted); font-size: 15px; line-height: 1.65; }

.err-path {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin-bottom: 26px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-mid);
    color: var(--text-faint);
    font-size: 12px;
}
.err-path code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-family: var(--font-mono); }

.err-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.err-actions .btn { min-height: 42px; padding: 0 22px; font-size: 14px; }

@media (max-width: 560px) {
    .err-card { padding: 36px 20px 30px; }
    .err-title { font-size: 22px; }
    .err-actions .btn { flex: 1 1 100%; }
}
.an-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.an-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-mid); }
.an-kpi span { font-size: 12px; color: var(--text-muted); }
.an-kpi b { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.an-kpi em { font-style: normal; font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }

.an-block { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-mid); margin-bottom: 14px; }
.an-block-title { margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.an-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.an-cols .an-block { margin-bottom: 14px; }

.an-chart { width: 100%; height: auto; display: block; overflow: visible; }
.an-bar { fill: var(--primary); }
.an-bar:hover { fill: var(--primary-hover); }
.an-zero { fill: var(--border-strong); }
.an-hit { fill: transparent; }
.an-hit:hover { fill: color-mix(in srgb, var(--primary) 8%, transparent); }
.an-axis { stroke: var(--border-strong); stroke-width: 1; }
.an-label { fill: var(--text-faint); font-size: 11px; font-family: var(--font-mono); }

.an-row { display: grid; grid-template-columns: minmax(70px, 120px) 1fr auto; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; }
.an-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.an-row-bar { height: 6px; border-radius: 999px; background: var(--surface-high); overflow: hidden; }
.an-row-bar i { display: block; height: 100%; border-radius: inherit; }
.an-row-val { color: var(--text-muted); font-family: var(--font-mono); font-size: 11.5px; white-space: nowrap; }

.an-file { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.an-file:first-of-type { border-top: none; }
.an-file a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-file a:hover { color: var(--primary); }
.an-file span { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }

.wh-table td { font-size: 12.5px; }
.wh-table td:first-child { white-space: nowrap; }
.wh-err { color: var(--danger); font-family: var(--font-mono); font-size: 12px; word-break: break-word; }

@media (max-width: 720px) {
    .an-cols { grid-template-columns: 1fr; }
}
.fm-tr-preview { display: flex; align-items: center; justify-content: center; min-height: 120px; max-height: 260px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: conic-gradient(var(--surface-high) 25%, transparent 0 50%, var(--surface-high) 0 75%, transparent 0) 0 0 / 14px 14px, var(--bg-mid); overflow: hidden; }
.fm-tr-preview img { max-width: 100%; max-height: 240px; display: block; border-radius: 4px; }
.fm-dialog input[type="range"] { padding: 0; }
.fm-dialog input[type="number"] { appearance: textfield; }
.fm-head-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.fm-mini-select { width: auto; min-width: 0; padding: 4px 26px 4px 8px; font-size: 12px; height: auto; }
.fm-ttl { display: inline-flex; align-items: center; gap: 4px; color: var(--warning, #d9a441); white-space: nowrap; }
.fm-ttl svg { width: 12px; height: 12px; }
.fm-ttl-row { display: none; margin-left: 8px; }
.fm-rows .fm-ttl-row { display: inline-flex; }
.fm-trash-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.fm-trash-list { max-height: 340px; overflow: auto; }
.fm-trash-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 4px; cursor: pointer; margin: 0; font-size: 12.5px; }
.fm-trash-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
.fm-trash-meta { color: var(--text-muted); font-size: 11.5px; white-space: nowrap; }

.fm-share-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.fm-share-row:last-child { border-bottom: 0; }
.fm-share-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fm-share-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.fm-share-main span { color: var(--text-muted); font-size: 11.5px; }
.fm-share-actions { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
@media (max-width: 640px) { .fm-share-row { flex-direction: column; align-items: stretch; } }

.fm-dd-list { max-height: 380px; overflow: auto; }
.fm-dd-group { padding: 8px 4px 10px; border-bottom: 1px solid var(--border); }
.fm-dd-group:last-child { border-bottom: 0; }
.fm-dd-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; margin-bottom: 4px; }
.fm-dd-head span { color: var(--text-muted); }
.fm-dd-file { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 4px 0; cursor: pointer; margin: 0; font-size: 12.5px; }
.fm-dd-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); }
.fm-dd-file em { font-style: normal; font-size: 11.5px; color: var(--text-muted); }
.fm-dd-file input:checked ~ em { color: var(--success); }

.legal-toc li.toc-sub > a { display: block; padding: 3px 8px 3px 20px; font-size: 12px; }
.legal-toc li.toc-sub > a::before { content: '– '; color: var(--text-faint); }
.toc-empty { padding: 10px 8px 2px; font-size: 12.5px; color: var(--text-faint); }
.legal-body .lead { font-size: 17px; line-height: 1.65; color: var(--text); }
.legal-body kbd { font-family: var(--font-mono); font-size: 0.82em; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--surface-raised); color: var(--text); white-space: nowrap; }
.legal-body hr.sep { margin: 28px 0; border: 0; border-top: 1px solid var(--border); }
.legal-body h2 .h-anchor, .legal-body h3 .h-anchor { margin-left: 8px; opacity: 0; font-weight: 400; color: var(--text-faint); text-decoration: none; }
.legal-body h2:hover .h-anchor, .legal-body h3:hover .h-anchor { opacity: 1; }
.callout { margin: 0 0 16px; padding: 12px 16px 12px 14px; border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius); background: var(--bg-mid); font-size: 14px; line-height: 1.65; }
.callout-title { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.callout > div:last-child { color: var(--text-muted); }
.callout-tip { border-left-color: var(--success); } .callout-tip .callout-title { color: var(--success); }
.callout-note { border-left-color: var(--info); } .callout-note .callout-title { color: var(--info); }
.callout-warn { border-left-color: var(--warning); } .callout-warn .callout-title { color: var(--warning); }
.callout-danger { border-left-color: var(--danger); } .callout-danger .callout-title { color: var(--danger); }
.legal-body ol.steps { margin: 0 0 16px; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 8px; }
.legal-body ol.steps > li { position: relative; padding: 8px 12px 8px 46px; counter-increment: step; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-mid); }
.legal-body ol.steps > li::before { content: counter(step); position: absolute; left: 12px; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-dim); color: var(--primary); font-weight: 700; font-size: 13px; line-height: 24px; text-align: center; }
.tabs { margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.tab-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 6px 0; background: var(--bg-mid); border-bottom: 1px solid var(--border); }
.tab-bar button { padding: 7px 14px; border: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--text-muted); font: 600 12.5px var(--font-mono); cursor: pointer; }
.tab-bar button[aria-selected="true"] { background: var(--surface); color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.tab-panel { padding: 0; }
.tab-panel pre, .tab-panel p { margin: 0; border: 0; border-radius: 0; }
.tab-panel p { padding: 12px 16px; }
figure.shot { margin: 0 0 22px; }
.shot-img { position: relative; display: block; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--bg-mid); line-height: 0; }
.shot-img img { width: 100%; height: auto; display: block; cursor: zoom-in; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font: 700 12px/22px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.5); pointer-events: none; }
figure.shot figcaption { margin: 8px 2px 0; font-size: 13px; color: var(--text-faint); }
ol.shot-legend { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: pin; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 18px; }
ol.shot-legend li { position: relative; padding-left: 32px; font-size: 13.5px; line-height: 1.55; counter-increment: pin; }
ol.shot-legend li::before { content: counter(pin); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-dim); color: var(--primary); font-weight: 700; font-size: 12px; line-height: 22px; text-align: center; background-image: none; }
ol.shot-legend li b { color: var(--text); font-weight: 600; }
.legal-body ol.shot-legend li::before { top: 1px; left: 0; width: 22px; height: 22px; border-radius: 50%; }
.lightbox { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(5, 7, 12, 0.88); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6); }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0 0 18px; }
.guide-card { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-mid); text-decoration: none !important; color: var(--text-muted) !important; transition: border-color var(--t-fast), transform var(--t-fast); }
.guide-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.guide-card b { display: block; margin-bottom: 2px; color: var(--text); font-size: 14.5px; }
.guide-card span { font-size: 13px; line-height: 1.5; }
.legal-body .tbl td:first-child.plain { font-family: inherit; white-space: normal; }
@media (max-width: 960px) { .shot-legend { grid-template-columns: 1fr; } .pin { width: 18px; height: 18px; font-size: 10.5px; line-height: 18px; } }

.toc-toggle { display: none; }
.lightbox-close { position: fixed; top: 12px; right: 12px; width: 38px; height: 38px; border: 1px solid var(--border-strong); border-radius: 50%; background: rgba(15, 18, 26, 0.85); color: #fff; font-size: 16px; cursor: pointer; z-index: 10000; }
.lightbox.pan { align-items: flex-start; justify-content: flex-start; overflow: auto; padding: 56px 12px 12px; cursor: default; -webkit-overflow-scrolling: touch; }
.lightbox.pan img { max-width: none; max-height: none; flex: 0 0 auto; }
@media (max-width: 960px) {
    .legal-layout, .legal-shell.wide .legal-layout { grid-template-columns: minmax(0, 1fr); }
    .legal-doc, .legal-toc, .legal-body { min-width: 0; }
    .legal-toc { position: sticky; top: 8px; z-index: 30; max-height: none; padding: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
    .legal-toc-title { display: none; }
    .toc-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 600 14px inherit; cursor: pointer; }
    .toc-toggle svg { width: 18px; height: 18px; transition: transform var(--t-fast); }
    .legal-toc.open .toc-toggle svg { transform: rotate(180deg); }
    .legal-toc .toc-filter, .legal-toc ol { display: none; }
    .legal-toc.open .toc-filter { display: block; margin: 4px 4px 8px; width: calc(100% - 8px); }
    .legal-toc.open ol { display: flex; flex-direction: column; grid-template-columns: none; max-height: 58vh; overflow-y: auto; }
    .legal-body h2, .legal-body h3 { scroll-margin-top: 72px; }
    .shot-img::after { content: '⤢ ' attr(data-label); position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.65); color: #fff; font: 11px/1.4 system-ui, sans-serif; pointer-events: none; }
}
@media (max-width: 640px) {
    .legal-top { gap: 8px; }
    .legal-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 100%; margin-left: 0; }
    .legal-switch a { padding: 8px 6px; font-size: 12.5px; text-align: center; line-height: 1.25; }
    .legal-doc { padding: 18px 14px 16px; }
    .legal-doc h1 { font-size: 22px; }
    .legal-body { font-size: 14.5px; line-height: 1.7; }
    .legal-body .lead { font-size: 15.5px; }
    .legal-body h2 { font-size: 18px; margin-top: 28px; }
    .legal-body h3 { font-size: 15px; }
    .legal-body pre { font-size: 12px; padding: 12px; }
    .callout { padding: 10px 12px; font-size: 13.5px; }
    .legal-body ol.steps > li { padding: 8px 10px 8px 42px; }
    .tab-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .tab-bar button { flex: 0 0 auto; padding: 8px 12px; }
    .guide-cards { grid-template-columns: 1fr; }
    .legal-body .tbl.plain { border: 0; overflow: visible; }
    .legal-body .tbl.plain table, .legal-body .tbl.plain tbody, .legal-body .tbl.plain tr, .legal-body .tbl.plain td { display: block; width: 100%; }
    .legal-body .tbl.plain thead { display: none; }
    .legal-body .tbl.plain tr { margin: 0 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-mid); overflow: hidden; }
    .legal-body .tbl.plain td { border-top: 0; padding: 6px 12px; white-space: normal; word-break: break-word; }
    .legal-body .tbl.plain td::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
    .legal-body .tbl.plain td:first-child { font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background: var(--surface-raised); }
    .legal-body .tbl.plain td:first-child::before { display: none; }
    .legal-body .tbl.plain td:empty { display: none; }
    ol.shot-legend li { font-size: 13px; }
    .footer-content { padding: 0 8px; }
}

@media (max-width: 640px) {
    .legal-body pre { padding-top: 34px; }
    .legal-body pre .copy-code { top: 6px; right: 6px; }
}
.kind-badge { font-family: inherit; font-weight: 600; margin-left: 6px; vertical-align: middle; }
.kind-personal { background: var(--primary-dim); border-color: color-mix(in srgb, var(--primary) 40%, transparent); color: var(--primary); }
.kind-work { background: color-mix(in srgb, var(--info) 14%, transparent); border-color: color-mix(in srgb, var(--info) 40%, transparent); color: var(--info); }
.kind-service { background: color-mix(in srgb, var(--warning) 14%, transparent); border-color: color-mix(in srgb, var(--warning) 40%, transparent); color: var(--warning); }

.dom-summary { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.dom-summary b { color: var(--text); }
.dom-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-mid); padding: 14px 16px; margin-bottom: 12px; }
.dom-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.dom-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dom-name { font-weight: 700; font-size: 15px; word-break: break-all; }
.dom-meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.dom-chip { flex-shrink: 0; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.dom-chip.ok { background: var(--success-dim); border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }
.dom-chip.warn { background: color-mix(in srgb, var(--warning) 14%, transparent); border-color: color-mix(in srgb, var(--warning) 40%, transparent); color: var(--warning); }
.dom-methods { display: flex; flex-wrap: wrap; margin-top: 12px; max-width: 100%; }
.dom-methods button { height: 30px; font-family: inherit; }
.dom-panel { margin-top: 12px; }
.dom-rec { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
.dom-rec:first-child { border-top: 0; }
.dom-rec code, .dom-panel .hint code, .dom-panel p code { font-family: var(--font-mono); font-size: 12.5px; background: var(--surface-raised); color: var(--text); padding: 3px 8px; border-radius: 6px; word-break: break-all; }
.dom-steps { margin: 10px 0 0 18px; padding: 0; color: var(--text-muted); font-size: 13px; line-height: 1.65; }
.dom-error { margin-top: 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--danger-dim); color: var(--danger); font-size: 12.5px; line-height: 1.5; }
.dom-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 640px) {
    .dom-rec { grid-template-columns: minmax(0, 1fr) auto; }
    .dom-rec > span { grid-column: 1 / -1; font-weight: 600; }
    .dom-methods button { flex: 1 1 auto; padding: 0 10px; }
}
.dom-note { margin: 10px 0 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }
#domainsCard .an-head > div:first-child { flex: 1 1 380px; min-width: 0; }

#adminDomainClaims th { text-align: left; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); padding: 8px 12px; white-space: nowrap; }
#adminDomainClaims td { padding: 10px 12px; vertical-align: middle; }
#adminDomainClaims td:nth-child(4), #adminDomainClaims td:nth-child(5) { white-space: nowrap; }
#adminDomainClaims .wh-actions { white-space: nowrap; text-align: right; }

.dom-item, .dom-panel, .dom-steps li, .dom-note, .dom-error, .dom-meta { min-width: 0; overflow-wrap: anywhere; }

.tbl.wh-table { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); }
.wh-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wh-table th { text-align: left; padding: 9px 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-raised); white-space: nowrap; }
.wh-table td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.wh-table .wh-actions { white-space: nowrap; }

.fi-section { margin: 18px 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.fi-section:first-of-type { margin-top: 4px; }
.fi-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text-muted); margin: 2px 4px 2px 0; }
.fi-chip em { font-style: normal; font-weight: 400; color: var(--text-faint); }
.fi-you { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, transparent); background: color-mix(in srgb, var(--primary) 12%, transparent); }
.fi-warn { color: var(--warning, #b3740a); font-weight: 600; }
.fi-mono { font-family: var(--font-mono); font-size: 12px; word-break: break-all; }
.fi-copy { display: flex; margin: 8px 0 0; padding: 3px 12px; font-size: 11.5px; }
.fi-share { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.fi-share:last-child { border-bottom: 0; }
.fi-share span { font-size: 12px; color: var(--text-muted); }
.fi-note { margin-top: 16px; font-size: 12px; color: var(--text-muted); }

.purge-timer { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); }
.purge-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.purge-count { margin-top: 4px; font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.purge-bar { margin-top: 10px; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.purge-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--primary); transition: width .6s ease; }
.purge-when { margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.purge-timer.soon .purge-count { color: var(--danger); }
.purge-timer.soon .purge-bar span { background: var(--danger); }
.purge-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }

.plan-card { margin-bottom: 16px; }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.plan-name { font-size: 20px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-sub { margin-top: 2px; font-size: 13px; color: var(--text-muted); }
.plan-max { font-size: 12.5px; color: var(--text-muted); padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; }
.plan-max b { color: var(--text); }
.plan-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: .02em; }
.plan-badge.discord { background: color-mix(in srgb, #5865f2 16%, transparent); color: #7983f5; border: 1px solid color-mix(in srgb, #5865f2 40%, transparent); }
.plan-badge.paid { background: var(--success-dim); color: var(--success); }
.plan-addons { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.plan-chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--primary-dim); color: var(--primary); }
.plan-meters { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; }
.plan-meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.plan-meter-top b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-bar { margin-top: 6px; height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.plan-bar i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.plan-meter.warn .plan-bar i { background: var(--warning); }
.plan-meter.danger .plan-bar i { background: var(--danger); }
.plan-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
.plan-foot a { color: var(--primary); font-weight: 600; }

.gh-inst { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gh-inst a.dom-chip { text-decoration: none; }
.gh-sub { margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.gh-when { font-size: 12px; color: var(--text-faint); }
.gh-msg { margin-top: 3px; font-size: 12px; color: var(--text-muted); max-width: 360px; }
tr.gh-off td { opacity: .55; }
.gh-form { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.gh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; }
.gh-admin-note { margin: 0 0 16px; font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.gh-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }
.gh-note code { font-size: 11.5px; }
.dom-chip.err { background: var(--danger-dim); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

.container > .session-bar { grid-column: 2; }
.session-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 18px; }
.session-bar.signed-in { border-color: color-mix(in srgb, var(--success) 30%, var(--border)); }
.session-bar.no-key { border-color: color-mix(in srgb, var(--warning) 40%, var(--border)); }
.session-avatar { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); color: var(--primary); font-weight: 700; font-size: 18px; }
.session-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.session-main { flex: 1 1 260px; min-width: 0; }
.session-title { font-size: 15px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-sub { margin-top: 2px; font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.session-bar.no-key .session-sub { color: var(--warning); }
.session-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) { .session-actions { width: 100%; } .session-actions .btn { flex: 1; } }

.acc-shell { max-width: 1120px; }
.acc-main { min-height: 60vh; margin-bottom: 18px; }
.acc-loading { padding: 80px 0; text-align: center; color: var(--text-muted); }
.acc-muted { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; margin: 0 0 14px; }
.acc-small { font-size: 12px; margin: 0; }

.acc-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 0; margin: 8px auto 18px; max-width: 980px; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-md); }
.acc-brand { position: relative; padding: 40px 36px; color: #fff; background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--primary) 85%, #fff) 0%, transparent 55%), linear-gradient(150deg, #5a47ee 0%, #3f2fb8 45%, #0f5f9e 100%); display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.acc-brand::after { content: ''; position: absolute; right: -80px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.acc-brand-logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.acc-brand-logo img { width: 44px; height: 44px; border-radius: 13px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); object-fit: cover; }
.acc-brand h1 { color: #fff; font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; margin: 10px 0 0; }
.acc-brand p { color: rgba(255, 255, 255, 0.82); font-size: 14.5px; line-height: 1.6; margin: 0; }
.acc-brand ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin: 6px 0 0; padding: 0; position: relative; z-index: 1; }
.acc-brand li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.92); }
.acc-brand li::before { content: ''; flex: 0 0 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: rgba(255, 255, 255, 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.acc-brand-foot { margin-top: auto; font-size: 12.5px; color: rgba(255, 255, 255, 0.7); position: relative; z-index: 1; }

.acc-auth { padding: 34px 34px 26px; margin: 0; border: none; border-radius: 0; box-shadow: none; }
.acc-auth.solo { max-width: 460px; margin: 8px auto 18px; border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.acc-auth-head { margin-bottom: 20px; }
.acc-auth-head h2 { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 6px; }
.acc-auth-head p { color: var(--text-muted); font-size: 13.5px; line-height: 1.55; margin: 0; }
.acc-dpid { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 18px; border-radius: 13px; background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary)); color: var(--on-primary); font-weight: 700; font-size: 15px; text-decoration: none; box-shadow: 0 10px 24px -12px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2); transition: filter var(--t-fast), transform var(--t-fast); }
.acc-dpid:hover { filter: brightness(1.07); transform: translateY(-1px); }
.acc-dpid img { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
.acc-dpid.disabled { background: var(--surface-raised); color: var(--text-muted); box-shadow: none; cursor: not-allowed; border: 1px solid var(--border-strong); }
.acc-dpid.disabled:hover { filter: none; transform: none; }
.acc-dpid em { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-high); }
.acc-sep { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-faint); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.acc-sep::before, .acc-sep::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }
.acc-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 18px; border-radius: 13px; background: var(--surface-raised); border: 1px solid var(--border); }
.acc-tabs button { min-height: 36px; border: none; border-radius: 10px; background: transparent; color: var(--text-muted); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.acc-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.acc-form .form-group { margin-bottom: 14px; }
.acc-form .upload-button { margin-top: 4px; }
.acc-form-err { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--danger-dim); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); font-size: 13px; }
.acc-row-end { display: flex; justify-content: flex-end; margin: -4px 0 12px; }
.acc-row-center { display: flex; justify-content: center; margin-top: 16px; }
.acc-link { padding: 0; border: none; background: none; color: var(--primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.acc-link:hover { text-decoration: underline; }
.acc-oauth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acc-oauth-btn { --bc: var(--primary); display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.acc-oauth-btn:hover { border-color: var(--bc); background: color-mix(in srgb, var(--bc) 10%, var(--surface)); transform: translateY(-1px); }
.acc-oauth-btn.microsoft { --bc: #00a4ef; grid-column: 1 / -1; }
.acc-oauth-btn.google { --bc: #4285f4; }
.acc-oauth-btn.discord { --bc: #5865f2; }
.acc-oauth-btn.github { --bc: var(--text-muted); }
.acc-oauth-btn.telegram { --bc: #229ed9; }
.acc-ic { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 20px; height: 20px; color: var(--text); }
.acc-ic svg { width: 100%; height: 100%; display: block; }
.acc-ic img { width: 100%; height: 100%; border-radius: 6px; object-fit: cover; display: block; }
.acc-apikey { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.acc-apikey summary { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.acc-apikey form { margin-top: 12px; }
.acc-note { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warning-dim); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); color: var(--text); font-size: 13px; line-height: 1.5; }
.acc-note.ok { background: var(--success-dim); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.acc-badge-warn { background: var(--warning-dim); border-color: color-mix(in srgb, var(--warning) 40%, transparent); color: var(--warning); }

.acc-hero { position: relative; padding: 0; overflow: hidden; }
.acc-cover { height: 96px; background: radial-gradient(90% 140% at 0% 0%, color-mix(in srgb, var(--primary) 80%, #fff) 0%, transparent 60%), linear-gradient(120deg, #5a47ee 0%, #3f2fb8 50%, #0f5f9e 100%); }
.acc-hero-body { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; padding: 0 24px 20px; }
.acc-avatar { width: 84px; height: 84px; margin-top: -42px; flex: 0 0 auto; border-radius: 22px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--surface-raised); color: var(--primary); font-size: 32px; font-weight: 800; border: 4px solid var(--surface); box-shadow: var(--shadow-md); }
.acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-hero-main { flex: 1 1 260px; min-width: 0; padding-top: 14px; }
.acc-hero-main h1 { font-size: 24px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.acc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-raised); color: var(--text-muted); border: 1px solid var(--border); }
.acc-chip .acc-ic { width: 14px; height: 14px; }
.acc-chip.ok { background: var(--success-dim); color: var(--success); border-color: transparent; }
.acc-chip.warn { background: var(--warning-dim); color: var(--warning); border-color: transparent; }
.acc-chip.plan { background: var(--primary-dim); color: var(--primary); border-color: transparent; }
.acc-hero-act { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; }

.acc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.acc-stat { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); min-width: 0; }
.acc-stat span { display: block; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.acc-stat b { display: block; margin-top: 4px; font-size: 22px; letter-spacing: -0.03em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.acc-stat em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-stat .plan-bar { margin-top: 10px; }

.acc-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 18px; align-items: start; }
.acc-col { min-width: 0; }
.acc-wide { grid-column: 1 / -1; }
.acc-card h2 { display: flex; align-items: center; gap: 10px; font-size: 16.5px; margin-bottom: 14px; }
.acc-card h2 .acc-h-ic { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-dim); color: var(--primary); flex: 0 0 auto; }
.acc-card h2 .acc-h-ic svg { width: 16px; height: 16px; }
.acc-kv { grid-template-columns: 150px 1fr; }
.acc-kv .v .badge { margin-left: 6px; font-family: var(--font-body); }
.acc-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.acc-details { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.acc-details summary { font-size: 13.5px; font-weight: 600; color: var(--primary); }
.acc-details form { margin-top: 12px; }
.acc-methods { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; }
.acc-method { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--bg-mid); transition: border-color var(--t-fast); }
.acc-method.on { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); background: color-mix(in srgb, var(--success) 4%, var(--bg-mid)); }
.acc-method .acc-ic { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.acc-method .acc-ic img { border-radius: 6px; }
.acc-method-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.acc-method-main b { font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.acc-method-main span { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-method-act { flex: 0 0 auto; }
.acc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; }
.acc-mfa-ic { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-dim); color: var(--primary); margin-bottom: 14px; }
.acc-mfa-ic svg { width: 22px; height: 22px; }
.acc-code-input { font-family: var(--font-mono, ui-monospace, Consolas, monospace); font-size: 22px; letter-spacing: 0.32em; text-align: center; font-variant-numeric: tabular-nums; }
.acc-code-input.rec { letter-spacing: 0.12em; text-transform: lowercase; }
.acc-code-input.sm { font-size: 16px; letter-spacing: 0.2em; text-align: left; }
.acc-otp { display: flex; justify-content: center; gap: 10px; }
.acc-otp .acc-otp-cell { flex: 1 1 0; min-width: 0; max-width: 54px; height: 60px; padding: 0; text-align: center; font-family: var(--font-mono, ui-monospace, Consolas, monospace); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 12px; caret-color: var(--primary); }
.acc-otp.filled .acc-otp-cell { border-color: color-mix(in srgb, var(--primary) 60%, var(--border-strong)); }
.acc-otp.sm { justify-content: flex-start; gap: 6px; }
.acc-otp.sm .acc-otp-cell { max-width: 46px; height: 48px; font-size: 19px; border-radius: 10px; }
.fm-two:has(.acc-otp) { grid-template-columns: 1fr; }
.fm-two:has(.acc-otp) .acc-otp.sm { max-width: 316px; }
.acc-link-muted { color: var(--text-muted); font-weight: 500; }
.acc-mfa-scope { margin-top: 12px; }
.acc-steps { list-style: none; counter-reset: accstep; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.acc-steps > li { counter-increment: accstep; position: relative; padding-left: 38px; display: flex; flex-direction: column; gap: 4px; }
.acc-steps > li::before { content: counter(accstep); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-dim); color: var(--primary); font-size: 13px; font-weight: 700; }
.acc-steps > li > b { font-size: 14px; }
.acc-steps > li > span { font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.acc-steps .acc-form { margin-top: 10px; }
.acc-mfa-setup { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.acc-qr { flex: 0 0 auto; width: 188px; height: 188px; padding: 8px; box-sizing: border-box; border-radius: 12px; background: #ffffff; border: 1px solid var(--border); line-height: 0; overflow: hidden; }
.acc-qr svg { width: 100%; height: 100%; display: block; }
.acc-secret { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.acc-secret > span { font-size: 12px; color: var(--text-muted); }
.acc-secret code { font-family: var(--font-mono, ui-monospace, Consolas, monospace); font-size: 14px; letter-spacing: 0.06em; word-spacing: 0.2em; padding: 9px 11px; border-radius: var(--radius-sm); background: var(--bg-mid); border: 1px solid var(--border); word-break: normal; overflow-wrap: normal; }
.acc-secret-act { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-codes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acc-codes li code { display: block; text-align: center; font-family: var(--font-mono, ui-monospace, Consolas, monospace); font-size: 14px; letter-spacing: 0.08em; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-mid); border: 1px solid var(--border); }

@media (max-width: 900px) {
    .acc-split { grid-template-columns: 1fr; }
    .acc-brand { padding: 26px 22px; gap: 12px; }
    .acc-brand h1 { font-size: 24px; }
    .acc-brand ul, .acc-brand-foot { display: none; }
    .acc-grid { grid-template-columns: 1fr; }
    .acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .acc-auth { padding: 22px 18px 18px; }
    .acc-oauth { grid-template-columns: 1fr; }
    .acc-hero-body { padding: 0 16px 16px; }
    .acc-hero-act { width: 100%; }
    .acc-hero-act .btn { flex: 1; }
    .acc-kv { grid-template-columns: 110px 1fr; }
}

.acc-tabbar { display: flex; gap: 4px; padding: 4px; margin: 0 0 18px; width: fit-content; max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.acc-tabbar[hidden] { display: none; }
.acc-tabbar .tab-button { width: auto; padding: 9px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.acc-tabbar .tab-button.active { background: var(--primary-dim); color: var(--primary); }
.acc-tabbar .tab-button.active::before { display: none; }
.acc-panels { margin-bottom: 18px; }
.acc-panels > .tab-content > .card:first-child { margin-top: 0; }
a.tab-button { text-decoration: none; }
.fm-controls { grid-template-columns: minmax(220px, 1fr) auto; }
@media (max-width: 960px) { .fm-controls { grid-template-columns: 1fr; } }
.login-hint { display: none; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; margin-bottom: 18px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); background: var(--warning-dim); color: var(--text); font-size: 13.5px; line-height: 1.45; }
.login-hint.show { display: flex; }
.login-hint > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--warning); }
.login-hint > span { flex: 1; min-width: 0; }
.login-hint .btn { flex: 0 0 auto; }
.login-hint.flash { animation: loginHintFlash 0.9s var(--ease) 2; }
@keyframes loginHintFlash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 45%, transparent); } }
@media (max-width: 560px) { .login-hint { flex-wrap: wrap; } .login-hint .btn { width: 100%; } }

.ld-shell { max-width: 1160px; }
.ld-main { display: flex; flex-direction: column; gap: 22px; }
.ld-page .legal-switch { max-width: 100%; overflow-x: auto; }
.ld-page .legal-switch a { white-space: nowrap; }
.ld-btn { min-height: 42px; padding: 0 18px; font-size: 14px; font-weight: 600; }
.ld-btn svg { width: 16px; height: 16px; }
.ld-cta { display: flex; flex-wrap: wrap; gap: 10px; }

.ld-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 34px; align-items: center; padding: 44px 40px; margin: 0; }
.ld-eyebrow { display: inline-block; margin-bottom: 14px; padding: 4px 11px; border-radius: 999px; background: var(--primary-dim); color: var(--primary); font-size: 12.5px; font-weight: 600; }
.ld-hero h1 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.12; letter-spacing: -0.03em; margin-bottom: 16px; }
.ld-hero p { color: var(--text-muted); font-size: 15.5px; line-height: 1.65; margin-bottom: 24px; max-width: 560px; }
.ld-hero-side { display: flex; flex-direction: column; gap: 14px; }
.ld-url { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-mid); overflow: hidden; }
.ld-url-dots { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.ld-url-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-high); }
.ld-url code { display: block; padding: 16px; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--text-muted); overflow-wrap: anywhere; }
.ld-url code em, .ld-url code b { white-space: nowrap; }
.ld-url code b { color: var(--text); font-weight: 600; }
.ld-url code em { font-style: normal; color: var(--primary); }
.ld-side-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ld-side-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.ld-side-list li svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--primary); margin-top: 1px; }
.ld-side-list b { color: var(--text); font-weight: 600; }
.ld-side-list code, .ld-feature code, .ld-steps code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 6px; border-radius: 5px; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }

.ld-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ld-stat { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.ld-stat span { font-size: 12.5px; color: var(--text-muted); }
.ld-stat b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.ld-stat b[data-stat="status"] { font-size: 15px; font-weight: 600; }
.ld-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint); flex: 0 0 auto; }
.ok > .ld-dot { background: var(--success); box-shadow: 0 0 0 4px var(--success-dim); }
.bad > .ld-dot { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-dim); }

.ld-section h2 { font-size: 22px; letter-spacing: -0.02em; margin: 6px 0 14px; }
.ld-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ld-feature { margin: 0; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.ld-ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-dim); color: var(--primary); margin-bottom: 4px; }
.ld-ic svg { width: 18px; height: 18px; }
.ld-feature h3, .ld-steps h3 { font-size: 15px; letter-spacing: -0.01em; }
.ld-feature p, .ld-steps p { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }

.ld-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.ld-steps li { margin: 0; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.ld-step-n { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.ld-code { margin: 0; padding: 0; overflow: hidden; }
.ld-code-head { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.ld-code-head svg { width: 15px; height: 15px; color: var(--primary); }
.ld-code pre { margin: 0; padding: 16px; overflow-x: auto; background: var(--bg-mid); }
.ld-code code { font-family: var(--font-mono); font-size: 13px; line-height: 1.65; color: var(--text); }

.ld-int { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ld-int-item { margin: 0; padding: 16px 18px; display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); transition: border-color var(--t-fast), transform var(--t-fast); }
.ld-int-item:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.ld-int-ic { width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text); }
.ld-int-ic svg { width: 20px; height: 20px; }
.ld-int-item b { display: block; font-size: 14px; }
.ld-int-item em { display: block; font-style: normal; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }

.ld-final { margin: 0; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.ld-final h2 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 4px; }
.ld-final p { color: var(--text-muted); font-size: 14px; }

.ld-footer .footer-content { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ld-footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ld-footer-links a { color: var(--text-muted); font-size: 13px; text-decoration: none; }
.ld-footer-links a:hover { color: var(--text); }

@media (max-width: 960px) {
    .ld-hero { grid-template-columns: 1fr; padding: 30px 24px; gap: 26px; }
    .ld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ld-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ld-int { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ld-steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .ld-main, .ld-footer { padding: 0 10px; }
    .ld-steps code { white-space: normal; overflow-wrap: anywhere; }
    .ld-hero { padding: 24px 18px; }
    .ld-grid, .ld-int { grid-template-columns: 1fr; }
    .ld-cta .ld-btn { flex: 1 1 100%; }
    .ld-final { padding: 22px 18px; }
}

.acc-demo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.acc-demo div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acc-demo b { font-size: 13.5px; }
.acc-demo span { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.acc-demo .btn { flex: 0 0 auto; }
.acc-demo-hint { margin-top: 14px; }
.acc-textarea { width: 100%; resize: vertical; min-height: 96px; font: inherit; }
.acc-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-muted); margin: 4px 0 14px; line-height: 1.5; }
.acc-check input { margin-top: 3px; }
.acc-note.err { background: var(--danger-dim); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.kr-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.kr-title h2 { margin: 0; }
.kr-list { list-style: none; display: flex; flex-direction: column; gap: 12px; padding: 0; margin: 12px 0 0; }
.kr-item { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-mid); }
.kr-head { display: flex; flex-direction: column; gap: 2px; }
.kr-head b { font-size: 14px; }
.kr-head span, .kr-meta { font-size: 12.5px; color: var(--text-muted); }
.kr-purpose { margin: 10px 0 8px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.kr-meta code { font-family: var(--font-mono); font-size: 12px; padding: 1px 6px; border-radius: 5px; background: var(--surface-raised); border: 1px solid var(--border); }
.kr-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.kr-done-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.kr-done { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.kr-done span:last-child { color: var(--text-muted); }
@media (max-width: 480px) { .acc-demo { flex-direction: column; align-items: stretch; } }

.header-row2 { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.header-row2 .header-tools { margin-left: 0; }
.integrations { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.integrations-label { font-size: 12px; font-weight: 600; color: var(--text-faint); margin-right: 2px; }
.int-btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--text); font: 600 12.5px var(--font-body); text-decoration: none; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.int-btn svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--text-muted); }
.int-btn:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border-strong)); background: var(--surface-high); }
.int-claude svg { color: #d97757; }
.int-chatgpt svg { color: #10a37f; }
.int-claude:hover { border-color: color-mix(in srgb, #d97757 60%, var(--border-strong)); }
.int-chatgpt:hover { border-color: color-mix(in srgb, #10a37f 60%, var(--border-strong)); }
.int-more { background: transparent; border-color: transparent; color: var(--text-muted); }
.int-more:hover { background: transparent; border-color: transparent; color: var(--primary); }
.int-copy { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.int-copy > span { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.int-copy > div { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-mid); }
.int-copy code { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.int-steps { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.int-note { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.int-note a { color: var(--primary); }
@media (max-width: 640px) {
    .header-row2 { align-items: flex-start; }
    .integrations-label { flex: 1 1 100%; }
}

.ld-connect { margin-top: 18px; }
button.ld-int-item { font: inherit; text-align: left; cursor: pointer; width: 100%; }
html.int-lock, html.int-lock body { overflow: hidden; }
.int-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--overlay); }
.int-box { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.int-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--border); }
.int-head h2 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 4px; }
.int-head p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.int-body { padding: 18px 22px; }
.int-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.int-alt { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.int-alt summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary); }
.int-alt[open] summary { margin-bottom: 10px; }
.int-alt .int-copy:last-child { margin-bottom: 0; }
.int-alt .int-note { margin-bottom: 8px; }

.dp-combo { position: relative; display: block; width: 100%; }
.dp-combo > input { width: 100%; padding-right: 40px; }
.dp-combo-btn { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease); }
.dp-combo-btn:hover { background: var(--surface-high); color: var(--text); }
.dp-combo-btn svg { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease); }
.dp-combo.open .dp-combo-btn svg { transform: rotate(180deg); }
.dp-combo.open > input { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.dp-combo-pop { position: fixed; z-index: 10050; overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: dpComboIn var(--t-fast) var(--ease) both; overscroll-behavior: contain; }
.dp-combo-pop.up { animation-name: dpComboUp; }
@keyframes dpComboIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes dpComboUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.dp-combo-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.dp-combo-group:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; }
.dp-combo-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 14px; }
.dp-combo-opt.hl { background: color-mix(in srgb, var(--primary) 14%, transparent); }
.dp-combo-opt.current .dp-combo-val { font-weight: 600; }
.dp-combo-ic { flex: 0 0 auto; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface-high); color: var(--text-muted); }
.dp-combo-opt.hl .dp-combo-ic { color: var(--primary); }
.dp-combo-ic svg { width: 15px; height: 15px; }
.dp-combo-val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 13px; }
.dp-combo-val mark { background: transparent; color: var(--primary); font-weight: 700; }
.dp-combo-cur { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.dp-combo-empty { padding: 12px 10px; font-size: 13px; color: var(--text-muted); }
.dp-combo-empty b { color: var(--text); font-family: var(--font-mono); font-weight: 600; }

.dcn-box { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-raised); }
.dcn-box > svg { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; color: #f38020; }
.dcn-box b { display: block; font-size: 13.5px; color: var(--text); margin-bottom: 2px; }
.dcn-box span:not(.spinner-sm) { display: block; font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }
.dcn-box.ok { border-color: color-mix(in srgb, #f38020 40%, var(--border)); background: color-mix(in srgb, #f38020 7%, var(--surface-raised)); }
.dcn-box .spinner-sm { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; border: 2px solid var(--text-faint); border-right-color: transparent; border-radius: 50%; animation: dcnSpin .7s linear infinite; }
@keyframes dcnSpin { to { transform: rotate(360deg); } }
.dom-dcn .dom-actions .btn svg { width: 16px; height: 16px; }
.dcn-more { margin-top: 12px; font-size: 12.5px; color: var(--text-muted); }
.dcn-more summary { cursor: pointer; width: fit-content; }
.dcn-more summary:hover { color: var(--text); }

.an-bar-dl { fill: var(--info); }
#anTraffic .an-kpis { margin-bottom: 10px; }
#anTraffic .an-row-name a { color: inherit; text-decoration: none; }
#anTraffic .an-row-name a:hover { color: var(--primary); }

.hosts-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.hosts-block .an-head { margin-bottom: 12px; }
.hosts-block .an-head > div:first-child { flex: 1 1 380px; min-width: 0; }
.hosts-block .an-head .hint { max-width: 640px; }
.hint:has(> code):not(:has(> svg, > .icon)) { display: block; }
.hint > code { font-family: var(--font-mono); font-size: 11.5px; padding: 1px 6px; border-radius: 5px; background: var(--surface-raised); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
.host-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-raised); margin-top: 10px; }
.host-recs { margin-top: 10px; }

.acc-s3 .kv-grid { margin: 12px 0; }
.acc-code { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.acc-code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 6px 12px; background: var(--surface-raised); border-bottom: 1px solid var(--border); font-size: 12.5px; }
.acc-code pre { margin: 0; padding: 10px 12px; background: var(--bg-mid); font: 12px/1.6 var(--font-mono); color: var(--text-muted); white-space: pre-wrap; word-break: break-all; }
.fm-opt { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; }
.fm-opt input { width: 16px; height: 16px; accent-color: var(--primary); }

.fm-ver { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.fm-ver:first-child { border-top: 0; }
.fm-ver b { display: block; font-size: 13.5px; }
.fm-ver span { font-size: 12px; color: var(--text-muted); }
.fm-ver-act { display: flex; gap: 6px; flex: 0 0 auto; }
.fm-empty-sm { padding: 14px 0; color: var(--text-muted); font-size: 13px; }

.acc-passkey { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; margin-top: 10px; border-radius: 13px; border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--text); font: 600 14px var(--font-body); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.acc-passkey:hover { border-color: var(--primary); background: var(--primary-dim); }
.acc-passkey svg { width: 18px; height: 18px; color: var(--primary); }
.acc-pk-list { list-style: none; margin: 12px 0 0; padding: 0; }
.acc-pk-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.acc-pk-list li:first-child { border-top: 0; }
.acc-pk-list b { display: block; font-size: 13.5px; }
.acc-pk-list span { font-size: 12px; color: var(--text-muted); }

.fm-hls-preview { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; }
.fm-hls-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

html.i18n-pending body { visibility: hidden; }
.lang-switch { position: relative; display: inline-flex; }
.lang-btn { width: auto; padding: 0 10px; gap: 6px; font: 600 12px/1 var(--font-mono, ui-monospace, monospace); letter-spacing: 0.04em; }
.lang-btn svg { width: 16px; height: 16px; }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 400; min-width: 184px; padding: 6px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-md); display: none; }
.lang-switch.open .lang-menu { display: block; }
.lang-menu button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.lang-menu button small { font: 600 11px/1 var(--font-mono, ui-monospace, monospace); color: var(--text-muted); }
.lang-menu button:hover { background: var(--surface-raised); }
.lang-menu button[aria-checked="true"] { background: var(--primary-dim); color: var(--primary); }
.lang-menu button[aria-checked="true"] small { color: var(--primary); }

.to-top { position: fixed; right: 20px; bottom: 24px; z-index: 900; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-md); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), visibility var(--t-mid), background var(--t-fast), color var(--t-fast), bottom var(--t-mid) var(--ease); }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--surface-high); color: var(--primary); }
.to-top:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.to-top.above-chat { bottom: 96px; }
@media (max-width: 640px) { .to-top { right: 14px; bottom: 16px; width: 40px; height: 40px; } .to-top.above-chat { bottom: 88px; } }
@media print { .to-top { display: none; } }

.fm-folder-add { color: var(--text-muted); margin-top: 6px; border-top: 1px dashed var(--border) !important; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.fm-folder-add:hover { color: var(--primary); }
.fm-folder-tools { display: flex; gap: 6px; padding: 8px 6px 2px; flex-wrap: wrap; }
.fm-folder-tools .btn { flex: 1 1 auto; gap: 6px; }
.fm-folder-tools .btn svg { width: 14px; height: 14px; }
.fm-up-target { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); }
.fm-up-target svg { width: 14px; height: 14px; }
@media (max-width: 960px) { .fm-folder-add { margin-top: 0; border-top: 1px dashed var(--border) !important; border-radius: var(--radius-sm); } .fm-folder-tools { padding: 0; flex-wrap: nowrap; } .fm-folder-tools .btn { flex: 0 0 auto; } }

:root {
    --primary:        #2dd4bf;
    --primary-hover:  #5eead4;
    --on-primary:     #04201d;
    --info:           #60a5fa;
    --success:        #4ade80;
    --danger:         #f87171;
    --warning:        #fbbf24;
    --on-solid:       #0a0a0b;

    --bg:             #0a0a0b;
    --bg-mid:         #0d0d0f;
    --surface:        #111113;
    --surface-raised: #17171a;
    --surface-high:   #202024;
    --overlay:        rgba(0, 0, 0, 0.72);

    --border:         #1f1f23;
    --border-strong:  #2a2a2f;

    --text:           #ededef;
    --text-muted:     #a1a1aa;
    --text-faint:     #63636b;

    --shadow-sm:  none;
    --shadow-md:  0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg:  0 24px 60px rgba(0, 0, 0, 0.6);
    --glow:       none;

    --radius-sm:  6px;
    --radius:     8px;
    --radius-lg:  10px;
    --radius-xl:  12px;

    --font-body:    'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono:    'Geist Mono', 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

    --sidebar-w: 220px;
    --focus: color-mix(in srgb, var(--primary) 32%, transparent);
    color-scheme: dark;
}

:root[data-theme="light"] {
    --primary:        #0d9488;
    --primary-hover:  #0f766e;
    --on-primary:     #ffffff;
    --info:           #2563eb;
    --success:        #16a34a;
    --danger:         #dc2626;
    --warning:        #b45309;
    --on-solid:       #ffffff;
    --bg:             #fafafa;
    --bg-mid:         #ffffff;
    --surface:        #ffffff;
    --surface-raised: #f4f4f5;
    --surface-high:   #e9e9ec;
    --overlay:        rgba(9, 9, 11, 0.45);
    --border:         #e7e7ea;
    --border-strong:  #d6d6db;
    --text:           #18181b;
    --text-muted:     #55555e;
    --text-faint:     #8e8e97;
    --shadow-md:  0 8px 24px rgba(9, 9, 11, 0.08);
    --shadow-lg:  0 24px 60px rgba(9, 9, 11, 0.16);
    color-scheme: light;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --primary:        #0d9488;
        --primary-hover:  #0f766e;
        --on-primary:     #ffffff;
        --info:           #2563eb;
        --success:        #16a34a;
        --danger:         #dc2626;
        --warning:        #b45309;
        --on-solid:       #ffffff;
        --bg:             #fafafa;
        --bg-mid:         #ffffff;
        --surface:        #ffffff;
        --surface-raised: #f4f4f5;
        --surface-high:   #e9e9ec;
        --overlay:        rgba(9, 9, 11, 0.45);
        --border:         #e7e7ea;
        --border-strong:  #d6d6db;
        --text:           #18181b;
        --text-muted:     #55555e;
        --text-faint:     #8e8e97;
        --shadow-md:  0 8px 24px rgba(9, 9, 11, 0.08);
        --shadow-lg:  0 24px 60px rgba(9, 9, 11, 0.16);
        color-scheme: light;
    }
}

:root body {
    background: var(--bg);
    font-size: 14px;
    letter-spacing: -0.003em;
    font-feature-settings: 'ss01', 'cv11';
    padding: 16px 24px 40px;
}

:root ::selection { background: color-mix(in srgb, var(--primary) 30%, transparent); }
:root h1,
:root h2,
:root h3 { font-weight: 600; letter-spacing: -0.02em; }
:root h2 { font-size: 17px; }
:root h3 { font-size: 14.5px; }
:root code,
:root kbd,
:root pre { font-family: var(--font-mono); }

:root .container { column-gap: 28px; }

:root .header {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 4px 2px 16px;
    margin-bottom: 24px;
}
:root .logo { width: 34px; height: 34px; border-radius: 8px; border-color: var(--border-strong); }
:root .logo-link { border-radius: 8px; }
:root .title-group h1 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
:root .title-group p { font-size: 12.5px; color: var(--text-faint); }
:root .badge {
    border-radius: 5px;
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-muted);
    font-size: 10.5px;
    padding: 1px 6px;
}
:root .badge-green {
    background: transparent;
    border-color: color-mix(in srgb, var(--success) 35%, var(--border-strong));
    color: var(--success);
}
:root .uptime-bar { background: transparent; border-color: var(--border); border-radius: var(--radius); }

:root .discord-bot-invite-button,
:root .telegram-bot-open-button {
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    color: var(--text);
    min-height: 34px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}
:root .discord-bot-invite-button > svg.icon { color: #8b93ff; }
:root .telegram-bot-open-button > svg.icon { color: #3fb2ec; }
:root .discord-bot-invite-button:hover,
:root .telegram-bot-open-button:hover {
    transform: none;
    filter: none;
    background: var(--surface-high);
    border-color: var(--text-faint);
}

:root .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: transparent;
    border-color: var(--border-strong);
}
:root .icon-btn:hover { background: var(--surface-raised); border-color: var(--text-faint); color: var(--text); }
:root .icon-btn svg { width: 16px; height: 16px; }

:root .tab-container {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    gap: 1px;
}
:root .tab-container::before { padding: 2px 10px 10px; font-size: 11px; letter-spacing: 0.08em; color: var(--text-faint); }
:root .tab-button {
    padding: 8px 10px;
    gap: 10px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--text-muted);
}
:root .tab-button > svg.icon,
:root .tab-button .icon { width: 16px; height: 16px; opacity: 0.85; }
:root .tab-button:hover { background: var(--surface-raised); color: var(--text); }
:root .tab-button.active { background: var(--surface-raised); color: var(--text); font-weight: 500; }
:root .tab-button.active > svg.icon,
:root .tab-button.active .icon { color: var(--primary); opacity: 1; }
:root .tab-button.active::before { left: -12px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; }
:root .tab-button.new::after {
    background: transparent;
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
    border-radius: 5px;
    font-family: var(--font-mono);
    font-weight: 500;
    padding: 1px 5px;
}

:root .tab-content.active { animation-duration: 180ms; }
@keyframes graphiteEnter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
:root .tab-content.active { animation-name: graphiteEnter; }

:root .card,
:root .info-card,
:root .folder-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: none;
}

:root label { font-weight: 500; font-size: 12.5px; color: var(--text-muted); letter-spacing: 0; }
:root label svg { opacity: 0.6; }

:root input:not([type="checkbox"]):not([type="radio"]),
:root select,
:root textarea {
    background-color: var(--bg-mid);
    border-color: var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
}
:root input:hover,
:root select:hover,
:root textarea:hover { border-color: var(--text-faint); }
:root input:focus,
:root select:focus,
:root textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus);
}

:root .file-input-label {
    background: var(--bg-mid);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    min-height: 104px;
    color: var(--text-muted);
}
:root .file-input-label:hover,
:root .file-input-label.drag {
    background: color-mix(in srgb, var(--primary) 6%, var(--bg-mid));
    border-color: var(--primary);
}

:root .btn,
:root .copy-button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
}
:root .btn:hover,
:root .copy-button:hover { background: var(--surface-high); border-color: var(--text-faint); }
:root .btn-sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
:root .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
}
:root .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
:root .btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
:root .btn-ghost:hover { background: var(--surface-raised); color: var(--text); }
:root .btn-danger {
    background: transparent;
    border-color: color-mix(in srgb, var(--danger) 40%, var(--border-strong));
    color: var(--danger);
}
:root .btn-danger:hover,
:root .btn-solid-danger { background: var(--danger); border-color: var(--danger); color: var(--on-solid); }

:root .upload-button,
:root .delete-button,
:root .download-button,
:root .browse-button {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13.5px;
}
:root .upload-button { background: var(--primary); color: var(--on-primary); }
:root .upload-button:hover,
:root .delete-button:hover,
:root .download-button:hover,
:root .browse-button:hover { transform: none; box-shadow: none; filter: brightness(1.06); }

:root .info-panel {
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
    border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
}

:root .toast {
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

:root .footer { border-top-color: var(--border); color: var(--text-faint); font-size: 12px; }

:root .session-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: none;
}
:root .session-bar.signed-in,
:root .session-bar.no-key { border-color: var(--border); }

:root .fm-item {
    background: var(--surface);
    border-color: var(--border);
    border-radius: var(--radius);
}
:root .fm-item:hover { border-color: var(--border-strong); transform: none; }
:root .fm-item.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--surface)); }

:root .legal-top,
:root .legal-toc { background: var(--surface); box-shadow: none; border-color: var(--border); border-radius: var(--radius-lg); }

:root .legal-switch {
    background: transparent;
    border-color: var(--border);
    border-radius: var(--radius);
}
:root .legal-switch a { border-radius: var(--radius-sm); }
:root .legal-switch a[aria-current="page"],
:root .legal-switch a.active { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }

:root .ld-page .legal-top {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 2px 0 14px;
}
:root .ld-main { gap: 28px; }
:root .ld-hero.card {
    background:
        linear-gradient(to bottom, transparent 55%, var(--bg)),
        repeating-linear-gradient(to right, color-mix(in srgb, var(--border) 70%, transparent) 0 1px, transparent 1px 48px),
        repeating-linear-gradient(to bottom, color-mix(in srgb, var(--border) 70%, transparent) 0 1px, transparent 1px 48px),
        var(--bg);
    border: 1px solid var(--border);
    padding: 64px 48px 56px;
    gap: 48px;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
:root .ld-eyebrow {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 3px 10px;
}
:root .ld-hero h1 { font-size: clamp(34px, 4.8vw, 54px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 600; }
:root .ld-hero p { font-size: 16px; color: var(--text-muted); }
:root .ld-btn { min-height: 40px; border-radius: var(--radius-sm); font-size: 13.5px; }
:root .ld-url { background: var(--surface); border-color: var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
:root .ld-url-dots i { background: var(--border-strong); width: 8px; height: 8px; }
:root .ld-url code { font-size: 13px; padding: 18px; }
:root .ld-side-list li svg { color: var(--text-faint); }
:root .ld-side-list code,
:root .ld-feature code,
:root .ld-steps code { background: var(--surface-raised); border-color: var(--border); border-radius: 4px; }

:root .ld-stats {
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
}
:root .ld-stat { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 20px 22px; }
:root .ld-stat + .ld-stat { border-left: 1px solid var(--border); }
:root .ld-stat span { font-size: 12px; color: var(--text-faint); }
:root .ld-stat b { font-family: var(--font-mono); font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
:root .ld-stat b[data-stat="status"] { font-family: var(--font-body); font-size: 14.5px; font-weight: 500; margin-top: 8px; }

:root .ld-section h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; margin: 8px 0 16px; }
:root .ld-grid,
:root .ld-steps,
:root .ld-int {
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
:root .ld-grid > .card,
:root .ld-steps > li,
:root .ld-int > .card {
    border: 0;
    border-radius: 0;
    background: var(--surface);
    margin: 0;
}
:root .ld-feature { padding: 24px; gap: 8px; }
:root .ld-ic {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--primary);
}
:root .ld-ic svg { width: 16px; height: 16px; }
:root .ld-feature h3,
:root .ld-steps h3 { font-size: 14.5px; font-weight: 600; }
:root .ld-steps { margin-bottom: 16px; }
:root .ld-steps li { padding: 24px; }
:root .ld-step-n {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    justify-content: flex-start;
}
:root .ld-step-n::before { content: '0'; }
:root .ld-code { border-color: var(--border); }
:root .ld-code-head { font-family: var(--font-mono); font-weight: 500; font-size: 12px; background: var(--surface); }
:root .ld-code-head svg { color: var(--text-faint); }
:root .ld-code pre { background: var(--bg-mid); padding: 18px 20px; }
:root .ld-int-item { padding: 18px 20px; }
:root .ld-int-item:hover { background: var(--surface-raised); }
:root .ld-int-ic { width: 36px; height: 36px; border-radius: 8px; background: transparent; border-color: var(--border-strong); }
:root .ld-int-ic svg { width: 18px; height: 18px; }
:root .ld-final {
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
}
:root .ld-final h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.03em; }

:root .fm-head h2 { font-size: 17px; }
:root .fm-meter { background: transparent; border-color: var(--border); border-radius: var(--radius); }
:root .fm-meter-top b { font-family: var(--font-mono); font-weight: 500; }
:root .fm-meter-bar { height: 4px; background: var(--surface-high); }
:root .fm-side { background: transparent; }
:root .fm-side-title { letter-spacing: 0.08em; }
:root .fm-folder:hover { background: var(--surface-raised); }
:root .fm-folder.active { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
:root .fm-folder.active .fm-folder-ic { color: var(--primary); }
:root .fm-selbar {
    background: var(--surface-raised);
    border-color: var(--border-strong);
}
:root .fm-rows .fm-item {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    padding: 7px 10px;
}
:root .fm-rows .fm-item:hover { background: var(--surface-raised); }
:root .fm-rows .fm-item.selected {
    background: color-mix(in srgb, var(--primary) 7%, transparent);
    box-shadow: inset 2px 0 0 var(--primary);
    border-color: var(--border);
}
:root .fm-rows .fm-thumb { width: 34px; height: 34px; border-radius: 6px; }
:root .fm-size,
:root .fm-date { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
:root .fm-grid { gap: 10px; }
:root .fm-thumb { border-radius: 0; }

:root .legal-top {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 2px 0 14px;
}
:root .acc-tabs,
:root .acc-tabbar {
    background: transparent;
    border-color: var(--border);
    border-radius: var(--radius);
    box-shadow: none;
    padding: 3px;
}
:root .acc-tabs button,
:root .acc-tabbar .tab-button { border-radius: var(--radius-sm); font-weight: 500; }
:root .acc-tabs button[aria-selected="true"],
:root .acc-tabbar .tab-button.active { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }

:root .acc-cover {
    height: 88px;
    background:
        repeating-linear-gradient(to right, color-mix(in srgb, var(--border) 80%, transparent) 0 1px, transparent 1px 24px),
        repeating-linear-gradient(to bottom, color-mix(in srgb, var(--border) 80%, transparent) 0 1px, transparent 1px 24px),
        var(--bg-mid);
    border-bottom: 1px solid var(--border);
}
:root .acc-avatar {
    width: 72px;
    height: 72px;
    margin-top: -36px;
    border-radius: 14px;
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    box-shadow: 0 0 0 4px var(--surface);
    font-size: 26px;
    font-weight: 600;
}
:root .acc-hero-main h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
:root .acc-chip {
    border-radius: 6px;
    font-weight: 500;
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-muted);
}
:root .acc-chip.ok { background: transparent; color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, var(--border-strong)); }
:root .acc-chip.warn { background: transparent; color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, var(--border-strong)); }
:root .acc-chip.plan { background: transparent; color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--border-strong)); }

:root .acc-stat { background: var(--surface); border-color: var(--border); box-shadow: none; border-radius: var(--radius-lg); }
:root .acc-stat span { color: var(--text-faint); }
:root .acc-stat b { font-family: var(--font-mono); font-weight: 500; font-size: 22px; }

:root .acc-card h2 { font-size: 15.5px; font-weight: 600; }
:root .acc-card h2 .acc-h-ic {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
}
:root .acc-card h2 .acc-h-ic svg { width: 15px; height: 15px; }

:root .acc-method { border-radius: var(--radius); background: transparent; border-color: var(--border); }
:root .acc-method.on { background: transparent; border-color: var(--border-strong); }
:root .acc-method .acc-ic { border-radius: 8px; background: var(--surface-raised); }

:root .plan-bar,
:root .acc-stat .plan-bar { height: 4px; }

:root .legal-toc { background: transparent; border: 0; padding-left: 0; }
:root .legal-toc input { background-color: var(--surface); }

@media (max-width: 960px) {
    :root .ld-hero.card { grid-template-columns: 1fr; padding: 36px 24px; gap: 28px; }
    :root .ld-stat:nth-child(3) { border-left: 0; }
    :root .ld-stat:nth-child(n+3) { border-top: 1px solid var(--border); }
    :root .tab-container { background: var(--bg); padding: 4px 0; }
    :root .tab-button.active::before { display: none; }
}
@media (max-width: 560px) {
    :root body { padding: 12px 14px 32px; }
    :root .ld-hero.card { padding: 28px 18px; }
    :root .ld-hero h1 { font-size: 34px; }
    :root .ld-stat { padding: 16px; }
    :root .ld-stat b { font-size: 22px; }
}

:root .header-row2 { background: transparent; border-top-color: var(--border); }

:root .err-card { border-color: var(--border); }
:root .err-card::after { display: none; }
:root .err-code {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text);
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: -0.08em;
    font-size: clamp(80px, 18vw, 128px);
}
:root .err-code::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    margin: 18px auto 0;
    background: var(--ec, var(--primary));
}
:root .err-title { font-weight: 600; font-size: 22px; }
:root .err-path { background: transparent; border-radius: 6px; }
:root .err-actions .btn { min-height: 38px; font-size: 13.5px; }

:root .download-button,
:root .browse-button {
    background: var(--surface-raised);
    border: 1px solid var(--border-strong);
    color: var(--text);
}
:root .download-button:hover,
:root .browse-button:hover { background: var(--surface-high); filter: none; }
:root .delete-button { background: var(--danger); color: var(--on-solid); }

:root .success-panel,
:root .error-panel,
:root .warning-panel,
:root .info-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 2px solid currentColor;
    border-radius: var(--radius-sm);
}
:root .info-panel { color: var(--text-muted); border-left-color: var(--primary); }

:root .delete-button {
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border-strong));
    color: var(--danger);
}
:root .delete-button:hover { background: var(--danger); border-color: var(--danger); color: var(--on-solid); filter: none; }
:root .login-hint {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 2px solid var(--warning);
    border-radius: var(--radius-sm);
    color: var(--text);
}

:root .acc-brand {
    color: var(--text);
    background:
        linear-gradient(to bottom, transparent 40%, var(--bg-mid)),
        repeating-linear-gradient(to right, color-mix(in srgb, var(--border) 70%, transparent) 0 1px, transparent 1px 32px),
        repeating-linear-gradient(to bottom, color-mix(in srgb, var(--border) 70%, transparent) 0 1px, transparent 1px 32px),
        var(--bg-mid);
    border-right: 1px solid var(--border);
}
:root .acc-brand::after { display: none; }
:root .acc-brand-logo { font-weight: 600; font-size: 16px; }
:root .acc-brand-logo img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--border-strong); }
:root .acc-brand h1 { color: var(--text); font-weight: 600; font-size: 30px; letter-spacing: -0.04em; }
:root .acc-brand p,
:root .acc-brand li { color: var(--text-muted); }
:root .acc-brand li::before { background-color: transparent; border: 1px solid var(--border-strong); filter: none; }
:root .acc-brand-foot { color: var(--text-faint); }
:root .acc-auth-head h2 { font-weight: 600; font-size: 20px; }
:root .acc-dpid {
    min-height: 44px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    box-shadow: none;
    font-weight: 600;
}
:root .acc-dpid:hover { background: var(--primary-hover); filter: none; transform: none; }
:root .acc-dpid img { width: 22px; height: 22px; border-radius: 6px; box-shadow: none; }
:root .acc-oauth-btn { min-height: 40px; border-radius: var(--radius-sm); background: transparent; font-weight: 500; }
:root .acc-oauth-btn:hover { transform: none; background: var(--surface-raised); border-color: var(--text-faint); }
:root .acc-brand li::before {
    border: 0;
    border-radius: 0;
    background: var(--primary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 15px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 15px no-repeat;
}
:root .cdn-login-button { border-radius: var(--radius-sm); }

:root .lang-btn {
    width: auto;
    min-width: 34px;
    padding: 0 10px 0 9px;
    gap: 6px;
    font: 500 11.5px/1 var(--font-mono);
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
:root .lang-btn svg { width: 15px; height: 15px; }
:root .lang-menu {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
:root .lang-menu button { font-size: 13px; }
:root .lang-menu button[aria-checked="true"] { background: var(--surface-raised); color: var(--text); }
:root .lang-menu button[aria-checked="true"] small { color: var(--primary); }
.fm-dir .fm-thumb, .fm-dir .fm-name { cursor: pointer; }
.fm-dir .fm-glyph svg { color: var(--primary, #2dd4bf); }
.fm-crumbs a { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.fm-crumbs a:hover { color: var(--primary, #2dd4bf); }

.dps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dps-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.dps-item.current { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.dps-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-raised, var(--bg-mid)); color: var(--text-muted); flex: 0 0 auto; }
.dps-ic svg { width: 18px; height: 18px; }
.dps-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dps-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dps-sub { color: var(--text-muted); font-size: 12.5px; overflow-wrap: anywhere; }
.dps-end { flex: 0 0 auto; }
.dps-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.dps-foot .dps-muted { margin: 0; flex: 1 1 260px; }
.dps-muted { color: var(--text-muted); font-size: 12.5px; }
@media (max-width: 640px) {
    .dps-item { flex-wrap: wrap; }
    .dps-end { width: 100%; }
}
.dps-ic.app { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.acc-app-form { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.acc-app-form input { flex: 0 1 220px; min-width: 0; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.dpa-dialog { max-width: 480px; }
.dpa-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.dpa-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; background: color-mix(in srgb, var(--primary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 38%, transparent); color: var(--primary); }
.dpa-ic svg { width: 22px; height: 22px; }
.dpa-title { font-weight: 600; font-size: 16px; }
.dpa-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px dashed var(--border-strong); background: var(--bg-mid, var(--surface)); margin-bottom: 14px; }
.dpa-code strong { font-family: var(--font-mono); font-size: 20px; letter-spacing: .14em; color: var(--text); }
.dpa-kv { margin-bottom: 14px; }
.dpa-warn { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warning-dim); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); margin: 0 0 16px; }
.dpa-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.dpa-result { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 8px 0 4px; }
.dpa-result h3 { margin: 4px 0 0; font-size: 17px; }
.dpa-badge { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; }
.dpa-badge svg { width: 26px; height: 26px; }
.dpa-result.ok .dpa-badge { background: var(--success-dim); color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); }
.dpa-result.no .dpa-badge { background: var(--danger-dim); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
:root .dl-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; }
.dl-btn svg { width: 17px; height: 17px; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint, var(--text-muted)); }
.dl-meta b { color: var(--text); font-weight: 500; }
.dl-meta span + span::before { content: ''; display: inline-block; width: 4px; height: 4px; margin-right: 16px; border-radius: 50%; background: var(--border-strong); vertical-align: middle; }
.dl-shot { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .65), 0 0 0 6px color-mix(in srgb, var(--surface) 70%, transparent); background: var(--surface); }
.dl-shot img { display: block; width: 100%; height: auto; }
.dl-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dl-gallery figure { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.dl-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 1047; object-fit: cover; object-position: top left; border-bottom: 1px solid var(--border); }
.dl-gallery figcaption { padding: 12px 16px; font-size: 13px; color: var(--text-muted); }
.dl-details { margin: 0; padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
.dl-kv { margin: 0; }
.dl-sha { font-family: var(--font-mono); font-size: 11.5px; overflow-wrap: anywhere; user-select: all; }
.dl-notes h3 { font-size: 14px; margin-bottom: 8px; }
.dl-notes p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; white-space: pre-line; }
@media (max-width: 960px) {
    :root .dl-hero { grid-template-columns: 1fr; }
    .dl-gallery { grid-template-columns: 1fr; }
    .dl-details { grid-template-columns: 1fr; }
}
.ld-int-item.ld-int-app { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.ld-int-item.ld-int-app .ld-int-ic { color: var(--primary); }
