.topbar { padding-inline:clamp(18px,3vw,46px); }
.model-layout { display:grid; grid-template-columns:minmax(0,1fr) clamp(310px,29%,420px); min-height:calc(100svh - 65px); }
.table {
 --table-texture:url('/assets/cotton/ash-worktop.webp');
 --table-tint-angle:125deg;
 --table-tint-start:#fff9ec2d;
 --table-tint-end:#50473615;
 background:linear-gradient(var(--table-tint-angle),var(--table-tint-start),var(--table-tint-end)),#bfb5a1 var(--table-texture) center/cover;
 min-width:0; position:relative; min-height:475px; overflow:hidden; isolation:isolate;
}
@media(min-width:761px) { .table { position:sticky; top:0; height:calc(100svh - 65px); } }
.table canvas { position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none; cursor:grab; }
.table #paper { z-index:1; }
.table #contact-shadows { pointer-events:none; z-index:2; }
.table #desk-shadow { pointer-events:none; filter:blur(1px); z-index:0; }
.table #desk-shadow[hidden] { display:none; }
.table #desk-shadow + #paper { filter:none !important; }
.table canvas:active { cursor:grabbing; }
.table-controls { position:absolute; z-index:3; left:clamp(16px,2vw,28px); bottom:20px; display:flex; gap:2px; border:1px solid #a4a196; border-radius:7px; background:#f8f7ed; box-shadow:0 2px 5px #514c3921; padding:3px; }
button.table-button { background:transparent; border:0; border-radius:4px; padding:7px 12px; font-size:14px; }
.table-button:hover,.table-button[aria-pressed=true] { background:#dce0d5; }
#stage-status { position:absolute; z-index:3; left:clamp(16px,2vw,28px); top:20px; padding:5px 11px; background:#f7f6eddc; border-radius:3px; color:#43493c; font-size:14px; pointer-events:none; }
#stage-status:empty { display:none; }
.model-panel { border-left:1px solid var(--border); padding:clamp(24px,3vw,46px) clamp(22px,2.4vw,36px); display:flex; flex-direction:column; gap:24px; background:var(--surface); }
.stock { font:12px/1.5 var(--mono); color:#5f685a; display:flex; align-items:center; gap:7px; }
.stock span:first-child { color:#a0593c; }
.model-panel h1 { font-size:clamp(48px,4.8vw,73px); line-height:1.02; margin:9px 0 12px; }
#gesture { font-size:16px; color:var(--muted); max-width:33ch; }
.fold-controls,.sequence-list,.recipe-links { border-top:1px solid var(--border); padding-top:19px; }
.field-line,.step-controls,.recipe-links { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.field-line label { font-size:15px; }
.field-line output { font:13px var(--mono); color:#57634f; }
.fold-controls input { width:100%; margin:9px 0; accent-color:#465940; min-height:28px; cursor:pointer; }
.step-controls button,#retry { font:14px Desk,system-ui,sans-serif; padding:8px 11px; background:#f3f4eb; border:1px solid #bec3b4; border-radius:4px; }
.step-controls button:hover:enabled,#retry:hover { background:#e7ebdf; }
.step-controls button:disabled { cursor:default; opacity:.42; }
#pinch-controls { margin-top:20px; }
.sequence-list h2 { font-size:26px; margin-bottom:6px; }
.sequence-list ol { display:grid; padding:0; margin:0; list-style:none; }
.sequence-list li button { display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:none; border:0; min-height:31px; padding:3px 4px; font-size:14px; color:#697061; }
.sequence-list li button::before { content:''; width:7px; height:7px; border:1px solid #8e9884; border-radius:50%; flex:none; }
.sequence-list li button[aria-current=step] { color:#262f24; font-weight:600; }
.sequence-list li button[aria-current=step]::before { background:#4e6346; border-color:#4e6346; }
.sequence-list li button:hover { text-decoration:underline; text-underline-offset:3px; }
.recipe-links { flex-wrap:wrap; justify-content:flex-start; gap:10px 20px; font-size:14px; margin-top:auto; }
.recipe-links a { text-underline-offset:4px; }
.recipe-links .button:disabled { cursor:default; }
#image-status { flex:1 0 100%; margin:0; }
#image-status:empty { position:absolute; }
#error { color:#8a3926; font-size:14px; }
@media(max-width:760px) {
 .model-layout{display:flex; flex-direction:column; }
 .table { min-height:0; height:clamp(320px,51svh,580px); }
 .model-panel { border-left:0; border-top:1px solid var(--border); gap:17px; padding:22px; }
 .step-controls button,button.table-button,.sequence-list li button {min-height:42px;}
 #gesture { max-width:none; }
 .model-panel h1 {font-size:48px; margin-top:5px;}
}
