:root {
  --paper: #e7eae5;
  --paper-deep: #d9ddd7;
  --ink: #111312;
  --muted: #656b66;
  --line: #aeb5af;
  --line-soft: #cbd0ca;
  --blue: #3157ff;
  --wine: #6b3041;
  --sulfur: #d9f34a;
  --white: #f7f8f4;
  --serif: "Noto Serif SC", "Songti SC", STSong, serif;
  --sans: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --rail-width: 72px;
  --topbar-height: 66px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

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

::selection {
  background: var(--blue);
  color: var(--white);
}

svg {
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  min-height: 100vh;
}

.nav-rail {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-rows: 82px 1fr auto;
  min-height: 100vh;
  border-right: 1px solid var(--ink);
  background: var(--paper);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 100%;
  height: 66px;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--sulfur);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
}

.primary-nav,
.rail-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
}

.rail-actions {
  padding-bottom: 12px;
}

.nav-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  background: transparent;
}

.nav-button {
  position: relative;
  min-height: 58px;
  grid-template-rows: 25px auto;
  gap: 2px;
  color: var(--muted);
}

.nav-button svg,
.icon-button svg,
.command-button svg,
.quiet-button svg,
.source-note svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
}

.nav-button span {
  font-size: 10px;
}

.nav-button::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -6px;
  width: 3px;
  background: var(--blue);
  content: "";
  opacity: 0;
}

.nav-button:hover,
.nav-button.is-active {
  color: var(--ink);
}

.nav-button.is-active::before {
  opacity: 1;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  color: var(--ink);
}

.icon-button:hover {
  border-color: var(--ink);
  background: var(--white);
}

.rail-actions .icon-button {
  width: 100%;
}

.workspace {
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  min-width: 0;
  height: 100vh;
}

.topbar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(170px, 0.62fr) minmax(260px, 620px) minmax(160px, 0.62fr);
  align-items: center;
  gap: 24px;
  height: var(--topbar-height);
  padding: 0 24px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 11px;
  white-space: nowrap;
}

.wordmark strong {
  font-family: var(--serif);
  font-size: 20px;
}

.wordmark span {
  color: var(--muted);
  font-size: 11px;
}

.search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: rgba(247, 248, 244, 0.45);
}

.search-field:focus-within {
  border-color: var(--ink);
  background: var(--white);
}

.search-field svg {
  width: 17px;
  color: var(--muted);
}

.search-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.search-field kbd {
  border: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.command-button,
.quiet-button,
.text-button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
}

.command-button:hover {
  background: var(--blue);
  border-color: var(--blue);
}

.quiet-button {
  background: transparent;
  color: var(--ink);
}

.quiet-button:hover {
  background: var(--white);
}

.text-button,
.mini-button {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mini-button {
  color: var(--muted);
  font-size: 10px;
}

.mobile-filter-button {
  display: none;
}

.view-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.view {
  width: 100%;
  height: 100%;
  overflow: auto;
  scrollbar-color: var(--ink) transparent;
  scrollbar-width: thin;
}

.view[hidden] {
  display: none !important;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 254px;
  min-height: 100%;
}

.feed-column {
  min-width: 0;
  padding: 0 clamp(22px, 4vw, 64px) 96px;
}

.issue-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.issue-line > div,
.issue-line label {
  display: flex;
  align-items: center;
  gap: 18px;
}

.issue-line strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.issue-line select {
  padding: 5px 26px 5px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 11px;
}

.daily-pulse {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 74px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.daily-pulse-status {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}

.daily-status-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.daily-status-dot[data-status="loading"] {
  border-color: var(--blue);
  background: var(--blue);
}

.daily-status-dot[data-status="ready"] {
  border-color: var(--ink);
  background: var(--sulfur);
}

.daily-status-dot[data-status="error"] {
  border-color: var(--wine);
  background: var(--wine);
}

.daily-status-dot[data-status="stale"] {
  background: var(--line);
}

.daily-pulse-status strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.daily-pulse-status p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-keywords {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.daily-keywords button,
.daily-keywords > span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}

.daily-keywords button:hover {
  border-color: var(--ink);
  background: var(--white);
  color: var(--ink);
}

.daily-refresh-button {
  min-height: 34px;
  padding: 0 11px;
  white-space: nowrap;
}

.daily-refresh-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.daily-refresh-button.is-loading svg {
  animation: daily-spin 1.2s linear infinite;
}

@keyframes daily-spin {
  to {
    transform: rotate(360deg);
  }
}

.featured-item {
  min-height: 438px;
  border-bottom: 1px solid var(--ink);
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(290px, 0.84fr);
  min-height: 438px;
}

.featured-visual {
  position: relative;
  min-height: 438px;
  overflow: hidden;
  border-right: 1px solid var(--ink);
  background: var(--ink);
}

.featured-visual img,
.stream-visual img,
.drawer-visual img,
.saved-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-visual {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
}

.image-visual > .abstract-visual,
.image-visual > img {
  position: absolute;
  inset: 0;
}

.visual-credit {
  position: absolute;
  right: 10px;
  bottom: 9px;
  max-width: calc(100% - 20px);
  padding: 5px 7px;
  background: rgba(17, 19, 18, 0.86);
  color: var(--white);
  font-size: 9px;
  line-height: 1.35;
}

.abstract-visual {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.visual-solar .solar-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(72%, 380px);
  aspect-ratio: 1;
  border: 1px solid rgba(247, 248, 244, 0.28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.visual-solar .solar-orbit::before,
.visual-solar .solar-orbit::after {
  position: absolute;
  top: 50%;
  left: 50%;
  aspect-ratio: 1;
  border: 1px solid rgba(247, 248, 244, 0.2);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.visual-solar .solar-orbit::before {
  width: 64%;
}

.visual-solar .solar-orbit::after {
  width: 31%;
  border-color: var(--sulfur);
  background: var(--sulfur);
  box-shadow: 0 0 38px rgba(217, 243, 74, 0.28);
}

.solar-server {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
}

.solar-server.is-active {
  width: 18px;
  height: 18px;
  border-color: var(--sulfur);
  background: var(--sulfur);
}

.solar-server:nth-child(1) {
  top: 16%;
  left: 48%;
}

.solar-server:nth-child(2) {
  top: 42%;
  right: 8%;
}

.solar-server:nth-child(3) {
  right: 21%;
  bottom: 13%;
}

.solar-server:nth-child(4) {
  bottom: 7%;
  left: 30%;
}

.solar-server:nth-child(5) {
  top: 40%;
  left: 7%;
}

.solar-route {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 1px;
  background: var(--sulfur);
  transform: rotate(-21deg);
  transform-origin: left center;
}

.visual-label {
  position: absolute;
  top: 18px;
  left: 20px;
  color: var(--paper);
  font-size: 10px;
}

.visual-index {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: var(--sulfur);
  font-family: var(--serif);
  font-size: clamp(64px, 9vw, 120px);
  line-height: 0.8;
}

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  padding: clamp(28px, 4vw, 54px);
}

.item-meta,
.drawer-kicker,
.stream-meta,
.saved-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 10px;
}

.featured-copy h2 {
  max-width: 12ch;
  margin: 24px 0 16px;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 600;
  line-height: 1.08;
}

.featured-copy .creator-line {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.featured-verdict {
  max-width: 38ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
}

.featured-actions,
.drawer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 11px;
  text-decoration: none;
}

.source-link svg {
  width: 15px;
}

.source-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.save-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink);
  background: transparent;
}

.save-button:hover,
.save-button.is-saved {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.save-button svg {
  width: 17px;
}

.stream-section {
  padding-top: 40px;
}

.stream-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}

.stream-heading h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.stream-heading span {
  color: var(--muted);
  font-size: 10px;
}

.stream-item {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(170px, 0.7fr) minmax(0, 1.3fr) 56px;
  min-height: 174px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.stream-item::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 67px;
  width: 1px;
  background: var(--line-soft);
  content: "";
}

.stream-item:hover {
  background: rgba(247, 248, 244, 0.48);
}

.stream-item:hover::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 3px;
  background: var(--blue);
  content: "";
}

.stream-number {
  padding: 20px 14px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
}

.stream-visual {
  position: relative;
  align-self: center;
  width: calc(100% - 26px);
  min-width: 144px;
  aspect-ratio: 1.45 / 1;
  margin: 20px 13px;
  overflow: hidden;
  background: var(--ink);
}

.stream-visual .abstract-visual {
  min-height: 100%;
}

.stream-visual .visual-label,
.stream-visual .visual-credit {
  display: none;
}

.stream-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 20px 26px;
}

.stream-body h2 {
  max-width: 30ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 28px);
  font-weight: 600;
  line-height: 1.25;
}

.stream-body p {
  max-width: 58ch;
  margin: 0;
  color: #383d39;
  font-size: 12px;
  line-height: 1.7;
}

.stream-save {
  display: grid;
  place-items: center;
}

.stream-save .save-button {
  border-color: transparent;
}

.classification-rail {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100vh - var(--topbar-height));
  border-left: 1px solid var(--ink);
  background: var(--paper-deep);
}

.rail-section {
  padding: 21px 20px;
  border-bottom: 1px solid var(--line);
}

.rail-section > h2,
.rail-heading h2,
.rail-intro > p {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.measure-key {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 9px;
}

.measure-key span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border: 1px solid var(--ink);
  content: "";
}

.measure-key span:nth-child(2)::before {
  background: var(--blue);
  border-color: var(--blue);
}

.measure-key span:nth-child(3)::before {
  background: var(--wine);
  border-color: var(--wine);
}

.measure-key span:nth-child(4)::before {
  background: var(--sulfur);
  border-color: var(--ink);
}

.filter-list {
  display: grid;
  gap: 4px;
}

.filter-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 31px;
  padding: 0 8px;
  border-left: 2px solid transparent;
  background: transparent;
  color: #3f4540;
  text-align: left;
  font-size: 11px;
}

.filter-button:hover {
  background: var(--white);
}

.filter-button.is-active {
  border-left-color: var(--blue);
  background: var(--white);
  color: var(--ink);
}

.filter-button span:last-child {
  color: var(--muted);
  font-size: 9px;
}

.filter-list.compact {
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.filter-list.compact .filter-button {
  border: 1px solid var(--line);
}

.filter-list.compact .filter-button.is-active {
  border-color: var(--ink);
}

.range-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 9px;
}

.range-row input {
  width: 100%;
  accent-color: var(--blue);
}

.range-value {
  margin: 8px 0 0 18px;
  color: var(--muted);
  font-size: 9px;
}

.source-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
}

.source-note p {
  margin: 0;
  font-size: 9px;
  line-height: 1.6;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state svg {
  width: 24px;
}

.empty-state p {
  margin: 14px 0 4px;
  font-size: 12px;
}

.detail-drawer {
  position: fixed;
  z-index: 70;
  top: 0;
  right: 0;
  width: min(560px, 92vw);
  height: 100vh;
  overflow: auto;
  border-left: 1px solid var(--ink);
  background: var(--paper);
  transform: translateX(101%);
  transition: transform 280ms cubic-bezier(0.22, 0.82, 0.24, 1);
}

.detail-drawer.is-open {
  transform: translateX(0);
}

.drawer-scrim {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgba(17, 19, 18, 0.42);
  opacity: 0;
  transition: opacity 220ms ease;
}

.drawer-scrim.is-visible {
  opacity: 1;
}

.drawer-scrim[hidden] {
  display: none;
}

.drawer-toolbar {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 16px 0 24px;
  border-bottom: 1px solid var(--ink);
  background: rgba(231, 234, 229, 0.96);
}

.drawer-toolbar > span {
  color: var(--muted);
  font-size: 10px;
}

.drawer-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
}

.drawer-visual img {
  object-fit: contain;
}

.drawer-main {
  padding: clamp(26px, 5vw, 48px);
}

.drawer-main h2 {
  max-width: 15ch;
  margin: 18px 0 10px;
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.1;
}

.drawer-creator {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 12px;
}

.drawer-section {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.drawer-section h3 {
  margin: 0 0 13px;
  font-size: 11px;
}

.drawer-section > p,
.drawer-section li {
  color: #333834;
  font-size: 13px;
  line-height: 1.8;
}

.drawer-section > p {
  margin: 0;
}

.reason-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  position: relative;
  padding: 0 0 16px 24px;
}

.reason-list li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 11px;
  height: 1px;
  background: var(--blue);
  content: "";
}

.axis-list {
  display: grid;
  gap: 11px;
}

.auto-score-note {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: rgba(49, 87, 255, 0.07);
  color: #333834;
  font-size: 11px;
  line-height: 1.7;
}

.axis-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.axis-track {
  height: 5px;
  background: var(--line-soft);
}

.axis-fill {
  height: 100%;
  background: var(--ink);
}

.axis-row:nth-child(2) .axis-fill {
  background: var(--blue);
}

.axis-row:nth-child(3) .axis-fill {
  background: var(--wine);
}

.axis-row:nth-child(4) .axis-fill {
  background: var(--sulfur);
  outline: 1px solid var(--ink);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  font-size: 10px;
}

.boundary {
  border-left: 3px solid var(--wine);
  padding-left: 18px;
}

.drawer-actions {
  padding-top: 12px;
}

.drawer-actions .quiet-button,
.drawer-actions .command-button {
  flex: 1;
}

.map-view {
  display: grid;
  grid-template-rows: auto minmax(520px, 1fr);
  min-height: 100%;
  background: var(--ink);
  color: var(--white);
}

.map-header {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: end;
  gap: 40px;
  padding: clamp(28px, 4vw, 56px);
  border-bottom: 1px solid rgba(247, 248, 244, 0.25);
}

.map-header span,
.saved-header span {
  color: var(--muted);
  font-size: 10px;
}

.map-header h1,
.saved-header h1 {
  max-width: 18ch;
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 60px);
  font-weight: 600;
  line-height: 1.08;
}

.map-header p {
  max-width: 38ch;
  margin: 0;
  color: #bdc3bc;
  font-size: 12px;
  line-height: 1.7;
}

.map-field {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

#relationCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  cursor: crosshair;
}

.map-legend {
  position: absolute;
  right: 22px;
  bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  max-width: 420px;
  color: #afb5ae;
  font-size: 9px;
  pointer-events: none;
}

.taste-view {
  background: var(--paper);
}

.taste-header {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: end;
  gap: 48px;
  padding: clamp(28px, 4vw, 54px) clamp(24px, 5vw, 72px);
  border-bottom: 1px solid var(--ink);
}

.taste-header > div > span,
.taste-readout-heading span,
.taste-round-complete > span {
  color: var(--muted);
  font-size: 10px;
}

.taste-header h1 {
  max-width: 14ch;
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 600;
  line-height: 1.05;
}

.taste-principle > p {
  max-width: 48ch;
  margin: 0;
  color: #3e443f;
  font-size: 12px;
  line-height: 1.75;
}

.taste-progress {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 10px;
}

.taste-progress-track,
.signal-track {
  height: 4px;
  overflow: hidden;
  background: var(--line-soft);
}

.taste-progress-track span,
.signal-track span {
  display: block;
  height: 100%;
  background: var(--blue);
  transition: width 260ms ease;
}

.taste-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: stretch;
  min-height: 620px;
}

.taste-workbench {
  min-width: 0;
  padding: clamp(26px, 4vw, 56px);
}

.taste-question {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px 20px;
  align-items: baseline;
  margin-bottom: 28px;
}

.taste-question > span {
  grid-row: 1 / 3;
  color: var(--muted);
  font-size: 10px;
}

.taste-question h2 {
  max-width: 34ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(23px, 2.6vw, 34px);
  font-weight: 600;
  line-height: 1.25;
}

.taste-question p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.taste-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.taste-option {
  position: relative;
  min-width: 0;
  border: 1px solid var(--ink);
  background: var(--white);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.taste-option::before {
  position: absolute;
  z-index: 3;
  top: -1px;
  left: -1px;
  width: 4px;
  height: calc(100% + 2px);
  background: var(--blue);
  content: "";
  opacity: 0;
}

.taste-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(17, 19, 18, 0.08);
}

.taste-option.is-selected::before {
  opacity: 1;
}

.taste-option.is-rejected {
  opacity: 0.48;
}

.taste-choice-button {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.taste-choice-button:disabled {
  cursor: default;
}

.taste-option-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1.52 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
}

.taste-option-visual .abstract-visual,
.taste-option-visual .image-visual {
  min-height: 100%;
}

.taste-option-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.taste-option-visual .visual-credit {
  display: none;
}

.taste-option-copy {
  display: flex;
  min-height: 264px;
  flex-direction: column;
  padding: 22px 22px 18px;
}

.taste-option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 9px;
}

.taste-option h3 {
  margin: 15px 0 6px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 600;
  line-height: 1.08;
}

.taste-option-creator {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.taste-option-verdict {
  display: -webkit-box;
  margin: 19px 0;
  overflow: hidden;
  color: #373c38;
  font-size: 11px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.taste-description-source {
  display: block;
  margin: -11px 0 16px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.taste-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}

.taste-pick-label svg,
.taste-source svg {
  width: 14px;
  height: 14px;
}

.taste-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  text-decoration: none;
}

.taste-source:hover {
  color: var(--ink);
  background: var(--paper);
}

.taste-feedback {
  margin-top: 14px;
  padding: 16px 18px;
  border-left: 3px solid var(--blue);
  background: rgba(49, 87, 255, 0.07);
}

.taste-feedback[hidden] {
  display: none;
}

.taste-feedback span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
}

.taste-feedback p {
  max-width: 72ch;
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.7;
}

.taste-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.taste-controls .text-button {
  margin-right: auto;
}

.taste-controls button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.taste-controls button[hidden] {
  display: none;
}

.taste-readout {
  min-width: 0;
  border-left: 1px solid var(--ink);
  background: var(--paper-deep);
}

.taste-readout-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 22px;
  border-bottom: 1px solid var(--ink);
}

.taste-readout-heading h2 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 20px;
}

.taste-readout-heading > strong {
  color: var(--blue);
  font-size: 10px;
}

.taste-analysis-empty {
  padding: 36px 22px;
  color: var(--muted);
}

.taste-analysis-empty svg {
  width: 23px;
}

.taste-analysis-empty h3 {
  margin: 17px 0 8px;
  color: var(--ink);
  font-size: 12px;
}

.taste-analysis-empty p,
.analysis-muted {
  margin: 0;
  font-size: 10px;
  line-height: 1.7;
}

.taste-analysis-section {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.analysis-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.analysis-label strong {
  color: var(--wine);
  font-size: 9px;
}

.taste-inference {
  margin: 14px 0 22px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.65;
}

.signal-list {
  display: grid;
  gap: 18px;
}

.signal-row > div:first-child {
  display: grid;
  gap: 4px;
}

.signal-row strong {
  font-size: 11px;
}

.signal-row span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.signal-track {
  margin-top: 8px;
  background: rgba(17, 19, 18, 0.12);
}

.taste-tension {
  margin-top: 24px;
  padding-left: 13px;
  border-left: 2px solid var(--wine);
}

.taste-tension > span {
  color: var(--wine);
  font-size: 9px;
}

.taste-tension p {
  margin: 7px 0 0;
  font-size: 10px;
  line-height: 1.6;
}

.taste-evidence-list {
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.taste-evidence-list li {
  padding-top: 13px;
  border-top: 1px solid rgba(17, 19, 18, 0.12);
}

.taste-evidence-list span {
  color: var(--muted);
  font-size: 9px;
}

.taste-evidence-list p {
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.55;
}

.taste-readout-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px;
}

.taste-readout-actions .quiet-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}

.danger-text {
  color: var(--wine);
}

.taste-round-complete {
  grid-column: 1 / -1;
  min-height: 430px;
  padding: clamp(32px, 7vw, 88px);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
}

.taste-round-complete h3 {
  max-width: 15ch;
  margin: 28px 0 14px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.taste-round-complete p {
  max-width: 48ch;
  margin: 0 0 40px;
  color: #c4c9c3;
  font-size: 12px;
  line-height: 1.7;
}

.taste-round-complete .command-button {
  border-color: var(--sulfur);
  background: var(--sulfur);
  color: var(--ink);
}

.legend-item::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.saved-view {
  padding: clamp(28px, 5vw, 72px);
}

.saved-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink);
}

.saved-header h1 {
  font-size: clamp(30px, 4vw, 50px);
}

.saved-list {
  display: block;
}

.saved-group {
  border-left: 1px solid var(--line);
}

.saved-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line-soft);
}

.saved-group-heading h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.saved-group-heading span {
  color: var(--muted);
  font-size: 10px;
}

.saved-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.saved-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 190px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.saved-item:hover {
  background: var(--white);
}

.saved-thumb {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--ink);
}

.saved-thumb .abstract-visual {
  min-height: 100%;
}

.saved-thumb .visual-label,
.saved-thumb .visual-credit {
  display: none;
}

.saved-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
}

.saved-body h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
}

.saved-body button {
  align-self: flex-start;
}

.add-dialog {
  width: min(610px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.add-dialog::backdrop {
  background: rgba(17, 19, 18, 0.48);
}

.add-dialog form {
  display: grid;
  gap: 18px;
  padding: 0 32px 30px;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 -32px 6px;
  padding: 22px 22px 20px 32px;
  border-bottom: 1px solid var(--ink);
}

.dialog-header span {
  color: var(--muted);
  font-size: 10px;
}

.dialog-header h2 {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: 28px;
}

.add-dialog label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.add-dialog input,
.add-dialog select,
.add-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
}

.add-dialog input,
.add-dialog select {
  height: 42px;
  padding: 0 11px;
}

.add-dialog textarea {
  min-height: 104px;
  padding: 11px;
  resize: vertical;
  line-height: 1.6;
}

.add-dialog input:focus,
.add-dialog select:focus,
.add-dialog textarea:focus {
  border-color: var(--ink);
}

.form-split {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 14px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(340px, calc(100vw - 44px));
  padding: 12px 16px;
  border-left: 3px solid var(--sulfur);
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 226px;
  }

  .topbar {
    grid-template-columns: 150px minmax(220px, 1fr) auto;
  }

  .featured-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .daily-pulse {
    grid-template-columns: minmax(240px, 1fr) auto;
  }

  .daily-keywords {
    grid-column: 1 / -1;
    order: 3;
  }

  .saved-group-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    height: auto;
    min-height: 100vh;
    padding-bottom: 64px;
  }

  .nav-rail {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 58px 1fr 58px;
    grid-template-rows: 64px;
    width: 100%;
    min-height: 0;
    height: 64px;
    border-top: 1px solid var(--ink);
    border-right: 0;
  }

  .brand-mark {
    width: 58px;
    height: 63px;
    border-bottom: 0;
  }

  .primary-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0 6px;
  }

  .nav-button {
    min-height: 63px;
  }

  .nav-button::before {
    top: auto;
    right: 12px;
    bottom: -1px;
    left: 12px;
    width: auto;
    height: 3px;
  }

  .rail-actions {
    padding: 5px;
  }

  .rail-actions .icon-button {
    height: 53px;
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 0 14px;
  }

  .wordmark span,
  .search-field kbd {
    display: none;
  }

  .view-stage {
    overflow: visible;
  }

  .view {
    height: auto;
    min-height: calc(100vh - 130px);
    overflow: visible;
  }

  .content-grid {
    display: block;
  }

  .classification-rail {
    position: fixed;
    z-index: 55;
    top: var(--topbar-height);
    right: 0;
    bottom: 64px;
    width: min(310px, 88vw);
    min-height: 0;
    overflow: auto;
    border-top: 1px solid var(--ink);
    transform: translateX(101%);
    transition: transform 240ms ease;
  }

  .classification-rail.is-open {
    transform: translateX(0);
  }

  .mobile-filter-button {
    display: inline-grid;
  }

  .featured-layout {
    grid-template-columns: 1fr;
  }

  .featured-visual {
    min-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .featured-copy h2 {
    max-width: 17ch;
  }

  .map-view {
    min-height: calc(100vh - 130px);
  }

  .taste-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .taste-layout {
    grid-template-columns: 1fr;
  }

  .taste-readout {
    border-top: 1px solid var(--ink);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-height: 58px;
  }

  .topbar {
    height: var(--topbar-height);
  }

  .wordmark strong {
    font-size: 17px;
  }

  .search-field {
    height: 36px;
  }

  .topbar-actions .command-button {
    width: 36px;
    min-height: 36px;
    padding: 0;
  }

  .topbar-actions .command-button span {
    display: none;
  }

  .feed-column {
    padding: 0 14px 72px;
  }

  .issue-line {
    min-height: 55px;
  }

  .issue-line > div {
    gap: 10px;
  }

  .issue-line label > span {
    display: none;
  }

  .featured-item,
  .featured-layout {
    min-height: 0;
  }

  .daily-pulse {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 0;
  }

  .daily-pulse-status p {
    max-width: 230px;
  }

  .daily-refresh-button {
    width: 34px;
    padding: 0;
  }

  .daily-refresh-button span {
    display: none;
  }

  .daily-keywords {
    flex-wrap: nowrap;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .daily-keywords::-webkit-scrollbar {
    display: none;
  }

  .daily-keywords button,
  .daily-keywords > span {
    flex: 0 0 auto;
  }

  .featured-visual {
    min-height: 300px;
  }

  .featured-copy {
    gap: 26px;
    padding: 28px 18px 32px;
  }

  .featured-copy h2 {
    font-size: 34px;
  }

  .featured-verdict {
    font-size: 13px;
  }

  .stream-section {
    padding-top: 28px;
  }

  .stream-item {
    grid-template-columns: 38px minmax(0, 1fr) 42px;
    min-height: 0;
    padding: 16px 0;
  }

  .stream-item::before {
    left: 37px;
  }

  .stream-number {
    padding-top: 4px;
  }

  .stream-visual {
    grid-column: 2 / 4;
    width: calc(100% - 12px);
    margin: 0 0 16px 12px;
    aspect-ratio: 1.55 / 1;
  }

  .stream-body {
    grid-column: 2 / 3;
    padding: 0 8px 2px 12px;
  }

  .stream-save {
    align-items: start;
  }

  .stream-body h2 {
    font-size: 23px;
  }

  .map-header {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 20px;
  }

  .map-header h1 {
    font-size: 36px;
  }

  .map-legend {
    bottom: 76px;
  }

  .taste-header {
    padding: 28px 18px;
  }

  .taste-header h1 {
    font-size: 38px;
  }

  .taste-workbench {
    padding: 26px 14px 34px;
  }

  .taste-question {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .taste-question > span {
    grid-row: auto;
  }

  .taste-question h2 {
    font-size: 24px;
  }

  .taste-pair {
    gap: 7px;
  }

  .taste-option-copy {
    min-height: 210px;
    padding: 14px 11px 12px;
  }

  .taste-option-meta {
    gap: 5px 8px;
  }

  .taste-option h3 {
    margin-top: 11px;
    font-size: 20px;
  }

  .taste-option-verdict {
    display: -webkit-box;
    margin: 12px 0 8px;
    font-size: 10px;
    -webkit-line-clamp: 4;
  }

  .taste-description-source {
    margin: 0 0 12px;
    font-size: 8px;
  }

  .taste-pick-label {
    font-size: 10px;
  }

  .taste-source {
    padding: 0 11px;
  }

  .taste-controls {
    flex-wrap: wrap;
  }

  .taste-controls .text-button {
    order: 3;
    width: 100%;
    margin: 4px 0 0;
  }

  .taste-controls .quiet-button,
  .taste-controls .command-button {
    flex: 1;
  }

  .saved-view {
    padding: 26px 14px 82px;
  }

  .saved-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .saved-item {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .saved-body {
    padding: 16px;
  }

  .detail-drawer {
    top: 0;
    width: 100vw;
  }

  .drawer-main {
    padding: 26px 20px 76px;
  }

  .drawer-main h2 {
    font-size: 36px;
  }

  .form-split {
    grid-template-columns: 1fr;
  }

  .add-dialog form {
    padding: 0 18px 22px;
  }

  .dialog-header {
    margin: 0 -18px 4px;
    padding: 18px;
  }
}

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