:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #667085;
  --line: #d7dee8;
  --blue: #2563eb;
  --blue-dark: #1743a2;
  --green: #0f8b63;
  --red: #d1495b;
  --amber: #b7791f;
  --ink: #101828;
  --shadow: 0 18px 45px rgba(36, 48, 71, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 280px),
    var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.user-switcher label {
  display: grid;
  gap: 3px;
}

.user-switcher span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.user-switcher select {
  min-width: 112px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
}

.user-create-button {
  width: auto;
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid rgba(215, 222, 232, 0.9);
  border-radius: 10px;
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(14px);
}

.app-nav-button {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.app-nav-button span,
.app-nav-button small {
  display: block;
}

.app-nav-button span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.app-nav-button .nav-icon {
  display: none;
}

.app-nav-button small {
  margin-top: 4px;
  font-size: 12px;
}

.app-nav-button.is-active {
  border-color: #c7d7fe;
  background: #fff;
  box-shadow: 0 10px 26px rgba(36, 48, 71, 0.1);
}

.app-nav-button.is-active span {
  color: var(--blue);
}

.app-nav-button::before,
.app-nav-button::after {
  content: none;
}

.view-stack {
  min-height: 620px;
}

.app-view {
  display: none;
}

.app-view.is-active {
  display: block;
}

.sync-state {
  max-width: 320px;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.primary-action,
.secondary-action,
.tone-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.primary-action {
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
  font-weight: 750;
}

.primary-action:hover {
  background: var(--blue-dark);
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondary-action {
  width: 100%;
  color: var(--ink);
  background: #eef4ff;
  border-color: #c7d7fe;
  font-weight: 750;
}

.secondary-action:hover {
  background: #e0ebff;
}

.overview-grid,
.workspace-grid {
  display: grid;
  gap: 16px;
}

.overview-grid {
  grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
}

.module-section {
  margin-bottom: 16px;
}

.module-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.module-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: 0;
}

.module-title span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}

.morning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 16px;
}

.morning-module .overview-grid {
  grid-template-columns: 1fr;
}

.mobile-home-card {
  display: none;
}

.world-cup-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.briefing-panel {
  overflow: hidden;
}

.morning-digest-panel {
  overflow: hidden;
}

.morning-digest-grid {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.morning-story-card,
.morning-results-card,
.morning-mvp-card,
.morning-trust-card,
.morning-lite-card,
.morning-weather-line {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fbfcfd;
}

.morning-story-card {
  color: #fff;
  background: #123c69;
  border-color: #123c69;
  padding: 16px;
}

.morning-story-card span,
.morning-results-card span,
.morning-lite-card span,
.morning-weather-line span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.morning-story-card span {
  color: #9fe5c4;
}

.morning-story-card h3 {
  margin: 7px 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

.morning-lead-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.lead-score-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lead-score-team:first-child {
  justify-content: flex-end;
}

.lead-score-team span {
  overflow: hidden;
  color: #dce8f5;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-score-team strong {
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.morning-lead-score em {
  padding: 5px 7px;
  border-radius: 999px;
  color: #08321f;
  background: #9fe5c4;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.morning-lead-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 2px;
}

.morning-lead-tags em {
  padding: 5px 8px;
  border-radius: 999px;
  color: #b8f4d1;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.morning-story-card small {
  display: block;
  margin-top: 10px;
  color: #9fb9d1;
  font-size: 11px;
  line-height: 1.4;
}

.morning-story-card p,
.morning-lite-card p,
.morning-weather-line p,
.morning-empty {
  margin: 7px 0 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.morning-story-card p {
  color: #dce8f5;
}

.morning-result-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.morning-mvp-list {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.morning-trust-list {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.morning-trust-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fff;
}

.morning-trust-row > strong {
  display: grid;
  place-items: center;
  min-height: 28px;
  border-radius: 999px;
  color: #344054;
  background: #eef2f6;
  font-size: 12px;
}

.morning-trust-row div {
  min-width: 0;
}

.morning-trust-row span,
.morning-trust-row small {
  display: block;
}

.morning-trust-row span {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.morning-trust-row small {
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
  line-height: 1.4;
}

.morning-trust-row em {
  padding: 5px 7px;
  border-radius: 999px;
  color: #475467;
  background: #eef2f6;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.morning-trust-row.is-fact > strong,
.morning-trust-row.is-fact em {
  color: #07593f;
  background: #dff8ec;
}

.morning-trust-row.is-sentiment > strong,
.morning-trust-row.is-sentiment em {
  color: #8a4b08;
  background: #fff1cc;
}

.morning-trust-row.is-analysis > strong,
.morning-trust-row.is-analysis em {
  color: #1849a9;
  background: #e8f0ff;
}

.morning-mvp-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fff;
}

.morning-mvp-row > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #08321f;
  background: #dff8ec;
  font-size: 13px;
  font-weight: 900;
}

.morning-mvp-row strong,
.morning-mvp-row small {
  display: block;
}

.morning-mvp-row strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}

.morning-mvp-row small {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.morning-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eef2f6;
}

.morning-result-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.morning-result-row strong:first-child {
  text-align: right;
}

.morning-result-row span {
  min-width: 48px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #08321f;
  background: #dff8ec;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.morning-result-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.speech-actions {
  display: flex;
  gap: 8px;
}

.speech-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.speech-primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.speech-player {
  margin: 12px 18px 0;
  padding: 12px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fbfcfd;
}

.speech-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.speech-progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e6edf6;
}

.speech-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 220ms ease;
}

.speech-progress-row strong {
  color: var(--muted);
  font-size: 12px;
  min-width: 36px;
  text-align: right;
}

.speech-controls-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.speech-controls-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.speech-controls-row label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.speech-controls-row select {
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
}

.speech-auto-row {
  align-content: center;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
}

.speech-auto-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.mobile-player-progress {
  display: none;
}

.briefing-meta {
  margin: 8px 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.briefing-script {
  margin: 12px 18px 18px;
  padding: 14px 0 0;
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid var(--line);
  color: #344054;
  background: transparent;
  font-size: 15px;
  line-height: 1.75;
}

.briefing-script p {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(215, 222, 232, 0.7);
}

.briefing-script p:first-child {
  padding-top: 0;
  border-top: 0;
}

.world-cup-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  color: #fff;
  background: #123c69;
}

.world-cup-hero h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.world-cup-hero .eyebrow {
  color: #9fe5c4;
}

.world-cup-subtitle {
  margin: 7px 0 0;
  color: #dce8f5;
  font-size: 14px;
}

.official-link {
  display: inline-block;
  margin-top: 10px;
  color: #9fe5c4;
  font-size: 12px;
  font-weight: 800;
}

.countdown-block {
  flex: none;
  min-width: 150px;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.countdown-block span,
.countdown-block strong {
  display: block;
}

.countdown-block span {
  color: #b8cee5;
  font-size: 12px;
}

.countdown-block strong {
  margin-top: 5px;
  font-size: 20px;
}

.world-cup-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.world-cup-status {
  padding: 10px 18px;
  color: #475467;
  background: #f7fafc;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.45;
}

.world-cup-quicklook {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.quicklook-card {
  min-height: 108px;
  padding: 12px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fbfcfd;
}

.quicklook-card span,
.quicklook-card small,
.quicklook-card strong {
  display: block;
}

.quicklook-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.quicklook-card strong {
  margin-top: 7px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.quicklook-card small {
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.quicklook-card.is-result {
  border-color: #c7d7fe;
  background: #eef4ff;
}

.quicklook-card.is-signal {
  border-color: #cdeedf;
  background: #f4fff9;
}

.team-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.team-chip,
.match-actions button,
.item-actions button,
.item-actions a {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #344054;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.team-chip {
  padding: 0 10px;
}

.team-chip.is-active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.compact-switch {
  flex: none;
  padding: 0;
}

.match-list {
  display: grid;
  gap: 12px;
  padding: 14px 18px 18px;
}

.match-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.match-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.match-group-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
}

.match-group-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.match-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.match-group-heading + .match-item {
  border-top: 0;
}

.match-item.is-favorite {
  background: #f8fffb;
}

.match-item.is-finished {
  opacity: 0.88;
}

.match-time strong,
.match-time span,
.match-versus strong,
.match-versus span {
  display: block;
}

.match-time strong {
  color: var(--blue);
  font-size: 14px;
}

.match-time span,
.match-versus span,
.match-versus small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.match-versus strong {
  color: var(--ink);
  font-size: 16px;
}

.match-versus em {
  margin: 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-transform: uppercase;
}

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

.match-details-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.match-details-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  background: #fbfcfd;
  list-style: none;
}

.match-details-group > summary::-webkit-details-marker {
  display: none;
}

.match-details-group > summary span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.match-details-group > summary small {
  color: var(--muted);
  font-size: 12px;
}

.match-details-group > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef4ff;
  font-weight: 900;
}

.match-details-group[open] > summary::after {
  content: "-";
}

.match-details-body {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #f7fafc;
}

.match-actions button,
.item-actions button,
.item-actions a {
  padding: 0 10px;
}

.late-badge {
  padding: 4px 7px;
  border-radius: 5px;
  color: #8a3200;
  background: #ffe6d5;
  font-size: 11px;
  font-weight: 800;
}

.focus-badge {
  padding: 4px 7px;
  border-radius: 5px;
  color: #07593f;
  background: #dff8ec;
  font-size: 11px;
  font-weight: 800;
}

.match-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-width: 240px;
  max-width: 300px;
  padding: 8px 10px;
  text-align: center;
  background: linear-gradient(135deg, #101828, #173b57);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.16);
}

.score-team {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
}

.score-team:last-child {
  justify-content: flex-start;
}

.score-team span {
  overflow: hidden;
  max-width: 74px;
  color: #d0d5dd;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-team strong {
  color: #fff;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.match-scoreboard em {
  flex: 0 0 auto;
  padding: 4px 6px;
  color: #b8f4d1;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.match-discussion {
  grid-column: 2 / -1;
  padding: 0;
  border: 1px solid #e6eee9;
  border-radius: 8px;
  background: #f8fffb;
}

.match-discussion summary {
  padding: 9px 11px;
  cursor: pointer;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  list-style: none;
}

.match-discussion summary::-webkit-details-marker {
  display: none;
}

.match-discussion span,
.match-discussion small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.match-discussion strong {
  display: block;
  margin: 0;
  padding: 0 11px 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.match-discussion small {
  padding: 0 11px 9px;
}

.compact-empty {
  margin: 0;
  border: 0;
  box-shadow: none;
}

.fan-sentiment-panel {
  overflow: hidden;
}

.sentiment-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: #063f2f;
  background: #dff8ec;
  font-size: 12px;
  font-weight: 850;
}

.fan-sentiment-body {
  padding: 14px 18px 18px;
}

.fan-sentiment-lead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.fan-sentiment-lead strong,
.fan-sentiment-lead span {
  display: block;
}

.fan-sentiment-lead strong {
  color: var(--ink);
  font-size: 16px;
}

.fan-sentiment-lead span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.fan-hot-topic {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #ffe0a3;
  border-radius: 8px;
  background: #fff8e8;
}

.fan-hot-topic span {
  display: block;
  color: #8a4b08;
  font-size: 12px;
  font-weight: 850;
}

.fan-hot-topic strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.fan-cluster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.fan-cluster-grid article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.fan-cluster-grid article.is-valuable {
  border-color: #bfead5;
  background: #f0fbf5;
}

.fan-cluster-grid span {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.fan-cluster-grid p {
  margin: 6px 0 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.hupu-rating-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.hupu-rating-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 18px 18px;
}

.hupu-match-picker {
  display: grid;
  align-content: start;
  gap: 8px;
}

.hupu-match-button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.hupu-match-button strong,
.hupu-match-button span {
  display: block;
}

.hupu-match-button strong {
  font-size: 14px;
}

.hupu-match-button span {
  color: var(--muted);
  font-size: 12px;
}

.hupu-match-button.is-active {
  border-color: #bfead5;
  background: #e8f8ef;
}

.hupu-rating-main {
  min-width: 0;
}

.hupu-rating-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.hupu-rating-toolbar strong,
.hupu-rating-toolbar span {
  display: block;
}

.hupu-rating-toolbar strong {
  color: var(--ink);
  font-size: 17px;
}

.hupu-rating-toolbar span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hupu-filter {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: #eef2f7;
}

.hupu-filter-button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.hupu-filter-button.is-active {
  color: #fff;
  background: var(--ink);
}

.hupu-rating-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0;
}

.hupu-summary-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.hupu-summary-card span,
.hupu-summary-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.hupu-summary-card strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: 16px;
}

.hupu-summary-card.is-best {
  border-color: #bfead5;
  background: #f0fbf5;
}

.hupu-summary-card.is-controversial {
  border-color: #ffe0a3;
  background: #fff8e8;
}

.hupu-summary-card.is-low {
  border-color: #ffd3b6;
  background: #fff1e8;
}

.hupu-rating-list {
  display: grid;
}

.hupu-player-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.hupu-player-row:first-child {
  border-top: 0;
}

.hupu-player-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--muted);
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 850;
}

.hupu-player-main strong,
.hupu-player-main span {
  display: block;
}

.hupu-player-main strong {
  color: var(--ink);
  font-size: 15px;
}

.hupu-player-main span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hupu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.hupu-tags em {
  padding: 3px 6px;
  border-radius: 5px;
  color: #344054;
  background: #f2f4f7;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.hupu-hot-comment {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.hupu-score {
  justify-self: end;
  min-width: 74px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #344054;
  background: #f2f4f7;
  text-align: right;
}

.hupu-score strong,
.hupu-score span {
  display: block;
}

.hupu-score strong {
  font-size: 24px;
  line-height: 1;
}

.hupu-score span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 750;
}

.hupu-score.is-high {
  color: #063f2f;
  background: #dff8ec;
}

.hupu-score.is-low {
  color: #8a3200;
  background: #ffe6d5;
}

.workspace-grid {
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  align-items: start;
}

.feed-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
}

.feed-collapse > summary {
  display: none;
}

.preference-module {
  margin-bottom: 16px;
  padding-bottom: 18px;
}

.preference-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  padding: 16px 18px 0;
}

.preference-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.preference-card-heading {
  padding: 16px 16px 0;
}

.preference-card-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
}

.preference-editor {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr);
  align-items: start;
}

.wide-field {
  grid-column: 1 / -1;
}

.preference-inspector {
  align-content: start;
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
}

.taste-card {
  margin: 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.taste-card h3 {
  margin: 6px 0 12px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

.semantic-signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.semantic-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  color: #344054;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
}

.semantic-chip.is-interest {
  color: #063f2f;
  border-color: #bfead5;
  background: #e8f8ef;
}

.semantic-chip.is-negative {
  color: #8a3200;
  border-color: #ffd3b6;
  background: #fff1e8;
}

.community-taste {
  grid-column: 1 / -1;
  margin: 2px 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.community-taste .label {
  margin: 0 0 8px;
}

.compact-preference {
  display: inline-flex;
  padding: 8px 12px 8px 0;
}

.preference-save-main {
  grid-column: 1 / -1;
  width: auto;
  margin: 2px 16px 16px;
}

.advanced-settings {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.advanced-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.advanced-settings summary::-webkit-details-marker {
  display: none;
}

.advanced-settings summary span,
.advanced-settings summary small {
  display: block;
}

.advanced-settings summary span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
}

.advanced-settings summary small {
  color: var(--muted);
  font-size: 12px;
}

.advanced-settings summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef4ff;
  font-weight: 900;
}

.advanced-settings[open] summary::after {
  content: "-";
}

.advanced-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0 0 8px;
  border-top: 1px solid var(--line);
}

.schedule-card {
  grid-column: 1 / -1;
  margin-top: 14px;
}

.schedule-visual {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.schedule-visual div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fbfcfd;
}

.schedule-visual span,
.schedule-visual strong {
  display: block;
}

.schedule-visual span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.schedule-visual strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.schedule-command {
  overflow-wrap: anywhere;
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  color: #475467;
  background: #eef2f6;
  font-size: 12px;
  line-height: 1.45;
}

.important-days-card {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fbfcfd;
}

.creator-sources-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fff;
}

.creator-source-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.custom-day-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 10px;
}

.onboarding-modal[hidden] {
  display: none;
}

.onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(8px);
}

.onboarding-card {
  width: min(720px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(215, 222, 232, 0.95);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.28);
}

.onboarding-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: 0;
}

.onboarding-heading span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.onboarding-actions .secondary-action,
.onboarding-actions .primary-action {
  width: auto;
  min-width: 120px;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 222, 232, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 0;
}

.panel-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.panel-heading-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.weather-panel {
  min-height: 244px;
}

.weather-badge,
.count-pill {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.weather-badge {
  color: #063f2f;
  background: #dff8ec;
}

.count-pill {
  color: #6b3d00;
  background: #fff1cc;
}

.source-status-pill {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  color: #475467;
  background: #eef2f6;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.source-status-pill.is-live {
  color: #07593f;
  background: #dff8ec;
}

.source-status-pill.is-cache {
  color: #8a4b08;
  background: #fff1cc;
}

.source-status-pill.is-sample,
.source-status-pill.is-pending,
.source-status-pill.is-error {
  color: #8a1f2d;
  background: #ffe4e8;
}

.source-health-panel {
  grid-column: 1 / -1;
}

.source-manager-page {
  display: grid;
  gap: 16px;
}

.source-manager-sync {
  padding: 6px 10px;
  border-radius: 999px;
  color: #344054;
  background: #eef2f6;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.source-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 18px;
}

.source-health-card {
  min-height: 118px;
  padding: 12px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fbfcfd;
}

.source-health-card div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.source-health-card span,
.source-health-card strong,
.source-health-card small {
  display: block;
}

.source-health-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.source-health-card strong {
  color: var(--ink);
  font-size: 13px;
}

.source-health-card p {
  margin: 10px 0 8px;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.source-health-card small {
  color: var(--muted);
  font-size: 12px;
}

.source-health-card.is-live {
  border-color: #cdeedf;
  background: #f4fff9;
}

.source-health-card.is-cache {
  border-color: #f7d999;
  background: #fffaf0;
}

.source-health-card.is-error,
.source-health-card.is-sample,
.source-health-card.is-pending {
  border-color: #ffd2da;
  background: #fff7f8;
}

.source-management-panel {
  overflow: hidden;
}

.source-management-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px 18px;
}

.source-management-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #fbfcfd;
}

.source-management-card.is-live {
  border-color: #cdeedf;
  background: #f4fff9;
}

.source-management-card.is-cache {
  border-color: #f7d999;
  background: #fffaf0;
}

.source-management-card.is-error,
.source-management-card.is-sample,
.source-management-card.is-pending {
  border-color: #ffd2da;
  background: #fff7f8;
}

.source-management-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.source-management-main strong,
.source-management-main small,
.source-platform {
  display: block;
}

.source-platform {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.source-management-main strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.source-management-main small {
  overflow-wrap: anywhere;
  margin-top: 4px;
  color: #475467;
  font-size: 12px;
  line-height: 1.45;
}

.source-management-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.source-management-facts div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(215, 222, 232, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.source-management-facts dt,
.source-management-facts dd {
  margin: 0;
}

.source-management-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.source-management-facts dd {
  overflow-wrap: anywhere;
  margin-top: 5px;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.source-management-next {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.source-management-next span {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.source-management-next p {
  margin: 5px 0 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.source-entry-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(215, 222, 232, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.source-entry-title,
.source-entry-item,
.source-entry-actions,
.source-strategy {
  display: flex;
  align-items: center;
}

.source-entry-title,
.source-entry-item {
  justify-content: space-between;
  gap: 10px;
}

.source-entry-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.source-entry-title small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.source-entry-item {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f7f9fc;
}

.source-entry-item div:first-child {
  min-width: 0;
}

.source-entry-item strong,
.source-entry-item small {
  display: block;
}

.source-entry-item strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-entry-item small {
  overflow-wrap: anywhere;
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}

.source-entry-actions {
  flex: none;
  gap: 7px;
}

.source-entry-actions span,
.source-entry-actions a,
.source-strategy em {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.source-entry-actions span {
  padding: 5px 7px;
  color: #475467;
  background: #eef2f6;
}

.source-entry-actions a {
  padding: 6px 9px;
  color: #ffffff;
  background: var(--blue);
  text-decoration: none;
}

.source-entry-empty {
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  color: #667085;
  background: #f7f9fc;
  font-size: 12px;
  line-height: 1.45;
}

.source-strategy {
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.source-strategy span {
  width: 100%;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.source-strategy em {
  padding: 5px 8px;
  color: #344054;
  background: #eef2f6;
  font-style: normal;
}

.source-management-actions {
  display: flex;
  gap: 8px;
}

.source-management-actions button {
  flex: 1;
  min-height: 34px;
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  color: var(--blue);
  background: #eef4ff;
  font-size: 12px;
  font-weight: 850;
}

.source-management-actions button:last-child {
  color: #063f2f;
  border-color: #bcebd5;
  background: #e9fbf1;
}

.compact-time-field {
  margin-top: 10px;
}

.compact-time-field input {
  min-height: 36px;
}

.weather-core {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  padding: 26px 22px 16px;
}

.weather-core strong {
  color: var(--ink);
  font-size: 72px;
  line-height: 1;
  letter-spacing: 0;
}

.weather-core p,
.outfit-card p {
  margin: 0;
}

.weather-core p {
  font-size: 20px;
  font-weight: 750;
}

.weather-core span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.outfit-card {
  margin: 0 22px 20px;
  padding: 15px;
  border-top: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fffb;
}

.outfit-card .label {
  margin-bottom: 6px;
}

.outfit-card p:last-child {
  font-size: 15px;
  line-height: 1.55;
}

.weather-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 18px 14px;
}

.weather-brief-card {
  min-height: 98px;
  padding: 12px;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.weather-brief-card p:last-child {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.date-holiday-card {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.date-display strong,
.date-display span {
  display: block;
}

.date-display strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0;
}

.date-display span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.holiday-countdown-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.holiday-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.holiday-countdown span {
  color: #475467;
  font-size: 12px;
  font-weight: 750;
}

.holiday-countdown strong {
  color: var(--green);
  font-size: 12px;
}

.holiday-countdown button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #667085;
  background: #eef2f6;
  font-size: 13px;
  line-height: 1;
}

.holiday-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.custom-day-form {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) auto;
  gap: 7px;
}

.custom-day-form input,
.custom-day-form button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.custom-day-form input {
  width: 100%;
  min-width: 0;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
}

.custom-day-form button {
  padding: 0 10px;
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  font-weight: 850;
}

.forecast-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(72px, 1fr));
  gap: 8px;
  margin: 0 18px 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.forecast-day {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 10px 8px;
  background: #fbfcfd;
  border: 1px solid rgba(215, 222, 232, 0.9);
  border-radius: 8px;
}

.forecast-day span,
.forecast-day small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.forecast-day strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.forecast-day em {
  color: var(--green);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.label {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

#outfitAdvice {
  margin-top: 5px;
  color: var(--ink);
  line-height: 1.55;
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 12px 18px 18px;
  list-style: none;
}

.focus-list li {
  min-height: 156px;
  padding: 16px;
  border-left: 1px solid var(--line);
}

.focus-list li:first-child {
  border-left: 0;
  padding-left: 0;
}

.focus-list strong {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 14px;
}

.focus-list span {
  display: block;
  color: #344054;
  font-size: 14px;
  line-height: 1.62;
}

.watch-panel {
  position: sticky;
  top: 16px;
}

.field {
  display: grid;
  gap: 8px;
  padding: 14px 16px 0;
}

.field span,
.switch-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  outline: none;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  background: #eef2f7;
  border-radius: 8px;
}

.tone-button {
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
}

.tone-button.is-active {
  color: #fff;
  background: var(--ink);
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.settings-panel .secondary-action {
  width: calc(100% - 36px);
  margin: 0 18px;
}

.data-note {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.brief-column {
  display: grid;
  gap: 16px;
}

.item-list,
.watch-list {
  display: grid;
  padding: 8px 18px 18px;
}

.weibo-top-block {
  margin: 14px 18px 4px;
  padding: 14px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.weibo-top-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.weibo-top-heading strong {
  color: var(--ink);
  font-size: 14px;
}

.weibo-top-heading span,
.section-divider-label {
  color: var(--muted);
  font-size: 12px;
}

.weibo-top-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.weibo-top-list a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.weibo-top-list span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #7a4b00;
  background: #fff1cc;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.weibo-top-list strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weibo-top-list em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.section-divider-label {
  margin: 12px 18px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.brief-item,
.watch-item {
  display: grid;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.brief-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.brief-item.is-read {
  opacity: 0.58;
}

.brief-item:first-child,
.watch-item:first-child {
  border-top: 0;
}

.source {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.brief-item h3,
.watch-item h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.38;
  letter-spacing: 0;
}

.brief-item p,
.watch-item p,
.watch-item small {
  color: #475467;
  line-height: 1.58;
}

.brief-item p,
.watch-item p {
  margin: 6px 0 0;
  font-size: 14px;
}

.item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-width: 82px;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.item-actions a {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  border-color: #c7d7fe;
  background: #eef4ff;
}

.credibility-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 8px;
}

.credibility-row small {
  color: var(--muted);
  font-size: 12px;
}

.credibility-chip {
  padding: 3px 7px;
  border-radius: 999px;
  color: #344054;
  background: #f2f4f7;
  font-size: 11px;
  font-weight: 850;
}

.credibility-chip.is-fact {
  color: #063f2f;
  background: #dff8ec;
}

.credibility-chip.is-rumor {
  color: #8a3200;
  background: #ffe6d5;
}

.credibility-chip.is-sentiment {
  color: #6b3d00;
  background: #fff1cc;
}

.credibility-chip.is-analysis {
  color: #344054;
  background: #eef2f6;
}

.empty-state {
  padding: 22px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.item-meta span {
  padding: 4px 8px;
  color: #344054;
  background: #f2f4f7;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.item-meta .item-source-badge {
  color: #475467;
  background: #eef2f6;
}

.item-meta .item-source-badge.is-live {
  color: #07593f;
  background: #dff8ec;
}

.item-meta .item-source-badge.is-cache {
  color: #8a4b08;
  background: #fff1cc;
}

.item-meta .item-source-badge.is-error,
.item-meta .item-source-badge.is-sample,
.item-meta .item-source-badge.is-pending {
  color: #8a1f2d;
  background: #ffe4e8;
}

.watch-item span {
  width: fit-content;
  padding: 4px 8px;
  color: #fff;
  background: var(--amber);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.watch-item small {
  display: block;
  font-size: 13px;
}

@media (max-width: 1120px) {
  .morning-layout {
    grid-template-columns: 1fr;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .preference-grid {
    grid-template-columns: 1fr;
  }

  .preference-inspector {
    padding-right: 0;
  }

  .watch-panel {
    grid-column: 1 / -1;
    position: static;
  }

  .watch-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .watch-item {
    border-top: 0;
  }
}

@media (max-width: 860px) {
  body {
    background: var(--bg);
  }

  .app-shell {
    width: min(100% - 24px, 720px);
    padding: 14px 0 104px;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .sync-state {
    max-width: none;
    text-align: left;
  }

  .topbar {
    gap: 12px;
    margin-bottom: 14px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .user-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .user-switcher label {
    flex: 1;
  }

  .user-switcher select {
    width: 100%;
  }

  .app-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    top: auto;
    z-index: 50;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 6px;
    border-color: rgba(215, 222, 232, 0.95);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.2);
  }

  .app-nav-button {
    position: relative;
    display: grid;
    place-items: center;
    gap: 4px;
    min-height: 54px;
    padding: 8px 6px;
    text-align: center;
  }

  .app-nav-button .nav-icon {
    position: relative;
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 7px;
    color: #667085;
  }

  .app-nav-button.is-active .nav-icon {
    color: var(--blue);
  }

  .app-nav-button[data-view="morning"] .nav-icon {
    border-radius: 999px;
  }

  .app-nav-button[data-view="morning"] .nav-icon::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 999px;
    background: currentColor;
  }

  .app-nav-button[data-view="football"] .nav-icon {
    border-radius: 999px;
  }

  .app-nav-button[data-view="football"] .nav-icon::before,
  .app-nav-button[data-view="football"] .nav-icon::after {
    content: "";
    position: absolute;
    background: currentColor;
  }

  .app-nav-button[data-view="football"] .nav-icon::before {
    top: 8px;
    left: 3px;
    width: 10px;
    height: 2px;
  }

  .app-nav-button[data-view="football"] .nav-icon::after {
    top: 3px;
    left: 8px;
    width: 2px;
    height: 10px;
  }

  .app-nav-button[data-view="feeds"] .nav-icon,
  .app-nav-button[data-view="sources"] .nav-icon,
  .app-nav-button[data-view="taste"] .nav-icon {
    border: 0;
    border-radius: 0;
  }

  .app-nav-button[data-view="feeds"] .nav-icon::before,
  .app-nav-button[data-view="feeds"] .nav-icon::after,
  .app-nav-button[data-view="sources"] .nav-icon::before,
  .app-nav-button[data-view="sources"] .nav-icon::after,
  .app-nav-button[data-view="taste"] .nav-icon::before,
  .app-nav-button[data-view="taste"] .nav-icon::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: currentColor;
  }

  .app-nav-button[data-view="feeds"] .nav-icon::before {
    top: 3px;
    left: 2px;
    width: 16px;
    height: 3px;
    box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
  }

  .app-nav-button[data-view="sources"] .nav-icon::before {
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 5px;
    background: transparent;
  }

  .app-nav-button[data-view="sources"] .nav-icon::after {
    top: 8px;
    left: 8px;
    width: 4px;
    height: 4px;
  }

  .app-nav-button[data-view="taste"] .nav-icon::before {
    top: 2px;
    left: 8px;
    width: 4px;
    height: 16px;
    box-shadow: -6px 4px 0 currentColor, 6px -3px 0 currentColor;
  }

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

  .app-nav-button small {
    overflow: hidden;
    margin-top: 3px;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .overview-grid,
  .workspace-grid,
  .source-health-grid,
  .source-management-list,
  .hupu-rating-layout,
  .hupu-rating-summary,
  .preference-editor,
  .fan-cluster-grid,
  .focus-list,
  .watch-list {
    grid-template-columns: 1fr;
  }

  .source-management-facts {
    grid-template-columns: 1fr;
  }

  .schedule-visual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-entry-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-entry-actions {
    width: 100%;
    justify-content: space-between;
  }

  .source-entry-actions a {
    min-width: 64px;
    text-align: center;
  }

  .module-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-title span {
    text-align: left;
  }

  .morning-module .module-title {
    display: none;
  }

  .mobile-home-card {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid rgba(215, 222, 232, 0.95);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(36, 48, 71, 0.1);
  }

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

  .briefing-panel,
  .morning-module .overview-grid {
    display: none;
  }

  .morning-digest-panel {
    display: block;
  }

  .mobile-home-top,
  .mobile-brief-command,
  .mobile-score-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-home-top h2 {
    margin: 0;
    color: var(--ink);
    font-size: 22px;
    letter-spacing: 0;
  }

  .mobile-weather-pill {
    flex: none;
    min-width: 118px;
    padding: 9px 10px;
    border-radius: 10px;
    background: #eef4ff;
    text-align: right;
  }

  .mobile-weather-pill strong,
  .mobile-weather-pill span,
  .mobile-brief-command span,
  .mobile-brief-command strong,
  .mobile-score-strip span,
  .mobile-score-strip strong,
  .mobile-score-strip small {
    display: block;
  }

  .mobile-weather-pill strong {
    color: var(--blue);
    font-size: 24px;
    line-height: 1;
  }

  .mobile-weather-pill span {
    margin-top: 4px;
    color: #475467;
    font-size: 11px;
    line-height: 1.35;
  }

  .mobile-brief-command {
    align-items: stretch;
    min-height: 96px;
    padding: 14px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #101828, #123c69);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .mobile-brief-command::before {
    content: "";
    flex: 0 0 42px;
    align-self: center;
    height: 42px;
    border-radius: 999px;
    background:
      linear-gradient(90deg, transparent 0 45%, rgba(255, 255, 255, 0.75) 45% 55%, transparent 55%),
      radial-gradient(circle, rgba(159, 229, 196, 0.95) 0 54%, rgba(159, 229, 196, 0.2) 55% 100%);
  }

  .mobile-brief-command div {
    min-width: 0;
  }

  .mobile-brief-command span {
    color: #9fe5c4;
    font-size: 12px;
    font-weight: 850;
  }

  .mobile-brief-command strong {
    overflow: hidden;
    margin-top: 5px;
    color: #fff;
    font-size: 14px;
    line-height: 1.45;
    text-overflow: ellipsis;
  }

  .mobile-player-progress {
    display: block;
    overflow: hidden;
    height: 5px;
    margin-top: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
  }

  .mobile-player-progress i {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: #9fe5c4;
    transition: width 220ms ease;
  }

  .mobile-play-button {
    flex: none;
    align-self: center;
    min-width: 66px;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    color: #08321f;
    background: #9fe5c4;
    font-size: 14px;
    font-weight: 900;
  }

  .mobile-score-strip {
    align-items: flex-start;
    flex-direction: column;
    min-height: 96px;
    padding: 12px;
    border: 1px solid #e6eee9;
    border-radius: 12px;
    background: #f8fffb;
  }

  .mobile-score-strip span {
    color: var(--green);
    font-size: 12px;
    font-weight: 850;
  }

  .mobile-score-strip strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.25;
  }

  .mobile-score-strip small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
  }

  .mobile-secondary-link {
    display: none;
  }

  .feed-collapse {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .feed-collapse > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 0 14px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 850;
    list-style: none;
  }

  .feed-collapse > summary::-webkit-details-marker {
    display: none;
  }

  .feed-collapse > summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    color: var(--blue);
    background: #eef4ff;
    font-weight: 900;
  }

  .feed-collapse[open] > summary::after {
    content: "-";
  }

  .feed-collapse > .panel,
  .watch-panel.feed-collapse .panel-heading,
  .watch-panel.feed-collapse .watch-list {
    border-top: 1px solid var(--line);
  }

  .feed-collapse > .panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .watch-panel.feed-collapse {
    position: static;
  }

  .brief-item,
  .watch-item,
  .quicklook-card,
  .source-health-card,
  .source-management-card {
    min-height: 104px;
  }

  .preference-module {
    padding-bottom: 0;
  }

  .preference-module > .panel-heading {
    padding: 14px;
  }

  .preference-grid {
    gap: 12px;
    padding: 0 14px 14px;
  }

  .preference-card {
    border-radius: 8px;
  }

  .preference-editor {
    display: grid;
    grid-template-columns: 1fr;
  }

  .preference-editor .field {
    padding: 12px 14px;
  }

  .preference-editor .field textarea {
    min-height: 84px;
  }

  .community-taste,
  .important-days-card,
  .preference-inspector,
  .advanced-settings {
    display: none;
  }

  .creator-sources-card {
    gap: 8px;
    margin: 0 14px;
    padding: 12px;
    background: #fbfcfd;
  }

  .creator-sources-card .field {
    padding: 10px 0;
    border-top: 1px solid #eef2f6;
  }

  .creator-sources-card .field:first-of-type {
    border-top: 0;
  }

  .creator-sources-card .field textarea {
    min-height: 66px;
  }

  .preference-save-main {
    margin: 0 14px 14px;
  }

  .world-cup-hero,
  .world-cup-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .world-cup-quicklook {
    grid-template-columns: 1fr;
  }

  .onboarding-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-actions {
    flex-direction: column;
  }

  .onboarding-actions .secondary-action,
  .onboarding-actions .primary-action {
    width: 100%;
  }

  .countdown-block {
    padding: 14px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    border-left: 0;
  }

  .match-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .match-actions {
    justify-content: flex-start;
  }

  .match-scoreboard {
    width: fit-content;
    min-width: 220px;
    max-width: 100%;
    justify-content: center;
  }

  .match-discussion {
    grid-column: 1;
  }

  .match-details-body {
    padding: 10px;
  }

  .match-details-group > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .fan-sentiment-lead {
    align-items: flex-start;
    flex-direction: column;
  }

  .fan-sentiment-lead span {
    text-align: left;
  }

  .focus-list li {
    min-height: auto;
    padding: 14px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .focus-list li:first-child {
    border-top: 0;
  }

  .brief-item {
    grid-template-columns: 1fr;
  }

  .hupu-rating-toolbar,
  .hupu-player-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .hupu-rating-toolbar {
    flex-direction: column;
  }

  .hupu-score {
    justify-self: stretch;
    text-align: left;
  }

  .item-meta {
    flex-flow: row wrap;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .topbar h1 {
    font-size: 23px;
  }

  .primary-action {
    width: 100%;
  }

  .app-nav-button {
    min-height: 50px;
  }

  .app-nav-button small {
    display: none;
  }

  .speech-actions,
  .hupu-filter {
    width: 100%;
  }

  .speech-button,
  .hupu-filter-button {
    flex: 1;
  }

  .speech-player {
    margin: 12px 14px 0;
  }

  .speech-controls-row {
    grid-template-columns: 1fr;
  }

  .weather-core {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .weather-core strong {
    font-size: 58px;
  }

  .weather-core p {
    font-size: 18px;
  }

  .weather-brief-grid,
  .weibo-top-list {
    grid-template-columns: 1fr;
  }

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

  .forecast-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weibo-top-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}
