/* Вторая Москва в Second Life. Оформление в духе клиента SL 1.x (2007–2008).
   Светлая тема — скин Silver (SL 1.20, июль 2008), тёмная — классический серый.
   Цвета заданы через light-dark(): по умолчанию следуют системной теме, data-theme переопределяет. */
@font-face { font-family: "DejaVu Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("./assets/fonts/dejavu-sans400.woff2") format("woff2"); }
@font-face { font-family: "DejaVu Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("./assets/fonts/dejavu-sans700.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --font: "DejaVu Sans", Verdana, Tahoma, "Lucida Grande", sans-serif;

  --bg: light-dark(#c3cee0, #1b1c1f);
  --bg-grid: light-dark(rgba(60, 84, 128, .10), rgba(255, 255, 255, .035));
  --ink: light-dark(#18202f, #e7e8eb);
  --ink-2: light-dark(#47536b, #a9acb5);
  --link: light-dark(#164f98, #8fbcff);
  --accent: light-dark(#2d66ae, #6ea3ea);
  --warn: light-dark(#8a4b00, #ffd25e);

  --panel-a: light-dark(#f6f8fc, #424247);
  --panel-b: light-dark(#dfe6f1, #2d2d31);
  --panel-line: light-dark(#6f7f9c, #0f0f11);
  --panel-hi: light-dark(rgba(255, 255, 255, .9), rgba(255, 255, 255, .13));
  --panel-shadow: light-dark(rgba(30, 48, 84, .35), rgba(0, 0, 0, .6));
  --title-a: light-dark(#cbd8ee, #5a5a60);
  --title-b: light-dark(#93a8cd, #35353a);
  --title-ink: light-dark(#10203c, #f4f4f6);
  --field: light-dark(#ffffff, #1d1d21);
  --field-line: light-dark(#8696b3, #0f0f11);
  --btn-a: light-dark(#ffffff, #606067);
  --btn-b: light-dark(#cbd5e6, #3a3a40);
  --sel: light-dark(#d4e2f8, #3d5a8c);
  --row-alt: light-dark(rgba(60, 84, 128, .06), rgba(255, 255, 255, .035));
  --chat-bg: light-dark(rgba(255, 255, 255, .72), rgba(18, 18, 20, .72));
  --chat-ink: light-dark(#18202f, #f0f0f2);
  --toolbar-bg: light-dark(rgba(214, 223, 238, .94), rgba(34, 34, 38, .94));

  /* scene palette */
  --sky-a: light-dark(#7fb3ea, #0b1230);
  --sky-b: light-dark(#bcd9f4, #2b2a63);
  --sky-c: light-dark(#e9f1f8, #8a5a78);
  --gr-a: light-dark(#a7afb9, #3d3e4a);
  --gr-b: light-dark(#8e97a3, #2a2b34);
  --paver: light-dark(rgba(60, 70, 90, .22), rgba(255, 255, 255, .08));
  --far: light-dark(#8aa0b8, #20224a);
  --cloud: light-dark(#ffffff, #3a3b68);
  --cloud-hi: light-dark(#e3eefa, #4a4b7e);
  --br-l: light-dark(#b24a37, #7d3326);
  --br-d: light-dark(#8e3829, #5a2419);
  --br-t: light-dark(#c9604a, #94402f);
  --wh-l: light-dark(#f1e9d8, #b9b09e);
  --wh-d: light-dark(#d8cdb6, #8d8575);
  --sp-l: light-dark(#2f7a52, #245a3d);
  --sp-d: light-dark(#225a3c, #183d29);
  --win: light-dark(#27324a, #f2d27a);
  --gate: light-dark(#3b2a24, #1c1210);
  --gold: light-dark(#e8b730, #f2c94a);
  --gold-d: light-dark(#c4931c, #c9a232);
  --gold-l: light-dark(#fbe08a, #ffe8a0);
  --gr-lt: light-dark(#8d3329, #6c2b24);
  --stone-l: light-dark(#6d4a43, #4a3633);
  --stone-d: light-dark(#4d3330, #33241f);
  --stone-t: light-dark(#8a6258, #5d4540);
  --star: light-dark(#e63a2e, #ff5547);
  --sun: light-dark(#fff4c2, transparent);
  --sun-poly: light-dark(#ffd96a, transparent);
  --moon: light-dark(transparent, #eae6c8);
  --stars: light-dark(transparent, #fffbe0);
  --fw: light-dark(transparent, #ffd36a);
  --fw2: light-dark(transparent, #ff7a9c);
  --fw3: light-dark(transparent, #7ad8ff);
  --beam: light-dark(transparent, rgba(255, 244, 190, .09));
  --skin1: #e7b58f; --skin2: #c98e68; --skin3: #f0cfb0;
  --hair: #3a2a22;
  --legs: light-dark(#2f3b57, #1f2840);
  --coat-a: #3d6fb5; --coat-b: #b8382f; --coat-c: #4f8a5b; --coat-d: #e0a52f; --coat-e: #7a4aa8; --coat-s: #e8e8f0;
  --dm-g1: #2f8f4a; --dm-g2: #46b063; --dm-g3: #7ad492;
  --dm-r1: #a8281f; --dm-r2: #d24234; --dm-r3: #f0806e;
  --dm-y1: #d9a21f; --dm-y2: #f3c64a; --dm-y3: #fbe795;
  --dm-b1: #2e5fa8; --dm-b2: #4c86d6; --dm-b3: #92bcf2;
  --gizmo-x: #e03a3a; --gizmo-y: #38b24a; --gizmo-z: #3b6fe0;
  --sel-line: #ffd400;
  --focus: light-dark(#0b5cd5, #9cc4ff);
  --lab-h: var(--lab-bar-h, 56px);
  --menu-h: 40px;
  --tool-h: 62px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--lab-h) + var(--menu-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  padding-bottom: calc(var(--tool-h) + 18px);
  background-color: var(--bg);
  background-image: linear-gradient(var(--bg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; }
p { margin: 0 0 .6em; }
h1, h2, h3, h4 { font-family: var(--font); margin: 0; line-height: 1.2; }

/* ---------- верхнее меню клиента ---------- */
.menubar {
  position: sticky; top: var(--lab-h); z-index: 60;
  background: linear-gradient(var(--panel-a), var(--panel-b));
  border-bottom: 1px solid var(--panel-line);
  box-shadow: 0 1px 0 var(--panel-hi) inset, 0 2px 8px var(--panel-shadow);
}
.menubar__in { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: var(--menu-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.menubar__items { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; height: 100%; align-items: stretch; }
.menubar__items::-webkit-scrollbar { display: none; }
.menubar__items a { display: flex; align-items: center; padding: 0 12px; font-size: 13px; color: var(--ink); text-decoration: none; white-space: nowrap; border-radius: 3px; margin: 4px 0; }
.menubar__items a:hover { background: var(--sel); }
.menubar__items a[aria-current="true"] { background: var(--sel); box-shadow: inset 0 -2px 0 var(--accent); font-weight: 700; }
.menubar__loc { margin: 0; font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.menubar__loc .dot { width: 8px; height: 8px; background: #3fae5a; border: 1px solid rgba(0,0,0,.35); }
@media (max-width: 900px) { .menubar__loc { display: none; } }

/* ---------- окна ---------- */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.shell > .win, .shell > .people, .shell > .videos { margin-top: 28px; }
.win {
  position: relative; display: block;
  background: linear-gradient(var(--panel-a), var(--panel-b));
  border: 1px solid var(--panel-line);
  border-radius: 7px;
  box-shadow: 0 1px 0 var(--panel-hi) inset, 0 8px 24px var(--panel-shadow);
  overflow: hidden;
}
.win__bar {
  display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 10px 0 8px;
  background: linear-gradient(var(--title-a), var(--title-b));
  border-bottom: 1px solid var(--panel-line);
  box-shadow: 0 1px 0 var(--panel-hi) inset;
  color: var(--title-ink);
}
.win__x { width: 13px; height: 13px; border: 1px solid var(--panel-line); border-radius: 3px; background: linear-gradient(var(--btn-a), var(--btn-b)); position: relative; flex: none; }
.win__x::before, .win__x::after { content: ""; position: absolute; left: 2px; right: 2px; top: 5px; height: 1.5px; background: var(--title-ink); opacity: .7; transform: rotate(45deg); }
.win__x::after { transform: rotate(-45deg); }
.win__bar h2, .win__bar h3, .win__t { font-size: 13px; font-weight: 700; letter-spacing: .01em; margin: 0; color: var(--title-ink); }
.win__sub { margin-left: auto; font-size: 11.5px; opacity: .75; }
.win__grip { margin-left: auto; width: 20px; height: 8px; background: repeating-linear-gradient(90deg, var(--panel-line) 0 1px, transparent 1px 4px); opacity: .45; }
.win__sub + .win__grip { margin-left: 8px; }
.win__body { padding: 18px 20px 20px; }
.sec-h { font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin: 0 0 8px; }
.sec-p { color: var(--ink-2); max-width: 70ch; margin-bottom: 16px; }
.mini { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 700; margin: 18px 0 8px; }
.cap { font-size: 12px; color: var(--ink-2); margin: 8px 0 0; }

/* ---------- метки достоверности ---------- */
.tag { display: inline-block; vertical-align: 1px; padding: 1px 7px; font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: .01em; border: 1px solid; border-radius: 3px; white-space: nowrap; cursor: help; }
.tag--pn { color: light-dark(#14502a, #9fe3b4); background: light-dark(#dff2e5, #1c3a29); border-color: light-dark(#7bb690, #3f7a55); }
.tag--vv { color: light-dark(#1e4a7a, #a9cdf5); background: light-dark(#e0ecfa, #1d3350); border-color: light-dark(#86a9d1, #4a76ab); }
.tag--sp { color: light-dark(#7a4300, #ffd48a); background: light-dark(#fbebd2, #45331a); border-color: light-dark(#d1a566, #8b6a30); }
.tag--pr { color: light-dark(#5a3a7a, #d7bdf2); background: light-dark(#eee3f8, #36274a); border-color: light-dark(#a98cc9, #7a5aa0); }
.tag--dp { color: light-dark(#6d2d2d, #f3b5b5); background: light-dark(#f8e0e0, #462525); border-color: light-dark(#c98a8a, #8c4a4a); }
.tag--nf { color: light-dark(#3d4558, #c4c8d2); background: light-dark(#e6e9ef, #34363d); border-color: light-dark(#9aa3b5, #666b77); }
.src { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12.5px; margin: 2px 0 0; }
.src a { white-space: nowrap; }
.src::before { content: "Источник:"; color: var(--ink-2); }
.vid .src::before, .inv .src::before { content: none; }

/* ---------- мир (hero) ---------- */
.world { position: relative; border-bottom: 1px solid var(--panel-line); overflow: hidden; background: var(--sky-b); }
.scene { display: block; width: 100%; height: auto; }
.scene--hero { min-height: 420px; max-height: 640px; height: clamp(420px, 46vw, 640px); }
.world__ui { position: absolute; inset: 0; max-width: 1180px; margin: 0 auto; padding: 22px 16px; display: grid; grid-template-columns: minmax(300px, 440px) 1fr 196px; grid-template-rows: auto 1fr auto; gap: 14px; pointer-events: none; }
.world__ui > * { pointer-events: auto; }
.win--title { grid-column: 1; grid-row: 1; background: linear-gradient(light-dark(rgba(246,248,252,.94), rgba(66,66,71,.92)), light-dark(rgba(223,230,241,.94), rgba(45,45,49,.92))); backdrop-filter: blur(3px); }
.win--title h1 { font-size: clamp(26px, 3.3vw, 38px); font-weight: 700; letter-spacing: -.01em; margin: 2px 0 10px; }
.eyebrow { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); font-weight: 700; }
.lead { margin: 0 0 14px; color: var(--ink); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.facts li { display: flex; flex-direction: column; padding: 7px 8px; background: var(--field); border: 1px solid var(--field-line); border-radius: 3px; min-width: 0; }
.facts b { font-size: 13px; line-height: 1.2; }
.facts span { font-size: 11px; color: var(--ink-2); line-height: 1.25; }
.win--chat { grid-column: 1; grid-row: 3; background: var(--chat-bg); backdrop-filter: blur(4px); max-width: 520px; }
.win--chat .win__body { padding: 10px 12px; }
.chatlog { list-style: none; margin: 0; padding: 0; font-size: 12.5px; line-height: 1.45; color: var(--chat-ink); }
.chatlog li { margin: 0 0 4px; }
.chatlog time { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chatlog .sys { color: var(--warn); }
.win--map { grid-column: 3; grid-row: 1; align-self: start; background: var(--chat-bg); backdrop-filter: blur(4px); }
.win--map .win__body { padding: 8px 8px 10px; }
.win--map .cap { margin-top: 6px; line-height: 1.3; }
.mm { display: block; width: 100%; height: auto; border: 1px solid var(--panel-line); }
.mm-bg { fill: light-dark(#7e8a9c, #1b1d22); } .mm-grid { stroke: light-dark(rgba(255,255,255,.3), rgba(255,255,255,.06)); stroke-width: 1; }
.mm-sea { fill: light-dark(#6f9bd0, #1f3350); }
.mm-b1 { fill: light-dark(#a24b3a, #7a3a2d); } .mm-b2 { fill: light-dark(#b9bfca, #4b4d58); } .mm-b3 { fill: light-dark(#d6a23a, #8b6f2c); } .mm-b4 { fill: light-dark(#6aa57a, #3a6b4a); } .mm-b5 { fill: light-dark(#e6d7a2, #7d7650); }
.mm-t { font: 700 9px var(--font); fill: light-dark(#10151f, #f0f0f2); }
.mm-me { fill: #3fe05f; stroke: #0b3a16; } .mm-av { fill: #fff; stroke: rgba(0,0,0,.4); stroke-width: .5; }
.note-strip { margin: 18px 0 0; padding: 10px 14px; font-size: 13px; color: var(--ink-2); border: 1px dashed var(--panel-line); border-radius: 5px; background: var(--chat-bg); }
.note-strip b { color: var(--ink); }
.legend ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px 18px; }
.legend li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 12.5px; color: var(--ink-2); }

/* ---------- сцена: цвета ---------- */
.sk-a { stop-color: var(--sky-a); } .sk-b { stop-color: var(--sky-b); } .sk-c { stop-color: var(--sky-c); }
.gr-a { stop-color: var(--gr-a); } .gr-b { stop-color: var(--gr-b); }
.ns-a { stop-color: #090d26; } .ns-b { stop-color: #3a2c5e; } .ng-a { stop-color: #2b2c3a; } .ng-b { stop-color: #1a1b24; }
.ground { fill: url(#grd); } .paver { stroke: var(--paver); stroke-width: 1; }
.far { fill: var(--far); } .cloud { fill: var(--cloud); } .cloud-hi { fill: var(--cloud-hi); }
.br-l { fill: var(--br-l); } .br-d { fill: var(--br-d); } .br-t { fill: var(--br-t); }
.wh-l { fill: var(--wh-l); } .wh-d { fill: var(--wh-d); }
.sp-l { fill: var(--sp-l); } .sp-d { fill: var(--sp-d); }
.pane { fill: var(--win); }
.gate { fill: var(--gate); } .clock { fill: #f7f3e6; stroke: #3b2a24; stroke-width: 1.5; } .hand { stroke: #222; fill: none; }
.gold { fill: var(--gold); } .gold-d { fill: var(--gold-d); } .gold-l { fill: var(--gold-l); } .star { fill: var(--star); }
.gr-l { fill: var(--stone-l); } .gr-d { fill: var(--stone-d); } .gr-t { fill: var(--stone-t); }
.ledge { fill: rgba(0,0,0,.18); }
.sun { fill: var(--sun); } .sun-poly { fill: var(--sun-poly); } .moon { fill: var(--moon); } .starfield { fill: var(--stars); }
.fw1 { stroke: var(--fw); stroke-width: 2; } .fw1-dot { fill: var(--fw); } .fw2 { stroke: var(--fw2); stroke-width: 2; } .fw2-dot { fill: var(--fw2); } .fw3 { stroke: var(--fw3); stroke-width: 2; } .fw3-dot { fill: var(--fw3); }
.beam { fill: var(--beam); }
.dm-g1 { fill: var(--dm-g1); } .dm-g2 { fill: var(--dm-g2); } .dm-g3 { fill: var(--dm-g3); }
.dm-r1 { fill: var(--dm-r1); } .dm-r2 { fill: var(--dm-r2); } .dm-r3 { fill: var(--dm-r3); }
.dm-y1 { fill: var(--dm-y1); } .dm-y2 { fill: var(--dm-y2); } .dm-y3 { fill: var(--dm-y3); }
.dm-b1 { fill: var(--dm-b1); } .dm-b2 { fill: var(--dm-b2); } .dm-b3 { fill: var(--dm-b3); }
.skin1 { fill: var(--skin1); } .skin2 { fill: var(--skin2); } .skin3 { fill: var(--skin3); } .hair { fill: var(--hair); } .legs { fill: var(--legs); }
.coat-a { fill: var(--coat-a); } .coat-b { fill: var(--coat-b); } .coat-c { fill: var(--coat-c); } .coat-d { fill: var(--coat-d); } .coat-e { fill: var(--coat-e); } .coat-s { fill: var(--coat-s); }
.pole { fill: #9aa0ab; } .flag { fill: #d63a2e; }
.sel { fill: none; stroke: var(--sel-line); stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(255,212,0,.8)); }
.ax-x { stroke: var(--gizmo-x); stroke-width: 4; } .ax-y { stroke: var(--gizmo-y); stroke-width: 4; } .ax-z { stroke: var(--gizmo-z); stroke-width: 4; }
.ax-xh { fill: var(--gizmo-x); } .ax-yh { fill: var(--gizmo-y); } .ax-zh { fill: var(--gizmo-z); }
.nametag rect { fill: rgba(10, 12, 20, .62); } .nametag text { fill: #fff; font: 700 12px var(--font); }
.nstar { fill: #fffbe0; } .nfar { fill: #1d1b44; } .nground { fill: url(#ngrd); } .npaver { stroke: rgba(255,255,255,.07); }
.nbeam { fill: rgba(255, 244, 190, .10); }
.night .br-l { fill: #6a2b20; } .night .br-d { fill: #4a1d15; } .night .br-t { fill: #7e3629; } .night .wh-l { fill: #9d9585; } .night .wh-d { fill: #756e61; }
.night .pane { fill: #f2d27a; } .night .sp-l { fill: #1f4e35; } .night .sp-d { fill: #153424; }
.st-l { fill: #55576a; } .st-d { fill: #3b3d4d; } .st-t { fill: #6c6f85; }
.led { fill: #1b2a5e; stroke: #8fb4ff; stroke-width: 1.5; } .led-t { fill: #fff; font: 700 22px var(--font); } .led-s { fill: #bcd0ff; font: 400 14px var(--font); }
.trk { fill: #6fb4ff; opacity: .85; } .mic { fill: #3b3d4d; stroke: #9aa0ab; stroke-width: 2; }

/* ---------- чат: хронология ---------- */
.chat { list-style: none; margin: 0; padding: 0; background: var(--chat-bg); border: 1px solid var(--field-line); border-radius: 4px; max-height: none; }
.chat__year { padding: 6px 14px; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--ink-2); background: var(--row-alt); border-top: 1px solid var(--field-line); border-bottom: 1px solid var(--field-line); }
.chat__year:first-child { border-top: 0; }
.chat__row { display: grid; grid-template-columns: 150px 1fr; gap: 6px 18px; padding: 10px 14px; border-bottom: 1px solid light-dark(rgba(60,84,128,.14), rgba(255,255,255,.07)); }
.chat__row:last-child { border-bottom: 0; }
.chat__row time { font-size: 13px; font-weight: 700; color: var(--warn); font-variant-numeric: tabular-nums; }
.chat__row p { margin: 0 0 3px; }
.chat__row[hidden] { display: none; }

/* ---------- вкладки ---------- */
.tabs { display: flex; gap: 3px; flex-wrap: wrap; border-bottom: 1px solid var(--panel-line); margin: 0 -2px; padding: 0 2px; }
.tabs button { font: 400 13px var(--font); padding: 7px 14px 6px; color: var(--ink); background: linear-gradient(var(--btn-a), var(--btn-b)); border: 1px solid var(--panel-line); border-bottom: 0; border-radius: 6px 6px 0 0; cursor: pointer; margin-bottom: -1px; position: relative; top: 2px; }
.tabs button[aria-selected="true"] { background: var(--panel-a); font-weight: 700; top: 1px; padding-bottom: 8px; box-shadow: inset 0 2px 0 var(--accent); }
.tabs button:hover { background: var(--sel); }
.tabpanels { padding: 16px 4px 4px; min-height: 120px; }
.tabpanels [role="tabpanel"] p { max-width: 80ch; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.chips li { padding: 3px 10px; font-size: 12.5px; background: var(--field); border: 1px solid var(--field-line); border-radius: 12px; }

/* ---------- профили ---------- */
.people__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.profile__head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--field-line); }
.profile__fig { width: 76px; height: auto; flex: none; background: linear-gradient(var(--sky-b), var(--sky-c)); border: 1px solid var(--field-line); border-radius: 4px; }
.profile__nick { margin: 0; font-size: 20px; font-weight: 700; }
.profile__sub { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.claims { list-style: none; margin: 0; padding: 0; }
.claims li { padding: 9px 0; border-bottom: 1px solid light-dark(rgba(60,84,128,.14), rgba(255,255,255,.07)); }
.claims li:last-child { border-bottom: 0; }
.claims p { margin: 0 0 3px; font-size: 14px; }

/* ---------- концерт ---------- */
.win--concert .win__body { padding-top: 14px; }
.stagewrap { position: relative; border: 1px solid var(--panel-line); border-radius: 4px; overflow: hidden; background: #0b0f26; }
.scene--concert { width: 100%; height: clamp(260px, 38vw, 460px); }
.ticket { position: absolute; left: 16px; top: 16px; padding: 10px 14px; background: rgba(12, 14, 26, .78); color: #f3f4f8; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; backdrop-filter: blur(3px); max-width: 260px; }
.ticket p { margin: 0 0 4px; font-size: 13px; line-height: 1.35; }
.ticket__d b { font-size: 20px; }
.ticket__t { color: #ffd25e; font-weight: 700; }
.ticket__p { color: #c9cde0; font-size: 12px !important; margin: 0 !important; }
.twin { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; margin: 18px 0; }
.twin > div:not(.twin__arrow) { background: var(--field); border: 1px solid var(--field-line); border-radius: 4px; padding: 6px 14px 14px; }
.twin .mini { margin-top: 10px; }
.twin__arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); text-align: center; max-width: 120px; }
.scene--studio, .scene--stage { width: 100%; height: auto; max-height: 150px; border-radius: 3px; margin-top: 4px; }
.kvlist { margin: 0; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 18px; padding: 10px 0; border-top: 1px solid var(--field-line); }
.kv dt { font-weight: 700; font-size: 13px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.kv dd { margin: 0; }
.kv p { margin: 0 0 3px; }

/* ---------- видео ---------- */
.videos__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.vid .win__body { padding: 12px; }
.vid__screen { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--panel-line); overflow: hidden; margin-bottom: 12px; }
.vid__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid__screen--wait { background: #14161d; }
.bars { position: absolute; inset: 0; display: flex; opacity: .5; }
.bars i { flex: 1; } .bars i:nth-child(1) { background: #c9c9c9; } .bars i:nth-child(2) { background: #c8c32f; } .bars i:nth-child(3) { background: #33c4c2; } .bars i:nth-child(4) { background: #3ac13a; } .bars i:nth-child(5) { background: #c13ac1; } .bars i:nth-child(6) { background: #c23a3a; } .bars i:nth-child(7) { background: #3a3ac2; }
.vid__msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; color: #fff; background: rgba(10, 12, 20, .72); }
.vid__msg b { font-size: 16px; } .vid__msg span { font-size: 12.5px; color: #cdd1de; max-width: 34ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 16px; font: 700 13px var(--font); color: var(--ink) !important; text-decoration: none; background: linear-gradient(var(--btn-a), var(--btn-b)); border: 1px solid var(--panel-line); border-radius: 5px; box-shadow: 0 1px 0 var(--panel-hi) inset; }
.btn:hover { background: var(--sel); }
.vid h4 { font-size: 15px; margin: 0 0 4px; }
.vid__meta { color: var(--ink-2); font-size: 12.5px; margin: 0 0 6px; }
.vid .win__body > p { font-size: 13.5px; }

/* ---------- инвентарь ---------- */
.inv__tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 10px; }
.field { flex: 1 1 260px; }
.field input { width: 100%; min-height: 38px; padding: 0 12px; font: 400 14px var(--font); color: var(--ink); background: var(--field); border: 1px solid var(--field-line); border-radius: 4px; box-shadow: 0 1px 2px var(--panel-shadow) inset; }
.chip { font: 400 12.5px var(--font); min-height: 32px; padding: 0 12px; color: var(--ink); background: linear-gradient(var(--btn-a), var(--btn-b)); border: 1px solid var(--panel-line); border-radius: 4px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--sel); font-weight: 700; box-shadow: inset 0 2px 3px var(--panel-shadow); }
.inv__tools .chips { gap: 5px; }
.inv__count { font-size: 12.5px; color: var(--ink-2); margin: 0 0 8px; min-height: 1.2em; }
.inv { background: var(--field); border: 1px solid var(--field-line); border-radius: 4px; }
.inv__folder { border-bottom: 1px solid var(--field-line); }
.inv__folder:last-child { border-bottom: 0; }
.inv__folder summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-weight: 700; font-size: 13.5px; background: var(--row-alt); list-style: none; }
.inv__folder summary::-webkit-details-marker { display: none; }
.inv__folder summary::before { content: ""; width: 0; height: 0; border-left: 5px solid var(--ink-2); border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s; }
.inv__folder[open] > summary::before { transform: rotate(90deg); }
.inv__folder summary em { margin-left: auto; font-style: normal; font-weight: 400; color: var(--ink-2); font-size: 12px; }
.inv__folder ul { list-style: none; margin: 0; padding: 0; }
.inv__item { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: start; padding: 8px 12px 8px 24px; border-top: 1px solid light-dark(rgba(60,84,128,.12), rgba(255,255,255,.06)); }
.inv__item:nth-child(even) { background: var(--row-alt); }
.inv__item .ico { margin-top: 3px; color: var(--ink-2); }
.inv__item a { font-weight: 700; font-size: 14px; }
.inv__item p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); }
.inv__o { color: var(--ink); }
.inv__c { font-size: 11px; color: var(--ink-2); border: 1px solid var(--field-line); border-radius: 3px; padding: 1px 7px; white-space: nowrap; margin-top: 3px; }
.inv__item[hidden], .inv__folder[hidden] { display: none; }

/* ---------- судьба, оговорки ---------- */
.fate { list-style: none; margin: 0 0 12px; padding: 0 0 0 4px; border-left: 3px solid var(--field-line); margin-left: 6px; }
.fate li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 8px 0 8px 14px; position: relative; }
.fate li::before { content: ""; position: absolute; left: -9px; top: 15px; width: 9px; height: 9px; background: var(--accent); border: 1px solid var(--panel-line); transform: rotate(45deg); }
.fate b { color: var(--warn); font-variant-numeric: tabular-nums; }
.fate p { margin: 0 0 3px; }
.fate__note { font-size: 13.5px; color: var(--ink-2); }
.alert { display: flex; gap: 16px; padding: 14px 16px; background: var(--field); border: 1px solid var(--field-line); border-left: 5px solid #e0a52f; border-radius: 4px; margin-bottom: 18px; }
.alert__ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font: 700 22px var(--font); color: #3b2a00; background: linear-gradient(#ffe083, #e0a52f); border: 1px solid #8a6414; border-radius: 50%; }
.alert h3 { font-size: 15px; margin-bottom: 4px; }
.alert p { margin: 0; max-width: 90ch; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.plain { margin: 0; padding-left: 20px; } .plain li { margin: 0 0 8px; font-size: 14px; }

.smfoot { margin: 34px 0 0; padding: 16px 0 6px; border-top: 1px solid var(--panel-line); font-size: 12.5px; color: var(--ink-2); max-width: 90ch; }

/* ---------- нижняя панель инструментов ---------- */
.toolbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: linear-gradient(var(--panel-a), var(--toolbar-bg)); background-color: var(--toolbar-bg); border-top: 1px solid var(--panel-line); box-shadow: 0 -1px 0 var(--panel-hi) inset, 0 -4px 16px var(--panel-shadow); backdrop-filter: blur(6px); }
.toolbar__in { max-width: 760px; margin: 0 auto; padding: 6px 10px; display: flex; gap: 6px; justify-content: center; }
.toolbar a { flex: 1 1 0; max-width: 112px; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: var(--ink); text-decoration: none; background: linear-gradient(var(--btn-a), var(--btn-b)); border: 1px solid var(--panel-line); border-radius: 5px; box-shadow: 0 1px 0 var(--panel-hi) inset; }
.toolbar a:hover { background: var(--sel); }
.toolbar a[aria-current="true"] { background: var(--sel); box-shadow: inset 0 2px 4px var(--panel-shadow); font-weight: 700; }

/* ---------- адаптив ---------- */
@media (max-width: 1020px) {
  .world__ui { grid-template-columns: minmax(280px, 420px) 1fr 200px; }
  .videos__grid { grid-template-columns: 1fr; }
  .people__grid, .cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .world { background: var(--bg); }
  .scene--hero { height: 250px; min-height: 250px; }
  .world__ui { position: static; display: flex; flex-direction: column; padding: 14px 16px 0; margin: 0 auto; }
  .win--map { display: none; }
  .win--chat { max-width: none; }
  .win--title { backdrop-filter: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .twin { grid-template-columns: 1fr; }
  .twin__arrow { flex-direction: row; max-width: none; justify-content: flex-start; transform: rotate(90deg); transform-origin: left center; display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .chat__row { grid-template-columns: 1fr; gap: 2px; }
  .fate li { grid-template-columns: 1fr; gap: 0; }
  .ticket { position: static; max-width: none; border-radius: 0; border-width: 0 0 1px; background: #101326; }
  .shell > .win, .shell > .people, .shell > .videos { margin-top: 20px; }
  .win__body { padding: 14px 14px 16px; }
  .inv__item { grid-template-columns: 18px 1fr; padding-left: 12px; }
  .inv__c { grid-column: 2; justify-self: start; margin-top: 4px; }
}
@media (max-width: 520px) {
  body { font-size: 14.5px; }
  .toolbar__in { padding: 5px 6px; gap: 4px; }
  .toolbar a { font-size: 10.5px; min-height: 44px; }
  .toolbar a .ico { width: 18px; height: 18px; }
  .menubar__items a { padding: 0 10px; }
  .alert { flex-direction: column; gap: 10px; }
  .tabs button { padding: 7px 10px 6px; }
}
