html, body { margin: 0; background: #07060a; color: #e8e2f4; font: 14px/1.4 "Segoe UI", system-ui, sans-serif; overflow: hidden; }
.site-topbar .mute { margin-left: auto; margin-right: 8px; padding: 0 10px; border: 1px solid #6c5a8c; border-radius: 999px; }
#app { height: calc(100vh - 52px); height: calc(100dvh - 52px); display: flex; align-items: center; justify-content: center; padding: 8px; box-sizing: border-box; }
#wrap { display: flex; gap: 10px; height: 100%; max-width: 100%; align-items: stretch; }
#game {
  display: block; height: 100%; max-height: calc((100vw - 300px) * 528 / 768); aspect-ratio: 768 / 528; max-width: calc(100vw - 300px);
  background: #000; border: 1px solid #2a2238; border-radius: 6px; outline: none; cursor: pointer; align-self: center;
}
#game:focus-visible { border-color: #9d8cc9; }
#chat {
  width: 272px; flex: none; display: flex; flex-direction: column; background: #0f0c16; border: 1px solid #2a2238; border-radius: 6px;
  max-height: calc((100vw - 300px) * 528 / 768); align-self: center; height: 100%; min-height: 0;
}
#chat header { padding: 8px 10px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid #2a2238; display: flex; gap: 6px; align-items: center; }
#chat header .live { color: #ff4a4a; }
#chat header #viewers { margin-left: auto; color: #b9a9d9; font-weight: 600; text-transform: none; letter-spacing: 0; }
#chatlog { list-style: none; margin: 0; padding: 6px 10px; overflow-y: auto; flex: 1; min-height: 0; font-size: 13px; scrollbar-width: thin; }
#chatlog li { padding: 2px 0; word-wrap: break-word; animation: pop .18s ease-out; }
#chatlog li.sys { color: #8f80b3; text-align: center; font-size: 11px; padding: 6px 0; }
#chatlog li.tip { background: rgba(93, 224, 138, .07); border-radius: 3px; padding: 2px 4px; }
#chatlog li.banned { color: #6e6488; text-decoration: line-through; }
#chatlog li.banned b { color: #6e6488 !important; }
#chatlog .stamp { display: inline-block; margin-left: 6px; padding: 0 5px; border: 2px solid #e0262b; color: #ff4045; font-weight: 900; font-size: 10px; transform: rotate(-6deg); text-decoration: none; }
#chat footer { padding: 7px 10px; font-size: 11px; color: #9a8fb5; border-top: 1px solid #2a2238; }
@keyframes pop { from { transform: translateY(4px); opacity: 0; } }
@media (max-width: 900px) {
  #chat { display: none; }
  #game { max-width: 100%; max-height: calc(100vw * 528 / 768); }
}
