/* CreatorHub — stylesheet */
:root {
    --bg: #0f1014;
    --bg-2: #15171d;
    --surface: #1b1e26;
    --surface-2: #232733;
    --line: #2c3140;
    --text: #eceef3;
    --text-2: #a8afc0;
    --muted: #7d8497;
    --accent: #ff5b3a;
    --accent-2: #ffb547;
    --accent-ink: #1a0b06;
    --ok: #3ccf8e;
    --warn: #f5b942;
    --bad: #ff5c6c;
    --info: #5aa9ff;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --serif: 'Source Serif 4', Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.page { padding-top: 26px; padding-bottom: 60px; }
.hide { display: none !important; }

/* ---------- top bar */
.topbar { background: rgba(15,16,20,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); font-size: 1.1rem; }
.search { flex: 1; max-width: 520px; }
.search input { width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 10px 18px; font: inherit; font-size: .95rem; }
.search input:focus { outline: none; border-color: var(--accent); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); font-size: 1rem; }
.icon-btn:hover { text-decoration: none; background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: -3px; right: -3px; background: var(--accent); color: #fff; font-size: .65rem; font-weight: 700; border-radius: 999px; padding: 1px 5px; }
.mainnav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { color: var(--text-2); padding: 6px 12px; border-radius: 999px; font-weight: 500; font-size: .93rem; white-space: nowrap; }
.mainnav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.mainnav a.on { color: var(--accent-ink); background: var(--accent-2); }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu .menu { position: absolute; right: 0; top: 46px; width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 60; }
.usermenu .menu a { display: block; padding: 8px 12px; color: var(--text); border-radius: 8px; font-size: .93rem; }
.usermenu .menu a:hover { background: var(--surface-2); text-decoration: none; }
.usermenu .menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.usermenu .menu-head span { display: block; color: var(--muted); font-size: .82rem; }
.usermenu .menu-admin { color: var(--accent-2) !important; font-weight: 600; }
.statusbar { background: linear-gradient(90deg, #3a1f12, #2b1a0b); border-bottom: 1px solid #5a3214; color: #ffd9b8; font-size: .93rem; padding: 10px 0; }
.statusbar a { color: var(--accent-2); font-weight: 600; }

/* ---------- avatar */
.avatar { border-radius: 50%; object-fit: cover; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.avatar-txt { display: inline-grid; place-items: center; color: #fff; font-weight: 700; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none !important; color: var(--text); background: var(--surface-2); transition: transform .08s, background .15s; white-space: nowrap; }
.btn:hover { background: #2c3141; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #ff7556; }
.btn-gold { background: var(--accent-2); color: var(--accent-ink); }
.btn-gold:hover { background: #ffc46a; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: #3b1a20; color: #ffb3bb; border-color: #5a2630; }
.btn-danger:hover { background: #4a2028; }
.btn-ok { background: #173728; color: #9ff0c8; border-color: #23533c; }
.btn-ok:hover { background: #1d4532; }
.btn-sm { padding: 6px 13px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- alerts + badges */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; font-size: .95rem; }
.alert-success, .alert-ok { background: #12301f; border-color: #1f5236; color: #a6f2c9; }
.alert-error, .alert-bad { background: #36161b; border-color: #5c242c; color: #ffb9c1; }
.alert-warn { background: #35280f; border-color: #5e4615; color: #ffdd9a; }
.alert-info { background: #13253a; border-color: #1f3f63; color: #b4d6ff; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.badge-ok { background: #143a27; color: #7ee8b3; }
.badge-warn { background: #3d2e10; color: #ffd27a; }
.badge-bad { background: #3f1a20; color: #ff9aa6; }
.badge-info { background: #15304d; color: #9fcbff; }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: .8rem; font-weight: 500; }

/* ---------- cards + grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 18px; }
.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)); }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cards-wide { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.section { margin-top: 38px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }

/* media card */
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; color: var(--text); }
.mcard:hover { transform: translateY(-3px); border-color: #3b4152; text-decoration: none; }
.mcard-art { aspect-ratio: 1 / 1; background: linear-gradient(135deg, #2a2f3d, #1a1d25); position: relative; display: grid; place-items: center; overflow: hidden; }
.cards-wide .mcard-art.wide { aspect-ratio: 16 / 9; }
.mcard-art img { width: 100%; height: 100%; object-fit: cover; }
.mcard-art .glyph { font-size: 3rem; color: rgba(255,255,255,.18); }
.mcard-art .type { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.mcard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mcard-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard-by { color: var(--text-2); font-size: .86rem; }
.mcard-meta { color: var(--muted); font-size: .8rem; margin-top: auto; padding-top: 6px; display: flex; gap: 10px; }
.art-audio { background: linear-gradient(135deg, #5b2a86, #ff5b3a); }
.art-video { background: linear-gradient(135deg, #0f4c75, #3282b8); }
.art-writing { background: linear-gradient(135deg, #3d3524, #a87b2a); }
.art-document { background: linear-gradient(135deg, #24443a, #3ccf8e); }
.art-image { background: linear-gradient(135deg, #4a2340, #c94b7c); }
.art-archive, .art-link { background: linear-gradient(135deg, #2b2f3a, #596173); }

/* creator card */
.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: center; color: var(--text); }
.ccard:hover { border-color: #3b4152; text-decoration: none; }
.ccard .who strong { display: block; }
.ccard .who span { color: var(--muted); font-size: .86rem; }

/* ---------- hero */
.hero { position: relative; border-radius: 22px; overflow: hidden; padding: 56px 44px; background:
    radial-gradient(900px 400px at 85% -10%, rgba(255,91,58,.45), transparent 60%),
    radial-gradient(700px 380px at 0% 120%, rgba(255,181,71,.25), transparent 60%),
    linear-gradient(135deg, #1b1d27, #12131a); border: 1px solid var(--line); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 720px; letter-spacing: -.03em; }
.hero p { color: var(--text-2); font-size: 1.12rem; max-width: 600px; }
.hero .btn-row { margin-top: 24px; }
.hero-stats { display: flex; gap: 34px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.6rem; }
.hero-stats div span { color: var(--muted); font-size: .88rem; }

/* ---------- forms */
.form { display: grid; gap: 16px; }
.field label, .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--text-2); }
.field .hint { color: var(--muted); font-size: .82rem; margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=date], input[type=search], select, textarea {
    width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: var(--radius-sm); padding: 11px 13px; font: inherit; font-size: .97rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,91,58,.15); }
textarea { min-height: 110px; resize: vertical; }
input[type=file] { width: 100%; color: var(--text-2); font: inherit; font-size: .92rem; background: var(--bg-2); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 14px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 17px; height: 17px; vertical-align: middle; }
.check { display: flex; align-items: center; gap: 9px; font-size: .95rem; cursor: pointer; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.auth-box { max-width: 480px; margin: 20px auto; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-2); cursor: pointer; font-weight: 600; }
.choice span small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.choice input:checked + span { border-color: var(--accent); background: #2a1913; box-shadow: 0 0 0 3px rgba(255,91,58,.15); }
.choice input:focus-visible + span { outline: 2px solid var(--accent-2); }

/* ---------- tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td .btn-row { flex-wrap: nowrap; }

/* ---------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat span { color: var(--muted); font-size: .84rem; }
.stat strong { display: block; font-size: 1.65rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat.hl { border-color: #5a3214; background: linear-gradient(135deg, #2a1913, var(--surface)); }

/* ---------- media page */
.player-box { background: #000; border-radius: var(--radius); overflow: hidden; }
.player-box video { width: 100%; display: block; max-height: 72vh; background: #000; }
.audio-hero { display: flex; gap: 22px; align-items: center; padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, #2c1838, #1b1e26); border: 1px solid var(--line); }
.audio-hero .art { width: 180px; height: 180px; border-radius: 12px; flex-shrink: 0; overflow: hidden; display: grid; place-items: center; font-size: 4rem; color: rgba(255,255,255,.3); }
.audio-hero .art img { width: 100%; height: 100%; object-fit: cover; }
.audio-hero audio { width: 100%; margin-top: 14px; }
.doc-frame { width: 100%; height: 78vh; border: 0; border-radius: var(--radius); background: #fff; }
.writing { font-family: var(--serif); font-size: 1.15rem; line-height: 1.8; color: #e4e6ec; }
.writing h2, .writing h3 { font-family: var(--font); }
.writing blockquote { border-left: 3px solid var(--accent); margin: 1em 0; padding: 4px 18px; color: var(--text-2); font-style: italic; }
.writing img { border-radius: 10px; }
.writing a { text-decoration: underline; }
.media-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.liked { background: #3b1a20 !important; color: #ff9aa6 !important; border-color: #5a2630 !important; }
.byline { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 14px 0; }
.byline .who { flex: 1; }
.byline .who strong { display: block; }
.byline .who span { color: var(--muted); font-size: .86rem; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .c-body { flex: 1; }
.comment .c-meta { font-size: .84rem; color: var(--muted); }
.comment .c-meta strong { color: var(--text); margin-right: 6px; }

/* ---------- profile */
.profile-cover { height: 220px; border-radius: 20px; background: linear-gradient(135deg, #3a1d5c, #ff5b3a 70%, #ffb547); background-size: cover; background-position: center; border: 1px solid var(--line); }
.profile-head { display: flex; gap: 20px; align-items: flex-start; margin: 0 24px; position: relative; flex-wrap: wrap; }
.profile-head > .avatar { margin-top: -64px; }
.profile-head .info, .profile-head .btn-row { padding-top: 14px; }
.profile-head .avatar { border: 4px solid var(--bg); }
.profile-head .info { flex: 1; min-width: 220px; }
.profile-head h1 { margin: 0; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.socials a { padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 500; }
.socials a:hover { background: var(--accent); color: #fff; text-decoration: none; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 26px 0 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--text); border-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--text); }

/* ---------- news */
.ncard { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.ncard:hover { text-decoration: none; }
.ncard:hover h3 { color: var(--accent-2); }
.ncard .thumb { aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #2b2f3a, #44324a); }
.ncard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ncard p { color: var(--text-2); margin: 6px 0 0; font-size: .95rem; }
.kicker { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.announce { background: linear-gradient(90deg, #2a1913, var(--surface)); border: 1px solid #5a3214; border-radius: var(--radius); padding: 14px 18px; display: flex; gap: 12px; align-items: center; margin-bottom: 18px; color: var(--text); }
.announce:hover { text-decoration: none; border-color: var(--accent); }
.article-cover { width: 100%; border-radius: var(--radius); margin: 10px 0 20px; max-height: 480px; object-fit: cover; }

/* ---------- shop */
.price { font-weight: 700; color: var(--accent-2); font-size: 1.05rem; }
.item-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.item-hero .pic { border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 1/1; display: grid; place-items: center; font-size: 4rem; color: var(--muted); }
.item-hero .pic img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- ads */
.ad { display: flex; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--text); margin: 0 0 20px; }
.ad:hover { text-decoration: none; border-color: var(--accent-2); }
.ad img { width: 100%; display: block; object-fit: cover; }
.ad-tag { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: .68rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.ad-text { display: flex; flex-direction: column; padding: 12px 16px; gap: 2px; }
.ad-text span { color: var(--text-2); font-size: .9rem; }
.ad-home_banner, .ad-media_page, .ad-news_page { flex-direction: row; align-items: stretch; }
.ad-home_banner img, .ad-media_page img, .ad-news_page img { width: 46%; max-height: 220px; }
.ad-home_banner .ad-text, .ad-media_page .ad-text, .ad-news_page .ad-text { justify-content: center; padding: 18px 24px; }
.ad-home_banner .ad-text strong { font-size: 1.3rem; }
.ad-sidebar { flex-direction: column; }
.ad-adsense { display: block; background: transparent; border: 0; }

/* ---------- misc */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; text-align: center; padding: 7px 10px; border-radius: 9px; background: var(--surface); color: var(--text-2); }
.pager .on { background: var(--accent); color: #fff; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty strong { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.filters a { padding: 6px 14px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: .9rem; font-weight: 500; border: 1px solid var(--line); }
.filters a.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.filters a:hover { text-decoration: none; border-color: var(--text-2); }
.filters select { width: auto; padding: 6px 12px; border-radius: 999px; font-size: .9rem; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; counter-reset: s; }
.steps div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; counter-increment: s; position: relative; }
.steps div::before { content: counter(s); position: absolute; top: 14px; right: 16px; font-weight: 800; font-size: 1.6rem; color: var(--surface-2); }
.steps div.done { border-color: #23533c; }
.steps div.now { border-color: var(--accent); }
.copybox { display: flex; gap: 8px; }
.copybox input { flex: 1; }
.notice-list a { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.notice-list a.unread { background: #1f1a17; }
.notice-list a:hover { background: var(--surface-2); text-decoration: none; }
.notice-list time { display: block; color: var(--muted); font-size: .8rem; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 10px; }
.bars div { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars div:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #000; color: #fff; font-size: .75rem; padding: 3px 7px; border-radius: 6px; white-space: nowrap; margin-bottom: 4px; }
.bars-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; margin-top: 6px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 20px; border-radius: 999px; font-weight: 600; z-index: 100; box-shadow: var(--shadow); }

/* ---------- editor (Quill) dark tweaks */
.editor-wrap { background: #fff; border-radius: var(--radius-sm); color: #111; }
.editor-wrap .ql-toolbar { border-radius: var(--radius-sm) var(--radius-sm) 0 0; border-color: #ddd !important; }
.editor-wrap .ql-container { min-height: 320px; font-family: var(--serif); font-size: 1.08rem; border-color: #ddd !important; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* ---------- admin layout */
.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; align-items: start; }
.admin-nav { position: sticky; top: 130px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.admin-nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: .94rem; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.admin-nav a.on { background: var(--accent); color: #fff; }
.admin-nav .count { background: var(--accent-2); color: var(--accent-ink); font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.admin-nav .sep { height: 1px; background: var(--line); margin: 8px 4px; }

/* ---------- footer */
.sitefoot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 34px 0 20px; margin-top: 40px; }
.foot-in { display: flex; gap: 30px; justify-content: space-between; flex-wrap: wrap; }
.foot-in p { max-width: 380px; margin-top: 10px; font-size: .92rem; }
.foot-links { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 36px; }
.foot-links a { color: var(--text-2); font-size: .93rem; }
.foot-base { margin-top: 24px; font-size: .84rem; }

/* ---------- responsive */
@media (max-width: 980px) {
    .layout-side, .admin-shell, .item-hero { grid-template-columns: minmax(0, 1fr); }
    .admin-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
    .admin-nav .sep { display: none; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .wrap { padding: 0 16px; }
    .topbar-in { gap: 10px; }
    .search { display: none; }
    .hide-sm { display: none !important; }
    .hero { padding: 34px 22px; }
    .row-2, .row-3, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .cards-wide { grid-template-columns: 1fr; }
    .ncard { grid-template-columns: 110px 1fr; gap: 12px; }
    .audio-hero { flex-direction: column; align-items: stretch; }
    .audio-hero .art { width: 100%; height: auto; aspect-ratio: 1/1; }
    .ad-home_banner, .ad-media_page, .ad-news_page { flex-direction: column; }
    .ad-home_banner img, .ad-media_page img, .ad-news_page img { width: 100%; }
    .profile-head { margin: 0 8px; }
    .kv { grid-template-columns: 1fr; gap: 2px; }
    .kv dd { margin-bottom: 8px; }
    .mobile-search { display: block !important; margin-bottom: 18px; }
}
.mobile-search { display: none; }

/* Quill 2 list markup when displayed outside the editor */
.writing ol, .writing ul { padding-left: 1.5em; }
.writing li[data-list="bullet"] { list-style-type: disc; }
.writing li[data-list="ordered"] { list-style-type: decimal; }
.writing .ql-code-block-container, .writing pre { background: var(--bg-2); padding: 12px 16px; border-radius: 10px; font-family: monospace; font-size: .9rem; overflow-x: auto; }
.writing .ql-align-center { text-align: center; }
.writing .ql-align-right { text-align: right; }
.grid > .card + .card { margin-top: 0; }
