:root {
  --bg: #071019;
  --panel: #0d1722;
  --panel-2: #111f2d;
  --panel-3: #162638;
  --line: #24374a;
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --muted: #9fb0c2;
  --green: #61d53f;
  --green-dark: #2f8b24;
  --blue: #1f86ff;
  --gold: #f2a51e;
  --red: #dc3e32;
  --red-dark: #84281f;
  --shadow: rgba(0, 0, 0, 0.36);
  font-family: Montserrat, Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  scrollbar-color: #2b8a28 #07111b;
  scrollbar-width: thin;
}

body {
  margin: 0;
  color: var(--text);
  font-weight: 500;
  background:
    radial-gradient(circle at 20% 12%, rgba(31, 134, 255, 0.12), transparent 28rem),
    linear-gradient(135deg, #05090f 0%, var(--bg) 44%, #05090f 100%);
}

body::-webkit-scrollbar {
  width: 9px;
}

body::-webkit-scrollbar-track {
  background: #07111b;
}

body::-webkit-scrollbar-thumb {
  background: #2b8a28;
  border: 2px solid #07111b;
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb:hover {
  background: #61d53f;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.62;
}

input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: #09131d;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  outline: none;
}

input:focus {
  border-color: var(--blue);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-card {
  width: min(340px, 100%);
  text-align: center;
  background: rgba(13, 23, 34, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 24px 70px var(--shadow);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: transparent;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-shell {
  width: min(1420px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px;
  position: relative;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(13, 24, 36, 0.96), rgba(6, 13, 21, 0.96));
  border: 1px solid rgba(116, 140, 166, 0.22);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  margin-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  width: auto;
  flex: 0 0 112px;
  min-height: 56px;
  padding: 2px 8px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.brand-product-logo {
  width: 84px;
  height: 56px;
  display: block;
  object-fit: contain;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
}

.brand-title {
  min-width: 0;
}

.brand-title strong {
  display: block;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1;
  text-transform: uppercase;
}

.brand-title span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.ape-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 5px;
  object-fit: contain;
  box-shadow: none;
}

.brand-mark-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.balance-coin {
  width: 22px;
  height: 22px;
}

.balance-pill,
.online-pill,
.glyph-connect-pill {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13, 23, 34, 0.92);
  border: 1px solid rgba(116, 140, 166, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 800;
  white-space: nowrap;
}

.glyph-connect-pill {
  margin-left: 0;
  color: #f7fbff;
  background: #1268d8;
  border-color: rgba(92, 166, 255, 0.44);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.glyph-connect-pill:hover {
  background: #1975ea;
  border-color: rgba(132, 190, 255, 0.58);
}

.glyph-connect-pill span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balance-pill {
  padding-right: 14px;
}

.balance-pill strong {
  color: var(--green);
  font-size: 16px;
  line-height: 1;
}

.balance-text {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.balance-text small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.online-pill span {
  color: var(--green);
  font-size: 12px;
  text-transform: uppercase;
}

.topbar .online-pill {
  margin-left: auto;
}

.topbar .language-switch {
  margin-left: auto;
}

.topbar .balance-pill {
  margin-left: 0;
}

.topbar .glyph-connect-pill {
  margin-left: 0;
}

.topbar.no-balance .notification-button {
  margin-left: 0;
}

.mode-switch,
.language-switch {
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: rgba(13, 23, 34, 0.92);
  border: 1px solid rgba(116, 140, 166, 0.2);
  border-radius: 8px;
}

.language-switch {
  min-width: 92px;
}

.mode-switch button,
.language-switch button {
  min-width: 62px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.language-switch button {
  min-width: 38px;
  padding: 0 10px;
}

.mode-switch button.active,
.language-switch button.active {
  color: #f4fff2;
  background: #268426;
}

.mode-switch button.active[data-game-mode="ape"] {
  background: #1268d8;
  border-color: rgba(92, 166, 255, 0.48);
}

.notification-button {
  position: relative;
  overflow: visible;
}

.bell-icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: #dce8f4;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notify-count {
  position: absolute;
  right: -3px;
  top: -3px;
  min-width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  padding: 0 3px;
  border-radius: 99px;
  color: #fff;
  background: #e05349;
  border: 2px solid #071019;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.notification-center {
  position: absolute;
  top: 74px;
  right: 14px;
  z-index: 20;
  width: min(340px, calc(100vw - 28px));
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #07111b;
  border: 1px solid rgba(145, 168, 191, 0.24);
  border-radius: 8px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48);
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-head > div:first-child {
  min-width: 0;
}

.notification-head strong,
.notification-head span {
  display: block;
}

.notification-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.notification-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-actions .ghost-button {
  flex: 0 0 auto;
  min-height: 34px;
  min-width: 96px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.notification-list {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-color: #2b8a28 #07111b;
  scrollbar-width: thin;
}

.notification-list::-webkit-scrollbar {
  width: 9px;
}

.notification-list::-webkit-scrollbar-track {
  background: #07111b;
  border-radius: 999px;
}

.notification-list::-webkit-scrollbar-thumb {
  background: #2b8a28;
  border: 2px solid #07111b;
  border-radius: 999px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
  background: #61d53f;
}

.notification-item {
  display: grid;
  gap: 2px;
  padding: 9px;
  border-radius: 8px;
  background: #0b1520;
  border: 1px solid rgba(145, 168, 191, 0.16);
}

.notification-item.success {
  border-color: rgba(97, 213, 63, 0.34);
}

.notification-item.warning {
  border-color: rgba(242, 165, 30, 0.38);
}

.notification-item strong {
  font-size: 14px;
}

.notification-item span,
.notification-item small,
.mode-caption {
  color: var(--muted);
  font-size: 12px;
}

.mode-caption {
  display: block;
  margin-top: 6px;
}

.icon-button,
.primary-button,
.green-button,
.gold-button,
.red-button,
.ghost-button {
  min-height: 42px;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  border: 1px solid transparent;
}

.icon-button {
  width: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  border-color: var(--line);
}

.primary-button {
  background: #1169d8;
  border-color: rgba(79, 155, 255, 0.46);
}

.green-button {
  background: #2f8b24;
  border-color: rgba(122, 230, 91, 0.36);
}

.gold-button {
  color: #f4fff2;
  background: #268426;
  border-color: rgba(99, 211, 91, 0.42);
}

.red-button {
  background: #a53228;
  border-color: rgba(235, 100, 88, 0.38);
}

.ghost-button {
  color: var(--muted);
  background: #0a121b;
  border-color: var(--line);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 12px;
  align-items: start;
  background: transparent;
}

.content-grid.solo {
  grid-template-columns: 1fr;
}

.workspace {
  min-width: 0;
}

.panel {
  background: rgba(13, 23, 34, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px var(--shadow);
  overflow: hidden;
}

.panel-pad {
  padding: 14px;
}

.lobby {
  position: relative;
  min-height: 640px;
  background-image:
    linear-gradient(180deg, rgba(7, 16, 25, 0.06), rgba(7, 16, 25, 0.38)),
    url("/assets/lobby-plaza.png");
  background-size: cover;
  background-position: center;
}

.map-action {
  position: absolute;
  display: grid;
  gap: 3px;
  min-width: 150px;
  padding: 11px 13px;
  border-radius: 8px;
  color: var(--text);
  background: rgba(8, 14, 20, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  text-align: left;
}

.map-action strong {
  font-size: 17px;
  line-height: 1;
}

.map-action span {
  color: #d7e3f1;
  font-size: 12px;
}

.map-action.arena {
  left: 18%;
  top: 25%;
}

.map-action.shop {
  right: 19%;
  top: 26%;
}

.map-action.bank {
  left: 13%;
  top: 50%;
}

.map-action.clans {
  right: 16%;
  top: 52%;
}

.map-action.quests {
  left: 44%;
  top: 56%;
}

.map-action.tourneys {
  left: 5%;
  bottom: 13%;
}

.chat-strip {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: min(620px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(5, 9, 14, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d9e3ee;
}

.chat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #132132;
  color: var(--gold);
  flex: 0 0 auto;
}

.side-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  background: transparent;
}

.profile-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.avatar,
.small-avatar {
  display: block;
  background: #071019;
  border: 1px solid var(--line);
  object-fit: cover;
}

.avatar {
  width: 56px;
  height: 56px;
  padding: 5px;
  border-radius: 8px;
  object-fit: contain;
  object-position: center bottom;
}

.small-avatar {
  width: 48px;
  height: 48px;
  border-radius: 6px;
}

.profile-name {
  min-width: 0;
}

.profile-name h2 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.14;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-edit-button {
  font-size: 13px;
  letter-spacing: 0;
}

.profile-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.profile-actions .icon-button {
  width: 38px;
  min-height: 38px;
}

.logout-button {
  color: #ffb5ae;
  border-color: rgba(255, 106, 96, 0.24);
}

.logout-button:hover {
  border-color: rgba(255, 106, 96, 0.48);
  background: rgba(122, 34, 30, 0.28);
}

.demo-name-editor {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(7, 17, 27, 0.76);
  border: 1px solid rgba(145, 168, 191, 0.16);
  border-radius: 8px;
}

.demo-name-editor label {
  display: grid;
  gap: 6px;
}

.demo-name-editor label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-name-note {
  color: #8ea6bf;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: none;
}

.demo-name-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 8px;
}

.demo-name-actions button {
  min-height: 36px;
  padding: 0 11px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.demo-name-actions .btn-icon {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.profile-name span,
.profile-name small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profile-earnings {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 11px;
  background: #07111b;
  border: 1px solid rgba(145, 168, 191, 0.16);
  border-radius: 8px;
}

.profile-heroes-button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(72, 132, 193, 0.34);
  border-radius: 7px;
  color: #eaf4ff;
  background: #0b1b2a;
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.profile-heroes-button:hover {
  border-color: rgba(75, 153, 235, 0.7);
  background: #10263a;
}

.profile-heroes-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(96, 154, 216, 0.3);
  border-radius: 6px;
  background: #07121d;
}

.profile-heroes-avatar img {
  width: 100%;
  height: 100%;
  padding: 2px;
  object-fit: contain;
  object-position: center bottom;
}

.profile-heroes-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-heroes-copy strong {
  font-size: 12px;
  line-height: 1;
}

.profile-heroes-copy small {
  overflow: hidden;
  color: #7996b2;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-heroes-arrow {
  color: #74b7ff;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.profile-pass-button {
  margin-top: 7px;
  border-color: rgba(188, 80, 255, 0.32);
  background: #101727;
}

.profile-pass-button:hover {
  border-color: rgba(62, 206, 255, 0.62);
  background: #111f30;
}

.profile-pass-button.owned {
  border-color: rgba(97, 213, 63, 0.46);
  background: #0d2119;
}

.profile-pass-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(76, 202, 255, 0.42);
  border-radius: 6px;
  color: #b9f6ff;
  background: #0a1b29;
  font-size: 17px;
  font-weight: 900;
}

.profile-earnings > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(31, 134, 255, 0.1);
  border: 1px solid rgba(93, 150, 255, 0.24);
}

.profile-earn-coin {
  width: 28px;
  height: 28px;
}

.profile-earnings small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-earnings strong {
  display: block;
  margin-top: 3px;
  color: #ffe1a1;
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}

.glyph-login-panel {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-height: 0;
  padding: 28px 22px;
  align-content: start;
  text-align: center;
}

.glyph-login-mark {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 8px;
  background: #0a1420;
  border: 1px solid rgba(93, 150, 255, 0.3);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}

.glyph-login-coin {
  width: 46px;
  height: 46px;
}

.glyph-login-copy {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.glyph-login-panel .eyebrow {
  margin: 0 auto;
}

.glyph-login-panel h2 {
  margin: 0;
  max-width: 280px;
  font-size: 26px;
  line-height: 1.08;
  text-transform: uppercase;
}

.glyph-login-panel p {
  margin: 0 auto;
  max-width: 270px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.glyph-login-button {
  width: min(100%, 260px);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
}

.wallet-summary {
  display: grid;
  gap: 8px;
}

.account-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(13, 25, 38, 0.94), rgba(6, 13, 21, 0.96));
  border: 1px solid rgba(145, 168, 191, 0.16);
  border-radius: 8px;
}

.account-balance {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(145, 168, 191, 0.14);
}

.account-balance span,
.account-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-balance strong {
  display: block;
  min-width: 0;
  color: #6ee94c;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(97, 213, 63, 0.22);
}

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

.account-metrics.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-metrics > div {
  min-width: 0;
  padding: 10px;
  background: #07111b;
  border: 1px solid rgba(145, 168, 191, 0.14);
  border-radius: 8px;
}

.account-metrics strong {
  display: block;
  margin-top: 5px;
  min-width: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-metrics .entry-metric strong {
  color: #ff7b6f;
}

.summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  min-height: 62px;
  padding: 12px;
  min-width: 0;
  background: #08121c;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.summary-item strong {
  display: block;
  justify-self: end;
  font-size: 20px;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.summary-item.stake strong {
  color: var(--red);
}

.summary-item.balance strong {
  color: var(--green);
}

.summary-item span,
.summary-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.summary-item small {
  grid-column: 1 / -1;
  text-transform: none;
}

.wallet-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.button-row > button {
  min-width: 0;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  text-transform: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.button-row > button .btn-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  color: #f4f7fb;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
  font-size: 16px;
  font-weight: 800;
}

.button-row > .primary-button .btn-icon {
  background: #1259b6;
  border-color: rgba(164, 205, 255, 0.22);
}

.button-row > .green-button .btn-icon {
  background: #20741c;
  border-color: rgba(169, 238, 139, 0.22);
}

.button-row > .primary-button {
  background: #1766c7;
  border-color: rgba(91, 160, 255, 0.42);
}

.button-row > .green-button {
  background: #268426;
  border-color: rgba(99, 211, 91, 0.36);
}

.button-row > button > span:not(.btn-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.wallet-actions {
  margin-top: 10px;
}

.wallet-actions > button {
  min-height: 48px;
  padding: 0 12px;
  font-size: 14px;
}

.wallet-actions > button > span:not(.btn-icon) {
  overflow: visible;
  text-overflow: clip;
}

.demo-deposit-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.demo-deposit-box label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.demo-deposit-box label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-deposit-box input {
  min-height: 48px;
  padding: 0 12px;
  font-weight: 800;
}

.demo-deposit-box .primary-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 12px;
  font-size: 14px;
  white-space: nowrap;
}

.number-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  min-height: 48px;
  overflow: hidden;
  background: #09131d;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.number-control:focus-within {
  border-color: var(--blue);
}

.number-control input {
  min-height: 46px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 12px;
  font-weight: 800;
}

.number-steps {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  padding: 4px;
  background: #0d1b29;
  border-left: 1px solid rgba(145, 168, 191, 0.16);
}

.number-step {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 5px;
  background: #14283a;
  border: 1px solid rgba(97, 213, 63, 0.16);
}

.number-step:hover {
  background: #19364b;
  border-color: rgba(97, 213, 63, 0.34);
}

.number-step span {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}

.number-step.up span {
  border-bottom: 6px solid #8cf070;
}

.number-step.down span {
  border-top: 6px solid #8cf070;
}

.earnings-leaderboard {
  display: grid;
  gap: 12px;
}

.earnings-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
}

.earnings-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.earning-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: #07111b;
  border: 1px solid rgba(145, 168, 191, 0.16);
  border-radius: 8px;
}

.earning-tabs button {
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.earning-tabs button.active {
  color: #f4fff2;
  background: #268426;
}

.earning-list {
  display: grid;
  gap: 7px;
}

.earning-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  background: #07111b;
  border: 1px solid rgba(145, 168, 191, 0.16);
  border-radius: 8px;
}

.earning-row strong {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #ffe1a1;
  background: rgba(242, 165, 30, 0.1);
  border: 1px solid rgba(242, 165, 30, 0.18);
  font-size: 11px;
}

.earning-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.earning-row em {
  color: #6ee94c;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.earning-empty {
  padding: 12px;
  background: #07111b;
  border: 1px solid rgba(145, 168, 191, 0.16);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

.screen-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.screen-title h1,
.screen-title h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  text-transform: uppercase;
}

.arena-layout {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 12px;
}

.battle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.opponent-list {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.opponent-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 8px;
  background: #0b1520;
  border: 1px solid var(--line);
}

.opponent-copy {
  min-width: 0;
}

.opponent-copy strong,
.opponent-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.opponent-copy span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}

.battle-panel {
  min-height: 640px;
  background:
    linear-gradient(180deg, rgba(6, 10, 15, 0.34), rgba(6, 10, 15, 0.74)),
    url("/assets/battle-arena.png");
  background-size: cover;
  background-position: center;
  display: grid;
  grid-template-rows: auto minmax(290px, 1fr) auto;
}

.battle-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px;
}

.fighter-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fighter-name.right {
  justify-content: end;
  text-align: right;
}

.fighter-name strong {
  display: block;
  font-size: 18px;
  overflow-wrap: anywhere;
}

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

.versus {
  text-align: center;
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(242, 165, 30, 0.55);
}

.versus span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: none;
}

.fighters {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  min-height: 320px;
  padding: 0 34px;
}

.fighter-img {
  align-self: end;
  justify-self: center;
  width: min(270px, 38vw);
  max-height: 330px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.52));
}

.fighter-img.enemy {
  transform: scaleX(-1);
}

.hp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 0 34px 14px;
}

.hp {
  height: 26px;
  border-radius: 6px;
  background: rgba(9, 18, 27, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  position: relative;
}

.hp span {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, #f35a49, #b42118);
}

.hp strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.combat-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  background: rgba(7, 16, 25, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.zone-box {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.zone-title {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

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

.zone-button {
  position: relative;
  min-height: 62px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(145, 168, 191, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 31, 45, 0.94), rgba(8, 17, 27, 0.96));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 10px;
  padding: 10px 12px;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  text-align: left;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.zone-button::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--zone-accent, rgba(145, 168, 191, 0.42));
  opacity: 0.22;
  transform: scaleX(0.38);
  transform-origin: left center;
}

.zone-button.attack {
  --zone-accent: #ff675d;
  background:
    radial-gradient(circle at 18% 0%, rgba(220, 62, 50, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(49, 20, 27, 0.94), rgba(17, 17, 26, 0.98));
}

.zone-button.defense {
  --zone-accent: #62a7ff;
  background:
    radial-gradient(circle at 18% 0%, rgba(31, 134, 255, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(15, 32, 56, 0.94), rgba(8, 17, 30, 0.98));
}

.zone-button.selected {
  color: #f8fbff;
  border-color: rgba(126, 230, 96, 0.34);
  outline: 0;
  box-shadow:
    inset 0 0 0 1px rgba(126, 230, 96, 0.1),
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.2);
}

.zone-button.selected::before {
  background: linear-gradient(90deg, #61d53f, var(--zone-accent, #61d53f));
  opacity: 1;
  transform: scaleX(1);
}

.zone-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  line-height: 1;
}

.zone-button.attack .zone-icon {
  background: rgba(220, 62, 50, 0.18);
  border-color: rgba(255, 137, 126, 0.18);
}

.zone-button.defense .zone-icon {
  background: rgba(31, 134, 255, 0.16);
  border-color: rgba(122, 184, 255, 0.18);
}

.zone-button.selected .zone-icon {
  color: #b7ffa9;
  background: rgba(97, 213, 63, 0.14);
  border-color: rgba(126, 230, 96, 0.28);
}

.zone-button > span:not(.zone-icon) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  grid-column: 1 / -1;
}

.history-list,
.wallet-list,
.leaderboard-list {
  display: grid;
  gap: 8px;
}

.battle-layout .history-panel {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 112px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.battle-layout .history-list {
  min-height: 0;
  overflow: auto;
  padding-right: 10px;
  scrollbar-color: #2b8a28 #07111b;
  scrollbar-width: thin;
}

.battle-layout .history-list::-webkit-scrollbar {
  width: 8px;
}

.battle-layout .history-list::-webkit-scrollbar-track {
  background: #07111b;
  border-radius: 999px;
}

.battle-layout .history-list::-webkit-scrollbar-thumb {
  background: #2b8a28;
  border: 2px solid #07111b;
  border-radius: 999px;
}

.battle-layout .history-list::-webkit-scrollbar-thumb:hover {
  background: #61d53f;
}

.history-row,
.wallet-row,
.leaderboard-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #0b1520;
  border: 1px solid var(--line);
}

.history-row {
  border-left: 4px solid rgba(159, 176, 194, 0.26);
}

.history-row.good {
  background:
    linear-gradient(90deg, rgba(97, 213, 63, 0.14), rgba(11, 21, 32, 0.96));
  border-color: rgba(97, 213, 63, 0.34);
}

.history-row.bad {
  background:
    linear-gradient(90deg, rgba(220, 62, 50, 0.14), rgba(11, 21, 32, 0.96));
  border-color: rgba(220, 62, 50, 0.34);
}

.history-row.critical {
  background:
    linear-gradient(90deg, rgba(242, 165, 30, 0.2), rgba(11, 21, 32, 0.96));
  border-color: rgba(242, 165, 30, 0.48);
}

.history-row.trade {
  background:
    linear-gradient(90deg, rgba(31, 134, 255, 0.14), rgba(11, 21, 32, 0.96));
  border-color: rgba(31, 134, 255, 0.34);
}

.history-row.blocked,
.history-row.quiet {
  background:
    linear-gradient(90deg, rgba(159, 176, 194, 0.1), rgba(11, 21, 32, 0.96));
}

.round-chip {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #ffe1a1;
  background: rgba(242, 165, 30, 0.12);
  border: 1px solid rgba(242, 165, 30, 0.24);
}

.history-row strong,
.wallet-row strong,
.leaderboard-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.history-row em {
  display: inline-block;
  margin-left: 6px;
  color: #ffe1a1;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.history-row span,
.wallet-row span,
.leaderboard-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.damage {
  color: #c8d7e6;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.damage.crit {
  color: #ffe1a1;
}

.result-banner {
  margin: 14px;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  background: rgba(97, 213, 63, 0.14);
  border: 1px solid rgba(97, 213, 63, 0.42);
}

.result-banner.lost {
  background: rgba(220, 62, 50, 0.14);
  border-color: rgba(220, 62, 50, 0.42);
}

.result-banner.draw {
  background: rgba(242, 165, 30, 0.14);
  border-color: rgba(242, 165, 30, 0.45);
}

.wallet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wallet-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1520;
}

.pass-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  background: #07111b;
  border: 1px solid rgba(242, 165, 30, 0.2);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pass-mini span {
  color: #ffe1a1;
}

.pass-mini strong {
  color: var(--text);
}

.pass-store {
  grid-column: 1 / -1;
}

.pass-store-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pass-store-head > strong {
  color: #ffe1a1;
  font-size: 34px;
  line-height: 1;
}

.pass-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pass-option {
  display: grid;
  gap: 12px;
  align-content: space-between;
  min-height: 128px;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(23, 38, 55, 0.96), rgba(7, 16, 25, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pass-option.owned {
  border-color: rgba(97, 213, 63, 0.38);
  background:
    linear-gradient(180deg, rgba(24, 61, 35, 0.78), rgba(7, 16, 25, 0.98));
}

.pass-option strong,
.pass-option span {
  display: block;
}

.pass-option span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.wallet-balance {
  display: grid;
  place-items: center;
  min-height: 150px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08121c;
}

.wallet-balance strong {
  display: block;
  color: var(--green);
  font-size: clamp(36px, 7vw, 62px);
  line-height: 1;
}

.wallet-game-balance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #07111b;
  border: 1px solid rgba(145, 168, 191, 0.14);
  border-radius: 8px;
}

.wallet-game-balance span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.wallet-game-balance strong {
  color: var(--text);
  font-size: 16px;
}

@media (max-width: 560px) {
  .account-metrics.three {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  text-align: center;
  background: #0b1520;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.exit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 12px;
  align-items: stretch;
}

.exit-ape {
  min-height: 430px;
  display: grid;
  place-items: end center;
  background:
    linear-gradient(180deg, rgba(9, 19, 29, 0.08), rgba(9, 19, 29, 0.92)),
    url("/assets/lobby-plaza.png");
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  overflow: hidden;
}

.exit-ape img {
  width: min(280px, 72%);
  max-height: 390px;
  object-fit: contain;
}

.countdown {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  border: 10px solid rgba(97, 213, 63, 0.28);
  color: var(--green);
  font-size: 42px;
  font-weight: 900;
  background: #08121c;
}

@media (max-width: 1080px) {
  .content-grid,
  .arena-layout,
  .battle-layout,
  .exit-layout,
  .wallet-grid {
    grid-template-columns: 1fr;
  }

  .pass-options {
    grid-template-columns: 1fr;
  }

  .side-panel {
    order: -1;
  }

  .battle-layout .history-panel {
    position: static;
    max-height: 520px;
  }

  .lobby {
    min-height: 560px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px;
  }

  .topbar {
    align-items: stretch;
  }

  .brand {
    flex: 1 1 calc(100% - 116px);
    min-width: 0;
  }

  .topbar > .icon-button {
    width: 50px;
    min-height: 57px;
  }

  .mode-switch,
  .language-switch,
  .balance-pill,
  .online-pill {
    flex: 1 1 auto;
  }

  .topbar .online-pill {
    margin-left: 0;
  }

  .notification-center {
    top: 74px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .lobby {
    min-height: 620px;
    background-position: center top;
  }

  .map-action {
    position: static;
    min-width: 0;
  }

  .lobby-actions-mobile {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 74px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .map-action.desktop-only {
    display: none;
  }

  .chat-strip {
    bottom: 12px;
  }

  .battle-top,
  .combat-controls,
  .button-row,
  .quick-actions,
  .battle-actions {
    grid-template-columns: 1fr;
  }

  .fighters {
    min-height: 260px;
    padding: 0 10px;
  }

  .fighter-img {
    width: min(210px, 48vw);
  }

  .hp-grid {
    gap: 12px;
    padding: 0 12px 12px;
  }

  .zone-buttons {
    grid-template-columns: 1fr;
  }

}

@media (min-width: 721px) {
  .lobby-actions-mobile {
    display: none;
  }
}

.primary-button,
.green-button,
.gold-button,
.red-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
}

.primary-button .btn-icon,
.blue-action .btn-icon {
  background: #0f58b9;
  border-color: rgba(164, 205, 255, 0.22);
}

.green-button .btn-icon,
.gold-button .btn-icon,
.green-action .btn-icon {
  background: #24741d;
  border-color: rgba(169, 238, 139, 0.22);
}

.red-button .btn-icon,
.red-action .btn-icon {
  background: #7f2923;
  border-color: rgba(255, 166, 156, 0.22);
}

.ghost-button .btn-icon {
  color: #d8e3ed;
  background: #111f2e;
  border-color: rgba(160, 181, 204, 0.18);
}

.match-home {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 720px;
  padding: clamp(18px, 3vw, 34px);
  overflow: hidden;
  isolation: isolate;
}

.match-home-bg {
  position: absolute;
  inset: 1px;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 16, 25, 0.94) 0%, rgba(7, 16, 25, 0.78) 52%, rgba(7, 16, 25, 0.94) 100%),
    url("/assets/battle-arena.png");
  background-size: cover;
  background-position: center;
}

.match-home::after {
  content: "";
  position: absolute;
  inset: auto 1px 1px;
  height: 38%;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(7, 16, 25, 0.96));
}

.match-content {
  width: min(100%, 1080px);
  display: grid;
  gap: 20px;
}

.match-copy {
  max-width: 680px;
  display: grid;
  gap: 10px;
  margin-bottom: 0;
}

.eyebrow {
  width: fit-content;
  color: #ffe1a1;
  background: rgba(242, 165, 30, 0.12);
  border: 1px solid rgba(242, 165, 30, 0.34);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.match-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 0.96;
  text-transform: uppercase;
}

.match-copy h1 span {
  display: block;
}

.match-copy p {
  margin: 0;
  color: #c4d0dd;
  font-size: 16px;
  line-height: 1.45;
}

.duel-showcase {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 170px minmax(230px, 1fr);
  gap: clamp(12px, 2vw, 24px);
  align-items: stretch;
  min-height: 420px;
}

.hero-fighter-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 420px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 31, 45, 0.88), rgba(7, 16, 25, 0.9)),
    radial-gradient(circle at 50% 25%, rgba(242, 165, 30, 0.18), transparent 34%);
  overflow: hidden;
}

.hero-fighter-card.right {
  background:
    linear-gradient(180deg, rgba(17, 31, 45, 0.88), rgba(7, 16, 25, 0.92)),
    radial-gradient(circle at 50% 25%, rgba(31, 134, 255, 0.2), transparent 34%);
}

.hero-fighter-card.mystery {
  border-style: solid;
  border-color: rgba(126, 151, 176, 0.22);
}

.fighter-card-top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px;
}

.fighter-card-top span,
.fighter-card-top small {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.fighter-card-top strong {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.hero-fighter-img {
  align-self: end;
  justify-self: center;
  width: min(360px, 82%);
  max-height: 360px;
  object-fit: contain;
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.58));
}

.hero-fighter-img.enemy {
  transform: scaleX(-1);
}

.question-mark {
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: min(150px, 52%);
  aspect-ratio: 1;
  border-radius: 8px;
  color: rgba(205, 226, 241, 0.76);
  background: #0b1723;
  border: 1px solid rgba(126, 151, 176, 0.18);
  font-size: clamp(68px, 8vw, 112px);
  font-weight: 700;
}

.vs-stack {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.vs-ring {
  display: grid;
  place-items: center;
  width: 96px;
  height: 72px;
  border-radius: 8px;
  color: #9ff08d;
  background: #08131a;
  border: 1px solid rgba(126, 230, 96, 0.38);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 12px 26px rgba(0, 0, 0, 0.26);
  font-size: 32px;
  font-weight: 800;
}

.vs-rule {
  width: 100%;
  color: #93a6b9;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 4px;
}

.match-control {
  display: grid;
  gap: 12px;
  width: 100%;
  margin: 0;
}

.action-button {
  min-height: 58px;
  border-radius: 8px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: clamp(15px, 1.7vw, 20px);
  font-weight: 800;
  text-transform: none;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.22), 0 16px 34px rgba(0, 0, 0, 0.24);
}

.blue-action {
  background: #1268d8;
}

.green-action {
  background: #2f8b24;
}

.red-action {
  background: #9c3028;
}

.match-note {
  color: var(--muted);
  text-align: center;
}

.stake-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(14, 27, 40, 0.95), rgba(5, 12, 20, 0.96));
  border: 1px solid rgba(161, 184, 207, 0.16);
}

.stake-head,
.stake-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stake-head > span,
.stake-foot > span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.stake-fee {
  color: #d8e3ed;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
}

.stake-head strong {
  color: #ffe1a1;
  font-size: 16px;
}

.stake-rate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.stake-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stake-option {
  position: relative;
  min-height: 56px;
  border-radius: 8px;
  color: #eef6ff;
  background: #0d1926;
  border: 1px solid rgba(151, 177, 203, 0.18);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.2);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
}

.stake-option::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: rgba(151, 177, 203, 0.18);
}

.stake-option:hover:not(:disabled) {
  background: #102033;
  border-color: rgba(151, 177, 203, 0.32);
}

.stake-option.selected {
  color: #f4fff2;
  background: #1f7f22;
  border-color: rgba(126, 230, 96, 0.62);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(31, 127, 34, 0.24);
}

.stake-option.selected::before {
  background: #93f06f;
}

.random-option {
  color: #dce8f4;
  font-size: 13px;
  text-transform: uppercase;
}

.random-option::before {
  background: rgba(97, 213, 63, 0.38);
}

.random-option.selected {
  color: #f4fff2;
}

.match-alert {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(8, 18, 28, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.match-alert.success {
  background: rgba(97, 213, 63, 0.12);
  border-color: rgba(97, 213, 63, 0.36);
}

.match-alert strong {
  font-size: 18px;
}

.match-alert span {
  color: var(--muted);
}

.match-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 980px) {
  .match-home {
    min-height: 0;
  }

  .duel-showcase {
    grid-template-columns: 1fr;
  }

  .vs-stack {
    min-height: 130px;
  }

  .vs-ring {
    width: 96px;
    height: 70px;
    font-size: 30px;
  }

  .hero-fighter-card {
    min-height: 360px;
  }
}

@media (max-width: 1080px) {
  .side-panel {
    order: 0;
  }
}

@media (max-width: 720px) {
  .match-home {
    padding: 14px;
  }

  .match-copy h1 {
    font-size: 34px;
  }

  .match-copy p {
    font-size: 14px;
  }

  .hero-fighter-card {
    min-height: 320px;
  }

  .hero-fighter-img {
    max-height: 270px;
  }

  .match-actions {
    grid-template-columns: 1fr;
  }

  .action-button {
    width: 100%;
    min-height: 58px;
    font-size: 16px;
  }

  .stake-head,
  .stake-foot {
    align-items: start;
    flex-direction: column;
  }

  .stake-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Darker game UI refresh */
.panel,
.balance-pill,
.online-pill {
  background:
    linear-gradient(180deg, rgba(14, 25, 37, 0.96), rgba(6, 13, 21, 0.96));
  border-color: rgba(116, 140, 166, 0.22);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.brand {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.brand-icon,
.icon-button {
  background: #0a1420;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.topbar .brand-icon {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.topbar .balance-pill,
.topbar .online-pill {
  background: rgba(10, 20, 32, 0.78);
  border-color: rgba(116, 140, 166, 0.2);
  box-shadow: none;
}

.primary-button,
.green-button,
.gold-button,
.red-button,
.ghost-button,
.action-button {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.primary-button,
.blue-action {
  background: #1268d8;
  border-color: rgba(92, 166, 255, 0.45);
}

.gold-button {
  color: #f4fff2;
  background: #268426;
  border-color: rgba(99, 211, 91, 0.42);
}

.green-button,
.green-action {
  background: #2f8b24;
  border-color: rgba(123, 229, 92, 0.36);
}

.red-button,
.red-action {
  background: #9c3028;
  border-color: rgba(235, 100, 88, 0.38);
}

.ghost-button {
  color: #d8e3ed;
  background: #0b1420;
  border-color: rgba(160, 181, 204, 0.18);
}

.match-home {
  background: #050b12;
  border-color: #223448;
}

.match-home-bg {
  background:
    linear-gradient(90deg, rgba(3, 8, 13, 0.98) 0%, rgba(6, 13, 20, 0.9) 52%, rgba(3, 8, 13, 0.98) 100%),
    url("/assets/battle-arena.png");
  background-size: cover;
  background-position: center;
}

.match-copy {
  margin-bottom: 0;
}

.match-copy h1 {
  color: #f8fbff;
  font-size: clamp(34px, 4.2vw, 56px);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.44);
}

.match-content {
  width: min(100%, 1120px);
  gap: 18px;
}

.duel-showcase {
  grid-template-columns: minmax(260px, 1fr) 150px minmax(260px, 1fr);
  gap: clamp(14px, 2vw, 26px);
  align-items: stretch;
  min-height: 350px;
}

.hero-fighter-card {
  grid-template-rows: auto minmax(180px, 1fr) auto;
  min-height: 350px;
  padding: 16px;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(97, 213, 63, 0.18), transparent 52%),
    linear-gradient(180deg, rgba(14, 26, 39, 0.86), rgba(4, 10, 17, 0.96));
  border: 1px solid rgba(126, 230, 96, 0.24);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 22px 46px rgba(0, 0, 0, 0.38),
    inset 0 0 46px rgba(97, 213, 63, 0.05);
}

.hero-fighter-card.right {
  background:
    radial-gradient(ellipse at 50% 62%, rgba(122, 70, 255, 0.2), transparent 52%),
    linear-gradient(180deg, rgba(14, 26, 39, 0.86), rgba(4, 10, 17, 0.96));
  border-color: rgba(152, 109, 255, 0.24);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 22px 46px rgba(0, 0, 0, 0.38),
    inset 0 0 46px rgba(122, 70, 255, 0.06);
}

.hero-fighter-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 0;
  border-radius: 8px;
  border: 1px solid rgba(126, 230, 96, 0.16);
  pointer-events: none;
}

.hero-fighter-card.right::before {
  border-color: rgba(152, 109, 255, 0.16);
}

.fighter-card-top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 2px 2px 8px;
}

.fighter-title {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.fighter-title span,
.fighter-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.fighter-title strong {
  display: block;
  max-width: 100%;
  font-size: clamp(21px, 2.35vw, 30px);
  line-height: 1;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.fighter-title strong.fighter-nickname-long {
  font-size: 18px;
}

.fighter-title strong.fighter-nickname-very-long {
  font-size: 16px;
}

.fighter-power {
  min-width: 74px;
  min-height: 62px;
  justify-self: end;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 7px 9px;
  color: #f4fff2;
  background:
    radial-gradient(circle at center top, rgba(97, 213, 63, 0.14), transparent 58%),
    #0a1512;
  border: 1px solid rgba(126, 230, 96, 0.38);
  border-radius: 8px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 10px 22px rgba(0, 0, 0, 0.25);
}

.fighter-power span {
  color: #9ff08d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.fighter-power strong {
  max-width: 100%;
  color: #f4fff2;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.muted-power {
  color: #d7e2ee;
  background: #101b28;
  border-color: rgba(159, 176, 194, 0.24);
}

.muted-power span {
  color: var(--muted);
}

.fighter-portrait {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: end center;
  min-height: 220px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}

.hero-fighter-card.right .fighter-portrait {
  background: transparent;
}

.fighter-portrait::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 11px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  filter: blur(4px);
}

.hero-fighter-img {
  position: relative;
  z-index: 1;
  width: min(370px, 92%);
  max-height: 285px;
}

.mystery-portrait {
  background: rgba(13, 25, 38, 0.42);
  place-items: center;
}

.mystery-portrait::after {
  display: none;
}

.question-mark {
  width: min(150px, 52%);
  background: #0b1723;
  border-color: rgba(126, 151, 176, 0.18);
}

.fighter-card-bottom {
  position: relative;
  z-index: 2;
  display: grid;
  padding-top: 8px;
}

.life-pips {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}

.life-pips span,
.life-pips i {
  height: 6px;
  border-radius: 99px;
}

.life-pips span {
  background: #d9443b;
  box-shadow: 0 0 8px rgba(217, 68, 59, 0.22);
}

.life-pips i {
  background: rgba(121, 143, 166, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.muted-pips span {
  background: rgba(121, 143, 166, 0.14);
  box-shadow: none;
}

.vs-ring {
  width: 112px;
  height: 78px;
  color: #9ff08d;
  background: #08131a;
  border: 1px solid rgba(126, 230, 96, 0.38);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 12px 26px rgba(0, 0, 0, 0.26);
}

.vs-pot {
  width: min(150px, 100%);
  display: grid;
  gap: 4px;
  padding: 12px 10px;
  color: #ffe1a1;
  text-align: center;
  background: rgba(8, 18, 24, 0.86);
  border: 1px solid rgba(126, 230, 96, 0.24);
  border-radius: 8px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.vs-pot span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.vs-pot strong {
  font-size: 20px;
  line-height: 1;
}

.match-alert {
  background:
    linear-gradient(180deg, rgba(14, 27, 40, 0.95), rgba(5, 12, 20, 0.96));
  border-color: rgba(161, 184, 207, 0.16);
}

.wallet-summary,
.wallet-card,
.history-row,
.wallet-row,
.leaderboard-row {
  background:
    linear-gradient(180deg, rgba(13, 25, 38, 0.94), rgba(5, 12, 20, 0.96));
  border-color: rgba(145, 168, 191, 0.16);
}

.summary-item {
  background:
    radial-gradient(circle at center top, rgba(255, 255, 255, 0.06), transparent 52%),
    #08121c;
}

.summary-item strong {
  font-size: 20px;
}

.summary-item.stake strong {
  color: #ff5a4d;
  text-shadow: 0 0 18px rgba(220, 62, 50, 0.28);
}

.summary-item.balance strong {
  color: #6ee94c;
  text-shadow: 0 0 18px rgba(97, 213, 63, 0.25);
}

.zone-button {
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.12);
  background: #111f2d;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.zone-button.attack {
  --zone-accent: #ff675d;
  background:
    radial-gradient(circle at 18% 0%, rgba(220, 62, 50, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(49, 20, 27, 0.94), rgba(17, 17, 26, 0.98));
}

.zone-button.defense {
  --zone-accent: #62a7ff;
  background:
    radial-gradient(circle at 18% 0%, rgba(31, 134, 255, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(15, 32, 56, 0.94), rgba(8, 17, 30, 0.98));
}

.zone-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 14px;
}

.battle-panel {
  position: relative;
  isolation: isolate;
  min-height: 660px;
  padding: 14px;
  display: grid;
  grid-template-rows: minmax(420px, 1fr) auto;
  gap: 14px;
  background:
    linear-gradient(90deg, rgba(3, 8, 13, 0.96), rgba(7, 16, 25, 0.72) 48%, rgba(3, 8, 13, 0.96)),
    url("/assets/battle-arena.png");
  background-size: cover;
  background-position: center;
  border-color: #223448;
}

.battle-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 30% 40%, rgba(97, 213, 63, 0.1), transparent 34%),
    radial-gradient(circle at 70% 40%, rgba(122, 70, 255, 0.12), transparent 34%),
    linear-gradient(180deg, transparent 52%, rgba(3, 8, 13, 0.86));
}

.battle-stage {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 158px minmax(240px, 1fr);
  gap: clamp(12px, 2vw, 22px);
  align-items: stretch;
  min-height: 0;
}

.battle-fighter-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  gap: 14px;
  padding: 16px;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(97, 213, 63, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(13, 25, 38, 0.86), rgba(4, 10, 17, 0.96));
  border: 1px solid rgba(126, 230, 96, 0.22);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 24px 54px rgba(0, 0, 0, 0.36);
}

.battle-fighter-card.right {
  background:
    radial-gradient(circle at 50% 42%, rgba(122, 70, 255, 0.2), transparent 42%),
    linear-gradient(180deg, rgba(13, 25, 38, 0.86), rgba(4, 10, 17, 0.96));
  border-color: rgba(152, 109, 255, 0.22);
}

.battle-fighter-card::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 58px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  filter: blur(9px);
}

.battle-fighter-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.battle-fighter-card.right .battle-fighter-head {
  direction: rtl;
  text-align: right;
}

.battle-fighter-card.right .battle-fighter-head > * {
  direction: ltr;
}

.battle-fighter-head span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.battle-fighter-head strong {
  display: block;
  margin-top: 4px;
  min-width: 0;
  overflow: hidden;
  color: #f8fbff;
  font-size: clamp(20px, 2.15vw, 28px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-hp-chip {
  min-width: 66px;
  padding: 8px 10px;
  display: grid;
  place-items: center;
  gap: 3px;
  color: #f4fff2;
  background: #071711;
  border: 1px solid rgba(126, 230, 96, 0.34);
  border-radius: 8px;
}

.battle-hp-chip span {
  color: #9ff08d;
  font-size: 10px;
}

.battle-hp-chip strong {
  margin: 0;
  font-size: 28px;
}

.battle-fighter-portrait {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: end center;
  min-height: 260px;
  overflow: hidden;
  background: transparent;
  border-radius: 0;
}

.battle-fighter-portrait .fighter-img {
  width: min(360px, 86%);
  max-height: 330px;
  filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.56));
}

.fighter-combat-feedback {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.fighter-result-label {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fighter-zone-highlight {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: min(360px, 86%);
  max-height: 330px;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%);
  transform-origin: center bottom;
  mix-blend-mode: screen;
  pointer-events: none;
}

.fighter-zone-highlight.enemy {
  transform: translateX(-50%) scaleX(-1);
}

.fighter-zone-highlight.zone-head {
  clip-path: inset(0 0 65% 0);
}

.fighter-zone-highlight.zone-body {
  clip-path: inset(24% 0 30% 0);
}

.fighter-zone-highlight.zone-legs {
  clip-path: inset(58% 0 0 0);
}

.fighter-zone-highlight.guard {
  z-index: 1;
  opacity: 0.58;
  filter:
    grayscale(0.85)
    sepia(1)
    saturate(5.5)
    hue-rotate(170deg)
    brightness(1.32)
    contrast(1.08)
    drop-shadow(0 0 7px rgba(63, 158, 255, 0.86));
  animation:
    combat-highlight-in 520ms ease-out both,
    combat-zone-blink 620ms ease-in-out 580ms 3 both;
}

.fighter-zone-highlight.hit {
  z-index: 2;
  opacity: 0.88;
  filter:
    grayscale(0.75)
    sepia(1)
    saturate(6.5)
    hue-rotate(315deg)
    brightness(1.3)
    contrast(1.12)
    drop-shadow(0 0 9px rgba(255, 72, 61, 0.94));
  animation:
    combat-highlight-in 560ms ease-out both,
    combat-zone-blink 520ms ease-in-out 620ms 3 both;
}

.fighter-zone-highlight.blocked {
  z-index: 2;
  opacity: 0.9;
  filter:
    grayscale(0.8)
    sepia(1)
    saturate(6)
    hue-rotate(170deg)
    brightness(1.38)
    contrast(1.12)
    drop-shadow(0 0 10px rgba(78, 169, 255, 0.98));
  animation:
    combat-highlight-in 620ms ease-out both,
    combat-zone-blink 620ms ease-in-out 680ms 3 both;
}

.fighter-result-label {
  z-index: 3;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-width: 64px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 7px;
  color: #ffffff;
  background: rgba(6, 13, 21, 0.9);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  animation: combat-result-in 640ms cubic-bezier(0.18, 0.86, 0.28, 1.2) both;
}

.battle-fighter-card.left .fighter-result-label {
  left: 68%;
}

.battle-fighter-card.right .fighter-result-label {
  left: 32%;
}

.fighter-result-label.zone-head {
  top: 18%;
}

.fighter-result-label.zone-body {
  top: 48%;
}

.fighter-result-label.zone-legs {
  top: 76%;
}

.fighter-result-label.is-damage {
  color: #fff3ef;
  border-color: rgba(255, 116, 104, 0.68);
  background: rgba(137, 35, 29, 0.92);
  text-shadow: 0 2px 8px rgba(61, 5, 2, 0.86);
}

.fighter-result-label.is-damage small {
  font-size: 9px;
  font-weight: 900;
}

.fighter-result-label.is-block {
  min-width: 78px;
  color: #e5f6ff;
  border-color: rgba(127, 195, 255, 0.74);
  background: rgba(18, 75, 132, 0.92);
  font-size: 14px;
  text-shadow: 0 2px 8px rgba(3, 21, 39, 0.84);
}

.fighter-img.combat-hit:not(.enemy) {
  animation: fighter-impact 560ms ease-out both;
}

.fighter-img.combat-hit.enemy {
  animation: fighter-impact-enemy 560ms ease-out both;
}

.fighter-img.combat-block {
  animation: fighter-block-pulse 620ms ease-out both;
}

@keyframes combat-highlight-in {
  from { opacity: 0; }
  to { opacity: 0.88; }
}

@keyframes combat-zone-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.28; }
}

@keyframes combat-result-in {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.72); }
  70% { opacity: 1; transform: translate(-50%, -58%) scale(1.08); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes fighter-impact {
  0%, 100% { transform: translateX(0); filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.56)); }
  45% { transform: translateX(0); filter: brightness(1.35) saturate(1.2) drop-shadow(0 0 18px rgba(255, 83, 72, 0.76)); }
}

@keyframes fighter-impact-enemy {
  0%, 100% { transform: scaleX(-1) translateX(0); filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.56)); }
  45% { transform: scaleX(-1) translateX(0); filter: brightness(1.35) saturate(1.2) drop-shadow(0 0 18px rgba(255, 83, 72, 0.76)); }
}

@keyframes fighter-block-pulse {
  0%, 100% { filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.56)); }
  45% { filter: brightness(1.34) saturate(1.18) drop-shadow(0 0 20px rgba(79, 155, 255, 0.82)); }
}

@media (prefers-reduced-motion: reduce) {
  .fighter-zone-highlight,
  .fighter-result-label,
  .fighter-img.combat-hit,
  .fighter-img.combat-block {
    animation: none;
  }
}

.battle-center {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-width: 0;
}

.battle-vs {
  width: 118px;
  min-height: 94px;
  display: grid;
  place-items: center;
  padding: 12px;
  color: #9ff08d;
  background: rgba(8, 19, 26, 0.9);
  border: 1px solid rgba(126, 230, 96, 0.38);
  border-radius: 8px;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 18px 34px rgba(0, 0, 0, 0.28);
  font-size: 36px;
  text-shadow: none;
}

.battle-vs span {
  margin-top: 0;
  color: var(--muted);
}

.battle-pot {
  width: min(150px, 100%);
  padding: 12px 10px;
  display: grid;
  gap: 4px;
  color: #ffe1a1;
  text-align: center;
  background: rgba(8, 18, 24, 0.86);
  border: 1px solid rgba(126, 230, 96, 0.22);
  border-radius: 8px;
}

.battle-pot span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.battle-pot strong {
  font-size: 18px;
  line-height: 1;
}

.turn-status {
  width: min(150px, 100%);
  display: grid;
  gap: 3px;
  padding: 10px;
  text-align: center;
  background: rgba(8, 18, 24, 0.9);
  border: 1px solid rgba(126, 230, 96, 0.28);
  border-radius: 8px;
}

.turn-status strong {
  color: #91ef78;
  font-size: 14px;
}

.turn-status span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.25;
}

.turn-status.is-opponent {
  border-color: rgba(98, 167, 255, 0.3);
}

.turn-status.is-opponent strong {
  color: #8fc2ff;
}

.turn-timer {
  --turn-progress: 100%;
  width: min(150px, 100%);
  display: grid;
  gap: 7px;
  padding: 12px 10px;
  color: #f8fbff;
  text-align: center;
  background: rgba(8, 18, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.turn-timer span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.turn-timer strong {
  font-size: 24px;
  line-height: 1;
}

.turn-timer i {
  display: block;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #61d53f var(--turn-progress), rgba(121, 143, 166, 0.16) var(--turn-progress));
}

.turn-timer.is-opponent i {
  background:
    linear-gradient(90deg, #4f9bff var(--turn-progress), rgba(121, 143, 166, 0.16) var(--turn-progress));
}

.battle-fighter-card .hp {
  position: relative;
  z-index: 2;
  height: 28px;
  border-radius: 8px;
  background: rgba(4, 10, 17, 0.86);
  border-color: rgba(255, 255, 255, 0.12);
}

.battle-fighter-card .hp span {
  background: linear-gradient(180deg, #65dd45, #238a22);
}

.battle-fighter-card.right .hp span {
  background: linear-gradient(180deg, #ff6358, #b3271e);
}

.combat-controls {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  background: rgba(5, 12, 20, 0.84);
  border: 1px solid rgba(161, 184, 207, 0.14);
  border-radius: 8px;
}

.zone-title {
  font-size: 13px;
  letter-spacing: 0;
}

.zone-button {
  min-height: 62px;
  border-color: rgba(145, 168, 191, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 31, 45, 0.94), rgba(8, 17, 27, 0.96));
}

.zone-button.attack {
  --zone-accent: #ff675d;
  background:
    radial-gradient(circle at 18% 0%, rgba(220, 62, 50, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(49, 20, 27, 0.94), rgba(17, 17, 26, 0.98));
}

.zone-button.defense {
  --zone-accent: #62a7ff;
  background:
    radial-gradient(circle at 18% 0%, rgba(31, 134, 255, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(15, 32, 56, 0.94), rgba(8, 17, 30, 0.98));
}

.zone-button.selected {
  color: #f8fbff;
  border-color: rgba(126, 230, 96, 0.34);
  outline: 0;
  box-shadow:
    inset 0 0 0 1px rgba(126, 230, 96, 0.1),
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.2);
}

.combat-controls.is-opponent-turn .zone-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: saturate(0.7);
}

.battle-actions .green-button,
.battle-actions .red-button {
  min-height: 48px;
}

.history-list {
  gap: 9px;
}

.history-row {
  --history-accent: #8ea6bf;
  --history-glow: rgba(142, 166, 191, 0.08);
  --history-border: rgba(145, 168, 191, 0.16);
  position: relative;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border-left: 0;
  background:
    radial-gradient(circle at 18% 0%, var(--history-glow), transparent 48%),
    linear-gradient(180deg, rgba(12, 23, 35, 0.96), rgba(5, 12, 20, 0.98));
  border-color: var(--history-border);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.history-row.good {
  --history-accent: #79e666;
  --history-glow: rgba(97, 213, 63, 0.13);
  --history-border: rgba(97, 213, 63, 0.28);
}

.history-row.bad {
  --history-accent: #ff7168;
  --history-glow: rgba(220, 62, 50, 0.12);
  --history-border: rgba(220, 62, 50, 0.28);
}

.history-row.critical {
  --history-accent: #ffe1a1;
  --history-glow: rgba(242, 165, 30, 0.16);
  --history-border: rgba(242, 165, 30, 0.34);
}

.history-row.trade {
  --history-accent: #7bb8ff;
  --history-glow: rgba(31, 134, 255, 0.12);
  --history-border: rgba(31, 134, 255, 0.28);
}

.history-row.blocked,
.history-row.quiet {
  --history-accent: #b7c8d9;
}

.history-row.good,
.history-row.bad,
.history-row.critical,
.history-row.trade,
.history-row.blocked,
.history-row.quiet {
  background:
    radial-gradient(circle at 18% 0%, var(--history-glow), transparent 48%),
    linear-gradient(180deg, rgba(12, 23, 35, 0.96), rgba(5, 12, 20, 0.98));
  border-color: var(--history-border);
}

.history-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.round-chip {
  width: 34px;
  height: 38px;
  color: var(--history-accent);
  background: rgba(8, 18, 28, 0.72);
  border-color: var(--history-border);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  place-items: center;
}

.round-chip strong {
  color: inherit;
  font-size: 19px;
  line-height: 1;
}

.history-row-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.history-row strong {
  line-height: 1.1;
}

.history-row-head strong {
  min-width: 0;
  overflow: hidden;
  color: #f6fbff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row p {
  min-height: 39px;
  margin: 0;
  overflow: hidden;
  color: #b9c9da;
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.history-row em {
  flex: 0 0 auto;
  margin: 0;
  color: var(--history-accent);
  background: rgba(8, 18, 28, 0.58);
  border: 1px solid var(--history-border);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9px;
  vertical-align: middle;
}

.damage {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #dce8f4;
  background: rgba(3, 9, 15, 0.46);
  border: 1px solid rgba(145, 168, 191, 0.16);
  font-size: 12px;
}

.damage span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  margin: 0;
  color: #dce8f4;
  font-size: 11px;
  line-height: 1;
}

.damage small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.damage strong {
  color: #f8fbff;
  font-size: 15px;
}

.damage i {
  width: 1px;
  height: 16px;
  background: rgba(145, 168, 191, 0.18);
}

.damage.crit {
  border-color: rgba(242, 165, 30, 0.28);
}

.damage.crit strong {
  color: #ffe1a1;
}

.notification-center {
  width: min(380px, calc(100vw - 28px));
  gap: 10px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(13, 25, 38, 0.98), rgba(5, 12, 20, 0.98));
  border-color: rgba(145, 168, 191, 0.2);
}

.notification-head {
  align-items: center;
}

.notification-head strong {
  font-size: 20px;
  line-height: 1.05;
  white-space: nowrap;
}

.notification-list {
  gap: 8px;
  max-height: 340px;
  padding-right: 6px;
}

.notification-item {
  gap: 5px;
  padding: 12px;
  background: rgba(8, 18, 28, 0.74);
  border-color: rgba(145, 168, 191, 0.14);
  border-left: 3px solid rgba(145, 168, 191, 0.28);
}

.notification-item.success {
  border-color: rgba(145, 168, 191, 0.14);
  border-left-color: rgba(97, 213, 63, 0.62);
}

.notification-item.warning {
  border-color: rgba(145, 168, 191, 0.14);
  border-left-color: rgba(242, 165, 30, 0.68);
}

.notification-item strong {
  font-size: 15px;
  line-height: 1.1;
}

.notification-item span,
.notification-item small {
  line-height: 1.35;
}

.notification-body .notification-ape {
  color: #58a6ff;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(88, 166, 255, 0.2);
}

.notification-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 7px;
}

.notification-action {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.notification-action:hover {
  transform: translateY(-1px);
}

.notification-action.accept {
  background: #238b24;
  border-color: rgba(97, 213, 63, 0.26);
}

.notification-action.accept:hover {
  background: #2a9c2a;
  border-color: rgba(97, 213, 63, 0.46);
}

.notification-action.decline {
  background: #9f312a;
  border-color: rgba(255, 107, 96, 0.28);
  color: #ffffff;
}

.notification-action.decline:hover {
  background: #b23830;
  border-color: rgba(255, 107, 96, 0.48);
}

.battle-layout .history-panel {
  position: static;
  max-height: none;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, auto);
}

.battle-layout .history-panel .screen-title {
  padding: 12px 14px 10px;
}

.battle-layout .history-list {
  display: flex;
  gap: 8px;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 14px 12px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(97, 213, 63, 0.42) transparent;
  scrollbar-width: thin;
}

.battle-layout .history-list::-webkit-scrollbar {
  height: 5px;
  width: 8px;
}

.battle-layout .history-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.battle-layout .history-list::-webkit-scrollbar-thumb {
  background: rgba(97, 213, 63, 0.44);
  border: 0;
  border-radius: 999px;
}

.battle-layout .history-row {
  flex: 0 0 clamp(310px, 24vw, 380px);
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 154px;
  padding: 12px;
  scroll-snap-align: start;
}

.battle-layout .history-copy {
  grid-template-rows: auto minmax(56px, auto) auto;
}

.battle-layout .round-chip {
  width: 34px;
  height: 38px;
}

.battle-layout .history-row p {
  min-height: 54px;
  max-height: none;
  font-size: 11px;
  line-height: 1.35;
  overflow: visible;
  display: block;
  -webkit-line-clamp: unset;
}

.battle-layout .damage {
  min-height: 30px;
}

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

  .battle-stage {
    grid-template-columns: 1fr;
  }

  .battle-center {
    min-height: 120px;
  }

.hero-fighter-card {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  .battle-panel {
    padding: 10px;
  }

  .battle-fighter-card {
    min-height: 340px;
  }

  .battle-fighter-portrait {
    min-height: 220px;
  }

  .battle-fighter-portrait .fighter-img,
  .battle-fighter-portrait .fighter-zone-highlight {
    max-height: 280px;
  }

  .combat-controls,
  .battle-actions {
    grid-template-columns: 1fr;
  }

  .history-row > div {
    padding-right: 0;
  }

  .damage {
    position: static;
    justify-self: start;
    grid-column: 2;
    margin-top: 2px;
  }

  .fighter-card-top {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .fighter-power {
    min-width: 66px;
    min-height: 58px;
  }

  .fighter-power strong {
    font-size: 24px;
  }

  .fighter-portrait {
    min-height: 230px;
  }

  .hero-fighter-img {
    max-height: 260px;
  }
}

/* Final mobile ergonomics layer */
@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-shell {
    width: 100%;
    padding: 8px;
  }

  .topbar {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
    margin-bottom: 8px;
    border-radius: 8px;
  }

  .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 54px;
    padding: 3px 4px;
  }

  .brand-product-logo {
    width: 68px;
    height: 48px;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .brand-mark-icon {
    width: 27px;
    height: 27px;
  }

  .brand-title strong {
    font-size: 22px;
  }

  .brand-title span {
    font-size: 11px;
  }

  .mode-switch {
    grid-column: 1 / 4;
    grid-row: 2;
  }

  .language-switch {
    grid-column: 4 / 7;
    grid-row: 2;
    min-width: 0;
    margin-left: 0;
  }

  .online-pill {
    grid-column: 1 / 3;
    grid-row: 3;
  }

  .balance-pill,
  .glyph-connect-pill {
    grid-column: 3 / 6;
    grid-row: 3;
  }

  .notification-button {
    grid-column: 6 / 7;
    grid-row: 3;
  }

  .mode-switch,
  .language-switch,
  .balance-pill,
  .glyph-connect-pill,
  .online-pill,
  .notification-button {
    width: 100%;
    min-height: 40px;
  }

  .mode-switch button,
  .language-switch button {
    min-width: 0;
    padding: 0 6px;
    font-size: 11px;
  }

  .balance-pill,
  .glyph-connect-pill,
  .online-pill {
    justify-content: center;
    gap: 6px;
    padding: 7px 8px;
    overflow: hidden;
  }

  .balance-pill strong,
  .online-pill strong {
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
  }

  .online-pill span {
    font-size: 9px;
  }

  .balance-coin {
    width: 18px;
    height: 18px;
  }

  .notification-center {
    top: 122px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100vh - 136px);
  }

  .notification-list {
    max-height: min(420px, calc(100vh - 250px));
  }

  .content-grid,
  .content-grid.solo {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .panel {
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  }

  .panel-pad {
    padding: 10px;
  }

  .match-home {
    padding: 10px;
    min-height: 0;
  }

  .match-content {
    width: 100%;
    gap: 12px;
  }

  .match-copy {
    display: grid;
    gap: 8px;
  }

  .match-copy .eyebrow {
    width: fit-content;
    font-size: 10px;
  }

  .match-copy h1 {
    font-size: clamp(28px, 11vw, 42px);
    line-height: 0.96;
  }

  .match-copy p {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.35;
  }

  .duel-showcase {
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    gap: 6px;
    min-height: 0;
    align-items: stretch;
  }

  .hero-fighter-card {
    min-height: 226px;
    padding: 9px;
    grid-template-rows: auto minmax(122px, 1fr) auto;
  }

  .hero-fighter-card::before {
    inset: 7px;
  }

  .fighter-card-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 0;
  }

  .fighter-title span,
  .fighter-title small {
    font-size: 9px;
  }

  .fighter-title strong {
    font-size: clamp(15px, 4.6vw, 19px);
  }

  .fighter-power {
    min-width: 44px;
    min-height: 42px;
    justify-self: start;
    padding: 6px 8px;
  }

  .hero-fighter-card.right .fighter-power {
    justify-self: end;
  }

  .fighter-power span {
    font-size: 8px;
  }

  .fighter-power strong {
    font-size: 18px;
  }

  .fighter-portrait {
    min-height: 122px;
  }

  .hero-fighter-img {
    width: min(150px, 98%);
    max-height: 150px;
  }

  .question-mark {
    font-size: 70px;
  }

  .life-pips {
    gap: 4px;
  }

  .life-pips span {
    height: 8px;
  }

  .vs-stack {
    min-height: 0;
    align-self: center;
    gap: 7px;
  }

  .vs-pot {
    width: 58px;
    min-width: 0;
    padding: 7px 4px;
  }

  .vs-pot span {
    font-size: 7px;
  }

  .vs-pot strong {
    font-size: 12px;
  }

  .vs-ring {
    width: 54px;
    height: 48px;
    font-size: 22px;
  }

  .vs-rule {
    display: none;
  }

  .stake-panel {
    gap: 9px;
    padding: 10px;
  }

  .stake-head,
  .stake-foot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .stake-head strong {
    font-size: 13px;
  }

  .stake-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .stake-option {
    min-height: 50px;
    font-size: 16px;
  }

  .random-option {
    grid-column: 1 / -1;
  }

  .stake-fee,
  .match-note {
    font-size: 12px;
    line-height: 1.35;
  }

  .action-button {
    min-height: 52px;
    padding: 0 12px;
    font-size: 15px;
  }

  .profile-head {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .avatar {
    width: 56px;
    height: 56px;
  }

  .profile-name h2 {
    font-size: 15px;
  }

  .account-card,
  .profile-earnings,
  .demo-deposit-box {
    margin-top: 8px;
  }

  .account-balance strong {
    font-size: 28px;
  }

  .account-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .demo-deposit-box {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .battle-panel {
    min-height: 0;
    padding: 8px;
    grid-template-rows: auto auto;
    gap: 8px;
  }

  .battle-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .battle-fighter-card {
    min-height: 276px;
    padding: 10px;
    grid-template-rows: auto minmax(150px, 1fr) auto;
    gap: 8px;
  }

  .battle-fighter-card.left {
    order: 1;
  }

  .battle-fighter-card.right {
    order: 2;
  }

  .battle-center {
    order: 3;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 0;
    gap: 8px;
  }

  .battle-vs,
  .turn-status,
  .turn-timer,
  .battle-pot {
    width: 100%;
    min-height: 64px;
    padding: 9px 6px;
  }

  .battle-vs {
    font-size: 25px;
  }

  .turn-status {
    grid-column: 1 / -1;
    min-height: 52px;
  }

  .battle-vs span,
  .turn-timer span,
  .battle-pot span {
    font-size: 8px;
  }

  .turn-timer strong {
    font-size: 20px;
  }

  .battle-pot strong {
    font-size: 15px;
  }

  .battle-fighter-head {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 7px;
  }

  .battle-fighter-card.right .battle-fighter-head {
    direction: ltr;
    text-align: left;
  }

  .battle-fighter-head span {
    font-size: 9px;
  }

  .battle-fighter-head strong {
    font-size: clamp(16px, 5vw, 20px);
  }

  .battle-hp-chip {
    min-width: 48px;
    padding: 6px 7px;
  }

  .battle-hp-chip strong {
    font-size: 21px;
  }

  .battle-fighter-portrait {
    min-height: 150px;
  }

  .battle-fighter-portrait .fighter-img,
  .battle-fighter-portrait .fighter-zone-highlight {
    width: min(175px, 96%);
    max-height: 190px;
  }

  .battle-fighter-card .hp {
    height: 22px;
  }

  .combat-controls {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .zone-title {
    font-size: 11px;
  }

  .zone-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .zone-button {
    min-height: 48px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 8px 5px 10px;
    text-align: center;
    font-size: 10px;
  }

  .zone-button::before {
    left: 8px;
    right: 8px;
    bottom: 5px;
  }

  .zone-icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .battle-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .battle-actions .green-button,
  .battle-actions .red-button {
    min-height: 44px;
    padding: 0 8px;
    font-size: 13px;
  }

  .battle-layout .history-panel .screen-title {
    padding: 10px;
  }

  .battle-layout .history-list {
    padding: 8px 10px 10px;
  }

  .battle-layout .history-row {
    flex-basis: min(272px, 82vw);
  }
}

@media (max-width: 420px) {
  .brand-title strong {
    font-size: 20px;
  }

  .duel-showcase {
    grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
    gap: 5px;
  }

  .hero-fighter-card {
    min-height: 210px;
    padding: 8px;
  }

  .hero-fighter-img {
    max-height: 132px;
  }

  .vs-ring {
    width: 48px;
    height: 44px;
    font-size: 20px;
  }

  .vs-pot {
    width: 50px;
  }

  .battle-fighter-card {
    min-height: 252px;
  }

  .battle-fighter-portrait .fighter-img,
  .battle-fighter-portrait .fighter-zone-highlight {
    max-height: 170px;
  }

  .battle-vs,
  .turn-timer,
  .battle-pot {
    min-height: 58px;
  }
}

/* Mobile polish */
@media (max-width: 760px) {
  .battle-layout {
    gap: 8px;
  }

  .battle-stage,
  .duel-showcase,
  .stake-panel,
  .combat-controls,
  .history-panel {
    min-width: 0;
  }

  .battle-panel {
    overflow: hidden;
    border-radius: 8px;
  }

  .battle-fighter-card {
    border-color: rgba(126, 230, 96, 0.18);
    box-shadow:
      inset 0 1px rgba(255, 255, 255, 0.06),
      0 14px 30px rgba(0, 0, 0, 0.32);
  }

  .battle-fighter-card.right {
    border-color: rgba(122, 70, 255, 0.18);
  }

  .battle-fighter-head strong,
  .fighter-title strong,
  .profile-name h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .battle-center {
    padding: 0;
  }

  .battle-center .turn-status {
    display: none;
  }

  .battle-vs,
  .turn-timer,
  .battle-pot {
    align-self: stretch;
  }

  .zone-box {
    gap: 7px;
  }

  .zone-button {
    touch-action: manipulation;
  }

  .battle-layout .history-panel {
    max-width: 100%;
    overflow: hidden;
  }

  .battle-layout .history-panel .screen-title {
    min-height: 48px;
  }

  .battle-layout .history-list {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px 12px;
    scroll-padding: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .battle-layout .history-row {
    flex: 0 0 min(248px, 78vw);
    min-height: 112px;
    padding: 10px;
    gap: 9px;
  }

  .battle-layout .history-row-head {
    gap: 6px;
  }

  .battle-layout .history-row-head strong {
    display: none;
  }

  .battle-layout .history-row p {
    min-height: 0;
    font-size: 11px;
    line-height: 1.25;
  }

  .battle-layout .damage {
    width: fit-content;
    max-width: 100%;
    min-height: 26px;
    padding: 4px 8px;
  }

  .battle-layout .damage small {
    display: none;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: stretch;
  }

  .brand {
    gap: 8px;
  }

  .brand-title strong {
    font-size: 21px;
  }

  .match-copy h1 {
    font-size: clamp(30px, 12vw, 40px);
  }

  .duel-showcase {
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  }

  .hero-fighter-card {
    min-height: 198px;
  }

  .fighter-title strong {
    font-size: clamp(14px, 4.3vw, 17px);
  }

  .fighter-power {
    min-width: 40px;
    min-height: 38px;
  }

  .hero-fighter-img {
    width: min(136px, 100%);
    max-height: 134px;
  }

  .battle-stage {
    gap: 7px;
  }

  .battle-fighter-card {
    min-height: 224px;
    padding: 8px;
    grid-template-rows: auto minmax(126px, 1fr) auto;
  }

  .battle-fighter-head {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .battle-fighter-head strong {
    font-size: clamp(15px, 5vw, 18px);
  }

  .battle-hp-chip {
    min-width: 44px;
    padding: 5px 6px;
  }

  .battle-hp-chip strong {
    font-size: 19px;
  }

  .battle-fighter-portrait {
    min-height: 126px;
  }

  .battle-fighter-portrait .fighter-img,
  .battle-fighter-portrait .fighter-zone-highlight {
    width: min(150px, 108%);
    max-height: 150px;
  }

  .battle-fighter-card .hp {
    height: 20px;
  }

  .battle-center {
    gap: 6px;
  }

  .battle-vs,
  .turn-timer,
  .battle-pot {
    min-height: 54px;
  }

  .battle-vs {
    font-size: 23px;
  }

  .turn-timer strong {
    font-size: 18px;
  }

  .battle-pot strong {
    font-size: 13px;
  }

  .combat-controls {
    padding: 8px;
  }

  .zone-buttons {
    gap: 5px;
  }

  .zone-button {
    min-height: 46px;
    padding: 7px 4px 9px;
    font-size: 9px;
  }

  .zone-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 11px;
  }

  .battle-actions .green-button,
  .battle-actions .red-button {
    min-height: 42px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding: 6px;
  }

  .topbar {
    gap: 6px;
  }

  .brand-title strong {
    font-size: 19px;
  }

  .balance-pill strong,
  .online-pill strong {
    font-size: 12px;
  }

  .battle-stage {
    gap: 6px;
  }

  .battle-fighter-card {
    min-height: 206px;
  }

  .battle-fighter-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .battle-hp-chip {
    justify-self: start;
  }

  .battle-fighter-card.right .battle-hp-chip {
    justify-self: end;
  }

  .battle-fighter-portrait .fighter-img,
  .battle-fighter-portrait .fighter-zone-highlight {
    max-height: 130px;
  }

  .battle-layout .history-row {
    flex-basis: min(228px, 82vw);
  }
}

/* Mobile header and battle controls refinement */
@media (max-width: 760px) {
  .topbar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mode-switch {
    grid-column: 1 / 4;
    grid-row: 2;
  }

  .language-switch {
    grid-column: 4 / 7;
    grid-row: 2;
    margin-left: 0;
  }

  .balance-pill,
  .glyph-connect-pill {
    grid-column: 1 / 6;
    grid-row: 3;
    margin-left: 0;
  }

  .notification-button {
    grid-column: 6 / 7;
    grid-row: 3;
    justify-self: end;
    width: 48px;
    min-height: 48px;
    margin-left: 0;
  }

  .topbar.no-balance .notification-button {
    grid-column: 6 / 7;
    margin-left: 0;
  }

  .notification-center {
    top: 188px;
    left: 8px;
    right: 8px;
    width: auto;
    max-height: calc(100vh - 204px);
  }

  .duel-showcase {
    gap: 8px;
  }

  .hero-fighter-card {
    min-height: 242px;
  }

  .fighter-portrait {
    min-height: 134px;
  }

  .life-pips {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px 4px;
  }

  .life-pips span,
  .life-pips i {
    height: 7px;
  }

  .combat-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .zone-box {
    min-width: 0;
  }

  .zone-buttons {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .zone-button {
    min-height: 44px;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    gap: 8px;
    padding: 8px 10px;
    text-align: left;
  }

  .zone-icon {
    width: 24px;
    height: 24px;
  }

  .battle-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .notification-center {
    top: 184px;
  }

  .hero-fighter-card {
    min-height: 216px;
  }

  .fighter-portrait {
    min-height: 126px;
  }

  .hero-fighter-img {
    width: min(142px, 104%);
    max-height: 142px;
  }

  .zone-button {
    padding: 7px 8px;
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .notification-center {
    top: 178px;
  }

  .notification-button {
    width: 44px;
    min-height: 44px;
  }

  .combat-controls {
    gap: 6px;
  }

  .zone-button {
    gap: 6px;
    padding: 7px 6px;
  }
}

/* Mobile battle history readability */
@media (max-width: 760px) {
  .battle-layout .history-panel {
    overflow: hidden;
  }

  .battle-layout .history-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    max-height: min(58vh, 520px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 9px 10px 10px;
    scroll-snap-type: none;
    scrollbar-color: #2b8a28 #07111b;
    scrollbar-width: thin;
  }

  .battle-layout .history-list::-webkit-scrollbar {
    display: block;
    width: 7px;
    height: 7px;
  }

  .battle-layout .history-list::-webkit-scrollbar-track {
    background: #07111b;
    border-radius: 999px;
  }

  .battle-layout .history-list::-webkit-scrollbar-thumb {
    background: #2b8a28;
    border: 1px solid #07111b;
    border-radius: 999px;
  }

  .battle-layout .history-list::-webkit-scrollbar-thumb:hover {
    background: #61d53f;
  }

  .battle-layout .history-row {
    width: 100%;
    min-height: 128px;
    flex: none;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px;
    scroll-snap-align: none;
  }

  .battle-layout .round-chip {
    width: 42px;
    height: 42px;
  }

  .battle-layout .history-copy {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 102px;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 9px;
    row-gap: 5px;
  }

  .battle-layout .history-row-head {
    grid-column: 1;
    align-items: center;
    min-height: 24px;
  }

  .battle-layout .history-row-head strong {
    display: none;
  }

  .battle-layout .history-row em {
    padding: 4px 8px;
    font-size: 9px;
  }

  .battle-layout .history-row p {
    grid-column: 1;
    display: block;
    min-height: 0;
    max-height: none;
    overflow: visible;
    color: #c5d4e5;
    font-size: 12px;
    line-height: 1.35;
  }

  .battle-layout .damage {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    width: min(116px, 100%);
    min-height: 56px;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 7px 8px;
  }

  .battle-layout .damage small {
    display: block;
    font-size: 7px;
  }

  .battle-layout .damage strong {
    font-size: 13px;
  }

  .battle-layout .damage span {
    justify-content: space-between;
    gap: 7px;
  }

  .battle-layout .damage i {
    display: none;
  }
}

@media (max-width: 420px) {
  .battle-layout .history-list {
    padding: 8px;
  }

  .battle-layout .history-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }

  .battle-layout .history-copy {
    grid-template-columns: minmax(0, 1fr) 88px;
    column-gap: 7px;
  }

  .battle-layout .round-chip {
    width: 38px;
    height: 40px;
  }

  .battle-layout .damage {
    width: 88px;
    padding: 7px 7px;
  }
}

/* Mobile fighter card compactness */
@media (max-width: 760px) {
  .duel-showcase {
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    gap: 5px;
  }

  .hero-fighter-card {
    min-height: 218px;
    padding: 6px;
    grid-template-rows: auto minmax(112px, 1fr) auto;
    gap: 5px;
  }

  .hero-fighter-card::before {
    inset: 5px;
  }

  .fighter-card-top {
    gap: 4px;
    padding: 0;
  }

  .fighter-title {
    gap: 2px;
  }

  .fighter-title span,
  .fighter-title small {
    font-size: 8px;
    line-height: 1.05;
  }

  .fighter-title strong {
    font-size: clamp(13px, 4vw, 16px);
    line-height: 1.02;
  }

  .fighter-power {
    min-width: 40px;
    min-height: 36px;
    padding: 4px 6px;
    gap: 1px;
    border-radius: 7px;
  }

  .fighter-power span {
    font-size: 7px;
  }

  .fighter-power strong {
    font-size: 17px;
  }

  .fighter-portrait {
    min-height: 112px;
  }

  .hero-fighter-img {
    width: min(132px, 106%);
    max-height: 132px;
  }

  .question-mark {
    width: min(96px, 58%);
    font-size: 54px;
  }

  .fighter-card-bottom {
    justify-items: center;
    padding-top: 3px;
  }

  .life-pips {
    width: min(132px, 92%);
    gap: 4px 5px;
  }

  .life-pips span,
  .life-pips i {
    height: 6px;
  }

  .vs-stack {
    gap: 6px;
  }

  .vs-pot {
    width: 44px;
    padding: 6px 3px;
  }

  .vs-pot span {
    font-size: 6px;
  }

  .vs-pot strong {
    font-size: 10px;
  }

  .vs-ring {
    width: 42px;
    height: 42px;
    font-size: 19px;
  }
}

@media (max-width: 420px) {
  .duel-showcase {
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
    gap: 4px;
  }

  .hero-fighter-card {
    min-height: 204px;
    padding: 5px;
  }

  .fighter-title strong {
    font-size: clamp(12px, 4.1vw, 15px);
  }

  .fighter-power {
    min-width: 38px;
    min-height: 34px;
  }

  .fighter-power strong {
    font-size: 16px;
  }

  .fighter-portrait {
    min-height: 104px;
  }

  .hero-fighter-img {
    width: min(122px, 108%);
    max-height: 122px;
  }

  .life-pips {
    width: min(118px, 90%);
  }

  .vs-pot,
  .vs-ring {
    width: 40px;
  }
}

.hero-fighter-card::before,
.hero-fighter-card.right::before {
  display: none;
}

/* Wallet screen */
.wallet-screen-title {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  min-height: 74px;
  padding: 12px 16px;
}

.wallet-screen-title h1 {
  justify-self: center;
  text-align: center;
}

.wallet-title-spacer {
  width: 48px;
  height: 48px;
}

.wallet-back-button {
  width: 48px;
  height: 48px;
  padding: 0;
}

.back-chevron {
  display: block;
  transform: translateY(-1px);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.withdraw-glyph {
  padding-bottom: 1px;
  font-size: 14px !important;
  line-height: 1;
}

.wallet-screen .wallet-grid {
  align-items: start;
}

.wallet-screen .wallet-card {
  background: #0b1622;
  border-color: rgba(145, 168, 191, 0.18);
}

.wallet-operations-card {
  align-self: start;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.wallet-operations-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(145, 168, 191, 0.14);
}

.wallet-operations-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
}

.wallet-operations-head > span {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid rgba(145, 168, 191, 0.16);
  border-radius: 7px;
  color: var(--muted);
  background: #07111b;
  font-size: 12px;
  font-weight: 900;
}

.wallet-screen .wallet-list {
  gap: 0;
  max-height: 520px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-color: #2b8a28 #07111b;
  scrollbar-width: thin;
}

.wallet-screen .wallet-list::-webkit-scrollbar {
  width: 8px;
}

.wallet-screen .wallet-list::-webkit-scrollbar-track {
  background: #07111b;
  border-radius: 999px;
}

.wallet-screen .wallet-list::-webkit-scrollbar-thumb {
  background: #2b8a28;
  border: 2px solid #07111b;
  border-radius: 999px;
}

.wallet-screen .wallet-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 74px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid rgba(145, 168, 191, 0.12);
  border-radius: 0;
  background: transparent;
}

.wallet-screen .wallet-row:last-child {
  border-bottom: 0;
}

.wallet-row-mark {
  width: 38px;
  height: 38px;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  border: 1px solid rgba(145, 168, 191, 0.18);
  border-radius: 8px;
  color: #b7c8d9 !important;
  background: #08121c;
  font-size: 20px !important;
  font-weight: 900;
  line-height: 1;
}

.wallet-row.deposit .wallet-row-mark {
  color: #79e666 !important;
  border-color: rgba(97, 213, 63, 0.28);
  background: rgba(97, 213, 63, 0.08);
}

.wallet-row.withdraw .wallet-row-mark {
  color: #ff7168 !important;
  border-color: rgba(220, 62, 50, 0.28);
  background: rgba(220, 62, 50, 0.08);
}

.wallet-row-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.wallet-row-heading {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.wallet-row-heading > strong {
  min-width: 0;
  color: #f5f9fd;
  font-size: 15px;
  line-height: 1.25;
}

.wallet-row-amount {
  display: inline !important;
  margin: 0 !important;
  color: #f5f9fd !important;
  font: inherit !important;
  white-space: nowrap;
}

.wallet-row-heading time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.wallet-screen .wallet-row-meta {
  min-width: 0;
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.wallet-tx-link {
  color: #58a6ff;
  font-weight: 800;
  text-decoration: none;
}

.wallet-tx-link:hover {
  color: #86c0ff;
  text-decoration: underline;
}

@media (max-width: 760px) {
  .wallet-screen-title {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    min-height: 64px;
    padding: 9px 10px;
  }

  .wallet-back-button,
  .wallet-title-spacer {
    width: 44px;
    height: 44px;
  }

  .wallet-screen .wallet-grid {
    gap: 10px;
    padding: 10px;
  }

  .wallet-screen .wallet-list {
    max-height: 420px;
  }
}

@media (max-width: 480px) {
  .wallet-screen .wallet-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    min-height: 68px;
    padding: 10px 8px;
  }

  .wallet-row-mark {
    width: 34px;
    height: 34px;
    font-size: 18px !important;
  }

  .wallet-row-heading {
    align-items: start;
    gap: 6px;
  }

  .wallet-row-heading > strong {
    font-size: 13px;
  }

  .wallet-row-heading time {
    font-size: 9px;
  }

  .wallet-screen .wallet-row-meta {
    font-size: 10px;
  }
}

/* Heroes and paid collection placement */
.topbar-section-link {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(116, 140, 166, 0.2);
  border-radius: 7px;
  color: #b8c8d8;
  background: #0b1621;
  font-size: 13px;
  font-weight: 800;
}

.topbar-section-link:hover,
.topbar-section-link.active {
  color: #ffffff;
  border-color: rgba(31, 134, 255, 0.5);
  background: #1268d8;
}

.heroes-screen,
.hero-submit-screen {
  min-height: 680px;
  overflow: hidden;
}

.heroes-heading,
.hero-submit-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-bottom: 1px solid var(--line);
  background: #0a141f;
}

.heroes-heading h1,
.hero-submit-heading h1 {
  margin: 8px 0 6px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.heroes-heading p,
.hero-submit-heading p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.heroes-add-button {
  width: auto;
  min-width: 190px;
}

.hero-collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 300px));
  grid-auto-rows: 1fr;
  justify-content: start;
  gap: 16px;
  padding: 24px 32px 32px;
}

.hero-collection-card {
  position: relative;
  min-width: 0;
  min-height: 458px;
  height: 100%;
  display: grid;
  grid-template-rows: 270px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #26384b;
  border-radius: 8px;
  background: #0a141f;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.hero-collection-card.selected {
  border-color: rgba(97, 213, 63, 0.65);
  box-shadow:
    inset 0 0 0 1px rgba(97, 213, 63, 0.18),
    0 12px 30px rgba(32, 118, 40, 0.16);
}

.hero-collection-visual {
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 10px 10px 0;
  padding: 18px 14px 0;
  border: 1px solid #20374b;
  border-bottom: 0;
  background: #07121c;
  box-shadow: inset 0 -34px 44px rgba(26, 76, 98, 0.12);
}

.hero-collection-visual::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 1;
  border-top: 1px solid rgba(54, 194, 239, 0.2);
  border-bottom: 1px solid rgba(54, 194, 239, 0.2);
  pointer-events: none;
}

.hero-collection-visual::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 1;
  width: 44px;
  height: 3px;
  background: #2ac7f2;
  box-shadow: 0 0 14px rgba(42, 199, 242, 0.48);
  transform: translateX(-50%);
}

.hero-collection-visual img {
  position: relative;
  z-index: 2;
  width: auto;
  height: 100%;
  max-width: 92%;
  max-height: 252px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.48));
}

.hero-collection-number {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  color: #63819d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-selected-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  padding: 6px 9px;
  border-radius: 6px;
  color: #b9ffac;
  background: #16361c;
  border: 1px solid rgba(97, 213, 63, 0.45);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-collection-info {
  display: grid;
  grid-template-rows: minmax(58px, auto) auto 42px;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.hero-collection-kicker {
  display: block;
  color: #82a8cf;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-collection-info h2 {
  margin: 4px 0 0;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 21px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hero-social-actions {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
}

.hero-social-link,
.hero-select-button {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #2a3e53;
  border-radius: 6px;
  color: #f5f9fd;
  background: #111f2d;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.hero-social-link:hover {
  border-color: #4c769e;
  background: #172a3d;
}

.hero-select-button {
  width: 100%;
  color: #dfffd8;
  border-color: rgba(97, 213, 63, 0.42);
  background: #236f20;
}

.hero-select-button.selected {
  color: #9fb0c2;
  border-color: #26384b;
  background: #111b25;
}

.heroes-submit-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 32px 32px;
  padding: 20px;
  border-top: 1px solid #2b4055;
  border-bottom: 1px solid #2b4055;
}

.heroes-submit-callout div {
  display: grid;
  gap: 5px;
}

.heroes-submit-callout span {
  color: var(--muted);
  line-height: 1.45;
}

.heroes-submit-callout .ghost-button {
  width: auto;
  flex: 0 0 auto;
}

.hero-submit-heading {
  align-items: center;
  justify-content: start;
}

.hero-submit-heading .icon-button {
  flex: 0 0 auto;
}

.hero-submit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  padding: 24px 32px 32px;
}

.hero-submit-form,
.hero-payment-panel {
  align-content: start;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid #26384b;
  border-radius: 8px;
  background: #0a141f;
}

.hero-submit-form label {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: #b7c9dc;
  font-size: 12px;
  font-weight: 800;
}

.hero-submit-form small {
  color: var(--muted);
  font-weight: 600;
}

.hero-file-field input {
  padding: 10px;
}

.hero-file-field input::file-selector-button {
  margin-right: 12px;
  padding: 9px 12px;
  border: 0;
  border-radius: 5px;
  color: #ffffff;
  background: #1f6fd4;
  font-weight: 800;
  cursor: pointer;
}

.hero-payment-panel > strong {
  color: var(--green);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
}

.hero-payment-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.hero-payment-address {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #26384b;
  border-radius: 6px;
  background: #07111b;
}

.hero-payment-address span {
  color: #82a8cf;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-payment-address code {
  color: #f3f8fd;
  font-family: inherit;
  font-weight: 800;
}

.hero-pay-button,
.hero-publish-button {
  width: 100%;
}

@media (max-width: 760px) {
  .topbar .brand {
    grid-column: 1 / -1;
  }

  .topbar-section-link {
    grid-column: 5 / 7;
    grid-row: 1;
    width: 100%;
    min-height: 50px;
    padding: 0 8px;
  }

  .heroes-heading,
  .hero-submit-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
  }

  .hero-submit-heading {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .heroes-add-button {
    width: 100%;
  }

  .hero-collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
  }

  .hero-collection-card {
    min-height: 378px;
    grid-template-rows: 190px minmax(0, 1fr);
  }

  .hero-collection-visual {
    margin: 6px 6px 0;
    padding: 14px 6px 0;
  }

  .hero-collection-visual::before {
    inset: 8px;
  }

  .hero-collection-visual::after {
    bottom: 8px;
    width: 34px;
  }

  .hero-collection-visual img {
    max-height: 176px;
  }

  .hero-collection-number {
    top: 12px;
    left: 12px;
  }

  .hero-selected-badge {
    top: 10px;
    right: 10px;
    padding: 5px 7px;
    font-size: 8px;
  }

  .hero-collection-info {
    grid-template-rows: minmax(44px, auto) auto 38px;
    gap: 10px;
    padding: 10px;
  }

  .hero-collection-info h2 {
    font-size: 14px;
  }

  .hero-social-actions {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .hero-social-link,
  .hero-select-button {
    min-height: 38px;
    font-size: 10px;
  }

  .heroes-submit-callout {
    align-items: stretch;
    flex-direction: column;
    margin: 8px 12px 20px;
    padding: 16px 4px;
  }

  .heroes-submit-callout .ghost-button {
    width: 100%;
  }

  .hero-submit-layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .hero-submit-form,
  .hero-payment-panel {
    padding: 14px;
  }
}

@media (max-width: 380px) {
  .hero-collection-grid {
    grid-template-columns: 1fr;
  }
}

/* TWX3 collection submission */
.hero-submit-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  align-items: start;
}

.hero-submit-form,
.hero-payment-panel {
  border-color: #263b50;
  background: #09141f;
}

.hero-submit-form {
  gap: 20px;
}

.hero-form-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #203347;
}

.hero-form-section-heading > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #225d9e;
  border-radius: 6px;
  color: #7eb8ff;
  background: #0c2035;
  font-size: 11px;
  font-weight: 900;
}

.hero-form-section-heading > div {
  display: grid;
  gap: 3px;
}

.hero-form-section-heading strong {
  font-size: 15px;
}

.hero-form-section-heading small {
  color: var(--muted);
  font-size: 11px;
}

.hero-profile-fields {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
}

.hero-form-fields {
  display: grid;
  align-content: start;
  gap: 14px;
}

.hero-file-field {
  min-height: 224px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 20px !important;
  border: 1px dashed #31506e;
  border-radius: 7px;
  background: #07111b;
  cursor: pointer;
}

.hero-file-field:hover {
  border-color: #3184df;
  background: #091a2a;
}

.hero-upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #ffffff;
  background: #176dcc;
  font-size: 26px;
  font-weight: 700;
}

.hero-file-field > strong {
  color: #f6f9fd;
  font-size: 14px;
}

.hero-file-field input {
  width: 100%;
  margin-top: 4px;
  padding: 7px;
  border-color: #20364b;
  background: #0b1926;
  font-size: 10px;
}

.verification-heading {
  margin-top: 2px;
}

.hero-hash-field {
  display: grid;
  gap: 8px;
  color: #b7c9dc;
  font-size: 12px;
  font-weight: 800;
}

.hero-payment-panel {
  gap: 18px;
}

.hero-payment-summary {
  display: grid;
  gap: 7px;
  padding-bottom: 18px;
  border-bottom: 1px solid #203347;
}

.hero-payment-summary strong {
  color: var(--green);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
}

.hero-payment-summary small {
  color: var(--muted);
}

.hero-payment-checks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #afc2d5;
  font-size: 12px;
  font-weight: 700;
}

.hero-payment-checks li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-payment-checks li span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #8df779;
  background: #12351a;
  font-size: 11px;
}

/* Secure TWX3 administration */
.admin-screen {
  overflow: hidden;
}

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
  background: #0a141f;
}

.admin-heading h1,
.admin-access-state h1 {
  margin: 7px 0 6px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
}

.admin-heading p,
.admin-access-state p {
  margin: 0;
  color: var(--muted);
}

.admin-refresh-button {
  width: auto;
}

.admin-access-state {
  min-height: 480px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
}

.admin-access-state .primary-button,
.admin-access-state .ghost-button {
  width: min(320px, 100%);
  margin-top: 8px;
}

.admin-wallet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 24px 32px 12px;
}

.admin-wallet-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid #263b50;
  border-radius: 7px;
  background: #09141f;
}

.admin-wallet-card > span,
.admin-ledger-strip span,
.admin-hero-card label > span {
  color: #8fb1d4;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-wallet-card > strong {
  overflow-wrap: anywhere;
  color: var(--green);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
}

.admin-wallet-card code {
  color: #f3f8fd;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
}

.admin-wallet-card small {
  color: var(--muted);
  line-height: 1.35;
}

.admin-ledger-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 32px 28px;
  border-top: 1px solid #263b50;
  border-bottom: 1px solid #263b50;
}

.admin-ledger-strip > div {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 15px 16px;
  border-right: 1px solid #263b50;
}

.admin-ledger-strip > div:last-child {
  border-right: 0;
}

.admin-ledger-strip strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.admin-heroes-section {
  padding: 0 32px 32px;
}

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

.admin-section-heading h2 {
  margin: 5px 0 0;
  font-size: 28px;
}

.admin-section-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-hero-list {
  display: grid;
  gap: 12px;
}

.admin-hero-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid #263b50;
  border-radius: 7px;
  background: #09141f;
}

.admin-hero-preview {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.admin-hero-preview > img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 6px;
  background: #07111b;
}

.admin-image-control {
  display: grid;
  gap: 5px;
  color: #b7c9dc;
  font-size: 10px;
  font-weight: 800;
}

.admin-image-control input {
  min-width: 0;
  padding: 6px;
  font-size: 9px;
}

.admin-image-control small {
  color: var(--muted);
}

.admin-hero-fields {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.admin-hero-fields label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.admin-hero-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.admin-hero-title-row > div {
  min-width: 0;
}

.admin-hero-title-row strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.admin-status-pill {
  padding: 6px 8px;
  border: 1px solid #2f4a64;
  border-radius: 5px;
  color: #aec1d5;
  background: #0b1926;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-status-pill.active {
  color: #9af58a;
  border-color: #276b2b;
  background: #0e2a15;
}

.admin-link-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-hero-options {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) minmax(150px, 0.6fr) minmax(170px, auto);
  align-items: end;
  gap: 10px;
}

.admin-hero-options select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #2b4055;
  border-radius: 6px;
  color: #f5f9fd;
  background: #07111b;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.admin-feature-toggle {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 9px !important;
  padding: 0 12px;
  border: 1px solid #2b4055;
  border-radius: 6px;
  background: #07111b;
}

.admin-feature-toggle input {
  width: 17px;
  height: 17px;
  accent-color: #2b9628;
}

.admin-save-hero {
  min-height: 42px;
}

@media (max-width: 900px) {
  .hero-submit-layout {
    grid-template-columns: 1fr;
  }

  .admin-wallet-grid {
    grid-template-columns: 1fr;
  }

  .admin-ledger-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-ledger-strip > div:nth-child(2) {
    border-right: 0;
  }

  .admin-ledger-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid #263b50;
  }
}

@media (max-width: 760px) {
  .topbar:has(.admin-link) .brand {
    grid-column: 1 / -1;
  }

  .topbar:has(.admin-link) .topbar-section-link {
    grid-row: 4;
  }

  .topbar:has(.admin-link) .topbar-section-link:not(.admin-link) {
    grid-column: 1 / 4;
  }

  .topbar:has(.admin-link) .admin-link {
    grid-column: 4 / 7;
  }

  .hero-profile-fields,
  .admin-hero-card,
  .admin-link-fields,
  .admin-hero-options {
    grid-template-columns: 1fr;
  }

  .hero-file-field {
    min-height: 190px;
  }

  .admin-heading {
    align-items: stretch;
    flex-direction: column;
    padding: 20px 16px;
  }

  .admin-refresh-button {
    width: 100%;
  }

  .admin-wallet-grid {
    padding: 16px 12px 10px;
  }

  .admin-ledger-strip {
    margin: 0 12px 22px;
  }

  .admin-heroes-section {
    padding: 0 12px 20px;
  }

  .admin-hero-preview {
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: center;
  }

  .admin-hero-preview > img {
    height: 130px;
  }
}

@media (max-width: 430px) {
  .admin-ledger-strip {
    grid-template-columns: 1fr;
  }

  .admin-ledger-strip > div,
  .admin-ledger-strip > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #263b50;
  }

  .admin-ledger-strip > div:last-child {
    border-bottom: 0;
  }
}

/* TWX3 operations UI */
.hero-submit-screen,
.admin-screen {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-submit-heading,
.admin-heading {
  padding: 24px 28px;
  background: #0a141f;
}

.hero-submit-heading h1,
.admin-heading h1 {
  font-size: clamp(32px, 4vw, 44px);
}

.hero-submit-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
  gap: 16px;
  padding: 20px 28px 28px;
}

.hero-submit-form,
.hero-payment-panel {
  border-color: #253a4f;
  background: #0b1723;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.hero-submit-form {
  gap: 22px;
  padding: 24px;
}

.hero-form-section-heading {
  gap: 14px;
  padding-bottom: 16px;
}

.hero-form-section-heading > span {
  width: 38px;
  height: 38px;
  border-color: #2869aa;
  color: #9bc9ff;
  background: #0b2238;
}

.hero-form-section-heading strong {
  color: #f5f8fc;
  font-size: 16px;
}

.hero-form-section-heading small {
  font-size: 12px;
}

.hero-profile-fields {
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 20px;
}

.twx-form-field,
.hero-submit-form .twx-form-field,
.admin-hero-fields .twx-form-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.twx-form-field > span,
.hero-submit-form .twx-form-field > span,
.admin-hero-fields .twx-form-field > span {
  color: #91b3d5;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.twx-form-field input,
.twx-form-field select,
.admin-hero-fields input,
.admin-hero-fields select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #2a4056;
  border-radius: 6px;
  color: #f6f9fc;
  background: #07121d;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.twx-form-field input::placeholder,
.admin-hero-fields input::placeholder {
  color: #60778e;
}

.twx-form-field input:hover,
.twx-form-field select:hover,
.admin-hero-fields input:hover,
.admin-hero-fields select:hover {
  border-color: #3d5c79;
}

.twx-form-field input:focus,
.twx-form-field select:focus,
.admin-hero-fields input:focus,
.admin-hero-fields select:focus {
  border-color: #2787f5;
  background: #091827;
  box-shadow: 0 0 0 3px rgba(31, 134, 255, 0.13);
  outline: none;
}

.hero-file-field,
.admin-hero-preview {
  position: relative;
  cursor: pointer;
}

.hero-file-field input[type="file"],
.admin-hero-preview input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
}

.hero-file-field {
  min-height: 292px;
  gap: 10px;
  padding: 24px !important;
  border: 1px dashed #345573;
  background: #07121d;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.hero-file-field:hover,
.hero-file-field:focus-within {
  border-color: #2787f5;
  background: #0a1927;
}

.hero-file-preview {
  display: none;
  width: 100%;
  height: 190px;
  padding: 8px;
  border: 1px solid #2b4359;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
  background: #050d15;
}

.hero-file-field.has-preview {
  justify-content: flex-start;
  padding: 12px !important;
  border-style: solid;
}

.hero-file-field.has-preview .hero-file-preview {
  display: block;
}

.hero-file-field.has-preview .hero-upload-icon,
.hero-file-field.has-preview > small {
  display: none;
}

.hero-file-field.has-preview > strong {
  max-width: 100%;
  margin-top: 2px;
  font-size: 12px;
}

.hero-file-field.has-preview .hero-file-name {
  width: 100%;
}

.hero-upload-icon {
  width: 46px;
  height: 46px;
  border: 1px solid #378de9;
  color: #ffffff;
  background: #176dca;
  font-size: 24px;
}

.hero-file-field > strong {
  max-width: 190px;
  font-size: 16px;
  line-height: 1.3;
}

.hero-file-field > small {
  max-width: 230px;
  font-size: 11px;
  line-height: 1.55;
}

.hero-file-name {
  max-width: 100%;
  overflow: hidden;
  padding: 8px 11px;
  border: 1px solid #2c4359;
  border-radius: 5px;
  color: #9fb5ca;
  background: #0c1b29;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-file-name.has-file {
  color: #b8ffad;
  border-color: #347636;
  background: #102819;
}

.hero-form-fields {
  gap: 16px;
}

.verification-heading {
  margin-top: 4px;
}

.hero-payment-panel {
  position: sticky;
  top: 18px;
  gap: 18px;
  padding: 22px;
}

.hero-payment-summary strong {
  font-size: clamp(34px, 4vw, 46px);
}

.hero-payment-address {
  padding: 14px 15px;
  border-color: #2a4056;
  background: #07121d;
}

.hero-payment-checks {
  gap: 11px;
}

.hero-payment-checks li span {
  border-radius: 5px;
}

.hero-pay-button,
.hero-publish-button {
  min-height: 48px;
}

.hero-publish-action {
  width: 100%;
  min-height: 54px;
  padding-inline: 18px;
  font-size: 14px;
}

.hero-payment-note {
  margin: 0;
  color: #829bb3;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

@media (min-width: 761px) {
  .hero-submit-layout {
    padding-right: 0;
    padding-left: 0;
  }

}

.admin-heading {
  align-items: center;
}

.admin-heading p {
  max-width: 650px;
  line-height: 1.5;
}

.admin-refresh-button {
  min-width: 190px;
  min-height: 46px;
}

.admin-wallet-grid {
  gap: 14px;
  padding: 22px 28px 14px;
}

.admin-wallet-card {
  gap: 12px;
  padding: 18px;
  border-color: #263d52;
  background: #0b1723;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

.admin-wallet-card-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.admin-wallet-card-heading > span:not(.admin-wallet-status) {
  overflow: hidden;
  color: #a9c3dd;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-wallet-card-heading small {
  color: #607b95;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-wallet-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #61d53f;
  box-shadow: 0 0 0 4px rgba(97, 213, 63, 0.1);
}

.admin-wallet-card.unavailable .admin-wallet-status {
  background: #f2a51e;
  box-shadow: 0 0 0 4px rgba(242, 165, 30, 0.1);
}

.admin-wallet-card > strong {
  min-height: 36px;
  display: flex;
  align-items: center;
  font-size: clamp(24px, 2.6vw, 34px);
}

.admin-wallet-card.unavailable > strong {
  color: #f3bd58;
  font-size: clamp(18px, 2vw, 24px);
}

.admin-wallet-address {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #22384d;
  border-radius: 5px;
  background: #07121d;
}

.admin-wallet-address code {
  display: block;
  overflow: hidden;
  color: #bed0e1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-wallet-card p {
  min-height: 34px;
  margin: 0;
  color: #8099b1;
  font-size: 11px;
  line-height: 1.5;
}

.admin-ledger-strip {
  gap: 10px;
  margin: 0 28px 30px;
  border: 0;
}

.admin-ledger-strip > div,
.admin-ledger-strip > div:nth-child(2) {
  gap: 8px;
  padding: 15px;
  border: 1px solid #253a4f;
  border-radius: 6px;
  background: #091520;
}

.admin-ledger-strip strong {
  font-size: 18px;
}

.admin-heroes-section {
  padding: 0 28px 30px;
}

.admin-section-heading {
  align-items: center;
  padding-bottom: 14px;
}

.admin-section-heading h2 {
  font-size: 26px;
}

.admin-section-heading > span {
  padding: 7px 10px;
  border: 1px solid #294158;
  border-radius: 5px;
  background: #0b1824;
}

.admin-hero-card {
  display: block;
  overflow: hidden;
  padding: 0;
  border-color: #294158;
  background: #0b1723;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.admin-hero-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid #23394d;
  background: #0d1a27;
}

.admin-hero-card-heading > div {
  min-width: 0;
}

.admin-hero-card-heading strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-status-pill {
  flex: 0 0 auto;
  padding: 7px 10px;
}

.admin-hero-card-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.admin-hero-preview {
  align-content: stretch;
  display: grid;
  grid-template-rows: 230px auto;
  gap: 0;
  overflow: hidden;
  border: 1px solid #294158;
  border-radius: 7px;
  background: #07121d;
}

.admin-hero-preview > img {
  width: 100%;
  height: 230px;
  padding: 10px;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 0;
  background: #07121d;
}

.admin-hero-card .admin-image-action {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-top: 1px solid #294158;
  color: inherit;
  background: #0e1d2b;
  font-size: inherit;
  font-weight: inherit;
  text-transform: none;
}

.admin-image-action strong {
  color: #eef5fb;
  font-size: 12px;
}

.admin-image-action small {
  overflow: hidden;
  color: #7992aa;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-image-action small.has-file {
  color: #92e986;
}

.admin-hero-preview:hover,
.admin-hero-preview:focus-within {
  border-color: #2787f5;
}

.admin-hero-fields {
  gap: 14px;
}

.admin-link-fields {
  gap: 12px;
}

.admin-hero-options {
  grid-template-columns: minmax(150px, 0.45fr) minmax(190px, 0.55fr) minmax(190px, auto);
  gap: 12px;
}

.admin-feature-toggle {
  position: relative;
  min-height: 48px;
  padding: 0 13px;
  border-color: #2a4056;
  background: #07121d;
  cursor: pointer;
}

.admin-feature-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-toggle-visual {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid #3b5268;
  border-radius: 11px;
  background: #172533;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.admin-toggle-visual::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #8ba0b4;
  transition: transform 150ms ease, background-color 150ms ease;
}

.admin-feature-toggle input:checked + .admin-toggle-visual {
  border-color: #3d9a37;
  background: #17411b;
}

.admin-feature-toggle input:checked + .admin-toggle-visual::after {
  transform: translateX(16px);
  background: #7ee66a;
}

.admin-feature-toggle > span:last-child {
  color: #b9cadd;
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

.admin-save-hero {
  min-height: 48px;
}

@media (max-width: 1000px) {
  .hero-submit-layout {
    grid-template-columns: 1fr;
  }

  .hero-payment-panel {
    position: static;
  }

  .admin-hero-card-body {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .admin-hero-options {
    grid-template-columns: 1fr 1fr;
  }

  .admin-save-hero {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .hero-submit-heading,
  .admin-heading {
    padding: 18px 14px;
  }

  .hero-submit-layout {
    padding: 12px;
  }

  .hero-submit-form,
  .hero-payment-panel {
    padding: 16px;
  }

  .hero-profile-fields {
    grid-template-columns: 1fr;
  }

  .hero-file-field {
    min-height: 230px;
  }

  .admin-wallet-grid {
    padding: 14px 12px 10px;
  }

  .admin-ledger-strip {
    gap: 8px;
    margin: 0 12px 24px;
  }

  .admin-heroes-section {
    padding: 0 12px 20px;
  }

  .admin-hero-card-body {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .admin-hero-preview {
    grid-template-columns: 120px minmax(0, 1fr);
    grid-template-rows: 140px;
  }

  .admin-hero-preview > img {
    height: 140px;
    padding: 6px;
  }

  .admin-image-action {
    align-content: center;
    border-top: 0;
    border-left: 1px solid #294158;
  }

  .admin-link-fields,
  .admin-hero-options {
    grid-template-columns: 1fr;
  }

  .admin-save-hero {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .admin-wallet-card > strong {
    min-height: 30px;
  }

  .admin-hero-card-heading {
    padding: 13px 14px;
  }

  .admin-hero-card-heading strong {
    max-width: 210px;
    font-size: 15px;
  }
}

@media (min-width: 761px) {
  .admin-wallet-grid {
    padding-right: 0;
    padding-left: 0;
  }

  .admin-ledger-strip {
    margin-right: 0;
    margin-left: 0;
  }

  .admin-heroes-section {
    padding-right: 0;
    padding-left: 0;
  }
}

.admin-live-online {
  flex: 0 0 auto;
  min-width: 148px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: end;
  column-gap: 9px;
  padding: 11px 14px;
  border: 1px solid #28523a;
  border-radius: 7px;
  background: #091a17;
}

.admin-live-online strong {
  color: #7ee66a;
  font-size: 22px;
  line-height: 1;
}

.admin-live-online > span:last-child {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: #8fa8a0;
  font-size: 9px;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.admin-live-dot,
.admin-user-state i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 50%;
  background: #61d53f;
  box-shadow: 0 0 0 4px rgba(97, 213, 63, 0.1);
}

.admin-toolbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 28px;
  border-bottom: 1px solid #203448;
  background: #08131e;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid #263d52;
  border-radius: 7px;
  background: #06101a;
}

.admin-tabs button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  color: #839ab1;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.admin-tabs button:hover,
.admin-tabs button.active {
  color: #f1f7fc;
  background: #17304a;
}

.admin-tabs button span {
  min-width: 22px;
  padding: 3px 6px;
  border-radius: 4px;
  color: #9ecdf7;
  background: #0a1b2b;
  font-size: 9px;
  text-align: center;
}

.admin-toolbar .admin-refresh-button {
  min-width: 138px;
  min-height: 40px;
}

.admin-users-section {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 20px 28px 32px;
}

.admin-user-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.admin-user-stats > div {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 15px 16px;
  border: 1px solid #253a4f;
  border-radius: 6px;
  background: #091520;
}

.admin-user-stats span {
  color: #829bb3;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-stats strong {
  color: #eef6fc;
  font-size: 24px;
}

.admin-users-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.admin-users-heading h2 {
  margin: 5px 0 0;
  font-size: 28px;
}

.admin-user-controls {
  display: grid;
  grid-template-columns: minmax(230px, 340px) 130px;
  gap: 8px;
}

.admin-user-controls input,
.admin-user-controls select {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #2b4359;
  border-radius: 6px;
  color: #eaf2f9;
  outline: 0;
  background: #07121d;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.admin-user-controls input:focus,
.admin-user-controls select:focus {
  border-color: #2787f5;
  box-shadow: 0 0 0 3px rgba(39, 135, 245, 0.12);
}

.admin-users-meta {
  margin-bottom: 8px;
  color: #6f879e;
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.admin-users-error {
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid #70423c;
  border-radius: 6px;
  color: #ffb4a9;
  background: #261514;
  font-size: 11px;
}

.admin-users-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #263d52;
  border-radius: 7px;
  background: #08131e;
}

.admin-users-table {
  width: 100%;
  min-width: 1050px;
  border-collapse: collapse;
  table-layout: fixed;
}

.admin-users-table th,
.admin-users-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #1e3245;
  text-align: left;
  vertical-align: middle;
}

.admin-users-table th {
  color: #7892aa;
  background: #0d1a27;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-users-table th:nth-child(1) { width: 15%; }
.admin-users-table th:nth-child(2) { width: 10%; }
.admin-users-table th:nth-child(3) { width: 10%; }
.admin-users-table th:nth-child(4) { width: 25%; }
.admin-users-table th:nth-child(5) { width: 13%; }
.admin-users-table th:nth-child(6) { width: 13%; }
.admin-users-table th:nth-child(7) { width: 14%; }

.admin-users-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-users-table tbody tr:hover {
  background: #0b1a28;
}

.admin-user-identity {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.admin-user-identity strong {
  overflow: hidden;
  color: #eef6fc;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-identity span,
.admin-last-seen {
  color: #718ba3;
  font-size: 10px;
}

.admin-user-state,
.admin-pass-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #91a8bd;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-user-state.offline i {
  background: #60758a;
  box-shadow: 0 0 0 4px rgba(96, 117, 138, 0.1);
}

.admin-user-state.online,
.admin-pass-state.owned,
.admin-ape-in {
  color: #7ee66a;
}

.admin-pass-state.none,
.admin-ape-out {
  color: #f1b45c;
}

.admin-user-wallet {
  display: block;
  overflow-wrap: anywhere;
  color: #a8c6df;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  line-height: 1.45;
}

.admin-ape-in,
.admin-ape-out {
  font-size: 11px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .admin-heading {
    align-items: center;
  }

  .admin-live-online {
    min-width: 118px;
  }

  .admin-toolbar {
    padding: 10px 12px;
  }

  .admin-toolbar .admin-refresh-button {
    min-width: 112px;
  }

  .admin-users-section {
    padding: 16px 12px 24px;
  }

  .admin-user-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-user-stats > div {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .admin-user-stats strong {
    font-size: 20px;
  }

  .admin-users-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-controls {
    grid-template-columns: minmax(0, 1fr) 112px;
  }
}

@media (max-width: 500px) {
  .admin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-live-online {
    width: 100%;
    justify-content: start;
  }

  .admin-live-online > span:last-child {
    text-align: left;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-tabs,
  .admin-toolbar .admin-refresh-button {
    width: 100%;
  }

  .admin-tabs button {
    flex: 1 1 0;
    justify-content: center;
  }

  .admin-user-controls {
    grid-template-columns: 1fr;
  }
}

/* NFT pass */
.pass-screen {
  overflow: hidden;
}

.pass-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  background: #0b1723;
}

.pass-heading > div {
  min-width: 0;
}

.pass-heading h1 {
  margin: 5px 0 4px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.pass-heading p {
  max-width: 760px;
  margin: 0;
  color: #9fb5ca;
  font-size: 14px;
  line-height: 1.55;
}

.pass-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  gap: 24px;
  padding: 28px;
}

.pass-artwork-panel,
.pass-details {
  min-width: 0;
}

.pass-artwork-panel {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  overflow: visible;
  min-height: 480px;
  padding: 10px 24px;
  border: 0;
  background: transparent;
}

.pass-artwork {
  width: min(100%, 340px);
  height: auto;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 24px 32px rgba(0, 0, 0, 0.58))
    drop-shadow(-10px 0 18px rgba(238, 40, 224, 0.16))
    drop-shadow(10px 0 18px rgba(32, 205, 255, 0.18));
}

.pass-details {
  align-content: start;
  display: grid;
  gap: 14px;
}

.pass-fee-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 145px;
  padding: 22px;
  border: 1px solid #2a4056;
  border-radius: 8px;
  background: #0b1723;
}

.pass-fee-comparison > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.pass-fee-comparison span {
  color: #8da7c0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pass-fee-comparison strong {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
}

.pass-fee-comparison .discount {
  text-align: right;
}

.pass-fee-comparison .discount strong {
  color: var(--green);
}

.pass-fee-arrow {
  color: #42d3ff !important;
  font-size: 30px !important;
}

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

.pass-benefit-grid > div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 94px;
  padding: 15px;
  border: 1px solid #263d52;
  border-radius: 7px;
  background: #091520;
}

.pass-benefit-grid span {
  color: #7892aa;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.pass-benefit-grid strong {
  overflow: hidden;
  font-size: clamp(16px, 2vw, 21px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pass-benefit-grid .pass-network-benefit {
  border-color: rgba(42, 199, 242, 0.32);
  box-shadow: inset 3px 0 0 #2ac7f2;
}

.pass-benefit-grid .pass-network-benefit strong {
  color: #61d8ff;
}

.pass-status-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid #2a4056;
  border-radius: 7px;
  background: #08131d;
}

.pass-status-card.owned {
  border-color: rgba(97, 213, 63, 0.5);
  background: #0c2017;
}

.pass-status-card.warning {
  border-color: rgba(242, 165, 30, 0.48);
}

.pass-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #71869a;
  box-shadow: 0 0 0 5px rgba(113, 134, 154, 0.1);
}

.pass-status-card.owned .pass-status-dot {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(97, 213, 63, 0.1);
}

.pass-status-card.warning .pass-status-dot {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(242, 165, 30, 0.1);
}

.pass-status-card > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pass-status-card small,
.pass-status-card span {
  color: #7892aa;
  font-size: 9px;
  font-weight: 700;
}

.pass-status-card strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pass-status-card > b {
  color: var(--green);
  font-size: 24px;
}

.pass-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(160px, 0.75fr);
  gap: 10px;
}

.pass-actions .primary-button,
.pass-actions .green-button,
.pass-actions .ghost-button {
  min-height: 52px;
}

.pass-buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.pass-security-note {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-left: 3px solid #2187f5;
  background: #08141f;
}

.pass-security-note strong {
  font-size: 12px;
}

.pass-security-note span {
  color: #829bb3;
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 1000px) {
  .pass-layout {
    grid-template-columns: minmax(280px, 0.8fr) minmax(380px, 1.2fr);
    gap: 16px;
    padding: 18px;
  }

  .pass-artwork-panel {
    min-height: 420px;
    padding: 8px 14px 54px;
  }

  .pass-benefit-grid {
    grid-template-columns: 1fr;
  }

  .pass-benefit-grid > div {
    min-height: 66px;
  }
}

@media (max-width: 760px) {
  .pass-heading {
    align-items: start;
    gap: 12px;
    padding: 18px 14px;
  }

  .pass-heading h1 {
    font-size: 30px;
  }

  .pass-layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .pass-artwork-panel {
    min-height: 0;
    padding: 8px 16px 54px;
  }

  .pass-artwork {
    width: min(100%, 290px);
  }

  .pass-benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pass-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .pass-fee-comparison {
    min-height: 120px;
    gap: 8px;
    padding: 15px;
  }

  .pass-fee-comparison strong {
    font-size: 34px;
  }

  .pass-benefit-grid {
    grid-template-columns: 1fr;
  }

  .pass-benefit-grid > div {
    min-height: 58px;
  }

  .pass-status-card > b {
    font-size: 19px;
  }
}

/* Site footer and legal pages */
.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px 28px;
  margin-top: 14px;
  padding: 18px 20px;
  color: #8298ad;
  background: #07111a;
  border: 1px solid rgba(116, 140, 166, 0.2);
  border-radius: 8px;
}

.footer-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.footer-identity > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.footer-identity strong {
  color: var(--text);
  font-size: 15px;
}

.footer-identity span:not(.footer-age) {
  font-size: 10px;
  line-height: 1.45;
}

.footer-age,
.legal-age-mark {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 48px;
  height: 40px;
  padding: 0 10px;
  color: #ff7474;
  font-size: 14px;
  font-weight: 900;
  border: 1px solid rgba(255, 96, 96, 0.42);
  border-radius: 7px;
  background: rgba(99, 22, 27, 0.16);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.footer-links button,
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  color: #a9bed3;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
  border: 1px solid #1d3143;
  border-radius: 7px;
  background: #0a1722;
  cursor: pointer;
}

.footer-links button:hover,
.footer-links a:hover {
  color: #ffffff;
  border-color: #287ed3;
  background: #0d2031;
}

.footer-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 12px;
  font-size: 9px;
  line-height: 1.55;
  border-top: 1px solid rgba(116, 140, 166, 0.16);
}

.legal-page {
  background: #07111a;
}

.legal-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 28px 30px;
  border-bottom: 1px solid var(--line);
  background: #091622;
}

.legal-heading > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.legal-heading h1,
.legal-heading p {
  margin: 0;
}

.legal-heading h1 {
  color: #f4f7fb;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 650;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.legal-heading p {
  color: #839bb2;
  font-size: 11px;
}

.legal-kicker {
  color: #70a8dc;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.legal-back {
  width: 46px;
  height: 46px;
}

.legal-age-mark {
  min-width: 58px;
  height: 46px;
  font-size: 16px;
}

.legal-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  gap: 34px;
  padding: 28px 30px 36px;
}

.legal-summary {
  align-self: start;
  display: grid;
  gap: 12px;
  position: sticky;
  top: 14px;
  padding-right: 26px;
  border-right: 1px solid rgba(116, 140, 166, 0.18);
}

.legal-summary strong {
  color: #f2f6fb;
  font-size: 14px;
}

.legal-summary p {
  margin: 0;
  color: #91a7bc;
  font-size: 10px;
  line-height: 1.7;
}

.legal-summary a {
  display: grid;
  gap: 3px;
  padding: 12px 0;
  color: #89a5c0;
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  border-top: 1px solid rgba(116, 140, 166, 0.18);
  border-bottom: 1px solid rgba(116, 140, 166, 0.18);
}

.legal-summary a span {
  color: #4ea1f4;
  font-size: 12px;
}

.legal-content {
  min-width: 0;
}

.legal-content > section {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 0 0 24px;
}

.legal-content > section + section {
  padding-top: 24px;
  border-top: 1px solid rgba(116, 140, 166, 0.16);
}

.legal-content > section > span {
  display: grid;
  place-items: center;
  align-self: start;
  width: 34px;
  height: 34px;
  color: #65a9ec;
  font-size: 9px;
  font-weight: 900;
  border: 1px solid #24517a;
  border-radius: 7px;
  background: #091b2b;
}

.legal-content section > div {
  min-width: 0;
}

.legal-content h2 {
  margin: 3px 0 10px;
  color: #eef4fa;
  font-size: 16px;
}

.legal-content p {
  margin: 0;
  color: #9ab0c4;
  font-size: 11px;
  line-height: 1.75;
}

.legal-content p + p {
  margin-top: 9px;
}

@media (max-width: 760px) {
  .site-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 15px;
  }

  .footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .footer-links a {
    grid-column: 1 / -1;
  }

  .footer-note {
    grid-column: 1;
  }

  .legal-heading {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 20px 15px;
  }

  .legal-heading h1 {
    font-size: 28px;
  }

  .legal-age-mark {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    min-width: 50px;
    height: 38px;
  }

  .legal-heading > div {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .legal-back {
    grid-column: 1;
    grid-row: 1;
  }

  .legal-body {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 18px 15px 26px;
  }

  .legal-summary {
    position: static;
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(116, 140, 166, 0.18);
  }
}

@media (max-width: 430px) {
  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-links a {
    grid-column: 1;
  }

  .legal-content > section {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }

  .legal-content > section > span {
    width: 28px;
    height: 28px;
  }
}

/* Dedicated APE earnings leaderboard */
.topbar .ranking-link {
  margin-left: auto;
}

.topbar .ranking-link + .language-switch {
  margin-left: 0;
}

.earners-page {
  min-height: 680px;
  overflow: hidden;
  color: var(--text);
  background: #07111a;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.earners-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 32px 26px;
  border-bottom: 1px solid rgba(116, 140, 166, 0.18);
  background: #091520;
}

.earners-heading > div:first-child {
  min-width: 0;
}

.earners-heading h1,
.earners-heading p {
  margin: 0;
}

.earners-heading h1 {
  margin-top: 8px;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.earners-heading p {
  margin-top: 8px;
  color: #849cb4;
  font-size: 11px;
  line-height: 1.6;
}

.earners-period-tabs {
  flex: 0 0 330px;
  min-width: 0;
}

.earners-page-body {
  display: grid;
  gap: 30px;
  padding: 30px 32px 36px;
}

.earners-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  width: min(100%, 920px);
  margin: 0 auto;
}

.earners-podium.is-short {
  grid-template-columns: repeat(auto-fit, minmax(220px, 300px));
  justify-content: center;
}

.earners-podium.is-empty {
  grid-template-columns: 1fr;
  width: 100%;
}

.earner-podium-card {
  display: grid;
  justify-items: center;
  min-width: 0;
  min-height: 244px;
  padding: 18px;
  border: 1px solid #243a4e;
  border-radius: 8px;
  background: #0a1621;
}

.earner-podium-card.rank-1 {
  min-height: 270px;
  padding-top: 22px;
  border-color: rgba(242, 165, 30, 0.68);
  background: #101a20;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.earner-podium-card.rank-2 {
  border-color: rgba(151, 176, 201, 0.42);
}

.earner-podium-card.rank-3 {
  border-color: rgba(213, 135, 79, 0.44);
}

.earner-rank-medal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 38px;
  color: #09111a;
  font-size: 12px;
  font-weight: 950;
  background: #8ea5bb;
  clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
}

.rank-1 .earner-rank-medal {
  background: #ffc94f;
}

.rank-3 .earner-rank-medal {
  background: #d58b56;
}

.earner-avatar {
  display: grid;
  place-items: center;
  position: relative;
  width: 78px;
  height: 78px;
  margin: 12px 0 10px;
  border: 1px solid #294158;
  border-radius: 8px;
  background: #07121c;
  overflow: hidden;
}

.rank-1 .earner-avatar {
  width: 88px;
  height: 88px;
  border-color: rgba(242, 165, 30, 0.52);
}

.earner-avatar img {
  display: block;
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.earner-podium-card h3 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.earner-podium-card > strong {
  margin-top: 13px;
  color: #ffc94f;
  font-size: 22px;
}

.earner-podium-card > small {
  margin-top: 1px;
  color: #71879c;
  font-size: 8px;
  font-weight: 800;
}

.earners-empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 54px 20px;
  color: #849cb4;
  text-align: center;
  border-top: 1px solid rgba(116, 140, 166, 0.18);
  border-bottom: 1px solid rgba(116, 140, 166, 0.18);
}

.earners-empty-state strong {
  color: #eef4fa;
  font-size: 17px;
}

.earners-empty-state span {
  font-size: 10px;
}

.earners-table {
  overflow: hidden;
  border-top: 1px solid #263b50;
  border-bottom: 1px solid #263b50;
}

.earners-table-head,
.earners-table-row {
  display: grid;
  grid-template-columns: 54px minmax(220px, 1fr) 110px 110px 150px;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.earners-table-head {
  min-height: 42px;
  color: #69839b;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
  background: #08131d;
}

.earners-table-head > :first-child,
.earners-table-row > :first-child {
  padding-left: 14px;
}

.earners-table-head > :last-child,
.earners-table-row > :last-child {
  padding-right: 14px;
  text-align: right;
}

.earners-table-row {
  min-height: 68px;
  border-top: 1px solid rgba(116, 140, 166, 0.14);
  background: #091520;
}

.earners-table-row:hover {
  background: #0b1926;
}

.earners-position {
  color: #758ba1;
  font-size: 11px;
}

.earners-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.earners-player-avatar {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid #294158;
  border-radius: 7px;
  background: #07121c;
  overflow: hidden;
}

.earners-player-avatar img {
  display: block;
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  min-width: 0;
  min-height: 0;
  margin: 0;
  object-fit: contain;
}

.earners-player > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.earners-player strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.earners-stat {
  color: #a5b6c7;
  font-size: 11px;
}

.earners-amount {
  color: #6ee94c;
  font-size: 11px;
  white-space: nowrap;
}

.earners-table-empty {
  padding: 22px;
  color: #7d93a8;
  font-size: 10px;
  text-align: center;
  border-top: 1px solid rgba(116, 140, 166, 0.14);
  background: #091520;
}

@media (max-width: 760px) {
  .topbar .ranking-link {
    grid-column: 1 / 3;
    grid-row: 3;
    width: 100%;
    min-height: 40px;
    margin-left: 0;
    padding: 0 6px;
    font-size: 10px;
  }

  .topbar:not(:has(.admin-link)):has(.ranking-link) .balance-pill,
  .topbar:not(:has(.admin-link)):has(.ranking-link) .glyph-connect-pill {
    grid-column: 3 / 6;
  }

  .earners-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    padding: 22px 15px;
  }

  .earners-heading h1 {
    font-size: 27px;
  }

  .earners-period-tabs {
    flex-basis: auto;
    width: 100%;
  }

  .earners-page-body {
    gap: 22px;
    padding: 18px 12px 24px;
  }

  .earners-podium,
  .earners-podium.is-short {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }

  .earner-podium-card.rank-1 {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 216px;
  }

  .earner-podium-card.rank-2,
  .earner-podium-card.rank-3 {
    min-height: 204px;
  }

  .earner-podium-card {
    padding: 14px 10px;
  }

  .earners-table-head,
  .earners-table-row {
    grid-template-columns: 42px minmax(0, 1fr) 106px;
    gap: 8px;
  }

  .earners-table .ranking-wins,
  .earners-table .ranking-kills {
    display: none;
  }

  .earners-table-head > :first-child,
  .earners-table-row > :first-child {
    padding-left: 8px;
  }

  .earners-table-head > :last-child,
  .earners-table-row > :last-child {
    padding-right: 8px;
  }

  .earners-player-avatar {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 390px) {
  .earner-podium-card.rank-2,
  .earner-podium-card.rank-3 {
    min-height: 192px;
  }

  .earner-avatar {
    width: 64px;
    height: 64px;
  }

  .rank-1 .earner-avatar {
    width: 76px;
    height: 76px;
  }

  .earner-podium-card > strong {
    font-size: 18px;
  }
}

/* Tablet portrait battle layout */
@media (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
  .match-home {
    min-height: 0;
    padding: 18px;
  }

  .match-content {
    gap: 14px;
  }

  .match-copy {
    max-width: 100%;
    gap: 8px;
  }

  .match-copy h1 {
    font-size: 38px;
  }

  .match-copy p {
    font-size: 14px;
    line-height: 1.4;
  }

  .duel-showcase {
    grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
  }

  .hero-fighter-card {
    min-height: 310px;
    padding: 12px;
    grid-template-rows: auto minmax(175px, 1fr) auto;
  }

  .hero-fighter-card::before {
    inset: 9px;
  }

  .fighter-card-top {
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 8px;
    padding: 0 0 6px;
  }

  .fighter-title span,
  .fighter-title small {
    font-size: 9px;
  }

  .fighter-title strong {
    font-size: 19px;
  }

  .fighter-title strong.fighter-nickname-long {
    font-size: 16px;
  }

  .fighter-title strong.fighter-nickname-very-long {
    font-size: 14px;
  }

  .fighter-power {
    min-width: 52px;
    min-height: 48px;
    padding: 6px 7px;
  }

  .fighter-power strong {
    font-size: 20px;
  }

  .fighter-portrait {
    min-height: 175px;
  }

  .hero-fighter-img {
    width: min(210px, 100%);
    max-height: 210px;
  }

  .question-mark {
    width: min(96px, 54%);
    font-size: 76px;
  }

  .vs-stack {
    min-height: 0;
    align-self: center;
    gap: 8px;
  }

  .vs-pot {
    width: 86px;
    padding: 9px 5px;
  }

  .vs-pot span {
    font-size: 8px;
  }

  .vs-pot strong {
    font-size: 14px;
  }

  .vs-ring {
    width: 82px;
    height: 64px;
    font-size: 27px;
  }

  .vs-rule {
    display: none;
  }

  .stake-panel {
    padding: 10px;
  }

  .stake-options {
    gap: 7px;
  }

  .stake-option {
    min-height: 50px;
  }

  .action-button {
    min-height: 52px;
  }

  .battle-layout {
    gap: 10px;
  }

  .battle-panel {
    min-height: 0;
    padding: 10px;
    grid-template-rows: auto auto;
    gap: 10px;
    overflow: hidden;
  }

  .battle-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .battle-fighter-card {
    min-height: 330px;
    padding: 13px;
    grid-template-rows: auto minmax(200px, 1fr) auto;
    gap: 10px;
  }

  .battle-fighter-card.left {
    order: 1;
  }

  .battle-fighter-card.right {
    order: 2;
  }

  .battle-fighter-head {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 8px;
  }

  .battle-fighter-head strong {
    font-size: 22px;
  }

  .battle-hp-chip {
    min-width: 56px;
    padding: 7px 8px;
  }

  .battle-hp-chip strong {
    font-size: 24px;
  }

  .battle-fighter-portrait {
    min-height: 200px;
  }

  .battle-fighter-portrait .fighter-img,
  .battle-fighter-portrait .fighter-zone-highlight {
    width: min(260px, 92%);
    max-height: 245px;
  }

  .battle-fighter-card .hp {
    height: 24px;
  }

  .battle-center {
    order: 3;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 0;
    gap: 10px;
  }

  .battle-center .turn-status {
    display: none;
  }

  .battle-vs,
  .turn-timer,
  .battle-pot {
    width: 100%;
    min-height: 74px;
    padding: 10px 8px;
    align-self: stretch;
  }

  .battle-vs {
    font-size: 28px;
  }

  .battle-vs span,
  .turn-timer span,
  .battle-pot span {
    font-size: 9px;
  }

  .turn-timer strong {
    font-size: 22px;
  }

  .battle-pot strong {
    font-size: 16px;
  }

  .combat-controls {
    gap: 10px;
    padding: 12px;
  }

  .zone-buttons {
    gap: 7px;
  }

  .zone-button {
    min-height: 56px;
    padding: 9px 8px;
    font-size: 11px;
    touch-action: manipulation;
  }

  .battle-actions .green-button,
  .battle-actions .red-button {
    min-height: 50px;
  }

  .battle-layout .history-panel {
    position: static;
    max-height: 520px;
  }

  .battle-layout .history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 420px;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: none;
  }

  .battle-layout .history-row {
    width: 100%;
    min-width: 0;
    flex: none;
    scroll-snap-align: none;
  }
}
