/* ---------- 设计 token ---------- */
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/fredoka-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
                 U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #F3F7F8;
  --surface: #FFFFFF;
  --surface-2: #EAF1F4;
  --brand-50: #E8F0F9;
  --brand-100: #D9E7F6;
  --brand-300: #96BAD9;
  --brand-500: #487EB5;
  --brand-600: #2F6AB3;
  --brand-700: #295C95;
  --mint-100: #E5F0EB;
  --mint-500: #579583;
  --warm-100: #F7EDD9;
  --warm-300: #E9D5A8;
  --warm-500: #C89442;
  --warm-600: #805A24;
  --ink-900: #223D50;
  --ink-700: #405B6D;
  --ink-500: #536A79;
  --ink-400: #586D7B;
  --line: #DCE6EA;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-soft: 0 4px 18px rgba(34, 61, 80, .035);
  --shadow-lift: 0 10px 26px rgba(34, 61, 80, .075);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-display: "PingFang SC", "Microsoft YaHei", var(--font-sans);
  --font-num: "Fredoka", var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  --container-narrow: 1180px;
  --header-h: 80px;
  --header-bg: rgba(243, 247, 248, .9);
  --page-light: #E7F1F6;
  --sea-sky-top: #CCE5ED;
  --sea-sky-bottom: #E9F3ED;
  --sea-water-top: #95C9CC;
  --sea-water-bottom: #BDDFDB;
  --sea-sun: #FFF5CC;
  --sea-reflection: #FFFBE4;
  --sea-ripple: #ECFAF6;
  --sea-cloud: #F8FDF9;
  --sea-sun-y: -15px;
  --scroll-thumb: #BDCFD8;
  --code-bg: #EDF3F6;
  --chip-count-bg: rgba(255, 255, 255, .5);
  --breath-bg: rgba(255, 255, 255, .6);
  --chan-grad: #E8F0F2;
  --chan-border: #DCE6EA;
  --pinned-grad: #FFFAEE;
  --pinned-border: #E9D9B3;
  --pinned-shadow: none;
  --ticket-grad: #EDF3F6;
  --ticket-border: #D6E2E8;
  --ticket-ink: #5C7381;
  --ticket-strong: #223D50;
  --footer-grad: #EAF1F3;
  --draft-bg: #F7EDD9;
  --draft-ink: #805A24;
  --on-brand: #FFFFFF;
}

html[data-theme="dawn"] {
  --bg: #F5F4F3;
  --surface-2: #F0ECEC;
  --header-bg: rgba(245, 244, 243, .9);
  --page-light: #F2E5E5;
  --sea-sky-top: #DADFEA;
  --sea-sky-bottom: #F8DBCB;
  --sea-water-top: #A7C3CC;
  --sea-water-bottom: #D1DEDF;
  --sea-sun: #FFF3DF;
  --sea-reflection: #FCEADA;
  --sea-ripple: #F2F6F4;
  --sea-cloud: #FAF4EF;
  --sea-sun-y: 52px;
  --chan-grad: #EDEEF1;
  --chan-border: #E0E1E5;
  --footer-grad: #EBECED;
}

html[data-theme="dusk"] {
  --bg: #F7F1EC;
  --surface: #FFFCF8;
  --surface-2: #F0E5DD;
  --header-bg: rgba(247, 241, 236, .9);
  --page-light: #F1DBCA;
  --brand-50: #F2E8E0;
  --brand-100: #EBD8CA;
  --brand-300: #C9A58C;
  --brand-500: #A16E50;
  --brand-600: #936047;
  --brand-700: #81553F;
  --ink-900: #493E40;
  --ink-700: #645659;
  --ink-500: #715D59;
  --ink-400: #765F59;
  --line: #E8DDD4;
  --sea-sky-top: #D7BDCA;
  --sea-sky-bottom: #F2BE92;
  --sea-water-top: #A898B4;
  --sea-water-bottom: #CBC1CD;
  --sea-sun: #FFE2AB;
  --sea-reflection: #FFE4BC;
  --sea-ripple: #EBDBDD;
  --sea-cloud: #F4DDD3;
  --sea-sun-y: 55px;
  --chan-grad: #F0E5DB;
  --chan-border: #E8DDD4;
  --ticket-grad: #F2EAE2;
  --ticket-border: #DFD0C2;
  --ticket-ink: #7B6866;
  --ticket-strong: #493E40;
  --footer-grad: #EEE4DB;
}

html[data-theme="night"] {
  color-scheme: dark;
  --bg: #142334;
  --surface: #1B2D40;
  --surface-2: #22384B;
  --brand-50: #223B50;
  --brand-100: #2A4961;
  --brand-300: #547E9D;
  --brand-500: #91BFDE;
  --brand-600: #A0CDE9;
  --brand-700: #ACD5EF;
  --mint-100: #203D39;
  --mint-500: #79B9A7;
  --warm-100: #3C352C;
  --warm-300: #6D5D40;
  --warm-500: #D2AF70;
  --warm-600: #E8CE9E;
  --ink-900: #E5EDF1;
  --ink-700: #C8D7E2;
  --ink-500: #A5B8CA;
  --ink-400: #9BAFC2;
  --line: #304456;
  --shadow-soft: 0 4px 18px rgba(0, 0, 0, .08);
  --shadow-lift: 0 10px 26px rgba(0, 0, 0, .16);
  --header-bg: rgba(20, 35, 52, .92);
  --page-light: #21344E;
  --sea-sky-top: #253B58;
  --sea-sky-bottom: #49637D;
  --sea-water-top: #3F667E;
  --sea-water-bottom: #28465F;
  --sea-sun: #F2EACD;
  --sea-reflection: #AACAD5;
  --sea-ripple: #719AAF;
  --sea-cloud: #738EA5;
  --scroll-thumb: #405B73;
  --code-bg: #142638;
  --chip-count-bg: rgba(255, 255, 255, .08);
  --breath-bg: rgba(170, 220, 240, .18);
  --chan-grad: #203449;
  --chan-border: #304456;
  --pinned-grad: #34332F;
  --pinned-border: #5D5442;
  --ticket-grad: #22384B;
  --ticket-border: #3E566D;
  --ticket-ink: #A5B8CA;
  --ticket-strong: #E5EDF1;
  --footer-grad: #11202F;
  --draft-bg: #3C352C;
  --draft-ink: #E8CE9E;
  --on-brand: #142334;
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-900);
  background-color: var(--bg);
  transition: background-color .45s ease, color .3s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(160deg, var(--page-light), transparent 65%);
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--brand-700); text-decoration: none; }
img, svg { max-width: 100%; }
button { font-family: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--warm-300); color: var(--ink-900); }

::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 9px 16px;
  background: var(--brand-600);
  color: var(--on-brand);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  transition: top .2s ease;
}
.skip-link:focus { top: 10px; color: var(--on-brand); }

.container {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: 22px;
}

.noscript-tip {
  margin: 20px auto;
  max-width: 560px;
  padding: 16px 20px;
  background: var(--warm-100);
  border: 1px solid var(--warm-300);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--warm-600);
}

.ic {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 3. 顶部导航（对应频道条位置，风格为鲸鱼） ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color .45s ease;
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.logo__mark { display: inline-flex; align-items: center; }
.logo__mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(45, 106, 180, .16));
}
.logo__text { display: flex; flex-direction: column; line-height: 1.25; }
.logo__name { font-size: 18px; font-weight: 800; letter-spacing: .5px; color: var(--ink-900); }
.logo__tag { font-size: 11px; color: var(--ink-400); letter-spacing: 2px; }

.header__channel {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-pill);
  background: var(--brand-50);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-700);
  transition: background .15s ease, transform .15s ease;
}
.header__channel:hover { background: var(--brand-100); transform: translateY(-1px); }
.header__channel .ic { width: 15px; height: 15px; }

.header__nav { display: flex; gap: 32px; margin-left: auto; }
.header__nav a { font-size: 13px; color: var(--ink-500); padding: 10px 0; }
.header__nav a:hover { color: var(--brand-600); }
.header__nav a:first-child { color: var(--ink-900); font-weight: 700; }
.logo__mark img { transition: transform .3s ease; }
.logo:hover .logo__mark img { transform: rotate(-7deg); }

.harbor {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 64px;
  align-items: center;
  padding: 24px 0 30px;
}
.harbor__eyebrow { display: flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .18em; color: var(--ink-500); }
.harbor__eyebrow > span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-500); }
.harbor h1 { margin-top: 13px; font-family: var(--font-display); font-size: clamp(38px, 3.8vw, 52px); font-weight: 800; line-height: 1.25; letter-spacing: -.045em; }
.harbor h1 span { color: var(--brand-600); }
.harbor__intro { margin-top: 16px; max-width: 32em; font-size: 13px; line-height: 1.9; color: var(--ink-500); }
.harbor__link { display: inline-flex; align-items: center; gap: 22px; margin-top: 17px; font-size: 13px; font-weight: 700; color: var(--brand-700); }
.harbor__link span { display: grid; place-items: center; width: 28px; height: 28px; background: var(--brand-100); border-radius: 50%; transition: transform .2s ease; }
.harbor__link:hover span { transform: translate(2px, -2px); }
.harbor__view { min-width: 0; padding-top: 6px; }
.seascape { position: relative; aspect-ratio: 2.35 / 1; overflow: hidden; border-radius: 160px 160px 72px 72px; isolation: isolate; }
.seascape > svg { display: block; width: 100%; height: 100%; }
.sea-sky-top { stop-color: var(--sea-sky-top); }
.sea-sky-bottom { stop-color: var(--sea-sky-bottom); }
.sea-water-top { stop-color: var(--sea-water-top); }
.sea-water-bottom { stop-color: var(--sea-water-bottom); }
.seascape__sun { fill: var(--sea-sun); transform: translateY(var(--sea-sun-y)); }
.seascape__moon { fill: var(--sea-sun); display: none; }
.seascape__stars { color: var(--sea-sun); opacity: 0; }
.seascape__clouds { color: var(--sea-cloud); opacity: .65; animation: sea-clouds 20s ease-in-out infinite alternate; }
.seascape__swell { animation: sea-swell 18s linear infinite; }
.seascape__reflection { color: var(--sea-reflection); opacity: .65; transform-origin: 447px 170px; animation: sea-reflection 6s ease-in-out infinite alternate; }
.seascape__ripples { color: var(--sea-ripple); stroke-width: 1.4; opacity: .7; animation: sea-ripples 8s ease-in-out infinite alternate; }
.seascape__mist { stroke: var(--sea-cloud); opacity: 0; filter: blur(7px); }
.seascape__whale { position: absolute; left: 24%; bottom: 22%; width: 19%; height: auto; animation: sea-float 7s ease-in-out infinite; }
.harbor__weather { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin: 17px 12px 0; font-size: 11px; color: var(--ink-500); }
.harbor__weather > span:first-child { font-weight: 700; color: var(--ink-700); }
.harbor__weather-line { width: 28px; height: 1px; background: var(--brand-300); }
html[data-theme="dawn"] .seascape__mist { opacity: .6; }
html[data-theme="dawn"] .seascape__reflection { opacity: .35; }
html[data-theme="dusk"] .seascape__sun { r: 36px; }
html[data-theme="dusk"] .seascape__clouds { opacity: .3; }
html[data-theme="night"] .seascape__sun { display: none; }
html[data-theme="night"] .seascape__moon { display: block; }
html[data-theme="night"] .seascape__stars { opacity: .9; }
html[data-theme="night"] .seascape__clouds { opacity: .12; }
html[data-theme="night"] .seascape__whale { filter: brightness(1.65) saturate(.7); }
@keyframes sea-swell { to { transform: translateX(-640px); } }
@keyframes sea-clouds { to { transform: translateX(18px); } }
@keyframes sea-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
@keyframes sea-reflection { to { transform: scaleX(.88); opacity: .4; } }
@keyframes sea-ripples { to { transform: translateX(8px); opacity: .45; } }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 40px;
  align-items: start;
  margin-top: 8px;
}
.sidebar { display: grid; gap: 24px; padding-top: 57px; }
.feed__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.feed__heading h2 { font-size: 23px; font-weight: 800; letter-spacing: -.04em; }
.feed__heading h2 span { color: var(--brand-600); padding-left: 3px; }
.feed__heading > span { font-size: 11px; color: var(--ink-400); }
#topics, #archive { scroll-margin-top: 100px; }
.side-card { padding: 0 12px; }
.side-card__title::after { content: ""; height: 1px; flex: 1; margin-left: 14px; background: var(--line); }

/* 移动端频道条（<1080px 时显示） */
.channel-strip { display: none; }

/* 站点公告（后台可配置） */
.announce {
  margin-top: 14px;
  padding: 9px 16px;
  background: var(--warm-100);
  border: 1px solid var(--warm-300);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--warm-600);
  overflow-wrap: break-word;
}

.chan-card {
  padding: 24px;
  border: 1px solid var(--chan-border);
  border-radius: var(--radius-lg);
  background: var(--chan-grad);
  text-align: left;
}
.chan-card__name { font-size: 19px; font-weight: 800; line-height: 1.5; color: var(--ink-900); }
.chan-card__name::before { content: "关于这片鱼塘"; display: block; margin-bottom: 10px; font-size: 11px; font-weight: 400; letter-spacing: .12em; color: var(--ink-500); }
.chan-card__bio {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-500);
  text-align: left;
  overflow-wrap: break-word;
}
.chan-card__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--chan-border); }
.chan-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.chan-stat b { font-family: var(--font-num); font-size: 20px; font-weight: 500; line-height: 1.25; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.chan-stat em { font-style: normal; font-size: 10.5px; line-height: 1.4; color: var(--ink-500); white-space: nowrap; }
.chan-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-700);
  transition: background .15s ease, transform .15s ease;
}
.chan-card__btn:hover { background: var(--brand-100); transform: translateY(-1px); }
.chan-card__btn .ic { width: 13px; height: 13px; }
.chan-card__logo { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.chan-card:hover .chan-card__logo { transform: translateY(-3px) rotate(-3deg); }

.chan-tip {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-500);
}
.chan-tip code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--brand-700);
  white-space: nowrap;
}

/* ---------- 5.5 今日鲸语：频道卡下方的气泡卡 ---------- */
.quote-card { position: relative; padding: 21px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--warm-100) 40%, var(--surface)); }
.quote-card__tail { display: none; }
.quote-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.quote-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--brand-700);
}
/* 眉标前的一小截水线，呼应页头的水面 */
.quote-card__eyebrow::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: .5;
}
.quote-card__refresh {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 11.5px;
  color: var(--ink-400);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.quote-card__refresh:hover { background: var(--brand-50); color: var(--brand-700); }
.quote-card__refresh .ic { width: 12px; height: 12px; }
.quote-card__refresh:disabled { cursor: default; color: var(--ink-400); }
.quote-card__refresh:disabled .ic { animation: quote-spin .9s linear infinite; }
.quote-card__text {
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-900);
  overflow-wrap: break-word;
}
.quote-card__sub {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-400);
  overflow-wrap: break-word;
}
@keyframes quote-spin { to { transform: rotate(360deg); } }
.quote-strip { display: none; }

/* ---------- 6. 工具条：搜索 + 话题 ---------- */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}
.searchbox { position: relative; width: 100%; }
.searchbox input {
  width: 100%;
  padding: 11px 42px 11px 42px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.searchbox input::placeholder { color: var(--ink-400); }
.searchbox input:focus {
  outline: none;
  border-color: var(--brand-300);
  box-shadow: 0 0 0 4px rgba(124, 198, 226, .18);
}
.searchbox input::-webkit-search-cancel-button { display: none; }
.searchbox__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  translate: 0 -50%;
  color: var(--ink-400);
  pointer-events: none;
}
.searchbox__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  translate: 0 -50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-500);
  cursor: pointer;
}
.searchbox__clear:hover { background: var(--brand-100); color: var(--brand-700); }
.searchbox__clear .ic { width: 12px; height: 12px; }

.tag-chips {
  display: flex;
  gap: 8px;
  padding: 2px 2px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tag-chips::-webkit-scrollbar { display: none; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 6px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-500);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}
.tag-chip:hover { border-color: var(--brand-300); color: var(--brand-700); transform: translateY(-1px); }
.tag-chip.is-active {
  background: var(--brand-100);
  border-color: var(--brand-300);
  color: var(--brand-700);
  font-weight: 600;
}

/* 当前筛选摘要（归档 / 话题 / 搜索） */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 8px 12px;
  border: 1px solid var(--brand-100);
  border-radius: 12px;
  background: var(--brand-50);
  font-size: 13px;
  color: var(--ink-700);
}
.filter-bar[hidden] { display: none; }
.filter-bar__label { font-weight: 700; color: var(--brand-700); }
.filter-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 10px;
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-700);
}
.filter-bar__item b { color: var(--brand-700); font-weight: 700; }
.filter-bar__item button {
  border: 0;
  padding: 0 4px;
  background: transparent;
  color: var(--ink-500);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.filter-bar__item button:hover { color: var(--brand-700); }
.filter-bar__count { color: var(--ink-500); }
.filter-bar__clear {
  margin-left: auto;
  border: 0;
  padding: 2px 4px;
  background: transparent;
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.filter-bar__clear:hover { color: var(--brand-700); text-decoration: underline; }

/* ---------- 7. 消息气泡流（布局同构于频道预览，视觉为鲸鱼） ---------- */
.feed { scroll-margin-top: 84px; }
.feed__list { padding-top: 6px; }

.day-divider { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.day-divider:first-child { margin-top: 12px; }
.day-divider__line { display: none; }
.day-divider::before { content: ""; width: 6px; height: 6px; border: 1.5px solid var(--brand-500); border-radius: 50%; }
.day-divider::after { content: ""; flex: 1; height: 1px; margin-left: 5px; background: var(--line); }
.day-divider__label { font-family: var(--font-num); font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--ink-500); }
.msg { margin-bottom: 14px; scroll-margin-top: 100px; }
.msg__bubble { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; padding: 23px 25px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-soft); transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease; }
.msg__bubble:has(> .msg__photos) { grid-template-columns: minmax(0, 1fr) 160px; }
.msg__bubble:hover { transform: translateY(-2px); border-color: var(--brand-300); box-shadow: var(--shadow-lift); }
.msg__body { min-width: 0; }
.msg__body .msg__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 13px; line-height: 1.8; color: var(--ink-500); }
.msg__body .msg__title { margin-bottom: 9px; font-size: 18px; line-height: 1.55; font-weight: 700; letter-spacing: -.015em; }
.msg__body .msg__title a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.msg__body .msg__tags { margin-top: 13px; }
.msg__body .msg__tag { padding: 2px 9px; font-size: 11px; background: var(--surface-2); color: var(--ink-500); }
.msg__bubble > .msg__photos { grid-column: 2; grid-row: 1; align-self: start; width: 160px; height: 132px; max-height: none; aspect-ratio: auto; margin-top: 2px; gap: 4px; border-radius: 12px; overflow: hidden; }
.msg__bubble > .msg__photos .msg__photo { min-height: 0; border-radius: 5px; }
.msg__bubble > .msg__photos img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.msg__bubble > .msg__photos .msg__photo-more { font-size: 18px; }
.msg__bubble > .msg__photos .msg__photo-more em { display: none; }
.msg__bubble > .msg__meta { grid-column: 1 / -1; padding-top: 14px; margin-top: 17px; border-top: 1px solid var(--line); }
.msg__open { margin-right: auto; display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-sans); font-size: 11px; font-weight: 600; color: var(--ink-500); }
.msg__open:hover { color: var(--brand-600); }
.msg__open span { font-size: 15px; }

/* 新消息“浮出水面”：只在真正新增时触发，筛选与翻页回流不重复播放 */
.msg--new {
  animation: msg-surface .52s cubic-bezier(.22, .8, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes msg-surface {
  from { opacity: 0; transform: translateY(14px) scale(.99); }
  to   { opacity: 1; transform: none; }
}

/* 转发标记 */
.msg__forward {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  padding: 2px 10px;
  border: 1px solid var(--warm-300);
  border-radius: var(--radius-pill);
  background: var(--warm-100);
  font-size: 12px;
  font-weight: 600;
  color: var(--warm-600);
}
.msg__forward .ic { width: 12px; height: 12px; }

/* 消息正文（来自频道的安全化 HTML） */
.msg__text {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-700);
  overflow-wrap: break-word;
}
.msg__text p { margin: 0 0 .6em; }
.msg__text p:last-child { margin-bottom: 0; }
.msg__text a {
  color: var(--brand-700);
  text-decoration: underline;
  text-decoration-color: var(--brand-100);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: text-decoration-color .15s ease;
}
.msg__text a:hover { text-decoration-color: var(--brand-500); }
.msg__text b, .msg__text strong { color: var(--ink-900); }
.msg__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.msg__tag {
  display: inline-block;
  padding: 1px 9px;
  border-radius: var(--radius-pill);
  background: var(--brand-50);
  font-size: 13px;
  line-height: 1.7;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.msg__tag:hover { background: var(--brand-100); color: var(--brand-700); }
.msg__text pre {
  margin: .6em 0;
  padding: 12px 14px;
  background: var(--code-bg);
  border: 1px solid var(--brand-100);
  border-radius: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-900);
}
.msg__text code {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--surface-2);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--brand-700);
}
.msg__text pre code { background: transparent; padding: 0; color: inherit; }
.msg__text blockquote {
  margin: .6em 0;
  padding: 4px 14px;
  border-left: 3px solid var(--brand-300);
  color: var(--ink-500);
}
.msg__text hr { border: none; border-top: 1px dashed var(--line); margin: 1em 0; }
.msg__text u { text-underline-offset: 3px; }
.msg__text s { color: var(--ink-400); }

/* 图片 / 视频缩略图：多图统一限高拼图，避免长截图撑满整屏 */
.msg__photos { margin-top: 10px; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.msg__photos--multi {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  aspect-ratio: 16 / 10;
  max-height: 400px;
}
.msg__photos--two { grid-template-rows: minmax(0, 1fr); }
.msg__photos--three { grid-template-columns: 1.35fr 1fr; }
.msg__photos--three .msg__photo:first-child { grid-row: span 2; }
.msg__photo {
  position: relative;
  display: block;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.msg__photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  transition: transform .25s ease;
}
/* 详情页单图：按原图比例展示，小图不放大、长图不裁剪，居中完整可见 */
.msg__photos--single {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.msg__photos--single .msg__photo {
  width: auto;
  max-width: 100%;
  background: transparent;
  overflow: visible;
  border-radius: 14px;
}
.msg__photos--single .msg__photo img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 14px;
  margin: 0 auto;
}
.msg__photos--multi .msg__photo { min-height: 0; }
.msg__photos--multi .msg__photo img { height: 100%; max-height: none; }
.msg__photo--more { cursor: pointer; }
.msg__photo-more {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(7, 16, 32, .58);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .02em;
}
.msg__photo-more em { font-style: normal; font-size: 12px; font-weight: 500; opacity: .88; }
.msg__photo:hover img { transform: scale(1.015); }
.msg__video-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(31, 58, 79, .72);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(4px);
}

.msg__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.msg__title a {
  color: var(--ink-900);
  text-decoration: none;
}
.msg__title a:hover {
  color: var(--brand-600);
  text-decoration: underline;
  text-decoration-color: var(--brand-300);
  text-underline-offset: 4px;
}
.msg__more {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-700);
}
.msg__more:hover { color: var(--brand-700); }

.msg--pinned .msg__bubble { border-color: var(--pinned-border); background: var(--pinned-grad); }
.msg__pinned { display: inline-block; margin-bottom: 10px; padding: 2px 8px; border-radius: 5px; background: var(--warm-100); font-size: 11px; font-weight: 600; color: var(--warm-600); }
.arch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  margin-bottom: 2px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  color: var(--ink-700);
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.arch-item:hover { background: var(--surface-2); }
.arch-item.is-active {
  background: var(--brand-100);
  color: var(--brand-700);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--brand-500);
}
.arch-item.is-active .arch-count { background: var(--surface); color: var(--brand-700); }
.arch-count {
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--ink-400);
}
.side-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-900);
}

.post-shell { max-width: 900px; padding-top: 28px; padding-bottom: 64px; }
.post-breadcrumb { display: flex; gap: 12px; margin-bottom: 22px; font-size: 12px; color: var(--ink-500); }
.post-page { padding: 40px 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-soft); }

/* 详情页评论区（后台插件输出） */
.comments {
  margin-top: 26px;
  padding: 30px 40px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}
.comments__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.02em;
  color: var(--ink-900);
}
.comments__title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-500);
}
.comments__body { min-height: 220px; }
.post-page__title { font-family: var(--font-display); font-size: clamp(23px, 3vw, 32px); font-weight: 750; line-height: 1.55; letter-spacing: -.025em; color: var(--ink-900); }
.post-page__text { line-height: 1.95; }
.post-page .msg__text { overflow-wrap: anywhere; }
.post-page .msg__text table { display: block; max-width: 100%; overflow-x: auto; }
.post-page__back { padding-top: 24px; border-top: 1px solid var(--line); }
.post-page__flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }

/* 打捞小票：作者名/时间/阅读，用虚线票根呈现 */
.post-ticket {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: 12px 0 20px;
  padding: 11px 16px;
  border: 1px dashed var(--ticket-border);
  border-radius: 12px;
  background: var(--ticket-grad);
}
.post-ticket__cell { display: flex; align-items: baseline; gap: 7px; }
.post-ticket__cell em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ticket-ink);
}
.post-ticket__cell b {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ticket-strong);
  font-variant-numeric: tabular-nums;
}
.post-ticket__cell + .post-ticket__cell { padding-left: 20px; border-left: 1px dashed var(--ticket-border); }
.post-ticket__serial {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--ticket-ink);
}
.post-page__text { font-size: 15.5px; }
.msg__text img, .post-page__text img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: .7em 0;
  border-radius: 12px;
  cursor: zoom-in;
}
.post-page__draft {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--draft-bg);
  color: var(--draft-ink);
  font-size: 12px;
  font-weight: 600;
}
.post-page__forward {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--warm-100);
  color: var(--warm-600);
  font-size: 12px;
  font-weight: 600;
}
.post-page__back { margin-top: 28px; font-size: 14px; }
.post-page__back a { color: var(--brand-700); font-weight: 600; }
.post-page .msg__photos { margin-top: 16px; }

/* 详情页图片轮播 */
.gallery {
  position: relative;
  margin-top: 16px;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1220;
}
.gallery__viewport {
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.gallery__viewport::-webkit-scrollbar { display: none; }
.gallery__viewport:focus-visible { box-shadow: inset 0 0 0 2px var(--brand-500); }
.gallery__slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery__slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72vh;
  cursor: zoom-in;
}
.gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding-bottom: 3px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #111;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  transform: translateY(-50%);
}
.gallery__nav:disabled { opacity: .35; cursor: default; }
.gallery__nav--prev { left: 10px; }
.gallery__nav--next { right: 10px; }
.gallery__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 12px;
  background: #0b1220;
}
.gallery__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gallery__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.gallery__dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
}
.gallery__dot.is-active::before { background: #fff; }
.gallery__dot:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.gallery__count {
  color: rgba(255, 255, 255, .75);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 引用块（回复/引用某条消息，可点击站内跳转） */
.msg__quote {
  display: block;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--brand-500);
  border-radius: 10px;
  background: var(--brand-50);
  transition: background .15s ease;
}
.msg__quote:hover { background: var(--brand-100); }
.msg__quote-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-700);
}
.msg__quote-text {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-500);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 文件附件卡片（预览页无直链，点击去 Telegram 获取） */
.msg__files { margin-top: 10px; display: grid; gap: 8px; }
.msg__file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1.5px dashed var(--brand-100);
  border-radius: 12px;
  background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease;
}
.msg__file:hover { border-color: var(--brand-300); background: var(--brand-50); }
.msg__file-ic { width: 20px; height: 20px; flex: none; color: var(--brand-500); }
.msg__file-main { min-width: 0; display: flex; flex-direction: column; }
.msg__file-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
  overflow-wrap: anywhere;
}
.msg__file-size { font-size: 12px; color: var(--ink-400); }
.msg__file-go {
  margin-left: auto;
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-600);
}

/* 引用跳转命中高亮 */
@keyframes msg-flash {
  0%   { background: var(--warm-100); }
  100% { background: var(--surface); }
}
.msg.flash .msg__bubble { animation: msg-flash 1.6s ease both; }

/* 气泡内底栏：浏览数 + 时间（时间为原帖链接） */
.msg__meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
  font-family: var(--font-num);
  font-size: 12px;
  color: var(--ink-400);
}
.msg__meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.msg__meta .ic { width: 13px; height: 13px; }
.msg__time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-400);
}

/* ---------- 8. 空状态 / 加载更多 ---------- */
.empty { text-align: center; padding: 40px 20px 54px; }
.empty__bubble {
  position: relative;
  display: inline-block;
  padding: 9px 18px;
  border: 1.5px solid var(--brand-100);
  border-radius: 16px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink-500);
  box-shadow: var(--shadow-soft);
}
.empty__bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-right: 1.5px solid var(--brand-100);
  border-bottom: 1.5px solid var(--brand-100);
  transform: translateX(-50%) rotate(45deg);
}
.empty__title { margin-top: 10px; font-size: 15.5px; font-weight: 700; color: var(--ink-700); }
.empty__desc { margin-top: 4px; font-size: 13px; color: var(--ink-400); }
.empty .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--brand-50);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-700);
  cursor: pointer;
  transition: background .15s ease;
}
.empty .btn:hover { background: var(--brand-100); }

/* 空状态：鲸鱼吐泡泡（基于 logo，仅做位移与气泡） */
.empty__whale {
  position: relative;
  display: inline-block;
  margin: 12px auto 4px;
}
.empty__whale .empty__logo { margin: 0; animation: whale-bob 4.8s ease-in-out infinite; }
.empty__breath {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--brand-300);
  background: var(--breath-bg);
  opacity: 0;
  pointer-events: none;
}
.empty__breath.b1 { width: 10px; height: 10px; left: 62%; top: 8%; animation: breath 4.4s ease-out .2s infinite; }
.empty__breath.b2 { width: 7px; height: 7px; left: 71%; top: 2%; animation: breath 4.4s ease-out 1.6s infinite; }
.empty__breath.b3 { width: 5px; height: 5px; left: 57%; top: 2%; animation: breath 4.4s ease-out 3s infinite; }

@keyframes whale-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes breath {
  0% { opacity: 0; transform: translateY(6px) scale(.75); }
  20% { opacity: .85; }
  70% { opacity: .5; }
  100% { opacity: 0; transform: translateY(-30px) scale(1.2); }
}

.feed__more { text-align: center; }
.load-more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 10px 22px;
  border: 1.5px solid var(--brand-100);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand-700);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.load-more:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); background: var(--brand-50); }
.load-more .fish { width: 34px; height: auto; }
.feed__end {
  margin-top: 18px;
  padding: 12px 0 4px;
  font-size: 12.5px;
  color: var(--ink-400);
  letter-spacing: 2px;
}

/* ---------- 品牌图形（鲸鱼 logo） ---------- */
.logo__mark { display: inline-flex; align-items: center; }
.logo__mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(45, 106, 180, .16));
}
.logo__img { display: block; }
.chan-card__logo { display: none; }
.empty__logo { width: 150px; height: auto; display: block; margin: 12px auto 4px; }
.feed__loading .fish { width: 34px; height: auto; }
.load-more .fish { width: 30px; height: auto; }

/* 捞鱼中 / 再捞一网：鲸鱼轻轻游动 */
.feed__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 0 34px;
  font-size: 13px;
  color: var(--ink-400);
}
.feed__loading .fish { animation: fish-swim 1.8s ease-in-out infinite; }
@keyframes fish-swim {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-6px) rotate(3deg); }
}
.load-more .fish { transition: transform .25s ease; }
.load-more:hover .fish { transform: translateX(3px) rotate(-8deg); }
.admin-fish { width: 40px; height: auto; }
.admin-fish, .login-fish { object-fit: contain; }

.logo__footer-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(45, 106, 180, .16));
}
.login-fish { width: 62px; height: auto; margin: 0 auto 4px; display: block; }

.tag-chips.is-static { flex-wrap: wrap; overflow: visible; gap: 8px; padding: 4px 0; }
/* 标签四族：按名称哈希落到水蓝/薄荷/暖沙/石墨，夜晚换成同族的夜光色 */
.tag-chip.tc--a { --tc-bg: #E3F2FB; --tc-fg: #1F5F86; }
.tag-chip.tc--b { --tc-bg: #DFF4EA; --tc-fg: #1F6E54; }
.tag-chip.tc--c { --tc-bg: #FFF1D0; --tc-fg: #7A5410; }
.tag-chip.tc--d { --tc-bg: #EEF3F6; --tc-fg: #44606F; }
html[data-theme="night"] .tag-chip.tc--a { --tc-bg: #123246; --tc-fg: #9BD7F2; }
html[data-theme="night"] .tag-chip.tc--b { --tc-bg: #10352C; --tc-fg: #8FE0C0; }
html[data-theme="night"] .tag-chip.tc--c { --tc-bg: #38301A; --tc-fg: #F0CE8A; }
html[data-theme="night"] .tag-chip.tc--d { --tc-bg: #1C2E3A; --tc-fg: #B7CBD6; }
.tag-chip.tc { flex: none; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 11px; padding: 5px 10px; gap: 6px; border: 1px solid transparent; background: color-mix(in srgb, var(--tc-bg) 40%, var(--bg)); color: var(--tc-fg); transition: background-color .2s ease, border-color .2s ease; }
.tag-chip.tc:hover { border-color: var(--tc-fg); }
.tag-chip.tc .tag-chip__count {
  flex: none;
  font-family: var(--font-num);
  font-weight: 500;
  font-size: 10px;
  opacity: .8;
  background: var(--chip-count-bg);
  padding: 0 5px;
  border-radius: var(--radius-pill);
}
.tag-chip.tc.is-active,
.tag-chip.tc[data-active="1"] {
  outline: 2px solid currentColor;
  outline-offset: -1px;
  font-weight: 700;
  background: var(--tc-fg);
  border-color: var(--tc-fg);
  color: var(--tc-bg);
}

/* ---------- 图片灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 35, 48, .88);
  cursor: zoom-out;
  animation: lb-in .18s ease;
}
@keyframes lb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--ink-900);
  font-size: 15px;
  cursor: pointer;
}
.lightbox__close .ic { width: 18px; height: 18px; }
.msg__photo:not(.msg__photo--more) { cursor: zoom-in; }

.site-footer { margin-top: 64px; padding-top: 14px; background: var(--footer-grad); border-top: 1px solid var(--line); }
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  padding: 34px 22px 22px;
}
.logo--footer { margin-bottom: 10px; }
.footer__desc { font-size: 13px; color: var(--ink-500); max-width: 32em; }
.footer__desc a { text-decoration: underline; text-underline-offset: 3px; }
.footer__col h3 { margin-bottom: 10px; font-size: 13.5px; font-weight: 800; color: var(--ink-900); }
.footer__col li { margin-bottom: 8px; }
.footer__col a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--ink-500);
  transition: color .15s ease;
}
.footer__col a:hover { color: var(--brand-700); }
.footer__col a .ic { width: 12px; height: 12px; }
.footer__hint { font-size: 12.5px; color: var(--ink-500); line-height: 1.9; }
.footer__hint code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 6px;
  padding: 1px 7px;
  color: var(--brand-700);
  white-space: nowrap;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-top: 13px;
  padding-bottom: 22px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--ink-400);
}

@media (max-width: 1000px) {
  .harbor { gap: 32px; }
  .layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
  .msg__bubble:has(> .msg__photos) { grid-template-columns: minmax(0, 1fr) 126px; }
  .msg__bubble > .msg__photos { width: 126px; height: 116px; }
  .chan-card { padding: 20px; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding-top: 32px; grid-template-columns: 1fr 1fr; align-items: start; }
  .header__nav { gap: 22px; }
  .harbor { gap: 24px; padding-top: 28px; }
  .harbor h1 { font-size: 40px; }
  .harbor__weather { justify-content: center; margin-inline: 0; }
  #harborScene, .harbor__weather-line { display: none; }
  .footer__inner { grid-template-columns: 1.5fr 1fr 1fr; gap: 20px; }
}
@media (max-width: 600px) {
  :root { --header-h: 64px; }
  .container { padding-inline: 18px; }
  .header__inner { gap: 14px; }
  .header__inner .logo { flex: 0 1 auto; min-width: 0; gap: 6px; }
  .header__inner .logo__text { min-width: 0; }
  .header__inner .logo__name { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header__inner .logo__tag { display: none; }
  .header__nav { gap: 16px; }
  .header__nav a { font-size: 12px; }
  .header__nav a:first-child:not(:only-child) { display: none; }
  .harbor { grid-template-columns: 1fr; gap: 18px; padding: 18px 0 24px; }
  .harbor__copy { padding-inline: 4px; }
  .harbor h1 { font-size: clamp(24px, 7.3vw, 30px); line-height: 1.35; margin-top: 10px; white-space: nowrap; }
  .harbor h1 br { display: none; }
  .harbor h1 span { display: inline; }
  .harbor__intro { margin-top: 10px; font-size: 12px; }
  .harbor__link { display: none; }
  .harbor__view { padding: 0; }
  .seascape { aspect-ratio: 2.55 / 1; border-radius: 100px 100px 40px 40px; }
  .seascape__whale { width: 18%; bottom: 20%; }
  .harbor__weather { justify-content: space-between; margin: 10px 6px 0; font-size: 10px; }
  #harborScene { display: inline; }
  .feed__heading { margin-bottom: 14px; }
  .feed__heading h2 { font-size: 21px; }
  .feed__heading > span { font-size: 10px; }
  .searchbox input { padding-block: 10px; font-size: 13px; }
  .tag-chips.is-static { gap: 7px; }
  .tag-chip.tc { padding: 5px 9px; font-size: 10px; }
  .day-divider { margin-top: 22px; }
  .msg__bubble { padding: 17px 17px 12px; gap: 0 14px; border-radius: 16px; }
  .msg__bubble:has(> .msg__photos) { grid-template-columns: minmax(0, 1fr) 94px; }
  .msg__bubble > .msg__photos { width: 94px; height: 94px; }
  .msg__body .msg__title { font-size: 15px; margin-bottom: 7px; }
  .msg__body .msg__text { font-size: 12px; -webkit-line-clamp: 2; }
  .msg__body .msg__tags { margin-top: 9px; }
  .msg__body .msg__tag { font-size: 10px; padding: 2px 6px; }
  .msg__bubble > .msg__meta { margin-top: 13px; padding-top: 10px; font-size: 10px; }
  .msg__bubble .msg__video-badge { inset: auto 3px 3px; padding: 3px; font-size: 9px; }
  .sidebar { grid-template-columns: 1fr; gap: 20px; }
  .chan-tip { background: transparent; border: 0; }
  .post-shell { padding-top: 18px; padding-inline: 12px; }
  .post-page { padding: 24px 20px; border-radius: 20px; }
  .comments { padding: 22px 20px 26px; border-radius: 20px; }
  .post-breadcrumb { padding-left: 8px; }
  .post-ticket { gap: 8px 14px; padding: 10px 12px; }
  .post-ticket__cell + .post-ticket__cell { padding-left: 0; border: 0; }
  .post-ticket__serial { display: none; }
  .post-page__text { font-size: 14px; }
  .gallery__slide img { max-height: 60vh; }
  .gallery__nav { width: 32px; height: 32px; font-size: 21px; }
  .gallery__nav--prev { left: 6px; }
  .gallery__nav--next { right: 6px; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ---------- 10.5 时段切换（右上角） ---------- */
.header__tools { margin-left: auto; position: relative; flex: none; }

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-700);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.theme-btn:hover { border-color: var(--brand-300); color: var(--brand-700); transform: translateY(-1px); }
.theme-btn[aria-expanded="true"] { border-color: var(--brand-300); color: var(--brand-700); }
.theme-btn .ic { width: 15px; height: 15px; }
.theme-btn__dot {
  width: 5px;
  height: 5px;
  margin-left: -1px;
  border-radius: 50%;
  background: var(--mint-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint-500) 22%, transparent);
}
.theme-btn[data-mode="auto"] .theme-btn__dot { background: var(--mint-500); }
.theme-btn[data-mode="manual"] .theme-btn__dot { background: var(--warm-500); box-shadow: none; }

.theme-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 60;
  min-width: 208px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  animation: theme-menu-in .16s ease-out;
}
@keyframes theme-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.theme-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-700);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease;
}
.theme-menu__item:hover { background: var(--surface-2); color: var(--ink-900); }
.theme-menu__item[aria-checked="true"] { color: var(--brand-700); font-weight: 700; }
.theme-menu__item .ic { width: 15px; height: 15px; }
.theme-menu__hint { margin-left: auto; font-size: 11.5px; font-weight: 400; color: var(--ink-400); }
.theme-menu__sep { height: 1px; margin: 5px 8px; background: var(--line); }

html[data-theme="night"] .logo__mark img,
html[data-theme="night"] .logo__footer-img { filter: brightness(1.65) saturate(.7); }
.theme-menu__item[aria-checked="true"] { background: var(--brand-50); }
@media (max-width: 600px) {
  .header__tools { margin-left: 0; }
  .theme-btn { padding: 7px 10px; font-size: 11px; gap: 6px; }
  .theme-btn__dot { display: none; }
}

/* ---------- 10.6 时段扫屏切换 ---------- */
/* View Transitions：旧画面垫底，新画面从起点以圆形扩散铺满整页；
   手动切换起点是右上角按钮，自动跨时段起点是页面左上角 */
html.theme-sweep::view-transition-group(root) {
  height: 100dvh;
  overflow: clip;
  animation: none;
}
html.theme-sweep::view-transition-image-pair(root) {
  isolation: isolate;
  height: 100dvh;
}
html.theme-sweep::view-transition-old(root) {
  z-index: 0;
  animation: none;
  object-fit: cover;
  object-position: left top;
  height: 100%;
}
html.theme-sweep::view-transition-new(root) {
  z-index: 1;
  object-fit: cover;
  object-position: left top;
  height: 100%;
  animation: sweep-reveal .68s cubic-bezier(.77, 0, .18, 1) both;
}
@keyframes sweep-reveal {
  from { clip-path: circle(0 at var(--sweep-x, 0px) var(--sweep-y, 0px)); }
  to   { clip-path: circle(170vmax at var(--sweep-x, 0px) var(--sweep-y, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  html.theme-sweep::view-transition-new(root),
  html.theme-sweep::view-transition-old(root) { animation: none; }
}

/* ---------- 11. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* 延迟归零，避免错峰入场变成“先空白后闪现” */
  .msg--new { animation-delay: 0s !important; }
  .logo__mark::before, .logo__mark::after { animation-delay: 0s !important; }
  .header-wave svg, .day-divider__line svg, .feed__loading .fish, .footer-wave { animation: none; }
}
