body {
    --mono: "Consolas", "Courier New", monospace;
    padding: var(--space-5);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 22%),
        linear-gradient(180deg, #0f1316 0%, #0b0f12 100%);
}

.page {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.eyebrow {
    display: inline-block;
    padding: 6px 10px;
    margin-bottom: var(--space-3);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.68);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

h1 {
    max-width: 10ch;
    margin-bottom: var(--space-2);
    font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 4vw, 4.6rem);
    font-weight: 480;
    letter-spacing: -0.05em;
    line-height: 0.94;
}

.subtitle {
    max-width: 62ch;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.72;
}

.header-note {
    max-width: 32ch;
    padding: var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.66);
    font-size: var(--text-sm);
    line-height: 1.72;
}

.layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: var(--space-5);
    align-items: start;
}

.panel {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(18, 25, 29, 0.84);
}

.controls {
    position: sticky;
    top: var(--space-4);
    padding: var(--space-5);
}

.section + .section {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section-label {
    margin-bottom: var(--space-3);
    color: rgba(255, 255, 255, 0.54);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.segmented {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.segmented button {
    appearance: none;
    padding: var(--space-2) var(--space-3);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        border-color var(--duration-fast) var(--ease-out),
        background var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out);
}

.segmented button:hover {
    color: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.26);
}

.segmented button.active {
    border-color: rgba(245, 194, 110, 0.6);
    background: rgba(245, 194, 110, 0.12);
    color: #fff7ef;
}

.scenario-note,
.mode-note,
.surface-note {
    margin-top: var(--space-3);
    color: rgba(255, 255, 255, 0.64);
    font-size: var(--text-xs);
    line-height: var(--leading-relaxed);
}

.toggle-list,
.range-group {
    display: grid;
    gap: var(--space-3);
}

.range-group {
    margin-top: var(--space-4);
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    align-items: center;
}

.toggle-row label,
.range-label {
    color: rgba(255, 255, 255, 0.84);
    font-size: var(--text-sm);
}

.toggle-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.range-field {
    display: grid;
    gap: var(--space-1);
}

.range-label {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.room-diagram-card {
    display: grid;
    gap: var(--space-3);
}

.room-diagram {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.18 / 1;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        rgba(0, 0, 0, 0.18);
}

.room-diagram::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.room-zone,
.room-sign-marker {
    position: absolute;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.room-zone {
    color: rgba(255, 255, 255, 0.42);
}

.room-zone.podium {
    left: 22px;
    top: 28px;
}

.room-zone.wallsign {
    right: 26px;
    top: 42px;
}

.room-zone.projection {
    right: 34px;
    top: 106px;
}

.room-zone.tables {
    left: 42px;
    bottom: 84px;
}

.room-zone.quiet {
    left: 22px;
    bottom: 26px;
}

.room-zone.door {
    right: 20px;
    bottom: 24px;
}

.room-sign-marker {
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.72);
}

.room-sign-marker.wall {
    right: 26px;
    top: 64px;
}

.room-sign-marker.door {
    right: 18px;
    bottom: 44px;
}

.room-sign-marker.projection {
    right: 22px;
    top: 130px;
}

.room-sign-marker.active {
    border-color: rgba(59, 130, 246, 0.62);
    background: rgba(59, 130, 246, 0.12);
    color: rgba(255, 255, 255, 0.92);
}

.room-people {
    position: absolute;
    inset: 0;
}

.room-person {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.room-person.instructor {
    background: #77a2ff;
    box-shadow: 0 0 0 3px rgba(119, 162, 255, 0.22);
}

.room-person.arrival {
    background: #ffd18e;
    box-shadow: 0 0 0 3px rgba(255, 209, 142, 0.18);
}

.room-person.queue {
    background: #6ed1a5;
    box-shadow: 0 0 0 3px rgba(110, 209, 165, 0.18);
}

.room-caption {
    color: rgba(255, 255, 255, 0.62);
    font-size: var(--text-xs);
    line-height: 1.68;
}

.preview-panel {
    display: grid;
    gap: var(--space-4);
    padding: var(--space-5);
}

.preview-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-4);
    align-items: end;
}

.preview-top h2 {
    margin-bottom: var(--space-2);
    color: rgba(255, 255, 255, 0.96);
    font-family: "Iowan Old Style", Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 2.6vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.03em;
}

.preview-note {
    max-width: 54ch;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.7;
}

.preview-meta,
.view-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.preview-meta {
    justify-content: end;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.03);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.design-card {
    padding: var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.design-card-label {
    margin-bottom: var(--space-2);
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.design-card p {
    color: rgba(255, 255, 255, 0.82);
    font-size: var(--text-sm);
    line-height: 1.72;
}

.design-card-note {
    margin-top: var(--space-3);
    color: rgba(255, 255, 255, 0.64);
}

.status-line {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--text-xs);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
}

.open-renderer {
    display: inline-flex;
    margin-top: var(--space-4);
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
}

.open-renderer:hover {
    color: #ffffff;
}

.renderer-shell {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
}

.renderer-frame {
    display: block;
    width: 100%;
    min-height: 980px;
    border: 0;
    background: #0f1316;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-top: var(--space-2);
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

.back-link:hover {
    color: rgba(255, 255, 255, 0.96);
}

@media (max-width: 1100px) {
    header,
    .layout,
    .preview-top,
    .preview-grid {
        grid-template-columns: 1fr;
    }

    header {
        display: grid;
    }

    .preview-meta {
        justify-content: start;
    }

    .controls {
        position: static;
    }
}

@media (max-width: 720px) {
    body {
        padding: var(--space-4);
    }

    .controls,
    .preview-panel {
        padding: var(--space-4);
    }

    .renderer-frame {
        min-height: 860px;
    }
}
