@layer reset, base, layout, components, responsive;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, pre, dl, dd { margin: 0; }
  button, input { font: inherit; color: inherit; }
  button, label:has(input), summary { cursor: pointer; }
  svg { display: block; }
  [hidden] { display: none !important; }
  :where(a, button, input, summary, pre):focus-visible { outline: 3px solid #7771d8; outline-offset: 4px; }
}
@layer base {
  :root { font: 16px/1.75 "Avenir Next", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; color: #203d33; background: #f4f3ec; --ink: #203d33; --muted: #617367; --green: #007967; --line: #ccd5c9; --paper: #fffef8; --lime: #c5ff80; }
  body { min-width: 320px; background: radial-gradient(ellipse at 95% 0, #dddcef70, transparent 28%); }
  code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
  :not(pre) > code { font-size: .9em; }
  h1 { font-size: clamp(34px, 4.5vw, 68px); line-height: 1.2; letter-spacing: 0; font-weight: 800; margin: 23px 0 20px; }
  h1 > span { color: var(--green); }
  h2 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.5; }
  h3 { font-size: 18px; line-height: 1.5; }
  a { color: var(--green); text-underline-offset: 4px; }
  a:hover { text-decoration-thickness: 2px; }
  .eyebrow, .kicker { color: var(--green); font-size: 12px; letter-spacing: .1em; font-weight: 750; }
  .kicker { margin-bottom: 5px; }
  .page { width: min(1560px, calc(100% - 80px)); margin-inline: auto; }
  .hero { padding: 38px 0 28px; }
  .eyebrow { display: flex; align-items: center; gap: 12px; }
  .brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ink); border-radius: 10px; background: var(--lime); color: var(--ink); }
  .brand-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
  .lead { max-width: 1100px; font-size: 16px; }
  .support-row { display: flex; align-items: center; gap: 9px 12px; flex-wrap: wrap; margin-top: 22px; }
  .support-badge { border: 1px solid var(--line); border-radius: 30px; padding: 5px 11px; font-size: 12px; background: var(--paper); }
  .support-badge[data-supported=true] { color: #006652; border-color: #a2bca8; background: #edf5e9; }
  .support-badge[data-supported=false] { color: #994614; border-color: #dcbda8; background: #fff3e6; }
  .support-caption { font-size: 12px; color: var(--muted); }
  .notice { border-left: 3px solid #aa551b; background: #fff1dc; padding: 14px 18px; margin-top: 18px; font-size: 14px; }
  .icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
  .measurement { position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
  .native-check { scale: calc(37px / 100px); }
  .raw-probe { scale: var(--raw) 1; }
  .progress-probe { scale: var(--progress) 1; }
  .hue-probe { rotate: calc(160deg + var(--progress) * 120deg); }
  .quotient-probe { scale: var(--quotient) 1; }
}
@layer layout {
  .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 23px; overflow: clip; }
  .panel + .panel { margin-top: 36px; }
  .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-bottom: 1px solid var(--line); }
  .subtle-tag { padding: 6px 11px; border: 1px solid var(--line); border-radius: 30px; font-size: 12px; color: var(--green); white-space: nowrap; }
  .width-toolbar { padding: 17px 28px; border-bottom: 1px solid var(--line); background: #f8faf3; }
  .width-input { display: flex; align-items: center; gap: 22px; }
  .width-input label { font-size: 14px; font-weight: 750; flex-shrink: 0; }
  input[type=range] { width: 100%; min-width: 0; accent-color: var(--green); cursor: ew-resize; display: block; min-height: 24px; margin: 0; }
  .width-input output { min-width: 58px; font: 700 14px/1.5 "SFMono-Regular", Consolas, monospace; color: var(--green); }
  #widthNote { font-size: 12px; color: var(--muted); margin-top: 5px; }
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr) 278px; }
  .preview-area { padding: 21px 26px 23px; min-width: 0; background: #e8ede4; background-image: linear-gradient(#c9d6c54a 1px, transparent 1px), linear-gradient(90deg, #c9d6c54a 1px, transparent 1px); background-size: 22px 22px; container-type: inline-size; }
  .preview-heading { display: flex; justify-content: space-between; gap: 15px; font-size: 12px; color: #587064; margin-bottom: 15px; }
  .preview-heading output { font-weight: 700; color: var(--green); }
  .width-container { margin-inline: auto; }
  .math-scene { border: 1px dashed #a5b79f; border-radius: 15px; background: #fffef8b8; position: relative; }
  .card-space { height: 347px; display: grid; place-items: center; padding: 30px 0 20px; }
  .progress-area { padding: 0 24px 21px; }
  .progress-label, .progress-stops { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
  .progress-label { margin-bottom: 8px; }
  .progress-label output { color: var(--ink); font-weight: 700; }
  .progress-stops { margin-top: 6px; font-family: "SFMono-Regular", Consolas, monospace; }
  .progress-track { width: 100%; height: 8px; background: #dce4d4; border-radius: 20px; overflow: hidden; }
  .progress-fill { height: 100%; background: #007967; border-radius: inherit; }
  .preview-note { margin-top: 16px; font-size: 12px; color: var(--muted); }
  .computed-panel { padding: 25px; background: #f5f7ee; border-left: 1px solid var(--line); }
  .computed-panel h3 { font-size: 18px; }
  .coefficient { display: grid; gap: 3px; padding: 20px 0 18px; }
  .coefficient > span { font-size: 12px; color: var(--muted); }
  .coefficient code { display: block; font-size: 11px; }
  .coefficient > output { font: 750 45px/1.3 "SFMono-Regular", Consolas, monospace; color: var(--green); }
  .coefficient > small { font-size: 11px; color: var(--muted); }
  .computed-list > div { padding: 12px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  .computed-list dt { font-size: 13px; font-weight: 700; }
  .computed-list dt span { display: block; font-size: 10px; font-weight: 500; color: var(--muted); }
  .computed-list dd { display: flex; align-items: center; gap: 7px; font: 700 16px/1.5 "SFMono-Regular", Consolas, monospace; }
  #colorSwatch { width: 15px; height: 15px; border: 1px solid #203d3340; border-radius: 4px; background: #cbd8eb; }
  .computed-note { font-size: 11px; color: var(--muted); margin-top: 15px; }
  .calculation-strip { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); border-top: 1px solid var(--line); }
  .calculation-strip > div { padding: 20px 26px; min-width: 0; }
  .calculation-strip > div + div { border-left: 1px solid var(--line); }
  .step-label { font-size: 12px; font-weight: 750; color: var(--green); }
  .calculation-strip p { font-size: 15px; margin: 7px 0; overflow-wrap: anywhere; }
  .calculation-strip output { font: 13px/1.8 "SFMono-Regular", Consolas, monospace; color: var(--muted); overflow-wrap: anywhere; }
  .code-section { min-width: 0; background: #172d25; color: #e9f1e5; }
  .code-heading { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #ffffff1d; }
  .code-heading .kicker { color: #a7c4ac; }
  .code-heading h3 { color: #f5f6ec; font-size: 17px; }
  pre { font-size: 13px; line-height: 1.85; tab-size: 2; padding: 22px 24px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
  .code-section > pre { max-height: 410px; }
  .code-note { padding: 14px 24px; font-size: 13px; border-top: 1px solid #ffffff1d; color: #b9cdbd; }
  .unit-intro { padding: 24px 28px; display: flex; justify-content: space-between; gap: 30px; align-items: center; }
  .unit-intro > p { max-width: 760px; font-size: 15px; }
  fieldset { min-width: 0; padding: 0; border: 0; margin: 0; flex-shrink: 0; }
  legend { font-size: 14px; font-weight: 750; margin-bottom: 8px; }
  .unit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
  .calc-example { min-width: 0; padding: 25px 28px; position: relative; }
  .calc-example + .calc-example { border-left: 1px solid var(--line); }
  .type-label { font-size: 11px; color: var(--green); font-weight: 750; letter-spacing: .07em; }
  .calc-example h3 { margin-top: 7px; }
  .unit-formula { display: flex; align-items: center; gap: 15px; padding: 24px 0; }
  .unit-formula code { font-size: 15px; }
  .unit-formula > span { color: var(--muted); }
  .unit-formula output { font: 700 30px/1.4 "SFMono-Regular", Consolas, monospace; color: var(--green); }
  .calc-bar { height: 20px; background: #e4eadf; border-radius: 6px; padding: 3px; }
  .calc-bar > span { display: block; height: 14px; background: #6d9b81; border-radius: 4px; }
  .time-example .calc-bar > span { background: #9285bb; }.angle-example .calc-bar > span { background: #bc8767; }
  .unit-note { font-size: 12px; color: var(--muted); margin-top: 16px; }
  .code-details { border-top: 1px solid var(--line); padding: 18px 28px; background: #f8f8f1; }
  .code-details summary { font-size: 14px; font-weight: 700; }
  .code-details pre { border-radius: 10px; margin-top: 15px; background: #172d25; color: #e9f1e5; }
  .code-details > p { font-size: 13px; color: var(--muted); margin-top: 14px; }
  .detail-toolbar { margin-top: 14px; }
  .notes-section { padding: 38px 0; }
  .section-heading { margin-bottom: 22px; }
  .rules-table-wrap { border: 1px solid var(--line); border-radius: 15px; background: var(--paper); overflow-x: auto; }
  .rules-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
  .rules-table th, .rules-table td { padding: 16px 23px; border-bottom: 1px solid var(--line); }
  .rules-table thead th { background: #e7ede1; font-size: 12px; color: var(--muted); }
  .rules-table tbody th { font-weight: 550; }
  .rules-table tbody tr:last-child > * { border-bottom: 0; }
  .rules-table td:last-child { color: var(--muted); }
  .invalid { color: #a04e27; font-size: 13px; }
  .notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
  .notes-grid article { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: #fffef8c0; }
  .notes-grid h3 { margin: 12px 0; }
  .notes-grid p { font-size: 14px; color: var(--muted); }
  .concept-label { color: var(--green); font: 700 11px/1.5 "SFMono-Regular", Consolas, monospace; letter-spacing: .04em; }
  .compatibility { border: 1px solid var(--line); border-radius: 18px; padding: 27px 28px; background: #e7ede1; }
  .compatibility h2 { font-size: 24px; }
  .compatibility > p:not(.kicker) { font-size: 14px; margin: 15px 0; max-width: 1100px; }
  .compatibility nav { display: flex; gap: 12px 25px; flex-wrap: wrap; font-size: 14px; margin-top: 22px; }
  .page-footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 12px; padding: 26px 0 35px; }
}
@layer components {
  .specimen-card { width: min(252px, 70cqw); border: 1px solid #203d3355; border-radius: 18px; padding: 18px; box-shadow: 0 20px 32px -22px #203d3370, 0 5px 10px #203d3310; color: #203d33; }
  .specimen-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 10px; font-weight: 750; letter-spacing: .07em; }
  .specimen-card header svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; }
  .card-art { height: 133px; position: relative; isolation: isolate; overflow: hidden; }
  .card-art i { position: absolute; display: block; }
  .art-ring { width: 112px; height: 112px; border: 20px solid #203d33; border-radius: 50%; left: 16%; top: 12px; }
  .art-orbit { width: 152px; height: 48px; border: 1.5px solid #203d33; border-radius: 50%; left: 2%; top: 44px; rotate: -27deg; }
  .art-block { width: 30px; height: 88px; background: #fffef8; border: 1px solid #203d3370; left: 68%; top: 34px; rotate: 28deg; }
  .art-dot { width: 17px; height: 17px; border-radius: 50%; background: #fffef8; border: 1px solid #203d3370; left: 2%; top: 84px; }
  .card-copy > p { font-size: 20px; line-height: 1.35; font-weight: 800; }
  .card-copy > span { display: block; font-size: 11px; margin-top: 7px; }
  .specimen-card footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px; border-top: 1px solid #203d3330; padding-top: 12px; margin-top: 17px; font-size: 10px; font-weight: 650; }
  .segmented { display: flex; position: relative; isolation: isolate; padding: 4px; background: #e6ece2; border: 1px solid #c4cfc2; border-radius: 10px; anchor-scope: --choice; }
  .segmented::before { content: ""; position: absolute; z-index: -1; position-anchor: --choice; left: anchor(left); top: anchor(top); width: anchor-size(width); height: anchor-size(height); background: var(--ink); border-radius: 7px; transition: left .18s, top .18s; pointer-events: none; }
  .segmented label { position: relative; display: grid; min-width: 0; flex: 1; text-align: center; font-size: 13px; font-weight: 750; }
  .segmented input { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 7px; cursor: pointer; }
  .segmented label > span { display: grid; place-items: center; padding: 8px 14px; min-height: 38px; pointer-events: none; white-space: nowrap; }
  .segmented label:has(input:checked) { anchor-name: --choice; color: var(--lime); }
  .segmented label:hover { background: #203d330a; border-radius: 7px; }
  .segmented label:has(input:focus-visible) { outline: 3px solid #7771d8; outline-offset: 4px; border-radius: 7px; }
  .segmented input:focus-visible { outline: none; }
  fieldset:disabled { opacity: .55; }
  :disabled { cursor: not-allowed !important; }
  .copy-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; padding: 8px 12px; min-height: 38px; border: 1px solid #bdcbb8; border-radius: 8px; font-size: 13px; color: var(--ink); background: var(--paper); font-weight: 750; transition: background .18s; }
  .copy-button:hover { background: #d9f0c5; }
  .copy-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .token-number { color: #ffca9f; }.token-property { color: #bceba4; }.token-word { color: #c9c3ff; }.token-comment { color: #a2bcaa; }
  .toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 10px); z-index: 100; max-width: calc(100% - 32px); padding: 12px 19px; border-radius: 11px; background: var(--ink); color: white; font-size: 14px; box-shadow: 0 5px 22px #0002; opacity: 0; visibility: hidden; transition: .2s; }
  .toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}
@layer responsive {
  @container (max-width: 420px) { .preview-heading { font-size: 11px; flex-wrap: wrap; gap: 5px; }.progress-area { padding-inline: 18px; } }
  @media (max-width: 1100px) { .workspace { grid-template-columns: minmax(0, 1fr) 240px; }.computed-panel { padding: 22px; }.unit-intro { align-items: start; gap: 22px; }.calc-example { padding: 22px; }.unit-formula { gap: 10px; }.unit-formula code { font-size: 13px; }.notes-grid article { padding: 22px; } }
  @media (max-width: 850px) { .page { width: calc(100% - 32px); }.hero { padding-top: 28px; }.workspace { grid-template-columns: 1fr; }.computed-panel { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.5fr; gap: 0 30px; }.computed-panel > .kicker, .computed-panel > h3 { grid-column: 1/-1; }.computed-list { grid-column: 2; grid-row: 3/5; }.computed-note { margin-top: 0; }.coefficient { align-self: start; }.panel-heading { padding: 22px; }.panel-heading .subtle-tag { display: none; }.unit-intro { flex-direction: column; }.notes-grid { gap: 14px; }.calc-example { padding: 20px 16px; }.unit-formula { flex-wrap: wrap; gap: 10px; }.unit-formula output { font-size: 26px; }.rules-table th, .rules-table td { padding: 14px 17px; } }
  @media (max-width: 620px) { .eyebrow { font-size: 10px; letter-spacing: .04em; }.brand-mark { width: 29px; height: 29px; }.brand-mark svg { width: 20px; height: 20px; }.hero h1 { font-size: clamp(30px, 7vw, 43px); }.lead { font-size: 15px; }.panel { border-radius: 17px; }.panel-heading { padding: 20px 18px; }h2 { font-size: 22px; }.width-toolbar { padding: 16px 18px; }.width-input { gap: 10px; }.width-input label { font-size: 12px; }.width-input output { font-size: 12px; min-width: 48px; }#widthNote { font-size: 11px; }.preview-area { padding: 18px 16px; }.card-space { height: 335px; }.computed-panel { padding: 23px; gap: 0 23px; grid-template-columns: 1fr 1.2fr; }.computed-list dd { font-size: 14px; }.computed-list dt { font-size: 12px; }.computed-list dt span { font-size: 10px; }.coefficient > output { font-size: 32px; }.computed-note { font-size: 11px; }.calculation-strip { grid-template-columns: 1fr; }.calculation-strip > div { padding: 18px; }.calculation-strip > div + div { border-left: 0; border-top: 1px solid var(--line); }.calculation-strip p { font-size: 14px; }.code-heading { padding: 18px; }.code-heading h3 { font-size: 15px; }.copy-button { font-size: 12px; padding: 8px 10px; }.copy-button svg { display: none; }pre { font-size: 12px; padding: 18px; }.code-note { padding: 14px 18px; font-size: 12px; }.unit-intro { padding: 22px 18px; }.unit-intro p { font-size: 14px; }.unit-grid { grid-template-columns: 1fr; }.calc-example { padding: 24px; }.calc-example + .calc-example { border-left: 0; border-top: 1px solid var(--line); }.unit-formula code { font-size: 16px; }.unit-formula { flex-wrap: nowrap; gap: 16px; }.unit-formula output { font-size: 30px; }.code-details { padding: 17px 18px; }.rules-table { min-width: 620px; }.rules-table-wrap::after { content: "表は横にスクロールできます"; display: block; position: sticky; left: 0; padding: 10px 18px; font-size: 11px; color: var(--muted); background: #eef1e6; width: calc(100vw - 34px); }.notes-grid { grid-template-columns: 1fr; }.notes-grid article { padding: 23px; }.compatibility { padding: 23px 20px; }.compatibility h2 { font-size: 22px; }.page-footer { font-size: 10px; } }
  @supports not (left: anchor(left)) { .segmented::before { display: none; }.segmented label:has(input:checked) { background: var(--ink); border-radius: 7px; } }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
}
