:root {
    --bg: #f5f5f2;
    --surface: #ffffff;
    --surface-muted: #f1f2ee;
    --ink: #191a18;
    --ink-soft: #444741;
    --muted: #70736b;
    --line: #e1e3dd;
    --line-strong: #cdd0c8;
    --accent: #9a5f08;
    --accent-dark: #704505;
    --accent-soft: #fff3d6;
    --warm: #277866;
    --warm-soft: #e8f4f0;
    --success: #1e725f;
    --success-soft: #e5f3ee;
    --danger: #b83f45;
    --danger-soft: #fbeaec;
    --warning: #8a6014;
    --warning-soft: #fff4dc;
    --shadow-sm: 0 1px 2px rgba(23, 24, 22, .04), 0 4px 14px rgba(23, 24, 22, .025);
    --shadow: 0 12px 32px rgba(23, 24, 22, .1);
    --radius: 8px;
    --sidebar: 252px;
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); letter-spacing: 0; line-height: 1.5; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, a, input, textarea, select { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px rgba(154, 95, 8, .14); }
img { display: block; max-width: 100%; }
svg.lucide { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); padding: 20px 14px 14px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 0 8px 20px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 17px; font-weight: 800; }
.brand div { min-width: 0; }
.brand strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.brand small, .sidebar-user small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 6px; color: var(--ink-soft); font-weight: 600; }
.side-nav a:hover { background: var(--surface-muted); color: var(--ink); }
.side-nav a.active { background: var(--accent-soft); color: var(--accent-dark); }
.nav-label { padding: 22px 12px 7px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.sidebar-user { margin-top: auto; display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 9px; padding: 13px 8px 0; border-top: 1px solid var(--line); }
.sidebar-user form { margin: 0; }
.sidebar-user strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--warm-soft); color: var(--warm); font-weight: 800; }

.main-area { min-width: 0; }
.topbar { min-height: 79px; display: flex; align-items: center; gap: 16px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .88); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.page-heading { min-width: 0; flex: 1; }
.page-heading h1 { margin: 0; font-size: 20px; line-height: 1.25; }
.page-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.content-area { padding: 24px 28px 48px; max-width: 1540px; margin: 0 auto; }
.mobile-nav { display: none !important; }

.button, button.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 13px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 650; white-space: nowrap; }
.button:hover { border-color: #9daaa4; background: #fafbfa; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.secondary { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.button.danger { border-color: #e9bbbb; color: var(--danger); background: var(--danger-soft); }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button.large { min-height: 46px; padding: 11px 18px; }
.button.small { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--surface-muted); color: var(--ink); }

.page-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.page-tools .spacer { flex: 1; }
.search-box { position: relative; min-width: 260px; }
.search-box .lucide { position: absolute; left: 11px; top: 10px; color: var(--muted); width: 17px; }
.search-box input { width: 100%; padding-left: 36px; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-row select { width: 138px; }

input, textarea, select { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); transition: border .15s, box-shadow .15s; }
textarea { min-height: 120px; resize: vertical; line-height: 1.65; }
input:hover, textarea:hover, select:hover { border-color: #9daaa4; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
label .hint, .field-hint { color: var(--muted); font-size: 11px; font-weight: 400; }
.form-stack { display: grid; gap: 20px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: 1.1fr .55fr 1.2fr; }
fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 13px; }
legend { width: 100%; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.required::after { content: " *"; color: var(--danger); }

.section { margin-bottom: 26px; }
.section-header { min-height: 38px; display: flex; align-items: flex-start; gap: 14px; margin-bottom: 13px; }
.section-header > div:first-child { flex: 1; }
.section-header h2, .section-header h3 { margin: 0; font-size: 15px; }
.section-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.surface-body { padding: 18px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { min-height: 112px; display: grid; grid-template-columns: 1fr 42px; align-items: start; gap: 12px; padding: 17px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-card small { display: block; color: var(--muted); margin-bottom: 10px; }
.stat-card strong { display: block; font-size: 27px; line-height: 1; }
.stat-card .stat-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-muted); color: var(--ink-soft); }
.stat-card.accent .stat-icon { background: var(--accent-soft); color: var(--accent); }
.stat-card.warm .stat-icon { background: var(--warm-soft); color: var(--warm); }
.stat-card .trend { margin-top: 9px; font-size: 11px; color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr); gap: 18px; align-items: start; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 14px; border-bottom: 1px solid var(--line); background: #f8faf8; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
.table-title { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.table-title .mini-thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 5px; background: var(--surface-muted); }
.table-title strong { display: block; font-size: 13px; }
.table-title small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.table-actions { display: flex; justify-content: flex-end; gap: 4px; }
.empty-state { min-height: 240px; display: grid; place-items: center; padding: 40px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255,255,255,.45); }
.empty-state .empty-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 50%; background: var(--surface-muted); color: var(--muted); }
.empty-state .empty-icon svg { width: 24px; height: 24px; }
.empty-state h3 { margin: 0 0 6px; font-size: 15px; }
.empty-state p { max-width: 430px; margin: 0 0 16px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 8px; border-radius: 5px; background: var(--surface-muted); color: var(--ink-soft); font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.green { background: var(--accent-soft); color: var(--accent-dark); }
.badge.warm { background: var(--warm-soft); color: #9b462e; }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.tag { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px; border: 1px solid var(--line); border-left: 3px solid var(--tag-color, var(--accent)); border-radius: 4px; background: #fff; font-size: 11px; }
.tag-list { display: flex; gap: 5px; flex-wrap: wrap; }

.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.asset-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, transform .15s; }
.asset-card:hover { border-color: #a9b7b0; transform: translateY(-1px); }
.asset-visual { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: #e9ede9; }
.asset-visual img { width: 100%; height: 100%; object-fit: cover; }
.asset-visual.text-visual { padding: 18px; align-items: start; justify-items: start; background: #f6f2ea; color: #5f5547; }
.asset-visual.text-visual p { display: -webkit-box; margin: 0; overflow: hidden; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.asset-visual.video-visual { background: #202826; color: #fff; }
.video-placeholder { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(255,255,255,.08); }
.video-placeholder svg { width: 27px; height: 27px; }
.asset-select { position: absolute; top: 9px; left: 9px; width: 21px; height: 21px; min-height: 0; accent-color: var(--accent); }
.asset-type { position: absolute; top: 9px; right: 9px; }
.asset-info { padding: 12px; }
.asset-info h3 { height: 38px; margin: 0 0 8px; overflow: hidden; font-size: 13px; line-height: 1.45; }
.asset-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.asset-card-actions { display: flex; align-items: center; gap: 3px; padding: 7px; border-top: 1px solid var(--line); }
.asset-card-actions .spacer { flex: 1; }

.upload-zone { min-height: 220px; display: grid; place-items: center; padding: 28px; text-align: center; border: 1.5px dashed #9fb0a9; border-radius: var(--radius); background: #f8faf8; transition: .15s; cursor: pointer; }
.upload-zone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone .upload-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.upload-zone .upload-icon svg { width: 25px; height: 25px; }
.upload-zone h3 { margin: 0 0 6px; font-size: 15px; }
.upload-zone p { margin: 0; color: var(--muted); }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-queue { display: grid; gap: 7px; margin-top: 12px; }
.upload-item { display: grid; grid-template-columns: minmax(0,1fr) 90px 28px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.upload-progress { height: 5px; overflow: hidden; border-radius: 5px; background: var(--surface-muted); }
.upload-progress span { display: block; height: 100%; background: var(--accent); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab-button { min-height: 39px; padding: 8px 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.tab-button.active { color: var(--accent-dark); border-color: var(--accent); }
.tab-panel[hidden] { display: none; }

.alert { margin-bottom: 15px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); line-height: 1.5; }
.alert.success { border-color: #a6d3c7; background: var(--accent-soft); color: var(--accent-dark); }
.alert.error { border-color: #e5b2b2; background: var(--danger-soft); color: #873030; }
.alert.warning { border-color: #e4cf9c; background: var(--warning-soft); color: #725117; }
.alert ul { margin: 7px 0 0; padding-left: 18px; }

.modal { position: fixed; inset: 0; display: none; place-items: center; padding: 20px; background: rgba(17, 28, 24, .52); z-index: 100; }
.modal.open { display: grid; }
.modal-panel { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.modal-header { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { flex: 1; margin: 0; font-size: 16px; }
.modal-body { padding: 18px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 20px; }
.pagination a, .pagination span { min-width: 34px; min-height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.pagination .active { border-color: var(--accent); background: var(--accent); color: #fff; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.error { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

.minimal-page { background: #edf1ed; }
.install-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .75fr) minmax(560px, 1.25fr); }
.install-intro { display: flex; flex-direction: column; justify-content: center; padding: 58px clamp(34px, 6vw, 92px); background: #17221f; color: #fff; }
.brand.standalone { padding: 0; margin-bottom: 68px; }
.brand.standalone .brand-mark { background: var(--warm); }
.install-intro h1 { max-width: 440px; margin: 0 0 14px; font-size: 38px; line-height: 1.16; }
.install-intro > p { max-width: 450px; margin: 0 0 40px; color: #bdc9c4; font-size: 15px; line-height: 1.7; }
.requirement-list { display: grid; gap: 10px; }
.requirement-list > div { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.requirement-list svg { color: #67c8b4; }
.requirement-list span { display: block; }
.requirement-list strong { display: block; font-size: 12px; }
.requirement-list small { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8da099; font-size: 10px; margin-top: 2px; }
.install-form-panel { display: flex; flex-direction: column; justify-content: center; padding: 44px clamp(28px, 6vw, 92px); background: var(--surface); }
.install-form-panel > * { width: min(760px, 100%); margin-left: auto; margin-right: auto; }
.panel-title { display: flex; align-items: center; gap: 12px; margin-bottom: 25px; }
.panel-title > div { flex: 1; }
.panel-title h2 { margin: 3px 0 0; font-size: 24px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.step-badge { padding: 5px 9px; border-radius: 5px; background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 800; }
.status-page { min-height: 100vh; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.status-code { color: var(--accent); font-size: 64px; font-weight: 900; }
.status-page h1 { margin: 5px 0 22px; font-size: 20px; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(350px, .85fr) minmax(480px, 1.15fr); }
.login-scene { display: flex; flex-direction: column; justify-content: space-between; padding: 45px clamp(32px, 5vw, 72px); background: #17221f; color: #fff; }
.login-scene .brand { padding: 0; }
.login-message { max-width: 500px; }
.login-message span { color: #7fd4c2; font-size: 12px; font-weight: 800; }
.login-message h1 { margin: 12px 0 16px; font-size: 39px; line-height: 1.18; }
.login-message p { color: #afbeb8; line-height: 1.8; }
.login-foot { color: #798d85; font-size: 11px; }
.login-panel { display: grid; place-items: center; padding: 30px; background: var(--surface); }
.login-box { width: min(390px, 100%); }
.login-box h2 { margin: 0 0 7px; font-size: 24px; }
.login-box > p { margin: 0 0 25px; color: var(--muted); }
.login-box .form-stack { gap: 15px; }

.draft-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); gap: 18px; align-items: start; }
.draft-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.draft-panel-header { display: flex; align-items: center; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.draft-panel-header h2 { flex: 1; margin: 0; font-size: 14px; }
.draft-panel-body { padding: 17px; }
.image-order-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 9px; }
.ordered-image { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); cursor: grab; }
.ordered-image img { width: 100%; height: 100%; object-fit: cover; }
.ordered-image .order-number { position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; background: rgba(23,34,31,.82); color: #fff; font-size: 11px; font-weight: 800; }
.ordered-image .cover-label { position: absolute; right: 6px; top: 6px; padding: 4px 6px; border-radius: 4px; background: rgba(23,34,31,.78); color: #fff; font-size: 10px; font-weight: 800; cursor:pointer; }
.ordered-image .cover-label.active { background: var(--warm); }
.ordered-image .remove-image { position: absolute; right: 6px; bottom: 6px; background: rgba(255,255,255,.9); }
.ordered-image.ordered-video { grid-column: span 2; aspect-ratio: 2 / 1; cursor: default; background: #202826; }
.ordered-video-placeholder { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; padding: 20px; color: #fff; text-align: center; }
.ordered-video-placeholder svg { width: 31px; height: 31px; }
.ordered-video-placeholder strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.variant-list { display: grid; gap: 9px; }
.variant-option { display: grid; grid-template-columns: 22px 1fr; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.variant-option:hover { border-color: #9eada6; }
.variant-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.variant-option input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.variant-option strong { display: block; font-size: 12px; }
.variant-option p { display: -webkit-box; margin: 5px 0 0; overflow: hidden; color: var(--muted); line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.editor-field { position: relative; }
.char-count { position: absolute; right: 9px; bottom: 7px; padding: 2px 5px; border-radius: 3px; background: rgba(255,255,255,.9); color: var(--muted); font-size: 10px; }
.char-count.over { color: var(--danger); font-weight: 800; }
.sticky-panel { position: sticky; top: 98px; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.project-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.project-card-header { display: flex; align-items: start; gap: 10px; }
.project-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-muted); color: var(--ink-soft); }
.project-card-header > div:nth-child(2) { flex: 1; min-width: 0; }
.project-card h3 { margin: 1px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.project-card p { min-height: 40px; margin: 13px 0; color: var(--muted); line-height: 1.5; }
.color-input { min-height: 39px; padding: 4px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 9px; max-height: 520px; overflow-y: auto; }
.picker-card { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.picker-card:hover { border-color: #99aaa2; }
.picker-card:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.picker-card input { position: absolute; left: 7px; top: 7px; z-index: 2; width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.picker-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-muted); }
.picker-card span { display: block; overflow: hidden; padding: 8px; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.picker-card .picker-video { aspect-ratio: 1; display: grid; place-items: center; padding: 0; background: #202826; color: #fff; }
.picker-card .picker-video svg { width: 34px; height: 34px; }
.text-picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; max-height: 310px; overflow-y: auto; }
.text-picker { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.text-picker:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.text-picker input { width: 17px; height: 17px; min-height: 0; accent-color: var(--accent); }
.text-picker strong, .text-picker small { display: block; }
.text-picker small { margin-top: 4px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }

.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 22px; align-items: start; }
.settings-nav { display: grid; gap: 3px; position: sticky; top: 100px; }
.settings-nav a { padding: 10px 11px; border-radius: 5px; color: var(--muted); font-weight: 700; }
.settings-nav a:hover, .settings-nav a.active { background: var(--surface-muted); color: var(--ink); }
.masked-key { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); }
.masked-key code { flex: 1; overflow: hidden; color: var(--muted); }
.switch-row { min-height: 62px; display: flex; align-items: center; gap: 18px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); }
.switch-row > span { flex: 1; }
.switch-row strong, .switch-row small { display: block; }
.switch-row small { margin-top: 4px; color: var(--muted); font-weight: 400; }
.switch-row input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; gap: 7px; align-items: center; }
.copy-field .icon-button { border: 1px solid var(--line-strong); background: var(--surface); }

.update-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .42fr); gap: 18px; align-items: start; }
.update-drop { min-height: 210px; place-items: center; align-content: center; padding: 28px; text-align: center; border: 1.5px dashed #98aaa2; border-radius: 7px; background: #f8faf8; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.update-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.update-drop.dragging { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 2px rgba(25, 126, 108, .13); }
.update-drop.selected { border-style: solid; border-color: #83b8ac; background: #f3faf7; }
.update-drop input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; pointer-events: none; }
.update-drop-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.update-drop-icon svg { width: 24px; height: 24px; }
.update-drop.dragging .update-drop-icon { transform: translateY(-2px); }
.update-drop strong, .update-drop small { display: block; }
.update-drop small { margin-top: 5px; color: var(--muted); font-weight: 400; }
.update-progress { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); }
.update-progress[hidden] { display: none; }
.update-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.update-progress-head strong { font-size: 12px; }
.update-progress-head span { color: var(--accent-dark); font-size: 12px; font-weight: 800; }
.update-progress-track { height: 9px; overflow: hidden; border-radius: 5px; background: #d9e0dc; }
.update-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .18s ease; }
.update-progress small { color: var(--muted); line-height: 1.5; }
.update-progress.processing .update-progress-track span { background-image: linear-gradient(90deg, var(--accent) 0 35%, #53a899 35% 65%, var(--accent) 65% 100%); background-size: 42px 100%; animation: update-progress-move .8s linear infinite; }
.update-progress.complete { border-color: #a6d3c7; background: var(--accent-soft); }
.update-progress.failed { border-color: #e5b2b2; background: var(--danger-soft); }
.update-progress.failed .update-progress-track span { background: var(--danger); }
.update-version-button { cursor: pointer; border: 0; font: inherit; transition: filter .15s, transform .15s; }
.update-version-button:hover { filter: brightness(.96); transform: translateY(-1px); }
.update-version-button svg { width: 12px; height: 12px; }
.update-detail-modal .modal-panel { width: min(680px, 100%); }
.update-detail-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.update-detail-heading > span { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 6px; background: var(--accent-soft); color: var(--accent-dark); }
.update-detail-heading > span svg { width: 21px; height: 21px; }
.update-detail-heading strong, .update-detail-heading small { display: block; }
.update-detail-heading strong { font-size: 15px; }
.update-detail-heading small { margin-top: 4px; color: var(--accent-dark); font-size: 11px; }
.update-detail-meta { display: grid; grid-template-columns: 1fr .65fr 1.35fr; gap: 1px; margin: 16px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.update-detail-meta > div { min-width: 0; padding: 11px 12px; background: #fbfcfb; }
.update-detail-meta span, .update-detail-meta strong, .update-detail-meta code { display: block; }
.update-detail-meta span { margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.update-detail-meta strong { font-size: 12px; }
.update-detail-meta code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.update-change-list { padding-top: 2px; }
.update-change-list h3 { margin: 0 0 10px; font-size: 13px; }
.update-change-list ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.update-change-list li { min-width: 0; display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.update-change-list li svg { width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }
.update-change-list p { margin: 0; padding: 12px; border-left: 3px solid var(--accent); background: var(--surface-muted); color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
@keyframes update-progress-move { to { background-position: 42px 0; } }
.update-checks { display: grid; gap: 1px; background: var(--line); }
.update-checks > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; background: var(--surface); }
.table-note { display: block; max-width: 420px; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.share-page { background: #f2f4f1; }
.share-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.share-header-inner { min-height: 74px; width: min(1400px, calc(100% - 48px)); margin: 0 auto; display: flex; align-items: center; gap: 24px; }
.share-brand { min-width: 0; display: flex; align-items: center; gap: 11px; flex: 1; }
.share-brand strong, .share-brand small { display: block; }
.share-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.share-brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.share-count { display: flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 12px; }
.share-count strong { color: var(--ink); font-size: 20px; }
.share-intro { background: var(--ink); color: #fff; }
.share-intro > div { width: min(1400px, calc(100% - 48px)); margin: 0 auto; padding: 30px 0 32px; }
.share-intro h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.25; }
.share-intro p { max-width: 760px; margin: 0; color: #b8c5c0; line-height: 1.65; }
.share-main { width: min(1400px, calc(100% - 48px)); min-height: calc(100vh - 270px); margin: 0 auto; padding: 22px 0 48px; }
.share-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(125px, 160px)) auto; gap: 9px; align-items: center; margin-bottom: 20px; }
.share-toolbar .search-box { min-width: 0; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.share-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); transition: border-color .15s, transform .15s; }
.share-card:hover { border-color: #a7b5ae; transform: translateY(-1px); }
.share-media { aspect-ratio: 4 / 3; overflow: hidden; background: #e8ece8; }
.share-media img { width: 100%; height: 100%; object-fit: cover; }
.share-text-preview { height: 188px; overflow: hidden; padding: 17px; background: #f7f1e9; color: #584f43; line-height: 1.72; white-space: pre-wrap; }
.share-card-body { flex: 1; padding: 14px; }
.share-card-heading { display: flex; align-items: flex-start; gap: 9px; }
.share-card-heading h2 { min-width: 0; flex: 1; margin: 1px 0 10px; overflow: hidden; font-size: 14px; line-height: 1.45; }
.share-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.share-card-actions { display: flex; gap: 7px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fbfcfb; }
.share-card-actions .button { flex: 1; }
.share-empty { min-height: 330px; display: grid; place-items: center; align-content: center; padding: 42px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 7px; background: rgba(255, 255, 255, .5); }
.share-empty .empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 13px; border-radius: 50%; background: var(--surface-muted); color: var(--muted); }
.share-empty h2 { margin: 0 0 7px; font-size: 17px; }
.share-empty p { margin: 0; color: var(--muted); }
.share-footer { padding: 18px 24px 28px; text-align: center; color: var(--muted); font-size: 11px; }
.share-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.share-tabs a { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 700; }
.share-tabs a.active { border-color: var(--accent); color: var(--accent-dark); }
.share-video { display: grid; place-items: center; color: #fff; background: #202826; }
.share-video > span { display: grid; justify-items: center; gap: 9px; }
.share-video svg { width: 38px; height: 38px; }
.publish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.publish-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.publish-preview { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 10px; overflow: hidden; background: #e9ede9; }
.publish-thumbs { width: 100%; min-height: 190px; display: grid; grid-template-columns: repeat(2, 1fr); }
.publish-thumbs img { width: 100%; height: 100%; min-height: 95px; object-fit: cover; }
.publish-video-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: #202826; color: #fff; }
.publish-video-icon svg { width: 26px; height: 26px; }
.publish-card-body { flex: 1; padding: 15px; }
.publish-card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.publish-card-head > div { min-width: 0; }
.publish-card-head h2 { margin: 8px 0 0; overflow-wrap: anywhere; font-size: 16px; line-height: 1.45; }
.publish-card-body > p { display: -webkit-box; margin: 13px 0 0; overflow: hidden; color: var(--ink-soft); line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.publish-tags { margin-top: 11px; color: var(--accent-dark); font-size: 12px; line-height: 1.6; }
.publish-content-limits { display: flex; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.publish-content-limits span { padding: 3px 6px; border-radius: 4px; background: var(--surface-muted); }
.publish-content-limits .over, .publish-share-status.over { color: var(--danger); font-weight: 800; }
.publish-card-actions { display: grid; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: #fbfcfb; }
.publish-card-actions > .button { width: 100%; }
.publish-secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.publish-secondary-actions .button { width: 100%; min-width: 0; }
.publish-share-button { min-height: 46px; }
.publish-share-button.preparing svg { animation: share-button-pulse .85s ease-in-out infinite alternate; }
.publish-share-button.ready { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.publish-share-status { min-height: 16px; display: block; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.45; }
.publish-image-modal .modal-panel { width: min(760px, 100%); }
.publish-download-hint { margin: 0 0 13px; color: var(--muted); font-size: 12px; }
.publish-download-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.publish-download-item { min-width: 0; overflow: hidden; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 9px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; }
.publish-download-item img { width: 48px; height: 48px; grid-row: 1 / 3; object-fit: cover; border-radius: 4px; background: var(--surface-muted); }
.publish-download-item > div { min-width: 0; }
.publish-download-item strong, .publish-download-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publish-download-item strong { font-size: 12px; }
.publish-download-item span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.publish-download-item .button { grid-column: 2; width: max-content; }
@keyframes share-button-pulse { to { opacity: .45; transform: scale(.88); } }

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid, .draft-layout { grid-template-columns: 1fr; }
    .sticky-panel { position: static; }
    .install-shell { grid-template-columns: minmax(280px, .65fr) minmax(520px, 1.35fr); }
    .update-layout { grid-template-columns: 1fr; }
    .share-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(125px, 160px)); }
    .share-toolbar .button { width: 100%; }
}

@media (max-width: 760px) {
    :root { --sidebar: 266px; }
    .app-shell { display: block; }
    .sidebar { position: fixed; left: 0; transform: translateX(-105%); box-shadow: var(--shadow); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .mobile-nav { display: inline-grid !important; }
    .topbar { min-height: 68px; padding: 11px 14px; }
    .top-action span { display: none; }
    .content-area { padding: 17px 14px 38px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { min-height: 98px; grid-template-columns: 1fr 34px; padding: 13px; }
    .stat-card strong { font-size: 22px; }
    .stat-card .stat-icon { width: 34px; height: 34px; }
    .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
    .page-tools { align-items: stretch; }
    .page-tools > *, .search-box { min-width: 0; width: 100%; }
    .filter-row { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .filter-row select { width: 100%; }
    .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .asset-info { padding: 10px; }
    .asset-card-actions { padding: 5px; }
    .install-shell, .login-shell { display: block; }
    .install-intro { min-height: auto; padding: 30px 22px; }
    .brand.standalone { margin-bottom: 38px; }
    .install-intro h1 { font-size: 29px; }
    .requirement-list { display: none; }
    .install-form-panel { padding: 30px 20px 50px; }
    .login-scene { min-height: 270px; padding: 28px 22px; }
    .login-message h1 { font-size: 29px; }
    .login-message p, .login-foot { display: none; }
    .login-panel { padding: 36px 22px; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; overflow-x: auto; }
    .copy-field { grid-template-columns: minmax(0, 1fr) auto; }
    .copy-field .icon-button { display: none; }
    .share-header-inner, .share-intro > div, .share-main { width: min(100% - 28px, 1400px); }
    .share-header-inner { min-height: 64px; padding-top: env(safe-area-inset-top); }
    .share-intro > div { padding: 23px 0 25px; }
    .share-intro h1 { font-size: 23px; }
    .share-toolbar { grid-template-columns: 1fr 1fr; }
    .share-toolbar .search-box { grid-column: 1 / -1; width: 100%; }
    .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .publish-grid { grid-template-columns: 1fr; }
    .publish-card { border-radius: 6px; }
    .publish-card-actions { padding: 11px; }
    .publish-card-actions .button { min-height: 44px; }
    .publish-secondary-actions { gap: 7px; }
    .publish-share-button { min-height: 50px !important; }
    .share-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
    .modal { align-items: end; padding: 0; }
    .modal-panel { width: 100%; max-height: calc(100dvh - env(safe-area-inset-top) - 12px); border-radius: 8px 8px 0 0; }
    .modal-header { position: sticky; top: 0; z-index: 2; background: var(--surface); }
    .modal-footer { position: sticky; bottom: 0; z-index: 2; padding-bottom: calc(13px + env(safe-area-inset-bottom)); background: var(--surface); }
    .modal-footer .button { min-height: 44px; }
}

@media (max-width: 430px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 84px; }
    .asset-grid { grid-template-columns: 1fr; }
    .filter-row { grid-template-columns: 1fr; }
    .page-heading p { display: none; }
    .image-order-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .switch-row { align-items: flex-start; }
    .copy-field { grid-template-columns: 1fr; }
    .copy-field .button { width: 100%; }
    .share-count { display: none; }
    .share-header-inner, .share-intro > div, .share-main { width: calc(100% - 20px); }
    .share-brand { gap: 8px; }
    .share-brand .brand-mark { flex: 0 0 auto; }
    .share-intro > div { padding: 18px 0 20px; }
    .share-intro h1 { margin-bottom: 5px; font-size: 21px; }
    .share-intro p { font-size: 12px; line-height: 1.55; }
    .share-main { padding-top: 12px; padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
    .share-toolbar { grid-template-columns: 1fr; }
    .share-toolbar .search-box { grid-column: auto; }
    .share-grid { grid-template-columns: 1fr; }
    .share-card-actions { flex-direction: column; }
    .share-tabs a { flex: 1; justify-content: center; padding-left: 7px; padding-right: 7px; }
    .publish-preview, .publish-thumbs { min-height: 165px; }
    .publish-preview { aspect-ratio: 16 / 10; }
    .publish-thumbs img { min-height: 82px; }
    .publish-card-body { padding: 13px; }
    .publish-card-head { align-items: flex-start; }
    .publish-card-head .field-hint { flex: 0 0 auto; }
    .publish-card-body > p { -webkit-line-clamp: 6; }
    .publish-card-actions { gap: 7px; padding: 10px; }
    .publish-secondary-actions .button { padding-left: 8px; padding-right: 8px; }
    .publish-share-status:empty { display: none; }
    .modal-body { padding: 12px; }
    .picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .publish-download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .publish-download-item { grid-template-columns: 42px minmax(0, 1fr); padding: 7px; }
    .publish-download-item img { width: 42px; height: 42px; }
    .publish-download-item .button { width: 100%; padding-left: 5px; padding-right: 5px; }
    .modal-footer { display: grid; grid-template-columns: minmax(88px, .6fr) minmax(0, 1.4fr); }
    .modal-footer .spacer { display: none; }
    .modal-footer .button { width: 100%; }
}

/* Refined workspace surfaces */
.dashboard-chart-section { margin-bottom: 24px; }
.dashboard-draft-list { display: grid; gap: 9px; }
.dashboard-draft-item { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.dashboard-draft-item:hover { border-color: #9eada6; background: #fbfcfb; }
.dashboard-draft-item > div { min-width: 0; }
.dashboard-draft-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.dashboard-draft-item p { margin: 5px 0 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.5; }
.dashboard-draft-item .badge { flex: 0 0 auto; }
.chart-legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.legend-dot.published { background: var(--warm); }
.activity-chart { height: 228px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.chart-day { min-width: 0; display: grid; grid-template-rows: 20px minmax(0, 1fr) 20px; gap: 6px; text-align: center; }
.chart-values { display: flex; justify-content: center; gap: 9px; color: var(--muted); font-size: 10px; }
.chart-values span:first-child { color: var(--accent-dark); }
.chart-values span:last-child { color: #9b462e; }
.chart-bars { min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 6px; border-bottom: 1px solid var(--line-strong); background: repeating-linear-gradient(to top, transparent 0, transparent 24%, rgba(220, 226, 222, .55) 25%); }
.chart-bar { width: min(18px, 32%); border-radius: 3px 3px 0 0; background: var(--accent); transition: height .2s ease; }
.chart-bar.published { background: var(--warm); }
.chart-day small { color: var(--muted); font-size: 10px; }

.management-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.management-summary > div { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 15px 16px; background: var(--surface); }
.summary-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 6px; background: var(--surface-muted); color: var(--accent-dark); }
.management-summary p { min-width: 0; margin: 0; color: var(--muted); font-size: 11px; }
.management-summary strong { display: block; margin-top: 3px; color: var(--ink); font-size: 20px; line-height: 1; }
.management-tabs { margin-bottom: 20px; }
.management-tabs .tab-button { display: inline-flex; align-items: center; gap: 7px; }
.management-tabs .tab-button span { min-width: 20px; padding: 2px 5px; border-radius: 4px; background: var(--surface-muted); color: var(--muted); font-size: 10px; }
.tools-title { display: block; margin-bottom: 3px; font-size: 13px; }
.project-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.project-card { display: flex; flex-direction: column; min-height: 248px; padding: 0; overflow: hidden; }
.project-card-header { align-items: center; padding: 16px 16px 0; }
.project-card p { flex: 1; min-height: 50px; margin: 14px 16px; line-height: 1.65; }
.project-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 16px 15px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfa; }
.project-metrics div { min-width: 0; padding: 9px; text-align: center; border-right: 1px solid var(--line); }
.project-metrics div:last-child { border-right: 0; }
.project-metrics strong, .project-metrics span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-metrics strong { font-size: 14px; }
.project-metrics span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.project-card-actions { min-height: 50px; display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-top: 1px solid var(--line); background: #fbfcfb; }
.project-card-actions .button { flex: 1; }
.modal-footer .spacer { flex: 1; }
.tag-management-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 18px; align-items: start; }
.tag-cloud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 9px; }
.tag-manage-item { min-width: 0; display: grid; grid-template-columns: 12px minmax(0, 1fr) 34px; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.tag-color-swatch { width: 12px; height: 34px; border-radius: 3px; background: var(--tag-color); }
.tag-manage-item strong, .tag-manage-item small { display: block; }
.tag-manage-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.tag-manage-item small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.tag-manage-item form { margin: 0; }
.tag-create-panel { position: sticky; top: 102px; }
.color-field { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: center; }
.color-field span { color: var(--muted); font-size: 11px; font-weight: 400; }

.draft-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.draft-list-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.draft-list-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px 0; }
.draft-list-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-muted); color: var(--accent-dark); }
.draft-list-body { padding: 13px 15px 16px; }
.draft-list-body h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.draft-list-body > p { height: 38px; margin: 7px 0 13px; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.55; }
.draft-list-meta { display: grid; gap: 6px; color: var(--ink-soft); font-size: 11px; }
.draft-list-meta span { min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-list-meta svg { width: 14px; height: 14px; color: var(--muted); }
.draft-list-footer { min-height: 51px; display: flex; align-items: center; gap: 10px; padding: 8px 11px 8px 15px; border-top: 1px solid var(--line); background: #fbfcfb; }
.draft-list-footer small { flex: 1; color: var(--muted); font-size: 10px; }
.draft-save-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 13px 17px; border-top: 1px solid var(--line); background: #fbfcfb; }

.settings-layout { grid-template-columns: 210px minmax(0, 900px); gap: 24px; }
.settings-nav { top: 102px; padding: 7px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.settings-nav a { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 5px; }
.settings-nav a svg { width: 16px; height: 16px; }
.settings-content { display: grid; gap: 18px; }
.settings-section { scroll-margin-top: 100px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.settings-section-head { min-height: 70px; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fafbfa; }
.settings-section-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 6px; background: var(--accent-soft); color: var(--accent-dark); }
.settings-section-head > div { min-width: 0; flex: 1; }
.settings-section-head h2 { margin: 0; font-size: 15px; }
.settings-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.settings-section-body { padding: 18px; }
.settings-save-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(255,255,255,.95); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.settings-save-bar > span { flex: 1; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.environment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.environment-grid > div { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 5px 8px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; }
.environment-grid span, .environment-grid strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.environment-grid span { color: var(--muted); font-size: 10px; }
.environment-grid strong { grid-column: 1; font-size: 12px; }
.environment-grid svg { grid-column: 2; grid-row: 1 / 3; width: 18px; color: var(--accent); }
.environment-grid svg.failed { color: var(--danger); }

/* Clean public portal */
.share-page { background: #f5f6f4; }
.share-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
.share-header-inner { width: min(1120px, calc(100% - 40px)); min-height: 66px; }
.share-header-inner > form { margin: 0; }
.share-intro { border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.share-intro > div { width: min(1120px, calc(100% - 40px)); padding: 24px 0 26px; }
.share-intro h1 { margin-bottom: 6px; font-size: 24px; }
.share-intro p { color: var(--muted); }
.share-main { width: min(1120px, calc(100% - 40px)); }
.share-toolbar { grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, 145px)) auto; }
.share-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.share-card { border-color: #dfe4e0; box-shadow: 0 3px 12px rgba(25, 39, 34, .035); }
.share-card:hover { transform: none; box-shadow: 0 6px 18px rgba(25, 39, 34, .07); }
.share-media { aspect-ratio: 1 / 1; }
.share-card-actions { min-height: 53px; }
.publish-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.publish-share-button { font-size: 14px; }

.share-login-shell { width: min(420px, calc(100% - 32px)); min-height: 100vh; display: grid; align-content: center; gap: 18px; margin: 0 auto; padding: 42px 0; }
.share-login-brand { display: flex; align-items: center; gap: 11px; padding: 0 4px; }
.share-login-brand strong, .share-login-brand small { display: block; }
.share-login-brand strong { font-size: 15px; }
.share-login-brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.share-login-panel { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 16px 44px rgba(24, 42, 36, .08); }
.share-login-heading { margin-bottom: 23px; text-align: center; }
.login-lock { width: 46px; height: 46px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 7px; background: var(--ink); color: #fff; }
.share-login-heading h1 { margin: 0; font-size: 20px; }
.share-login-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

@media (max-width: 1100px) {
    .tag-management-layout { grid-template-columns: 1fr; }
    .tag-create-panel { position: static; }
}

@media (max-width: 760px) {
    .activity-chart { height: 200px; gap: 6px; padding-left: 0; padding-right: 0; }
    .chart-values { gap: 4px; }
    .management-summary { grid-template-columns: 1fr 1fr; }
    .management-summary > div { padding: 12px; }
    .project-grid, .draft-list-grid { grid-template-columns: 1fr; }
    .settings-nav { position: static; padding: 4px; }
    .settings-nav a { flex: 0 0 auto; }
    .settings-section-head { padding: 12px 14px; }
    .settings-section-body { padding: 14px; }
    .settings-save-bar { bottom: 8px; }
    .update-history-table th:nth-child(3), .update-history-table td:nth-child(3), .update-history-table th:nth-child(5), .update-history-table td:nth-child(5) { display: none; }
    .update-history-table th:first-child, .update-history-table td:first-child { width: 52%; }
    .update-history-table .table-note { display: none; }
    .share-header-inner, .share-intro > div, .share-main { width: calc(100% - 20px); }
    .share-intro > div { padding: 17px 0 19px; }
    .share-intro h1 { font-size: 20px; }
    .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .share-card-body { padding: 10px; }
    .share-card-heading { display: grid; gap: 5px; }
    .share-card-heading h2 { min-height: 35px; margin: 0; font-size: 12px; }
    .share-card-heading .badge { width: max-content; }
    .share-meta { display: grid; gap: 3px; }
    .share-card-actions { flex-direction: column; padding: 7px; }
    .share-card-actions .button { width: 100%; min-height: 36px; padding: 6px; font-size: 11px; }
}

@media (max-width: 430px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { min-height: 94px; }
    .stat-card .trend { display: none; }
    .activity-chart { height: 174px; gap: 3px; }
    .dashboard-draft-item { align-items: start; }
    .chart-values { font-size: 9px; }
    .chart-bar { width: 38%; }
    .management-summary > div { gap: 8px; }
    .summary-icon { width: 30px; height: 30px; }
    .management-summary strong { font-size: 17px; }
    .project-card { min-height: 230px; }
    .draft-save-actions { grid-template-columns: 1fr; }
    .settings-nav a span { display: block; }
    .settings-section-icon { width: 34px; height: 34px; }
    .settings-save-bar { display: grid; }
    .settings-save-bar > span { display: none; }
    .settings-save-bar .button { width: 100%; }
    .update-detail-meta { grid-template-columns: 1fr 1fr; }
    .update-detail-meta > div:last-child { grid-column: 1 / -1; }
    .update-detail-modal .modal-footer { display: block; }
    .share-toolbar { grid-template-columns: 1fr 1fr; }
    .share-toolbar .search-box { grid-column: 1 / -1; }
    .share-toolbar .button { grid-column: 1 / -1; width: 100%; }
    .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .share-text-preview { height: 145px; padding: 10px; font-size: 11px; }
    .share-card-body .tag-list { display: none; }
    .share-card-actions { flex-direction: column; }
    .share-login-shell { width: calc(100% - 24px); padding: 24px 0 calc(24px + env(safe-area-inset-bottom)); }
    .share-login-panel { padding: 21px 18px; }
}

/* 2026 workspace visual system */
::selection { background: #f2d99f; color: var(--ink); }
body, .app-shell, .main-area, .dashboard-grid, .dashboard-grid > *, .section, .surface, .table-wrap { min-width: 0; }
.table-wrap { max-width: 100%; }
button, a, input, textarea, select { touch-action: manipulation; }
button, a, .button, .icon-button, .tab-button, .asset-card, .share-card, .project-card, .draft-list-card {
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.sidebar {
    border-right-color: #292b27;
    background: #1a1b19;
    box-shadow: 8px 0 28px rgba(20, 21, 19, .055);
}
.sidebar .brand { padding-bottom: 23px; }
.sidebar .brand-mark { background: var(--accent); box-shadow: 0 6px 18px rgba(154, 95, 8, .24); }
.sidebar .brand strong, .sidebar .sidebar-user strong { color: #f8f8f5; }
.sidebar .brand small, .sidebar .sidebar-user small { color: #92978e; }
.side-nav { gap: 4px; }
.side-nav a { position: relative; min-height: 43px; color: #b9bdb5; font-weight: 600; }
.side-nav a:hover { background: #252724; color: #ffffff; }
.side-nav a.active { background: rgba(154, 95, 8, .22); color: #f5d794; }
.side-nav a.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #d59a34; }
.side-nav a svg { width: 17px; height: 17px; }
.nav-label { color: #71766e; }
.sidebar-user { border-top-color: #30322e; }
.sidebar-user .avatar { background: rgba(154, 95, 8, .25); color: #f2ca75; }
.sidebar .icon-button { color: #92978e; }
.sidebar .icon-button:hover { background: #292b27; color: #ffffff; }

.topbar { min-height: 76px; border-bottom-color: rgba(218, 220, 214, .9); background: rgba(255, 255, 255, .9); box-shadow: 0 1px 0 rgba(23, 24, 22, .02); }
.page-heading h1 { color: var(--ink); font-size: 21px; font-weight: 750; }
.page-heading p { color: var(--muted); font-size: 12px; }
.content-area { padding-top: 26px; }

.button, button.button { min-height: 40px; border-color: var(--line-strong); box-shadow: 0 1px 1px rgba(23, 24, 22, .025); font-weight: 650; }
.button:hover { border-color: #aeb2a9; background: #f8f8f5; box-shadow: 0 2px 7px rgba(23, 24, 22, .055); }
.button:active { box-shadow: none; opacity: .86; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #ffffff; box-shadow: 0 4px 12px rgba(154, 95, 8, .16); }
.button.primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); box-shadow: 0 5px 16px rgba(112, 69, 5, .2); }
.button.secondary { border-color: #e4c98e; background: var(--accent-soft); color: var(--accent-dark); }
.button.secondary:hover { border-color: #d7b66e; background: #ffedc3; }
.button.danger { border-color: #efc4c7; background: var(--danger-soft); }
.button.ghost { box-shadow: none; }
.button.small { min-height: 34px; }
.button:disabled, .icon-button:disabled { opacity: .44; box-shadow: none; }
.icon-button { width: 36px; height: 36px; }
.icon-button:hover { background: #eceee9; }

.page-tools { min-height: 62px; margin-bottom: 20px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.search-box .lucide { top: 12px; }
input, textarea, select { min-height: 42px; border-color: var(--line-strong); background: #ffffff; box-shadow: inset 0 1px 1px rgba(23, 24, 22, .02); }
input::placeholder, textarea::placeholder { color: #999d94; }
input:hover, textarea:hover, select:hover { border-color: #a9aea4; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(154, 95, 8, .11); }
input[readonly], textarea[readonly] { background: #f5f5f2; color: var(--ink-soft); }
label { color: #494c46; font-weight: 650; }
.field-hint, label .hint { color: var(--muted); line-height: 1.55; }

.section { margin-bottom: 28px; }
.section-header { margin-bottom: 14px; }
.section-header h2, .section-header h3 { font-size: 16px; font-weight: 750; }
.surface, .draft-panel, .project-card, .draft-list-card, .asset-card, .share-card, .publish-card { border-color: var(--line); box-shadow: var(--shadow-sm); }
.surface-body { padding: 19px; }

.stats-grid { gap: 14px; }
.stat-card { min-height: 118px; border-color: var(--line); box-shadow: var(--shadow-sm); }
.stat-card strong, .management-summary strong { font-variant-numeric: tabular-nums; }
.stat-card .stat-icon { background: #eeeFEB; color: #50534c; }
.stat-card.accent .stat-icon { background: var(--accent-soft); color: var(--accent-dark); }
.stat-card.warm .stat-icon { background: var(--warm-soft); color: var(--warm); }
.dashboard-chart-section .surface-body { padding-bottom: 14px; }
.activity-chart { border-top-color: var(--line); }
.chart-bars { background: repeating-linear-gradient(to top, transparent 0, transparent 24%, rgba(218, 220, 214, .58) 25%); }
.chart-bar, .legend-dot { background: var(--accent); }
.chart-bar.published, .legend-dot.published { background: var(--warm); }
.chart-values span:first-child { color: var(--accent-dark); }
.chart-values span:last-child { color: #226b5b; }
.dashboard-draft-item { border-color: var(--line); background: #fbfbf9; }
.dashboard-draft-item:hover { border-color: #b9bdb4; background: #f7f7f3; }

.table-wrap { border-color: var(--line); box-shadow: var(--shadow-sm); scrollbar-color: #b8bbb3 transparent; }
th { padding-top: 12px; padding-bottom: 12px; background: #f6f7f3; color: #676b63; font-weight: 750; }
td { padding-top: 13px; padding-bottom: 13px; }
tbody tr:hover { background: #faf9f5; }
code { color: #5d4318; font-family: Consolas, "SFMono-Regular", monospace; font-size: .92em; }
.empty-state, .share-empty { border-color: var(--line-strong); background: #fafaf7; }
.empty-state .empty-icon, .share-empty .empty-icon { background: #eceee9; color: #6e726a; }

.badge { border: 1px solid transparent; background: #eceee9; color: #555951; }
.badge.green { border-color: #c9e2d9; background: var(--success-soft); color: #145a4b; }
.badge.warm { border-color: #cbe4dd; background: var(--warm-soft); color: #1f6657; }
.badge.warning { border-color: #ecd7a8; background: var(--warning-soft); color: #75500f; }
.badge.red { border-color: #efc8cb; background: var(--danger-soft); color: #96343a; }
.tag { border-color: var(--line); background: #fbfbf9; }

.asset-card:hover, .share-card:hover { border-color: #b8bcb3; box-shadow: 0 8px 22px rgba(23, 24, 22, .075); transform: none; }
.asset-visual { background: #e9ebe6; }
.asset-visual.text-visual, .share-text-preview { background: #f6f0e3; color: #594f3c; }
.asset-info h3, .share-card-heading h2, .draft-list-body h2 { overflow-wrap: anywhere; }
.asset-card-actions, .share-card-actions, .draft-list-footer, .draft-save-actions, .project-card-actions, .publish-card-actions { background: #fafaf7; }
.asset-select { width: 24px; height: 24px; border-radius: 4px; accent-color: var(--accent); }

.upload-zone, .update-drop { border-color: #b6b8b0; background: #fafaf7; }
.upload-zone:hover, .update-drop:hover, .upload-zone.dragging, .update-drop.dragging { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone .upload-icon, .update-drop-icon { background: var(--accent-soft); color: var(--accent-dark); }
.upload-item, .update-progress { border-color: var(--line); background: #f7f7f4; }
.upload-progress span, .update-progress-track span { background: var(--accent); }
.update-progress.complete { border-color: #bcdccf; background: var(--success-soft); }
.update-progress.processing .update-progress-track span { background-image: linear-gradient(90deg, var(--accent) 0 35%, #d19b3d 35% 65%, var(--accent) 65% 100%); }

.tabs, .share-tabs { border-bottom-color: var(--line); }
.tab-button.active, .share-tabs a.active { border-color: var(--accent); color: var(--accent-dark); }
.tab-button:hover, .share-tabs a:hover { color: var(--ink); background: #f4f4f0; }
.alert { border-color: var(--line); }
.alert.success { border-color: #bcdccf; background: var(--success-soft); color: #145a4b; }
.alert.warning { border-color: #ead4a1; background: var(--warning-soft); color: #6f4b0c; }
.alert.error { border-color: #efc4c7; background: var(--danger-soft); color: #8f3036; }

.modal { background: rgba(20, 21, 19, .6); backdrop-filter: blur(3px); }
.modal-panel { border: 1px solid rgba(255, 255, 255, .4); box-shadow: 0 24px 70px rgba(20, 21, 19, .24); }
.modal.open .modal-panel { animation: modal-enter .18s ease-out; }
.modal-header { min-height: 62px; background: #fbfbf9; }
.modal-header h2 { font-weight: 750; }
.modal-footer { background: #fbfbf9; }
@keyframes modal-enter { from { opacity: 0; transform: translateY(8px); } }

.pagination a, .pagination span { min-width: 38px; min-height: 38px; }
.pagination .active { border-color: var(--accent); background: var(--accent); }
.toast { border-color: var(--line); border-left-color: var(--success); box-shadow: 0 16px 42px rgba(20, 21, 19, .16); }
.toast.error { border-left-color: var(--danger); }

.project-icon, .draft-list-icon, .summary-icon { background: var(--accent-soft); color: var(--accent-dark); }
.project-card:hover, .draft-list-card:hover { border-color: #b8bcb3; box-shadow: 0 8px 22px rgba(23, 24, 22, .065); }
.project-metrics, .environment-grid > div { background: #f8f8f5; }
.tag-color-swatch { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07); }
.variant-option, .text-picker, .picker-card { background: #fbfbf9; }
.variant-option:hover, .text-picker:hover, .picker-card:hover { border-color: #b6bab1; }
.variant-option.selected, .text-picker:has(input:checked), .picker-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ordered-image .cover-label.active { background: var(--accent); }

.settings-nav, .settings-section { box-shadow: var(--shadow-sm); }
.settings-nav a:hover { background: #f1f2ee; }
.settings-nav a.active { background: var(--accent-soft); color: var(--accent-dark); }
.settings-section-head { background: #f8f8f5; }
.settings-section-icon { background: var(--accent-soft); color: var(--accent-dark); }
.switch-row, .masked-key { background: #f7f7f4; }
.settings-save-bar { border-color: #cfd1ca; box-shadow: 0 14px 34px rgba(20, 21, 19, .13); }
.environment-grid svg { color: var(--success); }

.minimal-page { background: #f2f2ee; }
.login-scene, .install-intro { background: #1b1c1a; }
.login-scene .brand-mark, .brand.standalone .brand-mark { background: var(--accent); }
.login-message span, .eyebrow { color: #e0af55; }
.login-message p, .install-intro > p { color: #b6bab2; }
.login-panel, .install-form-panel { background: #ffffff; }

.share-page { background: #f6f6f3; }
.share-header { border-bottom-color: var(--line); box-shadow: 0 1px 10px rgba(23, 24, 22, .035); }
.share-header .brand-mark { background: var(--accent); }
.share-intro { background: #ffffff; }
.share-intro h1 { font-weight: 750; }
.share-main { padding-top: 24px; }
.share-card, .publish-card { border-color: var(--line); }
.share-card-actions .button, .publish-card-actions .button { box-shadow: none; }
.publish-preview { background: #e9ebe6; }
.publish-video-icon { background: #242622; }
.publish-tags { color: var(--accent-dark); }
.publish-content-limits span { background: #eceee9; }
.share-login-panel { box-shadow: 0 18px 52px rgba(20, 21, 19, .11); }
.login-lock { background: #1b1c1a; }

@media (max-width: 760px) {
    :root { --sidebar: 272px; font-size: 14px; }
    .sidebar { width: var(--sidebar); padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
    .topbar { min-height: 66px; padding-top: calc(10px + env(safe-area-inset-top)); }
    .page-heading h1 { font-size: 18px; }
    .content-area { padding: 16px 12px 40px; }
    .button, button.button, .icon-button, .tab-button, .side-nav a, .share-tabs a, .pagination a, .pagination span { min-height: 44px; }
    .icon-button { width: 44px; height: 44px; }
    input, textarea, select { min-height: 44px; font-size: 16px; }
    label { font-size: 13px; }
    .page-tools { gap: 8px; padding: 10px; }
    .page-tools .button { width: 100%; }
    .surface-body { padding: 15px; }
    .section-header { align-items: flex-start; }
    .section-header .button { min-height: 44px; }
    .table-wrap table { min-width: 640px; }
    .update-history-table { min-width: 0 !important; }
    .stats-grid { gap: 9px; }
    .stat-card { min-height: 100px; padding: 14px; }
    .share-main { padding-top: 14px; }
    .share-toolbar { gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; }
    .share-toolbar .button { min-height: 44px; }
    .share-card-actions .button { min-height: 44px; font-size: 12px; }
    .share-card-body { min-width: 0; }
    .publish-card-actions .button { min-height: 46px; }
    .settings-save-bar { bottom: calc(8px + env(safe-area-inset-bottom)); }
    .modal-panel { border-left: 0; border-right: 0; border-bottom: 0; }
}

@media (max-width: 430px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card { grid-template-columns: minmax(0, 1fr) 32px; }
    .stat-card .stat-icon { width: 32px; height: 32px; }
    .management-summary { border-radius: 7px; }
    .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .share-card-heading h2 { font-size: 12px; line-height: 1.5; }
    .share-card-actions { gap: 6px; }
    .share-card-actions .button { padding-left: 7px; padding-right: 7px; font-size: 12px; white-space: normal; }
    .share-card-actions .button svg { width: 16px; height: 16px; }
    .publish-grid { grid-template-columns: 1fr; }
    .modal-footer { display: flex; flex-wrap: wrap; grid-template-columns: none; }
    .modal-footer .spacer { display: none; }
    .modal-footer .button { flex: 1 1 120px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
