:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #f8f9fb;
  --text: #1a1a1a;
  --text-2: #333333;
  --muted: #6b7280;
  --line: #e0e0e0;
  --line-soft: #eceff3;
  --accent: #0044cc;
  --accent-dark: #00369f;
  --accent-soft: #eef4ff;
  --cta-red: #d90000;
  --cta-red-dark: #b60000;
  --cta-red-soft: #fff0f0;
  --danger: #d93025;
  --success: #168447;
  --radius: 20px;
  --shadow: 0 16px 44px rgba(23, 43, 77, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }

.page-shell { overflow: clip; min-height: 100vh; background: var(--bg); }
.container { width: min(100% - 32px, 1120px); margin-inline: auto; }
.section-pad { padding: 72px 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(100% - 24px, 1120px);
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; letter-spacing: .015em; color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: #fff; box-shadow: 0 7px 18px rgba(0,68,204,.18);
}
.brand-mark svg { width: 24px; height: 24px; }
.desktop-nav { display: none; }

.btn {
  border: 0;
  border-radius: 12px;
  min-height: 50px;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-primary { color: #fff; background: var(--cta-red); box-shadow: 0 10px 26px rgba(217,0,0,.24); }
.btn-primary:hover { background: var(--cta-red-dark); }
.btn-secondary { color: #fff; background: var(--cta-red); border: 1px solid var(--cta-red); box-shadow: 0 10px 26px rgba(217,0,0,.20); }
.btn-secondary:hover { background: var(--cta-red-dark); border-color: var(--cta-red-dark); }
.btn-compact { min-height: 42px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-wide { width: 100%; }
.line-btn-icon { width: 22px; height: 22px; flex: 0 0 22px; object-fit: contain; border-radius: 6px; }
.btn-compact .line-btn-icon { width: 19px; height: 19px; flex-basis: 19px; border-radius: 5px; }

.hero { position: relative; padding-top: 52px; background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%); border-bottom: 1px solid var(--line-soft); }
.hero-orb { position: absolute; border-radius: 999px; pointer-events: none; opacity: .8; }
.hero-orb-one { width: 280px; height: 280px; background: radial-gradient(circle, rgba(0,68,204,.09), transparent 70%); top: -60px; right: -100px; }
.hero-orb-two { width: 220px; height: 220px; background: radial-gradient(circle, rgba(0,68,204,.06), transparent 70%); bottom: 0; left: -110px; }
.hero-grid { display: grid; gap: 42px; align-items: center; position: relative; z-index: 1; }
.eyebrow, .section-kicker {
  display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(0,68,204,.09); }
.hero h1 { margin: 16px 0 18px; font-size: clamp(38px, 11vw, 72px); line-height: 1.06; letter-spacing: -.045em; color: var(--text); }
.hero-lead { margin: 0; color: var(--text-2); font-size: 16px; max-width: 650px; }

.search-panel { margin-top: 30px; padding: 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.search-panel label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; margin: 0 0 8px 4px; }
.search-row { display: grid; grid-template-columns: 1fr 52px; gap: 8px; }
.search-row input {
  width: 100%; min-width: 0; height: 54px; border: 1px solid #d7dce3; outline: 0; border-radius: 12px; padding: 0 15px;
  color: var(--text); background: #fff;
}
.search-row input::placeholder { color: #9aa1ab; }
.search-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,68,204,.08); }
.search-submit { border: 0; border-radius: 12px; background: var(--cta-red); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 20px rgba(217,0,0,.18); }
.search-submit svg { width: 24px; height: 24px; }
.quick-symbols { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.quick-symbols button { border: 1px solid var(--cta-red); background: var(--cta-red); color: #fff; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }

.search-submit:hover,
.quick-symbols button:hover,
.modal-close:hover {
  background: var(--cta-red-dark);
  border-color: var(--cta-red-dark);
}

.hero-notes { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-notes div { min-width: 0; padding: 12px 10px; border-left: 2px solid var(--accent); background: #f8f9fb; }
.hero-notes strong, .hero-notes span { display: block; }
.hero-notes strong { font-size: 12px; color: var(--text); }
.hero-notes span { color: var(--muted); font-size: 10px; margin-top: 2px; }

.hero-visual { display: none; }
.phone-card {
  width: min(100%, 390px); margin-inline: auto; border-radius: 30px; padding: 24px; position: relative;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 32px 72px rgba(23,43,77,.14);
}
.phone-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid #eef0f3; border-radius: 24px; pointer-events: none; }
.phone-topline { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.phone-topline span:last-child { color: var(--accent); font-weight: 800; }
.phone-company { margin-top: 38px; font-weight: 800; color: var(--text); }
.phone-company span { color: var(--muted); font-size: 12px; margin-left: 5px; }
.phone-price { font-size: 42px; font-weight: 900; letter-spacing: -.04em; margin-top: 8px; color: var(--text); }
.phone-change { font-size: 14px; font-weight: 800; }
.down { color: var(--danger); }
.up { color: var(--success); }
.hero-chart { width: 100%; height: 155px; margin-top: 20px; }
.insight-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; }
.insight-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.insight-card b { font-size: 13px; color: var(--text); }
.insight-card p { margin: 1px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }

.market-section { padding: 34px 0 48px; background: #fff; }
.section-heading { margin-bottom: 28px; }
.section-heading h2 { margin: 8px 0 8px; font-size: clamp(28px, 8vw, 44px); letter-spacing: -.035em; line-height: 1.12; color: var(--text); }
.section-heading p { margin: 0; color: var(--muted); max-width: 700px; }
.compact-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.compact-heading h2 { margin-bottom: 0; }
.market-meta { display: flex; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.market-meta span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); }

/* Robust transform-based market marquee. JS moves .market-track continuously. */
.market-strip {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 2px 0 10px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
}
.market-strip:active { cursor: grabbing; }
.market-track { display: flex; width: max-content; will-change: transform; transform: translate3d(0,0,0); }
.market-group { display: flex; gap: 12px; flex: none; padding-right: 12px; }
.market-card {
  flex: 0 0 clamp(216px, 74vw, 270px);
  border-radius: 16px; padding: 16px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(23,43,77,.06);
}
.market-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.market-card-head b { font-size: 14px; color: var(--text); }
.market-code { color: var(--muted); font-size: 11px; }
.market-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; }
.market-price { font-size: 24px; font-weight: 900; letter-spacing: -.03em; color: var(--text); }
.market-change { font-size: 12px; font-weight: 900; }
.market-card-foot { margin-top: 8px; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.market-slider-hint { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 10px; letter-spacing: .04em; margin: 6px 0 0; user-select: none; }
.market-slider-hint span:first-child, .market-slider-hint span:last-child { color: var(--accent); font-size: 14px; }
.data-disclosure { color: var(--muted); font-size: 10px; margin: 8px 2px 0; }

.soft-section { background: var(--bg-soft); border-block: 1px solid var(--line); }
.feature-grid { display: grid; gap: 14px; }
.feature-card { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(23,43,77,.04); }
.feature-card.featured { background: #f7faff; border-color: #bfd0f4; }
.icon-box { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-weight: 900; font-size: 12px; }
.feature-card h3 { margin: 18px 0 8px; font-size: 20px; color: var(--text); }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; }
.feature-tag { display: inline-block; margin-top: 18px; padding: 6px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 800; }

.analysis-section { background: #fff; }
.analysis-grid { display: grid; gap: 34px; align-items: center; }
.analysis-copy h2 { margin: 8px 0 15px; font-size: clamp(30px, 9vw, 48px); line-height: 1.08; letter-spacing: -.04em; color: var(--text); }
.analysis-copy > p { color: var(--muted); margin: 0; }
.check-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.check-list span { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--accent); font-size: 12px; }
.dashboard-demo { border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 18px; }
.dashboard-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.score-pill { color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 4px 8px; font-weight: 700; }
.dashboard-score-row { display: grid; grid-template-columns: 1.25fr .75fr; gap: 10px; margin-top: 22px; }
.dashboard-score-row > div { padding: 15px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); }
.dashboard-score-row small { display: block; color: var(--muted); font-size: 9px; }
.dashboard-score-row strong { display: block; margin-top: 4px; font-size: 24px; color: var(--text); }
.dashboard-score-row span { font-size: 10px; }
.mini-chart-wrap { color: var(--accent); padding: 18px 2px 6px; }
.mini-chart-wrap svg { width: 100%; height: 120px; }
.signal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.signal-grid div { padding: 12px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line-soft); }
.signal-grid span, .signal-grid b { display: block; }
.signal-grid span { color: var(--muted); font-size: 9px; }
.signal-grid b { margin-top: 2px; font-size: 12px; color: var(--text); }

.process-section { background: var(--bg-soft); border-block: 1px solid var(--line); }
.steps-grid { display: grid; gap: 10px; }
.step-item { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.step-item > span { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 900; }
.step-item b { display: block; font-size: 15px; }
.step-item p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.pricing-section { padding-top: 28px; background: #fff; }
.pricing-card { border-radius: 24px; padding: 26px; background: #f5f8ff; border: 1px solid #d8e2f5; display: grid; gap: 28px; }
.pricing-card h2 { margin: 7px 0 10px; font-size: clamp(30px, 9vw, 46px); line-height: 1.08; letter-spacing: -.035em; color: var(--text); }
.pricing-card p { margin: 0; color: var(--muted); }
.pricing-action { padding: 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); display: grid; gap: 9px; box-shadow: 0 8px 24px rgba(23,43,77,.05); }

.site-footer { margin-top: 70px; border-top: 1px solid var(--line); padding: 38px 0 100px; color: var(--muted); background: var(--bg-soft); }
.footer-inner { display: grid; gap: 28px; }
.footer-logo { color: var(--text); }
.footer-brand p { margin: 12px 0 0; font-size: 12px; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.footer-links a { text-decoration: none; font-size: 12px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; font-size: 10px; }
.footer-bottom p { margin: 4px 0; }

.mobile-sticky-cta { position: fixed; z-index: 25; left: 16px; right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); width: calc(100% - 32px); box-shadow: 0 15px 38px rgba(0,68,204,.25); }

.modal { position: fixed; inset: 0; z-index: 80; padding: 18px; display: none; align-items: center; justify-content: center; background: rgba(20,28,40,.42); backdrop-filter: blur(8px); }
.modal.is-open { display: flex; }
.modal-card { position: relative; width: min(100%, 430px); background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px 22px; box-shadow: 0 26px 80px rgba(23,43,77,.20); }
.modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--cta-red); background: var(--cta-red); color: #fff; font-size: 24px; cursor: pointer; }
.modal-kicker { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.modal-card h2 { margin: 8px 0; font-size: 28px; color: var(--text); }
.analysis-target { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: #edf0f4; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .28s ease; }
.progress-meta { display: flex; justify-content: space-between; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.progress-meta b { color: var(--text); }
.modal-success { text-align: center; }
.modal-success p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.success-check { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 28px; font-weight: 900; }

@media (min-width: 760px) {
  .container { width: min(100% - 48px, 1120px); }
  .section-pad { padding: 94px 0; }
  .desktop-nav { display: flex; gap: 26px; color: #555f6d; font-size: 13px; font-weight: 700; }
  .desktop-nav a { text-decoration: none; }
  .desktop-nav a:hover { color: var(--accent); }
  .btn-compact { min-height: 44px; padding-inline: 18px; font-size: 14px; }
  .hero { padding-top: 76px; }
  .hero-grid { grid-template-columns: 1.12fr .88fr; gap: 54px; }
  .hero-visual { display: block; }
  .hero-lead { font-size: 18px; }
  .search-panel { max-width: 620px; }
  .market-card { flex-basis: 270px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-card { padding: 26px; min-height: 270px; }
  .analysis-grid { grid-template-columns: .9fr 1.1fr; gap: 70px; }
  .analysis-copy .btn-wide { width: auto; min-width: 220px; }
  .dashboard-demo { padding: 28px; }
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .step-item { min-height: 130px; align-items: start; }
  .pricing-card { grid-template-columns: 1.2fr .8fr; padding: 44px; align-items: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; align-items: start; }
  .footer-links { grid-template-columns: repeat(3, 1fr); }
  .site-footer { padding-bottom: 46px; }
  .mobile-sticky-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Centered layout update */
main, .site-footer { text-align: center; }
.hero-copy,
.section-heading,
.analysis-copy,
.pricing-card > div,
.footer-brand,
.footer-bottom { text-align: center; }

.hero-lead,
.section-heading p,
.analysis-copy > p,
.pricing-card p,
.data-disclosure { margin-left: auto; margin-right: auto; }

.eyebrow,
.section-kicker { justify-content: center; }

.search-panel { margin-left: auto; margin-right: auto; }
.search-panel label { text-align: center; margin-left: 0; }
.quick-symbols { justify-content: center; }
.hero-notes { justify-content: center; }
.hero-notes div { text-align: center; border-left: 0; border-top: 2px solid var(--accent); }

.compact-heading { align-items: center; justify-content: center; flex-direction: column; }
.market-meta { justify-content: center; }
.market-card { text-align: center; }
.market-card-head,
.market-price-row,
.market-card-foot { justify-content: center; }
.market-card-head { flex-direction: column; gap: 2px; }
.market-price-row { flex-direction: column; gap: 2px; margin-top: 10px; }
.market-card-foot { flex-direction: column; gap: 2px; }

.feature-card { text-align: center; }
.icon-box { margin-left: auto; margin-right: auto; }

.check-list { justify-items: center; }
.check-list li { justify-content: center; }
.analysis-copy .btn-wide { margin-left: auto; margin-right: auto; }
.dashboard-demo { text-align: center; }
.dashboard-score-row > div { text-align: center; }
.signal-grid div { text-align: center; }

.step-item { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.step-item > span { margin: 0 auto; }

.pricing-action { justify-items: center; }
.pricing-action .btn-wide { max-width: 420px; }

.footer-inner { justify-items: center; text-align: center; }
.footer-logo { justify-content: center; }
.footer-links { width: min(100%, 620px); justify-items: center; }

.modal-card, .analysis-target, .progress-meta { text-align: center; }
.progress-meta { justify-content: center; }

.search-submit { width: 52px; height: 54px; }
.search-submit svg { width: 25px; height: 25px; }

@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .search-panel { max-width: 620px; }
  .analysis-copy .btn-wide { width: auto; }
  .step-item { grid-template-columns: 1fr; align-items: center; }
  .pricing-card { text-align: center; }
  .footer-inner { justify-items: center; }
}

/* Final centering pass */
.header-inner { justify-content: center; }
.desktop-nav { justify-content: center; }
.search-row input { text-align: center; }
.phone-topline { justify-content: center; gap: 18px; }
.phone-company, .phone-price, .phone-change { text-align: center; }
.insight-card { justify-content: center; text-align: center; }
.dashboard-top { justify-content: center; gap: 18px; }
.footer-links { text-align: center; }

/* Current-JST market status badge */
.market-closed {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border: 1px solid #E0E0E0;
  border-radius: 999px;
  background: #F5F6F8;
  color: #666666;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}
