/* ==========================================================================
   Image host UI. Plain CSS, no build step. Light + dark via [data-theme].
   ========================================================================== */
:root {
  --bg: #f5f6fa; --surface: #ffffff; --surface-2: #f0f2f8; --surface-3: #e8ebf4;
  --text: #141726; --muted: #667085; --border: #e3e6ef;
  --primary: #5b5bf0; --primary-hover: #4a4ae0; --primary-soft: #ececff; --on-primary: #fff;
  --danger: #e5484d; --danger-soft: #fdecec; --success: #1f9d63; --success-soft: #e6f6ee;
  --warning: #c98a04; --warning-soft: #fff5dc;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06); --shadow: 0 8px 24px rgba(16, 24, 40, .08); --shadow-lg: 0 24px 60px rgba(16, 24, 40, .18);
  --radius: 14px; --radius-sm: 9px; --sidebar: 252px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0d0f17; --surface: #151824; --surface-2: #1b1f2e; --surface-3: #242a3d;
  --text: #eceef7; --muted: #98a1b8; --border: #272c40;
  --primary: #7b7bff; --primary-hover: #9090ff; --primary-soft: #23244a; --on-primary: #0d0f17;
  --danger: #ff6b70; --danger-soft: #3a1a1e; --success: #3ecf8e; --success-soft: #12301f;
  --warning: #f0b429; --warning-soft: #33290d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 8px 24px rgba(0, 0, 0, .35); --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.icon-lg { width: 24px; height: 24px; } .icon-xl { width: 40px; height: 40px; stroke-width: 1.5; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .right { text-align: right; }
.nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; } .row-between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 1rem; } .grow { flex: 1 1 auto; min-width: 0; }
.mt { margin-top: 1rem; } .mt-lg { margin-top: 2rem; } .mb { margin-bottom: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .6rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; text-decoration: none !important; line-height: 1.2; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; } .btn-danger:hover { background: var(--danger); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; } .btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--primary-soft); border-color: transparent; color: var(--primary); } .btn-soft:hover { background: var(--primary-soft); filter: brightness(.97); }
.btn-sm { padding: .38rem .65rem; font-size: .85rem; } .btn-lg { padding: .85rem 1.4rem; font-size: 1.02rem; } .btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.btn.is-loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.label { font-weight: 600; font-size: .88rem; }
.input, .select, .textarea { width: 100%; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.textarea { min-height: 96px; resize: vertical; }
.hint { color: var(--muted); font-size: .82rem; } .field-error { color: var(--danger); font-size: .82rem; }
.input.is-invalid { border-color: var(--danger); }
.form-error { background: var(--danger-soft); color: var(--danger); padding: .7rem .9rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .9rem; }
.form-ok { background: var(--success-soft); color: var(--success); padding: .7rem .9rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .9rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; cursor: pointer; font-size: .92rem; } .check input { margin-top: .25rem; accent-color: var(--primary); }
.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 40px; height: 23px; border-radius: 99px; background: var(--surface-3); transition: .2s; position: relative; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + .track { background: var(--primary); } .switch input:checked + .track::after { transform: translateX(17px); }
.switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }
.input-group { display: flex; gap: .5rem; } .input-group .input { flex: 1; }
input[type="range"] { accent-color: var(--primary); width: 100%; }

/* ---------- cards, badges, tables ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; } .card-head h2, .card-head h3 { margin: 0; }
.card.flat { box-shadow: none; } .card.pad-0 { padding: 0; overflow: hidden; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge-primary { background: var(--primary-soft); color: var(--primary); } .badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); } .badge-warning { background: var(--warning-soft); color: var(--warning); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .65rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .7rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; } .table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.thumb-sm { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-3); display: block; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tab { padding: .6rem .9rem; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); } .tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .25s ease; width: 0; }
.progress.warn > span { background: var(--warning); } .progress.bad > span { background: var(--danger); } .progress.good > span { background: var(--success); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); } .empty .icon { width: 44px; height: 44px; stroke-width: 1.4; margin-bottom: .5rem; opacity: .7; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.kbd { font-family: var(--mono); font-size: .8rem; background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: .05rem .4rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: .35rem; margin-top: 1.25rem; flex-wrap: wrap; }
.pager .btn { min-width: 38px; } .pager .btn.is-active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); padding: 1.1rem .9rem; display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.12rem; color: var(--text) !important; text-decoration: none !important; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); display: grid; place-items: center; color: var(--on-primary); box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 40%, transparent); }
.nav { display: flex; flex-direction: column; gap: .2rem; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 10px; color: var(--muted); font-weight: 600; text-decoration: none !important; transition: .15s; }
.nav a:hover { background: var(--surface-2); color: var(--text); } .nav a.is-active { background: var(--primary-soft); color: var(--primary); }
.nav-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .8rem .75rem .25rem; font-weight: 700; }
.sidebar-foot { margin-top: auto; }
.usage-mini { background: var(--surface-2); border-radius: 12px; padding: .8rem; font-size: .82rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .75rem 1.5rem; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.menu-btn { display: none; }
.content { padding: 1.6rem; width: 100%; max-width: 1240px; margin: 0 auto; animation: fade-up .3s ease both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; } .page-head h1 { margin: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; flex: none; }
.menu { position: relative; } .menu-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: .35rem; z-index: 40; }
.menu-list a, .menu-list button { display: flex; width: 100%; gap: .6rem; align-items: center; padding: .55rem .7rem; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none !important; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }
.banner { display: flex; gap: .75rem; align-items: center; padding: .75rem 1.5rem; background: var(--warning-soft); color: var(--warning); font-size: .9rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }

/* ---------- grids ---------- */
.grid { display: grid; gap: 1rem; } .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { display: flex; flex-direction: column; gap: .35rem; } .stat .k { color: var(--muted); font-size: .82rem; font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.stat .v { font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; } .stat .s { color: var(--muted); font-size: .8rem; }
.chart { width: 100%; height: 220px; display: block; } .chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: var(--border); stroke-width: 1; } .chart .area { fill: color-mix(in srgb, var(--primary) 16%, transparent); } .chart .line { fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linejoin: round; }
.chart .dot { fill: var(--primary); } .chart-tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); padding: .3rem .55rem; border-radius: 8px; font-size: .78rem; white-space: nowrap; transform: translate(-50%, -120%); z-index: 5; }

/* ---------- image grid ---------- */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: .8rem; }
.img-card { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); aspect-ratio: 1; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.img-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.img-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-card .meta { position: absolute; inset: auto 0 0 0; padding: .4rem .55rem; color: #fff; font-size: .75rem; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); display: flex; justify-content: space-between; gap: .4rem; opacity: 0; transition: .15s; }
.img-card:hover .meta, .img-card.is-selected .meta { opacity: 1; }
.img-card .pick { position: absolute; top: .45rem; left: .45rem; width: 22px; height: 22px; accent-color: var(--primary); opacity: 0; transition: .15s; cursor: pointer; }
.img-card:hover .pick, .img-card.is-selected .pick, .selecting .img-card .pick { opacity: 1; }
.img-card.is-selected { outline: 3px solid var(--primary); outline-offset: -3px; }
.img-card .tags { position: absolute; top: .45rem; right: .45rem; display: flex; gap: .25rem; }
.img-card .quick { position: absolute; top: .4rem; right: .4rem; opacity: 0; transition: .15s; } .img-card:hover .quick { opacity: 1; }
.folders-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--text); font-family: inherit; }
.chip:hover { background: var(--surface-2); } .chip.is-active { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.bulkbar { position: sticky; bottom: 1rem; display: flex; gap: .6rem; align-items: center; background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: 14px; box-shadow: var(--shadow-lg); margin-top: 1rem; z-index: 15; flex-wrap: wrap; }
.bulkbar .btn { border-color: transparent; }

/* ---------- uploader ---------- */
.dropzone { border: 2px dashed var(--border); border-radius: 18px; padding: 2.5rem 1rem; text-align: center; background: var(--surface); transition: .2s; cursor: pointer; }
.dropzone:hover, .dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); transform: scale(1.003); }
.dropzone .icon-xl { color: var(--primary); } .dropzone h2 { margin: .6rem 0 .25rem; }
.queue { display: flex; flex-direction: column; gap: .6rem; }
.q-item { display: grid; grid-template-columns: 52px 1fr auto; gap: .8rem; align-items: center; padding: .7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); animation: fade-up .2s ease both; }
.q-item .thumb-sm { width: 52px; height: 52px; display: grid; place-items: center; color: var(--muted); }
.q-item .q-meta { display: flex; justify-content: space-between; gap: .6rem; font-size: .78rem; color: var(--muted); margin-top: .35rem; flex-wrap: wrap; }
.q-item.is-done { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); } .q-item.is-error { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.q-item .err { color: var(--danger); font-size: .82rem; margin-top: .25rem; }
.link-row { display: flex; gap: .4rem; align-items: center; margin-top: .45rem; } .link-row .input { padding: .35rem .55rem; font-family: var(--mono); font-size: .78rem; }
.overall { position: sticky; top: 64px; z-index: 10; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }

/* ---------- modal / toast / drawer ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(8, 10, 20, .55); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 1rem; animation: fade-in .15s ease both; overflow-y: auto; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); animation: pop .18s ease both; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; }
.modal.wide { max-width: 940px; } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); } .modal-head h3 { margin: 0; }
.modal-body { padding: 1.25rem; overflow-y: auto; } .modal-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .6rem; flex-wrap: wrap; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 200; max-width: min(380px, calc(100vw - 2rem)); }
.toast { display: flex; gap: .6rem; align-items: flex-start; background: var(--text); color: var(--bg); padding: .75rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); animation: toast-in .2s ease both; font-size: .9rem; }
.toast.success .icon { color: var(--success); } .toast.error .icon { color: var(--danger); } @keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem; }
.preview { background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface-3) 0 50%) 0 0 / 18px 18px; border-radius: 12px; display: grid; place-items: center; min-height: 240px; overflow: hidden; }
.preview img { max-height: 420px; width: auto; object-fit: contain; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; font-size: .88rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-all; }
.secret-box { font-family: var(--mono); background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: .8rem; word-break: break-all; font-size: .9rem; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; font-family: var(--mono); font-size: .95rem; }
.qr { background: #fff; padding: 8px; border-radius: 12px; display: inline-block; } .qr img { display: block; width: 200px; height: 200px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .5rem; }
.perm-grid .check { padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 10px; }

/* ---------- auth + public pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(135deg, #3c3cc8, #7b5cf0 60%, #b06cf5); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::before, .auth-side::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.auth-side::before { width: 420px; height: 420px; right: -140px; top: -120px; } .auth-side::after { width: 300px; height: 300px; left: -100px; bottom: -80px; }
.auth-side .brand { color: #fff !important; } .auth-side .brand-mark { background: rgba(255, 255, 255, .2); }
.auth-side ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; position: relative; z-index: 1; } .auth-side li { display: flex; gap: .6rem; align-items: center; }
.auth-main { display: grid; place-items: center; padding: 2rem 1.25rem; position: relative; } .auth-card { width: 100%; max-width: 410px; animation: fade-up .3s ease both; }
.auth-theme { position: absolute; top: 1rem; right: 1rem; }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; max-width: 1180px; margin: 0 auto; }
.site-nav .links { display: flex; gap: 1.4rem; align-items: center; } .site-nav .links a { color: var(--muted); font-weight: 600; } .site-nav .links a:hover { color: var(--text); text-decoration: none; }
.hero { text-align: center; padding: 4.5rem 1.25rem 3rem; max-width: 860px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); letter-spacing: -.035em; } .hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--primary), #c06cf5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin: 0 auto 1.6rem; }
.hero-art { max-width: 920px; margin: 1rem auto 0; padding: 0 1.25rem; }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 1.1rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.mock span { aspect-ratio: 1; border-radius: 12px; background: linear-gradient(135deg, var(--primary-soft), var(--surface-3)); animation: float 5s ease-in-out infinite; } .mock span:nth-child(2n) { animation-delay: -1.5s; } .mock span:nth-child(3n) { animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-6px); } }
.section { max-width: 1180px; margin: 0 auto; padding: 3.5rem 1.5rem; } .section-title { text-align: center; max-width: 640px; margin: 0 auto 2.2rem; } .section-title p { color: var(--muted); }
.feature { display: flex; flex-direction: column; gap: .5rem; } .feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.plan { display: flex; flex-direction: column; gap: .8rem; position: relative; } .plan.featured { border-color: var(--primary); box-shadow: 0 10px 40px color-mix(in srgb, var(--primary) 22%, transparent); }
.plan .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; } .plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font-size: .92rem; } .plan li { display: flex; gap: .5rem; } .plan li .icon { color: var(--success); margin-top: 2px; }
.faq details { border-bottom: 1px solid var(--border); padding: 1rem 0; } .faq summary { font-weight: 700; cursor: pointer; } .faq p { color: var(--muted); margin: .6rem 0 0; }
.site-foot { border-top: 1px solid var(--border); padding: 2rem 1.5rem; text-align: center; color: var(--muted); font-size: .9rem; }
.pub-wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .detail { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: none; } .menu-btn { display: inline-flex; } .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 55; }
  .content { padding: 1.1rem; } .topbar { padding: .65rem 1rem; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; }
  .site-nav .links .hide-sm { display: none; }
}
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .q-item { grid-template-columns: 44px 1fr; } .q-item > :last-child { grid-column: 1 / -1; } .mock { grid-template-columns: repeat(2, 1fr); } .img-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .sidebar, .topbar, .toasts { display: none !important; } }
