: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, .code-block: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, .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(40px, 4.4vw, 66px); font-weight: 900; line-height: 1.04; 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(272px, 286px) minmax(0, 1fr) minmax(285px, 310px); align-items: stretch; }
.controls { border-right: 1px solid var(--line); background: #f8f6ef; }
.control-section { padding: 24px 19px 26px; 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; }
.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; }
.preset-list { display: grid; gap: 8px; }
.preset-card { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 78px; padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: #fffdf8; color: var(--ink); text-align: left; transition: translate 150ms ease, border-color 150ms ease; }
.preset-card:hover { translate: 2px 0; }
.preset-card[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.preset-card > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.preset-card strong { font-size: 12px; font-weight: 900; }
.preset-card small { color: var(--muted); font-size: 10px; font-weight: 750; }
.preset-card[aria-pressed="true"] small { color: #cbd7cc; }
.preset-card > b { margin-left: auto; color: var(--purple); font-size: 20px; }
.preset-card[aria-pressed="true"] > b { color: var(--green); }
.preset-map { display: grid; flex: none; gap: 3px; width: 70px; height: 54px; padding: 4px; border: 1px solid #c8d4c9; border-radius: 7px; background: #f1f5ee; }
.preset-map--right { grid-template: "header header" 8px "main aside" 1fr "footer footer" 8px / 1fr 18px; }
.preset-map--left { grid-template: "header header" 8px "aside main" 1fr "footer footer" 8px / 18px 1fr; }
.preset-map--stack { grid-template: "header" 7px "main" 1fr "aside" 8px "footer" 7px / 1fr; }
.preset-map i { display: block; min-width: 0; min-height: 0; border-radius: 2px; }
.preset-map i:nth-child(1) { grid-area: header; background: var(--ink); }
.preset-map i:nth-child(2) { grid-area: main; background: var(--coral); }
.preset-map i:nth-child(3) { grid-area: aside; background: var(--purple); }
.preset-map i:nth-child(4) { grid-area: footer; background: var(--green); }
.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; }
input[type="range"]:disabled { cursor: not-allowed; opacity: .4; }
.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-grid-option; }
.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-grid-option) and (position-anchor: --selected-grid-option) and (anchor-scope: --selected-grid-option) and (width: anchor-size(width)) {
  .segmented-group button[aria-pressed="true"] { anchor-name: --selected-grid-option; background: transparent; box-shadow: none; }
  .segmented-group > div::before { position: absolute; z-index: 0; position-anchor: --selected-grid-option; 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: 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: 850 11px "SFMono-Regular", Consolas, monospace; }
.preview-toolbar { display: flex; align-items: end; gap: 12px; margin-bottom: 15px; }
.preview-toolbar .segmented-group { flex: 1; min-width: 0; }
.preview-viewport { display: flex; align-items: flex-start; min-height: 640px; overflow-x: auto; padding: 18px; 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; scrollbar-color: var(--purple) #d7ded5; }
.preview-viewport iframe { box-sizing: content-box; display: block; flex: none; width: 600px; height: 600px; margin-inline: auto; border: 2px solid var(--ink); border-radius: 15px; background: white; box-shadow: 8px 9px 0 rgb(25 34 29 / 15%); }
.stage-note { margin: 14px 2px 0; color: #516259; font-size: 11px; font-weight: 650; line-height: 1.65; }
.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: 18px; 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-tabs { position: relative; display: flex; gap: 5px; isolation: isolate; margin: 17px 17px 0; padding: 4px; border: 1px solid #485749; border-radius: 11px; background: #151d17; anchor-scope: --active-code-tab; }
.code-tabs button { position: relative; z-index: 1; flex: 1; min-height: 37px; border: 0; border-radius: 8px; background: transparent; color: #b4c4b4; font-size: 11px; font-weight: 850; }
.code-tabs button[aria-selected="true"] { background: var(--green); color: var(--ink); }
@supports (anchor-name: --active-code-tab) and (position-anchor: --active-code-tab) and (anchor-scope: --active-code-tab) and (width: anchor-size(width)) {
  .code-tabs button[aria-selected="true"] { anchor-name: --active-code-tab; background: transparent; }
  .code-tabs::before { position: absolute; z-index: 0; position-anchor: --active-code-tab; top: anchor(top); left: anchor(left); width: anchor-size(width); height: anchor-size(height); border-radius: 8px; background: var(--green); content: ""; pointer-events: none; transition: top 180ms ease, left 180ms ease, width 180ms ease, height 180ms ease; }
}
.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: 590px; 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-color: 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); }
.ui-initializing .segmented-group > div::before, .ui-initializing .code-tabs::before { transition: none; }
@container (max-width: 580px) { .workspace-intro { align-items: start; flex-direction: column; } .preview-toolbar { flex-direction: column; align-items: stretch; } .preview-toolbar .segmented-group { flex: none; } }
@media (max-width: 1220px) { .lab-grid { grid-template-columns: 286px 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; } .preview-viewport { min-height: 624px; padding: 11px; } .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: 36px; } .hero-actions button { padding-inline: 13px; } .section-heading h2 { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .preset-card, .segmented-group button, .segmented-group > div::before, .code-tabs::before, .hero-actions button, .code-toolbar button, .toast { transition: none; } }
