:root {
  --ink: #143760;
  --blue: #2878bc;
  --blue-deep: #145996;
  --blue-soft: #d8efff;
  --pink: #e84f86;
  --pink-deep: #bd3567;
  --pink-soft: #ffdce9;
  --cream: #fffaf2;
  --yellow: #fff0a7;
  --paper: rgba(255, 254, 251, .96);
  --line: #f09aba;
  --shadow: 0 18px 45px rgba(54, 91, 129, .16);
  --max: 1080px;
  --font-round: "Arial Rounded MT Bold", "Avenir Next Rounded", "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font: 400 1.125rem/1.72 var(--font-round);
  background:
    linear-gradient(90deg, rgba(255,255,255,.62) 50%, transparent 50%) 0 0/52px 52px,
    linear-gradient(rgba(255,255,255,.55) 50%, transparent 50%) 0 0/52px 52px,
    #cce8fa;
}
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: 24px;
  z-index: 10;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, #f5acc4 0 8px, #fff 8px 13px, #8ac8eb 13px 21px);
  clip-path: polygon(0 0,100% 0,72% 2%,100% 4%,72% 6%,100% 8%,72% 10%,100% 12%,72% 14%,100% 16%,72% 18%,100% 20%,72% 22%,100% 24%,72% 26%,100% 28%,72% 30%,100% 32%,72% 34%,100% 36%,72% 38%,100% 40%,72% 42%,100% 44%,72% 46%,100% 48%,72% 50%,100% 52%,72% 54%,100% 56%,72% 58%,100% 60%,72% 62%,100% 64%,72% 66%,100% 68%,72% 70%,100% 72%,72% 74%,100% 76%,72% 78%,100% 80%,72% 82%,100% 84%,72% 86%,100% 88%,72% 90%,100% 92%,72% 94%,100% 96%,72% 98%,100% 100%,0 100%);
}
body::after { left: auto; right: 0; transform: scaleX(-1); }
main { overflow: hidden; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3, button { font-family: var(--font-round); }
h2 { margin: .3rem 0 1rem; font-size: clamp(2rem, 4.6vw, 3.55rem); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; }
h3 { margin: 0; font-size: 1.42rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 4px solid #ffb13c; outline-offset: 4px; }
.hero { padding: clamp(3.2rem, 8vw, 7rem) clamp(1.25rem, 5vw, 4rem) 2.5rem; }
.hero__paper {
  position: relative;
  width: min(1120px, 100%);
  margin: auto;
  padding: clamp(2.3rem, 5vw, 4.4rem);
  text-align: center;
  background: var(--paper);
  border: 2px solid rgba(255,255,255,.98);
  border-radius: 42px 42px 28px 28px;
  box-shadow: var(--shadow), inset 0 0 0 3px #f7b9cf;
}
.hero__paper::before, .hero__paper::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 58px;
  top: -34px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  background: #f6a8c3;
  border-radius: 70% 30% 60% 40%;
  box-shadow: 0 0 0 8px #ffe7ef, 0 8px 0 rgba(20,60,100,.08);
}
.hero__paper::after { width: 62px; height: 62px; top: -38px; border-radius: 50%; background: #ffd5e3; box-shadow: inset 0 0 0 7px #f28bad; }
.eyebrow, .section-tag, .number-label, .rule-note small, .gift-card small, .total-ticket small, .definition small, .calculator-note small {
  display: inline-block;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow { color: var(--pink-deep); }
h1 { margin: .8rem auto 1rem; max-width: 940px; font-size: clamp(2.55rem, 7vw, 5.8rem); line-height: .98; letter-spacing: -.055em; }
h1 span { color: var(--blue); text-shadow: 0 3px 0 #fff, 0 6px 0 #acd9f4; }
h1 b { color: var(--pink); }
.hero__dek { max-width: 760px; margin: 0 auto 2rem; font-size: clamp(1.18rem, 2vw, 1.42rem); }
.hero__equation { display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 2vw, 1.2rem); flex-wrap: wrap; }
.gift-card, .total-ticket { min-width: 190px; padding: 1.15rem 1.3rem; border-radius: 20px; transform: rotate(-1.5deg); transition: transform .25s ease; }
.gift-card:hover, .total-ticket:hover { transform: rotate(0) translateY(-5px); }
.gift-card { color: #fff; background: linear-gradient(145deg, #3289d4, #1762a7); box-shadow: 0 8px 0 #b5ddf5, 0 13px 20px rgba(27,88,145,.2); }
.gift-card:nth-of-type(2) { transform: rotate(1.5deg); }
.gift-card strong, .total-ticket strong { display: block; font-size: 2.3rem; line-height: 1; }
.gift-card i, .total-ticket i { display: block; margin-top: .5rem; font-style: normal; font-weight: 700; }
.total-ticket { color: var(--ink); background: var(--yellow); border: 2px dashed #e8a73d; transform: rotate(1deg); }
.operator { font-size: 2.4rem; font-weight: 900; color: var(--pink); }
.ribbon-link { display: inline-block; margin-top: 2.2rem; padding: .75rem 1.25rem; color: #fff; background: var(--pink); border-radius: 999px; text-decoration: none; font-weight: 900; box-shadow: 0 6px 0 #c83569; transition: transform .2s ease, box-shadow .2s ease; }
.ribbon-link:hover { transform: translateY(-3px); box-shadow: 0 9px 0 #c83569; }
.content-grid, .chapter, .comparison-section, .interactive-shell, .cta-shell, footer { width: min(var(--max), calc(100% - 3rem)); margin-inline: auto; }
.opening { margin-block: 1.5rem 4rem; display: grid; grid-template-columns: 1.4fr .8fr; gap: 1.5rem; align-items: stretch; }
.section-tag { grid-column: 1 / -1; justify-self: start; padding: .45rem 1rem; background: var(--pink-soft); border: 2px dashed var(--line); border-radius: 12px; color: #a92f5a; }
.paper, .rule-note, .chapter__copy, .definition, .prose, .mistake-card { padding: clamp(1.45rem, 3vw, 2.4rem); background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); }
.opening__copy { border-left: 8px solid var(--blue); }
.lead { margin-top: 0; font-size: 1.4rem; }
.math-line { display: inline-block; padding: .5rem 1rem; color: var(--blue-deep); background: #e6f5ff; border: 2px dashed #77b7e3; border-radius: 12px; font-size: 1.7rem; font-weight: 900; }
.rule-note { display: grid; place-content: center; text-align: center; border: 2px dashed var(--pink); transform: rotate(1deg); }
.rule-note .spark { color: var(--pink); font-size: 2rem; }
.rule-note strong { display: block; margin-top: .5rem; font-size: 1.35rem; }
.chapter { margin-block: 3.2rem; }
.chapter--split, .common-mistake, .pdcard-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: center; }
.number-label { color: var(--pink-deep); font-size: .95rem; }
.chapter__copy { border-top: 7px solid var(--pink); }
.mini-ledger { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; margin: 1.1rem 0 1.4rem; padding: 1rem; background: #e7f5ff; border: 2px dashed #75b6e2; border-radius: 16px; }
.mini-ledger strong { color: var(--blue-deep); font-size: 1.2rem; }
.definition-stack { display: grid; gap: 1rem; }
.definition { transition: transform .2s ease; }
.definition:hover { transform: translateX(5px); }
.definition--blue { border: 3px solid #83c5ed; transform: rotate(-1deg); }
.definition--pink { border: 3px solid #f2a0be; transform: rotate(1deg); }
.definition strong { display: inline-block; padding: .35rem .7rem; border-radius: 10px; background: #fff0a6; }
.prose { max-width: 850px; margin: 0 auto 1.5rem; }
.story-image { position: relative; margin: 1.6rem auto 0; max-width: 1080px; padding: 12px; background: #fff; border-radius: 26px; box-shadow: var(--shadow); }
.story-image img { display: block; width: 100%; height: auto; border-radius: 18px; }
.story-image figcaption { padding: 1.05rem .85rem .65rem; font-size: 1.08rem; line-height: 1.5; }
.story-image figcaption strong { color: var(--pink-deep); }
.image-tape { position: absolute; z-index: 2; width: 130px; height: 34px; top: -16px; left: 50%; transform: translateX(-50%) rotate(-2deg); background: rgba(255,191,211,.86); }
.story-image--tilt { transform: rotate(1deg); }
.interactive-shell { margin-block: 4rem; padding: clamp(1.2rem, 3vw, 2rem); border: 3px dashed #e57fa5; border-radius: 30px; background: rgba(255,245,249,.82); box-shadow: var(--shadow); }
.interactive-shell__head { text-align: center; max-width: 760px; margin: 0 auto 1rem; }
.mini-frame { display: block; width: 100%; height: 520px; border: 0; border-radius: 22px; background: #fff; }
.mini-frame--quiz { height: 575px; }
.chapter--why .prose { border: 3px solid #8bc9ef; }
.tag-list { display: flex; flex-wrap: wrap; gap: .7rem; list-style: none; padding: 0; }
.tag-list li { padding: .5rem .8rem; background: var(--blue-soft); border-radius: 999px; font-weight: 800; }
.pull-rule { margin-top: 1.5rem; padding: 1rem 1.2rem; background: var(--pink-soft); border-left: 6px solid var(--pink); border-radius: 14px; font-size: 1.1rem; }
.mistake-card { border: 3px solid #ef8bad; transform: rotate(-1deg); }
.stamp { display: inline-block; padding: .4rem .7rem; color: #fff; background: var(--pink); border-radius: 8px; transform: rotate(-2deg); font-weight: 900; letter-spacing: .08em; }
.comparison-section { margin-block: 4rem; padding: clamp(1.5rem, 4vw, 3rem); background: #fff9f1; border: 2px solid #fff; border-radius: 30px; box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; border-radius: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 650px; background: #fff; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px dashed #c4d9e8; }
th { color: #fff; background: var(--blue); }
tbody tr:nth-child(even) { background: #fff4f8; }
.rate-pill { display: inline-block; padding: .35rem .7rem; background: var(--yellow); border: 2px dashed #dfa234; border-radius: 10px; font-weight: 900; }
.table-note { margin: 1.2rem 0 0; }
.checklist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.checklist li { min-width: 0; padding: 1.2rem; background: var(--paper); border: 2px solid #fff; border-radius: 18px; box-shadow: 0 9px 24px rgba(54,91,129,.11); }
.checklist li > span { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: .7rem; color: #fff; background: var(--pink); border-radius: 50%; font-weight: 900; }
.checklist p { margin: .4rem 0 0; font-size: 1.03rem; line-height: 1.45; }
.match-ribbon { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.match-ribbon span { padding: .45rem .65rem; background: var(--blue-soft); border-radius: 9px; font-weight: 900; }
.match-ribbon b { color: var(--pink); }
.final-rule { width: min(970px, calc(100% - 3rem)); margin: 4rem auto; padding: clamp(2rem,6vw,4.5rem); text-align: center; color: #fff; background: linear-gradient(145deg, #185f9f, #2d87c9); border: 10px solid #fff; border-radius: 46px 20px 46px 20px; box-shadow: var(--shadow), 0 0 0 4px #f19dbb; }
.final-rule .number-label { color: #ffd9e8; }
.final-rule h2 { max-width: 820px; margin-inline: auto; }
.rule-lines { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin: 2rem 0; }
.rule-lines p { display: grid; gap: .3rem; margin: 0; padding: 1rem; color: var(--ink); background: #fff; border-radius: 16px; }
.rule-lines strong { font-size: 1.32rem; color: var(--blue-deep); }
.rule-lines span { color: var(--pink-deep); font-weight: 900; }
.check-before .prose { border-bottom: 7px solid var(--pink); }
.support-mention { margin: .7rem 0 1.1rem; color: #3e5f7f; font-size: 1.08rem; }
.support-mention a, .table-note a, .pull-rule a { color: var(--pink-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 800; }
.support-mention a:hover, .table-note a:hover, .pull-rule a:hover { color: var(--blue-deep); }
.cta-shell { margin-block: 3rem; padding: 12px; background: #fff; border: 3px solid #f0a0bd; border-radius: 28px; box-shadow: var(--shadow); }
.cta-frame { display: block; width: 100%; height: 620px; border: 0; border-radius: 18px; background: #fff; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block: 1rem 0; padding: 1.3rem 1.5rem 2rem; }
footer p { margin: 0; }
footer button { padding: .75rem 1rem; color: #fff; background: var(--blue); border: 0; border-radius: 999px; box-shadow: 0 5px 0 #134f83; font: inherit; font-weight: 900; cursor: pointer; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) {
  .checklist { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 720px) {
  body::before, body::after { width: 10px; }
  .hero { padding: 3.6rem 1rem 1.5rem; }
  .hero__paper { padding: 2.4rem 1rem 1.5rem; border-radius: 26px; }
  h1 { max-width: 100%; font-size: 2.15rem; line-height: 1.02; }
  .hero__dek { max-width: 100%; font-size: 1.125rem; line-height: 1.55; }
  .hero__paper::before { width: 120px; height: 36px; top: -20px; }
  .hero__paper::after { width: 42px; height: 42px; top: -23px; }
  .gift-card, .total-ticket { min-width: 128px; padding: .85rem .7rem; }
  .gift-card strong, .total-ticket strong { font-size: 1.7rem; }
  .gift-card i, .total-ticket i { font-size: .9rem; }
  .operator { font-size: 1.6rem; }
  .content-grid, .chapter, .comparison-section, .interactive-shell, .cta-shell, footer { width: min(100% - 1.5rem, var(--max)); }
  .opening, .chapter--split, .common-mistake, .pdcard-flow { grid-template-columns: 1fr; }
  .story-image--tilt { transform: none; }
  .mini-frame { height: 600px; }
  .mini-frame--quiz { height: 660px; }
  .rule-lines { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
  .cta-frame { height: 740px; }
  footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 380px) {
  h1 { font-size: 1.95rem; }
  h2 { font-size: 1.9rem; }
  .gift-card, .total-ticket { min-width: 112px; }
  .hero__equation { gap: .4rem; }
  .operator { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
