@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750&display=swap');

:root { font-family: 'DM Sans', sans-serif; color: #fff; font-synthesis: none; --ink: #203647; --muted: #637582; --line: rgba(33,58,77,.13); --accent: #36536b; }
* { box-sizing: border-box; }
body { margin: 0; background: #769ebc; overflow: hidden; }
button, input, select { font: inherit; }
button, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button, select, input, summary, canvas { outline-offset: 5px; }
:focus-visible { outline: 2px solid #8cb9e5; }
button svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button { border: 0; }
[hidden] { display: none !important; }
#app { width: 100%; height: 100svh; height: 100dvh; position: relative; overflow: hidden; }
#cloud-canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#cloud-canvas.dragging { cursor: grabbing; }
.topbar { position: absolute; top: 30px; left: 38px; right: 34px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.identity { display: flex; align-items: center; gap: 23px; text-shadow: 0 1px 16px #213b5020; }
.wordmark { font: 650 34px/1 'Manrope', sans-serif; letter-spacing: -1.6px; }
.wordmark-dot { opacity: .65; }
.identity-rule { width: 1px; height: 28px; background: #ffffff40; }
.edition { font-size: 10px; line-height: 1.65; letter-spacing: 1.5px; font-weight: 600; }
.edition span { opacity: .61; font-size: 9px; letter-spacing: 1.2px; }
.toolbar { display: flex; gap: 10px; pointer-events: auto; }
.icon-button, .save-button { height: 41px; display: inline-flex; align-items: center; justify-content: center; color: #fff; border: 1px solid #ffffff39; background: #24435a22; border-radius: 9px; backdrop-filter: blur(15px); transition: background .18s; }
.icon-button:hover, .save-button:hover { background: #ffffff26; }
.icon-button { width: 41px; }
.save-button { padding: 0 16px; gap: 9px; font-size: 13px; font-weight: 500; }
.panel { position: absolute; right: 34px; top: 104px; width: 294px; max-height: calc(100% - 204px); overflow-y: auto; padding: 24px 23px 0; border: 1px solid #ffffff72; border-radius: 15px; color: var(--ink); background: linear-gradient(150deg,#f8fbffe8,#eef5fad6); box-shadow: 0 12px 48px #18395113, inset 0 1px 0 #ffffffa0; backdrop-filter: blur(24px); scrollbar-width: thin; scrollbar-color: #8295a555 transparent; transition: opacity .22s, transform .22s; }
.panel.is-hidden { opacity: 0; pointer-events: none; transform: translateX(18px); visibility: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.7px; margin: 0 0 7px; color: #647887; }
h1 { font: 600 22px/1.25 'Manrope', sans-serif; letter-spacing: -.7px; margin: 0; }
.sun-symbol { font-size: 36px; color: #8297a6; font-weight: 400; line-height: 1; }
.select-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
label { font-size: 14px; font-weight: 500; }
#seed-label { color: #738594; font-size: 9px; letter-spacing: .6px; }
select { color: #273f52; border: 1px solid #56748e28; border-radius: 6px; background: #ffffff76; width: 100%; height: 38px; padding: 0 10px; font-size: 14px; cursor: pointer; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.storm-controls { display:flex;gap:8px;margin-top:12px; }
.storm-controls button { min-height:35px;padding:0 10px;border:1px solid #91acd847;border-radius:6px;background:#334b7738;color:inherit;font-size:12px; }
.storm-controls button:first-child { flex:1; }
#app.night { --ink:#e0e8f6;--line:#9bb4e328;--accent:#aac1f0;background:#060b17; }
.night .panel { background:linear-gradient(145deg,#111c32ed,#0e182cdc);border-color:#9fbce532;box-shadow:0 12px 48px #0005,inset 0 1px 0 #bcd4ff16; }
.night select { color:#d8e4fb;background:#172742;border-color:#829fcd38; }
.night select option { background:#172742; }
.night output,.night .eyebrow,.night .sun-symbol,.night #seed-label,.night summary,.night .range-labels,.night .facts,.night .method { color:#a2b4d2; }
.night .method strong,.night .method a,.night .facts dd,.night .view-modes button { color:#c2d3ed; }
.night .orbit-button { color:#c0d1ed;border-color:#8ca9d447; }
.night .orbit-button:hover,.night .orbit-button[aria-pressed='true'],.night .view-modes button[aria-pressed='true'] { color:#eef4ff;background:#45618b70; }
.night .new-cloud { background:#375582; }
.night .navigation-hint,.night .scene-caption,.night .render-status { color:#c2d2ed; }
.slider-control { margin-bottom: 21px; }
.slider-control > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
output { font-size: 12px; font-variant-numeric: tabular-nums; color: #647988; }
input[type='range'] { --fill: 50%; -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 3px; background: linear-gradient(to right,var(--accent) var(--fill),#becdd6 var(--fill)); border-radius: 3px; cursor: pointer; margin: 0; }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 3px #20364618; }
input[type='range']::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.range-labels { display: flex; justify-content: space-between; font-size: 10px; color: #8a9aa5; margin-top: 9px; }
.panel-actions { display: flex; gap: 8px; margin-top: 26px; margin-bottom: 22px; }
.new-cloud, .orbit-button { display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 6px; height: 37px; font-size: 12px; font-weight: 500; transition: background .2s; }
.new-cloud { flex: 1; background: #28485f; color: #fff; }
.new-cloud:hover { background: #1b3549; }
.new-cloud svg { width: 15px; height: 15px; }
.orbit-button { padding: 0 11px; border: 1px solid #506f872d; color: #476276; background: transparent; }
.orbit-button:hover, .orbit-button[aria-pressed='true'] { background: #ffffff90; }
.orbit-button[aria-pressed='true'] { color: #1b4464; box-shadow: inset 0 0 0 1px #466f93; }
details { border-top: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 11px; color: #6b7f8f; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary span { font-size: 17px; }
details[open] summary span { transform: rotate(45deg); }
.technical-content { padding: 4px 0 22px; }
.detail-select { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.detail-select select { width: 145px; height: 32px; font-size: 11px; }
.view-modes { border: 0; padding: 0; margin: 5px 0 22px; }
.view-modes legend { font-size: 12px; margin-bottom: 10px; }
.view-modes > div { display: flex; padding: 3px; gap: 2px; border: 1px solid #3e5c741c; border-radius: 7px; }
.view-modes button { font-size: 11px; background: transparent; color: #627d90; flex: 1; border-radius: 4px; padding: 7px 4px; }
.view-modes button[aria-pressed='true'] { color: #24435a; background: #fff; box-shadow: 0 1px 4px #19394f12; }
.facts { margin: 0 0 19px; font-size: 11px; color: #738491; }
.facts > div { display: flex; justify-content: space-between; margin: 8px 0; }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; color: #455f73; }
.method { font-size: 11px; color: #7a8b98; line-height: 1.65; margin: 8px 0 0; }
.method strong { font-weight: 500; color: #516d81; }
.method a { color: #385e7b; white-space: nowrap; text-underline-offset: 3px; }
.bottombar { position: absolute; bottom: 30px; left: 38px; right: 34px; display: flex; justify-content: space-between; align-items: center; color: #f5fbff; text-shadow: 0 1px 8px #1b344237; pointer-events: none; }
.scene-caption { display: flex; gap: 21px; align-items: center; }
.scene-number { font: 450 21px/1 'DM Sans', sans-serif; letter-spacing: -1px; color: #fff; }
.scene-number span { font-size: 12px; opacity: .52; letter-spacing: 0; }
.scene-caption p { margin: 0 0 5px; font-size: 13px; font-weight: 500; }
.scene-caption > div > span { font-size: 10px; opacity: .61; letter-spacing: .25px; }
.navigation-hint { display: flex; align-items: center; gap: 12px; font-size: 11px; color: #ffffffe0; }
.navigation-hint i { width: 2px; height: 2px; border-radius: 50%; background: #ffffff66; }
#reset { color: #fff; background: #28445a15; border: 1px solid #ffffff35; border-radius: 5px; padding: 6px 9px; font-size: 11px; pointer-events: auto; margin-left: 2px; }
#reset:hover { background: #ffffff22; }
#reset span { font-size: 14px; margin-left: 3px; }
.render-status { display: flex; align-items: center; gap: 7px; min-width: 155px; justify-content: flex-end; font-size: 10px; color: #ffffffe3; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #daeddb; box-shadow: 0 0 0 3px #b6d1bf15; }
.render-status.busy .status-dot { background: #fde4ab; animation: breathe 1.2s ease-in-out infinite; }
.loading-overlay { position: absolute; top: 50%; left: 50%; text-align: center; transform: translate(-50%,-50%); pointer-events: none; }
.loading-overlay p { font-size: 16px; font-weight: 500; margin: 15px 0 6px; }
.loading-overlay > span { font-size: 12px; opacity: .65; }
.loading-mark { width: 33px; height: 33px; border-radius: 50%; border: 1px solid #ffffff35; border-top-color: #fff; margin: auto; animation: spin 1s linear infinite; }
.error-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); padding: 30px; color: #203647; background: #f5faff; border-radius: 15px; width: min(440px,90%); box-shadow: 0 12px 80px #132f4455; }
.error-overlay h2 { margin: 0 0 12px; font-size: 21px; }
.error-overlay p { line-height: 1.6; font-size: 15px; }
.error-overlay button { padding: 10px 15px; border-radius: 6px; color: white; background: #294a65; }
.toast { position: absolute; bottom: 95px; left: 50%; transform: translateX(-50%); background: #1a344bdf; backdrop-filter: blur(10px); padding: 12px 20px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 20px #1a344b20; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { opacity: .3; } }
@media (min-width: 1650px) { .panel { top: 130px; right: 45px; width: 310px; padding: 28px 25px 0; } .slider-control { margin-bottom: 25px; } .topbar { left: 46px; right: 45px; top: 38px; } .bottombar { left: 46px; right: 45px; bottom: 36px; } }
@media (max-height: 740px) and (min-width: 761px) { .panel { top: 90px; max-height: calc(100% - 165px); } .panel-heading { margin-bottom: 18px; } .divider { margin: 17px 0; } .slider-control { margin-bottom: 17px; } .topbar { top: 24px; } .bottombar { bottom: 22px; } }
@media (max-width: 1000px) { .navigation-hint > span, .navigation-hint > i { display: none; } .edition { display: none; } .identity-rule { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation-duration: .01ms !important; transition: none !important; } }

.auto-performance-control { margin: 0 0 21px; }
.auto-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; cursor: pointer; }
.auto-toggle small { display: block; margin-top: 4px; font-size: 10px; color: #6b7f8f; }
.auto-toggle input { appearance: none; flex: 0 0 34px; width: 34px; height: 20px; border-radius: 20px; background: #9aaab8; position: relative; cursor: pointer; }
.auto-toggle input::after { content: ''; position: absolute; width: 14px; height: 14px; top: 3px; left: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.auto-toggle input:checked { background: #355d7b; }
.auto-toggle input:checked::after { transform: translateX(14px); }
.auto-toggle input:focus-visible { outline: 2px solid #688fbc; outline-offset: 3px; }
.night .auto-toggle small { color: #a8b8cc; }
.night .auto-toggle input:checked { background: #728bab; }

.film-link { color: #fff; text-decoration: none; font-size: 12px; display: inline-flex; align-items: center; padding: 0 10px; text-shadow: 0 1px 7px #10253670; }
.film-link:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Phone navigation also applies when a phone is turned sideways. */
.mobile-camera-controls { display:none; }
@media(max-width:760px), (max-width:1000px) and (max-height:480px){
  .topbar{top:calc(16px + env(safe-area-inset-top));left:calc(16px + env(safe-area-inset-left));right:calc(16px + env(safe-area-inset-right));}
  .wordmark{font-size:29px}.toolbar{gap:7px}.save-button{padding:0 11px;font-size:12px}
  .icon-button,.save-button{min-width:44px;min-height:44px;}
  .bottombar{bottom:calc(20px + env(safe-area-inset-bottom));left:calc(20px + env(safe-area-inset-left));right:calc(20px + env(safe-area-inset-right));}
  .scene-number,.navigation-hint,.render-status{display:none}
  .render-status.busy{display:flex;position:fixed;top:calc(77px + env(safe-area-inset-top));right:calc(22px + env(safe-area-inset-right));height:18px;min-width:0;font-size:10px}
  .scene-caption p{font-size:14px}.scene-caption > div > span{font-size:11px}
  .panel{top:auto;bottom:calc(128px + env(safe-area-inset-bottom));right:calc(16px + env(safe-area-inset-right));width:min(294px,calc(100% - 32px));max-height:calc(100% - 212px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:20px 20px 0;border-radius:12px;overscroll-behavior:contain;}
  .panel-heading{margin-bottom:21px}h1{font-size:20px}
  .loading-overlay{width:100%}.toast{bottom:20px;white-space:nowrap;max-width:calc(100% - 30px)}
  .mobile-camera-controls{position:absolute;right:calc(16px + env(safe-area-inset-right));bottom:calc(70px + env(safe-area-inset-bottom));display:flex;gap:6px;}
  .mobile-camera-controls button{width:44px;height:44px;color:white;font-size:23px;border:1px solid #ffffff50;border-radius:9px;background:#18344866;backdrop-filter:blur(12px);}
}
@media(max-width:480px){.film-link{font-size:11px;padding:0 2px}.save-button{padding:0 9px}.save-button svg{display:none}.wordmark{font-size:27px}}
@media(max-height:480px) and (max-width:1000px){
  .panel{top:calc(70px + env(safe-area-inset-top));bottom:calc(70px + env(safe-area-inset-bottom));max-height:calc(100% - 140px - env(safe-area-inset-top) - env(safe-area-inset-bottom));}
  .bottombar{bottom:calc(12px + env(safe-area-inset-bottom))}.loading-overlay > span{display:none}
}
#controls:not(.is-hidden) ~ .mobile-camera-controls { visibility:hidden; pointer-events:none; }
