:root {
  color-scheme: light;
  --ink: #19221d;
  --muted: #637167;
  --paper: #f2efe8;
  --white: #fffdf8;
  --line: #cad3cb;
  --green: #baff38;
  --teal: #008b76;
  --purple: #6b6cf7;
  --coral: #ff6b55;
  font-family: Inter, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, .snap-track:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
.page { width: min(100% - 44px, 1540px); margin: 0 auto; }
.hero { padding: 44px 20px 32px; }
.eyebrow, .section-heading p, .section-kicker, .workspace-intro p, .workspace-top, .heading-pill, .card-index, .position-readout span, .inspector-head p, .code-toolbar, .guide-grid article > span, .source-links, .page-footer { font: 800 11px/1.4 "SFMono-Regular", Consolas, monospace; letter-spacing: .07em; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 15px; color: var(--teal); }
.brand-mark { position: relative; width: 18px; height: 18px; border: 2px solid var(--purple); border-radius: 5px; }
.brand-mark::after { position: absolute; inset: 5px -7px -7px 5px; z-index: -1; border-radius: 5px; background: var(--green); content: ""; }
h1 { margin-bottom: 17px; font-size: clamp(42px, 5.3vw, 78px); font-weight: 900; line-height: 1; letter-spacing: 0; }
.hero-bottom { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.lead { margin: 0; font-size: clamp(17px, 1.8vw, 23px); font-weight: 850; line-height: 1.4; }
.lead strong { color: var(--purple); }
.hero-actions { display: flex; flex: none; gap: 10px; }
.hero-actions button, .code-toolbar button { min-height: 44px; padding: 0 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); color: var(--ink); font-size: 12px; font-weight: 850; transition: translate 150ms ease, box-shadow 150ms ease; }
.hero-actions button:last-child { border-color: var(--ink); background: var(--ink); color: white; }
.hero-actions button:hover, .code-toolbar button:hover { translate: 0 -2px; box-shadow: 0 6px 0 rgb(24 34 29 / 12%); }
.lab, .guide { overflow: hidden; border: 1px solid var(--line); border-radius: 27px; background: var(--white); box-shadow: 0 16px 45px rgb(33 55 40 / 6%); }
.section-heading { display: flex; align-items: center; gap: 15px; min-height: 92px; padding: 17px 24px; border-bottom: 1px solid var(--line); }
.section-number { display: grid; flex: none; place-items: center; width: 53px; height: 53px; border-radius: 16px; background: var(--coral); color: #fff; font: 900 14px "SFMono-Regular", Consolas, monospace; }
.section-number--purple { background: var(--purple); }
.section-heading p { margin: 0 0 3px; color: var(--teal); }
.section-heading h2 { margin: 0; font-size: clamp(21px, 2.4vw, 31px); line-height: 1.2; font-weight: 900; }
.heading-pill { margin-left: auto; padding: 9px 12px; border-radius: 999px; background: #e7f7ef; color: var(--teal); white-space: nowrap; }
.lab-grid { display: grid; grid-template-columns: minmax(265px, 282px) minmax(0, 1fr) minmax(272px, 302px); align-items: stretch; }
.controls { border-right: 1px solid var(--line); background: #f8f6ef; }
.control-section { padding: 25px 19px 27px; border-bottom: 1px solid var(--line); }
.control-section:last-child { border-bottom: 0; }
.section-kicker { margin: 0 0 6px; color: var(--teal); }
.control-section h3 { margin: 0 0 19px; font-size: 18px; font-weight: 900; }
.control-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.7; }
.control-note code { color: var(--teal); font-size: 11px; }
.segmented-group > span { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 850; }
.segmented-group > div { position: relative; display: flex; gap: 5px; isolation: isolate; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #e9ede7; anchor-scope: --selected-snap; }
.segmented-group button { position: relative; z-index: 1; flex: 1; min-width: 0; min-height: 40px; padding: 4px 3px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: 11px; font-weight: 850; transition: background-color 150ms ease, translate 150ms ease; }
.segmented-group button:hover { translate: 0 -1px; }
.segmented-group button[aria-pressed="true"] { background: var(--purple); color: #fff; box-shadow: 0 2px 6px rgb(22 29 40 / 15%); }
@supports (anchor-name: --selected-snap) and (position-anchor: --selected-snap) and (anchor-scope: --selected-snap) and (width: anchor-size(width)) {
  .segmented-group button[aria-pressed="true"] { anchor-name: --selected-snap; background: transparent; box-shadow: none; }
  .segmented-group > div::before { position: absolute; z-index: 0; position-anchor: --selected-snap; top: anchor(top); left: anchor(left); width: anchor-size(width); height: anchor-size(height); border-radius: 9px; background: var(--purple); box-shadow: 0 2px 6px rgb(22 29 40 / 15%); content: ""; pointer-events: none; transition: top 180ms ease, left 180ms ease, width 180ms ease, height 180ms ease; }
}
.range-control { display: grid; gap: 10px; margin-top: 22px; }
.range-control:first-of-type { margin-top: 0; }
.range-control > span { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 850; }
.range-control output { color: var(--purple); font: 800 12px "SFMono-Regular", Consolas, monospace; }
input[type="range"] { width: 100%; margin: 0; accent-color: var(--purple); cursor: pointer; }
.workspace { min-width: 0; background: #e7ede8; }
.workspace-top { display: flex; align-items: center; gap: 10px; min-height: 53px; padding: 0 18px; border-bottom: 1px solid #c6d2c8; background: #d7e2d8; color: #55665a; font-size: 10px; }
.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ff7058; }
.window-dots i:nth-child(2) { background: #ffd568; }
.window-dots i:nth-child(3) { background: #63caa7; }
.workspace-top strong { margin-left: auto; padding: 6px 10px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 10px; letter-spacing: 0; white-space: nowrap; }
.workspace-body { container-type: inline-size; padding: 24px; }
.workspace-intro { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.workspace-intro p { margin: 0 0 4px; color: var(--teal); font-size: 10px; }
.workspace-intro h3 { margin: 0; font-size: clamp(18px, 1.6vw, 23px); font-weight: 900; }
.workspace-intro > span { flex: none; padding: 7px 9px; border: 1px solid #c4d1c5; border-radius: 8px; background: #f7fff0; color: var(--teal); font-size: 10px; font-weight: 850; }
.snap-frame { position: relative; min-height: 348px; overflow: hidden; border: 1px solid #becdc2; border-radius: 19px; background: linear-gradient(90deg, #dfe8df 1px, transparent 1px), linear-gradient(#dfe8df 1px, transparent 1px), #f5f7f0; background-size: 28px 28px; }
.snap-track { position: relative; z-index: 1; height: 348px; margin: 0; list-style: none; cursor: grab; user-select: none; scrollbar-color: var(--purple) #d7ded5; scrollbar-width: thin; }
.snap-track.is-dragging { scroll-snap-type: none !important; scroll-behavior: auto !important; cursor: grabbing; }
.snap-card { position: relative; display: flex; flex-direction: column; min-width: 0; height: 244px; padding: 18px; overflow: hidden; border: 2px solid var(--ink); border-radius: 19px; box-shadow: 6px 8px 0 rgb(25 34 29 / 16%); }
.snap-card--coral { background: #ff6b55; }
.snap-card--purple { background: #6b6cf7; color: white; }
.snap-card--lime { background: #baff38; }
.snap-card--peach { background: #ffad80; }
.snap-card--teal { background: #82d9c7; }
.snap-card--ink { background: #202620; color: #fff; }
.card-index { position: relative; z-index: 1; font-size: 10px; }
.snap-card strong { position: relative; z-index: 1; margin-top: auto; font-size: clamp(23px, 2.3vw, 34px); font-weight: 900; line-height: .98; }
.snap-card small { position: relative; z-index: 1; margin-top: 10px; font: 850 10px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .05em; }
.card-art { position: absolute; inset: 0; pointer-events: none; }
.card-art--orbit i:first-child { position: absolute; top: -52px; right: -52px; width: 178px; height: 178px; border: 30px solid var(--ink); border-radius: 50%; background: var(--green); }
.card-art--orbit i:last-child { position: absolute; top: 70px; right: 39px; width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; background: #fff8e5; }
.card-art--fold i:first-child { position: absolute; top: -22px; right: 26px; width: 105px; height: 105px; border: 2px solid var(--ink); border-radius: 11px; background: #ffd365; rotate: 24deg; }
.card-art--fold i:last-child { position: absolute; top: 25px; right: -40px; width: 110px; height: 45px; border: 2px solid var(--ink); border-radius: 30px; background: var(--coral); rotate: -23deg; }
.card-art--ring i:first-child { position: absolute; top: -41px; right: -10px; width: 170px; height: 170px; border: 25px solid var(--purple); border-radius: 50%; }
.card-art--ring i:last-child { position: absolute; top: 27px; right: 67px; width: 47px; height: 47px; border: 2px solid var(--ink); border-radius: 50%; background: #fffdf8; }
.card-art--tiles i:first-child { position: absolute; top: -15px; right: 5px; width: 135px; height: 115px; border: 2px solid var(--ink); border-radius: 11px; background: repeating-linear-gradient(45deg, var(--purple) 0 18px, #ffd769 18px 36px); rotate: -11deg; }
.card-art--tiles i:last-child { position: absolute; top: 45px; right: 92px; width: 44px; height: 44px; border: 2px solid var(--ink); border-radius: 8px; background: var(--green); rotate: 13deg; }
.card-art--beam i:first-child { position: absolute; top: -50px; right: 35px; width: 44px; height: 210px; border: 2px solid var(--ink); border-radius: 28px; background: #fff8d9; rotate: 34deg; }
.card-art--beam i:last-child { position: absolute; top: -42px; right: -9px; width: 30px; height: 190px; border: 2px solid var(--ink); border-radius: 18px; background: var(--coral); rotate: 34deg; }
.card-art--star i:first-child { position: absolute; top: 6px; right: 27px; width: 126px; height: 126px; background: var(--green); clip-path: polygon(50% 0, 61% 35%, 100% 50%, 61% 62%, 50% 100%, 38% 62%, 0 50%, 38% 35%); }
.card-art--star i:last-child { position: absolute; top: 105px; right: 43px; width: 24px; height: 24px; border-radius: 50%; background: var(--purple); }
.snap-guides { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.snap-guide { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed rgb(107 108 247 / 32%); }
.snap-guide--start { left: var(--guide-start, 32px); }
.snap-guide--center { left: calc((100% + var(--guide-start, 32px) - var(--guide-end, 32px)) / 2); }
.snap-guide--end { right: var(--guide-end, 32px); }
.snap-guide b { position: absolute; top: 9px; left: 50%; padding: 5px 7px; border: 1px solid #d0d1fa; border-radius: 6px; background: #f5f4ff; color: #5b5cdf; font: 900 10px/1 "SFMono-Regular", Consolas, monospace; transform: translateX(-50%); }
.snap-guide--start b { left: 3px; transform: none; }
.snap-guide--end b { right: 3px; left: auto; transform: none; }
.snap-frame[data-align="start"] .snap-guide--start, .snap-frame[data-align="center"] .snap-guide--center, .snap-frame[data-align="end"] .snap-guide--end { border-left: 3px solid var(--purple); }
.snap-frame[data-align="start"] .snap-guide--start b, .snap-frame[data-align="center"] .snap-guide--center b, .snap-frame[data-align="end"] .snap-guide--end b { border-color: var(--purple); background: var(--purple); color: white; }
.stage-actions { display: flex; gap: 8px; margin-top: 13px; }
.stage-actions > button { display: flex; align-items: center; justify-content: space-between; gap: 13px; min-width: 84px; min-height: 54px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 12px; background: var(--green); color: var(--ink); font-size: 12px; font-weight: 900; transition: translate 150ms ease, box-shadow 150ms ease; }
.stage-actions > button:nth-child(2) { background: var(--purple); color: white; }
.stage-actions > button:hover { translate: 0 -2px; box-shadow: 0 5px 0 rgb(24 34 29 / 15%); }
.stage-actions > button span { font-size: 18px; }
.position-readout { display: grid; align-content: center; flex: 1; min-width: 0; padding: 7px 12px; border: 1px solid #c6d6c8; border-radius: 12px; background: #f8fff2; }
.position-readout span { color: #607267; font-size: 10px; }
.position-readout strong { margin-top: 4px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stage-note { margin: 14px 2px 0; color: #516259; font-size: 11px; font-weight: 650; line-height: 1.6; }
.inspector { min-width: 0; background: #202620; color: #f8fcf4; }
.inspector-head { position: relative; min-height: 101px; padding: 25px 20px 18px; border-bottom: 1px solid #3f4c40; }
.inspector-head p { margin: 0 0 8px; color: #a7b7a7; }
.inspector-head h3 { margin: 0; font-size: 19px; font-weight: 900; }
.inspector-head > span { position: absolute; top: 23px; right: 15px; padding: 5px 7px; border-radius: 999px; background: var(--green); color: #142018; font: 900 10px "SFMono-Regular", Consolas, monospace; }
.inspector-summary { margin: 0; padding: 18px 20px; border-bottom: 1px solid #3f4c40; color: var(--green); font-size: 12px; font-weight: 850; line-height: 1.5; }
.code-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 17px 17px 10px; color: var(--green); }
.code-toolbar button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px; font-size: 11px; }
.code-block { overflow: auto; max-height: 560px; margin: 0 16px; padding: 16px 13px; border: 1px solid #475348; border-radius: 12px; background: #151c17; white-space: pre; tab-size: 2; }
.code-block:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.code-block code { color: #e6f2df; font: 11px/1.6 "SFMono-Regular", Consolas, monospace; }
.code-footnote { margin: 15px 18px 24px; color: #b7c5b7; font-size: 11px; line-height: 1.65; }
.guide { margin-top: 20px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px 22px 14px; }
.guide-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.guide-grid article > span { color: var(--purple); }
.guide-grid h3 { margin: 17px 0 8px; font-size: 17px; font-weight: 900; }
.guide-grid p { margin: 0; color: #526457; font-size: 12px; font-weight: 650; line-height: 1.65; }
.guide-grid code, .guide-note code, .source-links a { color: var(--purple); }
.guide-note { margin: 0 22px; padding: 14px 16px; border: 1px solid #d6cfed; border-radius: 12px; background: #f6f2ff; color: #465447; font-size: 12px; line-height: 1.65; }
.source-links { margin: 16px 23px 21px; color: var(--muted); font-size: 12px; font-family: inherit; letter-spacing: 0; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; padding: 25px 4px 32px; color: #7c8b7e; }
.toast { position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 10; width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 12px 17px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@container (max-width: 580px) { .workspace-intro { align-items: start; flex-direction: column; } .stage-actions { flex-wrap: wrap; } .position-readout { flex: 1 1 100%; } }
@media (max-width: 1210px) { .lab-grid { grid-template-columns: 280px minmax(0, 1fr); } .inspector { grid-column: 1 / -1; } }
@media (max-width: 760px) { .page { width: min(100% - 24px, 560px); } .hero { padding: 29px 4px 24px; } .hero-bottom { display: block; } .hero-actions { margin-top: 17px; } .section-heading { padding: 15px; } .heading-pill { display: none; } .lab-grid { display: block; } .controls { border-right: 0; } .control-section { padding: 20px; } .workspace-body { padding: 14px; } .snap-frame { min-height: 330px; } .snap-track { height: 330px; } .guide-grid { grid-template-columns: 1fr; padding: 15px; } .guide-grid article { padding: 15px; } .guide-note { margin: 0 15px; } .page-footer { font-size: 10px; } }
@media (max-width: 390px) { .page { width: min(100% - 16px, 560px); } h1 { font-size: 39px; } .hero-actions button { padding-inline: 13px; } .section-heading h2 { font-size: 20px; } .snap-card { height: 226px; } .snap-card strong { font-size: 23px; } }
@media (prefers-reduced-motion: reduce) { .segmented-group button, .segmented-group > div::before, .stage-actions > button, .hero-actions button, .code-toolbar button, .toast { transition: none; } }
