:root {
    --proto-bg: #f5f7fb;
    --proto-panel: #ffffff;
    --proto-text: #1f2937;
    --proto-muted: #667085;
    --proto-border: #d8dee8;
    --proto-dark: #111827;
    --proto-accent: #b88a44;
    --proto-accent-strong: #9a6f2f;
    --proto-blue: #2f6fed;
    --proto-green: #17865c;
    --proto-danger: #c2413b;
}

* {
    box-sizing: border-box;
}

body.proto-page {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--proto-text);
    background: var(--proto-bg);
}

.proto-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 64px 1fr;
}

.proto-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 22px;
    background: #fff;
    border-bottom: 1px solid var(--proto-border);
}

.proto-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.proto-brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--proto-dark);
    color: #fff;
}

.proto-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.2;
}

.proto-subtitle {
    margin: 2px 0 0;
    color: var(--proto-muted);
    font-size: .78rem;
}

.proto-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.proto-tour-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-left: 1px solid var(--proto-border);
    border-right: 1px solid var(--proto-border);
}

.proto-select {
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--proto-border);
    border-radius: 6px;
    background: #fff;
    color: var(--proto-text);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.proto-select:hover {
    border-color: var(--proto-accent);
}

.proto-select:focus {
    outline: none;
    border-color: var(--proto-accent);
    box-shadow: 0 0 0 3px rgba(184, 138, 68, 0.1);
}

.proto-segmented {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 38px;
    padding: 3px;
    border: 1px solid var(--proto-border);
    border-radius: 8px;
    background: #f8fafc;
}

.proto-segmented button {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--proto-muted);
    font: inherit;
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
}

.proto-segmented button.is-active {
    background: var(--proto-dark);
    color: #fff;
}

.proto-layout {
    display: grid;
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    min-height: calc(100vh - 64px);
}

.proto-sidebar {
    overflow: auto;
    padding: 18px;
    background: #fff;
    border-right: 1px solid var(--proto-border);
}

.proto-view-area {
    min-width: 0;
    display: grid;
    grid-template-rows: minmax(460px, 1fr) auto;
    background: #0d1117;
}

.proto-card {
    padding: 16px;
    margin-bottom: 14px;
    border: 1px solid var(--proto-border);
    border-radius: 8px;
    background: var(--proto-panel);
}

.proto-card h2 {
    margin: 0 0 12px;
    font-size: .92rem;
    font-weight: 750;
}

.proto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.proto-field {
    margin-bottom: 11px;
}

.proto-field label {
    display: block;
    margin-bottom: 5px;
    color: #344054;
    font-size: .76rem;
    font-weight: 700;
}

.proto-field input,
.proto-field select,
.proto-field textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--proto-border);
    border-radius: 7px;
    background: #fff;
    color: var(--proto-text);
    font: inherit;
    font-size: .86rem;
}

.proto-field textarea {
    min-height: 82px;
    resize: vertical;
}

.proto-help {
    margin: 8px 0 0;
    color: var(--proto-muted);
    font-size: .78rem;
    line-height: 1.45;
}

.proto-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.proto-scene-row,
.proto-hotspot-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--proto-border);
    border-radius: 8px;
    background: #f8fafc;
    text-align: left;
}

.proto-scene-row.is-active,
.proto-hotspot-row.is-active {
    border-color: var(--proto-accent);
    background: #fff8ec;
}

.proto-row-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .86rem;
    font-weight: 750;
}

.proto-row-meta {
    display: block;
    margin-top: 2px;
    color: var(--proto-muted);
    font-size: .72rem;
}

.proto-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--proto-border);
    border-radius: 7px;
    background: #fff;
    color: var(--proto-text);
    font-size: .84rem;
    font-weight: 750;
    cursor: pointer;
}

.proto-button:hover {
    border-color: #aab4c3;
    background: #f8fafc;
}

.proto-button.primary {
    border-color: var(--proto-accent);
    background: var(--proto-accent);
    color: #fff;
}

.proto-button.primary:hover {
    border-color: var(--proto-accent-strong);
    background: var(--proto-accent-strong);
}

.proto-button.blue {
    border-color: var(--proto-blue);
    background: var(--proto-blue);
    color: #fff;
}

.proto-button.danger {
    border-color: #f1c7c4;
    color: var(--proto-danger);
}

.proto-button.icon {
    width: 36px;
    padding: 0;
}

.proto-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.proto-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.proto-viewer-wrap {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    background: #05070a;
}

.proto-start-screen {
    position: absolute;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background:
        radial-gradient(circle at 30% 20%, rgba(184,138,68,.22), transparent 34%),
        linear-gradient(135deg, #111827, #05070a 58%, #1f2937);
    color: #fff;
}

.proto-start-screen.is-visible {
    display: flex;
}

.proto-start-panel {
    width: min(560px, 100%);
    padding: 28px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: rgba(17,24,39,.68);
    text-align: center;
    box-shadow: 0 28px 80px rgba(0,0,0,.34);
    backdrop-filter: blur(14px);
}

.proto-start-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(184,138,68,.95);
    color: #fff;
    font-size: 1.35rem;
}

.proto-start-panel h2 {
    margin: 0 0 10px;
    font-size: 1.45rem;
}

.proto-start-panel p {
    margin: 0 0 18px;
    color: rgba(255,255,255,.76);
    line-height: 1.55;
}

.proto-gallery-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 22;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 24px;
    height: 54px;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255,255,255,.18);
    background: linear-gradient(to bottom, rgba(10,14,20,.72), rgba(10,14,20,.22));
    color: #fff;
    pointer-events: auto;
}

.proto-gallery-logo {
    font-size: .84rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.proto-gallery-nav nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
}

.proto-gallery-nav a {
    color: rgba(255,255,255,.82);
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
}

.proto-gallery-nav a:hover {
    color: #fff;
}

#protoTourViewer {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.proto-viewer-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    cursor: grab;
}

.proto-viewer-wrap canvas:active {
    cursor: grabbing;
}

.proto-viewer-bar {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.proto-effect-picker {
    position: absolute;
    left: 16px;
    bottom: 58px;
    z-index: 22;
    width: min(250px, calc(100vw - 32px));
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: rgba(17,24,39,.72);
    color: rgba(255,255,255,.82);
    font-size: .74rem;
    backdrop-filter: blur(10px);
}

.proto-effect-picker-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.proto-effect-picker-toggle > i { font-size: .68rem; transition: transform .18s ease; }
.proto-effect-picker-body { display: grid; gap: 4px; }
.proto-effect-picker.is-collapsed { width: auto; min-width: 190px; }
.proto-effect-picker.is-collapsed .proto-effect-picker-body { display: none; }
.proto-effect-picker.is-collapsed .proto-effect-picker-toggle > i { transform: rotate(-90deg); }
.proto-effect-picker.is-collapsed .proto-effect-picker-toggle strong { margin-bottom: 0; }

.proto-effect-picker strong {
    color: #fff;
    font-size: .76rem;
    margin-bottom: 2px;
}

.proto-effect-option {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 3px 4px;
    border-radius: 6px;
    transition: background .15s ease;
}

.proto-effect-option:hover {
    background: rgba(255,255,255,.08);
}

.proto-effect-option input {
    accent-color: #6366f1;
    cursor: pointer;
}

.proto-page.preview-mode .proto-effect-picker {
    left: auto;
    right: 16px;
    bottom: auto;
    top: 72px;
}

.tour-workbench .proto-effect-picker,
.proto-page.tour-workbench.preview-mode .proto-effect-picker {
    position: absolute;
    left: auto;
    right: 16px;
    top: 16px;
    bottom: auto;
}

.proto-page.client-mode .proto-effect-picker {
    display: none;
}

.proto-tips-panel {
    position: absolute;
    left: 16px;
    top: 120px;
    z-index: 21;
    width: min(330px, calc(100vw - 32px));
    display: grid;
    gap: 5px;
    padding: 12px 13px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    background: rgba(17,24,39,.62);
    color: rgba(255,255,255,.8);
    font-size: .76rem;
    backdrop-filter: blur(10px);
}

.proto-tips-panel strong {
    color: #fff;
    font-size: .8rem;
}

.proto-preview-exit {
    position: absolute;
    right: 18px;
    bottom: 78px;
    z-index: 32;
    display: none;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(17,24,39,.72);
    color: #fff;
    font-size: .8rem;
    font-weight: 750;
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.proto-viewer-toast {
    position: absolute;
    left: 50%;
    top: 72px;
    z-index: 34;
    max-width: min(560px, calc(100vw - 32px));
    min-height: 38px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(17,24,39,.78);
    color: #fff;
    font-size: .82rem;
    font-weight: 750;
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 38px rgba(0,0,0,.24);
}

.proto-viewer-toast.is-visible {
    display: inline-flex;
}

.proto-viewer-toast.is-error {
    background: rgba(127,29,29,.86);
}

.proto-context-menu {
    position: fixed;
    z-index: 10020;
    display: none;
    min-width: 280px;
    padding: 6px;
    border: 1px solid rgba(17,24,39,.1);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15,23,42,.24);
}

.proto-context-section {
    padding: 8px 8px 6px;
}

.proto-context-section label {
    display: block;
    margin-bottom: 5px;
    color: #667085;
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.proto-context-section select {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid var(--proto-border);
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-size: .82rem;
}

.proto-context-divider {
    height: 1px;
    margin: 6px;
    background: #e5e7eb;
}

.proto-context-danger {
    color: #dc2626 !important;
}

.proto-context-danger:hover {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.proto-context-menu.is-open {
    display: block;
}

.proto-context-menu button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.proto-context-menu button:hover {
    background: #f3f6fb;
}

.proto-context-menu button i {
    width: 18px;
    color: var(--proto-accent);
    text-align: center;
}

.proto-viewer-chip,
.proto-angle-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    background: rgba(17,24,39,.78);
    color: #fff;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px rgba(0,0,0,.25);
    pointer-events: auto;
}

.proto-viewer-chip strong {
    font-size: .88rem;
}

.proto-viewer-chip span,
.proto-angle-chip {
    font-size: .76rem;
    color: rgba(255,255,255,.78);
}

.proto-hotspot-layer {
    position: absolute;
    inset: 0;
    z-index: 12;
    pointer-events: none;
}

.proto-annotation-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 24;
}

.proto-annotation {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 2px;
    background: #f59e0b;
    color: #fff;
    font-size: .82rem;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 6px 18px rgba(0,0,0,.38);
    transition: transform .15s ease, background .15s ease;
    animation: annPop .25s ease;
}

.proto-annotation:hover { transform: translate(-50%, -50%) scale(1.12); }
.proto-annotation.status-pendente { background: #f59e0b; }
.proto-annotation.status-em_analise { background: #3b82f6; }
.proto-annotation.status-resolvido,
.proto-annotation.status-resolvida { background: #22c55e; }
.proto-annotation.is-focus {
    box-shadow: 0 0 0 4px rgba(255,255,255,.5), 0 6px 18px rgba(0,0,0,.4);
    transform: translate(-50%, -50%) scale(1.18);
}

@keyframes annPop {
    from { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.ann-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    background: rgba(3,5,9,.55);
    backdrop-filter: blur(2px);
}
.ann-sheet-backdrop.is-open { display: block; }
.ann-sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) translateY(100%);
    z-index: 61;
    width: min(560px, 100vw);
    max-height: 86vh;
    overflow-y: auto;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: #11151f;
    color: #fff;
    box-shadow: 0 -18px 50px rgba(0,0,0,.45);
    transition: transform .28s cubic-bezier(.22,.61,.36,1);
}
.ann-sheet.is-open { transform: translateX(-50%) translateY(0); }
.ann-sheet-handle { width:44px;height:5px;border-radius:999px;background:rgba(255,255,255,.22);margin:0 auto 14px; }
.ann-sheet h3 { margin:0 0 4px;font-size:1rem;font-weight:800;display:flex;align-items:center;gap:8px; }
.ann-detail-meta { display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:2px 0 12px;font-size:.74rem;opacity:.8; }
.ann-status-badge { padding:3px 10px;border-radius:999px;font-weight:800;font-size:.68rem;text-transform:uppercase;letter-spacing:.03em; }
.ann-status-badge.pendente { background:rgba(245,158,11,.2);color:#fbbf24; }
.ann-status-badge.em_analise { background:rgba(59,130,246,.2);color:#93c5fd; }
.ann-status-badge.resolvido,.ann-status-badge.resolvida { background:rgba(34,197,94,.2);color:#86efac; }
.ann-detail-text { font-size:.95rem;line-height:1.5;white-space:pre-wrap; }
.ann-detail-photo { margin-top:12px; }
.ann-detail-photo img { width:100%;border-radius:12px;display:block; }
.ann-reply { margin-top:14px;padding:12px;border-radius:12px;background:rgba(59,130,246,.12);border:1px solid rgba(59,130,246,.25);font-size:.85rem;line-height:1.45; }
.ann-reply strong { display:block;font-size:.72rem;opacity:.8;margin-bottom:4px; }
.ann-sheet-actions { display:flex;gap:10px;margin-top:18px; }
.ann-btn { flex:1;padding:12px;border-radius:12px;border:0;font-size:.88rem;font-weight:800;cursor:pointer; }
.ann-btn.ghost { background:rgba(255,255,255,.08);color:#fff; }
.ann-btn:not(.ghost):not(.danger) { background:#d4a154;color:#17231e; }
.ann-btn.danger { background:rgba(194,65,59,.18);color:#f5aaa5; }
.ann-admin-actions { flex-wrap:wrap; }

.proto-vignette-layer {
    position: absolute;
    inset: 0;
    z-index: 19;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(0,0,0,.92) 100%);
}

.proto-transition-layer {
    position: absolute;
    inset: 0;
    z-index: 18;
    display: grid;
    place-items: center;
    background: rgba(3,7,12,.18);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.proto-transition-layer span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(17,24,39,.68);
    font-size: .78rem;
    font-weight: 750;
    backdrop-filter: blur(10px);
}

#protoTourViewer.is-scene-fading .proto-transition-layer,
#protoTourViewer.is-loading-scene .proto-transition-layer {
    opacity: 1;
}

#protoTourViewer.is-loading-scene .proto-transition-layer {
    background: rgba(3,7,12,.36);
}

#protoTourViewer.is-traveling canvas {
    transition: filter .16s ease, transform .16s ease;
    filter: saturate(1.08) contrast(1.03);
    transform: scale(1.018);
}

#protoTourViewer.is-walk-blending canvas {
    will-change: filter, transform;
}

#protoTourViewer.is-traveling .proto-hotspot-layer {
    opacity: .25;
}

#protoTourViewer.is-walk-blending .proto-hotspot-layer {
    opacity: .08;
}

.proto-hotspot {
    position: absolute;
    width: var(--hotspot-size, 42px);
    height: var(--hotspot-size, 42px);
    display: grid;
    place-items: center;
    border: 2px solid rgba(255,255,255,.94);
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    color: #1f2937;
    box-shadow: 0 10px 24px rgba(0,0,0,.32);
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    font-size: var(--hotspot-icon-size, 13px);
}

.proto-hotspot.nav {
    background: rgba(255,255,255,.92);
    color: #1f2937;
}

.proto-hotspot.info {
    background: rgba(255,255,255,.92);
    color: #1f2937;
}

.proto-hotspot::after {
    content: "";
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    animation: protoPulse 1.7s infinite;
}

@keyframes protoPulse {
    0% { transform: scale(.8); opacity: .9; }
    100% { transform: scale(1.45); opacity: 0; }
}

.proto-bottom-tray {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #111827;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,.08);
}

.proto-range-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.proto-range-heading output {
    color: var(--proto-accent-strong);
    font-size: .76rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.proto-hotspot-size-field input[type="range"] {
    width: 100%;
    accent-color: var(--proto-accent);
}

.proto-scene-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px;
    overflow: auto;
    scrollbar-width: thin;
}

.proto-scene-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 5px 14px 5px 6px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.86);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.proto-scene-pill:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.32);
    transform: translateY(-1px);
}

.proto-pill-index {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    font-size: .66rem;
    font-weight: 800;
    color: rgba(255,255,255,.72);
    flex: 0 0 auto;
}

.proto-scene-pill.is-active {
    background: #fff;
    border-color: #fff;
    color: #111827;
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

.proto-scene-pill.is-active .proto-pill-index {
    background: #111827;
    color: #fff;
}

.proto-scene-pill.is-dragging {
    opacity: .4;
}

.proto-scene-pill.drag-before {
    box-shadow: -3px 0 0 0 #60a5fa;
}

.proto-scene-pill.drag-after {
    box-shadow: 3px 0 0 0 #60a5fa;
}

.proto-scene-pill.is-editing {
    background: rgba(255,255,255,.16);
    border-color: #60a5fa;
    cursor: text;
}

.proto-pill-input {
    width: auto;
    min-width: 60px;
    max-width: 180px;
    border: none;
    outline: none;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
}

.proto-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
    background: rgba(7,11,18,.18);
    backdrop-filter: blur(6px);
}

.proto-modal.is-open,
.proto-modal.is-visible {
    display: flex;
}

.proto-modal-card {
    width: min(440px, 92vw);
    max-height: 100vh;
    overflow: auto;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0,0,0,.34);
    animation: protoDrawerIn .22s ease-out;
}

@keyframes protoDrawerIn {
    from { transform: translateX(28px); opacity: .35; }
    to { transform: translateX(0); opacity: 1; }
}

.proto-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--proto-border);
}

.proto-modal-head h3 {
    margin: 0;
    font-size: 1.05rem;
}

.proto-modal-body {
    padding: 18px;
}

.proto-modal-image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 14px;
    background: #f2f4f7;
}

.proto-page.preview-mode .proto-shell,
.proto-page.client-mode .proto-shell {
    display: block;
}

.proto-page.preview-mode .proto-topbar,
.proto-page.preview-mode .proto-sidebar,
.proto-page.preview-mode .proto-viewer-chip,
.proto-page.preview-mode .proto-angle-chip,
.proto-page.client-mode .proto-topbar,
.proto-page.client-mode .proto-sidebar,
.proto-page.client-mode .proto-viewer-chip,
.proto-page.client-mode .proto-angle-chip,
.proto-page.client-mode .proto-tips-panel,
.proto-page.client-mode .proto-preview-exit {
    display: none;
}

.proto-page.preview-mode .proto-layout,
.proto-page.client-mode .proto-layout {
    display: block;
    min-height: 100vh;
}

.proto-page.preview-mode .proto-view-area,
.proto-page.client-mode .proto-view-area {
    min-height: 100vh;
    display: block;
}

.proto-page.preview-mode .proto-viewer-wrap,
.proto-page.client-mode .proto-viewer-wrap {
    min-height: 100vh;
    height: 100vh;
    height: 100dvh;
}

.proto-page.preview-mode .proto-bottom-tray,
.proto-page.client-mode .proto-bottom-tray {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 30;
    width: min(760px, calc(100vw - 32px));
    transform: translateX(-50%);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(17,24,39,.72);
    backdrop-filter: blur(12px);
}

.proto-page.preview-mode .proto-bottom-tray .proto-help,
.proto-page.client-mode .proto-bottom-tray .proto-help {
    display: none;
}

.proto-page.preview-mode .proto-floor-label,
.proto-page.client-mode .proto-floor-label {
    display: none;
}

.proto-page.preview-mode .proto-tips-panel {
    top: auto;
    bottom: 126px;
}

.proto-page.preview-mode .proto-gallery-nav,
.proto-page.client-mode .proto-gallery-nav {
    display: none;
}

.proto-page.preview-mode .proto-preview-exit {
    display: inline-flex;
}

.proto-photo-capture {
    bottom: 126px;
}

.proto-photo-capture:hover {
    background: rgba(37,48,71,.86);
    border-color: rgba(255,255,255,.32);
}

.proto-hotspot-size-toggle {
    position: absolute;
    z-index: 33;
    right: 18px;
    bottom: 30px;
    width: 42px;
    height: 42px;
    display: none;
    place-items: center;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    background: rgba(37,48,71,.78);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0,0,0,.28);
    backdrop-filter: blur(12px);
    cursor: pointer;
}
.proto-page.preview-mode .proto-hotspot-size-toggle { display: grid; }
.proto-hotspot-size-toggle:hover,
.proto-hotspot-size-toggle[aria-expanded="true"] { background: #d4a154; color: #17231e; }
.proto-hotspot-size-panel {
    position: absolute;
    z-index: 35;
    right: 72px;
    bottom: 24px;
    width: min(300px, calc(100vw - 96px));
    display: none;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    background: rgba(18,26,34,.96);
    color: #fff;
    box-shadow: 0 18px 55px rgba(0,0,0,.38);
    backdrop-filter: blur(14px);
}
.proto-page.preview-mode .proto-hotspot-size-panel.is-open { display: grid; }
.proto-hotspot-size-panel-head,
.proto-hotspot-size-reading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.proto-hotspot-size-panel-head span { color: #d4a154; font-size: .58rem; font-weight: 800; letter-spacing: .12em; }
.proto-hotspot-size-panel-head button { width: 26px; height: 26px; border: 0; border-radius: 5px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.proto-hotspot-size-panel label { color: rgba(255,255,255,.68); font-size: .63rem; font-weight: 700; }
.proto-hotspot-size-panel select { width: 100%; padding: 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 7px; background: #26313d; color: #fff; font: .72rem Inter,sans-serif; }
.proto-hotspot-size-panel input[type="range"] { width: 100%; accent-color: #d4a154; }
.proto-hotspot-size-panel output { color: #d4a154; font-size: .7rem; font-weight: 800; }
.proto-hotspot-size-panel small { color: rgba(255,255,255,.55); font-size: .6rem; line-height: 1.4; }

.proto-modal-text {
    color: #344054;
    line-height: 1.62;
    white-space: pre-line;
}

.proto-json-area {
    min-height: 130px;
    font-family: Consolas, "Courier New", monospace;
    font-size: .78rem;
}

.proto-status {
    min-height: 20px;
    margin-top: 8px;
    color: var(--proto-green);
    font-size: .78rem;
    font-weight: 700;
}

.proto-status.is-error { color: var(--proto-danger); }
.proto-status.is-success { color: var(--proto-green); }
.proto-status.is-info { color: var(--proto-blue); }

/* Tour Manager Modal */
.proto-tour-manager {
    align-items: center;
    justify-content: center;
}

.proto-tour-card {
    width: min(520px, 92vw);
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
}

.proto-tour-body {
    padding: 20px;
}

.proto-tour-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: #f8fafc;
    border: 1px solid var(--proto-border);
    border-radius: 8px;
    color: var(--proto-muted);
    font-size: .85rem;
}

.proto-tour-current i {
    color: var(--proto-accent);
}

.proto-tour-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.proto-tour-row .proto-select {
    flex: 1;
}

.proto-tour-row .proto-button {
    min-height: 36px;
    padding: 0 10px;
}

.proto-select-block {
    width: 100%;
}

.proto-input-block {
    width: 100%;
}

.proto-modal-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--proto-border);
    background: #f8fafc;
}

.proto-modal-foot .proto-button {
    flex: 1;
}

@media (max-width: 640px) {
    .proto-tour-card {
        width: 95vw;
        max-height: 90vh;
    }
    .proto-tour-row {
        flex-direction: column;
    }
    .proto-tour-row .proto-button {
        min-height: 32px;
    }
}

/* Workbench enxuto: o motor permanece intacto; os formulários viram uma gaveta. */
.tour-workbench {
    --workbench-bar: 64px;
    overflow: hidden;
}

.tour-workbench .proto-shell {
    height: 100svh;
    min-height: 0;
}

.tour-workbench .proto-topbar {
    position: relative;
    z-index: 80;
    padding-inline: clamp(14px, 2vw, 28px);
    box-shadow: 0 1px 18px rgba(15, 23, 42, .08);
}

.tour-workbench .proto-secondary-action {
    display: none;
}

.tour-workbench .proto-layout {
    position: relative;
    display: block;
    min-height: 0;
    overflow: hidden;
}

.tour-workbench .proto-view-area,
.tour-workbench .proto-viewer-wrap,
.tour-workbench #protoTourViewer {
    width: 100%;
    height: calc(100svh - var(--workbench-bar));
    min-height: 0;
}

/* Ao ocultar a barra administrativa, nenhum elemento interno pode conservar
   a subtração de 64 px usada no modo de edição. */
.proto-page.tour-workbench.preview-mode .proto-view-area,
.proto-page.tour-workbench.preview-mode .proto-viewer-wrap,
.proto-page.tour-workbench.preview-mode #protoTourViewer,
.proto-page.tour-workbench.client-mode .proto-view-area,
.proto-page.tour-workbench.client-mode .proto-viewer-wrap,
.proto-page.tour-workbench.client-mode #protoTourViewer {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
}

.tour-workbench .proto-view-area {
    display: block;
    position: relative;
    overflow: hidden;
}

.tour-workbench .proto-bottom-tray {
    position: absolute;
    z-index: 34;
    left: 24px;
    bottom: 24px;
    width: min(420px, calc(100% - 48px));
    display: block;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    background: rgba(15, 23, 33, .88);
    box-shadow: 0 18px 55px rgba(0,0,0,.34);
    backdrop-filter: blur(14px);
    transition: width .2s ease, transform .2s ease;
}

.proto-page.tour-workbench.preview-mode .proto-bottom-tray,
.proto-page.tour-workbench.client-mode .proto-bottom-tray {
    position: fixed;
    left: 24px;
    bottom: 24px;
    width: min(420px, calc(100% - 48px));
    transform: none;
    padding: 0;
    border-radius: 12px;
    background: rgba(15, 23, 33, .88);
}

.proto-navigator-head {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 13px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.84);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.proto-navigator-head button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,.74);
    cursor: pointer;
}
.proto-navigator-head button:hover { background: rgba(255,255,255,.1); color: #fff; }
.proto-navigator-body { display: grid; gap: 8px; padding: 10px; }
.tour-workbench .proto-scene-pills {
    width: 100%;
    max-height: min(42vh, 360px);
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: auto;
}
.tour-workbench .proto-scene-pill {
    width: 100%;
    min-height: 36px;
    justify-content: flex-start;
    padding: 5px 10px 5px 6px;
    border-radius: 8px;
    font-size: .74rem;
    text-align: left;
}
.proto-scene-group { display: grid; gap: 4px; }
.proto-scene-note-count {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 99px;
    background: #d4a154;
    color: #17231e;
    font-size: .62rem;
    font-weight: 900;
}
.proto-scene-annotations { display: grid; gap: 3px; padding: 0 4px 4px 17px; }
.proto-scene-annotation {
    width: 100%;
    display: grid;
    grid-template-columns: 20px minmax(0,1fr);
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border: 0;
    border-left: 2px solid #d4a154;
    border-radius: 0 6px 6px 0;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.78);
    cursor: pointer;
    text-align: left;
}
.proto-scene-annotation:hover { background: rgba(255,255,255,.12); color: #fff; }
.proto-scene-annotation.status-resolvida { border-left-color: #76b98d; opacity: .65; }
.proto-scene-annotation i { color: #d4a154; font-size: .68rem; }
.proto-scene-annotation span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .67rem; }
.proto-scene-context-menu {
    position: fixed;
    z-index: 240;
    width: min(230px, calc(100vw - 16px));
    padding: 6px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    background: rgba(18,26,34,.98);
    color: #fff;
    box-shadow: 0 20px 55px rgba(0,0,0,.42);
    backdrop-filter: blur(12px);
}
.proto-scene-context-menu > div { display: grid; gap: 2px; padding: 8px 9px 9px; border-bottom: 1px solid rgba(255,255,255,.1); }
.proto-scene-context-menu small { color: #d4a154; font-size: .56rem; font-weight: 800; letter-spacing: .14em; }
.proto-scene-context-menu strong { overflow: hidden; color: rgba(255,255,255,.75); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.proto-scene-context-menu button { width: 100%; display: flex; align-items: center; gap: 9px; margin-top: 5px; padding: 10px; border: 0; border-radius: 7px; background: transparent; color: #f0a7a1; font: 700 .72rem Inter,sans-serif; cursor: pointer; text-align: left; }
.proto-scene-context-menu button:hover { background: rgba(194,65,59,.14); }
.proto-annotation-context-menu button[data-action="edit"] { color: #fff; }
.proto-annotation-context-menu button[data-action="edit"]:hover { background: rgba(255,255,255,.09); }
.tour-workbench .proto-pill-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tour-workbench .proto-bottom-tray.is-collapsed { width: 116px; }
.proto-page.tour-workbench.preview-mode .proto-bottom-tray.is-collapsed,
.proto-page.tour-workbench.client-mode .proto-bottom-tray.is-collapsed { width: 116px; }
.tour-workbench .proto-bottom-tray.is-collapsed .proto-navigator-body { display: none; }
.tour-workbench .proto-bottom-tray.is-collapsed .proto-navigator-head { border-bottom: 0; }
.tour-workbench .proto-bottom-tray.is-collapsed .proto-navigator-head button i { transform: rotate(180deg); }

.tour-workbench .proto-sidebar {
    position: fixed;
    z-index: 100;
    inset: var(--workbench-bar) auto 0 0;
    width: min(390px, 92vw);
    padding: 18px;
    border-right: 1px solid var(--proto-border);
    border-bottom: 0;
    box-shadow: 18px 0 55px rgba(2, 8, 23, .22);
    transform: translateX(-105%);
    transition: transform .24s ease;
    visibility: hidden;
}

.tour-workbench.tools-open .proto-sidebar {
    transform: translateX(0);
    visibility: visible;
}

.proto-tools-backdrop {
    position: fixed;
    z-index: 90;
    inset: var(--workbench-bar) 0 0;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(4, 12, 20, .48);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.tour-workbench.tools-open .proto-tools-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.proto-tools-heading {
    position: sticky;
    z-index: 2;
    top: -18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -18px -18px 18px;
    padding: 18px;
    border-bottom: 1px solid var(--proto-border);
    background: #fff;
}

.proto-tools-heading div { display: grid; gap: 3px; }
.proto-tools-heading span { color: var(--proto-accent-strong); font-size: .64rem; font-weight: 800; letter-spacing: .16em; }
.proto-tools-heading strong { font-size: 1rem; }
.proto-tools-heading button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--proto-border);
    border-radius: 50%;
    background: #fff;
    color: var(--proto-text);
    cursor: pointer;
}

.proto-upload-progress {
    position: absolute;
    z-index: 75;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(5, 12, 18, .64);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

.proto-admin-annotation-button {
    position: absolute;
    z-index: 36;
    top: 18px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border: 0;
    border-radius: 999px;
    background: #d4a154;
    color: #17231e;
    box-shadow: 0 12px 36px rgba(0,0,0,.3);
    font: 800 .72rem Inter, sans-serif;
    cursor: pointer;
}
.proto-admin-annotation-button.is-armed { background: #fff; box-shadow: 0 0 0 4px rgba(212,161,84,.6), 0 12px 36px rgba(0,0,0,.3); }
.admin-annotation-armed #protoTourViewer canvas { cursor: crosshair !important; }
.proto-admin-marker-modal {
    position: fixed;
    z-index: 180;
    inset: 0;
    display: grid;
    place-items: end center;
    padding: 18px 18px 0;
    background: rgba(4,12,9,.72);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
}
.proto-admin-marker-modal.is-open { opacity: 1; visibility: visible; }
.proto-admin-marker-card { position: relative; width: min(560px,100%); max-height: min(86svh,760px); overflow:auto; padding: 30px 28px 24px; border:1px solid rgba(255,255,255,.1); border-bottom:0; border-radius:22px 22px 0 0; background: #101722; color: #fff; box-shadow: 0 -20px 70px rgba(0,0,0,.48); }
.proto-admin-marker-card::before { content:""; display:block; width:44px; height:5px; margin:-14px auto 16px; border-radius:99px; background:rgba(255,255,255,.22); }
.proto-admin-marker-card > span { color: #d4a154; font-size: .62rem; font-weight: 800; letter-spacing: .15em; }
.proto-admin-marker-card h2 { margin: 8px 42px 8px 0; font: 1.65rem Georgia,serif; }
.proto-admin-marker-card p { color: rgba(255,255,255,.55); font-size: .72rem; }
.proto-admin-marker-card textarea { width: 100%; padding: 14px; resize: vertical; border: 1px solid rgba(255,255,255,.14); border-radius:12px; background: rgba(255,255,255,.07); color: #fff; font: .9rem/1.5 Inter,sans-serif; outline:0; }
.proto-admin-marker-card textarea:focus { border-color:#d4a154; box-shadow:0 0 0 3px rgba(212,161,84,.12); }
.proto-admin-marker-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.14); border-radius:50%; background: rgba(255,255,255,.06); color:#fff; cursor: pointer; }
.proto-marker-image-field { display:block; margin-top:12px; cursor:pointer; }
.proto-marker-image-field input { position:absolute; width:1px; height:1px; opacity:0; }
.proto-marker-image-field > span { display:grid; grid-template-columns:34px 1fr; align-items:center; gap:2px 10px; padding:12px; border:1px dashed rgba(255,255,255,.22); border-radius:12px; color:#fff; }
.proto-marker-image-field i { grid-row:1 / span 2; display:grid; place-items:center; width:34px; height:34px; border-radius:8px; background:rgba(212,161,84,.15); color:#d4a154; }
.proto-marker-image-field b { font-size:.75rem; }
.proto-marker-image-field small { color:rgba(255,255,255,.48); font-size:.62rem; }
.proto-marker-image-preview { position:relative; margin-top:12px; }
.proto-marker-image-preview img { width:100%; max-height:250px; display:block; object-fit:cover; border-radius:12px; }
.proto-marker-image-preview button { position:absolute; right:8px; bottom:8px; padding:8px 10px; border:0; border-radius:8px; background:rgba(15,23,34,.9); color:#f5aaa5; font-size:.65rem; font-weight:800; cursor:pointer; }
.proto-admin-marker-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.proto-admin-marker-actions button { padding: 11px 14px; border: 1px solid rgba(255,255,255,.14); border-radius:10px; background: transparent; color: #fff; font-weight: 800; cursor: pointer; }
.proto-admin-marker-actions button.primary { border-color: #d4a154; background: #d4a154; color: #17231e; }
.proto-admin-marker-actions button.danger { margin-right:auto; border-color:rgba(194,65,59,.4); color:#f5aaa5; }

.proto-upload-progress.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.proto-upload-progress-card {
    width: min(520px, 100%);
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 6px 16px;
    align-items: center;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    background: rgba(17, 28, 38, .96);
    color: #fff;
    box-shadow: 0 24px 80px rgba(0,0,0,.34);
}

.proto-upload-progress-icon {
    grid-row: 1 / span 2;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--proto-accent);
    font-size: 1.15rem;
}

.proto-upload-progress-copy { min-width: 0; display: grid; gap: 4px; }
.proto-upload-progress-copy > span { color: #d7b16f; font-size: .64rem; font-weight: 800; letter-spacing: .16em; }
.proto-upload-progress-copy strong { font-size: 1rem; }
.proto-upload-progress-copy small { color: rgba(255,255,255,.68); line-height: 1.45; }
.proto-upload-progress-percent { color: #d7b16f; font-size: .9rem; font-variant-numeric: tabular-nums; }
.proto-upload-progress-track {
    grid-column: 1 / -1;
    height: 6px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255,255,255,.13);
}
.proto-upload-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ad7b37, #e0bd7e);
    transition: width .16s ease;
}
.proto-upload-progress.is-indeterminate .proto-upload-progress-track span {
    width: 38% !important;
    animation: proto-upload-scan 1.05s ease-in-out infinite;
}
.proto-upload-progress.has-error .proto-upload-progress-icon,
.proto-upload-progress.has-error .proto-upload-progress-track span { background: var(--proto-danger); }
@keyframes proto-upload-scan { from { transform: translateX(-110%); } to { transform: translateX(265%); } }

@media (max-width: 1180px) {
    .tour-workbench .proto-subtitle { display: none; }
}

@media (max-width: 720px) {
    .tour-workbench { --workbench-bar: 62px; }
    .tour-workbench .proto-shell { grid-template-rows: var(--workbench-bar) 1fr; }
    .tour-workbench .proto-topbar {
        height: var(--workbench-bar);
        min-height: var(--workbench-bar);
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
    }
    .tour-workbench .proto-brand { flex: 0 0 auto; gap: 8px; }
    .tour-workbench .proto-brand-mark { width: 34px; height: 34px; }
    .tour-workbench .proto-title { max-width: 25vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
    .tour-workbench .proto-top-actions {
        flex: 1 1 auto;
        width: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .tour-workbench .proto-top-actions::-webkit-scrollbar { display: none; }
    .tour-workbench .proto-tour-controls { padding: 0; border: 0; }
    .tour-workbench .proto-button { flex: 0 0 auto; min-width: 40px; min-height: 40px; padding: 9px 11px; }
    .tour-workbench .proto-button span,
    .tour-workbench .proto-tour-controls .proto-button:not(:disabled) { font-size: 0; }
    .tour-workbench .proto-tour-controls .proto-button i { font-size: .9rem; }
    .tour-workbench .proto-top-actions > .proto-button:not(.primary) span,
    .tour-workbench .proto-top-actions > a.proto-button { font-size: 0; }
    .tour-workbench .proto-top-actions > a.proto-button i { font-size: .9rem; }
    .tour-workbench .proto-sidebar {
        inset: auto 0 0;
        width: 100%;
        max-height: min(78svh, 720px);
        border: 0;
        border-radius: 20px 20px 0 0;
        transform: translateY(105%);
        transition: transform .24s ease;
    }
    .tour-workbench.tools-open .proto-sidebar { transform: translateY(0); }
    .tour-workbench .proto-start-panel { width: calc(100% - 28px); padding: 24px 18px; }
    .tour-workbench .proto-start-panel h2 { font-size: 1.25rem; }
    .tour-workbench .proto-start-panel p { font-size: .88rem; }
    .tour-workbench .proto-bottom-tray {
        left: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: min(360px, calc(100% - 24px));
        align-items: initial;
        flex-direction: initial;
    }
    .proto-page.tour-workbench.preview-mode .proto-bottom-tray,
    .proto-page.tour-workbench.client-mode .proto-bottom-tray {
        left: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: min(360px, calc(100% - 24px));
    }
    .proto-page.tour-workbench.preview-mode .proto-bottom-tray.is-collapsed,
    .proto-page.tour-workbench.client-mode .proto-bottom-tray.is-collapsed { width: 116px; }
    .proto-upload-progress { padding: 14px; }
    .proto-admin-annotation-button {
        top: 12px;
        left: 12px;
        width: 42px;
        height: 42px;
        justify-content: center;
        padding: 0;
        font-size: .8rem;
    }
    .proto-admin-annotation-button span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .proto-hotspot-size-toggle { right: 12px; bottom: 18px; width: 40px; height: 40px; }
    .proto-hotspot-size-panel { right: 60px; bottom: 14px; width: min(280px, calc(100vw - 76px)); }
    .proto-upload-progress-card { grid-template-columns: 42px minmax(0,1fr) auto; padding: 18px; gap: 5px 12px; }
    .proto-upload-progress-icon { width: 42px; height: 42px; }
    .proto-upload-progress-copy strong { font-size: .9rem; }
    .proto-upload-progress-copy small { font-size: .75rem; }
    .tour-workbench .proto-tips-panel { display: none; }
    .tour-workbench .proto-effect-picker,
    .proto-page.tour-workbench.preview-mode .proto-effect-picker {
        right: 12px;
        top: 12px;
        width: min(240px, calc(100vw - 24px));
    }
    .tour-workbench .proto-effect-picker.is-collapsed { width: auto; min-width: 44px; }
    .tour-workbench .proto-effect-picker.is-collapsed .proto-effect-picker-toggle strong span { display: none; }
}

.proto-empty {
    padding: 12px;
    color: var(--proto-muted);
    font-size: .82rem;
    border: 1px dashed var(--proto-border);
    border-radius: 8px;
    background: #f8fafc;
}

@media (max-width: 980px) {
    .proto-layout {
        grid-template-columns: 1fr;
    }

    .proto-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--proto-border);
    }
}

@media (max-width: 640px) {
    .proto-topbar {
        height: auto;
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .proto-top-actions,
    .proto-action-row {
        width: 100%;
    }

    .proto-button {
        flex: 1 1 auto;
    }

    .proto-grid {
        grid-template-columns: 1fr;
    }

    .proto-viewer-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .proto-bottom-tray {
        align-items: stretch;
        flex-direction: column;
    }

    .proto-gallery-nav {
        grid-template-columns: 1fr;
        gap: 5px;
        height: auto;
        padding: 10px 14px;
    }

    .proto-gallery-nav nav {
        justify-content: flex-start;
        gap: 15px;
        overflow: auto;
    }

    .proto-viewer-bar {
        top: 86px;
    }
}
