:root {
  color-scheme:light;
  font-family:"PingFang SC","Hiragino Sans GB",system-ui,sans-serif;
  --canvas:#eeece7; --panel:#faf9f6; --ink:#252824; --sub:#545c54; --line:#cbcfc7;
  --brand:#285776; --brand-text:#fff; --brand-top:#376c91; --brand-edge:#245370;
  --cool:#e1edf3; --warm:#fcf5e5; --paper:#fffdf5; --paper-line:#dbc9a3;
  --danger:#a33432; --danger-well:#f6e6e3; --success:#32654b; --success-well:#e1eee4;
  --button-start:#fffefa; --button-end:#e9ebe5; --button-edge:#aeb6ab; --button-shadow:#141a1b14;
  --focus:#216911; --r-button:8px; --r-field:9px; --r-panel:16px;
  font-size:16px;
}
:root[data-color="dark"] {
  color-scheme:dark; --canvas:#1d211f; --panel:#2a2e2c; --ink:#f5f3ec; --sub:#c3c9bf; --line:#535d56;
  --brand:#285776; --brand-top:#376c91; --brand-edge:#6194ad; --brand-text:#fff;
  --cool:#324552; --warm:#3b3428; --paper:#332d24; --paper-line:#655740;
  --danger:#ffb0a7; --danger-well:#4b2a29; --success:#a0d4b2; --success-well:#2d4034;
  --button-start:#404844; --button-end:#2c322f; --button-edge:#707a71; --button-shadow:#0004; --focus:#bcdf96;
}

:root[data-palette="classic"] {
  --brand:#3558ab; --brand-top:#496cc0; --brand-edge:#4666b2; --cool:#e2eafd; --focus:#3558ab;
  --button-start:#fff; --button-end:#eff0f2; --button-edge:#c2c7d0;
}
:root[data-palette="classic"][data-color="dark"] {
  --brand:#3153a2; --brand-top:#4668b8; --brand-edge:#8fa9ed; --cool:#303e5f; --focus:#a9c0ff;
  --button-start:#424651; --button-end:#30343d; --button-edge:#777e92;
}

* { box-sizing:border-box; }
body { margin:0; min-width:0; background:var(--canvas); color:var(--ink); line-height:1.6; }
h1,h2,h3,p,figure { margin:0; }
h1,h2,h3 { line-height:1.13; text-wrap:balance; letter-spacing:-.035em; }
h1 { font-size:clamp(2.55rem,6.2vw,5.65rem); }
h2 { font-size:clamp(1.65rem,3.1vw,3rem); }
a { color:inherit; text-underline-offset:.22em; }
button,input,textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
:where(a,button,input,textarea,summary):focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
img { display:block; max-width:100%; }
[hidden] { display:none !important; }
.wrap { width:min(100% - 40px,1190px); margin-inline:auto; }
.studio-header { background:#292e2b; color:#f7f5eb; }
.studio-header .wrap { display:flex; justify-content:space-between; align-items:center; gap:8px 20px; flex-wrap:wrap; min-height:58px; }
.studio-header a { text-decoration:none; }
.studio-brand { font-size:1rem; font-weight:725; white-space:nowrap; }
.studio-nav { display:flex; flex-wrap:wrap; gap:4px clamp(10px,2.5vw,28px); align-items:center; }
.studio-nav a { min-height:44px; display:inline-grid; align-items:center; color:#d8ddd5; font-size:.88rem; white-space:nowrap; }
.studio-nav a[aria-current] { box-shadow:inset 0 -2px #b1c493; color:#fff; }
.visit-link { color:var(--brand); font-weight:690; text-decoration:none; }
[data-color="dark"] .visit-link { color:#aed6e7; }

.control {
  min-width:0; min-height:44px; padding:8px 15px;
  border:1px solid var(--button-edge); border-radius:var(--r-button);
  background:linear-gradient(var(--button-start),var(--button-end));
  box-shadow:inset 0 1px #ffffff55,0 2px 3px var(--button-shadow);
  color:var(--ink); font-size:.91rem; line-height:1.35; font-weight:650;
  display:inline-flex; justify-content:center; align-items:center; gap:7px; text-decoration:none; white-space:nowrap;
}
.control:hover:not(:disabled) { filter:brightness(1.045); }
.control:active:not(:disabled), .control[data-state="pressed"] { box-shadow:inset 0 2px 5px #14201f31; background:var(--button-end); }
.control.primary { color:var(--brand-text); background:linear-gradient(var(--brand-top),var(--brand)); border-color:var(--brand-edge); }
.control.primary:active:not(:disabled),.control.primary[data-state="pressed"] { background:var(--brand); }
.control.quiet { box-shadow:none; border-color:transparent; background:transparent; }
.control.quiet:hover { background:var(--cool); }
.control.link-control { border:0; box-shadow:none; padding-inline:2px; background:transparent; color:var(--brand-edge); text-underline-offset:.2em; }
.control.link-control:hover { text-decoration:underline; }
.control.danger { box-shadow:none; color:var(--danger); background:var(--danger-well); border-color:color-mix(in srgb,var(--danger) 42%,transparent); }
.control.round { width:44px; border-radius:50%; padding-inline:0; }
.control.pill { border-radius:999px; }
.control:disabled { opacity:.55; cursor:default; box-shadow:none; }
.control[aria-pressed="true"], .control[data-state="selected"] { background:var(--cool); border-color:var(--brand-edge); box-shadow:inset 0 1px 3px var(--button-shadow); }
.control[data-state="focus"] { outline:2px solid var(--focus); outline-offset:3px; }
.controls,.segmented { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.segmented { gap:0; border-radius:var(--r-button); width:fit-content; }
.segmented .control { border-radius:0; }
.segmented .control:first-child { border-radius:var(--r-button) 0 0 var(--r-button); }
.segmented .control:last-child { border-radius:0 var(--r-button) var(--r-button) 0; }
.segmented .control + .control { margin-left:-1px; }
.segmented .control:focus-visible,.segmented .control[aria-pressed="true"] { position:relative; z-index:1; }
.split-control { position:relative; display:inline-flex; align-items:center; }
.split-control .control:first-child { border-radius:var(--r-button) 0 0 var(--r-button); }
.split-control .control:nth-child(2) { margin-left:-1px; border-radius:0 var(--r-button) var(--r-button) 0; min-width:44px; padding-inline:8px; }
.split-menu { position:absolute; top:calc(100% + 5px); left:0; min-width:148px; z-index:2; padding:4px; border:1px solid var(--line); background:var(--panel); border-radius:var(--r-field); box-shadow:0 8px 18px var(--button-shadow); }
.split-menu button { width:100%; justify-content:start; }
.switch-label { display:flex; flex:none; gap:9px; align-items:center; min-height:44px; cursor:pointer; font-weight:600; font-size:.9rem; }
.switch-label input { appearance:none; width:46px; height:25px; border:1px solid var(--button-edge); border-radius:999px; background:var(--button-end); padding:2px; margin:0; cursor:pointer; box-shadow:inset 0 2px 4px #1927221c; }
.switch-label input::before { content:""; display:block; height:19px; width:19px; border-radius:50%; border:1px solid #fff9; background:#fffefa; box-shadow:0 1px 3px #15201f44; }
.switch-label input:checked { background:#d5e1f3; border-color:#899fbc; }
.switch-label input:checked::before { transform:translateX(19px); background:radial-gradient(circle at center,#315d9c 2.5px,#fffefa 3px); }
[data-color="dark"] .switch-label input:checked { background:#3d516a; border-color:#859bbf; }
.search-field {
  display:flex; min-height:46px; align-items:center; min-width:0;
  gap:10px; border:1px solid var(--button-edge); border-radius:var(--r-field);
  background:var(--panel); padding-inline:12px;
  box-shadow:inset 0 1px 3px var(--button-shadow);
}
.search-field:focus-within { border-color:var(--focus); box-shadow:0 0 0 1px var(--focus); }
.search-field :is(input,button) { min-width:0; background:transparent; border:0; }
.search-field input { width:100%; min-height:44px; outline:none; }
.search-field input::placeholder { color:var(--sub); opacity:1; }
.search-field input::-webkit-search-cancel-button { appearance:none; }
.search-field button { min-height:44px; min-width:26px; padding:0 4px; }
.search-field.pill { border-radius:999px; }
.search-field.toolbar-input { background:var(--warm); }
.search-field[data-state="error"] { border-color:var(--danger); }
.search-symbol { width:13px; height:13px; flex:none; position:relative; border:1.7px solid currentColor; border-radius:50%; margin-inline-end:3px; }
.search-symbol::after { content:""; position:absolute; width:6px; height:1.7px; border-radius:1px; background:currentColor; transform:rotate(45deg); right:-4px; bottom:-2px; }

.spec-intro { padding-block:clamp(48px,8vw,110px) clamp(25px,5.8vw,64px); }
.spec-intro h1 { margin-bottom:12px; }
.spec-intro .control { margin-top:16px; }
.spec-section { border-top:1px solid var(--line); padding:32px 0 48px; }
.spec-section h2 { margin-bottom:23px; }
.spec-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); gap:20px; }
.spec-shapes { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media(max-width:960px) { .spec-shapes { grid-template-columns:repeat(auto-fit,minmax(min(100%,205px),1fr)); } }
.spec-sample { min-width:0; border-radius:var(--r-panel); background:var(--panel); padding:20px; }
.spec-sample h3 { font-size:1rem; margin-bottom:17px; }
.spec-sample .controls { gap:10px; }
.spec-sample p { margin-top:14px; color:var(--sub); font-size:.9rem; }
.swatches { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:12px; }
.swatch { min-height:100px; padding:14px; border-radius:var(--r-button); display:flex; align-items:end; border:1px solid var(--line); font-weight:650; }
.swatch.brand { background:var(--brand); color:var(--brand-text); }
.swatch.panel { background:var(--panel); }
.swatch.cool { background:var(--cool); }
.swatch.paper { background:var(--warm); }
.swatch.danger { background:var(--danger-well); color:var(--danger); }
.swatch.success { background:var(--success-well); color:var(--success); }
.spec-comparison { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:20px; }
.demo-round-bed { display:grid; width:80px; height:80px; place-items:center; background:var(--button-end); border:1px solid var(--line); border-radius:50%; }
.demo-round-face { display:grid; place-items:center; width:68px; height:68px; padding:0; border:1px solid var(--line); border-radius:50%; box-shadow:0 5px 11px #161d2633,inset 0 1px #ffffff45; background:linear-gradient(var(--button-start),var(--button-end)); color:var(--sub); font-size:20px; }
.demo-round-face:is(:active,[data-state="pressed"]) { box-shadow:inset 0 3px 6px #1720212e; background:var(--button-end); }
.demo-round-face:disabled { opacity:.55; cursor:default; }
.spec-comparison .spec-sample { position:relative; }
.spec-result-list { padding:0; margin:8px 0 0; list-style:none; color:var(--sub); font-size:.9rem; }
.spec-result-list li { min-height:34px; padding:4px 8px; display:flex; align-items:center; border-bottom:1px solid var(--line); }
.spec-result-list li:first-child { background:var(--cool); }
.spec-status.error { color:var(--danger); }
.spec-status { display:block; min-height:1.6em; margin-top:12px; color:var(--success); }

.shop-hero { background:radial-gradient(ellipse at 78% 35%,#f9f2df,#eddfbf 64%,#dacdb1); color:#272c27; }
.shop-hero .wrap { min-height:min(76svh,750px); display:grid; grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr); gap:35px; align-items:center; padding-block:clamp(45px,7vw,96px); }
.shop-copy h1 { max-width:7em; }
.shop-copy p { margin:18px 0 24px; color:#514a38; font-size:clamp(1rem,1.7vw,1.25rem); }
.shop-hero img { width:100%; height:auto; max-height:520px; object-fit:contain; filter:drop-shadow(0 12px 11px #52382940); }
.shop-hero figcaption { font-size:.85rem; margin-top:12px; text-align:center; color:#514a38; }
.shop-collection { padding-block:clamp(38px,7vw,90px); }
.shop-collection header { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:18px; margin-bottom:32px; }
.shop-search { width:min(100%,260px); margin-left:auto; }
#shop-empty { color:var(--sub); padding:10px 0 44px; }
.shop-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(14px,3vw,32px); }
.shop-product { background:var(--panel); border-radius:var(--r-panel); overflow:hidden; min-width:0; }
.shop-product button { width:100%; display:block; background:transparent; border:0; padding:0; cursor:zoom-in; }
.shop-product img { width:100%; aspect-ratio:4/3; object-fit:contain; }
.shop-product figcaption { padding:16px 20px; }
.shop-grid > [hidden] { display:none; }
dialog { background:var(--panel); color:var(--ink); border:1px solid var(--line); border-radius:var(--r-panel); width:min(700px,94vw); padding:20px; }
dialog::backdrop { background:#17201bc7; }
dialog header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
dialog img { width:100%; height:min(57svh,440px); margin:20px 0; object-fit:contain; }
.studio-footer { padding-block:22px 38px; color:var(--sub); border-top:1px solid var(--line); }
.studio-footer a { font-size:.92rem; }

.app-frame { margin:clamp(16px,4vw,50px) auto; background:var(--panel); border:1px solid var(--line); border-radius:12px; overflow:clip; box-shadow:0 16px 40px #151e1710; }
.browser-tabs { display:flex; align-items:end; gap:6px; padding:12px 14px 0; background:var(--cool); }
.tab-list { display:flex; overflow:auto; gap:7px; flex:1; min-width:0; }
.tab { display:flex; flex:none; align-items:center; background:color-mix(in srgb,var(--panel) 48%,var(--cool)); border:1px solid var(--line); border-bottom:0; border-radius:10px 10px 0 0; }
.tab[aria-current="true"] { background:var(--panel); }
.tab button { border:0; background:none; min-height:44px; min-width:30px; }
.tab .tab-title { padding-inline:13px 5px; font-size:.88rem; font-weight:620; max-width:155px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.browser-tabs > button { min-height:40px; margin-bottom:3px; }
.browser-bar { display:grid; grid-template-columns:auto minmax(0,1fr); gap:9px; align-items:center; padding:10px 14px; border-bottom:1px solid var(--line); }
.browser-tools { display:flex; gap:5px; }
.address-wrap { position:relative; min-width:0; }
.browser-drop { position:absolute; top:100%; left:0; right:0; z-index:2; border:1px solid var(--line); border-radius:var(--r-field); background:var(--panel); box-shadow:0 8px 20px #17201a25; padding:5px; }
.browser-drop button { width:100%; min-height:44px; background:none; border:0; text-align:left; border-radius:5px; padding:5px 10px; }
.browser-drop button:is(:hover,:focus-visible) { background:var(--cool); }
.bookmarks { padding:3px 14px; border-bottom:1px solid var(--line); display:flex; gap:6px 13px; flex-wrap:wrap; }
.bookmarks button { border:0; background:none; min-height:44px; font-size:.9rem; font-weight:620; padding-inline:6px; }
.bookmarks button:hover { text-decoration:underline; }
.browser-content { min-height:410px; padding:clamp(28px,6vw,80px); }
.browser-content h1 { font-size:clamp(2rem,5vw,4rem); }
.browser-content p { max-width:53ch; margin:14px 0; color:var(--sub); }
.browser-content img { width:min(100%,700px); max-height:370px; object-fit:contain; object-position:left; margin:20px 0; }
.browser-history { border-top:1px solid var(--line); padding:13px 20px; color:var(--sub); }
.browser-history summary { cursor:pointer; width:fit-content; min-height:44px; align-content:center; }

.notes-frame { display:grid; grid-template-columns:minmax(120px,.66fr) minmax(165px,.98fr) minmax(0,2.25fr); min-height:590px; }
.note-books,.note-list { border-right:1px solid var(--line); }
.note-books { background:var(--cool); padding:18px 12px; }
.note-books h2 { font-size:1.32rem; padding:8px 6px 20px; }
.note-books .control { width:100%; margin-top:6px; justify-content:start; }
.note-list { background:var(--panel); }
.note-list .search-field { margin:12px; }
.note-record { width:100%; min-height:58px; cursor:pointer; display:block; text-align:left; border:0; border-bottom:1px solid var(--line); background:transparent; padding:10px 14px; overflow-wrap:anywhere; }
.note-record[aria-current="true"] { background:var(--warm); box-shadow:inset 3px 0 var(--paper-line); }
.note-record strong,.note-record small { display:block; }
.note-record small { color:var(--sub); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.note-empty { padding:10px 14px; color:var(--sub); }
.note-editor { display:flex; flex-direction:column; background:var(--paper); min-width:0; }
.note-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:11px 16px; border-bottom:1px solid var(--paper-line); background:var(--warm); }
.note-toolbar .control { min-width:44px; }
.note-toolbar output { color:var(--sub); font-size:.82rem; margin-left:auto; }
.note-sheet { flex:1; display:flex; flex-direction:column; gap:18px; padding:clamp(19px,4vw,53px); }
.note-sheet input,.note-sheet textarea { width:100%; padding:2px 0; border:0; background:none; }
.note-sheet input { font-size:clamp(1.45rem,3vw,2.7rem); font-weight:740; }
.note-sheet textarea { flex:1; line-height:1.9; min-height:260px; resize:vertical; }
.note-back { display:none; }

@media(max-width:760px) {
  .shop-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px) {
  .wrap { width:calc(100% - 28px); }
  .studio-header .wrap { gap:0 12px; padding-block:5px; }
  .shop-hero .wrap { grid-template-columns:1fr; min-height:0; }
  .shop-hero img { height:clamp(185px,54vw,330px); }
  .shop-search { margin-left:0; }
  .spec-sample { padding:16px; }
  .browser-tools .round { width:38px; min-height:44px; border-radius:var(--r-button); }
  .browser-bar { padding-inline:9px; gap:6px; }
  .notes-frame { display:block; }
  .note-books { display:flex; flex-wrap:wrap; align-items:center; gap:5px; border-right:0; padding:9px; }
  .note-books h2 { width:100%; padding:6px 3px; margin-bottom:2px; }
  .note-books .control { width:auto; margin:0; }
  .note-list { border-right:0; }
  .notes-frame[data-editing="false"] .note-editor,
  .notes-frame[data-editing="true"] :is(.note-list,.note-books) { display:none; }
  .note-back { display:inline-flex; }
  .note-toolbar { padding-inline:9px; }
}
@media(max-width:410px) {
  .shop-grid { grid-template-columns:1fr; }
}

.kit-intro p { color:var(--sub); }
.kit-intro a { display:inline-flex; min-height:44px; align-items:center; margin-top:8px; }
.kit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 28px; }
.kit-entry { min-width:0; background:var(--panel); border-radius:var(--r-panel); overflow:clip; }
.kit-image { display:block; border:0; background:#e8e8e8; width:100%; cursor:zoom-in; padding:4px; }
.kit-image:focus-visible { outline-offset:-3px; }
.kit-image img { width:100%; height:clamp(160px,22vw,270px); object-fit:contain; }
.kit-entry > div { padding:14px 18px 18px; }
.kit-entry h3 { font-size:clamp(1rem,2vw,1.35rem); }
.kit-entry p { color:var(--sub); margin:7px 0; }
.kit-entry a { display:inline-flex; min-height:44px; align-items:center; }
@media(max-width:620px) {
  .kit-grid { grid-template-columns:minmax(0,1fr); }
}

@media(max-width:400px) {
  .studio-header .wrap { display:grid; grid-template-columns:minmax(0,1fr); padding-block:5px 2px; }
  .studio-brand { width:fit-content; }
  .studio-nav { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; gap:8px; }
  .studio-nav a { min-height:40px; font-size:.81rem; }
}
@media(max-width:360px) {
  .browser-bar { grid-template-columns:minmax(0,1fr); gap:5px; }
  .browser-tools .control { min-height:40px; }
  #address-form { gap:6px; padding-inline:8px; }
}
