/* V2 edition and Living Album controls. World colors come from data.js;
   the chrome deliberately stays still while the architecture responds. */
.v2-edition {
  display:inline-flex; align-items:center; gap:7px; width:max-content; max-width:100%;
  font:500 9px/1.3 var(--f-mono); letter-spacing:.1em; text-transform:uppercase;
  color:var(--bone-dim); white-space:nowrap;
}
.v2-edition b {
  display:grid; place-items:center; min-width:25px; height:19px; padding:2px 5px;
  font:700 10px var(--f-body); letter-spacing:.04em; color:var(--ink); background:var(--gold);
  border-radius:2px; box-shadow:inset 0 -2px 0 color-mix(in srgb,var(--ink) 16%,transparent);
}
.hud-id-text .v2-edition { margin:0; font-size:8px; letter-spacing:.05em; line-height:1.4; }
.hud-id-text .v2-edition b { min-width:22px; height:16px; font-size:9px; }
.v2-music-toggle {
  display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; min-width:44px;
  max-width:100%; padding:9px 12px; border:1px solid var(--line); border-radius:8px;
  background:var(--ink); color:var(--bone); font:500 12px/1.4 var(--f-body); cursor:pointer;
}
.v2-music-toggle::before {
  content:''; flex:none; width:28px; height:16px; border:1px solid var(--bone-faint); border-radius:12px;
  background:radial-gradient(circle at 7px 50%,var(--bone-faint) 0 4px,transparent 4.5px);
}
.v2-music-toggle[aria-pressed=true] { border-color:var(--gold); }
.v2-music-toggle[aria-pressed=true]::before {
  border-color:var(--gold); background:radial-gradient(circle at 20px 50%,var(--ink) 0 4px,transparent 4.5px),var(--gold);
}
.hud-right .v2-music-toggle { width:44px; height:44px; padding:0; gap:0; flex:none; }
.hud-right .v2-music-toggle::before { display:none; }
.hud-right .v2-music-toggle[aria-pressed=true] { color:var(--gold); }
.v2-music-toggle:focus-visible,.living-album-chapter:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
.living-album { min-width:0; color:var(--bone); margin:0 0 24px; }
.living-album-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:0 0 13px; border-bottom:1px solid var(--line); }
.living-album-head h3 { font:700 27px/1.05 var(--f-display); letter-spacing:.025em; min-width:0; }
.living-album-head .v2-music-toggle { flex:none; max-width:58%; text-align:left; font-size:11px; }
.living-album-note { color:var(--bone-dim); margin:12px 0 18px; font:12px/1.6 var(--f-body); max-width:60ch; }
.living-album-chapters { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)); gap:7px; margin:0; padding:0; list-style:none; }
.living-album-chapters>li { min-width:0; }
.living-album-chapter {
  position:relative; display:flex; align-items:center; gap:12px; width:100%; min-width:0; min-height:70px;
  text-align:left; padding:13px 12px; color:var(--bone); background:var(--ink-2); border:1px solid var(--line-soft);
  border-left:3px solid var(--chapter-color,var(--gold)); border-radius:4px 8px 8px 4px; cursor:pointer;
  box-shadow:var(--panel-edge);
}
.living-album-chapter:hover { border-color:var(--chapter-color,var(--gold)); background:var(--ink-3); }
.living-album-chapter[aria-current=true],.living-album-chapter[aria-pressed=true] { border-color:var(--gold); background:var(--ink-3); }
.living-album-number { flex:none; display:grid; place-items:center; width:28px; height:28px; font:500 10px var(--f-mono); color:var(--bone-dim); border:1px solid var(--line); border-radius:50%; }
.living-album-copy { flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; }
.living-album-copy>b { font:600 14px/1.35 var(--f-body); overflow-wrap:anywhere; }
.living-album-copy>small { font:10px/1.5 var(--f-mono); color:var(--bone-dim); overflow-wrap:anywhere; }
.living-album-play { flex:none; display:grid; place-items:center; width:28px; height:28px; color:var(--gold); }
.living-album-play svg { width:16px; height:16px; fill:currentColor; }
.living-album-status { margin:12px 0 0; font:12px/1.5 var(--f-body); color:var(--gold); overflow-wrap:anywhere; }
.living-album-status:empty { display:none; }
#phone .living-album { margin-bottom:12px; }
#phone .living-album-head { flex-wrap:wrap; }
#phone .living-album-head h3 { font-size:24px; }
#phone .living-album-head .v2-music-toggle { max-width:100%; width:100%; justify-content:flex-start; }
#phone .living-album-chapters { grid-template-columns:minmax(0,1fr); }
#phone .living-album-chapter { min-height:66px; }
#phone .living-album-note { font-size:12px; margin:10px 0 14px; }

/* Compact edition controls never compete with the actual screen or controls. */
@media(max-width:650px) {
  .hud-id-text .v2-edition span { display:none; }
  .hud-id-text .v2-edition { font-size:7px; letter-spacing:0; }
  .hud-id { flex:1; min-width:0; }
  .hud-id-text { min-width:0; }
  .hud-right { flex:none; }
  .hud-right>.movement-pace { position:absolute; top:72px; right:clamp(12px,2.4vw,26px); }
  .living-album-head { align-items:flex-start; flex-wrap:wrap; }
  .living-album-head .v2-music-toggle { max-width:100%; }
  .living-album-chapters { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:400px) {
  .hud-right>.movement-pace { top:67px; right:10px; }
  .hud-id-text .v2-edition { max-width:calc(100vw - 208px); overflow:hidden; text-overflow:ellipsis; }
}
@media(max-height:460px) and (orientation:landscape) {
  .v2-edition { font-size:8px; }
  .living-album-chapters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #phone .living-album-chapters { grid-template-columns:minmax(0,1fr); }
}
@media(prefers-reduced-motion:no-preference) {
  .living-album-chapter,.v2-music-toggle { transition:background .14s,border-color .14s; }
}

.living-catalog-selector { display:grid; gap:7px; margin:16px 0; font:12px var(--f-body); color:var(--bone-dim); min-width:0; }
.living-catalog-selector select { min-width:0; width:100%; min-height:44px; padding:10px; background:var(--ink-2); color:var(--bone); border:1px solid var(--line); border-radius:9px; }
.living-catalog-cover { display:flex; align-items:center; gap:16px; padding:16px 0; min-width:0; }
.living-catalog-cover img { width:92px; height:92px; object-fit:contain; border-radius:4px; }
.living-catalog-cover div { display:grid; gap:8px; min-width:0; }
.living-catalog-cover small { font:10px var(--f-mono); letter-spacing:.09em; color:var(--gold); }
.living-catalog-cover b { font:28px/1.05 var(--f-display); overflow-wrap:anywhere; }
.living-album-chapter[hidden] { display:none; }

.v2-world .has-social-update { position:relative; }
.v2-world .has-social-update::after { content:""; position:absolute; top:7px; right:7px; width:6px; height:6px; border-radius:50%; background:var(--gold); }
.v2-world .setting .seg { display:flex; flex-wrap:wrap; }

.v2-world #phone.open { z-index:90; }

/* Keep one familiar app row so content, rather than navigation, owns the phone. */
.v2-world #phone .phone-nav { display:flex; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scroll-padding:6px; }
.v2-world #phone .phone-nav button { flex:1 0 44px; min-width:44px; min-height:44px; padding:6px 2px; font-size:9px; letter-spacing:0; }

/* One small arrival control; it disappears once a track starts or quiet is chosen. */
body.v2-world .arrival-soundtrack{position:fixed;z-index:24;right:18px;top:calc(88px + var(--safe-t,0px));display:flex;align-items:center;max-width:calc(100vw - 36px);border:1px solid var(--gold);border-radius:999px;background:var(--ink);box-shadow:0 5px 20px #0003;overflow:hidden}
body.v2-world .arrival-soundtrack[hidden]{display:none}
body.v2-world .arrival-soundtrack button{min-height:44px;border:0;background:transparent;color:var(--bone);font:500 13px/1.3 var(--f-body);padding:8px 16px;cursor:pointer}
body.v2-world .arrival-soundtrack button:first-child{min-width:0;overflow-wrap:anywhere}
body.v2-world .arrival-soundtrack button:last-child{width:44px;flex:0 0 44px;padding:8px;color:var(--gold);border-left:1px solid var(--gold)}
body.v2-world .arrival-soundtrack button:focus-visible{outline:2px solid var(--gold);outline-offset:-4px}
@media(max-width:600px){body.v2-world .arrival-soundtrack{right:10px;top:calc(132px + var(--safe-t,0px));max-width:calc(100vw - 20px)}}

/* The street keeps two corners: navigation and the current record. Everything else is deliberate. */
body.v2-world .hud-top { background:none; pointer-events:none; padding:0; }
body.v2-world .hud-id,body.v2-world .hud-right,body.v2-world #hud-hint { display:none; }
body.v2-world #hud-district { display:block; position:absolute; top:calc(18px + var(--safe-t,0px)); left:18px; transform:none; min-width:0; max-width:calc(100vw - 36px); text-align:left; }
body.v2-world #hud-district b { font:500 11px/1.5 var(--f-mono); letter-spacing:.08em; text-shadow:0 1px 4px var(--ink); }
body.v2-world #hud-district span { display:none; }
body.v2-world #btn-phone,body.v2-world:has(#music-player:not([hidden])) #btn-phone { right:16px; bottom:calc(16px + var(--safe-b)); width:48px; height:48px; min-width:48px; min-height:48px; border-radius:16px; padding:0; justify-content:center; background:var(--ink-2); box-shadow:var(--panel-edge); }
body.v2-world #btn-phone span,body.v2-world #btn-phone kbd { display:none; }
body.v2-world #btn-phone svg { width:20px; height:24px; }
body.v2-world #world-tools { display:none; }
body.v2-world #phone-body>#world-tools:not([hidden]) { display:block; position:static; transform:none; width:100%; max-width:none; margin:0; padding:16px; border:0; background:none; box-shadow:none; border-radius:0; overflow:visible; }
body.v2-world #world-tools h3 { margin:0 0 14px; font:600 24px/1.2 var(--f-display); }
body.v2-world .phone-app-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
body.v2-world #world-tools .phone-app-grid button { min-width:0; min-height:60px; padding:10px 5px; white-space:normal; overflow-wrap:anywhere; border:1px solid var(--line-soft); background:var(--ink-3); font:500 12px/1.3 var(--f-body); }
body.v2-world #world-tools .phone-app-grid button:hover { border-color:var(--gold); background:var(--ink); color:var(--bone); }
body.v2-world .phone-world-settings { display:flex; align-items:center; gap:10px; justify-content:space-between; margin-top:18px; padding-top:14px; border-top:1px solid var(--line-soft); font:500 12px var(--f-body); }
body.v2-world .phone-pace { min-width:0; max-width:65%; }
body.v2-world .phone-pace .movement-pace { position:static; display:block; max-width:100%; margin:0; }
body.v2-world .phone-pace select { min-height:44px; max-width:100%; width:100%; font:500 16px var(--f-body); }
body.v2-world .phone-sound-settings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; }
body.v2-world .phone-sound-settings>button { display:flex; align-items:center; justify-content:flex-start; gap:8px; width:100%; height:auto; min-height:48px; min-width:0; padding:8px; text-align:left; white-space:normal; overflow-wrap:anywhere; font:500 11px/1.4 var(--f-body); }
body.v2-world .phone-sound-settings svg { flex:none; width:16px; height:16px; }
body.v2-world .phone-sound-settings .v2-music-toggle::before { display:none; }
body.v2-world .phone-tour-controls { display:flex; gap:8px; margin-top:10px; }
body.v2-world .phone-tour-controls[hidden] { display:none; }
body.v2-world .phone-tour-controls button { flex:1; white-space:normal; }
body.v2-world #phone,body.v2-world:has(#music-player:not([hidden])) #phone { right:16px; bottom:calc(76px + var(--safe-b)); width:min(370px,calc(100vw - 32px)); height:min(620px,calc(var(--app-height,100dvh) - 96px - var(--safe-t,0px) - var(--safe-b))); max-height:calc(var(--app-height,100dvh) - 96px - var(--safe-t,0px) - var(--safe-b)); }
body.v2-world #phone .phone-head { gap:6px; }
body.v2-world #phone-home { flex:none; min-width:44px; min-height:44px; padding:8px; color:var(--gold); font:500 12px var(--f-body); }
body.v2-world #phone .phone-brand { min-width:0; font-size:13px; letter-spacing:.05em; }
body.v2-world #phone .phone-time { display:none; }
body.v2-world #phone.phone-home-view .phone-nav { display:none; }
body.v2-world #music-player { display:grid; grid-template-columns:44px minmax(0,1fr); align-items:center; gap:0; position:fixed; left:16px; right:auto; bottom:calc(16px + var(--safe-b)); width:min(280px,calc(100vw - 96px)); max-width:calc(100vw - 32px); min-height:48px; padding:0; border:1px solid var(--line); border-radius:14px; background:var(--ink-2); box-shadow:var(--panel-edge); z-index:24; }
body.v2-world #music-player[hidden] { display:none; }
body.v2-world #player-toggle { width:44px; min-width:44px; height:48px; min-height:44px; color:var(--gold); font:600 16px var(--f-body); }
body.v2-world #player-details { min-width:0; width:100%; min-height:48px; padding:6px 12px 6px 3px; display:flex; flex-direction:column; justify-content:center; gap:2px; align-items:flex-start; text-align:left; }
body.v2-world #player-title { display:block; width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font:500 12px/1.4 var(--f-body); }
body.v2-world #player-status { display:block; width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font:500 8px/1.4 var(--f-mono); letter-spacing:.02em; color:var(--bone-dim); }
body.v2-world #music-player.is-expanded { width:min(340px,calc(100vw - 32px)); z-index:96; }
body.v2-world #player-expanded { grid-column:1/-1; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; border-top:1px solid var(--line-soft); padding:10px; max-height:calc(var(--app-height,100dvh) - 110px - var(--safe-b)); overflow:auto; }
body.v2-world #player-expanded[hidden] { display:none; }
body.v2-world #player-expanded audio { width:100%; height:44px; grid-column:1/-1; grid-row:auto; }
body.v2-world #player-expanded button { min-width:44px; min-height:44px; padding:8px; white-space:normal; font:500 11px var(--f-body); }
body.v2-world #player-collapse { grid-column:1/-1; justify-self:end; }
body.v2-world #player-release { display:block; }
body.v2-world:has(#music-player:not([hidden])) .panel-body { padding-bottom:80px; }
body.v2-world:has(#music-player:not([hidden])) #creator { bottom:0; }
body.v2-world .touch-act,body.v2-world:has(#music-player:not([hidden])) .touch-act { bottom:calc(82px + var(--safe-b)); max-width:calc(100% - 32px); font-size:16px; }
body.v2-world .arrival-soundtrack { top:calc(48px + var(--safe-t,0px)); right:16px; max-width:calc(100vw - 32px); }
body.v2-world :is(#btn-phone,#player-toggle,#player-details,#player-expanded button,#phone button,#phone select):focus-visible { outline:2px solid var(--gold); outline-offset:-3px; }
@media(max-width:360px) { body.v2-world #phone-body>#world-tools:not([hidden]) { padding:12px; } body.v2-world .phone-app-grid { gap:6px; } body.v2-world .phone-sound-settings { grid-template-columns:minmax(0,1fr); } }
@media(max-height:430px) { body.v2-world #phone,body.v2-world:has(#music-player:not([hidden])) #phone { bottom:calc(70px + var(--safe-b)); height:calc(var(--app-height,100dvh) - 80px - var(--safe-b)); max-height:calc(var(--app-height,100dvh) - 80px - var(--safe-b)); } }

/* The phone holds the next action and the full directory; the street stays clear. */
body.v2-world .phone-home-intro { margin:0 0 14px; font:400 12px/1.5 var(--f-body); color:var(--bone-dim); overflow-wrap:anywhere; }
body.v2-world .phone-continue { padding:0 0 14px; margin-bottom:14px; border-bottom:1px solid var(--line-soft); }
body.v2-world .phone-continue[hidden],body.v2-world .phone-sound-settings>[hidden] { display:none; }
body.v2-world .phone-continue h4 { margin:0 0 7px; font:500 11px var(--f-mono); color:var(--gold); }
body.v2-world #world-tools .phone-continue button { display:block; width:100%; min-width:0; min-height:44px; padding:8px 10px; margin:4px 0; text-align:left; white-space:normal; overflow-wrap:anywhere; background:var(--ink); border:1px solid var(--line-soft); font:500 12px/1.4 var(--f-body); }
body.v2-world .phone-sound-settings { grid-template-columns:minmax(0,1fr); }
body.v2-world .phone-preference { display:grid; grid-template-columns:minmax(0,1fr) minmax(90px,45%); align-items:center; gap:8px; margin-top:12px; font:500 12px/1.4 var(--f-body); min-width:0; }
body.v2-world .phone-preference select { width:100%; min-width:0; min-height:44px; font:400 16px var(--f-body); }
body.v2-world .phone-preference small { grid-column:1/-1; color:var(--bone-dim); font:400 11px/1.5 var(--f-body); overflow-wrap:anywhere; }
body.v2-world .phone-queue { grid-template-columns:24px minmax(0,1fr); min-height:44px; cursor:pointer; }
body.v2-world .phone-queue input { width:20px; height:20px; margin:0; accent-color:var(--gold); }
body.v2-world .phone-help { margin-top:14px; border-top:1px solid var(--line-soft); font:400 12px/1.5 var(--f-body); }
body.v2-world .phone-help summary { min-height:44px; display:flex; align-items:center; color:var(--gold); cursor:pointer; }
body.v2-world .phone-help p { margin:0 0 10px; color:var(--bone-dim); overflow-wrap:anywhere; }
body.v2-world #player-stop { width:auto; height:auto; border:1px solid var(--line); color:var(--bone-dim); }
body.v2-world #player-collapse { width:auto; height:auto; color:var(--gold); }
body.v2-world .phone-preference:focus-within,body.v2-world .phone-help summary:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
body.v2-world .phone-continue summary { min-height:44px; padding:10px 0; cursor:pointer; color:var(--bone-dim); font:500 11px/1.5 var(--f-body); }

body.v2-world .records-sleeve-notes { margin:12px 0; padding:0 12px; border:1px solid var(--line-soft); border-radius:var(--r); color:var(--bone-dim); min-width:0; }
body.v2-world .records-sleeve-notes summary { min-height:44px; padding:12px 0; color:var(--gold); font:500 13px/1.4 var(--f-body); cursor:pointer; }
body.v2-world .records-sleeve-notes :is(p,li,small) { overflow-wrap:anywhere; }
body.v2-world .records-sleeve-notes ol { padding-left:24px; font:400 12px/1.6 var(--f-body); }
body.v2-world .records-sleeve-notes summary:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
body.v2-world #phone .living-album-head .v2-music-toggle { display:none; }
