/* How it works — Loom screenplay → Loom storyboard → Canvas → Data Hub mocks.
   Icons are the app's own Phosphor / Lucide SVGs (js/app-icons.js). */

.sm-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    line-height: 0;
    vertical-align: -0.125em;
}

.sm-ico svg {
    display: block;
    width: 100%;
    height: 100%;
}

.sm-ico--spin svg {
    animation: sm-ico-spin 0.9s linear infinite;
}

@keyframes sm-ico-spin {
    to { transform: rotate(360deg); }
}

@keyframes sm-caret {
    50% { opacity: 0; }
}

@keyframes sm-cta-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 192, 180, 0.45); }
    50% { box-shadow: 0 0 0 4px rgba(0, 192, 180, 0); }
}

@keyframes sm-shimmer {
    from { background-position: -120% 0; }
    to { background-position: 220% 0; }
}

/* Storyboard "Tonal" render style */
.sm-img-tonal {
    filter: grayscale(1) contrast(1.12) brightness(1.08);
}

/* ---------- Shared chrome: top bar + rail ---------- */
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-search .sm-ico {
    width: 8px;
    height: 8px;
    opacity: 0.75;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-search kbd {
    margin-left: auto;
    font: 500 6.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid var(--sm-border);
    color: var(--sm-muted);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-topbar-icon {
    width: 10px;
    height: 10px;
    color: var(--sm-muted);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-sidebar--product .sm-nav-item {
    color: var(--sm-muted);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-sidebar--product .sm-nav-item .sm-ico {
    width: 11px;
    height: 11px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--product .sm-nav-item.active {
    color: var(--sm-teal);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-nav-spacer {
    flex: 1;
}

/* ---------- Loom: shell ---------- */
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-loom .sm-main--loom {
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: calc(100% - 28px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 8px 8px 0;
    overflow: hidden;
    box-sizing: border-box;
}

.sm-loom-head {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    flex-shrink: 0;
    padding: 0 6px 0 8px;
    border: 1px solid var(--sm-border);
    border-radius: 8px;
    background: var(--sm-glass);
    font-size: 8px;
    color: var(--sm-muted);
    white-space: nowrap;
    overflow: hidden;
}

.sm-loom-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--sm-text);
    font-weight: 500;
}

.sm-loom-back .sm-ico {
    width: 9px;
    height: 9px;
}

.sm-loom-sep {
    width: 1px;
    height: 11px;
    background: rgba(255, 255, 255, 0.1);
}

.sm-loom-doc {
    color: var(--sm-text);
    font-weight: 600;
    font-size: 8.5px;
}

.sm-loom-badge {
    font-size: 6.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid rgba(0, 192, 180, 0.3);
    background: rgba(0, 192, 180, 0.08);
    color: var(--sm-teal);
}

.sm-loom-chip {
    font-size: 7px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

.sm-loom-spacer {
    flex: 1;
    min-width: 4px;
}

.sm-loom-btn,
.sm-loom-select {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 16px;
    padding: 0 6px;
    border-radius: 5px;
    border: 1px solid var(--sm-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--sm-text);
    font-size: 7.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.sm-loom-btn--icon {
    width: 16px;
    padding: 0;
    justify-content: center;
}

.sm-loom-btn .sm-ico,
.sm-loom-select .sm-ico {
    width: 8px;
    height: 8px;
}

.sm-loom-select .sm-ico {
    opacity: 0.6;
}

.sm-loom-save {
    font-size: 7px;
    color: var(--sm-muted);
    padding-left: 2px;
}

.sm-loom-workspace {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 150px;
    gap: 6px;
}

.sm-loom-workspace--board {
    grid-template-columns: 112px minmax(0, 1fr);
}

.sm-loom-binder,
.sm-loom-center,
.sm-loom-aside {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--sm-border);
    border-radius: 8px;
    background: var(--sm-glass);
}

/* ---------- Loom: binder ---------- */
.sm-loom-binder {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 5px;
}

.sm-loom-binder-head {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    margin-bottom: 4px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.22);
}

.sm-loom-binder-tab {
    flex: 1;
    text-align: center;
    font-size: 7px;
    padding: 2px 0;
    border-radius: 4px;
    color: var(--sm-muted);
}

.sm-loom-binder-tab.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--sm-text);
}

.sm-loom-binder-add {
    display: inline-flex;
    justify-content: center;
    width: 14px;
    color: var(--sm-muted);
}

.sm-loom-binder-add .sm-ico {
    width: 8px;
    height: 8px;
}

.sm-loom-node {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 4px 3px 10px;
    border-radius: 4px;
    font-size: 7px;
    color: var(--sm-muted);
    white-space: nowrap;
    overflow: hidden;
}

.sm-loom-node > span:not(.sm-ico) {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-loom-node .sm-ico {
    width: 8px;
    height: 8px;
    opacity: 0.8;
}

.sm-loom-node--act {
    padding-left: 4px;
    margin-top: 2px;
    color: var(--sm-text);
    font-weight: 600;
}

.sm-loom-node.is-active {
    background: rgba(0, 192, 180, 0.12);
    color: var(--sm-teal);
}

/* ---------- Loom: centre (views + editor) ---------- */
.sm-loom-center {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.18);
}

.sm-loom-views {
    display: flex;
    gap: 2px;
    padding: 4px 6px;
    border-bottom: 1px solid var(--sm-border);
    flex-shrink: 0;
}

.sm-loom-view {
    font-size: 7.5px;
    padding: 2px 7px;
    border-radius: 999px;
    color: var(--sm-muted);
    white-space: nowrap;
    border: 1px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.sm-loom-view.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--sm-text);
}

.sm-app-shell--ide-loom.is-suggesting .sm-loom-view--next {
    color: var(--sm-teal);
    border-color: rgba(0, 192, 180, 0.4);
    background: rgba(0, 192, 180, 0.08);
    animation: sm-cta-pulse 1.8s ease-in-out infinite;
}

.sm-loom-edbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-bottom: 1px solid var(--sm-border);
    color: var(--sm-muted);
    flex-shrink: 0;
}

.sm-loom-edbar > .sm-ico {
    width: 9px;
    height: 9px;
}

.sm-loom-edbar-sep {
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.sm-loom-ai {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 7.5px;
    color: var(--sm-teal);
}

.sm-loom-ai .sm-ico {
    width: 8px;
    height: 8px;
}

.sm-loom-page {
    flex: 1;
    min-height: 0;
    width: min(100% - 24px, 340px);
    margin: 10px auto 0;
    padding: 16px 24px;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    background: rgba(255, 255, 255, 0.025);
    font-family: 'Courier Prime', 'Courier New', Courier, monospace;
    font-size: 8.5px;
    line-height: 1.5;
    color: #dfe7ec;
}

.sm-loom-page p {
    margin: 0 0 9px;
    min-height: 1.5em;
}

.sm-loom-page [data-el="scene"] {
    font-weight: 700;
    text-transform: uppercase;
}

.sm-loom-page [data-el="character"] {
    margin: 0 0 0 38%;
    text-transform: uppercase;
}

.sm-loom-page [data-el="parenthetical"] {
    margin: 0 0 0 30%;
    color: #a9bac4;
}

.sm-loom-page [data-el="character"]:has(+ [data-el="dialogue"], + [data-el="parenthetical"]),
.sm-loom-page [data-el="parenthetical"]:has(+ [data-el="dialogue"]) {
    margin-bottom: 0;
}

.sm-loom-page [data-el="dialogue"] {
    margin-left: 20%;
    margin-right: 16%;
}

.sm-loom-page [data-el="transition"] {
    text-align: right;
    text-transform: uppercase;
}

.sm-loom-page .is-typing::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 1.1em;
    margin-left: 1px;
    vertical-align: -2px;
    background: var(--sm-teal);
    animation: sm-caret 0.8s steps(1) infinite;
}

/* ---------- Loom: coauthor aside ---------- */
.sm-loom-aside {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
}

.sm-loom-aside-tabs {
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.22);
}

.sm-loom-aside-tabs > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 7px;
    color: var(--sm-muted);
}

.sm-loom-aside-tabs > span.is-active {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    color: var(--sm-text);
}

.sm-loom-aside-tabs .sm-ico {
    width: 8px;
    height: 8px;
}

.sm-loom-msg {
    padding: 6px;
    border-radius: 7px;
    border: 1px solid var(--sm-border);
    background: rgba(0, 0, 0, 0.2);
    font-size: 7.5px;
    line-height: 1.45;
}

.sm-loom-msg strong {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 2px;
    font-size: 7px;
    color: var(--sm-text);
}

.sm-loom-msg strong .sm-ico {
    width: 8px;
    height: 8px;
}

.sm-loom-msg p {
    margin: 0;
    color: #a9bac4;
}

.sm-loom-msg--ai {
    border-color: rgba(0, 192, 180, 0.25);
    background: rgba(0, 192, 180, 0.05);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-loom-msg--ai strong {
    color: var(--sm-teal);
}

.sm-app-shell--ide-loom.is-suggesting .sm-loom-msg--ai {
    opacity: 1;
    transform: none;
}

.sm-loom-plan,
.sm-sb-handoff-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 20px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: var(--sm-teal);
    color: #04201d;
    font: 600 7.5px/1 Inter, system-ui, sans-serif;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.16s ease;
}

.sm-loom-plan:hover,
.sm-sb-handoff-btn:hover {
    filter: brightness(1.1);
}

.sm-loom-plan .sm-ico,
.sm-sb-handoff-btn .sm-ico {
    width: 9px;
    height: 9px;
}

.sm-loom-plan {
    width: 100%;
    margin-top: 6px;
}

.sm-app-shell--ide-loom.is-suggesting .sm-loom-plan {
    animation: sm-cta-pulse 1.8s ease-in-out 0.4s infinite;
}

.sm-agent-shots {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.sm-agent-shots li {
    font-size: 7px;
    line-height: 1.35;
    color: #d5e4ea;
}

.sm-app-shell--ide-storyboard .sm-agent-card,
.sm-app-shell--ide-film.is-cut .sm-agent-card {
    opacity: 1;
    transform: none;
}

.sm-agent-note {
    padding: 6px 8px 7px;
    border-bottom: 1px solid var(--sm-divider);
}

.sm-agent-note strong {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 8px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--sm-teal, #05c7bb);
}

.sm-agent-note strong .sm-ico {
    flex: none;
    width: 10px;
    height: 10px;
    margin-top: 1px;
}

.sm-agent-note span {
    display: block;
    margin-top: 2px;
    padding-left: 14px;
    font-size: 7.5px;
    line-height: 1.35;
    color: #a9bac4;
}

.sm-sb-cast {
    margin: 0;
    padding: 3px 8px;
    border-bottom: 1px solid var(--sm-divider, rgba(255, 255, 255, 0.08));
    font-size: 7.5px;
    letter-spacing: 0.02em;
    color: #7eefe6;
}

.sm-canvas-hero-preview {
    position: relative;
}

.sm-keep-card {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    display: flex;
    gap: 4px;
    z-index: 3;
}

.sm-keep-card span {
    flex: 1;
    padding: 3px 0;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 14, 18, 0.82);
    font-size: 7px;
    font-weight: 600;
    text-align: center;
    color: #e5e7eb;
}

.sm-keep-card .is-keep {
    border-color: rgba(5, 199, 187, 0.7);
    color: #04201d;
    background: #05c7bb;
}

/* The playhead the Studio timeline moves (features.js setFilmShot) */
.sm-film-playhead {
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: 4%;
    width: 2px;
    border-radius: 1px;
    background: #05c7bb;
    box-shadow: 0 0 8px rgba(5, 199, 187, 0.8);
    transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

/* ---------- Studio (IDE tab 05): Library · Viewer · Edit | AI inspector · timeline ---------- */
/* Mirrors features/video-edit. The four shots land one by one (data-film-phase 0–3),
   the dialogue lane locks at 5 and the Fix clip shows once the cut is done (.is-cut). */
.sm-studio {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 138px;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
}

.sm-studio-lib,
.sm-studio-insp,
.sm-studio-tl {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
}

.sm-studio-lib {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
}

.sm-studio-panel-h {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 7.5px;
    font-weight: 600;
    color: #e5e7eb;
}

.sm-studio-lib-sec {
    margin-top: 3px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 6px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.sm-studio-lib-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
}

.sm-studio-lib-item {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 2px;
    background: #070d12;
}

.sm-studio-lib-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sm-studio-lib-item em {
    position: absolute;
    left: 2px;
    bottom: 1px;
    font-style: normal;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 5.5px;
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
}

.sm-studio-lib-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 6.5px;
    color: #c8d3da;
    white-space: nowrap;
    overflow: hidden;
}

.sm-studio-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 6px 6px 3px;
    border-radius: 4px;
    background: #05080a;
}

.sm-studio-screen {
    position: relative;
    width: 86%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 3px;
    background: #000;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sm-studio-screen img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.sm-studio-screen img.is-on {
    opacity: 1;
}

.sm-studio-caption {
    position: absolute;
    left: 50%;
    bottom: 7%;
    z-index: 2;
    max-width: 80%;
    padding: 2px 7px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.72);
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    white-space: nowrap;
}

.sm-studio-caption:empty {
    display: none;
}

.sm-studio-transport {
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px;
    font-size: 8px;
    color: #c8d3da;
}

.sm-studio-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sm-studio-tc {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 8px;
    color: #7eefe6;
}

.sm-studio-fit {
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 6.5px;
}

.sm-studio-export {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 3px;
    background: #05c7bb;
    font-size: 7px;
    font-weight: 700;
    color: #04201d;
}

/* Inspector: Edit | AI, the agent's note, then the AI tools as in AiPanel */
.sm-studio-insp {
    grid-row: 1 / 3;
    grid-column: 3;
    display: flex;
    flex-direction: column;
}

.sm-studio-tabs {
    display: flex;
    gap: 10px;
    padding: 6px 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sm-studio-tabs span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding-bottom: 4px;
    font-size: 7.5px;
    font-weight: 600;
    color: #8b98a1;
}

.sm-studio-tabs span.is-on {
    color: #fff;
    box-shadow: inset 0 -1.5px 0 #05c7bb;
}

.sm-studio-sel {
    padding: 5px 8px 3px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 6.5px;
    color: #8b98a1;
}

.sm-studio-tools {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 5px 6px;
    overflow: hidden;
}

.sm-studio-tool {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 4px;
    border: 1px solid transparent;
    border-radius: 3px;
}

.sm-studio-tool.is-on {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.sm-studio-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 8px;
    color: #d5e4ea;
}

.sm-studio-tool-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sm-studio-tool-copy b {
    font-size: 7px;
    font-weight: 600;
    color: #e5e7eb;
    white-space: nowrap;
}

.sm-studio-tool-copy small {
    overflow: hidden;
    font-size: 6px;
    color: #8b98a1;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sm-studio-voices {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 1px 0 3px 19px;
}

.sm-studio-voices-h {
    font-size: 6px;
    color: #8b98a1;
}

.sm-studio-voice {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 6.5px;
    color: #c8d3da;
}

.sm-studio-voice b {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 6px;
    color: #fff;
}

.sm-studio-voice em {
    flex: 1;
    font-style: normal;
}

/* Timeline */
.sm-studio-tl {
    grid-column: 1 / 3;
    display: flex;
    flex-direction: column;
}

.sm-studio-tl-bar {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.sm-studio-tl-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 13px;
    border-radius: 3px;
    font-size: 8px;
    color: #8b98a1;
}

.sm-studio-tl-tool.is-on {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sm-studio-tl-add {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
    font-size: 6.5px;
    color: #c8d3da;
}

.sm-studio-zoom {
    position: relative;
    width: 40px;
    height: 2px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.14);
}

.sm-studio-zoom i {
    position: absolute;
    top: -2px;
    left: 55%;
    width: 4px;
    height: 6px;
    border-radius: 1px;
    background: #c8d3da;
}

.sm-studio-tracks {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 3px 6px 6px;
    --sm-studio-head: 62px;
}

.sm-studio-ruler {
    position: relative;
    display: grid;
    grid-template-columns: var(--sm-studio-head) repeat(4, minmax(0, 1fr));
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 6px;
    color: #6b7280;
}

/* The end mark sits on the lane's right edge */
.sm-studio-ruler span:last-child {
    position: absolute;
    right: 0;
}

.sm-studio-track {
    display: grid;
    grid-template-columns: var(--sm-studio-head) minmax(0, 1fr);
    align-items: stretch;
    min-height: 16px;
}

.sm-studio-track-h {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 6.5px;
    color: #9ca3af;
    white-space: nowrap;
}

.sm-studio-lane {
    position: relative;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.025);
}

.sm-studio-track:nth-child(2) {
    min-height: 30px;
}

.sm-studio-clip {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 2px 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    background: #10232a;
    font-size: 6.5px;
    color: #e5e7eb;
    opacity: 0.3;
    transform: translateY(3px);
    transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

.sm-studio-clip-strip {
    position: absolute;
    inset: 0;
    background-size: auto 100%;
    background-repeat: repeat-x;
    opacity: 0.55;
}

.sm-studio-clip-name,
.sm-studio-clip small {
    position: relative;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
}

.sm-studio-clip em {
    font-style: normal;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    color: #7eefe6;
}

.sm-studio-clip small {
    font-size: 5.5px;
    color: #c8d3da;
}

.sm-studio-clip.is-on {
    opacity: 1;
    transform: none;
}

.sm-studio-clip.is-play {
    border-color: #05c7bb;
}

.sm-studio-audio {
    position: absolute;
    top: 1px;
    bottom: 1px;
    display: flex;
    align-items: center;
    gap: 3px;
    overflow: hidden;
    padding: 0 3px;
    border-radius: 3px;
    font-size: 5.5px;
    white-space: nowrap;
}

.sm-studio-audio b {
    position: relative;
    z-index: 1;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 600;
    color: #fff;
}

.sm-studio-wave {
    position: absolute;
    inset: 2px 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    fill: currentColor;
    opacity: 0.45;
}

.sm-studio-audio--voice {
    border: 1px solid rgba(214, 81, 255, 0.35);
    background: rgba(214, 81, 255, 0.16);
    color: #e7b6ff;
}

.sm-studio-audio--music {
    border: 1px solid rgba(80, 140, 255, 0.3);
    background: rgba(80, 140, 255, 0.12);
    color: #9cc0ff;
}

.sm-studio-fixclip {
    position: absolute;
    top: 1px;
    bottom: 1px;
    display: flex;
    align-items: center;
    padding: 0 3px;
    border: 1px solid rgba(245, 180, 80, 0.55);
    border-radius: 3px;
    background: rgba(245, 180, 80, 0.18);
    font-size: 5.5px;
    font-weight: 600;
    color: #f5c77a;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sm-app-shell--ide-film.is-cut .sm-studio-fixclip {
    opacity: 1;
}

/* The dialogue lane fills in once the shots are in, then locks */
.sm-studio-track--voice .sm-studio-lane {
    opacity: 0.25;
    transition: opacity 0.4s ease, box-shadow 0.4s ease;
}

.sm-app-shell--ide-film[data-film-phase="5"] .sm-studio-track--voice .sm-studio-lane,
.sm-app-shell--ide-film[data-film-phase="6"] .sm-studio-track--voice .sm-studio-lane {
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(5, 199, 187, 0.4);
}

/* Playhead over the lanes: the start of the shot that is playing */
.sm-studio-tracks .sm-film-playhead {
    top: 14px;
    bottom: 4px;
    left: calc(6px + var(--sm-studio-head) + (100% - 12px - var(--sm-studio-head)) * var(--sm-studio-at, 0.01));
    transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-app-shell--ide-film[data-film-phase="0"] .sm-studio-tracks { --sm-studio-at: 0.01; }
.sm-app-shell--ide-film[data-film-phase="1"] .sm-studio-tracks { --sm-studio-at: 0.26; }
.sm-app-shell--ide-film[data-film-phase="2"] .sm-studio-tracks { --sm-studio-at: 0.51; }
.sm-app-shell--ide-film[data-film-phase="3"] .sm-studio-tracks,
.sm-app-shell--ide-film[data-film-phase="5"] .sm-studio-tracks,
.sm-app-shell--ide-film[data-film-phase="6"] .sm-studio-tracks { --sm-studio-at: 0.68; }

/* ---------- Loom: storyboard view ---------- */
.sm-sb-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-bottom: 1px solid var(--sm-border);
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
}

.sm-sb-anchor-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 16px;
    padding: 0 6px 0 2px;
    border-radius: 5px;
    border: 1px solid rgba(0, 192, 180, 0.3);
    color: var(--sm-teal);
    font-size: 7.5px;
    flex-shrink: 0;
}

.sm-sb-anchor-pill img {
    width: 20px;
    height: 11px;
    object-fit: cover;
    border-radius: 2px;
}

.sm-sb-bar-meta {
    font-size: 7px;
    color: var(--sm-muted);
}

.sm-sb-scene {
    margin: 6px 6px 0;
    padding: 5px 6px 6px;
    border: 1px solid var(--sm-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.sm-sb-scene-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    white-space: nowrap;
}

.sm-sb-scene-title {
    font-family: 'Courier Prime', 'Courier New', Courier, monospace;
    font-size: 8px;
    font-weight: 700;
    color: var(--sm-text);
}

.sm-sb-scene-meta {
    font-size: 7px;
    color: var(--sm-muted);
}

.sm-sb-act {
    display: none;
    align-items: center;
    gap: 4px;
    height: 16px;
    padding: 0 7px;
    border-radius: 5px;
    border: 1px solid var(--sm-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--sm-text);
    font-size: 7.5px;
    transition: transform 0.12s ease, filter 0.12s ease;
}

.sm-sb-act .sm-ico {
    width: 8px;
    height: 8px;
}

.sm-sb-act--plan,
.sm-sb-act--draw {
    border-color: transparent;
    background: var(--sm-teal);
    color: #04201d;
    font-weight: 600;
}

.sm-sb-act--busy {
    color: var(--sm-teal);
    border-color: rgba(0, 192, 180, 0.3);
}

.sm-sb-act--ghost {
    display: inline-flex;
    color: var(--sm-muted);
}

.sb-phase-0 .sm-sb-scene--active .sm-sb-act--plan,
.sb-phase-1 .sm-sb-scene--active .sm-sb-act--draw,
.sb-phase-2 .sm-sb-scene--active .sm-sb-act--busy,
.sb-phase-3 .sm-sb-scene--active .sm-sb-act--redraw {
    display: inline-flex;
}

.sb-phase-0 .sm-sb-act--plan,
.sb-phase-1 .sm-sb-act--draw {
    animation: sm-cta-pulse 1.6s ease-in-out infinite;
}

.is-plan-pressed .sm-sb-act--plan,
.is-draw-pressed .sm-sb-act--draw {
    transform: scale(0.92);
    filter: brightness(1.15);
}

.sm-sb-lane {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.sm-sb-frame {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sb-phase-0 .sm-sb-scene--active .sm-sb-frame {
    opacity: 0;
    transform: translateY(6px);
}

.sb-phase-1 .sm-sb-scene--active .sm-sb-frame:nth-child(2) { transition-delay: 0.12s; }
.sb-phase-1 .sm-sb-scene--active .sm-sb-frame:nth-child(3) { transition-delay: 0.24s; }
.sb-phase-1 .sm-sb-scene--active .sm-sb-frame:nth-child(4) { transition-delay: 0.36s; }

.sm-sb-frame-image {
    position: relative;
    aspect-ratio: 2.39 / 1;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f1417;
    transition: border-color 0.3s ease;
}

.sm-sb-frame-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.45s ease;
}

.sm-sb-frame-ph {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--sm-muted);
}

.sm-sb-frame-ph .sm-ico {
    width: 13px;
    height: 13px;
}

.sm-sb-frame[data-status="planned"] img,
.sm-sb-frame[data-status="rendering"] img {
    opacity: 0;
}

.sm-sb-frame[data-status="planned"] .sm-sb-frame-ph--planned,
.sm-sb-frame[data-status="rendering"] .sm-sb-frame-ph--rendering {
    display: flex;
}

.sm-sb-frame[data-status="planned"] .sm-sb-frame-image {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.14);
}

.sm-sb-frame[data-status="rendering"] .sm-sb-frame-image {
    border-color: rgba(0, 192, 180, 0.5);
    background: linear-gradient(100deg, #0f1417 30%, rgba(0, 192, 180, 0.12) 50%, #0f1417 70%) no-repeat;
    background-size: 60% 100%;
    animation: sm-shimmer 1.1s linear infinite;
}

.sm-sb-frame[data-status="rendering"] .sm-sb-frame-ph {
    color: var(--sm-teal);
}

.sm-sb-badge,
.sm-sb-anchor {
    position: absolute;
    top: 3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.62);
    font-size: 6px;
    line-height: 1.3;
}

.sm-sb-badge {
    left: 3px;
    color: var(--sm-muted);
}

.sm-sb-frame[data-status="rendering"] .sm-sb-badge {
    color: var(--sm-teal);
}

.sm-sb-frame[data-status="rendered"] .sm-sb-badge {
    color: #7ee2a0;
}

.sm-sb-anchor {
    right: 3px;
    color: var(--sm-teal);
}

.sm-sb-anchor .sm-ico {
    width: 7px;
    height: 7px;
}

.sm-sb-frame-label {
    font-size: 7.5px;
    font-weight: 600;
    color: var(--sm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-sb-frame-action {
    font-size: 7px;
    line-height: 1.35;
    color: #9fb1bb;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sm-sb-frame-foot {
    font: 6.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--sm-muted);
}

.sm-sb-handoff {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: auto 6px 6px;
    padding: 5px 5px 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 192, 180, 0.25);
    background: rgba(0, 192, 180, 0.06);
    font-size: 7.5px;
    color: var(--sm-muted);
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-sb-handoff strong {
    color: var(--sm-text);
}

.sm-sb-handoff-btn {
    margin-left: auto;
}

.sb-phase-3 .sm-sb-handoff {
    opacity: 1;
    transform: none;
}

.sb-phase-3 .sm-sb-handoff-btn {
    animation: sm-cta-pulse 1.8s ease-in-out 0.4s infinite;
}

/* ---------- Canvas additions ---------- */
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-board-back {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-board-back .sm-ico,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-board-tool .sm-ico,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-soma-pill .sm-ico,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-board-section .sm-ico,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-desc-enhance .sm-ico {
    width: 8px;
    height: 8px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-board-tool {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--sm-muted);
    white-space: nowrap;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-soma-pill,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-board-section,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-desc-enhance {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-node-badge-icon .sm-ico {
    width: 8px;
    height: 8px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-seg {
    font-size: 6.5px;
    padding: 1px 4px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-input-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-input-pair .sm-image-slot {
    min-width: 0;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-image-slot-status {
    font-size: 6px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-image-slot-name {
    font-size: 6.5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-canvas-hero-input .sm-hero-input-frame {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #11171b;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-canvas-hero-input .sm-hero-input-frame img {
    flex-shrink: 0;
    width: 42%;
    height: auto;
    aspect-ratio: 2.39 / 1;
    object-fit: cover;
    border-radius: 2px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-canvas-hero-input .sm-hero-input-frame > span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    font-size: 6.5px;
    color: var(--sm-muted);
    white-space: nowrap;
    overflow: hidden;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-canvas-hero-input .sm-hero-input-frame .sm-ico {
    width: 7px;
    height: 7px;
    color: var(--sm-teal);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-canvas-dock {
    position: absolute;
    left: 50%;
    bottom: 8px;
    z-index: 6;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--sm-border);
    background: rgba(20, 26, 30, 0.92);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-canvas-dock-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 5px;
    color: var(--sm-muted);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-canvas-dock-tool.is-active {
    background: rgba(0, 192, 180, 0.15);
    color: var(--sm-teal);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-canvas-dock .sm-ico {
    width: 9px;
    height: 9px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-canvas-dock-sep {
    width: 1px;
    height: 11px;
    margin: 0 2px;
    background: rgba(255, 255, 255, 0.1);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-canvas-dock-add {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 17px;
    padding: 0 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--sm-text);
    font-size: 7.5px;
    white-space: nowrap;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-canvas-toast,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-dh-toast {
    position: absolute;
    left: 50%;
    z-index: 7;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(80, 173, 87, 0.4);
    background: rgba(16, 24, 20, 0.94);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    color: var(--sm-text);
    font-size: 7.5px;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 6px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-canvas-toast .sm-ico,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-dh-toast .sm-ico {
    width: 9px;
    height: 9px;
    color: #50ad57;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-canvas-toast {
    bottom: 34px;
}

#ide-showcase.ide-flow-complete .ide-showcase-mock .sm-canvas-toast {
    opacity: 1;
    transform: translate(-50%, 0);
    transition-delay: 0.35s;
}

/* ---------- Data Hub additions ---------- */
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-tab .sm-ico,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-search-field .sm-ico,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-detail-tab .sm-ico {
    width: 9px;
    height: 9px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-search-field {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-fav .sm-ico {
    width: 11px;
    height: 11px;
    color: var(--sm-muted);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-filter-chip {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid rgba(0, 192, 180, 0.3);
    background: rgba(0, 192, 180, 0.08);
    color: var(--sm-teal);
    font-style: normal;
    font-size: 7px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file-thumb {
    position: relative;
    max-width: none;
    height: auto;
    aspect-ratio: 4 / 3;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-check {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.45);
    color: transparent;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-check .sm-ico {
    width: 7px;
    height: 7px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub.is-selecting .sm-dh-check,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file:hover .sm-dh-check {
    opacity: 1;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file.is-checked .sm-dh-check {
    border-color: var(--sm-teal);
    background: var(--sm-teal);
    color: #04201d;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file.is-checked .sm-dh-file-thumb {
    border-color: rgba(0, 192, 180, 0.7);
    box-shadow: 0 0 0 1px rgba(0, 192, 180, 0.35);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-video-badge,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-new-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    border-radius: 3px;
    font-size: 6px;
    line-height: 1.2;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-video-badge {
    right: 3px;
    bottom: 3px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-video-badge .sm-ico {
    width: 7px;
    height: 7px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-new-badge {
    top: 3px;
    right: 3px;
    background: var(--sm-teal);
    color: #04201d;
    font-weight: 700;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-detail-head {
    display: flex;
    align-items: center;
    gap: 4px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-detail-close .sm-ico {
    width: 8px;
    height: 8px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-detail-tab {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-download-split {
    display: flex;
    margin-top: auto;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(0, 192, 180, 0.4);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-download-main,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-download-opts {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 20px;
    font-size: 8px;
    font-weight: 600;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-download-main {
    flex: 1;
    background: var(--sm-teal);
    color: #04201d;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-download-opts {
    width: 22px;
    color: var(--sm-teal);
    border-left: 1px solid rgba(0, 192, 180, 0.4);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-download-split .sm-ico {
    width: 9px;
    height: 9px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-selbar {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 10px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 26, 30, 0.96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    font-size: 8px;
    color: var(--sm-muted);
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub.is-selecting .sm-dh-selbar {
    opacity: 1;
    transform: translate(-50%, 0);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-selbar-count {
    margin-right: 6px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-selbar-count strong {
    color: var(--sm-text);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-selbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 18px;
    padding: 0 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--sm-text);
    transition: transform 0.12s ease, filter 0.12s ease;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-selbar-btn .sm-ico {
    width: 9px;
    height: 9px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-selbar-btn--primary {
    background: var(--sm-teal);
    color: #04201d;
    font-weight: 600;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub.is-download-pressed .sm-dh-selbar-btn--primary {
    transform: scale(0.92);
    filter: brightness(1.15);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-toast {
    bottom: 44px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub.is-share-pressed .sm-dh-selbar-btn--share {
    transform: scale(0.92);
    filter: brightness(1.15);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub:is(.is-downloaded, .is-delivered) .sm-dh-toast {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .sm-ico--spin svg,
    .sm-sb-frame[data-status="rendering"] .sm-sb-frame-image,
    .sm-app-shell--ide-loom .sm-loom-view--next,
    .sm-app-shell--ide-loom .sm-loom-plan,
    .sm-sb-act,
    .sm-sb-handoff-btn {
        animation: none !important;
    }
}

/* ── 3D Stage — the viewer with the storyboard's shot cameras on the CAD ── */
.sm-st-defs {
    position: absolute;
    width: 0;
    height: 0;
}

.sm-app-shell--ide-stage .sm-st-area {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--sm-border);
    border-radius: 6px;
    background: #171d21;
}

.sm-st-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 4px 6px;
    font-size: 7px;
    color: var(--sm-text);
    border-bottom: 1px solid var(--sm-border);
    background: rgba(255, 255, 255, 0.02);
}

.sm-st-toggle {
    display: inline-flex;
    height: 16px;
    overflow: hidden;
    border: 1px solid var(--sm-border);
    border-radius: 5px;
    flex-shrink: 0;
}

.sm-st-toggle span {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    color: var(--sm-muted);
}

.sm-st-toggle .is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sm-st-file {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--sm-muted);
    white-space: nowrap;
}

.sm-st-capture {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 16px;
    padding: 0 7px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    flex-shrink: 0;
}

.sm-st-viewport {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 38%, #232b31 0%, #171d21 58%, #111518 100%);
}

.sm-st-floor {
    position: absolute;
    left: -40%;
    right: -40%;
    top: 54%;
    bottom: -60%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px);
    background-size: 26px 26px;
    transform: perspective(320px) rotateX(64deg);
    transform-origin: 50% 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 55%, transparent 90%);
    mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 55%, transparent 90%);
}

.sm-st-car {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 72%;
    transform: translate(-50%, -50%);
    mix-blend-mode: lighten;
    pointer-events: none;
}

/* A render with real transparency (the hamster models) needs no blend:
   lighten only drops a black background */
.sm-st-car--cutout {
    mix-blend-mode: normal;
}

.sm-st-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.sm-st-orbit {
    fill: none;
    stroke: rgba(5, 199, 187, 0.3);
    stroke-width: 1;
    stroke-dasharray: 3 4;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sm-st-move {
    fill: none;
    stroke: #05c7bb;
    stroke-width: 0.55;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-st-frustum {
    fill: rgba(5, 199, 187, 0.09);
    stroke: rgba(5, 199, 187, 0.55);
    stroke-width: 1;
    stroke-dasharray: 2 2;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sm-st-cam {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    font-size: 8px;
    color: #e5e7eb;
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.sm-st-cam em {
    position: absolute;
    top: -7px;
    right: -6px;
    padding: 0 2px;
    border-radius: 3px;
    font-style: normal;
    font-size: 5.5px;
    font-weight: 600;
    color: var(--sm-muted);
    background: #0d1117;
}

.sm-st-cam.is-active {
    color: #05c7bb;
    border-color: #05c7bb;
    box-shadow: 0 0 0 3px rgba(5, 199, 187, 0.18);
    opacity: 1;
}

.sm-st-key {
    position: absolute;
    z-index: 1;
    width: 5px;
    height: 5px;
    background: #05c7bb;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease 0.5s;
}

.sm-st-pip {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 3;
    width: 31%;
    overflow: hidden;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #0b0f12;
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.sm-st-pip-frame {
    position: relative;
    aspect-ratio: 2.39 / 1;
    overflow: hidden;
    background: #000;
}

.sm-st-pip-frame::after {
    content: '';
    position: absolute;
    inset: 8% 6%;
    border: 1px dashed rgba(5, 199, 187, 0.45);
    border-radius: 2px;
}

.sm-st-view {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: 50% 55%;
}

.sm-st-pip-label {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 5px;
    font-size: 6px;
    color: var(--sm-text);
    white-space: nowrap;
    overflow: hidden;
}

.sm-st-pip-label .sm-ico {
    color: #05c7bb;
}

.sm-st-hint {
    position: absolute;
    left: 7px;
    bottom: 6px;
    font-size: 5.5px;
    color: rgba(255, 255, 255, 0.32);
}

.sm-st-timeline {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 4px 9px 6px;
    font-size: 6.5px;
    color: var(--sm-muted);
    border-top: 1px solid var(--sm-border);
    background: rgba(0, 0, 0, 0.22);
}

.sm-st-transport {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sm-st-play {
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 7px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, color 0.2s ease;
}

.sm-app-shell--ide-stage.is-playing .sm-st-play {
    color: #0d1117;
    background: #05c7bb;
}

.sm-st-time {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--sm-text);
}

.sm-st-ruler {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    font-size: 5.5px;
    color: rgba(255, 255, 255, 0.35);
}

.sm-st-lane {
    position: relative;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.sm-st-lane::before {
    content: '';
    position: absolute;
    inset: 2px 0;
    border-radius: 2px;
    background: rgba(5, 199, 187, 0.16);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-st-lane-label {
    position: absolute;
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 5.5px;
    color: rgba(255, 255, 255, 0.5);
}

.sm-st-tkey {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    background: #05c7bb;
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease 0.4s;
}

.sm-st-playhead {
    position: absolute;
    top: -4px;
    bottom: -3px;
    left: 0;
    width: 1px;
    background: #f87171;
}

.sm-st-playhead::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    border: 2.5px solid transparent;
    border-top-color: #f87171;
}

.sm-app-shell--ide-stage .sm-inspector-body {
    gap: 5px;
}

.sm-st-shots {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sm-st-shot {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto 8px;
    align-items: center;
    gap: 4px;
    padding: 3px 4px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 6.5px;
    color: var(--sm-text);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.sm-st-shot.is-active {
    color: #fff;
    background: rgba(5, 199, 187, 0.08);
    border-color: rgba(5, 199, 187, 0.3);
}

.sm-st-shot-icon {
    color: var(--sm-muted);
}

.sm-st-shot.is-active .sm-st-shot-icon {
    color: #05c7bb;
}

.sm-st-shot-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-st-shot-tag {
    padding: 0 3px;
    border-radius: 2px;
    font-size: 5.5px;
    color: var(--sm-muted);
    background: rgba(255, 255, 255, 0.06);
}

.sm-st-shot-check {
    color: #05c7bb;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sm-st-shot.is-set .sm-st-shot-check {
    opacity: 1;
}

.sm-st-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
}

.sm-st-field {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    padding: 3px 4px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.sm-st-field span {
    font-size: 5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.sm-st-field strong {
    overflow: hidden;
    font-size: 6.5px;
    font-weight: 600;
    color: #e5e7eb;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sm-st-field--motion {
    opacity: 0.35;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.sm-app-shell--ide-stage.is-motion .sm-st-field--motion {
    opacity: 1;
    border-color: rgba(5, 199, 187, 0.35);
}

.sm-app-shell--ide-stage.is-motion .sm-st-field--motion strong {
    color: #05c7bb;
}

.sm-st-passes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
}

.sm-st-pass {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 5.5px;
    color: var(--sm-muted);
    opacity: 0.3;
    transition: opacity 0.4s ease;
}

.sm-st-pass-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #000;
}

.sm-st-pass--depth img,
.sm-img-depth {
    filter: grayscale(1) brightness(1.9) contrast(0.7) blur(0.5px);
}

.sm-st-pass--edges img {
    filter: url(#smStEdges);
}

.sm-app-shell--ide-stage .sm-st-send {
    width: 100%;
    gap: 4px;
    color: #0d1117;
    background: #05c7bb;
}

.sm-app-shell--ide-stage:not(.st-phase-0) .sm-st-orbit,
.sm-app-shell--ide-stage:not(.st-phase-0) .sm-st-frustum,
.sm-app-shell--ide-stage:not(.st-phase-0) .sm-st-pip,
.sm-app-shell--ide-stage:not(.st-phase-0) .sm-st-pass {
    opacity: 1;
}

.sm-app-shell--ide-stage:not(.st-phase-0) .sm-st-pip {
    transform: none;
}

.sm-app-shell--ide-stage:not(.st-phase-0) .sm-st-cam:not(.is-active) {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
}

.sm-app-shell--ide-stage:not(.st-phase-0) .sm-st-cam.is-active {
    transform: translate(-50%, -50%) scale(1.15);
}

.sm-app-shell--ide-stage:is(.st-phase-2, .st-phase-3) .sm-st-move {
    stroke-dashoffset: 0;
}

.sm-app-shell--ide-stage:is(.st-phase-2, .st-phase-3) :is(.sm-st-key, .sm-st-tkey) {
    opacity: 1;
}

.sm-app-shell--ide-stage:is(.st-phase-2, .st-phase-3) .sm-st-lane::before {
    transform: scaleX(1);
}

.sm-app-shell--ide-stage.is-playing .sm-st-cam.is-active {
    transition: none;
}

.sm-app-shell--ide-stage.st-phase-3 .sm-st-send {
    animation: sm-st-send-pulse 1.6s ease-in-out 2;
}

@keyframes sm-st-send-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(5, 199, 187, 0); }
    50% { box-shadow: 0 0 0 3px rgba(5, 199, 187, 0.35); }
}

/* ---------- Flat app chrome ----------
   The app's connected-chrome shell: top bar and sidebar share one surface,
   panes sit flush and are split by hairlines — no floating glass cards. */
.sm-app-shell {
    --sm-chrome: #1e262b;
    --sm-raised: #252f35;
    --sm-divider: rgba(255, 255, 255, 0.08);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-topbar {
    height: 28px;
    gap: 8px;
    padding: 0 8px 0 0;
    background: var(--sm-chrome);
    border-bottom: 1px solid var(--sm-divider);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-brand {
    align-self: stretch;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 10px;
    box-sizing: border-box;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-topbar--expanded .sm-app-brand {
    width: 118px;
    border-right: 1px solid var(--sm-divider);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-search {
    height: 18px;
    max-width: 34%;
    border-radius: 6px;
    border-color: transparent;
    background: #171d21;
    white-space: nowrap;
    overflow: hidden;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-theme {
    display: inline-flex;
    gap: 1px;
    padding: 1px;
    border-radius: 5px;
    background: #171d21;
    color: var(--sm-muted);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-theme > .sm-ico,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-theme > span {
    width: 14px;
    height: 12px;
    padding: 2px 3px;
    box-sizing: border-box;
    border-radius: 4px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-theme > span.is-active {
    display: inline-flex;
    background: var(--sm-raised);
    color: var(--sm-text);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-bell {
    position: relative;
    display: inline-flex;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-bell em {
    position: absolute;
    top: -4px;
    right: -5px;
    min-width: 9px;
    height: 9px;
    padding: 0 2px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #e5484d;
    color: #fff;
    font: 600 5.5px/9px Inter, sans-serif;
    font-style: normal;
    text-align: center;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-help {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 8px;
    color: var(--sm-secondary);
    white-space: nowrap;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--product.sm-sidebar--rail {
    width: 38px;
    gap: 0;
    padding: 6px 5px 5px;
    background: var(--sm-chrome);
    border-right: 1px solid var(--sm-divider);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--product .sm-sidebar-card {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--product .sm-sidebar-card--foot {
    margin: 0 -5px;
    padding: 5px 5px 0;
    border-top: 1px solid var(--sm-divider);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--product .sm-nav-item--icon {
    height: 20px;
    border: 0;
    border-radius: 5px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--rail .sm-nav-item.active {
    background: rgba(0, 192, 180, 0.14);
    border: 0;
    color: var(--sm-teal);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--product.sm-sidebar--expanded {
    width: 118px;
    padding: 6px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--expanded .sm-sidebar-card--foot {
    margin: 0 -6px;
    padding: 5px 6px 0;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--expanded .sm-nav-item.sm-nav-item--icon {
    justify-content: flex-start;
    gap: 6px;
    height: 19px;
    padding: 0 6px;
    font-size: 8px;
    font-weight: 500;
    color: var(--sm-secondary);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--expanded .sm-nav-item .sm-ico {
    width: 10px;
    height: 10px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--product .sm-nav-item span.sm-nav-label {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--product .sm-nav-item span.sm-nav-badge {
    display: inline;
    font: 400 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--sm-muted);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--expanded .sm-nav-item.sm-nav-item--icon.sm-nav-pin {
    justify-content: flex-end;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-team-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    flex-shrink: 0;
    margin-bottom: 6px;
    padding: 0 6px 0 4px;
    border-radius: 6px;
    background: var(--sm-raised);
    color: var(--sm-muted);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-team-mark {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 4px;
    background: #1d4f91;
    color: #fff;
    font: 700 5.5px/1 Inter, sans-serif;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-team-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
    font-size: 6.5px;
    line-height: 1.1;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-team-copy strong {
    font-size: 7.5px;
    font-weight: 600;
    color: var(--sm-text);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-team-switch > .sm-ico {
    width: 8px;
    height: 8px;
}

/* Panes: flush, divided by hairlines */
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-main,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-loom .sm-main--loom,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-main--datahub {
    gap: 0;
    padding: 0;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-breadcrumb {
    height: 22px;
    flex-shrink: 0;
    padding: 0 10px;
    border: 0;
    border-bottom: 1px solid var(--sm-divider);
    border-radius: 0;
    background: transparent;
    font-size: 8px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-workspace,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-loom-workspace {
    gap: 0;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-board-toolbar,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-loom-head {
    height: 26px;
    padding: 0 8px;
    border: 0;
    border-bottom: 1px solid var(--sm-divider);
    border-radius: 0;
    background: transparent;
    box-sizing: border-box;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-canvas-area,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-stage .sm-st-area,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-loom-center {
    border: 0;
    border-radius: 0;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-loom-center {
    background: transparent;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-loom-binder {
    border: 0;
    border-right: 1px solid var(--sm-divider);
    border-radius: 0;
    background: transparent;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-inspector,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-loom-aside,
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-detail {
    border: 0;
    border-left: 1px solid var(--sm-divider);
    border-radius: 0;
    background: var(--sm-chrome);
}

/* Projects: page header + luminance cards like the Projects grid */
:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-project-head {
    padding: 10px 12px 6px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-project-title {
    font-size: 13px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-toolbar-row--tabs {
    padding: 0 12px 8px;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-tab {
    border-color: transparent;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-tab.active {
    border-color: transparent;
    background: rgba(0, 192, 180, 0.14);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-search-field {
    border-color: transparent;
    background: var(--sm-chrome);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-browser {
    padding: 8px 10px 0 12px;
    border-top: 1px solid var(--sm-divider);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-workspace {
    gap: 0;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-detail {
    border-top: 1px solid var(--sm-divider);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file {
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-color: transparent;
    background: var(--sm-chrome);
    text-align: left;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file-thumb {
    border: 0;
    border-radius: 0;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file-name {
    padding: 5px 6px 0;
    text-align: left;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file-meta {
    padding: 1px 6px 6px;
    text-align: left;
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file.is-checked {
    border-color: rgba(0, 192, 180, 0.6);
}

:is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-dh-file.is-checked .sm-dh-file-thumb {
    box-shadow: none;
}

@media (max-width: 720px) {
    :is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-topbar--expanded .sm-app-brand {
        width: auto;
        border-right: 0;
    }

    #ide-showcase .ide-showcase-mock :is(.sm-app-theme, .sm-app-help) {
        display: none;
    }
}

@media (max-width: 720px) {
    /* Studio on a phone: viewer and timeline first, the inspector as a narrow rail */
    #ide-showcase .ide-showcase-mock .sm-studio {
        grid-template-columns: minmax(0, 1fr) 104px;
    }

    #ide-showcase .ide-showcase-mock .sm-studio-lib,
    #ide-showcase .ide-showcase-mock .sm-studio-tool-copy small,
    #ide-showcase .ide-showcase-mock .sm-app-shell--ide-film .sm-loom-chip,
    #ide-showcase .ide-showcase-mock .sm-studio-fit {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-studio-viewer,
    #ide-showcase .ide-showcase-mock .sm-studio-tl {
        grid-column: 1;
    }

    #ide-showcase .ide-showcase-mock .sm-studio-insp {
        grid-column: 2;
    }

    #ide-showcase .ide-showcase-mock .sm-studio-screen {
        width: 100%;
    }

    #ide-showcase .ide-showcase-mock .sm-studio-tc,
    #ide-showcase .ide-showcase-mock .sm-studio-caption {
        white-space: nowrap;
    }

    #ide-showcase .ide-showcase-mock .sm-studio-caption {
        font-size: 7px;
    }

    #ide-showcase .ide-showcase-mock .sm-studio-tracks {
        --sm-studio-head: 40px;
    }

    #ide-showcase .ide-showcase-mock .sm-studio-clip-name {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #ide-showcase .ide-showcase-mock .sm-st-file,
    #ide-showcase .ide-showcase-mock .sm-st-bar .sm-loom-select,
    #ide-showcase .ide-showcase-mock .sm-st-hint {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-st-car {
        width: 96%;
    }

    #ide-showcase .ide-showcase-mock .sm-st-pip {
        top: 6px;
        bottom: auto;
        width: 46%;
    }
}

/* Narrow viewports: collapse the desktop mock so the four-step story stays readable.
   The product itself is desktop-first — drop the rail/binder, stack Coauthor, and
   overlay Data Hub details rather than shrinking 8px UI into a postage stamp. */
@media (max-width: 720px) {
    #ide-showcase.site-section--lg {
        padding-top: 5rem;
        padding-bottom: 2.75rem;
    }

    #ide-showcase .section-head {
        margin-bottom: 0.85rem;
    }

    #ide-showcase .section-head h2 {
        font-size: 1.85rem;
        line-height: 1.15;
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell {
        transform: none;
        width: 100%;
        height: 100%;
    }

    #ide-showcase .ide-showcase-media {
        aspect-ratio: 4 / 5;
        min-height: 340px;
        max-height: min(72vh, 560px);
    }

    #ide-showcase .ide-showcase-chapters {
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    #ide-showcase .ide-showcase-chapter {
        flex-direction: column;
        gap: 0.1rem;
        padding: 0.6rem 0 0.2rem;
    }

    #ide-showcase .ide-step-num {
        padding-top: 0;
        font-size: 0.6875rem;
    }

    #ide-showcase .ide-step-label {
        font-size: 0.75rem;
    }

    #ide-showcase .ide-step-verb {
        display: none;
    }

    #ide-showcase .ide-chapter-panel {
        gap: 1.25rem;
        margin-top: 1.25rem;
    }

    #ide-showcase .ide-chapter-copy h3 {
        font-size: 1.375rem;
    }

    #ide-showcase .ide-chapter-copy p {
        font-size: 0.9375rem;
    }

    :is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-sidebar--product,
    :is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--ide-datahub .sm-sidebar--product {
        display: none;
    }

    :is(#ide-showcase .ide-showcase-mock, .sm-real-ui) .sm-app-shell--hero-canvas .sm-main {
        padding-left: 6px;
    }

    #ide-showcase .ide-showcase-mock .sm-app-search,
    #ide-showcase .ide-showcase-mock .sm-app-topbar-icon {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-workspace {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) 158px;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-workspace--board {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
    }

    #ide-showcase .ide-showcase-mock .sm-loom-binder {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-head .sm-loom-btn,
    #ide-showcase .ide-showcase-mock .sm-loom-head .sm-loom-select,
    #ide-showcase .ide-showcase-mock .sm-loom-head .sm-loom-save {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-view {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-view.is-active,
    #ide-showcase .ide-showcase-mock .sm-loom-view.sm-loom-view--next,
    #ide-showcase .ide-showcase-mock .sm-loom-view:first-child,
    #ide-showcase .ide-showcase-mock .sm-loom-view:last-child {
        display: inline-block;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-edbar {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-page {
        width: calc(100% - 16px);
        max-width: none;
        margin-top: 8px;
        padding: 12px 16px;
        font-size: 9.5px;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-msg--user {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-aside-tabs > span:not(.is-active) {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-loom-center {
        overflow: auto;
    }

    #ide-showcase .ide-showcase-mock .sm-sb-scene:not(.sm-sb-scene--active) {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-sb-lane {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #ide-showcase .ide-showcase-mock .sm-sb-bar .sm-loom-select:nth-child(n+3),
    #ide-showcase .ide-showcase-mock .sm-sb-bar .sm-loom-btn,
    #ide-showcase .ide-showcase-mock .sm-sb-bar-meta {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--hero-canvas .sm-workspace {
        position: relative;
        grid-template-columns: minmax(0, 1fr);
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--hero-canvas .sm-board-toolbar {
        grid-column: 1;
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--hero-canvas .sm-board-tool,
    #ide-showcase .ide-showcase-mock .sm-app-shell--hero-canvas .sm-collab,
    #ide-showcase .ide-showcase-mock .sm-app-shell--hero-canvas .sm-board-crumbs {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--hero-canvas .sm-inspector {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--hero-canvas .sm-canvas-hero-input,
    #ide-showcase .ide-showcase-mock .sm-app-shell--hero-canvas .sm-canvas-hero-preview {
        min-width: 0;
        max-width: 42%;
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--ide-datahub .sm-dh-workspace {
        position: relative;
        grid-template-columns: minmax(0, 1fr);
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--ide-datahub .sm-dh-file-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--ide-datahub .sm-dh-detail {
        position: absolute;
        top: 4px;
        right: 4px;
        bottom: 44px;
        width: min(168px, 52%);
        grid-column: auto;
        grid-row: auto;
        z-index: 7;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--ide-datahub .sm-dh-selbar-btn:not(.sm-dh-selbar-btn--primary) {
        display: none;
    }

    #ide-showcase .ide-showcase-mock .sm-app-shell--ide-datahub .sm-dh-download-split {
        display: none;
    }

    #ide-showcase .product-showcase-title {
        font-size: 10px;
    }
}

/* macOS-style product window (home and /film IDE showcase) */
.product-showcase-frame {
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.4),
        0 24px 80px -20px rgba(0,0,0,0.75),
        0 0 60px -10px rgba(5, 199, 187, 0.15);
    background: #0d1117;
}
.product-showcase-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.product-showcase-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.product-showcase-dot.red { background: #ff5f57; }
.product-showcase-dot.yellow { background: #febc2e; }
.product-showcase-dot.green { background: #28c840; }
.product-showcase-title {
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    color: rgba(156, 163, 175, 0.9);
    margin-right: 36px;
}
