:root {
    --bg: #fbfcfa;
    --bg-alt: #f1f4f1;
    --surface: #fff;
    --border: #d8dedb;
    --border-light: #e7ebe8;
    --accent: #126b5b;
    --accent-hover: #0a5548;
    --accent-light: #e1f0eb;
    --accent-muted: #79a99d;
    --accent-glow: rgba(18, 107, 91, .14);
    --signal: #bc465a;
    --text: #1d2522;
    --text-secondary: #46514d;
    --text-muted: #65706c;
    --text-dim: #727d79;
    --shadow-sm: 0 1px 2px rgba(29, 37, 34, .07);
    --shadow-md: 0 8px 24px rgba(29, 37, 34, .1);
    --font-body: "Manrope", sans-serif;
    --font-display: "Newsreader", Georgia, serif;
}

body { background: var(--bg); line-height: 1.55; }
h1, h2, h3, .forum-hero h1, .profile-title h1, .profile-display-name { font-family: var(--font-display); letter-spacing: 0; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 2rem)); max-width: none; padding: 0; }
.site-nav { background: rgba(251, 252, 250, .96); border-color: var(--border); }
.site-nav .container { max-width: none; }
.nav-inner { min-height: 68px; }
.brand { color: var(--text); font-size: 1.05rem; }
.brand img { width: 34px; height: 34px; }
.nav-links { gap: 1.45rem; font-family: var(--font-body); font-size: .88rem; }
.nav-links a { color: var(--text-secondary); }
.nav-action { border-color: var(--border); background: var(--surface); padding: .48rem .8rem; }
.mobile-nav summary { border-color: var(--border); background: var(--surface); }
.mobile-nav-links { border-radius: 8px; }
.mobile-dock { display: none; }
.page { padding: 2.4rem 0 4rem; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.6rem; }
.page-head h1 { font-size: clamp(2.35rem, 5vw, 4rem); line-height: .98; font-weight: 600; }
.page-head p { max-width: 620px; margin-top: .45rem; color: var(--text-muted); }
.eyebrow { color: var(--accent); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.section-title { font-size: 1.7rem; line-height: 1.1; }
.muted { color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.btn { border-radius: 6px; font-family: var(--font-body); font-weight: 750; }
.btn-primary { background: var(--accent); box-shadow: none; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: none; }
.btn-outline { border: 1px solid var(--border); background: var(--surface); }
.icon-button { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer; }

.explore-shell { padding: 1.25rem 0 4rem; }
.explore-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; padding: 1.3rem 0 1.1rem; }
.explore-intro h1 { font-size: clamp(2.5rem, 6vw, 4.7rem); line-height: .92; font-weight: 600; }
.explore-intro p { max-width: 580px; color: var(--text-muted); margin-top: .5rem; }
.art-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; margin-bottom: .7rem; }
.art-search-field { display: flex; align-items: center; min-height: 54px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
.art-search-field input { width: 100%; min-width: 0; padding: .9rem 1rem; border: 0; outline: 0; color: var(--text); background: transparent; }
.art-search button { min-width: 118px; }
.prompt-row, .filter-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.related-tags { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; min-height: 0; margin-top: .6rem; }
.related-tags[hidden] { display: none; }
.related-tags>span { color: var(--text-muted); font-size: .76rem; font-weight: 750; }
.prompt-chip, .filter-pill, .tag-link, .segmented a, .segmented button { border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-secondary); padding: .34rem .7rem; font-size: .77rem; font-weight: 700; cursor: pointer; }
.prompt-chip:hover, .filter-pill:hover, .tag-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.discovery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 0 .85rem; border-bottom: 1px solid var(--border); }
.result-status { min-height: 1.4rem; color: var(--text-muted); font-size: .84rem; }
.view-actions { display: flex; gap: .45rem; }
.filter-panel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; padding: .9rem; margin: .8rem 0; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; }
.filter-panel[hidden] { display: none; }
.field { display: grid; gap: .3rem; }
.field label { font-size: .72rem; color: var(--text-muted); font-weight: 800; }
.field input, .field select, .forum-form input, .forum-form textarea, .auth-card input[type=email], .auth-card input[type=password] { width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: .62rem .7rem; background: var(--surface); color: var(--text); }
.art-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.15rem .8rem; padding-top: 1rem; }
.art-card { min-width: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.art-card:hover { box-shadow: none; }
.art-thumb-link { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 6px; background: var(--bg-alt); }
.art-card img { display: block; width: 100%; height: auto; min-height: 150px; max-height: 320px; aspect-ratio: var(--ratio, 1); object-fit: cover; transition: transform .18s ease; }
.art-thumb-link:hover img { transform: scale(1.015); }
.art-card-info { padding-top: .55rem; }
.art-card-title { color: var(--text); font-size: .84rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-card-byline { display: flex; justify-content: space-between; gap: .5rem; margin-top: .18rem; color: var(--text-muted); font-size: .72rem; }
.art-card-byline a { color: inherit; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-card-byline a:hover { color: var(--accent); }
.art-empty { grid-column: 1/-1; padding: 4rem 1rem; text-align: center; color: var(--text-muted); }
.art-empty strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.5rem; margin-bottom: .3rem; }
.skeleton { aspect-ratio: .82; border-radius: 6px; background: linear-gradient(90deg, #edf0ed 25%, #f7f8f6 50%, #edf0ed 75%); background-size: 200% 100%; animation: skeleton 1.2s infinite linear; }
@keyframes skeleton { to { background-position: -200% 0; } }

.art-detail { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 2.25rem; align-items: start; }
.art-detail-media { display: grid; place-items: center; min-height: 58vh; background: #eef1ee; }
.art-detail-media img { display: block; max-width: 100%; max-height: 76vh; width: auto; height: auto; }
.art-detail-panel { position: sticky; top: 92px; }
.art-detail-panel h1 { font-size: 2rem; line-height: 1.08; margin: .65rem 0 .45rem; }
.artist-link { color: var(--text); font-weight: 800; }
.detail-meta { color: var(--text-muted); font-size: .84rem; margin: .3rem 0 1.2rem; }
.detail-description { color: var(--text-secondary); font-size: .9rem; white-space: pre-line; margin: 1.2rem 0; }
.palette { display: flex; gap: .35rem; margin: 1rem 0; }
.swatch { width: 30px; height: 30px; border: 1px solid rgba(0,0,0,.1); border-radius: 4px; }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-top: 1.2rem; }
.detail-actions .btn { width: 100%; }
.related-section { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }

.artist-search { max-width: 760px; }
.artist-results { display: grid; gap: .6rem; margin-top: 1rem; }
.artist-result { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); color: var(--text); }
.artist-result:hover { color: var(--accent); text-decoration: none; }
.artist-result strong { display: block; }
.artist-result span { color: var(--text-muted); font-size: .8rem; }
.artist-profile-head { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.artist-profile-head h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: .9; overflow-wrap: anywhere; }
.platform-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

.segmented { display: flex; flex-wrap: wrap; gap: .4rem; }
.segmented a.active, .segmented button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.hot-page { padding: 2.4rem 0 4rem; }
.hot-head h1 { font-family: var(--font-display); letter-spacing: 0; font-weight: 600; }
.hot-tabs a { border-radius: 999px; background: var(--surface); border-color: var(--border); }
.hot-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.15rem .8rem; }
.hot-card { width: auto; height: auto; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.hot-thumb-link { flex: none; border-radius: 6px; aspect-ratio: var(--ratio, 1); }
.hot-meta { height: auto; min-height: 116px; padding: .55rem 0 0; }
.hot-rank { border-radius: 4px; }
.hot-dev { display: none; }

.taste { padding: 2.4rem 0 4rem; max-width: none; }
.taste h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 600; }
.taste-sub { max-width: 640px; }
.taste-search { max-width: 760px; }
.taste-tray { border-radius: 6px; background: var(--surface); border-color: var(--border); }
.taste-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.taste-card { border-radius: 6px; }
.taste-card img { aspect-ratio: .9; }
.taste-results h2 { font-family: var(--font-display); font-size: 1.8rem; }
.taste-coherence, .taste-artist-card { border-radius: 6px; border-color: var(--border); box-shadow: none; }
.taste-coherence-fill { background: var(--accent); }
.api-ref { display: none; }

.forum-page { padding: 2.4rem 0 4rem; }
.forum-shell { border: 0; background: transparent; box-shadow: none; }
.forum-hero { display: grid; grid-template-columns: 1fr minmax(280px, .7fr) auto; gap: 1rem; align-items: end; min-height: 0; padding: 0 0 1.5rem; border: 0; border-bottom: 1px solid var(--border); background: transparent; }
.forum-hero h1 { color: var(--text); font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 600; }
.forum-hero p { color: var(--text-muted); }
.forum-hero-search input { background: var(--surface); color: var(--text); border-color: var(--border); }
.forum-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 2rem; padding: 1.2rem 0 0; background: transparent; }
.forum-layout-wide { grid-template-columns: 1fr; }
.forum-main, .forum-sidebar { color: var(--text); }
.forum-composer, .thread-title, .forum-post, .forum-sidebar section, .forum-login { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); box-shadow: none; }
.thread-toolbar { color: var(--text-muted); }
.thread-sort-tabs a { border-color: var(--border); color: var(--text-secondary); background: var(--surface); }
.thread-sort-tabs a.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.thread-row { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--text); }
.thread-row:hover { background: var(--bg-alt); border-color: var(--border); }
.thread-row-main small, .thread-row-main>span, .forum-post time, .thread-title p { color: var(--text-muted); }
.thread-activity-dot { background: var(--accent-light); border-color: var(--border); box-shadow: none; }
.thread-activity-dot::after { background: var(--accent); }
.forum-sidebar h3, .thread-title h2, .forum-post-content header, .forum-post-content header a, .forum-link-list a { color: var(--text); }
.forum-sidebar dt, .forum-link-list em { color: var(--text-muted); }
.forum-sidebar dd { color: var(--text); }
.forum-cosmetic-callout { display: none; }
body:has(.forum-shell) { background: var(--bg); }
body:has(.forum-shell) .site-nav { background: rgba(251, 252, 250, .96); border-bottom-color: var(--border); }
body:has(.forum-shell) .brand, body:has(.forum-shell) .nav-links a { color: var(--text-secondary); }
body:has(.forum-shell) .brand { color: var(--text); }
body:has(.forum-shell) .nav-links a[href="/forum"] { color: var(--accent); }
body:has(.forum-shell) .nav-action { color: var(--text); background: var(--surface); border-color: var(--border); }
body:has(.forum-shell) footer { background: var(--bg-alt); border-top-color: var(--border); }
body:has(.forum-shell) .footer-links a, body:has(.forum-shell) .footer-copy { color: var(--text-muted); }
.forum-form label, .forum-sidebar h3, .thread-row strong, .forum-shell .forum-author-name:not(.cos-name-reef):not(.cos-name-neon):not(.cos-name-sunset), .forum-shell .post-body { color: var(--text); }
.forum-form input, .forum-form textarea { color: var(--text); background: var(--surface); border-color: var(--border); }
.forum-form input::placeholder, .forum-form textarea::placeholder { color: var(--text-dim); }
.forum-form input:focus, .forum-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.forum-composer .btn-primary { background: var(--accent); box-shadow: none; }
.thread-row, .thread-row.is-fresh, .thread-row.is-busy { border-color: var(--border); background: transparent; box-shadow: none; }
.thread-row:hover { color: var(--text); border-color: var(--border); background: var(--bg-alt); }
.thread-row em { color: var(--text-muted); border-color: var(--border); background: var(--surface); }
.thread-title { background: var(--surface); border-color: var(--border); }
.forum-thread-icon { background: var(--accent-light); border-color: var(--border); box-shadow: none; }
.forum-thread-icon span { background: var(--accent); box-shadow: none; }
.forum-avatar { background: var(--accent-light); box-shadow: none; }
.forum-avatar img { background: var(--surface); }
.forum-shell .post-body a, .forum-post header a { color: var(--accent); }
.forum-login, .empty-forum { color: var(--text-muted); }

.auth-page { min-height: 65vh; align-items: start; }
.auth-card { border-radius: 8px; box-shadow: none; border-color: var(--border); }
.auth-card h1 { font-family: var(--font-display); font-size: 2rem; }
.legal, .account-page { max-width: 760px; }
.account-sections { display: grid; gap: 1rem; }
.account-section { display: grid; grid-template-columns: minmax(180px, .65fr) minmax(0, 1fr); gap: 2rem; padding: 1.4rem 0; border-top: 1px solid var(--border); }
.account-section h2 { font-size: 1.4rem; }
.account-section>div>p, .account-email, .account-appearance>p { margin-top: .25rem; color: var(--text-muted); font-size: .84rem; }
.account-form { display: grid; gap: .8rem; }
.account-form .btn { justify-self: start; }
.account-check { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: start; padding: .75rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; }
.account-check input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: .1rem; }
.account-check span { display: grid; }
.account-check small { color: var(--text-muted); margin-top: .15rem; }
.account-appearance { border-top: 1px solid var(--border); padding: 1.2rem 0; }
.account-appearance summary { cursor: pointer; font-weight: 800; }
.appearance-list { margin-top: 1rem; }
.appearance-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--border-light); }
.appearance-row span { display: grid; }
.appearance-row small { color: var(--text-muted); }
.account-links { display: flex; flex-wrap: wrap; gap: 1rem; padding-top: 1rem; }
.account-links form { margin: 0; }
.account-links button { border: 0; padding: 0; background: none; color: var(--accent); cursor: pointer; }
.site-blur-nsfw:hover img, img.site-blur-nsfw:hover { filter: blur(16px) saturate(.9); transform: scale(1.04); }
footer { background: var(--bg-alt); border-color: var(--border); }
footer .container { align-items: flex-start; }
.footer-links { justify-content: flex-end; }

@media (max-width: 980px) {
    .art-grid, .hot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .taste-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .filter-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .container { width: min(100% - 1rem, 1180px); }
    .page, .hot-page, .taste, .forum-page { padding-top: 1.4rem; }
    .page-head, .explore-intro, .artist-profile-head { display: block; }
    .explore-intro { padding-top: .4rem; }
    .explore-intro h1 { font-size: 3.2rem; }
    .explore-intro p { font-size: .92rem; }
    .art-search { grid-template-columns: 1fr; }
    .art-search button { min-height: 46px; }
    .discovery-toolbar { align-items: flex-start; }
    .filter-panel { grid-template-columns: 1fr 1fr; }
    .art-grid, .hot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem .5rem; }
    .art-card img { min-height: 110px; max-height: 230px; }
    .art-detail { grid-template-columns: 1fr; gap: 1.25rem; }
    .art-detail-media { min-height: 40vh; }
    .art-detail-panel { position: static; }
    .platform-links { justify-content: flex-start; margin-top: 1rem; }
    .forum-hero { grid-template-columns: 1fr; }
    .forum-layout { grid-template-columns: 1fr; }
    .forum-sidebar { display: none; }
    .taste-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .account-section { grid-template-columns: 1fr; gap: .8rem; }
    body { padding-bottom: 58px; }
    .mobile-dock { position: fixed; inset: auto 0 0; z-index: 150; display: grid; grid-template-columns: repeat(4, 1fr); min-height: 56px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--border); background: rgba(251, 252, 250, .98); }
    .mobile-dock a { display: grid; place-items: center; color: var(--text-muted); font-size: .72rem; font-weight: 800; }
    .mobile-dock a[aria-current=page] { color: var(--accent); }
    .mobile-dock a:hover { text-decoration: none; }
}
@media (max-width: 430px) {
    .art-grid, .hot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-panel { grid-template-columns: 1fr; }
    .taste-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-actions { grid-template-columns: 1fr; }
    .art-card-title { font-size: .79rem; }
    .prompt-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; }
    .prompt-chip { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
