* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    height: 100vh;
}

.chapter-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background-color: #e3f2fd;
    border-bottom: 2px solid #2196f3;
    max-height: 170px;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease, border-bottom-color 0.25s ease;
}

body.controls-hidden .chapter-selector {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom-color: transparent;
}

.selector-grid {
    display: grid;
    grid-template-columns: auto auto auto auto auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 8px;
    align-items: center;
}

.selector-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selectors {
    grid-column: 1 / span 2;
    grid-row: 1;
}

.grid-spacer {
    grid-column: 3;
    grid-row: 1;
}

.quickcode {
    grid-column: 4;
    grid-row: 1;
    display: flex;
    justify-content: center;
}

.chapter-selector label {
    font-weight: 600;
    color: #1565c0;
}

.chapter-selector input[type="number"],
.chapter-selector select {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #2196f3;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    color: #1565c0;
    background-color: white;
    cursor: pointer;
}

.pbbcc-input {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #1565c0;
    padding: 6px 15px;
    background-color: white;
    border: 2px solid #2196f3;
    border-radius: 4px;
    width: 100px;
    text-align: center;
    text-transform: uppercase;
}

.pbbcc-input:focus {
    outline: none;
    border-color: #0d47a1;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.pbbcc-input.invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.chapter-selector select:hover {
    border-color: #1976d2;
}

.chapter-selector select:focus {
    outline: none;
    border-color: #0d47a1;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    padding-left: 0;
    grid-column: 1 / span 2;
    grid-row: 2;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #1565c0;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    cursor: pointer;
    accent-color: #2196f3;
}

.level-id {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    padding-left: 0;
    grid-column: 4;
    grid-row: 2;
}

.level-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 3;
    grid-row: 2;
}

.level-toggle label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1565c0;
    cursor: pointer;
}

.level-toggle input[type="checkbox"] {
    cursor: pointer;
    accent-color: #2196f3;
}

.level-id input {
    margin: 0;
}

.level-id input.invalid {
    border-color: #dc3545;
    background: #fff8f8;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
}

.levels-disabled .radio-group label {
    color: #9aa7b0 !important;
}

.levels-disabled .level-id input {
    color: #999;
    border-color: #ccc;
    background: #f3f3f3;
    box-shadow: none;
}

.levels-disabled .nav-buttons button {
    background-color: #e0e0e0;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-buttons {
    display: flex;
    gap: 5px;
    padding-left: 0;
    justify-content: center;
    grid-column: 5;
    grid-row: 2;
}

.nav-buttons button {
    width: 70px;
    height: 40px;
    padding: 0;
    font-size: 28px;
    font-weight: bold;
    background-color: white;
    border: 2px solid #2196f3;
    border-radius: 4px;
    color: #2196f3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-buttons button:hover {
    background-color: #2196f3;
    color: white;
}

.nav-buttons button:active {
    transform: scale(0.95);
}

.nav-buttons button:disabled {
    background-color: #e0e0e0;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-buttons button:disabled:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.highlight {
    background-color: #ffe08a;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(229, 143, 0, 0.6);
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 0;
    justify-content: center;
    grid-column: 5;
    grid-row: 1;
}

.lang-toggle-label {
    font-weight: 600;
    color: #1565c0;
}

.lang-toggle label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #1565c0;
    cursor: pointer;
}

.lang-toggle input[type="radio"] {
    cursor: pointer;
    accent-color: #2196f3;
}

.translation-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 5;
    grid-row: 1;
}

.cluster-visibility {
    grid-column: 5;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.cluster-visibility label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: #1565c0;
    font-size: 12px;
}

.cluster-visibility input[type="checkbox"] {
    accent-color: #2196f3;
    cursor: pointer;
}

.translation-label {
    font-weight: 600;
    color: #1565c0;
}

.translation-checkboxes {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.translation-checkboxes label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #1565c0;
    font-size: 13px;
    font-weight: 600;
}

.translation-toggle label {
    font-weight: 600;
    color: #1565c0;
}

.translation-toggle select {
    width: 320px;
    max-width: 42vw;
    min-width: 280px;
    height: 34px;
    padding: 4px 10px;
    border: 1px solid #2196f3;
    border-radius: 4px;
    color: #1565c0;
    background: white;
    font-size: 13px;
    font-weight: 600;
}

.floating-level-cluster {
    position: fixed;
    top: 78px;
    left: 12px;
    z-index: 120;
    width: 420px;
    background: rgba(227, 242, 253, 0.96);
    border: 1px solid #2196f3;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(2px);
}

.level-cluster-header {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2196f3;
    color: white;
    font-weight: 700;
    font-size: 12px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: move;
    user-select: none;
    touch-action: none;
}

.level-controls {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.level-controls .radio-group {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    padding-left: 0;
}

.level-controls .level-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.level-controls .level-row-mid {
    position: relative;
    min-height: 40px;
}

.level-controls .level-row-mid .level-id {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.level-controls .level-row-mid .nav-buttons {
    margin-left: auto;
}

.level-controls .level-row-bottom {
    justify-content: space-between;
}

.level-controls .level-row-alias {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.level-controls .level-row-bottom .level-toggle {
    margin-right: auto;
}

.level-controls .level-row-bottom .lang-toggle {
    margin-left: auto;
}

.level-controls .level-toggle,
.level-controls .level-id,
.level-controls .nav-buttons,
.level-controls .lang-toggle {
    grid-column: auto;
    grid-row: auto;
    padding-left: 0;
}

.level-controls .level-id .pbbcc-input {
    width: 90px;
    font-size: 16px;
    padding: 6px 10px;
}

.level-controls .nav-buttons button {
    width: 52px;
    height: 34px;
    font-size: 20px;
}

.level-controls .lang-toggle {
    justify-content: flex-end;
    gap: 6px;
}

.level-controls.levels-disabled .radio-group label {
    color: #9aa7b0 !important;
}

.level-controls.levels-disabled .level-id input {
    color: #999;
    border-color: #ccc;
    background: #f3f3f3;
    box-shadow: none;
}

.level-controls.levels-disabled .nav-buttons button {
    background-color: #e0e0e0;
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.floating-camera-cluster {
    position: fixed;
    top: 78px;
    right: 12px;
    z-index: 120;
    width: 292px;
    background: rgba(227, 242, 253, 0.96);
    border: 1px solid #2196f3;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(2px);
}

.camera-cluster-header {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2196f3;
    color: white;
    font-weight: 700;
    font-size: 12px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: move;
    user-select: none;
    touch-action: none;
}

body.sync-dial-hidden .sync-dial-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.camera-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    align-items: stretch;
    padding: 8px;
}

.camera-controls button {
    min-width: 100px;
    height: 30px;
    border: 1px solid #2196f3;
    border-radius: 4px;
    background: #ffffff;
    color: #1565c0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.camera-views-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.camera-row-main button {
    flex: 1;
    min-width: 0;
}

#camera-view-select {
    width: 100%;
    min-width: 0;
    height: 28px;
    border: 1px solid #2196f3;
    border-radius: 4px;
    color: #1565c0;
    background: white;
    font-size: 11px;
    font-weight: 600;
}

.camera-views-row button {
    flex: 1;
    min-width: 0;
}

.camera-view-picker-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
}

.camera-view-actions-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.camera-btn-small {
    min-width: 0 !important;
    height: 24px !important;
    padding: 2px 6px;
    font-size: 11px !important;
    line-height: 1;
}

.camera-gamepad {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: repeat(3, 28px);
    gap: 4px;
}

.camera-key-btn {
    min-width: 0 !important;
    height: 28px !important;
    padding: 0;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.camera-key-btn.key-w { grid-column: 2; grid-row: 1; }
.camera-key-btn.key-a { grid-column: 1; grid-row: 2; }
.camera-key-btn.key-s { grid-column: 2; grid-row: 2; }
.camera-key-btn.key-d { grid-column: 3; grid-row: 2; }
.camera-key-btn.key-r { grid-column: 6; grid-row: 1; }
.camera-key-btn.key-q { grid-column: 5; grid-row: 2; }
.camera-key-btn.key-f { grid-column: 6; grid-row: 2; }
.camera-key-btn.key-e { grid-column: 7; grid-row: 2; }
.camera-key-btn.key-plus { grid-column: 8; grid-row: 1; }
.camera-key-btn.key-minus { grid-column: 8; grid-row: 2; }

.camera-controls button:hover {
    background: #2196f3;
    color: white;
}

.camera-controls button.is-off {
    border-color: #9e9e9e;
    color: #666;
}

.floating-alias-cluster {
    position: fixed;
    top: 78px;
    left: 446px;
    z-index: 121;
    width: 420px;
    background: rgba(227, 242, 253, 0.96);
    border: 1px solid #2196f3;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(2px);
}

.alias-cluster-header {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2196f3;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: move;
    user-select: none;
    touch-action: none;
}

.alias-controls {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alias-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.alias-runtime-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1565c0;
    font-size: 12px;
    font-weight: 700;
}

.alias-runtime-toggle input[type="checkbox"] {
    accent-color: #2196f3;
    cursor: pointer;
}

.alias-legend-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.alias-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1565c0;
    font-size: 11px;
    font-weight: 600;
}

.alias-legend-swatch {
    width: 18px;
    height: 10px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.18);
}

.alias-legend-swatch.alias-original {
    background: #ffe08a;
}

.alias-legend-swatch.alias-single {
    background: #d6dbe0;
}

.alias-legend-swatch.alias-merge {
    background: #8fe88d;
}

.alias-row label {
    font-size: 12px;
    font-weight: 600;
    color: #1565c0;
    white-space: nowrap;
}

.alias-row select {
    min-width: 0;
    height: 30px;
    border: 1px solid #2196f3;
    border-radius: 4px;
    color: #1565c0;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    flex: 1;
}

.alias-row .alias-input {
    flex: 1;
    height: 30px;
    border: 1px solid #2196f3;
    border-radius: 4px;
    color: #1565c0;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
}

.alias-row .alias-text {
    width: 100%;
    border: 1px solid #2196f3;
    border-radius: 4px;
    color: #1565c0;
    background: #fff;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    padding: 6px;
    resize: vertical;
}

.alias-actions button {
    flex: 1;
    min-width: 0;
    height: 30px;
    border: 1px solid #2196f3;
    border-radius: 4px;
    background: #fff;
    color: #1565c0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.alias-actions button:hover {
    background: #2196f3;
    color: #fff;
}

.alias-review {
    width: 100%;
    min-height: 38px;
    border: 1px dashed #64b5f6;
    border-radius: 4px;
    background: #f7fbff;
    color: #1565c0;
    font-size: 11px;
    line-height: 1.4;
    padding: 6px;
    white-space: pre-wrap;
}

.container {
    display: block;
    position: relative;
    height: calc(100vh - 70px);
    width: 100vw;
    overflow: hidden;
}

body.no-3d .container {
    display: flex;
    position: relative;
}

.css3d-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.panel-title {
    padding: 6px 10px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #1565c0;
    background: #f5f9ff;
    text-align: center;
    white-space: normal;
    line-height: 1.35;
    cursor: pointer;
}

.title-main {
    text-align: center;
}

.title-meta-row {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.panel-title .title-part {
    font-weight: 500;
}

.panel-title .title-sep {
    font-weight: 600;
}

.panel-title .title-book {
    font-weight: 600;
}

.panel-title .chapter-line {
    margin-top: 2px;
    font-weight: 600;
}

.panel-title .meta-line {
    font-size: 12px;
    color: #3d6d9b;
}

.source-select {
    height: 26px;
    min-width: 160px;
    border: 1px solid #2196f3;
    border-radius: 4px;
    color: #1565c0;
    background: white;
    font-size: 12px;
    font-weight: 600;
}

.source-select.source-inline {
    min-width: 180px;
    max-width: 70%;
    height: 24px;
    font-size: 11px;
}

.panel.panel-disabled {
    filter: grayscale(0.9);
    opacity: 0.45;
}

.panel.panel-disabled .controls,
.panel.panel-disabled .panel-title {
    pointer-events: none;
}

.panel {
    width: 600px;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    background: white;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.panel.panel-focused {
    border-color: #1565c0;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.22);
}

body.no-3d .panel {
    position: relative;
    top: auto;
    left: auto;
    width: calc((100% - 40px) / 2);
    min-width: 0;
    border-right: 1px solid #ccc;
}

body.no-3d #panel2 {
    border-right: none;
}

.panel-extra {
    opacity: 0;
    pointer-events: none;
}

body.no-3d .panel-extra {
    display: none;
}

.sync-dial-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 100%;
    background-color: #f5f5f5;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ns-resize;
    z-index: 25;
}

body.no-3d .sync-dial-container {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    z-index: 10;
    flex: 0 0 40px;
}

.dial-knob {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: 1px solid #999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: transform 0.1s;
}

.dial-knob::after {
    content: '↕';
    color: #555;
    font-size: 18px;
    font-weight: bold;
}

.dial-knob:active {
    background: #ddd;
    transform: scale(0.95);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.control-group label {
    font-weight: 600;
    min-width: auto;
    padding-right: 5px;
}

.control-group input[type="file"] {
    flex: 1;
}

.control-group input[type="text"] {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
}

.control-group button {
    padding: 6px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.control-group button:hover {
    background-color: #0056b3;
}

.content-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
    height: 100%;
}

.panel-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

body.no-3d .css3d-stage {
    display: none;
}

.left-panel {
    flex-direction: row;
}

.right-panel {
    flex-direction: row;
}

.line-num-row {
    padding: 0 5px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #666;
    user-select: none;
    -webkit-user-select: none; /* Safari */
}

.left-panel .line-num-row {
    text-align: left;
    padding-left: 10px;
}

.right-panel .line-num-row {
    text-align: right;
    padding-right: 10px;
}

.content {
    flex: 1;
    display: flex;
    overflow-y: scroll;
    overflow-x: auto;
    background-color: white;
    scrollbar-width: auto;
    height: 100%;
}

/* Left panel content direction */
#panel1-content {
    direction: rtl; /* Moves scrollbar to left */
}

#panel1-content > * {
    direction: ltr; /* Reset content direction */
}

.line-numbers-container {
    width: 50px;
    height: 100%;
    overflow: hidden; /* Hide scrollbars */
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    flex-shrink: 0;
    display: none;
    flex-direction: column;
}

.left-panel .line-numbers-container {
    border-right: none;
    border-left: 1px solid #e0e0e0;
}

.dial-knob {
    width: 32px;
    height: 20%;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: 1px solid #999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none; /* Safari */
    transition: transform 0.1s;
    touch-action: none; /* Crucial for Safari touch events */
    cursor: ns-resize;
}

.content::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

.content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 8px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.content::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

.line-row {
    display: flex;
    align-items: flex-start;
    width: 100%;
    background-color: white;
}

.line-num {
    width: 50px;
    min-width: 50px;
    text-align: right;
    padding-right: 10px;
    padding-left: 5px;
    background-color: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    user-select: none;
    flex-shrink: 0;
}

.line-text {
    flex: 1;
    padding: 0 15px;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    overflow-wrap: break-word;
}
.path-group {
    display: none;
}

body.show-paths .path-group {
    display: flex;
}

body.show-paths .line-numbers-container {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1100px) {
    .selector-grid {
        grid-template-columns: auto auto auto auto auto;
        grid-template-rows: auto auto auto;
    }

    .translation-toggle {
        grid-column: 1 / span 5;
        grid-row: 1;
        justify-content: center;
    }

    .cluster-visibility {
        grid-column: 1 / span 5;
        grid-row: 2;
        justify-content: center;
    }

    .translation-toggle select {
        min-width: 260px;
        width: min(420px, calc(100vw - 40px));
    }

    .floating-level-cluster {
        top: auto;
        left: 8px;
        bottom: 8px;
        width: min(420px, calc(100vw - 16px));
    }

    .level-controls .level-row-mid {
        min-height: 72px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .level-controls .level-row-mid .level-id {
        position: static;
        transform: none;
    }

    .level-controls .level-row-mid .nav-buttons {
        margin-left: 0;
    }

    .level-controls .level-row-alias {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .floating-camera-cluster {
        top: auto;
        right: 8px;
        bottom: 8px;
        width: min(292px, calc(100vw - 16px));
    }

    .floating-alias-cluster {
        top: auto;
        left: 8px;
        bottom: 222px;
        width: min(420px, calc(100vw - 16px));
    }

    .camera-views-row {
        width: 100%;
        justify-content: flex-start;
    }

    .chapter-selector {
        max-height: 220px;
    }

    .container {
        height: calc(100vh - 120px);
    }
}
