:root {
  --aero-sky: #8ED8FF;
  --peach: #FFB36B;
  --strawberry: #FF6FAE;
  --custard: #FFF3B8;
  --glass: #F7FDFF;
  --deep-blue: #155E8A;
  --melon: #9EF2C5;
  --violet: #6B5DA8;
  --display: "Bagel Fat One", "Cooper Black", "Arial Rounded MT Bold", system-ui, sans-serif;
  --jp: "Noto Sans JP", "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  --body: "Bricolage Grotesque", Inter, "Segoe UI", system-ui, sans-serif;
  --round: "M PLUS Rounded 1c", "Arial Rounded MT Bold", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--deep-blue);
  font-family: var(--body);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(247, 253, 255, .98) 0 9%, transparent 26%),
    radial-gradient(circle at 83% 12%, rgba(255, 243, 184, .88) 0 7%, transparent 24%),
    radial-gradient(circle at 66% 82%, rgba(255, 179, 107, .72) 0 8%, transparent 28%),
    linear-gradient(135deg, #F7FDFF 0%, #8ED8FF 42%, #FFF3B8 74%, #FFB36B 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(247,253,255,.33) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,253,255,.28) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
  z-index: 0;
}

.aero-background { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.orb, .bubble, .sugar-pixel { position: absolute; display: block; }
.orb { border-radius: 999px; filter: blur(1px); box-shadow: inset -22px -24px 60px rgba(21,94,138,.16), inset 18px 16px 34px rgba(247,253,255,.82), 0 28px 80px rgba(107,93,168,.18); }
.orb-sky { width: 42vw; height: 42vw; left: -8vw; top: 19vh; background: radial-gradient(circle at 32% 28%, #F7FDFF, #8ED8FF 55%, rgba(142,216,255,.18)); animation: floatA 16s ease-in-out infinite; }
.orb-peach { width: 34vw; height: 34vw; right: -8vw; bottom: 5vh; background: radial-gradient(circle at 28% 25%, #F7FDFF, #FFB36B 48%, rgba(255,111,174,.34)); animation: floatA 18s ease-in-out infinite reverse; }
.orb-melon { width: 20vw; height: 20vw; left: 50vw; top: 9vh; background: radial-gradient(circle at 32% 25%, #F7FDFF, #9EF2C5 58%, rgba(255,243,184,.2)); animation: floatB 12s ease-in-out infinite; }
.bubble { border-radius: 50%; border: 1px solid rgba(247,253,255,.82); background: radial-gradient(circle at 32% 24%, rgba(247,253,255,.92), rgba(142,216,255,.22) 48%, rgba(255,111,174,.08)); box-shadow: inset 0 0 18px rgba(247,253,255,.58), 0 10px 35px rgba(21,94,138,.12); animation: rise 14s linear infinite; }
.b1 { width: 58px; height: 58px; left: 20%; bottom: -10%; }
.b2 { width: 34px; height: 34px; left: 73%; bottom: -10%; animation-delay: -5s; }
.b3 { width: 96px; height: 96px; left: 85%; bottom: -12%; animation-delay: -9s; }
.b4 { width: 42px; height: 42px; left: 44%; bottom: -8%; animation-delay: -2s; }
.sugar-pixel { width: 18px; height: 18px; border-radius: 6px; background: rgba(247,253,255,.72); transform: rotate(12deg); box-shadow: inset 0 0 10px #F7FDFF, 0 8px 22px rgba(21,94,138,.12); animation: twinkle 5s ease-in-out infinite; }
.p1 { left: 9vw; top: 68vh; } .p2 { right: 22vw; top: 24vh; animation-delay: -1s; } .p3 { right: 9vw; top: 58vh; animation-delay: -2s; }

.lesson-selector {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
  width: 178px;
  padding: 12px;
  border-radius: 28px;
  border: 1px solid rgba(247,253,255,.74);
  background: linear-gradient(145deg, rgba(247,253,255,.62), rgba(142,216,255,.28));
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 18px 45px rgba(21,94,138,.18);
}

.title-chip {
  justify-self: end;
  padding: 7px 10px;
  border-radius: 999px;
  font: 700 12px/1 var(--jp);
  letter-spacing: .04em;
  color: var(--deep-blue);
  background: rgba(255,243,184,.72);
  border: 1px solid rgba(247,253,255,.7);
}

.lesson-tab {
  position: relative;
  border: 0;
  border-radius: 999px;
  padding: 11px 14px;
  text-align: left;
  cursor: pointer;
  color: rgba(21,94,138,.72);
  font: 700 13px/1 var(--round);
  background: rgba(247,253,255,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
  transition: transform .25s ease, color .25s ease, background .25s ease;
}
.lesson-tab span { color: var(--strawberry); margin-right: 6px; }
.lesson-tab:hover, .lesson-tab.active { transform: translateX(-8px); color: var(--deep-blue); background: rgba(247,253,255,.74); }
.syrup-underline { position: absolute; height: 4px; width: 0; right: 20px; border-radius: 999px; background: linear-gradient(90deg, var(--strawberry), var(--peach), var(--custard)); box-shadow: 0 2px 10px rgba(255,111,174,.48); transition: top .38s cubic-bezier(.2,.8,.2,1), width .48s ease; }

.lesson-flow { position: relative; z-index: 1; }
.lesson-screen { position: relative; min-height: 100vh; padding: 8vh 210px 8vh 7vw; overflow: hidden; display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(8, minmax(62px, 1fr)); gap: 18px; }

.display-word, .display-fragment { position: absolute; z-index: -1; font-family: var(--display); font-weight: 900; letter-spacing: -.075em; color: rgba(247,253,255,.48); text-shadow: 0 12px 0 rgba(255,243,184,.24), 0 28px 70px rgba(21,94,138,.14); user-select: none; }
.display-word { left: -4vw; bottom: -8vh; font-size: clamp(112px, 22vw, 340px); }
.display-fragment { left: -3vw; bottom: -5vh; font-size: clamp(108px, 19vw, 290px); }

.glass-window {
  border: 1px solid rgba(247,253,255,.78);
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(247,253,255,.7), rgba(247,253,255,.26) 44%, rgba(142,216,255,.2));
  backdrop-filter: blur(24px) saturate(1.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -18px 42px rgba(142,216,255,.16), 0 26px 70px rgba(21,94,138,.18), 0 2px 0 rgba(255,255,255,.5);
}
.window-bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid rgba(247,253,255,.58); font: 800 11px/1 var(--round); color: rgba(21,94,138,.55); }
.window-bar span { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.window-bar span:nth-child(1) { background: var(--strawberry); } .window-bar span:nth-child(2) { background: var(--peach); } .window-bar span:nth-child(3) { background: var(--melon); }
.kicker { margin: 0 0 10px; color: var(--strawberry); font: 800 13px/1.2 var(--jp); letter-spacing: .1em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 900; line-height: .9; letter-spacing: -.04em; color: var(--deep-blue); text-wrap: balance; }
h1 { font-size: clamp(54px, 8vw, 118px); }
h2 { font-size: clamp(42px, 6vw, 86px); }
p { font-size: clamp(16px, 1.35vw, 21px); line-height: 1.55; margin: 18px 0 0; color: rgba(21,94,138,.82); }

.status-window { grid-column: 1 / 7; grid-row: 2 / 6; padding: 0 28px 28px; align-self: center; transform: rotate(-1.2deg); }
.radar-panel { grid-column: 7 / 10; grid-row: 1 / 5; padding: 18px; align-self: center; transform: rotate(2deg); }
.lesson-card { grid-column: 2 / 7; grid-row: 2 / 7; padding: 0 28px 28px; transform: rotate(.8deg); }
.spoon-map { grid-column: 7 / 10; grid-row: 3 / 6; padding: 20px; }
.curve-window { grid-column: 2 / 8; grid-row: 2 / 7; padding: 0 28px 22px; transform: rotate(-.7deg); }
.bubble-stack { grid-column: 8 / 10; grid-row: 2 / 6; padding: 22px; display: grid; align-content: center; gap: 18px; }
.receipt-window { grid-column: 2 / 7; grid-row: 2 / 7; padding: 0 28px 28px; }
.fruit-orbit { grid-column: 7 / 10; grid-row: 2 / 6; position: relative; min-height: 330px; }

.radar-chart { position: relative; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,243,184,.42), rgba(142,216,255,.18)); overflow: hidden; }
.radar-ring { position: absolute; inset: 12%; border: 2px solid rgba(21,94,138,.16); border-radius: 50%; }
.radar-ring.r2 { inset: 27%; } .radar-ring.r3 { inset: 42%; }
.radar-chart::before, .radar-chart::after { content: ""; position: absolute; inset: 50% 8%; height: 1px; background: rgba(21,94,138,.17); transform-origin: center; }
.radar-chart::after { transform: rotate(60deg); } .radar-chart::before { transform: rotate(-60deg); }
.radar-blob { position: absolute; left: 25%; top: 18%; width: 55%; height: 62%; clip-path: polygon(50% 0, 95% 42%, 70% 100%, 18% 78%, 0 28%); background: linear-gradient(135deg, rgba(255,111,174,.56), rgba(255,179,107,.48), rgba(158,242,197,.48)); filter: drop-shadow(0 8px 22px rgba(255,111,174,.25)); animation: pulseBlob 4s ease-in-out infinite; }
.radar-dot { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--glass); box-shadow: 0 0 0 5px rgba(255,111,174,.22); }
.d1 { left: 48%; top: 15%; } .d2 { right: 15%; top: 48%; } .d3 { left: 27%; bottom: 18%; }
.tiny-readout { margin-top: 14px; padding: 9px 12px; border-radius: 999px; font: 800 12px/1 var(--round); color: var(--deep-blue); background: rgba(255,243,184,.54); border: 1px solid rgba(247,253,255,.74); }

.coordinate-label { position: absolute; z-index: 4; padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(247,253,255,.72); background: rgba(247,253,255,.46); backdrop-filter: blur(10px); color: var(--deep-blue); font: 800 12px/1 var(--round); box-shadow: 0 10px 30px rgba(21,94,138,.12); }
.coordinate-label::before { content: ""; position: absolute; width: 72px; height: 1px; right: 100%; top: 50%; background: linear-gradient(90deg, transparent, rgba(21,94,138,.34)); }
.label-a { left: 54%; top: 62%; } .label-b { left: 12%; top: 72%; } .label-c { right: 18%; bottom: 18%; } .label-d { left: 56%; bottom: 22%; }

.meter-row { display: flex; gap: 18px; margin-top: 24px; }
.liquid-meter { position: relative; flex: 1; height: 132px; border-radius: 999px; overflow: hidden; border: 1px solid rgba(247,253,255,.8); background: rgba(247,253,255,.34); box-shadow: inset 0 0 22px rgba(21,94,138,.08); }
.liquid-meter i { position: absolute; left: 0; right: 0; bottom: 0; height: 8%; background: linear-gradient(180deg, rgba(247,253,255,.75), var(--strawberry) 22%, var(--peach)); border-radius: 999px 999px 0 0; transition: height 1.1s cubic-bezier(.2,.8,.2,1); }
.liquid-meter i::before { content: ""; position: absolute; left: -20%; top: -12px; width: 140%; height: 25px; background: rgba(247,253,255,.5); border-radius: 45%; animation: wave 3s ease-in-out infinite; }
.liquid-meter em { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font: 900 13px/1 var(--jp); color: var(--deep-blue); font-style: normal; }
.trajectory { width: 100%; height: auto; overflow: visible; }
.trajectory .dash-path { fill: none; stroke: url(#none); stroke: var(--strawberry); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 18 16; filter: drop-shadow(0 6px 10px rgba(255,111,174,.25)); animation: dashMove 6s linear infinite; }
.trajectory circle { fill: rgba(247,253,255,.85); stroke: var(--peach); stroke-width: 5; }

.temperature-curve { width: 100%; margin-top: 22px; overflow: visible; }
.gridline { stroke: rgba(21,94,138,.13); stroke-width: 1; }
.curve-path { fill: none; stroke: url(#curveFill); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 700; stroke-dashoffset: 700; transition: stroke-dashoffset 1.4s ease; filter: drop-shadow(0 8px 18px rgba(21,94,138,.14)); }
.curve-glow { fill: none; stroke: rgba(247,253,255,.78); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 700; stroke-dashoffset: 700; transition: stroke-dashoffset 1.4s ease .12s; }
.lesson-screen.in-view .curve-path, .lesson-screen.in-view .curve-glow { stroke-dashoffset: 0; }
.bubble-stack span { height: 58px; width: var(--size); border-radius: 999px; display: grid; place-items: center; justify-self: center; font: 900 14px/1 var(--jp); color: var(--deep-blue); background: linear-gradient(145deg, rgba(247,253,255,.86), rgba(158,242,197,.42)); box-shadow: inset 0 1px 0 white, 0 12px 28px rgba(21,94,138,.12); animation: wobble 3s ease-in-out infinite; animation-delay: var(--delay); }
.receipt { margin-top: 22px; padding: 22px; border-radius: 18px; background: linear-gradient(#F7FDFF, #FFF3B8); border: 1px dashed rgba(21,94,138,.28); font-family: var(--round); box-shadow: 0 12px 35px rgba(21,94,138,.12); }
.receipt p, .receipt strong { display: block; margin: 0; padding: 8px 0; border-bottom: 1px dotted rgba(21,94,138,.22); font-size: 15px; letter-spacing: .04em; }
.receipt strong { color: var(--strawberry); border: 0; }
.fruit { position: absolute; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 30% 24%, var(--glass), var(--strawberry) 34%, var(--peach)); box-shadow: inset -12px -14px 28px rgba(21,94,138,.16), 0 18px 42px rgba(255,111,174,.22); }
.f1 { left: 22%; top: 18%; } .f2 { right: 18%; top: 34%; background: radial-gradient(circle at 30% 24%, var(--glass), var(--melon) 42%, var(--aero-sky)); } .f3 { left: 38%; bottom: 15%; background: radial-gradient(circle at 30% 24%, var(--glass), var(--custard) 36%, var(--peach)); }
.crosshair { position: absolute; inset: 16%; border: 2px dashed rgba(21,94,138,.2); border-radius: 50%; animation: rotateSlow 16s linear infinite; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: rgba(21,94,138,.22); left: 50%; top: 0; bottom: 0; width: 1px; } .crosshair::after { transform: rotate(90deg); }
.fruit-orbit .tiny-readout { position: absolute; left: 18px; right: 18px; bottom: 18px; }
.float-hover { transition: transform .25s ease; }

@keyframes floatA { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(2vw,-3vh,0) scale(1.04); } }
@keyframes floatB { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(-2vw,3vh,0); } }
@keyframes rise { from { transform: translateY(0) translateX(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-118vh) translateX(40px); opacity: 0; } }
@keyframes twinkle { 0%,100% { opacity: .45; transform: rotate(12deg) scale(.86); } 50% { opacity: 1; transform: rotate(28deg) scale(1.08); } }
@keyframes pulseBlob { 0%,100% { transform: scale(.96) rotate(-2deg); } 50% { transform: scale(1.04) rotate(2deg); } }
@keyframes wave { 0%,100% { transform: translateX(-4%); } 50% { transform: translateX(4%); } }
@keyframes dashMove { to { stroke-dashoffset: -136; } }
@keyframes wobble { 0%,100% { transform: translateX(0) scale(1); } 50% { transform: translateX(8px) scale(1.03,.97); } }
@keyframes rotateSlow { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .lesson-selector { right: 10px; width: 148px; }
  .lesson-screen { padding: 110px 24px 120px; display: block; min-height: auto; }
  .glass-window { margin: 22px 0; }
  .status-window, .radar-panel, .lesson-card, .spoon-map, .curve-window, .bubble-stack, .receipt-window, .fruit-orbit { transform: none; }
  .display-word, .display-fragment { position: fixed; font-size: 27vw; opacity: .54; }
  .meter-row { flex-direction: column; }
  .liquid-meter { height: 74px; }
  .coordinate-label { display: none; }
}
