:root {
  color-scheme: light;
  --text: #1f2b35;
  --muted: #6b625b;
  --paper: #f3eadc;
  --card: rgba(255, 250, 239, 0.84);
  --line: rgba(39, 30, 22, 0.14);
  --accent: #b45f42;
  --accent-soft: rgba(180, 95, 66, 0.14);
  --shadow: 0 10px 24px rgba(39, 30, 22, 0.12);
  --radius: 4px;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--paper);
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

p {
  line-height: 1.9;
}

.report-page {
  padding: 14px 10px 44px;
}

.report-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  position: relative;
  padding: 10px;
}

.report-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  pointer-events: none;
  opacity: 0.52;
}

.report-cover,
.type-card,
.snapshot-card,
.flow-card,
.report-section,
.action-card,
.revisit-card,
.next-card,
.end-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.report-cover::after,
.type-card::after,
.flow-card::after,
.report-section::after,
.action-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--ornament-line, rgba(255, 255, 255, 0.2));
  border-radius: 6px;
  pointer-events: none;
  opacity: 0.55;
}

.report-cover {
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: clamp(28px, 8vw, 62px) clamp(20px, 6vw, 52px);
}

.cover-ornament-image {
  position: absolute;
  right: 18px;
  top: 18px;
  width: min(42vw, 220px);
  max-height: 120px;
  object-fit: contain;
  opacity: 0.62;
  pointer-events: none;
}

.opening-intro {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--intro-bg, var(--paper));
  pointer-events: none;
  opacity: 1;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.opening-intro span {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 250, 239, 0.78);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.opening-intro span::before {
  content: "";
  position: absolute;
  width: 26px;
  height: 10px;
  left: -8px;
  top: -4px;
  border-radius: 999px;
  background: var(--accent-soft);
  transform: rotate(-14deg);
}

.is-loaded .opening-intro {
  visibility: hidden;
  opacity: 0;
}

.report-kicker,
.section-number {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.report-cover h1 {
  font-size: clamp(2rem, 11vw, 4.8rem);
  line-height: 1.15;
  font-weight: 800;
}

.report-main-hook {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 6vw, 30px);
  background: var(--accent-soft);
  font-size: clamp(1.28rem, 6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.scroll-hint {
  width: fit-content;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  animation: hint-breathe 1700ms ease-in-out infinite;
}

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

.report-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.56);
}

.card-index {
  position: absolute;
  right: 16px;
  top: 14px;
  color: var(--accent);
  font-size: 1.7rem;
  line-height: 1;
  opacity: 0.18;
}

.type-card,
.flow-card,
.action-card,
.revisit-card,
.next-card,
.report-section {
  margin-top: 16px;
  padding: clamp(24px, 7vw, 42px);
}

.type-card {
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.type-card span {
  color: var(--muted);
  font-weight: 800;
}

.type-card h2 {
  font-size: clamp(2rem, 10vw, 4.2rem);
  line-height: 1.12;
}

.snapshot-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.snapshot-card {
  padding: 22px;
  min-height: 178px;
  box-shadow: none;
}

.snapshot-card span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.snapshot-card h3 {
  margin-top: 8px;
  margin-bottom: 10px;
  font-size: 1.28rem;
  line-height: 1.35;
}

.section-heading h2,
.report-section h2,
.action-card h2,
.revisit-card h2,
.next-card h2 {
  margin-top: 8px;
  margin-bottom: 18px;
  font-size: clamp(1.35rem, 6vw, 2.1rem);
  line-height: 1.35;
}

.chart-row {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) minmax(120px, 2fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.chart-bars {
  display: grid;
  gap: 2px;
}

.flow-card {
  isolation: isolate;
}

.chart-bg-ornament {
  position: absolute;
  right: 12px;
  top: 54px;
  width: min(70%, 360px);
  opacity: 0.42;
  pointer-events: none;
  z-index: 0;
}

.flow-card > :not(.chart-bg-ornament) {
  position: relative;
  z-index: 1;
}

.section-divider-ornament {
  display: block;
  width: min(100%, 520px);
  margin: 18px auto 2px;
  opacity: 0.74;
}

.chart-row span {
  color: var(--muted);
  font-weight: 800;
}

.chart-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(36, 36, 36, 0.08);
}

.chart-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left center;
  animation: chart-grow 720ms ease both;
}

.chart-row strong {
  color: var(--accent);
}

.flow-line-chart {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.flow-line-chart h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
  color: var(--muted);
}

.flow-line-chart svg {
  width: 100%;
  max-width: 560px;
  display: block;
  margin: 0 auto;
}

.flow-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.flow-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.12));
}

.flow-dot {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 4;
}

.flow-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.flow-labels span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.22);
}

.flow-labels b,
.flow-labels small {
  display: block;
}

.flow-labels b {
  color: var(--muted);
  font-size: 0.72rem;
}

.flow-labels small {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 900;
}

.chart-note {
  margin-top: 18px;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.deep-section p:not(.section-number),
.action-card p,
.revisit-card p,
.next-card p {
  font-size: 1rem;
}

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

.action-list div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.action-list span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
}

.action-message p {
  font-weight: 800;
}

.revisit-card strong {
  display: inline-flex;
  margin-top: 18px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--accent);
  background: var(--accent-soft);
}

.next-card {
  margin-bottom: 16px;
}

.end-state {
  margin-top: 16px;
  margin-bottom: 28px;
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 250, 239, 0.46);
  box-shadow: none;
}

.end-state p {
  margin-bottom: 6px;
  font-size: 0.92rem;
}

.end-state span {
  font-size: 0.78rem;
}

.cta-button,
.editor-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hint-breathe {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

@keyframes chart-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (min-width: 720px) {
  .snapshot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .paid-report .snapshot-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .paid-report .snapshot-card {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-hint,
  .chart-track i {
    animation: none;
  }
}

@media (max-width: 520px) {
  .chart-row {
    grid-template-columns: 1fr auto;
  }

  .chart-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
