@font-face {
  font-family: GameSerif;
  src: local("Palatino Linotype"), local("Book Antiqua"), local("Georgia");
  font-display: swap;
}
:root {
  --entry-overlay: #0c1714ed;
  color-scheme: dark;
  --bg: #101513;
  --surface: #19201c;
  --surface2: #202822;
  --surface3: #28312b;
  --border: #354036;
  --text: #e9e6da;
  --muted: #a6afa2;
  --gold: #d7b87b;
  --gold-soft: #b99a61;
  --green: #9ab493;
  --accent: #779d83;
  --red: #c8796c;
  --shadow: 0 14px 40px #0003;
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
  font-size: 16px;
}
:root[data-theme="light"] {
  --entry-overlay: #f4f0e5ed;
  color-scheme: light;
  --bg: #eee9dd;
  --surface: #faf7ee;
  --surface2: #e9e3d5;
  --surface3: #ded7c8;
  --border: #c6bcaa;
  --text: #292e28;
  --muted: #626b5e;
  --gold: #80602d;
  --gold-soft: #886a37;
  --green: #42664b;
  --accent: #4e7459;
  --red: #a34237;
  --shadow: 0 14px 40px #3e332810;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    --entry-overlay: #f4f0e5ed;
    color-scheme: light;
    --bg: #eee9dd;
    --surface: #faf7ee;
    --surface2: #e9e3d5;
    --surface3: #ded7c8;
    --border: #c6bcaa;
    --text: #292e28;
    --muted: #626b5e;
    --gold: #80602d;
    --gold-soft: #886a37;
    --green: #42664b;
    --accent: #4e7459;
    --red: #a34237;
    --shadow: 0 14px 40px #3e332810;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 4px;
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
button:hover:not(:disabled),
.button:hover {
  background: var(--surface3);
  border-color: var(--gold-soft);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.primary {
  background: #c4a268;
  color: #141a15;
  border-color: #d0b47d;
  font-weight: 650;
}
.primary:hover:not(:disabled) {
  background: #e0c18d;
  color: #141a15;
}
.primary span:last-child {
  margin-left: 1rem;
}
.secondary {
  background: var(--surface2);
  border-color: var(--border);
}
.text-button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.text-button:hover:not(:disabled) {
  color: var(--gold);
  background: transparent;
}
.full {
  width: 100%;
}
input,
select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 0.8rem;
  border-radius: 4px;
  min-height: 2.8rem;
  max-width: 100%;
}
input:focus,
select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
input[type="checkbox"] {
  width: 1.3rem;
  height: 1.3rem;
  min-height: 0;
  accent-color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: GameSerif, Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
}
h1 {
  font-size: 2.3rem;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 1.55rem;
}
h3 {
  font-size: 1.22rem;
}
p {
  line-height: 1.65;
}
small,
.small {
  font-size: 0.78rem;
}
.muted {
  color: var(--muted);
}
.gold {
  color: var(--gold);
}
.ember {
  color: #bfa1d5;
}
.eyebrow {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 650;
  line-height: 1.6;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.8rem 0 1rem;
}
.section-heading h2 {
  font-size: 1.5rem;
}
.section-heading span,
.section-heading a {
  font-size: 0.76rem;
  color: var(--muted);
}
.section-heading a:hover {
  color: var(--gold);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 1000;
  padding: 1rem;
  background: var(--surface);
  color: var(--text);
}
.skip:focus {
  top: 1rem;
}
.layout {
  display: grid;
  grid-template-columns: 14.4rem minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #141b17;
  border-right: 1px solid #303a31;
  position: fixed;
  inset: 0 auto 0 0;
  width: 14.4rem;
  display: flex;
  flex-direction: column;
  padding: 1.8rem 1rem;
  color: #e0e4d9;
  z-index: 20;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: GameSerif, Georgia, serif;
  font-size: 1.04rem;
  line-height: 1.3;
  padding: 0 0.45rem;
  letter-spacing: 0.01em;
}
.brand-mark {
  font-size: 2.5rem;
  color: #d4b77d;
  line-height: 1;
}
.sidebar-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, #45513f, transparent);
  margin: 1.7rem 0 1.4rem;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: 4px;
  color: #a9b3a5;
  font-size: 0.86rem;
  min-height: 2.8rem;
  border-left: 2px solid transparent;
}
.sidebar nav a > span {
  font-size: 1.15rem;
  width: 1.3rem;
  text-align: center;
  color: #889b83;
}
.sidebar nav a:hover {
  color: #ede9dd;
  background: #202a21;
}
.sidebar nav a.active {
  background: #28342a;
  color: #e1c68e;
  border-left-color: #c9ad73;
}
.sidebar nav a.active > span {
  color: #c9ad73;
}
.badge {
  background: #b8995b;
  color: #182016;
  font-size: 0.65rem;
  min-width: 1.3rem;
  padding: 0.08rem 0.25rem;
  border-radius: 3px;
  margin-left: auto;
  text-align: center;
}
.live-dot,
.location-tag i {
  height: 0.4rem;
  width: 0.4rem;
  border-radius: 50%;
  background: #9ab493;
  display: inline-block;
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 2rem 0.6rem 0;
  font-size: 0.69rem;
  color: #9ca795;
}
.sidebar-bottom p {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  gap: 0.5rem;
}
.sidebar-bottom b {
  font-weight: 500;
  color: #c5cbbf;
}
.sidebar-bottom .eyebrow {
  color: #83937b;
  font-size: 0.59rem;
}
.save-indicator {
  display: block;
  color: #8da784;
  border-top: 1px solid #303a31;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  font-size: 0.65rem;
}
.sidebar-bottom small {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.6rem;
  color: #6e7a69;
}
.game-body {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  min-height: 5.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 1rem 2.5rem;
  gap: 2rem;
  background: var(--bg);
}
.hero-identity {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-width: 10rem;
  max-width: 18rem;
}
.hero-identity b {
  font-size: 0.86rem;
  display: block;
  overflow-wrap: anywhere;
}
.hero-identity small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
}
.avatar {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 1.8rem;
  background: #2a3027;
  border: 1px solid #576146;
  border-radius: 4px;
  flex-shrink: 0;
}
.top-vitals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  max-width: 30rem;
  flex: 1;
}
.meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.64rem;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
}
.meter-label b {
  font-weight: 500;
  color: var(--text);
}
.meter-label b span {
  color: var(--muted);
}
.meter {
  height: 0.32rem;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s;
}
.meter.health i {
  background: #aa675e;
}
.meter.focus i {
  background: #688ca8;
}
.meter.xp i {
  background: #ac9765;
}
.meter.enemy i {
  background: #b65c52;
}
.meter.contract i {
  background: #859b70;
}
.currencies {
  margin-left: auto;
  display: flex;
  gap: 1.6rem;
  white-space: nowrap;
}
.currencies > span {
  font-size: 0.85rem;
  color: var(--gold);
}
.currencies > span:nth-child(2) {
  color: #bfa1d5;
}
.currencies b {
  font-weight: 600;
}
.currencies small {
  display: block;
  font-size: 0.58rem;
  color: var(--muted);
  text-align: right;
}
.settings-shortcut {
  font-size: 1.2rem;
  color: var(--muted);
  padding: 0.3rem;
}
#main {
  max-width: 100rem;
  margin: auto;
  padding: 2.2rem 2.5rem 3rem;
  outline: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-heading .eyebrow {
  margin-bottom: 0.35rem;
}
.location-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  white-space: nowrap;
}
.location-tag i {
  margin: 0;
}
.location-tag.danger {
  color: var(--red);
  border-color: #7b453955;
}
.scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #485343;
  border-radius: 6px;
  background: #1b2925;
  color: #f0eade;
}
.scene > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: -3;
}
.town-scene {
  height: 26rem;
}
.scene-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, #080f0ded, transparent 95%),
    linear-gradient(90deg, #07100b66, transparent 75%);
}
.scene-caption {
  position: absolute;
  left: 2.2rem;
  bottom: 2rem;
  right: 2rem;
  max-width: 36rem;
}
.scene-caption h2 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
  margin: 0.35rem 0 0.65rem;
  text-shadow: 0 2px 10px #0008;
}
.scene-caption p {
  font-size: 0.83rem;
  color: #c4cfc0;
  max-width: 30rem;
  margin-bottom: 1.2rem;
}
.scene-caption .eyebrow {
  color: #d6bf8b;
}
.scene-label {
  position: absolute;
  top: 1.4rem;
  right: 1.5rem;
  letter-spacing: 0.25em;
  font-size: 0.58rem;
  color: #e2d7ba99;
}
.descent-control {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.descent-control select {
  background: #13231fe6;
  color: #e6e4d6;
  border-color: #62715b;
  font-size: 0.78rem;
}
.descent-control .primary {
  font-size: 0.8rem;
}
.town-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.service-card {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.4rem;
  background: var(--surface);
  position: relative;
  display: flex;
  flex-direction: column;
}
.service-icon {
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 1rem;
  line-height: 1;
}
.service-card .eyebrow {
  font-size: 0.58rem;
  margin-bottom: 0.45rem;
}
.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}
.service-card > p {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.service-card .meter-block {
  margin-bottom: 1rem;
}
.count {
  font-family: "Segoe UI", sans-serif;
  font-size: 0.7rem;
  border: 1px solid var(--border);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  color: var(--muted);
}
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1rem;
  flex-wrap: wrap;
}
.card-bottom > span {
  font-size: 0.66rem;
}
.card-bottom button {
  font-size: 0.72rem;
  min-height: 2.4rem;
  padding: 0.5rem 0.8rem;
}
.service-card .card-bottom {
  border-top: 1px solid var(--border);
}
.service-card .card-bottom .muted {
  max-width: 8rem;
  line-height: 1.4;
}
.town-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
.destination {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}
.destination > span {
  font-size: 1.6rem;
  color: var(--gold);
}
.destination h3 {
  font-size: 1.1rem;
}
.destination p {
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 0.3rem;
}
.destination > b {
  margin-left: auto;
  font-weight: 400;
  color: var(--gold);
}
.destination:hover {
  border-color: var(--gold-soft);
}
.recent-note {
  border-left: 2px solid var(--gold-soft);
  padding: 0.2rem 1rem;
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.recent-note > span {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.recent-note p {
  font-family: GameSerif, Georgia, serif;
  font-size: 0.95rem;
  color: var(--muted);
  flex: 1;
  min-width: 12rem;
}
.recent-note a {
  font-size: 0.7rem;
  color: var(--gold);
}
footer {
  border-top: 1px solid var(--border);
  padding: 1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.6rem;
  color: var(--muted);
}
footer i {
  font-style: normal;
  margin: 0 0.5rem;
  color: var(--gold);
}
.delve-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 1.3rem;
}
.dungeon-scene {
  height: 24rem;
}
.dungeon-scene .scene-caption h2 {
  font-size: 2rem;
}
.dungeon-scene .scene-caption {
  left: 1.7rem;
  bottom: 1.4rem;
}
.dungeon-scene .scene-caption p {
  margin: 0;
  max-width: 29rem;
}
.enemy-emblem {
  position: absolute;
  right: 2rem;
  top: 2rem;
  font-size: 4.5rem;
  line-height: 1;
  background: #241815b5;
  border: 1px solid #ab7967;
  border-radius: 50%;
  width: 6rem;
  height: 6rem;
  display: grid;
  place-items: center;
  color: #e3c4a2;
  box-shadow: 0 0 60px #ff6c1833;
}
.enemy-emblem.boss {
  color: #dc9a75;
  box-shadow: 0 0 70px #eb451e66;
}
.combat-panel,
.encounter-panel,
.event-panel {
  margin-top: 1rem;
}
.enemy-health {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.enemy-health .meter {
  height: 0.55rem;
}
.enemy-health .meter-label {
  font-size: 0.8rem;
}
.intent > span {
  font-size: 0.76rem;
  color: var(--gold);
  font-weight: 600;
}
.intent p {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.3rem;
}
.intent.heavy > span {
  color: #dc9581;
}
.combat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1.4rem;
}
.ability {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem;
  align-items: flex-start;
}
.ability b {
  font-size: 0.8rem;
  font-weight: 600;
}
.ability small {
  font-size: 0.64rem;
  opacity: 0.75;
}
.status-effects {
  font-size: 0.7rem;
  color: var(--green);
  margin-top: 1rem;
}
.encounter-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 5px;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.encounter-panel > div:first-child {
  flex: 1;
  min-width: 12rem;
}
.encounter-panel p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.6rem;
}
.encounter-panel > .primary {
  font-size: 0.8rem;
}
.travel-options {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.path-button {
  font-size: 0.7rem;
  text-align: left;
  justify-content: flex-start;
  min-height: 2.6rem;
  background: var(--bg);
}
.event-panel h3 {
  margin: 0.5rem 0 1rem;
}
.event-panel p {
  font-size: 0.86rem;
  color: var(--muted);
}
.event-options {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}
.event-options button {
  font-size: 0.78rem;
  flex: 1;
  min-width: 12rem;
}
.delve-aside .panel {
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.map-panel .section-heading {
  margin: 0 0 1.2rem;
}
.map-panel .section-heading h3 {
  font-size: 1.25rem;
}
.dungeon-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}
.map-room {
  padding: 0.5rem 0.15rem;
  min-height: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--bg);
  border-color: var(--border);
  border-radius: 3px;
  color: var(--muted);
  line-height: 1.1;
}
.map-room > span {
  font-size: 1.05rem;
}
.map-room small {
  font-size: 0.48rem;
  line-height: 1.3;
}
.map-room:disabled {
  opacity: 1;
  cursor: default;
}
.map-room.unknown {
  border-style: dashed;
  opacity: 0.35;
}
.map-room.cleared {
  background: var(--surface2);
  color: #8aa383;
}
.map-room.reachable {
  border-color: #879b77;
  box-shadow: inset 0 0 0 1px #718b5b44;
  color: var(--text);
}
.map-room.current {
  border-color: var(--gold);
  background: #4a4228;
  color: #f0d6a2;
  box-shadow: 0 0 14px #d8a45213;
}
.map-legend {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  margin: 1rem 0 0.8rem;
  font-size: 0.6rem;
  color: var(--muted);
}
.expedition dl {
  margin: 1rem 0;
}
.expedition dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.expedition dd {
  margin: 0;
}
.expedition .text-button {
  font-size: 0.76rem;
}
.expedition > p {
  margin-top: 0.75rem;
  font-size: 0.67rem;
}
.combat-log {
  margin-top: 1rem;
}
.combat-log .section-heading {
  margin: 0 0 1rem;
}
.combat-log h3 {
  font-size: 1.2rem;
}
.combat-log ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.combat-log li {
  font-size: 0.73rem;
  line-height: 1.65;
  color: var(--muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.combat-log li:last-child {
  border: 0;
}
.combat-log .latest {
  color: var(--text);
}
.combat-log .latest:before {
  content: "◇";
  margin-right: 0.6rem;
  color: var(--gold);
}
.equipped-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
}
.equipment-strip .section-heading {
  margin: 0 0 1.25rem;
}
.equipped-slot {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1rem 0.8rem;
  border-radius: 3px;
  min-height: 10rem;
}
.equipped-slot > span {
  font-size: 1.6rem;
  display: block;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.equipped-slot > small {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.equipped-slot b {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}
.equipped-slot p {
  font-size: 0.6rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.inventory-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.inventory-toolbar label {
  font-size: 0.65rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.inventory-toolbar select {
  font-size: 0.75rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.6rem;
}
.inventory-toolbar > .text-button {
  font-size: 0.7rem;
  margin-left: auto;
}
.segmented {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.segmented button {
  border: 0;
  border-radius: 0;
  min-height: 2.5rem;
  font-size: 0.75rem;
  padding: 0.5rem 0.9rem;
  background: transparent;
  color: var(--muted);
}
.segmented button.selected {
  background: var(--surface3);
  color: var(--gold);
}
.item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.item-card {
  padding: 1.3rem;
  border: 1px solid var(--border);
  border-top: 2px solid var(--rarity, var(--border));
  background: var(--surface);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
}
.item-top {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}
.item-icon {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--rarity, var(--gold));
  background: var(--bg);
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.rarity-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.55rem;
  color: var(--rarity, var(--muted));
  margin-bottom: 0.4rem;
}
.item-top h3,
.forge-card h3 {
  font-size: 1.07rem;
  line-height: 1.35;
}
.temper {
  color: var(--gold);
}
.item-stats {
  display: flex;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.7rem;
}
.item-stats b {
  font-weight: 500;
  color: var(--text);
  margin-right: 0.15rem;
}
.affixes {
  font-size: 0.63rem;
  color: var(--rarity, var(--muted));
  margin-bottom: 0.5rem;
}
.item-footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.item-footer > span {
  font-size: 0.65rem;
}
.item-footer > div {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.small-button {
  font-size: 0.65rem;
  min-height: 2rem;
  padding: 0.35rem 0.5rem;
}
.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.comparison {
  font-size: 0.68rem;
  margin: 0 0 1rem;
  color: var(--muted);
}
.comparison summary {
  cursor: pointer;
  color: var(--gold-soft);
}
.comparison p {
  margin-top: 0.7rem;
}
.rarity-common {
  --rarity: #aab0a1;
}
.rarity-uncommon {
  --rarity: #8bb780;
}
.rarity-rare {
  --rarity: #7daed3;
}
.rarity-epic {
  --rarity: #b192d1;
}
.rarity-legendary {
  --rarity: #d8ae58;
}
.rarity-mythic {
  --rarity: #df9184;
}
[data-theme="light"] .rarity-common {
  --rarity: #626b5b;
}
[data-theme="light"] .rarity-uncommon {
  --rarity: #42743e;
}
[data-theme="light"] .rarity-rare {
  --rarity: #397699;
}
[data-theme="light"] .rarity-epic {
  --rarity: #7b579d;
}
[data-theme="light"] .rarity-legendary {
  --rarity: #976d1f;
}
[data-theme="light"] .rarity-mythic {
  --rarity: #a34b40;
}
.character-panel {
  display: flex;
  gap: 2rem;
}
.character-portrait {
  width: 12rem;
  min-height: 18rem;
  background: radial-gradient(ellipse at 50% 35%, #6c6c46, #242d27 70%);
  display: grid;
  place-items: center;
  border: 1px solid #6a7253;
  border-radius: 4px;
  flex-shrink: 0;
}
.character-portrait > span {
  font-size: 7rem;
  color: #c5ba8a;
  text-shadow: 0 5px 30px #0008;
}
.character-details {
  flex: 1;
  min-width: 0;
}
.character-details h2 {
  font-size: 2.2rem;
  margin: 0.3rem 0 1rem;
  overflow-wrap: anywhere;
}
.character-details > p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 40rem;
}
.character-details .meter-block {
  max-width: 35rem;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.stat-grid > div {
  border-left: 1px solid var(--border);
  padding-left: 0.8rem;
}
.stat-grid span {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
}
.stat-grid b {
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--gold);
}
.talent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.talent-card {
  display: flex;
  flex-direction: column;
}
.talent-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.talent-heading > span {
  color: var(--gold);
  font-size: 1.4rem;
}
.talent-heading h3 {
  font-size: 1.15rem;
}
.talent-heading b {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--gold);
  white-space: nowrap;
}
.talent-heading small {
  color: var(--muted);
  font-size: 0.65rem;
}
.talent-card > p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 1rem 0;
}
.context-note {
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-left: 2px solid var(--gold);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  margin: 1rem 0;
}
.intro-panel {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.intro-panel .service-icon {
  font-size: 3rem;
  flex-shrink: 0;
}
.intro-panel h2 {
  margin-bottom: 0.7rem;
}
.intro-panel p {
  font-size: 0.85rem;
  color: var(--muted);
}
.forge-card h3 {
  margin-top: 0.4rem;
}
.temper-track {
  display: flex;
  gap: 0.3rem;
  margin: 1.2rem 0;
}
.temper-track i {
  height: 0.35rem;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 1px;
}
.temper-track .filled {
  background: var(--gold);
  border-color: var(--gold);
}
.forge-card > .secondary {
  margin-top: 1rem;
  font-size: 0.75rem;
}
.sanctum-banner {
  display: flex;
  gap: 2rem;
  align-items: center;
  background: radial-gradient(ellipse at left, #333244, var(--surface) 75%);
  margin-bottom: 1.5rem;
}
.sanctum-symbol {
  font-size: 5rem;
  color: #c4a5df;
  line-height: 1;
}
.sanctum-banner h2 {
  color: #e5dcee;
  margin-bottom: 0.8rem;
}
.sanctum-banner p {
  font-size: 0.85rem;
  color: #c1b7ca;
  max-width: 45rem;
}
.sanctum-banner .small {
  font-size: 0.7rem;
  margin-top: 0.6rem;
  color: #aa98b5;
}
.mastery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.mastery-top {
  display: flex;
  justify-content: space-between;
  color: #bfa1d5;
  margin-bottom: 1rem;
  align-items: center;
}
.mastery-top > span {
  font-size: 2rem;
  line-height: 1;
}
.mastery-top b {
  font-weight: 400;
  font-size: 1.5rem;
}
.mastery-top small {
  font-size: 0.7rem;
  color: var(--muted);
}
.mastery-card h3 {
  font-size: 1.3rem;
}
.mastery-card > p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.8rem 0 1.5rem;
}
.meter.mastery i {
  background: #a78ac0;
}
.journey-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.7rem;
  margin-bottom: 2rem;
}
.journey-stats > .panel {
  padding: 1rem;
}
.journey-stats b {
  font-size: 1.7rem;
  color: var(--gold);
  font-family: GameSerif, Georgia, serif;
  font-weight: 400;
  display: block;
}
.journey-stats span {
  font-size: 0.6rem;
  color: var(--muted);
}
.journal-list {
  max-width: 55rem;
}
.journal-entry {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2rem;
  position: relative;
}
.journal-entry:before {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0;
  left: 0.3rem;
  width: 1px;
  background: var(--border);
}
.journal-dot {
  width: 0.65rem;
  height: 0.65rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
  background: var(--bg);
  margin-top: 0.35rem;
}
.journal-entry time {
  font-size: 0.64rem;
  color: var(--muted);
}
.journal-entry h2 {
  font-size: 1.4rem;
  margin: 0.35rem 0 0.6rem;
}
.journal-entry p {
  font-size: 0.85rem;
  color: var(--muted);
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.guide-grid h2 {
  margin-bottom: 1rem;
}
.guide-grid p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.guide-grid h3 {
  margin: 1.5rem 0 0.8rem;
}
.bestiary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.bestiary-grid .panel > span {
  color: var(--gold);
}
.bestiary-grid h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}
.bestiary-grid p {
  font-size: 0.75rem;
  color: var(--muted);
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.settings-grid h2 {
  margin-bottom: 1.4rem;
}
.settings-grid p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.setting-row b {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
}
.setting-row small {
  display: block;
  font-size: 0.69rem;
  color: var(--muted);
  max-width: 16rem;
}
.setting-row select {
  font-size: 0.76rem;
  max-width: 12rem;
}
.settings-grid .button,
.settings-grid button {
  font-size: 0.8rem;
}
.settings-grid hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
form > label {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 1.2rem;
}
form > label > input {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
}
.empty-state {
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: 6px;
  gap: 1.2rem;
}
.empty-state > span {
  font-size: 3rem;
  color: var(--gold);
}
.empty-state p {
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 32rem;
}
.empty-state h2 {
  font-size: 1.8rem;
}
.empty-state.compact {
  min-height: 15rem;
}
.loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
}
.loading h1 {
  max-width: 30rem;
}
.loading p {
  color: var(--muted);
}
.sigil {
  font-size: 5rem;
  color: var(--gold);
}
.entry-page {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  padding: 8rem 7%;
  isolation: isolate;
}
.entry-art {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.entry-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.entry-art > div {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #07100ef5, #091411c9 43%, #0b131422);
}
.entry-brand {
  position: absolute;
  left: 7%;
  top: 2.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #e6dfce;
  font-family: GameSerif, Georgia, serif;
  font-size: 1.1rem;
}
.entry-brand > span {
  font-size: 2.8rem;
  color: #cfb277;
  line-height: 1;
}
.entry-panel {
  max-width: 29rem;
  width: 100%;
  color: #e9e6da;
  background: #121b17ed;
  padding: 2rem;
  border: 1px solid #465141;
  border-radius: 6px;
  box-shadow: 0 25px 80px #0004;
}
.entry-panel h1 {
  font-size: 2.5rem;
  margin: 0.5rem 0 1.2rem;
}
.entry-panel .eyebrow {
  color: #d7b87b;
}
.entry-panel > p {
  font-size: 0.88rem;
  color: #b4bdad;
  margin-bottom: 2rem;
}
.entry-panel input,
.entry-panel select {
  background: #0e1713;
  color: #e9e6da;
  border-color: #465141;
}
.entry-panel .small {
  color: #a6afa2;
}
.entry-panel form .primary {
  margin-top: 0.4rem;
}
.entry-settings {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid #354036;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.entry-settings label {
  font-size: 0.66rem;
  color: #a6afa2;
}
.entry-settings select {
  font-size: 0.7rem;
  margin-left: 0.5rem;
  min-height: 2.2rem;
  padding: 0.3rem 0.5rem;
}
.entry-settings button {
  font-size: 0.7rem;
  color: #c4b48d;
}
.form-error {
  font-size: 0.78rem;
  color: #e5a291;
  margin-top: 1rem;
}
.creation-page {
  position: relative;
  min-height: 100vh;
  padding: 4rem 4%;
  isolation: isolate;
}
.creation-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(0deg, var(--bg) 10%, var(--entry-overlay) 70%),
    var(--art-hallowford) center/cover;
}
.creation-container {
  max-width: 70rem;
  margin: auto;
}
.creation-container > h1 {
  font-size: 3rem;
  margin: 0.5rem 0 1rem;
}
.creation-lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  max-width: 35rem;
}
.name-label {
  max-width: 25rem;
}
.name-label input {
  font-family: GameSerif, Georgia, serif;
  font-size: 1.3rem;
  min-height: 3.4rem;
}
.creation-page fieldset {
  border: 0;
  padding: 0;
  margin: 2rem 0;
}
.creation-page legend {
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}
.class-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.class-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s;
}
.class-card:hover {
  border-color: var(--gold-soft);
}
.class-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.class-card > input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}
.class-card:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.class-art {
  height: 15rem;
  display: grid;
  place-items: center;
  background: radial-gradient(
    ellipse at 50% 30%,
    #6f6d4b,
    #26372c 65%,
    #19201c
  );
  position: relative;
}
.class-art > span {
  font-size: 7rem;
  color: #c4b47f;
  text-shadow: 0 8px 30px #0008;
}
.class-art.ranger {
  background: radial-gradient(
    ellipse at 50% 30%,
    #62704e,
    #21382a 65%,
    #19201c
  );
}
.class-art.arcanist {
  background: radial-gradient(
    ellipse at 50% 30%,
    #686581,
    #292e43 65%,
    #19201c
  );
}
.class-copy {
  padding: 1.5rem;
}
.class-copy .eyebrow {
  font-size: 0.57rem;
}
.class-copy h2 {
  font-size: 1.7rem;
  margin: 0.35rem 0 0.75rem;
}
.class-copy p {
  font-size: 0.83rem;
  color: var(--muted);
  min-height: 3rem;
}
.class-copy small {
  display: block;
  font-size: 0.65rem;
  color: var(--gold-soft);
  margin-top: 1.1rem;
}
.selection-check {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 2;
  color: var(--gold);
  background: #101a15ce;
  border: 1px solid #6c7250;
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.8rem;
  pointer-events: none;
}
.creation-bottom {
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.creation-bottom p {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 30rem;
}
.creation-bottom .primary {
  white-space: nowrap;
}
.working [data-action] {
  pointer-events: none;
}
.working {
  cursor: progress;
}
#notice {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 1rem);
  background: #283d2e;
  color: #e7e9dd;
  box-shadow: 0 10px 35px #0005;
  border: 1px solid #698363;
  padding: 1rem 1.5rem;
  border-radius: 5px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: min(90vw, 45rem);
  font-size: 0.85rem;
}
#notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
#notice.error {
  background: #432b25;
  border-color: #a47461;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 2.2rem;
  border-radius: 7px;
  max-width: min(90vw, 32rem);
  box-shadow: 0 30px 100px #0007;
}
dialog::backdrop {
  background: #060b09c9;
  backdrop-filter: blur(3px);
}
dialog h2 {
  margin: 0.5rem 1.5rem 1rem 0;
  font-size: 1.8rem;
}
dialog p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.dialog-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border-color: transparent;
  background: transparent;
  font-size: 1.5rem;
  padding: 0.25rem;
  min-height: 2rem;
  width: 2rem;
  color: var(--muted);
}
.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.dialog-actions button {
  font-size: 0.8rem;
}
@media (min-width: 1700px) {
  .town-scene {
    height: 31rem;
  }
  .dungeon-scene {
    height: 28rem;
  }
  #main {
    padding-top: 2.7rem;
  }
  .delve-layout {
    grid-template-columns: minmax(0, 1fr) 22rem;
  }
}
@media (max-width: 1250px) {
  .layout {
    grid-template-columns: 12.5rem minmax(0, 1fr);
  }
  .sidebar {
    width: 12.5rem;
    padding: 1.5rem 0.7rem;
  }
  .brand {
    font-size: 0.95rem;
    gap: 0.5rem;
  }
  .brand-mark {
    font-size: 2rem;
  }
  .sidebar nav a {
    font-size: 0.77rem;
    padding: 0.7rem 0.65rem;
    gap: 0.55rem;
  }
  .topbar {
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .top-vitals {
    gap: 0.8rem;
  }
  .currencies {
    gap: 0.8rem;
  }
  #main {
    padding: 1.8rem 1.5rem 2.5rem;
  }
  .town-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contract-card {
    grid-column: 1/-1;
  }
  .delve-layout {
    grid-template-columns: minmax(0, 1fr) 17.5rem;
    gap: 1rem;
  }
  .item-grid,
  .talent-grid {
    grid-template-columns: 1fr 1fr;
  }
  .equipped-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .mastery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .journey-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .scene-caption h2 {
    font-size: 2.2rem;
  }
  .town-scene {
    height: 26rem;
  }
}
@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
  }
  .top-vitals {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    grid-template-columns: 1fr 1fr;
  }
  .hero-identity {
    flex: 1;
  }
  .currencies {
    margin-left: auto;
  }
  .topbar {
    gap: 0.8rem;
  }
  .delve-layout {
    grid-template-columns: 1fr;
  }
  .delve-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .dungeon-map {
    max-width: 24rem;
    margin: auto;
  }
  .delve-aside .panel {
    margin: 0;
  }
  .dungeon-scene {
    height: 24rem;
  }
  .map-room {
    min-height: 3.2rem;
  }
  .map-room small {
    font-size: 0.52rem;
  }
  .character-panel {
    gap: 1.2rem;
  }
  .character-portrait {
    width: 8rem;
  }
  .character-portrait > span {
    font-size: 5rem;
  }
  .bestiary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .settings-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .town-lower {
    grid-template-columns: 1fr;
  }
  .class-art {
    height: 11rem;
  }
  .class-art > span {
    font-size: 5rem;
  }
  .class-copy {
    padding: 1.1rem;
  }
  .class-copy h2 {
    font-size: 1.5rem;
  }
  .class-copy p {
    min-height: 5rem;
  }
  .class-copy small {
    min-height: 3rem;
  }
  .creation-bottom {
    align-items: flex-start;
  }
  .creation-bottom p {
    max-width: 22rem;
  }
  .scene-caption {
    left: 1.5rem;
    bottom: 1.5rem;
  }
}
@media (max-width: 760px) {
  .sidebar nav a:hover:not(.active) {
    background: transparent;
  }
  .layout {
    display: block;
  }
  .sidebar {
    position: relative;
    width: 100%;
    padding: 0.8rem 1rem 0.5rem;
    border-right: 0;
    border-bottom: 1px solid #303a31;
    display: block;
    overflow: visible;
  }
  .brand {
    font-size: 0.9rem;
    line-height: 1.1;
    gap: 0.7rem;
    display: inline-flex;
  }
  .brand > span:last-child br {
    display: none;
  }
  .brand-mark {
    font-size: 2rem;
  }
  .sidebar-rule,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.3rem;
    margin-top: 0.6rem;
    padding-bottom: 0.3rem;
    scrollbar-width: thin;
  }
  .sidebar nav a {
    font-size: 0.7rem;
    padding: 0.5rem 0.65rem;
    white-space: nowrap;
    min-height: 2.4rem;
    border-left: 0;
    border-bottom: 2px solid transparent;
    gap: 0.35rem;
  }
  .sidebar nav a.active {
    border-bottom-color: #c9ad73;
    border-left: 0;
  }
  .sidebar nav a > span {
    font-size: 1rem;
    width: auto;
  }
  .sidebar nav .badge {
    font-size: 0.55rem;
    min-width: 1rem;
  }
  .live-dot {
    display: none;
  }
  .topbar {
    padding: 0.9rem 1rem;
    min-height: 0;
  }
  .hero-identity {
    min-width: 8rem;
  }
  .hero-identity b {
    font-size: 0.78rem;
  }
  .avatar {
    width: 2.3rem;
    height: 2.3rem;
    font-size: 1.5rem;
  }
  .currencies {
    font-size: 0.8rem;
    gap: 1rem;
  }
  .currencies small {
    font-size: 0.53rem;
  }
  .settings-shortcut {
    font-size: 1rem;
  }
  .top-vitals .meter-label {
    font-size: 0.6rem;
  }
  #main {
    padding: 1.5rem 1rem 2rem;
  }
  .page-heading {
    margin-bottom: 1.2rem;
    align-items: flex-start;
  }
  h1 {
    font-size: 1.95rem;
  }
  .page-heading .eyebrow {
    font-size: 0.57rem;
  }
  .location-tag {
    font-size: 0.57rem;
    padding: 0.35rem 0.5rem;
    margin-top: 0.2rem;
  }
  .town-scene {
    height: 26rem;
  }
  .scene-caption {
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.4rem;
  }
  .scene-caption h2 {
    font-size: 2.2rem;
  }
  .scene-caption p {
    font-size: 0.8rem;
  }
  .scene-label {
    top: 1rem;
    right: 1rem;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading h2 {
    font-size: 1.35rem;
  }
  .section-heading > span {
    font-size: 0.65rem;
    text-align: right;
    max-width: 12rem;
  }
  .town-grid {
    grid-template-columns: 1fr;
  }
  .contract-card {
    grid-column: auto;
  }
  .service-card {
    padding: 1.3rem;
  }
  .service-card h3 {
    font-size: 1.3rem;
  }
  .service-icon {
    margin-bottom: 0.8rem;
  }
  .service-card > p {
    font-size: 0.8rem;
  }
  .town-lower {
    gap: 0.7rem;
  }
  .destination {
    padding: 1.2rem;
    gap: 0.8rem;
  }
  .recent-note {
    gap: 0.5rem;
  }
  .recent-note p {
    flex-basis: 100%;
    font-size: 0.9rem;
  }
  .recent-note a {
    font-size: 0.65rem;
  }
  .delve-aside {
    grid-template-columns: 1fr 1fr;
  }
  .delve-aside .panel {
    padding: 1rem;
  }
  .dungeon-scene {
    height: 22rem;
  }
  .dungeon-scene .scene-caption {
    left: 1.2rem;
    bottom: 1.3rem;
  }
  .dungeon-scene .scene-caption h2 {
    font-size: 2rem;
  }
  .combat-panel,
  .event-panel,
  .encounter-panel,
  .combat-log {
    padding: 1.2rem;
  }
  .enemy-health {
    gap: 1rem;
  }
  .ability {
    padding: 0.8rem 0.65rem;
  }
  .ability b {
    font-size: 0.75rem;
  }
  .ability small {
    font-size: 0.6rem;
  }
  .intent p {
    font-size: 0.65rem;
  }
  .equipped-grid {
    gap: 0.5rem;
  }
  .equipped-slot {
    padding: 0.8rem;
    min-height: 9rem;
  }
  .equipped-slot b {
    font-size: 0.7rem;
  }
  .item-grid {
    grid-template-columns: 1fr 1fr;
  }
  .item-card {
    padding: 1rem;
  }
  .item-top {
    gap: 0.6rem;
  }
  .item-top h3 {
    font-size: 1rem;
  }
  .item-icon {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.4rem;
  }
  .item-stats {
    gap: 0.4rem 0.7rem;
  }
  .inventory-toolbar {
    gap: 0.6rem;
  }
  .inventory-toolbar > .text-button {
    margin: 0;
    min-height: 2.5rem;
    padding: 0.5rem 0;
  }
  .character-panel {
    flex-direction: column;
  }
  .character-portrait {
    width: 100%;
    min-height: 10rem;
    height: 10rem;
  }
  .character-portrait > span {
    font-size: 5rem;
  }
  .character-details h2 {
    font-size: 2rem;
  }
  .talent-grid {
    grid-template-columns: 1fr 1fr;
  }
  .talent-card {
    padding: 1.1rem;
  }
  .talent-heading {
    gap: 0.4rem;
    flex-wrap: wrap;
  }
  .talent-heading h3 {
    font-size: 1.1rem;
  }
  .talent-heading b {
    font-size: 0.8rem;
  }
  .mastery-card {
    padding: 1.2rem;
  }
  .mastery-card h3 {
    font-size: 1.25rem;
  }
  .mastery-card .card-bottom {
    align-items: flex-start;
    gap: 0.6rem;
  }
  .sanctum-banner {
    gap: 1rem;
    padding: 1.3rem;
  }
  .sanctum-symbol {
    font-size: 3rem;
  }
  .sanctum-banner h2 {
    font-size: 1.45rem;
  }
  .bestiary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .journey-stats {
    gap: 0.5rem;
  }
  .journey-stats > .panel {
    padding: 0.8rem;
  }
  .journey-stats b {
    font-size: 1.5rem;
  }
  .journey-stats span {
    font-size: 0.55rem;
  }
  .intro-panel {
    gap: 1rem;
    align-items: flex-start;
  }
  .intro-panel h2 {
    font-size: 1.4rem;
  }
  .intro-panel .service-icon {
    font-size: 2rem;
  }
  .settings-grid .panel {
    padding: 1.3rem;
  }
  .setting-row {
    gap: 0.7rem;
  }
  .setting-row select {
    font-size: 0.7rem;
    max-width: 10rem;
  }
  .setting-row small {
    max-width: 12rem;
    font-size: 0.63rem;
  }
  footer {
    padding: 1rem;
    font-size: 0.55rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .entry-page {
    padding: 7rem 1rem 2rem;
    justify-content: center;
  }
  .entry-brand {
    left: 1.5rem;
    top: 1.5rem;
    font-size: 0.95rem;
  }
  .entry-brand > span {
    font-size: 2.2rem;
  }
  .entry-panel {
    padding: 1.6rem;
  }
  .entry-panel h1 {
    font-size: 2.3rem;
  }
  .entry-art > div {
    background: #091411c9;
  }
  .creation-page {
    padding: 2rem 1rem;
  }
  .creation-container > h1 {
    font-size: 2.4rem;
  }
  .creation-lead {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }
  .class-options {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .class-card {
    display: grid;
    grid-template-columns: 7rem 1fr;
  }
  .class-art {
    height: 100%;
    min-height: 13rem;
  }
  .class-art > span {
    font-size: 3.8rem;
  }
  .class-copy p {
    min-height: 0;
    font-size: 0.8rem;
  }
  .class-copy small {
    min-height: 0;
  }
  .class-copy h2 {
    font-size: 1.5rem;
  }
  .selection-check {
    right: 0.6rem;
    top: 0.6rem;
    width: 1.3rem;
    height: 1.3rem;
  }
  .class-copy {
    padding: 1.2rem;
  }
  .class-copy .eyebrow {
    padding-right: 1rem;
    font-size: 0.52rem;
  }
  .creation-bottom {
    flex-direction: column;
    gap: 1rem;
  }
  .creation-bottom p {
    max-width: none;
  }
  .creation-bottom .primary {
    width: 100%;
  }
}
@media (max-width: 480px) {
  .delve-aside {
    grid-template-columns: 1fr;
  }
  .dungeon-map {
    max-width: none;
  }
  .map-room {
    min-height: 3.7rem;
  }
  .map-room small {
    font-size: 0.58rem;
  }
  .map-room > span {
    font-size: 1.3rem;
  }
  .item-grid,
  .talent-grid,
  .mastery-grid {
    grid-template-columns: 1fr;
  }
  .equipped-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .enemy-health {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .intent {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
  }
  .intent > span {
    white-space: nowrap;
    font-size: 0.68rem;
  }
  .intent p {
    margin: 0;
    font-size: 0.6rem;
  }
  .combat-actions {
    gap: 0.5rem;
  }
  .ability b {
    font-size: 0.7rem;
  }
  .ability small {
    font-size: 0.55rem;
  }
  .travel-options {
    grid-template-columns: 1fr;
  }
  .page-heading {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .page-heading h1 {
    font-size: 1.9rem;
  }
  .location-tag {
    margin: 0;
  }
  .town-scene {
    height: 27rem;
  }
  .scene-caption h2 {
    font-size: 2.05rem;
  }
  .descent-control {
    flex-direction: column;
  }
  .descent-control select,
  .descent-control button {
    width: 100%;
  }
  .town-scene .scene-caption {
    bottom: 1.2rem;
  }
  .scene-caption p {
    font-size: 0.75rem;
  }
  .hero-identity {
    min-width: 0;
    max-width: 12rem;
  }
  .hero-identity > div:last-child {
    min-width: 0;
  }
  .currencies {
    gap: 0.7rem;
  }
  .currencies > span {
    font-size: 0.75rem;
  }
  .settings-shortcut {
    display: none;
  }
  .topbar {
    gap: 0.7rem;
  }
  .top-vitals {
    gap: 1rem;
  }
  .stat-grid {
    gap: 1rem 0.5rem;
  }
  .stat-grid > div {
    padding-left: 0.6rem;
  }
  .stat-grid span {
    font-size: 0.57rem;
  }
  .journey-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bestiary-grid {
    grid-template-columns: 1fr;
  }
  .setting-row {
    flex-wrap: wrap;
  }
  .setting-row > span {
    flex: 1;
    min-width: 9rem;
  }
  .setting-row small {
    max-width: 14rem;
  }
  .setting-row select {
    max-width: 100%;
  }
  .sanctum-symbol {
    display: none;
  }
  .class-card {
    grid-template-columns: 5rem 1fr;
  }
  .class-art > span {
    font-size: 3rem;
  }
  .class-copy {
    padding: 1.2rem 1rem;
  }
  .class-copy h2 {
    font-size: 1.4rem;
  }
  .entry-settings {
    gap: 0.5rem;
  }
  .entry-settings button {
    font-size: 0.65rem;
  }
  .entry-brand {
    font-size: 0.8rem;
  }
  .entry-panel h1 {
    font-size: 2rem;
  }
  .entry-panel {
    padding: 1.3rem;
  }
  .enemy-emblem {
    width: 4.5rem;
    height: 4.5rem;
    font-size: 3rem;
    right: 1rem;
    top: 1rem;
  }
  .dungeon-scene .scene-caption h2 {
    font-size: 1.8rem;
  }
  .recent-note p {
    min-width: 0;
  }
  .section-heading > span {
    max-width: 9rem;
  }
  .creation-bottom .primary {
    font-size: 0.85rem;
  }
}
.prepared-combat {
  margin-top: 0.7rem;
}
.damage-outlook {
  display: flex;
  gap: 0.6rem 1.5rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.damage-outlook b {
  color: var(--gold);
  margin-left: 0.5rem;
  font-weight: 500;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  box-shadow: 0 4px 12px #0002;
}
.meter-label {
  flex-wrap: wrap;
}
[data-theme="light"] .ember,
[data-theme="light"] .mastery-top,
[data-theme="light"] .currencies > span:nth-child(2) {
  color: #79528f;
}
.prepared-combat .ability {
  border-color: #657d6a;
  background: var(--surface2);
}
.ability-hint,
.ability-intro {
  margin-top: 1rem;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}
.prepared-card {
  border-color: var(--gold-soft);
}
.ability-grid .eyebrow {
  margin-bottom: 0.6rem;
}
.enemy-portrait {
  position: absolute;
  right: 1.4rem;
  top: 1.4rem;
  width: 9rem;
  height: 12rem;
  background-size: 400% 100%;
  background-repeat: no-repeat;
  border: 1px solid #8e8062;
  border-radius: 5px;
  box-shadow: 0 8px 35px #0007;
}
.boss-portrait {
  background-size: 600% auto;
  border-color: #bb9860;
  box-shadow:
    0 8px 40px #0009,
    0 0 24px #a96c2530;
}
.illustrated-item {
  background-image: var(--art-equipment);
  background-repeat: no-repeat;
  background-size: 300% 200%;
}
.icon-weapon {
  background-position: 0 0;
}
.icon-armor {
  background-position: 50% 0;
}
.icon-head {
  background-position: 100% 0;
}
.icon-ring {
  background-position: 0 100%;
}
.icon-charm {
  background-position: 50% 100%;
}
.icon-boots {
  background-position: 100% 100%;
}
.equipped-slot > .equipped-art {
  width: 3.2rem;
  height: 3.2rem;
  display: block;
  margin-bottom: 0.7rem;
}
.equipped-slot:not([class*="rarity-"]) > .equipped-art {
  opacity: 0.3;
  filter: grayscale(1);
}
.in-combat .scene-caption {
  right: 12rem;
}
.in-combat .scene-caption h2 {
  font-size: 1.9rem;
}
.restore-file {
  display: block;
  margin: 1.4rem 0 0.7rem;
  font-size: 0.8rem;
  color: var(--gold);
}
.restore-file input {
  display: block;
  margin-top: 0.6rem;
  width: 100%;
  font-size: 0.7rem;
}
.service-card > p,
.guide-grid p,
.settings-grid p,
.character-details > p,
.mastery-card > p,
.talent-card > p,
.intro-panel p,
.encounter-panel p {
  font-size: 0.9rem;
}
.class-art.warden,
.class-art.ranger,
.class-art.arcanist,
.character-portrait.warden,
.character-portrait.ranger,
.character-portrait.arcanist {
  background-image: var(--art-callings);
  background-size: 300% auto;
  background-repeat: no-repeat;
  background-position: 0 12%;
}
.class-art.ranger,
.character-portrait.ranger {
  background-position: 50% 12%;
}
.class-art.arcanist,
.character-portrait.arcanist {
  background-position: 100% 12%;
}
.class-art > span,
.character-portrait > span {
  visibility: hidden;
}
.avatar {
  background-image: var(--art-callings);
  background-size: 300% auto;
  background-position: 0 5%;
  color: transparent;
}
.avatar.ranger {
  background-position: 50% 5%;
}
.avatar.arcanist {
  background-position: 100% 5%;
}
@media (max-width: 760px) {
  .class-art.warden,
  .class-art.ranger,
  .class-art.arcanist {
    background-size: auto 100%;
  }
  .character-portrait.warden,
  .character-portrait.ranger,
  .character-portrait.arcanist {
    background-size: 300% auto;
    background-position-y: 18%;
  }
}
@media (max-width: 480px) {
  .enemy-portrait {
    width: 6.5rem;
    height: 9rem;
    right: 1rem;
    top: 1rem;
  }
  .in-combat .scene-caption {
    right: 1.2rem;
    bottom: 1rem;
  }
  .in-combat .scene-caption h2 {
    font-size: 1.65rem;
  }
  .in-combat .scene-caption p {
    font-size: 0.72rem;
    max-width: 20rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
[data-motion="off"] *,
[data-motion="off"] *:before,
[data-motion="off"] *:after {
  transition: none !important;
}
:root {
  --history-rule: color-mix(in srgb, currentColor 16%, transparent);
}
.event-options > div {
  min-width: 0;
}
.event-options > div button {
  width: 100%;
  height: 100%;
}
.event-options > div:has(p) button {
  height: auto;
}
.history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.history-volume {
  padding: 0;
  overflow: hidden;
}
.history-volume > img {
  width: 100%;
  height: 9rem;
  object-fit: cover;
}
.history-copy {
  padding: 1.5rem;
}
.history-copy h3 {
  margin: 0.5rem 0 1.3rem;
}
.lore-page,
.missing-page {
  border-top: 1px solid var(--history-rule);
  padding: 0.8rem 0;
  margin: 0;
}
.lore-page summary {
  cursor: pointer;
  line-height: 1.6;
}
.lore-page summary span,
.missing-page span {
  display: inline-block;
  width: 1.6rem;
  opacity: 0.5;
}
.lore-page p {
  line-height: 1.85;
}
.missing-page {
  opacity: 0.5;
  font-size: 0.875rem;
}
.lore-complete {
  color: var(--gold);
  margin-top: 1rem;
}
@media (max-width: 800px) {
  .history-grid {
    grid-template-columns: 1fr;
  }
}
:root {
  --gain: #a9c994;
  --loss: #e09b8d;
}
html[data-theme="light"] {
  --gain: #3c632c;
  --loss: #963d31;
}
.market-intro {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.market-intro > div {
  flex: 1;
}
.market-intro > button {
  max-width: 18rem;
  flex-shrink: 0;
}
.stat-changes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.stat-gain {
  color: var(--gain);
}
.stat-loss {
  color: var(--loss);
}
@media (max-width: 800px) {
  .market-intro {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }
  .market-intro > button {
    max-width: none;
  }
}
.merchant-scene {
  margin: 0 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--history-rule);
  border-radius: 0.4rem;
  height: clamp(14rem, 29vw, 23rem);
}
.merchant-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% 36%;
}
.town-lower .destination:first-child {
  grid-column: 1 / -1;
}
dialog {
  max-height: 88dvh;
  overflow-y: auto;
}
.character-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0 2rem;
}
.portrait-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}
.portrait-option {
  display: block;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  font-size: 0.8rem;
}
.portrait-option input {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--gold);
}
.portrait-option > span:last-child {
  display: block;
  padding: 0.6rem 0.2rem;
}
.portrait-option:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.portrait-option:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.portrait-art {
  display: block;
  height: 8rem;
  background-repeat: no-repeat;
  background-color: var(--surface);
}
.portrait-art.warden,
.portrait-art.ranger,
.portrait-art.arcanist {
  background-image: var(--art-callings);
  background-size: 300% auto;
  background-position: 0 10%;
}
.portrait-art.ranger {
  background-position-x: 50%;
}
.portrait-art.arcanist {
  background-position-x: 100%;
}
.veteran,
.sentinel,
.tracker,
.wanderer,
.scholar,
.seer {
  background-image: var(--art-portraits);
  background-size: 600% auto;
  background-repeat: no-repeat;
  background-position: calc(var(--portrait-column) * 20%) 22%;
}
.veteran {
  --portrait-column: 0;
}
.sentinel {
  --portrait-column: 1;
}
.tracker {
  --portrait-column: 2;
}
.wanderer {
  --portrait-column: 3;
}
.scholar {
  --portrait-column: 4;
}
.seer {
  --portrait-column: 5;
}
.creation-portraits {
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
}
.creation-portraits summary {
  cursor: pointer;
}
.creation-portraits .portrait-art {
  height: 12rem;
}
.portrait-default {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.portrait-default input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}
@media (max-width: 760px) {
  .portrait-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .character-portrait:is(
    .veteran,
    .sentinel,
    .tracker,
    .wanderer,
    .scholar,
    .seer
  ) {
    background-position-y: 30%;
  }
}
kbd {
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 0.2rem;
  padding: 0.1rem 0.35rem;
  font: 0.65rem inherit;
  opacity: 0.6;
  margin-left: 0.5rem;
}
dialog:has(#identity-form) {
  width: min(90vw, 44rem);
  max-width: min(90vw, 44rem);
}
dialog fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 1rem 0;
}
kbd {
  font-size: 0.65rem;
  font-family: inherit;
}
@media (max-width: 600px) {
  html:is([data-text-size="26"], [data-text-size="30"]) #main {
    overflow-wrap: anywhere;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) #main .panel {
    min-width: 0;
    padding: 0.9rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .equipped-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .equipped-slot {
    min-height: 0;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .destination {
    padding: 0.9rem;
    gap: 0.6rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .destination > div {
    min-width: 0;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .destination > span {
    font-size: 1.5rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .destination > b {
    display: none;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .intro-panel {
    flex-direction: column;
    gap: 0.7rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .intro-panel > div {
    min-width: 0;
  }
  html:is([data-text-size="26"], [data-text-size="30"])
    .setting-row:has(select) {
    flex-direction: column;
    align-items: stretch;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .setting-row > span {
    min-width: 0;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .setting-row select {
    width: 100%;
    max-width: 100%;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .settings-grid button,
  html:is([data-text-size="26"], [data-text-size="30"]) .settings-grid .button {
    max-width: 100%;
    min-width: 0;
  }
}
html:is([data-text-size="26"], [data-text-size="30"]) .layout {
  display: block;
}
html:is([data-text-size="26"], [data-text-size="30"]) .sidebar {
  position: relative;
  width: 100%;
  height: auto;
  padding: 0.8rem 1rem;
  overflow: visible;
  border-right: 0;
  border-bottom: 1px solid var(--border);
}
html:is([data-text-size="26"], [data-text-size="30"]) .brand br {
  display: none;
}
html:is([data-text-size="26"], [data-text-size="30"]) .sidebar-rule,
html:is([data-text-size="26"], [data-text-size="30"]) .sidebar-bottom {
  display: none;
}
html:is([data-text-size="26"], [data-text-size="30"]) .sidebar nav {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 0.3rem;
  padding: 0.5rem 0;
}
html:is([data-text-size="26"], [data-text-size="30"]) .sidebar nav a {
  flex-shrink: 0;
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
}
html:is([data-text-size="26"], [data-text-size="30"]) .topbar {
  flex-wrap: wrap;
  gap: 0.6rem;
}
html:is([data-text-size="26"], [data-text-size="30"]) .top-vitals {
  order: 3;
  width: 100%;
  max-width: none;
}
html:is([data-text-size="26"], [data-text-size="30"]) .hero-identity {
  flex: 1;
  min-width: 0;
}
html:is([data-text-size="26"], [data-text-size="30"]) .page-heading {
  flex-wrap: wrap;
}
@media (min-width: 601px) {
  html:is([data-text-size="26"], [data-text-size="30"]) .character-panel {
    flex-direction: column;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .character-portrait {
    width: 100%;
    height: 10rem;
    min-height: 10rem;
    background-position-y: 30%;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .talent-grid,
  html:is([data-text-size="26"], [data-text-size="30"]) .item-grid,
  html:is([data-text-size="26"], [data-text-size="30"]) .mastery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .settings-grid,
  html:is([data-text-size="26"], [data-text-size="30"]) .guide-grid,
  html:is([data-text-size="26"], [data-text-size="30"]) .history-grid,
  html:is([data-text-size="26"], [data-text-size="30"]) .delve-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .equipped-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  html:is([data-text-size="26"], [data-text-size="30"]) dialog {
    padding: 1rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .class-card {
    display: block;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .class-art {
    height: 12rem;
    min-height: 12rem;
    background-size: 300% auto;
  }
  html:is([data-text-size="26"], [data-text-size="30"])
    .creation-container
    > h1 {
    font-size: 1.9rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .entry-panel {
    padding: 1rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .entry-panel h1 {
    font-size: 1.6rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) .entry-brand {
    left: 1rem;
    top: 1rem;
    max-width: calc(100% - 2rem);
  }
}
.entry-page#main {
  padding: 8rem 7%;
}
@media (max-width: 600px) {
  .entry-page#main {
    padding: 7rem 1rem 2rem;
  }
  html:is([data-text-size="26"], [data-text-size="30"]) button,
  html:is([data-text-size="26"], [data-text-size="30"]) .button {
    overflow-wrap: normal;
  }
  html:is([data-text-size="26"], [data-text-size="30"])
    .entry-panel
    form
    .primary
    span {
    display: none;
  }
}
.class-card > input {
  margin: 0;
  padding: 0;
  min-height: 0;
}
