* { box-sizing: border-box; }
:root { --app-header-height: 56px; color-scheme: dark; font-family: 'Segoe UI', Arial, sans-serif; color: #eceee9; background: #151917; font-synthesis: none; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button { cursor: pointer; color: #e5e9e1; border: 1px solid #414a41; background: #252c27; border-radius: 6px; min-height: 38px; padding: 8px 13px; font-size: 13px; transition: background .15s, border-color .15s; }
button:hover { background: #333e34; border-color: #6b7b63; }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #c5db9b; outline-offset: 3px; }
button.quiet { background: transparent; border-color: transparent; }
button.quiet:hover { background: #29322b; }
input[type=text], input:not([type]) { color: inherit; min-width: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; }
input[type=text]:hover, input:not([type]):hover { border-color: #414a41; }
input[type=text]:focus, input:not([type]):focus { background: #1b211c; }
.app-header { height: var(--app-header-height); padding: 0 28px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #30372f; }
.brand { white-space: nowrap; font-size: 17px; line-height: 1.2; letter-spacing: .12em; color: #e1cea9; font-weight: 600; }
.brand span { font-weight: 300; color: #edf0e8; }
.app-header nav { display: flex; align-items: center; flex-shrink: 0; gap: 8px; margin-left: auto; }
.app-header nav button { height: 34px; min-height: 34px; padding: 6px 10px; line-height: 20px; }
.app-header #new-tour { min-width: 60px; }
.has-gallery-switcher { --app-header-height: 76px; }
.has-gallery-switcher .app-header { display: grid; grid-template-columns: minmax(210px, 260px) minmax(0, 1fr) auto; gap: 24px; }
#change-gallery { display: flex; align-items: center; gap: 13px; min-height: 54px; padding: 9px 16px; text-align: left; color: #1a2614; background: #c5db9b; border: 1px solid #d7e9b7; border-radius: 9px; box-shadow: 0 3px 12px #0003; }
#change-gallery:hover { background: #dfefc2; border-color: #ecf7da; }
#change-gallery:active { background: #b6ce89; box-shadow: none; }
#change-gallery:focus-visible { outline: 3px solid #edf7dd; outline-offset: 4px; }
.change-gallery-copy { display: grid; gap: 3px; min-width: 0; }
.change-gallery-label { font-size: 15px; line-height: 1.2; font-weight: 700; }
#current-gallery { color: #37472a; font-size: 12px; line-height: 1.2; }
.change-gallery-icon, .change-gallery-chevron { flex-shrink: 0; }
.change-gallery-chevron { margin-left: auto; }
#gallery-dialog { width: min(820px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow-y: auto; overscroll-behavior: contain; }
.gallery-dialog-inner { padding: 24px; }
.gallery-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
#close-gallery { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; min-height: 48px; padding: 0; font-size: 32px; line-height: 1; }
.gallery-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.gallery-choice { display: flex; align-items: center; gap: 14px; padding: 14px; text-align: left; min-width: 0; }
.gallery-choice[aria-pressed=true] { border-color: #c5db9b; background: #303d2a; }
.gallery-choice-details { display: grid; gap: 6px; }
.gallery-choice-details strong { font-size: 15px; font-weight: 500; }
.gallery-choice-details > span { font-size: 12px; line-height: 1.5; color: #b7c1b1; }
.gallery-swatch { flex: 0 0 66px; height: 68px; border-radius: 5px; border: 1px solid #ffffff20; }
.gallery-choice-underwater .gallery-swatch { background: radial-gradient(ellipse at 50% 110%, #42494c 0 30%, #7daba7 31% 33%, transparent 34%), linear-gradient(160deg, #56c1d0, #095271 55%, #092e44); }
.gallery-choice-classic .gallery-swatch { background: linear-gradient(90deg, transparent 20%, #322b25 21% 27%, #8e806c 28% 71%, #322b25 72% 78%, transparent 79%), linear-gradient(#c1ad91 75%, #665749 76%); }
.gallery-choice-industrial .gallery-swatch { background: repeating-linear-gradient(0deg, transparent 0 13px, #3a342e 14px 16px), repeating-linear-gradient(90deg, #8a5844 0 24px, #554033 25px 27px); }
.gallery-choice-desert .gallery-swatch { background: radial-gradient(circle at 72% 28%, #efbb89 0 8%, transparent 9%), linear-gradient(155deg, transparent 0 53%, #b88764 54% 71%, #765b50 72%), linear-gradient(#4d536d, #b37d79 58%, #ac805c 59%); }
.gallery-choice-nyc .gallery-swatch { background: url('./scenes/nyc/assets/nyc/manhattan-panorama.png') 61% 52% / auto 100%; }
.gallery-choice-jungle .gallery-swatch { background: url('./scenes/jungle/assets/jungle/rainforest-vista.png') center / cover; }
.gallery-choice-cliffside .gallery-swatch { background: radial-gradient(circle at 75% 20%, #e0e6f2 0 8%, transparent 9%), linear-gradient(108deg, #656a70 0 36%, transparent 37%), linear-gradient(#122033 0 52%, #355b6f 53% 60%, #1d394a 61%); }
.gallery-choice-office .gallery-swatch { background: radial-gradient(ellipse at 50% 79%, #da9746 0 5%, #754329 8%, transparent 16%), linear-gradient(90deg, #30373a 0 23%, transparent 24% 76%, #30373a 77%), repeating-linear-gradient(0deg, #444b4e 0 9px, #282e31 10px 12px); }
.gallery-choice-white .gallery-swatch { background: linear-gradient(90deg, transparent 23%, #2e414a 24% 46%, transparent 47% 60%, #5c6d72 61% 78%, transparent 79%) center 38% / 100% 31% no-repeat, linear-gradient(164deg, #e4e5e0 0 72%, #262c30 73%); }
.gallery-choice-summit .gallery-swatch { background: url('./scenes/summit/assets/terrain/himalayan-panorama.png') center / cover; }
.gallery-choice-river .gallery-swatch { background: url('./scenes/river/assets/river/mountain-river.png') center / cover; }
.gallery-choice-backdrop .gallery-swatch { background: url('./scenes/backdrop/assets/backdrops/ra-1805-default.jpg') center / cover; }
.backdrop-controls { flex-shrink: 0; width: 100%; max-width: 1500px; margin: 0 auto 12px; border: 1px solid #414a41; background: #202823; border-radius: 8px; padding: 10px 12px; }
.backdrop-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.backdrop-upload.is-over { outline: 2px solid #c5db9b; outline-offset: 4px; }
#backdrop-name { font-size: 11px; color: #b8c4b0; overflow-wrap: anywhere; flex: 1; min-width: 140px; }
.backdrop-adjustments { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.backdrop-adjustments label { display: flex; flex: 1 1 190px; align-items: center; gap: 8px; font-size: 11px; }
.backdrop-adjustments input { flex: 1; min-width: 60px; width: 100%; accent-color: #c5db9b; }
.backdrop-adjustments output { width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.backdrop-adjustments button { font-size: 11px; min-height: 30px; padding: 4px 8px; }
.backdrop-needed { margin: auto; padding: 40px 20px; text-align: center; color: #bac6b2; }
.workspace { display: grid; grid-template-columns: 350px minmax(0, 1fr); height: calc(100dvh - var(--app-header-height)); min-height: 430px; }
.workspace.is-empty { grid-template-columns: 1fr; }
.editor { overflow-y: auto; border-right: 1px solid #30372f; background: #1b201c; scrollbar-width: thin; }
.editor-toolbar { position: sticky; top: 0; z-index: 3; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; background: #1b201cf5; backdrop-filter: blur(12px); }
.editor-toolbar > span { font-size: 12px; color: #adb5a8; }
.editor-toolbar button { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.rooms { padding: 0 12px; }
.room { padding: 2px 0 10px; border-bottom: 1px solid #353d33; margin-bottom: 8px; border-radius: 6px; }
.room-head { display: flex; align-items: center; gap: 5px; padding: 2px 2px 6px; }
.room-name { padding: 5px 3px; width: 100%; font-weight: 500; font-size: 13px; }
.room-count { color: #879380; font-size: 10px; white-space: nowrap; }
.icon-button { padding: 3px; min-width: 28px; min-height: 28px; font-size: 14px; }
.artwork { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 8px; padding: 7px 8px; margin: 0 0 5px; background: #242b25; border: 1px solid #394137; border-radius: 5px; }
.artwork[draggable=true] { cursor: grab; }
.artwork.is-dragging { opacity: .45; }
.artwork.is-over { border-top: 3px solid #c5db9b; }
.room.is-over { background: #35412e; }
.thumb { display: block; width: auto; height: auto; max-width: 68px; max-height: 60px; object-fit: contain; border-radius: 2px; justify-self: center; align-self: center; }
.artwork-content { min-width: 0; }
.image-name { font-size: 12px; line-height: 18px; width: 100%; padding: 2px 3px; text-overflow: ellipsis; }
.finish-select { display: block; width: 100%; min-width: 0; margin-top: 3px; padding: 4px; font-size: 10px; }
.frame-field { display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 7px; margin-top: 6px; font-size: 10px; color: #adbba6; }
.frame-field select { width: 100%; min-width: 0; padding: 5px; font-size: 11px; }
.apply-all-button { display: block; width: 100%; min-height: 32px; margin-top: 6px; padding: 5px 8px; font-size: 11px; color: #c5db9b; }
.artwork-actions { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 25px); align-items: center; gap: 2px; margin-top: 3px; }
.room-select { grid-column: 1; width: 100%; min-width: 0; padding: 4px; font-size: 10px; }
.section-transfer { grid-column: 1; min-width: 0; min-height: 30px; padding: 4px 6px; font-size: 11px; color: #dceac9; background: #35412e; border-color: #657654; white-space: nowrap; }
.artwork-actions .icon-button { min-width: 25px; font-size: 14px; color: #b8c4b0; }
.artwork-actions [data-action="image-up"] { grid-column: 2; }
.artwork-actions [data-action="image-down"] { grid-column: 3; }
.artwork-actions [data-action="delete-image"] { grid-column: 4; }
.empty-room { padding: 20px 8px; text-align: center; color: #8c9b84; border: 1px dashed #485440; border-radius: 5px; font-size: 12px; }
.add-room { display: block; width: calc(100% - 28px); margin: 4px 14px 22px; text-align: left; }
.preview { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 20px 30px; justify-content: center; container-type: inline-size; }
.empty-state { flex: 1; display: grid; place-items: center; }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(680px, 100%); min-height: 400px; padding: 55px 20px; border: 1px dashed #5c6654; background: radial-gradient(ellipse at center, #242c25, #191e1a 75%); border-radius: 12px; }
.drop-zone:hover { border-color: #b7cc96; background: #212921; }
.gallery-mark { width: 155px; margin-bottom: 35px; stroke: #c5cbb3; stroke-width: 1.2; }
.gallery-mark rect { fill: #2c342b; }
.drop-zone strong { font-size: 23px; font-weight: 400; letter-spacing: -.02em; }
.drop-zone > span { font-size: 13px; color: #c1cbb5; margin-top: 9px; }
.drop-zone small { font-size: 11px; color: #8e9b85; margin-top: 32px; }
.viewer { width: 100%; min-height: 0; max-width: 1500px; margin: auto; display: flex; flex-direction: column; border: 1px solid #3d453a; border-radius: 8px; overflow: hidden; background: #101411; }
.stage { position: relative; aspect-ratio: 16 / 9; min-height: 0; background: #191d1b; }
#canvas-host { position: absolute; inset: 0; }
#canvas-host canvas { display: block; width: 100%; height: 100%; }
.tour-credits { position: absolute; bottom: 2%; right: 2.5%; font-size: 9px; line-height: 1.25; text-align: right; color: #c1c8bb; text-shadow: 0 1px 5px #000; pointer-events: none; }
.music-credit { white-space: nowrap; }
.loading, .preview-error { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 30px; background: #151917df; font-size: 14px; color: #dce7cd; }
.controls { display: flex; align-items: center; gap: 14px; padding: 12px 15px; background: #1b211c; }
#play { min-width: 87px; }
#seek { min-width: 0; flex: 1; accent-color: #c5db9b; height: 30px; }
#time-label { font-size: 11px; color: #aebaa5; font-variant-numeric: tabular-nums; white-space: nowrap; }
#fullscreen { font-size: 12px; padding: 8px 10px; flex-shrink: 0; }
.fullscreen-button { white-space: nowrap; }
.export-bar { display: grid; grid-template-columns: minmax(170px, 240px) minmax(160px, 1fr) auto; align-items: center; gap: 16px; flex-shrink: 0; width: 100%; max-width: 1500px; margin: 12px auto 0; font-size: 12px; }
.music-picker { display: grid; gap: 6px; min-width: 0; }
.ambience-control { display: grid; justify-items: center; gap: 5px; flex-shrink: 0; color: #c5db9b; font-size: 11px; white-space: nowrap; }
.ambience-fader { display: flex; justify-content: center; gap: 5px; }
#ambience-volume { writing-mode: vertical-lr; direction: rtl; width: 28px; height: 64px; margin: 0; padding: 0; accent-color: #c5db9b; cursor: pointer; }
.ambience-scale { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0; color: #aebaa5; font-size: 10px; }
#ambience-value { font-variant-numeric: tabular-nums; }
.field-label { font-size: 11px; color: #aebaa5; }
.music-picker select { width: 100%; max-width: 260px; text-overflow: ellipsis; }
.music-upload-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.music-upload-actions button { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.music-upload-hint { color: #9fae99; font-size: 11px; line-height: 1.5; max-width: 340px; }
#music-rights-hint { text-wrap: balance; }
.music-credit { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tour-credits { max-width: 80%; }
select { border: 1px solid #414c3b; border-radius: 5px; padding: 9px; background: #232b24; color: #d8e1cf; font-size: 12px; }
.primary { background: #c5db9b; border-color: #c5db9b; color: #1a2614; padding: 11px 21px; font-weight: 600; }
.primary:hover { background: #d9edb3; }
.primary span { margin-left: 17px; }
.drop-overlay { position: fixed; inset: 12px; border: 2px dashed #c5db9b; background: #202d22ed; z-index: 30; border-radius: 12px; display: grid; place-content: center; font-size: 26px; pointer-events: none; }
.notice { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 50; display: flex; align-items: center; gap: 15px; max-width: min(650px, calc(100% - 28px)); width: max-content; padding: 12px 14px 12px 20px; background: #e5eadc; color: #192217; border-radius: 8px; box-shadow: 0 8px 40px #0008; font-size: 13px; }
.notice button { color: #263a1a; border-color: #b3bfa7; background: transparent; }
#notice-text { white-space: pre-line; }
dialog { width: min(390px, calc(100% - 28px)); padding: 0; border: 1px solid #5b684e; border-radius: 12px; background: #1d261e; color: #ecf1e6; }
dialog::backdrop { background: #090f0bd9; backdrop-filter: blur(4px); }
.export-dialog-inner { display: grid; gap: 18px; padding: 28px; }
dialog h2 { font-size: 21px; font-weight: 400; margin: 0; }
dialog p { font-size: 13px; color: #becbb1; margin: 0; }
progress { width: 100%; height: 7px; accent-color: #c5db9b; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
.viewer:fullscreen { max-width: none; height: 100%; border: 0; border-radius: 0; justify-content: center; }
.viewer:fullscreen .stage { flex: 1; aspect-ratio: auto; }
@media (max-width: 1100px) { .workspace { grid-template-columns: 305px minmax(0,1fr); } .preview { padding: 20px; } .app-header { padding-inline: 20px; } .tour-credits { font-size: 7px; } }
@media (max-width: 760px) {
  .has-gallery-switcher { --app-header-height: 114px; }
  .has-gallery-switcher .app-header { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-content: center; }
  .has-gallery-switcher #change-gallery { grid-column: 1 / -1; }
  .has-gallery-switcher .app-header nav { margin-left: 0; }
  .gallery-dialog-inner { padding: 16px; }
  .gallery-swatch { flex-basis: 48px; height: 58px; }
  .gallery-choice { gap: 12px; padding: 12px; }
  .app-header { padding: 4px 15px; }
  .brand { font-size: 14px; }
  .app-header nav button { font-size: 12px; }
  .workspace { height: auto; min-height: calc(100dvh - var(--app-header-height)); display: flex; flex-direction: column; }
  .preview { order: -1; padding: 16px; }.editor { border-right: 0; border-top: 1px solid #343e30; overflow: visible; }
  .editor-toolbar { top: 0; }.empty-state { min-height: calc(100dvh - var(--app-header-height) - 55px); }
  .drop-zone { min-height: 350px; }.drop-zone strong { font-size: 21px; }.drop-zone small { font-size: 10px; }
  .controls { gap: 9px; padding: 9px; }#time-label { font-size: 10px; }#play { min-width: 68px; padding: 7px; }
  .tour-credits { font-size: 6px; }
  .export-bar { gap: 10px; }.primary { padding-inline: 14px; }
  .music-picker select { max-width: none; }
  .rooms { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 600px) { .gallery-choices { grid-template-columns: 1fr; } }

.speed-control { display:grid; grid-template-columns:145px minmax(120px,1fr) auto; gap:10px 18px; padding:13px 15px; border-top:1px solid #41525a; background:#1c2b34; flex-shrink:0; }
.speed-heading {display:flex; align-items:center; gap:12px; font-size:12px; font-weight:600;}
#speed-value {color:#b6e4de; font-variant-numeric:tabular-nums; min-width:44px;}
.speed-slider {min-width:0;}
#video-speed {display:block; width:100%; height:23px; margin:0; accent-color:#a6d8d4; cursor:pointer;}
#video-speed:disabled {cursor:default;}
.speed-scale {display:flex; justify-content:space-between; font-size:10px; color:#b3c3c7;}
#reset-speed {min-height:32px; font-size:11px; padding:5px 10px; align-self:center;}
.speed-note {grid-column:1/-1; display:flex; flex-wrap:wrap; gap:5px 15px; justify-content:space-between; color:#adbdc4; font-size:11px; line-height:1.5;}
#speed-duration {color:#d2e3e5; font-variant-numeric:tabular-nums; white-space:nowrap;}
@media(max-width:760px) {
  .speed-control {grid-template-columns:1fr auto; gap:9px 14px; padding:12px;}
  .speed-heading {grid-column:1;grid-row:1;}
  #reset-speed {grid-column:2;grid-row:1;}
  .speed-slider {grid-column:1/-1;grid-row:2;}
  .speed-note {grid-row:3;font-size:10px;}
}

@media (max-width: 560px) {
  :root { --app-header-height: 88px; }
  .app-header { flex-wrap: wrap; gap: 5px; padding-block: 9px; }
  .app-header .brand { flex-basis: 100%; }
  .app-header nav { margin-left: auto; }
}
@media (max-width: 560px) {
  .has-gallery-switcher { --app-header-height: 150px; }
  .has-gallery-switcher .app-header { grid-template-columns: 1fr; gap: 7px; }
  .has-gallery-switcher .app-header nav { justify-self: end; }
  .has-gallery-switcher .brand { text-align: center; }
}

/* Keep the music notes beside the controls to leave more height for the tour. */
.music-notes { display: grid; gap: 6px; min-width: 0; max-width: 320px; }
.music-notes .music-upload-hint { font-size: 11px; line-height: 1.5; max-width: none; text-wrap: pretty; }
.export-actions { display: grid; justify-items: stretch; gap: 6px; }
.export-actions select { width: 100%; }
.export-actions button { white-space: nowrap; }
.export-bar:where(:has(.ambience-control:not([hidden])), :has(.effects-field)) { grid-template-columns: minmax(170px, 240px) minmax(160px, 1fr) auto auto; }
.export-bar:where(:not(:has(.music-notes))) { grid-template-columns: minmax(170px, 1fr) auto; }
.export-bar:where(:not(:has(.music-notes))) .export-actions { display: flex; align-items: center; }
.export-bar .effects-field { min-width: 120px; width: 138px; margin: 0; align-self: center; }
.export-bar .effects-field input { width: 100%; }
@container (max-width: 650px) {
  .export-bar { grid-template-columns: minmax(170px, 240px) minmax(0, 1fr); gap: 10px 14px; }
  .export-bar:where(:has(.ambience-control:not([hidden])), :has(.effects-field)) { grid-template-columns: minmax(170px, 1fr) minmax(0, 1fr) auto; }
  .export-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; }
  .export-bar:where(:not(:has(.music-notes))) .export-actions { grid-column: auto; }
}
@container (max-width: 450px) {
  .export-bar, .export-bar:where(:has(.ambience-control:not([hidden])), :has(.effects-field)) { grid-template-columns: minmax(0, 1fr) auto; }
  .ambience-control, .export-bar .effects-field { grid-column: 2; grid-row: 1; }
  .music-notes { grid-column: 1 / -1; max-width: none; }
}

/* Fixed River sections can fold away without changing other gallery rooms. */
.river-section > summary { cursor: pointer; padding: 8px 4px; list-style: none; }
.river-section > summary::-webkit-details-marker { display: none; }
.river-section > summary::before { content: '▸'; width: 14px; color: #bdcba7; }
.river-section[open] > summary::before { content: '▾'; }
.river-section-name { flex: 1; font-size: 14px; font-weight: 600; }
.river-section .underwater-badge { display: inline-block; margin: 0 3px 3px; color: #b8d9e7; font-size: 10px; letter-spacing: .04em; }

/* Backdrop settings live with the images, keeping the complete tour in view. */
.is-backdrop .backdrop-controls { width: calc(100% - 24px); margin: 0 12px 14px; padding: 12px; }
.is-backdrop .backdrop-upload { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.is-backdrop #upload-backdrop { grid-column: 1 / -1; min-height: 36px; padding: 8px 12px; }
.is-backdrop #backdrop-name { grid-column: 1 / -1; min-width: 0; }
.backdrop-file-hint { grid-column: 1 / -1; font-size: 10px; color: #9fae99; }
.is-backdrop #remove-backdrop { grid-column: 1 / -1; justify-self: start; padding: 2px 0; min-height: 26px; font-size: 11px; }
.backdrop-characters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 15px; border: 0; padding: 0; margin: 0; min-width: 0; font-size: 12px; }
.backdrop-characters legend { padding: 0; margin-bottom: 4px; }
.backdrop-characters.backdrop-floor { display: grid; gap: 0; margin-top: 4px; }
.backdrop-characters.backdrop-floor label { min-height: 26px; }
.backdrop-characters label { display: flex; align-items: center; gap: 6px; min-height: 30px; cursor: pointer; }
.backdrop-characters input { appearance: none; flex: none; width: 17px; height: 17px; margin: 0; border: 1px solid #94a38c; border-radius: 3px; background: #1b211c; display: grid; place-content: center; cursor: pointer; }
.backdrop-characters input:checked { background: #c5db9b; border-color: #c5db9b; }
.backdrop-characters input:checked::after { content: ''; width: 8px; height: 4px; border-left: 2px solid #1a2614; border-bottom: 2px solid #1a2614; transform: translateY(-1px) rotate(-45deg); }
.backdrop-characters input:disabled { opacity: .4; cursor: default; }
.is-backdrop .backdrop-adjustments { display: grid; gap: 6px; margin-top: 10px; }
.is-backdrop .backdrop-adjustments label { display: grid; grid-template-columns: 42px minmax(0, 1fr) 36px; }
.is-backdrop #reset-backdrop-view { justify-self: end; }
.is-backdrop .preview { padding: 14px 20px; }
.is-backdrop .viewer { width: var(--backdrop-preview-width, 100%); max-width: 1200px; flex-shrink: 0; }
.is-backdrop .viewer:not(:fullscreen) .stage { flex-shrink: 0; }
.is-backdrop .controls { padding: 8px 10px; gap: 10px; }
.is-backdrop .export-bar { max-width: 1200px; grid-template-columns: minmax(150px, 205px) minmax(0, 1fr) auto; gap: 10px 16px; }
.is-backdrop .music-notes { max-width: 380px; gap: 4px; }
.is-backdrop .export-actions { grid-column: auto; display: grid; gap: 6px; }
.is-backdrop .music-picker select { padding: 6px 8px; }
.is-backdrop .export-actions button { padding: 9px 13px; }
.is-backdrop .viewer:fullscreen { width: 100%; max-width: none; }
@media (max-width: 760px) {
  .is-backdrop .preview { padding: 12px; }
  .is-backdrop .export-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .is-backdrop .music-notes { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .is-backdrop .export-actions { grid-column: 2; grid-row: 1; }
  .is-backdrop .backdrop-controls { max-width: none; }
  .is-backdrop #fullscreen { font-size: 11px; padding: 6px; }
}

/* Make artwork upload the primary action above the ready-made backdrop. */
.is-backdrop .editor-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.is-backdrop #add-images { width: 100%; min-height: 44px; padding: 10px 14px; font-size: 15px; font-weight: 700; background: #9bea62; border-color: #9bea62; color: #14220c; }
.is-backdrop #add-images:hover:not(:disabled) { background: #b0f480; border-color: #b0f480; }
