:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #293c37;
  background: #344441;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
button, select, input { font: inherit; }
button, select { min-height: 44px; border: 1px solid #fff9e880; border-radius: 16px; background: #fffbeeeb; color: #31483f; }
button { padding: 0 14px; cursor: pointer; touch-action: manipulation; }
button:hover { filter: brightness(.97); }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #c57b50; outline-offset: 2px; }
button[aria-pressed=true], .primary { background: #38594aee; color: #fff; border-color: #64836a; }
button:disabled { opacity: .5; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The scene owns the entire browser viewport; controls never consume scene height. */
#review { position: relative; width: 100%; height: 100%; height: 100dvh; overflow: hidden; }
#viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; background: #344441; cursor: grab; outline-offset: -3px; }
#viewport:active { cursor: grabbing; }
#viewport.white { background: #dfe6e8; }
#scene { display: block; width: 100%; height: 100%; user-select: none; }
#scene image { pointer-events: none; }
#loading { position: absolute; inset: 0; display: grid; place-content: center; background: #344441; color: #f7f4e7; font-size: 14px; pointer-events: none; }

/* Space between floating controls passes touches through to the scene. */
.toolbar, .controls { position: absolute; z-index: 2; pointer-events: none; }
.toolbar { top: calc(12px + env(safe-area-inset-top)); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.toolbar button, .toolbar select, .controls button { pointer-events: auto; box-shadow: 0 3px 14px #10281f24; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.variant-label { min-width: 0; width: min(235px, calc(100% - 98px)); }
.variant-label select { width: 100%; padding: 0 10px; font-size: 12px; text-overflow: ellipsis; }
.quiet { flex: none; font-size: 12px; padding: 0 12px; }
.controls { bottom: calc(10px + env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); }
.view-buttons { display: flex; justify-content: space-between; gap: 10px; }
.view-buttons button { font-size: 13px; min-height: 48px; min-width: 88px; }
.caption { display: flex; justify-content: space-between; gap: 8px; margin: 9px 3px 0; font-size: 10px; color: #fff9e8; text-shadow: 0 1px 4px #142b20, 0 1px 8px #142b20; }
#view-label { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: calc(91px + env(safe-area-inset-bottom)); pointer-events: none; color: #fff; background: #1d302888; border: 1px solid #ffffff25; border-radius: 20px; padding: 6px 11px; font-size: 10px; backdrop-filter: blur(8px); }
.clean .toolbar, .clean .controls, .clean #view-label { display: none; }
#exit-clean { position: absolute; right: max(12px, env(safe-area-inset-right)); top: calc(12px + env(safe-area-inset-top)); background: #fff9e9d9; font-size: 12px; z-index: 3; backdrop-filter: blur(12px); }

#hud { position: absolute; inset: 0; pointer-events: none; padding: calc(12px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left)); }
.mock-top, .mock-bottom { display: flex; justify-content: space-between; gap: 5px; }
.mock-top span, .mock-bottom span { font-size: 12px; padding: 12px 10px; border-radius: 16px; background: #fff9e8ed; color: #5f624c; box-shadow: 0 2px 8px #15281d22; }
.mock-caption { position: absolute; top: calc(60px + env(safe-area-inset-top)); left: 0; width: 100%; text-align: center; font-size: 10px; color: #fff; text-shadow: 0 1px 4px #26382b; }
.mock-bottom { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); }
.mock-bottom span { padding: 18px 24px; }
.mock-bottom span:last-child { background: #46624c; color: #fff; }
.with-hud .toolbar { top: calc(84px + env(safe-area-inset-top)); }
.with-hud .controls { bottom: calc(86px + env(safe-area-inset-bottom)); }
.with-hud #view-label { bottom: calc(166px + env(safe-area-inset-bottom)); }
.with-hud #exit-clean { top: calc(84px + env(safe-area-inset-top)); }

dialog { width: min(420px, calc(100% - 24px)); max-height: calc(100dvh - 36px); border: none; border-radius: 22px; padding: 20px; background: #fffdf5; color: #354b3d; box-shadow: 0 20px 100px #0006; }
dialog::backdrop { background: #16271d88; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
h2 { font-size: 19px; margin: 0; }
.dialog-heading button { font-size: 25px; border: 0; background: transparent; width: 44px; }
.places { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 20px; }
.places button { font-size: 12px; background: #eaece3; border-color: transparent; }
.places button[aria-pressed=true] { color: #fff; background: #38594a; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0; font-size: 13px; min-height: 34px; }
.toggle input { accent-color: #38594a; width: 20px; height: 20px; }
.zoom-label { display: flex; justify-content: space-between; font-size: 13px; margin-top: 20px; }
#zoom { width: 100%; accent-color: #38594a; height: 42px; }
#share { width: 100%; margin-top: 8px; }
#share-url { width: 100%; padding: 12px; margin-top: 10px; }
dialog p { font-size: 13px; line-height: 1.8; }
.fine { font-size: 11px !important; color: #8a8f7f; }
#toast { position: fixed; left: 50%; bottom: 190px; transform: translateX(-50%); z-index: 5; background: #1a322bee; color: white; padding: 12px 18px; border-radius: 14px; font-size: 12px; max-width: 90%; text-align: center; pointer-events: none; }
@media (min-width: 700px) { .view-buttons { gap: 14px; justify-content: center; } .caption { justify-content: center; gap: 20px; } }
@media (max-height: 450px) { .caption { display: none; } .view-buttons button { min-height: 44px; } #view-label { bottom: calc(68px + env(safe-area-inset-bottom)); } .with-hud #view-label { bottom: calc(143px + env(safe-area-inset-bottom)); } }
