/* ============================================================
   Gielinor 3D — interface in de stijl van Old School RuneScape:
   platte bruine panelen, harde 1px-bevels, vierkante hoeken,
   witte tekst met gele cijfers.
   ============================================================ */

:root {
  --panel: #3d3529;
  --panel-dark: #2b261c;
  --panel-deep: #1f1b14;
  --panel-light: #4b4233;
  --bevel-light: #6b5f4b;
  --bevel-dark: #17140f;
  --border: #211d15;
  --text: #ffffff;
  --muted: #c9bfa6;
  --yellow: #ffff00;
  --orange: #ff981f;
  --green: #00ff5f;
  --red: #ff3b30;
  --slot: #3d3529;
  --slot-deep: #2b261c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: Verdana, "DejaVu Sans", Geneva, sans-serif;
  font-size: 11px;
  color: var(--text);
  background: #0c0b08;
  padding: 8px;
  -webkit-font-smoothing: none;
  text-rendering: optimizeSpeed;
}

.page {
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
}

/* volledig scherm: geen randje eromheen, het speelveld mag de ruimte pakken */
html:fullscreen body { padding: 0; }
html:fullscreen .page { max-width: none; }
html:fullscreen {
  background: #0c0b08;
}

/* OSRS-kader: donkere rand om alles heen */
.viewport,
.chat,
.sidebar,
.foot {
  border: 2px solid #0e0c08;
  box-shadow: inset 0 0 0 1px var(--bevel-light), inset 0 2px 0 rgba(0, 0, 0, .35);
}

/* ---------------- opties onder in het zijpaneel ---------------- */

.side-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 3px;
  padding: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 40%),
    #262117;
  border-top: 2px solid #0e0c08;
  box-shadow: inset 0 1px 0 #5a5040;
}

.side-options .btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 34px;
  font-size: 8px;
  line-height: 1.15;
  padding: 3px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-options .btn-icon {
  display: block;
  width: 15px;
  height: 15px;
  image-rendering: pixelated;
  pointer-events: none;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .65));
}

.side-options .btn-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  color: var(--text);
  background: var(--panel-light);
  border: 1px solid var(--border);
  border-top-color: var(--bevel-light);
  border-left-color: var(--bevel-light);
  border-bottom-color: var(--bevel-dark);
  border-right-color: var(--bevel-dark);
  padding: 4px 8px;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000;
}
.btn:hover { background: #584d3c; }
.btn:active {
  border-top-color: var(--bevel-dark);
  border-left-color: var(--bevel-dark);
  border-bottom-color: var(--bevel-light);
  border-right-color: var(--bevel-light);
  background: #342d22;
}
.btn.ghost { background: #463d2f; }
.btn:disabled { color: #8d8574; background: #332d22; cursor: not-allowed; }

/* ---------------- layout ---------------- */

.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  gap: 4px;
  align-items: start;
}

.left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  align-self: stretch;   /* het speelveld mag de hoogte van het zijpaneel benutten */
}

/* ---------------- speelveld ---------------- */

.viewport {
  position: relative;
  width: 100%;
  /* OSRS-verhouding (3:2) als uitgangspunt; op een hoge pagina groeit het
     speelveld door tot de hoogte van het zijpaneel, zodat er geen leeg vlak
     onder de chat overblijft */
  flex: 1 1 auto;
  aspect-ratio: 3 / 2;
  min-height: 300px;
  max-height: calc(100dvh - 200px);   /* chat + onderbalk blijven in beeld */
  background: #0a0d08;
  overflow: hidden;
  cursor: default;
}

#world {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}

.webgl-error {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--yellow);
  font-size: 13px;
  line-height: 1.5;
  background: #14100b;
}

.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-size: 11px;
}

/* bliksemflits bij onweer; de sterkte zet het spel zelf */
.lightning {
  position: absolute;
  inset: 0;
  background: #e6efff;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* volumeschuiven per laag in de instellingen */
.vol-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 2px;
}

.vol-name {
  flex: 0 0 72px;
  color: var(--muted);
  font-size: 11px;
}

.vol-slider {
  flex: 1 1 auto;
  min-width: 60px;
  accent-color: #c9a227;
  height: 14px;
}

.vol-pct {
  flex: 0 0 38px;
  text-align: right;
  font-size: 10.5px;
  color: var(--muted);
}

.hud-row {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 4px;
  gap: 4px;
  flex-wrap: wrap;
}

.cb-chip,
.quest-chip,
.safe-chip,
.slayer-chip {
  background: rgba(0, 0, 0, .55);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  padding: 2px 6px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
  text-shadow: 1px 1px 0 #000;
}

.cb-chip b { color: var(--yellow); }

.quest-chip {
  font-size: 10px;
  color: #ffe14d;
  display: inline-flex;
}

.quest-chip.done { color: var(--green); }

/* slayer-teller: een zijsysteem, dus onder het hoofddoel in de HUD */
.slayer-chip {
  display: none;
  font-size: 10px;
  color: #a8d88a;
  pointer-events: auto;
}

.slayer-chip.klaar { color: var(--yellow); }

/* het gekozen doel: ook op touch zichtbaar, met naam en levens */
.target-chip {
  position: absolute;
  left: 6px;
  bottom: 26px;
  display: none;
  max-width: 64%;
  background: rgba(0, 0, 0, .6);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  padding: 2px 6px;
  color: #ffd0a8;
  font-size: 10px;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

.target-chip.show { display: inline-flex; }
.target-chip.laag { color: #ff9a8a; }

/* speciale aanval: één energiescherm voor alle wapens */
.spec-bar {
  position: absolute;
  left: 6px;
  bottom: 44px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  color: #d9e6c9;
  font-size: 9.5px;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
}

.spec-label { white-space: nowrap; }

.spec-track {
  width: 54px;
  height: 7px;
  background: #23281c;
  border: 1px solid #000;
  overflow: hidden;
}

.spec-track i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(180deg, #9fe06a, #4f8f2f);
  transition: width .2s linear;
}

.spec-pct {
  font-variant-numeric: tabular-nums;
  color: #b9cba8;
  min-width: 26px;
  text-align: right;
}

/* alleen zichtbaar met ?test=1 */
.test-chip {
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #2a1a00;
  background: #f0c34a;
  border: 1px solid #8a6a10;
}

.spec-bar.ready { border-color: #6f9a3f; }
.spec-bar.ready .spec-label { color: #d8f0b0; }
.spec-bar.leeg { opacity: .62; }
.spec-bar.leeg .spec-track i { background: linear-gradient(180deg, #8a8a6a, #4a4a36); }

/* de "volgende stap" in de HUD: één concreet doel, met een "Wat nu?"-knop */
.next-row {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: calc(100% - 12px);
  pointer-events: none;
}

.next-chip {
  background: rgba(0, 0, 0, .55);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  padding: 2px 6px;
  color: #bcd8ff;
  font-size: 10px;
  text-shadow: 1px 1px 0 #000;
  pointer-events: auto;
  cursor: pointer;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.what-btn {
  pointer-events: auto;
  flex: 0 0 auto;
  background: rgba(0, 0, 0, .55);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  color: #ffd873;
  font-family: inherit;
  font-size: 10px;
  padding: 2px 7px;
  cursor: pointer;
}

.what-btn:hover { color: #fff2cf; }

.next-chip:hover { color: #e8f2ff; }
.next-chip.klaar { color: var(--yellow); }

/* scoreblok boven de prestatielijst */
.score-box {
  background: rgba(0, 0, 0, .32);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  padding: 5px 7px;
  margin: 4px 0 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text);
}

.score-box b { color: var(--yellow); }

.safe-chip {
  display: none;
  font-size: 10px;
  color: var(--green);
}

.safe-chip.show { display: inline-flex; }

/* wereldklok: dag of nacht, met de speltijd */
.clock-chip {
  background: rgba(0, 0, 0, .55);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  padding: 2px 6px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: #ffe9a8;
  display: inline-flex;
  align-items: center;
  text-shadow: 1px 1px 0 #000;
}

.clock-chip.nacht { color: #a9c2ef; box-shadow: inset 0 0 0 1px rgba(150, 180, 255, .28); }

/* weer met gameplay: alleen zichtbaar als het regent of stormt */
.weather-chip {
  background: rgba(0, 0, 0, .55);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(160, 200, 255, .25);
  padding: 2px 6px;
  font-size: 10px;
  color: #b9dcff;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-shadow: 1px 1px 0 #000;
}

.weather-chip[hidden] { display: none; }

.weather-chip.storm { color: #ffb0a0; box-shadow: inset 0 0 0 1px rgba(255, 140, 120, .3); }

/* levende wereld: een overval, patrouille of stormnacht die nu loopt */
.living-chip {
  background: rgba(0, 0, 0, .6);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 210, 120, .3);
  padding: 2px 6px;
  font-size: 10px;
  color: #ffd27a;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-shadow: 1px 1px 0 #000;
}

.living-chip[hidden] { display: none; }
.living-chip.raid { color: #ffb0a0; box-shadow: inset 0 0 0 1px rgba(255, 140, 120, .3); }
.living-chip.storm { color: #b9dcff; box-shadow: inset 0 0 0 1px rgba(150, 200, 255, .32); }

.perf-panel {
  position: absolute;
  right: 6px;
  bottom: 24px;
  z-index: 4;
  display: none;
  padding: 5px 7px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10px;
  line-height: 1.5;
  white-space: pre-line;
  text-align: right;
  color: #d8f0cc;
  background: rgba(8, 14, 7, .78);
  border: 1px solid rgba(0, 0, 0, .6);
  pointer-events: none;
}

.perf-panel.show {
  display: block;
}

.perf-chip {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 4;
  padding: 2px 6px;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  color: #d3e6c9;
  background: rgba(10, 18, 8, .55);
  border: 1px solid rgba(0, 0, 0, .55);
  pointer-events: none;
  white-space: nowrap;
}

/* baasbalk van de grafdemon, met een streep bij het begin van fase 2 en 3 */
.boss-bar {
  position: absolute;
  top: 46px;
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, calc(100% - 16px));
  padding: 3px 5px 4px;
  background: rgba(12, 9, 6, .82);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  text-shadow: 1px 1px 0 #000;
}

.boss-bar[hidden] { display: none; }

.boss-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
  font-size: 10px;
  color: #cfc6b4;
}

.boss-name { color: #ffd9a0; }
.boss-hp { font-variant-numeric: tabular-nums; }

.boss-track {
  position: relative;
  height: 10px;
  background: #241b14;
  box-shadow: inset 0 0 0 1px #000;
  overflow: hidden;
}

.boss-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #a8291c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.boss-bar.fase-2 .boss-fill { background: #a3441c; }
.boss-bar.fase-3 .boss-fill { background: #b8321a; }

.boss-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f0e2c0;
  box-shadow: 0 0 0 1px #120d08;
}

.boss-mark.m2 { left: 66%; }
.boss-mark.m3 { left: 33%; }

.boss-fase-tekst {
  margin-top: 2px;
  font-size: 9px;
  color: #9d9482;
  letter-spacing: .2px;
}

.boss-bar.fase-3 .boss-fase-tekst { color: #ffb08a; }

.boss-bar.oefenen {
  border-color: #3f8a74;
  box-shadow: inset 0 0 0 1px rgba(150, 255, 220, .16);
}

.boss-bar.oefenen .boss-name { color: #9fe0bd; }
.boss-bar.oefenen .boss-fill { background: #3a7d6a; }

.boss-practice {
  margin-top: 4px;
  width: 100%;
  padding: 3px 6px;
  font: inherit;
  font-size: 9.5px;
  color: #d8f4e8;
  background: #21453a;
  border: 1px solid #63a88d;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000;
}

.boss-practice:hover,
.boss-practice:focus-visible {
  background: #2f614f;
  outline: 1px solid #b6f0d8;
}

.boss-practice[hidden] { display: none; }

/* het waarschuwingsbord boven de baasbalk: patroon, uitleg en countdown */
.boss-warning {
  position: absolute;
  top: 126px;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
  width: min(340px, calc(100% - 16px));
  padding: 5px 8px 7px;
  background: rgba(20, 8, 6, .9);
  border: 1px solid #ff8a5a;
  box-shadow: 0 0 0 1px #000, 0 0 18px rgba(255, 90, 50, .22);
  text-align: center;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

.boss-warning[hidden] { display: none; }
.boss-warning b {
  display: block;
  font-size: 13px;
  letter-spacing: 1.2px;
  color: #ffd9a0;
}
.boss-warning span { display: block; margin-top: 1px; font-size: 9.5px; color: #ffe7cc; }
.boss-warning i { position: absolute; top: 5px; right: 7px; font-size: 9px; font-style: normal; color: #ffb08a; }
.boss-warning em {
  display: block;
  height: 3px;
  margin-top: 5px;
  background: #ffb347;
  transform-origin: left center;
}
.boss-warning.spreiden { border-color: #ffc04a; box-shadow: 0 0 0 1px #000, 0 0 18px rgba(255, 190, 60, .22); }
.boss-warning.spreiden b { color: #ffe28a; }
.boss-warning.spreiden em { background: #ffd23a; }
.boss-warning.speciaal { border-color: #e06ad8; box-shadow: 0 0 0 1px #000, 0 0 22px rgba(220, 90, 220, .28); }
.boss-warning.speciaal b { color: #ffb6f4; }
.boss-warning.speciaal em { background: #e06ad8; }

/* kleurenblind: waarschuwingen blijven ook op kleur te onderscheiden */
.colorblind .boss-warning { border-color: #4da6ff; }
.colorblind .boss-warning b { color: #cfe8ff; }
.colorblind .boss-warning em { background: #4da6ff; }
.colorblind .boss-warning.spreiden { border-color: #ffb000; }
.colorblind .boss-warning.spreiden b { color: #ffe0a0; }
.colorblind .boss-warning.spreiden em { background: #ffb000; }
.colorblind .boss-warning.speciaal { border-color: #c08cff; }
.colorblind .boss-warning.speciaal b { color: #f0ddff; }
.colorblind .boss-warning.speciaal em { background: #c08cff; }

.hover-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--yellow);
  background: rgba(0, 0, 0, .7);
  border: 1px solid #000;
  text-shadow: 1px 1px 0 #000;
  opacity: 0;
  transition: opacity .12s;
}
.hover-label.show { opacity: 1; }

/* melding met de naam van het muziekstuk van deze streek */
.track-toast {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 9px;
  font-size: 10.5px;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.track-toast i { font-style: normal; color: var(--yellow); }

.track-toast.show { animation: track-fade 3.8s ease-out forwards; }

@keyframes track-fade {
  0% { opacity: 0; transform: translate(-50%, 5px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  72% { opacity: 1; }
  100% { opacity: 0; }
}

.levelup {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  color: var(--yellow);
  font-weight: bold;
  font-size: 12px;
  letter-spacing: .4px;
  background: rgba(0, 0, 0, .78);
  border: 1px solid var(--bevel-light);
  text-shadow: 2px 2px 0 #000;
  opacity: 0;
  pointer-events: none;
}
.levelup.show { animation: level-pop 2.4s ease-out forwards; }

@keyframes level-pop {
  0% { opacity: 0; transform: translate(-50%, 6px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -12px); }
}

/* ---------------- minimap met orbs ---------------- */

.minimap {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  grid-template-columns: 30px auto;
  grid-template-rows: auto;
  gap: 3px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  z-index: 3;
}

.orb-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.minimap-orb {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: #14110c;
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

.minimap-orb i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  transition: height .22s ease-out;
}

.minimap-orb.hp i { background: linear-gradient(180deg, #ff5b4d, #a01d16); }
.minimap-orb.pray i { background: linear-gradient(180deg, #6fd0ff, #1d5c96); }

.minimap-orb b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 1px #000, 0 0 2px #000;
}

.map-wrap {
  position: relative;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #0e0c08;
  box-shadow: 0 0 0 1px var(--bevel-light), inset 0 0 18px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .5);
  background: #16210f;
}

.minimap canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  border: none;
  cursor: pointer;
}

.compass {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: bold;
  color: #ffe14d;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

.minimap-title {
  display: none;
}

.xp-drops {
  position: absolute;
  top: 158px;
  right: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.xpdrop {
  font-size: 11px;
  color: var(--orange);
  text-shadow: 1px 1px 0 #000;
  animation: xp-fade 2.2s ease-out forwards;
}
.xpdrop .xp-num { color: var(--orange); font-weight: bold; }

@keyframes xp-fade {
  0% { opacity: 0; transform: translateY(6px); }
  10% { opacity: 1; transform: translateY(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-6px); }
}

/* dagelijkse uitdaging: timer en score boven het speelveld */
.daily-hud {
  position: absolute;
  top: 46px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 9px;
  z-index: 4;
  font-size: 10px;
  color: #ffe7b0;
  background: rgba(20, 13, 7, .86);
  border: 1px solid #b78a3a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 0 0 1px #000;
  text-shadow: 1px 1px 0 #000;
  white-space: nowrap;
}

.daily-hud[hidden] { display: none; }
.daily-hud.urgent { color: #ffb08a; border-color: #d8423a; }

/* levensbalk van de speler: alleen zichtbaar in gevecht, rechtsonder in beeld */
.combat-hp {
  position: absolute;
  right: 8px;
  bottom: 28px;
  z-index: 4;
  width: min(230px, 44%);
  padding: 4px 6px 5px;
  background: rgba(12, 9, 6, .84);
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 2px 8px rgba(0, 0, 0, .45);
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.combat-hp[hidden] { display: none; }

.combat-hp.show { animation: combatHpIn .18s ease-out; }

.combat-hp-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 10px;
  color: #cfc6b4;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.combat-hp-head b {
  color: #ffd9a0;
  font-variant-numeric: tabular-nums;
}

.combat-hp-track {
  position: relative;
  height: 12px;
  background: #241b14;
  box-shadow: inset 0 0 0 1px #000;
  overflow: hidden;
}

.combat-hp-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(#c8392b, #8f2018);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: width .16s ease-out;
}

.combat-hp.laag .combat-hp-track i {
  background: linear-gradient(#e04a34, #a32416);
  animation: combatHpPulse .9s ease-in-out infinite;
}

.combat-hp.klap {
  border-color: #b8321a;
}

.combat-hp.klap .combat-hp-track {
  box-shadow: inset 0 0 0 1px #000, 0 0 8px rgba(200, 57, 43, .6);
}

@keyframes combatHpIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes combatHpPulse {
  50% { filter: brightness(1.28); }
}

/* levensbalkjes die tijdens een gevecht boven de speler en de vijanden hangen;
   platte OSRS-balkjes met een harde rand, in dezelfde overlay als de hitsplats */
.nameplates { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.nameplate {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  opacity: 0;
  transition: opacity .12s;
  font-size: 9.5px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000, 1px 0 0 #000;
}
.nameplate.show { opacity: 1; }
.nameplate .np-name { font-weight: bold; color: #ffe6a3; white-space: nowrap; letter-spacing: .02em; }
.nameplate.player .np-name { display: none; }
.nameplate .np-track {
  width: 46px;
  height: 6px;
  background: #2b0b08;
  border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.nameplate .np-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: #c62f20;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: width .18s linear;
}
.nameplate.player .np-fill { background: #3f9e3a; }
.nameplate.laag .np-fill { background: #d3a01f; }
.reduce-motion .nameplate, .reduce-motion .nameplate .np-fill { transition: none; }

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

/* hitsplat in OSRS-stijl: een onregelmatige klodder met rand, diepe schaduw,
   natte glans en een paar losse spatten. De kleur per soort zit in variabelen,
   zodat de opbouw één keer beschreven is. */
.hitsplat {
  --splat-hi: #ff8b7c;
  --splat-mid: #c22a1d;
  --splat-lo: #6e1109;
  --splat-edge: #2a0705;
  position: absolute;
  width: 27px;
  height: 25px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  text-shadow:
    1px 1px 0 #000,
    -1px 0 0 #000,
    0 -1px 0 #000,
    0 1px 0 #000;
  animation: splat .85s ease-out forwards;
}

.hitsplat::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 48% 52% 45% 55% / 55% 44% 56% 45%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 32%),
    radial-gradient(circle at 72% 78%, rgba(0, 0, 0, .32), transparent 46%),
    radial-gradient(circle at 42% 34%, var(--splat-hi), var(--splat-mid) 58%, var(--splat-lo) 100%);
  border: 1.5px solid var(--splat-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -3px 5px rgba(0, 0, 0, .35),
    0 1px 2px rgba(0, 0, 0, .55),
    7px -9px 0 -9px var(--splat-mid),
    -9px 7px 0 -9px var(--splat-mid);
  z-index: -1;
}

/* natte glans linksboven op de klodder */
.hitsplat::after {
  content: "";
  position: absolute;
  left: 16%;
  top: 10%;
  width: 36%;
  height: 30%;
  border-radius: 50%;
  transform: rotate(-20deg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: -1;
}

.hitsplat.zero {
  --splat-hi: #8ecbff;
  --splat-mid: #2f6cae;
  --splat-lo: #10294a;
  --splat-edge: #061426;
}

.hitsplat.heal {
  --splat-hi: #8ef0a2;
  --splat-mid: #2c8c46;
  --splat-lo: #0f3d1f;
  --splat-edge: #06200f;
}

@keyframes splat {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  30% { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(1); }
}

/* ---------------- chatbalk: perkament in een koperen lijst ---------------- */

.chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 4px 4px 0;
  background:
    linear-gradient(180deg, #7c5731 0%, #5f3f22 45%, #4a301a 100%);
  box-shadow:
    inset 0 0 0 1px #c98f55,
    inset 0 0 0 3px #3a2614,
    inset 0 2px 0 rgba(0, 0, 0, .35);
}

.chat-log {
  height: 118px;
  overflow-y: auto;
  padding: 5px 7px;
  font-size: 11px;
  line-height: 1.5;
  color: #2e2314;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, .45), transparent 62%),
    repeating-linear-gradient(0deg, rgba(120, 84, 40, .07) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #efdcb2 0%, #e6d0a2 60%, #dcc394 100%);
  border: 1px solid #6d4a24;
  box-shadow:
    inset 0 0 0 1px #f7ecd0,
    inset 0 0 14px rgba(112, 74, 30, .22);
  scrollbar-width: thin;
  scrollbar-color: #8a5a2b #cdb383;
}

.chat-log::-webkit-scrollbar { width: 8px; }
.chat-log::-webkit-scrollbar-track { background: #cdb383; }
.chat-log::-webkit-scrollbar-thumb { background: #8a5a2b; border: 1px solid #6d4a24; }

/* inkt op perkament: de kleuren houden hun betekenis, maar donker genoeg om te lezen */
.msg { color: #2e2314; text-shadow: 0 1px 0 rgba(255, 248, 226, .55); }
.msg.gold { color: #7a4d05; font-weight: bold; }
.msg.warn { color: #96210f; }
.msg.good { color: #1e6b2c; }
.msg.system { color: #4a5a2e; }

/* koperen knoppen onder de chat */
.chat-tabs {
  display: flex;
  gap: 2px;
  padding: 4px 0;
  border-top: 2px solid #2a1a0c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 40%),
    #3f2814;
  box-shadow: inset 0 1px 0 #b77f45;
}

.chat-tab {
  flex: 1;
  text-align: center;
  font-size: 9px;
  font-weight: bold;
  color: #f2ddb4;
  padding: 3px 0;
  background:
    linear-gradient(180deg, #a26a38 0%, #7d4c25 48%, #5c3418 100%);
  border: 1px solid #24160a;
  box-shadow:
    inset 1px 1px 0 #d99b60,
    inset -1px -1px 0 #3a2210;
  text-shadow: 1px 1px 0 #2b1a0c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-tab.active {
  color: #fff7dc;
  background:
    linear-gradient(180deg, #cf9350 0%, #a86831 48%, #7c4620 100%);
  box-shadow:
    inset 0 0 0 1px #ffcf8c,
    inset 1px 1px 0 rgba(255, 255, 255, .3),
    inset -1px -1px 0 rgba(0, 0, 0, .4),
    0 0 6px rgba(255, 178, 84, .25);
}

/* ---------------- zijpaneel ---------------- */

.sidebar {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .07), transparent 38%),
    repeating-linear-gradient(135deg, rgba(0, 0, 0, .055) 0 2px, transparent 2px 7px),
    #3b3428;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-height: calc(100vh - 48px);   /* past met de onderbalk op één scherm; het paneel scrolt binnenin */
  box-shadow:
    inset 0 0 0 1px var(--bevel-light),
    inset 0 0 0 3px #2a241a,
    inset 0 2px 0 rgba(0, 0, 0, .35),
    0 0 0 1px #0e0c08;
}

/* OSRS-tabbladen: twee rijen vierkante icoontegels in een houten rand. */
.tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  flex: 0 0 auto;
  gap: 3px;
  padding: 5px 5px 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 22%),
    repeating-linear-gradient(90deg, #28231a 0 8px, #2d271d 8px 16px);
  border-bottom: 2px solid #0e0c08;
  box-shadow: inset 0 0 0 1px #5a5040, inset 0 -2px 0 #17140f;
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 40px;
  padding: 3px;
  background:
    linear-gradient(180deg, #594b3a 0%, #453b2d 44%, #30291e 100%);
  border: 1px solid #0b0906;
  box-shadow:
    inset 1px 1px 0 #8a7657,
    inset -1px -1px 0 #17130e;
  color: #d8d0bd;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000;
}

.tab:hover {
  background:
    linear-gradient(180deg, #6a5a43 0%, #514534 44%, #372f22 100%);
}

.tab.active {
  background:
    linear-gradient(180deg, #8b7651 0%, #6e5b3f 45%, #493b28 100%);
  color: var(--yellow);
  box-shadow:
    inset 0 0 0 1px #ffd76a,
    inset 2px 2px 0 rgba(255, 255, 255, .2),
    inset -2px -2px 0 rgba(0, 0, 0, .45),
    0 0 7px rgba(255, 214, 90, .2);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -1px;
  height: 2px;
  background: var(--yellow);
  box-shadow: 0 0 5px rgba(255, 255, 0, .55);
}

/* nog niet ontdekte tabbladen: gedimd, met een klein slotpunt */
.tab.locked .tab-icon { opacity: .28; filter: grayscale(1); }
.tab.locked .tab-label { opacity: .35; }
.tab.locked::before {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0b0906;
  box-shadow: 0 0 0 1px #b9a678;
}

.tab.just-unlocked { animation: tab-unlock 1.1s ease-in-out 2; }
@keyframes tab-unlock {
  0%, 100% { box-shadow: inset 1px 1px 0 #8a7657, inset -1px -1px 0 #17130e; }
  50% { box-shadow: inset 0 0 0 2px #ffd873, 0 0 10px rgba(255, 216, 115, .6); }
}

.tab:focus-visible {
  outline: 1px solid #ffe58a;
  outline-offset: -3px;
}

.tab-icon {
  display: block;
  width: 27px;
  height: 27px;
  image-rendering: pixelated;
  pointer-events: none;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .7));
}

.tab.active .tab-icon {
  filter: drop-shadow(0 0 3px rgba(255, 226, 120, .55)) drop-shadow(1px 1px 0 #000);
}

/* De naam van een icoontegel verschijnt als perkamenten label bij hover en
   toetsenbordfocus; voor schermlezers is hij altijd aanwezig. */
.tab-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  z-index: 40;
  padding: 2px 6px;
  font-size: 9.5px;
  font-weight: bold;
  line-height: 1.3;
  letter-spacing: .2px;
  white-space: nowrap;
  color: #2e2314;
  background: linear-gradient(180deg, #f4e4bb 0%, #e0c795 100%);
  border: 1px solid #6d4a24;
  box-shadow:
    inset 0 0 0 1px #fbf0d4,
    0 2px 0 rgba(0, 0, 0, .45);
  text-shadow: 0 1px 0 rgba(255, 249, 229, .6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tab:hover .tab-label,
.tab:focus-visible .tab-label {
  opacity: 1;
  visibility: visible;
}

/* hoverend tabblad boven de tegels en het paneel laten uitkomen */
.tab:hover,
.tab:focus-visible {
  z-index: 6;
}

.panel {
  position: relative;
  padding: 6px;
  flex: 0 1 auto;          /* niet oprekken: de optieknoppen horen direct onder het paneel */
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 90px),
    #2d281e;
  box-shadow: inset 0 0 0 1px #514635, inset 0 0 14px rgba(0, 0, 0, .28);
  scrollbar-width: thin;
  scrollbar-color: #6b5d45 #201c15;
}
.panel::-webkit-scrollbar { width: 8px; }
.panel::-webkit-scrollbar-track { background: #201c15; }
.panel::-webkit-scrollbar-thumb { background: #6b5d45; }

.panel-title {
  display: block;
  margin: -1px -1px 6px;
  padding: 4px 6px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: #ffe28a;
  background:
    linear-gradient(180deg, #5b4b36 0%, #3c3225 55%, #2a2319 100%);
  border: 1px solid #0b0906;
  box-shadow: inset 0 1px 0 #8b7657, inset 0 -1px 0 #17130e;
  text-shadow: 1px 1px 0 #000;
}

/* ---------------- uitrusting ---------------- */

.equip-line {
  font-size: 10px;
  color: #d8d0bd;
  background: var(--panel-dark);
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  padding: 3px 5px;
  margin-bottom: 4px;
}
.equip-line b { color: var(--yellow); }

/* aanvalsstijl: vier knoppen waarmee je kiest welke vaardigheid XP krijgt */
.style-box { margin-bottom: 5px; }
.style-label {
  font-size: 10px;
  color: #d8d0bd;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
}
.style-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.style-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 2px 3px;
  font: inherit;
  font-size: 10px;
  color: #d8d0bd;
  background: #3a3327;
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -2px 0 rgba(0, 0, 0, .35);
  cursor: pointer;
  line-height: 1.15;
}
.style-btn .name { font-weight: 700; }
.style-btn .sub { font-size: 9px; color: #a89c80; }
.style-btn:hover { background: #4a4133; }
.style-btn.active { background: #6b5a33; color: #fff3cf; }
.style-btn.active .sub { color: #e2c789; }
.style-btn.active .name { text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }

/* wapenkeuze: al je gesmede, gekochte en veroverde wapens naast elkaar */
.weapon-row { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 5px; }
.weapon-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px 2px 2px;
  font: inherit;
  font-size: 9px;
  color: #d8d0bd;
  background: #3a3327;
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -2px 0 rgba(0, 0, 0, .35);
  cursor: pointer;
}
.weapon-btn .icon { width: 18px; height: 18px; image-rendering: pixelated; }
.weapon-btn .wname { white-space: nowrap; }
.weapon-btn:hover { background: #4a4133; }
.weapon-btn.active { background: #6b5a33; color: #fff3cf; }
.weapon-btn.active .wname { text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }

.skill-note {
  font-size: 10px;
  color: #a89c80;
  margin: -2px 0 5px;
}

/* gloedkeuze in de smidse: een rij gekleurde knoppen boven de uitrusting */
.glow-pick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 6px;
}

.glow-pick-label {
  font-size: 10px;
  color: #a89c80;
  margin-right: 2px;
}

.glow-pick {
  font-family: inherit;
  font-size: 10px;
  font-weight: bold;
  color: #1b1710;
  padding: 2px 6px;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .35);
  cursor: pointer;
}

.glow-pick:hover { filter: brightness(1.12); }
.glow-pick.on { outline: 2px solid #fff3cf; outline-offset: -3px; }

.skill-note.pijlen-note { color: #cbbf9c; }
.skill-note.pijlen-note.leeg { color: #ff8a72; }

/* ---------------- gebedslijst ---------------- */

.prayer-list {
  display: grid;
  gap: 4px;
  margin: 0 0 6px;
}

.prayer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name req"
    "effect req";
  gap: 1px 8px;
  padding: 5px 8px;
  font: inherit;
  font-size: 11px;
  text-align: left;
  color: #d8d0bd;
  background: #3a3327;
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -2px 0 rgba(0, 0, 0, .35);
  cursor: pointer;
}

.prayer-row .p-name { grid-area: name; font-weight: 700; line-height: 1.2; }
.prayer-row .p-effect { grid-area: effect; font-size: 9.5px; color: #a89c80; }
.prayer-row .p-req { grid-area: req; align-self: center; font-size: 9.5px; color: #c8b48a; }
.prayer-row:hover { background: #4a4133; }
.prayer-row.on { background: #6b5a33; color: #fff3cf; }
.prayer-row.on .p-effect { color: #e2c789; }
.prayer-row.on .p-req { color: #ffe14d; }
.prayer-row.locked { opacity: .42; cursor: not-allowed; }
.prayer-row.locked:hover { background: #3a3327; }

.minimap-orb.burning {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 0 0 1px #ffe14d, 0 0 9px rgba(255, 215, 90, .6);
}

.gear-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin-bottom: 4px;
}

.gear-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: var(--slot);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #5a5040, inset -1px -1px 0 #17140f;
  cursor: pointer;
  font-family: inherit;
  color: #8b8474;
  font-size: 13px;
  font-weight: bold;
  padding: 0;
}

.gear-slot:hover { background: #4a4133; }
.gear-slot.has .icon {
  width: 80%;
  height: 80%;
  max-width: 34px;
  max-height: 34px;
  image-rendering: pixelated;
  pointer-events: none;
}
.gear-slot .gear-tag {
  position: absolute;
  left: 1px;
  bottom: 0;
  font-size: 7px;
  font-weight: bold;
  color: #c9bfa6;
  text-shadow: 1px 1px 0 #000;
  pointer-events: none;
}

.equip-tools {
  background: var(--panel-dark);
  border: 1px solid #000;
  padding: 2px 5px 3px;
  margin-bottom: 5px;
  font-size: 10px;
  color: #c9bfa6;
}

.tool-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  line-height: 1.5;
}

.tool-row b { color: var(--yellow); }
.tool-row.none b { color: #ff9d8e; }

.tool-kind { min-width: 46px; color: #a9a08c; }
.tool-detail { margin-left: auto; font-size: 9.5px; color: #9c937f; }

/* ---------------- inventaris ---------------- */

.inv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.slot {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: var(--slot);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #5a5040, inset -1px -1px 0 #17140f;
  cursor: pointer;
}

.slot:hover { background: #4a4133; }

/* weggooi-stand: elk gevuld vak krijgt een rode rand, zodat je niet per ongeluk eet */
.slot.dropping { box-shadow: inset 0 0 0 2px #a33b2e; }
.slot.dropping:hover { background: #5a3a30; }

.save-row .skill-note { margin: 0; align-self: center; }

.slot.empty { cursor: default; background: var(--slot-deep); }
.slot.empty:hover { background: var(--slot-deep); }

/* het icoon volgt het vak, met lucht rondom en 40px als plafond; zo raakt
   het op smalle schermen de rand niet en blijft het in het kader */
.slot .icon {
  width: 82%;
  height: 82%;
  max-width: 40px;
  max-height: 40px;
  image-rendering: pixelated;
  pointer-events: none;
}

.slot .qty {
  position: absolute;
  right: 1px;
  top: 0;
  font-size: 9px;
  font-weight: bold;
  color: var(--yellow);
  text-shadow: 1px 1px 0 #000, 0 0 2px #000;
  pointer-events: none;
}

/* ---------------- bank ---------------- */

.bank-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.bank-grid .slot .icon { max-width: 30px; max-height: 30px; }

.bank-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 4px 0 5px;
}

.bank-tabs .mini-btn {
  padding: 3px 6px;
  font-size: 10px;
}

.panel-hint {
  margin-top: 5px;
  font-size: 10px;
  color: #b3aa95;
  line-height: 1.4;
}

/* ---------------- vaardigheden ---------------- */

.skill-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  padding: 3px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.skill-badge {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.skill-icon {
  display: block;
  width: 24px;
  height: 24px;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .55));
}

.skill-name { font-size: 10.5px; color: #e7dfcc; }

.skill-progress {
  grid-column: 2 / 4;
  height: 3px;
  background: #17140f;
  border: 1px solid #000;
  margin-top: -1px;
}
.skill-progress i {
  display: block;
  height: 100%;
  background: #e0b52c;
}

.skill-level {
  font-size: 11px;
  font-weight: bold;
  color: var(--yellow);
  min-width: 20px;
  text-align: right;
}

.skills-total {
  margin-top: 6px;
  font-size: 10px;
  color: #c9bfa6;
  display: flex;
  justify-content: space-between;
}
.skills-total b { color: var(--yellow); }

/* ---------------- opdrachten ---------------- */

.quest-row {
  border: 1px solid #000;
  background: var(--panel-dark);
  box-shadow: inset 1px 1px 0 #5a5040;
  padding: 4px 5px;
  margin-bottom: 4px;
}

.quest-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 5px;
  font-size: 10.5px;
  color: var(--yellow);
}

.quest-row-count {
  font-size: 9.5px;
  font-weight: bold;
  color: #e7dfcc;
  white-space: nowrap;
}

.quest-row-desc {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.35;
  color: #c9bfa6;
}

.quest-row-meta {
  margin-top: 3px;
  font-size: 9px;
  color: #a49a85;
}

.quest-row.done { border-color: #2f5b1c; background: #26331c; }
.quest-row.done .quest-row-count { color: var(--green); }
.quest-row.locked { opacity: .55; }

/* het ene hoofddoel bovenaan het Taken-paneel */
.goal-card {
  border-color: #6d5836;
  background: linear-gradient(180deg, #3a2f20 0%, #241d14 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 216, 115, .22), inset 1px 1px 0 #6a5a3c;
}
.goal-kicker {
  font-size: 8.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--yellow);
  opacity: .85;
  margin-bottom: 2px;
}
.goal-card .quest-row-head b { font-size: 11.5px; }
.goal-track {
  height: 6px;
  margin: 4px 0 3px;
  background: #14100b;
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.goal-track i {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, #ffe9a0, #c99a3c);
}
.goal-actions {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}

/* weerstenen: het reispaneel met de bekende en onbekende stenen */
.travel-here { border-left: 2px solid #3d6a76; }
.travel-here.ready { border-left-color: #63dcff; color: #d8f4fb; }
.travel-row.known { border-color: #2f5b6b; background: #1d2a2b; }
.travel-row.known .quest-row-count { color: #8fe2f4; }
.travel-row .goal-actions { margin-top: 4px; }

/* save-slots in het inventarispaneel */
.slot-list { display: flex; flex-direction: column; gap: 3px; margin: 3px 0 4px; }
.slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 5px;
  background: var(--panel-dark);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #5a5040;
}
.slot-row.active { border-color: #6b5c43; background: #33302a; }
.slot-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.slot-info b { font-size: 10.5px; color: var(--yellow); }
.slot-info span { font-size: 9.5px; color: #c9bfa6; }
.slot-acts { display: flex; align-items: center; gap: 3px; flex: none; }
.slot-now { font-size: 9px; font-weight: bold; color: var(--green); text-transform: uppercase; }

.save-row {
  display: flex;
  gap: 3px;
  margin: 3px 0 4px;
}

.save-textarea {
  width: 100%;
  min-height: 60px;
  margin-bottom: 4px;
  padding: 3px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.35;
  color: #e7dfcc;
  background: #201c15;
  border: 1px solid #000;
  resize: vertical;
}

.save-code {
  min-height: 52px;
  height: 52px;
  font-size: 9px;
  word-break: break-all;
}

/* ---------------- winkel ---------------- */

.shop-head {
  background: var(--panel-dark);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #5a5040;
  padding: 4px 5px;
  font-size: 10px;
  color: #c9bfa6;
  margin-bottom: 5px;
  line-height: 1.45;
}
.shop-head b { color: var(--yellow); }

.shop-section {
  font-size: 10px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 7px 0 3px;
  text-shadow: 1px 1px 0 #000;
}

.shop-sub {
  margin: 4px 0 2px;
  font-size: 9px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #a9a08c;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  padding-bottom: 1px;
}

.shop-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  padding: 2px 3px 2px 1px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

/* ook in de winkel- en smederijrijen volgt het icoon zijn vak (de 26px-kolom),
   met 22px als plafond; zo blijft het op elk venster binnen de rij */
.shop-row .icon {
  width: 84%;
  max-width: 22px;
  height: auto;
  justify-self: center;
  align-self: center;
  image-rendering: pixelated;
}

.shop-name {
  min-width: 0;
  font-size: 10.5px;
  color: #fff;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.shop-name small { display: block; color: #a9a08c; font-size: 9.5px; }

.shop-name .req {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  color: #a9a08c;
}

.shop-name .req.ok { color: #6be04c; }
.shop-name .req.miss { color: #ff8a72; }

.shop-price { color: var(--yellow); font-size: 10.5px; white-space: nowrap; }

.mini-btn {
  font-family: inherit;
  font-size: 9.5px;
  font-weight: bold;
  color: var(--text);
  background: #4a4133;
  border: 1px solid #000;
  border-top-color: var(--bevel-light);
  border-left-color: var(--bevel-light);
  padding: 2px 5px;
  cursor: pointer;
  white-space: nowrap;
  text-shadow: 1px 1px 0 #000;
}
.mini-btn:hover { background: #5a5040; }
.mini-btn:active { border-top-color: var(--bevel-dark); background: #38311f; }
.mini-btn:disabled { color: #8d8574; background: #332d22; cursor: not-allowed; }
.mini-btn.sell { background: #3d5133; }
.mini-btn.sell:hover { background: #4b6340; }

.side-foot {
  border-top: 1px solid #000;
  padding: 4px 5px;
  font-size: 9.5px;
  color: #b3aa95;
  line-height: 1.45;
}
.side-foot b { color: var(--yellow); }

/* onderste balk: perkamentstrip met koperen omlijsting */
.foot {
  margin-top: 4px;
  padding: 5px 10px;
  text-align: center;
  font-size: 9.5px;
  color: #3c2b16;
  letter-spacing: .3px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .35), transparent 70%),
    repeating-linear-gradient(90deg, rgba(120, 84, 40, .06) 0 7px, transparent 7px 14px),
    linear-gradient(180deg, #e7d3a6 0%, #d9c08d 70%, #cdb17c 100%);
  border: 2px solid #1d1409;
  box-shadow:
    inset 0 0 0 1px #f6e9c9,
    inset 0 0 0 3px #a86c34,
    inset 0 0 12px rgba(112, 74, 30, .18);
  text-shadow: 0 1px 0 rgba(255, 249, 229, .6);
}
.foot b { color: #6b3a12; }

/* ---------------- kleinere schermen ---------------- */

@media (max-width: 1080px) {
  .game { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 880px) {
  .game { grid-template-columns: 1fr; }
  .sidebar { min-height: 0; max-height: none; }
  .inv-grid { grid-template-columns: repeat(7, 1fr); }
  .chat-log { height: 84px; }
  .map-wrap { width: 144px; height: 144px; }
  .minimap canvas { width: 100%; height: 100%; }
  .xp-drops { top: 112px; }
  .hud-row { padding-right: 168px; }
  body { padding: 4px; }
  .viewport { aspect-ratio: 4 / 3; }
  .quest-chip, .safe-chip { margin-right: 150px; }
  .foot { margin-top: 3px; font-size: 9px; }
}

@media (pointer: coarse), (max-width: 880px) {
  body { -webkit-tap-highlight-color: transparent; }
  .btn { padding: 6px 9px; font-size: 11px; }
  .tab { padding: 7px 4px; min-height: 32px; font-size: 10px; }
  .mini-btn { padding: 5px 8px; font-size: 10.5px; min-height: 28px; }
  .shop-row { padding: 4px 1px; }
  .skill-row { padding: 6px 2px; }
  .quest-chip, .safe-chip { font-size: 9px; padding: 2px 4px; }
  .hover-label { display: none; }
  .save-row .mini-btn, .save-textarea { font-size: 11px; }
  .gear-slot { min-height: 34px; }
  .style-btn { font-size: 9.5px; padding: 3px 1px 2px; }
  .style-btn .sub { font-size: 8px; }
}

/* ---------------- mobiel: OSRS-layout (ronde minimap, 28 vakken, chatbalk) ---------------- */

@media (max-width: 620px) {
  html, body { height: 100%; overflow: hidden; }
  body { padding: 0; }
  .page {
    max-width: none;
    height: 100dvh;
    display: flex;
    flex-direction: column;
  }

  .game {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
  }
  .left { display: contents; }

  .viewport {
    order: 1;
    flex: 1 1 auto;
    min-height: 190px;
    max-height: none;
    aspect-ratio: auto;
    border-width: 0;
  }

  /* ronde minimap rechtsboven, met de orbs ernaast */
  .minimap {
    top: 4px;
    right: 4px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
  }
  .minimap-title { display: none; }
  .orb-col { gap: 5px; }
  .minimap-orb { width: 30px; height: 30px; }
  .minimap-orb b { font-size: 11px; }
  .map-wrap {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #0e0c08;
    box-shadow: 0 0 0 1px var(--bevel-light), 0 2px 7px rgba(0, 0, 0, .55);
    background: #16210f;
  }
  .minimap canvas {
    width: 100%;
    height: 100%;
    object-fit: fill;
    border: none;
    image-rendering: pixelated;
  }
  .compass {
    top: 3px;
    font-size: 10px;
    padding: 0 3px;
    background: rgba(0, 0, 0, .45);
  }

  .hud-row {
    padding: 3px 118px 3px 4px;
    gap: 3px;
  }
  .cb-chip, .quest-chip, .safe-chip {
    font-size: 9px;
    padding: 1px 4px;
    margin: 0;
  }
  .quest-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .xp-drops { top: 96px; right: 6px; }
  .boss-bar {
    top: 24px;
    left: 4px;
    transform: none;
    width: calc(100% - 118px);
  }
  .combat-hp {
    right: 4px;
    bottom: 24px;
    width: min(180px, 52%);
    padding: 3px 5px 4px;
  }
  .combat-hp-head { font-size: 9px; }
  .combat-hp-track { height: 10px; }
  .boss-warning {
    top: 104px;
    left: 4px;
    transform: none;
    width: calc(100% - 118px);
  }
  .daily-hud {
    top: 48px;
    left: 4px;
    transform: none;
    font-size: 9px;
  }
  .boss-warning b { font-size: 11px; }
  .boss-warning span { font-size: 9px; }

  /* inventaris met tabs, direct onder het speelveld */
  .sidebar {
    order: 2;
    flex: 0 0 auto;
    min-width: 0;
    max-height: 40dvh;
    min-height: 0;
    border-width: 2px 0 0;
  }
  .side-foot { display: none; }   /* op mobiel telt de ruimte voor het speelveld */
  .side-options { padding: 3px; gap: 2px; }
  .side-options .btn { font-size: 9.5px; padding: 6px 3px; min-height: 30px; }
  /* twee rijen van vijf icoontegels, net als de desktopzijbalk */
  .tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    padding: 4px;
  }
  .tab {
    min-width: 0;
    min-height: 36px;
    font-size: 9.5px;
    padding: 2px;
    white-space: normal;
  }
  .tab-icon { width: 24px; height: 24px; }
  .side-options .btn { font-size: 7.5px; }
  /* op mobiel eerst de 28 vakken, de uitrusting en knoppen scrollen eronder */
  .panel {
    padding: 4px;
    max-height: none;
    display: flex;
    flex-direction: column;
  }
  .panel > * { order: 2; flex: 0 0 auto; }
  .panel > .panel-title { order: 0; }
  .panel > .inv-grid { order: 1; }

  .inv-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
  }
  .slot { min-height: 0; }
  .slot .icon { max-width: 40px; max-height: 40px; }
  .slot .qty { font-size: 9.5px; }

  /* gesprek als balk onderaan */
  .chat {
    order: 3;
    flex: 0 0 auto;
    border-width: 2px 0 0;
  }
  .chat-log {
    height: 52px;
    font-size: 10.5px;
    line-height: 1.4;
    padding: 3px 5px;
  }
  .chat { padding-bottom: env(safe-area-inset-bottom); }
  .chat-tabs { gap: 1px; padding: 2px; }
  .chat-tab {
    font-size: 9.5px;
    padding: 4px 0;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .foot { display: none; }
  .hover-label { display: none; }
  .hover-label.show { display: block; }   /* wel even tonen bij een tik als doelnaam */
}

@media (max-width: 430px) {
  .map-wrap { width: 92px; height: 92px; }
  .minimap-orb { width: 26px; height: 26px; }
  .minimap-orb b { font-size: 10px; }
  .hud-row { padding-right: 126px; }
  .xp-drops { top: 142px; }
  .chat-log { height: 50px; }
  .tab { padding: 6px 4px; }
  .side-options .btn { font-size: 9px; padding: 6px 2px; }
}

/* ---------------- virtuele joystick ---------------- */
.joystick {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(18, 14, 9, .34);
  border: 2px solid rgba(226, 210, 170, .34);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .55);
  touch-action: none;
  z-index: 5;
  -webkit-user-select: none;
  user-select: none;
}
.joystick[hidden] { display: none; }
.joystick.active { background: rgba(40, 33, 21, .52); border-color: rgba(240, 222, 180, .6); }
.joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #6b5c43;
  border: 2px solid #241e14;
  box-shadow: inset 1px 1px 0 #8b7a5c, 0 2px 4px rgba(0, 0, 0, .45);
  pointer-events: none;
}
.joystick.active .joy-knob { background: #7d6b4e; }

/* ---------------- gesprekken met bewoners ---------------- */
.dialog {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  max-width: 560px;
  max-height: 62%;
  margin: 0 auto;
  padding: 7px 9px 8px;
  background: #332d21;
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 #5a5040, 0 3px 10px rgba(0, 0, 0, .5);
  color: #e7dfcc;
  font-size: 11px;
  line-height: 1.4;
  overflow-y: auto;
  z-index: 9;
}
.dialog[hidden] { display: none; }
.dialog-name {
  margin-bottom: 3px;
  font-size: 11.5px;
  font-weight: bold;
  color: var(--yellow);
}
.dialog-text { white-space: pre-line; margin-bottom: 6px; }
.dialog-options { display: flex; flex-direction: column; gap: 3px; }
.dialog-opt {
  font-family: inherit;
  font-size: 10.5px;
  text-align: left;
  color: #e7dfcc;
  background: #241f16;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #5a5040;
  padding: 5px 7px;
  cursor: pointer;
}
.dialog-opt:hover, .dialog-opt:focus { color: var(--yellow); background: #3a3224; outline: none; }

/* ---------------- instellingen ---------------- */
.opt-label {
  margin: 8px 0 3px;
  font-size: 10px;
  font-weight: bold;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.opt-row { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 3px; }
.mini-btn.active { background: #6b5c43; color: var(--yellow); }
.mini-btn.wide { width: 100%; margin-top: 2px; }
.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid #2a2419;
}
.key-name { font-size: 10px; color: #c9bfa6; }
.key-btn {
  min-width: 66px;
  font-family: inherit;
  font-size: 10px;
  font-weight: bold;
  color: var(--yellow);
  background: #2a2419;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #5a5040;
  padding: 4px 6px;
  cursor: pointer;
}
.key-btn.waiting { color: #ffb04a; background: #3a2f1e; }

/* ---------------- minder beweging: alleen fades, geen geschuif ---------------- */
.reduce-motion .track-toast.show { animation: rm-fade 3.8s linear forwards; }
.reduce-motion .levelup.show { animation: rm-fade 2.4s linear forwards; }
.reduce-motion .hitsplat { animation: rm-fade .85s linear forwards; }

/* ontwijken van een aangekondigde klap */
.hitsplat.dodge {
  color: #eafff0;
  font-size: 10px;
  letter-spacing: 0;
  animation-duration: 1.1s;
}
.hitsplat.dodge {
  --splat-hi: #a8f2b6;
  --splat-mid: #3a9455;
  --splat-lo: #164a2a;
  --splat-edge: #082514;
}

/* dubbele klap met het Koningsschild */
.hitsplat.crit {
  font-size: 14px;
  --splat-hi: #fff0b0;
  --splat-mid: #d99a26;
  --splat-lo: #7a4f0c;
  --splat-edge: #3a2304;
  filter: drop-shadow(0 0 3px rgba(255, 200, 80, .5));
}

/* kleurenblind-vriendelijk: rood/groen wordt blauw/oranje, met dezelfde vormen */
.colorblind .hitsplat {
  --splat-hi: #ffc978;
  --splat-mid: #b45a1c;
  --splat-lo: #5e2a0a;
  --splat-edge: #2a1204;
}
.colorblind .hitsplat.zero {
  --splat-hi: #bfe4ff;
  --splat-mid: #2f6cae;
  --splat-lo: #10294a;
  --splat-edge: #061426;
}
.colorblind .hitsplat.heal,
.colorblind .hitsplat.dodge {
  --splat-hi: #9fffe0;
  --splat-mid: #1d8c7c;
  --splat-lo: #0a3a33;
  --splat-edge: #04211c;
}
.colorblind .hitsplat.crit {
  --splat-hi: #fff1a8;
  --splat-mid: #c99516;
  --splat-lo: #6b4a04;
  --splat-edge: #332303;
}
.reduce-motion .xpdrop { animation: rm-fade 2.2s linear forwards; }
@keyframes rm-fade {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------------- personage samenstellen ---------------- */

.build-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  /* op brede schermen staat het paneel rechts, zodat je personage links in
     het speelveld zichtbaar blijft als je een kleur kiest */
  place-items: center end;
  padding: 16px max(16px, 5vw) 16px 16px;
  background: radial-gradient(circle at 34% 42%, rgba(12, 9, 5, .34), rgba(8, 6, 4, .8));
}

@media (max-width: 900px) {
  .build-screen { place-items: center; padding: 16px; }
}
.build-screen[hidden] { display: none; }

.build-panel {
  width: min(440px, 94vw);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #6b5d45 #201c15;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 70px),
    #2d281e;
  box-shadow:
    0 0 0 1px #514635,
    0 0 0 3px #17130e,
    0 18px 40px rgba(0, 0, 0, .7),
    inset 0 0 18px rgba(0, 0, 0, .35);
}
.build-panel .panel-title { margin: -1px -1px 8px; }

.build-hint {
  margin: 0 2px 8px;
  font-size: 10px;
  line-height: 1.45;
  color: #cfc4ab;
}

.build-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  border-top: 1px solid #1b1711;
}
.build-row:first-child { border-top: 0; }

.build-label {
  flex: 0 0 62px;
  width: 62px;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #ffe28a;
  text-shadow: 1px 1px 0 #000;
}

.build-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.swatch {
  width: 30px;
  height: 24px;
  padding: 0;
  cursor: pointer;
  background: #2b251b;
  border: 1px solid #0b0906;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 0 rgba(0, 0, 0, .35);
}
.swatch:hover { outline: 1px solid #c9b27a; }
.swatch.active {
  outline: 2px solid #ffe28a;
  box-shadow: 0 0 0 1px #000, 0 0 8px rgba(255, 214, 120, .5);
}
.swatch.bald {
  font-family: inherit;
  font-size: 8px;
  font-weight: bold;
  color: #cbbd9c;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.build-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.build-actions .btn {
  flex: 1;
  padding: 7px 8px;
}

/* ---------------- kaartbewerker (alleen ?editor=1) ---------------- */
.map-editor {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 120;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 7px 8px 8px;
  color: #d8d0bd;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 20%),
    #241f16;
  border: 1px solid #0b0906;
  box-shadow:
    inset 0 0 0 1px #5a5040,
    inset 0 0 0 3px #2a241a,
    0 6px 22px rgba(0, 0, 0, .55);
  font-size: 10px;
}
.map-editor[hidden] { display: none; }
.map-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--yellow);
  font-size: 11.5px;
}
.map-editor-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}
.map-editor-row > span {
  flex: 0 0 74px;
  color: #b9ae95;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 8.5px;
}
.map-editor-row select {
  flex: 1;
  min-width: 0;
  padding: 3px 4px;
  color: #e7dfcc;
  background: #17130e;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #3b3428;
  font: inherit;
}
.map-editor-status {
  margin-top: 5px;
  padding: 3px 5px;
  color: #cfeff8;
  background: #1d2a2b;
  border-left: 2px solid #63dcff;
  line-height: 1.35;
}
.map-editor-stats {
  margin: 4px 0;
  color: #a49a85;
  font-size: 9px;
}
.map-editor-json {
  width: 100%;
  box-sizing: border-box;
  padding: 4px;
  resize: vertical;
  color: #d8d0bd;
  background: #14100b;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #3b3428;
  font: 9.5px/1.35 ui-monospace, Menlo, Consolas, monospace;
}
.map-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 5px 0;
}
.map-editor-hint {
  color: #a49a85;
  font-size: 8.8px;
  line-height: 1.4;
}
@media (max-width: 720px) {
  .map-editor {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: 58vh;
  }
}
