/* 仅加载常用字重，避免 10 个 TTF 拖慢首屏 */
@font-face { font-family: "MiSans"; src: url("../fonts/MiSans-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "MiSans"; src: url("../fonts/MiSans-Medium.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "MiSans"; src: url("../fonts/MiSans-Semibold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "MiSans"; src: url("../fonts/MiSans-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
    --bg: #f4f7fc;
    --surface: #ffffff;
    --surface-2: #f7f9fd;
    --ink: #1f2937;
    --muted: #6b7280;
    --primary: #7c5cfc;
    --primary-2: #5b8def;
    --grad: linear-gradient(135deg, #7c5cfc 0%, #5b8def 100%);
    --grad-soft: linear-gradient(135deg, rgba(124, 92, 252, 0.12), rgba(91, 141, 239, 0.12));
    --line: #e8edf5;
    --line-strong: #d5deec;
    --danger: #e11d48;
    --danger-soft: rgba(225, 29, 72, 0.08);
    --ok: #059669;
    --ok-soft: rgba(5, 150, 105, 0.1);
    --shadow: 0 8px 24px rgba(31, 56, 100, 0.06);
    --shadow-sm: 0 4px 14px rgba(31, 56, 100, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --font: "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
    --mono: "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body,
button,
input,
select,
textarea,
code,
pre,
.CodeMirror {
    font-family: var(--font);
}

body {
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-size: 0.88rem; }
.muted { color: var(--muted); }

.app-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 1.1rem 0.85rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.35rem 0.5rem 1.1rem;
    margin-bottom: 0.35rem;
}

.brand-mark {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: -0.03em;
    box-shadow: 0 8px 18px rgba(124, 92, 252, 0.28);
}

.brand-text { display: grid; gap: 0.05rem; }
.brand-text strong { font-size: 1.02rem; font-weight: 700; }
.brand-text small { color: var(--muted); font-size: 0.72rem; }

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
    min-height: 0;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    color: #64748b;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.side-link:hover {
    background: #f3f6fb;
    color: var(--ink);
}

.side-link.is-active {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 18px rgba(124, 92, 252, 0.28);
}

.side-ico {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 7px;
    flex-shrink: 0;
    background: #eef2ff;
}

.side-link.is-active .side-ico { background: rgba(255, 255, 255, 0.22); }
.side-ico-proj { background: rgba(124, 92, 252, 0.15); }
.side-ico-user { background: rgba(16, 185, 129, 0.15); }
.side-ico-key { background: rgba(245, 158, 11, 0.18); }
.side-ico-style { background: rgba(14, 165, 233, 0.16); }
.side-ico-font { background: rgba(236, 72, 153, 0.14); }

.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 0.95rem 1.5rem;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.avatar {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.topbar-user-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.topbar-user-meta strong {
    font-size: 0.92rem;
    font-weight: 600;
}

.topbar-action {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
}

.topbar-action:hover {
    background: #f3f6fb;
    color: var(--primary);
}

.page {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 1.4rem 0 2.2rem;
    flex: 1;
}

.page-wide { width: min(1280px, calc(100% - 2.5rem)); }

h1, h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0 0 0.3rem;
}

h1 { font-size: 1.55rem; }
h2 { font-size: 1.1rem; }

.lead, .meta, .crumb { color: var(--muted); margin: 0; }
.crumb { margin-bottom: 0.35rem; font-size: 0.9rem; }

.list-hero,
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem 1.45rem;
    border-radius: var(--radius);
    background: var(--grad);
    color: #fff;
    box-shadow: 0 14px 30px rgba(124, 92, 252, 0.28);
    margin-bottom: 1.1rem;
}

.hero-banner h1 { color: #fff; margin: 0 0 0.25rem; }
.hero-banner p { margin: 0; opacity: 0.92; }
.hero-banner .btn-primary {
    background: #fff;
    color: #6d4ef2;
    border: 0;
    box-shadow: none;
}
.hero-banner .btn-primary:hover {
    background: #f3f0ff;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
}

.stat-card strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 700;
}

.stat-card span:last-child {
    color: var(--muted);
    font-size: 0.86rem;
}

.stat-ico {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-ico-a { background: rgba(124, 92, 252, 0.14); }
.stat-ico-b { background: rgba(16, 185, 129, 0.14); }
.stat-ico-c { background: rgba(249, 115, 22, 0.14); }

.section-block { margin-bottom: 1.25rem; }

.panel, .empty-state {
    border: 0;
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.58rem 1.05rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    background: none;
    color: inherit;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 18px rgba(124, 92, 252, 0.28);
}

.btn-primary:hover { filter: brightness(1.03); }

.btn-ghost {
    background: #f3f6fb;
    border-color: transparent;
    color: #475569;
}

.btn-ghost:hover {
    background: #e9eef8;
    color: var(--ink);
}

.btn-danger {
    background: var(--danger-soft);
    border-color: rgba(225, 29, 72, 0.18);
    color: var(--danger);
}

.btn-block { width: 100%; }
.btn-tiny { padding: 0.32rem 0.55rem; font-size: 0.8rem; border-radius: 8px; }

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.actions form { margin: 0; }

.editor-form, .auth-form {
    display: grid;
    gap: 0.95rem;
    margin-top: 0.85rem;
}

.editor-form label, .auth-form label, .copy-field {
    display: grid;
    gap: 0.35rem;
}

.editor-form label span, .auth-form label span, .copy-field span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.editor-form input,
.editor-form textarea,
.editor-form select,
.auth-form input,
.copy-row input {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.9rem;
    font: inherit;
    outline: none;
}

.editor-form input:focus,
.editor-form textarea:focus,
.editor-form select:focus,
.auth-form input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.14);
}

.editor.narrow, .narrow { max-width: 480px; }

.form-grid-2,
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-row {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    grid-template-columns: none !important;
}

.check-row input {
    width: auto;
}

.check-row span {
    color: var(--ink) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.92rem !important;
}

.style-hero {
    animation: styleFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.style-index-panel {
    animation: styleFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.style-table {
    margin-top: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.style-table-head,
.style-table-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 0.7fr 0.55fr 1.15fr 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1.05rem;
}

.style-table-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.font-table-head,
.font-table-row {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 0.9fr) 0.55fr 0.55fr 0.7fr 1.5fr;
}

.field-hint {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted, #6b7280);
    font-size: 0.82rem;
    line-height: 1.45;
}

.font-upload-progress {
    margin: 0.4rem 0 0.2rem;
}

.font-upload-bar {
    height: 8px;
    border-radius: 999px;
    background: #e8eef8;
    overflow: hidden;
}

.font-upload-bar > span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #7c5cfc, #5b8def);
    transition: width 0.2s ease;
}

.font-face-list {
    display: grid;
    gap: 0.55rem;
}

.font-face-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 12px;
    background: #fafbff;
}

.font-face-main {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.font-face-edit {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.font-face-edit select {
    min-width: 88px;
}

.font-page-hero .font-hero-title {
    letter-spacing: 0.01em;
}

.account-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.95rem;
}

.account-panel-head h2 {
    margin: 0;
    font-size: 1.12rem;
}

.account-password-form .actions {
    margin-top: 0.35rem;
}

button.side-link,
button.topbar-action {
    font: inherit;
    cursor: pointer;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

button.side-link {
    width: 100%;
}

.account-modal-panel {
    width: min(720px, calc(100vw - 2rem));
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.account-modal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.15rem 0 0.95rem;
}

.account-modal-tab {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    color: #4b5563;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s ease;
}

.account-modal-tab:hover {
    border-color: rgba(124, 92, 252, 0.35);
}

.account-modal-tab.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #7c5cfc, #5b8def);
    box-shadow: 0 6px 14px rgba(91, 141, 239, 0.25);
}

.account-modal-body {
    overflow: auto;
    padding-right: 0.15rem;
}

.account-modal-pane[hidden] {
    display: none !important;
}

.account-modal-hint {
    margin: 0 0 0.85rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.account-user-table {
    max-height: 360px;
    overflow: auto;
}

.font-view-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.78fr);
}

.font-studio-card {
    display: grid;
    gap: 0.95rem;
    padding: 1.15rem 1.2rem 1.25rem;
}

.font-studio-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: #f8faff;
}

.font-weight-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.font-weight-chip {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    color: #374151;
    border-radius: 12px;
    padding: 0.45rem 0.7rem;
    min-width: 4.4rem;
    cursor: pointer;
    display: grid;
    gap: 0.05rem;
    text-align: left;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.font-weight-chip strong {
    font-size: 0.95rem;
    line-height: 1.1;
}

.font-weight-chip span {
    font-size: 0.72rem;
    color: #9ca3af;
    text-transform: lowercase;
}

.font-weight-chip:hover {
    border-color: rgba(124, 92, 252, 0.35);
    transform: translateY(-1px);
}

.font-weight-chip.is-active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #7c5cfc, #5b8def);
    box-shadow: 0 8px 18px rgba(91, 141, 239, 0.28);
}

.font-weight-chip.is-active span {
    color: rgba(255, 255, 255, 0.78);
}

.font-studio-stage {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 1.35rem 1.35rem 1.45rem;
    border: 1px solid rgba(229, 234, 243, 0.95);
    background:
        radial-gradient(circle at top right, rgba(124, 92, 252, 0.14), transparent 34%),
        linear-gradient(160deg, #ffffff 0%, #f5f8ff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.font-studio-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 600;
}

.font-studio-meta .mono {
    color: #9ca3af;
    font-weight: 500;
}

.font-studio-zh {
    margin: 0 0 0.45rem;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.45;
    color: #111827;
    word-break: break-word;
}

.font-studio-en {
    margin: 0;
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    line-height: 1.55;
    color: #4b5563;
    word-break: break-word;
}

.font-studio-sizes {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    background: #f8faff;
    border: 1px solid var(--line);
}

.font-studio-size-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: baseline;
}

.font-studio-size-label {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 700;
}

.font-studio-size-row p {
    margin: 0;
    line-height: 1.45;
    color: #1f2937;
    word-break: break-word;
}

.font-usage-card,
.font-files-card {
    padding: 1rem 1.05rem 1.1rem;
}

.font-file-mini-list {
    list-style: none;
    margin: 0.15rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.font-file-mini-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.65rem 0.7rem;
    border-radius: 12px;
    background: #f8faff;
    border: 1px solid rgba(229, 234, 243, 0.95);
}

.font-file-mini-list li > div {
    min-width: 0;
    display: grid;
    gap: 0.1rem;
}

.font-file-mini-list strong {
    font-size: 0.9rem;
}

.font-file-mini-list strong em {
    font-style: normal;
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.78rem;
}

.font-file-mini-list .mono {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.font-file-mini-list small {
    color: #9ca3af;
    font-size: 0.72rem;
}

.style-table-head {
    background: #f3f6fb;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.style-table-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.style-table-list li {
    animation: styleFadeUp 0.4s ease both;
    animation-delay: calc(0.03s * var(--i, 0));
}

.style-table-list li + li .style-table-row {
    border-top: 1px solid var(--line);
}

.style-table-row {
    transition: background 0.18s ease;
}

.style-table-row:hover {
    background: #f8faff;
}

.style-table-main {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.style-table-main strong {
    font-size: 0.98rem;
}

.style-table-main em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.style-page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    padding: 1.2rem 1.3rem;
    border-radius: 16px;
    background:
        radial-gradient(700px 180px at 0% 0%, rgba(124, 92, 252, 0.14), transparent 55%),
        #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    animation: styleFadeUp 0.45s ease both;
}

.style-back {
    display: inline-flex;
    margin-bottom: 0.45rem;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 700;
}

.style-back:hover { text-decoration: underline; }

.style-page-hero h1 {
    margin: 0 0 0.35rem;
    font-size: 1.65rem;
}

.style-page-desc {
    margin: 0 0 0.75rem;
    color: var(--muted);
    max-width: 42rem;
}

.style-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.style-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.58rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #5b21b6;
    font-size: 0.78rem;
    font-weight: 700;
}

.style-chip.is-on {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.style-chip.is-off {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.style-chip.muted-chip {
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 600;
}

.style-page-actions {
    flex-shrink: 0;
}

.style-view-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
    gap: 1rem;
    align-items: start;
    animation: styleFadeUp 0.5s ease 0.06s both;
}

.style-preview-card,
.style-usage-card,
.style-code-card,
.style-edit-shell {
    animation: styleFadeUp 0.45s ease both;
}

.style-side-stack {
    display: grid;
    gap: 1rem;
    position: sticky;
    top: 4.6rem;
}

.style-detail-panel {
    animation: styleFadeUp 0.45s ease both;
}

.style-preview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.style-preview-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.style-preview-frame-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(124, 92, 252, 0.05), transparent 40%),
        #f8faff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.style-preview-frame {
    width: 100%;
    min-height: 520px;
    border: 0;
    background: transparent;
    display: block;
}

.css-preview {
    margin: 0;
    padding: 1rem 1.05rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #e2e8f0;
    overflow: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.css-preview-compact {
    max-height: 360px;
}

.style-usage-card {
    display: grid;
    gap: 0.75rem;
}

.style-usage-card .style-usage-head,
.style-usage .style-usage-head {
    margin-bottom: 0;
}

.css-editor-light {
    background: #0b1220 !important;
}

.style-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.45fr);
    gap: 1rem;
    align-items: start;
    animation: styleFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

@keyframes styleFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.style-list-panel {
    position: sticky;
    top: 4.6rem;
    padding: 1rem;
}

.style-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
    max-height: calc(100vh - 12rem);
    overflow: auto;
}

.style-list li {
    animation: styleFadeUp 0.45s ease both;
    animation-delay: calc(0.04s * var(--i, 0));
}

.style-item {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
    padding: 0.8rem 0.85rem;
    border-radius: 12px;
    border: 1px solid transparent;
    background: #f8faff;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.style-item-dot {
    width: 8px;
    height: 8px;
    margin-top: 0.4rem;
    border-radius: 50%;
    background: #c4b5fd;
    transition: background 0.18s ease, transform 0.18s ease;
}

.style-item-body {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.style-item:hover {
    transform: translateX(3px);
    border-color: #ddd6fe;
    background: #f5f3ff;
    box-shadow: 0 8px 18px rgba(124, 92, 252, 0.08);
}

.style-item.is-active {
    border-color: #a78bfa;
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.12), rgba(91, 141, 239, 0.1));
    box-shadow: 0 10px 22px rgba(124, 92, 252, 0.12);
}

.style-item.is-active .style-item-dot {
    background: var(--grad);
    transform: scale(1.25);
}

.style-item strong {
    font-size: 0.95rem;
}

.style-item-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.tag-muted {
    background: rgba(100, 116, 139, 0.12) !important;
    color: #475569 !important;
}

.style-editor-panel {
    min-height: 420px;
    padding: 1.15rem 1.2rem 1.25rem;
}

.style-editor-panel.has-editor {
    animation: styleEditorIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes styleEditorIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.style-editor-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--line);
}

.style-editor-stats {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.style-stat {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #5b21b6;
    font-size: 0.78rem;
    font-weight: 700;
}

.style-usage {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    padding: 1rem;
    border-radius: 14px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, rgba(124, 92, 252, 0.35), rgba(91, 141, 239, 0.35)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(124, 92, 252, 0.06);
}

.style-usage-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.style-usage-head strong {
    font-size: 0.95rem;
}

.style-edit-form {
    margin-top: 0;
}

.css-editor {
    font-family: Consolas, "Courier New", monospace !important;
    font-size: 0.88rem !important;
    line-height: 1.55;
    min-height: 300px;
    background:
        linear-gradient(180deg, #0f172a 0%, #111827 100%) !important;
    color: #e2e8f0 !important;
    border-color: #1e293b !important;
    border-radius: 12px !important;
    padding: 1rem 1.05rem !important;
    tab-size: 2;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.css-editor:focus {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.22) !important;
}

.style-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
    position: sticky;
    bottom: 0.6rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.04);
}

.style-empty-state {
    min-height: 360px;
    display: grid;
    place-content: center;
    justify-items: center;
    text-align: center;
    gap: 0.55rem;
    padding: 2rem 1rem;
}

.style-empty-icon {
    width: 4rem;
    height: 4rem;
    margin-bottom: 0.4rem;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--grad);
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.04em;
    box-shadow: 0 14px 28px rgba(124, 92, 252, 0.28);
    animation: styleFloat 3.2s ease-in-out infinite;
}

@keyframes styleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.style-empty-mini {
    display: grid;
    gap: 0.65rem;
    justify-items: start;
    padding: 0.35rem 0.15rem 0.2rem;
}

.modal-panel-wide {
    width: min(680px, 100%);
    animation: styleFadeUp 0.35s ease both;
}

.alert {
    margin: 0 0 1rem;
    padding: 0.75rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
}

.alert-error {
    background: var(--danger-soft);
    color: #be123c;
}

.alert-ok {
    background: var(--ok-soft);
    color: #047857;
}

.text-link { color: var(--primary); font-weight: 600; }
.text-link:hover { text-decoration: underline; }

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(900px 420px at 12% -8%, rgba(124, 92, 252, 0.18), transparent 55%),
        radial-gradient(700px 380px at 100% 10%, rgba(91, 141, 239, 0.16), transparent 50%),
        linear-gradient(180deg, #eef2ff 0%, #f7f9fd 48%, #eef2ff 100%);
    overflow-x: hidden;
}

.page-auth {
    width: min(980px, calc(100% - 2rem));
    min-height: 100vh;
    margin: 0 auto;
    padding: 1.5rem 0;
    display: grid;
    place-items: center;
}

.auth-shell {
    width: 100%;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 0;
    align-items: stretch;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    box-shadow:
        0 24px 60px rgba(76, 59, 170, 0.14),
        0 2px 0 rgba(255, 255, 255, 0.7) inset;
    animation: authShellIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authShellIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-visual {
    position: relative;
    isolation: isolate;
    padding: 2.4rem 2rem;
    min-height: 460px;
    background: linear-gradient(145deg, #7c5cfc 0%, #6a6af0 42%, #5b8def 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}

.auth-orb-a {
    width: 220px;
    height: 220px;
    top: -60px;
    right: -40px;
    background: rgba(255, 255, 255, 0.18);
    animation: authFloat 8s ease-in-out infinite;
}

.auth-orb-b {
    width: 160px;
    height: 160px;
    bottom: 18%;
    left: -50px;
    background: rgba(255, 255, 255, 0.12);
    animation: authFloat 10s ease-in-out infinite reverse;
}

.auth-orb-c {
    width: 90px;
    height: 90px;
    top: 38%;
    right: 18%;
    background: rgba(255, 255, 255, 0.16);
    animation: authFloat 7s ease-in-out infinite 0.6s;
}

@keyframes authFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-14px) translateX(8px); }
}

.auth-visual-inner {
    position: relative;
    z-index: 1;
    animation: authFadeUp 0.7s ease 0.12s both;
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-weight: 800;
    letter-spacing: -0.04em;
    backdrop-filter: blur(8px);
}

.auth-kicker {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    opacity: 0.88;
}

.auth-title {
    margin: 0.45rem 0 0.45rem;
    font-size: clamp(2.3rem, 4.2vw, 3.1rem);
    color: #fff;
    letter-spacing: -0.03em;
}

.auth-copy {
    margin: 0 0 1.15rem;
    opacity: 0.92;
    font-size: 0.98rem;
    max-width: 18rem;
    line-height: 1.55;
}

.auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.auth-features li {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-panel {
    background: var(--surface);
    padding: 2.2rem 1.9rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-panel-inner {
    width: min(360px, 100%);
    margin: 0 auto;
    animation: authFadeUp 0.7s ease 0.22s both;
}

.auth-panel-kicker {
    margin: 0 0 0.35rem;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.auth-panel h2 {
    margin: 0 0 0.25rem;
    font-size: 1.55rem;
}

.auth-panel .lead {
    margin-bottom: 1.15rem;
}

.auth-alert {
    animation: authShake 0.45s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
}

.auth-form {
    gap: 0.95rem;
}

.auth-form label span {
    font-size: 0.84rem;
}

.auth-form input {
    padding: 0.82rem 0.95rem;
    border-radius: 10px;
    border-color: #dbe3f0;
    background: #f8faff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.auth-form input:hover {
    background: #fff;
}

.auth-form input:focus {
    background: #fff;
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.14);
    transform: translateY(-1px);
}

.captcha-field .captcha-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    align-items: stretch;
}

.captcha-refresh {
    border: 1px solid #dbe3f0;
    border-radius: 10px;
    background: #f8faff;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    width: 128px;
    height: 44px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.captcha-refresh:hover {
    border-color: #a78bfa;
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.12);
}

.captcha-refresh img {
    display: block;
    width: 128px;
    height: 44px;
}

.captcha-hint {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.auth-submit {
    margin-top: 0.35rem;
    padding: 0.82rem 1rem;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(124, 92, 252, 0.32);
}

.auth-submit:active {
    transform: translateY(0);
}

.project-table { padding: 0; overflow: hidden; }

.project-table-head,
.project-row {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) 0.55fr 0.55fr 1.2fr 0.45fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.9rem 1.15rem;
}

.project-table-head {
    background: #f3f6fb;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.project-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.project-list li + li .project-row {
    border-top: 1px solid var(--line);
}

.project-row:hover { background: #f8faff; }

.project-row-main {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.project-row-main strong {
    font-size: 1rem;
    font-weight: 700;
}

.project-row-main em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.78fr);
    gap: 1.15rem;
    align-items: start;
}

.project-main,
.project-side,
.stack-block {
    scroll-margin-top: 5rem;
    min-width: 0;
}

.project-side {
    display: grid;
    gap: 0.9rem;
    position: sticky;
    top: 4.6rem;
}

.doc-panel {
    padding: 1.15rem 1.25rem 1.3rem;
}

.doc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.95rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.doc-toolbar h2 { margin: 0; }
.doc-label {
    margin: 0 0 0.2rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}
.doc-title { font-size: 1.35rem; }
.doc-empty { padding: 2.5rem 1rem; box-shadow: none; }

.doc-edit-form {
    margin-top: 0;
    gap: 0.85rem;
}

.doc-editor-label { margin-top: 0.15rem; }

.side-panel {
    padding: 0.95rem 1rem 1.05rem;
}

.side-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.side-panel-head h2 {
    margin: 0;
    font-size: 1rem;
}

.side-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--grad-soft);
    color: #6d28d9;
    font-size: 0.78rem;
    font-weight: 700;
}

.side-upload {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.55rem;
    border: 1px dashed #c4b5fd;
    border-radius: var(--radius-sm);
    background: #f8f7ff;
}

.side-upload input[type="file"] {
    width: 100%;
    min-width: 0;
    font-size: 0.8rem;
    border: 0;
    background: transparent;
    padding: 0;
}

.side-cmd-form {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.side-cmd-form input,
.side-cmd-form textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.7rem;
    font: inherit;
    font-size: 0.9rem;
    outline: none;
    background: #fff;
}

.side-cmd-form input:focus,
.side-cmd-form textarea:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.12);
}

.side-cmd-form .btn {
    justify-self: start;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1rem;
    align-items: start;
}

.workspace-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.file-drop input[type="file"] {
    padding: 0.85rem;
    border: 1px dashed #c4b5fd;
    border-radius: var(--radius-sm);
    background: #f8f7ff;
    width: 100%;
}

.file-list, .command-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.file-card, .command-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #f8faff;
    padding: 0.7rem 0.75rem;
    display: grid;
    gap: 0.5rem;
}

.file-card-top,
.command-card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.55rem;
    align-items: center;
}

.file-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
}

.file-size {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.8rem;
}

.file-actions {
    justify-content: flex-end;
    gap: 0.3rem;
}

.file-actions .btn-tiny,
.command-card-head .btn-tiny {
    padding: 0.28rem 0.48rem;
    font-size: 0.75rem;
}

.copy-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem;
}

.command-body {
    margin: 0;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-sm);
    background: #1e1b4b;
    color: #e0e7ff;
    overflow: auto;
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.list-hero {
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
}

.file-empty { color: var(--muted); margin: 0; }

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.role-badge.role-admin {
    background: rgba(124, 92, 252, 0.12);
    color: #6d28d9;
}

.role-badge.role-member {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    background: rgba(124, 92, 252, 0.1);
    color: #6d28d9;
    font-size: 0.7rem;
    font-weight: 700;
}

.table-wrap { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    text-align: left;
    padding: 0.8rem 0.55rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    background: #f3f6fb;
}

body.modal-open { overflow: hidden; }
.modal[hidden] { display: none !important; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 1.2rem 1.25rem 1.3rem;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 20px 50px rgba(31, 41, 55, 0.18);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.modal-head h2 { margin: 0; font-size: 1.2rem; }

.modal-close {
    border: 0;
    background: #f3f6fb;
    color: var(--muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
}

.modal-delete-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.modal-delete-form[hidden] { display: none !important; }

.site-footer {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto 1.1rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.site-footer-auth {
    width: min(920px, calc(100% - 2rem));
}

.site-footer p { margin: 0; }

.empty-state { text-align: center; padding: 3rem 1.5rem; }

.md-body {
    line-height: 1.75;
    color: var(--ink);
    font-size: 1rem;
}

.md-body > *:first-child { margin-top: 0; }
.md-body > *:last-child { margin-bottom: 0; }

.md-body h1,
.md-body h2,
.md-body h3,
.md-body h4,
.md-body h5,
.md-body h6 {
    margin: 1.35rem 0 0.55rem;
    line-height: 1.3;
    font-weight: 700;
}

.md-body h1 { font-size: 1.7rem; }
.md-body h2 { font-size: 1.35rem; }
.md-body h3 { font-size: 1.15rem; }

.md-body p { margin: 0.65rem 0; }
.md-body ul, .md-body ol { margin: 0.65rem 0; padding-left: 1.4rem; }
.md-body li { margin: 0.25rem 0; }

.md-body a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.md-body code {
    background: #f3f0ff;
    color: #5b21b6;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    font-size: 0.92em;
}

.md-body pre {
    margin: 0.85rem 0;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    background: #1e1b4b;
    color: #e0e7ff;
    overflow: auto;
}

.md-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.EasyMDEContainer .CodeMirror {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-family: var(--font);
}

.editor-toolbar {
    border: 1px solid var(--line-strong) !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    background: #f8faff !important;
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: relative;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .side-nav {
        flex-direction: row;
        flex-wrap: wrap;
        flex: 0 0 auto;
    }
    .side-link { flex: 1 1 auto; justify-content: center; }
    .topbar { padding: 0.85rem 1rem; }
    .hero-banner, .list-hero, .section-head { flex-direction: column; align-items: stretch; }
    .stat-row { grid-template-columns: 1fr; }
    .page-auth { padding: 1rem 0; min-height: auto; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual {
        min-height: 220px;
        padding: 1.6rem 1.4rem;
        justify-content: flex-end;
    }
    .auth-panel { padding: 1.6rem 1.35rem 1.8rem; }
    .auth-features { display: none; }
    .project-layout { grid-template-columns: 1fr; }
    .project-side { position: static; }
    .style-layout { grid-template-columns: 1fr; }
    .style-list-panel { position: static; }
    .style-list { max-height: none; }
    .style-footer-bar { position: static; }
    .style-table-head { display: none; }
    .style-table-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem 0.75rem;
    }
    .style-table-main,
    .style-table-actions { grid-column: 1 / -1; }
    .style-table-actions { justify-content: flex-start; }
    .font-table-head { display: none; }
    .font-table-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem 0.75rem;
    }
    .style-page-hero {
        flex-direction: column;
        align-items: stretch;
    }
    .style-view-layout {
        grid-template-columns: 1fr;
    }
    .style-side-stack {
        position: static;
    }
    .style-preview-frame { min-height: 360px; }
    .workspace-grid, .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .side-upload { grid-template-columns: 1fr; }
    .file-actions { justify-content: flex-start; }
    .project-table-head { display: none; }
    .project-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem 0.75rem;
    }
    .project-row-main { grid-column: 1 / -1; }
}
