:root {
  --navy: #171a4a;
  --purple: #7c5ce6;
  --purple-deep: #5941c9;
  --lavender: #f1ecff;
  --lavender-2: #faf7ff;
  --cream: #fffaf0;
  --surface: rgba(255, 255, 255, 0.88);
  --ink: #17172f;
  --muted: #707189;
  --line: #e2def7;
  --green: #129866;
  --green-bg: #e8f8f0;
  --red: #d95050;
  --red-bg: #ffeded;
  --yellow: #b77800;
  --yellow-bg: #fff3cb;
  --shadow: 0 22px 80px rgba(55, 45, 132, 0.14);
  --paper: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 18px 48px rgba(55, 45, 132, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 4%, rgba(124, 92, 230, 0.14), transparent 28rem),
    radial-gradient(circle at 92% 8%, rgba(255, 205, 117, 0.18), transparent 24rem),
    linear-gradient(180deg, #f7f7fb, #f7f8ff 42%, #fffaf4);
  color: var(--ink);
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 222, 247, 0.8);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(55, 45, 132, 0.08);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: var(--lavender);
  box-shadow: inset 0 0 0 2px rgba(124, 92, 230, 0.22);
}

.brand-mark {
  width: 44px;
  height: 44px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand small,
.eyebrow {
  display: block;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
}

.nav-links {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.nav-links a:hover {
  color: var(--purple);
  background: var(--lavender);
}

main {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

main > *,
.hero-copy,
.daily-pick-grid {
  min-width: 0;
}

.market-tape {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(120px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(55, 45, 132, 0.08);
}

.market-tape div {
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
}

.market-tape div:last-child {
  border-right: 0;
}

.market-tape span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.market-tape strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--navy);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.macro-digest {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(226, 222, 247, 0.96);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 226, 145, 0.34), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(244, 239, 255, 0.96));
  box-shadow: var(--paper);
}

.macro-digest[hidden] {
  display: none;
}

.macro-thumbnail {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: var(--lavender);
  box-shadow: 0 16px 36px rgba(37, 27, 90, 0.18);
}

.macro-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.macro-thumbnail span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 10px 15px;
  border-radius: 999px;
  color: #fff;
  background: rgba(31, 17, 71, 0.92);
  font-size: 13px;
  font-weight: 900;
}

.macro-digest-copy {
  min-width: 0;
}

.macro-digest-copy h2 {
  margin: 7px 0 8px;
  color: var(--navy);
  font-size: clamp(25px, 3.2vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.macro-details {
  margin-top: 12px;
}

.macro-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--purple-deep);
  background: rgba(124, 92, 230, 0.09);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

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

.macro-details > summary::after {
  content: "＋";
  font-size: 16px;
}

.macro-details[open] > summary::after {
  content: "−";
}

.macro-details-body {
  padding-top: 12px;
}

.macro-summary {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.macro-points {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.macro-points li {
  position: relative;
  padding-left: 17px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.macro-points li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  content: "";
}

.macro-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0;
}

.macro-context {
  padding: 11px 12px;
  border: 1px solid rgba(124, 92, 230, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.macro-context-wide {
  grid-column: 1 / -1;
}

.macro-context[hidden] {
  display: none;
}

.macro-context > span {
  color: var(--purple);
  font-size: 11px;
  font-weight: 900;
}

.macro-context > p {
  margin: 5px 0 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.macro-impacts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.macro-impacts span {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--purple-deep);
  background: rgba(124, 92, 230, 0.11);
  font-size: 12px;
  font-weight: 900;
}

.macro-digest-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.macro-digest-footer a {
  color: var(--purple);
  font-weight: 900;
}

.macro-digest.is-stale .macro-digest-footer > span {
  color: #9a6500;
}

.search-ad {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(100, 91, 133, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
}

.search-ad[hidden] {
  display: none;
}

.search-ad-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}

.search-ad-heading > span {
  padding: 3px 8px;
  border: 1px solid rgba(100, 91, 133, 0.2);
  border-radius: 999px;
  font-weight: 900;
}

.search-ad-unit {
  min-height: 90px;
  overflow: hidden;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 18px 8px 30px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
}

.site-footer a {
  color: var(--purple-deep);
  font-weight: 800;
}

.policy-page {
  max-width: 920px;
}

.policy-page main {
  display: block;
}

.policy-card {
  padding: clamp(22px, 5vw, 48px);
}

.policy-card h1 {
  margin: 8px 0 24px;
  color: var(--navy);
  font-size: clamp(28px, 5vw, 44px);
}

.policy-card h2 {
  margin: 28px 0 8px;
  color: var(--navy);
  font-size: 19px;
}

.policy-card p {
  color: var(--muted);
  line-height: 1.9;
}

.hero-copy,
.mascot-card,
.metric-strip,
.search-section,
.panel,
.story-section {
  border: 1px solid rgba(226, 222, 247, 0.92);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--paper);
}

.hero-copy {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 255, 0.94)),
    #fff;
}

.hero-copy h1 {
  margin: 10px 0;
  max-width: 760px;
  color: var(--navy);
  font-size: clamp(30px, 4.5vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-link,
.secondary-link,
.search-box > button {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.primary-link,
.search-box > button {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  box-shadow: 0 12px 26px rgba(124, 92, 230, 0.26);
}

.primary-link,
.secondary-link {
  padding: 13px 18px;
}

.secondary-link {
  color: var(--purple);
  background: var(--lavender);
}

.refresh-status {
  margin-top: 12px !important;
  font-size: 12px !important;
  font-weight: 800;
}

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

.daily-pick-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.daily-pick-card:hover,
.daily-pick-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(108, 75, 193, 0.46);
  box-shadow: 0 10px 22px rgba(55, 45, 132, 0.1);
  outline: none;
}

.daily-pick-card strong,
.daily-pick-card small {
  display: block;
}

.daily-pick-card strong {
  margin-top: 9px;
  color: var(--navy);
  font-size: 16px;
}

.daily-pick-card small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 900;
}

.daily-pick-card p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.pick-points {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.pick-points p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.pick-points span {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
}

.pick-pro span {
  color: #0a6b3b;
  background: #d8f3e3;
}

.pick-con span {
  color: #8a5a00;
  background: #fcefd0;
}

.market-overview .market-tape {
  box-shadow: none;
}

.market-overview .metric-strip {
  margin-top: 12px;
  box-shadow: none;
}

.mascot-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  align-items: center;
  overflow: hidden;
  padding: 14px 18px 14px 22px;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 222, 143, 0.42), transparent 9rem),
    linear-gradient(180deg, #fff, #f8f4ff);
}

.mascot-copy {
  position: relative;
  z-index: 1;
}

.mascot-card strong {
  display: block;
  margin: 10px 0;
  color: var(--navy);
  font-size: 19px;
  line-height: 1.45;
}

.mascot-card p {
  color: var(--muted);
  line-height: 1.75;
}

.mascot-guide {
  display: block;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(124, 92, 230, 0.16);
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(55, 45, 132, 0.12);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill-row span,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.pill-row span {
  color: var(--purple);
  background: var(--lavender);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  padding: 0;
}

.metric-strip article {
  padding: 18px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 255, 0.92));
}

.metric-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-strip strong {
  display: block;
  margin-top: 6px;
  color: var(--navy);
  font-size: 30px;
}

.section-title {
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 6px 0;
  color: var(--navy);
  font-size: 25px;
  letter-spacing: -0.04em;
}

.section-title p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.section-title.compact {
  margin-bottom: 14px;
}

.search-section,
.panel,
.story-section {
  padding: 24px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-combobox {
  position: relative;
  min-width: 0;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
  outline: none;
}

.search-box input:focus {
  border-color: rgba(124, 92, 230, 0.62);
  box-shadow: 0 0 0 4px rgba(124, 92, 230, 0.12);
}

.search-box > button {
  padding: 0 22px;
  cursor: pointer;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 30;
  overflow-y: auto;
  max-height: 380px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 48px rgba(55, 45, 132, 0.18);
}

.search-suggestions[hidden],
.recent-searches[hidden] {
  display: none;
}

.suggestion-heading {
  padding: 7px 9px 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.search-suggestion {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.search-suggestion:hover,
.search-suggestion:focus-visible,
.search-suggestion.active {
  color: var(--navy);
  background: var(--lavender);
  outline: none;
}

.search-suggestion > span:first-child {
  min-width: 0;
}

.search-suggestion strong,
.search-suggestion small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggestion strong {
  font-size: 14px;
}

.search-suggestion small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.suggestion-price {
  flex: 0 0 auto;
  color: var(--purple-deep);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.suggestion-empty {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.search-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.recent-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.recent-searches > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.recent-searches > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recent-searches button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.recent-searches [data-open-code] {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--lavender);
}

.recent-searches [data-open-code]:hover,
.recent-searches [data-open-code]:focus-visible {
  box-shadow: 0 0 0 3px rgba(124, 92, 230, 0.13);
  outline: none;
}

.recent-searches [data-open-code] strong {
  font-size: 11px;
}

.recent-searches [data-open-code] small {
  color: var(--muted);
  font-size: 10px;
}

.clear-search-history {
  padding: 5px 6px;
  color: var(--muted);
  background: transparent;
  font-size: 10px !important;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.search-empty-state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--lavender-2);
}

.search-empty-state > strong {
  color: var(--navy);
}

.search-empty-state > p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.nearby-stocks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}

.nearby-stocks > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.nearby-stocks button {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--purple-deep);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
}

.result-card {
  margin-top: 16px;
  min-width: 0;
  max-width: 100%;
}

.stock-card,
.story-card,
.candidate-card,
.sector-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 253, 249, 0.96));
  box-shadow: 0 10px 28px rgba(55, 45, 132, 0.06);
}

.story-link {
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.story-link:hover {
  transform: translateY(-2px);
  border-color: rgba(55, 45, 132, 0.35);
  box-shadow: 0 14px 32px rgba(55, 45, 132, 0.12);
}

.story-link:focus-visible {
  outline: 2px solid rgba(55, 45, 132, 0.6);
  outline-offset: 2px;
}

.business-summary {
  margin: 12px 0 4px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(108, 92, 231, 0.06);
  border: 1px solid rgba(108, 92, 231, 0.16);
}

.business-summary h5 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.business-summary p {
  margin: 0 0 6px;
  line-height: 1.7;
  font-size: 0.92rem;
  white-space: pre-wrap;
}

.business-summary small {
  display: block;
  color: #6b6480;
  font-size: 0.78rem;
}

.source-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--purple-deep);
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.risk-list li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.risk-list li strong {
  display: block;
  font-size: 0.92rem;
}

.risk-list li small {
  display: block;
  color: #6b6480;
  font-size: 0.8rem;
}

.stock-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: 16px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 18px;
}

.stock-main,
.stock-side,
.quote-head > div {
  min-width: 0;
  max-width: 100%;
}

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

.stock-main h2 {
  color: var(--navy);
  font-size: 28px;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stock-main .meta {
  margin: 6px 0 14px;
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stock-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin: 12px 0 10px;
}

.stock-price strong {
  color: var(--navy);
  font-size: 36px;
  letter-spacing: -0.04em;
}

.price-change {
  font-size: 18px;
  font-weight: 900;
}

.price-change.good {
  color: var(--green);
}

.price-change.bad {
  color: var(--red);
}

.price-change.watch {
  color: var(--yellow);
}

.quote-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.quote-detail-grid div {
  min-width: 0;
  padding: 10px 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.quote-detail-grid div:nth-child(3n) {
  border-right: 0;
}

.quote-detail-grid div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.quote-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.quote-detail-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stock-note {
  color: var(--muted);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.stock-side {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  border-radius: 18px;
  background: rgba(243, 239, 255, 0.72);
}

.stock-side h3 {
  color: var(--navy);
  font-size: 16px;
}

.technical-grid {
  display: grid;
  gap: 8px;
}

.technical-grid div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  min-width: 0;
}

.technical-grid span,
.technical-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  text-align: right;
}

.technical-grid span {
  color: var(--muted);
  text-align: left;
}

/* 詳細シート全体の枠。flex 縦並びにすることで中の固定ナビが全区間スティックする
   （旧構成では .stock-detail がグリッドで、ナビが1セルに閉じ込められスマホで効かなかった） */
.stock-dossier {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 1 / -1;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d9d0ef;
  border-radius: 20px;
  background: #fcfbff;
}

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

.dossier-header {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid #d9d0ef;
  border-radius: 16px;
  background: linear-gradient(105deg, #fff 0%, #f7f2ff 100%);
}

.dossier-header img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 16px;
}

.dossier-header p,
.dossier-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dossier-header h3 {
  margin: 2px 0 4px;
  color: var(--navy);
  font-size: clamp(22px, 3vw, 32px);
}

.dossier-header > strong {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--purple);
  background: var(--lavender);
  font-size: 12px;
}

.dossier-section {
  min-width: 0;
  padding: 0 14px 14px;
  overflow: hidden;
  border: 1px solid #ddd5ee;
  border-radius: 16px;
  background: #fff;
}

.dossier-section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0 -14px 12px;
  padding: 7px 12px;
  color: #332066;
  background: #f0eaff;
  border-bottom: 1px solid #ddd5ee;
  scroll-margin-top: 64px;
}

/* 詳細シートの固定セクションナビ（スマホの長尺シートを行き来しやすく） */
.detail-section-nav {
  position: sticky;
  top: 6px;
  z-index: 40;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #ddd5ee;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(55, 45, 132, 0.1);
}

.detail-section-nav::-webkit-scrollbar {
  display: none;
}

.detail-section-nav a {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f0eaff;
  color: #4a3a8c;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.detail-section-nav a.is-active {
  background: var(--purple);
  color: #fff;
}

.dossier-section-heading > span {
  padding: 3px 7px;
  border-radius: 7px;
  color: #fff;
  background: var(--purple);
  font-size: 11px;
  font-weight: 900;
}

.dossier-section-heading h4 {
  font-size: 15px;
}

.dossier-section-heading small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.dossier-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  background: #fff9e8;
}

.dossier-summary strong {
  color: var(--navy);
  font-size: 12px;
}

.dossier-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.detail-panel {
  min-width: 0;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.detail-panel h4 {
  color: var(--navy);
  font-size: 16px;
}

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

.detail-heading p,
.method-note {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.detail-heading > span,
.momentum-label {
  flex: none;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--purple);
  background: var(--lavender);
  font-size: 11px;
  font-weight: 900;
}

.chart-panel canvas {
  display: block;
  width: 100%;
  min-width: 0;
  height: 360px;
  margin-top: 10px;
  border-radius: 14px;
  background: #fff;
}

.chart-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.chart-stat-grid div {
  min-width: 0;
  padding: 8px;
  border-radius: 10px;
  background: #f8f6ff;
}

.chart-stat-grid span,
.chart-stat-grid strong {
  display: block;
}

.chart-stat-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.chart-stat-grid strong {
  overflow: hidden;
  margin-top: 3px;
  color: var(--navy);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.chart-key span::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 3px;
  margin-right: 4px;
  border-radius: 2px;
  background: #8d879b;
  vertical-align: middle;
}

.chart-key .ma5::before { background: #e39a25; }
.chart-key .ma25::before { background: #4b75c9; }
.chart-key .ma75::before { background: #8b62c7; }
}

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

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

.company-grid div {
  min-width: 0;
  padding: 9px;
  border-radius: 12px;
  background: #f8f6ff;
}

.company-grid span,
.company-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.company-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.company-grid strong {
  margin-top: 3px;
  color: var(--navy);
  font-size: 12px;
}

.ir-panel {
  grid-column: auto;
}

.scenario-panel {
  grid-column: 1 / -1;
}

.dossier-pills {
  margin-bottom: 10px;
}

.evidence-list,
.risk-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
}

.risk-panel {
  border-color: #ebd3d3;
  background: #fffdfd;
}

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

.scenario-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.scenario-card strong {
  font-size: 13px;
}

.scenario-card p {
  margin-top: 6px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.55;
}

.scenario-card.good strong { color: var(--green); }
.scenario-card.watch strong { color: #a96900; }
.scenario-card.bad strong { color: var(--red); }
}

.financial-grid div {
  min-width: 0;
  padding: 9px;
  border-radius: 12px;
  background: #f8f6ff;
}

.financial-grid span,
.financial-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.financial-grid strong {
  display: block;
  margin: 3px 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 13px;
}

.driver-list {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.ir-list {
  display: grid;
  gap: 2px;
}

.ir-list a {
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px 0;
  color: inherit;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.ir-list a:last-child {
  border-bottom: 0;
}

.ir-list time,
.ir-list span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.ir-list strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-loading {
  grid-column: 1 / -1;
  padding: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.badge.good {
  color: var(--green);
  background: var(--green-bg);
}

.badge.bad {
  color: var(--red);
  background: var(--red-bg);
}

.badge.watch {
  color: var(--yellow);
  background: var(--yellow-bg);
}

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

.story-card,
.candidate-card,
.sector-card {
  padding: 14px;
}

.story-card strong,
.candidate-card strong,
.sector-card strong {
  display: block;
  margin: 10px 0 8px;
  color: var(--navy);
  font-size: 17px;
}

.story-card p,
.candidate-card p,
.sector-card p,
.empty-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.card-list {
  display: grid;
  gap: 12px;
}

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

.candidate-card {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.candidate-card:hover,
.candidate-card:focus-visible {
  border-color: rgba(124, 92, 230, 0.55);
  box-shadow: 0 14px 30px rgba(55, 45, 132, 0.12);
  transform: translateY(-2px);
  outline: none;
}

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

.lane-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

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

.lane-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

.lane-title strong {
  color: var(--purple);
  font-size: 12px;
}

.alert-row {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.alert-row:last-child {
  border-bottom: 0;
}

.row-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--navy);
  font-weight: 900;
}

.row-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.alert-link {
  display: block;
  width: 100%;
  border: 0;
  color: inherit;
  background: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.alert-link:hover,
.alert-link:focus-visible {
  background: var(--lavender);
  outline: none;
}

/* 検知レーンの折りたたみ: 既定は上位3件のみ、展開で全件表示 */
.lane-row-hidden {
  display: none;
}

.lane-expanded .lane-row-hidden {
  display: block;
}

.lane-more {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #faf8ff;
  color: var(--purple);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.lane-more:hover,
.lane-more:focus-visible {
  background: var(--lavender);
  outline: none;
}

/* 検知レーンの絞り込みバー */
.lane-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf8ff;
  font-size: 12px;
  font-weight: 700;
}

.lane-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.lane-filters select {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
}

.lane-filter-seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}

.lane-filter-seg button {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 800;
  color: var(--navy);
  cursor: pointer;
}

.lane-filter-seg button.is-active {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

.lane-filter-check {
  cursor: pointer;
}

/* エントリー窓の状態バッジ（本日新規／N日目／失効理由） */
.lane-window {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  vertical-align: middle;
}

.lane-window.is-new {
  color: #0a6b3b;
  background: #d8f3e3;
}

.lane-window.is-active {
  color: #4a3a8c;
  background: #ece6ff;
}

.lane-window.is-expired {
  color: #8a1f2c;
  background: #fbe0e4;
}

.lane-row-expired {
  opacity: 0.6;
}

.hidden {
  display: none;
}

/* データ鮮度ラベル（最新／N営業日前／対象外・取得失敗） */
.freshness {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}

.freshness.good { color: #0a6b3b; background: #d8f3e3; }
.freshness.watch { color: #8a5a00; background: #fcefd0; }
.freshness.bad { color: #8a1f2c; background: #fbe0e4; }

/* 会社説明の3行クランプ＋続きを読む */
.company-summary.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.company-summary.clamp.expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.readmore {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--purple);
  font: inherit;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.readmore:hover,
.readmore:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* ベータテスト版バナー: PCは詳細版、スマホは1行の短縮版 */
.alpha-short {
  display: none;
}

/* 銘柄比較 */
.dossier-actions {
  display: flex;
  gap: 8px;
}

.compare-toggle {
  padding: 7px 14px;
  border: 1px solid var(--purple);
  border-radius: 999px;
  background: #fff;
  color: var(--purple);
  font: inherit;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.compare-toggle:hover,
.compare-toggle:focus-visible {
  background: var(--lavender);
  outline: none;
}

.compare-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 10px 28px rgba(55, 45, 132, 0.35);
  cursor: pointer;
}

.compare-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 12, 50, 0.45);
}

/* hidden 属性を確実に効かせる（display 指定が [hidden] の display:none を上書きするため） */
.compare-overlay[hidden],
.compare-fab[hidden] {
  display: none;
}

.compare-panel {
  width: 100%;
  max-width: 980px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(20, 12, 50, 0.3);
}

@media (min-width: 700px) {
  .compare-overlay { align-items: center; }
  .compare-panel { border-radius: 20px; }
}

.compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.compare-head strong {
  font-size: 16px;
  color: var(--navy);
}

.compare-close {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.compare-body {
  padding: 12px 16px 18px;
  overflow: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.compare-table th,
.compare-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.compare-table thead th {
  text-align: center;
  vertical-align: top;
  background: #f7f4ff;
}

.compare-table tbody th[scope="row"] {
  position: sticky;
  left: 0;
  text-align: left;
  color: var(--muted);
  font-weight: 800;
  background: #fff;
}

.compare-col-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.compare-remove {
  align-self: flex-end;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: var(--lavender);
  color: var(--purple);
  font-weight: 900;
  cursor: pointer;
}

.compare-detail-link {
  color: var(--purple);
  font-weight: 800;
  font-size: 11px;
  text-decoration: none;
}

/* マイプラン */
.plan-save {
  width: 100%;
  margin-top: 10px;
  padding: 9px 14px;
  border: 1px solid var(--purple);
  border-radius: 12px;
  background: #f3eeff;
  color: var(--purple);
  font: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.plan-save:hover,
.plan-save:focus-visible {
  background: var(--lavender);
  outline: none;
}

.plan-fab {
  position: fixed;
  right: 16px;
  bottom: 64px;
  z-index: 60;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #2b1a66;
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 10px 28px rgba(43, 26, 102, 0.35);
  cursor: pointer;
}

.plan-fab[hidden] {
  display: none;
}

.plan-card {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfbff;
}

.plan-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.plan-card-head strong {
  color: var(--navy);
  font-size: 15px;
}

.plan-card .badge {
  margin-bottom: 10px;
}

.plan-remove {
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.detail-page main {
  gap: 12px;
}

.detail-nav {
  position: sticky;
  top: 6px;
  z-index: 10;
}

.detail-brand-copy {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, auto) auto;
  column-gap: 9px;
  align-items: center;
}

.detail-brand-copy small {
  grid-column: 1 / -1;
}

.detail-brand-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-stock-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--purple-deep);
  background: var(--lavender);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.back-link {
  padding: 9px 13px;
  border: 1px solid #d9d0ef;
  border-radius: 999px;
  color: var(--purple);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.detail-page-intro {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.detail-page-intro h1 {
  margin: 2px 0 4px;
  color: var(--navy);
  font-size: 26px;
}

.detail-page-intro > p:last-child {
  color: var(--muted);
  font-size: 13px;
}

.detail-page-result {
  padding: 0;
  border: 0;
  background: transparent;
}

body[data-page="stock-detail"] .stock-main,
body[data-page="stock-detail"] .stock-side {
  display: none;
}

body[data-page="stock-detail"] .stock-card {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 980px) {
  .macro-digest {
    grid-template-columns: minmax(230px, 0.8fr) minmax(0, 1fr);
  }

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

  .story-grid,
  .sector-grid,
  .candidate-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .stock-card {
    grid-template-columns: 1fr;
  }

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

  .ir-panel,
  .scenario-panel {
    grid-column: auto;
  }

  .lane-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

@media (max-width: 620px) {
  .alpha-banner {
    font-size: 11px !important;
    padding: 6px 10px !important;
    line-height: 1.35 !important;
  }

  .alpha-full {
    display: none;
  }

  .alpha-short {
    display: inline;
  }

  .page {
    width: min(100% - 10px, 1180px);
    padding-top: 6px;
  }

  .top-nav {
    align-items: flex-start;
    border-radius: 16px;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .detail-nav {
    flex-direction: row;
    align-items: center;
  }

  .detail-nav .brand small {
    display: none;
  }

  .detail-nav .brand strong {
    font-size: 13px;
  }

  .detail-nav .brand {
    min-width: 0;
  }

  .detail-brand-copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .detail-stock-close {
    justify-self: start;
    padding: 2px 6px;
    font-size: 10px;
  }

  .detail-page-intro {
    padding: 13px;
  }

  .detail-page-intro h1 {
    font-size: 21px;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 12px;
  }

  main {
    gap: 12px;
    padding-top: 12px;
  }

  .market-tape {
    order: 1;
    grid-template-columns: repeat(4, minmax(112px, 1fr));
    overflow-x: auto;
    border-radius: 16px;
    scrollbar-width: none;
  }

  .market-tape::-webkit-scrollbar {
    display: none;
  }

  .market-tape div {
    padding: 10px 12px;
  }

  .hero {
    order: 1;
    gap: 10px;
  }

  .macro-digest {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
  }

  .macro-thumbnail {
    border-radius: 15px;
  }

  .macro-digest-copy h2 {
    font-size: 23px;
  }

  .macro-summary {
    font-size: 13px;
    line-height: 1.65;
  }

  .macro-points {
    margin: 10px 0;
  }

  .macro-points li {
    font-size: 13px;
  }

  .macro-context-grid {
    grid-template-columns: 1fr;
  }

  .search-ad {
    padding: 12px;
    border-radius: 14px;
  }

  .search-ad-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 6px;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .search-section {
    order: -1;
  }

  /* スマホはヘッダー直下にコンパクト検索を置く（既知銘柄をすぐ調べられる） */
  #search .section-title > p:last-child {
    display: none;
  }

  #search .section-title {
    margin-bottom: 10px;
  }

  .market-overview {
    order: 3;
  }

  #candidates {
    order: 4;
  }

  .panel.soft {
    order: 5;
  }

  .detection-panel {
    order: 6;
  }

  .hero-copy,
  .mascot-card,
  .search-section,
  .panel,
  .story-section {
    border-radius: 18px;
    padding: 14px;
  }

  .hero-copy h1 {
    font-size: 24px;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
  }

  .hero-copy p {
    font-size: 13px;
    line-height: 1.65;
  }

  .hero-actions {
    margin-top: 14px;
  }

  .daily-pick-grid {
    grid-template-columns: 1fr;
  }

  .daily-pick-card {
    padding: 12px;
  }

  .primary-link,
  .secondary-link {
    padding: 10px 13px;
    font-size: 13px;
  }

  .mascot-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    padding: 13px 10px 13px 14px;
  }

  .mascot-guide {
    width: 112px;
    height: 112px;
    border-radius: 20px;
  }

  .mascot-card strong {
    font-size: 17px;
  }

  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
    border-radius: 18px;
  }

  .metric-strip article {
    padding: 12px;
  }

  .metric-strip strong {
    font-size: 24px;
  }

  .section-title {
    margin-bottom: 12px;
  }

  .section-title h2 {
    font-size: 21px;
  }

  .section-title p:not(.eyebrow) {
    font-size: 12px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .search-box > button {
    min-height: 48px;
  }

  .search-suggestions {
    position: static;
    max-height: 310px;
    margin-top: 7px;
  }

  .search-suggestion {
    min-height: 54px;
    padding: 8px;
  }

  .search-suggestion strong {
    font-size: 13px;
  }

  .suggestion-price {
    font-size: 11px;
  }

  .recent-searches {
    align-items: flex-start;
  }

  .story-grid,
  .sector-grid,
  .candidate-list,
  .lane-grid {
    grid-template-columns: 1fr;
  }

  .stock-card {
    gap: 12px;
    overflow: hidden;
    padding: 13px;
    border-radius: 18px;
  }

  .stock-side {
    padding: 12px;
  }

  .detail-panel {
    padding: 12px;
  }

  .stock-dossier {
    gap: 9px;
    padding: 8px;
    border-radius: 16px;
  }

  .stock-detail {
    gap: 9px;
  }

  .dossier-header {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .dossier-header img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
  }

  .dossier-header h3 {
    font-size: 20px;
  }

  .dossier-header > strong {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .dossier-section {
    padding: 0 11px 11px;
    border-radius: 13px;
  }

  .dossier-section-heading {
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin: 0 -11px 10px;
    padding: 7px 9px;
  }

  .dossier-section-heading small {
    max-width: 128px;
    font-size: 9px;
    text-align: right;
  }

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

  .chart-panel canvas {
    height: 330px;
  }

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

  .ir-list a {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .ir-list a span {
    display: none;
  }

  .quote-head {
    gap: 8px;
  }

  .stock-main h2 {
    font-size: 22px;
  }

  .stock-price strong {
    font-size: 34px;
  }

  .price-change {
    font-size: 16px;
  }

  .quote-detail-grid {
    grid-template-columns: repeat(2, 1fr);
    border-radius: 14px;
  }

  .quote-detail-grid div:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .quote-detail-grid div:nth-child(2n) {
    border-right: 0;
  }

  .quote-detail-grid div:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .quote-detail-grid div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .stock-note,
  .story-card p,
  .candidate-card p,
  .sector-card p,
  .empty-note {
    font-size: 12px;
    line-height: 1.6;
  }
}
