/* ==========================================================================
   HanHub design system
   Modernist grid + Apple-style clarity: neutral surfaces, one accent,
   generous whitespace, tight display type, pill controls, hairline rules.
   ========================================================================== */

:root {
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "SF Pro Text",
          "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;

  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --surface-seg: #ffffff;
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .07);
  --fill-strong: rgba(118, 118, 128, .2);

  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;

  --accent: #0071e3;
  --link: #0066cc;
  --accent-soft: rgba(0, 113, 227, .09);
  --btn-bg: #0071e3;
  --btn-hover: #0077ed;
  --heart: #ff2d55;
  --switch-on: #34c759;

  --red: #d70015;
  --red-soft: rgba(255, 59, 48, .09);
  --green: #1a7f37;
  --green-soft: rgba(52, 199, 89, .12);
  --amber: #8a5a00;
  --amber-soft: rgba(255, 179, 0, .14);

  --nav-bg: rgba(255, 255, 255, .78);
  --shadow: 0 2px 6px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .06), 0 20px 48px rgba(0, 0, 0, .14);

  --r-xs: 6px; --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-xl: 28px; --r-pill: 980px;
  --max: 1120px;
  --gutter: 24px;
  --nav-h: 52px;
  --ease: cubic-bezier(.25, .1, .25, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #161617;
    --surface: #1c1c1e;
    --surface-seg: #636366;
    --fill: rgba(118, 118, 128, .24);
    --fill-2: rgba(118, 118, 128, .14);
    --fill-strong: rgba(118, 118, 128, .36);
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8d8d92;
    --line: #424245;
    --line-soft: #2c2c2e;
    --accent: #2997ff;
    --link: #2997ff;
    --accent-soft: rgba(41, 151, 255, .16);
    --heart: #ff375f;
    --switch-on: #30d158;
    --red: #ff6961;
    --red-soft: rgba(255, 69, 58, .16);
    --green: #30d158;
    --green-soft: rgba(48, 209, 88, .14);
    --amber: #ffd60a;
    --amber-soft: rgba(255, 214, 10, .12);
    --nav-bg: rgba(22, 22, 23, .78);
    --shadow: 0 2px 6px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, .5), 0 20px 48px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.5; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  word-break: keep-all; overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
p { margin: 0; }
kbd { font: inherit; font-size: .85em; padding: 1px 6px; border-radius: 5px; background: var(--fill); }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.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; }
.js .no-js-only { display: none !important; }
html:not(.js) .js-only { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.text { white-space: pre-wrap; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.link { color: var(--link); }
.link:hover { text-decoration: underline; }
.link-more { color: var(--link); font-size: 17px; display: inline-flex; align-items: center; gap: 2px; }
.link-more::after { content: "›"; font-size: 1.25em; line-height: 1; transform: translateY(-.04em); margin-left: 3px; }
.link-more:hover { text-decoration: underline; }
.link-more.small { font-size: 14px; }

/* ---------- Layout ---------- */
.page { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 96px; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: var(--nav-h); display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; letter-spacing: -.04em; }
.brand-mark { width: 18px; height: 18px; border-radius: 6px; background: var(--text); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg); }
.nav-links { display: flex; gap: 26px; flex: 1; min-width: 0; }
.nav-links a { font-size: 14px; color: var(--text-2); white-space: nowrap; transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current] { color: var(--text); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.nav-me { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); max-width: 170px; }
.nav-me:hover { color: var(--text); }
.nav-me-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px; border: 0; border-radius: var(--r-pill);
  font: inherit; font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-primary { background: var(--btn-bg); color: #fff; }
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary { background: var(--fill); color: var(--text); }
.btn-secondary:hover { background: var(--fill-strong); }
.btn-quiet { background: transparent; color: var(--link); padding: 0 10px; }
.btn-quiet:hover { background: var(--accent-soft); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 0 28px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---------- Type scale ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.display { font-size: clamp(42px, 7vw, 76px); line-height: 1.04; letter-spacing: -.05em; }
.headline { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.lede { font-size: clamp(17px, 2vw, 21px); line-height: 1.45; color: var(--text-2); letter-spacing: -.015em; }
.gradient-text {
  background: linear-gradient(90deg, #0071e3 0%, #7d5cf0 50%, #e5397f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-color-scheme: dark) {
  .gradient-text { background-image: linear-gradient(90deg, #2997ff 0%, #a98bff 50%, #ff6fa5 100%); }
}

.page-head { padding: 64px 0 36px; }
.page-head .lede { margin-top: 14px; max-width: 620px; }
.page-head.center { text-align: center; }
.page-head.center .lede { margin-left: auto; margin-right: auto; }
.page-head .head-actions { margin-top: 26px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.page-head.center .head-actions { justify-content: center; }

.back { display: inline-flex; align-items: center; gap: 2px; margin: 22px 0 0 -4px; color: var(--link); font-size: 15px; }
.back:hover { text-decoration: underline; }
.back + .page-head { padding-top: 28px; }

/* ---------- Hero (feed) ---------- */
.hero { padding: 88px 0 56px; border-bottom: 1px solid var(--line); }
.hero .lede { margin-top: 22px; max-width: 560px; }
.hero-actions { margin-top: 34px; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }

/* ---------- Segmented controls ---------- */
.segmented { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); }
.segmented a {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--text); white-space: nowrap;
  transition: background-color .2s var(--ease);
}
.segmented a:hover:not([aria-current]) { background: var(--fill-2); }
.segmented a[aria-current] { background: var(--surface-seg); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .04); }
.segmented .icon { width: 15px; height: 15px; }

/* ---------- Feed ---------- */
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 44px 0 18px; border-bottom: 1px solid var(--line-soft); }
.toolbar-title { font-size: 28px; letter-spacing: -.035em; }
.toolbar-sub { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.toolbar-controls { display: flex; gap: 10px; flex-wrap: wrap; }

.card { display: block; color: var(--text); min-width: 0; }
.card .thumb { overflow: hidden; background: var(--bg-alt); }
.card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover img { transform: scale(1.03); }
.card h2 { font-size: 19px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-description { margin: 4px 0 10px; font-size: 15px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--text-3); }
.card-meta .author { color: var(--text-2); }
.stat { display: inline-flex; align-items: center; gap: 4px; }
.stat .icon { width: 14px; height: 14px; }
.stat-ai { color: var(--link); font-weight: 500; }
.row-arrow { color: var(--text-3); display: inline-flex; transition: transform .25s var(--ease), color .2s; }

.photo-list { display: flex; flex-direction: column; }
.photo-list .card { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.photo-list .thumb { width: 132px; height: 99px; border-radius: var(--r-sm); }
.photo-list .card:hover h2 { color: var(--link); }
.photo-list .card:hover .row-arrow { color: var(--text); transform: translateX(3px); }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 22px; padding-top: 32px; }
.grid .thumb { aspect-ratio: 1; border-radius: var(--r-lg); }
.grid .card-info { padding: 14px 2px 0; }
.grid .card h2 { font-size: 16px; -webkit-line-clamp: 1; }
.grid .card-description { font-size: 14px; margin: 2px 0 8px; }
.grid .row-arrow { display: none; }

/* Tags */
.tag {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border: 0; border-radius: var(--r-pill); background: var(--fill); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.tag:hover { background: var(--fill-strong); }
.tag span { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tag.is-active { background: var(--text); color: var(--bg); }
.tag.is-active span { color: inherit; opacity: .6; }
.tag-row { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 2px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.tag-row::-webkit-scrollbar { display: none; }
.card-tag { color: var(--link); }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.post-tags .tag { color: var(--link); background: var(--accent-soft); }
.post-tags .tag:hover { background: var(--fill-strong); }
.post-tags .tag-add { color: var(--text-2); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.tag-edit[open] { flex-basis: 100%; }
.tag-edit[open] .tag-add { display: none; }
.tag-form { display: flex; gap: 8px; }
.tag-form input { font-size: 15px; padding: 7px 14px; border-radius: var(--r-pill); }
.tag-edit .field-hint { margin-top: 6px; }
.tag-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: -10px 0 20px; }
.tag-suggest .tag { height: 28px; padding: 0 11px; font-size: 12px; }
.tag-suggest .tag[disabled] { opacity: .4; cursor: default; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 96px 20px; }
.empty-state h2 { font-size: 28px; }
.empty-state p { margin: 10px 0 26px; color: var(--text-2); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 48px 0 0; font-size: 14px; color: var(--text-2); }
.pagination a { color: var(--link); padding: 8px 4px; }
.pagination a:hover { text-decoration: underline; }

/* ---------- Avatars ---------- */
.avatar {
  flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: 32px; height: 32px; border-radius: 50%;
  color: #fff; font-size: 14px; font-weight: 600; line-height: 1; letter-spacing: 0;
  user-select: none; text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}
.avatar-xxs { width: 18px; height: 18px; font-size: 9px; }
.avatar-xs { width: 26px; height: 26px; font-size: 11px; }
.avatar-sm { width: 34px; height: 34px; font-size: 14px; }
.avatar-md { width: 48px; height: 48px; font-size: 19px; }
.avatar-lg { width: 72px; height: 72px; font-size: 28px; }
.avatar-xl { width: 120px; height: 120px; font-size: 46px; }
.avatar-human { background: linear-gradient(180deg, #a6abb5 0%, #858a95 100%); }
.tone-0 { background: linear-gradient(135deg, #64d2ff 0%, #0a7aff 100%); }
.tone-1 { background: linear-gradient(135deg, #c77dff 0%, #5e5ce6 100%); }
.tone-2 { background: linear-gradient(135deg, #ff8fa8 0%, #ff2d55 100%); }
.tone-3 { background: linear-gradient(135deg, #ffbd59 0%, #ff8a00 100%); }
.tone-4 { background: linear-gradient(135deg, #66e0c8 0%, #12a5a5 100%); }
.tone-5 { background: linear-gradient(135deg, #7ee08a 0%, #28a745 100%); }
.tone-6 { background: linear-gradient(135deg, #ffe066 0%, #f5b400 100%); color: #4a3500; text-shadow: none; }
.tone-7 { background: linear-gradient(135deg, #9a9aa0 0%, #3a3a3c 100%); }
.avatar-link { display: inline-flex; border-radius: 50%; }

/* ---------- Badges, pills, chips ---------- */
.badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; line-height: 1; white-space: nowrap; }
.ai-badge, .ai-tag { background: linear-gradient(120deg, #0a7aff, #8e5cf7); color: #fff; }
.badge-author { background: var(--fill); color: var(--text-2); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--fill); color: var(--text-2); }
.pill-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--green-soft); color: var(--green); }
.pill-busy { background: var(--accent-soft); color: var(--link); }
.pill-bad { background: var(--red-soft); color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px 0 8px;
  border: 0; border-radius: var(--r-pill); background: var(--surface); color: var(--text);
  font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: background-color .2s var(--ease), box-shadow .2s;
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--line); }
.chip.plain { padding: 0 14px; background: var(--fill); box-shadow: none; }
.chip.plain:hover { background: var(--fill-strong); }
.chip[aria-pressed="true"], .chip.plain[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* ---------- Notices ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r); background: var(--bg-alt); font-size: 15px; line-height: 1.5; margin: 0 0 20px; }
.notice-ok { background: var(--green-soft); color: var(--green); }
.notice-warn { background: var(--amber-soft); color: var(--amber); }
.notice-info { background: var(--accent-soft); color: var(--link); }

/* ---------- Forms ---------- */
form { margin: 0; }
.field { display: block; margin: 0 0 22px; }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field-hint { display: block; margin-top: 7px; font-size: 13px; color: var(--text-2); font-weight: 400; }
input:not([type]), input[type=text], input[type=password], input[type=number], textarea, select {
  display: block; width: 100%; margin: 0;
  font: inherit; font-size: 17px; color: var(--text); letter-spacing: -.01em;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 15px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
select { padding-right: 36px; cursor: pointer; }
.counter { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.counter.warn { color: var(--red); }

/* iOS-style switch */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.switch input {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; margin: 0; cursor: pointer;
  width: 51px; height: 31px; border-radius: 31px; background: var(--fill-strong);
  transition: background-color .25s var(--ease);
}
.switch input::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06);
  transition: transform .25s var(--ease);
}
.switch input:checked { background: var(--switch-on); }
.switch input:checked::before { transform: translateX(20px); }
.switch-text strong { display: block; font-size: 16px; font-weight: 600; }

/* Slider */
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; padding: 0;
  background: transparent; cursor: pointer; --val: 50%;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--val), var(--fill-strong) var(--val));
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; border: 0;
  background: #fff; box-shadow: 0 .5px 4px rgba(0, 0, 0, .12), 0 6px 13px rgba(0, 0, 0, .12);
}
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--fill-strong); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 .5px 4px rgba(0, 0, 0, .12), 0 6px 13px rgba(0, 0, 0, .12); }
input[type=range]:focus { outline: none; box-shadow: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-soft), 0 6px 13px rgba(0, 0, 0, .12); }

/* Progress bars (read-only rates) */
progress.rate { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 4px; border: 0; border-radius: 2px; background: var(--fill-strong); overflow: hidden; }
progress.rate::-webkit-progress-bar { background: var(--fill-strong); border-radius: 2px; }
progress.rate::-webkit-progress-value { background: var(--text); border-radius: 2px; }
progress.rate::-moz-progress-bar { background: var(--text); border-radius: 2px; }

/* Segmented radio */
.seg-radio { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill); }
.seg-radio label { position: relative; }
.seg-radio input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg-radio span { display: block; padding: 7px 18px; border-radius: 7px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color .2s var(--ease); }
.seg-radio input:checked + span { background: var(--surface-seg); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, .1), 0 1px 1px rgba(0, 0, 0, .04); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Color swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { position: relative; display: inline-flex; cursor: pointer; }
.swatch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.swatch .avatar { width: 34px; height: 34px; transition: box-shadow .2s var(--ease), transform .15s; }
.swatch input:checked + .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.swatch input:focus-visible + .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.swatch:hover .avatar { transform: scale(1.06); }

/* ---------- Upload ---------- */
.upload-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  aspect-ratio: 4 / 3; padding: 24px; overflow: hidden; text-align: center; cursor: pointer;
  border-radius: var(--r-xl); background: var(--bg-alt); border: 1.5px dashed var(--line);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.dropzone .drop-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--accent); box-shadow: var(--shadow); margin-bottom: 8px; }
.dropzone .drop-icon .icon { width: 26px; height: 26px; }
.dropzone strong { font-size: 19px; letter-spacing: -.02em; }
.dropzone .muted { font-size: 14px; }
.dropzone .preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg-alt); z-index: 1; }
.dropzone.has-file { border-style: solid; border-color: transparent; }
.drop-name { margin-top: 12px; font-size: 13px; color: var(--text-2); text-align: center; }
.form-card { background: var(--bg-alt); border-radius: var(--r-xl); padding: 28px; }
.form-card .switch { padding: 16px 0 6px; border-top: 1px solid var(--line); }

/* ---------- Detail ---------- */
.post-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 28px; }
.post-media { position: sticky; top: calc(var(--nav-h) + 24px); }
.stage { display: flex; align-items: center; justify-content: center; min-height: 280px; border-radius: var(--r-xl); background: var(--bg-alt); overflow: hidden; }
.stage a { display: block; cursor: zoom-in; }
.stage img { display: block; width: auto; max-width: 100%; max-height: calc(100vh - var(--nav-h) - 96px); object-fit: contain; }
.post-side { min-width: 0; }
.post-side .back { margin-top: 0; }
.post-title { margin-top: 18px; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.04em; }
.byline { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; color: var(--text-2); }
.byline strong { color: var(--text); font-weight: 600; }
.byline .more { margin-left: auto; }
.post-desc { margin-top: 22px; font-size: 17px; line-height: 1.65; }

.panel { background: var(--bg-alt); border-radius: var(--r-lg); padding: 22px; margin-top: 32px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 17px; letter-spacing: -.02em; }
.panel-title .icon { color: var(--accent); }
.panel-sub { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.panel-note { margin-top: 12px; font-size: 13px; color: var(--text-3); }
.panel .notice { margin: 16px 0 0; }
.panel-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.panel-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.permission-form { display: flex; align-items: center; gap: 10px; }
.summon { display: flex; gap: 8px; }
.summon select { font-size: 15px; padding: 7px 34px 7px 12px; border-radius: var(--r-pill); }
.panel .link-more { margin-top: 18px; }

/* ---------- Discussion ---------- */
.discussion { margin-top: 44px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: 22px; letter-spacing: -.03em; }
.section-head h2 span { color: var(--text-3); font-weight: 500; margin-left: 4px; }

.composer { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.composer textarea { min-height: 48px; resize: none; font-size: 16px; padding: 12px 15px; }
.composer-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.composer-hint { flex: 1; font-size: 13px; color: var(--text-3); }

.thread { padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.comment { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; scroll-margin-top: calc(var(--nav-h) + 24px); border-radius: var(--r-sm); }
.comment:target, .comment.fresh { animation: flash 2.4s var(--ease); }
@keyframes flash { 0%, 30% { background: var(--accent-soft); box-shadow: 0 0 0 8px var(--accent-soft); } 100% { background: transparent; box-shadow: 0 0 0 8px transparent; } }
.replies { display: flex; flex-direction: column; gap: 16px; margin: 16px 0 0 46px; padding-left: 0; }
.replies .comment { grid-template-columns: 26px minmax(0, 1fr); gap: 10px; }
.comment-main { min-width: 0; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; line-height: 1.35; }
.comment-name { font-weight: 600; color: var(--text); }
a.comment-name:hover { text-decoration: underline; }
.comment-time { font-size: 13px; color: var(--text-3); }
.comment-body { margin-top: 3px; font-size: 15.5px; line-height: 1.6; }
.orphan-note { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.mention { color: var(--link); font-weight: 500; }
.comment-actions { display: flex; align-items: center; gap: 2px; margin: 4px 0 0 -8px; }
.act {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px;
  border: 0; border-radius: var(--r-pill); background: none; cursor: pointer;
  color: var(--text-2); font-size: 13px; font-weight: 500; list-style: none;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.act:hover { background: var(--fill-2); color: var(--text); }
.act .icon { width: 16px; height: 16px; }
.like[aria-pressed="true"] { color: var(--heart); }
.like[aria-pressed="true"] .icon { fill: currentColor; }
.like.pop .icon { animation: pop .35s var(--ease); }
@keyframes pop { 50% { transform: scale(1.3); } }
.like-count { min-width: 1ch; font-variant-numeric: tabular-nums; }
.reply-box > summary { margin: 4px 0 0 -8px; }
.reply-form { margin-top: 10px; }
.reply-form textarea { min-height: 44px; resize: none; font-size: 15px; padding: 10px 14px; }
.reply-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; }
.reply-foot .counter { flex: 1; }
.empty-comments { padding: 44px 0; text-align: center; color: var(--text-2); }

summary { cursor: pointer; }
summary::-webkit-details-marker { display: none; }
details > summary { list-style: none; }

/* "More" popover menu */
.more { position: relative; }
.more-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 232px; padding: 6px;
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-soft);
}
.byline .more-menu { left: auto; right: 0; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px;
  background: none; text-align: left; font-size: 14px; color: var(--text); cursor: pointer;
}
.menu-item:hover { background: var(--fill-2); }
.menu-item.danger { color: var(--red); }
.report-form { display: flex; gap: 6px; padding: 6px 6px 4px; }
.report-form input { font-size: 14px; padding: 7px 11px; border-radius: 9px; }

/* Floating status stack (AI typing pill + toast), always in view */
.floaters { position: fixed; left: 16px; right: 16px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.floaters > * { pointer-events: auto; max-width: 100%; }

/* AI typing indicator */
.typing {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; color: var(--text);
  background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line-soft); animation: rise-in .35s var(--ease);
}
.typing-dots { display: inline-flex; gap: 4px; padding: 11px 13px; border-radius: 18px; background: var(--fill); }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.toast {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border: 0; border-radius: var(--r-pill);
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center; cursor: pointer;
  box-shadow: var(--shadow-lg); animation: rise-in .35s var(--ease);
}
body > .toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); animation: none; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- AI: management ---------- */
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; color: var(--text-2); }
.section-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 0 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.section-bar h2 { font-size: 22px; letter-spacing: -.03em; }
.section-bar h2 span { color: var(--text-3); font-weight: 500; margin-left: 6px; }

.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.ai-card { display: flex; flex-direction: column; gap: 18px; padding: 24px; border-radius: var(--r-lg); background: var(--bg-alt); min-width: 0; }
.ai-card.is-paused .avatar { filter: grayscale(1); opacity: .6; }
.ai-card-head { display: flex; align-items: center; gap: 14px; }
.ai-card-head h3 { font-size: 21px; letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-card-head > div { min-width: 0; }
.ai-card-head .pill { margin-top: 6px; }
.ai-card-bio { font-size: 15px; color: var(--text-2); line-height: 1.5; min-height: 3em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rates { display: grid; gap: 10px; margin: 0; }
.rates div { display: grid; grid-template-columns: 76px minmax(0, 1fr) 40px; align-items: center; gap: 10px; }
.rates dt { font-size: 12px; color: var(--text-2); }
.rates dd { margin: 0; display: contents; }
.rates dd span { font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.ai-card-stats { font-size: 13px; color: var(--text-3); }
.ai-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ai-card-new { align-items: center; justify-content: center; text-align: center; min-height: 300px; gap: 8px; background: transparent; border: 1.5px dashed var(--line); color: var(--text); transition: border-color .2s, background-color .2s; }
.ai-card-new:hover { border-color: var(--accent); background: var(--accent-soft); }
.ai-card-new .plus-circle { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-bg); color: #fff; margin-bottom: 8px; }
.ai-card-new .plus-circle .icon { width: 24px; height: 24px; }
.ai-card-new strong { font-size: 17px; }
.ai-card-new .muted { font-size: 14px; }

.explainer { margin-top: 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.explainer > summary { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font-size: 17px; font-weight: 600; }
.explainer > summary::after { content: "+"; font-size: 24px; font-weight: 300; color: var(--text-2); transition: transform .25s var(--ease); }
.explainer[open] > summary::after { transform: rotate(45deg); }
.explainer-body { padding: 0 0 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.explainer-body h3 { font-size: 15px; margin-bottom: 6px; }
.explainer-body p { font-size: 14px; color: var(--text-2); }
.explainer-foot { grid-column: 1 / -1; font-size: 13px; color: var(--text-3); }

.activity { margin-top: 56px; }
.activity h2 { font-size: 22px; letter-spacing: -.03em; }
.activity .muted { font-size: 14px; margin-top: 6px; }
.activity-list { list-style: none; margin: 18px 0 0; padding: 0; }
.activity-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.activity-list li.empty { display: block; font-size: 15px; }
.activity-list img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: var(--bg-alt); display: block; }
.activity-list .what { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-list .what a:hover { text-decoration: underline; }
.activity-list .when { font-size: 12px; color: var(--text-3); }

/* ---------- AI: editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; margin-top: 36px; }
.form-section { padding: 30px 0; border-top: 1px solid var(--line); }
.form-section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 22px; }
.section-num { font-size: 13px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.form-section-head h2 { font-size: 22px; letter-spacing: -.03em; }
.form-section-head p { font-size: 14px; color: var(--text-2); margin-left: auto; }
.presets { margin-bottom: 14px; }
.rate-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 6px 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.rate-row:last-of-type { border-bottom: 0; }
.rate-row label { font-size: 15px; font-weight: 600; }
.rate-row .field-hint { grid-column: 1 / -1; margin-top: 0; }
.rate-row output { font-size: 17px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.rate-row input[type=range] { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; padding-top: 30px; border-top: 1px solid var(--line); }
.editor-preview { position: sticky; top: calc(var(--nav-h) + 32px); }
.preview-card { background: var(--bg-alt); border-radius: var(--r-xl); padding: 32px 24px; text-align: center; }
.preview-card .avatar { display: grid; margin: 0 auto 16px; }
.preview-card h3 { font-size: 24px; letter-spacing: -.03em; display: inline-flex; gap: 8px; align-items: center; }
.preview-card .bio { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.preview-bubble { margin-top: 22px; padding: 14px 16px; border-radius: 18px 18px 18px 6px; background: var(--surface); text-align: left; font-size: 14px; color: var(--text-2); box-shadow: var(--shadow); }
.preview-caption { margin-top: 14px; font-size: 12px; color: var(--text-3); text-align: center; }
.danger-zone { margin-top: 56px; padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.danger-zone h2 { font-size: 17px; }
.danger-zone p { font-size: 14px; color: var(--text-2); margin-top: 4px; max-width: 520px; }

/* ---------- AI: explore & public profile ---------- */
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.explore-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 36px 22px 28px; border-radius: var(--r-lg); background: var(--bg-alt);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.explore-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.explore-card .avatar { margin-bottom: 14px; }
.explore-card h2 { font-size: 21px; letter-spacing: -.03em; display: inline-flex; align-items: center; gap: 6px; }
.explore-card .bio { font-size: 14px; color: var(--text-2); min-height: 2.9em; margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.explore-card .meta { font-size: 13px; color: var(--text-3); margin-top: 10px; }
.explore-card.is-paused .avatar { filter: grayscale(1); opacity: .6; }

.profile-hero { text-align: center; padding: 64px 0 40px; }
.profile-hero .avatar { display: grid; margin: 0 auto 22px; }
.profile-hero h1 { display: inline-flex; align-items: center; gap: 12px; }
.profile-hero .ai-tag { height: 22px; font-size: 12px; padding: 0 8px; }
.profile-hero .lede { margin: 14px auto 0; max-width: 560px; }
.profile-hero .head-actions { justify-content: center; margin-top: 24px; display: flex; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 26px 8px; text-align: center; }
.stats div + div { border-left: 1px solid var(--line-soft); }
.stat-num { display: block; font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.feed-of-comments { list-style: none; margin: 0; padding: 0; }
.feed-of-comments li { border-bottom: 1px solid var(--line-soft); }
.feed-of-comments a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 18px 0; align-items: start; }
.feed-of-comments img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--bg-alt); display: block; }
.feed-of-comments .on { font-size: 13px; color: var(--text-3); }
.feed-of-comments .on strong { color: var(--text-2); font-weight: 600; }
.feed-of-comments .body { margin-top: 4px; font-size: 15px; line-height: 1.55; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.feed-of-comments a:hover .body { color: var(--link); }
.block-title { font-size: 22px; letter-spacing: -.03em; margin: 48px 0 6px; }

/* ---------- Settings / notices / admin ---------- */
.settings-card { margin-top: 8px; padding: 28px; border-radius: var(--r-xl); background: var(--bg-alt); }
.settings-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.settings-preview strong { font-size: 19px; letter-spacing: -.02em; display: block; }
.settings-preview span { font-size: 13px; color: var(--text-2); }
.fineprint { margin-top: 20px; font-size: 13px; color: var(--text-3); line-height: 1.6; }
.message-page { text-align: center; padding: 120px 0 40px; }
.message-page .lede { margin: 16px auto 28px; max-width: 520px; }
.nav-admin { color: var(--link) !important; font-weight: 600; }
.admin-switch { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px 28px; margin-bottom: 44px; border-radius: var(--r-xl); background: var(--green-soft); }
.admin-switch.is-paused { background: var(--red-soft); }
.admin-switch h2 { font-size: 22px; letter-spacing: -.03em; }
.admin-switch p { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.admin-switch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.admin-list li.empty { display: block; font-size: 15px; }
.admin-list li.is-paused .avatar { filter: grayscale(1); opacity: .55; }
.admin-list-main { flex: 1; min-width: 0; }
.admin-list-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 17px; font-weight: 600; }
.admin-list-title a:hover { text-decoration: underline; }
.admin-list-meta { margin-top: 3px; font-size: 13px; color: var(--text-2); }
.admin-list-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.activity h2 .muted { font-size: 17px; font-weight: 500; }
@media (max-width: 734px) {
  .admin-list li { flex-wrap: wrap; }
  .admin-list-actions { width: 100%; justify-content: flex-start; padding-left: 64px; }
  .reports-list .admin-list-actions { padding-left: 0; }
}
.admin-tools { display: grid; gap: 28px; }
.admin-title { font-size: 19px; letter-spacing: -.02em; margin-bottom: 18px; }
.upload-submit { margin-top: 24px; }
.form-card .field:last-of-type { margin-bottom: 8px; }
.form-card .counter { display: block; text-align: right; margin-top: 6px; }
.admin-tools .row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.admin-tools .row .field { flex: 1; min-width: 180px; margin: 0; }
#reports p { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; font-family: ui-monospace, "SF Mono", Consolas, monospace; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); color: var(--text-2); font-size: 12px; line-height: 1.6; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter) 28px; }
.footer-top { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.footer-inner p + p { margin-top: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1068px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-layout { gap: 36px; }
  .editor { gap: 40px; grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  .post-layout, .upload-layout { grid-template-columns: minmax(0, 1fr); }
  .post-media { position: static; }
  .stage img { max-height: 72vh; }
  .post-side .back { margin-top: 4px; }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-preview { position: static; order: -1; }
  .preview-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 18px; text-align: left; padding: 22px; align-items: center; }
  .preview-card .avatar { margin: 0; grid-row: span 2; width: 72px; height: 72px; font-size: 28px; }
  .preview-bubble, .preview-caption { grid-column: 1 / -1; }
  .explainer-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 734px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .nav-inner { gap: 20px; }
  .nav-links { gap: 18px; }
  .nav-me-name { display: none; }
  .hero { padding: 56px 0 40px; }
  .page-head { padding: 44px 0 28px; }
  .toolbar { padding-top: 32px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; padding-top: 22px; }
  .grid .thumb { border-radius: var(--r); }
  .photo-list .card { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 14px 0; }
  .photo-list .thumb { width: 88px; height: 88px; }
  .photo-list .card h2 { font-size: 16px; }
  .card-description { font-size: 14px; margin: 2px 0 6px; }
  .row-arrow { display: none; }
  .stage { border-radius: var(--r-lg); min-height: 200px; }
  .post-layout { padding-top: 16px; }
  .ai-grid, .explore-grid { grid-template-columns: minmax(0, 1fr); }
  .explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .explore-card { padding: 26px 14px 20px; }
  .explore-card .avatar { width: 60px; height: 60px; font-size: 24px; }
  .explore-card h2 { font-size: 17px; }
  .replies { margin-left: 22px; }
  .form-card, .settings-card { padding: 22px; border-radius: var(--r-lg); }
  .form-section-head p { display: none; }
  .dropzone { border-radius: var(--r-lg); }
  .profile-hero { padding: 44px 0 28px; }
  .profile-hero .avatar { width: 96px; height: 96px; font-size: 38px; }
  .stats div { padding: 20px 4px; }
  .more-menu { min-width: 210px; }
}
@media (max-width: 420px) {
  .nav-inner { gap: 14px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  .brand-mark { display: none; }
  .nav-upload span { display: none; }
  .nav-upload { width: 32px; padding: 0; }
  .toolbar-controls { width: 100%; justify-content: space-between; }
  .composer, .comment { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .composer .avatar, .thread > .comment .avatar { width: 28px; height: 28px; font-size: 12px; }
  .summon { flex-direction: column; }
  .summon .btn { width: 100%; }
}

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