:root{
  --bg0:#060914;
  --bg1:#0b1024;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.04);
  --stroke: rgba(255,255,255,.10);
  --stroke2: rgba(255,255,255,.16);
  --text:#eaf0ff;
  --muted: rgba(234,240,255,.72);
  --muted2: rgba(234,240,255,.55);
  --accent:#7c5cff;
  --accent2:#25d0ff;
  --good:#2ee59d;
  --warn:#ffcc66;
  --bad:#ff5c7a;
  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --radius:18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
  min-height:100%;
  overflow-x:hidden;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(124,92,255,.35), transparent 60%),
    radial-gradient(1000px 650px at 90% 0%, rgba(37,208,255,.20), transparent 55%),
    radial-gradient(900px 600px at 50% 120%, rgba(46,229,157,.10), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{color:rgba(176,205,255,.95); text-decoration:none}
a:hover{color:white}
.container{max-width:1040px; margin:0 auto; padding:18px}
.topbar{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(6,9,20,.82), rgba(6,9,20,.55));
  border-bottom:1px solid rgba(255,255,255,.08);
}
.topbar .inner{display:flex; align-items:center; gap:14px; padding:14px 18px; max-width:1040px; margin:0 auto;}
.brand{
  display:flex; align-items:center; gap:10px;
  font-weight:800; letter-spacing:.2px;
}
.logo{
  width:34px; height:34px; border-radius:12px;
  background: url('logo.svg') center/cover no-repeat;
  box-shadow: 0 10px 22px rgba(124,92,255,.28);
}
.nav{display:flex; gap:12px; align-items:center}
.spacer{flex:1}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color: var(--muted);
  font-size:13px;
}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  font-size:13px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.pill.selected{
  border-color: rgba(124,92,255,.55);
  background: rgba(124,92,255,.18);
  color:#efeaff;
  box-shadow: 0 0 0 1px rgba(124,92,255,.35) inset;
}
.dot{width:8px; height:8px; border-radius:99px; background: var(--muted2); box-shadow:0 0 0 3px rgba(255,255,255,.06) inset}
.dot.good{background:var(--good)}
.dot.warn{background:var(--warn)}
.dot.bad{background:var(--bad)}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.soft{box-shadow:none}
.card .pad{padding:18px}
.h1{font-size:28px; margin:0 0 6px; letter-spacing:-.3px}
.h2{font-size:20px; margin:0 0 10px}
.sub{color:var(--muted); margin:0 0 14px; line-height:1.5}
.grid{display:grid; grid-template-columns: repeat(12, 1fr); gap:14px}
.col-4{grid-column: span 4}
.col-6{grid-column: span 6}
.col-12{grid-column: span 12}
@media (max-width:860px){ .col-4{grid-column: span 12} .col-6{grid-column: span 12} .topbar .inner{flex-wrap:wrap} }
.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}
.mono{font-family: ui-monospace, SFMono-Regular, Menlo, monospace}
.muted{color:var(--muted)}
.muted2{color:var(--muted2)}
hr.sep{border:0; border-top:1px solid rgba(255,255,255,.10); margin:14px 0}
input:not([type="checkbox"]):not([type="radio"]),select,textarea{
  width:100%;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
  outline: none;
}
input:not([type="checkbox"]):not([type="radio"]):focus,select:focus,textarea:focus{
  border-color: rgba(124,92,255,.7);
  box-shadow: 0 0 0 4px rgba(124,92,255,.18);
}
.pill input[type="checkbox"],
.pill input[type="radio"]{
  appearance: none;
  -webkit-appearance: none;
  width:18px;
  height:18px;
  margin:0;
  border-radius: 6px;
  border:1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  position: relative;
  flex: 0 0 18px;
}
.pill input[type="radio"]{
  border-radius: 999px;
}
.pill input[type="checkbox"]:checked,
.pill input[type="radio"]:checked{
  border-color: rgba(124,92,255,.95);
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(37,208,255,.8));
}
.pill input[type="checkbox"]:checked::after{
  content:"";
  position:absolute;
  left:5px;
  top:1px;
  width:4px;
  height:9px;
  border:2px solid rgba(255,255,255,.95);
  border-top:0;
  border-left:0;
  transform: rotate(45deg);
}
.pill input[type="radio"]:checked::after{
  content:"";
  position:absolute;
  width:8px;
  height:8px;
  border-radius: 999px;
  inset:4px;
  background:#fff;
}
label:not(.pill){font-size:13px; color:var(--muted); display:block; margin:0 0 6px}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:11px 14px; min-height:44px;
  border-radius:12px; border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight:600;
  line-height:1;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
  user-select:none;
}
.btn:hover{ background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }
.btn:focus-visible{ outline: none; box-shadow: 0 0 0 3px rgba(124,92,255,.32); }
.btn.primary{
  border-color: rgba(124,92,255,.55);
  background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(37,208,255,.75));
}
.btn.primary:hover{filter: brightness(1.05)}
.btn.danger{
  border-color: rgba(255,92,122,.55);
  background: linear-gradient(135deg, rgba(255,92,122,.9), rgba(255,166,102,.65));
}
.btn:disabled{opacity:.55; cursor:not-allowed}
.kbd{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:12px;
  padding:3px 6px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: var(--muted);
}
.toast{
  position:fixed; left:50%; bottom:18px; transform:translateX(-50%);
  background: rgba(10,14,30,.92);
  border:1px solid rgba(255,255,255,.14);
  padding:10px 12px;
  border-radius: 999px;
  color: var(--text);
  display:none;
  box-shadow: var(--shadow);
  font-size:13px;
}
.micBig{
  width:92px; height:92px; border-radius: 28px;
  display:grid; place-items:center;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.14);
}
.micPulse{
  position:relative;
}
.micPulse::after{
  content:"";
  position:absolute; inset:-10px;
  border-radius: 34px;
  background: radial-gradient(circle, rgba(46,229,157,.20), transparent 60%);
  opacity:0;
  transform: scale(.95);
  transition: opacity .18s ease, transform .18s ease;
}
.micPulse.active::after{
  opacity:1;
  transform: scale(1);
  animation: pulse 1.3s ease-in-out infinite;
}
@keyframes pulse{
  0%{opacity:.6; transform: scale(1)}
  70%{opacity:0; transform: scale(1.18)}
  100%{opacity:0; transform: scale(1.18)}
}
.smallNote{font-size:12.5px; color:var(--muted2); line-height:1.45}
.footer{
  padding:18px;
  color:var(--muted2);
  font-size:13px;
  text-align:center;
}
.footer a{color:rgba(176,205,255,.9)}


/* Forms */
.control{ width:100%; }
input, select, textarea{ width:100%; box-sizing:border-box; min-height:44px; }
input[type="checkbox"],
input[type="radio"]{ width:auto; min-height:0; }
select{ appearance:none; background-image: linear-gradient(45deg, transparent 50%, rgba(232,238,252,.7) 50%), linear-gradient(135deg, rgba(232,238,252,.7) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px); background-size: 6px 6px, 6px 6px; background-repeat:no-repeat; padding-right:34px; }

@keyframes glow{0%{filter:blur(0px)}50%{filter:blur(2px)}100%{filter:blur(0px)}}


/* ===== Premium polish patch ===== */

/* Fixed background that doesn't "scroll" */
body{
  min-height:100vh;
  background-attachment: fixed, fixed, fixed, fixed;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(124,92,255,.35), transparent 60%),
    radial-gradient(1000px 650px at 90% 0%, rgba(37,208,255,.20), transparent 55%),
    radial-gradient(900px 600px at 50% 120%, rgba(46,229,157,.10), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* Footer consistently centered */
.footer{
  margin-top:auto;
  display:flex;
  justify-content:center;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.footer .dotSep{opacity:.55}

/* Better select styling (cross-browser) */
select{
  background-color: rgba(255,255,255,.06) !important;
  color: var(--text) !important;
  border:1px solid rgba(255,255,255,.14) !important;
}
select option{ color:#0b1220; }
select:focus{ outline:none; box-shadow:0 0 0 4px rgba(124,92,255,.22); border-color: rgba(124,92,255,.45) !important; }

/* Room list layout */
.roomCard{
  padding:14px 14px 12px 14px;
}
.roomTop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}
.roomId{font-weight:700}
.roomMeta{
  display:grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap:10px;
  margin-top:10px;
}
@media (max-width: 720px){
  .roomMeta{ grid-template-columns: 1fr; }
}
.kv{ background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:14px; padding:10px 10px; }
.kv .k{ font-size:12px; color:var(--muted2); margin-bottom:4px; }
.kv .v{ font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size:13.5px; color:var(--text); }

/* Action buttons row */
.roomActions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:12px; }
.iconBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px; height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.iconBtn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22); }
.iconBtn:active{ transform: translateY(0px) scale(.98); }
.iconBtn svg{ width:18px; height:18px; opacity:.92; }

/* Toasts */
.toastHost{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:center;
  pointer-events:none;
}
.toast{
  pointer-events:auto;
  min-width: min(520px, calc(100vw - 28px));
  max-width: min(680px, calc(100vw - 28px));
  background: rgba(10,14,30,.82);
  border:1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  display:flex;
  gap:10px;
  align-items:flex-start;
  animation: toastIn .22s ease-out;
}
@keyframes toastIn{
  from{ opacity:0; transform: translateY(10px) scale(.98); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}
.toast .tTitle{ font-weight:700; font-size:13.5px; line-height:1.25; }
.toast .tMsg{ font-size:13.5px; color:var(--muted); margin-top:2px; }
.toast .tIcon{ margin-top:2px; width:18px; height:18px; flex:0 0 auto; }
.toast.ok{ border-color: rgba(46,229,157,.26); }
.toast.err{ border-color: rgba(255,92,122,.26); }
.toast.info{ border-color: rgba(37,208,255,.22); }

/* Micro interactions */
.card{ transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.card:hover{ transform: translateY(-2px); border-color: rgba(255,255,255,.14); }
.btn, button{ transition: transform .12s ease, filter .12s ease; }
.btn:active, button:active{ transform: translateY(1px); }
@media (prefers-reduced-motion: reduce){
  .card, .btn, button, .toast{ transition:none !important; animation:none !important; }
}

/* Form controls */
input,select,textarea{
  appearance:none;
  -webkit-appearance:none;
}
input[type="checkbox"],
input[type="radio"]{
  appearance:auto;
  -webkit-appearance:auto;
}
select{
  padding-right:42px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(176,205,255,.85) 50%),
    linear-gradient(135deg, rgba(176,205,255,.85) 50%, transparent 50%),
    radial-gradient(circle at 0 0, rgba(255,255,255,.10), rgba(255,255,255,0) 70%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%,
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat:no-repeat;
}
select:focus{
  outline:none;
  border-color: rgba(176,205,255,.35);
  box-shadow: 0 0 0 4px rgba(124,92,255,.14);
}

/* Rooms list */
.room-list{display:flex; flex-direction:column; gap:12px}
.room-row{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:14px;
  align-items:center;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}
.room-row:hover{border-color: rgba(176,205,255,.18)}
.room-main{display:flex; flex-direction:column; gap:4px; min-width:0}
.room-id{font-weight:700; letter-spacing:-.2px}
.room-meta{color:var(--muted2); font-size:13px; display:flex; flex-wrap:wrap; gap:8px}
.room-actions{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.room-actions .btn{padding:9px 12px; font-size:13px}
.room-stat-pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
  color: var(--muted);
}
@media (max-width:720px){
  .room-row{grid-template-columns:1fr}
  .room-actions{justify-content:flex-start}
}


.disclosure{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  background: rgba(255,255,255,.03);
}
.disclosure summary{
  cursor:pointer;
  list-style:none;
  padding:12px 14px;
  font-weight:600;
  color:var(--text);
}
.disclosure summary::-webkit-details-marker{display:none}
.disclosure summary::after{
  content:"▾";
  float:right;
  color:var(--muted2);
}
.disclosure[open] summary::after{content:"▴"}
.disclosure-content{
  padding:0 14px 14px;
}

/* Event mode + quality cards */
.choice-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
}
.choice-card{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  padding:14px;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  position:relative;
  min-height:150px;
}
.choice-card:hover{transform: translateY(-2px); border-color: rgba(176,205,255,.24); background: rgba(255,255,255,.06)}
.choice-card.selected{
  border-color: rgba(124,92,255,.6);
  background: linear-gradient(135deg, rgba(124,92,255,.16), rgba(37,208,255,.12));
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.choice-card .title{font-weight:700; font-size:15px; margin-bottom:6px}
.choice-card .desc{color:var(--muted2); font-size:12.5px; line-height:1.5}
.choice-card .tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  font-size:11.5px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
  margin-top:8px;
}
.choice-card .tag.default{border-color: rgba(46,229,157,.35); color: rgba(46,229,157,.95)}

.inline-alert{
  border-radius:12px;
  border:1px solid rgba(255,92,122,.35);
  background: rgba(255,92,122,.12);
  color:#ffd6de;
  padding:10px 12px;
  font-size:12.5px;
  margin-top:8px;
}
.inline-note{
  border-radius:12px;
  border:1px solid rgba(37,208,255,.28);
  background: rgba(37,208,255,.12);
  color:#cfeaff;
  padding:10px 12px;
  font-size:12.5px;
  margin-top:8px;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.status-pill.good{border-color: rgba(46,229,157,.35); color:#9af5d1;}
.status-pill.warn{border-color: rgba(255,204,102,.35); color:#ffe2a6;}
.status-pill.bad{border-color: rgba(255,92,122,.35); color:#ffd6de;}
.status-pill.muted{border-color: rgba(255,255,255,.12); color: var(--muted2);}

.post-event-block{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.post-event-outputs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.output-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  font-size:12px;
  color: var(--muted);
}

@keyframes inUp{from{opacity:0; transform: translateY(10px)} to{opacity:1; transform: translateY(0)}}
.card{animation: inUp .28s ease both}
@media (prefers-reduced-motion: reduce){
  .card{animation:none}
  .toast{transition:none}
}

/* Pricing */
.plan-grid{margin-top:18px}
.plan-head{display:flex; align-items:flex-start; justify-content:space-between; gap:12px}
.plan-title{font-size:22px; font-weight:800; letter-spacing:-.4px}
.plan-desc{color:var(--muted2); font-size:13px; margin-top:4px}
.plan-stats{display:flex; gap:10px; flex-wrap:wrap; margin-top:14px}
.plan-stat{
  display:flex; flex-direction:column; gap:2px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
  min-width: 150px;
  flex:1;
}
.plan-stat .k{color:var(--muted2); font-size:12px}
.plan-stat .v{font-weight:800; font-size:16px}
.plan-actions{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:16px}
.plan-actions .btn{width:100%}

.btn.pulse{transform: translateY(-1px) scale(1.01); box-shadow: 0 10px 30px rgba(0,0,0,.28)}

/* =========================
   Premium Modals + Tabs
   (kept in existing style)
========================= */

html.modal-open{overflow:hidden}

.modal.hidden{display:none}
.modal{position:fixed; inset:0; z-index:9999; display:flex; align-items:center; justify-content:center; padding:18px}
.modal-backdrop{position:absolute; inset:0; background: rgba(0,0,0,.62); backdrop-filter: blur(6px)}
.modal-box{
  position:relative;
  width:min(560px, 96vw);
  max-width:560px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(6,9,20,.94);
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  overflow:hidden;
  animation: inUp .22s ease both;
}
.modal-head{padding:18px 18px 0 18px}
.modal-body{padding:16px 18px 18px 18px}
.modal-x{
  position:absolute; top:10px; right:12px;
  width:34px; height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size:20px;
  cursor:pointer;
}
.modal-x:hover{background: rgba(255,255,255,.06)}
.modal-msg{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,92,122,.35);
  background: rgba(255,92,122,.10);
  color:#ffd6de;
}

.tabs{display:flex; gap:10px; flex-wrap:wrap}
.tab{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  cursor:pointer;
  user-select:none;
}
.tab.active{color: var(--text); border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06)}
.tab:hover{background: rgba(255,255,255,.05)}

.kv{display:grid; grid-template-columns: 160px 1fr; gap:10px; align-items:start}
.kv .k{color: var(--muted2); font-size:12px}
.kv .v{font-weight:700}
@media (max-width:720px){
  .kv{grid-template-columns:1fr}
}
