:root {
  color: #eee9d6;
  background: #11120f;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  user-select: none;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background-color: #11120f;
  background-image:
    linear-gradient(rgba(238, 233, 214, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 233, 214, 0.035) 1px, transparent 1px),
    linear-gradient(140deg, rgba(91, 110, 57, 0.16), transparent 45%);
  background-size:
    32px 32px,
    32px 32px,
    100% 100%;
}

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

swing-or-cast-game {
  display: block;
  min-height: 100vh;
  padding: clamp(16px, 3vw, 44px);
}

game-leaderboards {
  display: block;
  padding: 0 clamp(16px, 3vw, 44px) clamp(32px, 5vw, 64px);
}

game-chat {
  display: block;
  padding: 0 clamp(16px, 3vw, 44px) 24px;
}

.loading-state {
  width: min(100%, 720px);
  margin: 18vh auto;
  border: 1px solid #5e6841;
  border-radius: 6px;
  padding: clamp(28px, 7vw, 72px);
  background: rgba(25, 28, 20, 0.92);
}

.failure {
  border-color: #a95648;
}

.auth-shell {
  width: min(100%, 620px);
  margin: clamp(28px, 9vh, 100px) auto;
  border: 1px solid #59623f;
  border-radius: 6px;
  padding: clamp(28px, 6vw, 52px);
  background:
    linear-gradient(rgba(238, 233, 214, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 233, 214, 0.025) 1px, transparent 1px),
    rgba(18, 20, 15, 0.95);
  background-size:
    18px 18px,
    18px 18px,
    auto;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.auth-heading {
  padding-bottom: 24px;
  border-bottom: 1px solid #444c32;
}

.auth-heading h1 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
}

.auth-heading > p:last-child,
.auth-switch,
.security-copy {
  margin: 10px 0 0;
  color: #bfc3ad;
  line-height: 1.5;
}

.auth-status,
.auth-session-expired,
.account-security-status {
  margin: 20px 0 0;
  border-left: 3px solid #d7a85d;
  padding: 10px 12px;
  color: #eee2bc;
  background: rgba(79, 58, 21, 0.25);
  font-size: 0.86rem;
  line-height: 1.45;
}

.auth-session-expired,
.account-security-status {
  border-left-color: #d47753;
  color: #f2c4bc;
  background: rgba(74, 31, 25, 0.42);
}

.auth-form,
.security-inline-form,
.security-password-form {
  display: grid;
  gap: 9px;
  margin-top: 24px;
}

.auth-form label:not(.auth-check),
.security-inline-form label,
.security-password-form label {
  color: #d7c48d;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form input:not([type="checkbox"]),
.security-inline-form input,
.security-password-form input {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #667047;
  border-radius: 4px;
  padding: 10px 12px;
  color: #f0ecdc;
  background: #171a12;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.auth-form input:focus-visible,
.security-inline-form input:focus-visible,
.security-password-form input:focus-visible,
.text-button:focus-visible,
.icon-button:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 5px 0 8px;
  color: #c4c9b5;
  font-size: 0.82rem;
}

.auth-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #c5d676;
}

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

.auth-provider-button {
  min-height: 46px;
  border: 1px solid #8a8e79;
  border-radius: 4px;
  color: #f0ecdc;
  background: rgba(31, 35, 24, 0.92);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-provider-button.google {
  border-color: #a98d70;
}

.auth-provider-button.github {
  border-color: #8b9690;
}

.auth-provider-button:hover,
.auth-provider-button:focus-visible {
  border-color: #f6c970;
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: #8e947f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  width: 100%;
  height: 1px;
  background: #444c32;
  content: "";
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
}

.auth-switch {
  font-size: 0.86rem;
}

.text-button,
.icon-button {
  border: 0;
  padding: 0;
  color: #d7c48d;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #6f7853;
  border-radius: 4px;
  color: #e6e1d0;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

.danger-text-button {
  color: #e39783;
}

.game-layout {
  display: grid;
  width: min(100%, 1180px);
  min-height: calc(100vh - clamp(32px, 6vw, 88px));
  margin: 0 auto;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.65fr);
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid #59623f;
  border-radius: 6px;
  background: rgba(18, 20, 15, 0.92);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.game-header {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #444c32;
  padding: 18px 24px;
  background: rgba(46, 53, 31, 0.42);
}

.eyebrow {
  margin: 0 0 4px;
  color: #c5d676;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-name,
.depth-readout {
  margin: 0;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.depth-readout {
  color: #f6c970;
  white-space: nowrap;
}

.mobile-hud {
  display: none;
  margin: 0;
}

.stats-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid #444c32;
  padding: 24px;
  background: rgba(30, 34, 23, 0.52);
}

.identity-block {
  border-bottom: 1px solid #505a37;
  padding-bottom: 18px;
}

.character-name {
  margin: 0;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.2rem;
}

.stat-meter,
.health-meter {
  margin: 0;
}

.stat-heading,
.health-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: #dbd7c8;
  font-size: 0.84rem;
}

.stat-meter p {
  margin: 6px 0 0;
  color: #9da18c;
  font-size: 0.75rem;
}

.meter-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid #667047;
  border-radius: 2px;
  background: #161911;
}

.meter-track > span {
  display: block;
  height: 100%;
  background: #c5d676;
  transition: width 160ms ease-out;
}

.health-track {
  border-color: #ab7057;
}

.health-track > span {
  background: #e7835d;
}

.health-track.danger {
  border-color: #d8913d;
}

.health-track.danger > span {
  background: #f0af4d;
}

.health-track.critical {
  border-color: #d45d51;
}

.health-track.critical > span {
  background: #e25c50;
}

.run-stats,
.death-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: auto 0 0;
  padding: 16px 0 0;
  border-top: 1px solid #505a37;
}

.run-stats div,
.death-stats div {
  min-width: 0;
}

dt {
  color: #9da18c;
  font-size: 0.72rem;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  color: #f0ecdc;
  font-size: 1rem;
  font-weight: 700;
}

.stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 530px;
  background:
    linear-gradient(rgba(238, 233, 214, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 233, 214, 0.025) 1px, transparent 1px),
    #1a1d15;
  background-size: 18px 18px;
}

.status-message {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 50%;
  max-width: calc(100% - 32px);
  margin: 0;
  border: 1px solid #a95648;
  border-radius: 4px;
  padding: 8px 12px;
  color: #f2c4bc;
  background: rgba(74, 31, 25, 0.94);
  font-size: 0.78rem;
  transform: translateX(-50%);
}

.scene,
.combat-scene {
  display: grid;
  place-content: center;
  width: min(100%, 680px);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 68px);
  text-align: center;
}

.town-scene {
  display: block;
  width: min(100%, 780px);
  padding-block: 42px;
  text-align: left;
}

.town-intro {
  text-align: center;
}

.town-intro .health-meter {
  width: min(100%, 340px);
  margin: 0 auto 30px;
}

.town-primary-actions {
  display: grid;
  place-items: center;
  margin: 0 0 20px;
}

.town-navigation {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 28px;
  border-top: 1px solid #4f5838;
  border-bottom: 1px solid #4f5838;
}

.town-navigation a {
  padding: 11px 8px;
  border-left: 1px solid #4f5838;
  color: #c5d676;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.town-navigation a:first-child {
  border-left: 0;
}

.town-navigation a:hover,
.town-navigation a:focus-visible {
  color: #11130c;
  background: #c5d676;
  outline: 2px solid #f6c970;
  outline-offset: -2px;
}

.town-section {
  scroll-margin-top: 18px;
  margin-top: 34px;
  border-top: 1px solid #4f5838;
  padding-top: 24px;
}

.town-section > .eyebrow {
  margin-bottom: 18px;
  color: #f0c878;
}

.town-section > summary {
  display: none;
  color: #f0c878;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  list-style: none;
  text-transform: uppercase;
}

.town-section > summary::-webkit-details-marker {
  display: none;
}

/* Details behave as ordinary expanded sections on desktop. */
.town-section:not([open]) > :not(summary) {
  display: revert;
}

.town-section > .armory:first-of-type,
.town-section > .town-shops:first-of-type,
.town-section > .world-conditions:first-of-type {
  margin-top: 0;
}

.town-community > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.town-community .command-button {
  text-decoration: none;
}

.town-status,
.arrival-summary {
  display: grid;
  width: min(100%, 360px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto 22px;
  border-top: 1px solid #53603b;
  border-bottom: 1px solid #53603b;
  padding: 12px 0;
  text-align: left;
}

.arrival-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 520px);
  margin-bottom: 28px;
}

.town-status dd,
.arrival-summary dd {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  line-height: 1.35;
}

.town-arrival-scene {
  border-top: 1px solid #c5d676;
  border-bottom: 1px solid #c5d676;
  background: rgba(72, 87, 43, 0.18);
}

.town-arrival-scene h1:focus {
  outline: 2px solid #f6c970;
  outline-offset: 8px;
}

.arrival-depth {
  margin: 12px 0 0;
  color: #aeb39d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.arrival-depth strong {
  margin-left: 6px;
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.world-first {
  width: min(100%, 440px);
  margin: 20px auto 0;
  border-top: 1px solid #d6b452;
  border-bottom: 1px solid #d6b452;
  padding: 10px 0;
  color: #f3dd91;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.gold-readout {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 20px;
  color: #aeb19f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gold-readout strong {
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.55rem;
  letter-spacing: 0;
}

.town-feedback {
  margin: 0 0 20px;
  border: 1px solid #819156;
  padding: 9px 12px;
  color: #d9e693;
  background: rgba(72, 87, 43, 0.24);
  font-size: 0.82rem;
  text-align: center;
}

.equipment-summary,
.armory,
.gem-pouch,
.crafting-materials,
.forge,
.jeweler,
.weapon-history,
.town-derived,
.combat-build,
.specialization-choice,
.specialization-history,
.town-shops {
  margin: 0 0 24px;
  border-top: 1px solid #53603b;
  padding-top: 14px;
}

.world-conditions {
  margin: 0 0 24px;
  border-top: 1px solid #53603b;
  border-bottom: 1px solid #53603b;
  padding: 14px 0;
}

.world-conditions h2 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.3rem;
  font-weight: 400;
}

.world-condition-description,
.world-conditions.quiet > p:not(.eyebrow) {
  max-width: 56ch;
  margin: 8px 0 0;
  color: #c5c9b6;
  font-size: 0.82rem;
  line-height: 1.5;
}

.world-conditions dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
  border-top: 1px solid #465138;
  padding-top: 12px;
}

.world-conditions dl div {
  min-width: 0;
}

.world-conditions dd {
  overflow-wrap: anywhere;
  color: #f1d888;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 0.88rem;
  line-height: 1.25;
}

.world-conditions.active {
  border-color: #9b7f45;
  background: rgba(104, 62, 28, 0.12);
}

.world-conditions.active .eyebrow {
  color: #efbd72;
}

.world-conditions.quiet h2 {
  color: #c9d7a3;
}

.encounter-world-event {
  margin: 8px 0 0;
  color: #efbd72;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.town-routes,
.world-history {
  margin: 0 0 24px;
  border-top: 1px solid #53603b;
  padding-top: 14px;
}

.town-routes ol,
.world-history ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.town-routes li,
.world-history li {
  display: grid;
  gap: 5px;
  border-top: 1px solid #465138;
  padding: 10px 0;
}

.town-routes li:first-child,
.world-history li:first-child {
  border-top: 0;
  padding-top: 0;
}

.town-routes li > div,
.world-history li > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.town-routes strong,
.world-history strong {
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
  font-weight: 400;
}

.town-routes span,
.world-history span {
  color: #f6c970;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.town-routes li > p,
.world-history li > p {
  margin: 0;
  color: #aeb39d;
  font-size: 0.76rem;
  line-height: 1.4;
}

.frontier-unknown {
  margin: 4px 0 0;
  border-top: 1px solid #465138;
  padding-top: 12px;
  color: #c5d676;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.equipment-grid,
.town-derived dl,
.combat-build dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.equipment-grid dd {
  display: grid;
  gap: 4px;
}

.equipment-grid dd span {
  color: #c5d676;
  font-size: 0.76rem;
  font-weight: 400;
}

.armory-heading,
.gem-pouch-heading,
.weapon-card-heading,
.weapon-shop-item,
.weapon-comparison {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.armory-heading > div > p:not(.eyebrow) {
  margin: 0;
  color: #aeb19f;
  font-size: 0.78rem;
}

.gem-pouch-heading {
  align-items: center;
}

.gem-pouch-heading > p {
  display: grid;
  gap: 3px;
  margin: 0;
  text-align: right;
}

.gem-pouch-heading span,
.gem-pouch-heading strong {
  font-size: 0.74rem;
}

.gem-pouch-heading span {
  color: #9da18c;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gem-pouch-heading strong {
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
}

.armory-capacity {
  display: grid;
  gap: 3px;
  margin: 0;
  text-align: right;
}

.armory-capacity span,
.weapon-rarity,
.weapon-comparison span {
  color: #9da18c;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.armory-capacity strong,
.weapon-comparison strong {
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
}

.armory-equipped,
.armory-inventory,
.weapon-mastery,
.weapon-history .weapon-mastery {
  margin-top: 18px;
  border-top: 1px solid #4c573a;
  padding-top: 14px;
}

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

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

.gem-card {
  display: flex;
  min-width: 0;
  min-height: 142px;
  flex-direction: column;
  border: 1px solid #4d5940;
  border-radius: 6px;
  padding: 12px;
  background: rgba(30, 40, 31, 0.54);
}

.gem-tier,
.socket-equipment-type {
  margin: 0;
  color: #a9ca8b;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gem-card h3,
.socket-equipment-card h3 {
  margin: 5px 0 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
  font-weight: 400;
}

.gem-effect {
  margin: 10px 0 0;
  color: #dce5ba;
  font-size: 0.78rem;
  line-height: 1.35;
}

.gem-count {
  margin: auto 0 0;
  color: #9da18c;
  font-size: 0.7rem;
}

.gem-command {
  width: 100%;
  margin-top: 12px;
  padding-inline: 8px;
}

.gem-pouch-empty,
.jeweler-idle,
.socket-none,
.socket-empty-state,
.forge-idle,
.crafting-unavailable,
.item-modification-history.empty {
  margin: 0;
  color: #9da18c;
  font-size: 0.8rem;
}

.crafting-materials dl,
.forge-item-details,
.crafting-cost dl,
.forge-result dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.crafting-materials dl {
  border-top: 1px solid #4c573a;
  border-bottom: 1px solid #4c573a;
  padding: 12px 0;
}

.crafting-materials dd,
.crafting-cost dd {
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 0.96rem;
}

.crafting-statistics {
  margin: 10px 0 0;
  color: #bfc8a0;
  font-size: 0.76rem;
}

.forge > .eyebrow {
  margin-bottom: 12px;
}

.forge-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.forge-item {
  display: grid;
  min-width: 0;
  min-height: 100px;
  gap: 5px;
  border: 1px solid #4d5940;
  border-radius: 6px;
  padding: 12px;
  color: #f0ecdc;
  background: rgba(30, 40, 31, 0.42);
  text-align: left;
  cursor: pointer;
}

.forge-item:hover,
.forge-item:focus-visible,
.forge-item.selected {
  border-color: #c5d676;
  outline: 0;
}

.forge-item > span,
.forge-item > small {
  color: #a9ca8b;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.forge-item > strong {
  overflow-wrap: anywhere;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
}

.forge-workbench {
  margin-top: 14px;
  border-top: 1px solid #778653;
  border-bottom: 1px solid #778653;
  padding: 13px 0;
}

.forge-workbench > .eyebrow:focus {
  outline: 2px solid #f6c970;
  outline-offset: 5px;
}

.forge-item-details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.forge-affix-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.forge-affix-action,
.socket-addition,
.gem-extraction {
  display: grid;
  gap: 10px;
  border: 1px solid #4d5940;
  border-radius: 6px;
  padding: 12px;
  background: rgba(29, 35, 23, 0.48);
}

.forge-affix-action > p,
.socket-addition > p,
.gem-extraction > p {
  margin: 0;
  color: #e4e7d1;
  font-size: 0.78rem;
  line-height: 1.4;
}

.crafting-cost {
  margin: 0;
  border-top: 1px solid #485339;
  padding-top: 9px;
}

.crafting-cost > p,
.item-modification-history > p {
  margin: 0 0 7px;
  color: #9da18c;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crafting-cost dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.crafting-cost dt,
.crafting-cost dd {
  font-size: 0.67rem;
}

.crafting-cost dd {
  margin-top: 2px;
}

.crafting-unavailable {
  color: #d7bc85;
  line-height: 1.35;
}

.item-modification-history {
  margin-top: 14px;
  border-top: 1px solid #485339;
  padding-top: 11px;
}

.item-modification-history ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: #c9cfb5;
  font-size: 0.74rem;
  line-height: 1.35;
}

.forge-result {
  margin-top: 14px;
  border-top: 1px solid #b3974a;
  border-bottom: 1px solid #b3974a;
  padding: 11px 0;
}

.forge-result .eyebrow {
  color: #f1ce76;
}

.socket-addition {
  margin-top: 12px;
}

.gem-extraction {
  margin: 0 0 12px;
  border-color: #756a45;
}

.forge-dialog {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(calc(100% - 36px), 500px);
  max-height: calc(100% - 56px);
  gap: 12px;
  overflow: auto;
  border: 1px solid #c8a650;
  border-radius: 6px;
  padding: clamp(20px, 5vw, 32px);
  color: #f0ecdc;
  background: #252416;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.64);
  text-align: left;
  transform: translate(-50%, -50%);
}

.forge-dialog h2 {
  margin: 0;
  color: #f3d785;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 400;
}

.forge-dialog .eyebrow {
  margin-bottom: -5px;
}

.forge-dialog-item {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
}

.forge-dialog > dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.forge-warning,
.forge-error {
  margin: 0;
  color: #e5bc8d;
  font-size: 0.8rem;
  line-height: 1.45;
}

.forge-error {
  border-top: 1px solid #a95648;
  padding-top: 9px;
  color: #f2b5a8;
}

.forge-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.gem-bonus-summary {
  display: grid;
  gap: 4px;
  margin: 14px 0 0;
  border-top: 1px solid #4c573a;
  padding-top: 10px;
  color: #d8e590;
  font-size: 0.78rem;
}

.affix-bonus-summary {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  border-top: 1px solid #4c573a;
  padding-top: 10px;
  color: #f0d697;
  font-size: 0.78rem;
}

.affix-bonus-summary span {
  color: #9da18c;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gem-bonus-summary span {
  color: #9da18c;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.armory-empty {
  margin: 0;
  color: #9da18c;
  font-size: 0.82rem;
}

.weapon-card {
  display: flex;
  min-width: 0;
  min-height: 238px;
  flex-direction: column;
  border: 1px solid #4f5a39;
  border-radius: 6px;
  padding: 14px;
  background: rgba(31, 37, 23, 0.62);
  text-align: left;
}

.weapon-card.equipped-weapon {
  border-color: #a89751;
  background: rgba(78, 66, 31, 0.22);
}

.weapon-card-heading h3 {
  margin: 3px 0 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.2;
}

.weapon-rarity {
  margin: 0;
}

.weapon-rarity.rarity-uncommon {
  color: #b9d17a;
}

.weapon-rarity.rarity-rare {
  color: #f0b779;
}

.weapon-rarity.rarity-unique {
  color: #ffad7e;
}

.weapon-card.unique-weapon {
  border-color: #d67c59;
  background: rgba(95, 45, 28, 0.24);
}

.equipped-status {
  margin: 0;
  border: 1px solid #9d9150;
  padding: 3px 6px;
  color: #f3d887;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.weapon-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0 0;
}

.weapon-details div {
  min-width: 0;
}

.weapon-details dt {
  font-size: 0.61rem;
}

.weapon-details dd {
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.weapon-trait {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  border-top: 1px solid #414b30;
  padding-top: 10px;
}

.weapon-trait > p,
.weapon-trait > strong,
.weapon-trait > span {
  margin: 0;
}

.weapon-trait > p {
  color: #9da18c;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weapon-trait > strong {
  color: #d8e590;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.weapon-trait > span {
  color: #c4c8b7;
  font-size: 0.76rem;
  line-height: 1.4;
}

.combat-build > p:last-child {
  margin: 12px 0 0;
  color: #c4c8b7;
  font-size: 0.8rem;
  line-height: 1.45;
}

.specialization-choice h2,
.specialization-dialog h2 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.15;
}

.specialization-intro,
.specialization-dialog-effect,
.specialization-warning,
.specialization-error {
  margin: 9px 0 0;
  color: #c8cdb9;
  font-size: 0.82rem;
  line-height: 1.5;
}

.specialization-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.specialization-option {
  display: grid;
  min-width: 0;
  min-height: 146px;
  align-content: start;
  gap: 7px;
  border: 1px solid #64734a;
  border-radius: 6px;
  padding: 13px;
  color: #d3d8c3;
  background: rgba(38, 47, 28, 0.58);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.specialization-option:hover,
.specialization-option:focus-visible {
  border-color: #d0ba69;
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.specialization-option strong {
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.15;
}

.specialization-option span {
  color: #bdc5ac;
  font-size: 0.76rem;
  line-height: 1.4;
}

.specialization-option-context {
  margin-top: auto;
  color: #e4cb79;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.specialization-dialog {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(calc(100% - 36px), 500px);
  max-height: calc(100% - 56px);
  gap: 12px;
  overflow: auto;
  border: 1px solid #9bb474;
  border-radius: 6px;
  padding: clamp(20px, 5vw, 32px);
  color: #f0ecdc;
  background: #1f291b;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.64);
  text-align: left;
  transform: translate(-50%, -50%);
}

.specialization-dialog .eyebrow {
  color: #d8e590;
}

.specialization-warning {
  border-top: 1px solid #6d7e4d;
  padding-top: 10px;
  color: #e2d493;
}

.specialization-error {
  border-top: 1px solid #a95648;
  padding-top: 9px;
  color: #f2b5a8;
}

.specialization-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.codex-defense,
.enemy-defense {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px 0 0;
}

.codex-defense {
  border-top: 1px solid #465138;
  padding-top: 10px;
}

.codex-defense dt,
.enemy-defense dt {
  color: #9da18c;
  font-size: 0.62rem;
}

.codex-defense dd,
.enemy-defense dd {
  margin: 4px 0 0;
  color: #d8e590;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.socket-display {
  margin: 12px 0 0;
  border-top: 1px solid #414b30;
  padding-top: 10px;
}

.socket-display > p {
  margin: 0 0 6px;
  color: #9da18c;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.socket-display ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  color: #dfe4cf;
  font-size: 0.74rem;
  line-height: 1.35;
  list-style: none;
}

.socket-display.socket-none {
  border-top: 1px solid #414b30;
  padding-top: 10px;
}

.affix-display {
  margin: 12px 0 0;
  border-top: 1px solid #414b30;
  padding-top: 10px;
}

.affix-display > p {
  margin: 0 0 6px;
  color: #9da18c;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.affix-display ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  color: #f0d697;
  font-size: 0.74rem;
  line-height: 1.35;
  list-style: none;
}

.affix-display.affix-none {
  color: #9da18c;
  font-size: 0.74rem;
}

.weapon-comparison {
  align-items: center;
  margin: auto 0 0;
  border-top: 1px solid #414b30;
  padding-top: 10px;
}

.weapon-training-note {
  margin: 9px 0 0;
  color: #d9d08e;
  font-size: 0.76rem;
  line-height: 1.4;
}

.weapon-command {
  width: 100%;
  margin-top: 12px;
  padding-inline: 10px;
}

.weapon-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.weapon-card-actions .weapon-command {
  margin-top: 0;
}

.item-favorite {
  min-height: 40px;
  border: 1px solid #9d9150;
  border-radius: 4px;
  padding: 8px 10px;
  color: #f4d985;
  background: rgba(86, 68, 26, 0.28);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.item-favorite[aria-pressed="false"] {
  border-color: #5c6844;
  color: #b5bc9c;
  background: transparent;
}

.item-favorite:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.favorite-protection-note {
  margin: 10px 0;
  color: #f0d697;
  font-size: 0.76rem;
  line-height: 1.4;
  text-align: center;
}

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

.mastery-entry {
  min-width: 0;
  border-top: 1px solid #4a5535;
  padding-top: 8px;
}

.mastery-entry > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: #dcd8c9;
  font-size: 0.76rem;
}

.mastery-entry > div strong {
  color: #f0ecdc;
  font-size: 0.76rem;
}

.mastery-entry p {
  margin: 5px 0 0;
  color: #9da18c;
  font-size: 0.66rem;
}

.jeweler > .eyebrow {
  margin-bottom: 12px;
}

.socket-equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.socket-equipment-card {
  min-width: 0;
  border: 1px solid #4d5940;
  border-radius: 6px;
  padding: 12px;
  background: rgba(30, 40, 31, 0.42);
}

.socket-choice-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.socket-choice {
  min-height: 38px;
  border: 1px solid #52603d;
  border-radius: 4px;
  padding: 7px 9px;
  color: #e7e8d8;
  background: rgba(26, 32, 22, 0.72);
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.socket-choice:hover,
.socket-choice:focus-visible,
.socket-choice.selected {
  border-color: #c5d676;
  color: #f4f0df;
  outline: 0;
}

.socket-picker {
  margin-top: 14px;
  border-top: 1px solid #778653;
  border-bottom: 1px solid #778653;
  padding: 13px 0;
}

.socket-replacement-warning {
  margin: 8px 0 12px;
  color: #e5bc8d;
  font-size: 0.8rem;
  line-height: 1.45;
}

.town-shops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #495437;
  border-bottom: 1px solid #495437;
}

.town-shop {
  min-width: 0;
  padding: 18px;
}

.town-shop + .town-shop {
  border-left: 1px solid #495437;
}

.blacksmith-shop {
  grid-column: 1 / -1;
  border-bottom: 1px solid #495437;
}

.blacksmith-shop + .town-shop {
  border-left: 0;
}

.weapon-shop-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.weapon-shop-item {
  align-items: center;
  border-top: 1px solid #4c573a;
  padding-top: 8px;
}

.weapon-shop-item > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.weapon-shop-item strong {
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 0.92rem;
  font-weight: 400;
}

.weapon-shop-item span {
  color: #aeb19f;
  font-size: 0.68rem;
  line-height: 1.35;
}

.weapon-shop-trait {
  display: grid;
  gap: 2px;
  margin: 3px 0 0;
  color: #c4c8b7;
  font-size: 0.7rem;
  line-height: 1.35;
}

.weapon-shop-trait b {
  color: #d8e590;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.weapon-shop-item .shop-purchase {
  width: auto;
  min-width: 92px;
  margin-top: 0;
}

.shop-current {
  display: grid;
  gap: 4px;
  min-height: 54px;
  margin: 0 0 16px;
}

.shop-current strong,
.shop-next strong {
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.08rem;
  font-weight: 400;
}

.shop-current span,
.shop-next p {
  margin: 0;
  color: #c5d676;
  font-size: 0.78rem;
}

.shop-next {
  display: grid;
  gap: 5px;
  min-height: 116px;
  border-top: 1px solid #4c573a;
  padding-top: 12px;
}

.shop-next > span,
.shop-cost,
.shop-note {
  color: #aeb19f !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shop-cost {
  color: #f6c970 !important;
  font-weight: 800;
}

.shop-purchase {
  width: 100%;
  margin-top: 14px;
  padding-inline: 10px;
}

.shop-note {
  min-height: 32px;
  margin: 10px 0 0;
  line-height: 1.4;
}

.scene h1,
.enemy-readout h1 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.expedition-context {
  display: grid;
  gap: 4px;
  width: min(100%, 380px);
  margin: 8px auto 0;
  color: #c5d676;
  font-size: 0.78rem;
  line-height: 1.4;
}

.expedition-context p {
  margin: 0;
}

.expedition-context strong {
  margin-left: 5px;
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
}

.scene-copy {
  max-width: 38ch;
  margin: 18px auto 28px;
  color: #c2c5b4;
  line-height: 1.55;
}

.scene .health-meter {
  width: min(100%, 340px);
  margin: 0 auto 28px;
  text-align: left;
}

.epitaph {
  max-width: 34ch;
  margin: -8px auto 24px;
  color: #d5a99f;
  font-family: Georgia, "Palatino Linotype", serif;
  font-style: italic;
  line-height: 1.45;
}

.command-button {
  min-height: 46px;
  border: 1px solid #899558;
  border-radius: 4px;
  padding: 10px 20px;
  color: #10120c;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

.command-button:hover,
.command-button:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

button:disabled {
  border-color: #5a604e;
  color: #888d7b;
  background: #2a2e23;
  cursor: not-allowed;
}

.primary-command {
  background: #c5d676;
}

.quiet-command {
  border-color: #8a8e79;
  background: transparent;
  color: #e5e2d5;
}

.combat-scene {
  grid-template-rows: auto minmax(230px, 1fr) auto auto auto auto;
  align-content: stretch;
  gap: clamp(14px, 3vw, 26px);
  padding-block: 34px;
}

.enemy-readout,
.player-readout {
  width: min(100%, 420px);
  margin: 0 auto;
  text-align: center;
}

.enemy-readout h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.level-label {
  margin: 8px 0 16px;
  color: #b9bbab;
}

.region-label {
  margin: 0 0 8px;
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.05rem;
  line-height: 1.25;
}

.boss-status {
  display: inline-block;
  margin: 10px 0 0;
  border: 1px solid #d4875f;
  padding: 5px 8px;
  color: #f2c4a5;
  background: rgba(106, 49, 34, 0.24);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: landmark-arrive 260ms ease-out both;
}

.elite-status {
  display: inline-block;
  margin: 10px 0 0;
  border: 1px solid #d6b452;
  padding: 5px 8px;
  color: #f3dd91;
  background: rgba(107, 80, 22, 0.28);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.named-status {
  display: inline-block;
  margin: 10px 0 0;
  border: 1px solid #e28a67;
  padding: 5px 8px;
  color: #ffd0af;
  background: rgba(118, 49, 32, 0.3);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: landmark-arrive 260ms ease-out both;
}

.enemy-readout .health-meter,
.player-readout .health-meter {
  text-align: left;
}

.enemy-defense {
  width: min(100%, 340px);
  margin-inline: auto;
  text-align: left;
}

.combat-area {
  position: relative;
  display: grid;
  min-height: 230px;
  place-content: center;
  overflow: hidden;
  border: 1px solid #6e7950;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(197, 214, 118, 0.05) 0 1px,
      transparent 1px 12px
    ),
    #252b1c;
  cursor: crosshair;
  user-select: none;
  touch-action: manipulation;
}

.combat-area:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 4px;
}

.combat-mark {
  color: #d8e590;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(5rem, 15vw, 10rem);
  line-height: 0.8;
}

.combat-status {
  margin: 18px 0 0;
  color: #ced1be;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hit-feedback {
  position: absolute;
  top: 22%;
  left: 50%;
  margin: 0;
  color: #f6c970;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 800;
  transform: translateX(-50%);
  animation: hit-rise 520ms ease-out both;
  pointer-events: none;
}

.hit-feedback.cast {
  color: #96d4ce;
}

.hit-feedback.critical,
.critical-banner {
  color: #f5d46f;
}

.critical-banner {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: critical-accent 420ms ease-out both;
}

.combat-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  text-align: center;
}

.combat-command {
  min-width: 0;
  border-top: 1px solid #53603b;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  padding-top: 12px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.combat-controls span,
.combat-controls strong {
  display: block;
}

.combat-controls span {
  color: #9da18c;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.combat-controls strong {
  margin-top: 4px;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.15rem;
}

.combat-command:hover strong,
.combat-command:focus-visible strong {
  color: #f6c970;
}

.combat-command:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 4px;
}

.health-warning {
  margin: 10px 0 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: center;
}

.health-warning.danger {
  color: #f0af4d;
}

.health-warning.critical {
  color: #f37a6d;
}

.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin: 0 auto 26px;
}

.reward-grid div {
  min-width: 0;
  border-top: 1px solid #65714a;
  padding-top: 10px;
}

.reward-grid span,
.reward-grid strong {
  display: block;
}

.reward-grid span {
  color: #aeb19f;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.reward-grid strong {
  margin-top: 5px;
  color: #f6c970;
}

.victory-crafting-rewards {
  width: min(100%, 360px);
  margin: -10px auto 22px;
  border-top: 1px solid #61704a;
  border-bottom: 1px solid #61704a;
  padding: 10px 0;
  text-align: center;
}

.victory-crafting-rewards .eyebrow {
  margin-bottom: 7px;
}

.victory-crafting-rewards ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 12px;
  margin: 0;
  padding: 0;
  color: #dce5ba;
  font-size: 0.78rem;
  list-style: none;
}

.victory-crafting-rewards strong {
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
}

.choice-prompt {
  margin: 10px 0 15px;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.25rem;
}

.level-ups {
  width: min(100%, 380px);
  margin: 0 auto 22px;
  border-top: 1px solid #7f8d53;
  border-bottom: 1px solid #7f8d53;
  padding: 10px 0;
}

.level-ups p {
  margin: 5px 0;
  color: #d9e693;
  font-size: 0.88rem;
}

.second-wind {
  width: min(100%, 380px);
  margin: 0 auto 22px;
  border-top: 1px solid #f6c970;
  border-bottom: 1px solid #f6c970;
  padding: 12px 0;
  text-align: center;
  animation: second-wind-arrive 440ms ease-out both;
}

.second-wind .eyebrow {
  color: #f6c970;
}

.second-wind h2 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.05rem;
  font-weight: 400;
}

.second-wind > p:last-child {
  margin: 7px 0 0;
  color: #d9e693;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.05rem;
}

.world-first-discovery {
  width: min(100%, 440px);
  margin: 0 auto 22px;
  border-top: 1px solid #e28a67;
  border-bottom: 1px solid #e28a67;
  padding: 14px 0;
  text-align: center;
  animation: landmark-arrive 340ms ease-out both;
}

.world-first-discovery h2 {
  margin: 0;
  color: #ffd0af;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.4rem;
  font-weight: 400;
}

.world-first-discovery > p:not(.eyebrow) {
  margin: 8px auto 0;
  color: #f2c4a5;
  font-size: 0.84rem;
  line-height: 1.45;
}

.weapon-loot,
.gem-loot {
  width: min(100%, 520px);
  margin: 0 auto 22px;
  border-top: 1px solid #a89751;
  border-bottom: 1px solid #a89751;
  padding: 14px 0;
  text-align: left;
}

.weapon-loot > .eyebrow,
.gem-loot > .eyebrow {
  text-align: center;
}

.weapon-loot .weapon-card,
.gem-loot .gem-card {
  margin: 0 auto;
}

.loot-inventory-full,
.loot-resolved {
  margin: 14px 0;
  color: #d9d08e;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.loot-resolved {
  color: #d9e693;
}

.loot-replacement-grid {
  margin: 0 0 12px;
}

.weapon-loot > .command-button,
.gem-loot > .command-button {
  display: block;
  margin: 0 auto;
}

.gem-pouch-full {
  margin: 14px 0;
  color: #e5bc8d;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.victory-survival {
  width: min(100%, 380px);
  margin: 0 auto 22px;
  text-align: left;
}

.victory-survival > p {
  display: flex;
  justify-content: space-between;
  margin: 10px 0 0;
  color: #c0c5ae;
  font-size: 0.82rem;
}

.victory-survival > p span {
  color: #f0ecdc;
}

.journey-stats,
.combat-log {
  width: min(100%, 420px);
  margin: 0 auto;
  border-top: 1px solid #53603b;
  padding-top: 12px;
  text-align: left;
}

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

.journey-regions {
  margin: 12px 0 0;
  color: #d5d8c7;
  font-size: 0.78rem;
  line-height: 1.5;
}

.journey-regions span {
  display: block;
  margin-bottom: 3px;
  color: #9da18c;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.region-records {
  margin: 0 0 24px;
  border-top: 1px solid #53603b;
  padding-top: 14px;
}

.loot-records {
  margin: 0 0 24px;
  border-top: 1px solid #53603b;
  padding-top: 14px;
}

.loot-records dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.loot-records dd {
  overflow-wrap: anywhere;
  font-size: 0.85rem;
  line-height: 1.35;
}

.region-records dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.region-records dd {
  overflow-wrap: anywhere;
  font-size: 0.85rem;
  line-height: 1.35;
}

.journey-stats dt {
  font-size: 0.64rem;
}

.journey-stats dd {
  font-size: 0.86rem;
}

.character-journey,
.feat-collection,
.world-records {
  margin: 24px 0 0;
  border-top: 1px solid #53603b;
  padding-top: 14px;
  text-align: left;
}

.character-journey > dl,
.world-records dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.character-journey dd,
.world-records dd {
  overflow-wrap: anywhere;
  font-size: 0.84rem;
  line-height: 1.35;
}

.journey-history-list {
  margin-top: 16px;
  border-left: 2px solid #647245;
  padding-left: 10px;
}

.journey-history-list > p {
  margin: 0 0 7px;
  color: #9da18c;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-history-list ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-history-list li,
.world-records dd {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.journey-history-list li span,
.world-records dd span {
  color: #c7cdb8;
}

.journey-history-list li strong,
.world-records dd strong {
  color: #f0ecdc;
  font-weight: 700;
}

.feat-category + .feat-category {
  margin-top: 18px;
}

.feat-category h3 {
  margin: 0 0 8px;
  color: #d7c48d;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
  font-weight: 400;
}

.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.feat-entry {
  min-height: 132px;
  border: 1px solid #4f5838;
  border-radius: 4px;
  padding: 12px;
  background: rgba(18, 23, 14, 0.58);
}

.feat-entry.earned {
  border-left: 3px solid #c5d676;
}

.feat-entry.unearned {
  color: #9fa593;
  background: rgba(18, 20, 15, 0.36);
}

.feat-status {
  margin: 0 0 6px;
  color: #9da18c;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.feat-entry.earned .feat-status {
  color: #d8e590;
}

.feat-entry h4 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
  font-weight: 400;
}

.feat-entry > p:not(.feat-status) {
  margin: 7px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.feat-entry small {
  display: block;
  margin-top: 9px;
  color: #c5cdb6;
  font-size: 0.68rem;
}

.feat-empty {
  margin: 0;
  color: #9da18c;
  font-size: 0.84rem;
}

.feat-collection.compact .feat-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.feat-collection.compact .feat-entry {
  min-height: 0;
}

.frontier-adventurer-disclosure {
  display: block;
  margin-top: 3px;
  color: #d7c48d !important;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.history-notice-stack {
  position: fixed;
  z-index: 30;
  top: 18px;
  right: 18px;
  display: grid;
  width: min(calc(100vw - 36px), 330px);
  gap: 8px;
  pointer-events: none;
}

.history-notice {
  border: 1px solid #8f9d5b;
  border-left-width: 4px;
  border-radius: 4px;
  padding: 11px 13px;
  color: #f0ecdc;
  background: rgba(31, 39, 20, 0.96);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  animation: history-notice-enter 180ms ease-out both;
}

.history-notice.record-notice {
  border-color: #d7a85d;
  background: rgba(54, 40, 18, 0.96);
}

.history-notice .eyebrow {
  margin: 0 0 4px;
}

.history-notice strong {
  display: block;
  overflow-wrap: anywhere;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 0.96rem;
  font-weight: 400;
  line-height: 1.3;
}

.combat-log ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.combat-log li {
  color: #bfc3ae;
  font-size: 0.78rem;
  line-height: 1.35;
}

.combat-trait-label {
  display: block;
  margin-bottom: 3px;
  color: #d8e590;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.combat-hit-list {
  display: grid;
  gap: 3px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.combat-hit-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-left: 2px solid #758650;
  padding-left: 8px;
  color: #d8ddca;
  font-size: 0.72rem;
}

.combat-hit-list strong {
  color: inherit;
  font-weight: 700;
}

.combat-log .log-melee {
  color: #f1d182;
}

.combat-log .log-cast {
  color: #96d4ce;
}

.combat-log .log-enemy,
.combat-log .log-death {
  color: #eb9387;
}

.combat-log .log-victory,
.combat-log .log-journey {
  color: #c5d676;
}

.combat-log .log-legend {
  color: #ffad7e;
}

.command-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.death-scene {
  border-left: 4px solid #a95648;
  background: rgba(89, 37, 29, 0.17);
}

.death-scene .scene-copy {
  color: #e2b1a6;
}

.region-transition-scene {
  border-top: 1px solid #8d9b5c;
  border-bottom: 1px solid #8d9b5c;
  background: rgba(68, 81, 42, 0.2);
}

.region-transition-scene .scene-copy {
  color: #d9ddc6;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.08rem;
}

.transition-depth {
  margin: 0 0 28px;
  color: #aeb39d;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.transition-depth strong {
  margin-left: 6px;
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.death-stats {
  width: min(100%, 390px);
  margin: 0 auto 28px;
  padding-top: 15px;
  border-color: #81493e;
  text-align: left;
}

.weapon-history {
  width: min(100%, 420px);
  margin: 0 auto 28px;
  text-align: left;
}

.crafting-loss {
  width: min(100%, 420px);
  margin: 0 auto 28px;
  border-top: 1px solid #a86a50;
  border-bottom: 1px solid #a86a50;
  padding: 14px 0;
  text-align: left;
}

.crafting-loss dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.crafting-loss dd {
  color: #f4c89f;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 0.9rem;
}

.crafting-loss > p:not(.eyebrow) {
  margin: 12px 0 0;
  color: #d9b8ae;
  font-size: 0.76rem;
  line-height: 1.45;
}

.legend-history {
  width: min(100%, 420px);
  margin: 0 auto 28px;
  border-top: 1px solid #a86a50;
  border-bottom: 1px solid #a86a50;
  padding: 14px 0;
  text-align: left;
}

.legend-history dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.legend-history dd {
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  line-height: 1.35;
}

.legend-unique-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.legend-unique-list li {
  display: grid;
  gap: 3px;
  border-top: 1px solid #6c4638;
  padding-top: 8px;
}

.legend-unique-list strong {
  color: #ffd0af;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
  font-weight: 400;
}

.legend-unique-list span,
.legend-unique-list p {
  margin: 0;
  color: #c8b4a7;
  font-size: 0.76rem;
  line-height: 1.4;
}

.legend-unique-list p {
  color: #f0c18f;
}

.weapon-favorite {
  margin: 12px 0 0;
  color: #aeb19f;
  font-size: 0.78rem;
}

.weapon-favorite strong {
  margin-left: 6px;
  color: #f6c970;
}

.danger-dialog {
  position: fixed;
  z-index: 30;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 36px), 470px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  border: 1px solid #d47753;
  border-radius: 6px;
  padding: clamp(22px, 5vw, 36px);
  color: #f0ecdc;
  background: #2a1b15;
  box-shadow:
    0 0 0 100vmax rgba(7, 8, 6, 0.82),
    0 18px 42px rgba(0, 0, 0, 0.58);
  text-align: center;
  transform: translate(-50%, -50%);
}

.danger-dialog h2 {
  margin: 0;
  color: #f2b099;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 400;
}

.danger-dialog > p:not(.eyebrow) {
  max-width: 38ch;
  margin: 14px auto 22px;
  color: #d9b8ae;
  line-height: 1.5;
}

.danger-command {
  border-color: #d47753;
  background: #dc7657;
}

.character-name-form {
  display: grid;
  width: min(100%, 310px);
  gap: 8px;
  margin: 0 auto 20px;
  text-align: left;
}

.character-name-prompt {
  position: fixed;
  z-index: 30;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 36px), 460px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  border: 1px solid #8c9b58;
  border-radius: 6px;
  padding: clamp(22px, 5vw, 36px);
  color: #e8e5d8;
  background: #202518;
  box-shadow:
    0 0 0 100vmax rgba(7, 8, 6, 0.82),
    0 18px 42px rgba(0, 0, 0, 0.54);
  text-align: center;
  transform: translate(-50%, -50%);
}

.character-name-prompt h2 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 400;
}

.character-name-prompt > p:not(.eyebrow) {
  margin: 12px auto 22px;
  color: #bfc3ad;
}

.character-name-form label {
  color: #d7b1a8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.character-name-form div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.character-name-form input {
  min-width: 0;
  border: 1px solid #ab7057;
  border-radius: 4px;
  padding: 10px 12px;
  color: #f0ecdc;
  background: #1d1713;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.character-name-form input:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 2px;
}

.game-footer {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #444c32;
  padding: 14px 24px;
  color: #929885;
  font-size: 0.75rem;
}

.game-footer p {
  margin: 0;
}

.chat-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  border: 1px solid #59623f;
  border-radius: 6px;
  background: rgba(23, 26, 18, 0.94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
}

.chat-shell > summary {
  display: none;
}

.chat-panel {
  padding: clamp(20px, 4vw, 34px);
}

.chat-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.chat-heading h2 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 400;
}

.chat-heading-status {
  display: grid;
  gap: 7px;
  justify-items: end;
}

.chat-presence,
.chat-status,
.chat-form > p {
  margin: 0;
  color: #9da18c;
  font-size: 0.75rem;
  line-height: 1.4;
}

.chat-presence {
  color: #f6c970;
  font-weight: 700;
  text-align: right;
}

.chat-event-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #aeb29f;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-event-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #c5d676;
  cursor: pointer;
}

.chat-event-toggle input:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.chat-tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 10px;
  border-bottom: 1px solid #4f5838;
}

.chat-tab {
  min-width: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 9px 4px 11px;
  color: #aeb29f;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-tab[aria-selected="true"] {
  border-bottom-color: #c5d676;
  color: #f0ecdc;
}

.chat-unread {
  margin-left: 7px;
  color: #f0c878;
  font-size: 0.62rem;
}

.chat-tab:focus-visible,
.chat-message-action:focus-visible,
.chat-older:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.chat-status {
  min-height: 21px;
  margin-bottom: 8px;
}

.chat-older {
  display: block;
  margin: 0 auto 10px;
  border: 0;
  color: #c5d676;
  background: transparent;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-message-list {
  display: grid;
  max-height: 420px;
  min-height: 210px;
  overflow-y: auto;
  margin: 0;
  border-top: 1px solid #465138;
  border-bottom: 1px solid #465138;
  padding: 0;
  list-style: none;
  scrollbar-color: #778653 #202519;
}

.chat-message,
.chat-empty-state {
  min-width: 0;
  border-top: 1px solid #3f492f;
  padding: 12px 0;
}

.chat-message:first-child,
.chat-empty-state:first-child {
  border-top: 0;
}

.chat-empty-state {
  display: grid;
  place-content: center;
  min-height: 210px;
  color: #9da18c;
  font-size: 0.82rem;
  text-align: center;
}

.chat-message > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.chat-message > header strong {
  overflow-wrap: anywhere;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 0.98rem;
  font-weight: 400;
}

.chat-message > header time {
  flex: 0 0 auto;
  color: #8f9581;
  font-size: 0.68rem;
}

.chat-message-body,
.chat-system-detail {
  margin: 5px 0 0;
  color: #d4d7c7;
  font-size: 0.84rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.chat-message-actions,
.chat-command-row,
.chat-moderation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.chat-message-action {
  border: 0;
  padding: 0;
  color: #aebf7b;
  background: transparent;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-system-message {
  border-top-color: #85674c;
  border-bottom: 1px solid #85674c;
  padding: 16px 14px;
  background: rgba(93, 71, 33, 0.18);
  text-align: center;
}

.chat-message-kind {
  margin: 0;
  color: #f0c878;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.chat-system-message h3 {
  margin: 5px 0 0;
  color: #f5dc99;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.1rem;
  font-weight: 400;
}

.chat-system-detail {
  color: #e3cfaa;
}

.chat-report-panel,
.chat-blocks,
.chat-moderation {
  margin-top: 12px;
  border: 1px solid #716246;
  padding: 12px;
  background: rgba(67, 54, 30, 0.2);
}

.chat-report-panel form,
.chat-moderation-controls {
  display: grid;
  gap: 9px;
}

.chat-report-panel label,
.chat-moderation label,
.chat-form label {
  color: #bfc9a0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-report-panel select,
.chat-moderation input,
.chat-form input {
  min-width: 0;
  border: 1px solid #5d6945;
  border-radius: 3px;
  padding: 10px 11px;
  color: #f0ecdc;
  background: #191d13;
  font: inherit;
  font-size: 0.84rem;
}

.chat-report-panel select:focus-visible,
.chat-moderation input:focus-visible,
.chat-form input:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 2px;
}

.chat-command {
  min-height: 38px;
  border: 1px solid #899558;
  border-radius: 3px;
  padding: 7px 11px;
  color: #11130c;
  background: #c5d676;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-command.quiet {
  border-color: #737b65;
  color: #d9ddce;
  background: transparent;
}

.chat-command:hover,
.chat-command:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.chat-moderation > summary {
  color: #f0c878;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.chat-blocks > summary {
  color: #c5d676;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.chat-blocks > ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.chat-blocks li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #66563d;
  padding-top: 8px;
  color: #d4d7c7;
  font-size: 0.8rem;
}

.chat-moderation > ol {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.chat-moderation-entry {
  display: grid;
  gap: 6px;
  border-top: 1px solid #66563d;
  padding-top: 12px;
}

.chat-moderation-entry strong {
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 0.96rem;
  font-weight: 400;
}

.chat-moderation-entry p,
.chat-moderation-entry code {
  margin: 0;
  color: #c2c6b3;
  font-size: 0.76rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.chat-moderation-entry code {
  color: #f0c878;
}

.chat-form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.chat-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.chat-form > p {
  text-align: right;
}

.leaderboards {
  width: min(100%, 1180px);
  margin: 0 auto;
  border: 1px solid #59623f;
  border-radius: 6px;
  padding: clamp(20px, 4vw, 34px);
  background: rgba(23, 26, 18, 0.94);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
}

.leaderboards-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.leaderboards-heading h2 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 400;
}

.player-rank {
  display: grid;
  gap: 3px;
  margin: 0;
  text-align: right;
}

.player-rank span {
  color: #9da18c;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-rank strong {
  color: #f6c970;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.25rem;
}

.leaderboard-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0 16px;
  border-bottom: 1px solid #4f5838;
}

.leaderboard-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 9px 4px 11px;
  color: #aeb29f;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.leaderboard-tab[aria-selected="true"] {
  border-bottom-color: #c5d676;
  color: #f0ecdc;
}

.leaderboard-tab:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.leaderboard-error {
  margin: 0 0 12px;
  color: #f2b09e;
  font-size: 0.82rem;
}

.leaderboard-table-wrap {
  overflow-x: auto;
  border: 1px solid #455033;
}

.leaderboard-table-wrap:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.leaderboard-table-wrap table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  text-align: left;
}

.leaderboard-table-wrap th,
.leaderboard-table-wrap td {
  border-bottom: 1px solid #3d472d;
  padding: 11px 12px;
  white-space: nowrap;
}

.leaderboard-table-wrap th {
  color: #aeb29f;
  background: rgba(55, 64, 39, 0.48);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-table-wrap td {
  color: #e7e4d8;
  font-size: 0.84rem;
}

.leaderboard-town {
  display: grid;
  gap: 3px;
}

.leaderboard-town strong {
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 0.88rem;
  font-weight: 400;
}

.leaderboard-town small {
  color: #aeb39d;
  font-size: 0.66rem;
}

.frontier-adventurer-indicator {
  display: inline-flex;
  margin-left: 6px;
  color: #f6c970;
  font-size: 0.76rem;
  vertical-align: baseline;
}

.frontier-adventurer-legend {
  margin: 12px 0 0;
  color: #d6d1bd;
  font-size: 0.76rem;
}

.frontier-adventurer-legend span {
  color: #f6c970;
}

.leaderboard-live-command {
  display: inline-flex;
  margin-top: 12px;
  color: #f0d4aa;
  font-size: 0.8rem;
  text-underline-offset: 3px;
}

.leaderboard-live-link {
  color: #dce98e;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration-color: #7f9551;
  text-transform: uppercase;
}

.chronicle-character-link {
  display: inline-flex;
  margin-top: 7px;
  color: #f0d4aa;
  font-size: 0.74rem;
  text-underline-offset: 3px;
}

.leaderboard-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.shame-details-row td {
  padding: 0;
  background: rgba(42, 49, 30, 0.34);
}

.shame-details-row details {
  padding: 10px 12px;
}

.shame-details-row summary {
  color: #c5d676;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.shame-details-row summary:focus-visible {
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.shame-details-row dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 0;
}

.shame-details-row dd {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}

.leaderboard-empty {
  color: #9da18c !important;
  text-align: center;
}

.adventurer-hall {
  width: min(100%, 1180px);
  min-height: calc(100vh - clamp(32px, 6vw, 88px));
  margin: 0 auto;
  border: 1px solid #59623f;
  border-radius: 6px;
  background:
    linear-gradient(rgba(238, 233, 214, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 233, 214, 0.025) 1px, transparent 1px),
    rgba(18, 20, 15, 0.94);
  background-size:
    18px 18px,
    18px 18px,
    auto;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.hall-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 52px);
  border-bottom: 1px solid #444c32;
  background: rgba(46, 53, 31, 0.42);
}

.hall-header h1,
.hall-current h2,
.hall-empty h2,
.hall-fallen h2,
.fallen-detail h3,
.adventurer-creation h2,
.account-record-book h2 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-weight: 400;
}

.hall-header h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.hall-rule {
  max-width: 26ch;
  margin: 0;
  color: #d7c48d;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.35;
  text-align: right;
}

.hall-status {
  margin: 0;
  border-bottom: 1px solid #a95648;
  padding: 10px clamp(24px, 5vw, 52px);
  color: #f2c4bc;
  background: rgba(74, 31, 25, 0.68);
  font-size: 0.84rem;
}

.hall-security-notice {
  margin: 0;
  border-bottom: 1px solid #8d7a43;
  padding: 10px clamp(24px, 5vw, 52px);
  color: #eee2bc;
  background: rgba(79, 58, 21, 0.28);
  font-size: 0.84rem;
  line-height: 1.45;
}

.hall-current,
.hall-empty,
.hall-history,
.hall-fallen,
.adventurer-creation,
.account-record-book,
.account-settings {
  padding: clamp(22px, 4vw, 40px) clamp(24px, 5vw, 52px);
  border-bottom: 1px solid #444c32;
}

.hall-current-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr) auto;
  align-items: center;
  gap: 22px;
}

.hall-current h2,
.hall-empty h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.hall-current h2 + p,
.hall-empty > p:not(.eyebrow),
.creation-copy,
.field-note,
.hall-empty-copy {
  margin: 8px 0 0;
  color: #bfc3ad;
  font-size: 0.88rem;
  line-height: 1.5;
}

.hall-current dl,
.hall-history dl,
.fallen-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.hall-current dd,
.hall-history dd,
.fallen-detail-stats dd {
  overflow-wrap: anywhere;
  font-size: 0.86rem;
}

.hall-empty {
  background: rgba(50, 58, 34, 0.18);
}

.hall-empty .command-button {
  margin-top: 20px;
}

.adventurer-creation {
  background: rgba(93, 71, 33, 0.12);
}

.adventurer-creation h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.adventurer-creation .character-name-form {
  width: min(100%, 560px);
  margin: 20px 0 0;
}

.character-name-form input {
  letter-spacing: 0;
  text-transform: none;
}

.hall-history {
  background: rgba(30, 34, 23, 0.42);
}

.account-record-book {
  background: rgba(68, 50, 22, 0.14);
}

.account-record-book h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.record-book-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 22px 0 0;
}

.record-book-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #574d36;
  padding: 12px 0;
}

.record-book-entry dt {
  color: #bcb49f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.record-book-entry dd {
  display: grid;
  justify-items: end;
  gap: 3px;
  margin: 0;
  color: #ded7c4;
  font-size: 0.8rem;
  text-align: right;
}

.record-book-entry dd strong {
  color: #f0ecdc;
  font-size: 0.88rem;
}

.record-holder-link {
  border: 0;
  padding: 0;
  color: #e3bd81;
  background: transparent;
  font: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.record-holder-link:hover,
.record-holder-link:focus-visible {
  color: #f6d790;
  outline: 2px solid #f6c970;
  outline-offset: 3px;
}

.personal-record-target {
  margin-top: 20px;
  border-left: 3px solid #d7a85d;
  padding: 11px 13px;
  background: rgba(79, 58, 21, 0.18);
}

.personal-record-target .eyebrow {
  margin: 0 0 5px;
}

.personal-record-target > p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 0;
  color: #e2dccb;
  font-size: 0.84rem;
}

.personal-record-target span {
  color: #c4c9b5;
}

.account-settings {
  color: #d7dac9;
  background: rgba(20, 24, 16, 0.54);
}

.account-settings > summary {
  color: #d7c48d;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}

.account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin-top: 18px;
}

.account-settings-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d7dac9;
  font-size: 0.84rem;
  cursor: pointer;
}

.account-settings-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #c5d676;
}

.audio-settings-heading {
  grid-column: 1 / -1;
  margin: 10px 0 -2px;
  border-top: 1px solid #505a37;
  padding-top: 16px;
  color: #d7c48d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.account-settings-grid .audio-volume-control {
  display: grid;
  grid-template-columns: minmax(66px, auto) minmax(84px, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.audio-volume-control input[type="range"] {
  width: 100%;
  height: auto;
  margin: 0;
  accent-color: #d7c48d;
}

.audio-volume-control output {
  color: #c4c9b5;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.account-settings-grid .audio-preset-control {
  display: grid;
  grid-template-columns: minmax(66px, auto) minmax(84px, 1fr);
  gap: 8px;
}

.audio-preset-control select {
  min-width: 0;
  border: 1px solid #667047;
  border-radius: 3px;
  padding: 5px 7px;
  color: #eee9d6;
  background: #1a1d15;
  font: inherit;
}

.account-security-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #444c32;
  padding: clamp(22px, 4vw, 40px) clamp(24px, 5vw, 52px);
  background: rgba(45, 38, 22, 0.2);
}

.account-security-summary h2 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 400;
}

.account-security-summary p:last-child {
  margin: 7px 0 0;
  color: #bfc3ad;
  font-size: 0.86rem;
}

.account-security-dialog {
  position: fixed;
  z-index: 20;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(calc(100vw - 32px), 720px);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid #899558;
  border-radius: 6px;
  background: #1a1d15;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72);
  transform: translate(-50%, -50%);
}

.account-security-header,
.account-security-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(22px, 4vw, 34px);
  background: rgba(46, 53, 31, 0.54);
}

.account-security-header {
  border-bottom: 1px solid #505a37;
}

.account-security-header h2 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 400;
}

.account-security-footer {
  justify-content: end;
  border-top: 1px solid #505a37;
}

.account-security-status,
.account-security-loading {
  margin: 20px clamp(22px, 4vw, 34px) 0;
}

.account-security-loading {
  color: #c4c9b5;
}

.security-section {
  padding: 24px clamp(22px, 4vw, 34px);
  border-top: 1px solid #404830;
}

.security-method-list,
.security-session-list {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.security-method-list li,
.security-session-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #414936;
  padding: 12px 0;
}

.security-method-list li > div,
.security-session-list li > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.security-method-list strong,
.security-session-list strong {
  color: #e8e5d8;
  font-size: 0.9rem;
}

.security-method-list span,
.security-session-list span,
.security-method-list small,
.security-session-list small {
  overflow-wrap: anywhere;
  color: #afb6a0;
  font-size: 0.78rem;
}

.security-method-list small {
  color: #c5d676;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.security-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.security-inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.security-inline-form label {
  grid-column: 1 / -1;
}

.security-password-form .command-button,
.security-inline-form .command-button {
  width: fit-content;
  margin-top: 5px;
}

.security-section > .command-button {
  margin-top: 16px;
}

audio-lab {
  display: block;
  min-height: 100vh;
  padding: clamp(16px, 3vw, 44px);
}

.audio-lab-page {
  background-image:
    linear-gradient(rgba(238, 233, 214, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 233, 214, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, rgba(212, 119, 83, 0.12), transparent 48%);
}

.audio-lab-shell {
  width: min(100%, 1220px);
  margin: 0 auto;
  border: 1px solid #59623f;
  border-radius: 6px;
  background: rgba(18, 20, 15, 0.94);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.audio-lab-header,
.audio-lab-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.audio-lab-header {
  border-bottom: 1px solid #444c32;
  padding: 22px 26px;
  background: rgba(46, 53, 31, 0.42);
}

.audio-lab-header h1,
.audio-lab-section h2 {
  margin: 0;
  font-family: Georgia, "Palatino Linotype", serif;
}

.audio-lab-header h1 {
  font-size: 1.65rem;
}

.audio-lab-status {
  margin: 0;
  color: #d7c48d;
  font-size: 0.82rem;
  font-weight: 700;
}

.audio-lab-section {
  border-bottom: 1px solid #444c32;
  padding: 24px 26px;
}

.audio-lab-section:last-child {
  border-bottom: 0;
}

.audio-lab-section h2 {
  font-size: 1.2rem;
}

.audio-lab-commands {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.audio-lab-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin-top: 20px;
}

.audio-lab-control {
  display: grid;
  grid-template-columns: minmax(108px, auto) minmax(110px, 1fr) 58px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #d7dac9;
  font-size: 0.82rem;
}

.audio-lab-control select,
.audio-lab-tempo input {
  min-width: 0;
  border: 1px solid #667047;
  border-radius: 3px;
  padding: 5px 7px;
  color: #eee9d6;
  background: #1a1d15;
  font: inherit;
}

.audio-lab-control input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #d47753;
}

.audio-lab-control output {
  color: #c4c9b5;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.76rem;
  text-align: right;
}

.audio-lab-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.audio-lab-preset {
  border: 1px solid #59623f;
  border-radius: 3px;
  padding: 6px 9px;
  color: #d7dac9;
  background: #202418;
  font: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.audio-lab-preset:hover,
.audio-lab-preset:focus-visible,
.audio-lab-preset.selected {
  border-color: #d47753;
  color: #f0d4aa;
  background: #38291f;
}

.audio-lab-copy {
  margin-top: 16px;
}

.audio-lab-tempo {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d7dac9;
  font-size: 0.78rem;
  font-weight: 700;
}

.audio-lab-tempo input {
  width: 68px;
}

.audio-lab-tracker-wrap {
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid #505a37;
}

.audio-lab-tracker {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.79rem;
}

.audio-lab-tracker th,
.audio-lab-tracker td {
  border: 1px solid #39402a;
  padding: 5px 7px;
  text-align: left;
}

.audio-lab-tracker thead {
  color: #d7c48d;
  background: #252a1c;
}

.audio-lab-tracker tbody th {
  color: #9da18c;
  font-weight: 400;
}

.audio-lab-tracker input {
  width: 100%;
  border: 0;
  padding: 2px 0;
  color: #eee9d6;
  background: transparent;
  font: inherit;
  text-transform: uppercase;
}

.audio-lab-tracker input:focus-visible {
  outline: 1px solid #d47753;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  audio-lab {
    padding: 12px;
  }

  .audio-lab-header,
  .audio-lab-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .audio-lab-header,
  .audio-lab-section {
    padding: 20px 16px;
  }

  .audio-lab-commands {
    justify-content: flex-start;
  }

  .audio-lab-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .audio-lab-control {
    grid-template-columns: 100px minmax(0, 1fr) 50px;
    gap: 7px;
  }
}

.hall-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.hall-section-heading > span {
  color: #d47753;
  font-size: 1.6rem;
}

.hall-fallen h2,
.fallen-detail h3 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.fallen-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.fallen-entry {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(145px, 1fr) repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 0;
  border-top: 1px solid #574438;
  padding: 15px 0;
  color: #c7c1b3;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.fallen-entry:hover,
.fallen-entry:focus-visible {
  color: #f0ecdc;
  outline: 2px solid #f6c970;
  outline-offset: -2px;
}

.fallen-name {
  color: #f2c4bc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1rem;
}

.fallen-feat-summary {
  grid-column: 1 / -1;
  color: #d7c48d;
  font-size: 0.72rem;
  line-height: 1.4;
}

.fallen-detail {
  margin-top: 22px;
  border-top: 1px solid #9a624b;
  padding-top: 22px;
}

.fallen-detail .specialization-history {
  margin-top: 20px;
}

.fallen-detail .command-button {
  margin-top: 18px;
}

.icon-command {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #7d6654;
  border-radius: 3px;
  color: #e7d7c8;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
}

.icon-command:hover,
.icon-command:focus-visible {
  border-color: #f6c970;
  outline: 2px solid #f6c970;
  outline-offset: 2px;
}

.town-account-link {
  margin: 26px 0 10px;
  text-align: center;
}

.death-actions {
  margin-top: 26px;
}

.permadeath-dialog ul {
  display: grid;
  gap: 7px;
  margin: 0 0 22px;
  padding: 0;
  color: #d9b8ae;
  font-size: 0.82rem;
  line-height: 1.45;
  list-style: none;
}

.permadeath-dialog li::before {
  margin-right: 7px;
  color: #f2b099;
  content: "*";
}

@keyframes hit-rise {
  from {
    opacity: 0;
    transform: translate(-50%, 18px);
  }

  20% {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: translate(-50%, -42px);
  }
}

@keyframes history-notice-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes critical-accent {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  45% {
    opacity: 1;
    transform: scale(1.05);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes landmark-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes second-wind-arrive {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }

  55% {
    opacity: 1;
    transform: translateY(0) scale(1.02);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 760px) {
  swing-or-cast-game {
    padding: 0;
  }

  .adventurer-hall {
    min-height: 100vh;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .hall-header {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .hall-rule {
    text-align: left;
  }

  .hall-current-content {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hall-current .command-button {
    width: 100%;
  }

  .auth-shell {
    min-height: 100vh;
    margin: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .account-security-summary {
    align-items: start;
    flex-direction: column;
  }

  .account-security-summary .command-button {
    width: 100%;
  }

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

  .fallen-name {
    grid-column: 1 / -1;
  }

  .game-layout {
    min-height: 100vh;
    border-width: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }

  .game-header {
    position: sticky;
    z-index: 5;
    top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
    padding: 10px 16px;
    backdrop-filter: blur(10px);
  }

  .game-header > div .eyebrow {
    display: none;
  }

  .game-name {
    font-size: 1rem;
  }

  .depth-readout {
    font-size: 1rem;
    text-align: right;
  }

  .mobile-hud {
    display: flex;
    grid-column: 1 / -1;
    gap: 18px;
  }

  .mobile-hud div {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .mobile-hud dt {
    font-size: 0.62rem;
  }

  .mobile-hud dd {
    margin: 0;
    color: #f0ecdc;
    font-size: 0.78rem;
  }

  .stats-panel {
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid #444c32;
    padding: 16px;
  }

  .identity-block,
  .run-stats {
    grid-column: 1 / -1;
  }

  .identity-block {
    padding-bottom: 12px;
  }

  .run-stats {
    margin-top: 0;
    padding-top: 12px;
  }

  .stage {
    grid-row: 2;
    min-height: calc(100dvh - 91px);
  }

  .scene,
  .combat-scene {
    padding: 36px 20px;
  }

  .game-footer {
    grid-row: 4;
    display: grid;
    padding: 14px 16px;
  }

  game-leaderboards {
    padding: 0 0 32px;
  }

  game-chat {
    padding: 0 0 20px;
  }

  .chat-shell {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .chat-shell > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    color: #f0ecdc;
    font-family: Georgia, "Palatino Linotype", serif;
    font-size: 1rem;
    cursor: pointer;
  }

  .chat-shell > summary span:last-child {
    color: #f6c970;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .chat-panel {
    border-top: 1px solid #465138;
    padding: 20px 16px;
  }

  .chat-message-list {
    max-height: 360px;
  }

  .leaderboards {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .journey-stats dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-journey > dl,
  .world-records dl,
  .record-book-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feat-grid,
  .feat-collection.compact .feat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .region-records dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .loot-records dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legend-history dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crafting-loss dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shame-details-row dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .equipment-grid,
  .town-derived dl,
  .combat-build dl,
  .specialization-history dl,
  .world-conditions dl,
  .crafting-materials dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .town-shops-grid {
    grid-template-columns: 1fr;
  }

  .town-section > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
  }

  .town-section > summary span {
    color: #9da18c;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0;
    text-align: right;
    text-transform: none;
  }

  .town-section > summary::before {
    color: #c5d676;
    font-size: 1.1rem;
    content: "+";
  }

  .town-section[open] > summary::before {
    content: "−";
  }

  .town-section:not([open]) > :not(summary) {
    display: none;
  }

  .town-section[open] > summary {
    margin-bottom: 20px;
  }

  .town-navigation {
    display: flex;
    overflow-x: auto;
    border-top: 1px solid #4f5838;
    scrollbar-width: thin;
  }

  .town-navigation a {
    min-width: max-content;
    flex: 1 0 auto;
    padding-inline: 18px;
  }

  .blacksmith-shop {
    grid-column: auto;
  }

  .town-shop + .town-shop {
    border-top: 1px solid #495437;
    border-left: 0;
  }

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

  .gem-grid,
  .socket-equipment-grid,
  .forge-item-grid,
  .forge-affix-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .town-status,
  .arrival-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .stats-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px 16px;
  }

  .identity-block,
  .run-stats {
    grid-column: 1 / -1;
  }

  .stats-panel .stat-meter {
    min-width: 0;
  }

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

  .stage {
    min-height: calc(100dvh - 91px);
  }

  .scene,
  .combat-scene {
    padding: 24px 16px;
  }

  .combat-scene {
    grid-template-rows: auto minmax(150px, 1fr) auto auto auto auto;
    gap: 14px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .combat-area {
    min-height: 150px;
  }

  .combat-controls {
    position: fixed;
    z-index: 10;
    right: 0;
    bottom: 0;
    left: 0;
    gap: 8px;
    border-top: 1px solid #59623f;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(18, 20, 15, 0.96);
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(10px);
  }

  .combat-command {
    min-height: 64px;
    border: 1px solid #6e7950;
    border-radius: 5px;
    padding: 8px 12px;
    background: #252b1c;
    touch-action: manipulation;
  }

  .combat-controls span {
    display: none;
  }

  .combat-controls strong {
    margin: 0;
    font-size: 1.25rem;
  }

  .town-scene {
    padding-block: 24px;
  }

  .town-intro .scene-copy {
    margin-block: 10px 16px;
  }

  .town-intro .town-status,
  .town-intro .personal-record {
    display: none;
  }

  .town-section {
    scroll-margin-top: 92px;
  }

  .town-intro .health-meter {
    margin-bottom: 18px;
  }

  .town-primary-actions .command-button {
    width: 100%;
  }

  .danger-dialog,
  .character-name-prompt {
    top: max(12px, env(safe-area-inset-top));
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px - env(safe-area-inset-top));
    padding: 22px 18px;
    transform: translateX(-50%);
  }

  .danger-dialog .command-row {
    gap: 10px;
  }

  .danger-dialog .command-button {
    width: 100%;
  }

  .game-footer {
    display: none;
  }

  .reward-grid {
    grid-template-columns: 1fr;
    width: min(100%, 260px);
  }

  .equipment-grid,
  .town-derived dl,
  .combat-build dl,
  .specialization-history dl,
  .region-records dl,
  .world-conditions dl,
  .crafting-materials dl,
  .forge-item-details,
  .forge-result dl {
    grid-template-columns: 1fr;
  }

  .town-status,
  .arrival-summary {
    grid-template-columns: 1fr;
  }

  .town-routes li > div,
  .world-history li > div {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .loot-records dl {
    grid-template-columns: 1fr;
  }

  .legend-history dl {
    grid-template-columns: 1fr;
  }

  .crafting-loss dl {
    grid-template-columns: 1fr;
  }

  .weapon-details,
  .specialization-choice-grid,
  .specialization-history dl,
  .enemy-defense,
  .codex-defense,
  .mastery-grid,
  .gem-grid,
  .socket-equipment-grid,
  .forge-item-grid,
  .forge-affix-actions {
    grid-template-columns: 1fr;
  }

  .weapon-shop-item {
    align-items: stretch;
    flex-direction: column;
  }

  .weapon-shop-item .shop-purchase {
    width: 100%;
  }

  .command-row {
    display: grid;
  }

  .forge-dialog-actions {
    display: grid;
  }

  .specialization-dialog-actions {
    display: grid;
  }

  .leaderboards-heading {
    align-items: start;
    flex-direction: column;
  }

  .chat-heading {
    align-items: start;
    flex-direction: column;
  }

  .chat-heading-status {
    justify-items: start;
  }

  .chat-presence {
    text-align: left;
  }

  .player-rank {
    text-align: left;
  }

  .chat-form > div {
    grid-template-columns: 1fr;
  }

  .account-settings-grid,
  .hall-current dl,
  .hall-history dl,
  .fallen-detail-stats,
  .character-journey > dl,
  .world-records dl,
  .record-book-list,
  .fallen-entry {
    grid-template-columns: 1fr;
  }

  .feat-grid,
  .feat-collection.compact .feat-grid {
    grid-template-columns: 1fr;
  }

  .record-book-entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .record-book-entry dd {
    justify-items: start;
    text-align: left;
  }

  .security-inline-form {
    grid-template-columns: 1fr;
  }

  .security-inline-form .command-button,
  .security-password-form .command-button,
  .security-section > .command-button {
    width: 100%;
  }

  .security-method-list li,
  .security-session-list li {
    align-items: start;
    flex-direction: column;
  }

  .history-notice-stack {
    top: 10px;
    right: 10px;
    width: min(calc(100vw - 20px), 360px);
  }

  .town-navigation {
    grid-template-columns: 1fr;
  }

  .town-navigation a {
    border-top: 1px solid #4f5838;
    border-left: 0;
  }

  .town-navigation a:first-child {
    border-top: 0;
  }

  .town-community > div {
    display: grid;
  }

  .town-community .command-button {
    width: 100%;
  }

  .fallen-name {
    grid-column: auto;
  }
}

:root[data-reduced-motion="true"] *,
:root[data-reduced-motion="true"] *::before,
:root[data-reduced-motion="true"] *::after {
  animation: none !important;
  scroll-behavior: auto !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .meter-track > span,
  .hit-feedback {
    animation: none;
    transition: none;
  }
}

frontier-witness {
  display: block;
}

.frontier-landing,
.frontier-live-page,
.public-character-page,
.spectator-page,
.frontier-loading {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 52px);
}

.frontier-landing {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: end;
  border-bottom: 1px solid #59623f;
  background:
    linear-gradient(90deg, rgba(99, 115, 62, 0.24), transparent 64%),
    repeating-linear-gradient(
      90deg,
      rgba(238, 233, 214, 0.04) 0 1px,
      transparent 1px 36px
    );
}

.frontier-landing-copy h1,
.frontier-page-header h1,
.public-character-page h1,
.spectator-header h1,
.frontier-loading h1 {
  margin: 0;
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  font-weight: 400;
  line-height: 1.04;
}

.frontier-landing-summary,
.frontier-featured > p,
.frontier-live-entry p,
.public-character-page > p,
.spectator-header p,
.frontier-status,
.spectator-connection {
  margin: 8px 0 0;
  color: #c7cbb7;
  line-height: 1.5;
}

.frontier-landing-summary strong {
  color: #f6c970;
  font-family: Consolas, "Courier New", monospace;
}

.frontier-featured {
  border-left: 3px solid #d47753;
  padding-left: clamp(16px, 3vw, 28px);
}

.frontier-featured h2,
.frontier-live-page h2,
.public-character-page h2,
.spectator-page h2 {
  margin: 5px 0 0;
  color: #e9e2cd;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  font-weight: 400;
}

.frontier-landing-actions,
.spectator-header-actions,
.frontier-filter-row,
.command-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.frontier-landing-actions {
  grid-column: 1 / -1;
}

.frontier-page-header,
.spectator-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #4f5838;
  padding-bottom: 18px;
}

.frontier-presence {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0;
  background: #4f5838;
}

.frontier-presence > div {
  min-width: 0;
  padding: 14px;
  background: rgba(20, 23, 17, 0.94);
}

.frontier-presence dt,
.public-character-build dt {
  color: #aeb69b;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.frontier-presence dd,
.public-character-build dd {
  margin: 5px 0 0;
  color: #f0ecdc;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.96rem;
  overflow-wrap: anywhere;
}

.frontier-filter {
  min-height: 38px;
  border: 1px solid #59623f;
  border-radius: 3px;
  padding: 7px 11px;
  color: #d7dac9;
  background: #202418;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.frontier-filter:hover,
.frontier-filter:focus-visible,
.frontier-filter[aria-pressed="true"] {
  border-color: #d47753;
  color: #f0d4aa;
  outline: 2px solid transparent;
}

.frontier-live-grid,
.spectator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  gap: clamp(20px, 3.5vw, 42px);
  margin-top: 24px;
}

.frontier-live-list {
  border-top: 1px solid #4f5838;
}

.frontier-live-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #4f5838;
  padding: 15px 0;
}

.frontier-live-entry p {
  font-size: 0.82rem;
}

.frontier-live-name {
  color: #f0ecdc;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: 1.1rem !important;
}

.frontier-live-entry a:not(.command-button),
.frontier-pulse-list a,
.public-character-link {
  color: #f0d4aa;
  text-decoration-color: #9d7149;
  text-underline-offset: 3px;
}

.frontier-pulse,
.spectator-sidebar {
  min-width: 0;
  border-left: 1px solid #4f5838;
  padding-left: clamp(16px, 3vw, 28px);
}

.frontier-pulse-list,
.spectator-event-list,
.frontier-town-presence ul,
.public-character-feats ul {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.frontier-pulse-list li,
.spectator-event-list li,
.frontier-town-presence li,
.public-character-feats li {
  border-left: 2px solid #697547;
  padding-left: 10px;
  color: #d4d5c7;
  font-size: 0.82rem;
  line-height: 1.45;
}

.frontier-pulse-list time {
  display: block;
  margin-top: 2px;
  color: #909884;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
}

.frontier-town-presence {
  margin-top: 28px;
  border-top: 1px solid #4f5838;
  padding-top: 18px;
}

.frontier-town-presence li {
  display: grid;
  gap: 3px;
}

.frontier-town-presence span {
  color: #aeb69b;
  font-size: 0.74rem;
}

.public-character-page,
.spectator-page,
.frontier-loading {
  margin-top: clamp(20px, 5vh, 62px);
}

.public-character-build {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0;
  background: #4f5838;
}

.public-character-build > div {
  min-width: 0;
  padding: 14px;
  background: rgba(20, 23, 17, 0.94);
}

.public-character-feats {
  margin-top: 32px;
  border-top: 1px solid #4f5838;
  padding-top: 20px;
}

.spectator-header-actions {
  align-items: center;
  justify-content: flex-end;
}

.spectator-watchers {
  color: #bfc3ad;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.76rem;
  white-space: nowrap;
}

.spectator-crowd-state {
  color: #d7c48d;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.spectator-connection {
  color: #d7c48d;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spectator-combat {
  min-width: 0;
  border: 1px solid #667047;
  padding: clamp(18px, 3vw, 30px);
  background: rgba(20, 23, 17, 0.84);
}

.spectator-journey-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #bfc3ad;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.76rem;
}

.spectator-health {
  margin-top: 26px;
}

.spectator-health > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #f0ecdc;
}

.spectator-health > div:first-child span {
  color: #d7dac9;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  white-space: nowrap;
}

.spectator-health-track {
  height: 14px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid #5f6945;
  background: #12150f;
}

.spectator-health-track > span {
  display: block;
  width: 0;
  height: 100%;
  background: #8eaa55;
  transition: width 180ms ease-out;
}

.spectator-health-enemy .spectator-health-track {
  border-color: #9a624b;
}

.spectator-health-enemy .spectator-health-track > span {
  background: #c76a4f;
}

.spectator-crowd-moment {
  margin-top: 18px;
  border-left: 3px solid #d7a85d;
  padding: 9px 11px;
  background: rgba(53, 45, 25, 0.35);
  animation: spectator-reaction-rise 520ms ease-out both;
}

.spectator-crowd-moment p {
  margin: 0;
  color: #f4df9d;
  font-size: clamp(0.9rem, 2vw, 1.08rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spectator-crowd-moment div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: #cfd4bd;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.74rem;
}

.spectator-reaction-bursts {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.spectator-reaction-burst {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  animation: spectator-reaction-rise 520ms ease-out both;
}

.spectator-reaction-burst span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #6d7650;
  padding: 4px 7px;
  background: rgba(45, 52, 32, 0.82);
  color: #f0ecdc;
  font-size: 0.86rem;
}

.spectator-reaction-burst strong {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.spectator-reaction-burst em {
  color: #c8cdb6;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.spectator-reactions {
  margin-top: 20px;
  border-top: 1px solid #4f5838;
  padding-top: 14px;
}

.spectator-reaction-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.spectator-reaction-buttons button {
  width: 38px;
  height: 38px;
  border: 1px solid #6d7650;
  background: #202719;
  color: #f0ecdc;
  cursor: pointer;
  font-size: 1.08rem;
}

.spectator-reaction-buttons button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.spectator-reaction-buttons button:not(:disabled):hover,
.spectator-reaction-buttons button:not(:disabled):focus-visible {
  border-color: #d7c48d;
  background: #303923;
}

.spectator-reaction-status {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #bfc3ad;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes spectator-reaction-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spectator-versus {
  margin: 24px 0 -2px;
  color: #d7c48d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.spectator-encounter-label,
.spectator-encounter-waiting {
  margin: 10px 0 0;
  color: #d7a85d;
  font-size: 0.78rem;
  text-align: center;
}

.spectator-events h2 {
  margin-top: 0;
}

.spectator-event-list li strong,
.spectator-event-list li span {
  color: #f6c970;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.spectator-build {
  margin-top: 28px;
  border-top: 1px solid #4f5838;
  padding-top: 16px;
}

.spectator-build summary {
  color: #e9e2cd;
  cursor: pointer;
  font-family: Georgia, "Palatino Linotype", serif;
}

.spectator-build .public-character-build {
  grid-template-columns: 1fr;
}

.fallen-character-page {
  border-left: 3px solid #d47753;
}

.frontier-empty {
  color: #9da18c;
  font-size: 0.84rem;
  line-height: 1.5;
}

.frontier-status {
  grid-column: 1 / -1;
  border-left: 3px solid #d7a85d;
  padding-left: 10px;
  color: #eee2bc;
}

.town-presence-summary {
  margin: 0 0 16px;
  border-left: 3px solid #697547;
  padding: 8px 11px;
  color: #c7cbb7;
  background: rgba(64, 76, 42, 0.2);
  font-size: 0.8rem;
  line-height: 1.45;
}

.town-presence-summary p {
  margin: 0;
  color: #aeb69b;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.town-presence-summary strong {
  display: block;
  margin-top: 3px;
  color: #f0ecdc;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  font-weight: 400;
}

@media (max-width: 760px) {
  .frontier-landing,
  .frontier-live-grid,
  .spectator-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .frontier-featured,
  .frontier-pulse,
  .spectator-sidebar {
    border-top: 1px solid #4f5838;
    border-left: 0;
    padding-top: 20px;
    padding-left: 0;
  }

  .frontier-featured {
    border-top: 0;
    padding-top: 0;
  }

  .spectator-header-actions {
    justify-content: flex-start;
  }

  .spectator-reaction-buttons button {
    width: 36px;
    height: 36px;
  }

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

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

@media (max-width: 640px) {
  .frontier-landing,
  .frontier-live-page,
  .public-character-page,
  .spectator-page,
  .frontier-loading {
    padding: 18px 16px;
  }

  .frontier-page-header,
  .spectator-header,
  .frontier-live-entry {
    align-items: flex-start;
    flex-direction: column;
  }

  .spectator-header-actions,
  .frontier-live-entry .command-button {
    width: 100%;
    justify-content: flex-start;
  }

  .spectator-header-actions .command-button,
  .frontier-live-entry .command-button {
    flex: 1 1 auto;
    text-align: center;
  }

  .frontier-presence,
  .public-character-build {
    grid-template-columns: minmax(0, 1fr);
  }

  .spectator-health > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spectator-health-track > span {
    transition: none;
  }
}
