:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  --bg: #090e0b;
  --rail: #101914;
  --card: #131f18;
  --border: #2c4436;
  --text: #eef3f7;
  --muted: #acb9c7;
  --accent: #9af85c;
  --accent-text: #10271f;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); display: grid; grid-template-columns: 218px 1fr; min-height: 100vh; }
body.violet { --accent: #c6a8ff; --accent-text: #291b42; --card: #201c2b; --rail: #1a1724; --border: #403552; }
.rail { padding: 28px 16px 20px; background: var(--rail); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 32px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand small, .eyebrow { display: block; font-size: .7rem; letter-spacing: .15em; color: var(--accent); font-weight: 700; }
.brand-symbol { width: 36px; height: 36px; object-fit: contain; flex: none; }
.brand-logo { display: block; width: min(210px, 55vw); height: auto; object-fit: contain; }
.brand-splash { min-height: 55vh; display: grid; justify-items: center; align-content: center; }
.brand-splash .brand-logo { width: min(310px, 65vw); }
.brand-hero .brand-logo { float: right; width: min(165px, 30vw); margin-left: 1rem; }
.brand-hero::after { content: ""; display: block; clear: both; }
#catalog-admin { width: min(680px, 100%); }
#catalog-admin textarea { width: 100%; font: inherit; color: var(--text); background: var(--rail); border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
#catalog-preview-text { white-space: pre-line; }
nav { display: grid; gap: 6px; }
nav button { text-align: left; border-color: transparent; background: transparent; }
nav button[aria-current] { background: var(--card); border-color: var(--border); color: var(--accent); }
.rail-footer { display: grid; gap: 9px; margin-top: auto; font-size: .75rem; color: var(--muted); }
.badge { padding: 6px 10px; border-radius: 20px; width: fit-content; border: 1px solid var(--border); }
.badge.online { color: var(--accent); }
main { padding: clamp(20px, 5vw, 64px); min-width: 0; max-width: 1400px; width: 100%; }
h1 { margin: 8px 0; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { margin: 0 0 8px; font-size: 1.1rem; overflow-wrap: anywhere; }
p { color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.hero { background: linear-gradient(125deg, #173323, #0b1711 85%); border: 1px solid var(--border); border-radius: 18px; padding: clamp(22px, 5vw, 52px); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; margin: 18px 0; }
article, #history, #preferences { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 17px; }
section > article + article { margin-top: 14px; }
button, input, select, .primary { font: inherit; border: 1px solid var(--border); background: var(--rail); color: var(--text); border-radius: 8px; padding: 9px 12px; }
button, .primary { cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .55; cursor: wait; }
.primary { background: var(--accent); color: var(--accent-text); font-weight: 650; text-decoration: none; display: inline-block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toolbar, form, .path { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
label, .stack { display: grid; gap: 8px; }
.check { display: flex; align-items: center; }
.path input, #message input { flex: 1; min-width: 0; }
#preferences { max-width: 660px; align-items: start; }
#preferences > button { justify-self: start; }
#history { padding-left: 32px; min-height: 200px; height: 46vh; overflow-y: auto; overflow-wrap: anywhere; }
#history li { padding: 6px 0; white-space: pre-wrap; }
time { color: var(--muted); font-size: .78rem; }
#notice { background: var(--card); border: 1px solid var(--accent); border-radius: 8px; padding: 10px 13px; margin-bottom: 12px; }
.cover { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--bg); border-radius: 8px; }
code { overflow-wrap: anywhere; }
fieldset { display: grid; gap: 12px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
legend { color: var(--accent); }
.profile-link { padding: 2px 4px; border: 0; background: transparent; color: var(--accent); text-align: left; font-weight: 600; }
.profile-link:hover { text-decoration: underline; }
.match { margin-block: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.match > button { margin: 4px; }
.trophy-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 16px; }
.trophy { display: grid; justify-items: center; align-content: center; gap: 10px; white-space: normal; padding: 22px; background: linear-gradient(140deg,#122b1d,#09130e); }
.trophy-gold { color: #f0ca61; box-shadow: 0 0 22px #d7b34222; border-color: #aa8932; }
.trophy-silver { color: #c4d4df; border-color: #718591; }
.trophy-symbol { width: 120px; height: 120px; }
.trophy-silver .trophy-symbol { width: 78px; height: 78px; }
.trophy-symbol svg { width: 100%; height: 100%; }
.trophy span,.trophy small { color: var(--text); overflow-wrap: anywhere; }
.trophy-details { width: min(90vw,650px); max-height: 85vh; overflow: auto; background: var(--card); color: var(--text); border: 1px solid var(--accent); border-radius: 14px; }
.trophy-details p { overflow-wrap: anywhere; }
.trophy-details::backdrop { background: #000b; }
.legends { margin-block: 24px; padding: 20px; border: 1px solid #274d37; border-radius: 18px; background: linear-gradient(145deg,#122c1e,#0a130e); }
.legends h2 { margin-top: 0; }
.legends-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; align-items: center; }
.legend { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 10px; min-width: 0; border: 1px solid currentColor; background: #0a1710; overflow: hidden; }
.legend-1 { color: #f2ce64; min-height: 290px; box-shadow: 0 0 26px #b68b1720; }
.legend-2 { color: #d1e1eb; min-height: 260px; }
.legend-3 { color: #c89770; min-height: 250px; }
.legend-crown { position: relative; width: 64px; height: 52px; flex-shrink: 0; }
.legend-1 .legend-crown { width: 84px; height: 68px; }
.legend-crown svg { width: 100%; height: 100%; filter: drop-shadow(0 0 5px currentColor); }
.legend-1 .legend-crown svg { animation: legend-pulse 3.4s ease-in-out infinite; }
.legend-2 .legend-crown svg { animation: legend-pulse 5s ease-in-out infinite; }
.legend-avatar { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin-top: 8px; border: 2px solid currentColor; border-radius: 50%; overflow: hidden; background: #163724; font-weight: 700; }
.legend-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.legend-info { width: 100%; }
.legend-info h3 { margin: 5px 0; color: #edf5ee; overflow-wrap: anywhere; }
.legend-place { font-size: .8rem; margin: 10px 0 0; text-transform: uppercase; letter-spacing: .08em; }
.legend-time { font-size: 1.3rem; font-weight: 700; margin: 8px 0; }
.legend-favorite { color: #b3c8b8; font-size: .83rem; overflow-wrap: anywhere; margin: 0; }
.legend-particle { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffe9a3; animation: legend-drift 4s ease-out infinite; pointer-events: none; }
.particle-0 { left: 8%; top: 50%; }
.particle-1 { left: 85%; top: 70%; animation-delay: -1.3s; }
.particle-2 { left: 48%; top: 10%; animation-delay: -2.6s; }
@keyframes legend-pulse { 0%,100% { opacity: .8; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes legend-drift { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: .8; } 100% { opacity: 0; transform: translateY(-20px); } }
@media (prefers-reduced-motion: reduce) { .legend-crown svg,.legend-particle { animation: none !important; } .legend-particle { display: none; } }
@media (max-width: 900px) { .legends-grid { grid-template-columns: 1fr 1fr; } .legend-1 { grid-column: 1 / -1; } }
@media (max-width: 500px) { .legends-grid { grid-template-columns: 1fr; } .legend-1 { grid-column: auto; } .legend { min-height: 0; } }
@media (max-width: 700px) {
  body { display: block; }
  .rail { position: static; height: auto; gap: 12px; }
  nav { display: flex; flex-wrap: wrap; }
  .rail-footer { display: flex; align-items: center; }
}



.room-player{position:relative;background:#050907;border:1px solid #175537;border-radius:12px;overflow:hidden}.room-identity{position:relative;z-index:2;padding:10px 14px;background:#061b11ed;color:#adffc7;font-weight:700}.room-player:fullscreen{display:flex;flex-direction:column;width:100%;height:100%;border-radius:0}.room-player:fullscreen video{flex:1;min-height:0;object-fit:contain}.room-player .toolbar{padding:8px}
