@font-face {
  font-family: "Space Grotesk";
  src: url("/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/DMMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/DMMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #f2eee4;
  --paper-2: #e7e0d2;
  --card: #fffdf8;
  --ink: #171713;
  --muted: #6d685d;
  --soft: #958f82;
  --line: #1b1b17;
  --acid: #d8ff45;
  --coral: #ff654f;
  --blue: #4d6bff;
  --lilac: #c9b8ff;
  --mint: #9fefcf;
  --shadow: 5px 5px 0 var(--ink);
  --font: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Instrument Serif", Georgia, "Songti SC", serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --header-h: 64px;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(23, 23, 19, .12) .7px, transparent .7px);
  background-size: 18px 18px;
  opacity: .45;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, rgba(242, 238, 228, .3), transparent 20%, transparent 80%, rgba(242, 238, 228, .65));
}
::selection { background: var(--acid); color: var(--ink); }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
img { max-width: 100%; }
.hidden { display: none !important; }
.desktop-only { display: inline-flex; }
.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; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 28px;
  background: rgba(242, 238, 228, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.1);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  text-decoration: none;
  letter-spacing: -.055em;
  line-height: 1;
  white-space: nowrap;
}
.brand-cn { font-family: var(--font); font-size: 25px; font-weight: 700; letter-spacing: -.1em; line-height: 1; }
.brand-serif { font-family: var(--serif); font-style: italic; font-size: 30px; font-weight: 400; letter-spacing: -.045em; }
.brand sup { font-family: var(--mono); font-size: 8px; align-self: flex-start; margin-top: 2px; margin-left: 2px; }
.top-nav { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 248, .6); }
.nav-tab {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}
.nav-tab span { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; opacity: .55; }
.nav-tab.is-active { background: var(--ink); color: var(--paper); }
.nav-tab.is-active span { opacity: .7; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, .55);
  white-space: nowrap;
}
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #17b26a; box-shadow: 0 0 0 0 rgba(23, 178, 106, .5); animation: livePulse 2.2s infinite; }
.live-pill.is-syncing i { background: var(--coral); animation-duration: 1s; }
.live-pill.is-error i { background: #d92d20; animation: none; }
.icon-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.icon-button svg { width: 16px; height: 16px; }
.icon-button:hover { transform: rotate(-8deg); background: var(--acid); }
.icon-button.is-spinning svg { animation: spin .8s linear infinite; }
.mail-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.mail-button:hover { background: #2a2a22; }
.mail-dot { width: 7px; height: 7px; border-radius: 50%; background: #f0a21b; }
.mail-dot.is-on { background: var(--acid); box-shadow: 0 0 0 3px rgba(216, 255, 69, .14); }
.mail-state { font-family: var(--mono); font-size: 8px; letter-spacing: .06em; color: var(--acid); background: rgba(216, 255, 69, .12); border-radius: 999px; padding: 2px 5px; }
.mail-button.is-off .mail-state { color: #ffb020; background: rgba(255, 176, 32, .12); }

/* ---------------- page / hero ---------------- */
.page { position: relative; z-index: 2; }
.hero {
  max-width: 1500px;
  margin: 0 auto;
  padding: 54px 28px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  gap: 30px;
  align-items: stretch;
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.eyebrow-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.eyebrow { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.issue { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; color: var(--ink); border: 1px solid var(--line); padding: 3px 7px; border-radius: 999px; background: var(--card); }
.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(58px, 6.7vw, 104px);
  line-height: .87;
  letter-spacing: -.075em;
  font-weight: 700;
}
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.045em; position: relative; display: inline-block; white-space: nowrap; isolation: isolate; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: -.01em; bottom: .05em; height: .13em; background: var(--acid); z-index: -1; transform: skewX(-8deg); }
.hero-lede { max-width: 570px; margin: 0; font-size: 14px; line-height: 1.75; color: #49453c; }
.hero-lede b { color: var(--ink); }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 24px; flex-wrap: wrap; }
.primary-cta {
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 11px 17px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  box-shadow: 3px 3px 0 rgba(23, 23, 19, .18);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.primary-cta:hover { background: var(--acid); color: var(--ink); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.cta-arrow { font-size: 15px; line-height: 1; }
.text-cta { border: 0; background: transparent; padding: 0; font-size: 12px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--ink); }
.text-cta span { color: var(--muted); margin-left: 4px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 12px 14px 10px 0; border-right: 1px solid rgba(27,27,23,.2); }
.stat:last-child { border-right: 0; }
.stat-value { display: block; font-size: 26px; line-height: 1; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 6px; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }

/* hero art */
.hero-art {
  position: relative;
  min-height: 450px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(140deg, #e9f5ac 0%, #e6d8ff 47%, #ffd3c8 100%);
  box-shadow: var(--shadow);
  isolation: isolate;
}
.hero-art::before {
  content: "POB";
  position: absolute;
  right: -18px;
  bottom: -55px;
  font-size: 240px;
  line-height: .8;
  font-weight: 700;
  letter-spacing: -.12em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(23, 23, 19, .28);
  z-index: 0;
}
.art-orbit { position: absolute; width: 310px; height: 310px; border: 1px solid rgba(23,23,19,.35); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.art-orbit::before { content: ""; position: absolute; inset: 28px; border: 1px dashed rgba(23,23,19,.28); border-radius: 50%; }
.art-orbit::after { content: ""; position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--acid); border: 1px solid var(--line); top: -7px; left: 50%; }
.art-card {
  position: absolute;
  width: 174px;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ddd;
  box-shadow: 6px 7px 0 var(--ink);
  transform: rotate(var(--rot, 0deg)) translate(var(--tx, 0), var(--ty, 0));
  z-index: 2;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.art-card:nth-child(2) { left: 7%; top: 8%; --rot: -7deg; z-index: 4; }
.art-card:nth-child(3) { left: 35%; top: 23%; --rot: 4deg; z-index: 5; width: 198px; }
.art-card:nth-child(4) { right: 6%; top: 10%; --rot: 8deg; z-index: 3; }
.hero-art:hover .art-card:nth-child(2) { transform: rotate(-9deg) translate(-4px, -5px); }
.hero-art:hover .art-card:nth-child(3) { transform: rotate(2deg) translateY(-9px); }
.hero-art:hover .art-card:nth-child(4) { transform: rotate(10deg) translate(4px, -4px); }
.art-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-card .art-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 44px; color: rgba(23,23,19,.55); background: linear-gradient(145deg, #f4f0e8, #d8d0bf); }
.art-caption { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 5px 7px; background: rgba(255,253,248,.9); border: 1px solid var(--line); border-radius: 5px; font-family: var(--mono); font-size: 7px; line-height: 1.3; letter-spacing: .04em; text-transform: uppercase; z-index: 3; }
.art-caption b { display: block; font-family: var(--font); font-size: 9px; letter-spacing: 0; text-transform: none; }
.art-note { position: absolute; left: 7%; bottom: 9%; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; line-height: 1.35; transform: rotate(-4deg); z-index: 6; padding: 7px; border: 1px solid var(--line); background: var(--card); }
.art-sticker {
  position: absolute;
  right: 7%;
  bottom: 10%;
  width: 74px;
  height: 74px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(10deg);
  font-size: 13px;
  line-height: .95;
  font-weight: 700;
  letter-spacing: -.03em;
  z-index: 6;
}
.art-sticker span { font-family: var(--mono); font-size: 6px; letter-spacing: .1em; font-weight: 400; }

/* ticker */
.ticker {
  display: flex;
  align-items: stretch;
  min-height: 40px;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.ticker-label { flex: 0 0 auto; display: flex; align-items: center; padding: 0 16px; background: var(--acid); color: var(--ink); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; font-weight: 500; }
.ticker-window { flex: 1 1 auto; display: flex; align-items: center; overflow: hidden; }
.ticker-track { display: inline-flex; align-items: center; white-space: nowrap; animation: ticker 44s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; font-family: var(--mono); font-size: 9px; letter-spacing: .02em; color: #e9e4d8; border-right: 1px solid rgba(255,255,255,.14); }
.ticker-item b { color: var(--acid); font-weight: 500; }
.ticker-item .tick-type { color: #a8a18f; }
.ticker-time { flex: 0 0 auto; display: flex; align-items: center; padding: 0 16px; border-left: 1px solid rgba(255,255,255,.15); font-family: var(--mono); font-size: 8px; letter-spacing: .06em; color: var(--acid); }

/* email banner */
.alert-banner {
  max-width: 1500px;
  margin: 18px auto 0;
  width: calc(100% - 56px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--acid);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--ink);
}
.alert-icon { width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 13px; flex: 0 0 auto; background: var(--card); }
.alert-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; min-width: 0; }
.alert-copy b { font-size: 12px; font-weight: 700; }
.alert-copy span { font-size: 11px; color: #3d3a25; }
.mini-cta { margin-left: auto; border: 1px solid var(--line); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.banner-close { border: 0; background: transparent; font-size: 18px; line-height: 1; padding: 2px 4px; color: var(--ink); }

/* ---------------- workspace / rail ---------------- */
.workspace {
  max-width: 1500px;
  margin: 0 auto;
  padding: 26px 28px 70px;
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.rail { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 30px); display: flex; flex-direction: column; gap: 14px; }
.rail-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 8px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: var(--muted); }
.rail-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.rail-button {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  text-align: left;
  font-size: 11px;
  font-weight: 550;
  color: #3f3b32;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.rail-button:hover { background: rgba(255,253,248,.7); border-color: rgba(27,27,23,.18); }
.rail-button.is-active { background: var(--ink); color: var(--paper); border-color: var(--line); }
.rail-button .rail-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dot, var(--muted)); }
.rail-button.is-active .rail-dot { background: var(--acid); }
.rail-button .rail-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.rail-button .rail-name .rail-new { width: 5px; height: 5px; background: var(--coral); border-radius: 50%; flex: 0 0 auto; }
.rail-button .rail-count { font-family: var(--mono); font-size: 8px; color: var(--muted); }
.rail-button.is-active .rail-count { color: rgba(242,238,228,.65); }

.rail-sources { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(27,27,23,.22); }
.source-summary { width: 100%; border: 0; background: transparent; padding: 0; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 8px; letter-spacing: .04em; color: var(--muted); }
.source-summary span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.source-dot { width: 6px; height: 6px; border-radius: 50%; background: #17b26a; display: inline-block; }
.rail-sources p { margin: 8px 0 0; font-size: 9px; line-height: 1.55; color: var(--soft); }

/* ---------------- feed toolbar ---------------- */
.feed { min-width: 0; }
.feed-toolbar {
  position: sticky;
  top: calc(var(--header-h) + 10px);
  z-index: 35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(242, 238, 228, .92);
  backdrop-filter: blur(12px);
  box-shadow: 3px 3px 0 rgba(23,23,19,.12);
}
.search-wrap { position: relative; flex: 1 1 220px; min-width: 180px; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.search-wrap input { width: 100%; border: 1px solid rgba(27,27,23,.25); background: var(--card); border-radius: 8px; padding: 8px 36px 8px 31px; font-size: 11px; outline: none; }
.search-wrap input:focus { border-color: var(--ink); }
.search-wrap kbd { position: absolute; right: 8px; font-family: var(--mono); font-size: 8px; border: 1px solid rgba(27,27,23,.2); border-radius: 4px; padding: 1px 4px; color: var(--soft); background: #f4f1e9; }
.filter-row { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-chip {
  border: 1px solid rgba(27,27,23,.22);
  background: transparent;
  color: #4c483f;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--ink); }
.filter-chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--dot); display: inline-block; }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.segmented { display: inline-flex; border: 1px solid rgba(27,27,23,.25); border-radius: 7px; overflow: hidden; background: var(--card); }
.segmented button { border: 0; background: transparent; padding: 6px 7px; font-size: 9px; color: var(--muted); border-right: 1px solid rgba(27,27,23,.12); }
.segmented button:last-child { border-right: 0; }
.segmented button.is-active { background: var(--ink); color: var(--paper); }
.toolbar-right select { border: 1px solid rgba(27,27,23,.25); background: var(--card); border-radius: 7px; padding: 6px 7px; font-size: 9px; color: var(--ink); max-width: 104px; }
.toggle-button { border: 1px solid rgba(27,27,23,.25); background: var(--card); border-radius: 7px; padding: 6px 8px; font-size: 9px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.toggle-dot { width: 5px; height: 5px; border-radius: 50%; background: #bcb6a9; }
.toggle-button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.toggle-button[aria-pressed="true"] .toggle-dot { background: var(--acid); }

.feed-subbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px 12px; }
.result-line { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.result-line span:first-child { font-family: var(--mono); font-size: 10px; color: var(--ink); }
.result-line span:last-child { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ghost-button { border: 1px solid rgba(27,27,23,.3); background: var(--card); border-radius: 999px; padding: 4px 8px; font-size: 9px; color: var(--ink); }
.ghost-button:hover { background: var(--acid); }
.sync-note { font-family: var(--mono); font-size: 8px; color: var(--soft); letter-spacing: .02em; white-space: nowrap; }

/* ---------------- content: agency / group ---------------- */
.content { min-height: 300px; }
.agency-block { margin-bottom: 34px; }
.agency-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 8px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--line);
}
.agency-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.agency-title .agency-bar { width: 8px; height: 19px; border-radius: 2px; background: var(--agency-color, var(--ink)); display: inline-block; transform: translateY(1px); }
.agency-title h2 { margin: 0; font-size: 18px; line-height: 1; letter-spacing: -.03em; font-weight: 700; white-space: nowrap; }
.agency-title span { font-family: var(--mono); font-size: 8px; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.agency-meta { font-family: var(--mono); font-size: 8px; color: var(--muted); letter-spacing: .03em; white-space: nowrap; }
.agency-meta b { color: var(--ink); font-weight: 500; }

.group-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 16px;
  overflow: hidden;
  animation: rise .35s ease both;
}
.group-head {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  cursor: pointer;
  user-select: none;
}
.group-head:hover { background: #fbf8f0; }
.group-cover { width: 76px; height: 92px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #e4ded1; position: relative; flex: 0 0 auto; }
.group-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.group-cover .cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(150deg, var(--agency-tint, #eee), #dad2c3); font-family: var(--serif); font-style: italic; font-size: 28px; color: rgba(23,23,19,.55); }
.group-copy { min-width: 0; }
.group-kicker { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.group-kicker i { width: 5px; height: 5px; border-radius: 50%; background: var(--agency-color, var(--ink)); }
.group-name-row { display: flex; align-items: baseline; gap: 9px; min-width: 0; flex-wrap: wrap; }
.group-name { margin: 3px 0 0; font-size: 26px; line-height: 1; letter-spacing: -.055em; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.group-release { margin: 5px 0 0; font-size: 11px; color: #4d493f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-release b { font-weight: 650; }
.group-release .dot { padding: 0 5px; color: #a7a092; }
.group-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.mini-badge { display: inline-flex; align-items: center; gap: 3px; border: 1px solid rgba(27,27,23,.28); border-radius: 999px; padding: 2px 6px; font-family: var(--mono); font-size: 7px; letter-spacing: .03em; color: #5c574c; background: #fbf8f1; white-space: nowrap; }
.mini-badge.new { background: var(--ink); color: var(--acid); border-color: var(--ink); }
.group-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.group-side .side-stat { font-family: var(--mono); font-size: 9px; color: var(--ink); }
.group-side .side-sub { font-family: var(--mono); font-size: 8px; color: var(--muted); white-space: nowrap; }
.group-toggle { width: 22px; height: 22px; border: 1px solid rgba(27,27,23,.25); border-radius: 50%; background: transparent; display: grid; place-items: center; font-size: 13px; line-height: 1; color: var(--muted); }
.group-toggle:hover { background: var(--acid); color: var(--ink); border-color: var(--ink); }
.group-card.is-collapsed .group-body { display: none; }
.group-card.is-collapsed .group-toggle { transform: rotate(-90deg); }

.group-body { border-top: 1px solid var(--line); }
.release-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px dashed rgba(27,27,23,.24); background: #faf6ec; }
.release-strip .strip-label { font-family: var(--mono); font-size: 7px; letter-spacing: .06em; color: var(--muted); margin-right: 2px; }
.release-pill { display: inline-flex; align-items: center; gap: 4px; border: 1px solid rgba(27,27,23,.2); padding: 3px 6px; border-radius: 5px; font-size: 9px; color: #4e4a40; background: #fffdf8; }
.release-pill b { font-family: var(--mono); font-size: 8px; font-weight: 500; }
.release-pill.is-new { background: var(--acid); border-color: var(--line); color: var(--ink); }

.platform-row { display: grid; grid-template-columns: 158px minmax(0, 1fr); border-bottom: 1px solid rgba(27,27,23,.18); }
.platform-row:last-child { border-bottom: 0; }
.platform-meta { padding: 13px 12px; border-right: 1px solid rgba(27,27,23,.16); background: #faf7ef; }
.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 24px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--platform-color, var(--acid));
  color: var(--platform-ink, var(--ink));
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-align: center;
  transform: rotate(-1.5deg);
  box-shadow: 2px 2px 0 rgba(23,23,19,.18);
}
.platform-meta .platform-kind { margin-top: 7px; font-family: var(--mono); font-size: 7px; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.platform-meta .platform-count { margin-top: 2px; font-family: var(--mono); font-size: 8px; color: var(--soft); }
.platform-meta .platform-link { display: inline-block; margin-top: 9px; font-size: 9px; color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(27,27,23,.4); }
.platform-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 9px; padding: 10px; min-width: 0; }

/* event card */
.drop-card {
  position: relative;
  display: grid;
  grid-template-columns: 114px minmax(0, 1fr);
  border: 1px solid rgba(27,27,23,.3);
  border-radius: 10px;
  background: #fffdf8;
  overflow: hidden;
  text-align: left;
  padding: 0;
  min-height: 156px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.drop-card:hover { transform: translate(-1px, -2px); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.drop-thumb { position: relative; background: #ddd7ca; border-right: 1px solid rgba(27,27,23,.25); overflow: hidden; min-height: 156px; }
.drop-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .4s ease; }
.drop-card:hover .drop-thumb img { transform: scale(1.035); }
.drop-thumb .cover-fallback { width: 100%; height: 100%; min-height: 156px; display: grid; place-items: center; background: linear-gradient(145deg, #eee8dc, #d3c9b6); font-family: var(--serif); font-style: italic; font-size: 31px; color: rgba(23,23,19,.4); }
.thumb-tags { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; z-index: 2; }
.type-tag { display: inline-block; background: var(--type-bg, var(--acid)); color: var(--type-ink, var(--ink)); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; font-family: var(--mono); font-size: 7px; font-weight: 500; letter-spacing: .03em; line-height: 1.3; text-transform: uppercase; box-shadow: 1px 1px 0 rgba(23,23,19,.2); }
.new-tag { display: inline-flex; align-items: center; gap: 3px; background: var(--ink); color: var(--acid); border-radius: 4px; padding: 2px 5px; font-family: var(--mono); font-size: 7px; font-weight: 500; letter-spacing: .04em; line-height: 1.3; }
.new-tag::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--coral); }
.drop-body { padding: 9px 10px 8px; display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.drop-album { font-size: 12px; line-height: 1.32; font-weight: 650; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drop-version { font-family: var(--mono); font-size: 7.5px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-meta-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mode-tag { font-family: var(--mono); font-size: 7px; letter-spacing: .03em; color: #5d584c; border: 1px solid rgba(27,27,23,.22); border-radius: 3px; padding: 1px 4px; }
.offers-tag { font-family: var(--mono); font-size: 7px; color: var(--soft); }
.drop-deadline { font-size: 10px; color: #5a554a; line-height: 1.4; margin-top: auto; }
.drop-deadline b { font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--ink); }
.drop-deadline .countdown { display: inline-block; margin-left: 4px; font-family: var(--mono); font-size: 8px; color: var(--muted); }
.drop-card.is-closing .drop-deadline .countdown { background: var(--coral); color: #fff; border-radius: 3px; padding: 1px 4px; }
.drop-card.is-closing .drop-deadline b { color: #c53a27; }
.drop-how { font-size: 9.5px; line-height: 1.45; color: #777164; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drop-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 2px; }
.drop-source { font-family: var(--mono); font-size: 7px; color: #9d968a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-arrow { font-size: 12px; color: var(--ink); transition: transform .15s ease; }
.drop-card:hover .drop-arrow { transform: translateX(3px); }
.drop-card.is-closed { opacity: .55; }

/* album view */
.album-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.album-card { border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; text-align: left; padding: 0; display: flex; flex-direction: column; align-items: stretch; box-shadow: 2px 2px 0 rgba(23,23,19,.18); transition: transform .16s ease, box-shadow .16s ease; }
.album-card:hover { transform: translateY(-3px); box-shadow: 4px 5px 0 var(--ink); }
.album-cover { position: relative; width: 100%; flex: 0 0 auto; aspect-ratio: 1 / 1.12; background: #e0d9cb; overflow: hidden; border-bottom: 1px solid var(--line); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-cover .cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(145deg, var(--agency-tint, #eee), #cfc6b5); font-family: var(--serif); font-style: italic; font-size: 42px; color: rgba(23,23,19,.45); }
.album-tags { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; }
.album-body { width: 100%; padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.album-group { font-family: var(--mono); font-size: 8px; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.album-title { font-size: 13px; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.album-date { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 4px; padding-top: 6px; border-top: 1px dashed rgba(27,27,23,.22); font-family: var(--mono); font-size: 8px; color: var(--muted); }
.album-date b { color: var(--ink); font-weight: 500; }
.album-action { margin-top: 5px; font-size: 8px; color: var(--ink); display: flex; align-items: center; justify-content: space-between; }
.album-action span:last-child { color: var(--muted); }

/* empty / loading */
.empty-state { border: 1px dashed rgba(27,27,23,.35); border-radius: 14px; padding: 44px 20px; text-align: center; background: rgba(255,253,248,.6); }
.empty-state .empty-mark { width: 48px; height: 48px; margin: 0 auto 12px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 23px; background: var(--acid); transform: rotate(-6deg); }
.empty-state h3 { margin: 0; font-size: 17px; letter-spacing: -.03em; }
.empty-state p { margin: 5px auto 0; max-width: 390px; font-size: 11px; color: var(--muted); line-height: 1.65; }
.loading-state { padding: 20px 0; }
.loading-card { height: 78px; border: 1px solid rgba(27,27,23,.18); border-radius: 12px; margin-bottom: 10px; background: linear-gradient(90deg, rgba(255,253,248,.5) 25%, rgba(255,253,248,.95) 37%, rgba(255,253,248,.5) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.loading-state p { font-family: var(--mono); font-size: 9px; color: var(--muted); text-align: center; margin-top: 14px; }

/* footer */
.feed-footer { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 18px; align-items: start; margin-top: 38px; padding-top: 14px; border-top: 1px solid rgba(27,27,23,.28); }
.footmark { font-family: var(--mono); font-size: 8px; letter-spacing: .06em; }
.feed-footer p { margin: 0; font-size: 9px; line-height: 1.6; color: var(--soft); }
.footer-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.text-link { border: 0; background: transparent; padding: 0; font-size: 9px; color: var(--muted); border-bottom: 1px solid rgba(27,27,23,.3); text-decoration: none; }

/* ---------------- dialogs ---------------- */
dialog { color: var(--ink); }
dialog::backdrop { background: rgba(23, 23, 19, .55); backdrop-filter: blur(5px); }
.detail-dialog { width: min(1020px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 10px 10px 0 rgba(23,23,19,.9); overflow: hidden; }
.detail-dialog[open] { animation: dialogIn .22s ease both; }
.dialog-shell { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); max-height: calc(100vh - 42px); }
.detail-gallery { position: relative; background: #ddd6c8; border-right: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.detail-main-img { width: 100%; aspect-ratio: 4 / 5; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #d7cfc0; }
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-main-img .cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 66px; color: rgba(23,23,19,.4); }
.detail-thumbs { display: flex; gap: 5px; flex-wrap: wrap; }
.detail-thumbs button { width: 46px; height: 56px; border: 1px solid rgba(27,27,23,.35); border-radius: 4px; overflow: hidden; padding: 0; background: #e5ded0; }
.detail-thumbs button.is-active { border-color: var(--ink); outline: 2px solid var(--acid); outline-offset: 1px; }
.detail-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-info { overflow: auto; padding: 22px 22px 26px; background: var(--card); }
.detail-topline { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.detail-platform { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; background: var(--platform-color); color: var(--platform-ink); font-size: 9px; font-weight: 700; transform: rotate(-1deg); }
.detail-type { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; font-family: var(--mono); font-size: 7px; background: var(--type-bg); color: var(--type-ink); text-transform: uppercase; }
.detail-close { position: absolute; top: 10px; right: 10px; z-index: 4; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 17px; line-height: 1; display: grid; place-items: center; }
.detail-close:hover { background: var(--acid); }
.detail-group { margin: 12px 0 2px; font-size: 29px; line-height: 1; letter-spacing: -.055em; font-weight: 650; }
.detail-album { margin: 5px 0 0; font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1.05; letter-spacing: -.02em; color: #3f3b32; }
.detail-subline { margin: 8px 0 0; font-family: var(--mono); font-size: 9px; color: var(--muted); line-height: 1.5; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 16px 0; background: rgba(27,27,23,.22); border: 1px solid rgba(27,27,23,.22); border-radius: 8px; overflow: hidden; }
.detail-cell { background: var(--card); padding: 8px 9px; min-width: 0; }
.detail-cell .label { display: block; font-family: var(--mono); font-size: 7px; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.detail-cell .value { display: block; margin-top: 3px; font-size: 11px; font-weight: 600; }
.detail-cell .sub { display: block; margin-top: 2px; font-family: var(--mono); font-size: 7px; color: var(--soft); }
.detail-section { margin-top: 16px; }
.detail-section h3 { margin: 0 0 7px; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.howto-box { border: 1px solid var(--line); border-radius: 8px; background: var(--acid); padding: 10px 11px; font-size: 11px; line-height: 1.6; }
.howto-steps { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.howto-steps li { display: flex; gap: 6px; font-size: 10px; line-height: 1.45; color: #4d493f; }
.howto-steps li::before { content: "→"; font-family: var(--mono); color: var(--ink); }
.detail-versions { display: flex; gap: 4px; flex-wrap: wrap; }
.detail-version { border: 1px solid rgba(27,27,23,.25); border-radius: 4px; padding: 2px 5px; font-family: var(--mono); font-size: 8px; color: var(--muted); background: #faf7ef; }
.offer-list { display: flex; flex-direction: column; gap: 5px; }
.offer-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-decoration: none; border: 1px solid rgba(27,27,23,.25); border-radius: 6px; padding: 7px 8px; background: #faf7ef; font-size: 9px; }
.offer-link:hover { border-color: var(--ink); background: var(--acid); }
.offer-link .offer-source { font-family: var(--mono); font-size: 8px; }
.offer-link .offer-meta { color: var(--muted); font-family: var(--mono); font-size: 7px; }
.detail-note { margin-top: 14px; padding-top: 10px; border-top: 1px dashed rgba(27,27,23,.25); font-size: 9px; line-height: 1.6; color: var(--soft); }
.detail-excerpt { max-height: 118px; overflow: auto; font-size: 9.5px; line-height: 1.65; color: #6c665b; white-space: pre-line; border: 1px solid rgba(27,27,23,.16); border-radius: 6px; padding: 8px; background: #fbf8f0; }
.detail-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.detail-actions .primary-cta { font-size: 10px; padding: 9px 13px; }

.settings-dialog, .sources-dialog { width: min(750px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 10px 10px 0 rgba(23,23,19,.9); overflow: hidden; }
.settings-dialog[open], .sources-dialog[open] { animation: dialogIn .22s ease both; }
.settings-shell, .sources-shell { max-height: calc(100vh - 34px); overflow: auto; padding: 22px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.dialog-head h2 { margin: 6px 0 0; font-size: 30px; line-height: 1; letter-spacing: -.055em; font-weight: 650; }
.dialog-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.close-button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 18px; line-height: 1; display: grid; place-items: center; flex: 0 0 auto; }
.close-button:hover { background: var(--acid); }
.settings-status { display: flex; gap: 9px; align-items: flex-start; border: 1px solid rgba(27,27,23,.25); border-radius: 8px; background: rgba(255,253,248,.62); padding: 9px 10px; margin-top: 16px; }
.status-led { width: 7px; height: 7px; border-radius: 50%; background: #bcb6a9; flex: 0 0 auto; margin-top: 4px; }
.status-led.is-on { background: #17b26a; box-shadow: 0 0 0 3px rgba(23,178,106,.12); }
.status-led.is-error { background: var(--coral); }
.settings-status b { display: block; font-size: 11px; }
.settings-status span { display: block; margin-top: 2px; font-size: 9px; color: var(--muted); line-height: 1.5; }
.form-section { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(27,27,23,.2); }
.form-section-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.form-section-head span { font-family: var(--mono); font-size: 8px; color: var(--muted); }
.form-section-head h3 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > span { font-size: 9px; font-weight: 600; color: #514d43; }
.field > span b { color: var(--coral); }
.field input { border: 1px solid rgba(27,27,23,.3); background: var(--card); border-radius: 6px; padding: 7px 8px; font-size: 11px; outline: none; min-width: 0; }
.field input:focus { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(216,255,69,.45); }
.check-field { display: flex; align-items: center; gap: 6px; align-self: end; height: 30px; font-size: 10px; color: #514d43; }
.check-field input { accent-color: var(--ink); width: 13px; height: 13px; }
.field-help { margin: 7px 0 0; font-size: 9px; line-height: 1.55; color: var(--soft); }
.preset-row { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 7px; }
.preset { border: 1px solid rgba(27,27,23,.25); border-radius: 4px; background: #faf7ef; padding: 3px 6px; font-size: 8px; font-family: var(--mono); }
.preset:hover { background: var(--acid); border-color: var(--ink); }
.preset-row span { font-size: 8px; color: var(--soft); }
.pref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pref { display: flex; gap: 7px; align-items: flex-start; border: 1px solid rgba(27,27,23,.2); border-radius: 7px; padding: 7px 8px; background: #faf7ef; }
.pref input { accent-color: var(--ink); width: 13px; height: 13px; margin-top: 2px; flex: 0 0 auto; }
.pref b { display: block; font-size: 10px; }
.pref small { display: block; margin-top: 2px; font-size: 8px; line-height: 1.45; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.primary-button { border: 1px solid var(--line); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 8px 14px; font-size: 10px; font-weight: 600; }
.primary-button:hover { background: var(--acid); color: var(--ink); }
.primary-button:disabled { opacity: .5; cursor: wait; }
.secondary-button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 13px; font-size: 10px; font-weight: 600; }
.secondary-button:hover { background: #f6f1e4; }
.form-footnote { margin: 10px 0 0; font-size: 8.5px; line-height: 1.6; color: var(--soft); text-align: right; }

.sources-shell h2 { font-size: 29px; }
.source-list { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.source-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 8px; align-items: flex-start; border: 1px solid rgba(27,27,23,.2); border-radius: 7px; padding: 8px 9px; background: #faf7ef; }
.source-row .source-led { width: 6px; height: 6px; border-radius: 50%; margin-top: 4px; background: #bcb6a9; }
.source-row .source-led.live { background: #17b26a; }
.source-row .source-led.degraded { background: #f0a21b; }
.source-row .source-led.error { background: var(--coral); }
.source-row b { display: block; font-size: 10px; }
.source-row span { display: block; margin-top: 2px; font-size: 8px; line-height: 1.5; color: var(--muted); }
.source-row .source-count { font-family: var(--mono); font-size: 8px; color: var(--muted); white-space: nowrap; }
.honesty-box { margin-top: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--acid); padding: 10px 12px; }
.honesty-box b { font-size: 10px; }
.honesty-box p { margin: 4px 0 0; font-size: 9.5px; line-height: 1.65; color: #3b381f; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 200; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font-size: 10px; box-shadow: 4px 4px 0 rgba(23,23,19,.24); transition: opacity .2s ease, transform .2s ease; max-width: calc(100vw - 28px); text-align: center; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- animations ---------------- */
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(23,178,106,.45); } 70% { box-shadow: 0 0 0 5px rgba(23,178,106,0); } 100% { box-shadow: 0 0 0 0 rgba(23,178,106,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }

/* ---------------- responsive ---------------- */
@media (max-width: 1240px) {
  .workspace { grid-template-columns: 190px minmax(0, 1fr); gap: 22px; padding-left: 20px; padding-right: 20px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  .hero h1 { font-size: clamp(54px, 6.5vw, 88px); }
  .art-card { width: 150px; }
  .art-card:nth-child(3) { width: 176px; }
  .album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .platform-row { grid-template-columns: 140px minmax(0, 1fr); }
  .platform-events { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 34px; }
  .hero-copy { order: 1; }
  .hero-art { order: 2; min-height: 320px; }
  .art-card { width: 142px; }
  .art-card:nth-child(2) { left: 9%; top: 9%; }
  .art-card:nth-child(3) { width: 164px; left: 37%; top: 18%; }
  .art-card:nth-child(4) { right: 8%; top: 8%; }
  .art-note { bottom: 6%; }
  .hero-stats { margin-top: 26px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rail { position: static; max-height: none; display: block; min-width: 0; max-width: 100%; overflow: hidden; }
  .rail-heading { display: none; }
  .rail-list { flex-direction: row; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 4px; gap: 4px; min-width: 0; max-width: 100%; }
  .rail-button { width: auto; flex: 0 0 auto; display: inline-flex; border-color: rgba(27,27,23,.2); background: rgba(255,253,248,.55); padding: 6px 9px; }
  .rail-button .rail-count { padding-left: 2px; }
  .rail-sources { display: none; }
  .feed-toolbar { top: calc(var(--header-h) + 6px); }
  .feed-footer { grid-template-columns: 1fr; gap: 8px; }
  .footer-actions { justify-content: flex-start; }
}
@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .site-header { gap: 10px; padding: 8px 14px; flex-wrap: wrap; }
  .brand-cn { font-size: 22px; }
  .brand-serif { font-size: 26px; }
  .top-nav { order: 3; width: 100%; justify-content: center; margin-top: 2px; }
  .nav-tab { flex: 1; justify-content: center; }
  .header-actions { gap: 6px; }
  .live-pill { display: none; }
  .mail-label { display: inline; }
  .mail-state { display: none; }
  .mail-button { padding: 7px 10px; }
  .mail-state { font-size: 7px; }
  .desktop-only { display: none; }
  .hero { padding: 28px 14px 24px; }
  .hero h1 { font-size: clamp(44px, 11.5vw, 68px); }
  .hero-lede { font-size: 12px; line-height: 1.7; }
  .hero-actions { gap: 12px; margin-top: 18px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stat { border-bottom: 1px solid rgba(27,27,23,.2); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-bottom: 0; }
  .hero-art { min-height: 275px; border-radius: 16px; }
  .art-card { width: 116px; border-radius: 6px; box-shadow: 4px 5px 0 var(--ink); }
  .art-card:nth-child(2) { left: 5%; top: 7%; }
  .art-card:nth-child(3) { width: 136px; left: 35%; top: 16%; }
  .art-card:nth-child(4) { right: 5%; top: 6%; }
  .art-note { left: 5%; bottom: 5%; font-size: 6px; padding: 4px; }
  .art-sticker { width: 55px; height: 55px; font-size: 10px; right: 5%; bottom: 5%; }
  .hero-art::before { font-size: 160px; bottom: -30px; }
  .ticker { min-height: 36px; }
  .ticker-label { padding: 0 10px; font-size: 7px; }
  .ticker-item { font-size: 8px; padding: 0 10px; }
  .ticker-time { display: none; }
  .alert-banner { width: calc(100% - 28px); margin-top: 12px; align-items: flex-start; flex-wrap: wrap; }
  .alert-copy { flex-direction: column; gap: 1px; }
  .mini-cta { margin-left: 38px; }
  .banner-close { margin-left: auto; position: absolute; right: 20px; }
  .workspace { padding: 14px 14px 50px; gap: 10px; }
  .feed-toolbar { position: static; padding: 7px; gap: 6px; }
  .search-wrap { flex-basis: 100%; }
  .filter-row { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .toolbar-right { width: 100%; margin-left: 0; justify-content: space-between; }
  .toolbar-right select { flex: 1; max-width: none; }
  .segmented { flex: 0 0 auto; }
  .toggle-button { flex: 0 0 auto; }
  .feed-subbar { padding: 8px 1px 10px; align-items: flex-start; }
  .result-line { flex-wrap: wrap; }
  .sub-actions { gap: 5px; }
  .sync-note { display: none; }
  .agency-block { margin-bottom: 24px; }
  .agency-title h2 { font-size: 16px; }
  .agency-meta { font-size: 7px; }
  .group-card { box-shadow: 2px 2px 0 var(--ink); border-radius: 12px; margin-bottom: 12px; }
  .group-head { grid-template-columns: 56px minmax(0, 1fr) auto 18px; gap: 9px; padding: 10px; }
  .group-cover { width: 56px; height: 69px; border-radius: 5px; }
  .group-name { font-size: 21px; white-space: normal; line-height: .95; letter-spacing: -.045em; }
  .group-release { font-size: 9.5px; }
  .group-side .side-stat { font-size: 8px; }
  .group-side .side-sub { font-size: 7px; }
  .group-badges { margin-top: 4px; }
  .mini-badge { font-size: 6px; padding: 1px 4px; }
  .group-head .group-side { display: none; }
  .group-toggle { width: 18px; height: 18px; font-size: 11px; }
  .release-strip { padding: 6px 10px; gap: 4px; overflow-x: auto; flex-wrap: nowrap; }
  .release-pill { flex: 0 0 auto; font-size: 8px; }
  .platform-row { grid-template-columns: 1fr; }
  .platform-meta { border-right: 0; border-bottom: 1px dashed rgba(27,27,23,.18); padding: 8px 10px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
  .platform-meta .platform-kind, .platform-meta .platform-count { margin-top: 0; }
  .platform-meta .platform-link { margin-top: 0; margin-left: auto; }
  .platform-events { grid-template-columns: 1fr; padding: 8px; gap: 7px; }
  .drop-card { grid-template-columns: 102px minmax(0, 1fr); min-height: 142px; }
  .drop-thumb { min-height: 142px; }
  .drop-thumb .cover-fallback { min-height: 142px; }
  .drop-body { padding: 8px 9px 7px; }
  .drop-album { font-size: 11.5px; }
  .drop-how { -webkit-line-clamp: 2; font-size: 9px; }
  .album-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .album-body { padding: 7px 8px; }
  .album-title { font-size: 11.5px; }
  .album-group { font-size: 7px; }
  .album-date { font-size: 7px; }
  .dialog-shell { grid-template-columns: 1fr; max-height: calc(100vh - 24px); }
  .detail-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); }
  .detail-gallery { padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); display: block; }
  .detail-main-img { max-width: 290px; margin: 0 auto; }
  .detail-thumbs { justify-content: center; margin-top: 8px; }
  .detail-info { padding: 16px 14px 22px; }
  .detail-group { font-size: 25px; }
  .detail-album { font-size: 20px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .settings-dialog, .sources-dialog { width: calc(100vw - 16px); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); }
  .settings-shell, .sources-shell { padding: 16px 13px; }
  .dialog-head h2 { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .pref-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .form-actions { justify-content: stretch; }
  .form-actions button { flex: 1; }
  .form-footnote { text-align: left; }
  .feed-footer { margin-top: 26px; }
  .toast { bottom: 12px; width: max-content; }
}
@media (max-width: 430px) {
  .mail-state { display: none; }
  .hero h1 { font-size: 40px; }
  .hero-art { min-height: 245px; }
  .art-card { width: 96px; }
  .art-card:nth-child(3) { width: 114px; left: 36%; }
  .drop-card { grid-template-columns: 88px minmax(0, 1fr); }
  .drop-album { font-size: 10.5px; }
  .drop-how { display: none; }
  .album-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .ticker-track { animation: none; }
}

/* view-specific chrome */
.view-albums .filter-row,
.view-albums .segmented,
.view-albums #sortSelect { display: none; }
.view-albums .toolbar-right { margin-left: auto; }
.alert-banner { position: relative; }
.art-card .cover-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f4f0e8, #d8d0bf);
  font-family: var(--serif);
  font-style: italic;
  font-size: 42px;
  color: rgba(23,23,19,.5);
}


/* artwork fallback stack: initials remain visible while images load or if a CDN 404s */
.cover-stack { position: relative; width: 100%; height: 100%; overflow: hidden; background: linear-gradient(145deg, #f4f0e8, #d8d0bf); }
.cover-initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 28px; color: rgba(23,23,19,.46); letter-spacing: -.03em; }
.cover-stack img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.drop-thumb .cover-stack { min-height: 156px; }
.group-cover .cover-initials { font-size: 23px; }
.album-cover .cover-initials { font-size: 38px; }
.detail-main-img .cover-initials { font-size: 62px; }
.art-card .cover-initials { font-size: 38px; }
@media (max-width: 760px) {
  .group-cover .cover-initials { font-size: 18px; }
  .album-cover .cover-initials { font-size: 30px; }
  .drop-thumb .cover-stack { min-height: 142px; }
}

/* magazine / MD category */
.cat-tag { display: inline-flex; align-items: center; border: 1px solid rgba(27,23,23,.3); border-radius: 3px; padding: 1px 4px; font-family: var(--mono); font-size: 7px; letter-spacing: .03em; line-height: 1.3; background: #f1e8ff; color: #3a2450; }
.cat-tag.magazine { background: #c9b8ff; color: #1b1233; }
.cat-tag.md { background: #ffd9cf; color: #3a1a12; }
.detail-cat { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; font-family: var(--mono); font-size: 7px; background: #f1e8ff; color: #3a2450; text-transform: uppercase; }
.detail-cat.magazine { background: #c9b8ff; color: #1b1233; }
.detail-cat.md { background: #ffd9cf; color: #3a1a12; }
@media (max-width: 760px) {
  .nav-tab { font-size: 10px; padding: 6px 6px; gap: 3px; }
  .nav-tab span { font-size: 6.5px; }
}

/* platform filter */
.platform-select { max-width: 150px; }
@media (max-width: 760px) {
  .platform-select { max-width: none; }
  .toolbar-right select { flex: 1 1 45%; }
}
