:root {
  color-scheme: light;
  --ink: #19221d;
  --muted: #647168;
  --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 { outline: 3px solid var(--purple); outline-offset: 4px; }
.demo-loading .card-object { transition: none !important; }
h1, h2, h3, h4, 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, .stage-label, .stage-status 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: 23px 19px 25px; 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 18px; font-size: 18px; font-weight: 900; }
.range-control { display: grid; gap: 10px; margin-top: 20px; }
.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; }
.origin-controls { display: grid; gap: 18px; margin-top: 23px; padding-top: 22px; border-top: 1px solid var(--line); }
.origin-controls .range-control { margin: 0; }
.control-note { margin: 13px 0 0; color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.6; }
.control-note code { color: var(--teal); font-size: 11px; }
.segmented-group { margin-top: 21px; }
.segmented-group:first-of-type { margin-top: 0; }
.segmented-group > span { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 850; }
.segmented-group > div { position: relative; display: flex; gap: 6px; isolation: isolate; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #e9ede7; anchor-scope: --selected-segment; }
.segmented-group button { position: relative; z-index: 1; flex: 1; min-height: 38px; padding: 4px 6px; 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: white; box-shadow: 0 2px 6px rgb(22 29 40 / 15%); }
@supports (anchor-name: --selected-segment) and (position-anchor: --selected-segment) and (anchor-scope: --selected-segment) and (width: anchor-size(width)) {
  .segmented-group button[aria-pressed="true"] { anchor-name: --selected-segment; background: transparent; box-shadow: none; }
  .segmented-group > div::before { position: absolute; z-index: 0; position-anchor: --selected-segment; 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; }
}
.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: 22px; }
.workspace-intro { margin-bottom: 17px; }
.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; }
.stage { position: relative; min-height: 485px; border: 1px solid #becdc2; border-radius: 19px; background: radial-gradient(circle at 50% 35%, #fffdf6 0 25%, #f0f4ed 77%); }
.stage::before { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #dae6db 1px, transparent 1px), linear-gradient(#dae6db 1px, transparent 1px); background-size: 28px 28px; opacity: .48; content: ""; pointer-events: none; }
.stage-label { position: absolute; z-index: 3; left: 18px; color: #536b5b; font-size: 10px; }
.stage-label--top { top: 18px; }
.stage-label--bottom { bottom: 17px; }
.stage-grid { position: absolute; right: 14%; bottom: 5%; left: 14%; height: 180px; background: linear-gradient(90deg, rgb(107 108 247 / 20%) 1px, transparent 1px), linear-gradient(rgb(107 108 247 / 20%) 1px, transparent 1px); background-size: 30px 30px; transform: perspective(420px) rotateX(67deg); transform-origin: center bottom; mask-image: linear-gradient(transparent, #000 55%); pointer-events: none; }
.origin-map { position: absolute; z-index: 3; top: 16px; right: 16px; width: 112px; padding: 8px; border: 1px solid #c9d6ca; border-radius: 10px; background: rgb(255 253 248 / 94%); box-shadow: 3px 4px 0 rgb(25 34 29 / 8%); }
.origin-map > span { display: block; margin-bottom: 5px; color: #536b5b; font: 850 10px/1 monospace; letter-spacing: .04em; }
.origin-map-grid { position: relative; height: 54px; border: 1px solid #cbd6cd; border-radius: 4px; background: linear-gradient(90deg, transparent calc(50% - 1px), #d5ded6 50%, transparent calc(50% + 1px)), linear-gradient(transparent calc(50% - 1px), #d5ded6 50%, transparent calc(50% + 1px)); }
.origin-marker { position: absolute; left: var(--origin-x, 50%); top: var(--origin-y, 50%); width: 14px; height: 14px; border: 2px solid var(--purple); border-radius: 50%; background: var(--green); transform: translate(-50%, -50%); pointer-events: none; }
.origin-marker span:first-child { position: absolute; top: 4px; left: -7px; width: 24px; height: 2px; background: var(--purple); }
.origin-marker span:last-child { position: absolute; top: -7px; left: 4px; width: 2px; height: 24px; background: var(--purple); }
.stage .card-scene { position: absolute; z-index: 2; top: 47%; left: 50%; transform: translate(-50%, -50%); }
.stage-actions { display: flex; align-items: stretch; gap: 9px; margin-top: 13px; }
.stage-actions > button { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 56px; min-width: 180px; padding: 0 15px; border: 2px solid var(--ink); border-radius: 12px; background: var(--green); color: var(--ink); font-size: 13px; font-weight: 900; transition: translate 150ms ease, box-shadow 150ms ease; }
.stage-actions > button:hover { translate: 0 -2px; box-shadow: 0 5px 0 rgb(24 34 29 / 15%); }
.stage-actions > button span { font-size: 19px; }
.stage-status { display: grid; align-content: center; flex: 1; min-width: 0; padding: 7px 12px; border: 1px solid #c6d6c8; border-radius: 12px; background: #f8fff2; }
.stage-status span { color: #607267; font-size: 10px; }
.stage-status strong { margin-top: 4px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.scene-notes { display: grid; gap: 7px; margin-top: 17px; }
.scene-notes p { display: flex; align-items: baseline; gap: 9px; margin: 0; color: #536459; font-size: 11px; line-height: 1.5; }
.scene-notes b { flex: none; min-width: 40px; color: var(--teal); }
.scene-notes code { color: #5d5fd7; font-size: 11px; }
.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: 43px; 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-tabs { display: flex; gap: 7px; padding: 16px 17px 0; }
.code-tabs button { min-width: 62px; min-height: 37px; padding: 5px 10px; border: 1px solid #536053; border-radius: 9px; background: #303a31; color: #d3ded3; font: 850 11px "SFMono-Regular", Consolas, monospace; }
.code-tabs button:hover { border-color: var(--green); }
.code-tabs button[aria-selected="true"] { border-color: var(--green); background: var(--green); color: var(--ink); }
.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; }
.guide-note a { color: #5152ca; font-weight: 800; }
.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) { .stage-actions { flex-wrap: wrap; } .stage-actions > button { flex: 1 1 100%; } .stage-status { flex: 1 1 calc(50% - 5px); } }
@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; } .stage { min-height: 430px; } .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: 40px; } .hero-actions button { padding-inline: 13px; } .section-heading h2 { font-size: 20px; } .stage { min-height: 390px; } .stage-label--bottom { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
