/* style.css, part 10 of 13: the studio (revamp UI): panels, docks, cards, sheets, Model Cut cards.
   A contiguous range of the pre-M7 style.css, linked from index.html in
   source order so the cascade is unchanged; see src/tokens.css. */

/* ============================================================
   REVAMP UI (BRIEF-117 & BRIEF-118)
   ============================================================ */
.revamp-studio {
    position: relative;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    max-width: 100vw;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-card);
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px var(--shadow-soft);
    /* Minimise/maximise (owner, 2026-08-31): transform-only, so sliding never
       triggers layout — matches the hover-pop rule the rest of the chrome
       animates by. See body.revamp-panel-minimized below for the actual
       off-screen state, which flips `position` too (a discrete change, not
       part of the transition) so the viewer's flex space is reclaimed the
       instant the panel leaves the flow rather than only once the slide ends. */
    transition: transform var(--dur-250) ease;
    transform: translateX(0);
}
/* Minimised: fixed takes the panel out of #app's flex row immediately (the
   viewer reflows full-bleed with no separate width transition to keep in
   step with the transform), and translateX(-100%) is what the user actually
   sees slide away. pointer-events/inert/aria-hidden (toggled in revamp.js)
   keep an off-screen panel's controls from being clicked or tabbed into.

   CAVEAT: a transformed ancestor makes a position:fixed descendant fixed to
   THAT ancestor instead of the viewport (CSS 3 Transforms, "Establishing a
   New Containing Block"), so nothing position:fixed may be added inside
   .revamp-studio and expected to cover the viewport. */
body.revamp-panel-minimized .revamp-studio {
    position: fixed;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    pointer-events: none;
}
.revamp-studio-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Bottom trimmed from the other three sides' 1.25rem: the panel footer
       below now closes the column (its own padding + hairline do that job),
       so the content no longer needs a full inset of its own air beneath the
       last card — reclaiming it is what keeps every .revamp-group inside the
       owner's zero-scroll-per-open-chapter budget with the footer added.
       Top trimmed 1.25rem -> 0.75rem in the 2026-09-01 spacing pass: the
       20px top inset was the panel's one oversized gap while fields sat
       3px apart — the reclaimed 8px funds the wider field rhythm in the
       ceiling-tight g2 groups (see the spacing-scale note in :root).
       The bigger-panel round holds that top inset at --space-field rather
       than letting the stepped-up --space-air push it back to 13.6px: the
       first thing under it is a mode header with its own generous padding,
       so the inset was reading as a gap on top of a gap. */
    padding: var(--space-field) 1.25rem 0.4rem;
    position: relative;
    gap: 0.75rem;
    height: auto;
    max-height: 100%;
}
/* The hard, always-visible footer below the cards (owner order 3 +
   follow-up): quiet caption size, a hairline rule to separate it from the
   scrolling content above, centred since it is the panel's own sign-off
   rather than one more control. A flex sibling of .revamp-studio-content,
   never inside it, so it is never part of that scrollable area and never
   competes with a .revamp-group for the zero-scroll budget — but it still
   costs real flex height, which is why .revamp-studio-content's own bottom
   padding above was trimmed to make room. Kept deliberately thin: no padding
   on the individual links, var(--lh-tight) instead of the inherited body
   leading, because every pixel here is a pixel the zero-scroll law owns. */
.revamp-panel-footer {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem 1.25rem;
    border-top: 1px solid var(--border-soft);
    font-size: var(--fs-sm);
    line-height: var(--lh-tight);
    color: var(--text-secondary);
}
.revamp-panel-footer-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}
.revamp-panel-footer-link:hover,
.revamp-panel-footer-link:focus-visible {
    color: var(--accent-text);
}
/* The minimise/maximise slider itself: fixed, bottom-left, OUTSIDE
   .revamp-studio so it stays put and stays clickable through the whole
   slide and while the panel is off-screen. */
/* A drawer HANDLE, not a corner chip (owner: "afraid people would not find
   it easily"): a half-pill tab riding the panel's right edge at mid-height,
   sliding with it — the one place a hand reaches to open a drawer. */
.revamp-panel-toggle {
    position: fixed;
    left: var(--sidebar-width);
    top: 50%;
    z-index: 1600;
    width: 34px;
    height: 92px;
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
    border: none;
    /* The house action gradient (owner: "more pop out and the purple
       gradient hue") — same stops the primary pills wear. */
    background: linear-gradient(135deg, var(--c-rose-700), var(--c-violet-600));
    color: var(--c-white);
    font-size: var(--fs-lg);
    font-weight: var(--fw-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 4px 0 18px rgba(150, 80, 190, 0.35);
    transform: translateY(-50%);
    transition: left var(--dur-250) ease, width var(--dur-150) ease, box-shadow var(--dur-150) ease;
}
/* ID-weighted on purpose: a plain class pair measurably lost this cascade
   in the live sheet (computed left stayed at the open value with the body
   class present) — pinned by id so the slid-away state cannot lose again. */
body.revamp-panel-minimized #revamp-panel-toggle {
    left: 0;
}
.revamp-panel-toggle:hover {
    width: 36px;
    box-shadow: 6px 0 20px var(--shadow-soft);
}
.revamp-tree {
    display: flex;
    flex-direction: column;
}
.revamp-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.revamp-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--c-white);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-card);
    font-family: var(--font-ui);
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--dur-150) ease;
    text-align: left;
}
.revamp-group:not(.collapsed) .revamp-group-header {
    background: transparent;
    border: none;
    padding: 0.25rem var(--space-hug);
    font-size: var(--fs-base);
    cursor: default;
}
.revamp-group:not(.collapsed) .group-status {
    display: none;
}
.revamp-group.collapsed .revamp-group-header:hover {
    border-color: var(--icon-accent);
    background: var(--c-white);
    box-shadow: 0 4px 12px var(--icon-shadow);
}
.revamp-group.collapsed .group-status {
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    color: var(--ok-text);
}
.revamp-group.collapsed .revamp-card,
.revamp-group.collapsed .revamp-confirm-btn {
    display: none !important;
}
.revamp-fork-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1.25rem;
    background: var(--c-white);
    border-radius: var(--radius-dialog);
    border: 1.5px solid var(--border-card);
    box-shadow: 0 4px 18px var(--shadow-soft);
    align-items: center;
}
.revamp-fork-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1.25rem 1rem;
    background: var(--c-white);
    border: 2px solid var(--border-card);
    border-radius: var(--radius-dialog);
    cursor: pointer;
    transition: all var(--dur-200) ease;
    box-shadow: 0 4px 12px var(--shadow-soft);
}
.revamp-fork-btn:hover {
    border-color: var(--icon-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--icon-shadow);
}
.revamp-fork-btn .fork-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.revamp-fork-btn .fork-label {
    font-family: var(--font-ui);
    font-size: var(--fs-base);
    font-weight: var(--fw-display);
    color: var(--text-primary);
}
.revamp-beta-tag {
    display: inline-block;
    padding: 0.15rem var(--space-field);
    font-size: var(--fs-sm);
    font-weight: var(--fw-display);
    line-height: var(--lh-tight);
    border-radius: var(--radius-chip);
    background: #ffeaf3;
    color: var(--accent-text);
    margin-left: 0.35rem;
    vertical-align: middle;
}
.revamp-card {
    background: var(--c-white);
    border-radius: var(--radius-dialog);
    border: 1.5px solid var(--border-card);
    box-shadow: 0 4px 16px var(--shadow-soft);
    padding: 1rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}
.revamp-card label {
    font-weight: var(--fw-strong);
    font-size: var(--fs-sm);
    color: var(--text-primary);
    display: block;
}
.revamp-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.revamp-field label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    color: var(--text-primary);
}
/* ALI-50 D1: the height "How big?" gives an imported model. */
.mc-size-height {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}
.mc-size-height.is-tall {
    color: var(--warn-text);
    font-weight: var(--fw-strong);
}
/* The slider the owner pointed at (2026-09-01: "just imagine the slider and
   icon as a bit too small there"). The track is the element's own box here,
   not ::-webkit-slider-runnable-track, so `height` IS the track — 8px was a
   hairline next to a 40px number box beside it. 13px track / 24px thumb is
   free against the zero-scroll law: every row this slider sits in is sized
   by the number box (36-40px) or the axis tag, so a thumb under ~36px costs
   no layout height at all, and the thumb overflows the track box without
   participating in flow. Phone keeps its own scale in src/mobile.css. */
.revamp-card input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 13px;
    border-radius: var(--radius-inset);
    background: linear-gradient(to right, var(--icon-accent), var(--accent-2));
    outline: transparent;
}
.revamp-card input[type="range"]:focus {
    box-shadow: 0 0 0 3px var(--c-pink-a18);
    outline: transparent;
}
.revamp-card input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-chip);
    background: var(--c-white);
    border: 4px solid var(--accent-color);
    cursor: pointer;
}
.revamp-card input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-chip);
    background: var(--c-white);
    border: 4px solid var(--accent-color);
    cursor: pointer;
}
.primary-gradient-pill, .revamp-card button.primary-btn {
    background: linear-gradient(135deg, var(--c-rose-700), var(--c-violet-600));
    color: var(--c-white);
    font-weight: var(--fw-strong);
    border-radius: var(--radius-chip);
    border: none;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 12px var(--shadow-pink);
    cursor: pointer;
}
.revamp-card button:not(.primary-btn):not(.preset-btn) {
    background: var(--c-white);
    color: var(--text-primary);
    font-weight: var(--fw-strong);
    border-radius: var(--radius-chip);
    border: 1.5px solid var(--border-card);
    padding: 0.5rem 1rem;
    cursor: pointer;
}
.revamp-confirm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    margin-top: 6px;
    background: linear-gradient(135deg, var(--c-rose-700), var(--c-violet-600));
    color: var(--c-white);
    font-family: var(--font-ui);
    font-size: var(--fs-base);
    font-weight: var(--fw-display);
    border-radius: var(--radius-chip);
    border: none;
    box-shadow: 0 4px 14px var(--shadow-pink);
    cursor: pointer;
    transition: transform var(--dur-150) ease, box-shadow var(--dur-150) ease;
}
.revamp-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--shadow-pink);
}
.revamp-confirm-btn:active {
    transform: translateY(0);
}
.revamp-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    width: 100%;
    cursor: pointer;
}
.revamp-toggle-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.revamp-toggle-label {
    flex: 1;
    font-weight: var(--fw-strong);
    font-size: var(--fs-sm);
    color: var(--text-primary);
}
.revamp-toggle-switch {
    width: 36px;
    height: 20px;
    background: var(--border-control);
    border-radius: var(--radius-dialog);
    position: relative;
    transition: background var(--dur-200);
}
.revamp-toggle-row input:checked + .revamp-toggle-switch {
    background: var(--accent-text);
}
.revamp-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--c-white);
    border-radius: var(--radius-chip);
    transition: transform var(--dur-200);
}
.revamp-toggle-row input:checked + .revamp-toggle-switch::after {
    transform: translateX(16px);
}
/* The painted .revamp-toggle-switch is the visible switch; the checkbox
   stays focusable under it (not `display: none`, which removed every
   accessory switch from the Tab order — FIX-LIST.md row 2) and the row shows
   keyboard focus. Out of flow either way, so the row lays out as before. */
.revamp-toggle-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}
.revamp-toggle-row.kb-focus {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}
.hotspot-dot {
    position: absolute;
    width: 34px;
    height: 34px;
    background: var(--c-white);
    border: 3px solid var(--accent-color);
    border-radius: var(--radius-chip);
    box-shadow: 0 2px 10px var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 500;
}
.hotspot-dot svg {
    width: 16px;
    height: 16px;
    fill: var(--text-primary);
}
.coach-bubble {
    /* The coach speaks from under the top dock, over the viewer — never on
       top of the panel, the dock, or any control (judges, round 1). */
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 340px;
    background: var(--c-white);
    border-radius: var(--radius-dialog);
    padding: 16px;
    box-shadow: 0 4px 20px var(--shadow-soft);
    border: 1.5px solid var(--border-card);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    z-index: 1000;
    max-width: 300px;
}
.coach-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-chip);
    background: linear-gradient(135deg, var(--c-pink-400), var(--icon-accent));
    flex-shrink: 0;
}
.coach-text {
    font-size: var(--fs-sm);
    color: var(--text-primary);
    font-weight: var(--fw-strong);
    line-height: var(--lh-tight);
}
.coach-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--fs-base);
    padding: 0;
    line-height: var(--lh-tight);
}
.revamp-floating-card {
    position: absolute;
    background: var(--c-white);
    border-radius: var(--radius-dialog);
    border: 1.5px solid var(--border-card);
    box-shadow: 0 8px 30px var(--shadow-soft);
    padding: 16px;
    z-index: 600;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.revamp-floating-card .close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--fs-base);
    color: var(--text-secondary);
}
.revamp-card h3, .revamp-floating-card h3 {
    font-weight: var(--fw-display);
    font-size: var(--fs-base);
    color: var(--text-primary);
    margin: 0;
}
.revamp-dock {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    background: var(--sidebar-bg);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-chip);
    border: 1px solid var(--border-card);
    box-shadow: 0 6px 24px var(--shadow-soft);
    gap: 0.4rem;
    z-index: 1000;
}
.revamp-dock button {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    color: var(--text-primary);
    border-radius: var(--radius-chip);
    cursor: pointer;
    transition: background var(--dur-150) ease, transform var(--dur-150) ease;
    /* Icon + label sit on one line (the cut trio's drawn diagrams,
       2026-09-01); inline-flex is a no-op for the text-only pills. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}
.revamp-dock button svg {
    flex: none;
}
/* Under the stacked layout four pills already fill the width — the dock
   keeps its text and drops the diagrams rather than crowding or wrapping. */
@media (max-width: 768px) {
    .revamp-dock button svg {
        display: none;
    }
}
.revamp-dock button:not(.primary-gradient-pill):hover {
    background: var(--bg-2);
}
.revamp-dock .primary-gradient-pill {
    background: linear-gradient(115deg, var(--c-rose-700) 0%, var(--c-violet-600) 55%, var(--c-blue-600) 100%);
    color: var(--c-white);
}
.revamp-dock .primary-gradient-pill:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}
.revamp-beacon {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--sidebar-bg);
    border: 2px solid var(--ok-text);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-chip);
    font-weight: var(--fw-strong);
    color: var(--ok-text);
    box-shadow: 0 4px 20px var(--shadow-soft);
    cursor: pointer;
    z-index: 1000;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* THE GLOW THE COACH PROMISES (owner, 2026-09-01: "good to have but make it
   happen at the right time and functional"). Until now the bubble said "when
   the button glows" and NOTHING in the app glowed — the only keyframes were
   font-loaded-pop, guide-pulse, spin, sw-drift and sw-rise. This is that glow,
   driven by the same readiness the beacon uses (isWarn false), so the copy is
   true rather than aspirational. Reduced-motion gets the ring without the
   pulse: the signal survives, the movement does not. */
@keyframes print-ready-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(103, 125, 209, 0.55); }
    50%      { box-shadow: 0 0 0 10px rgba(103, 125, 209, 0); }
}
#revamp-dock-print.is-print-ready {
    animation: print-ready-glow 1.9s ease-out 3;
}
@media (prefers-reduced-motion: reduce) {
    #revamp-dock-print.is-print-ready {
        animation: none;
        box-shadow: 0 0 0 3px rgba(103, 125, 209, 0.45);
    }
}
.revamp-beacon.amber {
    border-color: var(--warn-text);
    color: var(--warn-text);
}
/* ---- drag-hint pop (owner, 2026-09-01) ----------------------------------
   Transient "you can drag the <accessory> anywhere along the edge" card,
   top-centre of the viewer — src/drag-hint.js shows it for ~2.8 s when a
   genuinely draggable accessory is turned on. Clear of the occupants: the
   fixed top dock ends ~64px down (top 12px + 40px buttons + padding), the
   beacon holds the top-RIGHT corner, both docks are z 1000 and the coach
   z 1000 — this sits at z 900, under all of them and every sheet/dialog,
   and pointer-events: none so a pointer aimed at the model never meets it.
   .below-coach is added by drag-hint.js only when the coach bubble is
   visible AND overlapping — the two share the top-centre band. */
.drag-hint-pop {
    position: absolute;
    top: 76px;
    left: 50%;
    transform: translateX(-50%) translateY(-6px) scale(0.97);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: min(340px, calc(100% - 32px));
    background: var(--c-white);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-dialog);
    box-shadow: 0 4px 20px var(--shadow-soft);
    padding: 0.6rem 0.9rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    line-height: var(--lh-tight);
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    z-index: 900;
    transition: opacity var(--dur-220) ease, transform var(--dur-220) ease;
}
.drag-hint-pop svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--icon-accent);
}
.drag-hint-pop.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}
.drag-hint-pop.below-coach {
    top: 168px;
}
/* Reduced motion: instant show/hide — the ~2.8 s timing is unchanged. */
@media (prefers-reduced-motion: reduce) {
    .drag-hint-pop {
        transition: none;
    }
}
.revamp-sheet-overlay { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; }
.revamp-sheet-overlay[hidden] { display: none !important; }
.revamp-sheet-scrim { position: absolute; inset: 0; background: var(--scrim-color); }
.revamp-sheet-card { position: relative; background: var(--c-white); padding: 2rem; border-radius: var(--radius-dialog); width: 90%; max-width: 400px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.revamp-sheet-card h2 { font-size: var(--fs-mark); margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }

/* ONE CALL TO ACTION AT A TIME.
   The sign-in wall is re-homed INTO this card (#print-sheet-signin-container),
   and the sheet's own heading, subline and Save buttons stay in the DOM above
   it. That puts "Save for 3D printing (.3mf)" and "Sign in to download" on the
   same screen, competing for the same press — which is the "conflict when
   clicking Print my clicker or signing in" the owner reported on 2026-09-02.
   Measured before this rule existed: the card ran to 919px in a 900px viewport
   with 190px of it spent on a call to action the customer had ALREADY made.

   While the wall is up it owns the sheet. The close button stays: a way out is
   not a competing action. Nothing is deleted - the sheet's own controls come
   straight back the moment the wall unmounts, which is the owner's
   rebrand-never-remove rule.

   NOT written with :has(). tests/browser-floor-gate.mjs refused it - :has()
   needs Blink 105 / Gecko 121 and this product's support floor is 98 / 114, so
   on an older browser the sheet would have kept both calls to action with no
   sign that anything was wrong. src/revamp.js toggles .sw-owns-sheet instead,
   which works everywhere. */
.revamp-sheet-card.sw-owns-sheet > h2,
.revamp-sheet-card.sw-owns-sheet > #print-sheet-subline,
.revamp-sheet-card.sw-owns-sheet > .print-sheet-primary-container,
.revamp-sheet-card.sw-owns-sheet > .print-sheet-secondary {
    display: none;
}
#print-sheet-subline { color: var(--text-secondary); margin-bottom: 1.5rem; }
.print-sheet-primary-container { margin-bottom: 1.5rem; }
.print-sheet-primary-container .primary-btn { width: 100%; font-size: var(--fs-lg); padding: 1rem; }
/* Nothing to print yet: the dock's Print wears the held Save's look (src/revamp.js is-print-held). */
.print-sheet-primary-container .primary-btn:disabled,
.revamp-dock #revamp-dock-print.is-print-held { background: #e9e2f2; color: var(--text-secondary); opacity: 1; cursor: not-allowed; }
#print-sheet-disabled-msg { margin-top: 0.5rem; color: var(--warn-text); font-size: var(--fs-sm); display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
#print-sheet-show-me { background: none; border: none; color: var(--warn-text); text-decoration: underline; font-weight: var(--fw-strong); cursor: pointer; }
.print-sheet-secondary { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.print-sheet-secondary button { background: none; border: none; color: var(--accent-text); font-weight: var(--fw-strong); cursor: pointer; font-size: var(--fs-sm); text-decoration: underline; }
.print-sheet-close { width: 100%; padding: 0.8rem; background: var(--bg-2); border: none; border-radius: var(--radius-control); cursor: pointer; font-weight: var(--fw-strong); }

body[data-mode='organic'] {
    --accent-color: #74dcb4;
    --accent-text: #1c6b4a;
    --border-card: #1c6b4a;
    --ok-text: #1c6b4a;
    --warn-text: #1c6b4a;
}
/* Model Cut's own gradient (owner, 2026-10-20 ~10:52 local): deep green ->
   green -> yellow-green, the same lightness steps as Flat's rose -> violet ->
   blue, on every Model Cut button including the top 3D Model Cut toggle.
   White text is at least 4.5:1 on every stop (#1c6b4a, #2a8556, #557f10). */
body[data-mode='organic'] {
    --mc-grad: linear-gradient(135deg, #1c6b4a 0%, #2a8556 55%, #557f10 100%);
}
body[data-mode='organic'] .primary-gradient-pill,
body[data-mode='organic'] .revamp-card button.primary-btn,
body[data-mode='organic'] .revamp-confirm-btn,
body[data-mode='organic'] .revamp-dock .primary-gradient-pill,
body[data-mode='organic'] .revamp-dock button.primary-gradient-pill:hover,
body[data-mode='organic'] button.primary-gradient-pill:hover,
body[data-mode='organic'] button.revamp-confirm-btn:hover,
body[data-mode='organic'] .revamp-panel-toggle,
body[data-mode='organic'] #mc-proxy-switch-pos-field .revamp-count-chip[aria-pressed='true'],
body[data-mode='organic'] .revamp-topdock button[aria-pressed='true'] {
    background: var(--mc-grad);
    color: var(--c-white);
    border-color: transparent;
}
body[data-mode='organic'] .hotspot-dot {
    border-color: var(--c-green-700);
}
body[data-mode='organic'] .hotspot-dot svg {
    fill: var(--c-green-700);
}
body[data-mode='organic'] .revamp-card input[type="range"] {
    background: var(--accent-3) !important;
}
body[data-mode='organic'] .revamp-card input[type="range"]::-webkit-slider-thumb {
    border-color: var(--c-green-700);
}

#colour-hotspot-dot {
    position: absolute;
    top: 26%;
    left: 65%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    z-index: 500;
}
#colour-hotspot-dot svg {
    width: 20px;
    height: 20px;
}
/* Pinned to the model (ALI-44): placed by src/revamp.js after every drawn
   frame, in the coordinates of the box the dot sits in (still absolute, so
   offsetParent keeps meaning "rendered"). 32 px to see, 44 px to hit: the
   ::after ring is the finger target, and !important beats src/mobile.css's
   44 px rule, which was about the target, not the look. */
#colour-hotspot-dot.is-pinned {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
}
#colour-hotspot-dot.is-pinned svg {
    width: 16px;
    height: 16px;
}
#colour-hotspot-dot.is-pinned::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: var(--radius-chip);
}
#colour-hotspot-dot.is-pinned[data-off-model] {
    visibility: hidden;
}
#card-colour-dot {
    position: absolute;
    top: 32%;
    /* Right edge anchored 48px left of the hotspot dots' column (65%; the
       Hollow dot that shared it is removed, ALI-77): calc(35% + 48px) keeps a
       constant gap to the Colours dot. A left-anchored card failed this at
       content widths (374px wide, overlap at 1424px). */
    left: auto;
    right: calc(35% + 48px);
    width: 300px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
}
#card-colour-dot .revamp-field {
    margin: 0;
}
/* The viewer choices own this setting. Keep the select as their event
   target, but remove its duplicate row from the More-options surface. */
body[data-mode='organic'] #organicColorModeRow {
    display: none !important;
}
#card-colour-dot h3 {
    margin: 0 0 4px;
    font-size: var(--fs-base, 15px);
    /* reserves the 44px close target so heading text and button never
       collide (button intrudes ~36px into the content box at right:8) */
    padding-right: 40px;
}
#card-colour-dot .close-btn {
    /* base .revamp-floating-card .close-btn is glyph-sized (9.34x18
       measured at desktop); the house control floor is 40px (hotspot
       dots) — 44px matches the phone global target everywhere */
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767px) {
    #colour-hotspot-dot {
        top: 24%;
        left: 65%;
    }

    #card-colour-dot {
        position: fixed;
        top: var(--colour-card-top, 118px);
        left: 12px;
        right: auto;
        transform: none;
        width: var(--colour-card-width, calc(65vw - 44px));
        max-width: calc(100vw - 24px);
        max-height: var(--colour-card-height);
        padding: 8px;
        gap: 8px;
    }
    #card-colour-dot h3 {
        min-height: 44px;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        margin: 0;
        padding-right: 44px;
    }
    #card-colour-dot .revamp-field {
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        flex: 1 1 auto;
    }
    #card-colour-dot .revamp-pick-grid {
        grid-template-columns: 1fr;
    }
    #card-colour-dot .revamp-pick {
        min-height: 44px;
        padding: 4px 6px;
    }
}
.mc-cut-subcontrols {
    display: flex;
    flex-direction: column;
    /* On the --space-* beat like every other card (2026-09-01 cut-picker
       pass; was an ad-hoc 10px/10px/4px scale of its own). */
    gap: var(--space-field);
    margin-top: var(--space-hug);
    padding: 0;
}
.mc-cut-subcontrols[hidden] {
    display: none !important;
}
/* mc-g2 "Choose cut" pictured pickers (owner, 2026-09-01: "self explanatory
   shapes"): dome-and-cut diagram over a short label, compact so the trio
   costs no more height than the old text pills did. Selection keys off
   aria-pressed and fills with the house primary gradient; organic mode swaps
   in the tree's own green for this selected state (since M7 D1 the primary
   buttons keep Flat's gradient in both modes), and the diagram goes white so
   it stays readable on the fill. Hover is the .revamp-dropzone lift. */
#mc-cut-style-row {
    gap: var(--space-chip);
}
#mc-cut-style-row .preset-btn {
    gap: var(--space-hug);
    padding: var(--space-field) var(--space-chip);
}
#mc-cut-style-row .preset-btn svg {
    width: 34px;
    height: 17px;
}
#mc-cut-style-row .preset-btn:hover {
    transform: scale(1.02) translateY(-1px);
    box-shadow: 0 6px 20px var(--c-violet-a20);
}
#mc-cut-style-row .preset-btn.active,
#mc-cut-style-row .preset-btn[aria-pressed="true"] {
    background: linear-gradient(115deg, var(--c-rose-700) 0%, var(--c-violet-600) 55%, var(--c-blue-600) 100%);
    color: var(--c-white);
    border-color: var(--border-card);
}
body[data-mode='organic'] #mc-cut-style-row .preset-btn.active,
body[data-mode='organic'] #mc-cut-style-row .preset-btn[aria-pressed="true"] {
    background: var(--mc-grad);
}
#mc-cut-style-row .preset-btn[aria-pressed="true"] svg [fill="url(#chrome-icon-grad)"] {
    fill: var(--c-white);
}
#mc-cut-style-row .preset-btn[aria-pressed="true"] svg [fill="#e8def5"] {
    fill: rgba(255, 255, 255, 0.4);
}
body[data-mode='organic'] .revamp-dock button:hover {
    background: rgba(116, 220, 180, 0.15);
}

#legacy-sidebar-wrapper,
#legacy-instructions-wrapper,
#legacy-export-wrapper,
#legacy-article-wrapper,
.instructions,
.viewer-build-status,
.loading-overlay.compact,
.loading-overlay.complete {
    display: none !important;
}

/* The sheet grab handle exists for the phone bottom sheet only. */
.sheet-peek-toggle {
    display: none;
}

/* "All controls" rings the Fine-tuning group it opens for a moment: the same
   still ring the section guide's "Show me" leaves on a control (.sg-flash in
   src/section-guide.css, which loads only with that guide). */
.revamp-group.revamp-found {
    outline: 3px solid var(--focus-ring, #b3275d);
    outline-offset: 3px;
    border-radius: var(--radius-control);
}

.revamp-quick-finds {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}
.revamp-quick-find {
    border: 1px solid var(--border-soft);
    background: #faf7ff;
    border-radius: var(--radius-chip);
    padding: 0.35rem 0.7rem;
    font-size: var(--fs-sm);
    cursor: pointer;
}
.revamp-more-host .logo > img,
.revamp-more-host .logo h1,
.revamp-more-host #guideBtn {
    /* Branding header and the old tour launcher are superseded inside the
       More hosts: the chrome carries the brand and the coach
       replaced the tour (owner-approved). Every functional control stays. */
    display: none !important;
}
#revamp-studio #legalFooter {
    /* Terms · Privacy MOVE OUT of the door (owner, 2026-08-31, order 3) —
       #legalFooter (initLegalFooter() in src/paywall.js) still gets appended
       into #sidebar and rides into this same door as part of the sidebar
       "residue" in rehomeSections(), so without this it would just duplicate
       the new hard .revamp-panel-footer below the cards. Scoped to
       #revamp-studio, not a bare `#legalFooter` rule, so a still-unmounted
       or differently-hosted footer elsewhere is never silently killed by a
       selector that outlives the reason it was written. */
    display: none !important;
}
/* The in-group More door and the sections living behind it. */
.revamp-more {
    margin: 0.5rem 0 0.75rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    background: #faf8ff;
}
.revamp-more-toggle {
    display: block;
    width: 100%;
    text-align: left;
    cursor: pointer;
    padding: 0.55rem var(--space-air);
    min-height: 44px;
    background: transparent;
    border: none;
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    color: var(--text-secondary);
}
/* Door insets widened in the 2026-09-01 spacing pass (owner: "neater, more
   spacing"; the door was the known-dense pocket). Free against the
   zero-scroll law: the host scrolls internally (max-height 42vh below), so
   its air never grows the group past the panel. */
.revamp-more-host {
    padding: var(--space-field) var(--space-air) var(--space-air);
}
.revamp-more-host .stack-section,
.revamp-more-card .stack-section {
    border: none;
    box-shadow: none;
    background: transparent;
    /* Sections used to sit flush (margin 0) — one readable beat apart now,
       so where one legacy section ends and the next begins is visible. */
    margin: 0 0 var(--space-card);
}
.revamp-more-host .sidebar,
.revamp-more-card .sidebar {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
}

/* Legacy media re-homed into the tree must fit its card, not size it:
   #imagePreview and friends carry their own intrinsic dimensions. */
.revamp-card #imagePreview,
.revamp-card #imagePreview img,
.revamp-card #imagePreview canvas,
.revamp-more-host img,
.revamp-more-host canvas {
    max-width: 100%;
    max-height: 160px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* A More door is a calm, contained pocket — never a second scrolling app.
   The legacy sections inside keep their controls and lose their own chrome
   (step numbers, guide chips): the tree already says where you are. */
.revamp-more-host {
    max-height: 42vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.revamp-more-host .section-index,
.revamp-more-host .section-meta,
.revamp-more-host .sg-launch,
.revamp-more-host [class*="sg-launch"],
.revamp-more-host .guide-open-btn,
.revamp-more-host .stack-nav,
.revamp-more-host .stack-nav-all {
    display: none !important;
}
.revamp-more-host .section-title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    color: var(--text-secondary);
}
.revamp-more-host summary {
    padding: var(--space-card) var(--space-chip);
}

.coach-close {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* A collapsed group folds its More door away with it. */
.revamp-group.collapsed .revamp-more {
    display: none;
}
/* No scrollbar jitter: reserve the gutter. */
.revamp-studio-content {
    scrollbar-gutter: stable;
}
/* The dock waits until the fork is answered. The empty studio itself uses the
   existing minimised state, so its reachable tab can still reopen it. */
body[data-revamp-mode='arrival'] .revamp-dock {
    display: none !important;
}
/* With the panel gone at arrival, brand and mode dock anchor to the window. */
body[data-revamp-mode='arrival'] #revamp-brand {
    left: 18px;
}
@media (min-width: 769px) {
    body[data-revamp-mode='arrival'] .revamp-topdock {
        left: 50%;
    }
}
/* The MODE pair: the parent level, docked on top, always visible. */
.revamp-topdock {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    background: var(--c-white);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-chip);
    padding: 0.3rem;
    box-shadow: 0 4px 18px var(--shadow-soft);
    z-index: 1600;
}
.revamp-topdock button {
    display: flex;
    align-items: center;
    gap: var(--space-field);
    border: none;
    background: transparent;
    border-radius: var(--radius-chip);
    padding: 0.5rem 0.9rem;
    min-height: 40px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    cursor: pointer;
}
.revamp-topdock button[aria-pressed='true'] {
    /* The readable accent, as on the phone (src/mobile.css): white on candy
       pink was 2.44:1, and 1.66:1 on the Model Cut green. */
    background: var(--accent-text, #b3275d);
    color: var(--c-white);
}
.revamp-topdock button[aria-pressed='true'] svg [fill] {
    fill: var(--c-white);
}
/* Door hygiene: the legacy stepper chips and their wrap rows stay out of
   the doors (the tree already numbers the journey). */
.revamp-more-host .stack-nav-chip,
.revamp-more-host [class*="stack-nav"],
.revamp-more-host .section-index,
.revamp-more-host .sg-launch-label,
.revamp-more-host [id^="sectionGuideBtn"] {
    display: none !important;
}
/* Raw native checkboxes inside doors get the candy treatment's scale. */
.revamp-more-host input[type='checkbox'] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent-color, #ff7aa8);
}
/* Door controls meet the kid-tap bar. */
.revamp-more-host .edge-preset {
    min-height: 40px;
    font-size: var(--fs-sm);
}
.revamp-dock button {
    min-height: 40px;
}
#end-print-btn {
    min-height: 44px;
}

/* Docks centre on the VIEWER, not the window — the panel eats the left
   side, so window-centre reads off-centre over the stage (owner). */
@media (min-width: 769px) {
    .revamp-dock,
    .revamp-topdock {
        left: calc(var(--sidebar-width) + (100% - var(--sidebar-width)) / 2);
    }
    /* ...and the TOP dock has a second constraint the bottom one does not:
       the brand lockup is pinned at `--sidebar-width + 18px` on the same
       14px band. Widen the panel and the wordmark walks right while a
       viewer-centred dock walks left — they close at TWICE the rate the
       panel grows, so the clearance is `viewport - sidebar - 835px` and it
       runs out long before either element looks crowded on its own.
       Measured 2026-09-01 at a 1280 window: 14px of daylight at a 400px
       panel, -8px (the "d" of Wonderland under the dock's left edge) at
       444px. It was already negative at 1200px BEFORE this round's
       widening, so this is a latent bug the wider panel exposes rather
       than one it invents.

       max() keeps viewer-centre wherever it fits — 1440 and up is
       untouched — and only when centring would put the dock inside the
       wordmark does it hold the dock at "brand ink + 20px". The 438px is
       the wordmark's measured ink (222) + its 18px offset + a 20px gap +
       half the dock's 355px width; it is a floor, so if the wordmark ever
       gets shorter the clause simply stops binding. */
    .revamp-topdock {
        left: max(
            calc(var(--sidebar-width) + (100% - var(--sidebar-width)) / 2),
            calc(var(--sidebar-width) + 438px));
    }
}

/* Buttons pop on hover: a touch bigger, lighter, lifted (owner ask).
   Transform/filter/shadow only — never layout properties. */
.revamp-dock button,
.revamp-topdock button,
.revamp-fork-btn,
.revamp-confirm-btn,
.revamp-more-toggle,
.revamp-quick-find,
.revamp-group-header,
.print-sheet-close,
#end-print-btn,
#shp-end-print-btn,
#mc-end-print-btn,
#proxy-export3mfBtn {
    transition: transform var(--dur-150) ease, filter var(--dur-150) ease, box-shadow var(--dur-150) ease;
    will-change: transform;
}
.revamp-dock button:hover,
.revamp-topdock button:hover,
.revamp-fork-btn:hover,
.revamp-confirm-btn:hover,
.revamp-more-toggle:hover,
.revamp-quick-find:hover,
.print-sheet-close:hover,
#end-print-btn:hover,
#shp-end-print-btn:hover,
#mc-end-print-btn:hover,
#proxy-export3mfBtn:hover {
    /* OWNER, 2026-09-05 (screen recording): "the more options button ... is
       not as per other button", "the animation not consistent when hovering",
       "i think it is same for all".

       It WAS the same rule for all - and that is why it felt wrong. A 6%
       scale moves a 44px pill's edge by about 1px and a full-width row's by
       about 7px each side, so one control pops and another lunges past the
       panel edge. Identical CSS, different feeling, because the transform was
       proportional to the element.

       The lift is now size-independent: every button rises the same 1px,
       brightens the same amount and casts the same shadow, whatever its
       width. Same duration and easing as before. */
    transform: translateY(-1px);
    filter: brightness(1.07);
    box-shadow: 0 6px 20px rgba(150, 120, 200, 0.28);
}
.revamp-group-header:hover {
    filter: brightness(1.05);
    transform: scale(1.01);
}
.revamp-dock button:active,
.revamp-topdock button:active,
.revamp-fork-btn:active,
.revamp-confirm-btn:active,
#end-print-btn:active,
#shp-end-print-btn:active,
#mc-end-print-btn:active {
    transform: scale(0.97);
}
/* Gradient pills wash out under lightening — they pop by size and lift only. */
.revamp-dock button.primary-gradient-pill:hover,
button.primary-gradient-pill:hover,
button#end-print-btn:hover,
button#shp-end-print-btn:hover,
button#mc-end-print-btn:hover,
button#proxy-export3mfBtn:hover,
button.revamp-confirm-btn:hover {
    filter: none;
    opacity: 1;
    background: linear-gradient(115deg, var(--c-rose-700) 0%, var(--c-violet-600) 55%, var(--c-blue-600) 100%);
    color: var(--c-white);
}

/* Touch has no hover: the pop happens on the tap itself (owner). */
@media (pointer: coarse) {
    .revamp-dock button:active,
    .revamp-topdock button:active,
    .revamp-fork-btn:active,
    .revamp-confirm-btn:active,
    .revamp-more-toggle:active,
    .revamp-quick-find:active,
    #end-print-btn:active,
    #shp-end-print-btn:active,
    #mc-end-print-btn:active,
    #proxy-export3mfBtn:active {
        transform: scale(1.07);
        box-shadow: 0 6px 20px var(--c-violet-a30);
    }
}

@media (prefers-reduced-motion: reduce) {
    .revamp-dock button, .revamp-topdock button, .revamp-fork-btn,
    .revamp-confirm-btn, .revamp-more-toggle, .revamp-quick-find,
    .revamp-group-header, .print-sheet-close,
    #end-print-btn, #shp-end-print-btn, #mc-end-print-btn,
    #proxy-export3mfBtn {
        transition: none;
    }
    .revamp-dock button:hover, .revamp-topdock button:hover,
    .revamp-fork-btn:hover, .revamp-confirm-btn:hover,
    .revamp-group-header:hover {
        transform: none;
    }
}

/* The brand lockup: top-left, over the viewer — always present, and bigger
   now with "by Babah3D" back underneath it (owner, 2026-08-31, order 2).
   flex-wrap so the byline drops to its own line under the wordmark, the same
   stacking .logo itself used before the wordmark moved here. */
#revamp-brand {
    position: fixed;
    top: 14px;
    left: calc(var(--sidebar-width) + 18px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    z-index: 1500;
    pointer-events: none;
}
/* The account chip closes the brand row — the owner's 2026-08-04 header
   doctrine ("the brand, one way to learn, one way to your account, and
   nothing else") carried into the chrome. The row itself is click-through;
   the chip alone takes the pointer back. */
#revamp-brand #accountChip {
    pointer-events: auto;
    margin-left: 0.6rem;
}
#revamp-brand > img {
    width: 30px;
    height: 30px;
}
/* var(--fs-mark), not var(--fs-base): --fs-mark is the family's own step for
   marks/wordmarks (siblings' logos sit on it too — the ladder's "recorded
   divergences" section is why THIS app's .logo h1 sits above it instead), and
   the ladder already carries it, so reaching for it is a token pick, not a
   new literal. The wordmark's OWN pinned rule (.logo h1 in
   tests/type-ladder-gate.mjs, "the wordmark" section) stays exactly as
   authored — this is a separate, higher-specificity selector (#revamp-brand
   h1 beats .logo h1 on an ID) that overrides the rendered size wherever the
   element currently lives without touching the pinned declaration at all. */
#revamp-brand h1 {
    font-size: var(--fs-mark);
    flex-basis: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    /* The wordmark's own colours (owner: "original font is different
       colour"): the SAME stops .logo h1 documents at length — the owner's
       logo ramp, lightness-tuned for 3:1. Now a fourth copy beside
       .sw-wordmark and .pw-wordmark; change all four together. */
    background: linear-gradient(115deg, #d1539e 0%, var(--icon-accent) 55%, #677dd1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* 28px, not 22: scaled by the same ratio as the font-size step above it
   (20/16 = 1.25 -> 22 * 1.25 = 27.5, rounded to a whole pixel) so the mark
   grows in step with the word rather than the two drifting apart. */
#revamp-brand h1 img.wordmark-cube {
    width: 28px;
    height: 28px;
}
/* "by Babah3D" — moved here from .logo (see the boot block in revamp.js),
   so its declarations are the SAME FOUR .logo .brand-line already carries,
   just repeated under this selector: the descendant combinator can't reach
   an element that is no longer inside .logo, and re-pointing the rule at a
   different ancestor would silently blind tests/a11y-static.mjs / the a11y
   contrast read the same way retyping the wordmark's own family would (see
   the giant comment on .logo h1 above). letter-spacing needed its own row in
   tests/type-ladder-gate.mjs EXCEPTIONS for the same reason — it is pinned
   there as "#revamp-brand .brand-line", not folded into .logo's row. */
#revamp-brand .brand-line {
    flex-basis: 100%;
    font-size: var(--fs-sm);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin: 0;
}

/* The drop zone: obvious, friendly, centred — but not a billboard. Shared
   with .revamp-upload-btn (3D-model import) so both sidebar import
   affordances carry the same dashed-border / icon / hover-pop language —
   the model one had none of this before (owner: "not interactive enough,
   no animation whatsoever"). */
.revamp-dropzone,
.revamp-upload-btn,
.mc-empty-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
    padding: 0.9rem 1rem;
    border: 2px dashed var(--accent-color, #ff7aa8);
    border-radius: var(--radius-card);
    background: #fff7fb;
    cursor: pointer;
    min-height: 92px;
    transition: transform var(--dur-150) ease, box-shadow var(--dur-150) ease, background var(--dur-150) ease;
}
.revamp-dropzone:hover,
.revamp-upload-btn:hover,
.mc-empty-drop:hover {
    background: #ffeef6;
    transform: scale(1.02);
    box-shadow: 0 6px 20px var(--c-violet-a20);
}
.revamp-dropzone-title {
    font-size: var(--fs-base);
    font-weight: var(--fw-strong);
}
.revamp-dropzone-sub {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}
.revamp-preview-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin: 0.6rem 0;
}
.revamp-preview-block #proxy-artwork-preview {
    display: flex;
    justify-content: center;
    width: 100%;
}
.revamp-preview-block #imagePreview,
.revamp-preview-block #imagePreview img,
.revamp-preview-block #imagePreview canvas {
    max-height: 190px;
    margin: 0 auto;
}
.revamp-toggle-centred {
    justify-content: center;
}
.revamp-colours-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.revamp-colours-row input[type='range'] {
    flex: 1 1 auto;
}
.revamp-colours-row input[type='number'] {
    width: 5.4rem;
    min-height: 38px;
    text-align: center;
}
/* BRIEF-124 "Where it clicks": X and Y ride ONE .revamp-colours-row instead
   of two full fields — #art-g2/#shp-g2 are already at the zero-scroll
   ceiling (see the density-token comment lower in this file: ~12px of
   spare at 1440x900 before this field existed), so this reuses the
   established field+row pattern but keeps it to the one extra row per
   card the budget can actually absorb. Narrower number boxes than the
   colours-row default free width back to the ranges, which two axes
   sharing a row otherwise starve. */
.revamp-offset-row input[type='number'] {
    width: 4rem;
    min-height: 30px;
    /* Chromium's built-in number-input spinner enforces its own intrinsic
       min height regardless of the min-height above — removing it is what
       actually let this row shrink further (the thumb/line-height changes
       alone had already stopped moving the measured scrollHeight). */
    -moz-appearance: textfield;
}
.revamp-offset-row input[type='number']::-webkit-outer-spin-button,
.revamp-offset-row input[type='number']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.revamp-offset-axis-tag {
    flex: 0 0 auto;
    line-height: 1;
}
/* At min-height:16px the number box stopped being the row's tallest child —
   the range thumb (18px + 3px border on .revamp-card's default) took over,
   so this row gets its own smaller thumb to keep shrinking. */
/* 2026-09-01: back UP to 18px. The 12px thumb was shaved when this row's
   own number box was at min-height 16 and the thumb was briefly the row's
   tallest child; the box is 30px now, so the thumb is free again up to 30
   and 12px was simply the smallest grab handle in the panel. */
.revamp-offset-row input[type='range']::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    border-width: 3px;
}
.revamp-offset-row input[type='range']::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-width: 3px;
}
/* The measured 1440x900 zero-scroll gate (BRIEF-124) still had only ~12px
   spare in #art-g2/#shp-g2 before this field existed (see the density-token
   comment lower in this file) — every extra px this field's OWN label and
   row cost had to come back out of it, on top of the narrower number boxes
   above. */
#proxy-switch-pos-field,
#shp-proxy-switch-pos-field {
    gap: 0.1rem;
}
#proxy-switch-pos-field label,
#shp-proxy-switch-pos-field label {
    line-height: 1.1;
}
.revamp-switch-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.revamp-switch-count-btns {
    display: inline-flex;
    gap: 0.25rem;
    /* No wrap here: Flat's Artwork/Shape rows keep their single incumbent
       line. Only the Model Cut picker wraps, scoped below - a global wrap was
       the sole style regression over the accepted Flat row. */
}
/* Model Cut switch count can reach four chips plus the label inside a narrow
   card column, so it alone wraps to a second line. */
#mc-proxy-switch-pos-field .revamp-switch-count-btns {
    flex-wrap: wrap;
}
/* The visually hidden switch-count <select> right after these buttons is the
   accessible control and stays in the Tab order, but a 1 px clipped box can
   show no ring. Its keyboard focus shows on the buttons it stands for (M7
   inventory, FIX-LIST.md row 3). */
.revamp-switch-count-btns.kb-focus {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}
.revamp-count-chip {
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.35rem;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-control);
    background: var(--c-white);
    color: var(--text-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-strong);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dur-150) ease, border-color var(--dur-150) ease;
}
.revamp-count-chip:hover {
    border-color: var(--accent-color, #ff7aa8);
}
.revamp-count-chip[aria-pressed='true'] {
    border-color: var(--accent-color, #ff7aa8);
    background: #fff1f7;
    color: var(--text-primary);
}
/* Model Cut selected count chip: the generic .revamp-card button rule below
   (0,3,1) outranks the un-scoped [aria-pressed] fill above (0,2,0), so the
   pressed chip rendered identical to its neighbours. Scoping to the real
   switch-position field (owner review, 2026-09-08) restores a clearly filled,
   purple-bordered pressed state for the incumbent gradient. */
#mc-proxy-switch-pos-field .revamp-count-chip[aria-pressed='true'] {
    background: linear-gradient(115deg, var(--c-rose-700) 0%, var(--c-violet-600) 55%, var(--c-blue-600) 100%);
    border: 1.5px solid var(--c-violet-600);
    color: var(--c-white);
}
.revamp-active-switch-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.revamp-active-switch-row[hidden] {
    display: none !important;
}
.revamp-active-switch-row label {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}
.revamp-active-switch-row select {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 0.1rem 0.5rem;
    font-size: var(--fs-base);
    min-width: 100px;
}
.revamp-arrange-sym-btn {
    flex: 0 0 auto;
    font-size: var(--fs-sm);
    padding: 0.15rem 0.75rem;
    min-height: 44px;
    white-space: nowrap;
}
.revamp-offset-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 60px;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    width: 100%;
}
.revamp-offset-axis-tag {
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    color: var(--text-secondary);
}
.revamp-offset-row input[type="range"] {
    width: 100%;
    min-width: 0;
}
.revamp-offset-row input[type="number"] {
    flex: 0 0 60px;
    min-width: 0;
    min-height: 44px;
    text-align: center;
    font-size: var(--fs-base);
}
.revamp-offset-centre {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 0.75rem;
    font-size: var(--fs-sm);
}
/* Colours sit together — labelled, stacked and centred (owner). */
#proxy-top-base-color,
#shp-proxy-top-base-color {
    display: flex;
}
/* Pictured pickers: little drawings that say what they do. */
.revamp-pick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}
.revamp-pick-grid.revamp-pick-two {
    grid-template-columns: repeat(2, 1fr);
}
.revamp-pick {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.3rem 0.25rem;
    min-height: 46px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-control);
    background: var(--c-white);
    cursor: pointer;
    font-size: var(--fs-sm);
    transition: transform var(--dur-150) ease, box-shadow var(--dur-150) ease, border-color var(--dur-150) ease;
}
.revamp-pick:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 5px 16px rgba(150, 120, 200, 0.24);
}
.revamp-pick[aria-pressed='true'] {
    border-color: var(--accent-color, #ff7aa8);
    background: #fff1f7;
    box-shadow: inset 0 0 0 1px var(--accent-color, #ff7aa8);
}
/* Rows the primary surface already owns step aside inside the door. */
.revamp-dup-hidden {
    display: none !important;
}

/* The legacy flat preview never shows inside the mirror host — a fresh
   upload used to re-show #imagePreview (double render + overflow); CSS
   owns this permanently, not per-event JS. */
#proxy-artwork-preview #imagePreview {
    display: none !important;
}

/* Removed background must LOOK removed: the classic checkerboard shows
   through wherever the picture became transparent — but only while the
   mirror shows content (.has-preview, toggled by mirrorBuiltPreview);
   an empty preview area renders plain, never as a bare checker strip. */
.revamp-preview-block #proxy-artwork-preview.has-preview {
    background:
        repeating-conic-gradient(#efe9f7 0% 25%, var(--c-white) 0% 50%)
        50% / 16px 16px;
    border-radius: var(--radius-inset);
    padding: 6px;
}

#revamp-preview-mirror {
    max-width: 100%;
    max-height: 190px;
    display: block;
    margin: 0 auto;
}
/* The re-trace chip is GONE (owner, 2026-09-01: one tracer, never two) —
   fresh work always traces v6; saved designs keep their recorded version
   silently. */

/* Surprise-me is retired from the chrome (owner); the shape grid itself is
   the picker, living in the Shape path's own card. */
#shp-shape-host #surpriseBtn,
#shp-shape-host #surpriseHelp,
body:not(.revamp-artwork-preset) .revamp-more-host #shapeGroup {
    display: none !important;
}
/* The retired Surprise-me button leaves its info-note launcher (info-note.js
   buildLauncher: a div.in-row wrapping the now-hidden #surpriseHelp plus a
   still-visible .in-open "ⓘ" button) behind as a dead row that answers a
   question about a control that is not there. Scoped to this home only —
   the artwork More-door's #shapeGroup still runs Surprise-me live, so its
   own .in-row stays reachable. */
#shp-shape-host .in-row {
    display: none !important;
}
/* "Clean shapes give a reliable guided fit — no picture needed" sells the
   PICK between a shape and a picture — live and correct in the artwork
   preset door, where that choice is still open. In the shape tree's own
   home the choice is already made (you are here), so the line only spends
   height explaining a decision that is behind you; the shape grid's own
   aria-label ("Button shapes") still names what the picker is for. */
#shp-shape-host #shapeGroup > small {
    display: none !important;
}
/* Owner, 2026-08-31: "make panel bigger to fit all the shapes" — this
   card's own padding/gap (from the shared .control-group, 1.35rem/1rem)
   were never part of the zero-scroll density pass because that pass only
   reached .revamp-* classes; #shapeGroup is the legacy component the shape
   grid still lives in. Tightened here, scoped to this home only. */
#shp-shape-host .control-group {
    padding: 0.4rem 0.6rem;
    gap: var(--space-hug);
}
#shp-shape-host .control-group h3 {
    padding-bottom: 0.05rem;
    margin-bottom: 0;
    border-bottom-width: 1px;
}
/* Owner, 2026-08-31: "dont like this slider either, can remove and make
   panel bigger to fit all the shapes, sames in the more options when in
   artwork mode." This is the SAME #shapeGrid node re-homing between two
   places (syncShapeHome above) — one rule reaches both without a second
   scrolling surface inside either. No separate arrow/scroll-affordance
   elements exist in this app's markup for either home; only the native
   scrollbar the max-height above used to draw, now removed. Six columns +
   the compact chip sizing below keep all 22 chips (14 parametric shapes +
   8 un-hidden starter icons) inside the 1440x900 zero-scroll budget.
   Icon chips still hide in the artwork preset door (rule above, unchanged). */
#shp-shape-host .shape-grid,
.revamp-more-host #shapeGrid {
    grid-template-columns: repeat(6, 1fr);
    gap: 0.15rem;
}
#shp-shape-host .shape-chip,
.revamp-more-host .shape-chip {
    min-height: 30px;
    min-width: 0;
    padding: 0.1rem 0.1rem;
    gap: 0.05rem;
    border-width: 1px;
}
/* One line, not two: at five-up on a ~380px card a wrap like "Rounded
   square" doubles the row height across 22 chips. The full name still
   reaches an owner or a screen reader via title/aria-label on the button
   itself (bindShapes(), src/ui.js) — this only shortens what's painted. */
#shp-shape-host .shape-chip span:last-child,
.revamp-more-host .shape-chip span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
/* .shape-emoji's own font-size (var(--fs-mark), 20px) is what the icon's
   "1.4em" reads off, not the 0.62rem chip text beside it — so shrinking the
   icon means resizing this span too, not just the svg. --fs-sm is the
   ladder's own next-smallest step, not a new number. */
#shp-shape-host .shape-chip .shape-emoji,
.revamp-more-host .shape-chip .shape-emoji {
    font-size: var(--fs-sm);
}
#shp-shape-host .shape-chip .shape-emoji svg,
.revamp-more-host .shape-chip .shape-emoji svg {
    width: 14px;
    height: 14px;
}

/* In the ARTWORK path's "Clean shape" context the grid picks the preset
   OUTLINE for the uploaded picture — and an outline is one of the 14
   parametric SHAPES, the same list the hidden imagePerimeterShape select
   offers. Starter-icon chips are a different action (they replace the
   uploaded picture with the icon silhouette), so here they do not appear. */
body.revamp-artwork-preset .revamp-more-host #shapeGrid [data-icon] {
    display: none !important;
}

/* Squircle reads as Rounded square's twin (owner, 2026-08-31: "both of
   these are redundant very similar remove one of it") — the plainer-named
   chip stays; the shape itself remains reachable through the legacy
   imagePerimeterShape select in All controls. */
#shapeGrid [data-shape="squircle"] {
    display: none !important;
}

/* G2 carries many choices: tighten the rhythm so the whole group stays
   above the fold at 1440x900 (never-scroll law). This used to add a
   margin-bottom to every field ON TOP OF .revamp-card's own flex `gap`
   (14px + 5.6px between every field, double-spaced) — gap now does that
   job alone. Every rung below it is tightened the same way: card
   gap/padding, the pick chips (whose own padding/min-height were being
   silently overridden by `.revamp-card button:not(.primary-btn)
   :not(.preset-btn)` at higher specificity — that 8px/16px padding was
   part of why "How the picture sits" wrapped to two lines), the pick
   icon size, the pick-grid's own row gap, the Colours block (the
   Button/Base swatches now ride one row instead of stacking, via a
   flex-wrap trick that needs no DOM change), the open-group header, the
   More door's margin and the confirm button's top margin. Verified live
   at 1440x900: #art-g2 .revamp-card drops from ~897px to ~593px and the
   panel stops scrolling (~12px to spare against the 900px viewport). */
#art-g2 .revamp-field,
#shp-g2 .revamp-field,
#art-g3 .revamp-field,
#shp-g3 .revamp-field {
    margin-bottom: 0;
    gap: var(--space-hug);
}
/* Spacing pass 2026-09-01: a label sits --space-hug from ITS control (the
   rule above) and one field sits --space-card from the NEXT — the two gaps
   used to be 2.4px vs 4.8px, near-identical, which is what read as "one
   crowded run" in the owner's screenshots. g3 has the measured slack for
   the full card step (63px art / 101px shp below the fold before this);
   g2 is at the exact zero-scroll ceiling and takes the smaller --space-field
   beat in its own rule further down, funded by the Centre-button reclaim. */
#art-g2 .revamp-card,
#shp-g2 .revamp-card,
#art-g3 .revamp-card,
#shp-g3 .revamp-card {
    gap: var(--space-card);
    padding-top: var(--space-card);
    padding-bottom: var(--space-card);
}
/* .revamp-card label {display:block} (above) outranks .revamp-toggle-row's
   own display:flex on specificity (0,1,1) > (0,1,0) — every toggle row
   (Keychain/Magnet/Lanyard, background-remove, and now Ring hole) has been
   rendering as a stacked block box, not the single flex row the switch's
   ::after thumb geometry assumes. Restoring flex here (0,2,0) is what makes
   room for the 4th row added to art-g3/shp-g3; it also fixes the same latent
   two-line collapse for every other toggle row in every tree. */
.revamp-card .revamp-toggle-row {
    display: flex;
}
/* art-g3/shp-g3 carry a 4th toggle row (Ring hole) the fixed-height Features
   card budget wasn't drawn for; the flex fix above already recovers a little
   headroom, this recovers the rest the same way the card-gap compaction
   above does — scoped to just these two trees' toggle rows, so mc-g3's
   three rows and the background-remove toggle keep the roomier default. */
#art-g3 .revamp-toggle-row,
#shp-g3 .revamp-toggle-row {
    /* 34px in the density pass; 38px in the 2026-09-01 spacing pass; 44px
       for M7's touch-target standard (FIX-LIST.md row 4). The 2x2 grid puts
       the four toggles on two rows, so this costs the card 12px, inside the
       desktop panel's measured room; tests/touch-target-gate.mjs holds both
       the 44px and the no-scroll budget. */
    min-height: 44px;
}
/* 2x2 accessory grid (2026-09-01): the four toggles share two rows, which is
   what funds the font-upload row above them — g3 measured 776/776 (zero
   headroom) before this trade. Each cell keeps the full toggle row: icon,
   label, switch, same ids, same wiring; the labels are the four shortest in
   the panel, so half-width holds even in the 375px phone sheet. */
.revamp-toggle-grid {
    display: grid;
    /* The left track is wider on purpose: it holds "Keychain" and "Lanyard
       slot", the two long labels, while the right holds "Magnet" and "Ring
       hole" — even 1fr/1fr ellipsized "Lanyard slot" in the 2026-09-01
       shots, and renames are banned. */
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    column-gap: 0.5rem;
    row-gap: var(--space-field);
}
/* Half-width cells: the roomy 12px icon/label/switch gaps were the other
   half of that ellipsis — 8px and an 18px icon give the longest label its
   full words back with the switch still clear of it. */
.revamp-toggle-grid .revamp-toggle-row {
    gap: 8px;
}
.revamp-toggle-grid .revamp-toggle-icon {
    width: 18px;
    height: 18px;
}
.revamp-toggle-grid .revamp-toggle-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* BRIEF-124 seat V (standardisation pass): ONE pick-chip scale for every
   card in this scope — g3 is added here for the first time (it was missing
   from this list, so its "How letters sit" pick-two silently fell back to
   the full 46px/0.3rem base .revamp-pick further up this file — the exact
   drift the owner's screenshot showed). Padding/gap are tightened from the
   density pass's own 0.2rem/gap-0.15rem so an icon+text chip's real
   rendered height (padding + 12px icon + gap + ~16px text line) lands at
   the same ~32px box as a dots-only (palette) or text-only (smoothness)
   chip instead of overflowing min-height to ~39px — that overflow, not a
   inconsistent min-height number, was the actual source of the "halves-fit/
   edge-look pills are taller" complaint: min-height was already 32px
   everywhere, content was pushing past it only for icon+text chips. */
#art-g1 .revamp-pick,
#art-g2 .revamp-pick,
#art-g3 .revamp-pick,
#shp-g2 .revamp-pick,
#shp-g3 .revamp-pick {
    /* 2026-09-01 bigger-panel round: 32 -> 40px, paid for by the inline
       field labels below (five label lines returned per g2 card). The
       HORIZONTAL padding went DOWN while the height went up, and that is
       deliberate: with the label now beside it, a two-chip grid gets ~264px
       instead of 388, and "Top hugs the base" needs every px of the cell
       it is in or it wraps to two lines and the row grows 16px. */
    padding: var(--space-hug) 0.3rem;
    gap: 0.12rem;
    min-height: 40px;
}
/* The two-up grids ("How the halves fit", "Button outline") carry the
   longest chip text in the panel and, with the label now beside them, the
   narrowest cells: measured 2026-09-01, "Base hugs the top" needs 122px of
   text and the cell gives 130, so 12px of side padding is what pushed it
   onto a second line and grew the row 16px. Side padding only — the 40px
   height and the vertical rhythm are untouched. */
#art-g2 .revamp-pick-two .revamp-pick,
#shp-g2 .revamp-pick-two .revamp-pick,
#art-g3 .revamp-pick-two .revamp-pick,
#shp-g3 .revamp-pick-two .revamp-pick {
    padding-left: var(--space-hug);
    padding-right: var(--space-hug);
}
#art-g1 .revamp-pick-grid,
#art-g2 .revamp-pick-grid,
#art-g3 .revamp-pick-grid,
#shp-g2 .revamp-pick-grid,
#shp-g3 .revamp-pick-grid {
    gap: var(--space-chip);
}
.revamp-pick svg {
    height: 16px;
    width: 34px;
}
#art-g1 .revamp-pick svg,
#art-g2 .revamp-pick svg,
#art-g3 .revamp-pick svg,
#shp-g2 .revamp-pick svg,
#shp-g3 .revamp-pick svg {
    height: 16px;
    width: 34px;
}
/* Colours: the heading and the palette picker still each take their own
   row (flex-basis 100%); Button/Base swatches are the only two items
   left unconstrained, so they share the next row instead of stacking.
   Seat V: gap was its own third number (0.25rem) where every other stacked
   label->control pair in these cards uses 0.15rem and every other row of
   small items uses 0.2rem between them — split the shorthand so the
   "Colours" heading hugs the strip below it like any other field label
   (row-gap 0.15rem) while the strip's dots/swatches still space out like
   every other pick-grid (column-gap 0.2rem), reusing both existing
   numbers rather than keeping a third. */
/* THE COLOURS BLOCK, 2026-09-01 (owner addendum: "the colour panel also
   very constricted"). Three things were fighting for 128px: a "Colours"
   heading on its own full-width line, a palette strip squeezed to two
   cramped rows with its own hairline scroll arrows, and two custom colour
   wells alone on a third line with ~270px of dead space beside them.

   The heading and the two wells now SHARE one row — heading left, the two
   Button/Base wells trailing right into the space they were already
   wasting — which returns a whole 19px line plus its gap to the strip
   below. The strip keeps the owner's top-to-bottom scroll and spends the
   returned line on taller chips in a taller window. Nothing is removed,
   renamed or rewired: same four children, same order in the DOM (so the
   strip's aria-labelledby still points backwards at a heading that still
   precedes it visually), only `order` and the flex bases move. */
#proxy-top-base-color,
#shp-proxy-top-base-color {
    flex-flow: row wrap;
    align-items: center;
    gap: var(--space-hug) var(--space-chip);
}
#proxy-top-base-color > .palette-pick,
#shp-proxy-top-base-color > .palette-pick {
    flex-basis: 100%;
}
/* Heading takes the row and pushes the wells to its far end. */
#proxy-top-base-color > label,
#shp-proxy-top-base-color > label {
    flex: 1 1 auto;
    order: 0;
}
#proxy-top-base-color > input[type="color"],
#shp-proxy-top-base-color > input[type="color"] {
    flex: 0 0 auto;
    order: 1;
}
/* ...and the strip drops to its own full-width line under both. */
#proxy-top-base-color > .revamp-palette-strip,
#shp-proxy-top-base-color > .revamp-palette-strip {
    flex: 0 0 100%;
    order: 2;
}
#proxy-top-base-color select,
#shp-proxy-top-base-color select {
    min-height: 30px;
    padding: 0.3rem 0.6rem;
}
#art-g2 .revamp-group,
#shp-g2 .revamp-group,
#art-g3 .revamp-group,
#shp-g3 .revamp-group {
    gap: var(--space-chip);
}
/* The group's own `gap` already separates the card, the door and the CTA;
   this margin was a second helping of the same space (2026-09-01: the
   group gap went up to --space-chip in the same round, so the doubling
   became visible as well as wasteful). Zero here, one gap does the job. */
#art-g2 .revamp-more,
#shp-g2 .revamp-more,
#art-g3 .revamp-more,
#shp-g3 .revamp-more {
    margin: 0;
}
#art-g2.revamp-group:not(.collapsed) > .revamp-group-header,
#shp-g2.revamp-group:not(.collapsed) > .revamp-group-header,
#art-g3.revamp-group:not(.collapsed) > .revamp-group-header,
#shp-g3.revamp-group:not(.collapsed) > .revamp-group-header {
    padding: 0.1rem var(--space-hug);
}
/* The mode breadcrumb ("Start ✓ · Your shape") is chrome, not an option:
   0.65rem of padding around a 21px line made it the tallest non-control
   row in the whole column, and it sits directly under the panel's own top
   inset. Trimmed to 0.45rem in the 2026-09-01 bigger-panel round — the
   ~4px goes straight into the shape grid below it. Placed after
   .revamp-group-header (same specificity) so source order decides. */
.revamp-mode-header {
    padding-top: var(--space-field);
    padding-bottom: var(--space-field);
}
/* Collapsed rail rows give their slack to the open chapter — the roomier
   palette block is funded here, not by cramping live controls. */
.revamp-group.collapsed > .revamp-group-header {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}
.revamp-tree {
    gap: var(--space-field);
}
/* The full 22-shape grid pays its share on the shape tree's card. */
#shp-shape-host .shape-chip {
    min-height: 28px;
}
#shp-shape-host .shape-grid {
    gap: 0.12rem;
}
#shp-shape-host #shapeGroup {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

/* ---- UI sweep, 2026-10-10 (tests/ui-sweep-gate.mjs) ------------------------
   New rules only, appended so nothing above changes meaning; each is carried
   into tests/fixtures/css-pixel/style.css.frozen as a deliberate addition.

   The Fine-tuning "Print my clicker" in the shape and Model Cut trees meets the
   44 px bar its Flat twin (#end-print-btn above) already met: it was 31 px at
   1440 because only #end-print-btn had a min-height. */
#shp-end-print-btn,
#mc-end-print-btn {
    min-height: 44px;
}
@media (min-width: 769px) {
    /* The status pill said "Import a 3D model t…" at 1440: one line capped at
       180 px. The cap stays (it is what keeps the pill clear of a viewer-centred
       top dock at 1280); a longer status wraps inside it instead of being cut. */
    #revamp-beacon {
        white-space: normal;
        text-overflow: clip;
        line-height: var(--lh-tight);
        text-align: center;
    }
    /* The coach centred on the WINDOW, so at 1440 its left end (570 px) sat on
       the brand row's Sign in chip (ends 583 px). It centres on the viewer, as
       both docks already do (the rule after "Docks centre on the VIEWER"). */
    body > .coach-bubble {
        left: calc(var(--sidebar-width) + (100% - var(--sidebar-width)) / 2);
    }
}
@media (max-width: 360px) {
    /* Six shape chips a row were 38 px wide at 320; four a row are 44+. */
    #shp-shape-host #shapeGrid,
    .revamp-more-host #shapeGrid {
        grid-template-columns: repeat(4, 1fr);
    }
    /* "Add your own font" was cut to "Add your own f…" at 320: it may wrap. */
    .font-upload-btn #customFontBtnTitle {
        white-space: normal;
    }
}

/* Raise height on the picture style card (ALI-57): Min / Medium / Max under
   Sticks up, Dome, Slant edge and Soft edge, hidden for Flat. Text-only
   chips at a 44 px touch target (the shared art-g1 chip is 40 px). (Also
   carried into the css-pixel frozen baseline as a deliberate addition.) */
#art-g1 #proxy-raise-height-field .revamp-pick {
    min-height: 44px;
    justify-content: center;
}

/* Loop point-placement toggles (ALI-62a): Snap to edges / Keep level / Keep
   upright. `.sketch-btn.active` (0,2,0) loses to the card's own
   `.revamp-card button:not(.primary-btn):not(.preset-btn)` (0,3,1), so a
   pressed toggle looked exactly like a released one. Keyed on aria-pressed,
   which the toggle always sets. White on --accent-text: 6.5:1 in Model Cut
   (#1c6b4a), 6.2:1 in the other theme (#b3275d). */
#mc-loop-pick-tools .sketch-btn[aria-pressed="true"] {
    background: var(--accent-text);
    border-color: var(--accent-text);
    color: var(--c-white);
    box-shadow: 0 3px 10px var(--icon-shadow);
}

/* ---- ALI-66 D10 ------------------------------------------------------------
   New rules only; carried into tests/fixtures/css-pixel/style.css.frozen as a
   deliberate addition. "How big?" in Model Cut gets its own visible note, and
   once a model is in (src/ui.js refreshOrganicImportUI sets data-model-in) the
   file card folds to one line, "✓ name · tap to choose another", so "How big?"
   stays above the bottom bar on a phone. The label is still the file picker. */
.mc-size-help {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}
.mc-upload-done,
.flat-upload-done {
    display: none;
}
/* Flat's picture drop zone folds the same way once a file is in (Lane Q3 #7). */
.revamp-dropzone[data-picture-in="true"] {
    min-height: 0;
    padding: 0.55rem 0.9rem;
}
.revamp-dropzone[data-picture-in="true"] > :not(.flat-upload-done) {
    display: none;
}
.revamp-dropzone[data-picture-in="true"] .flat-upload-done {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    overflow-wrap: anywhere;
}
#mc-model-card[data-model-in="true"] .revamp-upload-btn {
    min-height: 0;
    padding: 0.55rem 0.9rem;
}
#mc-model-card[data-model-in="true"] .revamp-upload-btn > :not(.mc-upload-done),
#mc-model-card[data-model-in="true"] .mc-upload-formats,
#mc-model-card[data-model-in="true"] #mc-proxy-import-info {
    display: none;
}
#mc-model-card[data-model-in="true"] .mc-upload-done {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    overflow-wrap: anywhere;
}
/* ALI-66 Q3-6 (finding 1): until a model is in, "Your model" is the file picker
   alone. How big?, Foot trim, the three turns and Next acted on the Flat demo
   still in the scene, or on nothing, and let a first visit walk on to step 2
   with no model. The same data-model-in flips them back the moment an import
   lands (or a reload restores one). */
#mc-model-card:not([data-model-in="true"]) > :not(.revamp-upload-btn):not(.mc-upload-formats),
#mc-model-card:not([data-model-in="true"]) ~ .revamp-more,
#mc-model-card:not([data-model-in="true"]) ~ .revamp-confirm-btn {
    display: none;
}
/* ALI-66 Q3-6, option B (owner, 2026-10-22): the empty Model Cut view is a drop
   card, centred in the 3D view on desktop and in the band above the phone's
   sheet. Same dashed accent look as the "Your model" card (the shared rule
   above); centred with auto margins so its hover pop needs no translate. While
   it shows, the coach's "Drop a 3D model to start" says nothing it does not
   (src/revamp.js marks that tip); any other note the coach carries still shows. */
.mc-empty-drop {
    position: absolute;
    inset: 0;
    z-index: 5;
    width: min(340px, calc(100% - 48px));
    height: fit-content;
    margin: auto;
    padding: 1.5rem 1.25rem;
}
body[data-mc-empty='true'] > .coach-bubble[data-drop-tip] {
    display: none;
}
/* The middle dot has no advance width in Overpass, so it drew over the space
   after it ("stl ·tap"). The display stack's dot has its own width (its
   Inter has no @font-face here, so it is the system font). */
.mc-upload-sep,
.flat-upload-sep,
.summary-sep {
    font-family: var(--font-display);
}

/* Loop drawing (ALI-72 D2/D7): "Drawing help" opens a panel under the
   Snap row that spans it; "Cut here" fills its line; the confirm and
   "Change the line" buttons stack and are 44 px targets like the toggles. (Also
   carried into the css-pixel frozen baseline as a deliberate addition.) */
#mc-loop-help {
    grid-column: 1 / -1;
}
#mc-loop-confirm,
#mc-loop-done {
    display: grid;
    gap: 0.35rem;
}
#mc-loop-cut {
    width: 100%;
}
#mc-loop-confirm .sketch-btn,
#mc-loop-done .sketch-btn {
    min-height: 44px;
}

/* ---- ALI-66 D9 --------------------------------------------------------------
   New rules only; carried into tests/fixtures/css-pixel/style.css.frozen as a
   deliberate addition. "Where does the switch go?" on the switch step's card:
   its question over Automatic and Tap to place, side by side, 44 px. */
.mc-switch-where {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
.mc-switch-where-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-strong);
    color: var(--text-primary);
}
#mc-switch-where .mini-action {
    flex: 1 1 0;
    min-height: 44px;
    margin: 0;
}

/* ---- ALI-66 D8 --------------------------------------------------------------
   New rules only; carried into tests/fixtures/css-pixel/style.css.frozen as a
   deliberate addition. Fit on the switch step's card: Snug / Standard / Loose,
   44 px, and the Custom line when the gaps match no choice. */
.mc-fit {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}
#mc-fit .mini-action {
    flex: 1 1 0;
    min-height: 44px;
    margin: 0;
}
.mc-fit-custom {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

/* ---- ALI-66 pressed choices ---------------------------------------------------
   New rule only; carried into tests/fixtures/css-pixel/style.css.frozen as a
   deliberate addition. The switch step's choices (Automatic / Tap to place, Fit)
   said which one was on only in aria-pressed: the card's
   own button rule outranks .active, the ALI-62a lesson. Filled when pressed,
   the same look as the Loop toggles: white on --accent-text (6.5:1 in Model Cut). */
#mc-switch-where .mini-action[aria-pressed="true"],
#mc-fit .mini-action[aria-pressed="true"] {
    background: var(--accent-text);
    border-color: var(--accent-text);
    color: #ffffff;
    box-shadow: 0 3px 10px var(--icon-shadow);
}
