:root {
  --bg: #f7f4ec;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --text: #1e2528;
  --muted: #667277;
  --line: #d7d3c7;
  --green: #1f6f5b;
  --green-soft: #e5f2eb;
  --blue: #315f9a;
  --blue-soft: #e9eef8;
  --amber: #94620f;
  --amber-soft: #f7ecd6;
  --red: #a33d35;
  --red-soft: #f6e4e1;
  --ink: #172028;
  --shadow: 0 16px 38px rgba(30, 37, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(31, 111, 91, 0.10), transparent 34%),
    linear-gradient(315deg, rgba(49, 95, 154, 0.10), transparent 42%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(215, 211, 199, 0.8);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(31, 111, 91, 0.25);
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name,
.brand-subtitle {
  display: block;
}

.brand-name {
  font-weight: 800;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.82rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.top-nav a:hover {
  background: rgba(31, 111, 91, 0.09);
  color: var(--text);
}

main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 26px clamp(16px, 4vw, 48px) 48px;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 28px;
  align-items: end;
  padding: 12px 0 26px;
}

.intro-copy {
  max-width: 840px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(2.2rem, 6vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.intro-copy p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: #526066;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.58;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-stats div {
  min-height: 120px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.quick-stats strong {
  display: block;
  color: var(--ink);
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  line-height: 1;
}

.quick-stats span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

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

.filters,
.results-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
}

.filters {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 18px;
  padding: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #c9c5b8;
  border-radius: 8px;
  background: white;
  color: var(--text);
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(49, 95, 154, 0.28);
  outline-offset: 2px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #c9c5b8;
  border-radius: 8px;
  background: #f1eee6;
}

.segment {
  min-width: 0;
  min-height: 34px;
  padding: 6px 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.segment.is-active {
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: 0 1px 8px rgba(30, 37, 40, 0.10);
}

.results-panel {
  min-width: 0;
  padding: 18px;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.results-toolbar h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.2vw, 2.1rem);
  letter-spacing: 0;
}

.ghost-button,
.official-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.ghost-button {
  border: 1px solid #c9c5b8;
  background: white;
  color: var(--ink);
}

.official-button {
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
}

.secondary-button {
  border: 1px solid #c9c5b8;
  background: white;
  color: var(--ink);
}

.official-button.is-disabled {
  border-color: #c9c5b8;
  background: #ece8df;
  color: #7c878c;
  cursor: not-allowed;
}

.launch-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(49, 95, 154, 0.2);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--blue-soft), rgba(229, 242, 235, 0.72));
  color: var(--blue);
}

.launch-strip span {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.launch-strip strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.serial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.serial-card {
  display: grid;
  gap: 14px;
  min-height: 310px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.serial-card.is-excluded {
  background: #f2f0ea;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.title-wrap {
  min-width: 0;
}

.serial-card h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.author {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.tier-badge {
  align-self: start;
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tier-must_include {
  background: var(--green-soft);
  color: var(--green);
}

.tier-can_include {
  background: var(--blue-soft);
  color: var(--blue);
}

.tier-hold {
  background: var(--amber-soft);
  color: var(--amber);
}

.tier-exclude_web_scope {
  background: var(--red-soft);
  color: var(--red);
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.meta-pill {
  border: 1px solid #d6d2c5;
  color: #4e5a60;
  background: #fbfaf6;
}

.tag-pill {
  background: #eef4f2;
  color: #315d52;
}

.notes {
  margin: 0;
  color: #4a565b;
  font-size: 0.92rem;
  line-height: 1.5;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 2px;
}

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

.platform {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 44px 20px;
  border: 1px dashed #bbb5a6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.about-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  gap: 24px;
  margin-top: 22px;
  padding: 26px 0 0;
  border-top: 1px solid rgba(215, 211, 199, 0.9);
}

.about-band h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.6vw, 2.4rem);
  line-height: 1.05;
}

.about-band p:last-child {
  margin: 0;
  color: #526066;
  font-size: 1rem;
  line-height: 1.65;
}

.guide-main {
  width: min(1220px, 100%);
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 24px;
  align-items: end;
  padding: 14px 0 22px;
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.guide-title {
  margin-bottom: 12px;
  font-size: clamp(2.25rem, 6vw, 4.9rem);
}

.guide-deck {
  max-width: 780px;
  margin-bottom: 18px;
  color: #526066;
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  line-height: 1.62;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-panel,
.taste-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.route-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.route-panel h2,
.taste-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

.route-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.route-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(215, 211, 199, 0.75);
}

.route-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.route-list dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.route-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.checked-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.guide-article {
  display: grid;
  gap: 14px;
}

.guide-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.guide-section h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.detail-notes summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.detail-notes[open] summary {
  margin-bottom: 10px;
}

.guide-section p,
.guide-section li {
  color: #4a565b;
  font-size: 1rem;
  line-height: 1.68;
}

.guide-section p:last-child,
.guide-section ul:last-child {
  margin-bottom: 0;
}

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

.fit-grid h3,
.similar-list h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.fit-grid ul,
.similar-list ul,
.warnings-list {
  margin: 0;
  padding-left: 20px;
}

.taste-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 18px;
  padding: 18px;
}

.rating-list {
  display: grid;
  gap: 13px;
}

.rating-row {
  display: grid;
  gap: 6px;
}

.rating-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e0d3;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.similar-list {
  display: grid;
  gap: 8px;
}

.similar-list a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.guide-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(215, 211, 199, 0.9);
}

@media (max-width: 980px) {
  .intro-band,
  .workspace,
  .about-band {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .quick-stats div {
    min-height: auto;
  }

  .results-toolbar,
  .launch-strip,
  .card-footer,
  .guide-footer-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .ghost-button,
  .official-button,
  .secondary-button {
    width: 100%;
  }

  .card-actions {
    width: 100%;
    justify-content: stretch;
  }

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

@media (max-width: 420px) {
  main {
    padding-inline: 12px;
  }

  h1 {
    font-size: 2.15rem;
  }

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

  .card-top {
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .guide-hero,
  .guide-layout,
  .fit-grid {
    grid-template-columns: 1fr;
  }

  .taste-panel {
    position: static;
  }
}
