@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");
:root {
  font-family: "DM Sans", Arial, sans-serif;
  color: #eff7f5;
  background: #09131f;
  color-scheme: dark;
  --mint: #56f4c5;
  --accent: #56f4c5;
  --muted: #899eaf;
  --line: #263744;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.studio-nav {
  height: 76px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 36px;
  background: #0d1925;
}
.brand {
  font-family: "Space Grotesk";
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
}
.brand img {
  width: 37px;
  height: 37px;
  object-fit: contain;
  margin-right: 8px;
}
.brand > span {
  color: var(--mint);
}
.brand small {
  font-family: "DM Sans";
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-left: 16px;
  border-left: 1px solid var(--line);
  padding-left: 15px;
}
.studio-nav nav {
  display: flex;
  gap: 8px;
  margin: auto;
}
.studio-nav nav a {
  font-size: 12px;
  padding: 11px 16px;
  border-radius: 6px;
  color: #95a8b8;
}
.studio-nav nav a[aria-current] {
  color: var(--mint);
  background: #1b3535;
}
.account-link {
  font-size: 12px;
  color: #b3c5ce;
  white-space: nowrap;
}
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 345px;
  gap: 25px;
  max-width: 1800px;
  margin: auto;
  padding: 25px 30px;
}
.game-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 14px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: var(--accent);
  font-weight: 600;
}
h1,
h2,
h3 {
  font-family: "Space Grotesk", Arial, sans-serif;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.3px;
  margin: 5px 0 0;
}
.view-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.view-controls button {
  font-size: 22px;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #142331;
}
.mode-badge {
  font-size: 9px;
  letter-spacing: 1px;
  background: #173633;
  border: 1px solid #35615a;
  border-radius: 30px;
  padding: 8px 12px;
  color: var(--mint);
  margin-right: 5px;
}
.mode-badge.live {
  background: #41262e;
  border-color: #86505d;
  color: #ff969f;
}
.stage {
  height: clamp(500px, 68vh, 900px);
  position: relative;
  border: 1px solid #354954;
  border-radius: 12px;
  overflow: hidden;
  background: #b5d2ce;
  isolation: isolate;
}
.scene {
  position: absolute;
  inset: 0;
}
.scene canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.loading-scene {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #153b3a;
  font-size: 14px;
}
.hud {
  position: absolute;
  top: 20px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.hud-brand {
  font-family: "Space Grotesk";
  font-weight: 700;
  font-size: 13px;
  color: #173338;
  letter-spacing: 2px;
}
.hud-brand b {
  font-size: 8px;
  letter-spacing: 2px;
  margin-left: 5px;
  opacity: 0.6;
}
.round-stat {
  background: #0c1b2acc;
  backdrop-filter: blur(8px);
  padding: 9px 13px;
  border: 1px solid #ffffff25;
  border-radius: 7px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #9ab9c1;
  display: flex;
  align-items: center;
  gap: 7px;
}
.round-stat b {
  color: #eff7f5;
  font-size: 13px;
}
.round-stat span {
  border-left: 1px solid #ffffff30;
  padding-left: 13px;
  margin-left: 7px;
}
.round-stat span b {
  margin-left: 7px;
}
.objective {
  position: absolute;
  top: 59px;
  left: 22px;
  width: 200px;
  color: #173338;
  pointer-events: none;
}
.objective > span {
  font-size: 9px;
  letter-spacing: 1.3px;
  font-weight: 700;
}
.objective > div:not(.progress-track) {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.objective strong {
  font-family: "Space Grotesk";
  font-size: 47px;
  letter-spacing: -2px;
}
.objective > div > span {
  font-size: 15px;
  opacity: 0.65;
}
.progress-track {
  height: 4px;
  background: #18383225;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 3px;
  width: 170px;
}
.progress-track i {
  display: block;
  width: 20%;
  height: 100%;
  background: #16493d;
  transition: width 0.15s;
}
.objective p {
  font-size: 9px;
  line-height: 1.6;
  max-width: 160px;
  margin-top: 9px;
}
.effects {
  position: absolute;
  top: 72px;
  right: 22px;
  display: grid;
  gap: 6px;
  pointer-events: none;
}
.effect-badge {
  background: #103b39dd;
  border: 1px solid #67e8bd88;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 10px;
  color: #b9ffee;
}
.effect-badge.frozen {
  background: #25477bd9;
  border-color: #b5e4ff;
  color: #dcf4ff;
}
.onstream-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 65px 20px 15px;
  background: linear-gradient(transparent, #071523cc);
  pointer-events: none;
}
.gift-legend {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  max-width: 95%;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #102433eb;
  border: 1px solid #b0d1c42b;
  border-radius: 8px;
  padding: 8px 11px;
  min-width: 112px;
}
.legend-item > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: #ffffff0c;
  font-size: 18px;
}
.legend-item small {
  display: block;
  font-size: 8px;
  color: #9cb5c2;
}
.legend-item b {
  font-size: 10px;
  display: block;
  margin-top: 3px;
  color: #eff7f5;
}
.onstream-info {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 12px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #dcefe8;
}
.countdown {
  position: absolute;
  top: 33%;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  text-align: center;
  background: #221922de;
  border: 1px solid #ff6979;
  padding: 22px 28px;
  border-radius: 12px;
  min-width: 260px;
  pointer-events: none;
}
.countdown small {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #ff9ca7;
}
.countdown strong {
  font-family: "Space Grotesk";
  font-size: 76px;
  line-height: 1.2;
}
.countdown span {
  font-size: 10px;
  color: #c4b2ba;
}
.state-banner {
  position: absolute;
  left: 50%;
  top: 37%;
  transform: translateX(-50%);
  background: #103831ee;
  border: 1px solid var(--mint);
  border-radius: 10px;
  padding: 20px 35px;
  font-family: "Space Grotesk";
  font-size: 28px;
  white-space: nowrap;
  pointer-events: none;
}
.event-toast {
  position: absolute;
  left: 50%;
  top: 28px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 8px;
  background: #112b2ef0;
  border: 1px solid #7fedc866;
  color: #e3fff5;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.2s;
  max-width: 65%;
  text-align: center;
  pointer-events: none;
}
.event-toast.visible {
  opacity: 1;
}
.transport {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin: 12px 0 0;
}
.transport > div {
  display: flex;
  gap: 8px;
  align-items: center;
}
.transport button {
  background: #142330;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  padding: 9px 12px;
}
.transport span {
  font-size: 10px;
  color: var(--muted);
  margin-left: 10px;
}
.quick-test {
  margin-top: 23px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.quick-test > div:first-child {
  min-width: 155px;
}
.quick-test p {
  font-size: 9px;
  color: var(--muted);
  margin: 7px 0;
}
.quick-test #test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.test-action {
  border: 1px solid #355449;
  background: #15302d;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 10px;
  color: #abf1d3;
}
.test-action.chaos {
  border-color: #5a3944;
  background: #30212b;
  color: #ffb1bb;
}
.game-description {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 20px 0;
  max-width: 750px;
}
.control-panel {
  background: #101e2b;
  border: 1px solid var(--line);
  border-radius: 10px;
  align-self: start;
  overflow: hidden;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #a1b6c5;
}
.connection-dot {
  font-size: 9px;
  letter-spacing: 0;
  color: #8898a5;
}
.connection-dot.connected {
  color: var(--mint);
}
.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}
.panel-tabs button {
  flex: 1;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 11px;
  padding: 14px 4px;
  white-space: nowrap;
}
.panel-tabs button[aria-selected="true"] {
  color: var(--mint);
  border-bottom-color: var(--mint);
}
#activity-count {
  font-size: 8px;
  margin-left: 3px;
  color: #769790;
}
.panel-body {
  padding: 23px 20px;
  max-height: calc(100vh - 192px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #345164 transparent;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
}
.setup-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 24px 0 17px;
}
.setup-step:first-child {
  margin-top: 0;
}
.setup-step > span {
  border: 1px solid #35574e;
  color: var(--mint);
  background: #18332f;
  border-radius: 6px;
  font-size: 9px;
  padding: 7px;
  margin-top: 0;
}
.setup-step p {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.setup-step h2 {
  font-size: 14px;
}
label {
  display: block;
  font-size: 10px;
  color: #a9becb;
  line-height: 1.6;
}
input,
select {
  width: 100%;
  border: 1px solid #324959;
  border-radius: 5px;
  background: #0b1723;
  color: #e6f2ef;
  padding: 11px 10px;
  font-size: 12px;
  margin-top: 7px;
  min-width: 0;
}
input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--mint);
}
.input-prefix {
  position: relative;
}
.input-prefix > span {
  position: absolute;
  left: 12px;
  top: 17px;
  color: #6f8b9c;
}
.input-prefix input {
  padding-left: 29px;
}
.primary,
.secondary {
  display: block;
  width: 100%;
  padding: 12px 15px;
  margin-top: 12px;
  text-align: center;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.primary {
  background: var(--mint);
  color: #102f2a;
  border: 1px solid var(--mint);
}
.primary:hover {
  background: #99ffdd;
}
.secondary {
  background: #182a39;
  border: 1px solid #344b5a;
  color: #e4f2ed;
}
.secondary:hover {
  border-color: var(--mint);
}
.subtle {
  border: 0;
  background: none;
  color: #a7c7c0;
  font-size: 10px;
  padding: 0;
  margin: 0 0 10px;
}
.status-message {
  font-size: 10px;
  color: #9ec1b7;
  line-height: 1.8;
  margin: 12px 0;
}
.status-message.error {
  color: #ff9ba7;
}
.helper {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}
.connection-note {
  background: #152c30;
  padding: 15px;
  border: 1px solid #294246;
  border-radius: 7px;
  margin-top: 20px;
}
.connection-note b {
  font-size: 11px;
}
.connection-note p {
  font-size: 10px;
  color: #8ca9b0;
  line-height: 1.8;
}
.connection-note a {
  font-size: 10px;
  color: var(--mint);
}
.gift-row {
  border: 1px solid #304553;
  border-radius: 7px;
  padding: 13px;
  background: #132331;
  margin: 14px 0;
}
.gift-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gift-row-top .toggle {
  font-size: 10px;
}
.gift-row-top button {
  background: none;
  border: 0;
  color: #aa8190;
  font-size: 18px;
  padding: 0 3px;
}
.gift-row-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.gift-row-grid.amount-grid {
  grid-template-columns: 1.6fr 0.7fr;
}
.gift-row input,
.gift-row select {
  font-size: 11px;
  padding: 9px 8px;
}
.toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  color: #cbdbde;
}
.trigger-box {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 17px;
}
.trigger-fields {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 9px;
  margin-top: 10px;
}
.trigger-box > label:not(.toggle) {
  margin-top: 10px;
}
.chat-toggle {
  margin-top: 20px;
}
.activity-row {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  display: flex;
  gap: 10px;
}
.activity-row .activity-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #213d39;
  color: var(--mint);
  font-size: 15px;
}
.activity-row > div {
  flex: 1;
  min-width: 0;
}
.activity-row b {
  font-size: 11px;
  display: block;
  overflow-wrap: anywhere;
}
.activity-row p {
  font-size: 10px;
  line-height: 1.7;
  color: #9eb5c0;
  margin: 4px 0;
  overflow-wrap: anywhere;
}
.activity-row small {
  font-size: 8px;
  color: #7b959e;
}
.empty {
  font-size: 11px;
  line-height: 1.9;
  color: #718c9d;
  text-align: center;
  margin: 55px 18px;
}
.studio-toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  max-width: 90%;
  background: #173b35;
  border: 1px solid #487d68;
  padding: 15px 22px;
  font-size: 12px;
  border-radius: 8px;
  box-shadow: 0 20px 60px #0006;
}
.scene-error {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-content: center;
  text-align: center;
  background: #132330;
  padding: 40px;
  font-size: 14px;
  line-height: 1.8;
}
.theme-arena .hud-brand,
.theme-arena .objective {
  color: #e6dbff;
}
.theme-arena .progress-track {
  background: #b29aff33;
}
.theme-arena .progress-track i {
  background: #b29aff;
}
.stage:fullscreen {
  height: 100vh;
  width: 100vw;
  border: 0;
  border-radius: 0;
}
.overlay-page {
  margin: 0;
  background: #09131f;
}
.overlay-page .stage {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}
.overlay-page .hud {
  top: 4%;
  left: 5%;
  right: 5%;
}
.overlay-page .objective {
  top: 11%;
  left: 5%;
  transform-origin: top left;
}
.overlay-page .onstream-bottom {
  padding: 80px 5% 5%;
}
.overlay-page .gift-legend {
  max-width: 100%;
}
.overlay-page .scene {
  inset: 0;
}
.overlay-page .event-toast {
  top: 25%;
  font-size: 16px;
}
.overlay-page .legend-item {
  padding: 12px 16px;
}
.overlay-page .legend-item small {
  font-size: 12px;
}
.overlay-page .legend-item b {
  font-size: 15px;
}
.overlay-page .onstream-info {
  font-size: 12px;
}
.overlay-page .objective strong {
  font-size: 65px;
}
.overlay-page .effects {
  top: 12%;
  right: 5%;
}
.overlay-page .effect-badge {
  font-size: 14px;
}
.overlay-page .connection-loss {
  position: absolute;
  top: 45%;
  left: 10%;
  right: 10%;
  background: #0a1928ee;
  border: 1px solid #ff9d9d;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  font-size: 18px;
  color: #ffc4c4;
}
@media (min-width: 1500px) {
  .studio {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
    padding: 28px 40px;
  }
  .panel-body {
    padding: 26px;
  }
  .stage {
    height: 72vh;
  }
  .objective {
    top: 80px;
    left: 28px;
  }
  .objective strong {
    font-size: 60px;
  }
}
@media (max-width: 1100px) {
  .studio {
    padding: 20px;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .studio-nav {
    padding: 0 20px;
    gap: 15px;
  }
  .brand small {
    display: none;
  }
  .studio-nav nav a {
    font-size: 10px;
    padding: 10px;
  }
  .quick-test {
    display: block;
  }
  .quick-test > div:first-child {
    margin-bottom: 12px;
  }
  .transport span {
    display: none;
  }
  .event-toast {
    top: 190px;
  }
  .gift-legend {
    max-width: 100%;
  }
  .legend-item {
    min-width: 90px;
    padding: 7px;
  }
  .legend-item b {
    font-size: 9px;
  }
  .legend-item > span {
    width: 20px;
    font-size: 16px;
  }
  .onstream-info {
    font-size: 7px;
  }
  .objective strong {
    font-size: 40px;
  }
  .objective {
    width: 160px;
  }
  .view-controls {
    gap: 5px;
  }
  .mode-badge {
    font-size: 8px;
    padding: 7px;
  }
  h1 {
    font-size: 28px;
  }
}
@media (max-width: 780px) {
  .studio-nav {
    height: auto;
    min-height: 68px;
    padding: 15px 18px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand {
    font-size: 23px;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .studio-nav nav {
    order: 3;
    width: 100%;
    margin: 3px 0 0;
    justify-content: space-between;
  }
  .studio-nav nav a {
    flex: 1;
    text-align: center;
  }
  .account-link {
    margin-left: auto;
  }
  .studio {
    display: block;
    padding: 19px 14px;
  }
  .game-heading {
    margin-bottom: 15px;
  }
  h1 {
    font-size: 27px;
  }
  .game-heading .eyebrow {
    font-size: 8px;
  }
  .stage {
    height: 65vh;
    min-height: 480px;
  }
  .objective {
    left: 16px;
    top: 58px;
    width: 155px;
  }
  .hud {
    left: 16px;
    right: 16px;
  }
  .hud-brand {
    font-size: 10px;
  }
  .objective strong {
    font-size: 39px;
  }
  .objective > span {
    font-size: 8px;
  }
  .objective p {
    font-size: 8px;
  }
  .progress-track {
    width: 135px;
  }
  .effects {
    right: 15px;
    top: 74px;
  }
  .effect-badge {
    font-size: 9px;
    padding: 8px;
  }
  .onstream-bottom {
    padding: 70px 12px 13px;
  }
  .gift-legend {
    gap: 5px;
  }
  .legend-item {
    flex: 1;
    min-width: 82px;
    padding: 7px 5px;
    gap: 5px;
  }
  .legend-item small {
    font-size: 7px;
  }
  .legend-item b {
    font-size: 8px;
  }
  .legend-item > span {
    width: 18px;
    font-size: 15px;
  }
  .onstream-info {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .transport button {
    font-size: 10px;
    padding: 9px 10px;
  }
  .view-controls button {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
  .mode-badge {
    font-size: 7px;
  }
  .quick-test {
    margin-top: 18px;
    padding-top: 17px;
  }
  .quick-test #test-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .test-action {
    padding: 11px 6px;
    font-size: 9px;
  }
  .control-panel {
    margin-top: 22px;
  }
  .panel-body {
    max-height: none;
    padding: 21px;
  }
  .panel-tabs button {
    font-size: 12px;
  }
  .panel-title {
    padding: 20px;
  }
  .game-description {
    font-size: 11px;
  }
  .event-toast {
    font-size: 10px;
    max-width: 85%;
    top: 190px;
  }
  .overlay-page .stage {
    min-height: 0;
  }
  .overlay-page .objective strong {
    font-size: 45px;
  }
  .overlay-page .legend-item {
    padding: 8px;
  }
  .overlay-page .legend-item b {
    font-size: 10px;
  }
  .overlay-page .legend-item small {
    font-size: 8px;
  }
  .overlay-page .onstream-info {
    font-size: 8px;
  }
  .overlay-page .event-toast {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
