:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  --ink: #100e13;
  --surface: #19151d;
  --lift: #241d29;
  --line: #3a2e3e;
  --edge: #5e464c;
  --text: #f3e9e2;
  --quiet: #c0adb8;
  --gold: #e0ab76;
  --light-gold: #f3cf9e;
  --red: #a83b53;
  --blue: #a8b5eb;
  --serif: Georgia, "Times New Roman", serif;
  background: var(--ink);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 52% 10%, #281a28 0, var(--ink) 58%); }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--light-gold); }
:focus-visible { outline: 2px solid var(--light-gold); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: normal; }
h1 { font-size: clamp(2.5rem, 5.1vw, 4.85rem); letter-spacing: -.055em; line-height: .97; margin-bottom: .8rem; }
h2 { font-size: clamp(1.45rem, 2.7vw, 2.25rem); line-height: 1.08; margin-bottom: .75rem; }
h3 { font-size: 1.32rem; margin-bottom: .4rem; }
p { line-height: 1.55; margin-bottom: .9rem; }
p:last-child { margin-bottom: 0; }
img { max-width: 100%; }
.topbar { background: #161219; border-bottom: 1px solid var(--edge); box-shadow: 0 5px 30px #09070c80; }
.topbar-inner { display: flex; align-items: center; min-height: 66px; gap: clamp(1rem, 4vw, 4.5rem); max-width: 1420px; margin: auto; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; font: 1.35rem/1 var(--serif); letter-spacing: .17em; text-decoration: none; color: var(--light-gold); white-space: nowrap; }
.brand-mark { display: grid; place-items: center; border: 1px solid #946c62; background: #2c1d29; width: 37px; aspect-ratio: 1; clip-path: polygon(19% 0,81% 0,100% 19%,100% 81%,81% 100%,19% 100%,0 81%,0 19%); letter-spacing: 0; }
.top-nav { display: flex; align-self: stretch; gap: 3px; }
.top-nav button { background: transparent; border: 0; border-bottom: 2px solid transparent; min-height: 44px; padding: 0 14px; color: var(--quiet); white-space: nowrap; }
.top-nav button:hover, .top-nav button[aria-current="page"] { color: var(--text); border-color: var(--gold); background: linear-gradient(transparent, #e0ab7610); }
.top-status { display: flex; gap: 12px; margin-left: auto; align-items: center; white-space: nowrap; font-size: .88rem; }
.dev-label { border: 1px solid #6a494d; border-radius: 3px; padding: 4px 7px; color: var(--gold); font-size: .75rem; letter-spacing: .12em; line-height: 1.1; }
.currency { font-weight: 700; color: var(--light-gold); }
.shell { max-width: 1420px; min-height: calc(100vh - 128px); margin: 0 auto; padding: 23px 24px 42px; }
.site-footer { display: flex; justify-content: space-between; gap: 10px; max-width: 1420px; padding: 17px 24px 21px; margin: auto; border-top: 1px solid var(--line); color: var(--quiet); font-size: .85rem; }
.overline { color: var(--gold); font-size: .77rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .75rem; }
.muted { color: var(--quiet); }
.eyebrow { display: inline-block; font-size: .79rem; color: var(--quiet); font-weight: 600; }
.small { font-size: .86rem; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1rem; text-decoration: none; text-align: center; border: 1px solid #d69b71; border-radius: 3px; background: linear-gradient(#edbc8e, #c58b63); color: #1f1417; font-weight: 740; line-height: 1.2; }
.button:hover:not(:disabled) { filter: brightness(1.12); }
.button:disabled { opacity: .46; }
.button.ghost { border-color: #685263; background: #241a25dc; color: var(--text); }
.button.danger { color: #f2b1b9; border-color: #854453; background: #37202b; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.panel { min-width: 0; border: 1px solid var(--line); background: linear-gradient(145deg, #221a25, #1a161e); border-radius: 5px; padding: clamp(1rem, 2vw, 1.5rem); }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .5rem 1rem; margin-bottom: 1rem; }
.section-heading h1, .section-heading h2, .section-heading p { margin-bottom: 0; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 294px); gap: 16px; }
.stack { display: grid; align-content: start; gap: 15px; min-width: 0; }
.hero { display: grid; align-items: end; position: relative; isolation: isolate; min-height: clamp(355px, 42vw, 500px); overflow: hidden; border: 1px solid #674752; border-radius: 5px; background: #211822; }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before { background: #2b1926 url("/assets/city.jpg") 60% 50% / cover no-repeat; }
.hero::after { background: linear-gradient(90deg,#170e1bed 2%,#1b111cdb 24%,#21122023 68%,transparent), linear-gradient(0deg,#140e16de,transparent 55%); }
.hero-content { max-width: 580px; padding: clamp(1.25rem, 4.3vw, 4.25rem); }
.hero-content > p:not(.overline) { font-size: clamp(1rem, 1.75vw, 1.15rem); max-width: 33rem; color: #eddbd9; }
.hero-content .actions { margin-top: 1.25rem; }
.city-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.location-card { display: grid; align-content: start; gap: 5px; color: var(--text); padding: 1rem; width: 100%; background: linear-gradient(150deg,#2f202f,#1c171e); border: 1px solid var(--line); border-radius: 4px; text-align: left; }
.location-card:hover { border-color: var(--gold); }
.location-icon { color: var(--gold); font-size: 1.5rem; line-height: 1.1; margin-bottom: .25rem; }
.location-title { font: 1.27rem/1.15 var(--serif); }
.character-card { padding: 0; overflow: hidden; }
.character-card-content { padding: 1rem 1.2rem; }
.character-card-content h2 { margin-bottom: .4rem; }
.city-figure { height: 255px; position: relative; display: grid; place-items: center; background: radial-gradient(ellipse, #3b2c41, #1a151d 68%); border-bottom: 1px solid var(--line); }
.city-figure img { width: 100%; height: 255px; object-fit: contain; object-position: center; }
.stat-list { margin: 0; display: grid; gap: .2rem; }
.stat-list div { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 36px; border-bottom: 1px solid var(--line); }
.stat-list dt { color: var(--quiet); }
.stat-list dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--light-gold); font-weight: 700; }
.stat-list .button { min-height: 38px; min-width: 42px; padding: .25rem; }
.progress-copy { display: flex; align-items: center; justify-content: space-between; gap: .25rem; margin-top: .85rem; font-size: .85rem; color: var(--quiet); }
.meter { position: relative; height: 8px; background: #100c13; margin: .4rem 0; border-radius: 2px; border: 1px solid #493442; overflow: hidden; }
.meter span { display: block; height: 100%; background: #b86759; }
.meter.hp span { background: linear-gradient(90deg,#6d2538,#d96b70); }
.meter.focus span { background: linear-gradient(90deg,#3b548b,#a1add6); }
.meter.xp span { background: linear-gradient(90deg,#9a614d,#e0ab76); }
.separator { width: 100%; height: 1px; background: var(--line); margin: .9rem 0; }
.subnav { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.subnav .button[aria-pressed="true"] { border-color: var(--gold); color: var(--light-gold); }
.roster, .equipment, .quest-list { display: grid; gap: 10px; }
.roster { grid-template-columns: repeat(2,minmax(0,1fr)); }
.equipment { grid-template-columns: repeat(2,minmax(0,1fr)); }
.card { border: 1px solid var(--line); border-radius: 4px; background: #18141c; padding: 1rem; min-width: 0; }
.bot-card { display: grid; grid-template-columns: minmax(78px, .65fr) 1fr; align-items: center; gap: 12px; padding: 0 12px 0 0; overflow: hidden; min-height: 230px; }
.bot-card img { width: 100%; height: 230px; object-fit: contain; background: #211824; }
.bot-card .actions { padding-bottom: .5rem; }
.queue-card { border-color: #66505f; }
.columns-creation { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(275px, .8fr); gap: 17px; }
.portraits { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.portrait-choice { min-width: 0; padding: 0; overflow: hidden; border: 1px solid #514153; border-radius: 4px; background: #211925; }
.portrait-choice[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.portrait-choice img { width: 100%; height: clamp(108px, 25vw, 320px); object-fit: contain; display: block; background: #211925; }
.portrait-choice span { display: grid; place-content: center; min-height: 44px; padding: .35rem .25rem; font-size: .86rem; }
.respec-portrait { width: 100%; height: 360px; object-fit: contain; background: #211925; }
.form-label { display: block; font-weight: 650; margin: 12px 0 5px; }
.field { min-height: 45px; width: 100%; background: #110f15; padding: .65rem .8rem; border: 1px solid #685365; border-radius: 3px; color: var(--text); }
.stepper { display: grid; grid-template-columns: 1fr 44px 26px 44px; align-items: center; gap: 7px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.stepper output { color: var(--light-gold); text-align: center; }
.stepper .button { padding: .2rem; }
.battle-head { margin-bottom: 15px; }
.battle-head h1 { font-size: clamp(2rem,4.3vw,3.6rem); }
.battle-grid { display: grid; grid-template-columns: minmax(155px,.64fr) minmax(365px,1.55fr) minmax(155px,.64fr); gap: 14px; align-items: stretch; }
.fighter-card { padding: 0; min-width: 0; overflow: hidden; border-color: #705059; display: flex; flex-direction: column; }
.fighter-card.enemy { border-color: #56536d; }
.fighter-info { padding: .82rem 1rem .75rem; }
.fighter-info h2 { font-size: clamp(1.12rem,2.3vw,1.62rem); margin-bottom: .4rem; overflow-wrap: anywhere; }
.fighter-info .progress-copy { margin-top: .45rem; }
.full-body { display: block; width: 100%; height: clamp(255px,37vw,435px); object-fit: contain; background: radial-gradient(ellipse at center,#352839,#1a141d 75%); flex-grow: 1; border-top: 1px solid var(--line); }
.battle-console { padding: clamp(.7rem,1.8vw,1.3rem); }
.turn-bar { display: flex; justify-content: space-between; align-items: start; gap: .65rem; padding-bottom: .7rem; }
.turn-bar h2 { margin: 0; }
.clock { color: var(--light-gold); font-variant-numeric: tabular-nums; font-weight: 750; font-size: 1.38rem; }
.clock.urgent { color: #ff9eac; }
.zones { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.zones fieldset { display: grid; gap: 3px; border: 0; margin: 0; padding: 0; min-width: 0; }
.zones legend { padding: 0; width: 100%; display: flex; align-items: baseline; gap: .35rem; margin-bottom: .35rem; color: var(--light-gold); font-weight: 680; }
.zones legend span { margin-left: auto; color: var(--quiet); font-size: .82rem; }
.zone-button { min-height: 44px; display: flex; align-items: center; gap: .45rem; justify-content: start; text-align: left; min-width: 0; padding: .35rem .5rem; border: 1px solid #493646; border-radius: 3px; background: #1b151f; color: var(--text); }
.zone-button:hover:not(:disabled) { border-color: var(--gold); }
.zone-button .check { color: var(--quiet); font-size: .84rem; width: 1rem; text-align: center; flex: 0 0 auto; }
.zone-button[aria-pressed="true"] { border-color: #c77286; background: #4d2739; }
.zone-button[aria-pressed="true"] .check { color: #f9afbf; }
.zone-button.block[aria-pressed="true"] { border-color: #9c99ca; background: #36314b; }
.zone-button.block[aria-pressed="true"] .check { color: #d7d6fe; }
.skill-select { display: grid; gap: .3rem; margin-top: .7rem; }
.skill-select label { font-weight: 650; }
.skill-select .field { padding: .38rem; }
.turn-submit { width: 100%; margin-top: .55rem; }
.battle-log { margin-top: 15px; }
.battle-log ol { list-style: none; max-height: 355px; overflow-y: auto; display: grid; gap: 8px; padding: 0; margin: 0; }
.round-entry { border: 1px solid var(--line); border-radius: 3px; padding: .65rem .75rem; background: #1a151d; }
.round-entry summary { cursor: pointer; color: var(--light-gold); padding: .2rem 0; overflow-wrap: anywhere; }
.round-entry ul { padding-left: 1.25rem; margin: .5rem 0 .2rem; color: var(--quiet); line-height: 1.48; }
.round-entry small { display: block; color: var(--quiet); margin-bottom: .25rem; }
.log-hint { margin: .4rem 0; color: var(--quiet); }
.result { background: linear-gradient(135deg,#3d2735,#261b2b); border-color: #a5736e; padding: .85rem; border-radius: 3px; border-width: 1px; border-style: solid; }
.result h3 { color: var(--light-gold); }
.item-type { color: var(--gold); font-size: .81rem; font-weight: 650; }
.item-card h3 { overflow-wrap: anywhere; }
.item-card .actions { margin-top: .65rem; }
.chat-list { padding: 0; margin: 0 0 .75rem; list-style: none; display: grid; gap: .5rem; max-height: 320px; overflow-y: auto; }
.chat-list li { padding: .4rem .65rem; border-left: 2px solid #795564; background: #17131b; overflow-wrap: anywhere; }
.chat-form { display: flex; gap: .5rem; }
.chat-form input { min-width: 0; }
#toast { position: fixed; bottom: 20px; right: 20px; max-width: min(430px,calc(100vw - 40px)); z-index: 4; pointer-events: none; }
#toast:not(:empty) { border: 1px solid #bd7b84; background: #3e222d; color: var(--text); border-radius: 4px; padding: .8rem 1rem; box-shadow: 0 6px 25px #0008; }
dialog { width: min(570px,calc(100% - 32px)); border: 1px solid var(--edge); background: var(--surface); color: var(--text); border-radius: 5px; padding: 20px; }
dialog::backdrop { background: #09060bd0; }
.dialog-bar { display: flex; justify-content: end; margin-bottom: .5rem; }
@media(max-width: 1080px) {
  .battle-grid { grid-template-columns: minmax(140px,.64fr) minmax(320px,1.55fr) minmax(140px,.64fr); gap: 9px; }
  .topbar-inner { gap: 1rem; }
  .top-status .player-label { display: none; }
}
@media(max-width: 825px) {
  .roster { grid-template-columns: 1fr; }
  .top-nav button { padding-inline: .55rem; }
  .page-grid { grid-template-columns: minmax(0, 1fr) minmax(195px, 225px); }
  .shell, .topbar-inner, .site-footer { padding-inline: 13px; }
}
@media(max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; justify-content: space-between; gap: 0 .6rem; padding-top: .55rem; }
  .top-nav { flex: 0 0 100%; order: 3; display: grid; grid-template-columns: repeat(4,1fr); }
  .top-nav button { padding-inline: .2rem; font-size: .8rem; }
  .topbar .brand { font-size: 1.1rem; }
  .brand-mark { width: 30px; }
  .shell { padding-top: 13px; }
  .page-grid, .columns-creation { grid-template-columns: 1fr; }
  .hero { min-height: 330px; }
  .hero::before { background-position: 65% 50%; }
  .hero::after { background: linear-gradient(0deg,#140e16f7 3%,#1b111c6a 62%,#2112201a); }
  .hero-content { padding: 1.12rem; }
  .city-list { grid-template-columns: 1fr; gap: 7px; }
  .city-list .location-card { grid-template-columns: 30px 1fr; align-items: center; }
  .location-icon { grid-row: span 2; }
  .battle-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .battle-console { grid-row: 2; grid-column: 1/-1; }
  .fighter-card.enemy { grid-column: 2; }
  .fighter-info { padding: .55rem; }
  .fighter-info .progress-copy { font-size: .75rem; }
  .full-body { height: clamp(155px,48vw,295px); flex-grow: 0; margin-top: auto; }
}
@media(max-width: 450px) {
  .equipment { grid-template-columns: 1fr; }
  .chat-form { flex-direction: column; }
  .top-status { gap: 6px; }
}

/* Entry and character registration */
.entry-layout, .onboarding-layout { background: #0a080b; min-height: 100vh; }
.entry-layout .topbar, .entry-layout .site-footer,
.onboarding-layout .topbar, .onboarding-layout .site-footer { display: none; }
.entry-layout .shell, .onboarding-layout .shell { max-width: none; min-height: 100vh; padding: 0; }
.entry-layout .shell { padding-top: clamp(48px, 17vh, 215px); padding-bottom: 28px; }
.entry-loading { width: min(100% - 32px, 28rem); margin-inline: auto; text-align: center; }
.entry-banner {
  min-height: clamp(195px, 29vh, 350px);
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  background: #131018;
  border-block: 1px solid #885f4c;
  box-shadow: 0 2px 0 #372323, 0 -2px 0 #372323, 0 3px 16px #391c2b66;
}
.entry-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #131018 0, transparent 25%, transparent 77%, #131018 100%),
    linear-gradient(0deg, #0b090de8 1%, #140d1466 58%, #170f1740),
    url("/assets/city.jpg") 70% 52% / cover;
  width: min(100%, 1040px);
  margin-inline: auto;
}
.entry-crest { padding: 16px; text-align: center; text-shadow: 0 2px 18px #0b0407, 0 2px 4px #10070c; }
.entry-sigil { display: grid; place-items: center; width: 39px; height: 39px; margin: 0 auto 17px; border: 1px solid #c49367; color: #f1c898; background: #291a23; font-size: 1.2rem; transform: rotate(-45deg); box-shadow: 0 0 0 4px #241820, 0 0 0 5px #805545; }
.entry-crest h1 { margin: 0; padding-left: .18em; color: #f7ddbd; font-size: clamp(3.1rem, 8vw, 6.1rem); text-transform: uppercase; letter-spacing: .18em; }
.entry-crest p { margin: .45rem 0 0; color: #e4c8af; font-size: .84rem; letter-spacing: .23em; text-transform: uppercase; }
.entry-access { width: min(100% - 32px, 400px); margin: clamp(23px, 4.3vh, 52px) auto 0; text-align: center; }
.entry-form { display: grid; width: min(100%, 310px); margin: auto; gap: .32rem; text-align: left; }
.entry-form label { color: #dfc9bd; font-size: .89rem; }
.entry-form .field { margin-bottom: .36rem; border-color: #654b56; background: #18121a; }
.entry-actions { display: grid; grid-template-columns: .82fr 1.18fr; gap: .52rem; margin-top: .32rem; }
.entry-error { margin: .15rem 0 0; color: #ffafbb; font-size: .87rem; }
.entry-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px 15px; margin-top: 18px; }
.entry-links button, .session-link { min-height: 44px; border: 0; background: none; color: var(--light-gold); text-decoration: underline; text-decoration-color: #89634e; text-underline-offset: .25em; padding: .3rem; }
.entry-links button:hover, .session-link:hover { text-decoration-color: currentColor; }
.entry-edition { margin: .5rem 0 0; font-size: .82rem; color: var(--quiet); }
.session-link { white-space: nowrap; }
.issued-code .field { font-family: ui-monospace, monospace; }
.issued-code .actions { margin-top: .75rem; }

.registry-header {
  min-height: 148px;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, #100b10 3%, transparent 44%, #100b10 100%),
    linear-gradient(0deg, #140c11d9, #1a10174a), #160f17 url("/assets/city.jpg") 65% 40% / cover;
  border-bottom: 1px solid #976c57;
}
.registry-titlelink { display: flex; align-items: center; gap: 13px; min-height: 48px; color: var(--light-gold); text-decoration: none; font: 1.65rem var(--serif); letter-spacing: .18em; text-transform: uppercase; }
.registry-paper {
  --leaf-text: #291c1b;
  --leaf-muted: #604940;
  --leaf-line: #b59a7e;
  color-scheme: light;
  color: var(--leaf-text);
  width: min(100% - 36px, 1020px);
  margin: 26px auto 44px;
  padding: clamp(20px, 5vw, 52px);
  background: radial-gradient(ellipse at 60% 30%, #fff0d7, transparent 72%),
    linear-gradient(135deg, #debf9c, #ebd2ae 40%, #e2c5a4);
  border: 1px solid #8d634e;
  outline: 1px solid #c5a47d;
  outline-offset: -7px;
  box-shadow: 0 12px 40px #0009;
}
.registry-paper :focus-visible { outline-color: #7a352f; }
.registry-paper h1 { font-size: clamp(2.15rem, 5.7vw, 4rem); line-height: 1.03; }
.registry-paper h2 { font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
.registry-paper h3 { font-size: 1.27rem; }
.registry-paper .muted { color: var(--leaf-muted); }
.registry-paper .overline { color: #743e36; }
.registry-steps { display: flex; flex-wrap: wrap; gap: .35rem .65rem; padding: 0; margin: .9rem 0 1.5rem; list-style: none; border-block: 1px solid var(--leaf-line); }
.registry-steps li { padding: .65rem .35rem; color: var(--leaf-muted); font-size: .87rem; }
.registry-steps li[aria-current] { color: #562929; font-weight: 750; border-bottom: 2px solid #8e4d46; }
.registry-form { display: grid; gap: .85rem; }
.registry-form > .field, .registry-fields input { max-width: 440px; }
.registry-form .field { color: var(--leaf-text); background: #f8e7ce; border-color: #9a765f; }
.registry-form textarea { font: inherit; resize: vertical; min-height: 110px; }
.registry-fields label { display: block; margin: .7rem 0 .3rem; font-weight: 650; }
.registry-rule { display: flex; align-items: start; gap: .65rem; margin: .4rem 0; }
.registry-rule input { accent-color: #743d38; flex: 0 0 auto; width: 20px; height: 20px; margin: .13rem 0 0; }
.registry-rule label { cursor: pointer; min-height: 44px; padding-block: .1rem; line-height: 1.45; }
.registry-textlink { min-height: 44px; padding: .15rem .3rem; color: #6d342d; background: none; border: 0; text-align: left; text-decoration: underline; text-underline-offset: .18em; }
.registry-paper .button { border-color: #6d4037; background: #59322e; color: #fff0dc; }
.registry-paper .button.ghost { border-color: #9d7964; background: #f5ddbd; color: #432a25; }
.registry-controls { display: flex; flex-wrap: wrap; gap: .65rem; padding-top: .75rem; margin-top: .4rem; border-top: 1px solid var(--leaf-line); }
.registry-options { padding: .75rem 0; }
.registry-options summary { cursor: pointer; min-height: 44px; padding: .65rem 0; font-weight: 650; }
.registry-options .portrait-choice { color: #f3e9e2; }
.registry-options .portrait-choice[aria-pressed="true"] { border-color: #7d332e; box-shadow: 0 0 0 2px #7d332e; }
.registry-options .portrait-choice img { height: clamp(108px, 22vw, 210px); }
.registry-options .stepper { border-color: var(--leaf-line); }
.registry-options .stepper output { color: #572a23; }
.registry-config { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: .95rem; margin-top: .55rem; }
.registry-profile-note { overflow-wrap: anywhere; white-space: pre-wrap; }
.registry-paper .entry-error { color: #7d2628; }
@media(max-width: 760px) {
  .entry-layout .shell { padding-top: clamp(25px, 11vh, 70px); }
  .entry-banner { min-height: 200px; }
  .entry-banner::before { background-position: center, center, 67% 50%; }
  .registry-header { min-height: 103px; }
  .registry-paper { width: calc(100% - 20px); margin-top: 15px; }
  .registry-config { grid-template-columns: 1fr; }
  .session-link { font-size: .8rem; }
}

/* Game room and persistent communication panel */
.world-layout .topbar { background: linear-gradient(180deg, #332b35, #1a161e 78%); border-color: #69545e; }
.world-layout .topbar-inner { max-width: 1600px; min-height: 56px; gap: clamp(.55rem, 2vw, 2rem); }
.world-layout .brand { font-size: 1.12rem; }
.world-layout .brand-mark { width: 30px; }
.world-layout .top-nav button { padding-inline: clamp(.4rem, 1.15vw, .9rem); }
.world-layout .shell { max-width: 1600px; padding-top: 12px; padding-bottom: 27px; }
.world-layout .site-footer { max-width: 1600px; }
.room-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem 1rem; margin-bottom: .65rem; }
.room-heading p { margin: 0; color: #e7ba97; font-size: .84rem; }
.room-heading p span { color: #9e7882; padding-inline: .3rem; }
.world-scene { display: grid; grid-template-columns: minmax(185px, .68fr) minmax(0, 1.8fr) minmax(185px, .68fr); gap: 10px; }
.room-fighter, .room-location { min-width: 0; border: 1px solid #61505d; background: #1b171f; border-radius: 3px; }
.room-fighter { display: flex; flex-direction: column; }
.room-mentor { border-color: #595469; }
.room-fighter-head { padding: .65rem .75rem .25rem; }
.room-fighter-head .overline { margin-bottom: .27rem; font-size: .69rem; }
.room-fighter-head h2 { font-size: clamp(1.15rem, 2.1vw, 1.65rem); margin-bottom: .38rem; overflow-wrap: anywhere; }
.room-health { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .13rem .6rem; font-size: .78rem; color: var(--quiet); }
.room-health strong { color: #f1d3c7; font-variant-numeric: tabular-nums; }
.room-fighter-head .meter { height: 7px; }
.room-figure { min-height: 0; background: radial-gradient(ellipse, #382b3d, #1a151e 76%); border-block: 1px solid #413343; }
.room-avatar { display: block; width: 100%; height: clamp(190px, 24vw, 265px); object-fit: contain; }
.room-slots { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; flex: 1; background: #45374a; border-bottom: 1px solid #45374a; }
.room-slot { display: flex; flex-direction: column; gap: .2rem; align-items: start; padding: .4rem; min-width: 0; background: #241d29; overflow-wrap: anywhere; }
.room-slot > span:last-child { min-width: 0; }
.room-slot strong, .room-slot small { display: block; font-size: .75rem; line-height: 1.25; }
.room-slot small { color: var(--quiet); margin-top: .16rem; }
.slot-mark { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #654b59; border-radius: 3px; color: #ddb38d; background: #1b151e; }
.room-details { text-align: left; min-height: 44px; border: 0; background: #211a24; padding: .35rem .6rem; color: var(--light-gold); font-size: .8rem; }
.room-details:hover { color: var(--text); }
.room-location { position: relative; min-height: 325px; isolation: isolate; background: #2b242e; border-color: #745766; overflow: hidden; }
.room-scene-art { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #2a222cee 0, #211926eb 35%, #2219248c 70%, #191119cf 100%), url("/assets/city.jpg") 78% 60% / cover; }
.room-dialogue { padding: clamp(1rem, 3.5vw, 2.7rem); }
.room-dialogue h1 { font-size: clamp(2.15rem, 4.6vw, 3.7rem); line-height: 1; }
.room-speaker { color: var(--gold); font-size: .84rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.room-dialogue > p:not(.room-speaker) { max-width: 48ch; color: #eddbd9; }
.room-choices { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.13rem; }
.room-dialogue .city-list { margin-top: 1.15rem; }
.room-dialogue .location-card { background: #261b27e8; }
.character-view { max-width: 540px; }

.room-dock { display: grid; grid-template-columns: minmax(0, 1fr) clamp(150px, 25%, 280px); min-width: 0; margin-top: 11px; border: 1px solid #624d5b; border-radius: 3px; background: #1a161e; overflow: hidden; }
.dock-main { min-width: 0; display: grid; grid-template-rows: auto 1fr auto; }
.dock-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 .55rem; background: #2a212e; border-bottom: 1px solid #514050; }
.dock-tabs button { min-height: 44px; margin-bottom: -1px; padding: .35rem .64rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--quiet); font-size: .84rem; }
.dock-tabs button[aria-pressed="true"] { color: var(--light-gold); border-color: #d09a74; background: #342634; }
.dock-messages { list-style: none; min-height: 100px; max-height: 170px; overflow-y: auto; display: grid; align-content: start; gap: .25rem; margin: 0; padding: .65rem .85rem; }
.dock-messages li { overflow-wrap: anywhere; font-size: .88rem; line-height: 1.45; }
.dock-messages li strong { margin-right: .4rem; color: #ebbc99; }
.dock-form { padding: .5rem .55rem; border-top: 1px solid #463647; }
.dock-form .field { min-height: 44px; border-color: #574353; }
.dock-presence { border-left: 1px solid #594653; min-width: 0; background: #211a25; }
.dock-presence h2 { display: flex; justify-content: space-between; align-items: center; gap: .45rem; margin: 0; min-height: 44px; padding: .45rem .7rem; background: #2a212e; border-bottom: 1px solid #514050; font-size: 1rem; }
.dock-presence h2 span { color: var(--gold); font: 700 .85rem system-ui, sans-serif; }
.dock-presence ul { list-style: none; max-height: 187px; overflow-y: auto; padding: .4rem .7rem; margin: 0; }
.dock-presence li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .5rem; padding: .2rem 0; font-size: .82rem; }
.dock-presence li strong { color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.dock-presence li span { color: var(--quiet); white-space: nowrap; }

@media (min-width: 701px) and (max-height: 820px) {
  .room-avatar { height: clamp(165px, calc(100vh - 535px), 245px); }
  .dock-messages { min-height: 60px; max-height: 130px; }
}
@media(max-width: 950px) {
  .world-layout .topbar-inner { gap: .5rem; }
  .room-dialogue .city-list { grid-template-columns: 1fr; }
}
@media(max-width: 760px) {
  .world-layout .top-nav { grid-template-columns: .71fr 1fr 1.26fr .86fr 1.07fr; }
  .world-layout .top-nav button { padding-inline: .14rem; font-size: .76rem; }
  .world-scene { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
  .room-location { grid-column: 1/-1; grid-row: 1; min-height: 225px; }
  .room-fighter-head { padding-inline: .5rem; }
  .room-avatar { height: clamp(160px,46vw,245px); }
  .room-slots { grid-template-columns: 1fr; }
  .room-slot { flex-direction: row; align-items: center; gap: .35rem; }
  .slot-mark { flex: 0 0 20px; }
  .room-dock { grid-template-columns: 1fr; }
  .dock-presence { border-left: 0; border-top: 1px solid #594653; }
  .dock-presence ul { max-height: 110px; }
  .dock-form { flex-direction: row; }
  .dock-form .button { padding-inline: .55rem; }
}

.battle-grid { grid-template-columns: minmax(165px,.64fr) minmax(0,1.7fr) minmax(165px,.64fr); }
.battle-head { align-items: center; }
.battle-head .overline { margin-bottom: .2rem; }
.battle-head h1 { font-size: clamp(1.65rem,3vw,2.9rem); }
.battle-console { padding: .85rem; }
.battle-console .turn-bar { max-width: 32rem; margin-inline: auto; }
.battle-console .zones { max-width: 32rem; margin-inline: auto; }
.battle-console .zones fieldset { align-content: start; }
.battle-console .zone-button { width: 100%; min-height: 37px; }
.attack-row { display: flex; gap: 4px; }
.attack-row .second-hit { width: 37px; flex: 0 0 37px; justify-content: center; color: var(--gold); }
.battle-effigy { flex: 1; display: grid; place-items: center; background: #1b151f; }
.battle-effigy .full-body { height: clamp(220px, 29vw, 335px); border: 0; }
.battle-kit { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; margin: 0; border-top: 1px solid #514050; background: #453749; }
.battle-kit > div { min-width: 0; padding: .38rem; background: #241d29; overflow-wrap: anywhere; }
.battle-kit dt, .battle-kit dd { margin: 0; font-size: .74rem; }
.battle-kit dt { color: var(--gold); }
.battle-kit dd { color: var(--quiet); }
.battle-console .turn-submit { width: auto; display: flex; margin: .55rem auto 0; }
.battle-console .log-hint, .skill-caption { text-align: center; margin: .4rem 0 0; }
.battle-skills { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: .6rem; }
.battle-skills .button { width: 43px; min-height: 43px; padding: .22rem; gap: .23rem; }
.battle-skills .button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--gold); color: var(--light-gold); }
.battle-skills .button small { color: var(--quiet); font-size: .66rem; }
.battle-damage { margin: .4rem 0 .55rem; color: var(--quiet); font-size: .85rem; }
.battle-damage strong { color: var(--light-gold); }
.dock-history .battle-log { margin: 0; border: 0; background: transparent; padding: .65rem .8rem; }
.dock-history .battle-log .section-heading { margin-bottom: .4rem; }
.dock-history .battle-log h2 { font-size: 1.1rem; }
.dock-history .battle-log ol { max-height: 210px; }
@media(max-width: 760px) {
  .battle-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .battle-effigy .full-body { height: clamp(140px,41vw,230px); }
  .battle-kit { grid-template-columns: 1fr; }
  .battle-kit > div { display: flex; flex-wrap: wrap; gap: .15rem .35rem; }
  .battle-console .zone-button { min-height: 44px; }
}

.stat-effect { display: block; color: var(--quiet); font-size: .78rem; line-height: 1.3; }
.registry-paper .stat-effect { color: var(--leaf-muted); }

.city-map { max-width: 1180px; margin: 0 auto; }
.map-heading h1 { font-size: clamp(2rem,5vw,3.8rem); }
.map-heading .overline { margin-bottom: .3rem; }
.map-stage { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #785965; border-radius: 5px; background: #211923; }
.map-stage > img { width: 100%; height: auto; display: block; }
.map-hotspot { position: absolute; inset: 0; pointer-events: none; }
.map-aura, .map-aura > span, .map-hit { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-aura { opacity: 0; transition: opacity .2s ease; filter: drop-shadow(0 0 3px #f4cb8c) drop-shadow(0 0 8px #e7a14f); }
.map-aura > span { background: var(--map-art) 0 0 / 100% 100%; clip-path: var(--shape); filter: brightness(1.48) saturate(1.18); }
.map-hit { border: 0; padding: 0; clip-path: var(--shape); background: transparent; cursor: pointer; pointer-events: auto; }
.map-hotspot:has(.map-hit:is(:hover,:focus-visible)) { z-index: 1; }
.map-hotspot:has(.map-hit:is(:hover,:focus-visible)) .map-aura { opacity: 1; }
.map-directory { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.map-directory .button { padding: .5rem .7rem; font-size: .88rem; }
.city-interior { min-height: 235px; padding: clamp(1.2rem,5vw,3rem); }
.interior-icon { display: block; color: var(--gold); font-size: 1.8rem; margin-bottom: .6rem; }
@media (prefers-reduced-motion: reduce) {
  .map-aura { transition: none; }
}
