/* Echoklinge – Oberfläche. Eine einzige, bewusst dunkle Welt:
   Lagerfeuer-Glut (Bernstein) auf nächtlichem Stein, Echo-Türkis als Zweitfarbe. */
:root {
  color-scheme: dark;
  --nacht: #0b1014;
  --stein: rgba(16, 23, 28, 0.9);
  --stein-solid: #131b20;
  --stein-2: #1c282f;
  --linie: rgba(239, 228, 204, 0.13);
  --linie-2: rgba(239, 228, 204, 0.28);
  --pergament: #efe4cc;
  --asche: #a2aba5;
  --glut: #ff9a3c;
  --glut-hell: #ffcf8a;
  --glut-tief: #b8621f;
  --echo: #74d3c6;
  --blut: #e0484e;
  --gut: #8fe39a;
  --display: "Grenze Gotisch", Georgia, "Times New Roman", serif;
  --ui: "Signika", "Trebuchet MS", system-ui, sans-serif;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--nacht);
  color: var(--pergament);
  font-family: var(--ui);
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 240px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, #121a1f 0%, var(--nacht) 70%);
}

#stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 540px;
  transform-origin: 0 0;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(239, 228, 204, 0.05), 0 20px 80px rgba(0, 0, 0, 0.6);
}

#view {
  position: absolute;
  left: 0;
  top: 0;
  width: 960px;
  height: 540px;
  display: block;
}

#ui {
  position: absolute;
  inset: 0;
  font-size: 14px;
  line-height: 1.35;
}

.screen {
  position: absolute;
  inset: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eyebrow {
  font: 600 11px/1.2 var(--ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--glut-hell);
}

.muted {
  color: var(--asche);
}

.warn {
  color: #ffb07a;
  font-size: 12.5px;
  margin-top: 6px;
}

/* --- Bedienelemente --- */
button {
  font-family: var(--ui);
  color: var(--pergament);
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(20, 28, 33, 0.88);
  border: 1px solid var(--linie-2);
  border-radius: 6px;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}

.btn.primary {
  background: linear-gradient(180deg, #ffb45c, #e0782a);
  border-color: #ffd49a;
  color: #1c0f05;
}

.btn.small {
  padding: 5px 12px;
  font-size: 13px;
}

.btn.danger {
  border-color: rgba(224, 72, 78, 0.7);
  color: #ffb8b0;
}

.btn[disabled],
.nav[disabled] {
  opacity: 0.38;
  cursor: default;
}

.nav {
  outline: none;
}

.nav.is-focus,
.nav:focus-visible {
  outline: 2px solid var(--glut-hell);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(255, 154, 60, 0.18), 0 0 20px rgba(255, 154, 60, 0.3);
}

.btn:not([disabled]):hover {
  border-color: var(--glut-hell);
}

.btn.primary.is-focus {
  transform: translateY(-1px);
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 4px;
  background: var(--pergament);
  color: #14100e;
  font: 700 11px/1 var(--ui);
  vertical-align: middle;
}

.kbd-pad {
  border-radius: 50%;
  width: 20px;
  padding: 0;
  background: var(--kc);
  color: #10151a;
}

.kbd + .kbd {
  margin-left: 3px;
}

.legend {
  position: absolute;
  right: 16px;
  bottom: 10px;
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--asche);
}

.lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- Titel --- */
.title-block {
  position: absolute;
  left: 520px;
  top: 78px;
  width: 400px;
}

.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 84px;
  line-height: 0.9;
  margin: 8px 0 14px;
  white-space: nowrap;
  color: #ffe9c4;
  text-shadow: 0 3px 0 #3a1a08, 0 0 34px rgba(255, 154, 60, 0.45);
}

.tagline {
  font-size: 16px;
  line-height: 1.5;
  color: #d6cdb8;
  max-width: 38ch;
}

.title-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.title-actions .btn {
  font-size: 17px;
  padding: 11px 24px;
}

.fine {
  margin-top: 18px;
  font-size: 12px;
  color: var(--asche);
  max-width: 44ch;
}

/* --- Klassenwahl --- */
.pick {
  background: linear-gradient(180deg, rgba(5, 8, 11, 0.55), rgba(5, 8, 11, 0.85));
}

.pick-head {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
}

.pick-head h2 {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  margin-top: 2px;
}

.cards {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 104px;
  bottom: 40px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.ccard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  padding: 6px 9px 10px;
  overflow: hidden;
  background: rgba(13, 19, 23, 0.9);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--c);
  border-radius: 8px;
  transition: transform 0.14s, border-color 0.14s;
}

.ccard.is-focus {
  transform: translateY(-5px);
  border-color: var(--c);
  outline-color: var(--c);
}

.ccard canvas {
  width: 100%;
  height: 112px;
}

.cname {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1;
}

.cname small {
  font-family: var(--ui);
  font-size: 12px;
  color: var(--asche);
}

.ctitle {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crole {
  font-size: 12px;
  color: var(--asche);
}

.ratings {
  display: grid;
  gap: 3px;
  margin: 6px 0 4px;
  width: 100%;
}

.rt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--asche);
}

.rt b {
  display: inline-flex;
  gap: 3px;
}

.rt i,
.pips i {
  display: inline-block;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.12);
}

.rt i.on {
  background: var(--c);
}

.cdesc {
  font-size: 11px;
  line-height: 1.38;
  color: #cfc6b2;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Stationen in Echofurt --- */
.station.overlay {
  display: block;
  background: linear-gradient(to bottom, rgba(4, 6, 8, 0.92), rgba(4, 6, 8, 0.8));
}

.st-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--linie);
  background: rgba(6, 9, 12, 0.7);
}

.st-face {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--linie-2);
  background: rgba(8, 12, 15, 0.85);
}

.st-who {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.st-who strong {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: #ffe3b8;
}

.st-who em {
  font-style: normal;
  font-size: 12px;
  color: var(--asche);
}

.st-close {
  flex: none;
}

.station .hero-card,
.station .panel {
  top: 82px;
}

.res {
  display: flex;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 8px;
  background: rgba(10, 14, 18, 0.82);
  border: 1px solid var(--linie);
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.chip small {
  font-weight: 500;
  font-size: 11px;
  color: var(--asche);
}

.chip [data-icon] {
  display: inline-flex;
}

.coin {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffcf4a;
  border: 2px solid #8a5a12;
  box-sizing: border-box;
}

.hero-card {
  position: absolute;
  left: 16px;
  top: 58px;
  width: 298px;
  box-sizing: border-box;
  padding: 12px 14px;
  background: var(--stein);
  border: 1px solid var(--linie);
  border-radius: 8px;
}

.hc-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hc-lvl {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--c);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}

.hc-name {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}

.hc-title {
  font-size: 12px;
  color: var(--asche);
}

.xp {
  height: 6px;
  margin-top: 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.xp i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--glut-tief), var(--glut));
}

.xp-label {
  font-size: 11px;
  color: var(--asche);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.sp-badge {
  display: inline-block;
  margin: 8px 6px 0 0;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 154, 60, 0.18);
  color: var(--glut-hell);
  font-size: 12px;
  font-weight: 600;
}

.sp-badge.spec {
  background: rgba(116, 211, 198, 0.16);
  color: var(--echo);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 16px;
  margin: 10px 0 0;
}

.stats div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.stats dt {
  font-size: 11px;
  color: var(--asche);
}

.stats dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.p2-line {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--linie);
  font-size: 12px;
  color: var(--echo);
}

.p2-line.muted {
  color: var(--asche);
}

.panel {
  position: absolute;
  left: 330px;
  right: 16px;
  top: 58px;
  bottom: 38px;
  display: flex;
  flex-direction: column;
  background: var(--stein);
  border: 1px solid var(--linie);
  border-radius: 8px;
  overflow: hidden;
}

.tab-body {
  flex: 1;
  overflow: auto;
  padding: 12px 14px;
  position: relative;
  scrollbar-width: thin;
}

.tab-body h4,
.info-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--glut-hell);
  margin: 12px 0 5px;
}

/* Expeditionen */
/* Echotor: dungeon list in the left column, description and actions in the panel */
.has-side .hero-card {
  bottom: 38px;
  display: flex;
  flex-direction: column;
}

.hero-side {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--linie);
}

.hero-side .exp-list {
  flex: 1;
  max-height: none;
  min-height: 0;
}

.hero-side .exp-head {
  margin-bottom: 8px;
}

.hero-side .exp-head strong {
  font-size: 20px;
}

.has-side .hero-card .stats,
.has-side .hero-card .p2-line {
  display: none;
}

.exp3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  gap: 18px;
  height: 100%;
}

.exp-act {
  display: flex;
  flex-direction: column;
  padding-left: 16px;
  border-left: 1px solid var(--linie);
}

.exp-act h4:first-child {
  margin-top: 2px;
}

.exp-act .diff {
  margin-top: 0;
  flex-direction: column;
}

.exp-act .go {
  margin-top: auto;
}

.exp {
  display: grid;
  grid-template-columns: 208px 1fr;
  gap: 16px;
}

.exp-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 336px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.exp-list .dcard {
  grid-template-columns: 24px minmax(0, 1fr) auto;
  column-gap: 8px;
  row-gap: 1px;
  padding: 6px 9px;
}

.exp-list .dcard .dname,
.exp-list .dcard .dmeta {
  grid-column: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exp-list .dcard .ranks {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
  flex-direction: column;
  gap: 3px;
}

.exp-list .rank-badge {
  width: 18px;
  height: 18px;
  font-size: 12px;
}

.dnum {
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--display);
  font-size: 18px;
  color: var(--asche);
  text-align: center;
}

.exp-list .dname {
  font-size: 16px;
}

.exp:has(.exp-list .dnum) {
  grid-template-columns: 270px 1fr;
}

.dcard.done .dnum {
  color: #ffcf5a;
}

.exp-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 10px;
}

.exp-head strong {
  font-family: var(--display);
  font-size: 24px;
}

.exp-head span {
  font-size: 13px;
  color: var(--glut-hell);
  font-variant-numeric: tabular-nums;
}

.exp-head .bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.exp-head .bar b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--glut-tief), #ffcf5a);
}

.exp-head em {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--asche);
}

.dtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag.dim {
  background: rgba(255, 255, 255, 0.06);
  color: var(--asche);
}

.foes {
  margin-top: 4px;
  font-size: 12px;
  color: var(--asche);
  line-height: 1.4;
}

/* Reisetor und Weltkarte */
.travel {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 14px;
  align-items: start;
}

.wmap-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(90, 60, 30, 0.6), 0 6px 20px rgba(0, 0, 0, 0.45);
}

.wmap {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.travel-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.town-pips {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--asche);
}

.town-pips > span {
  font-family: var(--display);
  font-size: 16px;
  color: var(--glut-hell);
}

.town-pips .pips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.town-pips i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(239, 228, 204, 0.18);
}

.town-pips i.open {
  border-color: #fff3dc;
}

.town-pips i.done {
  background: #e8b04a;
  border-color: #ffe39a;
}

.travel-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.town-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tcard {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 7px 10px;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--tc);
  border-radius: 6px;
}

.tcard.sel {
  background: rgba(255, 207, 90, 0.1);
  border-color: rgba(255, 207, 90, 0.5);
  border-left-color: var(--tc);
}

.tcard.locked {
  opacity: 0.6;
  border-left-color: var(--linie);
}

.tname {
  font-family: var(--display);
  font-size: 19px;
}

.tname small {
  font-family: Signika, system-ui, sans-serif;
  font-size: 11px;
  color: #ff9a8a;
  margin-left: 4px;
}

.town-detail h3 {
  font-family: var(--display);
  font-size: 24px;
  color: var(--tc);
}

.town-detail .sub {
  font-size: 12px;
  color: var(--asche);
  font-style: italic;
}

.town-detail .desc {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #cfc6b2;
}

.town-detail .go {
  margin-top: 10px;
  width: 100%;
}

.worldmap .dialog.wide {
  width: 600px;
  max-height: 524px;
  padding: 10px 14px;
}

.worldmap .dialog h2 {
  font-size: 26px;
  margin: 2px 0 4px;
}

.worldmap .dialog > p.muted {
  font-size: 12px;
}

.worldmap .actions {
  margin-top: 6px;
}

.wmap.big {
  height: auto;
  aspect-ratio: 16 / 10;
  margin: 6px 0 4px;
  border-radius: 6px;
}

.town-prog {
  margin-top: 6px;
  font-size: 13px;
  color: var(--asche);
}

.town-new {
  color: #ffcf5a;
}

.dcard {
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 9px 12px;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie);
  border-left: 3px solid transparent;
  border-radius: 6px;
}

.dcard.sel {
  border-left-color: var(--glut);
  background: rgba(255, 154, 60, 0.08);
}

.dcard.locked {
  opacity: 0.6;
}

.dname {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.05;
}

.dmeta {
  font-size: 11.5px;
  color: var(--asche);
}

.ranks {
  display: flex;
  gap: 5px;
  margin-top: 3px;
}

.rank-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: #14100e;
}

.rank-badge.none {
  color: var(--asche);
}

.rS {
  background: #ffcf5a;
}

.rA {
  background: #9fe4ff;
}

.rB {
  background: #8fe39a;
}

.rC {
  background: #c9c2b0;
}

.rD {
  background: #8a8478;
}

.exp-detail h3 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.exp-detail .desc {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: #cfc6b2;
  max-width: 62ch;
}

.boss-line {
  margin-top: 6px;
  font-size: 13px;
  color: var(--asche);
}

.boss-line strong {
  color: #ffb49a;
}

.missions li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--linie);
  font-size: 12.5px;
}

.missions b {
  color: var(--glut-hell);
  font-variant-numeric: tabular-nums;
}

.missions li.ok {
  color: var(--gut);
}

.missions li.ok b {
  color: var(--gut);
}

.missions li.no {
  color: var(--asche);
}

.diff {
  display: flex;
  gap: 8px;
  margin: 12px 0 0;
}

.seg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 7px 12px;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie-2);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.seg small {
  font-size: 11px;
  font-weight: 500;
  color: var(--asche);
}

.seg.on {
  border-color: var(--glut);
  background: rgba(255, 154, 60, 0.14);
}

.go {
  width: 100%;
  margin-top: 10px;
  font-size: 17px;
  padding: 9px;
}

/* Fertigkeiten */
.sp-line {
  font-size: 13px;
  color: var(--asche);
  margin-bottom: 4px;
}

.sp-line strong {
  color: var(--glut-hell);
  font-size: 16px;
}

.skill-row {
  display: grid;
  grid-template-columns: 42px 1fr auto 34px;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--linie);
}

/* skill runes and Echo levels */
.skill-block {
  border-bottom: 1px solid var(--linie);
}

.skill-block .skill-row {
  border-bottom: none;
}

.pips10 {
  display: grid;
  grid-template-columns: repeat(5, 8px);
  gap: 3px;
}

.pips10 i.gate {
  opacity: 0.25;
  outline: 1px dashed rgba(239, 228, 204, 0.4);
}

.rune-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 0 8px 54px;
}

.rune-tier {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.rune-tier .rt-lvl {
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--asche);
}

.rune-tier.locked {
  opacity: 0.5;
}

.rune-chip,
.echo-btn {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 7px;
  text-align: left;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie);
  border-radius: 6px;
  color: inherit;
  font: inherit;
}

.rune-chip strong,
.echo-btn strong {
  font-size: 11.5px;
}

.rune-chip span,
.echo-btn span {
  font-size: 10.5px;
  line-height: 1.25;
  color: var(--asche);
}

.rune-chip.on {
  border-color: #ffcf5a;
  background: rgba(255, 207, 90, 0.14);
  box-shadow: 0 0 10px rgba(255, 207, 90, 0.25);
}

.echo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.echo-btn em {
  font-style: normal;
  color: var(--glut-hell);
  font-variant-numeric: tabular-nums;
}

.skill-row.locked {
  opacity: 0.55;
}

.sicon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(8, 12, 15, 0.7);
  border: 1px solid var(--linie);
}

.sname {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 207, 90, 0.16);
  color: #ffcf5a;
}

.tag.alt {
  background: rgba(116, 211, 198, 0.14);
  color: var(--echo);
}

.sdesc {
  font-size: 12.5px;
  color: #c9c0ac;
  margin-top: 2px;
  max-width: 64ch;
}

.smeta {
  font-size: 11.5px;
  color: var(--glut-hell);
  opacity: 0.85;
  margin-top: 2px;
}

.pips {
  display: flex;
  gap: 5px;
}

.pips i.on {
  background: var(--glut);
}

.plus {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 20px;
}

.spec-box {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(8, 12, 15, 0.5);
  border: 1px solid var(--linie);
  border-radius: 6px;
}

.spec-box h4 {
  margin-top: 0;
}

.spec-box p {
  font-size: 12.5px;
  line-height: 1.45;
}

.spec-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.spec-btn {
  text-align: left;
  display: grid;
  gap: 3px;
  padding: 9px 12px;
  background: rgba(20, 28, 33, 0.9);
  border: 1px solid var(--linie-2);
  border-radius: 6px;
}

.spec-btn strong {
  font-size: 15px;
}

.spec-btn span {
  font-size: 12px;
  color: var(--asche);
}

/* Runen */
.runes {
  display: grid;
  grid-template-columns: 1fr 236px;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.rslots {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.rslot {
  display: grid;
  gap: 2px;
  align-content: start;
  text-align: left;
  padding: 8px 10px;
  min-height: 72px;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie);
  border-radius: 6px;
}

.rs-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--asche);
}

.rname {
  font-size: 13.5px;
  font-weight: 600;
}

.rstats {
  font-size: 11px;
  color: var(--asche);
}

.empty {
  font-size: 13px;
  color: var(--asche);
}

.inv {
  grid-column: 1;
}

.inv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--asche);
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 46px);
  gap: 6px;
}

.inv-grid > p {
  grid-column: 1 / -1;
}

.rune {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie);
  border-radius: 6px;
}

.rune.sel {
  border-color: var(--rc);
}

.hex {
  position: absolute;
  inset: 9px;
  background: var(--rc);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  opacity: 0.92;
}

.rslot-ico {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  color: #10151a;
}

.rp {
  position: absolute;
  right: 3px;
  bottom: 1px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--glut-hell);
}

.req {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.rune-detail {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  padding: 12px;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--rc, var(--linie));
  border-radius: 6px;
}

.rd-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--rc);
}

.rd-meta {
  display: block;
  font-size: 11.5px;
  color: var(--asche);
  margin-top: 2px;
}

.rd-stats {
  margin-top: 8px;
}

.rd-stats li {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--linie);
}

.rd-stats b {
  font-variant-numeric: tabular-nums;
}

.rd-power {
  margin-top: 8px;
  font-size: 12px;
  color: var(--asche);
}

.up {
  color: var(--gut);
}

.down {
  color: #ff8a7a;
}

.rd-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

/* Schmiede */
.frow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--linie);
}

.fname {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.fname small {
  font-weight: 500;
  color: var(--asche);
}

.fcost {
  font-size: 12px;
  color: var(--asche);
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 10px;
  font-size: 12px;
}

/* Händlerin */
.shop {
  display: grid;
  grid-template-columns: 1fr 236px;
  gap: 16px;
}

.shop h4 small {
  margin-left: 6px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--asche);
}

.shop .fname {
  display: block;
  min-width: 0;
}

.shop .fname [data-icon] {
  display: inline-block;
  vertical-align: -3px;
  margin-right: 4px;
}

.fname .fdesc {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
}

.shop-sell .sell-good {
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 5px 0;
}

.shop-sell .sell-good .fname {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.shop-sell .sell-good .fname [data-icon] {
  margin-right: 0;
}

/* forge next to the buy-back column: cost line under the item name */
.forge-shop .frow {
  grid-template-columns: 1fr auto;
  row-gap: 2px;
}

.forge-shop .frow .fcost {
  grid-column: 1;
  grid-row: 2;
}

.forge-shop .frow .btn {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.shop-sell .sell-good .btn {
  min-width: 0;
  padding-inline: 10px;
  font-variant-numeric: tabular-nums;
}

.frow.sold {
  grid-template-columns: 1fr;
  opacity: 0.5;
}

.shop-sell .inv-grid {
  grid-template-columns: repeat(auto-fill, 40px);
  margin-bottom: 10px;
}

.shop-sell .rune {
  width: 40px;
  height: 40px;
}

.shop-sell .rune-detail {
  grid-column: auto;
  grid-row: auto;
}

.shop-sell .rd-actions .muted {
  font-size: 11.5px;
}

/* Helden */
.heroes > p {
  font-size: 12.5px;
  margin-bottom: 10px;
}

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

.hcard {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 6px 12px 8px 4px;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--c);
  border-radius: 6px;
}

.hcard.cur {
  background: rgba(255, 154, 60, 0.07);
}

.hcard canvas {
  grid-row: span 2;
  width: 96px;
  height: 90px;
}

.hcard > .btn,
.hcard > .cur-tag {
  justify-self: start;
}

.hinfo strong {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.hinfo span {
  display: block;
  font-size: 12px;
}

.cur-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glut-hell);
}

/* Optionen */
.orow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--linie);
  font-size: 14px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stepper b {
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.toggle {
  min-width: 64px;
}

.toggle.on {
  background: rgba(116, 211, 198, 0.18);
  border-color: var(--echo);
}

.confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #ffb8b0;
}

/* --- Overlays --- */
.overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 8, 0.72);
}

.pick.overlay {
  display: block;
  background: rgba(4, 6, 8, 0.86);
}

.dialog {
  width: 420px;
  max-height: 500px;
  overflow: auto;
  box-sizing: border-box;
  padding: 20px 22px;
  background: var(--stein-solid);
  border: 1px solid var(--linie-2);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

.dialog.wide {
  width: 780px;
}

.dialog h2 {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  margin: 4px 0 10px;
}

.dialog > p.muted {
  font-size: 13px;
  line-height: 1.5;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.actions.col {
  flex-direction: column;
}

.pause .missions {
  margin-top: 4px;
}

.tbl-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 10px;
}

th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--asche);
  padding: 4px 8px;
}

td {
  padding: 5px 8px;
  font-size: 13.5px;
  border-top: 1px solid var(--linie);
}

td:first-child {
  color: #d9d0bb;
}

.controls p.muted {
  font-size: 12.5px;
}

.ctl-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.ctl-tabs .btn.on {
  border-color: var(--glut);
  color: var(--glut-hell);
}

.ctl-keys {
  max-height: 262px;
  overflow-y: auto;
}

.ctl-keys td {
  padding: 3px 8px;
}

.ctl-keys td.keys {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.keychip {
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--linie-2);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: #1d2228;
  color: #efe4cc;
  font: 700 12.5px var(--ui, system-ui, sans-serif);
  cursor: pointer;
}

.keychip.add {
  color: var(--asche);
  border-style: dashed;
  border-bottom-width: 1px;
}

.keychip.wait {
  border-color: var(--glut);
  color: var(--glut-hell);
  animation: keywait 0.9s ease-in-out infinite;
}

.keychip.fixed {
  opacity: 0.6;
  cursor: default;
}

@keyframes keywait {
  50% {
    background: #3a2a18;
  }
}

.unbound td:first-child {
  color: #e0706a;
}

.ctl-msg {
  min-height: 1.5em;
}

.res-grid {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 26px;
}

.rank-col {
  text-align: center;
}

.rank {
  font-family: var(--display);
  font-weight: 900;
  font-size: 170px;
  line-height: 0.9;
  margin-top: 6px;
  animation: rank-in 0.55s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.rank.rS {
  background: none;
  color: #ffcf5a;
  text-shadow: 0 0 40px rgba(255, 207, 90, 0.55);
}

.rank.rA {
  background: none;
  color: #9fe4ff;
  text-shadow: 0 0 30px rgba(159, 228, 255, 0.4);
}

.rank.rB {
  background: none;
  color: var(--gut);
}

.rank.rC {
  background: none;
  color: #d9d0bb;
}

.rank.rD {
  background: none;
  color: #a39c90;
}

@keyframes rank-in {
  from {
    transform: scale(2.2);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.score {
  font-size: 14px;
  color: var(--glut-hell);
  margin-top: 4px;
}

.parts {
  margin: 14px 0 0;
  text-align: left;
}

.parts div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed var(--linie);
  font-size: 12.5px;
}

.parts dt {
  color: var(--asche);
}

.parts dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.loot li {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 13.5px;
}

.loot b {
  font-variant-numeric: tabular-nums;
}

.loot-runes {
  margin-top: 4px;
}

.loot-runes li {
  font-size: 13px;
  font-weight: 600;
}

.loot-runes small {
  font-weight: 500;
  color: var(--asche);
  margin-left: 4px;
}

.lvl-up {
  margin-top: 8px;
  color: var(--glut-hell);
  font-weight: 600;
  font-size: 14px;
}

.fallen {
  color: #ff7a6a;
}

/* --- Meldung --- */
#toast {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 16px;
  background: var(--stein-solid);
  border: 1px solid var(--linie-2);
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, -24px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#toast span {
  font-size: 12px;
  color: var(--asche);
}

/* Esc-hold reminder (fullscreen with keyboard lock) */
#lockhint {
  position: absolute;
  top: 6px;
  left: 50%;
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--stein-solid);
  border: 1px solid var(--glut, #ffb35c);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -16px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

#lockhint.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.lock-note .kbd {
  vertical-align: 1px;
}

/* --- Touch-Steuerung --- */
#touch {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

#touch[hidden] {
  display: none;
}

.stick {
  position: absolute;
  left: calc(22px + env(safe-area-inset-left, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: 140px;
  height: 140px;
  pointer-events: auto;
  touch-action: none;
}

.stick-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(239, 228, 204, 0.07);
  border: 2px solid rgba(239, 228, 204, 0.25);
}

.knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  background: rgba(239, 228, 204, 0.3);
  border: 2px solid rgba(239, 228, 204, 0.6);
}

.tbtns {
  position: absolute;
  right: calc(14px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: 260px;
  height: 240px;
  pointer-events: none;
}

.tb {
  position: absolute;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  pointer-events: auto;
  touch-action: none;
  border-radius: 50%;
  background: rgba(13, 19, 23, 0.72);
  border: 2px solid rgba(239, 228, 204, 0.35);
  color: var(--pergament);
  font: 600 11px/1 var(--ui);
}

.tb.down {
  background: rgba(255, 154, 60, 0.45);
}

.tb-attack {
  width: 86px;
  height: 86px;
  right: 16px;
  bottom: 16px;
  background: rgba(255, 154, 60, 0.22);
  border-color: var(--glut);
  font-size: 13px;
}

.tb-jump {
  right: 112px;
  bottom: 4px;
}

.tb-dash {
  right: 28px;
  bottom: 112px;
}

.tb.sk {
  width: 52px;
  height: 52px;
}

.tb-s1 {
  right: 184px;
  bottom: 40px;
}

.tb-s2 {
  right: 172px;
  bottom: 102px;
}

.tb-s3 {
  right: 124px;
  bottom: 150px;
}

.tb-s4 {
  right: 62px;
  bottom: 176px;
}

.tb.cd {
  opacity: 0.45;
}

.tb.link {
  border-color: #ffcf5a;
  box-shadow: 0 0 14px rgba(255, 207, 90, 0.6);
}

.tb-transform {
  width: 48px;
  height: 48px;
  right: 206px;
  bottom: 166px;
  border-color: rgba(255, 154, 60, 0.5);
}

.tb-transform.ready {
  background: rgba(255, 154, 60, 0.5);
  border-color: var(--glut-hell);
  animation: glow 0.8s ease-in-out infinite alternate;
}

#touch.town .tb.sk,
#touch.town .tb-transform,
#touch.town .tb-potion,
#touch.town .tb-target {
  display: none;
}

/* Target switch (Tab / R3 on keyboard and controller) */
.tb-target {
  width: 44px;
  height: 44px;
  right: 4px;
  bottom: 238px;
  border-color: rgba(143, 227, 255, 0.6);
}

.tb-potion {
  width: 44px;
  height: 44px;
  right: 4px;
  bottom: 186px;
  border-color: rgba(224, 112, 122, 0.6);
}

.pausebtn {
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.portrait .stick {
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  transform: scale(0.86);
  transform-origin: bottom left;
}

.portrait .tbtns {
  bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  transform: scale(0.86);
  transform-origin: bottom right;
}

#rotate {
  display: none;
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  text-align: center;
  font-size: 13px;
  color: var(--asche);
  pointer-events: none;
}

.portrait.touch-ui #rotate {
  display: block;
}

@keyframes glow {
  from {
    box-shadow: 0 0 6px rgba(255, 154, 60, 0.4);
  }
  to {
    box-shadow: 0 0 20px rgba(255, 207, 138, 0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rank,
  .tb-transform.ready {
    animation: none;
  }
  .ccard,
  .btn,
  #toast {
    transition: none;
  }
}

/* --- Controller einrichten --- */
.padsetup .dialog {
  text-align: center;
}

.padsetup .ps-pad {
  display: block;
  width: 420px;
  height: 220px;
  margin: 4px auto 0;
}

.ps-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 10px;
}

.ps-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(239, 228, 204, 0.18);
}

.ps-dots i.on {
  background: var(--gut);
}

.padsetup .actions {
  justify-content: center;
}

.fine.warn {
  color: #ffb07a;
}

/* Ausrüstung und Inventar */
.gear.overlay {
  background: rgba(4, 6, 8, 0.8);
}

.gear-win {
  position: absolute;
  inset: 10px;
  display: grid;
  grid-template-columns: 292px 452px 1fr;
  grid-template-rows: 40px 1fr;
  gap: 8px 10px;
  padding: 8px 12px 12px;
  box-sizing: border-box;
  background: var(--stein-solid);
  border: 1px solid var(--linie-2);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

.gw-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--linie);
}

.gw-head > div {
  display: grid;
  flex: 1;
}

.gw-head strong {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
}

.gw-head .eyebrow {
  font-size: 10px;
}

.gw-who {
  font-size: 12px;
  color: var(--asche);
}

.gw-equip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.gw-doll {
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 207, 138, 0.08), rgba(0, 0, 0, 0) 70%), rgba(8, 12, 15, 0.55);
  border: 1px solid var(--linie);
  border-radius: 8px;
  padding: 6px;
}

.gw-doll-l,
.gw-doll-r {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gd-refine {
  font-size: 11px;
  color: #9fe4c8;
  line-height: 1.35;
}

.gw-fig {
  width: 150px;
  height: 230px;
  justify-self: center;
}

.gslot {
  position: relative;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(8, 12, 15, 0.8);
  border: 1px solid var(--linie-2);
  border-radius: 7px;
}

.gslot.full {
  border-color: var(--rc);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6), 0 0 8px color-mix(in srgb, var(--rc) 35%, transparent);
}

.gslot.sel,
.gcell.sel {
  outline: 2px solid var(--glut-hell);
  outline-offset: 1px;
}

.gs-empty {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(239, 228, 204, 0.35);
}

.gi {
  display: block;
  line-height: 0;
}

.gp {
  position: absolute;
  right: 2px;
  top: 1px;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  color: #ffe08a;
  text-shadow: 0 1px 2px #000;
}

.gw-statbox .gw-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 12px;
  margin: 0;
  font-size: 12px;
}

.gw-stats div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--linie);
}

.gw-stats dt {
  color: var(--asche);
}

.gw-stats dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.gw-power {
  margin-top: 4px;
  font-size: 12px;
  color: var(--asche);
}

.gw-power b {
  color: var(--glut-hell);
  font-size: 15px;
}

.gw-toggle {
  margin-top: 4px;
  padding: 3px 6px;
  font-size: 11.5px;
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #cfc6b2;
  text-align: left;
}

.gw-inv {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.gw-filter {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gw-filter .seg {
  padding: 3px 10px;
  font-size: 12px;
}

.gw-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--asche);
  font-variant-numeric: tabular-nums;
}

.gw-grid {
  display: grid;
  grid-template-columns: repeat(10, 42px);
  grid-auto-rows: 42px;
  gap: 3px;
}

.gcell {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: linear-gradient(180deg, rgba(20, 26, 32, 0.9), rgba(8, 11, 14, 0.9));
  border: 1px solid color-mix(in srgb, var(--rc, #555) 70%, transparent);
  border-radius: 6px;
}

.gcell.empty {
  border-color: rgba(239, 228, 204, 0.07);
  background: rgba(8, 11, 14, 0.5);
}

.gcell.nofit .gi {
  filter: saturate(0.25) brightness(0.7);
}

.gcell .gw {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000;
}

.gcell .glv {
  position: absolute;
  left: 2px;
  bottom: 1px;
  font-style: normal;
  font-size: 9px;
  font-weight: 800;
  color: #ff8a7a;
  text-shadow: 0 1px 2px #000;
}

.gw-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  color: #cfc6b2;
}

.gw-stack > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gw-detail {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--rc, var(--linie));
  border-radius: 8px;
  font-size: 12px;
}

.gw-detail.empty .muted {
  font-size: 12px;
  line-height: 1.45;
}

.gd-top {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gd-top > div {
  min-width: 0;
}

.gd-name {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.05;
  color: var(--rc);
  overflow-wrap: anywhere;
}

.gd-meta,
.gd-type {
  color: var(--asche);
  font-size: 11.5px;
  line-height: 1.35;
}

.gd-warn {
  color: #ff8a7a;
  font-size: 11.5px;
}

.gd-stats li {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px dashed var(--linie);
}

.gd-stats em,
.gd-power em {
  font-style: normal;
  font-size: 10px;
}

.gd-stats em.up,
.gd-power em.up {
  color: var(--gut);
}

.gd-stats em.down,
.gd-power em.down {
  color: #ff8a7a;
}

.gd-power {
  color: var(--asche);
}

.gd-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: auto;
}

.rune.gcell .hex,
.rune.gcell .rslot-ico {
  display: none;
}

/* Heldenwahl: Mann oder Frau */
.sexpick {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.sexpick .seg {
  flex: 0 0 auto;
  width: auto;
  padding: 3px 14px;
  font-size: 13px;
}

.sexpick small {
  color: var(--asche);
  font-size: 11px;
}

.hsex {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================================================
   Online mode (src/ui/online*.js): online menu, name dialog, save choice,
   party, ignore list, vending stalls and the town chat. Everything stays
   inside the 960×540 stage.
   ========================================================================== */
.ol.overlay,
.om.overlay {
  background: rgba(4, 6, 8, 0.78);
}

.ol-win {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 780px;
  height: 468px;
  transform: translate(-50%, -52%);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 8px 16px 8px;
  background: var(--stein-solid);
  border: 1px solid var(--linie-2);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

.ol-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--linie);
}

.ol-head > div {
  display: grid;
  flex: 1;
  min-width: 0;
}

.ol-head .eyebrow {
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ol-head strong {
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.05;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ol-tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 6px;
}

.ol-tab {
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie-2);
  border-radius: 999px;
}

.ol-tab.on {
  border-color: var(--glut);
  background: rgba(255, 154, 60, 0.16);
  color: var(--glut-hell);
}

.ol-tab small {
  color: var(--asche);
  font-weight: 500;
}

.ol-badge {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  margin-left: 3px;
  border-radius: 8px;
  background: #4fb4ff;
  color: #0b1420;
  font: 800 10px/1 var(--ui);
}

.ol-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 2px 4px;
}

.ol-body h4 {
  margin: 10px 0 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glut-hell);
}

.ol-body h4 small {
  margin-left: 6px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--asche);
}

.ol-msg {
  min-height: 18px;
  padding-top: 4px;
  border-top: 1px solid var(--linie);
  font-size: 12.5px;
  color: var(--echo);
}

.ol-msg.bad {
  color: #ffb07a;
}

.ol-body .small,
.ol-dlg .small {
  font-size: 11.5px;
}

/* Text fields */
.ol-field {
  display: grid;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--asche);
}

.ol-field small {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.ol-field.grow {
  flex: 1;
}

.ol-in {
  box-sizing: border-box;
  width: 100%;
  padding: 7px 10px;
  font: 500 14px var(--ui);
  letter-spacing: 0;
  text-transform: none;
  color: var(--pergament);
  background: rgba(6, 9, 11, 0.8);
  border: 1px solid var(--linie-2);
  border-radius: 6px;
  -webkit-user-select: text;
  user-select: text;
}

.ol-in::placeholder {
  color: rgba(162, 171, 165, 0.6);
}

.ol-in:focus,
.ol-in.is-focus {
  border-color: var(--glut-hell);
}

.ol-in.small {
  padding: 4px 8px;
  font-size: 12.5px;
}

.ol-in.code {
  font: 700 18px/1 var(--ui);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  width: 150px;
}

.ol-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* Login */
.ol-auth {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 22px;
  padding-top: 4px;
}

.ol-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.ol-form .btn.primary {
  margin-top: 2px;
}

.ol-server {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--asche);
}

.ol-info {
  padding: 12px 16px;
  background: rgba(8, 12, 15, 0.55);
  border: 1px solid var(--linie);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.ol-info h4 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--pergament);
}

.ol-info ul {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.ol-info li {
  padding-left: 14px;
  position: relative;
}

.ol-info li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glut);
}

.ol-info .muted {
  font-size: 12px;
}

/* Account */
.ol-acc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(8, 12, 15, 0.55);
  border: 1px solid var(--linie);
  border-radius: 8px;
}

.ol-acc > div:not(.ol-accbtn) {
  display: grid;
  flex: 1;
}

.ol-acc strong {
  font-size: 16px;
}

.ol-acc .muted {
  font-size: 12px;
}

.ol-accbtn {
  display: flex;
  gap: 6px;
}

.ol-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff8a7a;
  box-shadow: 0 0 8px currentColor;
}

.ol-dot.st-open {
  background: var(--gut);
}

.ol-dot.st-connecting {
  background: var(--glut-hell);
}

.ol-save {
  margin-top: 6px;
  font-size: 12px;
}

/* title flow: start playing right from the account tab */
.ol-play {
  width: 100%;
  margin-bottom: 8px;
  font-size: 17px;
}

/* stored session that could not be resumed yet */
.ol-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--glut-hell);
}

.ol-heroes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.ol-hero {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 4px;
  background: rgba(8, 12, 15, 0.5);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--c);
  border-radius: 7px;
}

.ol-hero.cur {
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
}

.ol-hero canvas {
  width: 54px;
  height: 62px;
}

.ol-hinfo {
  display: grid;
  min-width: 0;
}

.ol-hinfo strong {
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ol-hinfo em {
  color: #ffb07a;
}

.ol-hinfo span {
  font-size: 11.5px;
  color: var(--asche);
}

/* Party */
.ol-code {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(8, 12, 15, 0.55);
  border: 1px solid var(--linie);
  border-radius: 8px;
}

.ol-code span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--asche);
}

.ol-code b {
  font: 800 26px/1 var(--ui);
  letter-spacing: 0.24em;
  color: var(--glut-hell);
  -webkit-user-select: text;
  user-select: text;
}

.ol-code small {
  font-size: 12px;
  color: var(--asche);
}

.ol-members {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.ol-members .btn.small {
  padding: 2px 10px;
}

/* Only the topmost window shows its key legend (they share one spot) */
#ui > .screen:has(~ .ol, ~ .om, ~ .ol-name, ~ .ol-choose, ~ .ol-inv) .legend {
  visibility: hidden;
}

.ol-members li {
  display: grid;
  grid-template-columns: 4px 1.2fr 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 27px;
  padding: 0 8px 0 0;
  background: rgba(8, 12, 15, 0.45);
  border-radius: 6px;
  overflow: hidden;
}

.ol-members li > i {
  align-self: stretch;
  background: var(--pc);
}

.ol-members li.offline {
  opacity: 0.5;
  filter: grayscale(1);
}

.ol-members li.free {
  opacity: 0.55;
  grid-template-columns: 4px 1fr;
}

.ol-mname {
  font-weight: 700;
  font-size: 14px;
}

.ol-mname small {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(239, 228, 204, 0.12);
  font-size: 10px;
  font-weight: 600;
}

.ol-mname .crown {
  color: #ffcf5a;
}

.ol-mcls {
  font-size: 12px;
  color: var(--asche);
}

.ol-invite {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 7px 10px;
  background: rgba(79, 180, 255, 0.12);
  border: 1px solid rgba(79, 180, 255, 0.5);
  border-radius: 8px;
  font-size: 13px;
}

.ol-invite span {
  flex: 1;
}

/* Ignore list */
.ol-list {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}

.ol-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 5px 8px;
  background: rgba(8, 12, 15, 0.45);
  border-radius: 6px;
}

/* Small dialogs: name, save choice, invite */
.ol-dlg h3 {
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
  margin: 4px 0 6px;
}

.ol-dlg .muted {
  font-size: 13px;
  line-height: 1.45;
}

.ol-name .dialog {
  width: 520px;
}

.ol-name-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  margin-top: 8px;
}

.ol-name-row canvas {
  width: 96px;
  height: 112px;
  border-radius: 8px;
  background: rgba(8, 12, 15, 0.5);
}

.ol-name-main {
  display: grid;
  gap: 8px;
  align-content: start;
}

.ol-name-main h3 {
  margin: 0;
}

.ol-avail {
  font-size: 12px;
  min-height: 16px;
}

.ol-avail.good {
  color: var(--gut);
}

.ol-avail.bad {
  color: #ffb07a;
}

.ol-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.ol-cols section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(8, 12, 15, 0.5);
  border: 1px solid var(--linie);
  border-radius: 8px;
}

.ol-cols h4 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glut-hell);
}

.ol-sum {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.ol-sum li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ol-sum b {
  font-weight: 500;
  color: var(--asche);
}

.ol-sumline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 12px;
  color: var(--asche);
}

/* --- Vending stalls ------------------------------------------------------ */
.om-win .ol-body {
  padding-top: 8px;
}

.om-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: 0;
}

.om-cols h4 {
  margin-top: 4px;
}

.om-ohead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.om-ohead > div:first-child {
  display: grid;
  flex: 1;
  min-width: 0;
}

.om-ohead strong {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.1;
}

.om-earn {
  display: grid;
  justify-items: end;
  padding: 6px 14px;
  background: rgba(255, 207, 90, 0.1);
  border: 1px solid rgba(255, 207, 90, 0.45);
  border-radius: 8px;
}

.om-earn span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--asche);
}

.om-earn b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 22px;
  color: #ffe08a;
}

.om-sales,
.om-rest,
.om-list {
  display: grid;
  gap: 3px;
}

.om-sales li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: rgba(8, 12, 15, 0.45);
  border-radius: 6px;
  font-size: 12.5px;
}

.om-t {
  font-size: 11px;
  color: var(--asche);
  font-variant-numeric: tabular-nums;
}

.om-g {
  display: grid;
  justify-items: end;
  font-weight: 700;
  color: #ffe08a;
  font-variant-numeric: tabular-nums;
}

.om-g small {
  font-size: 10px;
  font-weight: 500;
  color: var(--asche);
}

.om-rest li,
.om-list li {
  display: grid;
  grid-template-columns: 40px 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 3px;
  background: rgba(8, 12, 15, 0.45);
  border-radius: 6px;
  font-size: 13px;
}

.om-rest li {
  grid-template-columns: 40px 1fr auto;
}

.om-w {
  display: grid;
  min-width: 0;
  font-weight: 600;
}

.om-w small {
  font-size: 11px;
  font-weight: 500;
  color: var(--asche);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.om-stats {
  color: #cfc6b0 !important;
}

.om-fit {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(143, 227, 154, 0.16);
  color: var(--gut);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.om-ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(180deg, rgba(20, 26, 32, 0.9), rgba(8, 11, 14, 0.9));
  border: 1px solid color-mix(in srgb, var(--rc, #555) 70%, transparent);
  border-radius: 6px;
}

.om-ico.good {
  --rc: #6a6252;
}

.om-qty {
  display: flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.om-qty b {
  min-width: 22px;
  text-align: center;
}

.om-qty .btn.small {
  padding: 2px 8px;
}

.om-price {
  display: flex;
  align-items: center;
  gap: 5px;
}

.om-price .ol-in {
  width: 92px;
  padding: 4px 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.om-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.om-confirm {
  font-size: 12.5px;
  color: #ffb8b0;
}

.om-none {
  display: grid;
  gap: 10px;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.45;
}

.om-none .btn {
  justify-self: start;
}

.om-setup .om-su {
  flex: 1;
  min-height: 0;
  grid-template-columns: 318px 1fr;
  padding-top: 6px;
}

.om-pick,
.om-offer {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.om-offer {
  gap: 6px;
}

.om-offer h4 {
  margin: 4px 0 0;
}

.om-offer .om-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  align-content: start;
}

.om-goods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 8px;
}

.om-good {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  background: rgba(8, 12, 15, 0.6);
  border: 1px solid var(--linie-2);
  border-radius: 6px;
}

.om-good small {
  margin-left: auto;
  color: var(--asche);
  font-weight: 500;
}

.om-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 42px);
  grid-auto-rows: 42px;
  gap: 3px;
  overflow: auto;
  min-height: 0;
  padding: 2px;
}

.om-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--linie);
}

.om-foot span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--asche);
}

.om-foot b {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ffe08a;
}

.om-empty {
  flex: 1;
}

.om-purse {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--asche);
}

.om-view .om-list li {
  grid-template-columns: 40px 1fr auto auto 150px;
}

.om-view .om-list .btn.small {
  justify-content: center;
}

.om-tab .om-own {
  padding-top: 2px;
}

/* --- Town chat ----------------------------------------------------------- */
.ol-chat {
  position: absolute;
  left: 12px;
  bottom: 34px;
  width: 330px;
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--pergament);
}

.ol-chat[hidden] {
  display: none;
}

.oc-bar {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}

.ol-chat.open .oc-bar,
.ol-chat:hover .oc-bar,
.ol-chat.touch .oc-bar {
  opacity: 1;
}

.oc-tab,
.oc-openbtn {
  padding: 2px 7px;
  font: 600 10.5px/1.4 var(--ui);
  color: var(--asche);
  background: rgba(8, 10, 12, 0.7);
  border: 1px solid transparent;
  border-radius: 5px 5px 0 0;
}

.oc-tab.on {
  color: var(--glut-hell);
  border-color: var(--linie-2);
  border-bottom-color: transparent;
}

.oc-openbtn {
  margin-left: auto;
  color: var(--pergament);
}

.oc-log {
  max-height: 104px;
  overflow-y: auto;
  padding: 4px 8px;
  background: linear-gradient(180deg, rgba(8, 10, 12, 0.05), rgba(8, 10, 12, 0.5));
  border-radius: 0 6px 6px 6px;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
  scrollbar-width: thin;
  -webkit-user-select: text;
  user-select: text;
}

.ol-chat.open .oc-log,
.ol-chat.fresh .oc-log {
  background: rgba(8, 10, 12, 0.72);
}

.ol-chat.open .oc-log {
  max-height: 150px;
}

.oc-l {
  overflow-wrap: anywhere;
}

.oc-ts {
  font-size: 10px;
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
}

.oc-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.oc-l.ch-town .oc-tag {
  color: #d9c9a8;
}

.oc-l.ch-party,
.oc-l.ch-party .oc-tag {
  color: #a8dcff;
}

.oc-l.ch-whisper,
.oc-l.ch-whisper .oc-tag {
  color: #ffa8e0;
}

.oc-l.ch-system {
  color: #ffd98a;
}

.oc-l.ch-system.err {
  color: #ffb07a;
}

.oc-l.oc-empty {
  color: var(--asche);
  font-style: italic;
}

.oc-n {
  padding: 0;
  font: 700 12.5px/1.35 var(--ui);
  color: inherit;
  background: none;
  border: 0;
  text-shadow: inherit;
}

.oc-n:hover {
  text-decoration: underline dotted;
}

.oc-self {
  color: #ffe3b0;
}

.oc-to {
  font-size: 11px;
  opacity: 0.8;
}

.oc-line {
  display: none;
  gap: 4px;
  margin-top: 3px;
}

.ol-chat.open .oc-line {
  display: flex;
}

.oc-ch {
  flex: none;
  max-width: 120px;
  padding: 0 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 700 11px/1 var(--ui);
  background: rgba(8, 10, 12, 0.85);
  border: 1px solid var(--linie-2);
  border-radius: 6px;
  color: #d9c9a8;
}

.oc-ch.ch-party {
  color: #a8dcff;
}

.oc-ch.ch-whisper {
  color: #ffa8e0;
}

.oc-in {
  flex: 1;
  min-width: 0;
  padding: 6px 9px;
  font: 500 13px var(--ui);
  color: var(--pergament);
  background: rgba(6, 9, 11, 0.92);
  border: 1px solid var(--glut-hell);
  border-radius: 6px;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

.oc-menu {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 150px;
  padding: 4px;
  background: var(--stein-solid);
  border: 1px solid var(--linie-2);
  border-radius: 7px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.oc-menu[hidden] {
  display: none;
}

.oc-menu strong {
  padding: 3px 8px 5px;
  font-size: 12px;
  color: var(--glut-hell);
}

.oc-menu button {
  padding: 5px 8px;
  font: 600 12.5px var(--ui);
  text-align: left;
  background: none;
  border: 0;
  border-radius: 5px;
}

.oc-menu button:hover {
  background: rgba(255, 154, 60, 0.16);
}

/* Touch: stick and buttons own the lower corners; chat goes to the top */
.ol-chat.touch {
  left: 290px;
  top: 12px;
  bottom: auto;
  width: 360px;
}

.ol-chat.touch .oc-log {
  max-height: 64px;
}

.ol-chat.touch.open .oc-log {
  max-height: 110px;
}

/* Map window (key M) */
.mapview .dialog.wide {
  width: 860px;
}

.mapcv {
  display: block;
  width: 100%;
  height: 318px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: #10141a;
}

/* key cap at the end of a menu button */
.town-menu .btn .mkey {
  float: right;
  margin-left: 10px;
  opacity: 0.85;
}

/* Merchant sub tabs (Kaufen / Verkaufen …) */
.subtabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--linie);
}

.subtab {
  padding: 6px 18px;
  border: 1px solid var(--linie-2);
  border-radius: 999px;
  background: transparent;
  color: var(--asche);
  font: 700 13px var(--ui);
  cursor: pointer;
}

.subtab.on {
  border-color: var(--glut);
  background: rgba(255, 154, 60, 0.14);
  color: var(--glut-hell);
}

.sub-key {
  opacity: 0.7;
}

.sell-view {
  display: grid;
  grid-template-columns: 1fr 236px;
  gap: 18px;
}

.sell-view .sell-good {
  grid-template-columns: 1fr auto auto;
}

.sell-view .inv-grid {
  grid-template-columns: repeat(auto-fill, 44px);
}

.sell-view .rune {
  width: 44px;
  height: 44px;
}

/* Rune smith */
.rune-smith .skill-block {
  padding: 8px 0;
  border-bottom: 1px solid var(--linie);
}

.rs-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.rune-line {
  margin: 4px 0 0 48px;
  font-size: 12px;
}

.rune-line [data-icon] {
  display: inline-block;
  vertical-align: -2px;
}

/* Refine smith */
.refine {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
}

.refine .inv-grid {
  grid-template-columns: repeat(auto-fill, 48px);
}

.refine .rune {
  position: relative;
  width: 48px;
  height: 48px;
}

.refine .rune.worn {
  box-shadow: inset 0 0 0 2px rgba(255, 207, 90, 0.55);
}

.refine .rl {
  position: absolute;
  left: 2px;
  bottom: 1px;
  font-size: 9.5px;
  font-weight: 700;
  color: #8fe39a;
}

.ref-detail {
  padding: 14px;
  border: 1px solid var(--rc, var(--linie-2));
  border-radius: 10px;
  background: rgba(10, 8, 12, 0.45);
}

.ref-detail h3 {
  font-size: 17px;
  color: var(--rc, #efe4cc);
}

.ref-arrow {
  color: var(--glut-hell);
}

.ref-gain {
  margin: 6px 0;
  font-size: 12.5px;
}

.ref-chance {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.ref-chance strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.ref-bar {
  flex: 1;
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: #1a1f25;
}

.ref-bar .base {
  background: linear-gradient(90deg, #d9822b, #ffcf5a);
}

.ref-bar .luck {
  background: repeating-linear-gradient(135deg, #5fc27a 0 5px, #3e9a5a 5px 10px);
}

.ref-cost {
  margin: 10px 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.ref-cost li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.ref-cost li.short {
  color: #e0706a;
}

.ref-msg {
  margin-top: 8px;
  font-weight: 700;
}

.ref-msg.ok {
  color: #8fe39a;
}

.ref-msg.bad {
  color: #e0906a;
}

.ref-mats {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--asche);
}

.refine .rl {
  top: 1px;
  bottom: auto;
}

.ref-note {
  font-size: 12px;
  line-height: 1.45;
}

.sell-view .fcost {
  white-space: nowrap;
}

.title .acct {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.keychip.pad {
  border-color: var(--kc, var(--linie-2));
  color: var(--kc, #efe4cc);
}

/* Exit portal question after the boss */
.run-rank {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 14px;
}

.run-rank .rank {
  font-size: 64px;
}

.run-rank strong {
  display: block;
  font-size: 18px;
}

.res-hint {
  align-self: center;
  font-size: 12.5px;
}

.gw-hint {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--asche);
}
