/* =========================================================
   每日两句 · Two Lines
   白底 · 绿版块 · 极简文字
   ========================================================= */

:root {
  --bg: #ffffff;
  --paper: #f6faf7;
  --ink: #12241c;
  --ink-soft: #33473e;
  --muted: #5f7268;
  --line: #e2ebe6;
  --line-strong: #bcd1c5;
  --green: #0f7a52;
  --green-deep: #0a5c3d;
  --green-dark: #073f2a;
  --green-soft: #edf7f1;
  --green-tint: #dcefe4;
  --danger: #b3462f;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-lift: 0 26px 48px -26px rgba(7, 63, 42, 0.5);
  --shadow-card: 0 14px 30px -24px rgba(7, 63, 42, 0.45);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
    "Noto Serif CJK SC", "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --tab-h: 66px;
  /* 全站只有浅色主题；only light 同时关闭浏览器强制深色，让表单控件保持浅色 */
  color-scheme: light;
  color-scheme: only light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--green-tint); color: var(--green-dark); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- shell ---------- */

.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.app-shell--write .tabbar { display: none; }
.app-shell--write .main { padding-bottom: 34px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.main {
  flex: 1;
  padding-bottom: calc(var(--tab-h) + 34px + env(safe-area-inset-bottom));
}

.main:focus { outline: none; }

.page { animation: rise 0.26s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(96deg, #ffd9ae 0%, #fff2e2 48%, #fffdfa 100%);
  border-bottom: 1px solid rgba(160, 106, 44, 0.26);
}

.topbar-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  transition: transform 0.25s ease, background 0.25s ease;
}
.brand-mark .glyph-wen { width: 72%; height: 72%; display: block; }

.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.06); background: var(--green-deep); }

.brand-text { font-size: 15px; }
.brand-text small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1.2;
}

.topnav { display: none; align-items: center; gap: 6px; }

.topnav a,
.topnav button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease;
}

.topnav a:hover,
.topnav button:hover { background: var(--green-soft); color: var(--green-deep); }
.topnav a.active { color: var(--green-deep); background: var(--green-soft); }

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

.admin-entry {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-deep);
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.admin-entry:hover { background: var(--green-soft); border-color: var(--green); }
.admin-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1.5px solid #fff;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.admin-badge[hidden] { display: none; }

.top-login {
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--green-deep);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.top-login:hover { border-color: var(--green); background: var(--green-soft); }

.lang-toggle {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-toggle:hover { color: var(--green-deep); background: var(--green-soft); }

/* ---------- background music ---------- */
.bgm-btn {
  position: fixed;
  right: 16px;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-strong);
  color: var(--green-deep);
  box-shadow: 0 10px 24px -16px rgba(10, 92, 61, 0.6);
  touch-action: none;
  cursor: grab;
  transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.bgm-btn[hidden] { display: none; }
.app-shell--write .bgm-btn { display: none; }
.bgm-btn.is-off { color: var(--muted); opacity: 0.55; }
.bgm-btn.is-dragging { transform: scale(1.06); cursor: grabbing; }
.bgm-btn.is-playing svg { animation: bgmBeat 2.6s ease-in-out infinite; }
@keyframes bgmBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}
@media (min-width: 900px) {
  .bgm-btn { right: 24px; bottom: 24px; }
}

body.route-write .bgm-btn { display: none; }

.site-foot .foot-credit {
  flex-basis: 100%;
  text-align: center;
  margin-top: 6px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0.9;
  text-decoration: none;
}
.site-foot .foot-credit:hover { color: var(--green-deep); }

.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--serif);
  font-weight: 600;
  flex: none;
  user-select: none;
  line-height: 1;
}

.avatar--sm { width: 30px; height: 30px; font-size: 13px; }
.avatar--md { width: 40px; height: 40px; font-size: 16px; }
.avatar--lg { width: 64px; height: 64px; font-size: 24px; }

.avatar { overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.avatar--img { background: var(--green-soft); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* clickable avatar on the profile page */
.avatar-edit {
  position: relative;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  line-height: 0;
  cursor: pointer;
}
.avatar-edit:disabled { opacity: 0.6; cursor: default; }
.avatar-edit .avatar--lg { transition: transform 0.25s ease; }
.avatar-edit:hover .avatar--lg { transform: translateY(-2px); }
.avatar-edit-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #fff;
  color: #fff;
}
.avatar-edit-badge svg { width: 13px; height: 13px; }

/* ---------- bottom tabs (mobile) ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  font-weight: 500;
  transition: color 0.2s ease;
}

.tab::before {
  content: "";
  position: absolute;
  top: 6px;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.2s ease;
}

.tab svg { width: 22px; height: 22px; stroke-width: 1.9; transition: transform 0.2s ease; }
.tab:active svg { transform: scale(0.88); }
.tab.active { color: var(--green-deep); font-weight: 700; }
.tab.active::before { background: var(--green); }
.tab.active svg { stroke-width: 2.2; }

/* ---------- shared bits ---------- */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-deep);
  font-weight: 700;
  margin: 0 0 12px;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

.page-head { padding: 34px 0 26px; }
.page-head h1 { font-size: clamp(30px, 8vw, 44px); letter-spacing: 0.01em; }
.page-head .lede { margin: 10px 0 0; color: var(--ink-soft); font-size: 15px; font-weight: 500; max-width: 34em; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.975); }

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 14px 26px -16px rgba(10, 92, 61, 0.85);
}
.btn-primary:hover { background: var(--green-deep); }
.btn-primary:disabled {
  background: var(--green-tint);
  color: var(--green-deep);
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.btn-ghost {
  background: var(--green-soft);
  color: var(--green-deep);
}
.btn-ghost:hover { background: var(--green-tint); }

.btn-block { width: 100%; padding: 17px 24px; font-size: 16px; border-radius: 16px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.chip--outline { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); font-weight: 500; }

.muted { color: var(--muted); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 10px 0;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--green-deep); }

/* ---------- home ---------- */

@font-face {
  font-family: 'XiaoWei Title';
  src: url('/fonts/xiaowei.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.hero { padding: 34px 0 24px; position: relative; }

.hero::before {
  content: '';
  position: absolute;
  top: -16px;
  right: -20px;
  bottom: -10px;
  left: -20px;
  background:
    radial-gradient(62% 66% at 10% 24%, rgba(18, 132, 90, 0.1), transparent 70%),
    radial-gradient(48% 52% at 90% 4%, rgba(15, 122, 82, 0.08), transparent 74%);
  pointer-events: none;
}

.hero > * { position: relative; }

.hero-title {
  font-family: 'XiaoWei Title', var(--serif);
  font-size: clamp(48px, 14.4vw, 100px);
  line-height: 1.05;
  letter-spacing: 0.11em;
  margin: 0;
  font-weight: 400;
  color: var(--green-deep);
  display: flex;
  align-items: flex-end;
  gap: 0.03em;
}

.hero-title--en {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: clamp(42px, 12.2vw, 88px);
}

.hero-title-text { color: var(--green-deep); }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title-text {
    background: linear-gradient(
      172deg,
      #2a9c70 0%,
      #12845a 20%,
      #0a5c3d 56%,
      #06412b 86%,
      #053826 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.014em rgba(6, 65, 43, 0.6);
    filter:
      drop-shadow(-0.011em -0.011em 0 rgba(255, 255, 255, 0.8))
      drop-shadow(0.013em 0.017em 0 rgba(255, 255, 255, 0.5))
      drop-shadow(0 0.05em 0.032em rgba(6, 65, 43, 0.2))
      drop-shadow(0 0.16em 0.34em rgba(10, 92, 61, 0.15));
  }
}

.hero-seal {
  width: 0.24em;
  height: 0.24em;
  margin-bottom: 0.075em;
  margin-left: -0.07em;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fdf7f3;
  background: linear-gradient(152deg, #a23a40 0%, #862b32 55%, #6f2229 100%);
  border-radius: 0.05em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.26),
    inset 0 0 5px rgba(70, 18, 22, 0.3),
    0 1px 4px rgba(100, 34, 40, 0.24);
  transform: rotate(-2deg);
}

.hero-seal svg {
  width: 80%;
  height: 80%;
}

.hero-rule {
  display: block;
  width: 36px;
  height: 1px;
  margin-top: 18px;
  background: linear-gradient(90deg, rgba(15, 122, 82, 0.55) 0%, rgba(15, 122, 82, 0.08) 100%);
}

.hero h1 .dot { color: var(--green); }

.hero-lede {
  margin: 14px 0 0;
  font-size: clamp(16px, 4.4vw, 20px);
  line-height: 1.7;
  color: var(--ink-soft);
  font-family: var(--serif);
  max-width: 22em;
}

.hero-meta {
  order: 2;
  margin: 2px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.board--cn { order: 1; }
.board--intl { order: 3; }

.hero-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }
.hero-meta strong { color: var(--green-deep); font-weight: 700; font-variant-numeric: tabular-nums; }

.boards {
  display: grid;
  gap: 16px;
  margin: 8px 0 0;
}

.board {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 196px;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.32s ease,
    border-color 0.32s ease, background 0.32s ease;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.board:hover { transform: translateY(-7px); box-shadow: var(--shadow-lift); }
.board:active { transform: translateY(-2px) scale(0.992); }

.board-kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.92;
}

.board h2 {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 46px);
  line-height: 1.1;
  letter-spacing: 0.06em;
}

.board-cover {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  border-radius: inherit;
}

.board-groups {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.group-break { flex-basis: 100%; height: 0; }

@media (max-width: 380px) { .group-break { display: none; } }

.board--cn .board-groups { gap: 7px; }

.board--cn .board-group {
  padding: 9px 17px;
  font-size: 13.5px;
}

.board-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.board-group:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); }

.board--intl .board-group { border-color: var(--line-strong); color: var(--green-deep); background: #fff; }
.board--intl .board-group:hover { background: var(--green-soft); border-color: var(--green); }

.board p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.7; max-width: 20em; opacity: 0.92; }

.board-foot {
  margin-top: auto;
  padding-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.board-foot svg { width: 16px; height: 16px; transition: transform 0.28s ease; }
.board:hover .board-foot svg { transform: translateX(5px); }

.board--cn {
  background: linear-gradient(158deg, #12805a 0%, #0a5c3d 62%, #07462f 100%);
  color: #fff;
  box-shadow: var(--shadow-card);
}

.board--cn::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 32px rgba(255, 255, 255, 0.045), 0 0 0 70px rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.board--intl {
  background: linear-gradient(160deg, #f4fbf7 0%, #e3f2ea 100%);
  color: var(--green-deep);
  border: 1px solid #b3d6c3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.board--intl:hover { background: linear-gradient(160deg, #f1faf5 0%, #e2f2e9 100%); border-color: var(--green); }
.board--intl p { color: var(--ink-soft); }

.manifesto {
  position: relative;
  margin: 40px 0 0;
  padding: 30px 26px 26px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f4faf6 0%, var(--paper) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -34px rgba(10, 92, 61, 0.55);
  font-family: var(--serif);
  font-size: clamp(13.5px, 4vw, 16.5px);
  line-height: 1.95;
  color: var(--ink-soft);
  overflow: hidden;
}
.manifesto::before {
  content: '“';
  position: absolute;
  top: -10px;
  left: 12px;
  font-family: var(--serif);
  font-size: 68px;
  line-height: 1;
  color: rgba(15, 122, 82, 0.12);
}
.manifesto-verse {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  letter-spacing: 0.03em;
}

.manifesto-verse span { display: block; }

.manifesto-verse span:nth-child(3) { padding-left: 1em; }

.manifesto-verse .manifesto-verse-last {
  align-self: flex-start;
  margin-top: 0.5em;
  padding-left: 0;
  font-size: 1.14em;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--green-deep);
  background-image: linear-gradient(transparent 72%, rgba(15, 122, 82, 0.16) 72%);
  border-radius: 2px;
}

.manifesto--en {
  font-size: clamp(12.5px, 3.5vw, 14px);
  letter-spacing: 0.01em;
}

.manifesto--en .manifesto-verse { letter-spacing: 0.01em; }

.manifesto--en .manifesto-verse .manifesto-verse-last {
  font-size: 1.05em;
  letter-spacing: 0.02em;
}

@media (max-width: 350px) {
  .manifesto { padding-left: 16px; padding-right: 16px; }
  .manifesto--en { font-size: 12px; }
  .manifesto--en .manifesto-verse .manifesto-verse-last { font-size: 1em; }
}
.manifesto strong {
  color: var(--green-deep);
  font-weight: 600;
  background-image: linear-gradient(transparent 64%, rgba(15, 122, 82, 0.16) 64%);
  border-radius: 2px;
}

.board-note {
  max-width: 620px;
  margin: 26px auto 0;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  text-align: center;
}
.board-note strong { color: var(--green-deep); font-weight: 700; }
html[lang="en"] .board-note { font-family: var(--sans); font-size: 13px; letter-spacing: 0.02em; }

/* ---------- section page ---------- */

.section-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 13px;
  color: var(--green-deep);
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--green-soft);
  transition: background 0.2s ease, transform 0.2s ease;
}
.section-switch:hover { background: var(--green-tint); transform: translateY(-1px); }
.section-switch svg { width: 15px; height: 15px; }

.inline-heart {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  vertical-align: -2px;
}

.featured {
  margin: 4px 0 30px;
  padding: 24px 22px;
  border-radius: var(--radius-md);
  background: var(--green-soft);
  border: 1px solid var(--green-tint);
  position: relative;
}

.featured .eyebrow { margin-bottom: 10px; }

.featured blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(19px, 5vw, 24px);
  line-height: 1.75;
  color: var(--ink);
}

.featured-foot {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.featured-author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); }

.group-list { display: grid; gap: 12px; margin-bottom: 34px; }

.group-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.28s ease,
    border-color 0.28s ease;
  -webkit-tap-highlight-color: transparent;
}

.group-row:hover {
  transform: translateY(-5px);
  border-color: var(--green-tint);
  box-shadow: var(--shadow-card);
}
.group-row:active { transform: translateY(-1px) scale(0.994); }

.group-index {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--green);
  background: var(--green-soft);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.group-main { min-width: 0; }
.group-main h3 { font-family: var(--serif); font-size: 20px; letter-spacing: 0.08em; }
.group-main .group-sub {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
  margin-top: 3px;
}

.group-preview {
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.group-count { font-size: 12px; color: var(--muted); white-space: nowrap; }

.group-right { display: flex; align-items: center; gap: 10px; }
.group-arrow { display: inline-flex; color: var(--line-strong); transition: transform 0.25s ease, color 0.25s ease; }
.group-arrow svg { width: 18px; height: 18px; }
.group-row:hover .group-arrow { color: var(--green); transform: translateX(4px); }

/* ---------- feed ---------- */

.feed-head { padding: 26px 0 20px; }
.feed-head h1 { font-family: var(--serif); font-size: clamp(30px, 8vw, 42px); letter-spacing: 0.06em; margin-top: 8px; }
.feed-head .lede { color: var(--ink-soft); font-size: 14px; margin: 8px 0 0; }

.feed-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 18px;
  flex-wrap: wrap;
}

.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.seg a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--muted);
  transition: all 0.2s ease;
}
.seg a.active { background: #fff; color: var(--green-deep); font-weight: 600; box-shadow: 0 2px 8px rgba(7, 63, 42, 0.08); }

.feed { display: grid; gap: 14px; padding-bottom: 20px; }

.line-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 20px 16px;
  transition: transform 0.24s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.24s ease;
}

.line-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-tint);
}

@media (hover: none) {
  .line-card:hover, .board:hover { transform: none; }
}

.line-kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
  font-weight: 700;
  margin-bottom: 10px;
}

.line-kind::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--green);
  opacity: 0.6;
}

.line-card blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(19px, 5.2vw, 24px);
  line-height: 1.8;
  letter-spacing: 0.01em;
  color: var(--ink);
  word-break: break-word;
}

.line-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.author {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  transition: opacity 0.2s ease;
}
.author:hover { opacity: 0.72; }

.author-info { min-width: 0; }
.author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  display: block;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.author-meta { font-size: 12px; color: var(--muted); }

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  min-height: 40px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex: none;
  -webkit-tap-highlight-color: transparent;
}
.like-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.like-btn:hover { border-color: var(--green); color: var(--green-deep); background: var(--green-soft); }
.like-btn.liked { background: var(--green); border-color: var(--green); color: #fff; }
.like-btn.liked svg { fill: #fff; stroke: #fff; }
.like-btn.pop { animation: pop 0.35s ease; }

.line-actions { display: flex; align-items: center; gap: 6px; }
.more-btn {
  border: 0;
  background: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.more-btn:hover { color: var(--green-deep); background: var(--green-soft); }

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

.empty {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
}
.empty h3 { font-family: var(--serif); font-size: 19px; color: var(--ink-soft); margin-bottom: 8px; }
.empty p { margin: 0 0 18px; font-size: 13.5px; }

/* ---------- write ---------- */

.write-head { padding: 30px 0 20px; }
.write-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--green-deep);
  background: var(--green-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.write-head h1 { font-family: var(--serif); font-size: clamp(30px, 8vw, 42px); letter-spacing: 0.05em; }
.write-rule { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); line-height: 1.7; }

.write-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.progress-dots { display: inline-flex; gap: 5px; }
.progress-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--green);
}
.progress-dot.on { background: var(--green); }
.progress-count { color: var(--green-deep); font-weight: 600; font-variant-numeric: tabular-nums; }

.compose-actions { margin-top: 14px; }
.btn-sm { padding: 11px 18px; font-size: 13.5px; }
.stats-note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); text-align: center; letter-spacing: 0.02em; }

.mileage {
  margin: 26px 0;
  padding: 20px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f7fbf8 0%, #fff 100%);
}
.mileage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mileage-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0.04em; }
.mileage-nums { display: flex; align-items: baseline; gap: 12px; font-size: 12px; color: var(--muted); }
.mileage-nums b { font-family: var(--serif); font-size: 20px; color: var(--green-deep); font-weight: 600; }
.mileage-best { letter-spacing: 0.02em; }
.mileage-intro {
  margin: 8px 0 16px;
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.badges { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.badge-coin {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #f3f4f2;
  color: #b6b7b2;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.badge--on .badge-coin {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(15, 122, 82, 0.9);
}
.badge-name { font-size: 11.5px; color: var(--ink-soft); letter-spacing: 0.04em; }
.badge--on .badge-name { color: var(--green-deep); font-weight: 600; }
.badge-meta { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; min-height: 16px; }

.compose { display: grid; gap: 16px; padding-bottom: 24px; }

.compose-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 18px 14px;
  transition: border-color 0.22s ease, transform 0.22s ease;
}
.compose-card:focus-within {
  border-color: var(--green);
  transform: translateY(-1px);
}

.compose-card--locked {
  background: var(--paper);
  border-style: dashed;
}
.compose-card--locked:focus-within {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}
.locked-tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}
.locked-line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(18px, 4.6vw, 21px);
  line-height: 1.75;
  color: var(--ink-soft);
  word-break: break-word;
}
.locked-line + .compose-foot { margin-top: 10px; }

.compose-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.compose-label .label-main { display: flex; align-items: baseline; gap: 10px; }
.compose-label h2 { font-family: var(--serif); font-size: 21px; letter-spacing: 0.06em; }

.compose textarea {
  width: 100%;
  border: 0;
  background: transparent;
  resize: none;
  font-family: var(--serif);
  font-size: clamp(19px, 5vw, 23px);
  line-height: 1.75;
  color: var(--ink);
  padding: 4px 0;
  min-height: 72px;
  outline: none;
}
.compose textarea::placeholder { color: var(--muted); }

.compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}

.counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 600; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding-right: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-soft);
  user-select: none;
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  transition: background 0.22s ease;
  flex: none;
}
.toggle .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.22s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.toggle input:checked + .track { background: var(--green); }
.toggle input:checked + .track::after { transform: translateX(18px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--green); outline-offset: 3px; }

.publish-bar { padding: 4px 0 8px; }

.done-panel { padding: 8px 0 32px; }

.done-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--green-soft);
  border: 1px solid var(--green-tint);
  margin-bottom: 20px;
}
.done-check {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.done-check svg { width: 19px; height: 19px; stroke: #fff; stroke-width: 2.4; fill: none; }
.done-banner h2 { font-family: var(--serif); font-size: 19px; letter-spacing: 0.04em; }
.done-banner p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-soft); }

.done-quote {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  background: #fff;
}
.done-quote .line-kind { margin-bottom: 8px; }
.done-quote blockquote { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.8; }
.done-quote .pill-note { margin-top: 12px; font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

.countdown {
  margin-top: 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}
.countdown strong {
  font-variant-numeric: tabular-nums;
  color: var(--green-deep);
  font-size: 15px;
  letter-spacing: 0.06em;
  margin-left: 6px;
}

/* ---------- me / profile ---------- */

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 30px 0 22px;
}

.profile-id { min-width: 0; }
.profile-id h1 {
  font-family: var(--serif);
  font-size: clamp(24px, 6.6vw, 32px);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 22px;
}
.stat { background: #fff; padding: 16px 12px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--green-deep); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.profile-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tool-btn:hover { border-color: var(--green); color: var(--green-deep); background: var(--green-soft); }

.age-editor {
  padding: 14px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}
.age-editor > label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.age-row { display: flex; align-items: center; gap: 8px; }
.age-row select {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font-size: 16px;
  color: var(--ink);
}
.age-row select:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px var(--green-soft); }
.age-row .tool-btn { flex: none; }

.pw-editor summary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
}
.pw-editor summary::-webkit-details-marker { display: none; }
.pw-editor summary::after {
  content: '+';
  float: right;
  color: var(--muted);
  font-weight: 500;
}
.pw-editor[open] summary::after { content: '−'; }
.pw-fields { display: grid; gap: 8px; margin-top: 12px; }
.pw-fields input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font-size: 14px;
  color: var(--ink);
}
.pw-fields input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px var(--green-soft); }
.pw-fields .tool-btn { justify-content: center; min-height: 44px; }

.logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0 0 24px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.logout-link:hover { color: var(--danger); }

.timeline { padding-bottom: 20px; }
.timeline-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 6px 0 14px;
}
.timeline-title h2 { font-family: var(--serif); font-size: 19px; letter-spacing: 0.06em; }
.timeline-title span { font-size: 11.5px; color: var(--muted); }

.day-block { margin-bottom: 22px; }
.day-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 9px;
  font-variant-numeric: tabular-nums;
}
.day-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.mini-line {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  background: #fff;
}
.mini-line .mini-kind {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mini-line p {
  margin: 0;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.75;
  word-break: break-word;
}
.mini-line.private { background: var(--paper); border-style: dashed; }
.mini-line.private .mini-kind { color: var(--muted); }
.mini-line .lock { font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; }

.mini-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.mini-btn {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.mini-btn:hover { border-color: var(--green); color: var(--green-deep); }
.mini-btn.danger:hover { border-color: #c0503f; color: #a63a2b; }
.mini-btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- auth ---------- */

.auth-wrap { max-width: 460px; margin: 0 auto; padding: 40px 20px 60px; }
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 22px; margin: 0 auto 14px; }
.auth-brand h1 { font-family: var(--serif); font-size: 27px; letter-spacing: 0.06em; }
.auth-brand p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  background: #fff;
}

.field { display: block; margin-bottom: 16px; }
.field > span,
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
}
.field .field-label--split {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.field-label--split small {
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.field input[type="text"],
.field input[type="password"],
.field input[type="email"] {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}
.field-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; }

.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pick {
  position: relative;
  display: block;
  cursor: pointer;
}
.pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.pick > div {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 14px;
  transition: all 0.2s ease;
  height: 100%;
}
.pick strong { display: block; font-size: 14px; color: var(--ink); }
.pick small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.pick input:checked + div {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px var(--green);
}
.pick input:focus-visible + div { outline: 2px solid var(--green); outline-offset: 2px; }

.age-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.age-pick {
  position: relative;
  cursor: pointer;
  flex: 1 1 auto;
}
.age-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.age-pick span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.age-pick small { font-size: 10.5px; color: var(--muted); }
.age-pick input:checked + span {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--green);
}
.age-pick input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

.form-error {
  display: none;
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #fdf1ee;
  border: 1px solid #f3d3ca;
  color: var(--danger);
  font-size: 12.5px;
}
.form-error.show { display: block; }

.auth-alt { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.auth-alt a { color: var(--green-deep); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

.auth-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

.lang-swap {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
.lang-swap a { color: var(--green-deep); font-weight: 600; }

/* ---------- toast / sheet ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px);
  background: var(--green-dark);
  color: #fff;
  font-size: 13px;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 80;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.route-write .toast { bottom: calc(20px + env(safe-area-inset-bottom)); }

/* 页面数据加载超过 150ms 时顶部出现一条细进度线，缓解“点了没反应” */
body.is-navigating::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 100;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  background-size: 45% 100%;
  background-repeat: no-repeat;
  animation: navSlide 1.1s linear infinite;
  pointer-events: none;
}
@keyframes navSlide {
  from { background-position: -45% 0; }
  to { background-position: 145% 0; }
}

/* ---------- boot placeholder ---------- */

.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.boot-mark {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  color: var(--green);
  animation: bootPulse 1.6s ease-in-out infinite;
}
@keyframes bootPulse {
  0%, 100% { opacity: 0.25; transform: scale(0.94); }
  50% { opacity: 0.65; transform: scale(1); }
}

.sheet-wrap {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: grid;
  align-items: end;
}
.sheet-wrap[hidden] { display: none; }

/* 弹层打开时锁住背景滚动，避免手指滑动穿透到底层页面 */
body.sheet-open { overflow: hidden; }

.sheet-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(8, 34, 24, 0.36);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: fade 0.2s ease both;
}

.sheet-card {
  position: relative;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 26px 22px calc(24px + env(safe-area-inset-bottom));
  animation: sheetUp 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.sheet-card h3 { font-family: var(--serif); font-size: 20px; letter-spacing: 0.04em; }
.sheet-card p { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 22px; }
.sheet-actions button {
  height: 48px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.sheet-actions .yes { background: var(--green); border-color: var(--green); color: #fff; }
.sheet-actions .yes:hover { background: var(--green-deep); }

.sheet-fields { display: grid; gap: 14px; margin-top: 18px; }
.sheet-field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.sheet-field select,
.sheet-field textarea,
.sheet-field input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  resize: vertical;
}
.sheet-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 1px),
    calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.sheet-field select:focus-visible,
.sheet-field textarea:focus-visible,
.sheet-field input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-color: var(--green);
}
.sheet-card .sheet-error {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--danger);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 26px 0 30px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
}
.site-foot .foot-brand { letter-spacing: 0.14em; text-transform: uppercase; font-size: 10.5px; font-weight: 600; }
.site-foot .foot-link {
  border: 0;
  background: none;
  padding: 10px 0;
  font: inherit;
  font-size: 12px;
  color: var(--green-deep);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-foot .foot-link:hover { color: var(--green); }

/* ---------- admin ---------- */

.admin-section { margin: 8px 0 36px; }
.admin-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.admin-section-head h2 { font-family: var(--serif); font-size: 20px; letter-spacing: 0.04em; }
.admin-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.admin-item blockquote {
  margin: 12px 0;
  padding-left: 14px;
  border-left: 3px solid var(--green-tint);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}
.admin-note { margin: 0 0 10px; font-size: 13px; color: var(--muted); }

.admin-reset { display: flex; gap: 10px; margin-top: 10px; }

.admin-reply { display: flex; gap: 8px; margin-top: 10px; }
.admin-reply input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
.admin-reply input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px var(--green-soft); }
.admin-reply .mini-btn { flex: none; }

/* 我的留言与平台回复 */
.inbox { margin: 0 0 24px; }
.inbox-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: #fff;
}
.inbox-text {
  margin: 0 0 6px;
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.inbox-meta { font-size: 11.5px; color: var(--muted); }
.inbox-reply { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--green-soft); }
.inbox-reply span { font-size: 11px; letter-spacing: 0.08em; color: var(--green-deep); font-weight: 700; }
.inbox-reply p { margin: 4px 0 0; font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.inbox-wait { margin-top: 8px; font-size: 12px; color: var(--muted); }
.admin-reset input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
.admin-reset input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px var(--green-soft); }
.admin-reset .mini-btn { flex: none; }

.tool-btn.danger { color: var(--danger); border-color: #ecc9bf; }
.tool-btn.danger:hover { background: #fdf3f0; border-color: var(--danger); }
.admin-body {
  margin: 12px 0 8px;
  font-size: 14.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.admin-sub { font-size: 12px; color: var(--muted); }
.admin-sub a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.admin-tools { margin-top: -2px; }
.ban-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fdecea;
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
}

/* ---------- desktop ---------- */

@media (min-width: 820px) {
  :root { --tab-h: 0px; }

  .wrap { padding: 0 32px; }
  .main { padding-bottom: 60px; }

  .topbar-inner { height: 74px; }
  .brand-mark { width: 34px; height: 34px; font-size: 18px; }
  .brand-text { font-size: 16px; }
  .topnav { display: flex; }
  .tabbar { display: none; }

  .hero { padding: 76px 0 46px; }
  .hero-lede { margin-top: 24px; }

  .boards { grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
  .board-groups { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .hero-meta { order: 4; grid-column: 1 / -1; margin: 2px 0; }
  .board { min-height: 266px; padding: 34px 30px; }
  .board h2 { font-size: 44px; }

  .manifesto { margin-top: 44px; padding: 32px 36px; font-size: 18px; }
  .manifesto--en { font-size: 17px; }
  .group-break { display: none; }

  .page-head { padding: 52px 0 32px; }
  .featured { padding: 30px 32px; }
  .group-list { grid-template-columns: 1fr 1fr; gap: 14px; }
  .group-preview { grid-column: auto; display: none; }

  .feed { grid-template-columns: 1fr 1fr; gap: 16px; }

  .compose { grid-template-columns: 1fr 1fr; }
  .publish-bar { grid-column: 1 / -1; }
  .publish-bar .btn-block { max-width: 340px; margin: 0 auto; display: block; }

  .profile-stats { max-width: 520px; }

  .sheet-wrap { align-items: center; justify-items: center; padding: 24px; }
  .sheet-card { border-radius: 22px; width: 100%; max-width: 420px; animation: rise 0.28s ease both; }

  .toast { bottom: 32px; }
}

@media (min-width: 1080px) {
  .hero-title { font-size: 104px; }
  .board--cn h2,
  .board--intl h2 { font-size: 48px; }
}

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