:root { color-scheme: light; --glass: rgba(255, 255, 249, .78); --ink: #36564d; --line: rgba(255, 255, 255, .65); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { background: #c7dfd8; transition: background 1.5s; }
body.night { color-scheme: dark; --glass: rgba(28, 44, 60, .8); --ink: #f0e8c9; --line: rgba(209, 225, 242, .17); background: #1b3044; }
button { font: inherit; touch-action: manipulation; }
[hidden] { display: none !important; }
#courtyard { width: 100%; height: 100%; position: relative; isolation: isolate; }
#world { width: 100%; height: 100%; display: block; outline: none; touch-action: none; cursor: grab; }
#world:active { cursor: grabbing; }
#world.hovering { cursor: pointer; }
#world:focus-visible { box-shadow: inset 0 0 0 3px #79a394; }
.top-controls, .bottom-controls { position: absolute; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 7px; background: var(--glass); border: 1px solid var(--line); border-radius: 32px; box-shadow: 0 5px 24px #183c3812, inset 0 1px 1px #ffffff40; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: background 1.5s; }
.top-controls { top: max(24px, env(safe-area-inset-top)); right: max(24px, env(safe-area-inset-right)); }
.bottom-controls { bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); }
.icon-button { flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--ink); transition: background .2s, transform .2s; }
.icon-button img { width: 21px; height: 21px; pointer-events: none; opacity: .8; filter: invert(27%) sepia(13%) saturate(1076%) hue-rotate(109deg) brightness(92%); }
.night .icon-button img { filter: invert(92%) sepia(17%) saturate(345%) hue-rotate(353deg) brightness(105%); }
.icon-button:hover { background: #8eb9a62e; transform: translateY(-2px); }
.icon-button:active { transform: scale(.9); }
.icon-button.selected, .icon-button[aria-pressed="true"] { background: #92b9a84a; }
.night .icon-button.selected { background: #f0d89b26; }
.icon-button:focus-visible { outline: 2px solid #71a491; outline-offset: 3px; }
.divider { height: 20px; width: 1px; background: #78968b33; margin: 0 2px; }
.loading { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); display: flex; gap: 10px; transition: opacity .5s; pointer-events: none; }
.loading i { display: block; width: 9px; height: 9px; border-radius: 50%; background: #648c7e; animation: breathe 1s ease-in-out infinite alternate; }
.loading i:nth-child(2) { animation-delay: .2s; }
.loading i:nth-child(3) { animation-delay: .4s; }
@keyframes breathe { to { transform: translateY(-10px); opacity: .25; } }
.retry { position: absolute; left: calc(50% - 28px); top: calc(50% - 28px); width: 56px; height: 56px; background: var(--glass); }
.interaction-points { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.object-focus { position: absolute; width: 38px; height: 38px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: transparent; pointer-events: none; opacity: 0; }
.object-focus:focus-visible { pointer-events: auto; opacity: 1; outline: 2px solid #fff; outline-offset: 5px; border-color: #497d66; background: #a8dabc55; }
#focus-ring { position: absolute; z-index: 2; width: 32px; height: 32px; margin: -16px; border: 1.5px solid #ffffffe0; border-radius: 50%; box-shadow: 0 0 0 5px #ffffff15; pointer-events: none; opacity: 0; transition: opacity .18s; }
@media (max-width: 600px) {
  .top-controls { top: max(16px, env(safe-area-inset-top)); right: 16px; padding: 5px; gap: 4px; }
  .bottom-controls { max-width: calc(100% - 20px); padding: 5px; gap: 1px; bottom: max(18px, env(safe-area-inset-bottom)); }
  .icon-button { width: 40px; height: 44px; }
  .icon-button img { width: 20px; height: 20px; }
  .divider { margin: 0 1px; }
  #fullscreen { display: none; }
}
@media (max-width: 350px) { .bottom-controls .icon-button { width: 36px; } .divider { margin: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
