.mr-lobby-page, .mr-room-page {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background:
    radial-gradient(1100px 480px at 50% -220px, var(--wash-a), transparent 62%),
    radial-gradient(900px 400px at 108% 32%, var(--wash-b), transparent 55%),
    var(--bg);
  z-index: 100;
}

.mr-root {
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 0;
}

.mr-ic { display: inline-flex; line-height: 0; }

.mr-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: var(--bg);
  z-index: 10;
  flex-shrink: 0;
}

.mr-hdr-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}
.mr-hdr-btn:active { transform: scale(.92); }
.mr-hdr-btn svg { width: 18px; height: 18px; }

.mr-hdr-mid {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
}

.mr-roomname {
  font-size: 15px; font-weight: 800;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 45%;
}

.mr-code-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 11px;
  border-radius: 10px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
}
.mr-code-chip:active { transform: scale(.95); }
.mr-code-chip svg { width: 12px; height: 12px; opacity: .55; }

.mr-code-val {
  font-size: 12px; font-weight: 800; letter-spacing: 2px;
  color: var(--text);
}

.mr-online-wrap {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.mr-online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
}
.mr-online-num {
  font-size: 13px; font-weight: 800;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.mr-centered {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; padding: 20px;
}

.mr-screen {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex; flex-direction: column;
  gap: 18px;
  padding: 10px 18px calc(24px + var(--tabbar-h));
}

.mr-hero {
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 26px 2px 2px;
}

.mr-hero-eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: 3px;
  color: var(--accent);
}

.mr-hero-title {
  font-size: 32px; font-weight: 800; letter-spacing: -.5px;
  color: var(--text);
  line-height: 1.1;
}

.mr-live-strip {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
}
.mr-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
}
.mr-live-num {
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mr-live-label { letter-spacing: 1px; }
.mr-live-sep { opacity: .35; }

.mr-section-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2.5px;
  color: var(--text-muted);
}

.mr-resume-wrap { display: flex; }

.mr-resume-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 14px 14px 14px 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}

.mr-resume-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.mr-resume-title {
  font-size: 15px; font-weight: 800;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mr-resume-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
}
.mr-resume-code {
  color: var(--accent);
  letter-spacing: 1.5px;
  font-weight: 800;
}
.mr-resume-sep { opacity: .4; }
.mr-resume-host {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-size: 8px; font-weight: 800; letter-spacing: 1px;
}
.mr-resume-now {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mr-resume-btn {
  flex-shrink: 0;
  padding: 12px 24px;
  border: none; border-radius: 14px;
  background: var(--gradient);
  color: var(--on-accent);
  font-family: Manrope, sans-serif;
  font-size: 13px; font-weight: 800; letter-spacing: 1.5px;
  cursor: pointer;
}
.mr-resume-btn:active { transform: scale(.96); }

.mr-create-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 17px;
  border: none; border-radius: 16px;
  background: var(--gradient);
  color: var(--on-accent);
  font-family: Manrope, sans-serif;
  font-size: 15px; font-weight: 800; letter-spacing: 2px;
  cursor: pointer;
  transition: transform .12s ease;
}
.mr-create-btn:active { transform: scale(.98); }
.mr-create-btn.busy { opacity: .7; pointer-events: none; }
.mr-create-btn svg { width: 18px; height: 18px; }

.mr-join-section {
  display: flex; flex-direction: column; gap: 8px;
}

.mr-join-row {
  display: flex; gap: 8px;
}

.mr-join-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 18px; font-weight: 800; letter-spacing: 4px;
  text-align: center;
  font-family: Manrope, sans-serif;
  outline: none;
  text-transform: uppercase;
}
.mr-join-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mr-join-btn {
  padding: 14px 26px;
  border: 1px solid rgba(var(--accent-rgb), .35);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: Manrope, sans-serif;
  font-size: 14px; font-weight: 800; letter-spacing: 1.5px;
  cursor: pointer;
}
.mr-join-btn:active { transform: scale(.97); }
.mr-join-btn.busy { opacity: .7; pointer-events: none; }

.mr-guide {
  display: flex; flex-direction: column;
  gap: 0;
  padding: 2px 2px 8px;
}

.mr-guide-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--border);
}
.mr-guide-row:last-of-type { border-bottom: none; }

.mr-g-cmd {
  flex-shrink: 0;
  width: 64px;
  padding: 4px 0;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), .25);
  font-family: 'Courier New', monospace;
  font-size: 12px; font-weight: 700;
  color: var(--accent);
  text-align: center;
}

.mr-g-desc {
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
}

.mr-guide-note {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  opacity: .7;
  padding-top: 12px;
}

.mr-name-overlay {
  position: fixed; inset: 0;
  z-index: 130;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay);
  backdrop-filter: blur(8px);
  padding: 24px;
}

.mr-name-card {
  width: 100%; max-width: 320px;
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px 20px;
  border-radius: 20px;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: mr-card-in .25s ease-out;
}

.mr-name-title {
  font-size: 16px; font-weight: 800;
  color: var(--text);
  text-align: center;
}

.mr-name-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 15px; font-weight: 700;
  font-family: Manrope, sans-serif;
  outline: none;
  text-align: center;
}
.mr-name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mr-name-btns, .mr-dialog-btns {
  display: flex; gap: 8px;
  margin-top: 4px;
}

.mr-name-btn, .mr-dialog-btn {
  flex: 1;
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: var(--chip-bg);
  color: var(--text);
  font-family: Manrope, sans-serif;
  font-size: 13px; font-weight: 800; letter-spacing: 1.5px;
  cursor: pointer;
  transition: transform .12s ease;
}
.mr-name-btn:active, .mr-dialog-btn:active { transform: scale(.97); }

.mr-name-btn-primary, .mr-dialog-btn-primary {
  border: none;
  background: var(--gradient);
  color: var(--on-accent);
}

.mr-dialog-btn-danger {
  border: 1px solid rgba(var(--danger-rgb), .4);
  background: var(--danger-soft);
  color: var(--danger);
}

.mr-dialog-btn-cancel {
  border: 1px solid var(--border-strong);
  background: var(--chip-bg);
  color: var(--text);
}

.mr-stage {
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 0;
  padding: 14px 16px;
  gap: 12px;
}

.mr-screen2 {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 18px;
  background: #000;
  overflow: hidden;
  display: grid; place-items: center;
  flex-shrink: 0;
}

.mr-thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .3s;
  cursor: pointer;
}
.mr-screen2.has-thumb .mr-thumb { opacity: 1; }

.mr-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  display: none;
  background: #000;
}
.mr-screen2.video-mode .mr-video { display: block; }
.mr-screen2.video-mode .mr-thumb { display: none; }

.mr-spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 42px; height: 42px;
  margin: -21px 0 0 -21px;
  display: none;
  z-index: 4;
}
.mr-spinner.show { display: block; }
.mr-spinner i {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.18);
  border-top-color: #fff;
  animation: mr-rotate .9s linear infinite;
}
@keyframes mr-rotate { to { transform: rotate(360deg); } }

.mr-fs-btn {
  position: absolute;
  bottom: 10px; right: 10px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  cursor: pointer;
  z-index: 3;
}
.mr-fs-btn:active { transform: scale(.92); }
.mr-fs-btn svg { width: 16px; height: 16px; }

.mr-songinfo {
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 7px;
}

.mr-song-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}

.mr-song-title {
  font-size: 17px; font-weight: 800;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: left;
}

.mr-song-head .mr-p-dur {
  font-size: 12px;
}

.mr-p-progress {
  display: flex; align-items: center; gap: 10px;
}

.mr-p-time, .mr-p-dur {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.mr-p-bar {
  flex: 1; height: 4px;
  border-radius: 3px;
  background: var(--border-strong);
  overflow: hidden;
}

.mr-p-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient);
  transition: width 1s linear;
}

.mr-controls {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  align-self: center;
}

.mr-ctrl {
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform .12s ease, opacity .15s ease;
}
.mr-ctrl:active { transform: scale(.9); }
.mr-ctrl svg { width: 22px; height: 22px; }
.mr-ctrl.busy { opacity: .35; pointer-events: none; }

.mr-ctrl-pause {
  width: 64px; height: 64px;
  background: var(--gradient);
  color: var(--on-accent);
}
.mr-ctrl-pause svg { width: 26px; height: 26px; }

.mr-ctrl-end { color: var(--danger); }

.mr-queue-wrap {
  flex: 1;
  min-height: 90px;
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 12px 6px;
}

.mr-queue-head {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 6px;
}

.mr-queue-label {
  font-size: 11px; font-weight: 800; letter-spacing: 2.5px;
  color: var(--text-muted);
}

.mr-queue-count {
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  color: var(--accent);
}

.mr-queue {
  flex: 1;
  min-height: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.mr-queue::-webkit-scrollbar { display: none; }

.mr-queue-item {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--border);
}
.mr-queue-item:last-child { border-bottom: none; }

.mr-qi-num {
  flex-shrink: 0;
  width: 18px;
  font-size: 12px; font-weight: 800;
  color: var(--text-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.mr-qi-title {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mr-qi-v {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  font-size: 8px; font-weight: 800; letter-spacing: 1px;
  color: var(--gold);
}

.mr-qi-dur {
  flex-shrink: 0;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.mr-queue-empty {
  flex: 1;
  min-height: 64px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  padding: 14px 10px;
}

.mr-queue-empty-title {
  font-size: 14px; font-weight: 800;
  color: var(--text-muted);
}

.mr-queue-empty-sub {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  opacity: .75;
}

.mr-chat-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(84%, 360px);
  z-index: 120;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--border-strong);
  border-radius: 22px 0 0 22px;
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.2,.9,.3,1);
  box-shadow: var(--shadow);
}

.mr-chat-panel.open { transform: translateX(0); }

.mr-chat-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px 12px;
  min-height: 0;
}

.mr-ava {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
  color: #fff;
  background: hsl(var(--ava-h, 210), 42%, 40%);
}

.mr-ava-bot {
  background: var(--gradient);
  color: var(--on-accent);
  font-size: 15px;
}

.mr-msg {
  display: flex; align-items: flex-end; gap: 8px;
  max-width: 88%;
  align-self: flex-start;
}
.mr-msg.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.mr-msg-body {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 16px 16px 16px 5px;
  background: var(--card);
  border: 1px solid var(--border);
}
.mr-msg.mine .mr-msg-body {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), .2);
  border-radius: 16px 16px 5px 16px;
}

.mr-msg-name {
  font-size: 11px; font-weight: 800;
  color: var(--text-muted);
}
.mr-msg.mine .mr-msg-name { opacity: .7; }

.mr-msg-text {
  font-size: 14px; font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

.mr-lumine {
  display: flex; align-items: flex-start; gap: 8px;
  align-self: stretch;
}

.mr-lumine-body {
  display: flex; flex-direction: column; gap: 4px;
  flex: 1; min-width: 0;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.mr-lumine-badge {
  display: inline-flex;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), .28);
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  color: var(--accent);
}

.mr-lumine-line {
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-word;
}

.mr-l-song .mr-lumine-line { color: var(--text); font-weight: 700; }
.mr-l-skip .mr-lumine-badge { color: var(--gold); border-color: var(--gold-border); background: var(--gold-soft); }
.mr-l-pause .mr-lumine-badge { color: var(--gold); border-color: var(--gold-border); background: var(--gold-soft); }
.mr-l-end .mr-lumine-badge { color: var(--danger); border-color: rgba(var(--danger-rgb), .3); background: var(--danger-soft); }
.mr-l-searching .mr-lumine-line { opacity: .8; font-style: italic; }
.mr-l-system { opacity: .9; }

.mr-composer {
  flex-shrink: 0;
  display: flex; gap: 8px;
  padding: 10px 12px 8px;
}

.mr-chat-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--input-bg);
  color: var(--text);
  font-size: 16px;
  font-family: Manrope, sans-serif;
  outline: none;
}
.mr-chat-input:focus {
  border-color: var(--accent);
}

.mr-chat-send {
  width: 46px; height: 46px;
  border: none; border-radius: 50%;
  background: var(--gradient);
  color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.mr-chat-send:active { transform: scale(.92); }
.mr-chat-send svg { width: 19px; height: 19px; }

.mr-chat-endbar {
  flex-shrink: 0;
  height: 44px;
  margin: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--chip-bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
}
.mr-chat-endbar:active { transform: scale(.98); }
.mr-chat-endbar svg { width: 16px; height: 16px; transform: rotate(180deg); }

.mr-chat-fab {
  position: fixed;
  right: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px;
  border: none; border-radius: 18px;
  background: var(--gradient);
  color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 110;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
}
.mr-chat-fab:active { transform: scale(.92); }
.mr-chat-fab svg { width: 22px; height: 22px; }

.mr-chat-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 10px; font-weight: 800;
}

.mr-fs-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: #000;
  display: flex; flex-direction: column;
  animation: mr-fs-in .22s ease;
}
@keyframes mr-fs-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mr-fs-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 14px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 14px;
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  z-index: 6;
}
.mr-fs-close:active { transform: scale(.9); }
.mr-fs-close svg { width: 20px; height: 20px; }

.mr-fs-title {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 68px; right: 18px;
  height: 44px;
  display: flex; align-items: center;
  font-size: 13px; font-weight: 800;
  color: rgba(255,255,255,.92);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  z-index: 5;
  pointer-events: none;
}

.mr-fs-media {
  flex: 1;
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
}

.mr-fs-media .mr-video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}

.mr-fs-thumb {
  max-width: min(88%, 460px);
  max-height: 60%;
  border-radius: 20px;
}

.mr-fs-hint {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: 0; right: 0;
  text-align: center;
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: rgba(255,255,255,.6);
  z-index: 5;
  pointer-events: none;
}

@media (orientation: landscape) and (max-height: 500px) {
  .mr-room-page .mr-header,
  .mr-room-page .mr-queue-wrap { display: none; }
  .mr-room-page .mr-stage { padding: 6px 10px; gap: 8px; }
  .mr-room-page .mr-screen2 {
    flex: 1; aspect-ratio: auto;
    border-radius: 12px;
  }
  .mr-room-page .mr-songinfo { gap: 3px; }
  .mr-room-page .mr-song-title { font-size: 13px; }
  .mr-room-page .mr-controls { padding: 4px 8px; gap: 6px; align-self: stretch; border-radius: 24px; }
  .mr-room-page .mr-ctrl { width: 42px; height: 42px; }
  .mr-room-page .mr-ctrl svg { width: 18px; height: 18px; }
  .mr-room-page .mr-ctrl-pause { width: 48px; height: 48px; }
  .mr-room-page .mr-ctrl-pause svg { width: 20px; height: 20px; }
  .mr-chat-fab { width: 44px; height: 44px; bottom: 12px; right: 12px; border-radius: 14px; }
}

.mr-exit-overlay {
  position: fixed; inset: 0;
  z-index: 130;
  display: flex; align-items: center; justify-content: center;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  padding: 24px;
}

.mr-exit-card {
  width: 100%; max-width: 300px;
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px 18px;
  border-radius: 20px;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  animation: mr-card-in .25s ease-out;
}

.mr-exit-title {
  font-size: 16px; font-weight: 800;
  color: var(--text);
  text-align: center;
}

.mr-exit-sub {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

@keyframes mr-card-in {
  0% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.mr-bubble {
  position: fixed;
  top: 0; left: 0;
  width: 60px; height: 60px;
  z-index: 145;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transition: opacity .3s ease;
}

.mr-bubble * { -webkit-tap-highlight-color: transparent; }

.mr-bubble.idle { opacity: .8; }
.mr-bubble.grab { transition: none; opacity: 1; }

.mr-bub-ring {
  position: absolute;
  inset: -4px;
  transform: rotate(-90deg);
  pointer-events: none;
}
.mr-bub-ring .track { stroke: var(--border-strong); opacity: .6; }
.mr-bub-ring .prog {
  stroke: var(--accent);
  transition: stroke-dashoffset .6s linear;
}

.mr-bub-disc {
  position: absolute; inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform .15s ease;
}
.mr-bubble.grab .mr-bub-disc { transform: scale(.93); }

.mr-bub-thumb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}

.mr-bub-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.45) 100%);
}

.mr-bub-note {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 1px 5px rgba(0,0,0,.75);
  pointer-events: none;
}

.mr-bub-panel {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  right: calc(100% + 14px);
  display: none;
  align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 18px;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.mr-bubble.flip .mr-bub-panel { right: auto; left: calc(100% + 14px); }
.mr-bubble.open .mr-bub-panel { display: flex; }

.mr-bub-btn {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: var(--gradient);
  color: var(--on-accent);
  cursor: pointer;
}
.mr-bub-btn:active { transform: scale(.9); }
.mr-bub-btn svg { width: 17px; height: 17px; }

.mr-bub-title {
  max-width: 130px;
  font-size: 12px; font-weight: 800;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis;
}

.mr-bub-room {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--chip-bg);
  color: var(--text);
  cursor: pointer;
}
.mr-bub-room:active { transform: scale(.9); }
.mr-bub-room svg { width: 15px; height: 15px; }

/* ==========================================================================
   Lumine Music — chat v2
   ========================================================================== */

.mr-chat-panel {
  width: min(88%, 380px);
  background:
    radial-gradient(520px 300px at 100% -60px,
      rgba(var(--accent-rgb), .18), transparent 68%),
    var(--bg);
  border-left: 1px solid rgba(var(--accent-rgb), .18);
  border-radius: 26px 0 0 26px;
  box-shadow: -22px 0 60px rgba(0, 0, 0, .30);
}

.mr-chat-head {
  gap: 10px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 15px 12px;
  background: linear-gradient(180deg,
    rgba(var(--accent-rgb), .13), transparent);
  border-bottom: 1px solid var(--border);
}

.mr-chat-identity {
  display: flex; align-items: center; gap: 11px;
  flex: 1; min-width: 0;
}

.mr-chat-bot-ava {
  position: relative;
  flex-shrink: 0;
  width: 43px; height: 43px;
  display: grid; place-items: center;
  border-radius: 15px;
  background: var(--gradient);
  color: var(--on-accent);
  box-shadow:
    0 9px 22px -10px rgba(var(--accent-rgb), .90),
    inset 0 1px 0 rgba(255, 255, 255, .26);
}
.mr-chat-bot-ava svg { width: 20px; height: 20px; }

.mr-chat-online-dot {
  position: absolute;
  right: -2px; bottom: -2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(var(--success-rgb), .12);
}

.mr-chat-head-copy {
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}

.mr-chat-title {
  font-size: 15px; font-weight: 800; letter-spacing: -.15px;
  color: var(--text);
}

.mr-chat-sub {
  display: flex; align-items: center; gap: 6px;
  font-size: 9px; font-weight: 800; letter-spacing: .55px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.mr-chat-live-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--success);
  animation: mr-chat-live 2.2s ease-in-out infinite;
}

@keyframes mr-chat-live {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(var(--success-rgb), .35); }
  50% { opacity: .55; box-shadow: 0 0 0 4px rgba(var(--success-rgb), 0); }
}

.mr-chat-close {
  flex-shrink: 0;
  background: var(--chip-bg);
  border: 1px solid var(--border);
}

.mr-chat-list {
  gap: 13px;
  padding: 14px 12px 10px;
  background-image: radial-gradient(
    circle at 1px 1px, rgba(var(--accent-rgb), .045) 1px, transparent 0);
  background-size: 20px 20px;
}

.mr-chat-empty {
  margin: auto 4px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 9px;
  padding: 24px 18px;
  border-radius: 20px;
  border: 1px dashed rgba(var(--accent-rgb), .24);
  background: linear-gradient(155deg,
    rgba(var(--accent-rgb), .07), transparent 70%);
}

.mr-chat-empty-orb {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 19px;
  background: var(--gradient);
  color: var(--on-accent);
  box-shadow: 0 12px 26px -12px rgba(var(--accent-rgb), .90);
}
.mr-chat-empty-orb svg { width: 26px; height: 26px; }

.mr-chat-empty-title {
  font-size: 16px; font-weight: 800; letter-spacing: -.2px;
  color: var(--text);
}

.mr-chat-empty-text {
  max-width: 230px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
  color: var(--text-muted);
}

.mr-chat-empty-hint {
  margin-top: 2px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), .20);
  color: var(--accent);
  font-size: 10px; font-weight: 800;
}

.mr-ava {
  width: 30px; height: 30px;
  border-radius: 11px;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}

.mr-msg {
  max-width: 91%;
  gap: 7px;
  animation: mr-chat-in .22s ease both;
}

.mr-msg-body {
  gap: 3px;
  padding: 8px 12px 9px;
  border-radius: 15px 15px 15px 5px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px -14px rgba(0, 0, 0, .55);
}

.mr-msg.mine .mr-msg-body {
  background: var(--gradient);
  border-color: transparent;
  border-radius: 15px 15px 5px 15px;
  box-shadow: 0 10px 24px -14px rgba(var(--accent-rgb), .85);
}
.mr-msg.mine .mr-msg-name { color: rgba(255, 255, 255, .74); opacity: 1; }
.mr-msg.mine .mr-msg-time { color: rgba(255, 255, 255, .55); }
.mr-msg.mine .mr-msg-text { color: var(--on-accent); }

.mr-msg-meta {
  display: flex; align-items: center; gap: 6px;
  min-width: 0;
}

.mr-msg-name {
  font-size: 10px; font-weight: 800; letter-spacing: .25px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mr-msg-time {
  font-size: 9px; font-weight: 700;
  color: var(--text-muted);
  opacity: .55;
  font-variant-numeric: tabular-nums;
}

.mr-msg-text {
  font-size: 13.5px; font-weight: 500;
  line-height: 1.42;
}

.mr-lumine {
  gap: 8px;
  animation: mr-chat-in .22s ease both;
}

.mr-lumine-ava {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg,
    rgba(var(--accent-rgb), .24), rgba(var(--accent-rgb), .07));
  border: 1px solid rgba(var(--accent-rgb), .32);
  color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .05);
}
.mr-lumine-ava svg { width: 15px; height: 15px; }

.mr-lumine-body {
  gap: 5px;
  padding: 9px 12px 10px;
  border-radius: 5px 16px 16px 16px;
  background: linear-gradient(150deg,
    rgba(var(--accent-rgb), .085), var(--surface-2) 44%);
  border: 1px solid rgba(var(--accent-rgb), .17);
  box-shadow: 0 8px 22px -18px rgba(0, 0, 0, .75);
}

.mr-lumine-meta {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 1px;
}

.mr-lumine-name {
  font-size: 11px; font-weight: 800; letter-spacing: .2px;
  color: var(--text);
}

.mr-lumine-tag {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), .20);
  color: var(--accent);
  font-size: 7px; font-weight: 800; letter-spacing: 1px;
}

.mr-lumine-time {
  margin-left: auto;
  padding-left: 6px;
  font-size: 8px; font-weight: 700;
  color: var(--text-muted);
  opacity: .5;
  font-variant-numeric: tabular-nums;
}

.mr-lumine-lines {
  display: flex; flex-direction: column; gap: 2px;
}

.mr-lumine-line {
  font-size: 12.5px; font-weight: 600;
  line-height: 1.46;
  color: var(--text-muted);
}

.mr-lumine-gap { height: 3px; }

.mr-lumine-typing {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 0 1px;
}
.mr-lumine-typing i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .35;
  animation: mr-chat-dot 1.15s ease-in-out infinite;
}
.mr-lumine-typing i:nth-child(2) { animation-delay: .15s; }
.mr-lumine-typing i:nth-child(3) { animation-delay: .30s; }

@keyframes mr-chat-dot {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.mr-l-song .mr-lumine-ava {
  color: var(--success);
  background: linear-gradient(145deg,
    rgba(var(--success-rgb), .22), rgba(var(--success-rgb), .06));
  border-color: rgba(var(--success-rgb), .34);
}
.mr-l-song .mr-lumine-body {
  background: linear-gradient(150deg,
    rgba(var(--success-rgb), .11), var(--surface-2) 46%);
  border-color: rgba(var(--success-rgb), .22);
}
.mr-l-song .mr-lumine-line { color: var(--text); font-weight: 700; }

.mr-l-queue .mr-lumine-ava {
  color: var(--accent);
}

.mr-l-pause .mr-lumine-ava,
.mr-l-skip .mr-lumine-ava {
  color: var(--gold);
  background: linear-gradient(145deg,
    rgba(255, 209, 102, .22), rgba(255, 209, 102, .05));
  border-color: var(--gold-border);
}
.mr-l-pause .mr-lumine-body,
.mr-l-skip .mr-lumine-body {
  background: linear-gradient(150deg,
    rgba(255, 209, 102, .08), var(--surface-2) 46%);
  border-color: var(--gold-border);
}

.mr-l-end .mr-lumine-ava,
.mr-l-error .mr-lumine-ava {
  color: var(--danger);
  background: linear-gradient(145deg,
    rgba(var(--danger-rgb), .20), rgba(var(--danger-rgb), .05));
  border-color: rgba(var(--danger-rgb), .30);
}
.mr-l-end .mr-lumine-body,
.mr-l-error .mr-lumine-body {
  background: linear-gradient(150deg,
    rgba(var(--danger-rgb), .08), var(--surface-2) 46%);
  border-color: rgba(var(--danger-rgb), .22);
}
.mr-l-error .mr-lumine-line { color: var(--text); }

.mr-l-welcome .mr-lumine-body,
.mr-l-help .mr-lumine-body {
  border-color: rgba(var(--accent-rgb), .26);
}

.mr-l-searching .mr-lumine-line { opacity: .82; font-style: italic; }
.mr-l-searching .mr-lumine-ava svg { animation: mr-chat-search 1.6s ease-in-out infinite; }

@keyframes mr-chat-search {
  0%, 100% { transform: scale(1); opacity: .85; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes mr-chat-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mr-chat-tools {
  flex-shrink: 0;
  display: flex; gap: 6px;
  padding: 8px 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.mr-chat-tools::-webkit-scrollbar { display: none; }

.mr-quick {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text-muted);
  font-family: Manrope, sans-serif;
  font-size: 10px; font-weight: 800; letter-spacing: .2px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, border-color .12s ease;
}
.mr-quick:active { transform: scale(.96); }
.mr-quick svg { width: 13px; height: 13px; }
.mr-quick:first-child {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), .24);
  color: var(--accent);
}

.mr-composer {
  padding: 8px 12px 8px;
  align-items: center;
}

.mr-chat-input {
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.mr-chat-input:focus {
  border-color: rgba(var(--accent-rgb), .55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mr-chat-input::placeholder { color: var(--text-muted); opacity: .65; }

.mr-chat-send {
  width: 44px; height: 44px;
  border-radius: 15px;
  box-shadow: 0 9px 20px -10px rgba(var(--accent-rgb), .90);
}

.mr-chat-endbar {
  height: 38px;
  margin: 0 12px calc(9px + env(safe-area-inset-bottom, 0px));
  border-radius: 12px;
  background: var(--chip-bg);
  font-size: 9px;
}

.mr-chat-fab {
  width: 56px; height: 56px;
  border-radius: 20px;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .38),
    0 0 0 1px rgba(var(--accent-rgb), .16) inset;
}

/* Bot avatar image used in Lumine messages and the empty state. */
.mr-bot-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
}

.mr-chat-list {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}

.mr-chat-empty-orb {
  overflow: hidden;
  padding: 0;
}

.mr-lumine-ava {
  position: relative;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.mr-lumine-bot-img {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  box-shadow:
    0 5px 14px -8px rgba(0, 0, 0, .65),
    inset 0 0 0 1px rgba(255, 255, 255, .20);
}

.mr-lumine-badge-ic {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: inherit;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .28);
}

.mr-lumine-badge-ic svg {
  width: 9px;
  height: 9px;
}

@media (orientation: landscape) and (max-height: 500px) {
  .mr-chat-panel { width: min(92%, 430px); }
  .mr-chat-fab { width: 44px; height: 44px; bottom: 12px; right: 12px; border-radius: 14px; }
}

/* ============================================================
   MUSIC ROOM — Community landing
   Flat, theme-token surfaces. The lobby sits below the floating
   tabbar and the shared Community drawer.
   ============================================================ */
.mr-lobby-page {
  z-index: 55;
  background: var(--bg);
  padding-bottom: 0;
}

.mrl-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 8px;
  width: 100%; max-width: 520px; margin: 0 auto;
}

.mrl-head .gc-menu-btn {
  width: 40px; height: 40px; flex: 0 0 40px;
}

.mrl-head-title {
  flex: 1; min-width: 0;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px; line-height: 1.2; font-weight: 800;
  letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mrl-scroll {
  flex: 1; min-height: 0;
  width: 100%; max-width: 520px;
  margin: 0 auto;
  padding: 14px 18px calc(30px + var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mrl-scroll::-webkit-scrollbar { display: none; }

.mrl-intro {
  display: flex; flex-direction: column; gap: 5px;
  padding: 2px 0 0;
}
.mrl-intro-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 26px; line-height: 1.15; font-weight: 800;
  letter-spacing: -.4px;
}
.mrl-intro-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px; line-height: 1.45; font-weight: 500;
}

/* Your active room */
.mrl-active-slot { display: flex; }
.mrl-active-slot:empty { display: none; }

.mrl-active-card {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.mrl-active-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.mrl-active-title-row {
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.mrl-active-name {
  min-width: 0;
  color: var(--text);
  font-size: 15px; line-height: 1.3; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mrl-live-badge {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px;
  border: 1px solid rgba(var(--success-rgb), .22);
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 9px; line-height: 1; font-weight: 800;
  letter-spacing: .06em;
}
.mrl-live-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.mrl-active-now {
  color: var(--text-muted);
  font-size: 12px; line-height: 1.35; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mrl-rejoin {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(var(--accent-rgb), .30);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease;
}
.mrl-rejoin:active {
  transform: scale(.97);
  background: var(--hover-soft);
}

/* Create Room */
.mrl-scroll .mr-create-btn {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: inherit;
  font-size: 15px; font-weight: 700; letter-spacing: 0;
  box-shadow: none;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, opacity .15s ease;
}
.mrl-scroll .mr-create-btn:active {
  transform: scale(.985);
  background: var(--accent-hover);
}
.mrl-scroll .mr-create-btn:disabled {
  opacity: .65;
  pointer-events: none;
}
.mrl-scroll .mr-create-btn svg {
  width: 19px; height: 19px;
  stroke-width: 2.2;
}

/* Join with code */
.mrl-join {
  display: flex; flex-direction: column; gap: 8px;
}
.mrl-join-label {
  padding: 0 2px;
  color: var(--text-muted);
  font-size: 12px; line-height: 1.3; font-weight: 600;
}
.mrl-join-row {
  display: flex; align-items: stretch; gap: 8px;
  width: 100%;
}
.mrl-scroll .mr-join-input {
  flex: 1; min-width: 0;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 16px; font-weight: 600; letter-spacing: .02em;
  text-align: left;
  text-transform: uppercase;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.mrl-scroll .mr-join-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.mrl-scroll .mr-join-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mrl-scroll .mr-join-input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}
.mrl-scroll .mr-join-input:disabled { opacity: .7; }

.mrl-scroll .mr-join-btn {
  flex: 0 0 auto;
  min-width: 82px;
  height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(var(--accent-rgb), .32);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 14px; font-weight: 700; letter-spacing: 0;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, opacity .15s ease;
}
.mrl-scroll .mr-join-btn:active {
  transform: scale(.97);
  background: var(--hover-soft);
}
.mrl-scroll .mr-join-btn:disabled {
  opacity: .65;
  cursor: default;
}
.mrl-join-error {
  margin: 0;
  padding: 0 2px;
  color: var(--danger);
  font-size: 12px; line-height: 1.4; font-weight: 600;
}
.mrl-join-error[hidden] { display: none; }

/* Create room dialog */
.mr-name-overlay {
  position: fixed; inset: 0;
  z-index: 130;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--overlay);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: fadeIn .16s ease both;
}
.mr-name-card {
  width: min(100%, 360px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.mr-name-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 19px; line-height: 1.2; font-weight: 800;
  letter-spacing: -.2px;
  text-align: left;
}
.mr-name-sub {
  margin: 6px 0 16px;
  color: var(--text-muted);
  font-size: 12.5px; line-height: 1.45; font-weight: 500;
}
.mr-name-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mr-name-input::placeholder { color: var(--text-muted); }
.mr-name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mr-name-btns {
  display: flex; gap: 8px;
  margin-top: 16px;
}
.mr-name-btns .mr-name-btn {
  flex: 1;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease;
}
.mr-name-btns .mr-name-btn:active { transform: scale(.985); }
.mr-name-btns .mr-name-btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

/* More menu + sheets */
.mr-sheet {
  background: var(--card);
  border-color: var(--border);
}
.mr-sheet-body,
.mr-menu-sheet {
  display: flex; flex-direction: column;
}
.mr-sheet-head {
  padding: 0 2px 2px;
}
.mr-sheet-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 19px; line-height: 1.2; font-weight: 800;
  letter-spacing: -.2px;
}
.mr-sheet-sub {
  margin: 6px 2px 14px;
  color: var(--text-muted);
  font-size: 12.5px; line-height: 1.45;
}

.mr-menu-sheet { padding: 0 0 4px; }
.mr-menu-sheet .mr-sheet-head { padding: 0 2px 10px; }
.mr-menu-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 50px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px; font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.mr-menu-row:last-child { border-bottom: 0; }
.mr-menu-row .ic { color: var(--text-muted); }
.mr-menu-row svg { width: 18px; height: 18px; }
.mr-menu-row:active { color: var(--accent); }
.mr-menu-row:active .ic { color: var(--accent); }

.mr-cmd-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.mr-cmd-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--border);
}
.mr-cmd-row:last-child { border-bottom: 0; }
.mr-cmd-code {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; font-weight: 600;
  text-align: center;
}
.mr-cmd-desc {
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 12.5px; line-height: 1.35;
}
.mr-cmd-note {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px; font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mr-how-list {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex; flex-direction: column; gap: 16px;
}
.mr-how-step {
  display: flex; align-items: flex-start; gap: 12px;
}
.mr-how-num {
  flex: 0 0 26px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px; font-weight: 800;
}
.mr-how-copy h3 {
  margin: 0 0 3px;
  color: var(--text);
  font-size: 13.5px; line-height: 1.3; font-weight: 700;
}
.mr-how-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px; line-height: 1.45;
}
.mr-sheet-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px; line-height: 1.45;
}

@media (max-width: 360px) {
  .mrl-head { padding-left: 14px; padding-right: 14px; }
  .mrl-scroll { padding-left: 14px; padding-right: 14px; gap: 16px; }
  .mrl-scroll .mr-join-btn { min-width: 74px; padding: 0 14px; }
  .mrl-active-card { padding-left: 14px; gap: 10px; }
  .mrl-rejoin { padding: 0 12px; }
}
