body.iso { background: #0b0c0e; }
.gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; outline: none; cursor: grab; touch-action: none; }
.gl.hovering { cursor: pointer; }
.gl.dragging { cursor: grabbing; }

.tip {
  position: fixed; z-index: 6; pointer-events: none; padding: 7px 11px; border-radius: 8px; max-width: 320px;
  background: rgba(16,17,19,.86); backdrop-filter: blur(12px); border: 1px solid var(--line);
  font-size: 12px; line-height: 1.35; transform: translate(14px, 14px);
}
.tip b { display: block; font-weight: 600; }
.tip span { color: var(--muted); }

.loading {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 30;
  color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-size: 12px; background: #0b0c0e;
  transition: opacity .9s var(--ease);
}
.loading.done { opacity: 0; pointer-events: none; }

.iso .lb-backdrop { background: rgba(8,9,10,.6); backdrop-filter: blur(12px) saturate(.9); }
.iso .lb-img.fadein { animation: fadein .28s ease-out both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* big zoom + rotate controls */
.controls {
  position: fixed; right: 22px; bottom: 22px; z-index: 6; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.ctl {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(20,21,24,.78); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.ctl:hover { background: rgba(38,39,43,.92); border-color: rgba(255,255,255,.3); transform: scale(1.06); }
.ctl:active { transform: scale(.96); }
.ctl svg { width: 28px; height: 28px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ctl.small { width: 48px; height: 48px; }
.ctl.small svg { width: 22px; height: 22px; }
.ctl-gap { height: 6px; }
@media (max-width: 860px) { .ctl { width: 54px; height: 54px; } }

/* tune panel */
.tune {
  position: fixed; top: 70px; right: 22px; z-index: 7; width: 304px;
  max-height: calc(100vh - 380px); min-height: 220px; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(18,19,22,.86); backdrop-filter: blur(18px) saturate(1.1); border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease);
  scrollbar-width: thin;
}
.tune.open { opacity: 1; transform: none; pointer-events: auto; }
.tune-inner { padding: 14px 16px 16px; font-size: 12px; }
.tune-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tune-head strong { font-size: 14px; letter-spacing: -.01em; }
.tune .x { border: 0; background: none; color: var(--muted); font-size: 14px; }
.tune h4 { margin: 16px 0 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tune .row { display: grid; grid-template-columns: 92px 1fr 46px; align-items: center; gap: 8px; padding: 5px 0; }
.tune .row > span { color: #cfcdc5; }
.tune .row output { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11px; }
.tune .row.col { grid-template-columns: 92px 1fr; }
.tune input[type=range] { width: 100%; accent-color: var(--accent); height: 18px; }
.tune .seg { display: flex; background: rgba(255,255,255,.06); border-radius: 7px; padding: 2px; }
.tune .seg button { flex: 1; white-space: nowrap; border: 0; background: none; color: var(--muted); padding: 5px 4px; border-radius: 5px; font-size: 11.5px; }
.tune .seg button.on { background: rgba(255,255,255,.14); color: var(--text); }
.tune .toggle { grid-template-columns: 1fr auto; cursor: pointer; position: relative; }
.tune .toggle input { position: absolute; opacity: 0; pointer-events: none; }
.tune .toggle i { width: 34px; height: 20px; border-radius: 10px; background: rgba(255,255,255,.14); position: relative; transition: background .2s; }
.tune .toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.tune .toggle input:checked + i { background: var(--accent); }
.tune .toggle input:checked + i::after { transform: translateX(14px); background: #1d2400; }
.tune .dialrow { grid-template-columns: 92px 1fr 46px; }
.tune .dial {
  width: 62px; height: 62px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); position: relative; cursor: grab;
  background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%); touch-action: none; justify-self: center;
}
.tune .dial .arrow { position: absolute; inset: 0; pointer-events: none; }
.tune .dial .arrow::before { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: translateY(-50%); border-radius: 2px; }
.tune .dial .arrow::after { content: ""; position: absolute; left: calc(50% + 20px); top: 50%; border: 6px solid transparent; border-left: 9px solid var(--accent); transform: translateY(-50%); }
.tune .presets { display: flex; flex-wrap: wrap; gap: 5px; }
.tune .presets button, .tune-foot button {
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); border-radius: 999px; padding: 5px 10px; font-size: 11.5px;
}
.tune .presets button:hover, .tune-foot button:hover { background: rgba(255,255,255,.1); }
.tune-foot { display: flex; gap: 6px; margin-top: 16px; }
.pill.on { background: var(--text); color: #0b0b0a; border-color: var(--text); }
@media (max-width: 860px) { .tune { left: 12px; right: 12px; width: auto; max-height: 55vh; } }
