:root {
  --ink: #18221f;
  --ink-soft: #3f4d47;
  --muted: #7b867f;
  --bg: #f3f0e8;
  --bg-deep: #e9e5da;
  --surface: #fdfbf6;
  --paper: #fffdf9;
  --line: #dedbd0;
  --line-strong: #c9c4b7;
  --accent: #1f6452;
  --accent-strong: #164a3c;
  --accent-soft: #deece6;
  --accent-pale: #edf5f1;
  --amber: #b7791f;
  --amber-soft: #f7ecd6;
  --danger: #aa3f3f;
  --danger-soft: #f8e6e3;
  --sidebar: #14201c;
  --sidebar-raised: #1b2b25;
  --sidebar-text: #dce6e0;
  --sidebar-muted: #8fa399;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(31, 38, 34, .05), 0 5px 18px rgba(31, 38, 34, .04);
  --shadow: 0 16px 44px rgba(26, 35, 30, .08);
  --shadow-lg: 0 30px 80px rgba(17, 25, 21, .17);
  --font: "Han Sans SC", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --ease: cubic-bezier(.22, .8, .25, 1);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 92% -10%, rgba(216, 235, 226, .7), transparent 60%),
    radial-gradient(900px 600px at -10% 100%, rgba(233, 224, 204, .65), transparent 55%),
    var(--bg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
::selection { background: #c9e3d8; color: var(--ink); }
.hidden { display: none !important; }
.noise {
  position: fixed; inset: 0; z-index: -1; opacity: .34; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}
:focus-visible { outline: 3px solid rgba(31, 100, 82, .35); outline-offset: 3px; }
::placeholder { color: #a3aaa4; }

/* ---------- shared ---------- */
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 12px; color: #f4f1e7; background: linear-gradient(145deg, #2e7460, #16493c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 7px 18px rgba(22, 73, 60, .24);
  font-family: var(--display); font-size: 20px; font-weight: 700;
}
.brand-mark span { transform: translateY(-1px); }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word strong { font-family: var(--display); font-size: 21px; letter-spacing: .08em; }
.brand-word small { margin-top: 6px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.brand-large .brand-mark { width: 46px; height: 46px; border-radius: 14px; font-size: 24px; }
.brand-large .brand-word strong { color: #f4f1e8; font-size: 24px; }
.brand-large .brand-word small { color: #9cb4a9; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #79d3a5; display: inline-block;
  box-shadow: 0 0 0 4px rgba(121, 211, 165, .12);
}
.btn {
  min-height: 42px; border: 1px solid transparent; border-radius: 11px; padding: 9px 16px;
  background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: #fffdf8; box-shadow: 0 7px 18px rgba(31, 100, 82, .2); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--paper); border-color: var(--line); color: var(--ink-soft); }
.btn-secondary:hover { border-color: var(--line-strong); background: #fffefb; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #933333; }
.btn-small { min-height: 32px; padding: 5px 11px; border-radius: 8px; font-size: 12px; }
.btn-block { width: 100%; }
.icon-button {
  width: 38px; height: 38px; border: 1px solid transparent; border-radius: 10px;
  display: inline-grid; place-items: center; background: transparent; color: var(--ink-soft);
  font-size: 18px; line-height: 1;
}
.icon-button:hover { background: var(--bg); color: var(--ink); }
.text-button { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; font-size: inherit; }
.text-button:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.mobile-only { display: none; }
.desktop-only { display: inline-grid; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px;
  background: var(--bg); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap;
}
.role-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 10px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.role-viewer { color: #67746d; background: #eef0ed; }
.role-editor { color: #1a6656; background: var(--accent-soft); }
.role-admin { color: #97621a; background: var(--amber-soft); }
.role-maintainer { color: #9e3737; background: var(--danger-soft); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--muted); }
.status-dot.active { background: #36a371; }
.status-dot.pending { background: #d09b3e; }
.status-dot.disabled { background: #ab6a6a; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.field-hint { color: var(--muted); font-size: 10px; font-weight: 500; margin-left: 5px; }
input, textarea, select {
  width: 100%; color: var(--ink); background: #fffefa; border: 1px solid var(--line);
  border-radius: 10px; min-height: 43px; padding: 10px 12px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
input:focus, textarea:focus, select:focus { border-color: rgba(31, 100, 82, .65); box-shadow: 0 0 0 3px rgba(31, 100, 82, .09); background: #fff; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #718077 50%), linear-gradient(135deg, #718077 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input[type=checkbox] { width: 17px; height: 17px; min-height: 0; accent-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-foot { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.form-callout { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-pale); color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.form-callout strong { color: var(--accent-strong); font-size: 12px; }
.form-callout span { color: var(--muted); }
.form-message { margin: 0; font-size: 12px; line-height: 1.6; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line); border: 0; margin: 18px 0; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255,255,255,.36); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink-soft); font-family: var(--display); font-size: 20px; font-weight: 600; }
.spinner { width: 20px; height: 20px; border: 2px solid rgba(31,100,82,.18); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- auth ---------- */
.auth-view { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(460px, .96fr); }
.auth-art { position: relative; min-height: 100vh; overflow: hidden; background: #14221d; color: #f3f1e8; }
.auth-art::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 420px at 20% 15%, rgba(71, 140, 113, .27), transparent 70%),
    radial-gradient(540px 520px at 85% 90%, rgba(171, 120, 41, .17), transparent 68%),
    linear-gradient(150deg, #15261f 0%, #101a16 65%, #17261f 100%);
}
.auth-art::after {
  content: ""; position: absolute; inset: 0; opacity: .13;
  background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 85%);
}
.auth-art-inner { position: relative; z-index: 3; min-height: 100vh; display: flex; flex-direction: column; padding: clamp(28px, 5vw, 64px); }
.auth-hero { margin: auto 0; max-width: 560px; padding: 40px 0 100px; }
.auth-hero .eyebrow { color: #8faf9f; }
.auth-hero h1 { margin: 20px 0 22px; font-family: var(--display); font-size: clamp(42px, 5vw, 72px); font-weight: 600; line-height: 1.16; letter-spacing: .03em; }
.auth-hero-copy { max-width: 390px; margin: 0; color: #aabdb3; font-size: 14px; line-height: 1.9; }
.auth-meta { display: flex; align-items: center; gap: 10px; color: #8da398; font-size: 10px; font-weight: 600; letter-spacing: .07em; }
.auth-meta-sep { color: #53685d; }
.auth-orbit { position: absolute; z-index: 1; border: 1px solid rgba(165, 210, 190, .11); border-radius: 50%; pointer-events: none; }
.auth-orbit-a { width: 680px; height: 680px; right: -290px; top: 30px; }
.auth-orbit-b { width: 480px; height: 480px; right: -190px; top: 130px; border-style: dashed; }
.auth-glow { position: absolute; z-index: 2; right: 12%; top: 24%; width: 220px; height: 220px; border-radius: 48% 52% 58% 42%; border: 1px solid rgba(163, 206, 185, .15); background: linear-gradient(135deg, rgba(55, 123, 96, .15), rgba(237, 204, 145, .08)); transform: rotate(-22deg); box-shadow: 0 0 90px rgba(99, 171, 139, .11); }
.auth-panel { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 36px; background: rgba(246, 243, 234, .76); }
.auth-card { width: min(420px, 100%); padding: 32px 32px 25px; border: 1px solid rgba(211, 205, 192, .76); border-radius: 22px; background: rgba(255, 253, 248, .88); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.auth-heading h2 { margin: 8px 0 6px; font-family: var(--display); font-size: 31px; line-height: 1.25; font-weight: 600; letter-spacing: .02em; }
.auth-heading > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.auth-tabs { display: flex; gap: 5px; margin: 25px 0 20px; padding: 4px; border-radius: 10px; background: #f1eee5; }
.auth-tab { flex: 1; min-height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.auth-tab.is-active { color: var(--ink); background: #fffdf8; box-shadow: 0 2px 8px rgba(31, 38, 34, .07); }
.auth-message { margin-bottom: 16px; padding: 10px 12px; border-radius: 9px; background: var(--accent-pale); color: var(--accent-strong); font-size: 11px; line-height: 1.6; }
.auth-message.error { background: var(--danger-soft); color: var(--danger); }
.auth-version { margin: 22px 0 0; color: #a2a79f; font-size: 9px; letter-spacing: .1em; text-align: center; }
.auth-panel .field input { background: rgba(255,255,252,.85); }
.auth-card .btn-primary { min-height: 44px; margin-top: 3px; }
.noscript { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 30px; background: var(--bg); color: var(--ink); text-align: center; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; display: flex; }
.sidebar { position: sticky; top: 0; width: 258px; height: 100vh; flex: 0 0 258px; display: flex; flex-direction: column; padding: 26px 17px 18px; color: var(--sidebar-text); background: var(--sidebar); overflow-y: auto; }
.sidebar::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .25; background: radial-gradient(260px 170px at 100% 0%, rgba(76, 143, 116, .24), transparent 70%); }
.sidebar-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 7px 26px; }
.sidebar .brand-word strong { color: #eff3ed; font-size: 20px; }
.sidebar .brand-word small { color: var(--sidebar-muted); }
.sidebar-close { display: none; color: var(--sidebar-muted); }
.side-nav { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; gap: 21px; }
.nav-section { display: flex; flex-direction: column; gap: 4px; }
.nav-section-label { margin: 0 10px 6px; color: #63796e; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 10px; border-radius: 9px; color: #a8b9b0; font-size: 12px; font-weight: 600; transition: background .16s, color .16s; }
.nav-link:hover { color: #eef4ef; background: rgba(255,255,255,.05); }
.nav-link.is-active { color: #f4f2e7; background: rgba(126, 188, 160, .13); box-shadow: inset 2px 0 0 #7bb99e; }
.nav-link .nav-icon { width: 19px; flex: 0 0 19px; color: #7f9a8c; font-size: 15px; text-align: center; }
.nav-link.is-active .nav-icon { color: #a3d8bf; }
.nav-count { margin-left: auto; min-width: 18px; padding: 1px 5px; border-radius: 999px; background: var(--amber); color: #171d1a; font-size: 9px; font-weight: 800; text-align: center; }
.sidebar-foot { position: relative; z-index: 1; margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(210, 230, 219, .1); }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 7px 5px; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; display: inline-grid; place-items: center; border-radius: 50%; color: #eff7f1; background: linear-gradient(145deg, #468a6f, #255c49); font-family: var(--display); font-size: 15px; }
.avatar-lg { width: 48px; height: 48px; flex-basis: 48px; font-size: 20px; }
.sidebar-user-info { min-width: 0; }
.sidebar-user-info strong { display: block; overflow: hidden; color: #e5ede7; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-info span { display: block; color: var(--sidebar-muted); font-size: 10px; }
.side-action { display: block; width: 100%; padding: 7px 5px; border: 0; background: none; color: #8ba196; font-size: 11px; text-align: left; }
.side-action:hover { color: #e4ece6; }
.sidebar-note { margin: 14px 5px 0; color: #53675d; font-size: 9px; line-height: 1.6; }
.app-main { flex: 1; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; min-height: 76px; padding: 15px clamp(20px, 4vw, 44px); border-bottom: 1px solid rgba(212, 207, 195, .66); background: rgba(243, 240, 232, .84); backdrop-filter: blur(16px); }
.page-heading { min-width: 0; flex: 1; }
.page-heading h1 { margin: 2px 0 0; overflow: hidden; font-family: var(--display); font-size: clamp(22px, 2.7vw, 29px); font-weight: 600; letter-spacing: .03em; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 4px 10px 4px 4px; background: rgba(255,253,248,.6); color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.user-chip:hover { border-color: var(--line); background: var(--paper); }
.user-chip .avatar { width: 28px; height: 28px; flex-basis: 28px; font-size: 12px; }
.sync-pill { padding: 4px 9px; border-radius: 999px; background: var(--accent-pale); color: var(--accent); font-size: 10px; font-weight: 700; }
.main-content { width: min(1180px, 100%); margin: 0 auto; padding: 32px clamp(20px, 4vw, 44px) 80px; }
.drawer-overlay { position: fixed; inset: 0; z-index: 45; background: rgba(13, 22, 18, .5); backdrop-filter: blur(2px); }
.mobile-nav { display: none; }
.global-loading { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(243, 240, 232, .42); backdrop-filter: blur(2px); }
.global-loading span { width: 28px; height: 28px; border: 2px solid rgba(31, 100, 82, .15); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

/* ---------- common page bits ---------- */
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-intro h2 { margin: 4px 0 0; font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: .02em; }
.page-intro p { max-width: 620px; margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 17px; }
.search-box { position: relative; flex: 1; min-width: 190px; max-width: 360px; }
.search-box input { padding-left: 34px; min-height: 38px; background: rgba(255,253,248,.7); }
.search-box::before { content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-53%); color: var(--muted); font-size: 19px; pointer-events: none; }
.toggle { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; cursor: pointer; user-select: none; }
.card { border: 1px solid rgba(214, 209, 197, .85); border-radius: var(--radius); background: rgba(255,253,248,.82); box-shadow: var(--shadow-sm); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.section-title h3 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 600; }
.section-title p { margin: 0; color: var(--muted); font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { padding: 17px 18px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,253,248,.6); }
.stat strong { display: block; color: var(--ink); font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 10px; }

/* ---------- feed ---------- */
.feed-shell { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 26px; align-items: start; }
.feed-main { min-width: 0; }
.feed-intro { margin-bottom: 19px; }
.feed-intro h2 { margin: 3px 0 0; font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: .02em; }
.feed-intro p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.composer { margin-bottom: 20px; padding: 18px 20px 15px; border: 1px solid rgba(207, 201, 188, .9); border-radius: var(--radius); background: rgba(255,253,248,.92); box-shadow: var(--shadow-sm); }
.composer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.composer-head .avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 13px; }
.composer-head strong { display: block; font-size: 12px; }
.composer-head span { color: var(--muted); font-size: 10px; }
.composer textarea { min-height: 76px; padding: 12px 13px; border: 0; border-radius: 9px; background: #f7f4ec; font-size: 13px; resize: vertical; }
.composer textarea:focus { background: #fffefb; box-shadow: inset 0 0 0 1px rgba(31,100,82,.22); }
.composer-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.composer-preview-item { position: relative; width: 74px; height: 74px; border-radius: 9px; overflow: hidden; background: #dfe5df; }
.composer-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.composer-preview-item video { width: 100%; height: 100%; object-fit: cover; background: #1d2a24; }
.composer-preview-item .remove-media { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(17,25,21,.7); color: #fff; font-size: 12px; line-height: 1; }
.composer-foot { display: flex; align-items: center; gap: 3px; margin-top: 7px; }
.composer-tools { display: flex; align-items: center; gap: 1px; }
.composer-tool { border: 0; background: none; color: var(--muted); border-radius: 7px; padding: 6px 8px; font-size: 11px; font-weight: 600; }
.composer-tool:hover { color: var(--accent); background: var(--accent-pale); }
.composer-submit { margin-left: auto; }
.composer-counter { margin-left: auto; padding-right: 9px; color: var(--muted); font-size: 10px; }
.composer-counter.warn { color: var(--danger); }
.composer-note { margin: 8px 0 0; color: #9aa39b; font-size: 9px; }
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 1px 9px; color: var(--muted); font-size: 10px; }
.feed-toolbar .toggle { font-size: 10px; }
.post-list { display: flex; flex-direction: column; gap: 14px; }
.feed-more { display: flex; justify-content: center; padding: 18px 0 2px; }
.post-card { position: relative; padding: 18px 20px 14px; border: 1px solid rgba(211, 205, 192, .88); border-radius: var(--radius); background: rgba(255,253,248,.94); box-shadow: var(--shadow-sm); }
.post-card.is-pinned { border-color: #d8c7a9; }
.post-card.is-hidden { opacity: .7; border-style: dashed; background: #faf7f0; }
.post-top { display: flex; align-items: flex-start; gap: 10px; }
.post-author { min-width: 0; flex: 1; }
.post-author-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.post-author-line strong { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.post-meta { display: flex; align-items: center; gap: 7px; margin-top: 2px; color: var(--muted); font-size: 10px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.tag { display: inline-flex; align-items: center; gap: 3px; border-radius: 5px; padding: 1px 6px; font-size: 9px; font-weight: 700; }
.tag-pinned { color: #8a5b18; background: var(--amber-soft); }
.tag-hidden { color: var(--danger); background: var(--danger-soft); }
.tag-edited { color: var(--muted); background: var(--bg); }
.post-menu { position: relative; margin-left: auto; }
.post-menu summary { list-style: none; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); font-size: 17px; cursor: pointer; }
.post-menu summary::-webkit-details-marker { display: none; }
.post-menu summary:hover { background: var(--bg); color: var(--ink); }
.post-menu-panel { position: absolute; z-index: 8; right: 0; top: 33px; width: 138px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: var(--shadow); }
.post-menu-panel button { display: block; width: 100%; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-soft); font-size: 11px; text-align: left; }
.post-menu-panel button:hover { background: var(--bg); }
.post-menu-panel button.danger { color: var(--danger); }
.post-content { margin: 13px 0 0; color: #314039; font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 12px; border-radius: 10px; overflow: hidden; }
.post-media-grid.count-1 { grid-template-columns: minmax(0, 440px); }
.post-media-grid.count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 70%; }
.post-image { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #e5e8e1; overflow: hidden; aspect-ratio: 1 / 1; }
.post-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.post-image:hover img { transform: scale(1.035); }
.post-video-wrap { margin-top: 12px; border-radius: 10px; overflow: hidden; background: #0f1713; max-width: 580px; }
.post-video-wrap video { width: 100%; max-height: 420px; background: #0f1713; }
.post-actions { display: flex; align-items: center; gap: 3px; margin-top: 12px; padding-top: 8px; border-top: 1px solid rgba(224, 220, 210, .7); }
.post-action { min-height: 29px; border: 0; border-radius: 7px; padding: 4px 8px; background: none; color: var(--muted); font-size: 11px; font-weight: 600; }
.post-action:hover { color: var(--accent); background: var(--accent-pale); }
.post-action.is-active { color: var(--accent); }
.post-action.like.is-active { color: #b65d4c; background: #f9ebe7; }
.post-time { margin-left: auto; color: #a2a9a2; font-size: 9px; }
.comments-panel { margin-top: 11px; padding-top: 10px; border-top: 1px dashed rgba(214, 209, 197, .9); }
.comment-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 10px; }
.comment { display: flex; gap: 8px; }
.comment .avatar { width: 26px; height: 26px; flex-basis: 26px; font-size: 11px; }
.comment-body { min-width: 0; flex: 1; }
.comment-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }
.comment-line strong { color: var(--ink); font-size: 11px; }
.comment-line .comment-text { width: 100%; color: #48544e; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-actions { display: flex; align-items: center; gap: 10px; margin-top: 2px; color: #99a19b; font-size: 9px; }
.comment-actions button { border: 0; background: none; padding: 0; color: inherit; font-size: inherit; }
.comment-actions button:hover { color: var(--accent); }
.comment-replies { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-left: 9px; border-left: 1px solid #e7e2d8; }
.comment-form { display: flex; gap: 7px; align-items: flex-start; }
.comment-form input { min-height: 33px; padding: 7px 10px; border-radius: 8px; background: #f8f5ee; font-size: 12px; }
.comment-form .btn { min-height: 33px; padding: 5px 11px; font-size: 11px; }
.reply-context { display: flex; align-items: center; gap: 7px; margin: 0 0 7px; color: var(--muted); font-size: 10px; }
.reply-context button { border: 0; background: none; padding: 0; color: var(--muted); font-size: 11px; }
.comments-empty { padding: 4px 0 8px; color: #a0a8a1; font-size: 10px; }
.feed-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 100px; }
.side-card { padding: 17px; border: 1px solid rgba(211,205,192,.8); border-radius: var(--radius); background: rgba(255,253,248,.68); }
.side-card h3 { margin: 0 0 10px; font-family: var(--display); font-size: 18px; font-weight: 600; }
.side-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.rule-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rule-list li { display: flex; gap: 7px; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.rule-list li::before { content: "·"; color: var(--accent); font-weight: 900; }
.side-count { display: flex; align-items: baseline; gap: 6px; margin: 0 0 3px; }
.side-count strong { font-family: var(--display); color: var(--ink); font-size: 31px; font-weight: 600; }
.side-count span { color: var(--muted); font-size: 10px; }

/* ---------- data tables ---------- */
.sheet-tabs { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 17px; padding-bottom: 1px; }
.sheet-tab { flex: 0 0 auto; min-height: 33px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,253,248,.55); color: var(--muted); font-size: 11px; font-weight: 700; }
.sheet-tab.is-active { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-pale); }
.sheet-panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,248,.84); box-shadow: var(--shadow-sm); overflow: hidden; }
.sheet-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-toolbar .search-box { max-width: 280px; }
.sheet-meta { margin-left: auto; color: var(--muted); font-size: 10px; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12px; }
.data-table th { position: sticky; top: 0; z-index: 2; padding: 10px 12px; border-bottom: 1px solid var(--line-strong); background: #f7f4ec; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .03em; text-align: left; white-space: nowrap; }
.data-table td { padding: 9px 12px; border-bottom: 1px solid #eeeae0; color: var(--ink-soft); vertical-align: middle; }
.data-table tbody tr { transition: background .14s; }
.data-table tbody tr:hover { background: #fbf8f0; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .cell-main { color: var(--ink); font-weight: 700; }
.data-table .cell-muted { color: var(--muted); font-size: 10px; }
.data-table .table-image { width: 54px; height: 40px; border-radius: 6px; object-fit: cover; cursor: zoom-in; background: #e8e5dc; }
.data-table .row-action { border: 0; background: none; color: var(--muted); padding: 3px 5px; border-radius: 5px; font-size: 13px; }
.data-table .row-action:hover { background: var(--danger-soft); color: var(--danger); }
.table-check { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 6px; background: #eff2ed; color: #9aa49c; font-size: 12px; }
.table-check.is-on { background: var(--accent-soft); color: var(--accent-strong); }
.data-table .blank { color: #bdc1b9; }
.sheet-empty { padding: 55px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.image-cell-button { border: 0; padding: 0; background: none; }
.image-placeholder { width: 54px; height: 40px; display: inline-grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 6px; color: #aeb4ac; font-size: 14px; background: #fbf9f3; }

/* ---------- accounts ---------- */
.accounts-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: start; }
.account-list { display: flex; flex-direction: column; gap: 8px; }
.account-row { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,253,248,.72); }
.account-main { min-width: 0; flex: 1; }
.account-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 700; }
.account-meta { margin-top: 2px; color: var(--muted); font-size: 10px; }
.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.account-actions .role-select { width: 94px; min-height: 30px; padding: 4px 25px 4px 8px; font-size: 10px; }
.account-actions .btn { min-height: 29px; padding: 4px 9px; font-size: 10px; }
.account-pending { border-left: 3px solid var(--amber); }
.account-disabled { opacity: .65; }
.settings-card { padding: 18px; }
.settings-card .field { margin-bottom: 13px; }
.settings-note { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.7; }
.invite-list { display: flex; flex-direction: column; gap: 6px; margin-top: 13px; }
.invite-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 8px 10px; border-radius: 8px; background: #f8f5ee; border: 1px solid #ece7dc; }
.invite-row .account-meta { margin-top: 2px; }
.invite-code { color: var(--accent-strong); background: var(--accent-pale); border-radius: 5px; padding: 3px 7px; font: 700 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; }
.invite-row .btn { min-height: 28px; padding: 3px 8px; font-size: 10px; }
@media (max-width: 900px) {
  .invite-row { align-items: flex-start; }
  .invite-code { width: 100%; order: 3; }
}
.ai-state { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.ai-state .live-dot { width: 5px; height: 5px; }

/* ---------- AI ---------- */
.ai-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: start; }
.ai-panel { display: flex; flex-direction: column; min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,253,248,.75); overflow: hidden; }
.ai-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.ai-head .ai-glyph { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #f8f4e9; background: var(--accent); font-family: var(--display); font-size: 16px; }
.ai-head strong { display: block; font-size: 12px; }
.ai-head span { display: block; color: var(--muted); font-size: 10px; }
.ai-status { margin-left: auto; }
.ai-messages { flex: 1; display: flex; flex-direction: column; gap: 13px; max-height: 500px; padding: 18px; overflow-y: auto; }
.ai-empty { margin: auto; max-width: 400px; text-align: center; color: var(--muted); }
.ai-empty h3 { margin: 0 0 5px; font-family: var(--display); font-size: 23px; font-weight: 600; color: var(--ink-soft); }
.ai-empty p { margin: 0; font-size: 11px; line-height: 1.8; }
.ai-message { max-width: 86%; padding: 10px 12px; border-radius: 11px; font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-message.user { align-self: flex-end; border-bottom-right-radius: 3px; background: var(--accent); color: #fffdf7; }
.ai-message.assistant { align-self: flex-start; border-bottom-left-radius: 3px; border: 1px solid var(--line); background: #fffdf8; color: var(--ink-soft); }
.ai-message .ai-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.ai-message.user .ai-label { color: #bcd8ce; }
.ai-attachments { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.ai-attachments img { width: 52px; height: 52px; border-radius: 5px; object-fit: cover; }
.ai-proposal { align-self: flex-start; width: min(100%, 580px); padding: 13px; border: 1px solid #d8c7a9; border-radius: 11px; background: #fffaf0; }
.ai-proposal h4 { margin: 0 0 7px; font-size: 11px; color: #8a5b18; }
.proposal-list { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.proposal-list li { padding: 7px 8px; border-radius: 6px; background: rgba(255,255,255,.6); color: var(--ink-soft); font-size: 10px; line-height: 1.65; }
.proposal-list b { color: var(--ink); }
.proposal-actions { display: flex; gap: 6px; }
.ai-compose { padding: 13px 15px 15px; border-top: 1px solid var(--line); }
.ai-compose .ai-attachments { margin-bottom: 8px; }
.ai-compose textarea { min-height: 74px; background: #faf7ef; font-size: 12px; }
.ai-compose-foot { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.ai-compose-foot .btn { margin-left: auto; }
.ai-hint { margin: 8px 0 0; color: #9ba39c; font-size: 9px; line-height: 1.6; }
.ai-side-note { padding: 16px; }
.ai-side-note h3 { margin: 0 0 7px; font-family: var(--display); font-size: 18px; font-weight: 600; }
.ai-side-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.ai-side-note + .ai-side-note { margin-top: 14px; }

/* ---------- maintenance / profile ---------- */
.log-list { display: flex; flex-direction: column; gap: 0; }
.log-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; padding: 9px 2px; border-bottom: 1px solid #eeeae0; color: var(--ink-soft); font-size: 11px; }
.log-row:last-child { border-bottom: 0; }
.log-row time { color: var(--muted); font-size: 10px; }
.log-row span { color: var(--muted); font-size: 10px; }
.log-action { color: var(--accent) !important; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px !important; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 22px; align-items: start; }
.profile-card { padding: 25px; }
.profile-head { display: flex; align-items: center; gap: 14px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.profile-head h2 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 600; }
.profile-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.profile-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 19px 0; }
.profile-details dt { color: var(--muted); font-size: 10px; }
.profile-details dd { margin: 2px 0 0; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.ability-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ability-chip { padding: 4px 8px; border-radius: 6px; background: var(--accent-pale); color: var(--accent-strong); font-size: 10px; }
.ability-chip.off { background: #f0ede5; color: #a1a79f; }

/* ---------- modal / drawer / toast ---------- */
.modal-host { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(15, 24, 20, .48); backdrop-filter: blur(3px); }
.modal { width: min(560px, 100%); max-height: min(86vh, 800px); display: flex; flex-direction: column; border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; animation: modal-in .2s var(--ease); }
.modal.wide { width: min(720px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 19px 21px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 2px 0 0; font-family: var(--display); font-size: 22px; font-weight: 600; }
.modal-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.modal-close { margin-left: auto; }
.modal-body { padding: 19px 21px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 7px; padding: 13px 21px; border-top: 1px solid var(--line); background: #faf7f0; }
.modal .form-stack { gap: 13px; }
.modal .field-row { gap: 10px; }
.drawer { width: min(550px, 100%); height: 100%; max-height: 100vh; margin: 0 0 0 auto; border-radius: 17px 0 0 17px; animation: drawer-in .24s var(--ease); }
@keyframes drawer-in { from { transform: translateX(20px); opacity: .6; } }
.toast-host { position: fixed; right: 20px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; pointer-events: none; }
.toast { max-width: min(360px, calc(100vw - 40px)); padding: 10px 13px; border: 1px solid rgba(206, 201, 189, .85); border-radius: 9px; background: var(--paper); color: var(--ink-soft); box-shadow: var(--shadow); font-size: 11px; line-height: 1.6; pointer-events: auto; animation: toast-in .2s var(--ease); }
.toast.error { border-color: #e3c1bc; background: #fff7f5; color: var(--danger); }
.toast.success { border-color: #c4dccc; background: #f4fbf6; color: var(--accent-strong); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
.confirm-copy { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.danger-text { color: var(--danger); }
.temp-password { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed #d8c7a9; border-radius: 8px; background: #fffaf0; }
.temp-password code { color: #7f5519; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.image-viewer { width: min(900px, 100%); max-height: 90vh; display: grid; place-items: center; }
.image-viewer img { width: auto; max-height: 86vh; border-radius: 11px; }
.media-upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.media-upload-preview { width: 86px; height: 64px; border-radius: 7px; object-fit: cover; background: #e9e7df; }
.field-image { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.field-image img { width: 86px; height: 64px; border-radius: 7px; object-fit: cover; background: #e9e7df; }
.field-image .image-placeholder { width: 86px; height: 64px; white-space: nowrap; font-size: 10px; }
.file-input { max-width: 100%; font-size: 11px; }
.file-input::file-selector-button { margin-right: 7px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; background: var(--paper); color: var(--ink-soft); font-size: 10px; }
.row-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.row-edit-grid .field.full { grid-column: 1 / -1; }

@media (max-width: 1100px) {
  .feed-shell, .accounts-layout, .ai-layout { grid-template-columns: minmax(0, 1fr) 245px; gap: 17px; }
  .auth-view { grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr); }
  .auth-hero h1 { font-size: clamp(40px, 4.5vw, 58px); }
}
@media (max-width: 900px) {
  .auth-view { display: block; }
  .auth-art { min-height: 36vh; }
  .auth-art-inner { min-height: 36vh; padding: 26px 24px; }
  .auth-hero { padding: 24px 0 26px; }
  .auth-hero h1 { margin: 10px 0 10px; font-size: 37px; }
  .auth-hero-copy { max-width: 520px; font-size: 12px; }
  .auth-meta { display: none; }
  .auth-orbit, .auth-glow { display: none; }
  .auth-panel { min-height: auto; padding: 25px 20px 38px; }
  .auth-card { margin-top: -22px; padding: 25px 22px 20px; position: relative; z-index: 2; }
  .app { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: min(285px, 85vw); transform: translateX(-102%); transition: transform .24s var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close { display: inline-grid; }
  .mobile-only { display: inline-grid; }
  .desktop-only { display: none; }
  .topbar { min-height: 66px; padding: 11px 17px; gap: 9px; }
  .page-heading h1 { font-size: 23px; }
  .main-content { padding: 21px 16px 98px; }
  .mobile-nav { position: fixed; left: 12px; right: 12px; bottom: calc(11px + env(safe-area-inset-bottom)); z-index: 40; display: flex; justify-content: space-around; gap: 2px; padding: 6px; border: 1px solid rgba(210, 205, 193, .9); border-radius: 16px; background: rgba(255,253,248,.92); box-shadow: 0 8px 35px rgba(21, 30, 26, .14); backdrop-filter: blur(16px); }
  .mobile-nav a { flex: 1; min-height: 43px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 10px; color: var(--muted); font-size: 9px; font-weight: 700; }
  .mobile-nav a .nav-icon { font-size: 17px; line-height: 1; }
  .mobile-nav a.is-active { background: var(--accent-pale); color: var(--accent-strong); }
  .feed-shell, .accounts-layout, .ai-layout, .profile-grid { display: block; }
  .feed-aside { position: static; display: none; }
  .accounts-layout .settings-card { margin-top: 15px; }
  .ai-layout .ai-side-note { display: none; }
  .ai-panel { min-height: 60vh; }
  .ai-messages { max-height: none; }
  .page-intro { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 16px; }
  .page-intro h2 { font-size: 25px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 13px 14px; }
  .stat strong { font-size: 24px; }
  .user-chip { padding-right: 4px; }
  .user-chip span:not(.avatar) { display: none; }
  .top-actions { gap: 3px; }
  .topbar .page-heading .eyebrow { font-size: 8px; }
  .toast-host { right: 14px; left: 14px; bottom: calc(79px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; }
  .modal-host { padding: 11px; align-items: end; }
  .modal { max-height: 87vh; border-radius: 15px; width: 100%; }
  .modal.wide { width: 100%; }
  .drawer { width: 100%; border-radius: 15px; max-height: 90vh; margin-top: auto; height: auto; animation: modal-in .2s var(--ease); }
  .log-row { grid-template-columns: 1fr auto; gap: 3px 10px; }
  .log-row time { grid-column: 1; }
  .log-row span { grid-column: 1; }
  .account-row { align-items: flex-start; flex-wrap: wrap; }
  .account-actions { width: 100%; justify-content: flex-start; padding-left: 45px; }
  .row-edit-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .post-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-media-grid.count-1 { grid-template-columns: minmax(0, 100%); }
  .post-media-grid.count-2 { max-width: 100%; }
  .post-card { padding: 15px 14px 12px; }
  .composer { padding: 14px 14px 12px; }
  .post-content { font-size: 13px; }
  .data-table { min-width: 680px; }
  .sheet-toolbar { padding: 11px 12px; }
  .sheet-meta { width: 100%; margin-left: 0; }
  .table-footer { padding: 9px 12px; }
}
@media (max-width: 560px) {
  .auth-art { min-height: 30vh; }
  .auth-art-inner { min-height: 30vh; padding: 20px 18px; }
  .auth-hero { padding: 20px 0; }
  .auth-hero h1 { font-size: 31px; }
  .auth-hero-copy { display: none; }
  .auth-panel { padding: 18px 14px 28px; }
  .auth-card { padding: 22px 18px 18px; }
  .auth-heading h2 { font-size: 27px; }
  .brand-large .brand-word strong { font-size: 22px; }
  .page-heading h1 { font-size: 21px; }
  .main-content { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 13px; padding-right: 13px; }
  .feed-intro h2 { font-size: 26px; }
  .post-top { gap: 8px; }
  .post-media-grid { gap: 4px; }
  .composer-tools { gap: 0; }
  .composer-tool { padding: 5px 6px; font-size: 10px; }
  .post-video-wrap video { max-height: 300px; }
  .comment .avatar { width: 23px; height: 23px; flex-basis: 23px; }
  .profile-details { grid-template-columns: 1fr; gap: 10px; }
  .profile-head h2 { font-size: 23px; }
  .modal-body { padding: 15px 16px; }
  .modal-head { padding: 16px 16px 12px; }
  .modal-foot { padding: 11px 16px; }
  .temp-password code { font-size: 12px; }
  .mobile-nav { left: 8px; right: 8px; bottom: calc(7px + env(safe-area-inset-bottom)); padding: 5px; }
  .mobile-nav a { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
