:root{
  color-scheme: light;
  --bg:#eceded; --panel:#ffffff; --field:#f0f0f0; --field-hover:#e8e8e8;
  --border:#e3e3e3; --border-strong:#d0d0d0;
  --text:#1a1a1a; --muted:#8a8a8a; --faint:#a8a8a8;
  --accent:#D4FF00; --accent-soft:#FBFFEC; --accent-ink:#252E33; --accent-hover:#D2F400; --ink-dark:#252E33;
  --good:#23b45a;
  --checker-a:#e0e0e0; --checker-b:#f5f5f5;
  --r:6px;
  --f-body:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono:'IBM Plex Mono', ui-monospace, monospace;
}

*{ box-sizing:border-box; scrollbar-width:thin; scrollbar-color:#c9cbcc transparent; }




html, body{ overflow:hidden; height:100%; }
body{ margin:0; background:var(--bg); color:var(--text); font-family:var(--f-body); font-size:12px; }
@media (prefers-reduced-motion: reduce){ *{ transition:none !important; } }
button, input{ font-family:inherit; color:inherit; font-size:12px; }
button{ cursor:pointer; }
button:focus-visible, input:focus-visible{ outline:2px solid var(--ink-dark); outline-offset:1px; }

::-webkit-scrollbar{ width:11px; height:11px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{
  background:#c9cbcc; border-radius:8px; border:3.5px solid transparent; background-clip:content-box;
}
::-webkit-scrollbar-thumb:hover{ background:#a8abad; background-clip:content-box; }
::-webkit-scrollbar-corner{ background:transparent; }

.app{ display:flex; flex-direction:column; height:100vh; min-height:640px; }
@supports (height:100dvh){ .app{ height:100dvh; } }


.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:6px 12px; background:var(--panel); border-bottom:1px solid var(--border); flex-shrink:0; min-height:40px;
}
.brand{ display:flex; align-items:center; gap:9px; font-weight:600; font-size:14.5px; letter-spacing:-0.01em; }
.brand .brand-txt{ display:flex; align-items:baseline; gap:6px; }
.brand .brand-name{ font-weight:700; }
.brand .brand-by{ font-size:11px; font-weight:400; color:var(--muted); text-decoration:none; letter-spacing:0; }
.brand .brand-by:hover{ color:var(--text); }
.brand .dot{ width:24px; height:24px; border-radius:6px; background:var(--accent); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.brand .dot svg{ width:16px; height:16px; color:var(--accent-ink); display:block; }
.fileinfo{ display:flex; align-items:center; gap:7px; margin-right:12px; font-family:var(--f-mono); font-size:11px; color:var(--muted); white-space:nowrap; }
.file-name{
  display:inline-flex; align-items:center; gap:5px; max-width:280px;
  padding:3px 6px; border:1px solid transparent; border-radius:5px;
  background:transparent; color:var(--muted); font-family:var(--f-mono); font-size:11px;
}
.file-name > span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-name:hover{ color:var(--text); background:var(--field); border-color:var(--border-strong); }
.file-pen{ flex-shrink:0; opacity:0; }
.file-name:hover .file-pen{ opacity:1; }
.file-in{
  font-family:var(--f-mono); font-size:11px; color:var(--text); width:230px;
  padding:3px 6px; border:1px solid var(--border-strong); border-radius:5px; background:var(--panel);
}

.file-in:focus, .ren-in:focus{ border-color:var(--ink-dark); }
.file-in:focus-visible, .ren-in:focus-visible{ outline:none; }
.top-actions{ display:flex; align-items:center; gap:6px; }

.btn{
  border:1px solid var(--border-strong); background:var(--panel); color:var(--text);
  padding:6px 10px; border-radius:var(--r); font-weight:500;
}
.btn:hover{ background:var(--field); }
.btn.on{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.btn-primary{ border:1px solid var(--accent); background:var(--accent); color:var(--accent-ink); padding:6px 12px; border-radius:var(--r); font-weight:600; }
.btn-primary:hover{ background:var(--accent-hover); }
.btn-dark{ border:1px solid var(--ink-dark); background:var(--ink-dark); color:#fff; padding:6px 12px; border-radius:var(--r); font-weight:600; }
.confirm-body .swap-warn{ margin:-18px 0 22px; font-size:12.5px; color:var(--muted); }
.btn-dark:hover{ background:#1a2025; }
.btn-x{ display:inline-flex; align-items:center; justify-content:center; }



.icon-b.btn-x:hover{ color:#d1343a; background:#fdecec; border-color:rgba(229,72,77,0.4); }
.btn-quiet{ border:none; background:transparent; color:var(--muted); padding:6px 8px; border-radius:var(--r); }
.btn-quiet:hover{ background:var(--field); color:var(--text); }
.btn:disabled, .btn-primary:disabled{ opacity:0.45; cursor:not-allowed; box-shadow:none; }
.btn-wide{ width:100%; }
.btn-big{ padding:10px 14px; font-size:12.5px; border-radius:8px; box-shadow:0 2px 8px rgba(212,255,0,0.45); }
.btn-big:hover{ box-shadow:0 3px 11px rgba(212,255,0,0.58); }
.btn-ico{ display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.btn-ico svg{ flex-shrink:0; }

.btn-lg{ padding:8px 14px; font-size:12.5px; border-radius:7px; }
.modal-zoom .btn-quiet, .modal-zoom .ico{ padding:4px 8px; }
.row-btn{ display:flex; gap:6px; }
.row-btn > *{ flex:1; }


.subbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:6px 12px; background:var(--panel); border-bottom:1px solid var(--border); flex-shrink:0;
}
.subbar-l{ flex:1 1 0; min-width:0; }
.steps{
  display:flex; gap:0; justify-content:center; background:var(--field);
  border-radius:8px; padding:3px; flex-shrink:0; position:relative;
}


.steps.has-bg{ background:transparent; }
.steps-bg{ position:absolute; top:0; bottom:0; left:0; right:0; border-radius:8px; background:var(--field); pointer-events:none; }
.step-ghost{ position:absolute; margin:0; pointer-events:none; z-index:1; }
.steps-ind{
  position:absolute; top:3px; bottom:3px; left:0; width:0; border-radius:6px;
  background:var(--panel); box-shadow:0 1px 3px rgba(0,0,0,0.12);
  transition:transform .26s cubic-bezier(.4,.05,.2,1), width .26s cubic-bezier(.4,.05,.2,1);
  pointer-events:none;
}
@media (prefers-reduced-motion: reduce){ .steps-ind{ transition:none; } }






.step{
  display:flex; align-items:center; gap:7px; padding:6px 16px; border-radius:6px;
  background:transparent; border:none; color:var(--muted); font-weight:600; font-size:12px;
  white-space:nowrap; position:relative; z-index:1;
}
.step:hover:not(:disabled):not(.on){ color:var(--text); }
.step.on{ color:var(--text); }





.xwrap{
  display:flex; align-items:stretch; gap:2px; margin-left:8px; padding:2px;
  border-radius:9px; background:var(--field); border:1px solid transparent; flex-shrink:0;
}
.xsw{
  display:flex; align-items:center; padding:0 9px; border:0; border-radius:7px;
  background:var(--panel); box-shadow:0 1px 3px rgba(0,0,0,0.12); cursor:pointer;
}
.xsw:hover{ background:var(--field); }
.xsw-k{
  position:relative; display:block; width:26px; height:15px; border-radius:8px;
  background:var(--border-strong); transition:background 140ms ease;
}
.xsw-k::after{
  content:''; position:absolute; top:2px; left:2px; width:11px; height:11px; border-radius:50%;
  background:var(--panel); box-shadow:0 1px 2px rgba(0,0,0,0.3); transition:transform 140ms ease;
}
.xsw[aria-checked="true"] .xsw-k{ background:var(--good); }
.xsw[aria-checked="true"] .xsw-k::after{ transform:translateX(11px); }
@media (prefers-reduced-motion: reduce){ .xsw-k, .xsw-k::after{ transition:none; } }
.xstep{
  display:flex; align-items:center; gap:6px; padding:5px 10px; border-radius:7px;
  background:transparent; border:0; color:var(--muted); font-weight:500; font-size:12px;
  white-space:nowrap; flex-shrink:0;
}
.xstep:hover:not(.on){ color:var(--text); }


.x-ic{ position:relative; display:inline-flex; }
.xwrap.done .xstep{ color:var(--text); }



@keyframes xsweep{
  0%        { transform:translateX(-150%) skewX(-14deg); }
  62%, 100% { transform:translateX(300%) skewX(-14deg); }
}
.xwrap.nudge .xstep{ color:var(--text); }
.xwrap.nudge{ position:relative; overflow:hidden; border-color:var(--accent); }
.xwrap.nudge::after{
  content:''; position:absolute; top:-2px; bottom:-2px; left:0; width:42%; pointer-events:none;
  background:linear-gradient(90deg, rgba(212,255,0,0) 0%, rgba(212,255,0,0.42) 50%, rgba(212,255,0,0) 100%);
  animation:xsweep 3.8s ease-in-out infinite;
}
.xwrap.nudge:hover::after{ animation:none; opacity:0; }
@media (prefers-reduced-motion: reduce){ .xwrap.nudge::after{ animation:none; opacity:0; } }
.xstep.on{ background:var(--panel); color:var(--text); font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,0.12); }
.steps-wrap{ display:flex; align-items:center; position:relative; }
.step:disabled{ opacity:0.4; cursor:not-allowed; }
.step .n{
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; border-radius:50%; font-family:var(--f-mono); font-size:9.5px;
  background:var(--border-strong); color:var(--panel);
}
.step.on .n{ background:var(--accent); color:var(--accent-ink); }




.step .n i{ font-style:normal; }
.n-ok{ display:none; width:9px; height:9px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.step.done{ color:var(--text); }
.step.done:not(.on) .n{ background:var(--ink-dark); color:#fff; }
.step.done:not(.on) .n i{ display:none; }
.step.done:not(.on) .n-ok{ display:block; }
.step.skip:not(.on){ color:#c2c6ca; }
.viewtools{ display:flex; align-items:center; gap:4px; flex:1 1 0; justify-content:flex-end; }
.hist-spin{
  width:12px; height:12px; border-radius:50%; flex-shrink:0; margin-right:3px;
  border:2px solid var(--border-strong); border-top-color:var(--accent);
  animation:spin .8s linear infinite;
}
.ico-txt{ display:inline-flex; align-items:center; gap:5px; }
.ico-txt svg{ flex-shrink:0; }
.ico-txt:disabled{ opacity:0.35; cursor:not-allowed; }
.zoom{ font-family:var(--f-mono); font-size:11px; color:var(--muted); min-width:42px; text-align:center; }
.ico{ width:26px; height:26px; border:1px solid var(--border-strong); background:var(--panel); border-radius:var(--r); padding:0; line-height:1; }
.ico:hover{ background:var(--field); }


.work{ flex:1; display:flex; min-height:0; }
.drop{
  position:absolute; inset:0; z-index:8; display:flex; align-items:center; justify-content:center;
  padding:24px; background:var(--bg); transition:background .15s ease;
}




.drop.reading .drop-card{ display:none; }






.canvas-wrap.hushed{ background:var(--bg); }
.canvas-wrap.hushed #view,
.canvas-wrap.hushed .ftool,
.canvas-wrap.hushed .fcard,
.canvas-wrap.hushed .float-zoom,
.canvas-wrap.hushed .float-bg,
.canvas-wrap.hushed .float-unit,
.canvas-wrap.hushed .float-keys,
.canvas-wrap.hushed .dim-in{ visibility:hidden; }

@keyframes stageIn{ from{ opacity:0; } to{ opacity:1; } }
.canvas-wrap.enter #view{ animation:stageIn .24s ease both; }
@media (prefers-reduced-motion: reduce){ .canvas-wrap.enter #view{ animation:none; } }
.drop-card{
  width:420px; max-width:100%; box-sizing:border-box; text-align:center; padding:34px 30px; border-radius:14px;
  border:2px dashed var(--border-strong); background:var(--panel);
  transition:border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.drop-ico{
  width:74px; height:74px; margin:0 auto 14px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--field); color:var(--faint);
  transition:background .15s ease, color .15s ease, transform .2s ease;
}
.drop-card h2{ margin:0 0 6px; font-size:16px; font-weight:600; }
.drop-sub{ margin:0 0 16px; color:var(--muted); font-size:11.5px; }
.drop-act{ display:flex; flex-direction:column; align-items:center; gap:7px; }
.canvas-wrap.dragover::after{
  content:''; position:absolute; inset:6px; border-radius:10px; pointer-events:none; z-index:7;
  border:2px dashed var(--accent); background:rgba(212,255,0,0.07);
}
.drop.over{ background:#DEE0E2; }
.drop.over .drop-card{
  border-color:var(--accent); transform:scale(1.02);
  box-shadow:0 12px 34px rgba(37,46,51,0.16);
}
.drop.over .drop-ico{
  background:var(--accent); color:var(--accent-ink); transform:translateY(-5px);
  animation:bob .9s ease-in-out infinite;
}
@keyframes bob{ 0%,100%{ transform:translateY(-5px); } 50%{ transform:translateY(1px); } }
@media (prefers-reduced-motion: reduce){ .drop.over .drop-ico{ animation:none; } }

.float-keys{
  position:absolute; right:14px; bottom:56px; z-index:6;
  width:28px; height:28px; display:flex; align-items:center; justify-content:center;
  background:var(--panel); border:1px solid var(--border); border-radius:8px;
  color:var(--muted); box-shadow:0 6px 18px rgba(0,0,0,0.14);
}
.float-keys:hover{ color:var(--text); border-color:var(--border-strong); }
.tip kbd{
  display:inline-block; min-width:15px; text-align:center; padding:1px 4px; margin-right:2px;
  border-radius:3px; background:rgba(255,255,255,0.16); font-family:var(--f-mono); font-size:10px;
}
.tip .krow{ display:flex; gap:8px; padding:1.5px 0; align-items:flex-start; }
.tip .krow kbd{ flex-shrink:0; white-space:nowrap; margin-top:1px; }
.tip .krow span{ opacity:0.82; }

.ftool{ position:absolute; left:14px; top:14px; z-index:6; }
.ftool .tool-b{ width:56px; box-shadow:0 6px 18px rgba(0,0,0,0.14); }


.ftool-2{ top:76px; }
.ftool-3{ top:138px; }

.face-on .tool-b{ border-color:var(--ink-dark); background:#E4E6E8; color:var(--ink-dark); }




.fcard{
  position:absolute; left:80px; top:14px; z-index:6; width:236px;
  background:var(--panel); border:1px solid var(--border-strong); border-radius:var(--r);
  padding:10px 12px 12px; box-shadow:0 8px 24px rgba(0,0,0,0.16);
}
.fcard > .sec-h{ margin-bottom:8px; }
.fcard > .sec-h h3{ margin:0; font-size:12px; font-weight:600; color:var(--text); }
.fcard-x, .icon-b{
  width:24px; height:24px; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid transparent; border-radius:5px; background:transparent; color:var(--muted); padding:0;
}
.fcard-x:hover, .icon-b:hover{ color:var(--text); background:var(--field); border-color:var(--border-strong); }
.icon-b.off{ color:var(--faint); }
.float-zoom{
  position:absolute; right:14px; bottom:14px; z-index:6;
  display:flex; align-items:center; gap:3px;
  background:var(--panel); border:1px solid var(--border); border-radius:9px;
  padding:4px; box-shadow:0 6px 18px rgba(0,0,0,0.16);
}


.dim-in{
  position:absolute; z-index:8; width:68px; padding:4px 6px;
  border:1px solid #0d99ff; border-radius:7px; background:#fff;
  color:#0d99ff; font:600 13px var(--f-body); text-align:center;
}
.dim-in:focus{ outline:2px solid rgba(13,153,255,0.28); outline-offset:1px; }

.float-unit{
  position:absolute; right:14px; top:14px; z-index:6;
  display:flex; align-items:center; gap:8px;
  background:var(--panel); border:1px solid var(--border); border-radius:9px;
  padding:5px 5px 5px 10px; box-shadow:0 6px 18px rgba(0,0,0,0.16);
}
.float-unit .fu-l{ color:var(--muted); font-size:10.5px; }
.float-unit .seg{ width:auto; }
.float-unit .seg button{ flex:0 0 auto; padding:4px 11px; font-family:var(--f-mono); font-size:11px; }
.float-bg{
  position:absolute; left:14px; bottom:14px; z-index:6;
  display:flex; align-items:center; gap:8px;
  background:var(--panel); border:1px solid var(--border); border-radius:9px;
  padding:5px 8px 5px 10px; box-shadow:0 6px 18px rgba(0,0,0,0.16);
}
.float-bg .fb-l{ color:var(--muted); font-size:10.5px; }
.float-bg .seg button{ padding:4px 9px; }


.grip{
  width:0; flex-shrink:0; cursor:col-resize; background:transparent;
  position:relative; z-index:7;
}



.grip::before{
  content:''; position:absolute; top:0; bottom:0; left:-4px; width:8px;
}
.grip::after{
  content:''; position:absolute; top:0; bottom:0; left:-1px; width:2px;
  background:var(--ink-dark); opacity:0; pointer-events:none;
  transition:opacity .12s ease;
}
.grip:hover::after, .grip.on::after{ opacity:1; }
.grip-left{ order:2; }
.grip-right{ order:4; }
.rail:not(.rail-left){ order:5; }

.canvas-wrap{ order:3; flex:1; min-width:0; position:relative; }
#view{ position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none; cursor:inherit; }
.dial, .grip, .nf-ic, .modal-stage{ touch-action:none; }

.busy{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:9;
  display:flex; align-items:center; gap:10px; padding:12px 16px; border-radius:10px;
  background:var(--panel); border:1px solid var(--border); box-shadow:0 8px 24px rgba(0,0,0,0.16);
  font-size:12.5px; font-weight:500; color:var(--text);
}
.spin{
  width:16px; height:16px; border-radius:50%; border:2px solid var(--border-strong); border-top-color:var(--accent);
  animation:spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
.ctx{
  position:absolute; z-index:6; min-width:170px; background:var(--panel);
  border:1px solid var(--border-strong); border-radius:8px; padding:4px;
  box-shadow:0 8px 24px rgba(0,0,0,0.16);
}
.ctx button{ display:block; width:100%; text-align:left; background:none; border:none; padding:6px 8px; border-radius:5px; }
.ctx button:hover{ background:var(--field); }
.ctx button:disabled{ color:var(--faint); }


.rail{
  width:302px; flex-shrink:0; background:var(--panel); border-left:1px solid var(--border);
  overflow-y:auto; overflow-x:hidden; display:flex; flex-direction:column;
  padding-bottom:44px;
  transition:width .22s cubic-bezier(.2,.7,.2,1), padding .22s cubic-bezier(.2,.7,.2,1);
}

.rail.enter{ width:0 !important; padding-bottom:0; border-left-color:transparent; }
.rail.nosl{ transition:none; }
.rail-left{
  order:1; width:254px; flex-shrink:0; background:var(--panel); border-right:1px solid var(--border); overflow-x:hidden;
  padding-bottom:0;
  border-left:none; overflow-y:hidden; display:flex; flex-direction:column;
  transition:width .22s cubic-bezier(.2,.7,.2,1), padding .22s cubic-bezier(.2,.7,.2,1);
}

.rail-left.enter{ width:0 !important; padding-bottom:0; border-right-color:transparent; }
.rail-left.nosl{ transition:none; }


.modal{
  position:fixed; inset:0; z-index:40; background:rgba(20,20,20,0.55);
  display:flex; align-items:center; justify-content:center; padding:16px;
}
.modal-card{
  background:var(--panel); border-radius:12px; box-shadow:0 24px 70px rgba(0,0,0,0.3);
  width:min(1180px, 100%); height:min(820px, 100%); max-height:100%;
  display:flex; flex-direction:column; overflow:hidden;
}
.modal-h{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid var(--border); }
.modal-h h3{ margin:0; font-size:13px; font-weight:600; }
.modal-body{ flex:1 1 auto; min-height:0; display:flex; gap:0; }
.modal-stage{
  flex:1; min-width:0; display:flex; align-items:center; justify-content:center; padding:18px;
  background-color:var(--checker-b); position:relative; overflow:hidden; cursor:grab;
}
.modal-stage.bg-checker{
  background-image:
    linear-gradient(45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-a) 75%);
  background-size:16px 16px; background-position:0 0,0 8px,8px -8px,-8px 0;
}
.modal-stage.dragging{ cursor:grabbing; }
.modal-stage.on-hole{ cursor:pointer; }

.modal-stage img, .modal-stage .big-cv{
  display:block; position:absolute; left:0; top:0;
  transform-origin:0 0; max-width:none; max-height:none; image-rendering:auto;
}
.hole-ov{ position:absolute; left:0; top:0; pointer-events:none; }




.hole-warn{
  margin:14px -12px 0; padding:11px 12px 12px; background:#fdf6ee;
  border-top:1px solid rgba(228,126,36,0.4); border-bottom:1px solid rgba(228,126,36,0.4);
}
.hole-t{ display:flex; gap:8px; margin:0 0 10px; font-size:11px; line-height:1.5; color:var(--text); }
.hole-t svg{ flex-shrink:0; margin-top:1px; color:#e47e24; }
.hole-t strong{ font-weight:600; }
.hole-warn .tgl{ margin-top:9px; background:var(--panel); border-color:#ecd3b6; }
.hole-warn .tgl:hover{ background:#faeddf; }
.hole-warn .tgl.on{ background:#E4E6E8; border-color:var(--ink-dark); }
.hole-warn .btn{ margin-top:7px; background:var(--panel); border-color:#ecd3b6; }
.hole-warn .btn:hover{ background:#faeddf; border-color:#e0b686; }




.hole-warn .hole-go{
  margin-top:0; gap:7px; font-weight:600; color:#fff;
  background:#e47e24; border-color:#cf6d17;
}
.hole-warn .hole-go:hover{ background:#d47115; border-color:#b85f0f; }
.hole-warn .hole-go svg{ opacity:.85; }
.hole-one{
  display:flex; gap:7px; align-items:flex-start; margin:9px 0 10px;
  font-size:10.5px; line-height:1.5; color:var(--muted);
}
.hole-one svg{ flex-shrink:0; margin-top:1px; color:#e47e24; }




.hole-one:not([hidden]) + .tgl{ margin-top:0; }
.hole-warn.done .hole-go{ background:var(--panel); border-color:var(--border-strong); color:var(--text); }
.hole-warn.done .hole-go:hover{ background:var(--field-hover); border-color:var(--ink-dark); }

.hole-warn.done{ background:var(--field); border-top-color:var(--border-strong); border-bottom-color:var(--border-strong); }
.hole-warn.done .hole-t svg{ color:var(--muted); }
.hole-warn.done .btn{ border-color:var(--border-strong); }
.hole-warn.done .btn:hover{ background:var(--field-hover); border-color:var(--ink-dark); }
.modal-zoom{
  position:absolute; right:10px; bottom:10px; display:flex; align-items:center; gap:3px;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--r); padding:3px;
  box-shadow:0 2px 8px rgba(0,0,0,0.1);
}
.modal-zoom .zoom{ font-family:var(--f-mono); font-size:10px; color:var(--muted); min-width:38px; text-align:center; }
.modal-side{ width:300px; flex-shrink:0; border-left:1px solid var(--border); padding:12px 14px; overflow-y:auto; }


.modal-side .lite-rows dd{ white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; }
.modal-f{
  display:flex; align-items:center; justify-content:space-between; gap:14px; row-gap:8px;
  flex-wrap:wrap; padding:11px 16px; border-top:1px solid var(--border);
}
.modal-f-r{ display:flex; align-items:center; gap:10px; margin-left:auto; }
.modal-f .dims{ white-space:nowrap; }
.confirm-card{ position:relative; width:min(460px, 100%); height:auto; max-height:100%; overflow-y:auto; border-radius:16px; }

.modal-x{ position:absolute; top:12px; right:12px; padding:6px 11px; font-size:12px; border-radius:7px; z-index:1; }
.modal-x + .confirm-body{ padding-top:48px; }


.x-only{ display:inline-flex; align-items:center; justify-content:center; padding:0; width:32px; height:30px; }
.x-only svg{ display:block; }


.modal .modal-card.swap-modal{
  width:min(500px, 100%); height:auto; max-height:100%; border-radius:16px; background:var(--bg);
}
.swap-drop{ position:static; inset:auto; z-index:auto; padding:36px; }
.swap-inner{ display:flex; flex-direction:column; gap:14px; width:100%; }
.swap-modal .drop-card{ width:100%; max-width:none; box-sizing:border-box; padding:30px 24px; }
.swap-modal .btn{ background:var(--panel); }

.modal .modal-card.swap-modal.ask{ width:min(430px, 100%); background:var(--panel); }
.swap-modal.ask .swap-drop{ display:none; }
.swap-modal #swapAskName{ word-break:break-word; }
.confirm-body{ padding:38px 40px 32px; text-align:center; }
.confirm-body h3{ margin:0 0 10px; font-size:19px; font-weight:600; letter-spacing:-0.01em; }
.confirm-body p{ margin:0 0 26px; font-size:13px; line-height:1.6; color:var(--muted); }
.confirm-act{ display:flex; flex-direction:column; gap:9px; }
.link-btn{ display:block; text-align:center; text-decoration:none; box-sizing:border-box; }
.dark-ex{ display:flex; gap:18px; justify-content:center; }
.dark-ex figure{ margin:0; flex:1; display:flex; flex-direction:column; align-items:center; gap:10px; padding:14px 10px 12px; border-radius:10px; background:#e9ebed; }
.dark-ex svg{ display:block; }
.dark-ex-img{ display:block; width:90px; height:auto; }
.dark-ex figcaption{ font-size:11.5px; line-height:1.5; color:var(--muted); text-align:center; }
.dark-ex figcaption span{ display:block; font-weight:600; margin-bottom:2px; }
.dark-ex figcaption .good{ color:var(--good); }
.dark-ex figcaption .bad{ color:#f05353; }

.rec-drop{
  width:100%; display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:20px 12px; margin-top:2px;
  border:1.5px dashed var(--border-strong); border-radius:9px;
  background:var(--panel); color:var(--muted);
  transition:border-color .13s ease, background .13s ease, color .13s ease;
}
.rec-drop:hover{ background:var(--field); color:var(--text); }
.rec-drop .rec-t{ font-size:11.5px; font-weight:600; color:var(--text); margin-top:5px; }
.rec-drop .rec-s{ font-size:10.5px; }

.rec-start{ margin:0 0 18px; padding:14px; border:1px solid var(--border); border-radius:var(--r); background:var(--panel); }
.rec-start .rec-h{ margin:0 0 10px; font-size:12px; font-weight:600; color:var(--text); }
.rec-start #recLastBtn{ margin-bottom:8px; }
.rec-drop.rec-up{ padding:16px 14px; gap:3px; text-align:center; }
.rec-drop.rec-up .rec-ico{ display:flex; color:var(--muted); margin-bottom:4px; }
.rec-drop.rec-up:hover .rec-ico{ color:var(--text); }
.rec-drop.rec-up .rec-t{ margin-top:0; }
.rec-drop.rec-up .rec-s{ line-height:1.45; }
.rec-done .rec-h{ margin:0 0 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rec-bot{ margin:0 0 10px; font-size:11.5px; color:var(--muted); }
.fin-chips.rec-chips{ justify-content:flex-start; }
.rec-note{ margin:10px 0 0; font-size:11px; line-height:1.45; color:var(--muted); }
.rec-act{ margin-top:12px; }
.rec-drop.over{
  border-color:var(--accent); background:var(--accent-soft); color:#3D474D;
}
.rec-drop.over .rec-t{ color:#3D474D; }

.dial-wrap{ display:flex; align-items:center; gap:12px; margin-top:4px; }
.dial{
  width:104px; height:104px; flex-shrink:0; border-radius:10px; cursor:grab;
  background:var(--field); border:1px solid var(--border);
}
.dial:active{ cursor:grabbing; }
.dial-val{ font-size:11px; line-height:1.5; color:var(--muted); }
.dial-val b{ display:block; color:var(--text); font-weight:600; font-size:11.5px; }

.swatches{ display:flex; gap:8px; }
.swatches button{ flex:1 1 0; min-width:0; max-width:48px; aspect-ratio:1; border-radius:8px; border:none; padding:0; background-color:transparent; }
.swatches button.own{ outline:1.5px dashed #6B7178; outline-offset:2px; }
.swatches button.on{ box-shadow:0 0 0 2px var(--panel), 0 0 0 3.5px var(--ink-dark) !important; }

.col-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-top:13px; color:var(--muted); font-size:10.5px;
}
.col-row input[type=color]{
  width:52px; height:26px; padding:0; border:1px solid var(--border-strong);
  border-radius:var(--r); background:var(--panel); cursor:pointer;
}
.col-row input[type=color]::-webkit-color-swatch-wrapper{ padding:3px; }
.col-row input[type=color]::-webkit-color-swatch{ border:none; border-radius:3px; }
.confirm-act > *{
  display:flex; align-items:center; justify-content:center; width:100%; min-height:46px;
  padding:0 16px; font-size:13.5px; font-weight:600; border-radius:9px; line-height:1.2; box-sizing:border-box;
}
.confirm-act .btn{ font-weight:500; }
.page-grid{
  flex:1; min-height:0; overflow-y:auto; padding:14px;
  display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:12px; align-content:start;
}




.page-c{
  display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px;
  border:1px solid var(--border-strong); border-radius:8px; background:var(--panel);
  color:var(--muted); font-size:11px; font-weight:500;
}
.page-c:hover{ border-color:var(--ink-dark); background:var(--field); color:var(--ink-dark); }
.page-c:hover .page-th{ background:#E4E6E8; }
.page-th{
  width:100%; height:180px; display:flex; align-items:center; justify-content:center;
  background:var(--field); border-radius:4px; overflow:hidden;
}
.modal-f button{ white-space:nowrap; }
.modal-name{ display:flex; align-items:baseline; gap:10px; min-width:0; }
.modal-name h3{ white-space:nowrap; }
.modal-name .file-name{ max-width:min(340px, 34vw); }
.bg-pick{ display:flex; align-items:center; gap:8px; }
.bg-pick .seg button{ padding:6px 11px; white-space:nowrap; }

.modal-stage.bg-white{ background:#ffffff; background-image:none; }
.modal-stage.bg-black{ background:#101010; background-image:none; }
.sec{ border-bottom:1px solid var(--border); padding:13px 12px 15px; }

.locked{ opacity:0.4; pointer-events:none; user-select:none; -webkit-user-select:none; }

.fold-b{
  display:inline-flex; align-items:center; gap:6px; padding:2px 4px; border-radius:5px;
  background:transparent; border:1px solid transparent; color:var(--muted); font-size:10.5px; font-weight:500;
}
.fold-b:hover{ color:var(--text); background:var(--field); border-color:var(--border-strong); }
.fold-b .chev{ transition:transform 140ms ease; }
.sec.shut .fold-b .chev{ transform:rotate(-90deg); }
.sec.shut .fold-body{ display:none; }
.sec.shut{ padding-bottom:13px; }
.sec.shut > .sec-h{ margin-bottom:0; }

.fold-b > span:empty{ display:none; }
.fold-sum{ display:inline-flex; align-items:center; gap:5px; color:var(--good); font-weight:500; }
.sec-h{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  flex-wrap:wrap; row-gap:6px; margin-bottom:9px; min-height:18px;
}

.sec-group > .sec-h{
  margin:-13px -12px 0; padding:8px 12px 7px;
  background:var(--field); border-bottom:1px solid var(--border);
}
.sec-group > .sec-h h3{ font-size:10.5px; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); }
.sec-group{ padding-top:13px; padding-bottom:0; }
.sec-group > div:last-child{ margin-bottom:0; }
.grp-act{ display:flex; align-items:center; gap:9px; }

.add-btn{
  display:inline-flex; align-items:center; gap:5px; padding:4px 8px 4px 6px;
  border:1px solid var(--border-strong); border-radius:5px; background:var(--field);
  color:var(--muted); font-size:10.5px; font-weight:500; line-height:1;
}
.add-btn svg{ display:block; flex-shrink:0; }
.add-btn:hover{ border-color:var(--ink-dark); background:#E4E6E8; color:var(--ink-dark); }
#finList .layer{ cursor:grab; }
#finList .layer:active{ cursor:grabbing; }
.layer button, .layer input{ cursor:pointer; }
.layer .ren-in{ cursor:text; }
.sorting, .sorting .layer, .sorting .layer *{ cursor:grabbing !important; }
.layer.drag{ opacity:0.42; }
.layer.drop-before{ box-shadow:inset 0 2px 0 var(--ink-dark); }
.layer.drop-last{ box-shadow:inset 0 -2px 0 var(--ink-dark); }
.rail .seg button{ min-width:0; overflow:hidden; text-overflow:ellipsis; }
.sec-h h3{ margin:0; min-width:0; font-size:11.5px; font-weight:600; letter-spacing:0.01em; }
.sec-note{ color:var(--muted); font-size:11px; line-height:1.5; margin:0 0 9px; }
.sec-note:last-child{ margin-bottom:0; }


.sl{ margin-top:13px; }
.sl-h{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:6px; }
.sl-n{ color:var(--muted); font-size:10.5px; flex:1 1 auto; min-width:0; }
.sl-v{ font-family:var(--f-mono); font-size:10.5px; color:var(--text); }
.sl input[type=range]{
  -webkit-appearance:none; appearance:none; width:100%; height:16px;
  background:transparent; display:block; margin:0; padding:0; cursor:pointer;
}
.sl input[type=range]::-webkit-slider-runnable-track{ height:4px; border-radius:2px; background:var(--border-strong); }
.sl input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none; width:15px; height:15px; margin-top:-5.5px;
  border-radius:50%; background:var(--accent); border:1.5px solid var(--ink-dark);
  box-shadow:0 1px 3px rgba(0,0,0,0.28);
}
.sl input[type=range]::-moz-range-track{ height:4px; border-radius:2px; background:var(--border-strong); }
.sl input[type=range]::-moz-range-thumb{
  width:15px; height:15px; border-radius:50%; background:var(--accent);
  border:1.5px solid var(--ink-dark); box-shadow:0 1px 3px rgba(0,0,0,0.28);
}
.sl input[type=range]:focus{ outline:none; }

.slp{ display:flex; align-items:flex-start; gap:10px; }
.slp-pic{ flex:0 0 64px; width:64px; height:40px; border-radius:var(--r); background:var(--field); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.slp-pic svg{ display:block; }
.slp-main{ flex:1; min-width:0; }
.slp-word{ font-size:10.5px; color:var(--muted); margin-top:4px; line-height:1.4; }


.sl-n, .slp-word{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }


.sl, .lbl, .slp-word, .sec-note{ user-select:none; -webkit-user-select:none; cursor:default; }
.sl.center{ position:relative; }
.sl.center::after{
  content:''; position:absolute; left:50%; bottom:6px; width:1px; height:8px;
  background:var(--border-strong); transform:translateX(-0.5px); pointer-events:none;
}




.shape-b.swap-out{ opacity:0.32; }
.fin-guide{ display:flex; align-items:center; gap:10px; margin-top:8px; padding:8px 10px; border:1px dashed var(--border-strong); border-radius:var(--r); background:var(--field); color:var(--muted); font-size:11px; line-height:1.4; }
.fin-guide svg{ flex-shrink:0; }
.fin-guide.placed{ border-style:solid; background:transparent; }
.mini-step{
  display:flex; align-items:center; gap:7px;
  font-size:11.5px; font-weight:600; color:var(--text);
}

.reset-b{
  margin-left:auto; padding:2px 7px; border-radius:5px; background:transparent;
  border:1px solid var(--border-strong); color:var(--muted); font-size:10px; font-weight:500;
}
.reset-b:hover{ color:var(--text); background:var(--field); border-color:var(--ink-dark); }



.again-btns .btn{ font-size:11px; padding:6px 8px; gap:5px; }


#edgeRow{ margin:0 0 14px; padding:0 0 14px; border-bottom:1px solid var(--border); }
.mini-step .n{
  flex-shrink:0; width:16px; height:16px; border-radius:50%;
  background:var(--ink-dark); color:#fff; font-family:var(--f-mono); font-size:9px;
  display:flex; align-items:center; justify-content:center;
}
#finParams[hidden] + .sec{ display:none; }


.tip{
  position:fixed; z-index:80; max-width:290px; padding:8px 10px; border-radius:7px;
  background:#1c1c1e; color:#fff; font-size:11px; line-height:1.45;
  box-shadow:0 6px 20px rgba(0,0,0,0.22); pointer-events:none; opacity:0;
  transform:translateY(3px); transition:opacity .12s ease, transform .12s ease;
}
.tip.on{ opacity:1; transform:translateY(0); }
.tip b{ display:block; font-weight:600; margin-bottom:2px; }

.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.grid2.tight{ gap:5px; }
.lbl{ color:var(--muted); font-size:10.5px; margin:0 0 4px; }
.lbl-why{ color:var(--faint); }
.lbl-why::before{ content:'\00b7  '; }


.nf{ display:flex; align-items:center; gap:5px; background:var(--field); border:1px solid transparent; border-radius:var(--r); padding:4px 6px; }
.nf:hover{ background:var(--field-hover); }
.nf:focus-within{ background:var(--panel); border-color:var(--ink-dark); }
.nf .nf-ic{ width:14px; height:14px; flex-shrink:0; color:var(--muted); cursor:ew-resize; display:flex; align-items:center; justify-content:center; }
.nf input{ width:100%; min-width:0; border:none; background:transparent; padding:0; font-size:11.5px; }
.nf input:focus{ outline:none; }



.h-ico{ display:inline-flex; align-items:center; gap:7px; }
.h-ico svg{ width:16px; height:16px; color:var(--ink-dark); flex-shrink:0; }
.pen-live{ margin:0 0 10px; padding:7px 9px; border-radius:var(--r); background:var(--field); font-size:11px; line-height:1.45; color:var(--text); }
.pen-steps{ list-style:none; margin:0 0 12px; padding:0; color:var(--muted); font-size:11px; line-height:1.45; }
.pen-steps li{ display:flex; align-items:center; gap:8px; margin:0 0 5px; }
.pen-steps .ps-n{ flex:0 0 16px; width:16px; height:16px; border-radius:50%; border:1.5px solid var(--border-strong); display:inline-flex; align-items:center; justify-content:center; font-size:9px; font-weight:600; color:var(--muted); box-sizing:border-box; transition:background-color .15s ease, border-color .15s ease, color .15s ease; }
.pen-steps li.now{ color:var(--text); font-weight:500; }
.pen-steps li.now .ps-n{ border-color:var(--ink-dark); color:var(--ink-dark); }
.pen-steps li.done{ color:var(--muted); }
.pen-steps li.done .ps-n{ background:var(--good); border-color:var(--good); color:#fff; font-size:0; }
.pen-steps li.done .ps-n::after{ content:''; width:6px; height:3px; border-left:1.6px solid #fff; border-bottom:1.6px solid #fff; transform:translateY(-1px) rotate(-45deg); }
.pgrp{ display:flex; align-items:center; gap:9px; margin:14px 0 7px; }
.pgrp-ic{ flex:0 0 32px; width:32px; height:32px; border-radius:var(--r); background:var(--field); display:flex; align-items:center; justify-content:center; color:var(--ink-dark); }
.pgrp-ic svg{ width:20px; height:20px; }
.pgrp-t{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:1px; }
.pgrp-t b{ font-size:11.5px; font-weight:600; color:var(--text); }
.pgrp-t span{ font-size:10.5px; color:var(--muted); line-height:1.35; }
.pgrp-seg{ width:92px; flex-shrink:0; }

.seg{ display:flex; max-width:100%; background:var(--field); border-radius:var(--r); padding:2px; position:relative; }
.seg button{ flex:1; border:none; background:transparent; border-radius:4px; padding:4px 6px; color:var(--muted); font-weight:500; position:relative; z-index:1; transition:color .1s ease; }
.seg button.on{ color:var(--text); font-weight:600; }
.seg button:hover:not(.on){ color:var(--ink-dark); }
.seg-ind{ position:absolute; top:0; left:0; height:0; border-radius:4px; background:var(--panel); box-shadow:0 1px 2px rgba(0,0,0,0.08); transition:transform .26s cubic-bezier(.4,.05,.2,1), width .26s cubic-bezier(.4,.05,.2,1); pointer-events:none; z-index:0; }
@media (prefers-reduced-motion: reduce){ .seg-ind{ transition:none; } }

.tools{ display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.tool-b{
  border:1px solid var(--border-strong); background:var(--panel); border-radius:var(--r);
  padding:7px 1px 5px; display:flex; flex-direction:column; align-items:center; gap:3px;
  color:var(--muted); font-size:9.5px; font-weight:500;
}
.tool-b:hover{ border-color:var(--ink-dark); background:var(--field); color:var(--ink-dark); }
.tool-b.on{ border-color:var(--ink-dark); background:#E4E6E8; color:var(--ink-dark); }
.frame-ex{ display:flex; gap:8px; }



.fx{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 6px 10px; border-radius:var(--r); border:0; background:#f4f4f2; cursor:default; }
.fx svg{ display:block; max-width:100%; }
.fx > svg{ width:100%; max-width:104px; height:auto; }
.fx span{ display:inline-flex; align-items:center; gap:4px; font-size:10.5px; font-weight:600; }
.fx.good span{ color:var(--ink-dark); }
.fx.bad span{ color:var(--ink-dark); font-weight:600; }


.fx.good span svg{ color:var(--good); }
.fx.bad span svg{ color:#e47e24; }
.frame-lead{ margin:-2px 0 12px; font-size:12.5px; color:var(--muted); }
.frame-rules{ margin:14px 0 14px; }
.frame-rules p{ display:flex; align-items:flex-start; gap:8px; margin:0 0 8px; font-size:12px; line-height:1.4; color:var(--text); }
.fr-ic{ flex:0 0 16px; width:16px; height:16px; border-radius:50%; border:1.5px solid var(--muted); display:flex; align-items:center; justify-content:center; margin-top:0; }
.fr-ic svg{ width:10px; height:10px; fill:none; stroke:var(--muted); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.frame-ready{ display:flex; flex-direction:column; align-items:center; text-align:center; padding:8px 0 16px; }
.frame-ready .found-state{ margin-bottom:10px; }
.frame-ready .fr-t{ margin:0; font-size:14px; font-weight:600; color:var(--text); }
.frame-ready .fr-s{ margin:3px 0 0; font-size:12px; color:var(--muted); }
.link-quiet{ display:block; margin:10px auto 0; padding:2px 4px; border:0; background:none; font-size:12px; color:var(--muted); text-decoration:underline; cursor:pointer; }
.link-quiet:hover{ color:var(--text); }


.bot-tile{
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  border:1px solid var(--border); background:var(--panel); border-radius:var(--r);
  padding:0; margin:0;
}
.bot-pic{ display:block; width:100%; max-width:100%; height:auto; margin:0; }


.face-done{
  display:flex; align-items:flex-start; gap:8px; width:100%; margin:0 0 12px;
  border:1px solid var(--border-strong); background:var(--panel); border-radius:var(--r);
  padding:7px 9px; text-align:left; color:var(--text); font-size:11px; font-weight:500;
  line-height:1.45;
}
.face-done svg{ flex-shrink:0; color:#0d99ff; margin-top:1px; }
.face-done .fd-t{ min-width:0; flex:1; }
.face-done .fd-a{ flex-shrink:0; color:var(--muted); font-weight:600; }
.face-done:hover{ background:var(--field); }
.face-done:hover .fd-a{ color:var(--text); }

.note-tip{
  margin-top:8px; padding:7px 9px; border-radius:var(--r); font-size:11px; line-height:1.5;
  background:var(--accent-soft); color:#3D474D; border:1px solid rgba(200,230,0,0.45);
}
.note-tip strong{ font-weight:600; }
.note-tip.warn{ background:#fdf0e2; border-color:#f0c69a; color:#e47e24; }

.note-tip.ok{ background:var(--field); border-color:var(--border); color:var(--text); }
.note-tip.bad{ background:#fdecec; border-color:#f4b0b0; color:#f05353; }


.confirm-body .note-tip{ width:fit-content; max-width:100%; box-sizing:border-box; margin:10px auto 0; padding:7px 14px; text-align:center; }


.tgl{
  display:flex; align-items:center; gap:8px; width:100%;
  border:1px solid var(--border); background:var(--panel); border-radius:var(--r);
  padding:6px 8px; text-align:left; color:var(--text); font-weight:500;
}
.tgl:hover{ background:var(--field); }
.tgl .sw{
  flex-shrink:0; width:26px; height:15px; border-radius:8px; background:var(--border-strong);
  position:relative; transition:background .14s ease;
}
.tgl .sw::after{
  content:''; position:absolute; top:2px; left:2px; width:11px; height:11px; border-radius:50%;
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,0.25); transition:transform .14s ease;
}
.tgl.on{ border-color:var(--ink-dark); background:#E4E6E8; color:var(--ink-dark); }
.tgl.on .sw{ background:var(--ink-dark); }
.tgl.on .sw::after{ transform:translateX(11px); }


.tgl-go.on{ border-color:rgba(35,180,90,0.5); background:rgba(35,180,90,0.12); color:#1c6b42; }
.tgl-go.on .sw{ background:var(--good); }


.seg-pic button{ display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 4px; font-size:10.5px; }
.seg-pic svg{ display:block; }

.ico-done{ display:none; }
.btn-primary.done{ background:var(--accent-soft); color:var(--accent-ink); border-color:var(--accent); box-shadow:none; }
button.done .ico-go{ display:none; }
button.done .ico-done{ display:block; }

.ico-read{ display:none; width:12px; height:12px; border-radius:50%; border:2px solid currentColor; border-top-color:transparent; opacity:.7; animation:spin .8s linear infinite; flex-shrink:0; }
button.reading .ico-go, button.reading .ico-done{ display:none; }
button.reading .ico-read{ display:inline-block; }



.sl-row{ display:flex; align-items:center; gap:11px; margin-top:13px; }
.sl-row .sl{ flex:1 1 auto; min-width:0; margin-top:0; }
.sl-row .brush-prev{ width:90px; height:90px; flex:0 0 90px; margin-top:0; }
.brush-prev{
  display:block; width:100%; height:75px; margin-top:9px; border-radius:var(--r);
  background:
    linear-gradient(45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-a) 75%);
  background-size:10px 10px; background-position:0 0,0 5px,5px -5px,-5px 0;
  background-color:var(--checker-b); border:1px solid var(--border);
}

.shapes{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.shape-b{
  position:relative; overflow:hidden;
  border:1px solid var(--border-strong); background:var(--panel); border-radius:var(--r);
  padding:7px 2px 5px; display:flex; flex-direction:column; align-items:center; gap:3px;
  color:var(--muted); font-size:9.5px; font-weight:500; transition:opacity 120ms ease;
}
.shape-b:hover{ border-color:var(--ink-dark); background:var(--field); color:var(--ink-dark); }
.shape-b.on{ border-color:var(--ink-dark); background:#E4E6E8; color:var(--ink-dark); }

#layers, #healList, #finList{ margin:0 -12px; overflow:visible; }
#layers .layer:last-child, #healList .layer:last-child, #finList .layer:last-child{ border-bottom:none; }
#layers:empty, #healList:empty, #finList:empty{ display:none; }
.layer{
  display:flex; align-items:center; gap:8px; padding:8px 12px; min-height:50px;
  border-bottom:1px solid var(--border); position:relative; cursor:pointer;
}
.layer:hover{ background:var(--field); }
.layer.on{ background:#FAFBFC; }
.layer.on::before{ content:''; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--ink-dark); box-shadow:0 0 6px 2px rgba(37,46,51,0.25); }
.layer-th{
  width:34px; height:34px; flex-shrink:0; border-radius:4px; border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; overflow:hidden;
  background:
    linear-gradient(45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-a) 75%);
  background-size:8px 8px; background-position:0 0,0 4px,4px -4px,-4px 0; background-color:var(--checker-b);
}
.layer-th img{ max-width:100%; max-height:100%; }
.row-dot{ width:20px; height:20px; border-radius:5px; flex-shrink:0; margin-right:2px; }
.layer-m{ flex:1; min-width:0; }
.layer-n{ font-size:11.5px; font-weight:500; line-height:20px; min-height:20px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.layer-k{ font-size:10px; line-height:13px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.layer-d{ font-family:var(--f-mono); font-size:10px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.layer-acts{ display:flex; align-items:center; gap:2px; flex-shrink:0; margin-left:2px; }

.layer-n.ren{ cursor:text; display:inline-flex; align-items:center; gap:5px; max-width:100%; }
.layer-n.ren > span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.layer-n .ren-pen{ flex-shrink:0; opacity:0; color:var(--faint); }
.layer:hover .layer-n .ren-pen{ opacity:1; }
.layer-n.ren:hover{ color:var(--ink-dark); }
.ren-in{
  width:100%; height:20px; box-sizing:border-box; line-height:1;
  font-size:11.5px; font-weight:500; padding:2px 5px;
  border:1px solid var(--border-strong); border-radius:4px; background:var(--panel);
}

.layer.dim .layer-th, .layer.dim .layer-m{ opacity:0.42; }

.marks{ display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
.mark{
  display:inline-flex; align-items:center; gap:4px; padding:2px 7px 2px 5px;
  border:none; border-radius:11px; font-size:10px; font-weight:600; line-height:1.6;
  background:#fff; color:#3D474D; box-shadow:inset 0 0 0 1px var(--border-strong);
}
.mark .mk-x{ display:none; }
.mark:hover{ background:#fdeceb; color:#f05353; box-shadow:inset 0 0 0 1px rgba(240,83,83,0.4); }
.mark:hover .mk-i{ display:none; }
.mark:hover .mk-x{ display:block; }

.dims{ font-family:var(--f-mono); font-size:10.5px; color:var(--muted); margin:6px 0 0; text-align:center; }

.status{ padding:8px 12px; font-size:11px; color:var(--good); min-height:30px; line-height:1.4; }
.status.warn{ color:#e47e24; }



.btn, .btn-primary, .btn-dark, .btn-quiet, .tool-b, .shape-b, .tgl, .rec-drop, .preview, .step, .xstep, .layer, .swatches button, .mark, .brand-by, .float-keys,
.optb, .opt-row, .add-btn, .face-done, .fcard-x, .icon-b, .file-name, .fold-b, .found-row, .hole-go, .ico, .reset-b, .fin-row, .bot-t, .bot-mark, .page-c, .nf, .xsw, .lite-rows > div, .ctx button, .link-quiet, .layer-n.ren, .confirm-body .help-link, .found-ico, .fd-a, .fr-a{ transition: background-color .1s ease, border-color .1s ease, color .1s ease, box-shadow .1s ease, transform .1s ease, opacity .1s ease; }
.optb:hover .optb-chev{ stroke:var(--text); }
.opt-row.on:hover:not(.off){ background:var(--field-hover); }
[hidden]{ display:none !important; }


.too-small{
  position:fixed; inset:0; z-index:100; display:none; align-items:center; justify-content:center;
  padding:24px; background:var(--bg); text-align:center;
}
.too-small .ts-card{ max-width:360px; }

.too-small .ts-dot{ width:56px; height:56px; border-radius:14px; background:var(--accent); display:flex; align-items:center; justify-content:center; margin:0 auto 18px; }
.too-small .ts-dot svg{ width:37px; height:37px; color:var(--accent-ink); display:block; }
.too-small h2{ margin:0 0 8px; font-size:17px; font-weight:600; }
.too-small p{ margin:0; font-size:13px; line-height:1.55; color:var(--muted); }
@media (max-width: 999px), (max-height: 519px){ .too-small{ display:flex; } }










.bot-kinds{ margin:10px 0 10px; }
.bot-kinds input[type=range]::-webkit-slider-runnable-track{
  background:linear-gradient(to right, var(--ink-dark) 0 var(--p,50%), var(--border-strong) var(--p,50%) 100%);
}
.bot-kinds input[type=range]::-moz-range-track{
  background:linear-gradient(to right, var(--ink-dark) 0 var(--p,50%), var(--border-strong) var(--p,50%) 100%);
}



.bot-marks{ position:relative; height:30px; margin:0 0 4px; }
.bot-mark{
  position:absolute; top:0; width:0; padding:0; border:0; background:none;
  display:flex; flex-direction:column; align-items:center; cursor:pointer; color:var(--muted);
}
.bot-mark::before{ content:''; width:1px; height:5px; background:var(--border-strong); }
.bot-mark:nth-child(even)::before{ height:15px; }
.bot-mark .bm-t{
  position:absolute; top:7px; left:50%; transform:translateX(-50%);
  font-size:9.5px; line-height:1.2; white-space:nowrap;
}
.bot-mark:nth-child(even) .bm-t{ top:17px; }



.bot-mark.bm-l .bm-t{ left:-3px; transform:none; }
.bot-mark.bm-r .bm-t{ left:auto; right:-3px; transform:none; }
.bot-mark:hover{ color:var(--ink-dark); }
.bot-mark:hover::before{ background:var(--ink-dark); }
.bot-mark.on{ color:var(--ink-dark); }
.bot-mark.on::before{ background:var(--ink-dark); }
.bot-mark.on .bm-t{ font-weight:600; }


.bot-mm{ margin:8px 0 12px; text-align:center; font-family:var(--f-mono); font-size:10.5px; color:var(--text); }
.bot-t{
  display:flex; align-items:center; gap:5px; width:100%; margin:0 0 4px;
  break-inside:avoid; -webkit-column-break-inside:avoid;
  padding:4px 6px; border:1px solid transparent; border-radius:5px;
  background:none; color:var(--faint); font-size:9.5px; font-weight:500;
  text-align:left; cursor:pointer;
}
.bot-t .bt-n{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; flex:1; }
.bot-t .bt-k{ display:none; flex-shrink:0; }
.bot-t:hover{ color:var(--text); background:var(--field); }



.bot-t.on:hover{ background:rgba(35,180,90,0.3); border-color:var(--good); }
.bot-t.on{ color:#1c6b42; background:rgba(35,180,90,0.18); border-color:rgba(35,180,90,0.5); font-weight:600; }
.bot-t.on .bt-k{ display:block; color:var(--good); }






.bot-row{ display:flex; align-items:stretch; gap:10px; margin:2px 0 10px; }




.bot-row .bot-tile{ flex:0 0 50%; min-width:0; }



.bot-side{ flex:1; min-width:0; display:grid; grid-template-columns:1fr 1fr; grid-template-rows:minmax(0, 1fr) auto; column-gap:6px; row-gap:4px; border:1px solid var(--border); border-radius:var(--r); background:var(--panel); padding:8px 6px 6px; }
.lab-col{ min-width:0; min-height:0; display:flex; flex-direction:column; align-items:center; gap:6px; padding-top:0; }
.lab-h{ font-size:10px; font-weight:600; color:var(--text); line-height:1.2; }


.lab-v{ font-family:var(--f-mono); font-size:9.5px; color:var(--muted); line-height:1.2; min-height:12px; white-space:nowrap; letter-spacing:-0.02em; }
.lab-cap{ display:flex; align-items:center; justify-content:center; color:var(--faint); height:9px; }


.lab-cap .lim-t{ display:none; }
.lab-cap.lim svg{ display:none; }
.lab-cap.lim .lim-t, .lab-v.lim{
  display:inline-block; padding:1px 6px; border-radius:20px; background:var(--ink-dark); color:#fff;
  font-family:var(--f-body); font-size:9px; font-weight:600; line-height:12px; letter-spacing:.02em;
}
.lab-cap.lim{ height:14px; margin:-2px 0 -3px; }




.lab-rail, .lab-rail.sl{ position:relative; width:30px; flex:1 1 auto; min-height:60px; margin:0; align-self:center; }


.lab-rail input[type=range]{
  position:absolute; left:50%; top:50%; width:110px; height:16px;
  transform:translate(-50%, -50%) rotate(-90deg); z-index:1;
}


.lab-tick{ position:absolute; right:2px; width:6px; height:1px; background:var(--border-strong); pointer-events:none; z-index:0; }
.lab-rail.at100 .lab-tick{ background:var(--ink-dark); width:8px; }

.lab-rail.shut{ opacity:0.32; pointer-events:none; }
.reset-b.off{ opacity:0.32; pointer-events:none; }


.lab-reset{ grid-column:1 / -1; justify-self:stretch; width:100%; margin:2px 0 0; text-align:center; }
.sl-h .sl-v{ margin-left:auto; }
.sl-h .reset-b{ align-self:center; margin:-3px -3px -3px 6px; }

#faceStdBtn{ margin:0 0 10px; padding:7px 10px; }
.face-go{ margin:14px 0 2px; }
.face-go .btn-primary{ padding:9px 12px; }


.bot-kind{ margin:0 0 10px; font-size:10.5px; }
.bot-fam{ display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; margin:0 0 12px; }
.bot-fam .bot-f{ padding:8px 2px 6px; font-size:10px; gap:5px; cursor:pointer; }
.bot-f-pic{ display:block; width:22px; height:48px; flex-shrink:0; }
.bot-f3 .bot-f-pic{ width:66px; }
.bot-f-sub{ font-size:9px; color:var(--faint); margin-top:-3px; }
.bot-f span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }


.bot-list{ margin:-4px 0 12px; }

.bot-sum{ align-items:center; }
.bot-sum .bt-pic{ width:10px; height:22px; }
.bot-sum .fd-t b{ display:block; font-weight:600; }
.bot-sum .bs-sub{ display:block; color:var(--muted); font-size:10.5px; }
.bot-list .bot-t{ margin:0 0 3px; padding:3px 7px 3px 5px; font-size:10.5px; color:var(--muted); }
.bot-list .bot-t:hover{ color:var(--text); background:var(--field); }
.bot-list .bot-t.on{ color:var(--ink-dark); background:#E4E6E8; border-color:var(--ink-dark); font-weight:600; }
.bot-list .bot-t.on:hover{ background:#dcdfe2; border-color:var(--ink-dark); }
.bot-list .bot-t.on .bt-k{ display:block; color:var(--ink-dark); }
.bt-pic{ display:block; width:10px; height:22px; flex-shrink:0; }

.bt-cap{ font-family:var(--f-mono); font-size:9px; color:var(--faint); flex-shrink:0; margin-left:6px; }
.bot-t.on .bt-cap{ color:var(--ink-dark); }








.lite-box{ margin:14px 0 0; padding:11px 0 0; border-top:1px solid var(--border); }

.lite-gate{ margin:0 0 10px; padding:0; border-top:0; }
.lite-gate .lite-t{ font-size:11px; }
.lite-gate .lite-rows{ margin:0; }
.lite-box .btn + .btn{ margin-top:6px; }
.lite-t{ margin:0 0 4px; font-size:11.5px; font-weight:600; color:var(--text); }

.lite-h{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 6px; }
.lite-h .lite-t{ margin:0; }
.lite-unit{ flex:0 0 auto; width:auto; }
.lite-unit button{ flex:0 0 auto; padding:2px 8px; font-family:var(--f-mono); font-size:10px; }
.lite-rows{ margin:0 0 9px; padding:0; }


.lite-rows > div{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; padding:4px 4px; margin:0 -4px; border-bottom:1px solid var(--border); border-radius:4px; cursor:pointer; }
.lite-rows > div:hover{ background:var(--field); }
.lite-rows > div:last-child{ border-bottom:0; }
.lite-rows dt{ font-size:11px; color:var(--muted); }
.lite-rows dd{ margin:0; font-family:var(--f-mono); font-size:11px; color:var(--text); text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; transition:color 0.15s; }
.lite-rows > div.ok dd{ color:var(--good); }
.lite-rows > div.ok dd::after{ content:' \2713'; }
.lite-gate .lite-hint{ margin-top:4px; }
.lite-hint{ margin:6px 0 0; font-size:10.5px; color:var(--faint); line-height:1.45; }


.fin-chips{ display:flex; flex-wrap:wrap; justify-content:center; gap:4px; margin:0; }
.fin-chip{ display:inline-flex; align-items:center; gap:6px; padding:4px 9px 4px 5px; border:1px solid var(--border); border-radius:7px; background:var(--panel); font-size:11.5px; color:var(--text); }
.fin-chip i{ display:block; width:18px; height:18px; border-radius:5px; border:1px solid rgba(0,0,0,0.08); }
.fin-chip .fin-ok{ font-weight:600; color:var(--good); font-size:11px; margin-left:1px; }
.fin-chip .fin-hand{ color:var(--muted); margin-left:-1px; }
.fin-chip.off{ opacity:0.4; }





.confirm-body .rec-sub{ margin:0 0 8px; font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#nextAskKeep{ margin:-4px 0 0; padding:18px 0 0; border-top:1px solid var(--border); }
#nextAskKeep .fin-chips{ margin-bottom:4px; }











.found-card{
  display:block; padding:0;
  height:auto; max-height:calc(100vh - 32px); overflow-y:auto; overflow-x:hidden;
}
.found-card .confirm-body{ padding:26px 22px 20px; }
.found-pic{
  display:flex; align-items:center; justify-content:center; padding:18px;
  border-bottom:1px solid var(--border);
  background:
    linear-gradient(45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-a) 75%);
  background-size:14px 14px; background-position:0 0,0 7px,7px -7px,-7px 0;
  background-color:var(--checker-b);
}
.found-pic canvas{ max-width:100%; max-height:230px; display:block; border-radius:4px; }
@media (max-width: 680px){ .found-pic canvas{ max-height:180px; } }
@media (max-height: 820px){ .found-pic{ padding:12px; } .found-pic canvas{ max-height:150px; } .found-card .confirm-body{ padding-top:20px; } }


.found-head{ display:flex; flex-direction:column; align-items:center; gap:10px; }
.confirm-body .found-head h3{ margin:0; font-size:22px; font-weight:700; letter-spacing:-0.02em; line-height:1.2; color:var(--text); text-wrap:balance; }
.found-state{
  flex:0 0 44px; width:44px; height:44px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--accent); color:var(--accent-ink);
}



.found-state svg{ flex:none; width:26px; height:26px; stroke-width:1.8; display:block; }
.found-state.cut svg{ width:30px; height:30px; stroke-width:1.9; }
.confirm-body #foundSub{ margin:6px auto 0; font-size:14px; line-height:1.5; color:#5f666b; text-wrap:balance; }


.swap-modal #swapAskName{ font-family:var(--f-mono); font-size:12px; color:var(--text); }


.found-go{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:18px; }
.found-go:empty{ display:none; }
.found-go .found-row.go{
  width:auto; min-width:240px; max-width:100%; justify-content:center; gap:9px;
  padding:0 24px; height:44px; border:0; border-radius:var(--r);
  background:var(--ink-dark); color:#fff; position:relative; overflow:hidden;
}
.found-go .found-row.go:hover{ background:#10171b; color:#fff; }
.found-go .found-row.go .found-ico{ color:#fff; }
.found-go .found-row.alt{
  width:auto; min-width:200px; max-width:100%; justify-content:center;
  padding:0 20px; height:44px; color:var(--text);
}
.found-go .found-t{ flex:0 1 auto; font-size:13.5px; }

.found-go.two .found-row.go, .found-go.two .found-row.alt{ flex:0 0 220px; width:220px; min-width:0; padding:0 16px; }


.found-row.go::after{
  content:''; position:absolute; top:0; bottom:0; left:0; width:42%; pointer-events:none;
  background:linear-gradient(90deg, rgba(212,255,0,0) 0%, rgba(212,255,0,0.28) 50%, rgba(212,255,0,0) 100%);
  animation:xsweep 3.8s ease-in-out infinite;
}
.found-row.go:hover::after{ animation:none; opacity:0; }
@media (prefers-reduced-motion: reduce){ .found-row.go::after{ animation:none; opacity:0; } }



.btn-go{ position:relative; overflow:hidden; }
.btn-go.btn-big, .btn-go.btn-big:hover{ box-shadow:none; }
.btn-go:hover{ background:#10171b; border-color:#10171b; }
.btn-go::after{
  content:''; position:absolute; top:0; bottom:0; left:0; width:42%; pointer-events:none;
  background:linear-gradient(90deg, rgba(212,255,0,0) 0%, rgba(212,255,0,0.28) 50%, rgba(212,255,0,0) 100%);
  animation:xsweep 3.8s ease-in-out infinite;
}
.btn-go:hover::after{ animation:none; opacity:0; }
@keyframes goIn{ from{ opacity:0; transform:translateY(6px) scale(.96); } to{ opacity:1; transform:none; } }
.btn-go.enter{ animation:goIn .4s cubic-bezier(.2,1.3,.4,1) both; }
@media (prefers-reduced-motion: reduce){ .btn-go::after{ animation:none; opacity:0; } .btn-go.enter{ animation:none; } }




.confirm-body .found-badge{
  margin:10px auto 0; font-size:11px; line-height:1.55; color:var(--muted); text-align:center;
}
.confirm-body .found-done{ margin:8px 0 0; font-size:11.5px; color:var(--muted); text-align:center; }



.found-or{ display:flex; align-items:center; gap:14px; margin:20px 0 14px; }
.found-or::before, .found-or::after{ content:''; flex:1 1 auto; height:1px; background:var(--border); }
.found-or span{ font-size:11.5px; font-weight:600; color:var(--faint); letter-spacing:.04em; }
.found-rows{ display:flex; flex-direction:column; gap:6px; }
.confirm-body .found-sec{ margin:2px 0 0 2px; font-size:10px; line-height:1.4; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--faint); text-align:left; }
.confirm-body .found-row + .found-sec{ margin-top:10px; }



.found-row{
  display:flex; align-items:center; gap:11px; width:100%; text-align:left;
  padding:8px 12px; border:1px solid var(--border-strong); border-radius:var(--r);
  background:var(--panel); color:inherit; font:inherit; cursor:pointer;
}
.found-row:hover{ border-color:var(--ink-dark); background:var(--field); color:var(--ink-dark); }
.found-row:focus-visible{ outline:2px solid var(--ink-dark); outline-offset:1px; }
.found-ico{ flex:0 0 18px; width:18px; height:18px; color:var(--muted); }
.found-ico svg{ width:18px; height:18px; display:block; }
.found-row:hover .found-ico{ color:var(--ink-dark); }
.found-t{ flex:1 1 auto; min-width:0; font-size:12.5px; font-weight:600; }
.found-tag{
  margin-left:auto; flex:0 0 auto; padding:2px 7px; border-radius:20px;
  background:var(--field); color:var(--muted); font-size:10px; font-weight:600;
  letter-spacing:.02em; white-space:nowrap;
}



.found-tag.more{ margin-left:auto; margin-right:4px; flex:0 0 auto; background:var(--panel); border:1px solid var(--border-strong); color:var(--muted); }
.found-row:hover .found-tag.more{ border-color:var(--ink-dark); color:var(--ink-dark); }
.found-tag.more + .found-tag{ margin-left:0; }



.found-fine{
  display:flex; align-items:center; gap:4px; margin:0; padding:10px 22px 11px;
  border-top:1px solid var(--border); font-size:11px; line-height:1.45; color:var(--faint);
}
.found-fine svg{ flex:0 0 14px; }




@keyframes fpop{ from{ transform:scale(.4); opacity:0; } to{ transform:scale(1); opacity:1; } }
@keyframes frise{ from{ opacity:0; transform:translateY(7px); } to{ opacity:1; transform:none; } }
.found-card.enter .found-state{ animation:fpop .34s cubic-bezier(.2,1.5,.4,1) both; }
.found-card.enter .found-head h3{ animation:frise .38s cubic-bezier(.2,.8,.2,1) .06s both; }
.found-card.enter #foundSub{ animation:frise .38s cubic-bezier(.2,.8,.2,1) .11s both; }
.found-card.enter .found-go{ animation:frise .38s cubic-bezier(.2,.8,.2,1) .18s both; }
.found-card.enter .found-badge{ animation:frise .38s cubic-bezier(.2,.8,.2,1) .21s both; }
.found-card.enter .found-done{ animation:frise .36s cubic-bezier(.2,.8,.2,1) .22s both; }
.found-card.enter .found-or{ animation:frise .36s cubic-bezier(.2,.8,.2,1) .24s both; }
.found-card.enter .found-rows > *{ animation:frise .36s cubic-bezier(.2,.8,.2,1) both; }
.found-card.enter .found-rows > :nth-child(1){ animation-delay:.26s; }
.found-card.enter .found-rows > :nth-child(2){ animation-delay:.29s; }
.found-card.enter .found-rows > :nth-child(3){ animation-delay:.32s; }
.found-card.enter .found-rows > :nth-child(4){ animation-delay:.35s; }
.found-card.enter .found-rows > :nth-child(5){ animation-delay:.38s; }
@media (prefers-reduced-motion: reduce){
  .found-card.enter .found-state, .found-card.enter .found-head h3, .found-card.enter #foundSub,
  .found-card.enter .found-go, .found-card.enter .found-badge, .found-card.enter .found-done,
  .found-card.enter .found-or, .found-card.enter .found-rows > *{ animation:none; }
}










.did{ margin:0 0 11px; padding:10px 11px; border-radius:var(--r); background:#eaf7ef; border:1px solid #bfe3cd; }
.did-t{ margin:0 0 8px; font-size:12px; font-weight:600; color:#1c6b42; }
.did .btn{ background:var(--panel); }



.confirm-body .help-lead{ margin:0 auto 10px; max-width:340px; font-size:14px; line-height:1.5; color:var(--text); }
.confirm-body .help-sub{ margin:0 auto 24px; max-width:340px; font-size:12.5px; line-height:1.5; color:var(--muted); }
.confirm-body .help-link{ color:var(--text); font-weight:500; text-decoration:none; border-bottom:1px solid var(--border-strong); }
.confirm-body .help-link:hover{ border-bottom-color:currentColor; }







:is(.btn, .btn-primary, .btn-dark).btn-wide:not(.btn-big):not(.btn-lg),
.row-btn > :is(.btn, .btn-primary, .btn-dark),
.tgl{
  font-size:12px; font-weight:600; padding-top:8px; padding-bottom:8px; border-radius:var(--r);
}









.opt-wrap{ position:relative; display:flex; align-items:center; flex-shrink:0; }
.optb{ position:relative; z-index:1; }
.opt-wrap::before{ content:""; width:1px; height:16px; margin:0 4px 0 3px; background:#d5d8db; }
.optb{
  display:inline-flex; align-items:center; gap:7px; height:28px; padding:0 12px 0 14px;
  border:0; border-radius:6px; background:transparent; color:var(--muted);
  font:inherit; font-size:12px; font-weight:600; white-space:nowrap; cursor:pointer;
}
.optb:hover{ color:var(--text); }
.optb.on, .optb.open{ background:var(--panel); color:var(--text); box-shadow:0 1px 3px rgba(0,0,0,0.12); }
.optb.done{ color:var(--text); }
.optb-chev{ width:11px; height:11px; fill:none; stroke:#9aa0a5; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; transition:transform .18s ease, stroke .1s ease; }
.optb.open .optb-chev{ transform:rotate(180deg); stroke:var(--text); }
.opt-tray{
  position:absolute; top:calc(100% + 9px); left:0; z-index:60; width:330px; padding:6px;
  background:var(--panel); border:1px solid var(--border-strong); border-radius:10px;
  box-shadow:0 10px 28px rgba(0,0,0,0.14);
}
.opt-tray[hidden]{ display:none; }
.opt-row{
  display:flex; align-items:center; gap:11px; width:100%; padding:9px 10px; text-align:left;
  border:0; border-radius:7px; background:transparent; color:var(--text); font:inherit; cursor:pointer;
}
.opt-row + .opt-row{ margin-top:2px; }
.opt-row:hover:not(.off){ background:var(--field); }
.opt-row:hover:not(.off) .found-ico{ color:var(--ink-dark); }
.opt-row.on{ background:var(--field); }
.opt-row .found-ico{ align-self:flex-start; margin-top:1px; }
.opt-rt{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.opt-rt b{ display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; }
.opt-rt b .found-tag.more{ margin:0; }
.opt-rt > span{ font-size:11.5px; line-height:1.4; color:var(--muted); }
.opt-row.off{ cursor:not-allowed; opacity:.45; }
.opt-lock{ margin:4px 10px 4px; font-size:11px; color:var(--muted); }

.step .found-tag.more{ margin:0 0 0 1px; }
.opt-wrap[hidden]{ display:none; }


.step-go{ display:inline-flex; align-items:center; gap:7px; height:34px; margin-left:12px; padding:0 14px; border-radius:8px; font-size:12px; font-weight:600; white-space:nowrap; flex-shrink:0; }
.step-go:disabled{ opacity:.4; cursor:not-allowed; }



.fin-rows{ display:flex; flex-direction:column; gap:6px; margin:0 0 12px; }
.fin-row{
  display:flex; align-items:center; gap:9px; width:100%;
  border:1px solid var(--border-strong); background:var(--panel); border-radius:var(--r);
  padding:7px 9px; text-align:left; color:var(--text); font-size:11px; font-weight:500; line-height:1.35;
}
.fin-row:hover{ background:var(--field); }
.fin-row .fr-sw{ width:18px; height:18px; border-radius:5px; flex-shrink:0; }
.fin-row .fr-t{ flex:1; min-width:0; }
.fin-row .fr-t b{ font-weight:600; }
.fin-row .fr-s{ display:block; color:var(--muted); font-size:10.5px; }
.fin-row .fr-a{ flex-shrink:0; color:var(--muted); font-weight:600; }
.fin-row:hover .fr-a{ color:var(--text); }
.fin-row.off{ opacity:.55; }
.fin-row{ cursor:pointer; }
.fin-row:focus-visible{ outline:2px solid var(--ink-dark); outline-offset:2px; }

.fin-row .fr-x{ width:22px; height:22px; margin:-3px -4px -3px -2px; }
.fin-edit-h{ font-size:11px; font-weight:600; color:var(--text); margin:0 0 9px; }



.rail-scroll{ flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; padding-bottom:16px; }
.rail-foot{ flex:0 0 auto; border-top:1px solid var(--border); padding:12px 12px 14px; background:var(--panel); }

.sheet-map{ margin:0; }


.next-wrap{ display:grid; grid-template-rows:1fr; margin-top:10px; opacity:1;
  transition:grid-template-rows .28s cubic-bezier(.25,.8,.25,1), margin-top .28s cubic-bezier(.25,.8,.25,1), opacity .2s ease; }
.next-wrap > .next-in{ min-height:0; overflow:hidden; }
.next-wrap.gone{ grid-template-rows:0fr; margin-top:0; opacity:0; pointer-events:none; }
@media (prefers-reduced-motion: reduce){ .next-wrap{ transition:none; } }
.sheet-map .lbl{ margin:0 0 6px; }


.sheet-map .sm-cap{ margin:6px 0 0; font-size:10.5px; line-height:1.4; color:var(--muted); }
.sheet-map .sm-box{ display:flex; align-items:center; justify-content:center; width:100%; height:138px; box-sizing:border-box; padding:8px; background:var(--field); border:1px solid var(--border); border-radius:var(--r); }
.sheet-map canvas{ display:block; max-width:100%; max-height:100%; border-radius:3px; }





@keyframes panIn{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
#secFaceGate .bot-list:not([hidden]), #secFaceGate .bot-sum:not([hidden]), #secFaceGate .bot-fam:not([hidden]),
#secFaceGate .bot-row:not([hidden]), #secFaceGate .lite-gate:not([hidden]), #faceStdBtn:not([hidden]){
  animation:panIn .26s cubic-bezier(.25,.8,.25,1) both;
}
#secFaceGate .bot-row:not([hidden]){ animation-delay:.03s; }
#secFaceGate .lite-gate:not([hidden]){ animation-delay:.06s; }
#faceStdBtn:not([hidden]){ animation-delay:.09s; }
@media (prefers-reduced-motion: reduce){ #secFaceGate *, #faceStdBtn{ animation:none !important; } }



.seg.pic2 button{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  height:52px; padding:4px 3px; font-size:10.5px; min-width:0; }
.seg.pic2 svg{ display:block; width:40px; height:24px; flex-shrink:0; }
.seg.pic2 span{ display:block; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.2; }
.seg.seg-row button{ display:flex; align-items:center; justify-content:center; gap:6px; height:32px; padding:0 8px; font-size:11.5px; white-space:nowrap; }
.seg.seg-row svg{ flex-shrink:0; }
.sl-ends{ display:flex; justify-content:space-between; font-size:10px; color:var(--muted); margin-top:2px; }



.pen-acts{ justify-content:flex-start; }
.row-btn.pen-acts > .btn-sm{ padding:5px 12px; font-size:11.5px; font-weight:600; border-radius:6px; flex:0 0 auto; }
#offHead:hover{ color:var(--ink-dark); }

.rail-empty{ margin:14px 12px; font-size:11px; line-height:1.45; color:var(--faint); }
