.dungeon-crawler-game {
  --dc-bg: #07111b;
  --dc-panel: rgba(10, 24, 34, 0.94);
  --dc-panel-soft: rgba(18, 39, 50, 0.82);
  --dc-line: rgba(199, 224, 218, 0.2);
  --dc-ink: #f4f1e7;
  --dc-muted: #afc1c2;
  --dc-accent: #70dfc8;
  --dc-gold: #e8c76d;
  --dc-danger: #eb6d72;
  color: var(--dc-ink);
  display: grid;
  gap: 1rem;
  margin: 0 auto;
  max-width: 1560px;
  min-width: 0;
  padding: clamp(0.4rem, 1.5vw, 1.25rem);
  width: 100%;
}

.dungeon-crawler-game *,
.dungeon-crawler-game *::before,
.dungeon-crawler-game *::after {
  box-sizing: border-box;
}

.dungeon-crawler-game button,
.dungeon-crawler-game input,
.dungeon-crawler-game select {
  max-width: 100%;
}

.dungeon-crawler-game button {
  min-height: 42px;
}

.dungeon-crawler-game button:focus-visible,
.dungeon-crawler-game input:focus-visible,
.dungeon-crawler-game select:focus-visible,
.dungeon-crawler-game canvas:focus-visible {
  outline: 3px solid #fff3a8;
  outline-offset: 3px;
}

.dungeon-crawler-game h2,
.dungeon-crawler-game h3,
.dungeon-crawler-game p {
  overflow-wrap: anywhere;
}

.dungeon-crawler-game .dc-hero,
.dungeon-crawler-game .dc-hub,
.dungeon-crawler-game .dc-game-panel,
.dungeon-crawler-game .dc-creation,
.dungeon-crawler-game .dc-hub-sidebar > section,
.dungeon-crawler-game .dc-game-sidebar > section,
.dungeon-crawler-game .dc-status-line {
  border: 1px solid var(--dc-line);
  box-shadow: 0 24px 70px rgba(1, 5, 10, 0.24);
}

.dungeon-crawler-game .dc-hero {
  align-items: center;
  background:
    radial-gradient(
      circle at 88% 20%,
      rgba(234, 186, 90, 0.24),
      transparent 24rem
    ),
    radial-gradient(
      circle at 12% 100%,
      rgba(65, 205, 190, 0.24),
      transparent 30rem
    ),
    linear-gradient(130deg, #0c1a27, #173b3b 64%, #3a2934);
  border-radius: 26px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 185px;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 2.4rem);
  position: relative;
}

.dungeon-crawler-game .dc-hero::after {
  color: rgba(255, 245, 200, 0.13);
  content: "◇  ⚔  ◈  ☗";
  font-size: clamp(3rem, 8vw, 7.5rem);
  letter-spacing: 0.08em;
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%) rotate(-5deg);
  white-space: nowrap;
}

.dungeon-crawler-game .dc-hero-copy,
.dungeon-crawler-game .dc-hero-actions {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.dungeon-crawler-game .dc-hero h1 {
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.9;
  margin: 0.35rem 0 0.8rem;
}

.dungeon-crawler-game .dc-hero p {
  color: #d7e7e2;
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  line-height: 1.6;
  margin: 0;
  max-width: 720px;
}

.dungeon-crawler-game .dc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  max-width: 440px;
}

.dungeon-crawler-game .dc-hub,
.dungeon-crawler-game .dc-game-panel {
  background:
    linear-gradient(145deg, rgba(7, 17, 27, 0.98), rgba(12, 34, 40, 0.97)),
    #07111b;
  border-radius: 26px;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.dungeon-crawler-game .dc-hub-intro,
.dungeon-crawler-game .dc-panel-heading,
.dungeon-crawler-game .dc-dialog-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.dungeon-crawler-game .dc-hub-intro > *,
.dungeon-crawler-game .dc-panel-heading > *,
.dungeon-crawler-game .dc-dialog-heading > * {
  min-width: 0;
}

.dungeon-crawler-game .dc-hub-intro h2 {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  margin: 0.2rem 0 0.45rem;
}

.dungeon-crawler-game .dc-hub-intro p {
  color: var(--dc-muted);
  margin: 0;
  max-width: 820px;
}

.dungeon-crawler-game .dc-hub-currency {
  background: rgba(238, 205, 109, 0.09);
  border: 1px solid rgba(238, 205, 109, 0.28);
  border-radius: 18px;
  min-width: min(220px, 100%);
  padding: 0.85rem 1rem;
  text-align: right;
}

.dungeon-crawler-game .dc-hub-currency span,
.dungeon-crawler-game .dc-hub-currency small {
  color: var(--dc-muted);
  display: block;
}

.dungeon-crawler-game .dc-hub-currency strong {
  color: var(--dc-gold);
  display: block;
  font-size: 1.8rem;
}

.dungeon-crawler-game .dc-hub-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.75fr) minmax(310px, 0.75fr);
  margin-top: 1rem;
}

.dungeon-crawler-game .dc-creation,
.dungeon-crawler-game .dc-hub-sidebar > section,
.dungeon-crawler-game .dc-game-sidebar > section {
  background: var(--dc-panel-soft);
  border-radius: 20px;
  min-width: 0;
  padding: 1rem;
}

.dungeon-crawler-game .dc-panel-heading h2,
.dungeon-crawler-game .dc-panel-heading h3 {
  margin: 0;
}

.dungeon-crawler-game .dc-panel-heading span,
.dungeon-crawler-game .dc-step-mark {
  color: var(--dc-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.dungeon-crawler-game .dc-class-fieldset {
  border: 0;
  margin: 1rem 0 0;
  padding: 0;
}

.dungeon-crawler-game .dc-class-fieldset legend {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.dungeon-crawler-game .dc-class-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dungeon-crawler-game .dc-class-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--dc-line);
  border-radius: 15px;
  cursor: pointer;
  display: grid;
  gap: 0.12rem 0.65rem;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  padding: 0.7rem;
}

.dungeon-crawler-game .dc-class-card:hover,
.dungeon-crawler-game .dc-class-card:focus-within,
.dungeon-crawler-game .dc-class-card.is-selected {
  background: rgba(112, 223, 200, 0.1);
  border-color: var(--dc-accent);
}

.dungeon-crawler-game .dc-class-card input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.dungeon-crawler-game .dc-class-icon {
  align-items: center;
  background: linear-gradient(135deg, var(--dc-accent), var(--dc-gold));
  border-radius: 12px;
  color: #0a1720;
  display: flex;
  font-size: 1.1rem;
  font-weight: 950;
  grid-row: span 2;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.dungeon-crawler-game .dc-class-card strong,
.dungeon-crawler-game .dc-class-card small {
  min-width: 0;
}

.dungeon-crawler-game .dc-class-card small {
  color: var(--dc-muted);
}

.dungeon-crawler-game .dc-create-fields,
.dungeon-crawler-game .dc-run-settings {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1rem;
}

.dungeon-crawler-game .dc-create-fields label,
.dungeon-crawler-game .dc-run-settings label {
  display: grid;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 0.3rem;
  min-width: 0;
}

.dungeon-crawler-game .dc-class-preview {
  align-items: center;
  background: rgba(3, 13, 21, 0.55);
  border: 1px solid var(--dc-line);
  border-radius: 18px;
  display: grid;
  gap: 1rem;
  grid-template-columns:
    minmax(155px, 180px) minmax(0, 1fr)
    minmax(190px, 0.72fr);
  margin-top: 1rem;
  padding: 0.9rem;
}

.dungeon-crawler-game .dc-character-preview {
  --dc-preview-accent: #71ead6;
  --dc-preview-hair: #743a25;
  --dc-preview-skin: #754836;
  --dc-preview-class: #b95043;
  margin: 0;
  min-width: 0;
  text-align: center;
}

.dungeon-crawler-game .dc-character-preview[data-class="wizard"] {
  --dc-preview-class: #536ec9;
}

.dungeon-crawler-game .dc-character-preview[data-class="rogue"] {
  --dc-preview-class: #48575e;
}

.dungeon-crawler-game .dc-character-preview[data-class="ranger"] {
  --dc-preview-class: #4d8049;
}

.dungeon-crawler-game .dc-character-preview[data-class="paladin"] {
  --dc-preview-class: #b99343;
}

.dungeon-crawler-game .dc-character-preview[data-class="necromancer"] {
  --dc-preview-class: #73549a;
}

.dungeon-crawler-game .dc-character-stage {
  background:
    linear-gradient(180deg, rgba(14, 35, 47, 0.88), rgba(4, 14, 21, 0.96)),
    repeating-linear-gradient(
      90deg,
      transparent 0 19px,
      rgba(255, 255, 255, 0.025) 20px
    );
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  height: 176px;
  overflow: hidden;
  position: relative;
}

.dungeon-crawler-game .dc-preview-glow {
  background: var(--dc-preview-accent);
  border-radius: 50%;
  filter: blur(24px);
  height: 105px;
  left: 50%;
  opacity: 0.18;
  position: absolute;
  top: 29px;
  transform: translateX(-50%);
  width: 105px;
}

.dungeon-crawler-game .dc-preview-sigil {
  align-items: center;
  background: rgba(4, 14, 21, 0.76);
  border: 1px solid color-mix(in srgb, var(--dc-preview-accent) 65%, white);
  border-radius: 50%;
  color: var(--dc-preview-accent);
  display: flex;
  font-size: 0.8rem;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px;
  z-index: 8;
}

.dungeon-crawler-game .dc-avatar-shadow {
  background: rgba(0, 0, 0, 0.56);
  border-radius: 50%;
  bottom: 8px;
  filter: blur(4px);
  height: 14px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 92px;
}

.dungeon-crawler-game .dc-avatar {
  --dc-avatar-scale-x: 1;
  --dc-avatar-scale-y: 1;
  animation: dc-preview-idle 3.2s ease-in-out infinite;
  bottom: 17px;
  height: 145px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%)
    scale(var(--dc-avatar-scale-x), var(--dc-avatar-scale-y));
  transform-origin: 50% 100%;
  width: 116px;
}

.dungeon-crawler-game
  .dc-character-preview[data-silhouette="swift"]
  .dc-avatar {
  --dc-avatar-scale-x: 0.86;
  --dc-avatar-scale-y: 0.98;
}

.dungeon-crawler-game .dc-character-preview[data-silhouette="tall"] .dc-avatar {
  --dc-avatar-scale-x: 0.94;
  --dc-avatar-scale-y: 1.08;
}

.dungeon-crawler-game .dc-avatar > span,
.dungeon-crawler-game .dc-avatar-head > span,
.dungeon-crawler-game .dc-avatar-body > span {
  display: block;
  position: absolute;
}

.dungeon-crawler-game .dc-avatar-body {
  background:
    linear-gradient(
      90deg,
      transparent 45%,
      var(--dc-preview-accent) 45% 55%,
      transparent 55%
    ),
    linear-gradient(145deg, var(--dc-preview-class), #172d37 76%);
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 31px 31px 12px 12px;
  bottom: 0;
  box-shadow: inset 0 -18px 22px rgba(0, 0, 0, 0.25);
  height: 83px;
  left: 18px;
  width: 80px;
  z-index: 3;
}

.dungeon-crawler-game .dc-avatar-clasp {
  background: var(--dc-preview-accent);
  border: 2px solid rgba(5, 19, 26, 0.72);
  border-radius: 50%;
  height: 12px;
  left: 32px;
  top: 15px;
  width: 12px;
}

.dungeon-crawler-game .dc-avatar-neck {
  background: var(--dc-preview-skin);
  border-radius: 4px;
  height: 22px;
  left: 49px;
  top: 51px;
  width: 19px;
  z-index: 2;
}

.dungeon-crawler-game .dc-avatar-head {
  background: var(--dc-preview-skin);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 48% 48% 44% 44%;
  height: 61px;
  left: 31px;
  top: 5px;
  transform-origin: 50% 85%;
  width: 54px;
  z-index: 4;
}

.dungeon-crawler-game .dc-character-preview[data-portrait="1"] .dc-avatar-head {
  transform: rotate(-2deg);
}

.dungeon-crawler-game .dc-character-preview[data-portrait="2"] .dc-avatar-head {
  border-radius: 44% 53% 46% 42%;
  transform: translateX(2px) rotate(2deg);
}

.dungeon-crawler-game .dc-character-preview[data-portrait="3"] .dc-avatar-head {
  border-radius: 50% 43% 40% 48%;
  transform: translateY(-1px) rotate(-1deg);
}

.dungeon-crawler-game .dc-avatar-ear {
  background: var(--dc-preview-skin);
  border-radius: 8px;
  height: 17px;
  left: -5px;
  top: 24px;
  width: 60px;
  z-index: -1;
}

.dungeon-crawler-game .dc-avatar-hair {
  background: var(--dc-preview-hair);
  border-radius: 50% 50% 34% 24%;
  height: 25px;
  left: -2px;
  top: -4px;
  transform: rotate(-2deg);
  width: 56px;
  z-index: 5;
}

.dungeon-crawler-game .dc-avatar-hair::before,
.dungeon-crawler-game .dc-avatar-hair::after,
.dungeon-crawler-game .dc-avatar-facial-hair::before,
.dungeon-crawler-game .dc-avatar-weapon::before,
.dungeon-crawler-game .dc-avatar-weapon::after {
  content: "";
  display: block;
  position: absolute;
}

.dungeon-crawler-game
  .dc-character-preview[data-hair-style="0"]
  .dc-avatar-hair {
  display: none;
}

.dungeon-crawler-game
  .dc-character-preview[data-hair-style="2"]
  .dc-avatar-hair {
  border: 4px double color-mix(in srgb, var(--dc-preview-hair) 78%, white);
  height: 18px;
}

.dungeon-crawler-game
  .dc-character-preview[data-hair-style="2"]
  .dc-avatar-hair::after {
  background: var(--dc-preview-hair);
  border-radius: 5px;
  height: 34px;
  right: 1px;
  top: 10px;
  transform: rotate(-8deg);
  width: 8px;
}

.dungeon-crawler-game
  .dc-character-preview[data-hair-style="3"]
  .dc-avatar-hair {
  border-radius: 50% 50% 16px 16px;
  height: 43px;
}

.dungeon-crawler-game
  .dc-character-preview[data-hair-style="3"]
  .dc-avatar-hair::before {
  background: var(--dc-preview-hair);
  border-radius: 50%;
  height: 21px;
  right: -4px;
  top: -8px;
  width: 21px;
}

.dungeon-crawler-game
  .dc-character-preview[data-hair-style="4"]
  .dc-avatar-hair {
  border-radius: 56% 62% 28% 66%;
  clip-path: polygon(0 0, 100% 0, 88% 58%, 35% 44%, 12% 100%);
  height: 36px;
  transform: rotate(3deg);
}

.dungeon-crawler-game
  .dc-character-preview[data-hair-style="5"]
  .dc-avatar-hair {
  background:
    radial-gradient(
      circle at 20% 35%,
      var(--dc-preview-hair) 0 6px,
      transparent 7px
    ),
    radial-gradient(
      circle at 48% 22%,
      var(--dc-preview-hair) 0 7px,
      transparent 8px
    ),
    radial-gradient(
      circle at 76% 36%,
      var(--dc-preview-hair) 0 7px,
      transparent 8px
    ),
    radial-gradient(
      circle at 36% 62%,
      var(--dc-preview-hair) 0 7px,
      transparent 8px
    ),
    radial-gradient(
      circle at 67% 67%,
      var(--dc-preview-hair) 0 7px,
      transparent 8px
    );
  height: 39px;
}

.dungeon-crawler-game .dc-avatar-brows {
  border-top: 3px solid var(--dc-preview-hair);
  height: 8px;
  left: 9px;
  top: 25px;
  transform: rotate(-2deg);
  width: 32px;
  z-index: 6;
}

.dungeon-crawler-game .dc-avatar-eyes {
  border-left: 5px solid #eefcff;
  border-right: 5px solid #eefcff;
  height: 4px;
  left: 13px;
  top: 32px;
  width: 28px;
  z-index: 6;
}

.dungeon-crawler-game .dc-character-preview[data-portrait="3"] .dc-avatar-eyes {
  border-color: var(--dc-preview-accent);
  filter: drop-shadow(0 0 4px var(--dc-preview-accent));
}

.dungeon-crawler-game .dc-avatar-facial-hair {
  background: var(--dc-preview-hair);
  border-radius: 3px 3px 12px 12px;
  bottom: 3px;
  height: 12px;
  left: 16px;
  width: 20px;
  z-index: 6;
}

.dungeon-crawler-game
  .dc-character-preview[data-facial-hair="0"]
  .dc-avatar-facial-hair {
  display: none;
}

.dungeon-crawler-game
  .dc-character-preview[data-facial-hair="2"]
  .dc-avatar-facial-hair {
  height: 24px;
  left: 13px;
  width: 26px;
}

.dungeon-crawler-game
  .dc-character-preview[data-facial-hair="2"]
  .dc-avatar-facial-hair::before {
  border-left: 3px solid color-mix(in srgb, var(--dc-preview-hair) 65%, white);
  height: 17px;
  left: 11px;
  top: 4px;
}

.dungeon-crawler-game
  .dc-character-preview[data-facial-hair="3"]
  .dc-avatar-facial-hair {
  border-radius: 50%;
  bottom: 12px;
  height: 6px;
  left: 11px;
  transform: rotate(-4deg);
  width: 31px;
}

.dungeon-crawler-game
  .dc-character-preview[data-facial-hair="4"]
  .dc-avatar-facial-hair {
  border-radius: 2px 2px 16px 16px;
  height: 29px;
  left: 10px;
  width: 32px;
}

.dungeon-crawler-game .dc-avatar-weapon {
  background: #5d4436;
  border-radius: 4px;
  height: 111px;
  left: 88px;
  top: 25px;
  transform: rotate(13deg);
  width: 7px;
  z-index: 1;
}

.dungeon-crawler-game .dc-avatar-weapon::before {
  background: #b9ced2;
  border-radius: 75% 14% 60% 18%;
  height: 32px;
  left: -11px;
  top: -5px;
  transform: rotate(12deg);
  width: 25px;
}

.dungeon-crawler-game
  .dc-character-preview[data-class="wizard"]
  .dc-avatar-weapon::before,
.dungeon-crawler-game
  .dc-character-preview[data-class="necromancer"]
  .dc-avatar-weapon::before {
  background: var(--dc-preview-accent);
  border: 4px solid color-mix(in srgb, var(--dc-preview-class) 72%, black);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--dc-preview-accent);
  height: 25px;
  left: -9px;
  top: -10px;
  width: 25px;
}

.dungeon-crawler-game
  .dc-character-preview[data-class="rogue"]
  .dc-avatar-weapon {
  background: linear-gradient(#e0edf0 0 52%, #5d4436 52%);
  height: 77px;
  left: 91px;
  top: 60px;
}

.dungeon-crawler-game
  .dc-character-preview[data-class="rogue"]
  .dc-avatar-weapon::before {
  display: none;
}

.dungeon-crawler-game
  .dc-character-preview[data-class="ranger"]
  .dc-avatar-weapon {
  background: none;
  border-right: 5px solid #a77a45;
  border-radius: 50%;
  height: 103px;
  left: 72px;
  top: 31px;
  transform: rotate(4deg);
  width: 38px;
}

.dungeon-crawler-game
  .dc-character-preview[data-class="ranger"]
  .dc-avatar-weapon::before {
  background: rgba(232, 235, 216, 0.76);
  border-radius: 0;
  height: 96px;
  left: 5px;
  top: 4px;
  transform: rotate(-10deg);
  width: 1px;
}

.dungeon-crawler-game
  .dc-character-preview[data-class="paladin"]
  .dc-avatar-weapon {
  background: linear-gradient(145deg, var(--dc-preview-class), #5f461e);
  border: 3px solid var(--dc-preview-accent);
  border-radius: 45% 45% 50% 50%;
  height: 69px;
  left: 76px;
  top: 66px;
  transform: rotate(7deg);
  width: 49px;
}

.dungeon-crawler-game
  .dc-character-preview[data-class="paladin"]
  .dc-avatar-weapon::before {
  background: var(--dc-preview-accent);
  border-radius: 2px;
  height: 39px;
  left: 20px;
  top: 11px;
  transform: none;
  width: 4px;
}

.dungeon-crawler-game
  .dc-character-preview[data-class="paladin"]
  .dc-avatar-weapon::after {
  background: var(--dc-preview-accent);
  height: 4px;
  left: 9px;
  top: 22px;
  width: 26px;
}

.dungeon-crawler-game .dc-character-preview figcaption {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.5rem;
  min-width: 0;
}

.dungeon-crawler-game .dc-character-preview figcaption strong {
  color: var(--dc-ink);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.dungeon-crawler-game .dc-character-preview figcaption span {
  color: var(--dc-muted);
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@keyframes dc-preview-idle {
  0%,
  100% {
    margin-bottom: 0;
  }

  50% {
    margin-bottom: 3px;
  }
}

.dungeon-crawler-game .dc-class-preview h3,
.dungeon-crawler-game .dc-class-preview p {
  margin: 0 0 0.35rem;
}

.dungeon-crawler-game .dc-class-preview p,
.dungeon-crawler-game .dc-class-preview li {
  color: var(--dc-muted);
  font-size: 0.84rem;
}

.dungeon-crawler-game .dc-class-preview dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  margin: 0;
}

.dungeon-crawler-game .dc-class-preview dt {
  color: var(--dc-muted);
  font-size: 0.75rem;
}

.dungeon-crawler-game .dc-class-preview dd {
  font-weight: 900;
  margin: 0;
}

.dungeon-crawler-game .dc-class-preview ul {
  margin: 0.35rem 0 0.6rem;
  padding-left: 1.2rem;
}

.dungeon-crawler-game .dc-speed-warning {
  color: var(--dc-gold);
  font-size: 0.84rem;
  margin: 0.8rem 0 0;
}

.dungeon-crawler-game .dc-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.dungeon-crawler-game .dc-hub-sidebar {
  align-content: start;
  display: grid;
  gap: 0.8rem;
  min-width: 0;
}

.dungeon-crawler-game .dc-hub-sidebar p,
.dungeon-crawler-game .dc-game-sidebar p {
  color: var(--dc-muted);
}

.dungeon-crawler-game .dc-roster,
.dungeon-crawler-game .dc-records,
.dungeon-crawler-game [data-dc-storage],
.dungeon-crawler-game [data-dc-lost-property] {
  max-height: 310px;
  overflow-y: auto;
}

.dungeon-crawler-game .dc-roster-card,
.dungeon-crawler-game .dc-record-row {
  align-items: center;
  border-bottom: 1px solid var(--dc-line);
  display: grid;
  gap: 0.4rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.55rem 0;
}

.dungeon-crawler-game .dc-roster-card small,
.dungeon-crawler-game .dc-record-row small {
  color: var(--dc-muted);
  display: block;
}

.dungeon-crawler-game .dc-tab-list {
  display: grid;
  gap: 0.3rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0.6rem;
}

.dungeon-crawler-game .dc-tab-list button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dc-line);
  border-radius: 10px;
  color: var(--dc-muted);
}

.dungeon-crawler-game .dc-tab-list button[aria-selected="true"] {
  background: var(--dc-accent);
  color: #08151c;
}

.dungeon-crawler-game .dc-resource-bar {
  background: var(--dc-panel);
  border: 1px solid var(--dc-line);
  border-radius: 18px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
}

.dungeon-crawler-game .dc-resource-bar article {
  background: rgba(255, 255, 255, 0.025);
  min-width: 0;
  padding: 0.7rem 0.8rem;
}

.dungeon-crawler-game .dc-resource-bar article > span,
.dungeon-crawler-game .dc-resource-bar small {
  color: var(--dc-muted);
  display: block;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dungeon-crawler-game .dc-resource-bar strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dungeon-crawler-game .dc-resource-bar progress,
.dungeon-crawler-game .dc-boss-bar progress {
  accent-color: var(--dc-accent);
  display: block;
  height: 7px;
  margin-top: 0.28rem;
  width: 100%;
}

.dungeon-crawler-game .dc-health-card progress {
  accent-color: var(--dc-danger);
}

.dungeon-crawler-game .dc-command-bar {
  align-items: center;
  display: flex;
  gap: 0.7rem;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.dungeon-crawler-game .dc-speed,
.dungeon-crawler-game .dc-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dungeon-crawler-game .dc-speed {
  border: 1px solid var(--dc-line);
  border-radius: 12px;
  flex: 0 0 auto;
  padding: 0.3rem;
}

.dungeon-crawler-game .dc-speed button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--dc-muted);
  min-height: 36px;
  min-width: 42px;
}

.dungeon-crawler-game .dc-speed button[aria-pressed="true"] {
  background: var(--dc-gold);
  color: #16130a;
}

.dungeon-crawler-game kbd {
  border: 1px solid var(--dc-line);
  border-radius: 5px;
  font-size: 0.68rem;
  padding: 0.08rem 0.25rem;
}

.dungeon-crawler-game .dc-play-layout {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1fr) 310px;
  margin-top: 0.75rem;
}

.dungeon-crawler-game .dc-battlefield,
.dungeon-crawler-game .dc-game-sidebar {
  min-width: 0;
}

.dungeon-crawler-game .dc-canvas-shell {
  aspect-ratio: 16 / 9;
  background: #061019;
  border: 8px solid #273a3d;
  border-radius: 22px;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.55),
    0 20px 60px rgba(0, 0, 0, 0.25);
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.dungeon-crawler-game .dc-canvas-shell canvas {
  display: block;
  height: 100%;
  max-width: 100%;
  touch-action: none;
  width: 100%;
}

.dungeon-crawler-game .dc-boss-bar {
  background: rgba(20, 8, 14, 0.9);
  border: 1px solid rgba(255, 187, 100, 0.48);
  border-radius: 13px;
  left: 50%;
  max-width: calc(100% - 2rem);
  padding: 0.55rem 0.8rem;
  position: absolute;
  top: 0.7rem;
  transform: translateX(-50%);
  width: 520px;
}

.dungeon-crawler-game .dc-boss-bar div {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.dungeon-crawler-game .dc-boss-bar span {
  color: var(--dc-gold);
  font-size: 0.78rem;
}

.dungeon-crawler-game .dc-pause-cover {
  align-items: center;
  background: rgba(3, 9, 14, 0.92);
  display: flex;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: absolute;
  text-align: center;
  z-index: 6;
}

.dungeon-crawler-game .dc-pause-cover strong {
  font-size: clamp(1.5rem, 4vw, 2.7rem);
}

.dungeon-crawler-game .dc-pause-cover span {
  color: var(--dc-muted);
  margin: 0.35rem 0 0.8rem;
}

.dungeon-crawler-game .dc-joystick,
.dungeon-crawler-game .dc-touch-actions {
  display: none;
}

.dungeon-crawler-game .dc-ability-bar {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0.65rem;
}

.dungeon-crawler-game .dc-ability-button {
  align-items: center;
  background: rgba(14, 33, 44, 0.96);
  border: 1px solid var(--dc-line);
  border-radius: 14px;
  color: var(--dc-ink);
  display: grid;
  gap: 0.25rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 0.55rem;
  text-align: left;
}

.dungeon-crawler-game .dc-ability-button[aria-pressed="true"] {
  border-color: var(--dc-gold);
  box-shadow: inset 0 0 0 1px rgba(232, 199, 109, 0.28);
}

.dungeon-crawler-game .dc-ability-button:disabled {
  opacity: 0.48;
}

.dungeon-crawler-game .dc-ability-key,
.dungeon-crawler-game .dc-ability-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  font-size: 0.75rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.dungeon-crawler-game .dc-ability-button small {
  color: var(--dc-muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dungeon-crawler-game .dc-ability-cooldown {
  color: var(--dc-gold);
  font-weight: 900;
}

.dungeon-crawler-game .dc-status-line {
  align-items: center;
  background: var(--dc-panel);
  border-radius: 15px;
  display: flex;
  gap: 0.75rem;
  margin-top: 0.65rem;
  min-height: 68px;
  padding: 0.7rem 0.85rem;
}

.dungeon-crawler-game .dc-status-line > span {
  color: var(--dc-gold);
  font-size: 1.4rem;
}

.dungeon-crawler-game .dc-status-line strong,
.dungeon-crawler-game .dc-status-line p {
  display: block;
  margin: 0;
}

.dungeon-crawler-game .dc-status-line p {
  color: var(--dc-muted);
}

.dungeon-crawler-game .dc-game-sidebar {
  align-content: start;
  display: grid;
  gap: 0.65rem;
}

.dungeon-crawler-game .dc-game-sidebar h2 {
  font-size: 1rem;
  margin: 0;
}

.dungeon-crawler-game .dc-game-sidebar p {
  font-size: 0.87rem;
  margin: 0.5rem 0 0;
}

.dungeon-crawler-game .dc-wayfinder {
  background:
    radial-gradient(
      circle at 90% 0,
      rgba(232, 199, 109, 0.16),
      transparent 9rem
    ),
    var(--dc-panel-soft) !important;
}

.dungeon-crawler-game .dc-effect-list,
.dungeon-crawler-game .dc-enemy-list,
.dungeon-crawler-game .dc-event-log {
  list-style: none;
  margin: 0.55rem 0 0;
  max-height: 170px;
  overflow-y: auto;
  padding: 0;
}

.dungeon-crawler-game .dc-effect-list li,
.dungeon-crawler-game .dc-enemy-list li,
.dungeon-crawler-game .dc-event-log li {
  border-bottom: 1px solid var(--dc-line);
  color: var(--dc-muted);
  font-size: 0.8rem;
  padding: 0.35rem 0;
}

.dungeon-crawler-game .dc-enemy-button {
  background: transparent;
  border: 0;
  color: inherit;
  min-height: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}

.dungeon-crawler-game .dc-dialog {
  background: #102733;
  border: 1px solid rgba(198, 224, 220, 0.3);
  border-radius: 22px;
  color: var(--dc-ink);
  max-height: 90vh;
  max-width: min(780px, calc(100vw - 1.4rem));
  overflow-y: auto;
  padding: 1.1rem;
}

.dungeon-crawler-game .dc-wide-dialog {
  width: min(1180px, calc(100vw - 1.4rem));
}

.dungeon-crawler-game .dc-dialog::backdrop {
  background: rgba(1, 6, 10, 0.82);
}

.dungeon-crawler-game .dc-dialog h2 {
  margin: 0.15rem 0 0.5rem;
}

.dungeon-crawler-game .dc-dialog h3 {
  margin: 0 0 0.55rem;
}

.dungeon-crawler-game .dc-dialog p,
.dungeon-crawler-game .dc-dialog li {
  color: var(--dc-muted);
}

.dungeon-crawler-game .dc-manual-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.dungeon-crawler-game .dc-manual-grid section {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 0.8rem;
}

.dungeon-crawler-game .dc-manual-grid ul {
  margin: 0;
  padding-left: 1.2rem;
}

.dungeon-crawler-game .dc-dialog-actions,
.dungeon-crawler-game .dc-ending-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.dungeon-crawler-game .dc-inventory-layout {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 0.75fr 1.35fr 0.9fr;
}

.dungeon-crawler-game .dc-inventory-layout > section,
.dungeon-crawler-game .dc-character-layout > section,
.dungeon-crawler-game .dc-merchant-layout > section {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 15px;
  min-width: 0;
  padding: 0.8rem;
}

.dungeon-crawler-game .dc-equipment-grid,
.dungeon-crawler-game .dc-item-grid,
.dungeon-crawler-game .dc-skill-tree {
  display: grid;
  gap: 0.45rem;
}

.dungeon-crawler-game .dc-equipment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dungeon-crawler-game .dc-item-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dungeon-crawler-game .dc-equipment-slot,
.dungeon-crawler-game .dc-item-card,
.dungeon-crawler-game .dc-skill-card,
.dungeon-crawler-game .dc-merchant-item {
  background: rgba(3, 12, 19, 0.48);
  border: 1px solid var(--dc-line);
  border-radius: 11px;
  color: inherit;
  min-width: 0;
  padding: 0.55rem;
  text-align: left;
}

.dungeon-crawler-game .dc-equipment-slot span,
.dungeon-crawler-game .dc-item-card span,
.dungeon-crawler-game .dc-skill-card span {
  color: var(--dc-muted);
  display: block;
  font-size: 0.72rem;
}

.dungeon-crawler-game .dc-item-card[data-rarity="legendary"] {
  border-style: double;
  border-width: 3px;
}

.dungeon-crawler-game .dc-filter-row {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.dungeon-crawler-game .dc-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.dungeon-crawler-game .dc-item-actions button {
  min-height: 34px;
}

.dungeon-crawler-game .dc-character-layout {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 0.7fr 1.3fr;
}

.dungeon-crawler-game .dc-skill-tree {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dungeon-crawler-game .dc-map-layout {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.5fr);
}

.dungeon-crawler-game .dc-map-layout canvas {
  background: #07111a;
  border: 1px solid var(--dc-line);
  border-radius: 14px;
  height: auto;
  max-width: 100%;
  width: 100%;
}

.dungeon-crawler-game .dc-merchant-layout {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1.4fr 0.6fr;
}

.dungeon-crawler-game .dc-death-mark {
  color: var(--dc-gold);
  font-size: 4rem;
  text-align: center;
}

.dungeon-crawler-game .dc-debug {
  background: rgba(2, 8, 12, 0.97);
  border: 1px solid #52ead3;
  border-radius: 15px;
  bottom: 0.7rem;
  color: #cdfcf2;
  max-height: min(70vh, 620px);
  max-width: min(460px, calc(100vw - 1.4rem));
  overflow: auto;
  padding: 0.7rem;
  position: fixed;
  right: 0.7rem;
  width: 420px;
  z-index: 1400;
}

.dungeon-crawler-game .dc-debug-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.dungeon-crawler-game .dc-debug-actions {
  display: grid;
  gap: 0.3rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0.5rem 0;
}

.dungeon-crawler-game .dc-debug button {
  background: #14363c;
  border: 1px solid #5ebbb0;
  border-radius: 8px;
  color: #e9fffa;
  font-size: 0.72rem;
  min-height: 32px;
}

.dungeon-crawler-game .dc-debug pre {
  font-size: 0.72rem;
  margin: 0;
  white-space: pre-wrap;
}

.dungeon-crawler-game .dc-announcer {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.dungeon-crawler-game [hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .dungeon-crawler-game .dc-hub-layout,
  .dungeon-crawler-game .dc-play-layout {
    grid-template-columns: 1fr;
  }

  .dungeon-crawler-game .dc-hub-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dungeon-crawler-game .dc-hub-tabs,
  .dungeon-crawler-game .dc-hub-sidebar > .button-danger {
    grid-column: 1 / -1;
  }

  .dungeon-crawler-game .dc-game-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dungeon-crawler-game .dc-wayfinder {
    grid-column: span 2;
  }

  .dungeon-crawler-game .dc-command-bar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 860px) {
  .dungeon-crawler-game .dc-class-grid,
  .dungeon-crawler-game .dc-resource-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dungeon-crawler-game .dc-create-fields,
  .dungeon-crawler-game .dc-run-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dungeon-crawler-game .dc-class-preview {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dungeon-crawler-game .dc-class-preview > :last-child {
    grid-column: 1 / -1;
  }

  .dungeon-crawler-game .dc-game-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dungeon-crawler-game .dc-inventory-layout,
  .dungeon-crawler-game .dc-character-layout,
  .dungeon-crawler-game .dc-map-layout,
  .dungeon-crawler-game .dc-merchant-layout {
    grid-template-columns: 1fr;
  }

  .dungeon-crawler-game .dc-inventory-layout > section:nth-child(2) {
    grid-row: 1;
  }

  .dungeon-crawler-game .dc-skill-tree {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .dungeon-crawler-game {
    padding-inline: 0.2rem;
  }

  .dungeon-crawler-game .dc-hero,
  .dungeon-crawler-game .dc-hub-intro,
  .dungeon-crawler-game .dc-dialog-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dungeon-crawler-game .dc-hero-actions {
    justify-content: flex-start;
  }

  .dungeon-crawler-game .dc-hub-currency {
    text-align: left;
  }

  .dungeon-crawler-game .dc-class-grid,
  .dungeon-crawler-game .dc-hub-sidebar,
  .dungeon-crawler-game .dc-game-sidebar {
    grid-template-columns: 1fr;
  }

  .dungeon-crawler-game .dc-hub-tabs,
  .dungeon-crawler-game .dc-hub-sidebar > .button-danger,
  .dungeon-crawler-game .dc-wayfinder {
    grid-column: auto;
  }

  .dungeon-crawler-game .dc-canvas-shell {
    border-width: 4px;
    border-radius: 15px;
  }

  .dungeon-crawler-game .dc-joystick {
    background: rgba(5, 15, 22, 0.68);
    border: 2px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    bottom: 0.7rem;
    display: block;
    height: 88px;
    left: 0.7rem;
    position: absolute;
    touch-action: none;
    width: 88px;
    z-index: 4;
  }

  .dungeon-crawler-game .dc-joystick span {
    background: rgba(112, 223, 200, 0.82);
    border: 2px solid #eafff9;
    border-radius: 50%;
    height: 38px;
    left: 23px;
    position: absolute;
    top: 23px;
    transform: translate(0, 0);
    width: 38px;
  }

  .dungeon-crawler-game .dc-touch-actions {
    bottom: 0.55rem;
    display: grid;
    gap: 0.3rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: absolute;
    right: 0.55rem;
    width: 150px;
    z-index: 4;
  }

  .dungeon-crawler-game .dc-touch-actions button {
    background: rgba(11, 31, 40, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    min-height: 42px;
  }

  .dungeon-crawler-game .dc-ability-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dungeon-crawler-game .dc-command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dungeon-crawler-game .dc-manual-grid,
  .dungeon-crawler-game .dc-item-grid,
  .dungeon-crawler-game .dc-skill-tree {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .dungeon-crawler-game .dc-create-fields,
  .dungeon-crawler-game .dc-run-settings,
  .dungeon-crawler-game .dc-resource-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dungeon-crawler-game .dc-class-preview {
    grid-template-columns: 1fr;
  }

  .dungeon-crawler-game .dc-character-preview {
    justify-self: center;
    max-width: 190px;
    width: 100%;
  }

  .dungeon-crawler-game .dc-ability-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dungeon-crawler-game .dc-equipment-grid {
    grid-template-columns: 1fr;
  }

  .dungeon-crawler-game .dc-debug-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: none) and (pointer: coarse) {
  .dungeon-crawler-game .dc-joystick {
    background: rgba(5, 15, 22, 0.72);
    border: 2px solid rgba(255, 255, 255, 0.48);
    border-radius: 50%;
    bottom: 0.7rem;
    display: block;
    height: 88px;
    left: 0.7rem;
    position: absolute;
    touch-action: none;
    width: 88px;
    z-index: 4;
  }

  .dungeon-crawler-game .dc-joystick span {
    background: rgba(112, 223, 200, 0.88);
    border: 2px solid #eafff9;
    border-radius: 50%;
    height: 38px;
    left: 23px;
    position: absolute;
    top: 23px;
    transform: translate(0, 0);
    width: 38px;
  }

  .dungeon-crawler-game .dc-touch-actions {
    bottom: 0.55rem;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: absolute;
    right: 0.55rem;
    width: min(170px, 42vw);
    z-index: 4;
  }

  .dungeon-crawler-game .dc-touch-actions button {
    background: rgba(11, 31, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    color: #fff;
    font-size: 0.75rem;
    min-height: 44px;
    touch-action: manipulation;
  }
}

@media (hover: hover) and (pointer: fine) {
  .dungeon-crawler-game .dc-joystick,
  .dungeon-crawler-game .dc-touch-actions {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dungeon-crawler-game *,
  .dungeon-crawler-game *::before,
  .dungeon-crawler-game *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .dungeon-crawler-game .dc-hero::after {
    transform: translateY(-50%);
  }
}
