/* MiStudio round 0.75: the model tabs above the viewport (web/modeltabs.js). A light strip in the panel color;
   the active tab is a raised card joined to the viewport below it; inactive tabs are quiet text. The dot of a
   model with unsaved changes turns into the close x under the pointer (macOS / Safari). */
#app{grid-template-rows:46px 32px 1fr var(--mh,128px)}
#dockL,#dockR{grid-row:2/4}
main{grid-row:3}
#dockB{grid-row:4}
#mtabs{grid-column:2;grid-row:2;min-width:0}
.mt-strip{display:flex;align-items:flex-end;gap:2px;padding:0 6px;background:var(--panel2);border-bottom:1px solid var(--line);overflow:hidden}
.mt-tabs{display:flex;align-items:flex-end;gap:2px;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;flex:0 1 auto;height:100%}
.mt-tabs::-webkit-scrollbar{display:none}
.mt-tab{position:relative;display:flex;align-items:center;gap:6px;height:26px;min-width:88px;max-width:220px;padding:0 4px 0 10px;flex:0 1 auto;
 border-radius:8px 8px 0 0;color:var(--mute);cursor:default;user-select:none;-webkit-user-select:none;white-space:nowrap;
 transition:background-color 80ms ease,color 80ms ease,transform 160ms cubic-bezier(.2,.8,.2,1)}
.mt-tab:hover{background:var(--hover);color:var(--ink)}
.mt-tab:active{background:var(--line)}
.mt-tab.on{background:var(--panel);color:var(--ink);box-shadow:0 -1px 0 var(--line),1px 0 0 var(--line),-1px 0 0 var(--line);margin-bottom:-1px;height:27px;font-weight:550}
.mt-tab.on::after{content:"";position:absolute;left:8px;right:8px;top:0;height:2px;border-radius:0 0 2px 2px;background:var(--acc)}
.mt-tab:focus-visible{outline:2px solid var(--acc);outline-offset:-2px}
.mt-ic svg{width:14px;height:14px;display:block;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linejoin:round;stroke-linecap:round;opacity:.75}
/* 0.5.52: a tab whose model runs a task: the Opening card's ring in the icon's own 14 px slot (the tab never changes width) */
.mt-ic{position:relative;width:14px;height:14px;flex:none}
.mt-tab.busy .mt-ic svg{visibility:hidden}
.mt-tab.busy .mt-ic::after{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:50%;border:2px solid var(--acc-soft);border-top-color:var(--acc);animation:spin .8s linear infinite}
@media (prefers-reduced-motion: reduce){.mt-tab.busy .mt-ic::after{animation-duration:2.4s}}
.mt-l{overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1 1 auto;letter-spacing:-.005em}
.mt-x{position:relative;display:grid;place-items:center;width:18px;height:18px;flex:none;border:0;border-radius:5px;background:transparent;color:var(--mute);padding:0}
.mt-x svg{width:10px;height:10px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;opacity:0}
.mt-x .mt-dot{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--warn);opacity:0}
.mt-tab.dirty .mt-x .mt-dot{opacity:1}
.mt-tab:hover .mt-x svg,.mt-tab.on .mt-x svg,.mt-x:focus-visible svg{opacity:1}
.mt-tab.dirty:not(:hover) .mt-x svg{opacity:0}
.mt-tab:hover .mt-x .mt-dot{opacity:0}
.mt-x:hover{background:var(--line2);color:var(--ink)}
.mt-x:active{transform:scale(.92)}
.mt-strip.one .mt-tab.on .mt-x{visibility:visible}
.mt-tabs.dragging .mt-tab:not(.drag){transition:transform 160ms cubic-bezier(.2,.8,.2,1)}
.mt-tab.drag{z-index:2;transition:none;background:var(--panel);color:var(--ink);box-shadow:var(--shadow);border-radius:8px}
.mt-new{display:grid;place-items:center;width:26px;height:24px;margin:0 0 2px 2px;flex:none;border:0;border-radius:7px;background:transparent;color:var(--mute)}
.mt-new svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.mt-new:hover{background:var(--hover);color:var(--ink)}
.mt-new:active{background:var(--line2);transform:scale(.94)}
@media (prefers-reduced-motion:reduce){.mt-tab,.mt-tabs.dragging .mt-tab:not(.drag){transition:none}}
@media (prefers-contrast:more){.mt-tab.on{box-shadow:0 0 0 1px var(--ink)}}
@media (max-width:820px){#dockL,#dockR{grid-row:2/4}}
/* 0.5.51: the tab an open is going into (web/opentab.js): a spinner in the icon slot (same 14 px box: nothing moves) */
.mt-ic .mt-spin{width:14px;height:14px;box-sizing:border-box;display:block}
/* 0.5.51: on the other tabs the Opening card is a small chip that names the tab (a click goes there) */
#busy.away{padding:3px 10px;font-size:12px;opacity:.85}
#busy.away .spin{width:10px;height:10px}
