@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --ink: #f4eed8;
  --muted: #a89f87;
  --panel: #191b22;
  --panel-light: #242630;
  --edge: #565066;
  --gold: #e5b95f;
  --red: #a73543;
  --red-bright: #dc5162;
  --green: #3f9a66;
  --blue: #3477bb;
  --purple: #8e68c4;
}

* {
  box-sizing: border-box;
}

.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

button {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  box-shadow: 0 0 0 5px #8b6726, 0 0 18px rgba(229, 185, 95, 0.65);
  outline: 3px solid #fff4a8 !important;
}

html {
  background: #07080b;
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(229, 185, 95, 0.08), transparent 26%),
    linear-gradient(180deg, #0d0f15 0%, #07080b 100%);
  background-color: #07080b;
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
  min-width: 320px;
  overflow: hidden;
}

.model-viewer-panel {
  display: grid;
  flex: 1;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.model-viewer-toolbar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.9fr) minmax(150px, 1.15fr) minmax(150px, 1.15fr) minmax(130px, 1fr) minmax(110px, 0.8fr) auto;
}

.model-viewer-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.model-viewer-toolbar span,
.model-viewer-meta span,
.model-viewer-meta strong {
  font-family: 'Press Start 2P', monospace;
}

.model-viewer-toolbar span {
  color: var(--muted);
  font-size: 7px;
}

.model-viewer-toolbar select,
.model-viewer-toolbar input,
.model-viewer-toolbar button {
  background: #0f1117;
  border: 2px solid #07080b;
  color: var(--ink);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  height: 36px;
  min-width: 0;
  outline: 2px solid #3f414c;
  padding: 0 9px;
}

.model-viewer-toolbar button.active,
.model-viewer-toolbar button[aria-pressed='true'] {
  color: var(--gold);
  outline-color: var(--gold);
}

.model-viewer-stage {
  background: #0d1218;
  border: 3px solid #090a0d;
  min-height: 280px;
  min-width: 0;
  outline: 2px solid #3f414c;
  overflow: hidden;
  touch-action: none;
}

.model-viewer-stage canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.model-viewer-meta {
  align-items: center;
  background: #101319;
  border: 2px solid #08090c;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(100px, 0.8fr) minmax(100px, 0.8fr) minmax(0, 1.6fr) minmax(80px, 0.7fr);
  outline: 2px solid #3f414c;
  padding: 10px;
}

.model-viewer-meta strong {
  color: var(--gold);
  font-size: 8px;
}

.model-viewer-meta span {
  color: var(--muted);
  font-size: 7px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .model-viewer-toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .model-viewer-toolbar button {
    width: 100%;
  }

  .model-viewer-stage {
    min-height: 210px;
  }
}

@media (max-width: 520px) {
  .model-viewer-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-viewer-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#root {
  background: transparent;
  height: 100dvh;
  overflow: hidden;
}
.game-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  overflow: hidden;
  padding: 12px 0;
  position: relative;
}

.header-xp {
  background: #090a0d;
  height: 5px;
  width: 100px;
}

.header-xp span,
.experience-bar span {
  background: var(--purple);
  box-shadow: inset 0 3px #b08bdf;
  display: block;
  height: 100%;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  color: var(--ink);
  font-family: 'Press Start 2P', monospace;
  line-height: 1.45;
}

h1 {
  font-size: clamp(18px, 3vw, 28px);
}

h2 {
  font-size: 14px;
}

.eyebrow {
  color: var(--gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.menu-screen,
.content-screen,
.message-panel {
  background: var(--panel);
  border: 3px solid #0c0d11;
  box-shadow: 7px 7px 0 #08090c;
  flex: 1;
  margin-top: 12px;
  min-height: 0;
  outline: 2px solid var(--edge);
  overflow: hidden;
  padding: 28px;
}

.content-screen {
  display: flex;
  flex-direction: column;
}

.dungeon-run-screen {
  gap: 14px;
  margin-top: 0;
}
.action-mode-shell {
  width: min(1180px, calc(100% - 28px));
}

.action-mode-screen {
  flex: 1;
  gap: 18px;
  margin-top: 0;
  min-height: 0;
}

.action-screen-heading {
  gap: 16px;
}

.action-heading-meta {
  align-items: center;
  display: flex;
  gap: 14px;
}

.action-screen-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.action-main-menu {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 190px;
}

.action-character-strip {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  text-align: right;
}

.action-character-strip strong,
.action-character-strip small {
  font-family: 'Press Start 2P', monospace;
}

.action-character-strip strong {
  color: var(--ink);
  font-size: 8px;
}

.action-character-strip small {
  color: var(--muted);
  font-size: 7px;
}

.action-mode-message {
  background: #111319;
  border: 2px solid #090a0d;
  color: var(--gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  outline: 2px solid #41404a;
  padding: 12px;
}

.action-run-shell {
  min-height: 100dvh;
  position: relative;
}

.auth-shell {
  align-items: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(229, 185, 95, 0.08), transparent 26%),
    linear-gradient(180deg, #0d0f15 0%, #07080b 100%);
  display: flex;
  min-height: 100dvh;
  overflow: hidden;
  padding: 24px;
}

.auth-panel {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  margin: 0 auto;
  max-width: 980px;
  width: 100%;
}

.auth-panel.single {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

.auth-brand,
.auth-card {
  background: var(--panel);
  border: 3px solid #0c0d11;
  box-shadow: 7px 7px 0 #08090c;
  min-width: 0;
  outline: 2px solid var(--edge);
  padding: 24px;
}

.auth-brand {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 360px;
}

.auth-brand h1 {
  font-size: clamp(20px, 3.4vw, 34px);
}

.auth-brand > p:last-child {
  color: var(--muted);
  font-size: 22px;
  line-height: 1.2;
}

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

.auth-tabs button {
  background: #17181e;
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  min-height: 42px;
  outline: 2px solid #3e3d47;
}

.auth-tabs button.selected {
  color: var(--gold);
  outline-color: var(--gold);
}

.auth-card form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-offline-button {
  margin-top: 10px;
  width: 100%;
}

.auth-card label {
  color: var(--muted);
  display: grid;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  gap: 8px;
  text-transform: uppercase;
}

.auth-card input {
  background: #111217;
  border: 2px solid #090a0d;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: 2px solid #3e3d47;
  padding: 10px;
  width: 100%;
}

.auth-card input:focus {
  outline-color: var(--gold);
}

.auth-message {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.2;
  margin-top: 16px;
  min-height: 38px;
}

.auth-message.error {
  color: #ff8190;
}

.action-run-reward-backdrop {
  align-items: center;
  background: rgba(5, 6, 9, 0.78);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 30;
}

.action-run-reward-modal {
  background: var(--panel);
  border: 3px solid #090a0d;
  box-shadow: 8px 8px 0 #050609;
  display: grid;
  gap: 16px;
  max-width: 560px;
  outline: 2px solid var(--gold);
  padding: 24px;
  width: min(560px, 100%);
}

.action-run-reward-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-run-reward-summary div,
.action-run-loot-list {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.action-run-reward-summary dt,
.action-run-reward-summary dd,
.action-run-loot-list strong,
.action-run-loot-list span,
.action-run-reward-actions button {
  font-family: 'Press Start 2P', monospace;
}

.action-run-reward-summary dt {
  color: var(--muted);
  font-size: 7px;
}

.action-run-reward-summary dd {
  color: var(--ink);
  font-size: 10px;
  margin: 0;
}

.action-run-loot-list strong {
  color: var(--gold);
  font-size: 8px;
}

.action-run-loot-list p {
  color: var(--muted);
  font-size: 20px;
  margin: 0;
}

.action-run-loot-list span {
  color: var(--ink);
  font-size: 7px;
  line-height: 1.4;
}

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

.action-mode-grid {
  display: grid;
  flex: 1;
  gap: 16px;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.8fr) minmax(220px, 0.8fr);
  min-height: 0;
}

.action-dungeon-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-dungeon-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: auto;
}

.action-dungeon-actions button {
  background: #242630;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  min-height: 42px;
  outline: 2px solid #4b4855;
}

.action-dungeon-actions button:disabled,
.action-dungeon-card.locked {
  opacity: 0.62;
}

.action-hub-nav {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  max-width: none;
  width: 100%;
}

.action-menu-account {
  align-items: stretch;
  display: grid;
  gap: 8px;
}

.action-menu-account .action-character-strip {
  align-items: stretch;
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 6px;
  justify-content: stretch;
  outline: 2px solid #34343d;
  padding: 10px;
  text-align: left;
}

.auth-mini-button {
  font-size: 7px;
  min-height: 34px;
  padding: 8px 10px;
  width: 100%;
}

.action-screen-actions .auth-mini-button {
  width: auto;
}

.action-hub-nav .menu-card:first-child {
  grid-column: auto;
}

.action-hub-nav span,
.action-hub-nav strong,
.action-gear-slot header,
.action-gear-row strong,
.action-gear-row small,
.action-gear-row button {
  font-family: 'Press Start 2P', monospace;
}

.action-hub-nav span {
  font-size: 19px;
}

.action-hub-nav strong {
  font-size: 11px;
  line-height: 1.25;
}

.action-dungeon-card,
.action-difficulty-card {
  background: #111319;
  border: 2px solid #090a0d;
  display: flex;
  flex-direction: column;
  gap: 16px;
  outline: 2px solid #41404a;
  padding: 18px;
}

.action-dungeon-card p:not(.eyebrow),
.action-difficulty-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.15;
  margin-top: 8px;
}

.action-dungeon-card dl {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: auto 0 0;
}

.action-dungeon-card dl div {
  background: #171922;
  border: 2px solid #090a0d;
  display: grid;
  gap: 7px;
  padding: 12px;
}

.action-dungeon-card dt,
.action-dungeon-card dd {
  font-family: 'Press Start 2P', monospace;
  margin: 0;
}

.action-dungeon-card dt {
  color: var(--muted);
  font-size: 6px;
}

.action-dungeon-card dd {
  color: var(--ink);
  font-size: 10px;
}

.action-difficulty-card .primary-button {
  margin-top: auto;
}

.action-difficulty-card.hard {
  outline-color: #6f4f25;
}

.action-dungeon-board {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 0.65fr) minmax(420px, 1.35fr);
  min-height: 0;
}

.action-dungeon-board .action-dungeon-list {
  align-content: start;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.action-dungeon-board .action-dungeon-card {
  align-items: center;
  background: #111319;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 76px;
  outline: 2px solid #41404a;
  padding: 10px;
  text-align: left;
}

.action-dungeon-board .action-dungeon-card.selected {
  outline-color: var(--gold);
}

.action-dungeon-board .action-dungeon-card.locked {
  cursor: not-allowed;
  opacity: 0.55;
}

.action-dungeon-glyph {
  align-items: center;
  background: #171922;
  border: 2px solid #090a0d;
  color: var(--gold);
  display: flex;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  height: 44px;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.action-dungeon-glyph img {
  display: block;
  height: 100%;
  image-rendering: auto;
  object-fit: cover;
  width: 100%;
}

.action-dungeon-glyph span {
  display: none;
}

.action-dungeon-board .action-dungeon-card > span:last-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.action-dungeon-board .action-dungeon-card small,
.action-dungeon-board .action-dungeon-card strong,
.action-dungeon-board .action-dungeon-card i,
.action-dungeon-selected dt,
.action-dungeon-selected dd,
.action-tier-grid button,
.action-dungeon-start button {
  font-family: 'Press Start 2P', monospace;
}

.action-dungeon-board .action-dungeon-card small {
  color: var(--gold);
  font-size: 6px;
}

.action-dungeon-board .action-dungeon-card strong {
  font-size: 8px;
  line-height: 1.25;
}

.action-dungeon-board .action-dungeon-card i {
  color: var(--muted);
  font-size: 6px;
  font-style: normal;
  line-height: 1.35;
}

.action-dungeon-setup {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

.action-dungeon-selected,
.action-dungeon-tier,
.action-dungeon-start {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 12px;
  outline: 2px solid #41404a;
  padding: 14px;
}

.action-dungeon-selected p:not(.eyebrow),
.action-dungeon-start p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.15;
  margin: 0;
}

.action-dungeon-selected dl {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.action-dungeon-selected dl div {
  background: #171922;
  border: 2px solid #090a0d;
  display: grid;
  gap: 6px;
  padding: 9px;
}

.action-dungeon-selected dt,
.action-dungeon-selected dd {
  margin: 0;
}

.action-dungeon-selected dt {
  color: var(--muted);
  font-size: 6px;
}

.action-dungeon-selected dd {
  color: var(--ink);
  font-size: 9px;
}

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

.action-tier-grid button {
  background: #171922;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 7px;
  outline: 2px solid #30313a;
  padding: 12px;
  text-align: left;
}

.action-tier-grid button.selected {
  outline-color: var(--gold);
}

.action-tier-grid button.coin-white.selected {
  outline-color: #f4eed8;
}

.action-tier-grid button.coin-green.selected {
  outline-color: #7dff9d;
}

.action-tier-grid button.coin-blue.selected {
  outline-color: #5d91ff;
}

.action-tier-grid button.coin-purple.selected {
  outline-color: #b884ff;
}

.action-tier-grid strong {
  font-size: 9px;
}

.action-tier-grid span {
  color: var(--muted);
  font-size: 7px;
}

.action-mechanics-admin {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 14px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  outline: 2px solid #41404a;
  padding: 16px;
}

.action-mechanics-admin > header,
.action-mechanic-heading,
.action-attack-editor header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.action-mechanics-admin > p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.15;
  margin: 0;
}

.action-mechanic-card {
  background: #171922;
  border: 2px solid #090a0d;
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 0;
  outline: 2px solid #30313a;
  padding: 12px;
}

.action-mechanic-heading span,
.action-disabled-attacks strong,
.action-disabled-attacks button,
.action-attack-editor button,
.action-attack-editor strong,
.action-attack-editor small,
.action-attack-fields label {
  font-family: 'Press Start 2P', monospace;
}

.action-mechanic-heading h3 {
  color: var(--ink);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  line-height: 1.35;
  margin: 0;
}

.action-mechanic-heading span {
  color: var(--gold);
  font-size: 7px;
}

.action-attack-list {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.action-page-controls {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-attack-list .action-page-controls {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.action-page-controls button,
.action-page-controls span {
  font-family: 'Press Start 2P', monospace;
}

.action-page-controls button {
  background: #242630;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-size: 6px;
  min-height: 32px;
  outline: 2px solid #4b4855;
}

.action-page-controls button:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.55;
}

.action-page-controls span {
  color: var(--gold);
  font-size: 7px;
  text-align: center;
  white-space: nowrap;
}

.action-empty-note {
  color: var(--muted);
  font-size: 18px;
}

.action-attack-editor {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.action-attack-editor strong {
  color: var(--ink);
  display: block;
  font-size: 8px;
  line-height: 1.35;
}

.action-attack-editor small {
  color: var(--muted);
  display: block;
  font-size: 6px;
  margin-top: 5px;
}

.action-attack-editor button,
.action-disabled-attacks button {
  background: #242630;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-size: 6px;
  padding: 8px;
}

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

.action-attack-fields label {
  color: var(--muted);
  display: grid;
  font-size: 6px;
  gap: 5px;
  line-height: 1.35;
}

.action-attack-fields input {
  background: #050609;
  border: 2px solid #30313a;
  color: var(--ink);
  font: inherit;
  min-width: 0;
  padding: 7px;
}

.action-ai-avoidance-fields {
  border-top: 2px solid #30313a;
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 8px;
}

.action-ai-avoidance-fields .action-toggle-field {
  align-items: center;
  color: var(--gold);
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
}

.action-ai-avoidance-fields .action-toggle-field input {
  height: 18px;
  width: 18px;
}

.action-disabled-attacks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-disabled-attacks strong {
  align-self: center;
  color: var(--gold);
  font-size: 7px;
}

.action-placeholder-panel,
.action-gear-panel {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 16px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  outline: 2px solid #41404a;
  padding: 18px;
}

.action-placeholder-panel p:not(.eyebrow),
.action-gear-panel p:not(.eyebrow) {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.15;
  margin: 0;
}

.arena-panel {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  outline: 2px solid #41404a;
  padding: 14px;
  position: relative;
}

.arena-header,
.arena-status-strip,
.arena-team-card header,
.arena-draft-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.arena-scoreboard {
  align-items: center;
  background: #171922;
  border: 2px solid #090a0d;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  min-width: min(420px, 100%);
  outline: 1px solid #30313a;
  padding: 9px 12px;
  text-align: center;
}

.arena-scoreboard span,
.arena-scoreboard strong,
.arena-status-strip h3,
.arena-team-card h3,
.arena-team-card header span,
.arena-draft h3,
.arena-draft-heading > span,
.arena-upgrade-list button,
.arena-loadout span,
.arena-unit {
  font-family: 'Press Start 2P', monospace;
}

.arena-scoreboard span {
  color: var(--muted);
  font-size: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-scoreboard strong {
  color: var(--gold);
  font-size: 13px;
}

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

.arena-fight,
.arena-draft {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.arena-fight {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.arena-draft {
  grid-template-rows: minmax(0, 1fr) auto;
}

.arena-status-strip,
.arena-draft > section,
.arena-loadout {
  background: #171922;
  border: 2px solid #090a0d;
  outline: 1px solid #30313a;
  padding: 10px;
}

.arena-status-strip h3,
.arena-team-card h3,
.arena-draft h3 {
  font-size: 9px;
  line-height: 1.25;
  margin: 0;
}

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

.arena-teams {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
}

.arena-team-card {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 9px;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  outline: 1px solid #41404a;
  padding: 10px;
}

.arena-team-card.player {
  outline-color: #38698a;
}

.arena-team-card.opponent {
  outline-color: #7a3f4a;
}

.arena-team-card header span {
  color: var(--gold);
  font-size: 8px;
}

.arena-energy {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.arena-energy i,
.arena-unit i {
  background: #090a0d;
  display: block;
  overflow: hidden;
  position: relative;
}

.arena-energy i {
  height: 10px;
}

.arena-energy b {
  background: #5ec7ff;
  display: block;
  height: 100%;
}

.arena-energy span {
  color: var(--muted);
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
}

.arena-unit-list,
.arena-upgrade-list,
.arena-loadout > div:last-child {
  display: grid;
  gap: 7px;
  min-height: 0;
  overflow: auto;
}

.arena-unit {
  background: #171922;
  border: 1px solid #090a0d;
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 48px;
  padding: 6px;
}

.arena-unit.dead {
  opacity: 0.48;
}

.arena-unit strong {
  font-size: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-unit small,
.arena-unit em {
  color: var(--muted);
  font-size: 5px;
  font-style: normal;
}

.arena-unit i,
.arena-unit em {
  grid-column: 1 / -1;
}

.arena-unit i {
  height: 8px;
}

.arena-hp,
.arena-shield {
  display: block;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
}

.arena-hp {
  background: #76d39a;
}

.arena-shield {
  background: #5ec7ff;
}

.arena-draft > section {
  display: grid;
  gap: 9px;
  min-height: 0;
}

.arena-draft-heading > span {
  color: var(--gold);
  font-size: 8px;
}

.arena-upgrade-list button {
  background: #111319;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 5px;
  outline: 1px solid #30313a;
  padding: 8px;
  text-align: left;
}

.arena-upgrade-list button:hover:not(:disabled) {
  outline-color: var(--gold);
}

.arena-upgrade-list button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.arena-upgrade-list button.owned {
  outline-color: #5ec7ff;
}

.arena-upgrade-list span,
.arena-upgrade-list small,
.arena-upgrade-list em,
.arena-loadout span {
  color: var(--muted);
  font-size: 5px;
  font-style: normal;
  line-height: 1.35;
}

.arena-upgrade-list strong {
  font-size: 7px;
  line-height: 1.25;
}

.arena-upgrade-list em {
  color: var(--gold);
}

.arena-loadout {
  display: grid;
  gap: 8px;
}

.arena-loadout span {
  display: block;
}

.pvp-roguelike-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.pvp-roguelike-menu {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(210px, 0.55fr) minmax(0, 1fr);
  min-height: 0;
}

.pvp-compact-header,
.pvp-row-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.pvp-compact-header {
  justify-content: center;
  min-height: 34px;
}

.pvp-compact-header .arena-scoreboard {
  margin-inline: auto;
}

.pvp-mode-panel,
.pvp-queue-panel,
.pvp-loadout-panel,
.pvp-roguelike-shop,
.pvp-roguelike-result {
  background: #171922;
  border: 2px solid #090a0d;
  outline: 1px solid #30313a;
  padding: 12px;
}

.pvp-roguelike-panel {
  position: relative;
}

.pvp-mode-panel,
.pvp-queue-panel,
.pvp-loadout-panel,
.pvp-roguelike-shop {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.pvp-mode-panel h3,
.pvp-queue-panel h3,
.pvp-shop-header h3,
.pvp-shop-category-header h3,
.pvp-active-buffs h3,
.pvp-roguelike-result h3,
.pvp-mode-panel dt,
.pvp-mode-panel dd,
.pvp-mode-buttons button,
.pvp-shop-summary span,
.pvp-shop-summary strong,
.pvp-shop-tabs button,
.pvp-shop-spell-grid button,
.pvp-shop-general,
.pvp-shop-category-header > span,
.pvp-active-buffs span,
.pvp-shop-empty strong,
.pvp-shop-empty span,
.pvp-result-emblem {
  font-family: 'Press Start 2P', monospace;
}

.pvp-mode-panel h3,
.pvp-queue-panel h3,
.pvp-shop-header h3,
.pvp-shop-category-header h3,
.pvp-active-buffs h3,
.pvp-roguelike-result h3 {
  font-size: 9px;
  line-height: 1.3;
  margin: 0;
}

.pvp-mode-buttons {
  display: grid;
  gap: 7px;
}

.pvp-mode-buttons button,
.pvp-shop-tabs button {
  background: #111319;
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  outline: 1px solid #30313a;
  padding: 8px;
  text-align: left;
}

.pvp-shop-spell-grid button,
.pvp-shop-general {
  background: #111319;
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  outline: 1px solid #30313a;
}

.pvp-mode-buttons button.active,
.pvp-shop-tabs button.active,
.pvp-shop-spell-grid button.active,
.pvp-shop-general.active {
  color: var(--gold);
  outline-color: var(--gold);
}

.pvp-mode-buttons button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pvp-mode-panel dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.pvp-mode-panel dl > div {
  background: #111319;
  border: 1px solid #090a0d;
  display: grid;
  gap: 4px;
  padding: 7px;
}

.pvp-mode-panel dt,
.pvp-mode-panel dd,
.pvp-mode-buttons button,
.pvp-shop-tabs button,
.pvp-shop-spell-grid button,
.pvp-shop-general,
.pvp-active-buffs span {
  font-size: 6px;
  line-height: 1.35;
}

.pvp-mode-panel dt {
  color: var(--muted);
}

.pvp-mode-panel dd {
  color: var(--ink);
  margin: 0;
}

.pvp-queue-panel {
  align-content: start;
  grid-template-columns: 84px minmax(0, 1fr);
}

.pvp-queue-glyph {
  align-items: center;
  background: #111319;
  border: 2px solid #090a0d;
  color: var(--gold);
  display: flex;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  justify-content: center;
  min-height: 84px;
  outline: 1px solid #41404a;
}

.pvp-queue-panel p:not(.eyebrow),
.pvp-roguelike-result p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.pvp-queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.pvp-loadout-panel {
  grid-column: 1 / -1;
}

.pvp-shop-header,
.pvp-shop-category-header,
.pvp-roguelike-result {
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.pvp-shop-category-header,
.pvp-roguelike-result {
  display: flex;
}

.pvp-roguelike-shop {
  background: #11141b;
  grid-template-rows: auto minmax(0, 1fr);
  outline-color: #4a5163;
}

.pvp-shop-header {
  border-bottom: 1px solid #30313a;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  padding-bottom: 10px;
}

.pvp-shop-header .arena-actions {
  justify-self: end;
}

.pvp-shop-points {
  align-items: center;
  background: linear-gradient(180deg, #2d4058, #172437);
  border: 2px solid #f6d36b;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(246, 211, 107, 0.34),
    inset 0 0 14px rgba(94, 199, 255, 0.18);
  color: #ffffff;
  display: grid;
  gap: 5px;
  justify-items: center;
  min-width: 154px;
  padding: 9px 14px;
}

.pvp-shop-points span,
.pvp-shop-points strong {
  color: #ffffff;
  font-family: 'Press Start 2P', monospace;
  text-shadow: 1px 1px 0 #000;
}

.pvp-shop-points span {
  font-size: 6px;
}

.pvp-shop-points strong {
  font-size: 14px;
}

.pvp-shop-header span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 5px;
}

.pvp-shop-header .pvp-shop-points span,
.pvp-shop-header .pvp-shop-points strong {
  color: #ffffff;
  margin: 0;
}

.pvp-shop-header .pvp-shop-points span {
  font-size: 6px;
}

.pvp-shop-header .pvp-shop-points strong {
  font-size: 14px;
}

.pvp-shop-summary {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr);
}

.pvp-shop-summary > div {
  background: #0d0f15;
  border: 1px solid #30313a;
  display: grid;
  gap: 4px;
  min-height: 42px;
  padding: 7px 8px;
}

.pvp-shop-summary span {
  color: var(--muted);
  font-size: 5px;
}

.pvp-shop-summary strong {
  color: var(--gold);
  font-size: 9px;
}

.pvp-shop-layout {
  display: grid;
  gap: 10px;
  grid-template-areas: "spells main active";
  grid-template-columns: 276px minmax(0, 1fr) 180px;
  min-height: 0;
}

.pvp-shop-spells {
  display: grid;
  gap: 8px;
  grid-area: spells;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.pvp-shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-area: tabs;
}

.pvp-shop-main,
.pvp-active-buffs {
  display: grid;
  gap: 9px;
  min-height: 0;
}

.pvp-shop-main {
  grid-area: main;
  grid-template-rows: auto minmax(0, 1fr);
}

.pvp-shop-spell-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  min-height: 0;
}

.pvp-shop-spell-grid button {
  display: grid;
  gap: 4px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 6px;
  text-align: left;
}

.pvp-shop-spell-grid span {
  color: var(--gold);
  font-size: 7px;
}

.pvp-shop-spell-grid strong {
  color: var(--ink);
  font-size: 5px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.pvp-shop-general {
  min-height: 34px;
  padding: 8px;
  text-align: center;
}

.pvp-shop-tabs button {
  background: #0d0f15;
  min-height: 34px;
  min-width: 86px;
  padding: 8px 10px;
  text-align: center;
}

.pvp-shop-category-header > span {
  color: var(--gold);
  font-size: 6px;
}

.pvp-shop-grid {
  align-content: start;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  overflow: auto;
  padding-right: 2px;
}

.pvp-shop-grid button {
  background: #171b24;
  border-color: #08090c;
  min-height: 104px;
  outline-color: #3a4050;
  padding: 10px;
}

.pvp-shop-grid button:hover:not(:disabled) {
  background: #1d2230;
}

.pvp-shop-grid button.owned {
  background: #10202b;
  outline-color: #5ec7ff;
}

.pvp-shop-grid strong {
  color: var(--ink);
  font-size: 8px;
}

.pvp-shop-grid small {
  color: #a8afc2;
  font-size: 6px;
}

.pvp-shop-grid em {
  align-self: end;
  justify-self: start;
}

.pvp-shop-empty {
  align-content: center;
  background: #171b24;
  border: 2px solid #08090c;
  display: grid;
  gap: 8px;
  min-height: 112px;
  outline: 1px solid #3a4050;
  padding: 14px;
}

.pvp-shop-empty strong {
  color: var(--ink);
  font-size: 8px;
}

.pvp-shop-empty span {
  color: var(--muted);
  font-size: 6px;
  line-height: 1.4;
}

.pvp-active-buffs {
  background: #0d0f15;
  border-left: 1px solid #30313a;
  grid-area: active;
  grid-template-rows: auto minmax(0, 1fr);
  padding-left: 12px;
}

.pvp-active-buffs > div:last-child {
  align-content: start;
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow: auto;
}

.pvp-active-buffs span {
  background: #171b24;
  border: 1px solid #30313a;
  color: var(--ink);
  padding: 7px;
}

.pvp-roguelike-result {
  justify-content: start;
}

.pvp-result-emblem {
  align-items: center;
  background: #111319;
  border: 2px solid #090a0d;
  color: var(--gold);
  display: flex;
  font-size: 10px;
  height: 64px;
  justify-content: center;
  outline: 1px solid #41404a;
  width: 64px;
}

.arena-battle-shell {
  background: #08090c;
  height: 100dvh;
  inset: 0;
  max-width: none;
  padding: 10px;
  position: fixed;
  width: 100%;
  z-index: 60;
}

.arena-battle-shell .boss-slice-stage {
  box-shadow: none;
  gap: 10px;
  padding: 12px;
}

.arena-battle-layout {
  grid-template-columns: 156px minmax(0, 1fr) minmax(220px, 260px);
}

.arena-battle-shell .boss-hud {
  margin-left: 10px;
}

.arena-battle-score {
  align-items: center;
  background: #171922;
  border: 2px solid #090a0d;
  display: flex;
  gap: 10px;
  justify-content: center;
  outline: 1px solid #41404a;
  padding: 8px 12px;
}

.arena-battle-score span,
.arena-battle-score strong {
  font-family: 'Press Start 2P', monospace;
}

.arena-battle-score span {
  color: var(--muted);
  font-size: 7px;
}

.arena-battle-score strong {
  color: var(--gold);
  font-size: 10px;
}

.arena-opponent-frames {
  display: grid;
  gap: 7px;
  min-height: 0;
  overflow: auto;
}

.arena-opponent-frames .party-frame:disabled {
  cursor: default;
  opacity: 1;
}

.arena-boss-window-party {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr);
  left: 8px;
  max-width: 156px;
  position: absolute;
  top: 8px;
  width: min(156px, 32%);
  z-index: 5;
}

.arena-boss-window-party .party-frame {
  background: rgba(17, 19, 25, 0.9);
  min-height: 46px;
  padding: 5px 6px;
}

.arena-queue-message {
  color: var(--gold);
  font-size: 14px;
  line-height: 1.2;
  margin: 0;
}

.action-gear-summary {
  align-items: start;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.action-talent-summary {
  align-items: center;
  gap: 10px;
}

.action-talent-summary .claudecraft-character-meta {
  display: grid;
  grid-template-columns: max-content max-content 1fr max-content;
  justify-content: stretch;
  width: 100%;
}

.action-talent-summary .talent-available-pill {
  color: #fff7dc;
  justify-self: center;
  text-align: center;
}

.action-talent-summary .action-talent-actions {
  justify-content: flex-end;
  margin: 0;
}

.action-customize-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(270px, 0.9fr) minmax(340px, 1.1fr);
  min-height: 0;
}

.action-slot-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
}

.action-slot-grid button,
.action-inventory-list button,
.action-gear-detail,
.action-inventory-panel {
  background: #171922;
  border: 2px solid #090a0d;
  color: var(--ink);
  outline: 2px solid #30313a;
}

.action-slot-grid button {
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-height: 64px;
  padding: 10px;
  text-align: left;
}

.action-slot-grid button.selected,
.action-slot-grid button:hover,
.action-inventory-list button.selected,
.action-inventory-list button:hover {
  outline-color: var(--gold);
}

.action-slot-grid span {
  color: var(--gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
}

.action-slot-grid strong,
.action-slot-grid small,
.action-inventory-panel > header span,
.action-inventory-list strong,
.action-inventory-list small,
.action-gear-detail header span,
.action-stat-compare dt,
.action-stat-compare dd,
.action-gear-detail button {
  font-family: 'Press Start 2P', monospace;
}

.action-slot-grid strong,
.action-inventory-list strong {
  font-size: 7px;
  line-height: 1.35;
}

.action-slot-grid small,
.action-inventory-list small {
  color: var(--muted);
  font-size: 6px;
}

.action-inventory-panel {
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(92px, 0.75fr) auto;
  min-height: 0;
  padding: 14px;
}

.action-inventory-panel > header,
.action-gear-detail header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.action-inventory-panel > header input {
  background: #090a0d;
  border: 2px solid #05070b;
  color: var(--ink);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  min-height: 32px;
  outline: 1px solid #30313a;
  padding: 8px;
  width: min(160px, 36vw);
}

.action-inventory-panel > header span,
.action-gear-detail header span {
  color: var(--gold);
  font-size: 7px;
}

.action-inventory-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.action-inventory-list > p {
  color: var(--muted);
  font-size: 20px;
  margin: 0;
}

.action-inventory-list button {
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px;
  text-align: left;
}

.action-gear-detail {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.action-gear-detail.empty {
  align-content: center;
}

.action-stat-compare {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.action-stat-compare div {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 6px;
  padding: 8px;
}

.action-stat-compare dt {
  color: var(--muted);
  font-size: 6px;
}

.action-stat-compare dd {
  color: var(--ink);
  font-size: 7px;
  margin: 0;
}

.action-gear-detail button {
  background: #242630;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-size: 6px;
  min-height: 38px;
  outline: 2px solid #4b4855;
}

.action-gear-detail button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.65;
}

.claudecraft-menu {
  min-height: 0;
}

.claudecraft-character-meta {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.claudecraft-character-meta span {
  background: #171922;
  border: 2px solid #090a0d;
  color: var(--gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  outline: 1px solid #30313a;
  padding: 8px;
  text-transform: capitalize;
}

.claudecraft-character-layout,
.claudecraft-bag-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(270px, 0.9fr) minmax(360px, 1.1fr);
  min-height: 0;
}

.claudecraft-bag-layout {
  grid-template-columns: minmax(0, 1fr);
}

.claudecraft-paperdoll {
  align-content: start;
}

.claudecraft-character-sheet {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.claudecraft-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.claudecraft-bag-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  position: relative;
}

.claudecraft-bag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.claudecraft-bag-filters button {
  background: #242630;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  min-height: 32px;
  outline: 1px solid #4b4855;
  padding: 8px;
}

.claudecraft-bag-filters button[aria-pressed='true'],
.claudecraft-bag-filters button:hover {
  color: var(--gold);
  outline-color: var(--gold);
}

.claudecraft-bag-list button {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.claudecraft-item-tooltip {
  bottom: 18px;
  left: auto;
  max-width: calc(100% - 28px);
  right: 14px;
  transform: none;
  width: min(430px, calc(100vw - 40px));
}

.claudecraft-item-tooltip .item-tooltip-icon {
  align-items: center;
  background: #171922;
  border: 2px solid #05070b;
  color: var(--gold);
  display: flex;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  height: 42px;
  justify-content: center;
  outline: 1px solid #464550;
  width: 42px;
}

.claudecraft-item-tooltip.quality-poor strong {
  color: #9a9a9a;
}

.claudecraft-item-tooltip.quality-uncommon strong {
  color: #4dff72;
}

.claudecraft-item-tooltip.quality-rare strong {
  color: #5b9dff;
}

.claudecraft-item-tooltip.quality-epic strong {
  color: #b46cff;
}

.claudecraft-item-tooltip.quality-legendary strong {
  color: #ff9f38;
}

.claudecraft-item-tooltip .item-tooltip-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 8px;
}

.claudecraft-item-tooltip .item-tooltip-stats dd {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.claudecraft-item-tooltip .item-tooltip-stats em {
  margin: 0;
}

.claudecraft-item-tooltip .item-tooltip-stats .better em {
  color: #65f58d;
}

.claudecraft-item-tooltip .item-tooltip-stats .worse em {
  color: #ff6f6f;
}

.claudecraft-item-tooltip .item-tooltip-stats .same em {
  color: var(--muted);
}

.claudecraft-menu-backdrop {
  z-index: 30;
}

.claudecraft-menu-overlay {
  background: rgba(12, 14, 20, 0.98);
  border: 2px solid #05070b;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  color: var(--ink);
  display: grid;
  gap: 12px;
  max-height: calc(100% - 36px);
  max-width: min(980px, calc(100% - 36px));
  min-height: 0;
  outline: 1px solid rgba(230, 218, 150, 0.5);
  overflow: auto;
  padding: 14px;
  width: 100%;
}

.claudecraft-menu-overlay > header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.claudecraft-menu-overlay h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  margin: 0;
}

.claudecraft-menu-overlay .action-gear-panel {
  border-width: 1px;
  outline-width: 1px;
  padding: 12px;
}

.character-creation-screen {
  gap: 14px;
}

.character-creator-panel,
.character-roster-panel {
  background: #111319;
  border: 2px solid #090a0d;
  display: grid;
  gap: 16px;
  min-height: 0;
  outline: 2px solid #41404a;
  padding: 18px;
}

.character-creator-panel {
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
}

.character-creator-preview {
  align-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(230, 218, 150, 0.18), rgba(9, 10, 13, 0.2) 42%, rgba(9, 10, 13, 0.92));
  border: 2px solid #090a0d;
  display: grid;
  gap: 16px;
  justify-items: center;
  min-height: 0;
  outline: 2px solid #30313a;
  padding: 18px;
  text-align: center;
}

.character-roster-avatar {
  align-items: center;
  background: linear-gradient(180deg, #2a2d39, #12141c);
  border: 3px solid #090a0d;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
  outline: 2px solid #4b4855;
}

.character-roster-avatar span,
.character-class-grid span,
.character-skin-grid span {
  font-family: 'Press Start 2P', monospace;
}

.character-creator-preview h2,
.character-creator-group h3,
.character-roster-panel h2 {
  font-family: 'Press Start 2P', monospace;
  margin: 0;
}

.character-creator-preview h2,
.character-roster-panel h2 {
  font-size: 16px;
}

.character-creator-preview span,
.character-creator-form label span,
.character-creator-error,
.character-class-grid strong,
.character-class-grid small,
.character-roster-list strong,
.character-roster-list small {
  font-family: 'Press Start 2P', monospace;
}

.character-creator-preview > div:last-child > span {
  color: var(--gold);
  display: block;
  font-size: 8px;
  margin-top: 8px;
}

.character-model-preview {
  background: #090a0d;
  border: 2px solid #05070b;
  height: min(44vh, 340px);
  min-height: 220px;
  outline: 2px solid #30313a;
  overflow: hidden;
  touch-action: none;
  width: 100%;
}

.character-model-preview canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.character-creator-form {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.character-creator-form label,
.character-creator-group {
  display: grid;
  gap: 9px;
}

.character-creator-form label span {
  color: var(--gold);
  font-size: 8px;
}

.character-creator-form input {
  background: #090a0d;
  border: 2px solid #05070b;
  color: var(--ink);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  min-height: 42px;
  outline: 1px solid #30313a;
  padding: 10px;
}

.character-creator-error {
  color: #ff8b98;
  font-size: 7px;
  margin: 0;
}

.character-class-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.character-class-grid button,
.character-skin-grid button,
.character-roster-list button {
  background: #171922;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  outline: 2px solid #30313a;
}

.character-class-grid button {
  display: grid;
  gap: 7px;
  min-height: 92px;
  padding: 10px;
  text-align: left;
}

.character-class-grid button[aria-pressed='true'],
.character-class-grid button:hover,
.character-skin-grid button[aria-pressed='true'],
.character-skin-grid button:hover,
.character-roster-list button[aria-pressed='true'],
.character-roster-list button:hover {
  outline-color: var(--gold);
}

.character-class-grid span {
  color: var(--gold);
  font-size: 14px;
}

.character-class-grid strong {
  font-size: 8px;
}

.character-class-grid small {
  color: var(--muted);
  font-size: 6px;
  line-height: 1.45;
}

.character-skin-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.character-skin-grid button {
  min-height: 42px;
  padding: 8px;
}

.character-skin-grid span {
  color: #f6f2de;
  font-size: 7px;
  text-shadow: 0 2px 0 #05070b;
}

.character-creator-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.character-roster-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.character-roster-panel > header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.character-roster-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  min-height: 0;
  overflow: auto;
}

.character-roster-list button {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 86px;
  padding: 10px;
  text-align: left;
}

.character-roster-avatar {
  border-radius: 50%;
  height: 54px;
  width: 54px;
}

.character-roster-avatar span {
  color: #f6f2de;
  font-size: 16px;
}

.character-roster-list strong,
.character-roster-list small {
  display: block;
  line-height: 1.45;
}

.character-roster-list strong {
  font-size: 8px;
}

.character-roster-list small {
  color: var(--muted);
  font-size: 6px;
}

.class-priest {
  background: linear-gradient(180deg, #f0e9d6, #7a6f8f 58%, #211d2d);
}

.class-paladin {
  background: linear-gradient(180deg, #fff0a3, #b4893f 58%, #2c2110);
}

.class-shaman {
  background: linear-gradient(180deg, #b7d5ff, #4d6f9f 58%, #14263b);
}

.class-druid {
  background: linear-gradient(180deg, #a7f0b2, #4f8b5a 58%, #152816);
}

.skin-1 {
  filter: hue-rotate(24deg) saturate(1.05);
}

.skin-2 {
  filter: hue-rotate(74deg) saturate(1.15);
}

.skin-3 {
  filter: hue-rotate(142deg) saturate(1.25);
}

.menu-card {
  align-items: center;
  background: var(--panel-light);
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 16px;
  min-height: 105px;
  outline: 2px solid #42414c;
  padding: 16px;
  text-align: left;
}

.menu-card:first-child {
  grid-column: 1 / -1;
}

.mode-select-grid > .mode-select-card:first-child {
  grid-column: auto;
}

.menu-card:hover {
  outline-color: var(--gold);
  transform: translateY(-2px);
}

.cloud-sync-card {
  cursor: default;
  justify-content: space-between;
}

.cloud-sync-card:hover {
  outline-color: #42414c;
  transform: none;
}

.cloud-sync-card > div {
  display: grid;
  flex: 1;
  gap: 6px;
}

.cloud-sync-card .text-button:disabled {
  opacity: 0.7;
}

.cloud-sync-message {
  color: var(--gold);
}

.menu-card > span,
.class-portrait {
  align-items: center;
  background: #13141a;
  border: 2px solid var(--gold);
  color: var(--gold);
  display: flex;
  flex: 0 0 58px;
  font-family: 'Press Start 2P', monospace;
  font-size: 19px;
  height: 58px;
  justify-content: center;
}

.menu-card strong,
.menu-card small {
  display: block;
}

.menu-card strong {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  margin-bottom: 9px;
}

.menu-card small {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.05;
}

.screen-heading {
  align-items: center;
  border-bottom: 2px solid #34343d;
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
}

.back-button,
.text-button,
.secondary-button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  outline: 2px solid #464550;
  padding: 9px 13px;
}

.back-button:hover,
.text-button:hover,
.secondary-button:hover:not(:disabled) {
  color: var(--ink);
  outline-color: var(--gold);
}

.back-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.boss-slice-shell {
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  padding: 12px;
  width: min(1360px, 100%);
}

.boss-slice-stage {
  background: var(--panel);
  border: 3px solid #0c0d11;
  box-shadow: 7px 7px 0 #08090c;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  outline: 2px solid var(--edge);
  overflow: hidden;
  padding: 18px;
}

.boss-slice-heading {
  align-items: center;
  border-bottom: 2px solid #34343d;
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  padding-bottom: 14px;
}

.boss-slice-layout {
  display: grid;
  flex: 1;
  column-gap: 0;
  grid-template-columns: 184px minmax(0, 1fr) minmax(260px, 320px);
  min-height: 0;
  row-gap: 16px;
}

.boss-playfield-panel {
  align-items: center;
  background: #08090c;
  border: 2px solid #090a0d;
  display: flex;
  justify-content: center;
  min-height: 0;
  outline: 2px solid #41404a;
  overflow: hidden;
  position: relative;
}

.boss-playfield-frame {
  aspect-ratio: 16 / 9;
  max-height: 100%;
  max-width: 100%;
  position: relative;
  width: 100%;
}

.boss-window-bossbar {
  left: 50%;
  position: absolute;
  top: 12px;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 40px));
  z-index: 3;
}

.boss-render-switch {
  display: flex;
  gap: 4px;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 4;
}

.boss-render-switch button {
  background: rgba(8, 9, 12, 0.84);
  border: 2px solid #090a0d;
  color: var(--muted);
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  min-width: 42px;
  outline: 1px solid #41404a;
  padding: 7px 8px;
}

.boss-render-switch button[aria-pressed='true'] {
  color: var(--gold);
  outline-color: var(--gold);
}

.boss-window-bossbar strong,
.boss-window-bossbar span {
  color: var(--ink);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
}

.boss-window-bossbar strong {
  display: block;
  text-align: center;
}

.boss-window-bossbar span {
  color: var(--muted);
  display: block;
  margin-top: 4px;
  text-align: center;
}

.boss-window-bossbar i {
  background: #090a0d;
  border: 2px solid #090a0d;
  display: block;
  height: 16px;
  margin-top: 5px;
}

.boss-window-bossbar b {
  background: var(--red-bright);
  box-shadow: inset 0 4px #ff8b98;
  display: block;
  height: 100%;
  transition: width 120ms linear;
}

.boss-party-frames {
  background: rgba(17, 19, 25, 0.94);
  border: 2px solid #090a0d;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  outline: 1px solid #41404a;
  overflow: auto;
  padding: 6px;
  width: 184px;
}

.boss-party-heading {
  border-bottom: 2px solid #34343d;
  display: grid;
  gap: 3px;
  padding-bottom: 9px;
}

.boss-party-heading span {
  color: var(--muted);
  font-size: 16px;
}

.party-frame {
  background: #171922;
  border: 1px solid #090a0d;
  box-sizing: border-box;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 5px;
  min-height: 58px;
  outline: 1px solid #30313a;
  padding: 8px 4px;
  text-align: left;
}

.party-frame:hover,
.party-frame.selected {
  outline-color: var(--gold);
}

.party-frame.dead {
  opacity: 0.55;
}

.party-frame strong,
.party-frame small,
.party-frame em,
.party-damage-meter,
.role-chip {
  display: block;
  font-family: 'Press Start 2P', monospace;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-frame strong {
  display: block;
  font-size: 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-frame small,
.party-frame em,
.party-damage-meter {
  color: var(--muted);
  display: block;
  font-size: 6px;
  font-style: normal;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.party-damage-meter {
  background: rgba(255, 216, 107, 0.14);
  border: 1px solid rgba(255, 216, 107, 0.48);
  color: #ffdf7e;
  padding: 2px 3px;
}

.party-frame em {
  color: #7fd89d;
}

.party-frame-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-height: 11px;
  overflow: hidden;
}

.party-frame-effects em {
  background: rgba(67, 171, 107, 0.18);
  border: 1px solid rgba(127, 216, 157, 0.55);
  color: #9ff2b9;
  display: inline-block;
  line-height: 1;
  padding: 2px 3px;
  width: auto;
}

.party-frame-effects em.rejuvenation {
  background: rgba(68, 176, 112, 0.2);
  border-color: rgba(125, 232, 159, 0.62);
  color: #a6ffbd;
}

.party-frame-effects em.regrowth {
  background: rgba(71, 143, 104, 0.25);
  border-color: rgba(143, 220, 184, 0.62);
  color: #b5f4dc;
}

.party-frame em.danger {
  color: #ff9a55;
}

.party-frame em.bleed {
  color: #ff6b84;
}

.party-frame i {
  background: #090a0d;
  display: block;
  height: 9px;
  overflow: hidden;
  position: relative;
}

.party-health-fill,
.party-shield-fill,
.party-mana-fill {
  display: block;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  transition: width 120ms linear;
}

.party-health-fill {
  background: #76d39a;
}

.party-shield-fill {
  background: #5ec7ff;
  box-shadow: inset 0 3px #a7e4ff;
}

.party-frame .party-mana-track {
  height: 7px;
}

.party-mana-fill {
  background: #247dff;
  box-shadow: inset 0 3px #80c8ff;
}

.role-chip {
  color: var(--gold);
  font-size: 6px;
  text-transform: uppercase;
}

.role-chip.healer {
  color: #5ec7ff;
}

.role-chip.tank {
  color: var(--gold);
}

.role-chip.melee {
  color: var(--red-bright);
}

.role-chip.ranged {
  color: var(--purple);
}

.boss-canvas-wrap {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.boss-canvas-wrap canvas {
  display: block;
}

.boss-render-loading {
  align-items: center;
  color: var(--gold);
  display: flex;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.three-action-root {
  height: 100%;
  overflow: hidden;
  position: relative;
  touch-action: none;
  width: 100%;
}

.three-action-canvas {
  height: 100%;
  width: 100%;
}

.three-action-canvas canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.three-action-overlay {
  bottom: 10px;
  display: grid;
  gap: 7px;
  left: 10px;
  pointer-events: none;
  position: absolute;
  width: min(330px, calc(100% - 154px));
  z-index: 3;
}

.three-action-hint {
  background: rgba(8, 9, 12, 0.72);
  color: var(--muted);
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  line-height: 1.55;
  padding: 7px 8px;
}

.boss-hud {
  background: #111319;
  border: 2px solid #090a0d;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  margin-left: 16px;
  outline: 2px solid #41404a;
  overflow: auto;
  padding: 16px;
}

.boss-hud-status p:not(.eyebrow) {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.15;
  margin-top: 8px;
}

.boss-meter {
  display: grid;
  gap: 8px;
}

.boss-meter > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.boss-meter strong,
.boss-meter span,
.boss-stat-grid dt,
.boss-stat-grid dd,
.boss-controls strong {
  font-family: 'Press Start 2P', monospace;
}

.boss-meter strong,
.boss-meter span,
.boss-stat-grid dt {
  font-size: 7px;
}

.boss-meter span,
.boss-stat-grid dt {
  color: var(--muted);
}

.boss-meter i {
  background: #090a0d;
  border: 2px solid #090a0d;
  display: block;
  height: 18px;
}

.boss-meter b {
  display: block;
  height: 100%;
  transition: width 120ms linear;
}

.boss-meter.player b {
  background: #5ec7ff;
  box-shadow: inset 0 4px #a7e4ff;
}

.boss-meter.mana b {
  background: #247dff;
  box-shadow: inset 0 4px #80c8ff;
}

.boss-meter.boss b {
  background: var(--red-bright);
  box-shadow: inset 0 4px #ff8b98;
}

.boss-enemy-list {
  display: grid;
  gap: 8px;
}

.boss-enemy-row {
  background: #171922;
  border: 2px solid #090a0d;
  display: grid;
  gap: 6px;
  padding: 8px;
}

.boss-enemy-row > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.boss-enemy-row strong,
.boss-enemy-row span {
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
}

.boss-enemy-row span {
  color: var(--muted);
}

.boss-enemy-row i {
  background: #090a0d;
  display: block;
  height: 8px;
}

.boss-enemy-row b {
  background: var(--red-bright);
  display: block;
  height: 100%;
  transition: width 120ms linear;
}

.boss-enemy-row.bullfango b {
  background: #f08a4b;
}

.boss-spellbar {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.boss-spellbar button {
  background: #15161c;
  border: 2px solid #090a0d;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 4px;
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  min-height: 52px;
  outline: 2px solid #464550;
  overflow: hidden;
  padding: 6px 4px;
  position: relative;
}

.boss-spellbar button:hover {
  outline-color: var(--gold);
}

.boss-spellbar button.cooling {
  color: var(--muted);
}

.boss-spellbar button.oom {
  color: #7d8291;
  cursor: not-allowed;
  outline-color: #282a33;
}

.boss-spellbar button > strong,
.boss-spellbar button > span,
.boss-spellbar button > em {
  position: relative;
  z-index: 1;
}

.boss-spellbar button > span {
  line-height: 1.25;
}

.boss-spellbar button > i {
  background: rgba(8, 9, 12, 0.72);
  bottom: 0;
  display: block;
  left: 0;
  position: absolute;
  width: 100%;
}

.boss-spellbar button > em {
  color: var(--gold);
  font-style: normal;
}

.boss-castbar {
  display: grid;
  gap: 7px;
}

.boss-field-castbar {
  background: rgba(8, 9, 12, 0.78);
  outline: 2px solid #41404a;
  padding: 8px;
  left: 50%;
  position: absolute;
  top: 75%;
  transform: translate(-50%, -50%);
  width: min(360px, 42%);
  z-index: 3;
}

.boss-castbar > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.boss-castbar strong,
.boss-castbar span {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
}

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

.boss-castbar i {
  background: #090a0d;
  border: 2px solid #090a0d;
  display: block;
  height: 14px;
}

.boss-castbar b {
  background: var(--gold);
  display: block;
  height: 100%;
}

.boss-stat-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.boss-stat-grid div {
  background: #171922;
  border: 2px solid #090a0d;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
}

.boss-stat-grid dd {
  color: var(--ink);
  font-size: 8px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.boss-controls {
  border-top: 2px solid #34343d;
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.boss-controls strong {
  color: var(--gold);
  font-size: 8px;
}

.boss-controls span {
  color: var(--muted);
  font-size: 18px;
}

@media (max-width: 920px), (max-height: 620px) {
  .boss-slice-shell {
    padding: 8px;
  }

  .boss-slice-stage {
    gap: 10px;
    padding: 12px;
  }

  .boss-slice-layout {
    gap: 10px;
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .boss-party-frames {
    padding: 5px;
    width: 150px;
  }

  .boss-window-bossbar {
    width: min(300px, calc(100% - 24px));
  }

  .three-action-hint {
    display: none;
  }

  .boss-hud {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(170px, 1fr) minmax(260px, 1.2fr) minmax(150px, 0.7fr);
    margin-left: 0;
    max-height: 178px;
    overflow: hidden;
  }

  .boss-stat-grid,
  .boss-controls {
    display: none;
  }

  .boss-hud-status p:not(.eyebrow) {
    font-size: 17px;
  }
}

@media (max-width: 980px), (max-height: 560px) {
  h1 {
    font-size: 16px;
  }

  h2 {
    font-size: 11px;
  }

  .eyebrow {
    font-size: 6px;
    margin-bottom: 5px;
  }

  .game-shell,
  .action-mode-shell {
    padding: 6px;
    width: 100%;
  }

  .auth-shell {
    padding: 10px;
  }

  .auth-panel {
    gap: 10px;
    grid-template-columns: minmax(0, 0.95fr) minmax(260px, 1.05fr);
    max-width: none;
  }

  .auth-brand,
  .auth-card {
    box-shadow: none;
    padding: 14px;
  }

  .auth-brand {
    gap: 10px;
    min-height: 0;
  }

  .auth-brand h1 {
    font-size: 18px;
  }

  .auth-brand > p:last-child,
  .auth-message {
    font-size: 14px;
  }

  .auth-card form {
    gap: 10px;
    margin-top: 12px;
  }

  .auth-offline-button {
    margin-top: 8px;
  }

  .auth-tabs button {
    font-size: 6px;
    min-height: 34px;
  }

  .auth-card label {
    font-size: 6px;
    gap: 6px;
  }

  .auth-card input {
    font-size: 12px;
    padding: 7px;
  }

  .auth-message {
    margin-top: 10px;
    min-height: 30px;
  }

  .content-screen,
  .message-panel {
    box-shadow: none;
    margin-top: 0;
    padding: 12px;
  }

  .action-mode-screen {
    gap: 10px;
  }

  .screen-heading,
  .boss-slice-heading {
    gap: 10px;
    padding-bottom: 8px;
  }

  .action-heading-meta {
    gap: 8px;
  }

  .action-character-strip {
    gap: 6px;
  }

  .action-character-strip strong,
  .action-character-strip small {
    font-size: 6px;
  }

  .header-xp {
    width: 62px;
  }

  .back-button,
  .text-button,
  .secondary-button {
    font-size: 7px;
    padding: 7px 9px;
  }

  .action-hub-nav {
    gap: 9px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }

  .menu-card {
    gap: 10px;
    min-height: 72px;
    padding: 10px;
  }

  .menu-card > span,
  .class-portrait {
    flex-basis: 38px;
    font-size: 14px;
    height: 38px;
  }

  .menu-card strong,
  .action-hub-nav strong {
    font-size: 7px;
    margin-bottom: 5px;
  }

  .menu-card small {
    font-size: 14px;
    line-height: 1;
  }

  .action-dungeon-board {
    gap: 10px;
    grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
  }

  .action-dungeon-board .action-dungeon-list,
  .action-dungeon-setup {
    gap: 7px;
  }

  .action-dungeon-board .action-dungeon-card {
    gap: 8px;
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 58px;
    padding: 7px;
  }

  .action-dungeon-glyph {
    height: 36px;
  }

  .action-dungeon-board .action-dungeon-card strong,
  .action-tier-grid strong {
    font-size: 7px;
  }

  .action-dungeon-board .action-dungeon-card small,
  .action-dungeon-board .action-dungeon-card i,
  .action-tier-grid span,
  .action-dungeon-selected dt,
  .action-dungeon-card dt {
    font-size: 5px;
  }

  .action-dungeon-selected,
  .action-dungeon-tier,
  .action-dungeon-start,
  .action-gear-panel,
  .arena-panel,
  .action-mechanics-admin,
  .action-placeholder-panel {
    gap: 8px;
    padding: 10px;
  }

  .arena-layout {
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.45fr);
  }

  .arena-header,
  .arena-status-strip,
  .arena-team-card header,
  .arena-draft-heading {
    gap: 7px;
  }

  .arena-scoreboard {
    min-width: 300px;
    padding: 7px;
  }

  .arena-scoreboard strong {
    font-size: 10px;
  }

  .arena-scoreboard span,
  .arena-status-strip h3,
  .arena-team-card h3,
  .arena-draft h3,
  .arena-draft-heading > span {
    font-size: 6px;
  }

  .arena-status-strip,
  .arena-draft > section,
  .arena-loadout,
  .arena-team-card {
    padding: 7px;
  }

  .arena-teams {
    gap: 7px;
  }

  .arena-unit-list,
  .arena-upgrade-list,
  .arena-loadout > div:last-child {
    gap: 5px;
  }

  .arena-unit {
    min-height: 42px;
    padding: 5px;
  }

  .arena-unit strong,
  .arena-upgrade-list strong {
    font-size: 6px;
  }

  .arena-unit small,
  .arena-unit em,
  .arena-energy span,
  .arena-upgrade-list span,
  .arena-upgrade-list small,
  .arena-upgrade-list em,
  .arena-loadout span {
    font-size: 5px;
  }

  .action-dungeon-selected p:not(.eyebrow),
  .action-dungeon-start p,
  .action-gear-panel p:not(.eyebrow),
  .action-placeholder-panel p:not(.eyebrow),
  .action-mechanics-admin > p,
  .action-empty-note {
    font-size: 14px;
    line-height: 1.05;
  }

  .tag-row {
    gap: 5px;
    margin-top: 6px;
  }

  .tag-row span {
    font-size: 11px;
    padding: 2px 5px;
  }

  .action-dungeon-selected dl {
    gap: 6px;
  }

  .action-dungeon-selected dl div,
  .action-tier-grid button {
    gap: 5px;
    padding: 7px;
  }

  .action-dungeon-selected dd {
    font-size: 7px;
  }

  .action-dungeon-actions {
    gap: 8px;
  }

  .action-dungeon-actions button,
  .primary-button {
    font-size: 6px;
    min-height: 34px;
    padding: 9px 10px;
  }

  .action-customize-layout,
  .claudecraft-character-layout {
    gap: 10px;
    grid-template-columns: minmax(190px, 0.75fr) minmax(0, 1.25fr);
  }

  .claudecraft-bag-layout {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
  }

  .claudecraft-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-creator-panel {
    gap: 10px;
    grid-template-columns: minmax(180px, 0.58fr) minmax(0, 1.42fr);
    padding: 10px;
  }

  .character-creator-preview {
    padding: 10px;
  }

  .character-model-preview {
    min-height: 180px;
  }

  .character-class-grid,
  .character-skin-grid {
    gap: 7px;
  }

  .character-class-grid button {
    min-height: 68px;
    padding: 7px;
  }

  .character-roster-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .action-slot-grid button {
    gap: 4px;
    min-height: 50px;
    padding: 7px;
  }

  .action-slot-grid span {
    font-size: 8px;
  }

  .action-slot-grid strong,
  .action-inventory-list strong {
    font-size: 6px;
  }

  .action-slot-grid small,
  .action-inventory-list small,
  .action-inventory-panel > header span,
  .action-gear-detail header span,
  .action-stat-compare dt,
  .action-stat-compare dd {
    font-size: 5px;
  }

  .action-inventory-panel {
    gap: 8px;
    grid-template-rows: auto minmax(58px, 0.6fr) auto;
    padding: 9px;
  }

  .action-inventory-list {
    gap: 6px;
  }

  .action-inventory-list button {
    min-height: 34px;
    padding: 7px;
  }

  .action-gear-detail {
    gap: 8px;
    padding: 8px;
  }

  .action-stat-compare {
    gap: 6px;
  }

  .action-stat-compare div {
    gap: 4px;
    padding: 6px;
  }

  .action-mechanic-card {
    gap: 8px;
    padding: 9px;
  }

  .action-mechanic-heading h3 {
    font-size: 8px;
  }

  .action-mechanic-heading span,
  .action-page-controls span,
  .action-disabled-attacks strong {
    font-size: 6px;
  }

  .action-page-controls button,
  .action-attack-editor button,
  .action-disabled-attacks button {
    font-size: 5px;
    min-height: 28px;
    padding: 6px;
  }

  .action-attack-editor {
    gap: 8px;
    padding: 8px;
  }

  .action-attack-editor strong {
    font-size: 7px;
  }

  .action-attack-editor small,
  .action-attack-fields label {
    font-size: 5px;
  }

  .action-attack-fields {
    gap: 6px;
  }

  .action-attack-fields input {
    padding: 5px;
  }

  .action-disabled-attacks {
    gap: 6px;
  }

  .boss-slice-shell {
    padding: 6px;
  }

  .boss-slice-stage {
    box-shadow: none;
    gap: 8px;
    padding: 8px;
  }

  .boss-slice-layout {
    gap: 8px;
    grid-template-columns: 132px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 130px;
  }

  .boss-party-frames {
    gap: 4px;
    overflow: hidden;
    padding: 4px;
    width: 132px;
  }

  .party-frame {
    gap: 3px;
    min-height: 44px;
    padding: 5px 4px;
  }

  .party-frame strong {
    font-size: 6px;
  }

  .party-frame small,
  .party-frame em,
  .role-chip {
    font-size: 5px;
  }

  .party-frame i {
    height: 7px;
  }

  .boss-hud {
    gap: 8px;
    grid-template-columns: minmax(110px, 0.8fr) minmax(96px, 0.7fr) minmax(130px, 1fr) minmax(190px, 1.25fr);
    max-height: none;
    overflow: hidden;
    padding: 8px;
  }

  .boss-hud-status p:not(.eyebrow) {
    font-size: 13px;
  }

  .boss-meter {
    gap: 6px;
  }

  .boss-meter strong,
  .boss-meter span,
  .boss-stat-grid dt {
    font-size: 5px;
  }

  .boss-enemy-list {
    gap: 5px;
  }

  .boss-enemy-row {
    gap: 4px;
    padding: 5px;
  }

  .boss-enemy-row strong,
  .boss-enemy-row span {
    font-size: 5px;
  }

  .boss-spellbar {
    gap: 5px;
  }

  .boss-spellbar button {
    font-size: 5px;
    min-height: 42px;
    padding: 4px 2px;
  }

  .boss-controls span {
    font-size: 13px;
  }

  .boss-window-bossbar {
    top: 8px;
    width: min(260px, calc(100% - 20px));
  }

  .boss-render-switch {
    right: 7px;
    top: 7px;
  }

  .boss-render-switch button {
    font-size: 5px;
    min-height: 34px;
    min-width: 48px;
    padding: 5px;
  }

  .three-action-overlay {
    bottom: 7px;
    left: 7px;
    width: min(180px, calc(100% - 118px));
  }

  .boss-window-bossbar strong,
  .boss-window-bossbar span,
  .boss-castbar strong,
  .boss-castbar span {
    font-size: 6px;
  }
}

@media (max-width: 680px) {
  h1 {
    font-size: 13px;
  }

  .content-screen,
  .message-panel {
    border-width: 2px;
    padding: 8px;
  }

  .auth-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-brand {
    display: none;
  }

  .screen-heading {
    align-items: start;
  }

  .action-heading-meta {
    align-items: flex-end;
    flex-direction: column;
  }

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

  .menu-card {
    min-height: 64px;
    padding: 8px;
  }

  .menu-card small {
    font-size: 12px;
  }

  .action-dungeon-board {
    grid-template-columns: minmax(148px, 0.48fr) minmax(0, 1.52fr);
  }

  .action-dungeon-board .action-dungeon-card {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 52px;
    padding: 6px;
  }

  .action-dungeon-glyph {
    height: 30px;
  }

  .action-tier-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .action-tier-grid button {
    padding: 6px 4px;
  }

  .action-tier-grid strong,
  .action-tier-grid span {
    font-size: 5px;
  }

  .action-dungeon-selected dl,
  .tag-row,
  .action-dungeon-start p,
  .arena-loadout,
  .action-gear-summary p:not(.eyebrow) {
    display: none;
  }

  .arena-header {
    align-items: start;
  }

  .arena-scoreboard {
    min-width: 220px;
  }

  .arena-layout {
    grid-template-columns: minmax(0, 1fr) minmax(168px, 0.42fr);
  }

  .arena-teams {
    grid-template-columns: minmax(0, 1fr);
    min-height: 250px;
    overflow: auto;
  }

  .arena-team-card {
    min-height: 176px;
  }

  .arena-upgrade-list button {
    padding: 6px;
  }

  .action-customize-layout,
  .claudecraft-character-layout {
    grid-template-columns: minmax(150px, 0.55fr) minmax(0, 1.45fr);
  }

  .claudecraft-bag-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .character-creator-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .character-model-preview {
    height: 180px;
    min-height: 180px;
  }

  .character-class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-roster-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .action-slot-grid {
    gap: 6px;
  }

  .action-slot-grid button {
    min-height: 44px;
    padding: 6px;
  }

  .action-inventory-panel > header {
    align-items: start;
  }

  .action-mechanics-admin > header {
    align-items: start;
  }

  .action-attack-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .boss-slice-layout {
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 124px;
  }

  .boss-party-frames {
    width: 104px;
  }

  .party-frame {
    min-height: 41px;
  }

  .boss-hud {
    grid-template-columns: minmax(88px, 0.75fr) minmax(76px, 0.65fr) minmax(106px, 0.95fr) minmax(180px, 1.4fr);
  }

  .boss-hud-status h2 {
    font-size: 9px;
  }

  .boss-hud-status p:not(.eyebrow),
  .boss-controls span {
    font-size: 12px;
  }
}

/* PVP 3D HUD: ClaudeCraft-style low chrome overlay */
.arena-battle-shell {
  padding: 0;
}

.arena-battle-shell .boss-slice-stage {
  background: #08090c;
  border: 0;
  box-shadow: none;
  gap: 0;
  outline: 0;
  padding: 0;
}

.arena-battle-shell .arena-battle-layout {
  display: block;
  height: 100%;
}

.arena-battle-shell .boss-playfield-panel {
  border: 0;
  height: 100%;
  outline: 0;
}

.arena-battle-shell .boss-playfield-frame {
  aspect-ratio: auto;
  height: 100%;
  max-height: none;
  max-width: none;
}

.arena-battle-shell .three-action-overlay {
  bottom: 18px;
  left: 18px;
  width: min(310px, calc(50% - 36px));
}

.arena-battle-shell .arena-boss-window-party,
.dungeon-combat-shell .arena-boss-window-party {
  gap: 5px;
  left: 14px;
  max-width: none;
  top: 14px;
  width: 154px;
}

.arena-battle-shell .arena-boss-window-party .party-frame,
.dungeon-combat-shell .arena-boss-window-party .party-frame {
  background: rgba(10, 12, 18, 0.78);
  border-color: rgba(0, 0, 0, 0.8);
  grid-template-rows: auto auto auto auto 8px auto;
  height: 96px;
  min-height: 96px;
  outline-color: rgba(94, 199, 255, 0.45);
  overflow: hidden;
  padding: 5px;
  width: 154px;
}

.arena-battle-shell .arena-boss-window-party .party-frame.compact,
.dungeon-combat-shell .arena-boss-window-party .party-frame.compact {
  height: 96px;
  min-height: 96px;
  width: 154px;
}

.arena-battle-shell .arena-boss-window-party .party-frame > em,
.dungeon-combat-shell .arena-boss-window-party .party-frame > em {
  display: none;
}

.arena-battle-shell .arena-boss-window-party .party-frame .party-frame-effects em,
.dungeon-combat-shell .arena-boss-window-party .party-frame .party-frame-effects em {
  display: inline-block;
  font-size: 5px;
}

.arena-battle-shell .arena-boss-window-party .party-frame.selected,
.dungeon-combat-shell .arena-boss-window-party .party-frame.selected {
  background: rgba(40, 34, 15, 0.92);
  border-color: #ffd86b;
  box-shadow: 0 0 0 2px rgba(255, 216, 107, 0.55), 0 0 18px rgba(255, 216, 107, 0.32);
  outline-color: #fff0a3;
}

.arena-battle-shell .arena-boss-window-party .party-frame.selected strong,
.dungeon-combat-shell .arena-boss-window-party .party-frame.selected strong {
  color: #fff0a3;
}

.arena-target-chip {
  background: rgba(10, 12, 18, 0.86);
  border: 2px solid #05070b;
  color: var(--ink);
  display: grid;
  gap: 6px;
  left: 50%;
  min-width: min(330px, calc(100% - 36px));
  outline: 1px solid rgba(230, 218, 150, 0.42);
  padding: 8px 10px;
  pointer-events: auto;
  position: absolute;
  top: 14px;
  transform: translateX(-50%);
  z-index: 6;
}

.arena-target-chip > div {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.arena-target-chip span,
.arena-target-chip strong,
.arena-target-chip small,
.arena-target-chip button {
  font-family: 'Press Start 2P', monospace;
}

.arena-target-chip span,
.arena-target-chip small {
  color: var(--muted);
  font-size: 7px;
}

.arena-target-chip strong {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-target-chip i {
  background: #05070b;
  display: block;
  height: 8px;
  overflow: hidden;
}

.arena-target-chip b {
  background: #e84c61;
  box-shadow: inset 0 3px #ff8b98;
  display: block;
  height: 100%;
  transition: width 120ms linear;
}

.combat-target-frame.ally-target b {
  background: #4ade80;
  box-shadow: inset 0 3px #bbf7d0;
}

.arena-target-chip button {
  background: #15161c;
  border: 1px solid #05070b;
  color: var(--gold);
  cursor: pointer;
  font-size: 7px;
  padding: 6px 8px;
}

.arena-pause-backdrop {
  align-items: center;
  background: rgba(3, 5, 8, 0.68);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: absolute;
  z-index: 20;
}

.arena-pause-menu {
  background: rgba(12, 14, 20, 0.96);
  border: 2px solid #05070b;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  color: var(--ink);
  display: grid;
  gap: 14px;
  max-width: min(380px, calc(100% - 36px));
  outline: 1px solid rgba(230, 218, 150, 0.5);
  padding: 16px;
  width: 100%;
}

.arena-pause-menu h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  margin: 0;
}

.arena-pause-options {
  display: grid;
  gap: 8px;
}

.arena-pause-options label {
  align-items: center;
  background: rgba(5, 7, 11, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  min-height: 34px;
  padding: 8px;
}

.arena-pause-options span,
.arena-pause-options strong,
.arena-pause-actions button {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
}

.arena-pause-options strong {
  color: var(--gold);
}

.arena-sound-toggle {
  align-items: center;
  background: rgba(12, 14, 20, 0.95);
  border: 1px solid rgba(230, 218, 150, 0.55);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  min-height: 24px;
  min-width: 68px;
  padding: 4px 8px;
  justify-content: center;
}

.arena-sound-toggle.enabled {
  background: rgba(42, 82, 55, 0.95);
  border-color: rgba(112, 214, 145, 0.7);
}

.arena-pause-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.claudecraft-actionbar {
  align-items: end;
  bottom: 16px;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(9, 48px);
  justify-content: center;
  left: 50%;
  pointer-events: auto;
  position: absolute;
  transform: translateX(-50%);
  z-index: 7;
}

.claudecraft-action-slot {
  aspect-ratio: 1;
  background: #090a0d;
  border: 2px solid #05070b;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 2px 0 rgba(0, 0, 0, 0.55);
  cursor: pointer;
  display: block;
  outline: 1px solid #464550;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.claudecraft-action-slot:hover:not(:disabled),
.claudecraft-action-slot:focus-visible {
  outline-color: var(--gold);
}

.claudecraft-action-slot:disabled {
  cursor: not-allowed;
}

.claudecraft-action-slot .icon-label {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: block;
  height: 100%;
  image-rendering: auto;
  width: 100%;
}

.claudecraft-action-slot.oom .icon-label,
.claudecraft-action-slot.no-target .icon-label {
  filter: grayscale(0.8) brightness(0.55);
}

.claudecraft-action-slot .keybind {
  background: rgba(0, 0, 0, 0.82);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #f6f2de;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  left: 0;
  line-height: 1;
  padding: 3px 4px;
  position: absolute;
  top: 0;
  z-index: 2;
}

.claudecraft-action-slot .cd-overlay {
  background: rgba(0, 0, 0, 0.68);
  bottom: 0;
  display: block;
  left: 0;
  position: absolute;
  width: 100%;
  z-index: 1;
}

.claudecraft-action-slot .cdtext {
  color: #fff4ba;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  left: 50%;
  position: absolute;
  text-shadow: 1px 1px 0 #000;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.claudecraft-action-tooltip {
  background: rgba(10, 12, 18, 0.96);
  border: 2px solid #05070b;
  bottom: 58px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  color: var(--ink);
  left: 50%;
  outline: 1px solid rgba(255, 216, 107, 0.48);
  padding: 10px;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 24px));
  z-index: 9;
}

.claudecraft-action-tooltip .tooltip-heading {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding-bottom: 8px;
}

.claudecraft-action-tooltip img {
  border: 2px solid #05070b;
  display: block;
  height: 42px;
  outline: 1px solid #464550;
  width: 42px;
}

.claudecraft-action-tooltip strong,
.claudecraft-action-tooltip span,
.claudecraft-action-tooltip dt,
.claudecraft-action-tooltip dd,
.claudecraft-action-tooltip p,
.claudecraft-action-tooltip em {
  font-family: 'Press Start 2P', monospace;
}

.claudecraft-action-tooltip strong {
  display: block;
  font-size: 10px;
  line-height: 1.35;
}

.claudecraft-action-tooltip span,
.claudecraft-action-tooltip dt,
.claudecraft-action-tooltip dd,
.claudecraft-action-tooltip p,
.claudecraft-action-tooltip em {
  font-size: 7px;
  line-height: 1.55;
}

.claudecraft-action-tooltip span,
.claudecraft-action-tooltip dt,
.claudecraft-action-tooltip em {
  color: var(--gold);
}

.claudecraft-action-tooltip dl {
  display: grid;
  gap: 5px;
  margin: 9px 0 0;
}

.claudecraft-action-tooltip dl > div {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.claudecraft-action-tooltip dd {
  color: var(--ink);
  margin: 0;
  text-align: right;
}

.claudecraft-action-tooltip p {
  color: #d7d9e4;
  margin: 9px 0 0;
}

.claudecraft-action-tooltip em {
  display: block;
  font-style: normal;
  margin-top: 7px;
}

/* Dungeon 3D HUD: same low-chrome combat-window treatment as PVP */
.dungeon-combat-shell {
  padding: 0;
}

.dungeon-combat-shell .boss-slice-stage {
  background: #08090c;
  border: 0;
  box-shadow: none;
  gap: 0;
  outline: 0;
  padding: 0;
}

.dungeon-combat-shell .dungeon-combat-layout {
  display: block;
  height: 100%;
}

.dungeon-combat-shell .boss-playfield-panel {
  border: 0;
  height: 100%;
  outline: 0;
}

.dungeon-combat-shell .boss-playfield-frame {
  aspect-ratio: auto;
  height: 100%;
  max-height: none;
  max-width: none;
}

.dungeon-combat-shell .boss-render-switch {
  right: 14px;
  top: 14px;
  z-index: 8;
}

.dungeon-encounter-frame {
  left: 50%;
  min-width: min(420px, calc(100% - 360px));
  top: 14px;
  transform: translateX(-50%);
  z-index: 6;
}

.dungeon-target-chip {
  bottom: auto;
  left: auto;
  min-width: 0;
  right: 14px;
  top: 122px;
  transform: none;
  width: min(300px, 28%);
}

.dungeon-target-chip b {
  background: #4ade80;
  box-shadow: inset 0 3px #bbf7d0;
}

.dungeon-actionbar {
  grid-template-columns: repeat(5, 48px);
}

.arena-battle-shell .boss-field-castbar {
  bottom: 136px;
  left: 50%;
  top: auto;
  transform: translateX(-50%);
  width: min(360px, calc(100% - 36px));
  z-index: 6;
}

@media (max-width: 760px), (max-height: 560px) {
  .arena-battle-shell .arena-boss-window-party,
  .dungeon-combat-shell .arena-boss-window-party {
    left: 8px;
    max-width: none;
    top: 8px;
    width: 128px;
  }

  .arena-battle-shell .arena-boss-window-party .party-frame,
  .dungeon-combat-shell .arena-boss-window-party .party-frame {
    height: 84px;
    min-height: 84px;
    padding: 4px;
    width: 128px;
  }

  .arena-battle-shell .arena-boss-window-party .party-frame.compact,
  .dungeon-combat-shell .arena-boss-window-party .party-frame.compact {
    width: 128px;
  }

  .claudecraft-actionbar {
    bottom: 10px;
    gap: 4px;
    grid-template-columns: repeat(9, 40px);
  }

  .arena-target-chip {
    min-width: min(300px, calc(100% - 24px));
    padding: 7px 8px;
    top: 8px;
  }

  .arena-target-chip strong {
    font-size: 8px;
  }

  .arena-battle-shell .three-action-overlay {
    bottom: 12px;
    left: 10px;
    width: min(160px, 30%);
  }
}

.tag-row {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.tag-row span {
  background: #15161c;
  color: var(--gold);
  font-size: 15px;
  padding: 3px 7px;
}

.part-buttons {
  display: flex;
  gap: 8px;
}

.part-buttons .primary-button {
  white-space: nowrap;
}

.part-buttons .primary-button.selected-part {
  outline-color: #fff;
  background: #f0cb79;
}

.part-buttons .primary-button.locked {
  filter: grayscale(0.65);
  opacity: 0.62;
  cursor: not-allowed;
}

.primary-button {
  background: var(--gold);
  border: 2px solid #08090c;
  color: #19150e;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  outline: 2px solid #816630;
  padding: 13px 17px;
}

.primary-button:hover:not(:disabled) {
  background: #f0cb79;
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.arena-battle-shell .arena-battle-layout {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  grid-template-rows: minmax(0, 1fr);
}

.arena-battle-shell .boss-hud {
  display: flex;
  flex-direction: column;
  grid-column: auto;
  margin-left: 10px;
  max-height: none;
}

@media (max-width: 980px), (max-height: 560px) {
  .pvp-roguelike-menu {
    gap: 8px;
    grid-template-columns: minmax(190px, 0.48fr) minmax(0, 1fr);
  }

  .pvp-mode-panel,
  .pvp-queue-panel,
  .pvp-loadout-panel,
  .pvp-roguelike-shop,
  .pvp-roguelike-result {
    gap: 7px;
    padding: 8px;
  }

  .pvp-mode-panel h3,
  .pvp-queue-panel h3,
  .pvp-shop-header h3,
  .pvp-shop-category-header h3,
  .pvp-active-buffs h3,
  .pvp-roguelike-result h3 {
    font-size: 7px;
  }

  .pvp-queue-panel {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .pvp-queue-glyph {
    font-size: 7px;
    min-height: 58px;
  }

  .pvp-queue-panel p:not(.eyebrow),
  .pvp-shop-header span,
  .pvp-roguelike-result p {
    font-size: 10px;
  }

  .pvp-mode-buttons button,
  .pvp-shop-tabs button,
  .pvp-shop-spell-grid button,
  .pvp-shop-general,
  .pvp-mode-panel dl > div,
  .pvp-active-buffs,
  .pvp-shop-summary > div {
    padding: 6px;
  }

  .pvp-shop-layout {
    gap: 7px;
    grid-template-columns: 240px minmax(0, 1fr) 140px;
  }

  .pvp-shop-grid {
    gap: 5px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .pvp-shop-spell-grid {
    gap: 5px;
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }

  .pvp-shop-summary {
    gap: 6px;
  }

  .pvp-shop-summary strong {
    font-size: 7px;
  }

  .pvp-shop-tabs,
  .pvp-shop-spell-grid,
  .pvp-active-buffs > div:last-child {
    gap: 5px;
  }

  .pvp-result-emblem {
    font-size: 7px;
    height: 48px;
    width: 48px;
  }

  .arena-battle-shell {
    padding: 6px;
  }

  .arena-battle-shell .boss-slice-stage {
    gap: 6px;
    padding: 8px;
  }

  .arena-battle-shell .arena-battle-layout {
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 164px;
    grid-template-rows: minmax(0, 1fr);
  }

  .arena-battle-shell .boss-hud {
    gap: 7px;
    margin-left: 0;
    overflow: auto;
    padding: 7px;
  }

  .arena-battle-shell .party-frame {
    height: 84px;
    min-height: 84px;
    padding: 5px 4px;
  }

  .arena-boss-window-party {
    gap: 4px;
    left: 6px;
    max-width: none;
    top: 6px;
    width: 132px;
  }

  .arena-boss-window-party .party-frame {
    height: 84px;
    min-height: 84px;
    padding: 4px 3px;
    width: 132px;
  }

  .arena-battle-shell .arena-boss-window-party .party-frame.compact,
  .dungeon-combat-shell .arena-boss-window-party .party-frame.compact {
    width: 132px;
  }

  .arena-battle-shell .boss-spellbar button {
    min-height: 38px;
  }

.arena-battle-shell .boss-hud-status p:not(.eyebrow) {
  font-size: 12px;
}
}

.action-talents-menu {
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.action-talent-actions {
  justify-content: flex-end;
}

.claudecraft-talent-tabs {
  display: flex;
  gap: 6px;
  margin: 0;
}

.claudecraft-talent-tabs button {
  align-items: center;
  background: #1c1609;
  border: 1px solid #463a1c;
  border-radius: 4px;
  color: #a89f87;
  cursor: pointer;
  display: flex;
  flex: 1;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  gap: 7px;
  justify-content: center;
  min-height: 34px;
  padding: 6px 8px;
  position: relative;
  text-align: center;
}

.claudecraft-talent-tabs button.active {
  background: #3a2d10;
  border-color: #ffd100;
  box-shadow: inset 0 0 0 1px rgba(255, 209, 0, 0.34), 0 0 8px rgba(184, 144, 42, 0.34);
  color: #fff7dc;
}

.claudecraft-talent-tabs button.active::after {
  background: #ffd100;
  border-radius: 2px;
  bottom: -1px;
  content: "";
  height: 2px;
  left: 10px;
  position: absolute;
  right: 10px;
}

.claudecraft-talent-tabs b {
  align-items: center;
  background: #0f0b06;
  border: 1px solid #5f4b1a;
  border-radius: 9px;
  color: #f4df9f;
  display: inline-flex;
  font-size: 7px;
  height: 18px;
  justify-content: center;
  min-width: 20px;
  padding: 0 5px;
}

.claudecraft-talent-specs {
  display: flex;
  gap: 8px;
  min-height: 0;
}

.claudecraft-talent-specs button {
  background: #1a1409;
  border: 1px solid #463a1c;
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  flex: 1;
  gap: 3px;
  justify-items: center;
  min-width: 0;
  padding: 8px 6px;
  position: relative;
  text-align: center;
}

.claudecraft-talent-specs button.selected {
  background: #2c2410;
  border-color: #ffd100;
  box-shadow: inset 0 0 0 1px rgba(255, 209, 0, 0.34), 0 0 10px rgba(184, 144, 42, 0.4);
}

.claudecraft-talent-specs button.selected::after {
  align-items: center;
  background: #ffd100;
  border: 1px solid #332403;
  border-radius: 50%;
  color: #120d04;
  content: "✓";
  display: flex;
  font-size: 10px;
  height: 17px;
  justify-content: center;
  position: absolute;
  right: 6px;
  top: 6px;
  width: 17px;
}

.claudecraft-talent-specs button span {
  align-items: center;
  background: #15110a;
  border: 1px solid #5a4a22;
  border-radius: 6px;
  color: #fff;
  display: flex;
  font-size: 24px;
  height: 42px;
  justify-content: center;
  text-shadow: 0 1px 2px #000;
  width: 42px;
}

.claudecraft-talent-specs button.selected span {
  border-color: #ffd100;
  box-shadow: 0 0 8px rgba(255, 209, 0, 0.4);
}

.claudecraft-talent-specs button strong,
.claudecraft-talent-specs button small {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.35;
  min-width: 0;
}

.claudecraft-talent-specs button strong {
  font-size: 8px;
}

.claudecraft-talent-specs button small {
  color: var(--gold);
  font-size: 6px;
  text-transform: uppercase;
}

.claudecraft-talent-mastery {
  background: #14100a;
  border: 1px solid #463a1c;
  border-radius: 4px;
  color: #c8b888;
  display: grid;
  gap: 4px;
  padding: 6px 8px;
}

.claudecraft-talent-mastery strong,
.claudecraft-talent-mastery span {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.45;
}

.claudecraft-talent-mastery strong {
  color: var(--gold);
  font-size: 8px;
}

.claudecraft-talent-mastery span {
  font-size: 7px;
}

.claudecraft-talent-body {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  min-height: 0;
}

.claudecraft-talent-tree-scroll {
  background: #100c07;
  border: 1px solid #463a1c;
  border-radius: 6px;
  min-height: 330px;
  min-width: 0;
  overflow: auto;
  padding: 10px 8px;
}

.claudecraft-talent-tree {
  margin: 0 auto;
  position: relative;
}

.claudecraft-talent-arrows {
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  z-index: 0;
}

.claudecraft-talent-node {
  align-items: center;
  background: #15110a;
  border: 2px solid #5a4a22;
  box-sizing: border-box;
  color: #e8dcb0;
  cursor: pointer;
  display: flex;
  height: 46px;
  justify-content: center;
  padding: 0;
  position: absolute;
  user-select: none;
  width: 46px;
  z-index: 1;
}

.claudecraft-talent-node.circle,
.claudecraft-talent-node.circle .claudecraft-talent-icon {
  border-radius: 50%;
}

.claudecraft-talent-node.square {
  border-radius: 7px;
}

.claudecraft-talent-node.square .claudecraft-talent-icon {
  border-radius: 5px;
}

.claudecraft-talent-node.octagon {
  border-radius: 8px;
}

.claudecraft-talent-node.octagon .claudecraft-talent-icon {
  border-radius: 6px;
  clip-path: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%);
  inset: 3px;
}

.claudecraft-talent-icon {
  background-color: #15110a;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: block;
  inset: 2px;
  position: absolute;
  z-index: 1;
}

.claudecraft-talent-node.avail {
  border-color: #b98b27;
  box-shadow: 0 0 0 1px #0b0804, 0 0 7px rgba(154, 119, 40, 0.34);
}

.claudecraft-talent-node.avail::after {
  align-items: center;
  background: #f5c843;
  border: 1px solid #332403;
  border-radius: 50%;
  color: #120d04;
  content: "+";
  display: flex;
  font-size: 12px;
  height: 15px;
  justify-content: center;
  left: -6px;
  min-width: 15px;
  position: absolute;
  top: -7px;
  z-index: 3;
}

.claudecraft-talent-node.filled {
  background: #2c2410;
  border-color: #f5c843;
  box-shadow: inset 0 0 0 2px #120d04, 0 0 10px rgba(184, 144, 42, 0.6);
  color: #fff;
}

.claudecraft-talent-node.filled::after,
.claudecraft-talent-node.maxed::after {
  align-items: center;
  background: #ffd100;
  border: 1px solid #332403;
  border-radius: 50%;
  color: #120d04;
  content: "✓";
  display: flex;
  font-size: 11px;
  height: 16px;
  justify-content: center;
  left: -6px;
  min-width: 16px;
  position: absolute;
  top: -7px;
  z-index: 3;
}

.claudecraft-talent-node.maxed {
  border-color: #ffe27a;
  box-shadow: inset 0 0 0 2px #120d04, 0 0 13px rgba(255, 209, 0, 0.8);
}

.claudecraft-talent-node.maxed::after {
  content: "★";
  font-size: 10px;
}

.claudecraft-talent-node.locked {
  filter: grayscale(0.75) brightness(0.72);
  opacity: 0.48;
}

.claudecraft-talent-node.selected {
  outline: 2px solid #fff7dc;
  outline-offset: 2px;
}

.claudecraft-talent-rank {
  background: #171006;
  border: 1px solid #ffd100;
  border-radius: 8px;
  bottom: -7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  color: #fff6d5;
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  line-height: 14px;
  min-width: 20px;
  padding: 0 4px;
  position: absolute;
  right: -6px;
  text-align: center;
  z-index: 4;
}

.claudecraft-talent-detail,
.claudecraft-talent-empty {
  background: #14100a;
  border: 1px solid #463a1c;
  border-radius: 6px;
  color: #c8b888;
  min-height: 0;
  padding: 10px;
}

.claudecraft-talent-empty {
  align-items: center;
  display: flex;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  justify-content: center;
}

.claudecraft-talent-detail {
  align-content: start;
  display: grid;
  gap: 10px;
}

.claudecraft-talent-detail header {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 48px minmax(0, 1fr);
}

.claudecraft-talent-detail-icon {
  background-color: #15110a;
  background-position: center;
  background-size: cover;
  border: 2px solid #5a4a22;
  border-radius: 7px;
  display: block;
  height: 48px;
  width: 48px;
}

.claudecraft-talent-detail strong,
.claudecraft-talent-detail small,
.claudecraft-talent-detail p,
.claudecraft-talent-choice-list button {
  font-family: 'Press Start 2P', monospace;
}

.claudecraft-talent-detail strong {
  color: #fff7dc;
  display: block;
  font-size: 9px;
  line-height: 1.35;
}

.claudecraft-talent-detail small {
  color: #a99b76;
  font-size: 7px;
  line-height: 1.45;
}

.claudecraft-talent-detail p {
  color: #d5c899;
  font-size: 7px;
  line-height: 1.5;
  margin: 0;
}

.claudecraft-talent-warning {
  color: #ff8a78 !important;
}

.claudecraft-talent-choice-list {
  display: grid;
  gap: 6px;
}

.claudecraft-talent-choice-list button {
  background: #1a140a;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #d5c899;
  cursor: pointer;
  display: grid;
  gap: 4px 8px;
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 7px;
  text-align: left;
}

.claudecraft-talent-choice-list button.selected {
  background: #2c2410;
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(255, 209, 0, 0.2);
}

.claudecraft-talent-choice-list button span {
  background-position: center;
  background-size: cover;
  border: 1px solid #5a4a22;
  border-radius: 4px;
  display: block;
  grid-row: span 2;
  height: 32px;
  width: 32px;
}

.claudecraft-talent-choice-list button strong {
  font-size: 7px;
}

.claudecraft-talent-choice-list button small {
  font-size: 6px;
}

@media (max-width: 680px) {
  .pvp-roguelike-menu,
  .pvp-shop-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .pvp-shop-layout {
    grid-template-areas:
      "spells"
      "main"
      "active";
  }

  .pvp-shop-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pvp-active-buffs {
    border-left: 0;
    border-top: 1px solid #30313a;
    padding-left: 0;
    padding-top: 10px;
  }

  .pvp-shop-grid,
  .pvp-shop-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claudecraft-talent-body,
  .action-main-menu {
    grid-template-columns: minmax(0, 1fr);
  }

  .claudecraft-talent-specs {
    gap: 6px;
  }

  .claudecraft-talent-specs button {
    padding: 7px 4px;
  }

  .claudecraft-talent-specs button span {
    height: 34px;
    width: 34px;
  }

  .pvp-shop-header,
  .pvp-roguelike-result {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-height: 560px) {
  .arena-battle-shell .arena-boss-window-party,
  .dungeon-combat-shell .arena-boss-window-party {
    width: 128px;
  }

  .arena-battle-shell .arena-boss-window-party .party-frame,
  .arena-battle-shell .arena-boss-window-party .party-frame.compact,
  .dungeon-combat-shell .arena-boss-window-party .party-frame,
  .dungeon-combat-shell .arena-boss-window-party .party-frame.compact {
    width: 128px;
  }
}
