@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) { cursor: pointer; }
  svg { display: block; }
  [hidden] { display: none !important; }
  :where(a, button, input, pre, [tabindex]):focus-visible { outline: 3px solid #7771d8; outline-offset: 4px; }
}
@layer base {
  :root { color-scheme: light; 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(36px, 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; }
  .page { width: min(1560px, calc(100% - 80px)); margin-inline: auto; }
  .hero { padding: 38px 0 28px; }
  .eyebrow, .kicker { color: var(--green); font-size: 12px; letter-spacing: .1em; font-weight: 750; }
  .kicker { margin-bottom: 5px; }.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); }
  .brand-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .lead { max-width: 1140px; }
  .support-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; margin-top: 22px; font-size: 12px; color: var(--muted); }
  .support-badge { border: 1px solid var(--line); border-radius: 30px; padding: 5px 11px; 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; }
  .notice { border-left: 3px solid #aa551b; background: #fff1dc; padding: 14px 18px; margin-top: 18px; font-size: 14px; }
  .icon-defs, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@layer layout {
  .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 23px; overflow: clip; }
  .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border-bottom: 1px solid var(--line); }
  fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }legend { font-size: 14px; font-weight: 750; margin-bottom: 10px; }
  .keyword-field { margin: 20px 28px; }
  .experiment-toolbar { display: flex; align-items: center; gap: 25px 35px; flex-wrap: wrap; padding: 20px 28px; background: #f5f7ee; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .experiment-toolbar > fieldset { flex: 1; max-width: 480px; min-width: 330px; }
  input[type=checkbox] { accent-color: var(--green); width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
  .theme-toggle { display: flex; gap: 10px; align-items: center; font-size: 14px; }.theme-toggle small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; }
  .preview-area { padding: 25px 26px; min-width: 0; container: preview / inline-size; background: #e8ede4; background-image: linear-gradient(#c9d6c54a 1px, transparent 1px), linear-gradient(90deg, #c9d6c54a 1px, transparent 1px); background-size: 22px 22px; }
  .preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .specimen { min-width: 0; border: 1px solid #bfccba; border-radius: 15px; background: var(--paper); overflow: clip; }
  .specimen > header { padding: 17px 19px; min-height: 89px; border-bottom: 1px solid var(--line); }
  .specimen-label { font-size: 12px; color: var(--muted); font-weight: 700; }.specimen h3 { font-size: 15px; margin-top: 6px; overflow-wrap: anywhere; }
  .target-specimen { border-color: #739e83; }.target-specimen > header { background: #e4f0dc; }.target-specimen h3 { color: var(--green); }
  .sample-host { display: block; min-width: 0; }
  .specimen > .sample-host { padding: 20px 17px; }
  .specimen > footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 12px 18px; border-top: 1px solid var(--line); font: 12px/1.6 "SFMono-Regular", Consolas, monospace; }
  .specimen > footer > span { color: var(--muted); }.specimen > footer output { font-weight: 700; color: var(--green); }
  .preview-note { font-size: 12px; color: var(--muted); margin-top: 18px; }
  .outcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-top: 22px; padding: 21px; background: #fffef8e8; border: 1px solid #bdcdb8; border-radius: 14px; }
  .outcome h3 { font-size: 18px; }.outcome p:not(.kicker) { margin-top: 9px; font-size: 13px; color: var(--muted); }
  .computed-value { min-width: 150px; }.computed-value > span { font-size: 11px; color: var(--muted); }.computed-value > div { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
  #resultSwatch { width: 26px; height: 26px; border: 1px solid #203d3340; border-radius: 6px; background-image: conic-gradient(#ddd 25%, white 0 50%, #ddd 0 75%, white 0); background-size: 8px 8px; position: relative; }
  #resultSwatch::after { position: absolute; inset: 0; content: ""; border-radius: inherit; background: var(--result-color, transparent); }
  #computedValue { font: 750 16px/1.5 "SFMono-Regular", Consolas, monospace; }
  .source-panel { min-width: 0; border-left: 1px solid var(--line); padding: 24px 22px; background: #f5f7ee; }.source-panel h3 { font-size: 18px; }
  .source-intro, .source-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
  .source-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 9px; }
  .source-list li { border: 1px solid #ccd5c9; border-radius: 10px; padding: 12px; background: #fffef880; }
  .source-list li > div { display: flex; align-items: center; gap: 7px; }.source-list strong { font-size: 12px; }.origin-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
  .theme-dot { background: #8c6fb1; }.base-dot { background: #619b71; }.ua-dot { background: #6e7972; }.parent-dot { background: #b15b7b; }.initial-dot { background: #a8a695; }
  .source-list li > code, .source-list li > span { display: block; font-size: 10px; color: var(--muted); margin-top: 5px; }.source-list output { display: block; font: 700 12px/1.6 "SFMono-Regular", Consolas, monospace; margin-top: 2px; }
  .winner-label { display: none; margin-left: auto; font-size: 10px; color: var(--green); font-weight: 750; white-space: nowrap; }.source-list li.is-winner { border-color: #63967a; background: #dfeeda; box-shadow: 0 0 0 1px #00796718; }.is-winner .winner-label { display: inline; }
  .source-list li.is-unavailable { opacity: .55; }.source-list li.is-unavailable strong { text-decoration: line-through; }
  .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 { font-size: 17px; color: #f5f6ec; }
  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; overflow-wrap: anywhere; }
  .comparison-section { padding: 38px 0; }.section-heading { margin-bottom: 22px; }
  .table-wrap { border: 1px solid var(--line); border-radius: 15px; background: var(--paper); overflow-x: auto; }table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
  th, td { padding: 16px 23px; border-bottom: 1px solid var(--line); }thead th { background: #e7ede1; font-size: 12px; color: var(--muted); }tbody th { font-weight: 650; }tbody tr:last-child > * { border-bottom: 0; }td:last-child { color: var(--muted); }.table-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
  .emphasis-toggle { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 1px solid #b9cbb4; background: #edf4e5; border-radius: 10px; font-size: 14px; font-weight: 700; flex-shrink: 0; }
  .conditional-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }.conditional-preview { padding: 26px; background: #e8ede4; border-right: 1px solid var(--line); }.conditional-preview .sample-host { max-width: 440px; margin-inline: auto; }.conditional-result { margin-top: 15px; font-size: 13px; color: var(--green); font-weight: 700; text-align: center; }
  .conditional-explanation { padding: 28px; }.conditional-explanation h3 { font-size: 20px; }.conditional-explanation p { font-size: 14px; color: var(--muted); margin-top: 15px; }.detail-toolbar { margin-top: 22px; }.conditional-code { background: #172d25; color: #e9f1e5; max-height: 350px; border-top: 1px solid var(--line); }
  .notes-section { padding: 38px 0; }.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }.notes-grid article { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: #fffef8b0; }.notes-grid h3 { margin: 12px 0; }.notes-grid p { font-size: 14px; color: var(--muted); }.note-mark { color: var(--green); font: 750 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 {
  .segmented { display: grid; position: relative; isolation: isolate; padding: 4px; background: #e6ece2; border: 1px solid #c4cfc2; border-radius: 11px; anchor-scope: --choice; gap: 2px; }
  .keyword-choices { grid-template-columns: repeat(5, minmax(0, 1fr)); }.property-choices { grid-template-columns: 1fr 1.5fr; }
  .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: 8px; transition: left .18s, top .18s; pointer-events: none; }
  .segmented label { position: relative; display: grid; min-width: 0; text-align: center; font-size: 13px; font-weight: 750; }.keyword-choices label { font-family: "SFMono-Regular", Consolas, monospace; }
  .segmented input { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 8px; cursor: pointer; }.segmented label > span { display: grid; place-content: center; min-height: 42px; padding: 9px 6px; pointer-events: none; }
  .segmented small { display: block; font-size: 10px; font-weight: 500; line-height: 1.6; }.segmented label:has(input:checked) { anchor-name: --choice; color: var(--lime); }.segmented label:hover { background: #203d330a; border-radius: 8px; }.segmented label:has(input:focus-visible) { outline: 3px solid #7771d8; outline-offset: 2px; border-radius: 8px; }.segmented input:focus-visible { outline: none; }
  :disabled { cursor: not-allowed !important; }fieldset:disabled, label:has(input:disabled) { opacity: .55; }
  .copy-button, .plain-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, .plain-button:hover { background: #d9f0c5; }.copy-button:active, .plain-button:active { background: #c7e7af; }.copy-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .token-comment { color: #a2bcaa; }.token-property { color: #bceba4; }.token-value { color: #ffca9f; }.token-keyword { color: #c9c3ff; }
  .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 preview (max-width: 660px) { .preview-grid { gap: 12px; }.specimen > header { padding: 15px 12px; }.specimen h3 { font-size: 13px; }.specimen > .sample-host { padding: 17px 10px; }.specimen > footer { padding: 12px; }.outcome { grid-template-columns: 1fr; } }
  @container preview (max-width: 480px) { .preview-grid { grid-template-columns: 1fr; }.specimen > header { min-height: 0; padding: 16px 18px; }.specimen h3 { font-size: 15px; }.specimen > .sample-host { padding: 20px 17px; }.specimen > footer { padding: 12px 18px; } }
  @media (max-width: 1100px) { .workspace { grid-template-columns: minmax(0, 1fr) 280px; }.source-panel { padding: 23px 18px; }.source-list li { padding: 10px; }.preview-area { padding: 23px 20px; }.notes-grid { gap: 14px; }.notes-grid article { padding: 22px; } }
  @media (max-width: 850px) { .page { width: calc(100% - 32px); }.hero { padding-top: 28px; }.workspace { grid-template-columns: 1fr; }.source-panel { border-left: 0; border-top: 1px solid var(--line); padding: 24px; }.source-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }.source-list li { padding: 12px; }.source-list li > div { flex-wrap: wrap; }.source-list strong { font-size: 11px; }.source-list .winner-label { margin-left: 0; }.panel-heading { padding: 22px; }.notes-grid { grid-template-columns: 1fr; }.conditional-layout { grid-template-columns: 1fr 1fr; }.conditional-explanation { padding: 23px; } }
  @media (max-width: 620px) { h1 { font-size: clamp(34px, 7.4vw, 44px); }.lead { font-size: 15px; }.panel { border-radius: 17px; }.panel-heading { padding: 20px 18px; flex-wrap: wrap; }h2 { font-size: 22px; }.keyword-field { margin: 18px; }.keyword-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }.keyword-choices label { font-size: 11px; }.experiment-toolbar { padding: 20px 18px; }.experiment-toolbar > fieldset { min-width: 0; flex-basis: 100%; max-width: none; }.theme-toggle { font-size: 13px; }.theme-toggle small { font-size: 11px; }.preview-area { padding: 23px 16px; }.source-panel { padding: 23px 20px; }.source-list { grid-template-columns: 1fr; }.source-list strong { font-size: 13px; }.source-list .winner-label { margin-left: auto; }.source-list li > code, .source-list li > span { font-size: 11px; }.source-list output { font-size: 13px; }.outcome { padding: 18px; }.outcome h3 { font-size: 17px; }.code-heading { padding: 18px; flex-wrap: wrap; }.code-heading h3 { font-size: 16px; }pre { font-size: 12px; padding: 18px; }.code-note { padding: 14px 18px; font-size: 12px; }table { min-width: 660px; }th, td { padding: 14px 17px; }.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); }.conditional-layout { grid-template-columns: 1fr; }.conditional-preview { border-right: 0; border-bottom: 1px solid var(--line); padding: 23px 20px; }.conditional-explanation { padding: 23px 20px; }.conditional-explanation h3 { font-size: 18px; }.compatibility { padding: 23px 20px; }.compatibility h2 { font-size: 22px; }.page-footer { font-size: 11px; } }
  @supports not (left: anchor(left)) { .segmented::before { display: none; }.segmented label:has(input:checked) { background: var(--ink); border-radius: 8px; } }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
}
