:root { color-scheme: light; --ink:#24332c; --muted:#50625a; --accent:#295640; --line:#d4ded3; --back:#f2f5f0; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--back); font:15px/1.45 system-ui,sans-serif; }
[hidden] { display:none!important; }
a { color:var(--accent); text-underline-offset:3px; }
h1,h2,h3,p { margin:0; }
.site-head { min-height:70px; background:#fff; border-bottom:1px solid var(--line); padding:10px clamp(16px,4vw,48px); display:flex; align-items:center; justify-content:space-between; gap:14px; }
.brand { color:var(--ink); text-decoration:none; font-size:18px; font-weight:800; letter-spacing:-.04em; }
.brand span { font-weight:500; }
.cad-page { width:min(1380px,100%); margin:0 auto; padding:32px clamp(14px,4vw,48px) 48px; }
.entry,.file-head { display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:18px; }
.entry h1 { font-size:clamp(27px,4vw,40px); letter-spacing:-.035em; }
.entry p,.file-head p,.bill p,.cloud p,.share-panel p,.drop-zone p { color:var(--muted); margin-top:5px; }
.button { display:inline-flex; align-items:center; justify-content:center; cursor:pointer; min-height:44px; padding:9px 14px; max-width:100%; font:600 13px/1.25 system-ui,sans-serif; border:1px solid var(--line); border-radius:8px; background:white; color:var(--accent); text-decoration:none; text-align:center; }
.button:hover:not(:disabled) { background:#e8efe6; }
.button.primary { background:var(--accent); border-color:var(--accent); color:white; }
.button.primary:hover:not(:disabled) { background:#204934; }
.button:disabled { cursor:default; opacity:.55; }
:focus-visible,.file-button:focus-within { outline:2px solid #397657; outline-offset:3px; }
.file-button { position:relative; overflow:hidden; }
.file-button input { position:absolute; inset:0; width:100%; opacity:0; cursor:pointer; }
.drop-zone { display:grid; place-content:center; text-align:center; min-height:180px; padding:24px; border:1px dashed #8ba194; border-radius:12px; background:#fff; }
#cad[data-dragging] .drop-zone { background:#e1ede0; border-color:var(--accent); }
.account-note,.error-note { padding:12px 14px; border-radius:8px; margin:14px 0; background:#e7efe7; color:var(--ink); }
.error-note { background:#fbece7; color:#87391e; }
.actions,.view-buttons,.share-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.file-head { margin-top:21px; }
#cad-title { overflow-wrap:anywhere; line-height:1.2; font-size:clamp(20px,4vw,28px); }
.view-panel,.layers,.bill,.cloud,.share-panel { background:white; border:1px solid var(--line); border-radius:12px; min-width:0; }
.share-panel { padding:14px; margin-bottom:14px; }
.share-panel label { font-weight:650; display:block; margin-bottom:7px; }
.share-actions input { min-height:44px; flex:1 1 260px; min-width:0; width:100%; font:inherit; border:1px solid var(--line); border-radius:8px; padding:8px; }
.viewer-layout { display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px; }
.view-panel { flex:1 1 440px; overflow:hidden; }
.view-tools { padding:10px 12px; justify-content:space-between; }
.view-area { height:clamp(320px,57vh,680px); background:#f5f8f4; }
.view-area canvas { display:block; width:100%; height:100%; touch-action:pan-y; }
.view-area #cad-scene { touch-action:none; }
.layers { flex:0 1 245px; padding:14px; }
.layers h3,.bill h3 { font-size:17px; margin-bottom:5px; }
#cad-layer-list { max-height:310px; overflow:auto; }
#cad-layer-list label { display:flex; align-items:center; gap:8px; min-height:36px; overflow-wrap:anywhere; }
.cloud,.bill { margin-top:16px; padding:16px; }
.table-scroll { overflow:auto; }
table { margin-top:12px; border-collapse:collapse; width:100%; font-size:13px; }
th,td { padding:9px 10px; border-bottom:1px solid var(--line); text-align:left; }
th { background:#e9f0e7; }
tbody tr:nth-child(even) { background:#f7f9f6; }
td:last-child { white-space:nowrap; font-variant-numeric:tabular-nums; }
.projects { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr)); gap:10px; margin-top:10px; }
.projects article { display:grid; gap:8px; align-content:start; overflow-wrap:anywhere; border:1px solid var(--line); padding:12px; border-radius:8px; }
.projects article .actions { justify-content:space-between; }
.cad-guide { max-width:920px; }
.cad-guide h2 { margin:24px 0 8px; font-size:22px; }
.cad-guide h1+p { margin-top:8px; }
.cad-guide dl { display:grid; grid-template-columns:minmax(110px,1fr) 4fr; gap:10px 18px; padding:16px; background:white; border:1px solid var(--line); border-radius:12px; }
.cad-guide dt { font-weight:700; }
.cad-guide dd { margin:0; }
.cad-guide li+li { margin-top:6px; }
@media(max-width:660px) {
  .view-tools { align-items:flex-start; }
  .layers { flex-basis:100%; }
  .view-area { height:clamp(270px,49vh,440px); }
  .file-head .actions { align-self:stretch; }
}

.cad-beta { display:inline-block; padding:2px 8px; vertical-align:middle; color:var(--accent); border:1px solid var(--line); border-radius:6px; background:#fff; font-size:13px; font-weight:650; letter-spacing:normal; }
