:root {
  --bg: #f3f5ef;
  --surface: #ffffff;
  --ink: #20231f;
  --muted: #667068;
  --line: #dde2dc;
  --line-strong: #b9c1ba;
  --primary: #237a57;
  --primary-dark: #195f43;
  --lost: #2862b8;
  --lost-soft: #e7f0ff;
  --story: #84469e;
  --story-soft: #f4edf7;
  --event: #bd412b;
  --event-soft: #ffebe5;
  --goods: #8a6500;
  --goods-soft: #fff3b8;
  --shout: #176b75;
  --shout-soft: #e1f4f4;
  --signal: #f2d83d;
  --success: #337a45;
  --success-soft: #eaf6ec;
  --danger: #c43c3c;
  --shadow: 0 12px 28px rgba(25, 38, 29, 0.08);
  --shell: 1200px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

body.dialog-open { overflow: hidden; }

button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button:disabled, input:disabled, textarea:disabled, select:disabled { cursor: not-allowed; opacity: 0.62; }
[aria-busy="true"] button:disabled, [aria-busy="true"] input:disabled, [aria-busy="true"] textarea:disabled, [aria-busy="true"] select:disabled { cursor: progress; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: 34px; line-height: 1.2; }
h2 { margin-bottom: 0; font-size: 22px; line-height: 1.35; }
h3 { margin-bottom: 8px; font-size: 16px; line-height: 1.45; }
p { color: var(--muted); line-height: 1.65; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

.shell { width: min(calc(100% - 48px), var(--shell)); margin: 0 auto; }
.narrow-shell { max-width: 900px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  border-bottom: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.topbar-inner { display: flex; align-items: center; height: 100%; gap: 24px; }

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
}

.brand-mark img { width: 34px; height: 34px; }
.desktop-nav { display: flex; align-self: stretch; gap: 4px; }

.nav-item {
  position: relative;
  min-width: 58px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.nav-item::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--ink);
  content: "";
  transition: transform 160ms ease;
}

.nav-item:hover, .nav-item.is-active { color: var(--ink); }
.nav-item.is-active::after { transform: scaleX(1); }

.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  max-width: 260px;
  height: 40px;
  margin-left: auto;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 160ms ease, background 160ms ease;
}

.site-search:focus-within { border-color: var(--primary); background: #fff; }
.site-search svg { width: 17px; color: var(--muted); }
.site-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; }
.site-search kbd { padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: #7f8981; font-size: 10px; }
.search-close { display: none; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.search-close:hover { background: var(--bg); color: var(--ink); }
.search-close svg { width: 17px; height: 17px; }

.top-actions { display: flex; align-items: center; gap: 8px; }

.icon-button {
  position: relative;
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.icon-button:hover { border-color: var(--line); background: #fff; }
.icon-button:active { transform: scale(0.96); }
.icon-button svg { width: 19px; height: 19px; }
.avatar-button { border-color: var(--line); background: var(--goods-soft); color: #6f5010; font-weight: 700; transition: border-color 140ms ease, transform 140ms ease; }

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--event);
}

.primary-button, .secondary-button, .filter-button, .card-action, .text-button, .reaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 650;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.primary-button { padding: 0 15px; border: 1px solid var(--primary); background: var(--primary); color: #fff; }
.primary-button:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.primary-button.publish-trigger {
  border-color: var(--ink);
  background: var(--signal);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.primary-button.publish-trigger:hover { transform: translate(-1px, -1px); background: #ffe84b; box-shadow: 4px 4px 0 var(--ink); }
.primary-button.publish-trigger:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.primary-button:active, .secondary-button:active, .filter-button:active { transform: translateY(1px); }
.primary-button svg, .secondary-button svg, .filter-button svg, .text-button svg { width: 17px; height: 17px; }
.secondary-button, .filter-button { padding: 0 14px; border: 1px solid var(--line-strong); background: #fff; }
.secondary-button:hover, .filter-button:hover { border-color: var(--ink); }
.text-button { min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.text-button:hover { color: var(--ink); }

main { min-height: calc(100vh - 64px); }
.app-view { padding: 40px 0 80px; }
.app-view[hidden] { display: none; }
.app-view.is-entering { animation: view-in 240ms ease both; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.compact-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  min-height: 164px;
  padding: 26px 0 24px;
  border-bottom: 2px solid var(--ink);
}

.compact-hero h1 { max-width: 760px; font-size: 40px; line-height: 1.15; }
.compact-hero p { margin-bottom: 0; font-size: 15px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.eyebrow svg { width: 15px; height: 15px; }
.hero-actions { display: flex; gap: 10px; padding-bottom: 2px; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 2px solid var(--ink);
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  padding: 16px 22px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

button.summary-item { cursor: pointer; }
button.summary-item:hover { background: rgba(255, 255, 255, 0.66); }
.summary-item:last-child { border-right: 0; }
.summary-item:nth-child(1) { background: rgba(231, 240, 255, 0.58); }
.summary-item:nth-child(2) { background: rgba(255, 235, 229, 0.62); }
.summary-item:nth-child(3) { background: rgba(255, 243, 184, 0.58); }
.summary-item:nth-child(4) { background: rgba(244, 237, 247, 0.72); }
.summary-item strong, .summary-item small { display: block; }
.summary-item strong { font-size: 24px; line-height: 1.1; }
.summary-item small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.summary-icon, .module-mark, .item-placeholder, .large-placeholder, .event-cover, .goods-cover {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.summary-icon { width: 42px; height: 42px; border-radius: 8px; }
.summary-icon svg { width: 21px; height: 21px; }

.lost-tone { background: var(--lost-soft); color: var(--lost); }
.story-tone { background: var(--story-soft); color: var(--story); }
.event-tone { background: var(--event-soft); color: var(--event); }
.goods-tone { background: var(--goods-soft); color: var(--goods); }
.shout-tone { background: var(--shout-soft); color: var(--shout); }
.success-tone { background: var(--success-soft); color: var(--success); }
.lost-text { color: var(--lost); }
.event-text { color: var(--event); }
.goods-text { color: var(--goods); }
.shout-text { color: var(--shout); }
.success-text { color: var(--success); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; margin-top: 44px; }
.main-stream { min-width: 0; }
.content-section { margin-bottom: 56px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.section-kicker { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; }

.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.event-grid > .empty-state, .goods-grid > .empty-state { grid-column: 1 / -1; width: 100%; }
.content-card { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.content-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.event-card { display: grid; grid-template-columns: 42% minmax(0, 1fr); min-height: 230px; }
.event-card > img { width: 100%; height: 100%; object-fit: cover; }
.event-card-body { display: flex; min-width: 0; padding: 16px; flex-direction: column; }
.card-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.date-ticket { display: inline-flex; align-items: baseline; gap: 5px; color: var(--event); }
.date-ticket b { font-size: 24px; line-height: 1; }
.date-ticket small { font-size: 11px; font-weight: 700; }
.event-card h2, .event-card h3 { min-height: 46px; margin-bottom: 10px; }
.meta { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; line-height: 1.45; }
.meta svg, .row-meta svg { width: 14px; height: 14px; flex: 0 0 auto; }
.status { display: inline-flex; width: fit-content; min-height: 24px; align-items: center; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.event-status { background: var(--event-soft); color: #a13b26; }
.open-status, .returned-status { background: var(--success-soft); color: var(--success); }
.lost-status { background: var(--lost-soft); color: var(--lost); }
.verify-status { background: var(--goods-soft); color: #7b5b0f; }
.card-action { justify-content: space-between; min-height: 34px; margin-top: auto; padding: 0; border: 0; background: transparent; color: var(--primary); font-size: 13px; }
.card-action svg { width: 16px; height: 16px; transition: transform 140ms ease; }
.card-action:hover svg { transform: translate(2px, -2px); }

.lost-list { border-top: 1px solid var(--line); }
.lost-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 40px; align-items: center; gap: 16px; min-height: 104px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lost-row > img, .item-placeholder { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; }
.item-placeholder svg { width: 27px; height: 27px; }
.lost-copy > div { display: flex; align-items: center; gap: 9px; }
.lost-copy h3 { margin: 0; }
.lost-copy p { margin: 6px 0 0; font-size: 12px; }

.goods-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.goods-card { position: relative; }
.goods-card > img, .goods-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.goods-cover svg { width: 40px; height: 40px; }
.goods-card-body { position: relative; padding: 14px; }
.goods-card-body h2, .goods-card-body h3 { padding-right: 32px; }
.goods-card-body p { min-height: 42px; margin-bottom: 0; font-size: 12px; line-height: 1.55; }
.category-label { display: block; margin-bottom: 7px; color: var(--goods); font-size: 11px; font-weight: 750; }
.save-button { position: absolute; top: 12px; right: 10px; display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.save-button:hover, .save-button.is-saved { background: var(--goods-soft); color: var(--goods); }
.save-button svg { width: 18px; height: 18px; }
.goods-footer { display: flex; align-items: center; justify-content: space-between; min-height: 38px; margin-top: 10px; font-size: 13px; }
.goods-footer .save-button { position: static; }
.goods-actions { display: flex; align-items: center; gap: 4px; }

.side-rail { align-self: start; padding-left: 28px; border-left: 2px solid var(--ink); }
.rail-section { padding: 4px 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.rail-section:last-child { border-bottom: 0; }
.rail-title { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; }
.rail-title svg { width: 18px; height: 18px; color: var(--primary); }
.rail-title h2 { font-size: 15px; }
.schedule-list { padding: 0; margin: 0; list-style: none; }
.schedule-list li { display: grid; grid-template-columns: 58px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.schedule-list li > span { color: var(--event); font-size: 12px; font-weight: 750; }
.schedule-list strong, .schedule-list small { display: block; }
.schedule-list strong { font-size: 13px; }
.schedule-list small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }
.progress-copy { display: flex; align-items: baseline; gap: 10px; }
.progress-copy strong { font-size: 24px; }
.progress-copy span { color: var(--muted); font-size: 12px; }
.progress-track { height: 6px; margin-top: 14px; overflow: hidden; border-radius: 4px; background: var(--line); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--primary); transition: width 300ms ease; }
.safety-section p { margin-bottom: 8px; font-size: 12px; }

.module-page { padding-top: 44px; }
.module-header { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 20px; min-height: 158px; padding: 28px 24px; border: 2px solid var(--ink); }
.module-header h1 { font-size: 32px; }
.module-header p { margin-bottom: 0; font-size: 14px; }
.module-mark { width: 56px; height: 56px; border-radius: 8px; }
.module-mark svg { width: 27px; height: 27px; }
#view-lost .module-header { background: var(--lost-soft); }
#view-stories .module-header { background: var(--story-soft); }
#view-shouts .module-header { background: var(--shout-soft); }
#view-events .module-header { background: var(--event-soft); }
#view-goods .module-header { background: var(--goods-soft); }
.filter-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--ink); }
.segmented-control { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #edf0ec; }
.segmented-control button { min-width: 68px; height: 34px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; }
.segmented-control button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(30, 41, 33, 0.12); }

.shout-page { padding-top: 28px; }
.shout-header { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 0 0 18px; }
.shout-header-icon { display: grid; width: 48px; height: 48px; place-items: center; border: 2px solid var(--ink); border-radius: 8px; background: var(--signal); }
.shout-header-icon svg { width: 23px; height: 23px; }
.shout-header h1 { margin: 0 0 3px; font-size: 27px; }
.shout-header p { margin: 0; font-size: 12px; }
.shout-live-status { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 11px; font-weight: 750; }
.shout-live-status svg { width: 15px; height: 15px; }
.shout-live-status.is-connecting { color: var(--muted); }
.shout-live-status.is-fallback { color: #7d5e15; }
.shout-live-status.is-paused { color: var(--danger); }
.shout-chat { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.shout-chat-toolbar { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--line); background: #f7f8f5; color: var(--muted); font-size: 11px; }
.shout-chat-toolbar > span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 750; }
.shout-chat-toolbar svg { width: 15px; height: 15px; color: var(--shout); }
.shout-feed { height: min(52vh, 520px); min-height: 360px; overflow-y: auto; padding: 22px 20px; background: #fbfcfa; scroll-behavior: smooth; }
.shout-feed .empty-state { min-height: 100%; }
.shout-message { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: end; gap: 9px; margin-bottom: 18px; }
.shout-avatar { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--shout-soft); color: var(--shout); font-size: 12px; font-weight: 800; }
.shout-message-main { min-width: 0; max-width: 76%; }
.shout-message-meta { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 5px; font-size: 11px; }
.shout-message-meta strong { font-size: 12px; }
.shout-message-meta time { color: var(--muted); }
.shout-bubble { display: flex; align-items: flex-end; gap: 8px; width: fit-content; max-width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #edf0ec; }
.shout-bubble p { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.shout-message-actions { display: flex; flex: 0 0 auto; margin: 0 -5px -5px 0; opacity: 0.55; }
.shout-message-actions .icon-button { width: 30px; height: 30px; }
.shout-message-actions svg { width: 14px; height: 14px; }
.shout-message.is-own { grid-template-columns: minmax(0, 1fr) 36px; }
.shout-message.is-own .shout-avatar { grid-column: 2; background: var(--success-soft); color: var(--success); }
.shout-message.is-own .shout-message-main { grid-column: 1; grid-row: 1; justify-self: end; }
.shout-message.is-own .shout-message-meta { justify-content: flex-end; }
.shout-message.is-own .shout-bubble { margin-left: auto; border-color: #b9d9c5; background: var(--success-soft); }
.shout-composer { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 10px; padding: 14px 16px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.shout-composer textarea { width: 100%; min-height: 54px; max-height: 110px; padding: 14px; resize: none; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; background: #fff; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.5; transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease; }
.shout-composer textarea::placeholder { color: #7b827d; opacity: 1; }
.shout-composer textarea:hover { border-color: #8e9891; }
.shout-composer textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(35, 122, 87, 0.12); }
.shout-send-button { width: 100%; min-height: 54px; }
.shout-compose-meta { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 16px; color: var(--muted); font-size: 10px; }
.shout-compose-meta small { display: inline-flex; min-width: 0; align-items: center; gap: 5px; }
.shout-compose-meta svg { width: 13px; height: 13px; color: var(--success); flex: 0 0 auto; }
.shout-composer .form-error { grid-column: 1 / -1; margin: 0; }
.shout-composer textarea:disabled, .shout-composer button:disabled { cursor: not-allowed; opacity: 0.58; }
.home-shouts { border-top: 1px solid var(--line); }
.home-shouts .empty-state { min-height: 120px; }
.home-shout-row { display: grid; grid-template-columns: 108px minmax(0, 1fr) 24px; width: 100%; min-height: 58px; align-items: center; gap: 12px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.home-shout-row > span { display: flex; align-items: center; gap: 7px; color: var(--shout); font-size: 11px; font-weight: 750; }
.home-shout-row > span svg, .home-shout-row > svg { width: 16px; height: 16px; }
.home-shout-row > p { margin: 0; color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-shout-row > svg { color: var(--muted); }
.admin-list-divider { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 6px; padding: 9px 0; border-top: 2px solid var(--ink); color: var(--shout); font-size: 12px; font-weight: 800; }

.module-list { border-top: 1px solid var(--line); }
.large-list-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 22px; min-height: 162px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.large-list-row > img, .large-placeholder { width: 120px; height: 120px; border-radius: 8px; object-fit: cover; }
.large-placeholder svg { width: 40px; height: 40px; }
.large-list-row h2 { margin: 8px 0 5px; font-size: 18px; }
.large-list-row p { max-width: 650px; margin-bottom: 8px; font-size: 13px; }
.row-meta { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }

.story-feed { border-top: 1px solid var(--line); }
#view-stories > .shell { max-width: var(--shell); }
#view-stories .filter-toolbar, #view-stories .story-feed { width: min(100%, 900px); margin-right: auto; margin-left: auto; }
.story-entry { padding: 26px 0; border-bottom: 1px solid var(--line); }
.story-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--story); font-size: 12px; font-weight: 700; }
.story-meta time { margin-left: auto; color: var(--muted); font-weight: 400; }
.story-symbol { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--story-soft); }
.story-symbol svg { width: 15px; height: 15px; }
.story-entry h2 { margin-bottom: 8px; font-size: 19px; }
.story-entry p { max-width: 760px; margin-bottom: 12px; font-size: 14px; }
.story-actions { display: flex; align-items: center; justify-content: space-between; }
.reaction-button { min-height: 34px; padding: 0 9px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.reaction-button:hover, .reaction-button.is-reacted { background: var(--story-soft); color: var(--story); }
.reaction-button svg { width: 16px; height: 16px; }

.full-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.event-cover { min-height: 230px; }
.event-cover svg { width: 48px; height: 48px; }
.full-goods-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filterable.is-filtered-out, [data-searchable].is-search-hidden { display: none; }

.rules-page { padding-top: 44px; }
.rules-shell { max-width: 1080px; }
.rules-header { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 18px; padding: 8px 0 34px; border-bottom: 2px solid var(--ink); }
.rules-header h1 { margin-bottom: 8px; font-size: 34px; }
.rules-header p { max-width: 720px; margin-bottom: 0; font-size: 14px; }
.rules-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 52px; padding: 36px 0 72px; }
.rules-index { position: sticky; top: 98px; display: grid; align-self: start; border-top: 2px solid var(--ink); }
.rules-index strong { padding: 14px 4px 10px; font-size: 12px; }
.rules-index button { min-height: 42px; padding: 8px 4px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--muted); text-align: left; font-size: 12px; cursor: pointer; }
.rules-index button:hover { color: var(--primary); }
.rules-document { min-width: 0; border-top: 2px solid var(--ink); }
.rules-section { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; padding: 30px 0 32px; border-bottom: 1px solid var(--line-strong); scroll-margin-top: 86px; }
.rules-section h2 { margin-bottom: 14px; font-size: 20px; }
.rules-section p, .rules-section li, .rules-definitions dd { color: var(--muted); font-size: 14px; line-height: 1.8; }
.rules-section p:last-child { margin-bottom: 0; }
.rules-section ul { padding-left: 20px; margin: 0; }
.rules-section li + li { margin-top: 8px; }
.rules-number { color: var(--primary); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; font-weight: 800; }
.rules-intro { background: var(--success-soft); }
.rules-intro > * { margin-top: 0; }
.rules-definitions { margin: 0; }
.rules-definitions > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.rules-definitions dt { font-size: 13px; font-weight: 800; }
.rules-definitions dd { margin: 0; }
.rules-end { display: flex; align-items: center; gap: 14px; margin-top: 26px; padding: 20px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.rules-end > svg { width: 28px; height: 28px; color: var(--primary); }
.rules-end strong, .rules-end small { display: block; }
.rules-end strong { margin-bottom: 4px; font-size: 15px; }
.rules-end small { color: var(--muted); font-size: 12px; }
.rules-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; }

.profile-page { padding-top: 44px; }
.profile-shell { max-width: 1040px; }
.profile-header { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 20px; min-height: 158px; padding: 28px 24px; border: 2px solid var(--ink); background: var(--success-soft); }
.profile-header h1 { margin-bottom: 8px; font-size: 32px; }
.profile-header p { margin-bottom: 0; font-size: 14px; }
.profile-avatar { display: grid; width: 56px; height: 56px; place-items: center; border: 2px solid var(--ink); border-radius: 8px; background: var(--signal); color: var(--ink); font-size: 20px; font-weight: 800; }
.profile-avatar svg { width: 27px; height: 27px; }
.profile-auth { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr); gap: 56px; padding: 46px 0; }
.auth-intro { padding: 8px 0; }
.auth-intro h2 { max-width: 420px; margin-bottom: 12px; font-size: 28px; }
.auth-intro > p { max-width: 430px; margin-bottom: 28px; }
.auth-points { padding: 0; margin: 0; list-style: none; }
.auth-points li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); }
.auth-points li > svg { width: 21px; height: 21px; margin: 2px 0 0 7px; color: var(--primary); }
.auth-points strong, .auth-points small { display: block; }
.auth-points strong { margin-bottom: 4px; font-size: 14px; }
.auth-points small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-form-shell { padding-left: 48px; border-left: 2px solid var(--ink); }
.auth-tabs { width: 100%; margin-bottom: 24px; }
.auth-tabs button { flex: 1; }
.auth-form { display: grid; gap: 16px; }
.auth-step-heading { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.auth-step-heading strong, .auth-step-heading small { display: block; }
.auth-step-heading strong { margin-bottom: 4px; font-size: 15px; }
.auth-step-heading small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.form-field { display: grid; gap: 7px; }
.form-field label { font-size: 12px; font-weight: 750; }
.form-field input, .form-field textarea, .form-field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; background: #fff; color: var(--ink); font: inherit; font-size: 14px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(35, 122, 87, 0.12); }
.form-field .totp-code-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 20px; font-weight: 800; text-align: center; }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.password-field .password-toggle { position: absolute; top: 2px; right: 2px; width: 40px; height: 40px; }
.agreement-row { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.5; cursor: pointer; }
.agreement-row input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--primary); }
.registration-agreement { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.registration-agreement .agreement-read-button { justify-self: start; }
.registration-agreement > small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-error { min-height: 19px; margin: -4px 0 0; color: var(--danger); font-size: 12px; line-height: 1.5; }
.form-submit { width: 100%; }
.auth-switch { width: fit-content; margin: -4px auto 0; }
.profile-overview { padding: 34px 0 28px; border-bottom: 2px solid var(--ink); }
.my-invites { padding: 30px 0 8px; border-bottom: 2px solid var(--ink); }
.my-invites-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.my-invites-intro { margin: -3px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.my-invite-list { border-top: 1px solid var(--line); }
.my-invite-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 36px; align-items: center; gap: 11px; min-height: 66px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.my-invite-row.is-inactive { opacity: 0.58; }
.my-invite-row > div { min-width: 0; }
.my-invite-row code, .my-invite-row small { display: block; }
.my-invite-row code { overflow-wrap: anywhere; font-size: 13px; font-weight: 800; }
.my-invite-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.my-invite-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 8px; background: var(--goods-soft); color: #7d5e15; }
.my-invite-icon svg { width: 18px; height: 18px; }
.profile-identity { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.profile-avatar-large { width: 76px; height: 76px; border-radius: 8px; font-size: 28px; }
.profile-identity h2 { margin-bottom: 4px; font-size: 24px; }
.profile-identity p { margin-bottom: 4px; font-size: 13px; }
.profile-identity small { color: var(--muted); font-size: 12px; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-stats button { min-height: 82px; padding: 12px; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; }
.profile-stats button:last-child { border-right: 0; }
.profile-stats button:hover { background: rgba(255, 255, 255, 0.55); }
.profile-stats strong, .profile-stats small { display: block; }
.profile-stats strong { margin-bottom: 5px; font-size: 24px; }
.profile-stats small { color: var(--muted); font-size: 12px; }
.profile-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; padding: 36px 0; }
.profile-section-heading { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.profile-section-heading h2 { font-size: 19px; }
.profile-menu { border-top: 1px solid var(--line); }
.profile-menu > button { display: grid; width: 100%; grid-template-columns: 44px minmax(0, 1fr) 20px; align-items: center; gap: 12px; min-height: 78px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.profile-menu > button:hover { background: rgba(255, 255, 255, 0.55); }
.profile-menu-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 8px; }
.profile-menu-icon svg { width: 19px; height: 19px; }
.profile-menu strong, .profile-menu small { display: block; }
.profile-menu strong { margin-bottom: 4px; font-size: 14px; }
.profile-menu small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.profile-menu > button > svg { width: 17px; height: 17px; color: var(--muted); }
.settings-panel { padding: 30px 0 50px; }
.profile-activity-panel { padding: 30px 0 50px; }
.admin-panel { padding: 30px 0 60px; }
.activity-tabs { margin: 24px 0 12px; }
.activity-list { border-top: 1px solid var(--line); }
.activity-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 86px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.activity-row-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 8px; }
.activity-row-icon svg { width: 19px; height: 19px; }
.activity-row h3 { margin: 0 0 4px; font-size: 15px; }
.activity-row p { margin: 0; font-size: 12px; line-height: 1.5; }
.activity-row .row-meta { margin-top: 5px; }
.claim-status-copy { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.handoff-code { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px dashed var(--primary); border-radius: 6px; background: var(--success-soft); color: var(--primary-dark); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 15px; font-weight: 800; letter-spacing: 0; }
.empty-state { display: grid; min-height: 190px; place-items: center; padding: 32px; color: var(--muted); text-align: center; }
.empty-state svg { width: 28px; height: 28px; margin-bottom: 10px; }
.empty-state strong, .empty-state small { display: block; }
.empty-state small { margin-top: 6px; line-height: 1.5; }
.subpage-header { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.subpage-header .eyebrow { margin-bottom: 3px; }
.subpage-header h2 { font-size: 24px; }
.settings-group { padding: 28px 0 10px; border-bottom: 1px solid var(--line); }
.settings-group h3 { margin-bottom: 8px; font-size: 14px; }
.setting-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 48px; align-items: center; gap: 18px; min-height: 76px; border-top: 1px solid var(--line); cursor: pointer; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { margin-bottom: 4px; font-size: 14px; }
.setting-row small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.setting-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-control { position: relative; width: 44px; height: 24px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--line); transition: background 150ms ease, border-color 150ms ease; }
.switch-control::after { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); content: ""; transition: transform 150ms ease; }
.setting-row input:checked + .switch-control { border-color: var(--primary); background: var(--primary); }
.setting-row input:checked + .switch-control::after { transform: translateX(20px); }
.setting-row input:focus-visible + .switch-control { outline: 2px solid var(--lost); outline-offset: 2px; }
.settings-actions { display: flex; align-items: center; gap: 10px; padding-top: 24px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 30px; padding: 22px 0; border-top: 2px solid var(--danger); border-bottom: 1px solid #e3b8b8; }
.danger-zone strong, .danger-zone small { display: block; }
.danger-zone strong { margin-bottom: 5px; color: var(--danger); font-size: 15px; }
.danger-zone small { color: var(--muted); font-size: 12px; }
.danger-zone .danger-button { margin-left: 0; flex: 0 0 auto; }
.danger-text { color: var(--danger); }
.danger-button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; margin-left: auto; padding: 0 14px; border: 1px solid #d9a5a5; border-radius: 8px; background: #fff; color: var(--danger); font-weight: 650; cursor: pointer; }
.danger-button:hover { border-color: var(--danger); background: #fff4f4; }
.danger-button svg { width: 17px; height: 17px; }
.detail-footer { align-items: center; justify-content: space-between; }
.detail-footer > div { display: flex; align-items: center; gap: 8px; }
.detail-safety-actions .text-button { color: var(--muted); }
.detail-safety-actions .text-button:hover { color: var(--danger); }
.recovery-code-content { display: grid; gap: 18px; padding: 24px 0; }
.recovery-code-content p { margin: 0; }
.recovery-code-content code { display: block; padding: 18px; border: 2px dashed var(--primary); border-radius: 8px; background: var(--success-soft); color: var(--primary-dark); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(15px, 4vw, 21px); font-weight: 800; letter-spacing: 0; text-align: center; overflow-wrap: anywhere; }
.recovery-code-content .secondary-button { width: 100%; }
.blocked-users-list { min-height: 170px; padding-top: 10px; }
.blocked-user-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 68px; border-bottom: 1px solid var(--line); }
.blocked-user-row .profile-avatar { width: 36px; height: 36px; border-width: 1px; font-size: 14px; }
.blocked-user-row strong, .blocked-user-row small { display: block; }
.blocked-user-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }

#admin-totp-dialog .dialog-panel { max-height: min(760px, calc(100vh - 32px)); overflow-y: auto; }
.totp-status-view { display: grid; gap: 18px; padding: 24px 0 2px; }
.totp-status-summary { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.totp-status-summary strong, .totp-status-summary small { display: block; }
.totp-status-summary strong { margin-bottom: 4px; font-size: 15px; }
.totp-status-summary small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.totp-status-view > button { width: fit-content; margin-left: auto; }
.totp-setup-form { padding-top: 4px; }
.totp-setup-block { padding: 20px 0; border-bottom: 1px solid var(--line); }
.totp-setup-block h3 { margin-bottom: 6px; font-size: 17px; }
.totp-setup-block > p { margin-bottom: 14px; font-size: 12px; }
.totp-secret-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; gap: 8px; }
.totp-secret { display: block; min-width: 0; padding: 12px; overflow-x: auto; border: 1px dashed var(--primary); border-radius: 8px; background: var(--success-soft); color: var(--primary-dark); font: 800 14px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.totp-uri { display: block; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--muted); font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }

.admin-toolbar { padding: 26px 0 30px; border-bottom: 2px solid var(--ink); }
.invite-distribution { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.invite-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.invite-section-heading h3 { margin: 2px 0 5px; font-size: 19px; }
.invite-section-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.invite-config-grid { display: grid; grid-template-columns: minmax(180px, 0.8fr) minmax(120px, 0.45fr) auto; align-items: end; gap: 10px; }
.invite-config-grid label { display: grid; gap: 6px; color: var(--ink); font-size: 12px; font-weight: 750; }
.admin-toolbar select, .admin-toolbar input:not([type="checkbox"]), .admin-action-form input { min-height: 40px; min-width: 0; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); }
.invite-recipient-toolbar { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; border-top: 1px solid var(--line); }
.invite-select-all { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; cursor: pointer; }
.invite-select-all input, .invite-recipient-row > input { width: 17px; height: 17px; accent-color: var(--primary); }
.invite-recipient-toolbar > span { color: var(--muted); font-size: 11px; }
.invite-recipient-list { max-height: 310px; overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.invite-recipient-row { display: grid; grid-template-columns: 18px 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 68px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.invite-recipient-row:last-child { border-bottom: 0; }
.invite-recipient-row:hover { background: rgba(255, 255, 255, 0.55); }
.invite-recipient-row strong, .invite-recipient-row small { display: block; }
.invite-recipient-row strong { margin-bottom: 3px; font-size: 13px; }
.invite-recipient-row small { color: var(--muted); font-size: 10px; }
.invite-recipient-row em { color: var(--muted); font-size: 10px; font-style: normal; white-space: nowrap; }
.invite-recipient-avatar { width: 36px; height: 36px; border-width: 1px; font-size: 13px; }
.invite-distribution .form-error { margin-top: 10px; }
.invite-direct { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.invite-direct .invite-section-heading { margin: 0; }
.invite-direct form { display: grid; grid-template-columns: 140px 92px auto; gap: 10px; }
.admin-maintenance { padding: 30px 0; border-bottom: 2px solid var(--ink); }
.admin-governance { padding: 30px 0; border-bottom: 2px solid var(--ink); }
.admin-approvals { padding: 30px 0; border-bottom: 2px solid var(--ink); }
.admin-governance form { margin-top: 14px; }
.governance-section { padding-bottom: 18px; border-top: 1px solid var(--line); }
.governance-toggle { border-top: 0; }
.governance-reason { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 12px; }
.governance-reason label { grid-column: 1 / -1; font-size: 12px; font-weight: 750; }
.governance-reason input, .member-search input, .member-action-form input, .member-action-form select { min-height: 40px; min-width: 0; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); }
.governance-terms { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.governance-terms label { font-size: 12px; font-weight: 750; }
.governance-terms textarea { width: 100%; min-height: 116px; padding: 10px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.governance-terms small { color: var(--muted); font-size: 10px; }
.governance-actions { display: flex; justify-content: flex-end; padding-top: 14px; border-top: 1px solid var(--line); }
.approval-list { margin-top: 16px; border-top: 1px solid var(--line); }
.approval-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.approval-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.approval-row-head strong, .approval-row-head small { display: block; }
.approval-row-head strong { margin-bottom: 4px; font-size: 14px; }
.approval-row-head small, .approval-row time { color: var(--muted); font-size: 10px; }
.approval-row p { margin: 8px 0 5px; font-size: 12px; line-height: 1.5; }
.approval-action-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 12px; }
.approval-action-form input { min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); }
.approval-waiting, .approval-review-note { display: inline-flex; min-height: 30px; align-items: center; gap: 7px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.approval-waiting svg { width: 15px; height: 15px; color: var(--goods); }
.member-action-unavailable { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.maintenance-health { display: inline-flex; min-height: 28px; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.maintenance-health svg { width: 16px; height: 16px; color: var(--success); }
.maintenance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 16px; }
.maintenance-summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 80px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.maintenance-summary strong, .maintenance-summary small { display: block; }
.maintenance-summary strong { margin-bottom: 4px; font-size: 14px; }
.maintenance-summary small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.maintenance-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 8px; }
.maintenance-icon svg { width: 19px; height: 19px; }
.backup-history { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.backup-history-item { display: inline-flex; min-height: 34px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 11px; }
.backup-history-item code { font-size: 10px; font-weight: 750; }
.backup-history-item small { color: var(--muted); }
.generated-codes { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.generated-codes > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.generated-codes pre { margin: 12px 0 0; padding: 14px; overflow-x: auto; border: 1px dashed var(--primary); border-radius: 8px; background: var(--success-soft); font: 700 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.invite-records { padding-top: 26px; }
.invite-history { border-top: 1px solid var(--line); }
.invite-history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 62px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 11px; }
.invite-history-item > span:first-child { min-width: 0; }
.invite-history-item > span:last-child { display: flex; align-items: center; gap: 7px; }
.invite-history-item code, .invite-history-item small { display: block; }
.invite-history-item code { overflow-wrap: anywhere; font-weight: 800; }
.invite-history-item small { margin-top: 3px; color: var(--muted); }
.invite-history-item button { width: 30px; height: 30px; }
.admin-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; padding: 34px 0; }
.admin-section { min-width: 0; }
.admin-section .profile-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.admin-section h3 { font-size: 19px; }
.admin-count { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; }
.admin-list, .admin-log-list { border-top: 1px solid var(--line); }
.admin-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.admin-item-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-item h4 { margin: 0 0 5px; font-size: 14px; }
.admin-item p { margin: 0; font-size: 12px; line-height: 1.55; }
.admin-item-meta { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.admin-action-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; margin-top: 12px; }
.admin-action-form .danger-button { margin-left: 0; }
.admin-report-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.admin-report-actions .danger-button { margin-left: 0; }
.admin-log-section { padding-top: 8px; }
.member-management { padding: 8px 0 34px; border-bottom: 2px solid var(--ink); }
.member-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin: 16px 0 20px; }
.member-search label { grid-column: 1 / -1; font-size: 12px; font-weight: 750; }
.member-list { border-top: 1px solid var(--line); }
.member-row { display: grid; grid-template-columns: 44px minmax(210px, 0.75fr) minmax(420px, 1.25fr); gap: 16px; align-items: start; min-height: 96px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.member-avatar { width: 44px; height: 44px; border-width: 1px; font-size: 16px; }
.member-row-copy { display: grid; min-width: 0; align-content: start; gap: 5px; padding-top: 1px; }
.member-identity { display: flex; min-width: 0; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.member-identity strong { font-size: 14px; line-height: 1.4; }
.member-identity span { color: var(--muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.member-source, .member-reason { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.member-action-form { display: grid; grid-template-columns: 116px minmax(120px, 1fr) auto auto; gap: 7px; align-items: center; }
.member-action-form .danger-button { margin-left: 0; }
.member-state { display: inline-flex; width: fit-content; min-height: 22px; align-items: center; margin-top: 1px; padding: 0 7px; border-radius: 6px; background: var(--success-soft); color: var(--success); font-size: 10px; font-weight: 750; }
.member-state.is-muted { background: var(--goods-soft); color: #7d5e15; }
.member-state.is-banned { background: #fff4f4; color: var(--danger); }
.admin-log-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); font-size: 12px; }
.admin-log-row code { font-size: 11px; }
.admin-log-row time { color: var(--muted); font-size: 10px; text-align: right; }
.moderation-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.moderation-badge.pending { border-color: #d4ad52; background: var(--goods-soft); color: #7d5e15; }
.moderation-badge.hidden, .moderation-badge.rejected { border-color: #d9a5a5; background: #fff4f4; color: var(--danger); }
.moderation-badge.archived { border-color: var(--line-strong); background: #f2f3ef; color: var(--muted); }
.moderation-badge.approved { border-color: #a9cfb4; background: var(--success-soft); color: var(--success); }
.publish-option:disabled { cursor: not-allowed; opacity: 0.58; }
.dialog-form-fields { display: grid; gap: 16px; padding: 20px 0; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three-columns { grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 0.8fr)); }
.field-help { color: var(--muted); font-size: 11px; line-height: 1.45; }
.avatar-swatches { display: flex; gap: 10px; }
.avatar-swatches label { cursor: pointer; }
.avatar-swatches input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.avatar-swatch { display: block; width: 40px; height: 40px; border: 2px solid transparent; border-radius: 8px; }
.avatar-swatches input:checked + .avatar-swatch { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.swatch-green { background: var(--success-soft); }
.swatch-blue { background: var(--lost-soft); }
.swatch-yellow { background: var(--goods-soft); }
.swatch-purple { background: var(--story-soft); }
.profile-avatar[data-tone="green"], .avatar-button[data-tone="green"] { background: var(--success-soft); color: var(--success); }
.profile-avatar[data-tone="blue"], .avatar-button[data-tone="blue"] { background: var(--lost-soft); color: var(--lost); }
.profile-avatar[data-tone="yellow"], .avatar-button[data-tone="yellow"] { background: var(--goods-soft); color: var(--goods); }
.profile-avatar[data-tone="purple"], .avatar-button[data-tone="purple"] { background: var(--story-soft); color: var(--story); }

.mobile-nav { display: none; }

.app-dialog {
  width: min(calc(100% - 32px), 570px);
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(20, 28, 22, 0.2);
}
.compose-dialog { width: min(calc(100% - 32px), 680px); }
.compose-dialog .dialog-panel { max-height: min(780px, calc(100vh - 32px)); overflow-y: auto; }
.notification-list, .claims-list { max-height: min(560px, calc(100vh - 190px)); overflow-y: auto; }
.notification-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 16px 2px; border-bottom: 1px solid var(--line); }
.notification-item.is-unread { background: var(--lost-soft); }
.notification-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; background: var(--surface); color: var(--primary); }
.notification-icon svg { width: 17px; height: 17px; }
.notification-item h3 { margin: 0 0 4px; font-size: 14px; }
.notification-item p { margin: 0 0 6px; font-size: 12px; line-height: 1.5; }
.notification-item time { color: var(--muted); font-size: 10px; }
.claim-review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.claim-review h3 { margin-bottom: 6px; font-size: 15px; }
.claim-review > p { margin-bottom: 12px; font-size: 13px; }
.claim-review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.handoff-form { display: grid; grid-template-columns: minmax(0, 180px) auto; gap: 8px; margin-top: 12px; }
.handoff-form input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; }

.app-dialog::backdrop { background: rgba(26, 32, 27, 0.58); }
.app-dialog[open] { animation: dialog-in 180ms ease both; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dialog-panel { padding: 24px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 23px; }
.publish-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 20px 0; }
.publish-option { display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; align-items: center; gap: 12px; min-height: 86px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-align: left; cursor: pointer; transition: transform 140ms ease, border-color 140ms ease, background 140ms ease; }
.publish-option:hover, .publish-option.is-selected { transform: translateY(-2px); border-color: var(--primary); background: #f7fbf8; }
.publish-option .module-mark { width: 44px; height: 44px; }
.publish-option .module-mark svg { width: 21px; height: 21px; }
.publish-option strong, .publish-option small { display: block; }
.publish-option strong { margin-bottom: 5px; font-size: 14px; }
.publish-option small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.publish-option > svg { width: 17px; height: 17px; color: var(--muted); }
.privacy-note { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 12px; }
.privacy-note svg { width: 18px; height: 18px; color: var(--primary); }
.detail-panel { min-height: 360px; }
.detail-panel #detail-content { padding: 20px 0; }
.detail-summary { display: grid; gap: 14px; }
.detail-summary p { margin: 0; }
.detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-fact { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.detail-fact small, .detail-fact strong { display: block; }
.detail-fact small { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.detail-fact strong { font-size: 13px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 32px);
  min-height: 46px;
  padding: 0 16px;
  transform: translateY(80px);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast svg { width: 18px; height: 18px; }

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--lost); outline-offset: 2px; }

@media (max-width: 1080px) {
  .topbar-inner { gap: 12px; }
  .site-search { min-width: 150px; max-width: 200px; }
  .top-actions .avatar-button { display: none; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 28px; }
  .full-goods-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  body { padding-bottom: 70px; }
  .shell { width: min(calc(100% - 32px), var(--shell)); }
  .desktop-nav { display: none; }
  .site-search { max-width: none; }
  .top-actions .avatar-button { display: none; }
  .top-actions .publish-trigger, .compact-hero .publish-trigger, .module-header > .primary-button { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 0; }
  .side-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 24px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .rail-section { margin: 0; }
  .safety-section { grid-column: 1 / -1; }
  .full-goods-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 64px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(12px); }
  .mobile-nav-item { display: flex; min-width: 0; min-height: 64px; align-items: center; justify-content: center; gap: 3px; flex-direction: column; border: 0; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
  .mobile-nav-item svg { width: 20px; height: 20px; }
  .mobile-nav-item.is-active { color: var(--primary); }
  .mobile-publish svg { width: 30px; height: 30px; padding: 5px; border: 1px solid var(--ink); border-radius: 50%; background: var(--signal); color: var(--ink); }
  .profile-auth { grid-template-columns: 1fr; gap: 28px; }
  .auth-form-shell { padding: 28px 0 0; border-top: 2px solid var(--ink); border-left: 0; }
  .profile-columns { gap: 28px; }
  .admin-columns { grid-template-columns: 1fr; gap: 34px; }
  .maintenance-grid { grid-template-columns: 1fr; gap: 8px; }
  .member-row { grid-template-columns: 44px minmax(0, 1fr); }
  .member-action-form { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .topbar { height: 56px; }
  .topbar-inner { gap: 10px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 32px; height: 32px; }
  .site-search { width: 40px; min-width: 40px; margin-left: auto; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .site-search input, .site-search kbd { display: none; }
  .site-search.is-mobile-open {
    position: fixed;
    top: 7px;
    right: 14px;
    left: 14px;
    z-index: 60;
    width: auto;
    max-width: none;
    padding: 0 11px;
    justify-content: flex-start;
    border-color: var(--primary);
    background: #fff;
    box-shadow: var(--shadow);
  }
  .site-search.is-mobile-open input { display: block; }
  .site-search.is-mobile-open .search-close { display: grid; width: 40px; height: 40px; flex-basis: 40px; }
  .topbar.search-mode .brand, .topbar.search-mode .top-actions { visibility: hidden; pointer-events: none; }
  .top-actions { gap: 2px; }
  main { min-height: calc(100vh - 126px); }
  .app-view { padding: 24px 0 48px; }
  .compact-hero { display: block; min-height: 136px; padding: 12px 0 22px; }
  .compact-hero h1 { font-size: 27px; }
  .compact-hero p { font-size: 13px; }
  .hero-actions { display: none; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-item { min-height: 76px; padding: 12px; }
  .summary-item:nth-child(2) { border-right: 0; }
  .summary-item:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .summary-icon { width: 36px; height: 36px; }
  .summary-item strong { font-size: 20px; }
  .dashboard-grid { margin-top: 34px; }
  .content-section { margin-bottom: 42px; }
  .main-stream .content-section:last-child { margin-bottom: 0; }
  .event-grid, .full-event-grid { grid-template-columns: 1fr; }
  .event-card { grid-template-columns: 40% minmax(0, 1fr); min-height: 218px; }
  .event-card-body { padding: 14px; }
  .home-goods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-goods .goods-card:nth-child(3) { display: none; }
  .goods-card-body { padding: 12px; }
  .goods-card-body p { min-height: 57px; }
  .side-rail { grid-template-columns: 1fr; gap: 0; }
  .safety-section { grid-column: auto; }
  .module-page { padding-top: 24px; }
  .module-header { grid-template-columns: 50px minmax(0, 1fr); gap: 14px; min-height: 124px; padding-bottom: 22px; }
  .module-header .module-mark { width: 48px; height: 48px; }
  .module-header h1 { font-size: 26px; }
  .module-header p { font-size: 12px; }
  .filter-toolbar { position: sticky; top: 56px; z-index: 20; padding: 12px 0; overflow: hidden; background: var(--bg); }
  .segmented-control { max-width: calc(100vw - 90px); overflow-x: auto; }
  .segmented-control button { min-width: 62px; height: 40px; }
  .shout-page { padding-top: 16px; padding-bottom: 20px; }
  .shout-header { grid-template-columns: 42px minmax(0, 1fr); gap: 11px; padding-bottom: 12px; }
  .shout-header-icon { width: 42px; height: 42px; }
  .shout-header h1 { font-size: 24px; }
  .shout-header p { font-size: 11px; line-height: 1.45; }
  .shout-live-status { grid-column: 2; margin-top: -4px; }
  .shout-chat-toolbar { min-height: 40px; padding: 0 12px; gap: 8px; font-size: 9px; }
  .shout-feed { height: calc(100dvh - 390px); min-height: 260px; padding: 16px 12px; }
  .shout-message { grid-template-columns: 32px minmax(0, 1fr); gap: 7px; margin-bottom: 15px; }
  .shout-message.is-own { grid-template-columns: minmax(0, 1fr) 32px; }
  .shout-avatar { width: 32px; height: 32px; }
  .shout-message-main { max-width: 86%; }
  .shout-bubble { padding: 9px 10px; }
  .shout-bubble p { font-size: 13px; }
  .shout-composer { grid-template-columns: minmax(0, 1fr) 52px; gap: 8px; padding: 10px; }
  .shout-composer textarea { min-height: 50px; }
  .shout-send-button { min-height: 50px; padding: 0; }
  .shout-send-button span { display: none; }
  .shout-compose-meta { grid-column: 1 / -1; gap: 8px; }
  .home-shout-row { grid-template-columns: 94px minmax(0, 1fr) 20px; }
  .filter-button { width: 40px; min-width: 40px; padding: 0; gap: 0; font-size: 0; }
  .filter-button svg { width: 18px; height: 18px; }
  .large-list-row { grid-template-columns: 78px minmax(0, 1fr); gap: 14px; min-height: 132px; }
  .large-list-row > img, .large-placeholder { width: 78px; height: 90px; }
  .large-list-row > .secondary-button { display: none; }
  .large-list-row h2 { font-size: 16px; }
  .large-list-row p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .full-goods-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .story-entry { padding: 22px 0; }
  .story-entry h2 { font-size: 17px; }
  .rules-page { padding-top: 24px; }
  .rules-header { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding-bottom: 24px; }
  .rules-header h1 { font-size: 27px; }
  .rules-header p { font-size: 12px; }
  .rules-layout { display: block; padding: 22px 0 48px; }
  .rules-index { position: static; display: flex; gap: 4px; padding: 8px 0; overflow-x: auto; border-top-width: 1px; border-bottom: 1px solid var(--line); }
  .rules-index strong { display: none; }
  .rules-index button { min-width: max-content; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 6px; background: var(--surface); }
  .rules-document { margin-top: 22px; }
  .rules-section { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 24px 0 26px; scroll-margin-top: 72px; }
  .rules-section h2 { font-size: 18px; }
  .rules-section p, .rules-section li, .rules-definitions dd { font-size: 13px; line-height: 1.75; }
  .rules-definitions > div { grid-template-columns: 1fr; gap: 4px; }
  .rules-actions { align-items: stretch; flex-direction: column-reverse; }
  .rules-actions button { width: 100%; }
  .publish-options { grid-template-columns: 1fr; }
  .app-dialog { margin-bottom: max(16px, env(safe-area-inset-bottom)); }
  .dialog-panel { padding: 18px; }
  .detail-facts { grid-template-columns: 1fr; }
  .toast { right: 16px; bottom: 80px; }
  .profile-page { padding-top: 24px; }
  .profile-header { grid-template-columns: 50px minmax(0, 1fr); gap: 14px; min-height: 118px; padding: 16px 18px; }
  .profile-header .profile-avatar { width: 48px; height: 48px; }
  .profile-header h1 { font-size: 26px; }
  .profile-header p { font-size: 12px; }
  .profile-header > .secondary-button { grid-column: 1 / -1; width: 100%; }
  .profile-auth { padding: 28px 0; }
  .profile-overview { padding: 26px 0 22px; }
  .auth-intro h2 { font-size: 23px; }
  .auth-intro > p { margin-bottom: 18px; font-size: 13px; }
  .profile-identity { grid-template-columns: 62px minmax(0, 1fr); gap: 14px; }
  .profile-avatar-large { width: 62px; height: 62px; }
  .profile-identity > .secondary-button { grid-column: 1 / -1; width: 100%; }
  .profile-stats { margin-top: 22px; }
  .profile-stats button { min-height: 72px; }
  .profile-columns { grid-template-columns: 1fr; gap: 34px; padding-top: 28px; }
  .settings-actions { align-items: stretch; flex-direction: column; }
  .settings-actions > * { width: 100%; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .danger-zone .danger-button { width: 100%; }
  .activity-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .activity-tabs button { min-width: 0; padding: 0 6px; }
  .activity-row { grid-template-columns: 40px minmax(0, 1fr); }
  .activity-row > .secondary-button, .activity-row > .danger-button { grid-column: 1 / -1; width: 100%; margin-left: 0; }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .form-grid.three-columns { grid-template-columns: 1fr; }
  .handoff-form { grid-template-columns: 1fr; }
  .danger-button { margin-left: 0; }
  .profile-dialog .dialog-panel { max-height: calc(100vh - 32px); overflow-y: auto; }
  .totp-status-view > button, .totp-setup-block > .secondary-button { width: 100%; margin-left: 0; }
  .totp-setup-form .dialog-footer { align-items: stretch; flex-direction: column; }
  .totp-setup-form .dialog-footer > button { width: 100%; }
  .detail-footer { align-items: stretch; flex-direction: column; }
  .detail-footer > div { justify-content: space-between; }
  .detail-footer > div:last-child > * { flex: 1; }
  .my-invites-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .my-invites-heading .text-button { align-self: flex-start; }
  .invite-config-grid { grid-template-columns: 1fr 1fr; }
  .invite-config-grid .primary-button { grid-column: 1 / -1; width: 100%; }
  .invite-recipient-row { grid-template-columns: 18px 36px minmax(0, 1fr); }
  .invite-recipient-row em { grid-column: 3; white-space: normal; }
  .invite-direct { grid-template-columns: 1fr; gap: 16px; }
  .invite-direct form { grid-template-columns: 1fr 1fr; }
  .invite-direct form button { grid-column: 1 / -1; width: 100%; }
  .invite-history-item { grid-template-columns: 1fr; gap: 8px; }
  .invite-history-item > span:last-child { justify-content: space-between; }
  .maintenance-summary { grid-template-columns: 40px minmax(0, 1fr); }
  .maintenance-summary > button { grid-column: 1 / -1; width: 100%; }
  .governance-reason, .member-search { grid-template-columns: 1fr; }
  .governance-reason label, .member-search label { grid-column: auto; }
  .governance-reason button, .member-search button { width: 100%; }
  .governance-actions .primary-button { width: 100%; }
  .member-action-form { grid-template-columns: 1fr 1fr; }
  .member-action-form select { grid-column: 1 / -1; }
  .member-action-form input { grid-column: 1 / -1; }
  .member-action-form button { width: 100%; }
  .admin-action-form { grid-template-columns: 1fr 1fr; }
  .admin-action-form input { grid-column: 1 / -1; }
  .approval-action-form { grid-template-columns: 1fr 1fr; }
  .approval-action-form input { grid-column: 1 / -1; }
  .approval-action-form button { width: 100%; }
  .admin-log-row { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 10px 0; }
  .admin-log-row time { grid-column: 1 / -1; text-align: left; }
  .blocked-user-row { grid-template-columns: 36px minmax(0, 1fr); padding: 10px 0; }
  .blocked-user-row .secondary-button { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 420px) {
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .event-card { grid-template-columns: 1fr; }
  .event-card > img, .event-cover { width: 100%; height: 160px; min-height: 160px; }
  .event-card h2, .event-card h3 { min-height: auto; }
  .lost-row { grid-template-columns: 62px minmax(0, 1fr) 34px; gap: 10px; }
  .lost-row > img, .item-placeholder { width: 62px; height: 62px; }
  .lost-copy > div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .home-goods, .full-goods-grid { grid-template-columns: 1fr; }
  .home-goods .goods-card:nth-child(3) { display: block; }
  .goods-card > img, .goods-cover { aspect-ratio: 16 / 10; }
  .section-heading h2 { font-size: 20px; }
}

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