:root {
  --bg: #f6fbff;
  --panel: #ffffff;
  --ink: #0b1328;
  --muted: #6d7e95;
  --soft: #eef4fa;
  --line: #dbe5ee;
  --cyan: #19c6bd;
  --purple: #b14ac7;
  --red: #ff4f77;
  --red-line: #ff9db0;
  --green: #21c792;
  --green-line: #87e7cd;
  --gray: #8ca0b5;
  --gray-line: #cbd7e3;
  --shadow: 0 22px 70px rgba(67, 92, 121, 0.12);
  --track-fill: 29.29%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  background: linear-gradient(180deg, #f8fcff 0%, #edf7fb 100%);
}

html[data-theme="dark"] {
  --bg: #101214;
  --panel: #181a1d;
  --ink: #f1f3f5;
  --muted: #b5bcc5;
  --soft: #202327;
  --line: #34383d;
  --cyan: #e5e7eb;
  --purple: #d1d5db;
  --red: #f87171;
  --red-line: #7f343b;
  --green: #f1f3f5;
  --green-line: #6b7280;
  --gray: #9ca3af;
  --gray-line: #4b5563;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] body {
  color: var(--ink);
  background: #101214;
}

html[data-theme="dark"] .site-nav,
html[data-theme="dark"] .dashboard-inner,
html[data-theme="dark"] .age-panel,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .content-panel,
html[data-theme="dark"] .age-showcase-panel,
html[data-theme="dark"] .landing-stats div,
html[data-theme="dark"] .foot-grid article,
html[data-theme="dark"] .kpi-box,
html[data-theme="dark"] .judgement-card,
html[data-theme="dark"] .modal-meta-item,
html[data-theme="dark"] .chart-panel,
html[data-theme="dark"] .modal-card {
  background: #181a1d;
  border-color: var(--line);
}

html[data-theme="dark"] .home-page,
html[data-theme="dark"] .landing-band {
  background: #101214;
}

html[data-theme="dark"] .site-nav a,
html[data-theme="dark"] .brand,
html[data-theme="dark"] .landing-lead,
html[data-theme="dark"] .age-showcase p,
html[data-theme="dark"] .foot-grid p,
html[data-theme="dark"] .content-panel p,
html[data-theme="dark"] .event-summary,
html[data-theme="dark"] .extra-row,
html[data-theme="dark"] .kpi-box span,
html[data-theme="dark"] .judgement-card p,
html[data-theme="dark"] .modal-description,
html[data-theme="dark"] .chart-header,
html[data-theme="dark"] .age-copy {
  color: var(--muted);
}

html[data-theme="dark"] .kpi-box strong,
html[data-theme="dark"] .judgement-card h2,
html[data-theme="dark"] .hero-kicker,
html[data-theme="dark"] .modal-head h3,
html[data-theme="dark"] .modal-meta-item strong,
html[data-theme="dark"] .age-showcase-grid strong,
html[data-theme="dark"] .age-showcase-grid span {
  color: var(--ink);
}

html[data-theme="dark"] .brand span,
html[data-theme="dark"] .button-primary {
  background: #f1f3f5;
  color: #101214;
}

html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .age-showcase-grid a,
html[data-theme="dark"] .age-preset,
html[data-theme="dark"] .modal-close,
html[data-theme="dark"] select,
html[data-theme="dark"] input {
  background: #202327;
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .landing-eyebrow,
html[data-theme="dark"] .age-showcase-pill,
html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .tag-row span,
html[data-theme="dark"] .panel-pill,
html[data-theme="dark"] .stage-pill {
  background: #202327;
  border-color: #3b4046;
  color: #f1f3f5;
}

html[data-theme="dark"] .modal-status,
html[data-theme="dark"] .rule-chip,
html[data-theme="dark"] .tone-golden,
html[data-theme="dark"] .tone-easy,
html[data-theme="dark"] .tone-normal,
html[data-theme="dark"] .tone-challenge,
html[data-theme="dark"] .tone-hard {
  background: #202327;
  border-color: #3b4046;
  color: var(--ink);
}

html[data-theme="dark"] .best-window i {
  background: linear-gradient(90deg, currentColor 0%, currentColor var(--bar-fill), #3b4046 var(--bar-fill), #3b4046 100%);
}

html[data-theme="dark"] #detailChart text {
  fill: #cbd5e1 !important;
}

html[data-theme="dark"] #detailChart line {
  stroke: rgba(203, 213, 225, 0.2) !important;
}

html[data-theme="dark"] .is-best .status-pill {
  border-color: #b6f2df;
  background: #eafff8;
  color: #21c792;
}

html[data-theme="dark"] .is-rescue .status-pill {
  border-color: #ffc1cf;
  background: #fff1f5;
  color: #ff4f77;
}

html[data-theme="dark"] .is-soon .status-pill {
  border-color: #ffd7a6;
  background: #fff8eb;
  color: #d68016;
}

html[data-theme="dark"] .is-prepare .status-pill {
  border-color: #d8b4fe;
  background: #f5edff;
  color: #8b5cf6;
}

html[data-theme="dark"] .is-best .best-window i {
  color: #21c792;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #dfe8f1;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(1500px, calc(100vw - 64px));
  height: 68px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #111a31;
  color: #fff;
  font-weight: 900;
}

.brand strong {
  font-size: 1rem;
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.site-nav a {
  color: #4f6078;
  font-weight: 700;
  text-decoration: none;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fbff;
  color: #4f6078;
  box-shadow: inset 0 1px 3px rgba(68, 87, 110, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(68, 87, 110, 0.12);
}

.theme-toggle::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin-left: 4px;
  border-radius: 50%;
  background: #111a31;
  box-shadow: 0 3px 10px rgba(17, 26, 49, 0.18);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.theme-toggle[data-icon="moon"]::before,
.theme-toggle:not([data-icon])::before {
  transform: translateX(0);
}

.theme-toggle[data-icon="sun"]::before {
  background: #f8fafc;
  box-shadow: 0 3px 10px rgba(248, 250, 252, 0.18);
  transform: translateX(19px);
}

.hero-dashboard {
  padding: 0 0 84px;
}

.dashboard-inner {
  width: min(1500px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 34px 30px 28px;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 24px 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hero-copy h1 {
  margin: 6px 0 0;
  font-size: 1.85rem;
}

.hero-copy p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.kpi-box {
  min-height: 112px;
  padding: 22px;
  border: 1px solid #e0e8f0;
  border-radius: 16px;
  background: #fff;
}

.kpi-box strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 1.45rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-box span {
  display: block;
  margin-top: 14px;
  color: #5f6f86;
  font-weight: 700;
}

.search-input {
  width: 100%;
  height: 52px;
  margin-top: 20px;
  padding: 0 16px;
  border: 1px solid #e0e8f0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
}

.toolbar-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.toolbar-row label {
  display: block;
}

.toolbar-row span {
  display: block;
  margin-bottom: 10px;
  color: #5f6f86;
  font-weight: 800;
}

.toolbar-row select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #e0e8f0;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  width: min(1740px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 32px 0;
}

.age-anchor {
  position: sticky;
  top: 32px;
  align-self: start;
}

.age-panel {
  min-height: calc(100vh - 64px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-pill,
.stage-pill,
.age-preset,
.tag-row span,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f7fbff;
  color: #516782;
  font-weight: 700;
}

.panel-pill {
  padding: 0 16px;
  border-color: #d9ecff;
  background: #edf6ff;
  color: var(--cyan);
}

.age-number {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 28px;
}

.age-number strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5.2rem, 8vw, 6.7rem);
  line-height: 0.86;
  font-weight: 400;
  letter-spacing: 0;
}

.age-number span {
  color: var(--ink);
  font-size: 1.55rem;
}

.age-copy {
  margin: 22px 0 0;
  color: #50647c;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.85;
}

.age-control {
  margin-top: 34px;
}

.age-control label,
.section-label,
.sort-block span,
.best-window span,
.metric-row span,
.modal-meta-item span {
  display: block;
  color: #8294aa;
  font-size: 0.88rem;
  font-weight: 800;
}

#ageSlider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  margin-top: 18px;
  border-radius: 999px;
  outline: none;
  background:
    linear-gradient(90deg, var(--purple) 0%, var(--purple) var(--track-fill), #d8d8d8 var(--track-fill), #d8d8d8 100%);
}

#ageSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 3px 8px rgba(177, 74, 199, 0.28);
}

#ageSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 3px 8px rgba(177, 74, 199, 0.28);
}

.age-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.age-preset {
  min-width: 0;
  height: 52px;
  padding: 0;
  background: #fbfdff;
  color: #23314a;
  font-size: 1.02rem;
}

.age-preset.is-active {
  border-color: #bfefff;
  background: #e9f8ff;
  color: var(--cyan);
}

.stage-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.stage-pill {
  padding: 0 18px;
  min-height: 44px;
}

.stage-pill.active,
.stage-pill:hover {
  border-color: #bfefff;
  background: #effbff;
  color: var(--cyan);
}

.stage-pill span {
  display: none;
}

.judgement-card {
  margin-top: 22px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.judgement-card h2 {
  margin: 0 0 16px;
  font-size: 1.4rem;
}

.judgement-card p {
  margin: 0;
  color: #4c6079;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.85;
}

.judgement-card p + p {
  margin-top: 10px;
}

.windows-board {
  min-width: 0;
}

.board-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.board-meta h1 {
  margin: 4px 0 0;
  font-size: 1.6rem;
}

.board-meta p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.board-count {
  display: none;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 14px;
}

.event-card {
  position: relative;
  min-height: 468px;
  padding: 16px 16px 38px;
  border: 1px solid var(--gray-line);
  border-top-width: 3px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(249, 252, 255, 0.98) 100%);
  box-shadow: 0 16px 46px rgba(68, 87, 110, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 58px rgba(68, 87, 110, 0.12);
}

.event-card.is-rescue {
  border-color: var(--red-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 249, 0.98));
}

.event-card.is-best {
  border-color: var(--green-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 255, 251, 0.98));
}

.event-card.is-missed {
  border-color: var(--gray-line);
}

.status-pill {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 0 11px;
  min-height: 30px;
  font-size: 0.84rem;
  text-align: center;
  white-space: nowrap;
}

.status-pill span {
  margin-right: 4px;
}

.is-rescue .status-pill {
  border-color: #ffc1cf;
  background: #fff1f5;
  color: var(--red);
}

.is-best .status-pill {
  border-color: #b6f2df;
  background: #eafff8;
  color: var(--green);
}

.is-missed .status-pill {
  border-color: #d7e0ea;
  background: #f6f9fc;
  color: #61748c;
}

.is-prepare .status-pill {
  border-color: #d8b4fe;
  background: #f5edff;
  color: #8b5cf6;
}

.is-soon .status-pill {
  border-color: #ffd7a6;
  background: #fff8eb;
  color: #d68016;
}

.event-card h3 {
  margin: 42px 0 0;
  min-height: 44px;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.38;
  text-align: center;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.74rem;
  white-space: nowrap;
}

.best-window {
  margin-top: 20px;
}

.best-window div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.best-window strong {
  color: var(--ink);
  font-size: 0.88rem;
  text-align: right;
}

.best-window i {
  display: block;
  height: 7px;
  margin-top: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, currentColor 0%, currentColor var(--bar-fill), #d9e2ea var(--bar-fill), #d9e2ea 100%);
}

.is-rescue .best-window i {
  color: var(--red);
}

.is-best .best-window i {
  color: var(--green);
}

.is-missed .best-window i {
  color: #a8b6c4;
}

.event-summary {
  min-height: 58px;
  margin: 9px 0 0;
  color: #536981;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.58;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e8eef4;
}

.metric-row strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 1.42rem;
  line-height: 1;
}

.metric-row strong.is-high-cost {
  color: var(--red);
}

.metric-row small {
  color: #4d5d72;
  font-size: 0.85rem;
}

.metric-row em {
  display: block;
  margin-top: 6px;
  color: #91a0b4;
  font-style: normal;
  font-weight: 700;
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extra-row {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #8a9ab0;
  font-size: 0.78rem;
  font-weight: 700;
}

.extra-row strong,
.extra-row span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.extra-row span {
  margin-top: 4px;
}

.is-rescue .metric-row div:last-child strong {
  color: var(--red);
}

.is-missed .metric-row div:last-child strong {
  color: var(--red);
}

.card-more {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 24px;
  height: 24px;
  border: 1px solid #dce7f0;
  border-radius: 50%;
  background: #f7fbff;
  color: #99aabc;
  font-size: 1.25rem;
  line-height: 20px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.content-page {
  width: min(920px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 56px 0 88px;
}

.content-panel {
  padding: 44px 48px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.content-panel h1 {
  margin: 12px 0 22px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.12;
}

.content-panel p {
  margin: 0;
  color: #50647c;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.9;
}

.content-panel p + p {
  margin-top: 18px;
}

.content-footnote {
  padding-top: 22px;
  border-top: 1px solid #e8eef4;
  color: #8393a7 !important;
}

.content-footnote a {
  display: inline-flex;
  margin-right: 16px;
  color: #111a31;
  font-weight: 850;
  text-decoration: none;
}

.window-detail-panel {
  width: min(100%, 980px);
}

.window-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 26px 0;
}

.window-detail-meta div {
  padding: 16px;
  border: 1px solid #e7eef5;
  border-radius: 16px;
  background: #f8fbfe;
}

.window-detail-meta span {
  display: block;
  color: #8294aa;
  font-size: 0.82rem;
  font-weight: 850;
}

.window-detail-meta strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.25rem;
}

.window-detail-meta small {
  color: #536981;
  font-size: 0.86rem;
}

.home-page {
  background: #f6fbff;
}

.home-nav {
  background: rgba(255, 255, 255, 0.94);
}

.home-nav .brand {
  color: inherit;
  text-decoration: none;
}

.landing-section {
  padding: 42px 0;
}

.landing-hero {
  padding-top: 86px;
}

.landing-band {
  background: rgba(255, 255, 255, 0.52);
}

.landing-shell {
  width: min(1180px, calc(100vw - 64px));
  margin: 0 auto;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #96ead1;
  border-radius: 999px;
  background: #eafff8;
  color: #159a72;
  font-size: 0.82rem;
  font-weight: 900;
}

.landing-hero h1 {
  max-width: 1100px;
  margin: 8px 0 22px;
  color: var(--ink);
  font-size: clamp(3.35rem, 7.2vw, 6.7rem);
  line-height: 1;
}

.landing-hero h1 span {
  display: block;
}

.hero-kicker {
  margin: 22px 0 0;
  color: #111a31;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 900;
  line-height: 1.2;
}

.landing-section h2 {
  margin: 14px 0 14px;
  color: var(--ink);
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.12;
}

.landing-lead {
  max-width: 720px;
  margin: 0;
  color: #536981;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.9;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration: none;
}

.button-primary {
  background: #111a31;
  color: #fff;
}

.hero-cta {
  min-height: 78px;
  padding: 0 34px;
  border-radius: 20px;
  font-size: 1.28rem;
  box-shadow: 0 22px 56px rgba(17, 26, 49, 0.22);
}

.button-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: #50647c;
}

.landing-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 52px;
}

.landing-stats div {
  padding: 22px;
  border: 1px solid #e2eaf2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.landing-stats strong {
  display: block;
  color: var(--ink);
  font-size: 2.45rem;
  line-height: 1;
}

.landing-stats p {
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.7;
}

.age-showcase {
  padding: 42px 0;
}

.age-showcase-panel {
  width: min(1180px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 48px 48px 46px;
  border: 1px solid #dfe8f1;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(78, 104, 128, 0.12);
}

.age-showcase-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #d8e5ff;
  border-radius: 999px;
  background: #f2f6ff;
  color: #08b994;
  font-size: 0.9rem;
  font-weight: 900;
}

.age-showcase h2 {
  margin: 30px 0 22px;
  color: var(--ink);
  font-size: clamp(2.2rem, 4vw, 3.45rem);
  line-height: 1.1;
  white-space: nowrap;
}

.age-showcase p {
  margin: 0;
  max-width: 790px;
  color: #314861;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.9;
}

.age-showcase-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.age-showcase-grid a {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: 24px 12px;
  border: 1px solid #dde6ef;
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.age-showcase-grid a:hover {
  transform: translateY(-2px);
  border-color: #bfcbd8;
  box-shadow: 0 16px 38px rgba(72, 92, 116, 0.1);
}

.age-showcase-grid strong {
  color: #071028;
  font-size: 2.85rem;
  line-height: 1;
}

.age-showcase-grid span {
  margin-top: 14px;
  color: #29435f;
  font-size: 1.12rem;
  font-weight: 650;
}

.topic-grid,
.pressure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.topic-grid {
  grid-template-columns: repeat(4, 1fr);
}

.topic-card,
.pressure-card,
.foot-grid article {
  padding: 24px;
  border: 1px solid #e2eaf2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.topic-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topic-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f2f7fb;
  color: #66788f;
  font-size: 0.8rem;
  font-weight: 900;
}

.topic-card h3,
.pressure-card h3,
.foot-grid h3 {
  margin: 16px 0 10px;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.35;
}

.topic-card p,
.pressure-card p,
.foot-grid p {
  margin: 0;
  color: #5d7188;
  font-weight: 650;
  line-height: 1.72;
}

.topic-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  color: #6e8198;
  font-size: 0.84rem;
  font-weight: 850;
}

.topic-note {
  min-height: 82px;
}

.topic-card .button {
  margin-top: 18px;
}

.age-entry-grid,
.issue-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.age-entry,
.issue-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid #e2eaf2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  text-decoration: none;
}

.age-entry strong,
.issue-card strong {
  color: var(--ink);
  font-size: 2.25rem;
  line-height: 1;
}

.age-entry span,
.issue-card span {
  color: var(--muted);
  font-weight: 850;
}

.issue-grid {
  grid-template-columns: repeat(4, 1fr);
}

.pressure-card > span {
  color: #90a1b4;
  font-size: 0.82rem;
  font-weight: 900;
}

.pressure-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.pressure-card a {
  display: inline-flex;
  margin-top: 16px;
  color: #111a31;
  font-weight: 900;
  text-decoration: none;
}

.window-index-head {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 28px;
  margin-bottom: 18px;
}

.home-search {
  display: grid;
  gap: 8px;
  width: min(360px, 100%);
  color: #8294aa;
  font-size: 0.86rem;
  font-weight: 850;
}

.home-search input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.home-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.home-filter button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #5b6d84;
  font-size: 0.84rem;
  font-weight: 800;
}

.home-filter button.is-active {
  border-color: #111a31;
  background: #111a31;
  color: #fff;
}

.home-window-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
}

.window-index-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #e2eaf2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.window-index-link:hover {
  transform: translateY(-2px);
  border-color: #9fb4c8;
}

.window-index-link strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.window-index-link span {
  color: #7f90a5;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.landing-foot {
  padding-bottom: 86px;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.site-footer {
  width: min(1180px, calc(100vw - 64px));
  margin: 0 auto;
  padding: 28px 0 34px;
  border-top: 1px solid #dfe8f1;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: #71849a;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.7;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 28, 45, 0.42);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 42px);
  overflow: auto;
  margin: 21px auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(31, 36, 40, 0.22);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f7fbff;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
}

.modal-head,
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 44px;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-head h3 {
  margin: 6px 0 0;
  font-size: 1.45rem;
}

.modal-status,
.rule-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 800;
}

.modal-description {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.modal-meta-item,
.chart-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}

.modal-meta-item strong {
  display: block;
  margin-top: 8px;
  line-height: 1.55;
}

.chart-panel {
  margin-top: 20px;
}

.chart-header {
  padding-right: 0;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

#detailChart {
  width: 100%;
  height: 280px;
}

.rule-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tone-golden,
.tone-easy,
.tone-normal,
.tone-challenge,
.tone-hard {
  background: #f7fbff;
}

@media (max-width: 1440px) {
  .event-grid {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
  }
}

@media (max-width: 980px) {
  .site-nav nav {
    display: none;
  }

  .kpi-strip,
  .toolbar-row,
  .topic-grid,
  .pressure-grid,
  .home-window-list,
  .foot-grid {
    grid-template-columns: 1fr;
  }

  .window-detail-meta {
    grid-template-columns: 1fr;
  }

  .window-index-head {
    display: block;
  }

  .home-search {
    margin-top: 18px;
  }

  .landing-stats,
  .age-entry-grid,
  .age-showcase-grid,
  .issue-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: min(100vw - 28px, 100%);
  }

  .age-anchor {
    position: static;
  }

  .age-panel {
    min-height: auto;
  }

  .event-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100vw - 18px, 100%);
    gap: 16px;
    padding: 16px 0;
  }

  .age-panel,
  .event-card {
    padding: 18px;
  }

  .content-page {
    width: min(100vw - 18px, 100%);
    padding: 24px 0 56px;
  }

  .content-panel {
    padding: 28px 22px;
    border-radius: 18px;
  }

  .landing-section {
    padding: 28px 0;
  }

  .landing-hero {
    padding-top: 38px;
  }

  .landing-shell {
    width: min(100vw - 18px, 100%);
  }

  .site-footer {
    width: min(100vw - 18px, 100%);
  }

  .landing-hero h1 {
    font-size: clamp(2.85rem, 14vw, 4.4rem);
  }

  .landing-stats,
  .age-entry-grid,
  .age-showcase-grid,
  .issue-grid,
  .home-window-list {
    grid-template-columns: 1fr;
  }

  .age-showcase {
    padding: 24px 0;
  }

  .age-showcase-panel {
    width: min(100vw - 18px, 100%);
    padding: 30px 22px;
    border-radius: 20px;
  }

  .age-showcase h2 {
    margin-top: 22px;
    font-size: clamp(2rem, 11vw, 3rem);
    white-space: normal;
  }

  .age-showcase p br {
    display: none;
  }

  .age-presets {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .board-meta,
  .modal-head,
  .chart-header {
    display: block;
  }

  .sort-block {
    display: block;
    margin-top: 14px;
  }

  .modal-meta {
    grid-template-columns: 1fr;
  }
}
