:root {
  color-scheme: dark;
  --ivory: #f4efe5;
  --muted: #c5beb1;
  --glass: rgba(21, 19, 16, .82);
  --line: rgba(244, 239, 229, .14);
  --gold: #bfa56d;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  background: #0e0d0b;
  color: var(--ivory);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .01em;
}
#scene { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#scene:active { cursor: grabbing; }
.scene-label {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 172px;
  padding: 8px 11px 8px 8px;
  border: 1px solid rgba(244,239,229,.24);
  border-radius: 3px;
  background: rgba(25,22,18,.9);
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
  backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.scene-label.visible { opacity: 1; }
.scene-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 11px;
  height: 11px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(25,22,18,.9);
  border-right: 1px solid rgba(244,239,229,.24);
  border-bottom: 1px solid rgba(244,239,229,.24);
}
.scene-label-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #e8d6aa;
  background: rgba(183,132,82,.18);
  border: 1px solid rgba(232,214,170,.26);
}
.scene-label-icon.decor-icon { color: #eadbd3; background: rgba(157,109,137,.2); }
.scene-label-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.scene-label strong { display: block; color: #f7f1e8; font-size: 11px; line-height: 1.1; letter-spacing: .16em; }
.scene-label small { display: block; margin-top: 4px; color: #aaa397; font-size: 9px; line-height: 1.15; letter-spacing: .02em; }
.glass {
  position: fixed;
  z-index: 3;
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0,0,0,.24);
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
}
.brand { top: 22px; left: 24px; padding: 18px 22px 17px; border-radius: 4px; min-width: 285px; }
.eyebrow, .label { display: block; color: var(--gold); font-size: 10px; letter-spacing: .24em; font-weight: 750; }
.brand h1 { margin: 5px 0 4px; font: 500 25px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.brand p { margin: 0; color: var(--muted); font-size: 11px; }
.capacity { top: 22px; right: 24px; width: 324px; padding: 16px; border-radius: 4px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; padding: 3px; border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 3px; }
button { font: inherit; color: inherit; }
.segmented button { border: 0; background: transparent; padding: 9px 8px; color: var(--muted); cursor: pointer; border-radius: 2px; transition: .2s ease; }
.segmented button strong { display: block; font: 500 19px/1 Georgia, serif; }
.segmented button span { display: block; margin-top: 4px; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.segmented button.active { background: var(--ivory); color: #1b1814; box-shadow: 0 4px 18px rgba(0,0,0,.22); }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.stats div { text-align: center; }
.stats strong { display: block; font: 500 15px/1.1 Georgia, serif; color: var(--ivory); }
.stats span { display: block; margin-top: 4px; color: #9f988d; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.legend { left: 24px; bottom: 67px; width: 190px; border-radius: 4px; overflow: hidden; }
.legend-toggle { width: 100%; border: 0; background: transparent; padding: 13px 15px; display: flex; justify-content: space-between; cursor: pointer; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.legend-content { display: grid; gap: 8px; padding: 0 15px 14px; max-height: 210px; transition: .2s ease; overflow: hidden; }
.legend.collapsed .legend-content { max-height: 0; padding-bottom: 0; opacity: 0; }
.legend-content div { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.legend-content i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.legend-content .legend-feature { gap: 8px; }
.legend-content .legend-icon { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: color-mix(in srgb, var(--c) 20%, transparent); box-shadow: none; color: var(--c); }
.legend-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tools { right: 24px; bottom: 67px; display: flex; padding: 5px; border-radius: 4px; }
.tools button { width: 64px; min-height: 52px; border: 0; border-right: 1px solid var(--line); background: transparent; color: #aaa397; cursor: pointer; transition: .2s; }
.tools button:last-child { border-right: 0; }
.tools button:hover, .tools button.active, .tools button[aria-pressed="true"] { color: var(--ivory); background: rgba(255,255,255,.06); }
.tools .icon { display: block; font-size: 19px; line-height: 1; }
.tools small { display: block; margin-top: 5px; font-size: 8px; letter-spacing: .06em; }
.hint { left: 50%; bottom: 70px; transform: translateX(-50%); border-radius: 999px; padding: 10px 13px 10px 16px; font-size: 10px; color: var(--muted); white-space: nowrap; transition: .3s; }
.hint button { margin-left: 10px; width: 19px; height: 19px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); cursor: pointer; }
.mobile-hint { display: none; }
.hint.hidden { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
footer { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 24px; color: #8f897f; background: rgba(13,12,10,.88); border-top: 1px solid rgba(255,255,255,.08); font-size: 9px; letter-spacing: .04em; }
.notice { position: fixed; z-index: 5; left: 50%; top: 24px; transform: translate(-50%,-20px); padding: 9px 14px; border-radius: 3px; background: #eee8dc; color: #24201a; font-size: 10px; opacity: 0; pointer-events: none; transition: .25s; }
.notice.show { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 760px) {
  .brand { top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; min-width: 0; padding: 13px 15px; }
  .brand h1 { font-size: 20px; }
  .brand p { display: none; }
  .capacity { top: auto; right: 12px; left: 12px; bottom: 123px; width: auto; padding: 10px; }
  .scene-label { min-width: 0; padding: 6px; gap: 6px; }
  .scene-label-icon { width: 31px; height: 31px; flex-basis: 31px; }
  .scene-label > span:last-child { display: none; }
  .capacity > .label { display: none; }
  .segmented { margin-top: 0; }
  .stats { margin-top: 8px; padding-top: 8px; }
  .legend { left: 12px; bottom: 57px; width: 148px; }
  .legend-content { gap: 6px; }
  .tools { right: 12px; bottom: 57px; }
  .tools button { width: 46px; min-height: 45px; }
  .tools small { display: none; }
  .hint { bottom: 238px; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; }
  .desktop-hint { display: none; }
  .mobile-hint { display: inline; }
  footer { min-height: 39px; padding: 8px 12px; }
  footer span:last-child { display: none; }
}
@media (max-height: 690px) and (max-width: 760px) {
  .capacity { bottom: 105px; }
  .stats { display: none; }
  .hint { display: none; }
}
