/* AI CAD website: a dark CAD workspace (app bar, ribbon, document tabs, palette | drawing | assistant, status bar). */
:root {
  --app: #1b1f25;        /* app bar, document tabs */
  --ribbon: #262b33;     /* ribbon, palettes */
  --panel: #22272e;      /* palette bodies */
  --field: #1a1e24;      /* inputs */
  --hover: #323944;
  --line: #3a414c;       /* borders */
  --line2: #2e343d;
  --text: #d9dee5;
  --muted: #8c96a3;
  --accent: #3d8bfd;
  --accent-soft: rgba(61, 139, 253, .16);
  --danger: #ff6b6b;
  --ok: #4cc27a;
  --canvas: #1f242b;
  --icon: #c7cfd9;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; font-size: 13px; color: var(--text);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--app); }
/* the on-screen keyboard: the page keeps to the part of the screen left visible (core.js keepToVisible) */
body { height: var(--vvh, 100%); }
body { display: flex; flex-direction: column; overflow: hidden; }
[hidden] { display: none !important; }
button, .btn, select, input, textarea { font: inherit; color: inherit; }
button, .btn {
  border: 1px solid var(--line); background: #2c323b; color: var(--text); border-radius: 4px;
  padding: 4px 10px; cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
button:hover, .btn:hover { background: var(--hover); border-color: #4a525e; }
button:disabled { opacity: .4; cursor: default; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: #2f7ae6; border-color: #2f7ae6; }
.danger { color: var(--danger); }
input, select, textarea { border: 1px solid var(--line); border-radius: 4px; padding: 4px 7px; background: var(--field); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); }
select option { background: #22272e; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.spacer { flex: 1; }
.row { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.row.wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }
.row input { flex: 1; }
.chip { background: var(--accent-soft); color: #8fbaff; border-radius: 10px; padding: 1px 8px; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }
.chip.local { background: rgba(76, 194, 122, .14); color: #7fd9a1; }
.chip .ic { width: 14px; height: 14px; }
.sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.link { color: #7fb2ff; cursor: pointer; }
.iconbtn { border: 0; background: none; padding: 2px 5px; color: var(--muted); }
.iconbtn:hover { color: var(--text); background: var(--hover); }

/* icons */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--icon); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic .a { stroke: #4ea1ff; }
button:disabled .ic { opacity: .7; }

/* ---------- app bar ---------- */
#appbar { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; background: var(--app); border-bottom: 1px solid #10141a; }
.brand { font-weight: 700; letter-spacing: .4px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 4px; font-size: 14px; }
.brand .logo { width: 22px; height: 22px; border-radius: 5px; display: block; margin-right: 3px; }
.appver { font-size: 10px; color: var(--muted); margin-left: -6px; }
.qat { display: flex; align-items: center; gap: 1px; }
.qat button { border: 0; background: none; padding: 4px 5px; border-radius: 4px; }
.qat button:hover { background: var(--hover); }
#rtabs { display: flex; gap: 2px; margin-left: 6px; }
#rtabs button { border: 0; background: none; color: var(--muted); padding: 9px 12px 8px; border-radius: 0; border-bottom: 2px solid transparent; }
#rtabs button:hover { color: var(--text); background: none; }
#rtabs button.on { color: var(--text); border-bottom-color: var(--accent); }
#fileinfo { display: flex; gap: 8px; align-items: baseline; min-width: 0; overflow: hidden; margin-left: 14px; }
#fname { font-weight: 600; white-space: nowrap; }
#lastchange { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; max-width: 32vw; }
.cmdsearch { position: relative; display: flex; align-items: center; gap: 4px; background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }
.cmdsearch input { border: 0; background: none; width: 160px; padding: 4px 0; outline: none; }
.cmdsearch .ic { width: 15px; height: 15px; }
#searchlist { top: 110%; right: 0; left: auto; min-width: 260px; max-height: 360px; overflow: auto; }
#searchlist div { padding: 4px 8px; border-radius: 4px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
#searchlist div:hover, #searchlist div.on { background: var(--accent-soft); }
.aibtn { background: linear-gradient(90deg, #2f6fe0, #7a4be0); border: 0; color: #fff; }
.aibtn:hover { filter: brightness(1.1); background: linear-gradient(90deg, #2f6fe0, #7a4be0); }
.aibtn .ic { stroke: #fff; }
.aibtn .ic .a { stroke: #fff; }
.aibtn.on { box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }

/* ---------- ribbon ---------- */
#ribbon { background: var(--ribbon); border-bottom: 1px solid #12161c; }
.rpanel { display: flex; align-items: stretch; overflow-x: auto; padding: 4px 4px 0; }
.rgrp { display: flex; flex-direction: column; border-right: 1px solid var(--line2); padding: 0 4px; flex: none; }
.rgrp:last-child { border-right: 0; }
.rbody { display: flex; gap: 2px; align-items: stretch; flex: 1; min-height: 76px; }
.rlbl { font-size: 11px; color: var(--muted); text-align: center; padding: 2px 0 3px; }
.rcol { display: flex; flex-direction: column; gap: 1px; justify-content: flex-start; }
.rcol.wide { gap: 4px; padding: 2px 2px 0 4px; min-width: 150px; max-width: 170px; }
.rrow { display: flex; gap: 1px; }
.rb { border: 1px solid transparent; background: none; border-radius: 4px; padding: 2px 5px; font-size: 12px; justify-content: flex-start; gap: 5px; }
.rb:hover { background: var(--hover); border-color: transparent; }
.rb.on { background: var(--accent-soft); border-color: rgba(61,139,253,.5); }
.rb .ic { width: 18px; height: 18px; }
.rb.big { flex-direction: column; gap: 3px; padding: 6px 4px 4px; min-width: 50px; justify-content: center; }
.rb.big .ic { width: 30px; height: 30px; stroke-width: 1.3; }
/* Simple: colour pictures instead of the line icons (with icons Pastel; js/icons.js simpleIcon); Autodraw (Simple's
   tools, body.simple.autodraw) keeps the line icons (user task 2026-11-14: "without icons") */
.sic { display: none; }
body.simple:not(.autodraw) [data-sicon] > svg.ic { display: none; }
body.simple:not(.autodraw) [data-sicon] > .sic { display: block; width: 20px; height: 20px; flex: none; }
body.simple .rb.big[data-sicon] > .sic { width: 34px; height: 34px; }
body.simple #tabs [data-sicon] > .sic { width: 22px; height: 22px; }
.rb.ico { padding: 3px; }
.rcol select { font-size: 12px; padding: 3px 5px; width: 100%; }

/* layer drop-down */
.dd { position: relative; display: flex; align-items: center; gap: 4px; background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; cursor: pointer; font-size: 12px; }
.dd:hover { border-color: #4a525e; }
.dd .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd .ic { width: 15px; height: 15px; }
.dd .off .ic, .ddlist .off .ic { stroke: #5c6470; }
.ddlist { position: fixed; z-index: 50; background: #232830; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 28px rgba(0,0,0,.5); max-height: 60vh; overflow: auto; padding: 4px; min-width: 260px; }
.ddlist .it { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.ddlist .it:hover { background: var(--hover); }
.ddlist .it.cur { background: var(--accent-soft); }
.ddlist .tg { display: inline-flex; padding: 1px; border-radius: 3px; }
.ddlist .tg:hover { background: #3c4450; }
.ddlist .ic { width: 15px; height: 15px; }

/* ---------- document tabs ---------- */
#doctabs { display: flex; align-items: flex-end; gap: 2px; padding: 4px 6px 0; background: var(--app); border-bottom: 1px solid #10141a; }
.dtab { border: 1px solid transparent; border-bottom: 0; background: none; border-radius: 6px 6px 0 0; padding: 5px 12px; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.dtab:hover { background: #262b33; color: var(--text); }
.dtab.on { background: var(--ribbon); color: var(--text); border-color: var(--line2); }
.dtab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dtab.doc button { border: 0; background: none; padding: 0 2px; }
.dtab.doc button .ic { width: 13px; height: 13px; }
.dtab.add { padding: 4px 8px; }
.dtab.add .ic { width: 14px; height: 14px; }

/* ---------- start ---------- */
#start { flex: 1; overflow: auto; padding: 48px 16px; background: radial-gradient(1200px 500px at 50% 0%, #26303d 0%, var(--app) 70%); }
.hero { max-width: 680px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: 30px; margin: 0 0 8px; font-weight: 600; }
.hero .hero-logo { height: 56px; margin: 4px auto 14px; display: block; }
.drop {
  display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
  margin: 26px 0 16px; padding: 42px 16px; border: 2px dashed #46505d; border-radius: 12px; background: rgba(255,255,255,.02); cursor: pointer;
}
.drop .ic { width: 40px; height: 40px; stroke-width: 1.2; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
#samples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
#samples button { text-align: left; white-space: normal; max-width: 210px; flex-direction: column; align-items: flex-start; gap: 2px; }
#samples button b { display: block; }
#recent { max-width: 680px; margin: 32px auto 0; }
#recentlist { list-style: none; padding: 0; margin: 0; }
#recentlist li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--ribbon); border: 1px solid var(--line2); border-radius: 6px; margin-bottom: 6px; }
#recentlist a { color: #7fb2ff; text-decoration: none; font-weight: 600; }

/* ---------- workspace ---------- */
#work { flex: 1; display: flex; min-height: 0; }
#ldock { display: flex; background: var(--panel); border-right: 1px solid #12161c; min-height: 0; }
.vtabs { display: flex; flex-direction: column; gap: 2px; padding: 6px 4px; background: var(--app); border-right: 1px solid var(--line2); }
.vtabs button { border: 0; background: none; padding: 6px; border-radius: 4px; border-left: 2px solid transparent; }
.vtabs button:hover { background: var(--hover); }
.vtabs button.on { background: var(--ribbon); border-left-color: var(--accent); }
.vtabs button .ic { width: 20px; height: 20px; }
#dockbody { width: 330px; display: flex; flex-direction: column; min-height: 0; }
#ldock.collapsed #dockbody { display: none; }
.dockhead { display: flex; align-items: center; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.dockhead .ic { width: 14px; height: 14px; }
.tab { flex: 1; overflow: auto; padding: 8px 10px 24px; }
.tab h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }

#viewer { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#stage { flex: 1; position: relative; min-height: 0; overflow: hidden; background: var(--canvas); }
#cad { position: absolute; inset: 0; background: var(--canvas); }
#cad .cv { position: absolute; left: 0; top: 0; }
#cv-over { cursor: none; touch-action: none; }
#cad.busy #cv-over { cursor: progress; }
body.cad-light #cad, body.cad-light #stage { background: #fff; }
#frame { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; background: var(--canvas); }
/* the 3D page getting ready to take over from the plan (workspace.js enter3d): there, but not seen yet */
#frame.preparing { opacity: 0; pointer-events: none; }
#vptools { position: absolute; left: 8px; top: 8px; z-index: 4; display: flex; align-items: center; gap: 1px; background: rgba(27,31,37,.85); border: 1px solid var(--line2); border-radius: 6px; padding: 2px 4px; }
#vptools button { border: 0; background: none; padding: 3px; }
#vptools button:hover { background: var(--hover); }
#vptools .ic { width: 16px; height: 16px; }
.vplabel { font-size: 11px; color: var(--muted); padding: 0 6px; }
#ucs { position: absolute; left: 10px; bottom: 54px; width: 56px; height: 56px; z-index: 2; pointer-events: none; }
/* the view cube (Pro, js/cad/viewcube.js): over the plan and over the 3D view */
/* no :hover rule: Chromium's touch targeting then takes a tap just beside the cube for the cube */
#viewcube { position: absolute; right: 10px; top: 10px; z-index: 5; cursor: pointer; touch-action: none;
            filter: drop-shadow(0 2px 5px rgba(0,0,0,.35)); }
#frame:not([hidden]):not(.preparing) ~ #viewcube { top: 50px; }  /* below the 3D page's Plan button */
/* Simple / Autodraw: the cube over the plan and over their 3D view (workspace.js show3d: no Plan button there) */
body.simple #frame:not([hidden]):not(.preparing) ~ #viewcube { top: 10px; }
#ucs path { stroke-width: 2; fill: none; }
#ucs text { font: 600 10px system-ui, sans-serif; }

/* command line: a floating bar over the drawing's bottom */
#cmdbar { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: min(860px, calc(100% - 140px)); z-index: 5; font: 12px/1.45 ui-monospace, Consolas, monospace; }
#cmdhist { max-height: 62px; overflow: auto; padding: 3px 10px; background: rgba(20,24,30,.78); border-radius: 6px 6px 0 0; color: #c7ced8; }
#cmdbar.open #cmdhist { max-height: 40vh; }
#cmdhist:empty { display: none; }
#cmdhist div { white-space: pre-wrap; word-break: break-word; }
#cmdhist .cmd { color: #9fb3c8; }
#cmdhist .err { color: #ff9a8f; }
#cmdhist .result { color: #a8e6b5; }
.cmdrow { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: #2a3039; border: 1px solid #434b57; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
#cmdhist:not(:empty) + .cmdrow { border-radius: 0 0 6px 6px; }
.cmdrow > button { border: 0; background: none; padding: 2px; }
.cmdrow > button .ic { width: 14px; height: 14px; }
#cmdprompt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; color: #e6ebf1; }
#cmdprompt .kw { color: #7fc1ff; cursor: pointer; text-decoration: underline dotted; }
.cmdwrap { flex: 1; position: relative; }
#cmdinput { width: 100%; background: transparent; color: #fff; border: 0; padding: 3px 4px; font: inherit; outline: none; }
#cmdsuggest { position: absolute; bottom: 130%; left: 0; min-width: 240px; background: #232830; color: var(--text); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.4); z-index: 30; font-family: "Segoe UI", system-ui, sans-serif; padding: 3px; }
#cmdsuggest div { padding: 4px 10px; cursor: pointer; border-radius: 4px; }
#cmdsuggest div.on, #cmdsuggest div:hover { background: var(--accent-soft); }

/* status bar */
#statusbar { display: flex; align-items: center; gap: 2px; height: 30px; padding: 0 6px; background: var(--app); border-top: 1px solid #10141a; font-size: 12px; }
/* many layouts scroll (wheel) instead of pushing the status bar's buttons under the assistant (ACADSamples
   plot_screening_and_fill_patterns: 7 tabs; 2026-11-24) */
#layouttabs { display: flex; gap: 1px; height: 100%; align-items: stretch; min-width: 0; overflow-x: auto; scrollbar-width: none; }
#layouttabs::-webkit-scrollbar { display: none; }
#layouttabs button { flex: none; white-space: nowrap; border: 0; border-radius: 0; background: none; color: var(--muted); padding: 0 12px; font-size: 12px; }
#layouttabs button.on { background: var(--accent); color: #fff; }
#layouttabs button:not(.on):hover { background: var(--hover); color: var(--text); }
#coords { min-width: 170px; text-align: right; color: var(--text); padding-right: 8px; }
#unitslabel { font-size: 11px; }
.unitsgrp { position: relative; display: inline-flex; }
#unitsbtn { padding: 2px 6px; min-height: 0; color: var(--muted); border: 0; background: none; }
#unitsbtn:hover { color: var(--text); }
#unitsmenu { min-width: 230px; }
#unitsmenu .mh { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
#unitsmenu .btn { justify-self: start; margin: 2px 0 4px; }
#unitsmenu select { font-size: 12px; }
/* metric / imperial: the status bar's menu and Properties' drawing card */
.unitssys { margin: 2px 0 6px; }
/* a tablet's or a phone's status bar has no room for the system's name: the units alone (the menu switches) */
@media (max-width: 1199px) { #unitssysl { display: none; } }
.unitssys button { padding: 3px 10px; font-size: 12px; }
#propsbody .unitssys { margin: 0; }
#propsbody .dprop { width: 100%; box-sizing: border-box; }
#propsbody .pchk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#propsbody .pchk input { margin: 0; }
.newunits { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; font-size: 12px; }
#statusbar > button, .osnapgrp > button { border: 0; background: none; padding: 3px 4px; border-radius: 4px; }
#statusbar > button .ic, .osnapgrp .ic { stroke: #6e7885; }
#statusbar > button.on .ic, .osnapgrp > button.on .ic { stroke: #6fb0ff; }
#statusbar > button.on .ic .a, .osnapgrp > button.on .ic .a { stroke: #9fd0ff; }
#statusbar > button:hover, .osnapgrp > button:hover { background: var(--hover); }
#osnapmore .ic { width: 12px; height: 12px; }
.osnapgrp { position: relative; display: inline-flex; }
.menu { position: absolute; z-index: 40; background: #232830; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; box-shadow: 0 8px 24px rgba(0,0,0,.45); display: grid; gap: 3px; min-width: 170px; }
.menu.up { bottom: 120%; right: 0; }
.menu label { white-space: nowrap; font-size: 12px; display: flex; gap: 6px; align-items: center; }

/* assistant dock */
#aidock { width: 340px; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid #12161c; min-height: 0; }
.aihead { display: flex; align-items: center; gap: 6px; padding: 8px 8px 4px 12px; }
.aihead > .ic { stroke: #a98bff; }
.aihead .ic .a { stroke: #a98bff; }
.aisub { padding: 0 12px 6px; border-bottom: 1px solid var(--line2); }
#chatlog { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 10px 10px; }
.composer { border-top: 1px solid var(--line2); padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.composer textarea { width: 100%; resize: none; min-height: 60px; max-height: 160px; border-radius: 6px; }
.composer .row { margin: 0; }
.composer .row .small { line-height: 1.3; }
.vsel { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12px; background: var(--accent-soft); color: #9fc4ff; border-radius: 10px; padding: 2px 4px 2px 8px; }
.vsel button { border: 0; background: transparent; color: inherit; padding: 0 4px; font-size: 14px; line-height: 1; }
.selnote { font-size: 11px; opacity: .8; margin-top: 2px; }
.msg { max-width: 94%; border-radius: 10px; padding: 7px 10px; line-height: 1.45; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: #2c323b; }
.msg.assistant.err { background: rgba(255,107,107,.14); }
.msg .steps { margin-bottom: 4px; }
.msg .step { font-size: 12px; color: var(--muted); padding: 1px 0; }
.msg .step::before { content: "✓ "; color: var(--ok); }
.msg .step.pending::before { content: "… "; color: var(--muted); }
.msg .step.bad::before { content: "✗ "; color: var(--danger); }
.msg .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.msg code { background: rgba(255,255,255,.08); padding: 0 3px; border-radius: 3px; font-size: 12px; }
.msg div.err { color: var(--danger); margin-top: 4px; }
.chat-empty { color: var(--muted); }
.chat-empty .ex { display: block; margin: 6px 0; color: #7fb2ff; cursor: pointer; }
.typing { color: var(--muted); font-size: 12px; }

/* ---------- palette contents (tabs) ---------- */
table.grid { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12px; }
table.grid th { text-align: left; font-weight: 600; font-size: 11px; color: var(--muted); padding: 4px 5px; border-bottom: 1px solid var(--line); position: sticky; top: -8px; background: var(--panel); }
table.grid td { padding: 3px 5px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.grid tr:hover td { background: #2a3038; }
table.grid .num { text-align: right; }
table.grid td.det { color: var(--muted); font-size: 11px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch, .swatch-pick { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid #5b6470; vertical-align: middle; cursor: pointer; flex: none; }
.namecell { white-space: nowrap; }
.namecell input { width: 100%; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 6px 0 12px; }
.kv div:nth-child(odd) { color: var(--muted); }
.bars .bar { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 3px 6px; border-radius: 4px; cursor: pointer; }
.bars .bar:hover { background: var(--accent-soft); }
.actions { border: 1px solid var(--line2); border-radius: 6px; padding: 6px 8px; margin: 8px 0; background: #1f242a; }
.applyto { font-size: 12px; color: var(--muted); }
#tresults .hit { padding: 4px 0; border-bottom: 1px solid var(--line2); font-size: 12px; }
#tresults mark { background: #6b5a12; color: #fff; }
#attrs .blk { border: 1px solid var(--line2); border-radius: 6px; padding: 6px 8px; margin-bottom: 8px; }
#attrs .blk .row label { width: 110px; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
#versions { padding-left: 22px; margin: 4px 0; font-size: 12px; }
#versions li { padding: 6px 2px; border-bottom: 1px solid var(--line2); }
#versions li.cur { font-weight: 600; }
#versions li.future { color: var(--muted); }
#versions .when { color: var(--muted); font-size: 11px; font-weight: 400; }
#versions .vbtns { float: right; display: flex; gap: 4px; }
#versions .vbtns button, #versions .vbtns a { padding: 1px 7px; font-size: 11px; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 8px; font-size: 12px; }
.frow select, .frow input:not([type=checkbox]) { max-width: 60%; }
#stddraft table.grid select { max-width: 150px; }
#tab-standards .card > div, #tab-standards .card > p { margin: 6px 8px; }
#tab-standards .card .row { margin: 6px 8px; }
#tab-standards table.grid td { padding: 2px 4px; }
#tab-standards .stdgrp { margin: 8px 8px 2px; }
#tab-standards .stdiss { display: flex; gap: 6px; align-items: flex-start; margin: 2px 8px; line-height: 1.35; }
#tab-standards .stdiss input { margin-top: 2px; }
#tab-standards .stdiss .nobox { width: 13px; flex: none; }
#tab-standards #stdissues > div:first-child { margin: 6px 8px; }
.card { border: 1px solid var(--line2); border-radius: 4px; padding: 0 0 4px; margin-bottom: 8px; background: #252a31; }
.card h5 { margin: 0; padding: 5px 8px; font-size: 11px; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; background: #2d333c; border-bottom: 1px solid var(--line2); cursor: pointer; display: flex; align-items: center; gap: 4px; }
.card h5::before { content: "▾"; color: var(--muted); font-size: 10px; }
.card.closed h5::before { content: "▸"; }
.card.closed table { display: none; }
.props { width: 100%; border-collapse: collapse; font-size: 12px; }
.props td { padding: 3px 8px 3px 8px; border-top: 1px solid var(--line2); vertical-align: middle; }
.props tr:first-child td { border-top: 0; }
.props td:first-child { color: var(--muted); width: 42%; }
.props select, .props input { width: 100%; padding: 2px 5px; font-size: 12px; }
.props .val { word-break: break-word; }
/* a wall's components (tasks2 2026-11-17): material, thickness, remove */
.props.comps td:first-child { width: auto; }
.props.comps td.val { width: 30%; }
.props.comps td.x { width: 24px; padding: 0 4px; text-align: center; }
.props.comps .wcx { padding: 0 6px; line-height: 18px; }
.card .comphint { margin: 4px 8px 0; font-size: 11px; }
.card .compbtns { margin: 6px 8px 2px; }
/* a piece of furniture's colour (props.js furnitureColorCard) */
.card .fcolors { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; align-items: center; }
.fcol { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); padding: 0; cursor: pointer; box-sizing: border-box; }
.fcol[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.fcol.def { width: auto; border-radius: 12px; padding: 0 9px; font-size: 11px; background: #2d333c; color: var(--text); }
.fcol.any { position: relative; overflow: hidden; background: conic-gradient(#e85d5d, #e8c35d, #6fd16f, #5dc8e8, #6f6fe8, #d15dd1, #e85d5d); }
.fcol.any input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.card.closed .comphint, .card.closed .compbtns { display: none; }
.props-head { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
.props-head .t { font-weight: 600; font-size: 13px; }
#ovcatalog { margin-top: 14px; }
.matthumb { width: 18px; height: 18px; border-radius: 3px; vertical-align: middle; object-fit: cover; border: 1px solid #5b6470; }
.mated { background: #1f242a; border: 1px solid var(--line2); border-radius: 6px; padding: 4px 8px; margin: 4px 0 8px; }
.mated .row input[type=color] { width: 44px; padding: 0 2px; height: 26px; flex: none; }
.mated label { white-space: nowrap; }
.console { border: 1px solid var(--line2); border-radius: 6px; padding: 6px 8px; background: #1f242a; }
.console textarea { width: 100%; resize: vertical; font-size: 12px; }
#aresp { background: #12161b; color: #e6e9ec; border-radius: 4px; padding: 8px 10px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 6px 0; font-size: 11px; }
#aresp.err { color: #ffb4b4; }
#aendpoints .grp { font-size: 11px; font-weight: 600; color: var(--muted); margin: 10px 0 2px; text-transform: uppercase; letter-spacing: .4px; }
#aendpoints .ep { display: grid; grid-template-columns: 50px 1fr; gap: 2px 8px; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
#aendpoints .ep:hover { background: var(--accent-soft); }
#aendpoints .ep .p { font-family: ui-monospace, Consolas, monospace; font-size: 11px; word-break: break-all; }
#aendpoints .ep .d { grid-column: 2; font-size: 11px; color: var(--muted); }
.m { font-size: 10px; font-weight: 700; border-radius: 3px; padding: 1px 0; text-align: center; height: fit-content; color: #fff; }
.m.GET { background: #2e7d32; } .m.POST { background: #1d4fd0; } .m.PATCH { background: #b26a00; } .m.DELETE { background: #c62828; }

/* feedback */
#toast { position: fixed; bottom: 44px; left: 50%; transform: translateX(-50%); background: #303742; color: #fff; padding: 8px 14px; border-radius: 6px; max-width: 80vw; z-index: 60; box-shadow: 0 6px 18px rgba(0,0,0,.4); border: 1px solid #454e5b; }
#toast.err { background: #5c2626; border-color: #8a3a3a; }
#busy { position: fixed; inset: 0; background: rgba(0,0,0,.18); z-index: 55; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; cursor: progress;
  animation: busyin .15s ease-out .25s both; will-change: opacity; }
#busy.now { animation-delay: 0s; }
@keyframes busyin { from { opacity: 0; } to { opacity: 1; } }
#busymsg { color: #e8ebf0; font-size: 13px; background: rgba(20,23,28,.85); padding: 6px 12px; border-radius: 6px; max-width: 80vw; text-align: center; }
#busymsg:empty { display: none; }
.spin { width: 30px; height: 30px; border: 3px solid #3a414c; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; will-change: transform; }
@keyframes spin { to { transform: rotate(360deg); } }
.pop { position: fixed; z-index: 70; background: #232830; border: 1px solid var(--line); border-radius: 8px; padding: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.45); display: grid; grid-template-columns: repeat(5, 22px); gap: 6px; }
.pop .swatch { width: 22px; height: 22px; }
.pop .custom { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; font-size: 12px; }

/* ---------- tablets and narrow windows (user request 2026-11-07: a tablet upright and on its side) ----------
   Below 1280 px the assistant slides over the drawing instead of narrowing it; below 1000 px the palette does too
   (the icon strip stays), and only one of the two is open at a time (workspace.js narrowScreen). The app bar drops
   words for icons as it narrows; upright, the ribbon stays one row that scrolls sideways. */
#appbar > * { flex: none; }
#appbar > .spacer { flex: 1; }
#appbar > #fileinfo { flex: 0 1 auto; }
.brand, .chip { white-space: nowrap; }
@media (max-width: 1279px) {
  #work { position: relative; }
  #aidock { position: absolute; top: 0; right: 0; bottom: 0; z-index: 20; width: min(360px, calc(100% - 56px));
    box-shadow: -14px 0 30px rgba(0,0,0,.5); }
  .appver { display: none; }
  .cmdsearch input { width: 110px; }
  #localchip { font-size: 0; gap: 0; padding: 3px 6px; }
  .rb.big { min-width: 44px; padding: 6px 3px 4px; }
  .rcol.wide { min-width: 120px; max-width: 140px; }
  #ribbon .rnote, #simplebar .snote { display: none; }
}
@media (max-width: 1199px) {
  #aitoggle { font-size: 0; gap: 0; padding: 5px 8px; }
}
/* a tablet on its side: Home's File group goes to the app bar as icons, so the ribbon fits without scrolling */
@media (max-width: 1199px) and (orientation: landscape) {
  body:not(.simple) #qat button.qfile { display: inline-flex; }
  .rpanel[data-rtab="home"] > .rgrp:first-child { display: none; }
}
@media (max-width: 1100px) {
  #fileinfo { display: none; }
  .cmdsearch { display: none; }
}
@media (max-width: 999px) {
  #ldock { position: relative; z-index: 21; }
  #dockbody { position: absolute; left: 100%; top: 0; bottom: 0; width: min(400px, calc(100vw - 64px)); background: var(--panel);
    border-right: 1px solid #12161c; box-shadow: 14px 0 30px rgba(0,0,0,.5); }
  .brand { font-size: 0; gap: 0; }
  #rtabs { margin-left: 0; }
  #rtabs button { padding: 9px 9px 8px; }
}
/* upright (user task 2026-11-07): the ribbon and Simple's bar in one row that a finger scrolls sideways, without
   Simple's size boxes (a wall's thickness is the hint's Thickness button), and a narrower palette and icon strip */
@media (orientation: portrait) and (max-width: 1100px) {
  .rpanel { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  #ldock .vtabs { padding: 6px 3px; }
  #ldock .vtabs button { padding: 7px; }
}
/* upright phones and tablets (user task 2026-11-07): the palette's icon strip goes under the drawing, right under the
   assistant's line, in a row that scrolls sideways; the palette opens above it as a sheet over the drawing's lower
   part, and a finger on the drawing puts it away, as it does the assistant (workspace.js). #viewer gives way
   (display: contents) so the strip can sit between the drawing and the status bar. */
@media (orientation: portrait) and (max-width: 999px) {
  #work { flex-direction: column; }
  #viewer { display: contents; }
  #stage { order: 1; }
  #ldock { order: 2; flex-direction: column; border-right: 0; border-top: 1px solid #12161c; }
  #statusbar { order: 3; }
  #ldock .vtabs { flex-direction: row; overflow-x: auto; padding: 3px 6px; border-right: 0; scrollbar-width: none; gap: 6px; }
  #ldock .vtabs button { flex: none; border-left: 0; border-bottom: 2px solid transparent; border-radius: 4px 4px 0 0; }
  /* the icons that open the sheet: bigger, for a finger (user task 2026-11-07) */
  #ldock .vtabs button { padding: 7px 12px; }
  #ldock .vtabs button .ic, body.simple #tabs [data-sicon] > .sic { width: 30px; height: 30px; }
  #ldock .vtabs button.on { border-bottom-color: var(--accent); }
  #dockbody { left: 0; right: 0; top: auto; bottom: 100%; width: auto; height: clamp(200px, 25vh, 240px); border-right: 0;
    border-top: 1px solid var(--line2); box-shadow: 0 -14px 30px rgba(0,0,0,.5); }
}
@media (max-width: 599px) {
  #appbar { overflow-x: auto; gap: 6px; }
  #modesw { margin: 0 2px; }
  /* Pro's status bar would widen the page past a phone's screen (the browser then zooms the page out) */
  #statusbar { overflow-x: auto; scrollbar-width: none; }
  #statusbar > * { flex: none; }
  #coords { display: none; }
}
/* fingers: bigger targets; fields at 16px, or iOS zooms the page into them */
@media (pointer: coarse) {
  body { touch-action: manipulation; }
  input, select, textarea { font-size: 16px; }
  .qat button { padding: 7px 8px; }
  #modesw button { padding: 6px 14px; }
  #rtabs button { padding-top: 11px; padding-bottom: 10px; }
  .rb { padding: 5px 8px; }
  .rb.big { padding: 7px 5px 5px; }
  .rb.ico { padding: 6px; }
  .vtabs { gap: 4px; }
  .vtabs button { padding: 9px; }
  .dtab { padding: 8px 14px; }
  .dtab.doc .x { padding: 4px 6px; }
  .dtab.doc .x .ic { width: 15px; height: 15px; }
  .dtab.add { padding: 7px 12px; }
  .iconbtn { padding: 6px 8px; }
  .dockhead { padding: 4px 6px 4px 12px; }
  #vptools button { padding: 7px; }
  #vptools .ic { width: 20px; height: 20px; }
  .cmdrow > button { padding: 6px; }
  .cmdrow > button .ic { width: 18px; height: 18px; }
  #statusbar { height: 42px; }
  #statusbar > button, .osnapgrp > button { padding: 8px 9px; }
  #layouttabs button { padding: 0 16px; }
  #defaults.txtbtn { height: 32px; padding: 4px 12px; }
  .menu label { padding: 6px 0; font-size: 14px; }
  .menu input[type=checkbox], .props input[type=checkbox], table.grid input[type=checkbox] { width: 20px; height: 20px; }
  .ddlist .it { padding: 8px; font-size: 14px; }
  .props td { padding: 5px 8px; }
  table.grid td, table.grid th { padding-left: 3px; padding-right: 3px; }
  #tab-layers .laycols button { padding: 6px 14px; font-size: 13px; }
  .card h5 { padding: 9px 8px; font-size: 12px; }
  #aibarsend, #aibararea { padding: 8px 10px; }
  #chatsend { padding: 8px 14px; }
  #cmdsuggest div, #searchlist div { padding: 9px 10px; }
  #ucs { bottom: 64px; }
}
/* phones and tablets (user tasks 2026-11-07): the library without its search (typing brings up the on-screen keyboard),
   and Simple without its command hint over the drawing (a door opens to the side of the wall it was tapped on, a wall
   ends with a second tap on its last corner: cad/simple.js) */
@media (pointer: coarse) {
  #libsearch { display: none; }
  body.simple #cmdbar { display: none !important; }
}
/* 3D view shown: the 2D view controls are not for it */
#frame:not([hidden]):not(.preparing) ~ #vptools, #frame:not([hidden]):not(.preparing) ~ #ucs { display: none; }
.ddlist.cmdmenu { min-width: 280px; max-height: calc(100vh - 110px); }
.ddlist .mgrp { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 6px 2px; }
.ddlist.cmdmenu .it { padding: 4px 6px; }
.ddlist.cmdmenu .it .ic { width: 18px; height: 18px; }
.ddlist.cmdmenu .it .nm { flex: 1; }
#dtlist { display: flex; gap: 2px; min-width: 0; overflow-x: auto; }
.dtab.doc { cursor: pointer; max-width: 220px; }
.dtab.doc .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtab .dot.cloud { background: #a98bff; }
.dtab .mod { color: #ffb84d; font-size: 16px; line-height: 0; }
.dtab.doc .x { border: 0; background: none; padding: 0 2px; opacity: .6; }
.dtab.doc .x:hover { opacity: 1; background: var(--hover); }
.dtab.doc .x .ic { width: 12px; height: 12px; }
.blkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.blk { border: 1px solid var(--line2); border-radius: 6px; padding: 6px; background: #252a31; }
.blk .tw { height: 90px; display: flex; align-items: center; justify-content: center; background: #1b1f25; border-radius: 4px; color: #cfd6de; }
.blk .bn { font-weight: 600; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk .row { margin: 4px 0 0; }
.blk .row button { padding: 2px 8px; font-size: 12px; }
.props .pt { display: flex; gap: 4px; }
.props .pt label { display: flex; align-items: center; gap: 3px; flex: 1; color: var(--muted); font-size: 11px; }
.props .pt input { min-width: 0; }
.props td.val:has(.unit) { white-space: nowrap; }
.props input.num + .unit { margin-left: 3px; color: var(--muted); }
.props td.val:has(> .unit) input.num { width: calc(100% - 16px); }
.props input.bad { border-color: #e5534b; }

/* hatch panel (Hatch Creation / Hatch Editor) */
#hatchpanel { position: absolute; top: 44px; left: 10px; z-index: 6; width: 430px; max-width: calc(100% - 20px); background: #22272e; border: 1px solid var(--line2);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.45); font-size: 12px; }
#hatchpanel[hidden] { display: none; }
#hatchpanel .hp-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line2); }
#hatchpanel .hp-tabs { display: flex; gap: 2px; margin-left: 6px; }
#hatchpanel .hp-tab { padding: 2px 9px; border-radius: 4px; background: transparent; border: 1px solid transparent; color: var(--muted); }
#hatchpanel .hp-tab.on { background: #2d6cdf; color: #fff; }
#hatchpanel .hp-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
#hatchpanel .hp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 4px; max-height: 210px; overflow: auto; }
#hatchpanel .hp-thumb { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; background: #1b1f25; border: 1px solid transparent;
  border-radius: 5px; color: var(--muted); font-size: 10px; cursor: pointer; }
#hatchpanel .hp-thumb canvas { background: #14171c; border-radius: 3px; }
#hatchpanel .hp-thumb.on { border-color: #4ea1ff; color: #fff; }
#hatchpanel .hp-thumb span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hatchpanel .hp-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#hatchpanel .hp-row label { display: flex; align-items: center; gap: 4px; color: var(--muted); }
#hatchpanel .hp-row input:not([type]) , #hatchpanel .hp-row input[inputmode] { width: 60px; padding: 2px 4px; }
#hatchpanel input[type=color] { width: 30px; height: 22px; padding: 0; border: 1px solid var(--line2); background: none; }

#ribbon .rnote { margin-top: 4px; }
#tab-layers .laytools { gap: 4px; align-items: center; }
#tab-layers .laytools .iconbtn { width: 28px; height: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
#tab-layers .laytools .iconbtn svg { width: 18px; height: 18px; }
#layertable .layacts { white-space: nowrap; text-align: right; }
/* a long layer name gives way (cut with an ellipsis, whole in its tooltip) so the table fits a narrow palette */
#layertable td.namecell { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#layertable td.namecell input { width: 100%; box-sizing: border-box; min-width: 60px; }
/* the Visibility / Role switch: one set of columns at a time, so the table keeps its width */
.laycols { display: inline-flex; margin-top: 6px; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; }
.laycols button { padding: 2px 10px; background: transparent; border: none; color: var(--muted); font-size: 11px; }
.laycols button.on { background: #2d6cdf; color: #fff; }
#layertable.cols-role .c-vis, #layertable:not(.cols-role) .c-role { display: none; }
#layertable .rolecell select { font-size: 11px; padding: 1px 2px; max-width: 110px; }
#layertable .rolecell select.auto { color: var(--muted); font-style: italic; }
#layertable .rolecell select option { font-style: normal; }
#layertable .layacts .ic { width: 16px; height: 16px; }
#layertable .layacts .danger .ic { stroke: var(--danger); }
#propsnew[hidden] { display: none; }

/* simple mode */
#modesw { display: flex; margin: 0 8px; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; }
#modesw button { padding: 3px 10px; background: transparent; border: none; color: var(--muted); font-size: 12px; }
#modesw button.on { background: #2d6cdf; color: #fff; }
#simplebar { display: none; align-items: stretch; gap: 2px; padding: 6px 8px; background: var(--panel, #252a31); border-bottom: 1px solid var(--line2); }
body.simple #simplebar { display: flex; flex-wrap: wrap; }
body.simple #ribbon, body.simple #rtabs { display: none; }
/* the start page (no drawing yet) and the Automation mode: no tool bar, no ribbon tabs (tasks2 "start page") */
body.simple.onstart #simplebar, body.onstart #rtabs, body.automation #rtabs { display: none; }
/* Autodraw also has the drawing's layers and blocks (user request 2026-11-17) */
body.simple:not(.autodraw) #tabs button:not([data-simple]), body.autodraw #tabs button:not([data-simple]):not([data-autodraw]) { display: none; }
/* Autodraw's Defaults (the sizes of new objects: its tools'), not Pro's */
body:not(.autodraw) #tabs button[data-tab="defaults"] { display: none; }
#simplebar .sgrp { display: flex; align-items: center; gap: 4px; padding: 0 8px; border-right: 1px solid var(--line2); }
#simplebar .sopt { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 2px; }
#simplebar .sopt select { padding: 2px 4px; font-size: 12px; }
/* Autodraw (user request 2026-11-14): sizes typed, width and height, instead of Simple's lists */
#simplebar .sopt input { width: 64px; padding: 2px 4px; font-size: 12px; }
#simplebar .sopt.adopt, body.autodraw #simplebar .sopt:not(.adopt) { display: none; }
body.autodraw #simplebar .sopt.adopt { display: flex; }
#simplebar .snote { align-self: center; max-width: 280px; padding: 0 8px; }
/* upright: one row that a finger scrolls sideways, without the size boxes (see the tablets block above) */
@media (orientation: portrait) and (max-width: 1100px) {
  body.simple #simplebar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  #simplebar > * { flex: none; }
  #simplebar .sopt { display: none; }
  /* a tablet upright keeps the whole bar in view (it fits without scrolling: a finger drags out of it any way) */
  #simplebar .sgrp { padding: 0 6px; }
}
/* drag to place (dragplace.js): the picture riding with the pointer; a finger drags out of a toolbar any way, or
   downwards when it scrolls (.scrolls: sideways moves scroll it), and out of the library sideways (up and down scroll it) */
.dragghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; width: 56px; height: 56px; display: grid; place-items: center;
  background: rgba(42,48,57,.9); border: 1px solid var(--accent); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.dragghost img, .dragghost svg, .dragghost canvas { width: 40px; height: 40px; display: block !important; border-radius: 6px; }
.dragghost.over { opacity: .7; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }
/* a drag over the 3D view stays with the page (the frame would take the pointer's events: dragplace.js) */
body.dragging #frame { pointer-events: none; }
[data-drag] { touch-action: none; }
.scrolls [data-drag] { touch-action: pan-x; }
.libitem, .matpick { touch-action: pan-y; }
[data-drag] img, .libitem img { -webkit-user-drag: none; user-select: none; }
#tab-library .libcat, #tab-materials .libcat { margin: 10px 0 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
#libsearch { width: 100%; box-sizing: border-box; margin: 2px 0 6px; padding: 6px 9px; background: #15191e; color: var(--fg, #e6e9ee);
  border: 1px solid #3a414b; border-radius: 6px; font: 13px "Segoe UI", system-ui, sans-serif; outline: none; }
#libsearch:focus { border-color: #4ea1ff; }
#tab-library .libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
#tab-library .libitem { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; background: #1b1f25; border: 1px solid transparent;
  border-radius: 6px; color: #cfd6de; font-size: 11px; cursor: pointer; }
#tab-library .libitem:hover { border-color: #4ea1ff; }
#tab-library .libitem span { text-align: center; line-height: 1.2; }
#tab-library .libitem .libpic { width: 56px; height: 56px; }

/* the simple mode hides the drawing aids (their defaults apply; Default stays) */
body.simple footer [data-toggle], body.simple footer .osnapgrp { display: none; }
footer #defaults.txtbtn { font-size: 11px; padding: 2px 8px; height: 22px; line-height: 16px; border: 1px solid var(--line); border-radius: 4px;
  background: transparent; color: var(--muted); margin-left: 4px; }
footer #defaults.txtbtn:hover { color: var(--text); border-color: var(--muted); }

/* the simple mode: nothing about DWG internals (file formats, the operation log, view names, layouts, layers) */
body.simple #dxfbtn, body.simple #lastchange, body.simple #vptools .vplabel, body.simple #vptools .sep, body.simple #layouttabs,
body.simple #propsnew { display: none !important; }
.simple-only { display: none; }
body.simple .simple-only { display: inline; }
/* Simple has no command line (user tasks 2026-11-06, 2026-11-07): hidden while no command runs; a running command shows
   only its prompt, as a hint at the drawing's top, without history or suggestions. Its field stays out of sight (still
   there for the keyboard: a typed value, such as a wall's length, goes to it by itself and shows it, editor onKey) and
   opens with the keyboard button, so a finger brings up the on-screen keyboard only when asked */
body.simple #cmdbar.idle, body.simple #cmdhist, body.simple #cmdmore, body.simple #cmdsuggest { display: none !important; }
body.simple #cmdbar { top: 8px; bottom: auto; width: auto; max-width: calc(100% - 270px); font: 13px/1.45 "Segoe UI", system-ui, sans-serif; }
@media (max-width: 599px) { body.simple #cmdbar { top: 56px; max-width: calc(100% - 16px); } }
body.simple .cmdrow { padding: 3px 4px 3px 14px; background: rgba(27,31,37,.9); border-color: var(--line2); border-radius: 18px; }
body.simple #cmdprompt { max-width: none; white-space: normal; }
body.simple #cmdprompt .kw { text-decoration: none; display: inline-block; margin: 1px 2px; padding: 0 8px; border-radius: 10px; background: var(--accent-soft); color: #9fc4ff; }
body.simple #cmdprompt .kw.def { outline: 1px solid rgba(61,139,253,.6); }
body.simple .cmdwrap { order: 1; flex: 0 0 110px; }
body.simple #cmdbar:not(.typing) .cmdwrap { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
body.simple #cmdinput { background: rgba(255,255,255,.08); border-radius: 6px; }
body.simple #cmdinput::placeholder { color: transparent; }
#cmdkbd { display: none; }
body.simple #cmdbar:not(.typing) #cmdkbd { display: inline-flex; order: 2; }
body.simple #cmdx { order: 3; }
@media (pointer: coarse) { body.simple #cmdprompt .kw { padding: 3px 10px; } }
/* Simple: the AI assistant's line in its place (user task 2026-11-06) */
#aibar { display: none; }
body.simple #aibar { display: flex; align-items: center; gap: 8px; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: min(640px, calc(100% - 140px)); z-index: 5; padding: 5px 6px 5px 10px; background: #2a3039; border: 1px solid #5b4fa8;
  border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
#aibar .aibar-ic .ic { width: 18px; height: 18px; stroke: #b9a6ff; }
#aibarinput { flex: 1; resize: none; background: transparent; color: #fff; border: 0; outline: none; padding: 4px 2px;
  font: 13px/1.45 "Segoe UI", system-ui, sans-serif; max-height: 120px; }
#aibarinput::placeholder { color: #9aa4b2; }
#aibarsend { padding: 5px 8px; border-radius: 7px; }
/* the area marked for the assistant (user task 2026-11-06): the button that marks it, lit while one is marked */
#aibararea { padding: 4px 6px; border-radius: 7px; background: transparent; border: 1px solid transparent; }
#aibararea .ic { width: 18px; height: 18px; stroke: #b9a6ff; }
#aibararea:hover { background: rgba(122,75,224,.2); }
.aiarea.on { background: rgba(122,75,224,.35) !important; border-color: #8b6cf0 !important; }
.varea { border-color: #8b6cf0; }
#aibarsend:disabled { opacity: .5; cursor: default; }
body.simple .pro-only { display: none !important; }
/* Pro has the file buttons on the ribbon (Home > File); Simple keeps them in the app bar */
body:not(.simple) #qat .qfile { display: none; }

/* materials palette (js/tabs/materials.js) */
.matlist { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.matrow { display: flex; flex-wrap: wrap; align-items: center; border-radius: 6px; }
.matrow.open { background: var(--field); }
.matpick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: 1px solid transparent; padding: 4px 6px; border-radius: 6px; color: var(--text); }
.matpick:hover { border-color: var(--line); background: var(--hover); }
.matname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matsw .matswatch { display: block; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.matedit { background: none; border: 0; padding: 4px; opacity: .75; }
.matedit:hover { opacity: 1; }
.matnotes { width: 100%; padding: 2px 10px 4px; word-break: break-word; }
.matnotes a { color: var(--accent); }
.matcard { width: 100%; display: flex; flex-direction: column; gap: 6px; padding: 4px 8px 10px; }
.matcard label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.matcard .row { display: flex; gap: 6px; align-items: flex-end; }
.matcard .row label { flex: 1; min-width: 0; }
.matcard input, .matcard select, .matcard textarea { width: 100%; box-sizing: border-box; }
.matcard input[type=color] { height: 26px; padding: 0 2px; }
#matnewcard { background: var(--field); border-radius: 6px; margin: 6px 0; }

/* upright (user tasks 2026-11-07): the palette is a low sheet under the drawing; its lists (the library, the materials)
   run in two rows that fill its height evenly and scroll sideways, and a finger drags a piece or a material up out of
   it onto the drawing (dragplace.js: up and down drag, sideways scrolls) */
@media (orientation: portrait) and (max-width: 999px) {
  #dockbody .tab { padding: 6px 8px 8px; }
  #tab-library > p.muted, #tab-materials > p.small { display: none; }
  #tab-library:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
  #tab-library #libsearch { flex: none; margin: 0 0 6px; padding: 5px 9px; }
  #libitems { flex: 1 1 0; min-height: 0; display: flex; align-items: stretch; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  #libitems > * { flex: none; }
  #libitems > .libnone { align-self: center; width: 170px; margin: 0; white-space: normal; }
  #tab-library .libcat, #tab-materials .libcat { writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 4px; text-align: center; align-self: stretch; line-height: 1; }
  #tab-library .libgrid { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: 82px; gap: 6px; }
  #tab-library .libitem { min-height: 0; padding: 4px 2px 3px; gap: 2px; font-size: 11px; }
  #tab-library .libitem .libpic, #tab-library .libitem svg { flex: 1 1 0; min-height: 0; height: 0; width: 100%; object-fit: contain; }
  #tab-library .libitem span { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #tab-materials:not([hidden]) { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
  #tab-materials:not([hidden]) > * { flex: none; }
  #tab-materials > .row { align-self: stretch; }
  /* a card like the materials' (user task 2026-11-07): the plus over its name in two lines */
  #matnew { height: 100%; width: 76px; flex-direction: column; justify-content: center; gap: 6px; white-space: normal; text-align: center; line-height: 1.2; }
  #matnew .ic { width: 22px; height: 22px; }
  .matlist { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-auto-columns: 92px; gap: 6px; margin: 0; }
  .matrow { position: relative; flex-direction: column; flex-wrap: nowrap; min-height: 0; background: #1b1f25; }
  .matrow.open { grid-row: span 2; grid-column: span 3; overflow-y: auto; }
  .matpick { flex: 1 1 0; min-height: 0; width: 100%; flex-direction: column; justify-content: center; text-align: center; gap: 3px; padding: 4px; }
  .matpick > .small { display: none; }
  .matsw { flex: 1 1 0; min-height: 0; display: flex; justify-content: center; align-items: center; }
  .matsw .matswatch { width: 40px; height: 40px; }
  .matname { flex: none; width: 100%; font-size: 11px; white-space: nowrap; }
  .matedit { position: absolute; top: 1px; right: 1px; padding: 2px; }
  .matedit .ic { width: 14px; height: 14px; }
  #matnewcard { width: 300px; margin: 0; overflow-y: auto; }
  .libitem, .matpick { touch-action: pan-x; }
}
/* the analysis' schema in the Standards palette (tasks2 2026-11-14) */
#stdanalysis ul.schema { margin: 2px 0 8px 16px; padding: 0; }
#stdanalysis ul.schema li { margin: 2px 0; }
#stdanalysis code { font-size: 11px; }
/* a question with several answers (core.js choose; tasks2 2026-11-14: a plan made elsewhere, before Simple) */
.choose-back { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, 0.35); display: flex; align-items: center; justify-content: center; }
.choose { background: var(--panel, #fff); color: var(--text, #222); max-width: min(460px, calc(100vw - 32px)); border-radius: 10px; padding: 18px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
.choose h4 { margin: 0 0 8px; font-size: 15px; }
.choose p { margin: 0 0 14px; font-size: 13px; line-height: 1.45; }
.choose-opts { display: flex; flex-direction: column; gap: 8px; }
.choose-opts button { text-align: left; padding: 8px 12px; }
.choose-opts button small { display: block; opacity: 0.7; font-size: 11px; margin-top: 2px; }
/* the Automation mode (tasks2 2026-11-14): a browser of drawings for operations on many at once */
body.automation #simplebar, body.automation #ribbon, body.automation #doctabs, body.automation #start, body.automation #work,
body.automation #fileinfo, body.automation #qat { display: none !important; }
body.automation #autopane { display: flex !important; }
#autopane { flex: 1; flex-direction: row; min-height: 0; background: var(--app); color: var(--text); }
#automain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; overflow: auto; padding: 14px 16px; }
#autodock { display: flex; flex: none; min-height: 0; border-right: 1px solid #2d3542; }
#autoside { width: 300px; flex: none; display: flex; flex-direction: column; gap: 8px; overflow: auto; padding: 12px;
  background: var(--panel); }
#autoside .atab { display: flex; flex-direction: column; gap: 8px; }
#autoside .atab[hidden] { display: none; }
#automain .autofmt select { max-width: 200px; }
#autoside .sidehead { display: flex; align-items: center; gap: 6px; }
#autoside .sidehead .spacer, #autoside .autobar .spacer { flex: 1; }
#autoside h4 { margin: 0; font-size: 13px; }
#autoside .sidegroup { display: flex; flex-direction: column; gap: 4px; }
#autoside .sidegroup input:not([type=checkbox]), #autoside .sidegroup textarea { width: 100%; box-sizing: border-box; font-size: 12px; }
#autoside .autoto select { max-width: 170px; }
#scriptlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
#scriptlist li { display: flex; align-items: center; gap: 6px; border-radius: 6px; padding: 2px 4px; }
#scriptlist li.on { background: rgba(122, 162, 247, 0.16); }
#scriptlist .sname { flex: 1; min-width: 0; text-align: left; background: none; border: none; color: inherit; padding: 4px 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
#scriptlist button[data-act=run] { padding: 2px 8px; font-size: 12px; }
#scripted { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #2d3542; padding-top: 8px; }
#scripted[hidden] { display: none; }
#scripttext { font-family: ui-monospace, Consolas, monospace; font-size: 12px; resize: vertical; }
#scripterr { color: #f7768e; }
#scripthelp td { vertical-align: top; padding: 2px 4px; font-size: 11px; }
#scripthelp code { white-space: nowrap; }
/* the assistant's line: as #aibar of the other modes, at the bottom of the drawings' list */
#autoaiwrap { margin-top: auto; position: sticky; bottom: -6px; align-self: center; width: min(640px, 100%); display: flex;
  flex-direction: column; gap: 4px; padding: 8px 0 6px; z-index: 2; }
#autoai { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; background: #2a3039; border: 1px solid #5b4fa8;
  border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
#autoai .aibar-ic .ic { width: 18px; height: 18px; stroke: #b9a6ff; }
#autoaireq { flex: 1; resize: none; background: transparent; color: #fff; border: 0; outline: none; padding: 4px 2px;
  font: 13px/1.45 "Segoe UI", system-ui, sans-serif; max-height: 120px; }
#autoaireq::placeholder { color: #9aa4b2; }
#autoai .autoairun { display: flex; align-items: center; gap: 3px; color: #b9c2cf; white-space: nowrap; }
#autoaiwrite { padding: 5px 8px; border-radius: 7px; }
#autoaiwrite:disabled { opacity: .5; cursor: default; }
#autoaistatus { padding: 0 6px; }
#autoaistatus:empty { display: none; }
#autoaistatus.err { color: #f7768e; }
@media (max-width: 760px) {
  #autopane { flex-direction: column; overflow: auto; }
  #autodock { flex-direction: column; border-right: none; border-top: 1px solid #2d3542; }
  #autodock .vtabs { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line2); padding: 3px 6px; gap: 6px; }
  #autodock .vtabs button { border-left: 0; border-bottom: 2px solid transparent; border-radius: 4px 4px 0 0; padding: 7px 12px; }
  #autodock .vtabs button.on { border-bottom-color: var(--accent); }
  #autoside { width: auto; overflow: visible; }
  #automain { overflow: visible; order: -1; }  /* the drawings first, the side menu under them */
  #autoaiwrap { position: static; }
}
#autopane.over { outline: 2px dashed #7aa2f7; outline-offset: -8px; }
#autopane .autobar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#autopane .autobar .spacer { flex: 1; }
#autopane .filebtn { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 6px; cursor: pointer; }
#autopane .autoto { display: inline-flex; gap: 4px; align-items: center; }
#autopane .autodrop { border: 2px dashed #3b4656; border-radius: 10px; padding: 40px 16px; text-align: center; color: var(--muted, #9aa4b1); }
#autotable { width: 100%; }
#autotable td.name { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#autotable td.did { max-width: 320px; font-size: 12px; }
#autotable td.acts { white-space: nowrap; }
#autotable td.acts button { padding: 2px 6px; font-size: 12px; }
#autotable .err { color: #f7768e; }
#autodetail pre { white-space: pre-wrap; font-size: 12px; background: var(--panel); padding: 10px; border-radius: 6px; }

/* ---------- the light site's lessons (learn.js) and the pro site's tour (tour.js): tasks3 2026-11-24 ---------- */
#learnbtn, #tourbtn { color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; margin-right: 8px; background: var(--ribbon); }
#learnbtn:hover, #tourbtn:hover { background: var(--hover); }
.lstar { color: #f6c945; }
.lprog { color: var(--muted); font-size: 11px; margin-left: 2px; }
#learnpanel { position: fixed; top: 44px; right: 12px; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 70px); overflow: auto; z-index: 70; padding: 12px 14px; display: block; }
#learnpanel .lphead { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#learnpanel .lvl { color: #f6c945; font-weight: 600; font-size: 12px; }
.xpbar { height: 8px; border-radius: 4px; background: var(--field); overflow: hidden; border: 1px solid var(--line); }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #8FD19E, #f6c945); transition: width .6s; }
#learnpanel ol.quests { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
#learnpanel ol.quests li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px; }
#learnpanel ol.quests li.cur { background: var(--accent-soft); }
#learnpanel ol.quests li p, #learnpanel ol.quests li button { grid-column: 2 / 4; margin: 2px 0; }
#learnpanel ol.quests li.done .qt { color: var(--muted); text-decoration: line-through; }
.qmark { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; background: var(--field); border: 1px solid var(--line); }
li.done .qmark { background: var(--ok); border-color: var(--ok); color: #fff; }
.qxp { color: #f6c945; font-size: 11px; }
#learnpanel .badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.badge.got { color: var(--text); border-color: #f6c945; background: rgba(246, 201, 69, .12); }
#questcard { position: fixed; left: 60px; bottom: 70px; width: min(300px, calc(100vw - 80px)); z-index: 55; background: #232830; border: 1px solid #f6c945;
  border-radius: 10px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); font-size: 13px; }
#questcard .qhead { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
#questcard .qnum { color: var(--muted); font-size: 11px; flex: 1; }
#questcard p { margin: 4px 0 8px; line-height: 1.4; }
#questcard .qx { padding: 0 6px; font-size: 16px; line-height: 1; }
.learn-pulse { animation: learnpulse 1s ease-in-out 4; position: relative; z-index: 5; }
@keyframes learnpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(246, 201, 69, 0); } 50% { box-shadow: 0 0 0 4px rgba(246, 201, 69, .9); } }
#learncele { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); z-index: 80; pointer-events: none; }
#learncele .cbox { background: #232830; border: 2px solid #f6c945; border-radius: 12px; padding: 12px 22px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
#learncele.go .cbox { animation: celepop .45s cubic-bezier(.2, 1.6, .4, 1); }
#learncele .ctitle { font-size: 18px; font-weight: 700; color: #f6c945; margin-bottom: 4px; }
#learncele .cbadge, #learncele .clevel { margin-top: 4px; color: #8FD19E; font-weight: 600; }
#learncele .confetti { position: absolute; left: 50%; top: 30px; }
#learncele .confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; opacity: 0; }
#learncele.go .confetti i { animation: confetti 1.6s ease-out forwards; }
@keyframes celepop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 160px)) rotate(var(--r)); opacity: 0; } }
.learnhint { margin-top: 10px; }
#tourmask { position: fixed; z-index: 90; border-radius: 8px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); border: 2px solid #f6c945; pointer-events: none; transition: all .25s; }
#tourtip { position: fixed; z-index: 91; width: min(320px, calc(100vw - 24px)); background: #232830; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 13px; }
#tourtip h4 { margin: 0 0 6px; font-size: 15px; }
#tourtip p { margin: 0 0 10px; line-height: 1.45; }
#tourtip .tnav { display: flex; align-items: center; gap: 6px; }
#tourtip .tstep { color: var(--muted); font-size: 11px; flex: 1; }

/* ---------- the account and the plans (account.js): tasks3 2026-11-24 ---------- */
#acctbtn { display: inline-flex; align-items: center; gap: 6px; color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; margin-right: 8px; background: var(--ribbon); }
#acctbtn:hover { background: var(--hover); }
.acav { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.acleft { font-size: 12px; color: #f6c945; }
.acmodal { position: relative; max-width: min(520px, calc(100vw - 32px)); }
.acmodal .acx { position: absolute; top: 8px; right: 8px; font-size: 18px; padding: 0 8px; }
.acf { display: grid; gap: 4px; font-size: 12px; color: var(--muted); margin: 8px 0; }
.acf input { padding: 7px 9px; font-size: 14px; }
.acrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.acerr { color: var(--danger); font-size: 12px; min-height: 1em; margin: 6px 0 0; }
.acerr.ok { color: var(--ok); }
#gsibtn:not(:empty) { margin: 6px 0 10px; min-height: 44px; }
.acmodal-back:has(.plans) .acmodal { max-width: min(760px, calc(100vw - 32px)); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 8px 0; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 6px; align-content: start; }
.plan.cur { border-color: #f6c945; }
.plan .pname { font-weight: 700; font-size: 15px; }
.plan .pprice { font-size: 22px; font-weight: 700; }
.plan .pprice span { font-size: 12px; color: var(--muted); font-weight: 400; }
.plan ul { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.5; }
.plan button { width: 100%; }

/* ---------- signing in and up, the account's panel (account.js; user 2026-11-24) ---------- */
.acmodal.authmodal { width: min(420px, calc(100vw - 32px)); }
.authtabs { display: flex; gap: 4px; margin: 0 28px 10px 0; padding: 3px; background: var(--field); border-radius: 10px; }
.authtabs button { flex: 1; border: 0; background: none; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.authtabs button.on { background: var(--ribbon); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.authwhy { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.auth section { display: grid; gap: 6px; }
.auth .upf { display: none; } .authmodal.up .auth .upf { display: grid; } .authmodal.up .auth p.upf { display: block; }
.authmodal.up .auth .inf { display: none; }
.author { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin: 2px 0; }
.author::before, .author::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acchk { display: flex !important; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.4; margin: 4px 0; }
.authmodal:not(.up) .auth section[data-step="email"] .acchk.upf { display: none !important; }
.acchk input { margin-top: 2px; }
.acchk a, .auth a { color: #6fb0ff; }
button.wide { width: 100%; padding: 9px 12px; font-size: 14px; justify-content: center; text-align: center; }
.codeboxes { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.codeboxes input { width: 44px; height: 52px; text-align: center; font-size: 24px; font-weight: 600; border-radius: 8px; padding: 0; }
.codeboxes input:focus { outline: 2px solid var(--accent); }
#acresend { justify-self: center; color: var(--muted); }
.acprofile { display: flex; gap: 12px; align-items: center; margin: 4px 0 12px; }
.acav.big { width: 44px; height: 44px; font-size: 20px; flex: none; }
.acwho { display: grid; gap: 2px; flex: 1; }
.acwho input { font-size: 15px; font-weight: 600; padding: 5px 8px; background: transparent; border: 1px solid transparent; border-radius: 6px; }
.acwho input:hover, .acwho input:focus { border-color: var(--line); background: var(--field); }
.acstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.acstat { display: grid; gap: 3px; align-content: start; background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.acstat b { font-size: 15px; }
.acdanger { margin-top: 10px; font-size: 12px; color: var(--muted); }
.acdanger summary { cursor: pointer; }
button.danger { background: #5c2626; border-color: #8a3a3a; color: #fff; }
button.danger:hover { background: #7a2f2f; }
@media (max-width: 560px) { .acstats { grid-template-columns: 1fr; } }
