:root {
  color-scheme: dark;
  --bg: #090b10;
  --surface: #11151d;
  --surface-2: #171c26;
  --surface-3: #202735;
  --line: #293141;
  --text: #f4f6fa;
  --muted: #929caf;
  --muted-2: #6f788b;
  --accent: #8b5cf6;
  --accent-2: #6d4ae7;
  --accent-soft: rgba(139, 92, 246, 0.15);
  --green: #36d399;
  --red: #fb7185;
  --yellow: #fbbf24;
  --upvote: #ff6a33;
  --downvote: #7193ff;
  --unread: #4da3ff;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: radial-gradient(circle at 12% -10%, rgba(139, 92, 246, 0.2), transparent 32rem), var(--bg);
  color: var(--text);
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { display: block; max-width: 100%; }

.boot-screen { min-height: 100vh; display: grid; place-content: center; text-align: center; color: var(--muted); }
.boot-logo { font-size: 3rem; font-weight: 900; letter-spacing: -0.08em; color: var(--text); }
.onboarding-dev-user { position: fixed; top: 14px; right: 14px; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid rgba(77,163,255,.38); border-radius: 11px; background: rgba(9,11,16,.88); box-shadow: var(--shadow); color: #cde5ff; font-size: .68rem; font-weight: 800; backdrop-filter: blur(16px); }
.onboarding-dev-user select { border: 0; background: var(--surface-2); color: var(--text); font-size: .7rem; }
.onboarding-dev-user small { color: var(--green); font-size: .63rem; }
.onboarding-dev-user small[data-status="error"], .onboarding-dev-user small[data-status="offline"] { color: var(--red); }

.onboarding { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, .8fr) minmax(520px, 1.35fr); }
.onboarding-visual {
  min-height: 100vh;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  border-right: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(139, 92, 246, .18), transparent 55%), var(--surface);
}
.onboarding-visual::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -200px;
  bottom: -150px;
  border: 70px solid rgba(139, 92, 246, .11);
  border-radius: 50%;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 850; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: #fff; }
.hero-copy { position: relative; z-index: 1; max-width: 520px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: #c4b5fd; font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(54, 211, 153, .12); }
.hero-copy h1 { margin: 0; font-size: clamp(2.8rem, 5vw, 5.7rem); line-height: .98; letter-spacing: -.07em; }
.hero-copy p { margin: 24px 0 0; color: var(--muted); font-size: 1.04rem; line-height: 1.75; }
.onboarding-sample { position: relative; z-index: 1; max-width: 460px; padding: 18px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: rgba(9,11,16,.55); backdrop-filter: blur(14px); }
.sample-meta, .meta-row, .post-stats, .comment-meta, .gallery-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .76rem; }
.sample-title { margin: 12px 0 8px; font-weight: 750; line-height: 1.5; }
.sample-comments { display: flex; gap: 14px; color: var(--muted); font-size: .76rem; }
.onboarding-form { min-height: 100vh; padding: 48px clamp(26px, 6vw, 84px); display: flex; justify-content: center; overflow-y: auto; }
.setup-panel { width: min(720px, 100%); margin: auto 0; }
.step-label { margin-bottom: 10px; color: var(--accent); font-size: .76rem; font-weight: 850; letter-spacing: .08em; }
.setup-panel h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -.05em; }
.setup-panel > p { margin: 10px 0 28px; color: var(--muted); line-height: 1.65; }
.setup-section { margin-top: 28px; }
.setup-section h3 { margin: 0 0 12px; font-size: .92rem; }
.locale-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.locale-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.select-field { display: grid; gap: 8px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.select-field span { font-size: .75rem; font-weight: 800; }
.select-field select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--text); }
.timezone-readout { margin-top: 9px; color: var(--muted); font-size: .72rem; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option-card { width: 100%; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); text-align: left; cursor: pointer; transition: .16s ease; }
.option-card:hover { border-color: #475168; transform: translateY(-1px); }
.option-card.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(139,92,246,.2); }
.option-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.option-card strong { font-size: .94rem; }
.option-card p { min-height: 38px; margin: 8px 0 13px; color: var(--muted); font-size: .77rem; line-height: 1.55; }
.option-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.exact-model-picker { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.018); }
.exact-model-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.exact-model-heading strong { font-size: .88rem; }
.exact-model-heading p { margin: 5px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.selected-model-chip { max-width: 240px; padding: 6px 9px; overflow: hidden; border-radius: 999px; background: var(--accent-soft); color: #c4b5fd; text-overflow: ellipsis; white-space: nowrap; font-size: .66rem; font-weight: 800; }
.featured-model { width: 100%; margin-top: 13px; padding: 13px 14px; border: 1px solid rgba(139,92,246,.35); border-radius: 12px; background: rgba(139,92,246,.07); color: var(--text); text-align: left; cursor: pointer; }
.featured-model:hover, .featured-model.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.featured-model div { display: flex; align-items: center; gap: 8px; }
.featured-model > span, .featured-model small { display: block; margin-top: 5px; color: var(--muted); font-size: .68rem; }
.model-status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--muted-2); }
.model-status-dot.free { background: #60a5fa; }
.model-status-dot.paid { background: #f59e0b; }
.model-picker-controls { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 8px; margin-top: 13px; }
.model-picker-controls input[type="text"], .model-picker-controls input:not([type]) { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.model-filter { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: .68rem; white-space: nowrap; }
.exact-model-list { max-height: 390px; margin-top: 10px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.curated-model-groups { max-height: 560px; margin-top: 13px; padding-right: 4px; overflow-y: auto; }
.curated-model-group + .curated-model-group { margin-top: 17px; }
.curated-model-group h4 { margin: 0 0 7px; color: var(--text); font-size: .74rem; letter-spacing: .01em; }
.curated-model-group .exact-model-list { max-height: none; margin-top: 0; overflow: visible; }
.other-model-results { margin-top: 17px; }
.exact-model-row { width: 100%; display: grid; grid-template-columns: 10px minmax(0,1fr) minmax(145px,auto); align-items: center; gap: 10px; padding: 12px 13px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.exact-model-row:last-child { border-bottom: 0; }
.exact-model-row:hover, .exact-model-row.is-selected { background: var(--accent-soft); }
.exact-model-row:disabled { opacity: .48; cursor: not-allowed; }
.public-fixed-model-row { cursor: default; }
.public-fixed-model-row:hover { background: var(--accent-soft); }
.exact-model-main, .exact-model-meta { min-width: 0; }
.exact-model-main strong, .exact-model-main small, .exact-model-meta b, .exact-model-meta small { display: block; }
.exact-model-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.exact-model-main small { margin-top: 4px; overflow: hidden; color: var(--muted-2); text-overflow: ellipsis; white-space: nowrap; font-size: .62rem; }
.exact-model-meta { color: var(--muted); text-align: right; }
.exact-model-meta b { font-size: .63rem; font-weight: 750; }
.exact-model-meta small { margin-top: 4px; font-size: .59rem; }
.beta-model-picker .exact-model-list { max-height: none; }
.exact-model-row.beta-model-row { grid-template-columns: minmax(0,1fr) 12px; min-height: 52px; }
.beta-model-row .exact-model-main strong { font-size: .8rem; }
.model-health-dot { width: 10px; height: 10px; justify-self: end; border-radius: 50%; background: var(--muted-2); box-shadow: 0 0 0 3px rgba(255,255,255,.035); }
.model-health-dot.green { background: var(--green); }
.model-health-dot.yellow { background: var(--yellow); }
.model-health-dot.red { background: var(--red); }
.model-picker-empty { padding: 30px 14px; color: var(--muted); text-align: center; font-size: .72rem; }
.tag, .badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: .68rem; font-weight: 750; }
.badge.green { background: rgba(54,211,153,.13); color: var(--green); }
.badge.red { background: rgba(251,113,133,.13); color: var(--red); }
.badge.purple { background: var(--accent-soft); color: #c4b5fd; }

.primary-button, .secondary-button, .ghost-button, .icon-button, .vote-button { border: 0; cursor: pointer; }
.primary-button { min-height: 48px; padding: 0 22px; border-radius: 13px; background: var(--accent); color: #fff; font-weight: 850; box-shadow: 0 10px 30px rgba(139,92,246,.24); }
.primary-button:hover { background: var(--accent-2); }
.primary-button:disabled { opacity: .5; cursor: wait; }
.secondary-button { min-height: 42px; padding: 0 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); font-weight: 750; }
.ghost-button { min-height: 36px; padding: 0 12px; border-radius: 9px; background: transparent; color: var(--muted); }
.ghost-button:hover, .secondary-button:hover { color: var(--text); background: var(--surface-3); }
.start-button { width: 100%; margin-top: 30px; }
.setup-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 30px; }
.setup-actions .start-button { flex: 1; width: auto; margin-top: 0; }
.setup-actions .ghost-button { min-height: 48px; padding: 0 20px; border: 1px solid var(--line); background: var(--surface-2); }
.ghost-button:disabled { opacity: .45; cursor: wait; }

.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; height: 64px; display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: center; gap: 24px; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(9,11,16,.9); backdrop-filter: blur(18px); }
.topbar .brand { border: 0; background: transparent; color: var(--text); cursor: pointer; }
.global-search { position: relative; }
.global-search input { width: 100%; height: 40px; padding: 0 44px 0 40px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); }
.global-search input::placeholder { color: var(--muted-2); }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.top-settings-button { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid rgba(139,92,246,.38); background: rgba(139,92,246,.12); color: #ddd6fe; font-weight: 850; }
.top-settings-button:hover { border-color: rgba(139,92,246,.62); background: rgba(139,92,246,.2); color: #fff; }
.top-settings-icon { font-size: 1rem; line-height: 1; }
.top-settings-label { white-space: nowrap; }
.model-pill { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: .74rem; }
.actual-model-pill { max-width: 220px; min-height: 30px; padding: 0 9px; overflow: hidden; border: 1px solid rgba(139,92,246,.35); border-radius: 999px; background: rgba(139,92,246,.08); color: #c4b5fd; text-overflow: ellipsis; white-space: nowrap; font-size: .65rem; font-weight: 800; cursor: pointer; }
.actual-model-pill:hover { background: rgba(139,92,246,.16); color: #ddd6fe; }
.dev-user-switcher { height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 8px 0 10px; border: 1px solid rgba(77,163,255,.35); border-radius: 10px; background: rgba(77,163,255,.07); color: #cde5ff; font-size: .67rem; font-weight: 800; }
.dev-user-switcher select { max-width: 112px; border: 0; background: transparent; color: var(--text); font-size: .7rem; cursor: pointer; }
.dev-user-switcher option { background: var(--surface-2); color: var(--text); }
.backend-sync-pill { min-height: 30px; display: inline-flex; align-items: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .65rem; font-weight: 800; white-space: nowrap; }
.backend-sync-pill[data-status="saved"] { border-color: rgba(54,211,153,.28); color: var(--green); }
.backend-sync-pill[data-status="saving"], .backend-sync-pill[data-status="pending"] { border-color: rgba(251,191,36,.28); color: var(--yellow); }
.backend-sync-pill[data-status="error"], .backend-sync-pill[data-status="offline"] { border-color: rgba(251,113,133,.3); color: var(--red); }
.avatar { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #8b5cf6, #4f46e5); color: #fff; font-size: .72rem; font-weight: 850; }
.avatar-button { border: 0; cursor: pointer; }
.avatar.small { width: 27px; height: 27px; font-size: .62rem; }
.shell-body { width: min(1460px, 100%); margin: 0 auto; display: grid; grid-template-columns: 210px minmax(0, 790px) 270px; gap: 28px; padding: 28px 24px 80px; }
.left-nav, .right-sidebar { position: sticky; top: 92px; align-self: start; }
.nav-section + .nav-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.nav-heading, .sidebar-heading { margin: 0 0 10px; color: var(--muted-2); font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.nav-link { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.nav-link:hover, .nav-link.is-active { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { box-shadow: inset 3px 0 var(--accent); }
.nav-emoji { width: 22px; text-align: center; }
.nav-gallery-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 4px; align-items: center; }
.nav-gallery-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-empty-hint { margin: 0; padding: 4px 10px 2px; color: var(--muted-2); font-size: .65rem; line-height: 1.5; }
.bookmark-button { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted-2); cursor: pointer; }
.bookmark-button:hover { border-color: var(--line); background: var(--surface-3); color: var(--text); }
.bookmark-button.is-favorite { color: #c4b5fd; background: rgba(139,92,246,.1); }
.bookmark-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.bookmark-button.is-favorite svg { fill: currentColor; }
.main-column { min-width: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -.055em; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: .85rem; }
.feed-tabs { display: flex; gap: 6px; margin-bottom: 15px; overflow-x: auto; scrollbar-width: none; }
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tab { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: .77rem; cursor: pointer; }
.feed-tab.is-active { border-color: var(--accent); background: var(--accent-soft); color: #d8ccff; }
.feed-list { display: grid; gap: 8px; }
.ad-preview-slot { width: 100%; min-height: 88px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 18px; padding: 13px 15px; border: 1px solid rgba(148,163,184,.22); border-radius: 9px; background: linear-gradient(135deg, rgba(148,163,184,.055), rgba(139,92,246,.035)), var(--surface); color: var(--text); }
.ad-preview-label { grid-column: 1 / -1; color: var(--muted-2); font-size: .58rem; font-weight: 850; letter-spacing: .11em; }
.ad-preview-copy { min-width: 0; }
.ad-preview-copy strong { display: block; font-size: .83rem; line-height: 1.35; }
.ad-preview-copy p { margin: 4px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.48; }
.ad-preview-cta { min-height: 32px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: transparent; color: var(--muted); font-size: .67rem; font-weight: 800; pointer-events: none; }
.ad-preview-slot.format-comment { margin: 6px 0 8px 44px; width: calc(100% - 44px); min-height: 76px; background: rgba(148,163,184,.035); }
.ad-preview-slot.format-footer { margin-top: 16px; min-height: 72px; border-radius: 12px; background: rgba(148,163,184,.025); }
.ad-preview-slot.format-sidebar { min-height: 238px; display: flex; align-items: stretch; flex-direction: column; gap: 0; overflow: hidden; padding: 13px; border-radius: 14px; background: linear-gradient(155deg, rgba(54,65,86,.9), rgba(24,29,39,.98)); }
.ad-preview-slot.format-sidebar::before { content: "AD PREVIEW"; height: 104px; display: grid; place-items: center; margin: -13px -13px 13px; background: radial-gradient(circle at 72% 25%, rgba(167,139,250,.58), transparent 34%), linear-gradient(135deg, rgba(77,163,255,.3), rgba(139,92,246,.12)); color: rgba(255,255,255,.82); font-size: .65rem; font-weight: 900; letter-spacing: .18em; }
.ad-preview-slot.format-sidebar .ad-preview-label { margin-bottom: 8px; }
.ad-preview-slot.format-sidebar .ad-preview-copy strong { font-size: .85rem; }
.ad-preview-slot.format-sidebar .ad-preview-cta { width: 100%; margin-top: 13px; }
.outer-ad-rail { display: none; }
.ad-preview-toolbar { position: fixed; left: 18px; bottom: 18px; z-index: 65; display: flex; align-items: center; gap: 5px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(17,21,29,.95); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.ad-preview-toolbar > span { padding: 0 7px; color: var(--muted); font-size: .64rem; font-weight: 850; }
.ad-preview-toolbar button { min-height: 29px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-2); font-size: .62rem; font-weight: 800; cursor: pointer; }
.ad-preview-toolbar button:hover { background: var(--surface-3); color: var(--text); }
.ad-preview-toolbar button.is-active { background: var(--accent-soft); color: #d8ccff; }
.post-card { width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); transition: .14s ease; }
.post-card:hover { border-color: #485268; background: #141922; }
.post-card.is-unread { border-left: 3px solid var(--unread); background: linear-gradient(90deg, rgba(77,163,255,.08), transparent 38%), var(--surface); }
.post-card.is-unread h2 { color: #fff; font-weight: 850; }
.post-card.is-read { opacity: .7; }
.post-card.is-read:hover { opacity: .9; }
.post-card.is-read h2 { color: #c4cad6; font-weight: 650; }
.unread-dot { width: 7px; height: 7px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--unread); box-shadow: 0 0 0 4px rgba(77,163,255,.12); }
.engagement-badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; font-size: .64rem; font-weight: 850; }
.engagement-badge.tier-buried { background: rgba(111,120,139,.14); color: var(--muted); }
.engagement-badge.tier-normal { background: rgba(54,211,153,.1); color: #73e6bd; }
.engagement-badge.tier-popular { background: rgba(251,191,36,.12); color: var(--yellow); }
.engagement-badge.tier-debate { background: rgba(251,113,133,.13); color: var(--red); }
.engagement-badge.tier-viral { background: rgba(255,106,51,.16); color: #ff9b73; box-shadow: inset 0 0 0 1px rgba(255,106,51,.2); }
.post-vote-rail, .detail-vote-rail { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; background: rgba(255,255,255,.025); }
.post-vote-rail strong, .detail-vote-rail strong { font-size: .72rem; }
.rail-vote { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted-2); cursor: pointer; font-size: .92rem; font-weight: 900; }
.rail-vote.up:hover, .rail-vote.up.is-active { color: var(--upvote); background: rgba(255,106,51,.1); }
.rail-vote.down:hover, .rail-vote.down.is-active { color: var(--downvote); background: rgba(113,147,255,.1); }
.post-card-content { min-width: 0; padding: 11px 14px 9px; }
.post-main-link { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.post-meta-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--muted-2); font-size: .68rem; }
.post-meta-line strong { color: #d7dce7; font-weight: 800; }
.post-meta-line .badge { margin-left: 4px; }
.gallery-chip { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; color: #c4b5fd; font-size: .73rem; font-weight: 800; }
.gallery-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.post-card h2 { margin: 6px 0 0; font-size: 1rem; line-height: 1.42; letter-spacing: -.02em; }
.post-card p { margin: 7px 0 9px; color: var(--muted); font-size: .78rem; line-height: 1.52; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-footer-actions, .detail-footer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted-2); font-size: .69rem; font-weight: 700; }
.post-footer-actions button, .detail-footer-actions button { min-height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; font-weight: 700; }
.post-footer-actions button:hover, .detail-footer-actions button:hover { background: var(--surface-3); color: var(--text); }
.stat-highlight { color: var(--green); }
.stat-hot { color: var(--red); }

.sidebar-card { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.sidebar-card + .sidebar-card { margin-top: 14px; }
.sidebar-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sidebar-title-row strong { font-size: .87rem; }
.gallery-rank-list { display: grid; gap: 3px; }
.gallery-rank-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 2px; align-items: center; }
.gallery-rank { width: 100%; min-width: 0; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 6px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.gallery-rank:hover { background: var(--surface-2); }
.rank-bookmark { width: 32px; height: 32px; }
.rank-number { color: var(--accent); font-size: .74rem; font-weight: 900; }
.gallery-rank-name { font-size: .79rem; font-weight: 700; }
.gallery-rank-count { color: var(--muted-2); font-size: .67rem; }
.activity-card { background: linear-gradient(145deg, rgba(139,92,246,.13), transparent 70%), var(--surface); }
.activity-number { margin: 6px 0; font-size: 1.55rem; font-weight: 900; }
.activity-card p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.sidebar-link-button { width: 100%; min-height: 34px; margin-top: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: .72rem; font-weight: 750; }
.sidebar-link-button:hover { color: var(--text); background: var(--surface-3); }
.user-note-card { border-color: rgba(139,92,246,.48); background: linear-gradient(145deg, rgba(139,92,246,.17), rgba(77,163,255,.05) 72%), var(--surface); box-shadow: 0 0 0 1px rgba(139,92,246,.08), 0 12px 34px rgba(0,0,0,.16); }
.sidebar-note-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(139,92,246,.2); color: #d8c7ff; font-size: .62rem; font-weight: 850; }
.sidebar-note-description { margin: -2px 0 10px; color: var(--text); font-size: .74rem; font-weight: 700; line-height: 1.5; }
.sidebar-note-form { display: grid; gap: 8px; }
.sidebar-note-form textarea { width: 100%; min-height: 118px; resize: vertical; padding: 11px 12px; border: 1px solid rgba(139,92,246,.38); border-radius: 10px; background: rgba(8,10,18,.72); color: var(--text); font: inherit; font-size: .72rem; line-height: 1.55; outline: none; }
.sidebar-note-form textarea::placeholder { color: var(--muted-2); }
.sidebar-note-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.14); }
.sidebar-note-form small { color: var(--muted-2); font-size: .64rem; line-height: 1.45; }
.sidebar-note-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-note-footer span { color: var(--muted-2); font-size: .63rem; white-space: nowrap; }
.sidebar-note-footer .primary-button { min-height: 32px; padding: 0 11px; font-size: .68rem; }

.gallery-hero { margin-bottom: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.gallery-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.gallery-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.gallery-title-row h1 { margin: 0; }
.gallery-hero-bookmark { width: 38px; height: 38px; }
.gallery-settings-trigger { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: .68rem; font-weight: 800; }
.gallery-settings-trigger:hover { border-color: rgba(139,92,246,.5); color: var(--text); }
.gallery-settings-trigger:disabled { opacity: .5; cursor: wait; }
.gallery-settings-trigger.is-active { border-color: rgba(139,92,246,.55); background: rgba(139,92,246,.13); color: #d8c7ff; }
.gallery-settings-active { max-width: 680px; display: flex; align-items: flex-start; gap: 8px; margin: -2px 0 12px; padding: 9px 11px; border: 1px solid rgba(139,92,246,.3); border-radius: 9px; background: rgba(139,92,246,.07); color: var(--muted); font-size: .7rem; line-height: 1.55; }
.gallery-settings-active strong { flex: 0 0 auto; color: #c4b5fd; font-size: .66rem; }
.gallery-settings-active span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.gallery-actions button:disabled { opacity: .65; cursor: wait; }
.new-posts-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 10px; padding: 11px 14px; border: 1px solid rgba(77,163,255,.42); border-radius: 10px; background: rgba(77,163,255,.09); }
.new-posts-banner > div { display: flex; align-items: center; gap: 10px; font-size: .8rem; }
.new-posts-banner .secondary-button { min-height: 34px; color: #cde5ff; }
.gallery-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 2px; }
.gallery-pagination span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.gallery-pagination button:disabled { opacity: .45; cursor: default; }
.gallery-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 14px; background: var(--accent-soft); font-size: 1.35rem; }
.gallery-hero h1 { margin: 0; font-size: 1.8rem; letter-spacing: -.05em; }
.gallery-hero p { margin: 8px 0 13px; max-width: 620px; color: var(--muted); font-size: .83rem; line-height: 1.6; }
.comment-count { color: var(--accent); font-size: .69rem; }

.post-detail { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.reddit-post-detail { display: grid; grid-template-columns: 52px minmax(0, 1fr); }
.post-detail-content { min-width: 0; }
.post-detail-header { padding: 18px 20px 10px; border-bottom: 0; }
.post-detail-header h1 { margin: 8px 0 0; font-size: clamp(1.35rem, 4vw, 1.9rem); line-height: 1.35; letter-spacing: -.04em; }
.author-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.author-info { display: flex; align-items: center; gap: 10px; }
.author-name { font-size: .81rem; font-weight: 800; }
.author-sub { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.post-body { padding: 12px 20px 18px; font-size: .93rem; line-height: 1.8; white-space: pre-wrap; }
.detail-footer-actions { padding: 0 14px 10px; }
.comments-section { margin-top: 10px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.comments-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.comments-title h2 { margin: 0; font-size: 1rem; }
.loaded-comment-count { display: block; margin-top: 4px; color: var(--muted-2); font-size: .67rem; }
.generation-status { display: flex; align-items: center; gap: 9px; color: #c4b5fd; font-size: .72rem; }
.generation-error { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -2px 0 14px; padding: 12px 13px; border: 1px solid rgba(251,113,133,.35); border-radius: 10px; background: rgba(251,113,133,.08); }
.generation-error strong { color: #fecdd3; font-size: .8rem; }
.generation-error p { margin: 4px 0 0; color: var(--muted); font-size: .7rem; }
.load-more-comments { width: 100%; min-height: 42px; margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--muted); cursor: pointer; font-weight: 800; }
.load-more-comments:hover { color: var(--text); background: var(--surface-3); }
.load-more-comments:disabled { opacity: .55; cursor: wait; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(196,181,253,.25); border-top-color: #c4b5fd; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.comment-composer { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.comment-composer textarea { min-height: 40px; max-height: 130px; resize: vertical; padding: 9px 0; border: 0; background: transparent; color: var(--text); }
.comment-composer textarea:focus-visible { outline: 0; }
.comment-list { margin-top: 20px; }
.comment { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.comment:first-child { border-top: 0; }
.comment.is-reply { margin: 12px 0 0 12px; padding: 10px 0 4px 14px; border-top: 0; border-left: 2px solid #3a4252; }
.comment-author { color: var(--text); font-weight: 800; }
.comment-body { margin: 7px 0 10px; color: #d8dce6; font-size: .83rem; line-height: 1.62; white-space: pre-wrap; }
.comment-actions { display: flex; align-items: center; gap: 7px; }
.comment-actions strong { color: var(--muted); font-size: .68rem; }
.comment-action { min-width: 24px; min-height: 24px; padding: 0 5px; border: 0; border-radius: 5px; background: transparent; color: var(--muted-2); font-size: .69rem; cursor: pointer; }
.comment-action:hover { color: var(--text); }
.comment-action.vote-up:hover, .comment-action.vote-up.is-active { color: var(--upvote); background: rgba(255,106,51,.1); }
.comment-action.vote-down:hover, .comment-action.vote-down.is-active { color: var(--downvote); background: rgba(113,147,255,.1); }
.reply-to { color: #c4b5fd; font-weight: 750; }
.reply-composer { display: grid; gap: 9px; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); }
.reply-composer textarea { width: 100%; min-height: 70px; padding: 10px 11px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; background: #0d1118; color: var(--text); line-height: 1.55; }
.reply-composer-actions { display: flex; justify-content: flex-end; gap: 8px; }
.reply-composer-actions button { min-height: 34px; }

.compose-card { padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.form-field + .form-field { margin-top: 20px; }
.form-field label { display: block; margin-bottom: 9px; font-size: .77rem; font-weight: 800; }
.form-field input, .form-field textarea, .form-field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); }
.form-field input, .form-field select { height: 48px; padding: 0 14px; }
.form-field textarea { min-height: 260px; padding: 15px; resize: vertical; line-height: 1.7; }
.compose-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }

.settings-card { margin-bottom: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.settings-card h2 { margin: 0; font-size: 1rem; }
.settings-card p { color: var(--muted); }
.profile-header-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.profile-header-row strong { font-size: 1.05rem; }
.profile-header-row p { margin: 5px 0 0; font-size: .76rem; }
.profile-avatar { width: 48px; height: 48px; font-size: .86rem; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-grid .form-field + .form-field { margin-top: 0; }
.compact-field { margin: 0; }
.form-field > span, .compact-field > span { display: block; margin-bottom: 9px; font-size: .77rem; font-weight: 800; }
.field-help { display: block; margin-top: 7px; color: var(--muted-2); font-size: .67rem; line-height: 1.5; }
.settings-card .form-field textarea { min-height: 170px; }
.settings-card .summary-textarea { min-height: 110px; }
.settings-card .short-textarea { min-height: 100px; }
.toggle-field { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.toggle-field span { display: grid; gap: 4px; }
.toggle-field small { color: var(--muted); font-size: .68rem; line-height: 1.45; }
.toggle-field input { width: 18px; height: 18px; accent-color: var(--accent); }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-title-row p { margin: 5px 0 0; font-size: .73rem; }
.story-summary-card { background: linear-gradient(145deg, rgba(139,92,246,.1), transparent 68%), var(--surface); }
.story-summary-text { margin: 0; color: #d8dce6 !important; font-size: .84rem; line-height: 1.75; white-space: pre-wrap; }
.memory-usage { height: 7px; overflow: hidden; margin: -2px 0 9px; border-radius: 999px; background: var(--surface-3); }
.memory-usage span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #c4b5fd); transition: width .2s ease; }
.memory-context-note { margin: 0 0 16px; color: var(--muted-2) !important; font-size: .68rem; line-height: 1.55; }
.note-list { display: grid; gap: 8px; }
.user-note { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.note-main { min-width: 0; }
.note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted-2); font-size: .65rem; }
.user-note h3 { margin: 8px 0 5px; font-size: .86rem; }
.user-note p { margin: 0 0 8px; color: #d7dce7; font-size: .76rem; line-height: 1.55; }
.user-note small { color: var(--muted-2); font-size: .64rem; }
.note-delete { flex: 0 0 auto; min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: .68rem; }
.note-delete:hover { border-color: var(--red); color: var(--red); }
.privacy-callout { padding: 16px 18px; border: 1px solid rgba(251,191,36,.28); border-radius: 12px; background: rgba(251,191,36,.07); }
.privacy-callout strong { color: var(--yellow); font-size: .8rem; }
.privacy-callout p { margin: 7px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.6; }
.admin-standalone { min-height: 100vh; padding: 34px 20px 70px; background: var(--bg); }
.admin-standalone .main-column { width: min(1180px, 100%); margin: 0 auto; }
.admin-login-card { width: min(480px, 100%); margin: 50px auto 0; display: grid; gap: 16px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: center; }
.admin-login-card h2 { margin: 0; }
.admin-login-card p { margin: 0; color: var(--muted); font-size: .77rem; line-height: 1.6; }
.admin-login-card .form-field { text-align: left; }
.admin-login-card > small { color: var(--muted-2); font-size: .66rem; }
.admin-lock { font-size: 2rem; }
.form-error { padding: 10px; border: 1px solid rgba(251,113,133,.3); border-radius: 9px; background: rgba(251,113,133,.08); color: var(--red); font-size: .73rem; }
.admin-settings { display: grid; gap: 18px; }
.admin-toggle { margin-bottom: 2px; }
.admin-scope-grid { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); }
.admin-save-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .7rem; }
.admin-history-list { display: grid; gap: 8px; }
.admin-history-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.admin-history-item strong { font-size: .76rem; }
.admin-history-item p { margin: 5px 0 0; font-size: .68rem; line-height: 1.5; }
.admin-history-item .secondary-button { flex: 0 0 auto; min-height: 34px; }
.context-preview { max-height: 420px; overflow: auto; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #0b0e14; color: #d8dce6; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; line-height: 1.65; }
.context-stats { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.context-stats span { padding: 5px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: .66rem; }

.search-results { margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.search-results h2 { margin: 0 0 12px; font-size: .9rem; }
.search-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.search-gallery-card { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: start; gap: 6px; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.search-gallery-card:hover { border-color: #485268; }
.search-gallery-main { min-width: 0; padding: 6px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.search-gallery-card strong { display: block; margin-bottom: 4px; font-size: .79rem; }
.search-gallery-card span { color: var(--muted); font-size: .67rem; }
.support-page-heading { margin-bottom: 12px; }
.support-route-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.support-route-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--surface-3); font-size: 1.35rem; }
.support-route-content h2 { margin: 0 0 8px; font-size: 1.15rem; }
.support-route-lead { margin: 0 0 12px; color: var(--text); line-height: 1.55; }
.support-route-steps { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.6; }
.support-route-steps li + li { margin-top: 6px; }
.support-route-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.support-route-actions a { text-decoration: none; }
.support-route-note { margin: 12px 0 0; color: var(--muted); font-size: .72rem; }
.search-bookmark { margin-top: 1px; }
.community-creation-guide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .85fr); gap: 18px; align-items: center; margin-bottom: 18px; padding: 18px; border: 1px solid rgba(139,92,246,.38); border-radius: 14px; background: linear-gradient(135deg, rgba(139,92,246,.14), rgba(77,163,255,.05)), var(--surface); }
.community-creation-guide.is-compact { grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr); padding: 14px 16px; }
.community-creation-copy { min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.community-creation-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 900; }
.community-creation-copy strong { display: block; font-size: .86rem; }
.community-creation-copy p { margin: 6px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.community-creation-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.community-creation-search input { min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(9,11,16,.72); color: var(--text); }
.community-creation-search input::placeholder { color: var(--muted-2); }
.community-creation-search .primary-button { min-height: 42px; padding: 0 15px; white-space: nowrap; }
.community-directory { display: grid; gap: 18px; }
.community-directory-section { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.community-directory-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.community-directory-heading h2 { margin: 0; font-size: .9rem; }
.community-directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.community-directory-card { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: start; gap: 6px; padding: 7px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.community-directory-card:hover { border-color: #485268; }
.community-directory-main { min-width: 0; padding: 6px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.community-directory-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.community-directory-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .79rem; }
.community-directory-badge { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; background: rgba(139,92,246,.14); color: #c4b5fd; font-size: .62rem; font-weight: 850; }
.community-directory-main p { display: -webkit-box; overflow: hidden; margin: 7px 0 5px; color: var(--muted); font-size: .68rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.community-directory-main small { color: var(--muted-2); font-size: .64rem; }
.community-directory-bookmark { margin-top: 1px; }
.empty-state { padding: 50px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.toast { position: fixed; top: 76px; left: 50%; z-index: 80; width: max-content; max-width: min(560px, calc(100vw - 32px)); padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-3); box-shadow: var(--shadow); font-size: .77rem; line-height: 1.5; text-align: center; transform: translateX(-50%); animation: toast-in .18s ease; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }

.onboarding-login-action { position: fixed; top: 14px; left: 14px; z-index: 21; display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 11px; background: rgba(9,11,16,.88); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.onboarding-login-action span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; font-weight: 800; }
.onboarding-login-action small { color: var(--muted); font-size: .64rem; }
.onboarding-login-action.beta-entry-note {
  position: relative;
  inset: auto;
  z-index: 2;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 5px 12px;
  margin-bottom: 24px;
  box-shadow: none;
}
.onboarding-login-action.beta-entry-note > span { max-width: none; overflow: visible; text-overflow: clip; }
.onboarding-login-action.beta-entry-note > small { max-width: none; }
.onboarding-login-action.beta-entry-note > small:last-child { grid-column: 2; }
.account-actions { display: flex; align-items: center; gap: 4px; }
.account-name { max-width: 120px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: .68rem; font-weight: 750; }
.top-login-button { min-height: 36px; padding: 0 14px; border-radius: 10px; box-shadow: none; font-size: .72rem; }
.backend-sync-pill[data-status="guest"] { border-color: rgba(96,165,250,.3); color: #93c5fd; }

.login-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; background: rgba(2,4,8,.78); backdrop-filter: blur(12px); }
.login-dialog { position: relative; width: min(430px, 100%); max-height: calc(100vh - 44px); overflow-y: auto; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(160deg, rgba(139,92,246,.1), transparent 42%), var(--surface); box-shadow: 0 28px 90px rgba(0,0,0,.58); }
.login-close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 1.35rem; cursor: pointer; }
.login-close:hover { background: var(--surface-3); color: var(--text); }
.login-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; }
.login-dialog h2 { margin: 24px 0 8px; font-size: 1.65rem; letter-spacing: -.04em; }
.login-dialog > p { margin: 0 0 20px; color: var(--muted); font-size: .78rem; line-height: 1.65; }
.login-error, .login-notice { margin-bottom: 14px; padding: 11px 12px; border-radius: 10px; font-size: .72rem; line-height: 1.5; }
.login-error { border: 1px solid rgba(251,113,133,.32); background: rgba(251,113,133,.08); color: #fda4af; }
.login-notice { border: 1px solid rgba(251,191,36,.3); background: rgba(251,191,36,.07); color: #fde68a; }
.google-login-button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 11px; border: 1px solid #d7dce7; border-radius: 12px; background: #fff; color: #202124; font-weight: 800; cursor: pointer; }
.google-login-button:hover { background: #f3f4f6; }
.google-signup-note { display: block; margin-top: 8px; color: var(--muted-2); font-size: .65rem; line-height: 1.45; text-align: center; }
.google-mark { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #4285f4; font-size: 1rem; font-weight: 900; }
.login-separator { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted-2); font-size: .68rem; }
.login-separator::before, .login-separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.email-login-form { display: grid; gap: 12px; }
.email-login-form label { display: grid; gap: 7px; color: var(--muted); font-size: .7rem; font-weight: 750; }
.email-login-form input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #0d1118; color: var(--text); }
.email-login-form input:focus { border-color: var(--accent); }
.login-submit { width: 100%; margin-top: 4px; }
.login-links { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.login-links button { padding: 0; border: 0; background: transparent; color: #c4b5fd; font-size: .68rem; cursor: pointer; }
.login-links button:hover { color: #ddd6fe; text-decoration: underline; }
.login-guest-note { display: block; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: .65rem; line-height: 1.55; }
.login-legal-note { display: block; margin-top: 10px; color: var(--muted-2); font-size: .62rem; line-height: 1.5; text-align: center; }
.login-legal-note a { color: #c4b5fd; text-decoration: none; }
.login-legal-note a:hover { color: #ddd6fe; text-decoration: underline; }
.gallery-settings-dialog { width: min(620px, 100%); }
.gallery-settings-dialog .gallery-icon.small { width: 30px; height: 30px; margin: 0; border-radius: 9px; font-size: .9rem; }
.gallery-settings-form { display: grid; gap: 14px; }
.gallery-settings-form .form-field textarea { min-height: 230px; }
.gallery-settings-scope { padding: 10px 12px; border: 1px solid rgba(77,163,255,.26); border-radius: 10px; background: rgba(77,163,255,.06); color: #b9d9ff; font-size: .69rem; line-height: 1.5; }
.gallery-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 2px; }
.gallery-settings-actions > div { display: flex; align-items: center; gap: 8px; }
.danger-ghost-button { min-height: 38px; padding: 0 12px; border: 1px solid rgba(251,113,133,.32); border-radius: 10px; background: rgba(251,113,133,.05); color: #fda4af; cursor: pointer; font-weight: 800; }
.danger-ghost-button:hover { background: rgba(251,113,133,.11); color: #fecdd3; }
.danger-ghost-button:disabled { opacity: .45; cursor: not-allowed; background: rgba(251,113,133,.03); }
.account-deletion-card { border-color: rgba(251,113,133,.28); background: linear-gradient(155deg, rgba(251,113,133,.055), transparent 45%), var(--surface); }
.account-deletion-card h2 { color: #fecdd3; }
.account-deletion-warning { margin: 12px 0; padding: 12px 13px; border: 1px solid rgba(251,113,133,.3); border-radius: 10px; background: rgba(251,113,133,.07); color: #fda4af; font-size: .72rem; line-height: 1.55; }
.account-deletion-dialog { background: linear-gradient(160deg, rgba(251,113,133,.09), transparent 42%), var(--surface); }
.account-deletion-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }
.content-report-dialog { width: min(520px, 100%); background: linear-gradient(160deg, rgba(251,191,36,.09), transparent 42%), var(--surface); }
.content-report-form { display: grid; gap: 14px; }
.content-report-form textarea { min-height: 120px; }
.moderation-ad-paused { margin: 0 0 16px; padding: 11px 13px; border: 1px solid rgba(251,191,36,.32); border-radius: 11px; background: rgba(251,191,36,.07); color: #fde68a; font-size: .7rem; line-height: 1.55; }
.moderation-blocked-page { max-width: 720px; margin: 40px auto; text-align: center; }
.moderation-blocked-page h1 { margin: 0 0 10px; color: #fecdd3; }
.moderation-blocked-page p { margin: 0 0 20px; color: var(--muted); line-height: 1.65; }
.moderation-removed-content { opacity: .76; border-style: dashed; }
.moderation-removed-content .comment-body { color: var(--muted); font-style: italic; }
.admin-content-reports { border-color: rgba(251,191,36,.22); }
.beta-admin-summary-grid.admin-moderation-summary { grid-template-columns: repeat(6,minmax(0,1fr)); }
.admin-content-report-filters { grid-template-columns: minmax(160px,260px); }
.admin-content-report-list { display: grid; gap: 10px; max-height: 720px; overflow-y: auto; }
.admin-content-report-card { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.admin-content-report-card.status-pending { border-color: rgba(251,191,36,.32); }
.admin-content-report-card.status-removed { border-color: rgba(251,113,133,.28); }
.admin-content-report-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-content-report-head > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-content-report-head strong { font-size: .78rem; }
.admin-content-report-head time { color: var(--muted-2); font-size: .61rem; }
.admin-content-report-path code { overflow-wrap: anywhere; color: #c4b5fd; font-size: .63rem; }
.admin-content-report-card h3 { margin: 0; font-size: .86rem; }
.admin-content-report-card > p { margin: 0; color: #d8dce6; font-size: .72rem; line-height: 1.55; white-space: pre-wrap; }
.admin-content-report-card blockquote { margin: 0; padding: 9px 11px; border-left: 3px solid rgba(251,191,36,.45); background: rgba(251,191,36,.05); color: var(--muted); font-size: .68rem; line-height: 1.5; }
.admin-content-report-card > small { color: var(--muted-2); font-size: .62rem; }
.admin-content-report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.beta-privacy-strip { padding: 8px 18px; border-bottom: 1px solid rgba(139,92,246,.24); background: rgba(139,92,246,.07); color: #c4b5fd; text-align: center; font-size: .66rem; line-height: 1.45; }
.beta-entry-note { max-width: min(520px, calc(100vw - 28px)); }
.beta-entry-note small { max-width: 380px; white-space: normal; line-height: 1.4; }
.beta-model-lock { padding: 16px; border: 1px solid rgba(139,92,246,.38); border-radius: 13px; background: rgba(139,92,246,.08); }
.beta-model-lock strong { color: #ddd6fe; font-size: .88rem; }
.beta-model-lock p { margin: 7px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.55; }
.beta-account { gap: 8px; }
.beta-floating-tools { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(17,21,29,.94); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.beta-usage-readout { padding: 0 8px; color: var(--muted); font-size: .68rem; font-weight: 750; }
.beta-feedback-button { min-height: 38px; padding: 0 13px; box-shadow: none; font-size: .7rem; }
.beta-feedback-form { display: grid; gap: 16px; }
.beta-rating-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.beta-rating-grid label { cursor: pointer; }
.beta-rating-grid input { position: absolute; opacity: 0; pointer-events: none; }
.beta-rating-grid span { min-height: 58px; display: grid; place-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--muted); text-align: center; font-size: .7rem; font-weight: 800; }
.beta-rating-grid input:checked + span { border-color: var(--accent); background: rgba(139,92,246,.13); color: #ddd6fe; }
.beta-feedback-form textarea { min-height: 110px; }
.beta-contact-note { margin: -2px 0 0; color: var(--muted-2); font-size: .67rem; line-height: 1.55; }
.beta-contact-link, .beta-entry-contact, .app-contact-link { color: #c4b5fd; text-decoration: none; overflow-wrap: anywhere; }
.beta-contact-link:hover, .beta-entry-contact:hover, .app-contact-link:hover { color: #ddd6fe; text-decoration: underline; }
.app-contact-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px 9px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: .66rem; }
.app-contact-footer > a, .onboarding-legal-footer > a { color: #c4b5fd; text-decoration: none; }
.app-contact-footer > a:hover, .onboarding-legal-footer > a:hover { color: #ddd6fe; text-decoration: underline; }
.onboarding-legal-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px 9px; padding: 14px 18px; border-top: 1px solid var(--line); background: #090c13; color: var(--muted-2); font-size: .66rem; }
.beta-admin-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; margin: 16px 0; }
.beta-admin-summary-grid > div { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.beta-admin-summary-grid span { color: var(--muted); font-size: .65rem; }
.beta-admin-summary-grid strong { font-size: 1rem; }
.beta-export-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 14px; border: 1px solid rgba(139,92,246,.32); border-radius: 12px; background: rgba(139,92,246,.06); }
.beta-export-panel strong { display: block; font-size: .78rem; }
.beta-export-panel p { max-width: 680px; margin: 5px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.beta-export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.beta-export-actions .secondary-button { min-height: 36px; white-space: nowrap; }
.beta-failure-analysis, .beta-feedback-inbox { margin-top: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.015); }
.beta-failure-analysis h3, .beta-feedback-inbox h3 { margin: 0; font-size: .82rem; }
.generation-latency-panel { margin: 16px 0; padding: 14px; border: 1px solid rgba(77,163,255,.28); border-radius: 12px; background: rgba(77,163,255,.04); }
.generation-latency-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.generation-latency-card { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.generation-latency-card h4 { margin: 0; font-size: .76rem; }
.generation-latency-card .section-title-row p { margin: 4px 0 0; font-size: .62rem; }
.generation-latency-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.generation-latency-values span { display: grid; gap: 4px; padding: 10px; border-radius: 9px; background: var(--surface-3); }
.generation-latency-values small { color: var(--muted); font-size: .6rem; }
.generation-latency-values strong { font-size: .9rem; }
.beta-failure-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.beta-failure-grid article { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.beta-failure-grid h4 { margin: 0 0 8px; font-size: .72rem; }
.beta-reason-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.beta-reason-row span { min-width: 0; display: grid; gap: 3px; }
.beta-reason-row strong { color: var(--muted); font-size: .62rem; }
.beta-reason-row code { overflow-wrap: anywhere; color: #c4b5fd; font-size: .62rem; }
.beta-reason-row b { flex: 0 0 auto; font-size: .72rem; }
.empty-state.compact { padding: 18px 10px; font-size: .68rem; }
.beta-feedback-filters { display: grid; grid-template-columns: repeat(3,minmax(120px,1fr)) auto; gap: 9px; align-items: end; margin-bottom: 12px; }
.beta-feedback-filters label { display: grid; gap: 6px; color: var(--muted); font-size: .64rem; font-weight: 750; }
.beta-feedback-filters select { min-width: 0; height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); }
.beta-feedback-check { min-height: 38px; display: flex !important; grid-auto-flow: column; align-items: center; gap: 7px !important; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); white-space: nowrap; }
.beta-feedback-check input { accent-color: var(--accent); }
.beta-feedback-inbox-list { display: grid; gap: 8px; max-height: 560px; overflow-y: auto; }
.beta-feedback-card { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.beta-feedback-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.beta-feedback-card-head strong { font-size: .75rem; }
.beta-feedback-card-head time { color: var(--muted-2); font-size: .61rem; }
.beta-feedback-card p { margin: 9px 0; color: #d8dce6; font-size: .72rem; line-height: 1.55; white-space: pre-wrap; }
.beta-feedback-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.beta-feedback-meta span { padding: 4px 7px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: .6rem; }
.beta-feedback-tester-link { min-height: 28px; margin-top: 9px; padding: 0; color: #c4b5fd; font-size: .62rem; }
.beta-operation-table { overflow-x: auto; margin-top: 18px; }
.beta-operation-table h3 { margin: 0 0 9px; font-size: .8rem; }
.beta-operation-row { display: grid; grid-template-columns: minmax(150px,1.5fr) repeat(5,minmax(72px,1fr)); gap: 8px; align-items: center; padding: 9px 10px; border-top: 1px solid var(--line); font-size: .67rem; }
.beta-operation-row strong { overflow-wrap: anywhere; }
.beta-operation-head { border: 0; border-radius: 9px; background: var(--surface-3); color: var(--muted); font-weight: 800; }
.beta-tester-list { display: grid; gap: 9px; margin-top: 16px; }
.beta-tester-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.beta-tester-item summary { display: flex; justify-content: space-between; gap: 16px; padding: 14px; cursor: pointer; list-style: none; }
.beta-tester-item summary::-webkit-details-marker { display: none; }
.beta-tester-item summary > div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.beta-tester-item summary span { color: var(--muted); font-size: .66rem; }
.beta-tester-stats { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 14px; }
.beta-tester-stats span { padding: 5px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: .64rem; }
.beta-tester-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 14px 14px; }
.beta-tester-tools .secondary-button { min-height: 34px; }
.beta-tester-tools small { flex: 1 1 260px; color: var(--muted-2); font-size: .61rem; line-height: 1.45; }
.beta-feedback-log, .beta-event-log { padding: 0 14px 14px; }
.beta-feedback-log h4, .beta-event-log h4 { margin: 8px 0; font-size: .75rem; }
.beta-feedback-log article, .beta-event-log article { display: grid; gap: 4px; padding: 10px; border-top: 1px solid var(--line); }
.beta-feedback-log p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.beta-event-log code { overflow-wrap: anywhere; color: #c4b5fd; font-size: .64rem; white-space: pre-wrap; }
.beta-feedback-log small, .beta-event-log small { color: var(--muted-2); font-size: .6rem; }
.beta-reset-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 14px; border: 1px solid rgba(251,113,133,.32); border-radius: 12px; background: rgba(251,113,133,.06); }
.beta-reset-panel strong { display: block; font-size: .78rem; }
.beta-reset-panel p { margin: 5px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.beta-backup-panel { border-color: var(--line-strong); background: rgba(255,255,255,.025); }
.beta-backup-panel .setup-actions { flex-wrap: wrap; justify-content: flex-end; }
.beta-backup-panel select { min-width: 260px; max-width: 420px; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); color: var(--text); padding: 0 10px; }
.danger-button { border-color: rgba(251,113,133,.45); color: var(--red); white-space: nowrap; }
.danger-button:hover { border-color: rgba(251,113,133,.72); background: rgba(251,113,133,.12); color: #fecdd3; }

.mobile-favorites, .mobile-nav { display: none; }

@media (min-width: 1840px) {
  .outer-ad-rail { position: fixed; top: 108px; z-index: 18; display: block; width: 160px; }
  .outer-ad-rail-right { left: calc(50% + 748px); }
  .outer-ad-rail .ad-preview-slot.format-rail {
    width: 160px;
    height: clamp(440px, calc(100vh - 140px), 600px);
    min-height: 0;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    padding: 14px;
    border-radius: 13px;
    background: linear-gradient(165deg, rgba(54,65,86,.94), rgba(17,21,29,.99));
    box-shadow: 0 18px 54px rgba(0,0,0,.24);
  }
  .outer-ad-rail .ad-preview-slot.format-rail::before {
    content: "AD PREVIEW";
    height: 210px;
    flex: 0 0 210px;
    display: grid;
    place-items: center;
    margin: -14px -14px 16px;
    background:
      radial-gradient(circle at 70% 22%, rgba(196,181,253,.72), transparent 30%),
      radial-gradient(circle at 24% 72%, rgba(77,163,255,.45), transparent 34%),
      linear-gradient(145deg, rgba(139,92,246,.42), rgba(9,11,16,.35));
    color: rgba(255,255,255,.88);
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .18em;
  }
  .outer-ad-rail .ad-preview-slot.format-rail .ad-preview-label { margin-bottom: 12px; }
  .outer-ad-rail .ad-preview-slot.format-rail .ad-preview-copy strong { font-size: 1rem; line-height: 1.45; }
  .outer-ad-rail .ad-preview-slot.format-rail .ad-preview-copy p { margin-top: 8px; font-size: .72rem; line-height: 1.58; }
  .outer-ad-rail .ad-preview-slot.format-rail .ad-preview-cta { width: 100%; min-height: 38px; margin-top: auto; }
}

@media (max-width: 1180px) {
  .shell-body { grid-template-columns: 190px minmax(0, 1fr); }
  .right-sidebar { display: none; }
  .model-pill { display: none; }
}
@media (max-width: 880px) {
  .onboarding { grid-template-columns: 1fr; }
  .onboarding-visual { min-height: auto; padding: 34px 24px 44px; border-right: 0; border-bottom: 1px solid var(--line); }
  .onboarding-sample { margin-top: 50px; }
  .onboarding-form { min-height: auto; padding: 42px 24px 70px; }
  .topbar { grid-template-columns: auto minmax(0, 1fr); padding: 0 16px; }
  .topbar .brand span:last-child, .model-pill, .dev-user-switcher, .backend-sync-pill, .actual-model-pill, .account-name, .left-nav { display: none; }
  .shell-body { display: block; padding: 22px 16px 90px; }
  .app-contact-footer { padding-bottom: 92px; }
  .mobile-favorites { display: block; margin: 0 0 16px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
  .mobile-favorites-heading { margin-bottom: 9px; color: var(--muted-2); font-size: .68rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
  .mobile-favorites p { margin: 0; color: var(--muted-2); font-size: .68rem; line-height: 1.5; }
  .mobile-favorite-list { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
  .mobile-favorite-list::-webkit-scrollbar { display: none; }
  .mobile-favorite-list button { flex: 0 0 auto; min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text); cursor: pointer; font-size: .7rem; font-weight: 750; }
  .community-creation-guide, .community-creation-guide.is-compact { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); padding: 7px; border: 1px solid var(--line); border-radius: 16px; background: rgba(17,21,29,.94); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
  .mobile-nav button { height: 46px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: .69rem; cursor: pointer; }
  .mobile-nav button.is-active { background: var(--surface-3); color: var(--text); }
  .ad-preview-toolbar { left: 12px; right: 12px; bottom: 76px; overflow-x: auto; }
}
@media (max-width: 620px) {
  .option-grid, .locale-grid, .search-gallery-grid, .community-directory-grid { grid-template-columns: 1fr; }
  .support-route-card { grid-template-columns: 1fr; padding: 16px; }
  .support-route-icon { width: 42px; height: 42px; }
  .support-route-actions { display: grid; }
  .support-route-actions .primary-button, .support-route-actions .secondary-button { width: 100%; text-align: center; }
  .community-creation-search { grid-template-columns: 1fr; }
  .community-creation-search .primary-button { width: 100%; }
  .option-card p { min-height: auto; }
  .exact-model-heading { flex-direction: column; }
  .selected-model-chip { max-width: 100%; }
  .model-picker-controls { grid-template-columns: 1fr auto; }
  .model-filter { grid-column: 1 / -1; }
  .exact-model-row { grid-template-columns: 10px minmax(0,1fr); }
  .exact-model-meta { grid-column: 2; text-align: left; }
  .hero-copy h1 { font-size: 3.2rem; }
  .topbar { gap: 10px; }
  .top-settings-button { min-height: 40px; padding: 0 12px; font-size: .72rem; }
  .top-actions .icon-button, .account-actions .ghost-button { display: none; }
  .top-login-button { min-height: 34px; padding: 0 10px; font-size: .66rem; }
  .onboarding-login-action { position: absolute; right: 14px; left: auto; }
  .onboarding-login-action small { display: none; }
  .onboarding-login-action.beta-entry-note { position: relative; right: auto; left: auto; grid-template-columns: 1fr; }
  .onboarding-login-action.beta-entry-note > small { display: block; }
  .onboarding-login-action.beta-entry-note > small:last-child { grid-column: auto; }
  .login-overlay { padding: 12px; }
  .login-dialog { max-height: calc(100vh - 24px); padding: 24px 18px; border-radius: 16px; }
  .login-links { align-items: flex-start; flex-direction: column; }
  .beta-floating-tools { right: 12px; bottom: 76px; left: 12px; justify-content: space-between; }
  .beta-rating-grid, .beta-admin-summary-grid { grid-template-columns: 1fr 1fr; }
  .beta-failure-grid, .beta-feedback-filters, .generation-latency-grid { grid-template-columns: 1fr; }
  .beta-feedback-check { justify-content: flex-start; }
  .beta-export-panel, .beta-reset-panel { align-items: stretch; flex-direction: column; }
  .beta-export-actions { justify-content: stretch; }
  .beta-export-actions .secondary-button, .beta-reset-panel .secondary-button { width: 100%; }
  .beta-backup-panel select { min-width: 0; max-width: none; width: 100%; }
  .beta-tester-tools { align-items: stretch; flex-direction: column; }
  .beta-tester-tools .secondary-button { width: 100%; }
  .beta-operation-row { min-width: 690px; }
  .beta-tester-item summary { align-items: flex-start; flex-direction: column; }
  .post-card { grid-template-columns: 40px minmax(0, 1fr); }
  .post-card-content { padding: 10px 11px 8px; }
  .ad-preview-slot { grid-template-columns: 1fr; }
  .ad-preview-slot.format-comment { margin-left: 0; width: 100%; }
  .ad-preview-cta { width: 100%; }
  .post-vote-rail { padding-left: 3px; padding-right: 3px; }
  .post-card p { -webkit-line-clamp: 1; }
  .page-heading, .gallery-hero-top { align-items: flex-start; flex-direction: column; }
  .gallery-actions { width: 100%; }
  .gallery-actions button { flex: 1 1 0; }
  .gallery-settings-trigger { flex: 1 1 100%; justify-content: center; }
  .gallery-settings-active { display: grid; gap: 4px; }
  .gallery-settings-active span { white-space: normal; }
  .gallery-settings-actions { align-items: stretch; flex-direction: column-reverse; }
  .gallery-settings-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .gallery-settings-actions .danger-ghost-button { width: 100%; }
  .new-posts-banner, .generation-error, .admin-history-item { align-items: stretch; flex-direction: column; }
  .new-posts-banner .secondary-button, .generation-error .secondary-button, .admin-history-item .secondary-button { width: 100%; }
  .page-heading .primary-button, .gallery-hero-top .primary-button { width: 100%; }
  .reddit-post-detail { grid-template-columns: 42px minmax(0, 1fr); }
  .post-detail-header, .post-body, .comments-section, .compose-card { padding-left: 14px; padding-right: 14px; }
  .comment-composer { grid-template-columns: minmax(0,1fr) auto; }
  .comment-composer .avatar { display: none; }
  .comment.is-reply { margin-left: 8px; }
  .settings-grid { grid-template-columns: 1fr; }
  .admin-save-row, .section-title-row { align-items: stretch; flex-direction: column; }
  .admin-save-row .primary-button { width: 100%; }
}
