:root {
  color-scheme: light;
  --radar-bg: #f4f7fb;
  --radar-surface: #fff;
  --radar-text: #0f172a;
  --radar-muted: #526074;
  --radar-border: #d8e0ea;
  --radar-navy: #0f4c81;
  --radar-blue: #1565c0;
  --radar-red: #c62828;
  --radar-orange: #ef6c00;
  --radar-gray: #64748b;
  --radar-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  color: var(--radar-text);
  background:
    radial-gradient(circle at 10% 0, rgba(21, 101, 192, .11), transparent 26rem),
    var(--radar-bg);
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.65;
}

button,
select {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  color: #fff;
  background: #111827;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.radar-topbar {
  border-bottom: 1px solid rgba(15, 76, 129, .14);
  background: rgba(255, 255, 255, .94);
}

.radar-topbar__inner,
.radar-shell {
  width: min(1380px, calc(100% - 32px));
  margin-inline: auto;
}

.radar-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
}

.radar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--radar-navy);
  font-weight: 900;
  text-decoration: none;
}

.radar-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
}

.radar-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
}

.radar-nav a {
  color: var(--radar-muted);
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
}

.radar-nav a:hover,
.radar-nav a:focus-visible {
  color: var(--radar-navy);
  text-decoration: underline;
}

.radar-hero {
  padding: 42px 0 26px;
}

.radar-hero__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: clamp(24px, 4vw, 46px);
  color: #fff;
  background: linear-gradient(135deg, #092f52, #0f4c81 58%, #1565c0);
  border-radius: 28px;
  box-shadow: 0 22px 50px rgba(15, 76, 129, .24);
}

.eyebrow {
  margin: 0 0 8px;
  color: #bae6fd;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.radar-hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
}

.radar-hero__lead {
  max-width: 850px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: clamp(.96rem, 1.6vw, 1.14rem);
}

.radar-clock {
  min-width: 230px;
  padding: 16px 18px;
  text-align: right;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 16px;
}

.radar-clock span,
.radar-clock strong {
  display: block;
}

.radar-clock span {
  color: #bfdbfe;
  font-size: .75rem;
  font-weight: 800;
}

.radar-clock strong {
  margin-top: 4px;
  font-size: .96rem;
}

.radar-disclaimer {
  margin: 16px 0 0;
  padding: 12px 15px;
  border-left: 4px solid var(--radar-orange);
  color: #7c2d12;
  background: #fff7ed;
  border-radius: 0 12px 12px 0;
  font-weight: 700;
}

.radar-section {
  margin: 0 0 24px;
  padding: clamp(20px, 2.7vw, 32px);
  background: rgba(255, 255, 255, .97);
  border: 1px solid var(--radar-border);
  border-radius: 22px;
  box-shadow: var(--radar-shadow);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: var(--radar-navy);
  font-size: clamp(1.32rem, 2.6vw, 1.85rem);
  line-height: 1.25;
}

.section-heading p {
  max-width: 700px;
  margin: 5px 0 0;
  color: var(--radar-muted);
  font-size: .88rem;
}

.data-refresh {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: var(--radar-muted);
  background: #f8fafc;
  border: 1px solid var(--radar-border);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quote-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  background: var(--radar-surface);
  border: 1px solid var(--radar-border);
  border-top: 4px solid var(--radar-gray);
  border-radius: 15px;
  transition: background-color .5s ease;
}

.quote-card--major {
  min-height: 292px;
  padding: 19px;
}

.quote-card--highlight {
  box-shadow: inset 0 0 0 2px rgba(239, 108, 0, .18);
}

.quote-card.is-up {
  border-top-color: var(--radar-red);
}

.quote-card.is-down {
  border-top-color: var(--radar-blue);
}

.quote-card.has-update {
  animation: quote-update 1.1s ease-out;
}

@keyframes quote-update {
  from { background: #fff8e1; }
  to { background: #fff; }
}

.quote-card__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.quote-card h3 {
  margin: 0;
  font-size: .96rem;
  line-height: 1.35;
}

.quote-card__state {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 900;
}

.quote-card__value {
  display: block;
  margin: 15px 0 3px;
  overflow-wrap: anywhere;
  font-size: clamp(1.22rem, 2.1vw, 1.8rem);
  line-height: 1.15;
}

.quote-card--major .quote-card__value {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.quote-card.is-up .quote-card__value,
.quote-card .is-up {
  color: var(--radar-red);
}

.quote-card.is-up .quote-card__changes {
  color: var(--radar-red);
}

.quote-card.is-down .quote-card__value,
.quote-card .is-down {
  color: var(--radar-blue);
}

.quote-card.is-down .quote-card__changes {
  color: var(--radar-blue);
}

.quote-card__changes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--radar-muted);
  font-size: .8rem;
  font-weight: 800;
}

.quote-card__range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.quote-card__range div {
  min-width: 0;
  padding: 7px;
  background: #f8fafc;
  border-radius: 8px;
}

.quote-card__range dt,
.quote-card__range dd {
  margin: 0;
}

.quote-card__range dt {
  color: var(--radar-muted);
  font-size: .65rem;
}

.quote-card__range dd {
  overflow-wrap: anywhere;
  font-size: .76rem;
  font-weight: 800;
}

.quote-card__basis {
  margin: 7px 0;
  font-size: .78rem;
  font-weight: 900;
}

.quote-card__meta,
.quote-card__source {
  margin: 3px 0 0;
  color: var(--radar-muted);
  font-size: .68rem;
  overflow-wrap: anywhere;
}

.chart-open,
.chart-unavailable {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 5px 10px;
  color: var(--radar-navy);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: .72rem;
  font-weight: 900;
}

.chart-open {
  cursor: pointer;
}

.chart-open:hover,
.chart-open:focus-visible {
  color: #fff;
  background: var(--radar-navy);
}

.chart-unavailable {
  color: var(--radar-muted);
  background: #f8fafc;
  border-color: var(--radar-border);
}

.radar-workspace {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, .85fr);
  gap: 24px;
  align-items: start;
}

.workspace-main,
.workspace-side {
  min-width: 0;
}

.workspace-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 14px;
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.chart-controls label {
  color: var(--radar-muted);
  font-size: .8rem;
  font-weight: 900;
}

.chart-controls select {
  min-height: 42px;
  padding: 7px 36px 7px 11px;
  color: var(--radar-text);
  background: #fff;
  border: 1px solid var(--radar-border);
  border-radius: 9px;
  font-weight: 800;
}

.interval-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.interval-buttons button {
  min-height: 40px;
  padding: 6px 10px;
  color: var(--radar-muted);
  background: #f8fafc;
  border: 1px solid var(--radar-border);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.interval-buttons button[aria-pressed="true"] {
  color: #fff;
  background: var(--radar-navy);
  border-color: var(--radar-navy);
}

.tv-chart {
  width: 100%;
  height: 590px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--radar-border);
  border-radius: 14px;
}

.tv-chart .tradingview-widget-container__widget {
  width: 100%;
  height: 100%;
}

.chart-status,
.chart-data-note {
  margin: 10px 0 0;
  color: var(--radar-muted);
  font-size: .76rem;
}

.official-market-widget {
  width: 100%;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--radar-border);
  border-radius: 14px;
}

.official-market-widget .tradingview-widget-container__widget {
  min-height: 530px;
}

.tradingview-widget-copyright {
  padding: 4px 8px;
  color: var(--radar-muted);
  font-size: .68rem;
  text-align: right;
}

.tradingview-widget-copyright a {
  color: var(--radar-navy);
}

.side-panel {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--radar-border);
  border-radius: 18px;
  box-shadow: var(--radar-shadow);
}

.side-panel h2 {
  margin: 0 0 12px;
  color: var(--radar-navy);
  font-size: 1.22rem;
}

.decision-verdict {
  margin: 0;
  padding: 13px;
  text-align: center;
  border-radius: 12px;
  font-size: 1.28rem;
  font-weight: 950;
}

.decision-verdict.is-call {
  color: #991b1b;
  background: #fef2f2;
}

.decision-verdict.is-put {
  color: #0c4a6e;
  background: #eff6ff;
}

.decision-verdict.is-neutral {
  color: #334155;
  background: #f1f5f9;
}

.decision-verdict.is-unavailable {
  color: #7c2d12;
  background: #fff7ed;
}

.decision-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 12px 0;
}

.decision-counts div {
  padding: 8px 4px;
  text-align: center;
  background: #f8fafc;
  border-radius: 9px;
}

.decision-counts span,
.decision-counts strong {
  display: block;
}

.decision-counts span {
  color: var(--radar-muted);
  font-size: .66rem;
}

.decision-reason {
  margin: 10px 0;
  color: var(--radar-muted);
  font-size: .84rem;
}

.decision-missing {
  margin: 10px 0 0;
  padding: 9px 10px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 9px;
  font-size: .74rem;
  font-weight: 800;
}

.decision-metrics,
.market-clocks {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.decision-metrics li,
.market-clocks li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #e2e8f0;
  font-size: .78rem;
}

.decision-metrics strong,
.market-clocks strong {
  text-align: right;
}

.research-note {
  margin: 14px 0 0;
  padding-top: 12px;
  color: #9a3412;
  border-top: 1px solid #fed7aa;
  font-size: .74rem;
  font-weight: 800;
}

.next-market {
  margin: 12px 0 0;
  padding: 10px;
  color: #7c2d12;
  background: #fff7ed;
  border-radius: 9px;
  font-size: .8rem;
  font-weight: 900;
}

.comparison-chart {
  min-height: 300px;
  padding: 12px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--radar-border);
  border-radius: 14px;
}

.comparison-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.comparison-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  font-size: .74rem;
}

.comparison-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.comparison-legend i {
  width: 13px;
  height: 3px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 230px;
  margin: 0;
  padding: 20px;
  color: var(--radar-muted);
  text-align: center;
}

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

.data-status-section > summary {
  cursor: pointer;
  color: var(--radar-navy);
  font-size: 1.05rem;
  font-weight: 900;
}

.data-status-section[open] > summary {
  margin-bottom: 22px;
}

.data-status-section .status-subsection {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--radar-border);
}

.event-item {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 2fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--radar-border);
  border-left: 4px solid var(--radar-orange);
  border-radius: 10px;
}

.event-item time {
  color: var(--radar-navy);
  font-size: .78rem;
  font-weight: 900;
}

.event-item strong,
.event-item span {
  display: block;
}

.event-item span,
.event-item a {
  color: var(--radar-muted);
  font-size: .72rem;
}

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

.source-grid article {
  padding: 15px;
  background: #f8fafc;
  border: 1px solid var(--radar-border);
  border-radius: 12px;
}

.source-grid h3 {
  margin: 0 0 6px;
  font-size: .9rem;
}

.source-grid p {
  margin: 0;
  color: var(--radar-muted);
  font-size: .77rem;
}

.radar-footer {
  margin-top: 36px;
  padding: 30px 16px;
  color: #cbd5e1;
  text-align: center;
  background: #0f172a;
}

.radar-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-bottom: 9px;
}

.radar-footer a {
  font-size: .82rem;
  font-weight: 800;
}

.radar-footer p {
  margin: 5px 0;
  font-size: .76rem;
}

@media (max-width: 1100px) {
  .detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .radar-workspace {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr);
  }
}

@media (max-width: 860px) {
  .radar-hero__panel,
  .radar-workspace {
    grid-template-columns: 1fr;
  }

  .radar-clock {
    min-width: 0;
    text-align: left;
  }

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

  .workspace-side {
    position: static;
  }

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

  .tv-chart {
    height: 520px;
  }
}

@media (max-width: 600px) {
  .radar-topbar__inner,
  .radar-shell {
    width: min(100% - 20px, 1380px);
  }

  .radar-topbar__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .radar-nav {
    justify-content: flex-start;
  }

  .radar-hero {
    padding-top: 18px;
  }

  .radar-hero__panel,
  .radar-section {
    border-radius: 16px;
  }

  .radar-hero__panel {
    gap: 18px;
  }

  .section-heading {
    display: block;
  }

  .data-refresh {
    display: inline-block;
    margin-top: 9px;
  }

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

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

  .quote-card--major {
    min-height: 268px;
    padding: 12px;
  }

  .quote-card--major h3 {
    min-height: 2.7em;
    font-size: .8rem;
  }

  .quote-card__head {
    display: block;
  }

  .quote-card__state {
    display: inline-block;
    margin-top: 5px;
  }

  .quote-card--major .quote-card__value {
    font-size: 1.28rem;
  }

  .quote-card__range {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .chart-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-controls select {
    width: 100%;
  }

  .interval-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .interval-buttons button {
    padding-inline: 3px;
    font-size: .72rem;
  }

  .tv-chart {
    height: 440px;
  }

  .event-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 360px) {
  .radar-brand span {
    font-size: .84rem;
  }

  .quote-card--major {
    min-height: 280px;
    padding: 10px;
  }

  .quote-card__meta,
  .quote-card__source {
    font-size: .62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
