:root {
  color-scheme: light;
  --paper: #f4f2e9;
  --ink: #192e27;
  --muted: #4e6257;
  --rule: #b8c3b7;
  --panel: #fcfaf2;
  --green: #234b43;
  --accent: #9d3623;
  --yellow: #f6d16f;
  font: 16px/1.55 'Segoe UI', 'Microsoft YaHei UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
a, button, summary, label:has([type=radio]) { touch-action: manipulation; }
a { color: var(--green); text-underline-offset: .22em; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(100% - 72px, 1272px); margin-inline: auto; }
.sr-only, .switch input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 2; inset: 8px auto auto 8px; padding: .45rem .8rem; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }
.site-head { min-height: 69px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--rule); }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: .09em; }
.site-head a { min-height: 44px; display: flex; gap: .3em; align-items: center; font-size: .87rem; font-weight: 650; }
.intro { padding: 30px 0 25px; }
h1, h2, h3, p, figure { margin: 0; }
h1 { font-family: 'Songti SC', SimSun, serif; font-size: clamp(2.9rem, 6vw, 5.4rem); line-height: 1.07; letter-spacing: .07em; }
.intro p { margin-top: 13px; max-width: 42em; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 19px; align-items: start; }
.visual, .measure { min-width: 0; padding: 19px; border: 1px solid var(--rule); border-radius: 15px; background: var(--panel); }
.section-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
h2 { font-size: 1.2rem; line-height: 1.32; }
.section-head p { margin-top: .24rem; color: var(--muted); font-size: .84rem; }
.switch { display: flex; margin: 0; padding: 3px; border: 1px solid #9bad9f; border-radius: 9px; background: #e6ebe1; }
.switch label { position: relative; cursor: pointer; }
.switch span { display: grid; place-items: center; min-height: 42px; min-width: 76px; padding: 3px 9px; border-radius: 6px; font-weight: 700; font-size: .86rem; }
.switch input:checked + span { background: var(--green); color: white; }
.switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.figure { margin-top: 15px; padding: 5px 8px 11px; border: 1px solid #b4c2b7; border-radius: 9px; background: #e9eee5; }
#diagram svg { display: block; width: 100%; max-height: 365px; }
figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 15px; font-size: .79rem; }
figcaption span { display: flex; align-items: center; gap: .35rem; }
.swatch { display: inline-block; width: 1.42rem; height: .85rem; }
.swatch.light { background: #ffd869; border: 1px solid #936311; }
.swatch.shade { background: repeating-linear-gradient(135deg, transparent 0 4px, #557177 4px 5px); border: 1px dashed #344f55; }
.swatch.overlap { background: repeating-linear-gradient(135deg, #234d47 0 4px, #fff2be 4px 5px); border: 1px solid #183e38; }
.invalid-overlay { margin: 0 .55rem .55rem; color: var(--accent); font-size: .84rem; }
.comparison { font-weight: 750; padding: 10px 12px; margin: 13px 0 9px; border-left: 4px solid var(--green); background: #e8eee2; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.plan { padding: 9px 11px; border: 1px solid var(--rule); border-radius: 8px; }
.plan h3 { font-size: .94rem; }
.plan dl { margin: .4rem 0 0; display: grid; grid-template-columns: 1fr auto; gap: .2rem .45rem; align-items: baseline; font-size: .81rem; }
.plan dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.plan .covered { font-weight: 800; }
.measure { scroll-margin-top: 1rem; }
.measure-guide, .limits { color: var(--muted); font-size: .85rem; }
.measure-guide { margin: .5rem 0 .9rem; }
.limits { margin-top: .7rem; }
.reset { min-height: 44px; padding: .35rem .65rem; color: var(--green); background: transparent; border: 1px solid #8a9d8e; border-radius: 7px; font-size: .84rem; font-weight: 700; }
.reset:hover { background: #e4ebe0; }
.rect-fields { min-inline-size: 0; margin: 0 0 .66rem; padding: 0 .58rem .55rem; border: 1px solid var(--rule); border-radius: 7px; }
.rect-fields legend { color: var(--green); padding: 0 .3rem; font-size: .9rem; font-weight: 750; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 9px; }
.rect-fields:not(:first-child) .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field label { display: block; color: var(--muted); font-size: .78rem; }
.field input { width: 100%; min-height: 44px; border: 1px solid #91a496; border-radius: 5px; padding: 4px .38rem; background: #fffef7; color: var(--ink); font-variant-numeric: tabular-nums; }
.field input[aria-invalid=true] { border: 2px solid var(--accent); }
.field-error, .field-alert { color: var(--accent); font-size: .78rem; line-height: 1.4; overflow-wrap: anywhere; }
.field-error { margin-top: .25rem; }
.field-alert:not(:empty) { margin-top: .5rem; font-weight: 650; }
.delivery { margin-top: 18px; border-radius: 13px; background: var(--green); color: #fbfaf0; padding: 17px 19px; display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; align-items: center; }
.delivery h2 { display: flex; flex-wrap: wrap; gap: .25em .6em; align-items: center; }
.delivery p { margin-top: .36rem; color: #ebf0e6; font-size: .86rem; }
.price { color: var(--yellow); font-size: .91rem; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions button { min-height: 44px; padding: .43rem .8rem; border: 1px solid var(--yellow); border-radius: 7px; color: #213b33; background: var(--yellow); font-size: .86rem; font-weight: 750; }
.actions button:focus-visible { outline-color: #ffe49e; }
.actions button:disabled { border-color: #a5bbb0; background: #325951; color: #dbe9e0; }
.delivery .message { grid-column: 1/-1; margin: 0; }
.delivery .message:empty { display: none; }
.method { margin: 12px 0 22px; color: var(--muted); font-size: .87rem; }
.method summary { display: list-item; width: fit-content; min-height: 44px; padding: 10px 4px; color: var(--green); font-weight: 700; cursor: pointer; }
.method p { max-width: 65em; padding: 0 4px .5rem; }
@media (max-width: 1050px) {
  .wrap { width: calc(100% - 40px); }
  .workspace { grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); gap: 12px; }
  .visual, .measure { padding: 13px; }
}
@media (max-width: 780px) {
  .workspace, .delivery { grid-template-columns: minmax(0, 1fr); }
  .delivery { gap: 10px; }
}
@media (max-width: 440px) {
  .wrap { width: calc(100% - 24px); }
  .intro { padding: 20px 0 16px; }
  .intro p { font-size: .91rem; }
  .site-head { min-height: 58px; }
  .visual, .measure, .delivery { padding: 11px; }
  .switch span { min-width: 65px; }
  .figure { margin-top: 10px; padding-inline: 3px; }
  .plan { padding: 8px 6px; }
  .plan dl { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .plan dt:not(:first-child) { margin-top: .24rem; }
  .plan dd { text-align: left; }
}
@media (forced-colors: active) {
  .switch input:checked + span { outline: 2px solid SelectedItem; outline-offset: -3px; }
  .swatch { forced-color-adjust: none; }
}
