:root {
  --canvas: #e9ece8;
  --canvas-card: #f5f6f0;
  --ink: #303632;
  --ink-bright: #1c2420;
  --muted: #626d66;
  --line: #26362d1c;
  --line-strong: #26362d38;
  --accent: #326446;
}
body { background: var(--canvas); }
.listening-room { position: relative; width: min(1680px, 100%); margin: auto; padding: 0 42px 130px; }
.room-header { height: 96px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.room-brand svg { width: 116px; height: 43px; }
.header-nav-link { gap: 8px; }
.header-nav-link svg { width: 18px; }
.room-layout { display: grid; grid-template-columns: 145px minmax(0, 1fr) 260px; gap: 22px; min-height: 650px; padding-top: 26px; align-items: start; }
.room-sidebar { min-width: 0; padding-top: 8px; }
.member-navigation { display: flex; flex-direction: column; gap: 12px; }
.member-selector { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px; text-align: left; color: var(--muted); }
.member-selector::before { content: ''; position: absolute; left: -14px; width: 3px; height: 0; background: var(--member-color, var(--ink)); transition: height 180ms; }
.member-selector[aria-pressed='true']::before { height: 24px; }
.member-selector[aria-pressed='true'], .member-selector:hover { color: var(--member-color, var(--ink)); }
.member-portrait { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; filter: none; transition: transform 200ms; }
.member-selector:hover .member-portrait { transform: translateY(-2px); }
.member-identity { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.member-name { font-size: 16px; font-weight: 700; }
.member-country { font: 9px/1.3 var(--mono); color: var(--muted); }
.everyone-selector { margin-bottom: 9px; font-size: 13px; gap: 12px; }
.everyone-selector svg { width: 38px; padding: 9px; height: 38px; border: 1px solid var(--line-strong); border-radius: 50%; }
.member-preview { height: 28px; margin: 18px 0 0; font: 9px/1.5 var(--mono); color: var(--muted); }
.room-sidebar .world-locator { position: relative; width: 116px; height: 116px; margin: 14px 0 0; justify-self: start; }
.globe-reset { position: absolute; right: -10px; bottom: -10px; }
.world-viewport { border-radius: 50%; overflow: hidden; }
.collection-workspace { min-width: 0; }
.collection-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; height: 56px; }
.collection-heading { display: flex; gap: 8px; align-items: center; min-width: 0; }
.collection-heading h1 { margin: 0; font: 500 20px/1.2 var(--sans); overflow-wrap: anywhere; }
.room-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border: 1px solid transparent; border-radius: 50%; color: var(--ink); }
.room-icon-button:hover:not(:disabled) { background: #ffffff80; border-color: var(--line); }
button:disabled { cursor: default; opacity: 0.28; }
.collection-filters { display: flex; gap: 2px; padding: 3px; border-bottom: 1px solid var(--line-strong); }
.collection-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 10px; font: 10px var(--mono); color: var(--muted); border-bottom: 1px solid transparent; margin-bottom: -4px; }
.collection-filter[aria-pressed='true'] { color: var(--ink-bright); border-bottom-color: var(--ink); }
.collection-filter svg { width: 15px; height: 15px; }
.object-stage { position: relative; height: 510px; isolation: isolate; }
#collection-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.object-targets { position: absolute; inset: 0; }
.object-target { position: absolute; padding: 0; border: 1px solid transparent; border-radius: 4px; outline-offset: 6px; }
.object-target:hover .object-caption-owner { text-decoration: underline; text-underline-offset: 3px; }
.object-target[aria-pressed='true'] { cursor: default; }
.object-caption { position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 4px; width: var(--caption-width, 132px); pointer-events: none; }
.object-caption-owner { color: var(--member-color); font-size: 12px; font-weight: 700; }
.object-caption-title { font: 10px/1.45 var(--mono); color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.object-target[aria-pressed='true'] .object-caption { display: none; }
.object-fallback { display: none; }
.object-stage[data-webgl='unavailable'] { height: auto; min-height: 470px; }
.object-stage[data-webgl='unavailable'] canvas { display: none; }
.object-stage[data-webgl='unavailable'] .object-targets { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 60px 24px; padding: 30px 10px 75px; }
.object-stage[data-webgl='unavailable'] .object-target { position: relative; width: 100%; aspect-ratio: 1; }
.object-stage[data-webgl='unavailable'] .object-fallback { display: flex; height: 100%; justify-content: center; align-items: center; background: #fff8; padding: 8px; overflow-wrap: anywhere; font-size: 13px; }
.object-fallback img { display: block; width: 100%; height: 100%; object-fit: contain; }
.shelf-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.collection-page { font: 10px var(--mono); color: var(--muted); width: 62px; text-align: center; }
.collection-inspection { align-self: center; min-width: 0; padding: 0 0 60px 20px; }
.connection-member { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--member-color); text-align: left; }
.connection-member img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.connection-member svg { width: 15px; height: 15px; margin-left: 10px; transition: transform 180ms; }
.connection-member:hover svg { transform: translateX(4px); }
.inspection-owner { margin-bottom: 30px; font-weight: 700; }
.inspection-owner svg { display: none; }
.inspection-country { display: none; }
.object-category { font: 10px var(--mono); margin: 0 0 12px; color: var(--muted); }
.inspection-title { margin: 0 0 28px; font: 500 28px/1.18 var(--sans); overflow-wrap: anywhere; }
.inspection-title:focus { outline: none; }
.inspection-title:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; }
.inspection-play { display: flex; grid-template-columns: none; width: 100%; gap: 12px; align-items: center; font: 12px var(--mono); color: var(--member-color); min-height: 48px; padding: 12px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.inspection-play svg { width: 18px; height: 18px; }
.record-duration { color: var(--muted); margin-left: auto; font: 10px var(--mono); }
.object-connections { margin-top: 32px; }
.detail-label { font: 10px var(--mono); color: var(--muted); margin: 0 0 12px; }
.inspection-quote { margin: 30px 0 0; font: 13px/1.65 var(--sans); white-space: pre-wrap; }
.artwork-credit { margin: 28px 0 0; color: var(--muted); opacity: 0.8; font: 8px var(--mono); }
.render-status { font: 11px/1.5 var(--mono); color: #96373b; }
.audio-dock { width: min(700px, calc(100% - 48px)); height: 76px; background: color-mix(in srgb, var(--player-accent) 7%, #f5f7ef); border: 1px solid #fff9; box-shadow: 0 12px 24px #253c2d14; border-radius: 6px; }
.dock-track { background: none; }
.dock-artwork { border-radius: 4px; box-shadow: none; border-color: #fff8; }
.dock-btn-play { background: color-mix(in srgb, var(--player-accent) 12%, #f5f7ef); border-color: color-mix(in srgb, var(--player-accent) 20%, #f5f7ef); }
.dock-inner { gap: 12px; }
.dock-transport { gap: 2px; }
.dock-track-header { font-size: 12px; }
.dock-volume-slider { width: 50px; }
.ogl-backdrop { opacity: 0.16; }
@media(min-width:1500px) { .room-layout { grid-template-columns: 170px minmax(0, 1fr) 290px; gap: 34px; } .object-stage { height: 620px; } .collection-inspection { padding-right: 30px; } }
@media(max-width:1150px) { .listening-room { padding-inline: 28px; } .room-layout { grid-template-columns: 120px minmax(0, 1fr) 220px; gap: 12px; } .member-selector { gap: 8px; } .member-name { font-size: 14px; } .member-country { font-size: 8px; } .member-portrait { width: 32px; height: 32px; } .collection-inspection { padding-left: 12px; } .inspection-title { font-size: 25px; } .collection-filter { padding-inline: 7px; } .collection-filter span { display: none; } }
@media(max-width:1000px) {
  .room-layout { grid-template-columns: minmax(0,1fr) 230px; gap: 22px; padding-top: 22px; }
  .room-sidebar { display: contents; }
  .member-navigation { grid-column: 1/-1; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 12px; }
  .member-selector { flex-direction: column; justify-content: start; gap: 8px; min-width: 0; text-align: center; }
  .member-identity { gap: 4px; align-items: center; }
  .member-selector::before { left: 50%; transform: translateX(-50%); bottom: -10px; width: 0; height: 2px; }
  .member-selector[aria-pressed='true']::before { width: 24px; height: 2px; }
  .member-portrait { width: 36px; height: 36px; }
  .everyone-selector { margin: 0; gap: 8px; font-size: 10px; }
  .everyone-selector svg { width: 36px; height: 36px; }
  .member-preview { display: none; }
  .collection-workspace { grid-column: 1; grid-row: 2; }
  .collection-inspection { grid-column: 2; grid-row: 2; padding: 25px 0 0; }
  .room-sidebar .world-locator { grid-column: 2; grid-row: 3; margin: -40px 0 10px auto; width: 100px; height: 100px; }
  .object-stage { height: 560px; }
  .inspection-title { font-size: 26px; }
  .collection-filter span { display: none; }
}
@media(max-width:700px) {
  .listening-room { padding: 0 22px 120px; }
  .room-header { height: 76px; }
  .room-brand svg { width: 96px; height: 35px; }
  .room-layout { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .member-navigation { gap: 7px; grid-row: 1; }
  .member-name { font-size: 11px; }
  .member-country { display: none; }
  .member-portrait, .everyone-selector svg { width: 32px; height: 32px; }
  .everyone-selector svg { padding: 8px; }
  .everyone-selector span { font-size: 8px; }
  .collection-workspace { grid-column: 1; grid-row: 2; }
  .collection-toolbar { height: 44px; }
  .collection-heading { gap: 2px; }
  .collection-heading h1 { font-size: 18px; }
  .collection-filters { gap: 0; }
  .collection-filter { width: 36px; min-height: 38px; padding: 0; justify-content: center; }
  .object-stage { height: 420px; margin-inline: -10px; }
  body[data-inspecting='true'] .object-stage { height: 320px; }
  .object-caption-title { font-size: 9px; }
  .shelf-pagination { margin-top: 0; }
  .collection-inspection { grid-column: 1; grid-row: 3; padding: 26px 0 0; border-top: 1px solid var(--line-strong); align-self: start; }
  .inspection-owner { margin-bottom: 18px; }
  .inspection-country { display: block; font: 10px var(--mono); margin: -10px 0 18px 40px; color: var(--muted); }
  .inspection-title { font-size: 27px; max-width: 540px; }
  .object-connections { margin-top: 24px; }
  .room-sidebar .world-locator { grid-column: 1; grid-row: 4; margin: 0 0 0 auto; width: 100px; height: 100px; }
  .audio-dock { width: calc(100% - 24px); bottom: 12px; }
  .dock-inner { padding-inline: 12px; }
  .object-stage[data-webgl='unavailable'] .object-targets { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:380px) { .listening-room { padding-inline: 16px; } .member-navigation { gap: 4px; } .member-portrait, .everyone-selector svg { width: 28px; height: 28px; } .member-name { font-size: 10px; } }
@media(prefers-reduced-motion:reduce) { .member-portrait, .connection-member svg { transform: none !important; } }

/* Phone alignment: globe sits beside the details instead of alone at the bottom, and the
   music dock stays clear of the content. Phones only; desktop and tablet are unchanged. */
@media(max-width:700px) {
  .listening-room { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .room-layout { grid-template-columns: minmax(0,1fr) 88px; column-gap: 14px; row-gap: 24px; }
  .member-navigation, .collection-workspace { grid-column: 1/-1; }
  .collection-inspection { grid-column: 1; grid-row: 3; }
  .room-sidebar .world-locator { grid-column: 2; grid-row: 3; align-self: start; margin: 30px 0 0; width: 84px; height: 84px; }
  .globe-reset { right: -8px; bottom: -14px; }
  .inspection-owner { margin-bottom: 4px; }
  .inspection-country { margin: 0 0 18px 40px; }
  .audio-dock { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .dock-scrub { min-height: 32px; }
}

/* Phones held sideways: short screens need a slimmer header, member row and dock. */
@media(max-height:520px) and (orientation:landscape) and (max-width:1000px) {
  .listening-room { padding-bottom: 84px; }
  .room-header { height: 56px; }
  .room-brand svg { width: 80px; height: 30px; }
  .room-layout { padding-top: 12px; row-gap: 14px; }
  .member-navigation { gap: 6px; }
  .member-selector { gap: 4px; min-height: 0; }
  .member-portrait, .everyone-selector svg { width: 28px; height: 28px; }
  .everyone-selector svg { padding: 6px; }
  .member-name { font-size: 12px; }
  .member-country { display: none; }
  .collection-toolbar { height: 40px; }
  .collection-heading h1 { font-size: 18px; }
  .object-stage { height: 340px; }
  .audio-dock { height: 56px; width: min(560px, calc(100% - 24px)); bottom: 8px; }
  .dock-inner { grid-template-columns: auto auto minmax(0,1fr); gap: 10px; padding-inline: 10px; }
  .dock-artwork, .dock-extras { display: none; }
  .dock-btn { width: 38px; height: 38px; }
}
