:root {
  --bg: #13061f;
  --panel: rgba(28, 14, 55, 0.68);
  --panel-strong: rgba(23, 11, 49, 0.88);
  --stroke: rgba(255, 255, 255, 0.12);
  --pink: #ff58db;
  --violet: #9d6eff;
  --cyan: #4ddfff;
  --blue: #3e74ff;
  --lime: #caff5b;
  --gold: #ffd85c;
  --red: #ff6572;
  --green: #89ffdb;
  --text: #f6f2ff;
  --text-soft: rgba(246, 242, 255, 0.76);
  --shadow: 0 18px 40px rgba(4, 0, 13, 0.45);
  --radius: 22px;
  --shell-scale: 1;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
  font-family: Inter, ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, #2d1246 0%, #0b0711 58%, #050306 100%),
    linear-gradient(90deg, #12081f, #09050f);
  touch-action: none;
}
button, img, .screen, #game-shell, #game-shell * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

body[data-input-locked="true"] #game-frame {
  filter: saturate(.92) brightness(.96);
}

#boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(120, 82, 255, 0.16), rgba(7, 3, 13, 0.92) 64%);
}

.boot-overlay-card {
  min-width: min(520px, calc(100vw - 32px));
  padding: 28px 32px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(41, 17, 89, 0.9), rgba(17, 8, 42, 0.94));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
}

.boot-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 1000;
  letter-spacing: .01em;
}

.boot-subtitle {
  margin-top: 8px;
  font-size: clamp(15px, 2vw, 20px);
  color: rgba(255,255,255,0.76);
}

#viewport-fill {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(166, 97, 255, 0.16) 0%, rgba(0,0,0,0) 46%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
}

#game-frame {
  position: relative;
  width: calc(1600px * var(--shell-scale));
  height: calc(900px * var(--shell-scale));
  flex: 0 0 auto;
}

#game-shell {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1600px;
  height: 900px;
  transform: scale(var(--shell-scale));
  transform-origin: top left;
  overflow: hidden;
  border-radius: 28px;
  background: #07030d;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  touch-action: none;
  overscroll-behavior: none;
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}
.screen.active { opacity: 1; pointer-events: auto; }

.bg, .vignette, .room-stage, .stream-stage, .chat-panel, .stream-actions, .top-hud, #flash-layer, .modal, .stream-help, .task-card, .room-summary, .hero-side-panel, .room-nav, .meta-panel, .toast {
  position: absolute;
}

.bg {
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.18) brightness(1.08) contrast(1.05);
  transform: scale(1.02);
}
.room-bg, .stream-bg { background-image: url('assets/bg/room1.jpg'); }

.vignette {
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 42%, rgba(10, 4, 22, 0.18) 65%, rgba(3, 1, 9, 0.65) 100%),
    linear-gradient(180deg, rgba(12, 5, 25, 0.30), rgba(10, 3, 17, 0.10) 40%, rgba(8, 3, 16, 0.40));
}

.glass {
  background: linear-gradient(180deg, rgba(38, 15, 75, 0.78), rgba(18, 10, 44, 0.72));
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.glass.strong { background: linear-gradient(180deg, rgba(41, 17, 89, 0.88), rgba(17, 8, 42, 0.90)); }

.hud {
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 6;
}
.compact { justify-content: flex-start; }
.stream-top { justify-content: flex-start; padding-right: 355px; }

.pill, .summary-pill {
  min-width: 112px;
  min-height: 58px;
  padding: 9px 14px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(255, 98, 188, 0.26), rgba(84, 181, 255, 0.18));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 30px rgba(14, 2, 24, 0.32);
  font-weight: 900;
}
.pill.big { min-width: 140px; }
.pill img, .summary-pill img, .health-wrap img, .nav-btn img { width: 30px; height: 30px; object-fit: contain; }
.stat-pill > div { display: grid; gap: 2px; }
.pill-label, .sum-label { display: block; font-size: 11px; line-height: 1; letter-spacing: 0.8px; color: rgba(255,255,255,0.78); }
.pill-value { display: block; font-size: 26px; line-height: 1; color: #fff; }
.pill-subvalue { display: block; margin-top: 4px; font-size: 11px; line-height: 1.1; color: rgba(255,255,255,0.74); }

.health-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
  height: 58px;
  padding: 10px 14px;
  border-radius: 18px;
  margin-left: auto;
}
.health-copy { flex: 1; display: grid; gap: 6px; }
.health-bar {
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  overflow: hidden;
}
#health-fill {
  height: 100%;
  width: 80%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6dff92, #ffe35b, #ff5d92);
}

.room-stage, .stream-stage { inset: 0; z-index: 2; }
.center-glow {
  position: absolute;
  left: 50%;
  bottom: 158px;
  width: 460px;
  height: 340px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(145, 91, 255, 0.22), rgba(255,255,255,0) 72%);
}

.streamer {
  position: absolute;
  left: 50%;
  bottom: 112px;
  transform: translateX(-50%);
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 20px 26px rgba(0,0,0,0.38));
}
.room-streamer { width: 590px; max-height: 74%; }
.stream-streamer { width: 760px; max-height: 73%; bottom: 112px; }
body[data-character="male"] .room-streamer { width: 700px; bottom: 112px; }
body[data-character="male"] .stream-streamer { width: 812px; bottom: 136px; }
body[data-character="female"] .room-streamer { width: 470px; bottom: 70px; }
body[data-character="female"] .stream-streamer { width: 676px; bottom: 84px; }

.room-summary {
  left: 18px;
  top: 96px;
  width: 320px;
  padding: 14px 16px;
  border-radius: 22px;
  z-index: 5;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}
.summary-line {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 7px 0;
  font-size: 14px; color: rgba(255,255,255,0.82);
}
.summary-line + .summary-line { border-top: 1px solid rgba(255,255,255,0.08); }
.summary-line b { font-size: 15px; color: #fff; }

.room-nav {
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  width: 930px;
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 24px;
  z-index: 7;
}
.nav-btn {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 70px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 17px; font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.nav-btn span { line-height: 1; }
.nav-btn img { width: 22px; height: 22px; object-fit: contain; opacity: 0.95; }
.nav-btn.active { background: linear-gradient(135deg, rgba(255, 116, 179, 0.34), rgba(158, 119, 255, 0.28)); }
.nav-btn.actionable {
  border-color: rgba(255, 225, 131, 0.38);
  box-shadow: 0 0 0 1px rgba(255, 225, 131, 0.12) inset, 0 12px 26px rgba(9, 2, 18, 0.26);
  animation: navNudge 1.8s ease-in-out infinite;
}
.nav-btn.actionable::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffe08b;
  box-shadow: 0 0 12px rgba(255, 224, 139, 0.7);
}
@keyframes navNudge {
  0%, 100% { transform: translateY(0) scale(1); }
  10% { transform: translateY(-1px) rotate(-0.5deg); }
  20% { transform: translateY(0) rotate(0.4deg); }
  30% { transform: translateY(-1px) rotate(-0.4deg); }
  40% { transform: translateY(0) scale(1.01); }
}


.mini-fab {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  color: #fff;
  font-size: 40px;
  font-weight: 1000;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 34px rgba(8, 3, 18, 0.32);
  z-index: 7;
}
.settings-fab { right: 18px; top: 108px; }

.start-stream-hint {
  position: absolute;
  right: 255px;
  bottom: 114px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 7;
  pointer-events: none;
}
.tutorial-hint {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 16;
  pointer-events: none;
}
.tutorial-hint.hidden { display: none; }
.tutorial-hint.top { transform: translate(-50%, -100%); }
.tutorial-hint.bottom { transform: translate(-50%, 0); }
.tutorial-hint.left { transform: translate(-100%, -50%); }
.tutorial-hint.right { transform: translate(0, -50%); }
.tutorial-hint .tutorial-arrow {
  font-size: 46px;
  font-weight: 1000;
  color: #ffe28e;
  text-shadow: 0 0 16px rgba(255, 225, 142, 0.4);
  animation: startArrowBounce 1s ease-in-out infinite;
}
.tutorial-hint.top .tutorial-arrow { transform: rotate(90deg); }
.tutorial-hint.bottom .tutorial-arrow { transform: rotate(-90deg); }
.tutorial-hint.left .tutorial-arrow { transform: rotate(0deg); }
.tutorial-hint.right .tutorial-arrow { transform: rotate(180deg); }
.tutorial-hint .tutorial-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(17, 8, 42, 0.92);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 15px;
  font-weight: 900;
  color: rgba(255,255,255,0.94);
  box-shadow: var(--shadow);
  max-width: 280px;
}
.tutorial-target {
  box-shadow: 0 0 0 3px rgba(255, 226, 142, 0.9), 0 0 22px rgba(255, 186, 90, 0.42) !important;
  animation: tutorialTargetPulse 0.95s ease-in-out infinite;
}
@keyframes tutorialTargetPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}
.hint-arrow {
  font-size: 44px;
  font-weight: 1000;
  color: #ffe28e;
  text-shadow: 0 0 16px rgba(255, 225, 142, 0.4);
  animation: startArrowBounce 1s ease-in-out infinite;
}
.hint-copy {
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(17, 8, 42, 0.88);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 15px;
  font-weight: 900;
  color: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
}
@keyframes startArrowBounce {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

.meta-panel {
  left: 50%;
  top: 126px;
  bottom: auto;
  right: auto;
  width: 1210px;
  height: 648px;
  transform: translateX(-50%);
  border-radius: 30px;
  padding: 18px 22px 18px;
  z-index: 8;
}
.meta-panel[data-panel="rooms"] {
  left: 50%;
  top: 22px;
  right: auto;
  bottom: auto;
  width: 1360px;
  height: 700px;
  transform: translateX(-50%);
  padding-top: 18px;
}
#room-screen.meta-focus .room-stage,
#room-screen.meta-focus .room-summary,
#room-screen.meta-focus .hero-side-panel {
  opacity: 0.12;
  transform: scale(0.98);
  filter: blur(5px);
  pointer-events: none;
}
#room-screen.meta-focus .main-live-btn,
#room-screen.meta-focus .settings-fab,
#room-screen.meta-focus .start-stream-hint { z-index: 9; }

.hero-side-panel {
  left: 18px;
  top: 232px;
  width: 364px;
  max-height: 520px;
  padding: 14px 14px 12px;
  border-radius: 22px;
  z-index: 5;
  overflow: hidden;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}
.hero-side-head {
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: .3px;
  margin-bottom: 10px;
}
.hero-side-body { display: grid; gap: 10px; }
.hero-side-item {
  padding: 10px 10px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.hero-side-top { display:flex; align-items:center; gap:10px; }
.hero-side-name { flex:1; font-size: 15px; font-weight: 900; }
.hero-side-value { font-size: 16px; font-weight: 1000; color:#fff; }
.hero-side-help {
  width: 30px; height: 30px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08); color:#fff; font-size: 14px; font-weight: 1000; cursor:pointer;
  flex: 0 0 auto;
}
.hero-side-bonus { margin-top: 6px; font-size: 12px; color: rgba(255,255,255,0.82); }
.hero-side-tip { display:none; margin-top: 8px; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.82); max-width: 100%; }
.hero-side-item.open .hero-side-tip { display:block; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.panel-title { font-size: 30px; line-height: 1; font-weight: 1000; }
.panel-head > div:first-child { min-width: 0; }
.panel-subtitle { margin-top: 6px; font-size: 14px; color: rgba(255,255,255,0.74); }
.panel-actions { display: flex; gap: 8px; }

.mini-btn {
  width: 74px; height: 74px; border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  color: white; font-size: 34px; font-weight: 1000; cursor: pointer;
}
.mini-btn.ghost { opacity: 0.88; }

.panel-body {
  height: calc(100% - 96px);
  overflow: hidden auto;
  padding: 8px 10px 18px 0;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.panel-body::-webkit-scrollbar, .upgrade-grid::-webkit-scrollbar, .goal-list::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-thumb, .upgrade-grid::-webkit-scrollbar-thumb, .goal-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 999px; }

.shop-section { display: grid; gap: 14px; margin-bottom: 18px; }
.shop-section:last-child { margin-bottom: 0; }
.shop-section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-right: 6px; }
.shop-section-title { font-size: 24px; font-weight: 1000; letter-spacing: 0.2px; }
.shop-section-sub { font-size: 12px; color: rgba(255,255,255,0.74); line-height: 1.35; margin-top: 4px; max-width: 68ch; }
.room-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card.room-card {
  position: relative;
  overflow: hidden;
  min-height: auto;
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "preview"
    "desc"
    "bonus";
  gap: 12px;
  align-content: start;
  padding: 18px;
  border-radius: 26px;
}
.room-grid-clean .card.room-card { min-height: auto; }
.card.room-card .room-head {
  grid-area: title;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.card.room-card .room-preview {
  grid-area: preview;
  position: relative;
  justify-self: stretch;
  width: 100%;
  height: 178px;
  min-height: 178px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(12, 7, 26, 0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.card.room-card .room-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  display: block;
}
.card.room-card .room-overlay-note {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  color: rgba(255,255,255,0.92);
  background: rgba(6, 6, 16, 0.56);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
}
.card.room-card .name {
  margin-top: 0;
  font-size: 20px;
  line-height: 1.02;
  padding-right: 4px;
  text-wrap: balance;
  max-width: none;
  flex: 1 1 240px;
}
.card.room-card .desc {
  grid-area: desc;
  min-height: 40px;
  line-height: 1.38;
  font-size: 14px;
  max-width: none;
  color: rgba(255,255,255,0.82);
  padding-right: 2px;
}
.card.room-card .bonus {
  grid-area: bonus;
  margin-top: 0;
  font-size: 13px;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.card.room-card.active-room { box-shadow: 0 0 0 2px rgba(117,225,255,0.18), 0 16px 34px rgba(5, 0, 15, 0.38); }
.card.room-card.mystery-room .room-preview img { filter: brightness(0.018) saturate(0) contrast(1.05) blur(1px); transform: scale(1.03); }
.card.room-card.mystery-room .room-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,2,6,0.72), rgba(2,2,6,0.9)); }
.card.room-card.mystery-room .name,
.card.room-card.mystery-room .desc,
.card.room-card.mystery-room .bonus { color: rgba(255,255,255,0.48); }
.card.room-card.mystery-room .bonus { background: rgba(7, 6, 18, 0.62); opacity: 0.86; }
.card.room-card .req-box { min-width: 118px; flex: 0 0 auto; }
.card.room-card .req-box span { font-size: 18px; }
.room-card.can-buy .card.room-card .room-preview { box-shadow: 0 0 0 1px rgba(255,225,140,0.12) inset, 0 10px 20px rgba(21,8,33,0.18); }
.room-card.can-buy .card.room-card .room-overlay-note { color: #fff2b5; }
.major-line b { color: #ffe08b; }

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card {
  min-height: 158px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.12), rgba(255,255,255,0) 36%),
    linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
  box-shadow: 0 12px 26px rgba(10, 2, 20, 0.28);
  padding: 14px 14px 12px;
  display: grid;
  grid-template-columns: 96px minmax(0,1fr) 96px;
  grid-template-areas:
    "icon title req"
    "icon desc req"
    "bonus bonus bonus";
  gap: 8px 14px;
  align-items: center;
  color: white;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease, border-color 140ms ease;
  text-align: left;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(5, 0, 15, 0.38); border-color: rgba(255,255,255,0.22); }
.card.locked { opacity: 0.58; }
.card.owned {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.16), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, rgba(255, 95, 206, 0.19), rgba(94, 227, 255, 0.10));
  border-color: rgba(255,255,255,0.24);
}
.card.maxed { border-color: rgba(255,221,154,0.36); box-shadow: 0 16px 34px rgba(18, 8, 28, 0.40), 0 0 0 1px rgba(255,220,150,0.12) inset; }
.card > img {
  grid-area: icon;
  width: 88px;
  height: 88px;
  object-fit: contain;
  padding: 10px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.name {
  grid-area: title;
  align-self: end;
  font-size: 17px;
  font-weight: 1000;
  letter-spacing: 0.2px;
  line-height: 1.05;
  max-width: 100%;
}
.item-level { display: inline-flex; align-items: center; justify-content: center; margin-left: 8px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 1000; color: rgba(255,255,255,0.92); background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.10); vertical-align: middle; }
.desc {
  grid-area: desc;
  align-self: start;
  font-size: 14px;
  line-height: 1.2;
  color: rgba(255,255,255,0.70);
}
.bonus {
  grid-area: bonus;
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255,255,255,0.92);
}
.req-box {
  grid-area: req;
  align-self: start;
  justify-self: end;
  min-width: 88px;
  padding: 10px 10px;
  text-align: center;
  border-radius: 16px;
  background: rgba(255,255,255,0.09);
  font-size: 15px;
  font-weight: 1000;
  display: grid;
  gap: 4px;
  justify-items: center;
}
.req-box small { font-size: 12px; color: rgba(255,255,255,0.74); }
.req-box img {
  width: 18px;
  height: 18px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.owned-row { color: #fff7bf; font-size: 12px; letter-spacing: 0.4px; }


@media (max-width: 1200px) {
  .upgrade-grid, .helper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-grid { grid-template-columns: 1fr; }
  .card.room-card .room-preview { height: 210px; min-height: 210px; }
  .card.room-card .room-head { align-items: stretch; }
}

.hero-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px;
}
.hero-card {
  border-radius: 18px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
}
.hero-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px;
}
.hero-name { font-size: 18px; font-weight: 1000; }
.hero-value { font-size: 20px; font-weight: 1000; color: #fff; }
.hero-desc { font-size: 12px; color: rgba(255,255,255,0.74); line-height: 1.25; min-height: 32px; }
.hero-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.hero-bonus { font-size: 11px; color: rgba(255,255,255,0.86); }
.plus-btn {
  min-width: 52px; height: 36px;
  border-radius: 12px; border: 0; cursor: pointer;
  font-size: 18px; font-weight: 1000; color: #fff;
  background: linear-gradient(135deg, #ff74b3, #9e77ff);
}
.plus-btn:disabled { opacity: 0.4; cursor: default; }


.helper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.helper-card {
  min-height: 182px;
  grid-template-columns: 108px minmax(0,1fr) 98px;
  grid-template-areas:
    "icon title req"
    "icon desc req"
    "bonus bonus bonus";
}
.helper-avatar {
  grid-area: icon;
  width: 102px;
  height: 102px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 24px rgba(10, 2, 20, 0.22);
}
.helper-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display:block;
}
.helper-avatar span {
  display:flex;
  align-items:center;
  justify-content:center;
  width:72px;
  height:72px;
  border-radius:20px;
  font-size:26px;
  font-weight:1000;
  letter-spacing:.5px;
  color:#fff;
  text-shadow:0 2px 10px rgba(0,0,0,0.28);
  background: rgba(0,0,0,0.18);
}
.helper-moderator { background: linear-gradient(135deg, rgba(255,92,144,0.24), rgba(108,122,255,0.12)); }
.helper-technician { background: linear-gradient(135deg, rgba(255,170,74,0.24), rgba(112,182,255,0.12)); }
.helper-community { background: linear-gradient(135deg, rgba(255,163,204,0.24), rgba(141,120,255,0.12)); }
.helper-donations { background: linear-gradient(135deg, rgba(255,125,90,0.24), rgba(255,209,83,0.12)); }
.helper-clipmaker { background: linear-gradient(135deg, rgba(173,111,255,0.24), rgba(255,219,84,0.12)); }
.helper-smm { background: linear-gradient(135deg, rgba(93,217,255,0.24), rgba(133,255,176,0.12)); }
.helper-assistant { background: linear-gradient(135deg, rgba(124,255,182,0.22), rgba(120,174,255,0.12)); }
.helper-producer { background: linear-gradient(135deg, rgba(255,112,150,0.24), rgba(183,125,255,0.12)); }
.helper-operator { background: linear-gradient(135deg, rgba(88,140,255,0.24), rgba(122,224,255,0.12)); }
.helper-tags {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.helper-tag {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
}

.setup-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.setup-card {
  border-radius: 18px; padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  text-shadow: 0 2px 10px rgba(0,0,0,0.22);
}
.setup-card.active { background: linear-gradient(135deg, rgba(255,116,179,0.28), rgba(158,119,255,0.22)); border-color: rgba(255,255,255,0.22); box-shadow: 0 14px 34px rgba(11, 3, 24, 0.28); }
.setup-name { font-size: 20px; font-weight: 1000; color:#fff; }
.setup-time { font-size: 31px; font-weight: 1000; margin-top: 2px; color:#fff; }
.setup-desc { margin-top: 8px; font-size: 12px; line-height: 1.3; color: rgba(255,255,255,0.8); }
.setup-meta { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.setup-chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.08); color:#fff; font-size: 11px; font-weight: 900;
}

.goal-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.goal-card {
  border-radius: 18px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
}
.goal-card.major-goal { background: linear-gradient(180deg, rgba(255, 221, 126, 0.14), rgba(131, 104, 255, 0.08)); border-color: rgba(255, 226, 126, 0.24); }
.goal-card.ultra-goal { background: linear-gradient(180deg, rgba(132, 234, 255, 0.16), rgba(255, 116, 179, 0.08)); border-color: rgba(132, 234, 255, 0.28); }
.goal-tag { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 1000; letter-spacing: .5px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
.goal-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.goal-title { font-size: 18px; font-weight: 1000; line-height: 1.05; }
.goal-target { font-size: 12px; color: rgba(255,255,255,0.76); }
.goal-bar { margin-top: 10px; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.10); overflow: hidden; }
.goal-bar > span { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, #ff74b3, #7d76ff, #4ddfff); }
.goal-foot { margin-top: 10px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.goal-reward { font-size: 11px; color: rgba(255,255,255,0.84); line-height: 1.25; }
.claim-btn {
  min-width: 98px; height: 36px; border: 0; border-radius: 12px;
  font-size: 12px; font-weight: 1000; color: #fff;
  background: linear-gradient(135deg, #54cbff, #7d76ff); cursor: pointer;
}
.claim-btn:disabled { opacity: 0.42; cursor: default; }

.main-live-btn {
  position: absolute; right: 18px; bottom: 40px; z-index: 6;
  min-width: 220px; height: 68px; padding: 0 22px;
  border: 0; border-radius: 22px; color: white;
  font-size: 24px; font-weight: 1000; letter-spacing: 0.5px;
  cursor: pointer; background: linear-gradient(135deg, #ff74b3, #9e77ff);
  box-shadow: 0 18px 36px rgba(96, 28, 121, 0.42);
}
.main-live-btn.attention { animation: liveBtnPulse 1.15s ease-in-out infinite; }
@keyframes liveBtnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 18px 36px rgba(96, 28, 121, 0.42); }
  50% { transform: scale(1.05); box-shadow: 0 22px 44px rgba(133, 47, 173, 0.55), 0 0 0 8px rgba(255,255,255,0.08); }
}
.live-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; background: white; box-shadow: 0 0 0 7px rgba(255,255,255,0.18); animation: liveDotPulse 1.05s ease-in-out infinite; }
@keyframes liveDotPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 7px rgba(255,255,255,0.18); }
  50% { transform: scale(1.22); box-shadow: 0 0 0 12px rgba(255,255,255,0.10); }
}

.chat-panel {
  top: 88px; right: 18px; bottom: 18px; width: 322px;
  border-radius: 24px; padding: 14px 14px 12px; z-index: 5;
  display: flex; flex-direction: column;
}
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 6px 12px; font-size: 18px; font-weight: 900; }
.chat-feed { flex: 1; overflow: hidden auto; padding-right: 6px; touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat-item { margin-bottom: 8px; font-size: 15px; line-height: 1.25; color: rgba(245, 241, 255, 0.94); word-break: break-word; }
.chat-item .name { font-size: 15px; font-weight: 900; margin-right: 5px; }

.chat-item.toxic {
  margin-top: 6px; padding: 10px 10px 8px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(91, 15, 42, 0.76), rgba(41, 9, 30, 0.82));
  border: 1px solid rgba(255, 130, 153, 0.28); box-shadow: 0 10px 24px rgba(13, 3, 15, 0.32);
}
.toxic-text { display: flex; gap: 5px; flex-wrap: wrap; }
.mod-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.mod-time { min-width: 44px; font-size: 12px; font-weight: 900; color: rgba(255,255,255,0.9); }
.mod-timer { flex: 1; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.12); }
.mod-timer span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb45b, #ff6b88); }
.ban-btn, .task-btn {
  border: 0; border-radius: 12px; padding: 9px 13px; font-size: 12px; font-weight: 1000; color: white; cursor: pointer;
  background: linear-gradient(135deg, rgba(255, 113, 175, 0.92), rgba(120, 147, 255, 0.92));
}
.ban-btn:disabled, .task-btn:disabled, .plus-btn:disabled, .claim-btn:disabled { cursor: default; opacity: 0.65; }
.chat-item.banned { opacity: 0.8; filter: saturate(0.72); }
.chat-item.missed { box-shadow: inset 0 0 0 1px rgba(255, 100, 100, 0.28); }

.task-card {
  top: 96px; left: 50%; width: 500px; transform: translateX(-50%);
  border-radius: 22px; padding: 14px 16px; z-index: 7;
}
.task-title { font-size: 18px; font-weight: 1000; letter-spacing: 0.4px; margin-bottom: 6px; }
.task-text { font-size: 14px; color: rgba(255,255,255,0.92); margin-bottom: 8px; }
.task-meta { font-size: 12px; color: rgba(255,255,255,0.72); margin-bottom: 8px; line-height: 1.35; }
.task-time-wrap { margin-bottom: 12px; }
.task-time-label { font-size: 11px; font-weight: 900; letter-spacing: .22px; color: rgba(255,255,255,0.78); margin-bottom: 6px; text-transform: uppercase; }
.task-timer { height: 10px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.08); }
.task-timer span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffd35c, #ff78bf, #7cb5ff); box-shadow: 0 0 14px rgba(255, 125, 198, 0.26); transition: width .12s linear; }
.task-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.task-btn { min-width: 120px; flex: 1 1 0; }
.task-btn.primary { background: linear-gradient(135deg, #54cbff, #7d76ff); }
.task-btn.hard { background: linear-gradient(135deg, #ffb458, #ff6d8d); }
.task-btn.ghost { flex: 0 0 120px; background: linear-gradient(135deg, rgba(125, 109, 177, 0.92), rgba(82, 68, 122, 0.92)); }
.task-card.active { box-shadow: 0 18px 38px rgba(10, 4, 25, 0.45), inset 0 0 0 1px rgba(255,255,255,0.08); }


.stream-actions {
  left: 18px; right: 355px; bottom: 54px; height: 92px; padding: 8px;
  border-radius: 22px; z-index: 5; display: flex; gap: 10px; align-items: center;
}
.action-btn, .big-btn {
  border: 0; border-radius: 18px; cursor: pointer; font-weight: 900; color: white;
}
.action-btn {
  position: relative; overflow: hidden;
  flex: 1; height: 100%; display: flex; align-items: center; justify-content: center;
  gap: 8px; background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.12); padding: 0 8px 18px;
}
.action-btn img { width: 34px; height: 34px; object-fit: contain; }
.action-copy { display: grid; justify-items: start; gap: 1px; }
.action-title { font-size: 18px; line-height: 1; letter-spacing: 0.3px; }
.action-sub { font-size: 11px; line-height: 1.1; color: rgba(255,255,255,0.74); }
.action-btn.stop { max-width: 160px; background: linear-gradient(135deg, rgba(255, 103, 136, 0.35), rgba(255, 74, 94, 0.24)); }
.action-btn.cooldown { opacity: 0.74; filter: grayscale(0.1); }
.cooldown-indicator {
  position: absolute; left: 10px; right: 10px; bottom: 6px; height: 10px;
  display: flex; align-items: center; justify-content: center; gap: 0;
  pointer-events: none;
}
.cooldown-text {
  display: none;
}
.cooldown-bar {
  flex: 1; height: 8px; border-radius: 999px; width: 100%;
  background: linear-gradient(90deg, rgba(255,205,96,0.95), rgba(255,105,198,0.95));
  box-shadow: 0 0 10px rgba(255,140,210,0.2); transition: transform .12s linear;
}
.action-btn.stop { padding-bottom: 0; }

.event-popups { position: absolute; inset: 0; pointer-events: none; }
.popup {
  position: absolute; width: 80px; height: 80px; object-fit: contain;
  animation: popupFloat 1.35s ease forwards;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
}
@keyframes popupFloat {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.55); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -130%) scale(1.06); }
}

#flash-layer { inset: 0; pointer-events: none; z-index: 8; }
#flash-layer.flash { animation: flashPulse 220ms ease; }
@keyframes flashPulse { from { background: rgba(255,255,255,0.18); } to { background: rgba(255,255,255,0); } }

.modal {
  inset: 0; z-index: 20; display: grid; place-items: center;
  background: rgba(9, 3, 18, 0.58);
}
.hidden { display: none !important; }
.modal-card { width: 800px; padding: 26px; border-radius: 28px; }
.modal-title { text-align: center; font-size: 44px; font-weight: 1000; margin-bottom: 18px; }
.summary-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px;
}
.summary-pill {
  min-height: 126px; padding: 12px; display: grid;
  justify-items: center; align-content: center; gap: 6px; border-radius: 22px;
}
.summary-pill span:last-child { font-size: 36px; font-weight: 1000; }
.summary-note {
  min-height: 24px; margin-bottom: 16px;
  text-align: center; font-size: 14px; color: rgba(255,255,255,0.8);
}
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.big-btn { height: 72px; font-size: 24px; color:#fff; background: linear-gradient(135deg, #ff74b3, #9e77ff); }
.big-btn.alt { color:#fff; background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.12); }
.big-btn.danger { color:#fff; background: linear-gradient(135deg, #ff7c8c, #ff4f7a); }
.summary-reward-wrap { min-height: 72px; margin-bottom: 14px; }
.big-btn.reward { width: 100%; background: linear-gradient(135deg, #ffd15d, #ff7ac2); color: #2b1439; }
.ad-screen { width: min(1180px, calc(100vw - 48px)); height: min(760px, calc(100vh - 48px)); display: grid; grid-template-rows: auto 1fr; gap: 18px; }
.ad-screen-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ad-label { font-size: 20px; font-weight: 1000; letter-spacing: .14em; color: rgba(255,255,255,0.72); }
.ad-headline { font-size: 42px; font-weight: 1000; line-height: 1.05; }
.ad-continue { min-width: 180px; }
.ad-screen-body { position: relative; display: grid; align-content: space-between; gap: 24px; padding: 28px; border-radius: 34px; overflow: hidden; }
.ad-screen-body::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at top right, rgba(255,255,255,0.12), rgba(255,255,255,0) 30%), linear-gradient(135deg, rgba(255,120,188,0.18), rgba(78,217,255,0.10)); pointer-events: none; }
.ad-badge { position: relative; z-index: 1; width: fit-content; padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); font-size: 14px; font-weight: 1000; }
.ad-visual { position: relative; z-index: 1; min-height: 380px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: center; }
.ad-visual-copy { display: grid; gap: 12px; }
.ad-big { font-size: clamp(56px, 7vw, 110px); line-height: .92; font-weight: 1000; letter-spacing: -.04em; }
.ad-small { max-width: 620px; font-size: 22px; line-height: 1.35; color: rgba(255,255,255,0.82); }
.ad-device { justify-self: stretch; align-self: stretch; min-height: 280px; border-radius: 30px; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.24), rgba(255,255,255,0) 32%), linear-gradient(135deg, rgba(255,101,192,0.34), rgba(85,143,255,0.26)); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 22px 40px rgba(5, 0, 15, 0.32); position: relative; overflow: hidden; }
.ad-device::before { content: ''; position: absolute; inset: 12% 10%; border-radius: 24px; background: linear-gradient(135deg, rgba(18,9,36,0.72), rgba(71,17,113,0.44)); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset; }
.ad-device::after { content: ''; position: absolute; width: 42%; height: 42%; right: 12%; bottom: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(111,236,255,0.78), rgba(255,255,255,0.0) 68%); filter: blur(8px); }
.ad-copy-row { position: relative; z-index: 1; display: grid; gap: 8px; }
.ad-copy-title { font-size: 26px; font-weight: 1000; }
.ad-copy-text { font-size: 18px; color: rgba(255,255,255,0.78); }
.ad-progress { position: relative; z-index: 1; height: 14px; border-radius: 999px; background: rgba(255,255,255,0.10); overflow: hidden; border: 1px solid rgba(255,255,255,0.12); }
.ad-progress span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(255,211,92,0.96), rgba(255,109,194,0.92), rgba(84,217,255,0.88)); box-shadow: 0 0 20px rgba(255,127,199,0.32); transition: width .14s linear; }
@media (max-width: 980px) {
  .ad-screen { width: calc(100vw - 24px); height: calc(100vh - 24px); gap: 12px; }
  .ad-headline { font-size: 28px; }
  .ad-screen-body { padding: 18px; border-radius: 24px; }
  .ad-visual { min-height: 0; grid-template-columns: 1fr; }
  .ad-device { min-height: 180px; }
  .ad-small { font-size: 18px; }
}

/* live effects */
.stream-stage { --interest-level: .3; --health-level: .9; }
.stage-aura, .scanlines, .ambient-particles, .reaction-lane, .event-banner, .viewer-wave { position: absolute; pointer-events: none; }
.stage-aura {
  inset: 0;
  background:
    radial-gradient(circle at 50% 72%, rgba(255, 95, 210, calc(0.10 + var(--interest-level) * 0.16)) 0%, rgba(130, 94, 255, calc(0.08 + var(--interest-level) * 0.12)) 18%, rgba(0, 0, 0, 0) 42%),
    radial-gradient(circle at 58% 40%, rgba(84, 217, 255, calc(0.03 + var(--interest-level) * 0.08)) 0%, rgba(0, 0, 0, 0) 36%);
  mix-blend-mode: screen;
  animation: auraPulse 3.6s ease-in-out infinite;
}
.scanlines {
  inset: 0; opacity: 0.14;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.00) 32%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.055) 0px, rgba(255,255,255,0.055) 1px, rgba(0,0,0,0.00) 2px, rgba(0,0,0,0.00) 5px);
  mix-blend-mode: soft-light;
  animation: scanDrift 8s linear infinite;
}
.ambient-particles, .reaction-lane { inset: 0; overflow: hidden; z-index: 3; }
.ambient-particle {
  position: absolute; width: var(--size, 10px); height: var(--size, 10px); border-radius: 999px;
  opacity: 0; animation: ambientFloat var(--dur, 3.8s) ease-out forwards;
  filter: blur(.2px) drop-shadow(0 0 8px rgba(255,255,255,0.16));
}
.ambient-particle.spark { background: radial-gradient(circle, rgba(255,255,255,0.92) 0%, rgba(255,140,231,0.75) 38%, rgba(120,229,255,0.0) 78%); }
.ambient-particle.bubble { border: 1px solid rgba(255,255,255,0.38); background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.46), rgba(120,229,255,0.12) 55%, rgba(255,255,255,0.0) 72%); }
.ambient-particle.lag { border-radius: 3px; background: linear-gradient(135deg, rgba(255, 95, 110, 0.88), rgba(255, 206, 76, 0.3)); box-shadow: 0 0 10px rgba(255, 92, 92, 0.28); }
.reaction-float {
  position: absolute; line-height: 1; font-weight: 1000; opacity: 0; transform: translateY(0) scale(.55) rotate(0deg);
  animation: reactRise 2.15s cubic-bezier(.18,.78,.18,1) forwards;
  text-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.reaction-float.live, .reaction-float.sub { color: #fff3a9; }
.reaction-float.hype { color: #ff7ed6; }
.reaction-float.love { color: #ff9fe7; }
.reaction-float.donation { color: #ffe07a; }
.reaction-float.raid { color: #80e8ff; }
.reaction-float.fix { color: #89ffdb; }
.reaction-float.lag { color: #ff8089; }
.event-banner {
  left: 50%; top: 112px; transform: translate(-50%, -16px) scale(.92);
  min-width: 180px; max-width: 420px; padding: 12px 20px; border-radius: 999px;
  font-size: 24px; font-weight: 1000; letter-spacing: .8px; text-align: center;
  backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 16px 40px rgba(8, 3, 18, 0.36); opacity: 0; z-index: 6;
}
.event-banner.pink { background: linear-gradient(135deg, rgba(255, 102, 193, 0.80), rgba(153, 110, 255, 0.72)); }
.event-banner.gold { background: linear-gradient(135deg, rgba(255, 191, 77, 0.86), rgba(255, 110, 170, 0.70)); }
.event-banner.cyan { background: linear-gradient(135deg, rgba(72, 221, 255, 0.84), rgba(116, 126, 255, 0.72)); }
.event-banner.red { background: linear-gradient(135deg, rgba(255, 93, 126, 0.86), rgba(255, 139, 89, 0.72)); }
.event-banner.live { background: linear-gradient(135deg, rgba(255, 125, 186, 0.86), rgba(177, 111, 255, 0.74)); }
.event-banner.show { animation: bannerShow 1.16s ease forwards; }
.viewer-wave {
  left: 22px; bottom: 160px; width: 300px; height: 126px; z-index: 4; display: flex; align-items: end; gap: 7px;
  padding: 14px 14px; border-radius: 20px; background: linear-gradient(180deg, rgba(18, 11, 38, 0.32), rgba(18, 10, 43, 0.10));
  backdrop-filter: blur(4px);
}
.wave-bar {
  flex: 1; min-height: 10px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 100, 206, 0.96), rgba(84, 221, 255, 0.82));
  box-shadow: 0 0 10px rgba(130, 124, 255, 0.25);
  transform-origin: bottom center; transition: height .45s ease, opacity .45s ease; min-width: 7px;
}
.stream-stage.laggy .scanlines { opacity: 0.3; mix-blend-mode: normal; animation-duration: 1.2s; }
.stream-stage.laggy .stage-aura { filter: saturate(.5) hue-rotate(-18deg); }
.stream-stage.laggy .stream-streamer { animation: lagJitter .28s steps(2) infinite; }
.chat-panel.laggy { box-shadow: inset 0 0 0 1px rgba(255, 104, 104, 0.22), 0 18px 40px rgba(4, 0, 13, 0.45); }

.pulse-hit { animation: panelPulse .38s ease; }
#game-shell.shake-light { animation: shellShakeLight .28s linear; }
#game-shell.shake-hard { animation: shellShakeHard .44s linear; }
#flash-layer.warn { animation: warnPulse 320ms ease; }

@keyframes ambientFloat { 0% { opacity: 0; transform: translate(0, 10px) scale(.35); } 16% { opacity: .95; } 100% { opacity: 0; transform: translate(var(--drift-x, 0px), -110px) scale(1.16); } }
@keyframes reactRise { 0% { opacity: 0; transform: translateY(0) scale(.52) rotate(-8deg); } 14% { opacity: 1; } 100% { opacity: 0; transform: translateY(-150px) scale(1.12) rotate(10deg); } }
@keyframes bannerShow { 0% { opacity: 0; transform: translate(-50%, -16px) scale(.88); } 12% { opacity: 1; transform: translate(-50%, 0px) scale(1); } 82% { opacity: 1; transform: translate(-50%, 0px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -10px) scale(.96); } }
@keyframes auraPulse { 0%, 100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes scanDrift { 0% { transform: translateY(0); } 100% { transform: translateY(10px); } }
@keyframes lagJitter { 0% { transform: translateX(-50%) translate(0, 0); } 25% { transform: translateX(-50%) translate(-2px, 1px); } 50% { transform: translateX(-50%) translate(1px, -2px); } 75% { transform: translateX(-50%) translate(3px, 0); } 100% { transform: translateX(-50%) translate(0, 0); } }
@keyframes panelPulse { 0% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.012); filter: brightness(1.12); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes shellShakeLight { 0% { transform: scale(var(--shell-scale)) translate(0, 0); } 25% { transform: scale(var(--shell-scale)) translate(-2px, 1px); } 50% { transform: scale(var(--shell-scale)) translate(2px, -1px); } 75% { transform: scale(var(--shell-scale)) translate(-1px, -1px); } 100% { transform: scale(var(--shell-scale)) translate(0, 0); } }
@keyframes shellShakeHard { 0% { transform: scale(var(--shell-scale)) translate(0, 0); } 15% { transform: scale(var(--shell-scale)) translate(-6px, 2px); } 30% { transform: scale(var(--shell-scale)) translate(6px, -2px); } 45% { transform: scale(var(--shell-scale)) translate(-4px, -3px); } 60% { transform: scale(var(--shell-scale)) translate(4px, 2px); } 75% { transform: scale(var(--shell-scale)) translate(-2px, -1px); } 100% { transform: scale(var(--shell-scale)) translate(0, 0); } }
@keyframes warnPulse { 0% { background: rgba(255, 92, 114, 0.18); } 100% { background: rgba(255, 92, 114, 0); } }

.mini-game-modal {
  position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; pointer-events: none;
}
.mini-game-card {
  width: 600px; min-height: 456px; border-radius: 24px; padding: 18px 20px 20px;
  pointer-events: auto; will-change: transform;
}
.mini-game-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mini-game-title { font-size: 22px; font-weight: 1000; letter-spacing: 0.4px; }
.mini-game-subtitle, .mini-game-desc, .mini-hint, .mg-label-row { color: rgba(255,255,255,0.82); }
.mini-game-subtitle { font-size: 12px; margin-top: 2px; }
.mini-game-desc { font-size: 14px; margin-top: 10px; margin-bottom: 12px; }
.mini-game-timer {
  min-width: 90px; text-align: center; padding: 10px 12px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 88, 219, 0.24), rgba(77, 223, 255, 0.16));
  border: 1px solid rgba(255,255,255,0.14); font-size: 24px; font-weight: 1000;
}
.minigame-panel.hidden { display: none; }
.minigame-panel { min-height: 300px; }
.mg-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; font-weight: 800; }
.timing-track {
  position: relative; height: 28px; border-radius: 999px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12); overflow: hidden; box-shadow: inset 0 6px 16px rgba(0,0,0,0.25);
}
.timing-zone {
  position: absolute; top: 3px; bottom: 3px; width: 22%; border-radius: 999px;
  background: linear-gradient(90deg, rgba(202,255,91,0.7), rgba(77,223,255,0.85)); box-shadow: 0 0 18px rgba(134,255,179,0.35);
}
.timing-cursor {
  position: absolute; top: 0; width: 12px; height: 28px; border-radius: 999px;
  background: linear-gradient(180deg, #fff, #ff70df); box-shadow: 0 0 14px rgba(255,255,255,0.5);
}
.mini-hint { margin-top: 10px; font-size: 12px; text-align: center; }
.mini-actions { display: flex; gap: 10px; margin-top: 12px; }
.mini-actions.solo { justify-content: center; }
.mini-btn-action {
  flex: 1; min-height: 54px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.14);
  color: #fff; font-size: 16px; font-weight: 1000; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
}
.mini-btn-action.pink { background: linear-gradient(180deg, rgba(255,88,219,0.35), rgba(255,88,219,0.18)); }
.mini-btn-action.gold { background: linear-gradient(180deg, rgba(255,216,92,0.34), rgba(255,216,92,0.16)); }
.mini-btn-action.cyan { background: linear-gradient(180deg, rgba(77,223,255,0.35), rgba(77,223,255,0.16)); }
.mini-btn-action.primary { background: linear-gradient(180deg, rgba(157,110,255,0.42), rgba(255,88,219,0.22)); max-width: 220px; }
.combo-seq { display: flex; gap: 8px; flex-wrap: wrap; min-height: 72px; }
.combo-chip {
  min-width: 110px; padding: 10px 12px; border-radius: 14px; text-align: center;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  font-size: 13px; font-weight: 900; letter-spacing: 0.3px;
}
.combo-chip.done { background: linear-gradient(135deg, rgba(77,223,255,0.22), rgba(137,255,219,0.20)); }
.combo-chip.current { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.32); }
.combo-chip.fail { background: linear-gradient(135deg, rgba(255,101,114,0.22), rgba(255,139,89,0.18)); }
.pop-arena {
  position: relative; height: 330px; border-radius: 20px; overflow: hidden; contain: layout paint;
  background: radial-gradient(circle at center, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.12);
}
.pop-bubble {
  position: absolute; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-size: 28px; font-weight: 1000;
  display: grid; place-items: center; animation: popBubble 2.8s ease forwards;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.pop-bubble.good { background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.92), rgba(255,113,203,0.82) 55%, rgba(98,110,255,0.80)); }
.pop-bubble.bad { background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), rgba(255,110,110,0.86) 55%, rgba(180,30,50,0.90)); }
.pop-bubble.popped { transform: scale(0.72); opacity: 0.05; filter: brightness(1.3); }
.pop-burst { position: absolute; pointer-events: none; font-size: 24px; line-height: 1; opacity: 0; transform: translate(-50%, -50%) scale(.4); text-shadow: 0 10px 20px rgba(0,0,0,0.28); animation: popBurst 560ms ease-out forwards; }

@keyframes popBubble {
  0% { transform: scale(0.4) translateY(18px); opacity: 0; }
  12% { transform: scale(1) translateY(0); opacity: 1; }
  72% { opacity: 1; }
  100% { transform: scale(1.06) translateY(-8px); opacity: 0.12; }
}
@keyframes popBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -84px) scale(1.3); }
}

.toast {
  left: 50%; top: 18px; transform: translateX(-50%);
  z-index: 30; min-width: 220px; max-width: 520px;
  padding: 12px 18px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 125, 186, 0.90), rgba(108, 128, 255, 0.82));
  border: 1px solid rgba(255,255,255,0.18);
  text-align: center; font-size: 18px; font-weight: 1000;
  box-shadow: 0 16px 40px rgba(8, 3, 18, 0.36);
}

@media (max-width: 900px) { #game-shell { border-radius: 18px; } }



.reset-confirm {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,108,146,0.14), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.12);
}
.reset-confirm.hidden { display: none; }
.reset-confirm-title { font-size: 18px; font-weight: 1000; }
.reset-confirm-sub { margin-top: 6px; font-size: 13px; line-height: 1.35; color: rgba(255,255,255,0.78); }
.reset-confirm-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.start-card { width: 980px; padding: 26px; }
.start-title { font-size: 36px; margin-bottom: 10px; }
.start-subtitle {
  text-align: center; font-size: 15px; color: rgba(255,255,255,0.82);
  margin: -4px auto 18px; max-width: 700px; line-height: 1.4;
}
.start-actions { margin-top: 18px; }
.start-card .setup-grid { gap: 14px; }
.start-card .setup-card { min-height: 250px; text-align: left; }

.action-btn.charging {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18), 0 0 0 2px rgba(255, 117, 199, 0.16);
  background: linear-gradient(180deg, rgba(255,110,196,0.20), rgba(99,117,255,0.10));
}
.action-btn .tap-progress {
  position: absolute; right: 10px; top: 8px; min-width: 62px; padding: 4px 8px; border-radius: 999px;
  background: rgba(10, 6, 20, 0.54); border: 1px solid rgba(255,255,255,0.12);
  font-size: 11px; font-weight: 1000; letter-spacing: .2px; text-align: center;
}
.action-btn .tap-fx {
  position: absolute; left: 50%; top: 22px; font-size: 24px; font-weight: 1000; pointer-events: none;
  transform: translateX(-50%) scale(.4); opacity: 0; animation: tapFx 480ms ease forwards;
  text-shadow: 0 8px 22px rgba(0,0,0,0.28);
}
@keyframes tapFx {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.4); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-22px) scale(1.06); }
}


.action-token {
  position: absolute;
  z-index: 12;
  width: 76px;
  height: 76px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  padding: 0;
  transform: scale(.5);
  animation: tokenBurstIn 260ms ease forwards;
  animation-delay: var(--token-delay, 0ms);
  transition: transform 220ms ease, opacity 220ms ease, filter 180ms ease;
}
.action-token.boost,
.action-token.talk {
  box-shadow: none;
  backdrop-filter: none;
}
.action-token:hover { filter: brightness(1.08); transform: scale(1.08); }
.action-token.collected { pointer-events: none; }
.action-token .token-emoji {
  position: absolute;
  line-height: 1;
  user-select: none;
  text-shadow: 0 6px 14px rgba(0,0,0,0.48), 0 0 16px rgba(255,255,255,0.14);
  filter: drop-shadow(0 10px 18px rgba(8, 3, 18, 0.42));
}
.token-flame-wrap,
.token-talk-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  animation: tokenFloat 1.5s ease-in-out infinite;
  animation-delay: var(--float-delay, 0ms);
}
.token-flame-wrap .main {
  left: 17px;
  top: 11px;
  font-size: 40px;
  animation: flameFlicker .85s ease-in-out infinite;
}
.token-flame-wrap .side-a {
  right: 8px;
  top: 9px;
  font-size: 17px;
  animation: sparkOrbit 1.1s ease-in-out infinite;
}
.token-flame-wrap .side-b {
  left: 9px;
  bottom: 8px;
  font-size: 19px;
  opacity: 0.95;
  animation: emberHop 1.25s ease-in-out infinite;
}
.token-talk-wrap .main {
  left: 14px;
  top: 16px;
  font-size: 34px;
  animation: talkPulse .95s ease-in-out infinite;
}
.token-talk-wrap .side-a {
  right: 4px;
  top: 8px;
  font-size: 21px;
  animation: bubbleNod 1.05s ease-in-out infinite;
}
.token-talk-wrap.token-variant-1 .main {
  left: 12px;
  top: 13px;
  font-size: 32px;
}
.token-talk-wrap.token-variant-1 .side-a {
  right: 6px;
  top: 28px;
  font-size: 20px;
}
.token-talk-wrap.token-variant-2 .main {
  left: 13px;
  top: 14px;
  font-size: 33px;
}
.token-talk-wrap.token-variant-2 .side-a {
  right: 5px;
  top: 7px;
  font-size: 22px;
}
.tap-fx {
  position: absolute;
  left: 50%;
  top: 16px;
  font-size: 28px;
  font-weight: 1000;
  pointer-events: none;
  transform: translateX(-50%) scale(.4);
  opacity: 0;
  animation: tapFx 520ms ease forwards;
  text-shadow: 0 10px 22px rgba(0,0,0,0.42), 0 0 14px rgba(255,255,255,0.18);
  filter: drop-shadow(0 10px 18px rgba(8, 3, 18, 0.4));
}
@keyframes tokenBurstIn {
  0% { opacity: 0; transform: translateY(10px) scale(.3); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tokenFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(-3deg); }
}
@keyframes flameFlicker {
  0%, 100% { transform: scale(1) rotate(-5deg); }
  35% { transform: scale(1.12) rotate(2deg); }
  70% { transform: scale(0.94) rotate(-2deg); }
}
@keyframes sparkOrbit {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.88; }
  50% { transform: translate(3px, -4px) scale(1.12); opacity: 1; }
}
@keyframes emberHop {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.88; }
  50% { transform: translate(-2px, -6px) scale(1.06); opacity: 1; }
}
@keyframes talkPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  40% { transform: scale(1.08) rotate(4deg); }
  70% { transform: scale(0.96) rotate(-2deg); }
}
@keyframes bubbleNod {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.08); }
}

.chat-item {
  margin-bottom: 8px; padding: 6px 8px; border-radius: 14px; font-size: 15px; line-height: 1.25;
  color: rgba(245, 241, 255, 0.94); word-break: break-word; background: rgba(255,255,255,0.02);
}
.chat-item .name { font-size: 15px; font-weight: 900; margin-right: 5px; }
.chat-item .message { white-space: pre-wrap; }
.chat-item.strong .message { font-weight: 900; }
.chat-item.emote { font-size: 18px; }
.chat-item.system { background: rgba(255,255,255,0.06); }
.chat-item.paid {
  border: 1px solid rgba(255,226,142,0.26);
  box-shadow: 0 10px 22px rgba(12, 3, 18, 0.22);
}
.chat-item.paid-basic {
  background: linear-gradient(135deg, rgba(255, 201, 90, 0.20), rgba(255, 119, 195, 0.18));
  border-color: rgba(255,226,142,0.26);
}
.chat-item.paid-super {
  background: linear-gradient(135deg, rgba(255, 132, 222, 0.24), rgba(132, 110, 255, 0.18));
  border-color: rgba(255,169,240,0.30);
  box-shadow: 0 10px 24px rgba(41, 15, 70, 0.28);
}
.chat-item.paid-ultra {
  background: linear-gradient(135deg, rgba(84, 227, 255, 0.22), rgba(137, 117, 255, 0.20));
  border-color: rgba(146,236,255,0.34);
  box-shadow: 0 12px 26px rgba(8, 26, 54, 0.32), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.chat-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 22px; margin-right: 7px;
  padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 1000; color: #fff5cb;
  vertical-align: middle; letter-spacing: .2px;
}
.chat-badge.basic {
  background: linear-gradient(135deg, rgba(255,195,80,0.82), rgba(255,110,170,0.78));
}
.chat-badge.super {
  background: linear-gradient(135deg, rgba(255,132,222,0.86), rgba(132,110,255,0.80));
}
.chat-badge.ultra {
  color: #eafcff;
  background: linear-gradient(135deg, rgba(86,226,255,0.88), rgba(118,154,255,0.84));
  box-shadow: 0 0 14px rgba(98, 224, 255, 0.28);
}
.chat-item .emoji-tail { margin-left: 6px; opacity: .92; }
.chat-item.toxic { background: linear-gradient(180deg, rgba(91, 15, 42, 0.76), rgba(41, 9, 30, 0.82)); }


.resource-fly-layer { position: absolute; inset: 0; z-index: 11; pointer-events: none; overflow: hidden; }
.resource-fly, .click-burst { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform, opacity; }
.resource-fly { min-width: 44px; padding: 6px 10px; border-radius: 999px; font-size: 16px; font-weight: 1000; text-align: center; color: #fff; opacity: 1; transform: translate(0,0) scale(1); transition: transform .64s cubic-bezier(.18,.82,.2,1), opacity .64s ease; box-shadow: 0 10px 24px rgba(8,3,18,.28); }
.resource-fly.money { background: linear-gradient(135deg, rgba(255,197,90,.96), rgba(255,121,181,.88)); }
.resource-fly.followers { background: linear-gradient(135deg, rgba(255,123,200,.96), rgba(140,127,255,.88)); }
.resource-fly.interest { background: linear-gradient(135deg, rgba(255,143,95,.96), rgba(255,92,178,.88)); }
.click-burst { font-size: 22px; font-weight: 1000; color: rgba(255,255,255,.96); text-shadow: 0 10px 24px rgba(8,3,18,.34); animation: clickBurst .52s ease-out forwards; }
@keyframes clickBurst { 0% { opacity: 0; transform: translate(0,0) scale(.3); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); } }
.donate-like-row { margin-top: 8px; }
.like-btn { background: linear-gradient(135deg, rgba(255,184,84,.96), rgba(255,120,188,.92)); min-width: 58px; }
.cooldown-indicator { height: 10px; bottom: 6px; }
.cooldown-bar { width: 100%; height: 8px; transform-origin: left center; transform: scaleX(0); flex: none; }
.emoji-tail { margin-left: 4px; opacity: .9; }
.action-token.collected { opacity: 0 !important; }


.character-card-modal { width: 1120px; padding: 28px; }
.character-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 10px; }
.character-card {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 26px;
  min-height: 520px;
  padding: 16px 16px 18px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 10px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.character-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(6, 1, 15, 0.34); border-color: rgba(255,255,255,0.24); }
.character-card.active { border-color: rgba(255,255,255,0.34); box-shadow: 0 0 0 2px rgba(255, 122, 195, 0.18), 0 18px 42px rgba(6, 1, 15, 0.34); }
.character-card:active { transform: translateY(-1px) scale(0.99); }
.character-preview-wrap {
  min-height: 400px;
  border-radius: 22px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(255,132,198,0.18), rgba(115,112,255,0.12) 36%, rgba(255,255,255,0.02) 70%), linear-gradient(180deg, rgba(17,8,35,0.9), rgba(12,6,28,0.84));
  position: relative;
}
.character-preview {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 22px 30px rgba(0,0,0,0.32));
}
.character-preview.female { width: 90%; }
.character-name { font-size: 28px; font-weight: 1000; text-align: center; letter-spacing: .4px; }
.character-desc { font-size: 14px; color: rgba(255,255,255,0.76); text-align: center; line-height: 1.35; min-height: 38px; }


.legendary-grid .legendary-card {
  background:
    radial-gradient(circle at top right, rgba(255,214,120,0.20), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, rgba(255,219,133,0.16), rgba(146,104,255,0.10));
  border-color: rgba(255,217,120,0.24);
}
.legendary-grid .legendary-card img {
  width: 96px;
  height: 96px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(255,241,191,0.14), rgba(255,255,255,0.05));
  border-color: rgba(255,230,173,0.16);
}
.legendary-grid .legendary-card .bonus {
  background: rgba(255,214,120,0.08);
  border-color: rgba(255,214,120,0.12);
}


.settings-card { width: 760px; }
.settings-list { display: grid; gap: 14px; margin-top: 6px; }
.settings-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.04));
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.settings-row.danger { background: linear-gradient(180deg, rgba(255,102,126,0.18), rgba(255,255,255,0.04)); }
.settings-name { font-size: 20px; font-weight: 1000; }
.settings-desc { margin-top: 4px; font-size: 12px; line-height: 1.35; color: rgba(255,255,255,0.76); }
.settings-state {
  min-width: 88px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 1000;
  text-align: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
}
.settings-state.off { color: rgba(255,255,255,0.72); }
.settings-state.on { color: #b9ffcf; }
.settings-state.warn { color: #ffd4d8; }
.single-action { grid-template-columns: 1fr; }

.card.room-card .bonus { margin-top: 6px; }
.card.room-card .req-box { min-width: 108px; }
.card.room-card .req-box span { font-size: 18px; }
.card.room-card .name { text-wrap: balance; }


.card.room-card .bonus { display:flex; align-items:center; }
.helper-card .name { text-wrap: balance; }

@media (max-width: 860px) {
  .card.room-card { padding: 16px; }
  .card.room-card .room-head { flex-direction: column; align-items: stretch; }
  .card.room-card .req-box { justify-self: start; min-width: 112px; }
  .card.room-card .room-preview { height: 186px; min-height: 186px; }
}


/* stable rooms panel layout across resolutions */
.meta-panel[data-panel="rooms"] .panel-body {
  height: calc(100% - 86px);
  padding: 6px 4px 12px 0;
}
.meta-panel[data-panel="rooms"] .room-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.meta-panel[data-panel="rooms"] .card.room-card {
  padding: 16px;
}
.meta-panel[data-panel="rooms"] .card.room-card .room-head {
  flex-direction: row;
  align-items: flex-start;
}
.meta-panel[data-panel="rooms"] .card.room-card .room-preview {
  height: 178px;
  min-height: 178px;
}
.meta-panel[data-panel="rooms"] .card.room-card .req-box {
  min-width: 112px;
}

.nav-btn[disabled] { cursor: default; opacity: 0.68; }
.nav-btn.locked { filter: saturate(0.72); }
.nav-btn.locked img, .nav-btn.locked .nav-emoji { opacity: 0.72; }


.leaderboard-btn{
  margin-left:auto;
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:58px;
  padding:0 20px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(64,28,110,.52);
  color:#fff3ff;
  font-size:20px;
  font-weight:900;
  letter-spacing:.01em;
  box-shadow:0 12px 26px rgba(15,5,33,.32);
}
.leaderboard-btn span{font-size:20px;}
.leaderboard-card{width:min(760px,92vw); max-width:92vw;}
.leaderboard-subtitle{margin-top:8px; color:rgba(255,255,255,.78); font-size:20px;}
.leaderboard-status{margin-top:18px; padding:14px 18px; border-radius:16px; background:rgba(255,255,255,.06); color:#f3eaff; font-size:18px;}
.leaderboard-list{display:flex; flex-direction:column; gap:10px; margin-top:18px;}
.leaderboard-row, .leaderboard-player-row{
  display:grid;
  grid-template-columns:88px 1fr auto;
  align-items:center;
  gap:16px;
  padding:14px 18px;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(112,60,168,.42), rgba(49,27,93,.42));
  border:1px solid rgba(255,255,255,.1);
}
.leaderboard-row.top-1{box-shadow:0 0 0 1px rgba(255,212,110,.28) inset, 0 14px 30px rgba(0,0,0,.18);}
.leaderboard-row.top-2{box-shadow:0 0 0 1px rgba(215,227,255,.2) inset;}
.leaderboard-row.top-3{box-shadow:0 0 0 1px rgba(255,180,120,.2) inset;}
.leaderboard-rank{font-size:28px; font-weight:900; color:#fff5cf;}
.leaderboard-name{font-size:22px; font-weight:800; color:#ffffff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.leaderboard-score{font-size:24px; font-weight:900; color:#93f3ff;}
.leaderboard-player-row{margin-top:16px; background:linear-gradient(180deg, rgba(255,255,255,.09), rgba(97,58,164,.26));}
.leaderboard-player-row.hidden{display:none;}
.leaderboard-actions{margin-top:22px; display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap;}
.modal-btn{
  min-height:72px;
  padding:0 28px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.14);
  cursor:pointer;
  font-size:22px;
  font-weight:900;
  letter-spacing:.02em;
  color:#fff;
  box-shadow:0 12px 28px rgba(14,5,32,.3);
  transition:transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, filter 160ms ease;
}
.modal-btn:hover{transform:translateY(-1px); box-shadow:0 16px 32px rgba(14,5,32,.34);}
.modal-btn.ghost{background:linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.03));}
.modal-btn.primary{background:linear-gradient(135deg, #ff74b3, #9e77ff);}
.leaderboard-actions .modal-btn{min-width:240px;}
.leaderboard-close-btn{min-width:320px; min-height:78px; font-size:26px; border-radius:22px;}
body[data-paused="1"] .action-btn,
body[data-paused="1"] .stop-btn,
body[data-paused="1"] .ban-btn,
body[data-paused="1"] .like-btn{pointer-events:none;}
@media (max-width: 1200px){
  .leaderboard-btn{min-height:52px; padding:0 18px; font-size:18px;}
  .leaderboard-btn span{font-size:18px;}
  .modal-btn{min-height:64px; font-size:20px; padding:0 22px;}
  .leaderboard-close-btn{min-width:280px; min-height:70px; font-size:23px;}
}


#reward-ad-btn small{
  display:inline-block;
  margin-left:8px;
  font-size:.62em;
  font-weight:800;
  opacity:.82;
  vertical-align:middle;
}

