:root {
  color-scheme: light;
  --ink: #191714;
  --muted: #716b62;
  --paper: #f4efe4;
  --panel: #fffaf0;
  --line: #d8c5a2;
  --line-dark: #553325;
  --red: #9d2525;
  --red-dark: #6f1919;
  --gold: #d6a740;
  --green: #1f645a;
  --blue: #243f61;
  --shadow: 0 18px 50px rgba(62, 38, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(214, 167, 64, 0.18), transparent 30%),
    linear-gradient(180deg, #efe4d1 0%, var(--paper) 42%, #f8f3e9 100%);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

body.home-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(24, 17, 14, 0.92) 0%, rgba(44, 25, 18, 0.66) 42%, rgba(44, 25, 18, 0.12) 76%),
    url("/hero-dawarihi.png") center right / cover no-repeat fixed,
    #1f1714;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 0 clamp(18px, 5vw, 72px);
  background: rgba(35, 24, 20, 0.9);
  color: #fff7ea;
  border-bottom: 1px solid rgba(214, 167, 64, 0.45);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), #c78d2d);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  color: #f8e9c9;
}

nav a,
.ghost-button {
  border-radius: 8px;
  padding: 9px 11px;
  color: inherit;
  font: inherit;
  font-weight: 750;
}

nav a:hover,
.ghost-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

nav form {
  margin: 0;
}

button,
.button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 10px 16px;
  box-shadow: 0 12px 26px rgba(157, 37, 37, 0.18);
}

button:hover,
.button:hover,
.primary-link:hover {
  background: var(--red-dark);
}

.button.secondary {
  background: #2f2b27;
  box-shadow: 0 12px 26px rgba(25, 23, 20, 0.14);
}

.ghost-button {
  min-height: auto;
  background: transparent;
  box-shadow: none;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.home-shell main {
  width: 100%;
  min-height: calc(100vh - 68px);
  padding: 0;
}

.flash {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #d49b37;
  background: #fff4ce;
  border-radius: 8px;
  font-weight: 750;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 46px 0 30px;
}

.poster-hero {
  min-height: clamp(440px, 62vh, 620px);
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  border: 1px solid rgba(85, 51, 37, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(28, 19, 16, 0.92) 0%, rgba(48, 27, 20, 0.72) 43%, rgba(48, 27, 20, 0.18) 72%),
    url("/hero-dawarihi.png") center right / cover no-repeat;
  box-shadow: var(--shadow);
}

.home-shell .poster-hero {
  min-height: calc(100vh - 224px);
  padding: clamp(28px, 8vw, 116px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-features {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(1120px, calc(100% - 48px));
  margin: -48px auto 28px;
}

.home-authenticated .home-features {
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding-bottom: 32px;
  align-content: end;
}

.home-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid rgba(239, 211, 160, 0.3);
  border-radius: 8px;
  background: rgba(30, 22, 19, 0.76);
  color: #fff8e8;
  box-shadow: 0 14px 35px rgba(10, 8, 7, 0.22);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.home-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 211, 160, 0.72);
  background: rgba(48, 32, 25, 0.9);
}

.feature-mark {
  display: grid;
  flex: 0 0 52px;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(214, 167, 64, 0.65);
  border-radius: 50%;
  color: #f0cb78;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.feature-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.feature-copy strong {
  font-size: 18px;
}

.feature-copy small {
  overflow: hidden;
  color: #d8c5a2;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-arrow {
  margin-left: auto;
  color: #f0cb78;
  font-size: 24px;
}

.hero-copy {
  width: min(540px, 100%);
  color: #fff8e8;
}

.eyebrow {
  color: var(--red);
  font-weight: 900;
  margin: 0 0 10px;
}

.poster-hero .eyebrow {
  color: var(--gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.poster-hero p {
  color: #f3dfb8;
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.muted,
.topic p,
.card p,
.panel p {
  color: var(--muted);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 18px 0 24px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--line-dark);
  box-shadow: var(--shadow);
}

.stats-strip div {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 16px;
  background: #2e211d;
  color: #fff7e6;
}

.stats-strip strong {
  font-size: clamp(20px, 3vw, 32px);
  line-height: 1;
}

.stats-strip span {
  color: #d9bf88;
  font-size: 13px;
  font-weight: 800;
}

.stats-strip.billing div {
  background: #fff8e8;
  color: var(--ink);
}

.command-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.command-tile,
.card,
.panel,
.topic,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: var(--shadow);
}

.command-tile {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 20px;
}

.command-tile span,
.pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #efe0bd;
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 900;
}

.command-tile strong {
  font-size: 23px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 14px;
}

.text-link {
  color: var(--red);
  font-weight: 900;
}

.list {
  display: grid;
  gap: 14px;
}

.topic {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 18px;
}

.topic-title {
  display: block;
  margin: 4px 0 8px;
  font-size: 21px;
  font-weight: 900;
}

.topic > strong {
  min-width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #233c3b;
  color: #f8e0a4;
  font-size: 22px;
}

.meta,
.reply span,
.field-hint {
  color: var(--muted);
  font-size: 13px;
}

.panel {
  padding: clamp(20px, 4vw, 30px);
  margin-top: 24px;
}

.narrow {
  width: min(500px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.form-hero {
  display: grid;
  gap: 12px;
  text-align: center;
  margin: 16px 0 20px;
}

.form-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 850;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(214, 167, 64, 0.32);
  border-color: #b8842f;
}

textarea {
  resize: vertical;
  line-height: 1.65;
}

.body {
  white-space: pre-wrap;
  line-height: 1.82;
}

.post h1 {
  font-size: clamp(32px, 5vw, 54px);
}

.replies {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.reply {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.reply strong {
  margin-right: 8px;
}

.card {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.full {
  width: 100%;
}

.subscription-url {
  overflow-wrap: anywhere;
  color: var(--green);
  font-size: 13px;
}

.messages {
  height: min(58vh, 520px);
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #2d251f;
}

.messages p,
.chat-message p {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #fffaf0;
  border: 1px solid #ead9b8;
}

.messages span,
.chat-message span {
  display: inline-block;
  margin-left: 8px;
}

.chat-message {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.chat-message.is-deleted {
  opacity: 0.66;
}

.chat-actions {
  display: flex;
  gap: 6px;
}

.chat-actions form {
  margin: 0;
}

.ghost-action {
  min-height: 32px;
  padding: 6px 9px;
  background: rgba(255, 250, 240, 0.12);
  color: #f8e9c9;
  box-shadow: none;
  font-size: 13px;
}

.voice-room {
  display: grid;
  gap: 18px;
}

.voice-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #2d251f;
  color: #fff7ea;
  text-align: center;
}

.voice-stage strong {
  font-size: 32px;
}

.voice-stage span {
  color: #d9bf88;
}

.voice-peers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.voice-members h2 {
  margin-bottom: 12px;
}

.voice-peer {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  font-weight: 850;
}

.voice-peer span {
  color: var(--muted);
  font-size: 13px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.timeline p {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 14px;
  border-left: 4px solid var(--red);
  background: #fff4df;
  border-radius: 0 8px 8px 0;
}

.api-error {
  padding: 12px;
  border: 1px solid rgba(211, 52, 63, 0.35);
  border-radius: 8px;
  background: rgba(211, 52, 63, 0.12);
  color: #ffb0b6;
  font-weight: 800;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.account-row p {
  margin: 8px 0 0;
}

.account-name {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.danger-pill {
  border-color: rgba(157, 37, 37, 0.35);
  background: rgba(157, 37, 37, 0.12);
  color: var(--red-dark);
}

.warn-pill {
  border-color: rgba(214, 167, 64, 0.45);
  background: rgba(214, 167, 64, 0.16);
  color: #7b5514;
}

.invite-code {
  display: block;
  margin: 8px 0;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-list article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
}

.audit-list p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.danger-lite {
  background: var(--blue);
  box-shadow: none;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 26px;
}

.empty-state h2 {
  margin-bottom: 0;
}

.status-float {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 30;
  width: min(330px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid rgba(214, 167, 64, 0.42);
  border-radius: 8px;
  background: rgba(35, 24, 20, 0.92);
  color: #fff7ea;
  box-shadow: 0 18px 50px rgba(25, 17, 12, 0.3);
  backdrop-filter: blur(16px);
  cursor: move;
  touch-action: none;
  user-select: none;
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.status-head strong {
  font-size: 15px;
}

.status-head span {
  color: #d9bf88;
  font-size: 12px;
  font-weight: 800;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.status-grid div {
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.08);
}

.status-grid span {
  display: block;
  margin-bottom: 6px;
  color: #d9bf88;
  font-size: 12px;
  font-weight: 850;
}

.status-grid strong {
  display: block;
  overflow: hidden;
  color: #fffaf0;
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-link {
  display: inline-flex;
  margin-top: 10px;
  color: #f8e0a4;
  font-size: 13px;
  font-weight: 850;
}

@media (max-width: 780px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  nav {
    justify-content: flex-start;
  }

  main {
    width: min(100% - 24px, 1160px);
    padding-top: 18px;
  }

  .home-shell {
    background:
      linear-gradient(0deg, rgba(27, 19, 16, 0.96) 0%, rgba(43, 25, 19, 0.74) 48%, rgba(43, 25, 19, 0.16) 100%),
      url("/hero-dawarihi.png") center top / cover no-repeat fixed,
      #1f1714;
  }

  .home-shell main {
    width: 100%;
    min-height: auto;
    padding: 0;
  }

  .home-shell .poster-hero {
    min-height: 560px;
    padding: 32px 24px 108px;
  }

  .home-features {
    grid-template-columns: 1fr;
    width: min(100% - 32px, 520px);
    margin: -76px auto 24px;
  }

  .home-authenticated .home-features {
    min-height: calc(100vh - 132px);
    margin: 0 auto;
    padding: 24px 0;
  }

  .poster-hero {
    min-height: 520px;
    align-items: end;
    background:
      linear-gradient(0deg, rgba(27, 19, 16, 0.94) 0%, rgba(43, 25, 19, 0.74) 48%, rgba(43, 25, 19, 0.18) 100%),
      url("/hero-dawarihi.png") center top / cover no-repeat;
  }

  .home-shell .poster-hero {
    min-height: calc(100vh - 111px);
    padding: 28px 18px 110px;
    background: transparent;
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-strip div:last-child {
    grid-column: 1 / -1;
  }

  .section-heading,
  .topic,
  .chat-message,
  .admin-row,
  .chat-form,
  .split-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
  }

  .status-float {
    left: 12px;
    bottom: 12px;
  }
}

/* Dark command-center refresh */
:root {
  color-scheme: dark;
  --ink: #f4f7fb;
  --muted: #98a2ad;
  --paper: #15171b;
  --panel: #1f2227;
  --line: #303640;
  --line-dark: #0f1115;
  --red: #d3343f;
  --red-dark: #a9212d;
  --gold: #f3c857;
  --green: #63db42;
  --blue: #60a5fa;
  --shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(19, 21, 26, 0.98), rgba(16, 18, 23, 1)),
    #15171b;
}

body.home-shell {
  background:
    linear-gradient(90deg, rgba(12, 13, 16, 0.94) 0%, rgba(19, 17, 15, 0.72) 40%, rgba(19, 17, 15, 0.18) 76%),
    url("/hero-dawarihi.png") center right / cover no-repeat fixed,
    #101216;
}

.topbar {
  min-height: 58px;
  background: rgba(20, 22, 26, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f5f7fb;
}

.brand {
  font-size: 18px;
}

.brand-mark {
  border-radius: 8px;
  background: linear-gradient(135deg, #eb3b4a, #f59e0b);
}

nav {
  color: #d7dde6;
}

nav a,
.ghost-button {
  border-radius: 6px;
  color: #d7dde6;
}

nav a:hover,
.ghost-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

button,
.button,
.primary-link {
  border-radius: 6px;
  background: #d3343f;
  box-shadow: none;
}

button:hover,
.button:hover,
.primary-link:hover {
  background: #ef4444;
}

.button.secondary {
  background: #30343b;
  color: #fff;
}

main {
  width: min(1180px, calc(100% - 32px));
}

.app-shell main {
  width: min(1380px, calc(100% - 24px));
  padding-top: 20px;
}

.poster-hero {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(90deg, rgba(11, 12, 16, 0.94) 0%, rgba(21, 17, 15, 0.70) 44%, rgba(21, 17, 15, 0.10) 76%),
    url("/hero-dawarihi.png") center right / cover no-repeat;
}

.home-shell .poster-hero {
  min-height: calc(100vh - 58px);
}

.hero-copy {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.poster-hero p {
  color: #d5dde9;
}

.eyebrow,
.poster-hero .eyebrow,
.text-link {
  color: var(--green);
}

.flash {
  border-color: rgba(99, 219, 66, 0.4);
  background: rgba(99, 219, 66, 0.12);
  color: #dfffd5;
}

.command-tile,
.card,
.panel,
.topic,
.empty-state,
.reply {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(31, 34, 39, 0.9);
  box-shadow: var(--shadow);
}

.muted,
.topic p,
.card p,
.panel p,
.meta,
.reply span,
.field-hint {
  color: var(--muted);
}

input,
textarea {
  border-color: #343a44;
  background: #15181e;
  color: #f4f7fb;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(99, 219, 66, 0.18);
  border-color: rgba(99, 219, 66, 0.7);
}

.pill,
.command-tile span {
  border-radius: 999px;
  background: rgba(99, 219, 66, 0.12);
  color: #9cff7d;
}

.stats-strip,
.stats-strip.billing {
  border-color: #2e333b;
  background: #2e333b;
}

.stats-strip div,
.stats-strip.billing div {
  background: #1d2026;
  color: #f6f8fb;
}

.stats-strip.billing {
  grid-template-columns: repeat(4, 1fr);
}

.stats-strip span {
  color: #9ba6b4;
}

.messages {
  border-color: rgba(255, 255, 255, 0.08);
  background: #111318;
}

.messages p,
.chat-message p {
  border-color: rgba(255, 255, 255, 0.06);
  background: #22262d;
}

.ghost-action {
  background: #30343b;
  color: #dce3ed;
}

.subscription-url {
  color: #77e75a;
}

.node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.node-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(35, 39, 46, 0.98), rgba(25, 28, 34, 0.98));
  box-shadow: var(--shadow);
}

.node-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.node-head strong {
  font-size: 20px;
}

.node-head em {
  color: #9ba6b4;
  font-style: normal;
  font-size: 13px;
}

.node-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #747b86;
}

.node-dot.online {
  background: #63db42;
  box-shadow: 0 0 16px rgba(99, 219, 66, 0.65);
}

.node-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.node-stats span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 6px;
  background: #15181e;
  color: #8f99a8;
  font-size: 12px;
}

.node-stats b {
  color: #f4f7fb;
  font-size: 15px;
}

.voice-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: calc(100vh - 98px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #191c21;
  box-shadow: var(--shadow);
}

.voice-roster {
  padding: 18px 14px;
  background: #202329;
}

.voice-roster {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.server-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.server-card div {
  display: grid;
  gap: 4px;
}

.server-card span:last-child,
.channel-group strong,
.voice-peer small {
  color: #8f99a8;
  font-size: 12px;
}

.server-badge,
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #63db42;
  color: #10200d;
  font-weight: 900;
}

.channel-group {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.channel-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 6px;
  color: #cfd6df;
  font-weight: 800;
}

.channel-group a:hover,
.channel-group a.is-active {
  background: #323740;
  color: #fff;
}

.voice-main {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(10, 12, 16, 0.54), rgba(10, 12, 16, 0.88)),
    url("/surrender-chenjian-wide.png") center center / cover no-repeat;
}

.voice-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 22px;
  background: rgba(211, 52, 63, 0.18);
  color: #ffb0b6;
}

.voice-alert span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.voice-alert em {
  margin-left: auto;
  color: #8eea70;
  font-style: normal;
  font-weight: 900;
}

.voice-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 360px;
  padding: 34px;
  background:
    radial-gradient(circle at center, rgba(99, 219, 66, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(16, 19, 26, 0.08), rgba(16, 19, 26, 0.58));
  text-align: center;
}

.voice-stage h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 54px);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

.voice-stage p {
  width: min(620px, 100%);
  color: #dbe3ee;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.78);
}

.pulse-ring {
  width: 92px;
  height: 92px;
  border: 2px solid rgba(99, 219, 66, 0.32);
  border-radius: 50%;
  background: rgba(99, 219, 66, 0.1);
  box-shadow: inset 0 0 0 14px rgba(99, 219, 66, 0.05);
}

.pulse-ring.is-live {
  animation: pulse 1.7s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(var(--voice-level, 1)); box-shadow: 0 0 0 0 rgba(99, 219, 66, 0.22), inset 0 0 0 14px rgba(99, 219, 66, 0.05); }
  50% { transform: scale(calc(var(--voice-level, 1) + 0.06)); box-shadow: 0 0 0 18px rgba(99, 219, 66, 0), inset 0 0 0 14px rgba(99, 219, 66, 0.08); }
}

.voice-control-panel {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(20, 24, 31, 0.86);
  backdrop-filter: blur(14px);
}

.voice-volume-panel {
  display: grid;
  gap: 8px;
  width: min(260px, 100%);
  padding: 10px;
  border-radius: 8px;
  background: #15181e;
}

.voice-volume-panel div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.voice-volume-panel strong,
.voice-volume-panel span {
  color: #dce4ee;
  font-size: 13px;
}

.voice-volume-panel input,
.peer-volume-menu input {
  width: 100%;
  accent-color: #63db42;
}

.voice-meter {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.voice-meter i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #63db42, #d6a740);
  transition: width 0.08s linear;
}

.local-meter {
  height: 8px;
}

.voice-switches,
.voice-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toggle-row {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #15181e;
  color: #cdd5df;
  font-size: 13px;
}

.toggle-row input {
  width: 38px;
  height: 20px;
  accent-color: #63db42;
}

.icon-button {
  width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 50%;
  background: #63db42;
  color: #10200d;
  font-weight: 900;
}

.icon-button.is-muted {
  background: #d3343f;
  color: #fff;
}

.roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.roster-head span {
  color: #63db42;
  font-size: 13px;
  font-weight: 900;
}

.voice-peers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.voice-peer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 850;
}

.voice-peer-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.voice-peer strong {
  width: fit-content;
  max-width: 100%;
  cursor: default;
}

.voice-peer strong[title] {
  cursor: context-menu;
}

.voice-level-row {
  display: grid;
  grid-template-columns: auto minmax(66px, 1fr) 34px;
  align-items: end;
  gap: 7px;
  width: min(190px, 100%);
}

.voice-level-row > span,
.voice-level-value {
  color: #7f8997;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.voice-level-value {
  text-align: right;
}

.voice-level-value.is-active {
  color: #8eea70;
}

.voice-level-chart {
  display: flex;
  align-items: end;
  gap: 3px;
  width: 100%;
  height: 24px;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.055);
}

.voice-level-chart i {
  flex: 1 1 0;
  display: block;
  min-width: 3px;
  height: 4px;
  border-radius: 2px 2px 1px 1px;
  background: #58616e;
  transition: height 0.1s linear, background 0.1s linear, box-shadow 0.1s linear;
}

.voice-level-chart i.is-active {
  background: #63db42;
  box-shadow: 0 0 7px rgba(99, 219, 66, 0.38);
}

.voice-peer b {
  color: #8eea70;
  font-size: 12px;
}

.peer-volume-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: 230px;
  padding: 12px;
  border: 1px solid rgba(99, 219, 66, 0.28);
  border-radius: 8px;
  background: rgba(21, 24, 30, 0.98);
  color: #eef3fa;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

.peer-volume-menu[hidden] {
  display: none;
}

.peer-volume-menu strong {
  font-size: 14px;
}

.peer-volume-menu label {
  display: grid;
  gap: 6px;
  color: #cfd6df;
  font-size: 12px;
}

.peer-volume-menu button {
  min-height: 34px;
  padding: 8px 10px;
  box-shadow: none;
}

.status-float {
  border-color: rgba(99, 219, 66, 0.28);
  background: rgba(24, 27, 32, 0.94);
  color: #f6f8fb;
}

.status-head span,
.status-grid span,
.status-link {
  color: #8eea70;
}

.status-grid div {
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 980px) {
  .voice-app {
    grid-template-columns: 1fr;
  }

  .voice-roster {
    border: 0;
  }

  .voice-control-panel {
    display: grid;
    justify-items: stretch;
  }

  .voice-volume-panel {
    width: 100%;
  }
}

.brand-avatar {
  width: 38px;
  height: 38px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: #050505;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.client-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #1f232a;
  box-shadow: var(--shadow);
}

.client-card strong {
  font-size: 20px;
}

.client-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.guide-card {
  align-content: start;
}

.guide-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #1f232a;
  box-shadow: var(--shadow);
}

.guide-hero h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.guide-hero p {
  margin: 0;
  color: #d8dee8;
  line-height: 1.7;
}

.guide-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.guide-doc {
  display: grid;
  gap: 14px;
}

.guide-step {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #1f232a;
  box-shadow: var(--shadow);
}

.guide-copy {
  display: grid;
  gap: 10px;
}

.step-badge {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(214, 167, 64, 0.16);
  color: #f0c96e;
  font-size: 13px;
  font-weight: 900;
}

.guide-doc h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.guide-doc p,
.guide-doc li {
  color: #d8dee8;
  line-height: 1.75;
}

.guide-doc ol,
.guide-doc ul {
  margin: 0;
  padding-left: 22px;
}

.guide-visual {
  min-height: 260px;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(214, 167, 64, 0.22);
  border-radius: 8px;
  background: #15181d;
  color: #eef3fa;
}

.browser-shot,
.app-window,
.node-list-shot,
.status-shot,
.split-shot,
.phone-screen {
  display: grid;
  gap: 12px;
}

.shot-bar {
  display: flex;
  gap: 6px;
}

.shot-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d6a740;
}

.shot-nav,
.shot-title,
.device-title,
.field-label {
  color: #9ba6b4;
  font-size: 13px;
  font-weight: 800;
}

.shot-title {
  color: #fff7ea;
  font-size: 22px;
}

.shot-card,
.file-chip,
.phone-menu,
.node-row,
.input-demo {
  padding: 12px;
  border-radius: 8px;
  background: #252a32;
}

.shot-card.active,
.file-chip.primary,
.phone-menu.active,
.node-row.good {
  border: 1px solid rgba(119, 231, 90, 0.42);
  background: rgba(31, 100, 90, 0.5);
}

.url-box {
  overflow-wrap: anywhere;
  padding: 13px;
  border: 1px dashed rgba(214, 167, 64, 0.55);
  border-radius: 8px;
  color: #77e75a;
  background: rgba(0, 0, 0, 0.18);
  font-family: Consolas, monospace;
}

.split-shot {
  grid-template-columns: 1fr 0.7fr;
  align-items: end;
}

.device {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #20242b;
}

.phone-device,
.phone-screen {
  max-width: 240px;
  min-height: 260px;
  justify-self: center;
  border-radius: 22px;
}

.phone-top {
  width: 58px;
  height: 7px;
  justify-self: center;
  border-radius: 999px;
  background: #58616e;
}

.app-window {
  grid-template-columns: 132px 1fr;
}

.app-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar span,
.action-row b {
  padding: 10px;
  border-radius: 8px;
  color: #d8dee8;
  background: #252a32;
}

.app-sidebar .selected,
.action-row b {
  color: #fff;
  background: var(--red);
}

.app-panel {
  display: grid;
  gap: 9px;
}

.input-demo.long {
  overflow-wrap: anywhere;
  color: #77e75a;
  font-family: Consolas, monospace;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.phone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 900;
}

.phone-header b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--red);
}

.node-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.connect-demo,
.disconnect-demo {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 8px;
  background: var(--red);
  font-weight: 900;
}

.status-shot {
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.status-shot p {
  margin: 4px 0 0;
  color: #9ba6b4;
}

.status-light {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #77e75a;
  box-shadow: 0 0 0 8px rgba(119, 231, 90, 0.12);
}

@media (max-width: 760px) {
  .guide-hero,
  .guide-step,
  .split-shot,
  .app-window,
  .status-shot {
    grid-template-columns: 1fr;
  }

  .guide-hero {
    display: grid;
  }

  .guide-downloads {
    justify-content: stretch;
  }

  .guide-downloads .button {
    width: 100%;
  }

  .guide-visual {
    min-height: 220px;
  }

  .app-sidebar {
    grid-template-columns: repeat(3, 1fr);
    padding-right: 0;
    padding-bottom: 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .status-shot {
    justify-items: start;
  }
}

.compact-heading h2 {
  margin: 0;
}

.status-grid {
  grid-template-columns: repeat(3, 1fr);
}

.status-float {
  right: 18px;
  left: auto;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.status-float.auto-hide {
  cursor: pointer;
}

.status-float.auto-hide.hide-right {
  transform: translateX(calc(100% - 34px));
}

.status-float.auto-hide.hide-left {
  transform: translateX(calc(-100% + 34px));
}

.status-float.auto-hide:hover,
.status-float.is-pinned {
  transform: translateX(0);
}

.voice-full-shell main {
  width: 100%;
  padding: 0;
}

.voice-full-shell .voice-app {
  min-height: calc(100vh - 58px);
  border: 0;
  border-radius: 0;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.voice-full-shell .voice-stage {
  min-height: auto;
}

.voice-mini {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: none;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid rgba(99, 219, 66, 0.34);
  border-radius: 8px;
  background: rgba(20, 24, 30, 0.72);
  color: #f6f8fb;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(14px);
  cursor: move;
  user-select: none;
}

.voice-mini.is-visible {
  display: grid;
}

.voice-mini span {
  color: #8eea70;
  font-size: 13px;
  font-weight: 900;
}

.global-voice-mini {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: none;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  width: min(410px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid rgba(99, 219, 66, 0.34);
  border-radius: 8px;
  background: rgba(16, 20, 27, 0.72);
  color: #f6f8fb;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(14px);
  cursor: move;
  user-select: none;
}

.global-voice-mini.is-visible {
  display: grid;
}

.global-voice-mini span {
  color: #8eea70;
  font-size: 13px;
  font-weight: 900;
}

.mini-volume {
  grid-column: 1 / -1;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.mini-volume i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #63db42, #facc15);
  transition: width 0.08s linear;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 16px;
}

.game-stage-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #1f232a;
  box-shadow: var(--shadow);
}

.game-screen {
  position: relative;
  overflow: hidden;
  min-height: clamp(360px, 55vh, 620px);
  border-radius: 8px;
  background: linear-gradient(180deg, #172139 0%, #101318 72%);
}

.game-sky {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 48px, rgba(255, 255, 255, 0.04) 49px 50px, transparent 51px 100px),
    radial-gradient(circle at 68% 20%, rgba(239, 68, 68, 0.28), transparent 16%);
}

.game-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 88px;
  background: linear-gradient(180deg, #3f3426, #19150f);
}

.game-hero-sprite,
.game-enemy-sprite {
  position: absolute;
  bottom: 88px;
  width: 48px;
  height: 72px;
  border-radius: 8px 8px 4px 4px;
}

.game-hero-sprite {
  left: 22%;
  background: #63db42;
  box-shadow: 16px 18px 0 -8px #f3c857, -12px 28px 0 -8px #60a5fa;
}

.game-enemy-sprite {
  right: 22%;
  background: #d3343f;
  box-shadow: -18px 22px 0 -8px #f97316;
}

.game-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.game-controls span {
  padding: 8px 10px;
  border-radius: 6px;
  background: #15181e;
  color: #cfd6df;
  font-size: 13px;
  font-weight: 800;
}

.game-plan {
  margin-top: 0;
}

@media (max-width: 780px) {
  .status-grid {
    grid-template-columns: 1fr;
  }

  .status-float.auto-hide.hide-right {
    transform: translateX(calc(100% - 30px));
  }

  .voice-full-shell .voice-app {
    grid-template-columns: 1fr;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }
}

body.game-shell {
  min-height: 100vh;
  overflow: hidden;
  background: #0d1016;
  color: #f8fafc;
}

.game-shell .topbar {
  min-height: 58px;
  background: rgba(14, 16, 22, 0.94);
  border-color: rgba(99, 219, 66, 0.26);
}

.game-shell main {
  width: 100%;
  padding: 0;
}

.arcade-page {
  position: relative;
  height: calc(100vh - 58px);
  min-height: 520px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(13, 16, 22, 0.2), rgba(13, 16, 22, 0.88)),
    radial-gradient(circle at 76% 18%, rgba(99, 219, 66, 0.22), transparent 24%),
    #0d1016;
}

.arcade-hud {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(280px, 1.2fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(17, 21, 29, 0.78);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.arcade-hud span,
.arcade-roster span,
.arcade-overlay p {
  color: #aab4c4;
}

.arcade-hud strong {
  display: block;
  font-size: 20px;
  color: #f8fafc;
}

.arcade-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  gap: 8px;
}

.arcade-stats b {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 12px;
}

.arcade-stats em {
  color: #63db42;
  font-size: 19px;
  font-style: normal;
}

.arcade-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.arcade-wrap {
  position: absolute;
  inset: 0;
}

#arcadeCanvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.arcade-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(8, 11, 17, 0.24), rgba(8, 11, 17, 0.72));
}

.arcade-overlay.is-hidden {
  display: none;
}

.arcade-overlay h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(46px, 8vw, 96px);
  line-height: 0.95;
}

.arcade-overlay p {
  max-width: 720px;
  margin: 0;
  font-size: 17px;
  line-height: 1.8;
}

.arcade-roster {
  position: absolute;
  top: 92px;
  right: 16px;
  z-index: 4;
  display: grid;
  gap: 10px;
  width: min(220px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(17, 21, 29, 0.78);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.arcade-roster strong {
  color: #63db42;
}

.arcade-roster div {
  display: grid;
  gap: 8px;
}

.arcade-roster div span {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-weight: 800;
}

.touch-controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: none;
  justify-content: space-between;
  pointer-events: none;
}

.touch-pad {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.touch-pad button {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

@media (hover: none), (max-width: 860px) {
  .touch-controls {
    display: flex;
  }

  .arcade-stats {
    grid-column: 1 / -1;
    order: 3;
  }

  .arcade-roster {
    top: auto;
    right: 14px;
    bottom: 96px;
    width: 180px;
  }
}

@media (max-width: 620px) {
  body.game-shell {
    overflow: auto;
  }

  .arcade-page {
    height: calc(100vh - 58px);
    min-height: 640px;
  }

  .arcade-hud {
    left: 10px;
    right: 10px;
    grid-template-columns: 1fr;
  }

  .arcade-actions {
    justify-content: flex-start;
  }

  .arcade-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .arcade-roster {
    display: none;
  }
}
