* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  background: #17130e;
  color: #f0e2c0;
  font: 13px/1.35 Verdana, sans-serif;
  min-height: 100vh;
  display: grid;
  place-items: center;
  user-select: none;
}
/* Touch screens, in either layout: holding or dragging a finger is the game's,
   so the browser selects nothing, shows no callout and leaves the view still. */
body.touch { touch-action: manipulation; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body.touch input { -webkit-user-select: text; }
body.touch #game { touch-action: none; }

/* The hiscore lookup, a side panel down the right as in RuneLite. The game makes
   room for it where the window is wide enough. */
body.lookup-open { --side: 236px; padding-right: var(--side); }
body.full.lookup-open { padding-right: 0; }
body.full.lookup-open main { right: var(--side); }
@media (max-width: 900px) { body.lookup-open { --side: 0px; } }
#lookup { position: fixed; z-index: 8; top: 0; right: 0; bottom: 0; width: 236px; max-width: 100%; display: flex; flex-direction: column; gap: 8px; padding: 8px; overflow-y: auto; background: #282828; border-left: 2px solid #000; color: #d8d8d8; font: 12px/1.35 Verdana, sans-serif; }
#lookup[hidden] { display: none; }
/* A boss's page of the wiki, down the left, opened by right-clicking the boss. */
body.wiki-open { --wiki: 264px; padding-left: var(--wiki); }
body.full.wiki-open { padding-left: 0; }
body.full.wiki-open main { left: var(--wiki); }
@media (max-width: 900px) { body.wiki-open { --wiki: 0px; } }
#bosswiki { position: fixed; z-index: 8; top: 0; left: 0; bottom: 0; width: 264px; max-width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 8px; overflow-y: auto; background: #282828; border-right: 2px solid #000; color: #d8d8d8; font: 12px/1.35 Verdana, sans-serif; text-align: left; }
#bosswiki[hidden] { display: none; }
#bosswiki { scrollbar-width: thin; scrollbar-color: #5a5a5a #282828; }
@media (max-width: 1440px) { body.wiki-open:not(.full) { --wiki: 0px; } }
#bosswiki header { display: flex; align-items: center; justify-content: space-between; }
#bosswiki header b { color: #ff981f; font-size: 13px; }
#bosswiki button { font: inherit; color: #d8d8d8; background: #3c3c3c; border: 1px solid #121212; cursor: pointer; padding: 3px 8px; }
#bosswiki button:hover { background: #4a4a4a; color: #fff; }
#bosswikiBody { display: flex; flex-direction: column; gap: 3px; }
#bosswikiBody > * { flex: none; }
#bosswikiBody h4 { margin: 0; text-align: center; font-size: 14px; color: #fff; }
#bosswikiBody h5 { margin: 8px 0 2px; font-size: 12px; color: #ff981f; border-bottom: 1px solid #555; }
#bosswikiBody p { margin: 0; text-align: center; color: #a5a5a5; }
#bosswikiBody .boss-picture { align-self: center; width: 190px; height: 190px; background: radial-gradient(circle at 50% 65%, #6a5c40, #1e1e1e 75%); border: 1px solid #121212; }
.wiki-line { display: flex; justify-content: space-between; gap: 10px; padding: 3px 7px; background: #1e1e1e; }
.wiki-line span { flex: none; max-width: 55%; }
.wiki-line b { color: #fff; text-align: right; font-weight: normal; }
.wiki-line.stacked { display: block; }
.wiki-line.stacked span { max-width: none; }
.wiki-line.stacked b { display: block; text-align: left; }
.wiki-drop { display: flex; align-items: center; gap: 7px; padding: 2px 7px; background: #1e1e1e; }
.wiki-drop canvas { flex: none; width: 28px; height: 28px; }
.wiki-drop span { flex: 1; color: #fff; }
.wiki-drop b { flex: none; color: #ffd93f; font-weight: normal; }
#lookup header { display: flex; align-items: center; justify-content: space-between; }
#lookup header b { color: #ff981f; font-size: 13px; }
#lookup button { font: inherit; color: #d8d8d8; background: #3c3c3c; border: 1px solid #121212; cursor: pointer; padding: 3px 8px; }
#lookup button:hover { background: #4a4a4a; color: #fff; }
#lookupForm { display: flex; gap: 4px; }
#lookupName { flex: 1; min-width: 0; font: inherit; color: #fff; background: #1e1e1e; border: 1px solid #121212; border-bottom: 2px solid #ff981f; padding: 4px 6px; }
#lookupResult { display: flex; flex-direction: column; gap: 6px; }
#lookupResult h4 { margin: 0; text-align: center; font-size: 14px; color: #fff; }
#lookupResult p { margin: 0; text-align: center; color: #a5a5a5; }
.lookup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #1e1e1e; padding: 4px; }
.lookup-cell { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 0; cursor: help; }
.lookup-cell:hover { background: #3a3a3a; }
.lookup-cell canvas { width: 18px; height: 18px; }
.lookup-cell b { min-width: 18px; color: #fff; }
.lookup-cell b.master { color: #ffd93f; }
.lookup-line { display: flex; justify-content: space-between; padding: 4px 8px; background: #1e1e1e; }
.lookup-line b { color: #fff; }

main {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: #3e3529;
  border: 3px solid #5d5140;
}

#left { width: max(400px, min(960px, calc(100vw - 260px - var(--side, 0px)), calc((100vh - 256px) * 4 / 3))); }
#view { position: relative; }
#game { display: block; width: 100%; background: #000; cursor: pointer; }
/* Names and numbers sit exactly over the picture, which still takes the clicks. */
#hud { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#amount { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 6; padding: 10px 16px; background: #cbb98f; color: #1d160c; border: 3px solid #5d5140; text-align: center; font-weight: bold; }
#amount input { display: block; margin-top: 6px; width: 160px; text-align: center; }
body.full #amount { bottom: 200px; }
#panel.magic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: min-content; gap: 3px; }
#panel.magic button.prayer { height: 36px; border-radius: 6px; }
#panel.magic button.prayer.tele { grid-column: span 2; height: 30px; display: flex; align-items: center; gap: 4px; padding: 0 17px 0 3px; }
#panel.magic button.tele canvas { flex: none; width: 17px; height: 17px; }
#panel.magic button.tele i { position: static; font-size: 9px; line-height: 1.1; text-align: left; }
#panel.magic button.tele small { bottom: auto; }
#panel.inventory.alching { box-shadow: inset 0 0 0 2px #ffe135; }
#panel.alching .slot[data-slot] { cursor: crosshair; }
.doll .column { gap: 2px; }
.doll { padding: 0; }
#panel.equipment { padding: 4px 6px; gap: 2px; }
#panel.equipment .stats { padding: 3px 8px; gap: 0 8px; }
.doll .worn small { line-height: 11px; }
/* The warning before an update, just above the chat box. */
#update { position: absolute; left: 8px; bottom: 6px; z-index: 4; pointer-events: none; font-weight: bold; font-size: 14px; color: #ffff00; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000; }
body.full #update { bottom: 218px; } /* the chat box ends 212px up */
/* Prayers that are switched on, above the tabs. */
#praybar { flex: none; height: 42px; display: flex; justify-content: center; align-items: stretch; gap: 2px; padding: 2px; background: #2b251d; border: 2px solid #1e1a14; }
#praybar .none { align-self: center; font-size: 10px; color: #8f836a; }
#praybar button { position: relative; flex: 0 1 42px; min-width: 0; overflow: hidden; width: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; background: radial-gradient(circle, #fff3b0, #8a6d1c 75%); border: 1px solid #ffe135; border-radius: 4px; }
#praybar canvas { transform: scale(0.8); margin: -4px 0 -3px; }
#praybar small { font-size: 8px; line-height: 9px; font-weight: bold; color: #fff; text-shadow: 1px 1px 0 #000, -1px 0 0 #000; }
#praybar i { position: absolute; top: -2px; right: 2px; font-style: normal; font-size: 8px; color: #fff; text-shadow: 1px 1px 0 #000; }
button.prayer.chosen { border-color: #3dee55; box-shadow: inset 0 0 0 2px #3dee55; }
button.prayer.chosen::after { content: '✔'; position: absolute; left: 1px; bottom: -2px; color: #3dee55; font-size: 13px; text-shadow: 1px 1px 0 #000; }
#panel.prayer .choice { grid-column: 1 / -1; }
.recipes + .metals, .metals { display: flex; flex-wrap: wrap; gap: 3px; }
#fps { position: absolute; top: 4px; left: 8px; pointer-events: none; font-size: 11px; font-weight: bold; color: #6dff6d; text-shadow: 1px 1px 0 #000; }
#hover {
  position: absolute; top: 20px; left: 8px; pointer-events: none;
  font-weight: bold; text-shadow: 1px 1px 0 #000; color: #fff;
}
.target { color: #ffe135; }

#chat {
  height: 130px; overflow-y: auto; margin-top: 8px; padding: 6px 8px;
  background: #cbb98f; color: #1d160c; border: 2px solid #5d5140;
}
#chat .level { color: #00359e; font-weight: bold; }
#chat .bad { color: #a3120d; font-weight: bold; }

aside { width: 226px; display: flex; flex-direction: column; gap: 6px; }
#mapbox { position: relative; align-self: center; line-height: 0; }
#minimap { width: 192px; height: 192px; border-radius: 50%; border: 4px solid #6b5f4a; box-shadow: 0 0 0 2px #1e1a14; background: #1e1a14; cursor: pointer; }
#compass { position: absolute; top: -2px; left: -8px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; }
#compass canvas { width: 44px; height: 44px; }
#compass:hover { filter: brightness(1.2); }
.mapzoom { position: absolute; bottom: -2px; width: 24px; height: 24px; padding: 0; border-radius: 50%; font: bold 16px/1 Verdana, sans-serif; background: radial-gradient(circle at 35% 30%, #6d604c, #2a241b 75%); border: 2px solid #8a7a5c; box-shadow: 0 0 0 1px #1e1a14; }
#minout { left: -8px; }
#minin { right: -8px; }
.mapzoom:hover { filter: brightness(1.25); }

/* Round status buttons under the minimap. */
#orbs { display: flex; justify-content: center; gap: 4px; }
.orb {
  position: relative; width: 41px; height: 41px; padding: 0; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, #6d604c, #2a241b 75%);
  border: 3px solid #8a7a5c; box-shadow: 0 0 0 2px #1e1a14;
  display: grid; place-items: center;
}
.orb canvas { margin-bottom: 8px; filter: grayscale(0.8) brightness(0.8); }
.orb small { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: bold; text-shadow: 1px 1px 0 #000; }
button.orb.on { border-color: #ffe135; }
button.orb.on canvas { filter: none; }
#run.on { background: radial-gradient(circle at 35% 30%, #c9a52c, #5c4708 75%); }
#pvp.on { background: radial-gradient(circle at 35% 30%, #d0463a, #56100b 75%); }
#prayorb i { position: absolute; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 35% 20%, #8fe9ff, #176a8e 80%); opacity: 0.75; }
#prayorb canvas, #prayorb small { position: relative; }
#prayorb small { position: absolute; }
#prayorb.on { border-color: #8fe9ff; box-shadow: 0 0 6px 2px #8fe9ff; }
#prayorb canvas { filter: none; }
#hpbar { background: #2a0806; }
#hpbar i { position: absolute; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 35% 20%, #ff5a4e, #8e130d 80%); }
#hpbar span { position: relative; font-size: 9px; font-weight: bold; text-shadow: 1px 1px 0 #000; }

button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
.choice { background: #544734; border: 1px solid #1d160c; padding: 4px 6px; }
.choice:hover { background: #65563f; }
.choice.on { background: #7a2e22; }

.tabs { display: flex; gap: 1px; padding: 3px 2px 0; background: #2b251d; border: 2px solid #1e1a14; border-bottom: 0; margin-bottom: -6px; }
.tabs button {
  flex: 1; height: 36px; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(#5c5142, #40382c); border: 1px solid #1e1a14; border-bottom: 0; border-radius: 5px 5px 0 0;
}
.tabs button:hover { filter: brightness(1.15); }
.tabs button.on { background: linear-gradient(#9c3b2c, #6a2318); }
.tabs canvas { filter: drop-shadow(1px 1px 0 #00000080); }

/* Stone-coloured interface panel. */
#panel {
  height: 306px; overflow-y: auto; padding: 6px; align-content: start; display: grid; gap: 3px;
  background:
    radial-gradient(circle at 20% 30%, #ffffff0a 0 18%, transparent 40%),
    radial-gradient(circle at 80% 70%, #00000030 0 20%, transparent 45%),
    #4a4134;
  border: 2px solid #1e1a14; box-shadow: inset 0 0 0 2px #6b5f4a;
}
#panel.inventory { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(7, 40px); grid-auto-rows: min-content; gap: 1px; }
#panel.skills { grid-template-columns: repeat(3, 1fr); grid-auto-rows: min-content; gap: 2px; }
#panel.skills .wide { padding: 0; }
#panel.combat, #panel.equipment { grid-template-columns: 1fr; }
.wide { grid-column: 1 / -1; text-align: center; padding: 5px 0 2px; white-space: pre-wrap; }
.heading { color: #ff9a1f; font-weight: bold; }
#panel.inventory .slot { background: none; border: 0; border-radius: 3px; touch-action: none; }
#panel.inventory .slot:not(:disabled):hover { background: #ffffff18; }
#panel.inventory .slot:not(:disabled):active canvas { opacity: 0.55; }
#panel .slot canvas { filter: drop-shadow(1px 2px 0 #00000090); }
#window .slot.resale { border-color: #e0b23a; background: #e0b23a20; }
#window .slot.dear .price { color: #ff6a55; }
.slot.movable { cursor: grab; touch-action: none; }
#panel.inventory .slot.selected { background: #ffffff30; box-shadow: inset 0 0 0 2px #fff; }
#ghost { position: fixed; z-index: 15; width: 36px; height: 36px; margin: -18px 0 0 -18px; opacity: 0.8; pointer-events: none; }

.style { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 8px; text-align: left; padding: 5px 8px; background: #2e271d; border: 2px solid #1e1a14; }
.style canvas { width: 32px; height: 32px; }
.style b { display: block; font-size: 12px; }
.style small { font-size: 10px; color: #c9bb98; }
.style.on { background: #7a2e22; border-color: #ffe135; }

.doll { display: grid; grid-template-columns: 1fr 114px 1fr; align-items: center; justify-items: center; padding: 2px 0; }
.column { display: flex; flex-direction: column; gap: 4px; }
.column.middle { align-items: center; gap: 6px; }
.middle > canvas { width: 80px; height: 100px; background: radial-gradient(ellipse, #00000050, transparent 70%); }
.worn { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.worn small { font-size: 10px; color: #c9bb98; }
#panel .worn .slot { width: 34px; height: 34px; background: #2e271d; border: 2px solid #1e1a14; box-shadow: inset 0 0 0 1px #7d6e54; }
#panel .worn .slot:not(:disabled):hover { background: #45392a; }
.worn .slot.empty::after { content: ''; width: 18px; height: 18px; border: 2px dashed #7d6e5480; border-radius: 4px; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 8px; background: #2e271d; font-size: 11px; }
.stats dd { color: #ffe135; text-align: right; }

.slot {
  position: relative; height: 38px; display: grid; place-items: center;
  background: #ffffff0c; border: 1px solid #00000040;
}
.slot canvas { width: 32px; height: 32px; }
#window .slot canvas { width: 40px; height: 40px; }
.slot:not(:disabled):hover { background: #ffffff25; }
.qty { position: absolute; top: 0; left: 2px; font-size: 10px; color: #ffe135; text-shadow: 1px 1px 0 #000; }

#panel.tasks { grid-template-columns: 1fr; }
.task { position: relative; background: #2e271d; padding: 6px 6px 9px; display: grid; grid-template-columns: 1fr auto; gap: 3px 6px; align-items: center; }
.task b { color: #ffe135; font-size: 11px; }
.task span { font-size: 11px; text-align: right; }
.task small { font-size: 9px; color: #c9bb98; }
.task .choice { font-size: 9px; padding: 1px 5px; }
.task i { position: absolute; left: 0; bottom: 0; height: 3px; background: #39b54a; }

.skill, .total {
  position: relative; height: 41px; display: grid; place-items: center; padding: 0;
  background: linear-gradient(#4b4235, #383026);
  border: 1px solid #14100a; border-radius: 2px;
  box-shadow: inset 1px 1px 0 #7a6c52, inset -1px -1px 0 #241e16;
}
.skill:hover { background: linear-gradient(#5c5140, #463c2f); }
.skill.on { background: linear-gradient(#6a5a38, #4a3f28); box-shadow: inset 0 0 0 1px #ffe135; }


#tip {
  position: fixed; z-index: 12; padding: 4px 8px; pointer-events: none; font-size: 11px;
  background: #ffffa0; color: #000; border: 1px solid #000; white-space: nowrap;
}
#tip div { display: flex; justify-content: space-between; gap: 12px; }
/* Item details: dark, so that the colours stand out. */
#tip.item { background: #1d1710f5; color: #f0e2c0; border: 1px solid #8a7a5c; white-space: normal; max-width: 220px; padding: 5px 8px; }
#tip.item .name { color: #ff9a1f; font-weight: bold; }
#tip.item .good { color: #3dee55; font-weight: bold; }
#tip.item .waste { color: #ffd23f; }
#tip.item .bad { color: #ff6a55; }
#tip.item .note { color: #c9bb98; font-size: 10px; }

#panel.prayer { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: min-content; gap: 2px; }
#panel.prayer button.prayer { height: 36px; min-width: 0; }
.prayer { grid-auto-rows: min-content; }
button.prayer {
  position: relative; height: 44px; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: #2e271d; border: 1px solid #14100a; border-radius: 50%;
}
button.prayer:hover { background: #453a2a; }
button.prayer.on { background: radial-gradient(circle, #fff3b0, #b8942a 70%); border-color: #ffe135; }
button.prayer.locked canvas { filter: grayscale(1) brightness(0.45); }
/* The protections sit in square frames of their own colour, and fill with it when on. */
button.protect_melee { --ward: #ff4a38; --deep: #571009; }
button.protect_missiles { --ward: #45e052; --deep: #0c4413; }
button.protect_magic { --ward: #5c95ff; --deep: #10265e; }
button.prayer.protect { background: var(--deep); border: 2px solid var(--ward); border-radius: 6px; }
button.prayer.protect:hover { filter: brightness(1.25); }
button.prayer.protect.on { background: radial-gradient(circle, #ffffff, var(--ward) 75%); border-color: #fff; box-shadow: 0 0 7px 2px var(--ward); }
button.prayer.protect.locked { border-color: #6a6254; background: #2e271d; }
button.prayer.protect.chosen { border-color: #3dee55; }
#praybar button.protect { background: radial-gradient(circle, #ffffff, var(--ward) 75%); border: 2px solid #fff; }
button.prayer i { position: absolute; top: -1px; left: 0; right: 0; font-style: normal; font-size: 10px; line-height: 8px; color: #fff; text-shadow: 1px 1px 0 #000; }
button.prayer small { position: absolute; right: 3px; bottom: 0; font-size: 9px; color: #ffff00; text-shadow: 1px 1px 0 #000; }
.hint { font-size: 10px; color: #c9bb98; }
.buttons span { align-self: center; font-size: 11px; }
.guide { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.unlock { display: grid; grid-template-columns: 30px 34px 1fr; gap: 6px; align-items: center; padding: 3px 6px; background: #00000030; }
.unlock .at { text-align: center; font-weight: bold; color: #ffff00; text-shadow: 1px 1px 0 #000; }
.unlock canvas { width: 32px; height: 32px; }
.unlock b { display: block; font-size: 12px; color: #ffe135; }
.unlock small { font-size: 10px; color: #d8ccac; }
.unlock.locked { opacity: 0.5; }
.unlock.locked .at { color: #ff8a75; }
#window.reading { overflow: hidden; }

#window {
  position: absolute; inset: 8% 10%; overflow-y: auto; padding: 10px;
  background: #4a3f30f5; border: 3px solid #1d160c;
  display: flex; flex-direction: column; gap: 8px;
}
#window header { display: flex; justify-content: space-between; align-items: center; color: #ff9a1f; font-size: 15px; }
#window .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; flex: 1; align-content: start; }
#window .grid p { grid-column: 1 / -1; }
#window .slot { height: 50px; }
/* Lifted clear of the price, so that a potion's letters can still be read. */
#window .slot.priced canvas { transform: translateY(-7px); }
.price { position: absolute; bottom: 0; right: 2px; font-size: 9px; color: #fff; text-shadow: 1px 1px 0 #000; }

#menu { position: fixed; z-index: 10; min-width: 140px; background: #5d5140; border: 2px solid #000; white-space: nowrap; }
#menu .title { background: #000; color: #b8a57c; padding: 2px 6px; font-weight: bold; }
#menu .row { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 3px 6px; color: #fff; }
#menu .row:hover { background: #00000045; }

#chat .note { color: #5b4a22; font-style: italic; }
#chat .said { color: #00359e; }
#chat .crown { vertical-align: -2px; margin-right: 3px; }
/* The Wilderness level, bottom right of the view. */
#wild { position: absolute; right: 6px; bottom: 6px; z-index: 1; pointer-events: none; padding: 4px 10px; font-size: 13px; font-weight: bold; color: #ffe135; background: #3a0804cc; border: 2px solid #c8261a; border-radius: 4px; }
body.full #wild { right: 250px; }
/* Announcements: in the chat, and across the view for a few seconds. */
#chat .news { color: #8a1c00; font-weight: bold; background: #ffe68a80; }
#chat .news::before { content: '★ '; }
#chat .tidings { color: #8a1c00; }
#news { position: absolute; left: 50%; top: 122px; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; width: max-content; max-width: 86%; padding: 6px 18px 8px; pointer-events: none; text-align: center; background: linear-gradient(#3a2408ee, #1d1204ee); border: 2px solid #e0b23a; border-radius: 6px; box-shadow: 0 0 18px #e0b23a66; animation: news-in 0.35s ease-out; }
#news[hidden] { display: none; }
/* What a new level has opened up, along the bottom of the view. Click to put away. */
#levelup { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 5; width: min(420px, 92%); max-height: 62%; overflow-y: auto; padding: 8px 12px; text-align: center; cursor: pointer; color: #1d160c; background: #cbb98ff5; border: 3px solid #5d5140; border-radius: 6px; box-shadow: 0 4px 14px #000a; }
#levelup[hidden] { display: none; }
#levelup > b { display: block; font-size: 14px; color: #00359e; }
#levelup > small { display: block; margin: 3px 0 5px; font-size: 11px; }
#levelup .unlocked { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-top: 1px solid #5d514055; text-align: left; }
#levelup .unlocked canvas { flex: none; width: 30px; height: 30px; }
#levelup .unlocked b { display: block; font-size: 12px; }
#levelup .unlocked small { display: block; font-size: 10px; color: #4a3a1c; }
body.full #levelup { bottom: 224px; max-height: 50%; }
#news small { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: #e0b23a; }
#news b { font-size: 14px; color: #ffe135; text-shadow: 1px 1px 0 #000; }
@keyframes news-in { from { opacity: 0; margin-top: -14px; } to { opacity: 1; margin-top: 0; } }
@media (prefers-reduced-motion: reduce) { #news { animation: none; } }
.task small.bonus, .wide.bonus { color: #6dff6d; font-weight: bold; }
.wide.bonus { font-size: 11px; }
/* The tool belt, under the inventory. */
.belt { grid-column: 1 / -1; margin-top: 7px; padding-top: 4px; border-top: 2px solid #2b251d; }
.belt h4 { margin-bottom: 3px; text-align: center; font-size: 10px; color: #ff9a1f; }
.belt-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
#panel.inventory .belt .slot { min-width: 0; padding: 0; height: 34px; background: #2e271d; border: 1px solid #1d160c; box-shadow: inset 0 0 0 1px #7d6e5466; }
#panel.inventory .belt .slot:not(:disabled):hover { background: #45392a; }
.belt .slot.ghost canvas { opacity: 0.2; filter: grayscale(1); }
#panel .belt .slot.purse, .belt .slot.purse { background: #5a4414; box-shadow: inset 0 0 0 2px #d8b23a; }
/* Open windows cover whatever is pinned over the view. */
#window { z-index: 3; }
#window .grid .group { grid-column: 1 / -1; margin: 4px 0 0; padding-bottom: 1px; font-size: 11px; color: #ff9a1f; border-bottom: 1px solid #8f836a80; }
/* The pinned clue, just above the chat, and the Slayer count in the top corner. */
#cluetrack { position: absolute; left: 6px; bottom: 28px; z-index: 1; display: flex; gap: 8px; align-items: flex-start; max-width: min(360px, 70%); padding: 5px 8px; background: #000000b8; border: 1px solid #8a6d1c; border-radius: 4px; }
#cluetrack[hidden], #slayertrack[hidden], #cavetrack[hidden] { display: none; }
#cavetrack { position: absolute; top: 6px; right: 6px; z-index: 1; pointer-events: none; max-width: 55%; padding: 4px 10px; font-size: 12px; font-weight: bold; color: #ffb347; background: #000000c0; border: 1px solid #c8501c; border-radius: 4px; }
body.full #cavetrack { right: 250px; }
#cluetrack div { display: flex; flex-direction: column; gap: 2px; }
#cluetrack b { font-size: 11px; color: #ff9a1f; }
#cluetrack span { font-size: 12px; line-height: 1.35; color: #fff; }
#cluetrack button { flex: none; padding: 0 5px; color: #e8dcc0; background: #544734; border: 1px solid #1d160c; cursor: pointer; }
#slayertrack { position: absolute; top: 6px; right: 6px; z-index: 1; pointer-events: none; padding: 3px 9px; font-size: 12px; font-weight: bold; color: #ffe135; background: #000000a8; border: 1px solid #8a2e22; border-radius: 4px; }
body.full #cluetrack { bottom: 240px; left: 8px; }
body.full #slayertrack { right: 250px; }
#boosts span.divine { color: #b8fff0; }
/* The Barrows brothers, under the Slayer count if there is one. */
#barrowstrack { position: absolute; top: 34px; right: 6px; z-index: 1; pointer-events: none; min-width: 118px; padding: 5px 10px 6px; font-size: 12px; line-height: 1.4; background: #000000c0; border: 1px solid #8a6d1c; border-radius: 4px; }
#barrowstrack[hidden] { display: none; }
#slayertrack[hidden] ~ #barrowstrack { top: 6px; }
body.full #barrowstrack { right: 250px; }
#barrowstrack b { display: block; margin-bottom: 2px; font-size: 11px; color: #ff9a1f; }
#barrowstrack span { display: block; font-weight: bold; color: #fff; }
#barrowstrack span::before { content: '\2716'; display: inline-block; width: 16px; color: #ff5a48; }
#barrowstrack span.done { font-weight: normal; color: #78a878; text-decoration: line-through; }
#barrowstrack span.done::before { content: '\2714'; color: #5fe05f; }
#barrowstrack small { display: block; margin-top: 3px; font-size: 11px; color: #ffe135; }
.doll .pair { display: flex; gap: 4px; }
/* The monster wiki. */
#wikiFind { flex: none; width: 100%; box-sizing: border-box; }
.wiki-picture { float: right; width: 150px; height: 150px; margin: 0 0 6px 8px; background: radial-gradient(circle at 50% 65%, #8a7a58, #2e271d 75%); border: 1px solid #1d160c; }
.book-page .wiki-facts { width: auto; }
.book-page .wiki-facts th, .book-page .wiki-facts td { text-align: left; vertical-align: top; }
.book-page .wiki-facts th { border: 0; white-space: nowrap; }
.book-page .wiki-drops { clear: both; }
.book-page .wiki-drops th:nth-child(2), .book-page .wiki-drops td:nth-child(2) { text-align: right; white-space: nowrap; }
/* The special attack bar on the combat tab. */
.special { position: relative; grid-column: 1 / -1; flex: none; display: flex; flex-direction: column; align-items: center; padding: 3px 4px; overflow: hidden; background: #4a1a12; border: 2px solid #1d160c; }
.special i { position: absolute; left: 0; top: 0; bottom: 0; background: #2f8a2f; }
.special b, .special small { position: relative; text-shadow: 1px 1px 0 #000; }
.special b { font-size: 11px; color: #fff; }
.special small { font-size: 9px; color: #e8dcc0; }
.special.low i { background: #8a7a22; }
.special.on { border-color: #ffe135; }
.special.on b { color: #ffe135; }
/* Hiscores, logs and patch notes. */
#panel.records { display: flex; flex-direction: column; gap: 5px; padding: 6px; }
#panel.records .record { flex: none; display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 7px 9px; background: #544734; border: 1px solid #1d160c; }
#panel.records .record:hover { background: #65563f; }
#panel.records .record.on { background: #7a2e22; }
#panel.records b { color: #ff9a1f; font-size: 12px; }
#panel.records small { font-size: 10px; color: #e8dcc0; }
#window.book { inset: 2% 3%; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.book-body { display: flex; gap: 8px; flex: 1; min-height: 0; }
.train-step { display: flex; flex-direction: column; gap: 1px; margin: 4px 0; padding: 4px 8px; background: #00000030; border-left: 3px solid #8f836a; }
.train-step b { font-size: 12px; color: #ffe135; }
.train-step small { font-size: 11px; color: #e8dcc0; }
.train-step.here { background: #7a2e2266; border-left-color: #ffe135; }
.train-step.done { opacity: 0.55; }
.book-page .train-note { font-size: 10px; color: #b8ac90; }
.book-list { flex: none; width: 150px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.book-list .choice { flex: none; display: flex; align-items: center; gap: 6px; text-align: left; font-size: 12px; padding: 3px 6px; }
.book-list .choice.none { color: #ff6a55; }
.book-list .choice.some { color: #ffe135; }
.book-list .choice.all { color: #4fe04f; }
.book-page { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px; background: #00000030; border: 1px solid #1d160c; }
.book-page h3 { margin: 4px 0; color: #ff9a1f; font-size: 14px; }
.book-page .notes-link { color: #ffe135; }
.buttons .notes-link { margin-left: auto; align-self: center; padding: 0 6px; color: #ffe135; font-size: 12px; }
.book-page p { margin: 4px 0; }
.book-page ul { margin: 2px 0 10px; padding-left: 18px; font-size: 12px; line-height: 1.5; }
.book-page .new { margin-left: 8px; padding: 0 6px; font-size: 10px; color: #000; background: #ffe135; border-radius: 3px; }
.book-page table { width: 100%; border-collapse: collapse; font-size: 12px; }
.book-page th { text-align: left; color: #ff9a1f; border-bottom: 1px solid #8f836a; }
.book-page th, .book-page td { padding: 2px 6px; }
.book-page th:nth-child(n+3), .book-page td:nth-child(n+3) { text-align: right; }
.book-page tr:nth-child(even) td { background: #ffffff0a; }
.book-page tr.place1 td { color: #ffd93f; font-weight: bold; }
.book-page tr.place2 td { color: #dfe6ee; font-weight: bold; }
.book-page tr.place3 td { color: #e09a5a; font-weight: bold; }
.book-page tr.me td { background: #7a2e2299; }
.book-page tr.unfound td { color: #8f836a; }
#window .book-page .grid { margin-top: 6px; }
#window .slot.unfound canvas { opacity: 0.25; filter: grayscale(1); }
/* What potions are adding, in the top corner of the view. */
#boosts { position: absolute; left: 6px; top: 42px; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; max-width: 70%; pointer-events: none; }
#boosts[hidden] { display: none; }
#foe { position: absolute; left: 6px; top: 22px; z-index: 1; min-width: 176px; white-space: nowrap; padding: 4px 7px 5px; pointer-events: none; background: #3e3529e8; border: 2px solid #1e1a14; border-radius: 3px; box-shadow: inset 0 0 0 1px #7d6e54; }
#foe[hidden] { display: none; }
#foe b { display: block; margin-bottom: 3px; text-align: center; font-size: 12px; color: #fff; text-shadow: 1px 1px 0 #000; }
#foe .bar { position: relative; height: 17px; background: #8e130d; border: 1px solid #000; }
#foe .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #1f8a2a; }
#foe .bar span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 17px; font-weight: bold; color: #fff; text-shadow: 1px 1px 0 #000; }
#foe small { display: block; margin-top: 3px; text-align: center; font-size: 10px; color: #ffe135; }
#foe:not([hidden]) ~ #boosts { top: 104px; }
#boosts span { padding: 2px 6px; font-size: 11px; font-weight: bold; color: #6dff6d; background: #000000a8; border: 1px solid #2f6b2f; border-radius: 4px; }
#boosts span.drained { color: #ff7b6b; border-color: #8a2e22; }
#boosts span.poisoned { color: #d8ffd0; background: #0f4a12dd; border-color: #39d83f; }
#boosts span.immune { color: #bfe6ff; border-color: #2f6b9a; }
#hpbar.poisoned #hpfill { background: #1f9e22; }
.skill.boosted { outline: 2px solid #4fe04f; outline-offset: -2px; }
#chatForm input { width: 100%; margin-top: 4px; }
input {
  font: inherit; padding: 5px 7px; user-select: text;
  background: #efe3c4; color: #1d160c; border: 2px solid #5d5140;
}
#online { align-self: center; padding: 0 6px; text-align: center; color: #ffe135; font-size: 11px; background: none; border: 0; cursor: pointer; }
#online:hover { color: #fff; text-decoration: underline; }
/* Who is online, dropped from the line that counts them. */
#onlinebox { position: fixed; z-index: 9; width: 220px; max-height: min(340px, calc(100vh - 8px)); display: flex; flex-direction: column; gap: 6px; padding: 8px; background: #3e3529; border: 3px solid #1d160c; box-shadow: inset 0 0 0 2px #6b5f4a, 0 4px 14px #000a; }
#onlinebox[hidden] { display: none; }
#onlinebox header { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #ff9a1f; font-size: 12px; }
#onlinebox header .choice { padding: 0 8px; }
#onlinebox ul { min-height: 0; overflow-y: auto; list-style: none; display: flex; flex-direction: column; gap: 2px; }
#onlinebox li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 6px; background: #2e271d; }
#onlinebox .who { display: flex; flex-direction: column; min-width: 0; }
#onlinebox .who b { color: #3dee55; font-size: 12px; }
#onlinebox small, #onlinebox p { font-size: 10px; color: #c9bb98; }
#onlinebox li .choice { flex: none; font-size: 11px; }
/* Private messages, in blue over the view just above the chatbox. */
#pmbox { position: absolute; left: 8px; bottom: 26px; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; max-width: calc(100% - 16px); pointer-events: none; }
#pmbox[hidden] { display: none; }
#pmbox button { padding: 0; text-align: left; font-size: 13px; font-weight: bold; line-height: 1.35; color: #00ffff; background: none; border: 0; pointer-events: auto; cursor: pointer; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000; overflow-wrap: anywhere; }
#pmbox button:hover { color: #fff; }
#pmbox .crown, #chat .crown { vertical-align: -2px; margin-right: 3px; }
#cluetrack:not([hidden]) ~ #pmbox { bottom: 92px; }
body.full #pmbox { bottom: 238px; max-width: min(520px, calc(100% - 260px)); }
body.full #cluetrack:not([hidden]) ~ #pmbox { bottom: 306px; }
#chat button.pm { display: block; width: 100%; padding: 0; text-align: left; font-size: inherit; color: #00569c; background: none; border: 0; cursor: pointer; overflow-wrap: anywhere; }
#chat button.pm[hidden] { display: none; }
#chatForm.private #chatName { color: #00569c; cursor: pointer; }
#chatForm.private input { color: #00569c; border-color: #00569c; }
#banner {
  position: absolute; top: 6px; left: 6px; z-index: 5; padding: 5px 10px;
  background: #000; border: 1px solid #fff; line-height: 0;
}
#banner canvas { image-rendering: pixelated; }

#auth { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: #17130ef2; padding: 16px; }
#authForm {
  width: min(320px, 100%); display: flex; flex-direction: column; gap: 10px;
  padding: 20px; background: #3e3529; border: 3px solid #5d5140;
}
#authForm h1 { text-align: center; color: #ff9a1f; font-size: 24px; }
#authForm h2 { text-align: center; font-size: 14px; }
#authForm label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
#authForm .choice { padding: 8px; }
#note { font-size: 11px; color: #c9bb98; }
#error { min-height: 1.35em; text-align: center; color: #ff8a75; font-size: 12px; }
.link { background: none; border: 0; color: #ffe135; text-decoration: underline; }

#footer {
  height: 306px; display: flex; flex-direction: column; gap: 8px; padding: 14px;
  background: #4a4134; border: 2px solid #1e1a14; box-shadow: inset 0 0 0 2px #6b5f4a;
  overflow-y: auto;
}
#footer > * { flex: none; }
#footer .choice { padding: 9px; }
#soundRow { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: 12px; background: #2e271d; border: 1px solid #1d160c; padding: 8px; }
#soundRow b { color: #ffe135; }
#soundRow input { grid-column: 1 / -1; width: 100%; padding: 0; border: 0; background: none; accent-color: #e0b23a; cursor: pointer; }
.slot.offered canvas, .slot.offered .qty { opacity: 0.25; }
#chat button { color: #fff; font-size: 11px; padding: 0 8px; }
.offers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1; }
.offers section { display: flex; flex-direction: column; gap: 5px; min-width: 0; background: #00000030; padding: 6px; }
.offers h3 { font-size: 12px; color: #ffe135; text-align: center; }
.offers .grid, .offers .list { flex: 1; }
.offers .list { white-space: pre-line; text-align: center; overflow-y: auto; }
.offers small { text-align: center; color: #c9bb98; font-size: 10px; }
#window .warning { color: #ff8a75; font-weight: bold; text-align: center; }
#window .warning:empty { display: none; }
#window .status { text-align: center; }
.buttons { display: flex; gap: 8px; justify-content: center; }
/* The bank's title and Close button are held to the top edge. */
#window > header.top { position: sticky; top: -10px; z-index: 2; margin: -10px -10px 0; padding: 10px 10px 6px; background: #4a3f30; border-bottom: 1px solid #8f836a80; }
/* Held to the bottom edge of the window, over whatever scrolls beneath it. */
#window > .buttons.foot { flex-wrap: wrap; position: sticky; bottom: -10px; z-index: 2; margin: 0 -10px -10px; padding: 8px 10px 10px; background: #4a3f30; border-top: 1px solid #8f836a80; }
.buttons .choice { min-width: 110px; padding: 6px; }
.choice.yes { background: #23662b; }
.choice.yes:disabled { background: #3a4a36; color: #9aa88f; }

.parchment {
  background: radial-gradient(ellipse at 50% 40%, #f1e2b4, #cfb77c); color: #2b1d0a; text-align: center;
  padding: 18px 20px; border: 3px solid #7a5a28; border-radius: 6px; box-shadow: inset 0 0 18px #7a5a2880;
}
.parchment p { font-size: 14px; font-weight: bold; }
.parchment small { display: block; margin-top: 8px; font-size: 11px; color: #6a4a1c; }
/* Clue scrolls: a roll of parchment top and bottom, and an old hand. */
.parchment.scroll { position: relative; margin: 16px 12px; padding: 26px 22px; font-family: Georgia, 'Times New Roman', serif; border-radius: 2px; border-width: 0 3px; }
.parchment.scroll::before, .parchment.scroll::after { content: ''; position: absolute; left: -12px; right: -12px; height: 13px; border-radius: 7px; background: linear-gradient(#f4e6bc, #c3a463 55%, #7a5a28); border: 1px solid #4a3414; }
.parchment.scroll::before { top: -9px; }
.parchment.scroll::after { bottom: -9px; }
.parchment.scroll p { font-size: 16px; line-height: 1.5; }
.parchment.scroll small { font-size: 12px; }
.parchment .loot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px auto 4px; }
.parchment .loot .slot { flex: none; width: 46px; height: 46px; background: #5c4a2c; border: 2px solid #7a5a28; border-radius: 3px; }
#chat .server { color: #5b4a22; font-style: italic; }
/* "Name:" beside the chat box, and the filter buttons under it. */
#chatForm { display: flex; gap: 4px; align-items: stretch; }
#chatName { flex: none; display: flex; align-items: center; margin-top: 4px; padding: 0 9px; font-weight: bold; color: #1d160c; background: #cbb98f; border: 2px solid #5d5140; white-space: nowrap; }
#chatForm input { flex: 1; min-width: 0; }
#chatTabs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
#chatTabs button { flex: 1 0 auto; padding: 3px 7px; font-size: 11px; font-weight: bold; cursor: pointer; color: #9a8f76; background: linear-gradient(#5a4e3a, #3e3529); border: 2px solid; border-color: #8a7a5c #1e1a14 #1e1a14 #8a7a5c; border-radius: 3px; }
#chatTabs button.on { color: #ffe135; background: linear-gradient(#241d12, #3a2f1e); border-color: #120e08 #8a7a5c #8a7a5c #120e08; box-shadow: inset 0 2px 5px #000a; }
#chatTabs button:hover { filter: brightness(1.2); }
#window > .column { align-items: stretch; gap: 5px; }
#window > .column .choice:disabled { background: #3a4a36; color: #9aa88f; }

.recipes { display: flex; flex-direction: column; gap: 4px; }
.recipe { display: grid; grid-template-columns: 50px 1fr auto auto auto auto; gap: 6px; align-items: center; background: #00000030; padding: 3px 6px 3px 3px; }
.recipe b { display: block; font-size: 12px; color: #ffe135; }
.recipe small { font-size: 10px; color: #c9bb98; }
.recipe .choice { min-width: 32px; }
.belt .slot canvas { max-width: 100%; height: auto; }
.recipe.locked { opacity: 0.55; }
#window .recipe .slot { height: 44px; }

/* Full-window view: the game fills the browser and the interface floats on top. */
body.full { display: block; overflow: hidden; }
body.full main { position: fixed; inset: 0; width: auto; padding: 0; border: 0; background: #000; }
body.full #left, body.full #view { position: absolute; inset: 0; width: auto; }
body.full #game { width: 100%; height: 100%; }
body.full #chat, body.full #chatForm, body.full #chatTabs { position: absolute; left: 8px; width: min(520px, calc(100% - 250px)); }
body.full #chat { bottom: 72px; height: 140px; margin: 0; background: #cbb98fe6; }
body.full #chatForm { bottom: 34px; }
body.full #chatForm input, body.full #chatName { margin: 0; }
body.full #chatTabs { bottom: 6px; margin: 0; }
body.full #chatTabs button { padding: 3px 2px; font-size: 10px; }
body.full aside { position: absolute; z-index: 3; top: 8px; right: 8px; bottom: 8px; pointer-events: none; }
body.full aside > * { pointer-events: auto; }
body.full #online { text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
body.full #praybar { margin-top: auto; }
body.full #panel, body.full #footer { flex: none; }
body.full #window { z-index: 2; inset: 6vh max(240px, 18vw) 200px max(8px, 18vw); }
@media (max-height: 720px) {
  body.full #minimap { width: 140px; height: 140px; }
}

#maporb canvas { filter: none; }
#worldmap { position: fixed; inset: 0; z-index: 14; display: grid; place-items: center; background: #000a; padding: 12px; }
#worldmap .sheet {
  display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #3e3529; border: 3px solid #5d5140;
  width: min(1500px, calc(100vw - 24px)); height: min(900px, calc(100vh - 24px));
}
#worldmap header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
#worldmap header b { color: #ff9a1f; font-size: 16px; }
#worldmap header span { display: flex; gap: 4px; }
/* There are many lands now: their buttons run on to further rows. */
#worldmap header span.places { flex: 1 1 100%; flex-wrap: wrap; }
#worldmap header span.places .choice { padding: 3px 7px; font-size: 11px; }
#mapin, #mapout { min-width: 30px; font-weight: bold; }
#worldmap header a.choice { color: inherit; text-decoration: none; display: inline-flex; align-items: center; }
.mapbody { flex: 1; min-height: 0; display: flex; gap: 8px; }
.mapview { position: relative; flex: 1; min-width: 0; border: 2px solid #1e1a14; background: #0b0806; }
#mapcanvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#mapcanvas:active { cursor: grabbing; }
.mapview p { position: absolute; left: 6px; bottom: 4px; font-size: 10px; color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; pointer-events: none; }
#maptip { position: absolute; z-index: 1; padding: 3px 8px; pointer-events: none; font-size: 11px; white-space: nowrap; background: #ffffa0; color: #000; border: 1px solid #000; }
#legend { width: 172px; overflow-y: auto; list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 4px; background: #2e271d; border: 2px solid #1e1a14; }
#legend button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 2px 4px; font-size: 11px; text-align: left; background: none; border: 1px solid transparent; }
#legend button:hover { background: #ffffff14; }
#legend button.on { background: #6a5a38; border-color: #ffe135; }
#legend canvas { width: 22px; height: 22px; flex: none; }
@media (max-width: 680px) {
  .mapbody { flex-direction: column; }
  #legend { width: auto; max-height: 30%; flex-direction: row; flex-wrap: wrap; }
  #legend li { width: 48%; }
}

#window.dressing { inset: 2% 3%; overflow: hidden; }
.preview { align-self: center; width: 288px; max-width: 100%; height: auto; flex: none; background: #4e8a34; border: 2px solid #1e1a14; }
.wardrobe { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 104px 1fr; gap: 5px 8px; align-items: center; align-content: start; font-size: 11px; }
.options { display: flex; flex-wrap: wrap; gap: 3px; }
.options .choice { font-size: 11px; padding: 2px 7px; }
.swatch { width: 20px; height: 20px; border: 2px solid #1e1a14; border-radius: 3px; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px #ffe135; }

/* Narrow screens: panel goes under the game. */
@media (max-width: 680px) {
  body:not(.full) main { flex-direction: column; align-items: center; width: 100%; }
  body:not(.full) #left { width: 100%; }
}

/* The second row of tabs hangs below the panel. */
#tabs2 { padding: 0 2px 3px; border: 2px solid #1e1a14; border-top: 0; margin: -6px 0 0; }
#tabs2 button { border: 1px solid #1e1a14; border-top: 0; border-radius: 0 0 5px 5px; }
/* The panel takes whatever height is left, so the side column ends level with the
   chat. Should the column be the taller one, the chat grows to match it. */
body:not(.full) #panel, body:not(.full) #footer { flex: 1 1 0; height: auto; min-height: 170px; }
body:not(.full) #left { display: flex; flex-direction: column; }
body:not(.full) #chat { flex: 1 0 130px; }
body.full #panel, body.full #footer { height: clamp(180px, calc(100vh - 390px), 400px); }
/* The full window's inventory shrinks its rows as needed, to keep the tool belt in sight. */
body.full #panel.inventory { grid-template-rows: repeat(7, minmax(26px, 40px)); }
body.full #panel.inventory > .slot { min-height: 0; padding: 0; }
body.full #panel.inventory > .slot canvas { max-height: 100%; width: auto; }
body.full .belt { margin-top: 3px; }
@media (max-height: 800px) {
  #minimap, body.full #minimap { width: 144px; height: 144px; }
  body:not(.full) #panel, body:not(.full) #footer { min-height: 150px; }
  body.full #panel, body.full #footer { height: clamp(150px, calc(100vh - 370px), 400px); }
}
@media (max-width: 680px) {
  body:not(.full) #panel, body:not(.full) #footer { flex: none; height: 306px; }
}
/* Where there is height to spare, the map gets some room to itself. */
@media (min-height: 801px) {
  body:not(.full) #mapbox { margin: 4px 0 10px; }
  body:not(.full) #praybar { margin: 6px 0 10px; }
}
/* The loot tracker. */
#panel.loot { display: flex; flex-direction: column; gap: 5px; padding: 6px; }
#panel.loot > * { flex: none; }
.loot-total { display: flex; flex-direction: column; text-align: center; }
.loot-total b { font-size: 12px; color: #ff9a1f; }
.loot-total small { font-size: 10px; color: #ffe135; }
.loot-none { font-size: 11px; text-align: center; color: #c9bb98; padding: 8px 4px; }
.loot-entry { background: #2e271d; border: 1px solid #1d160c; }
.loot-title { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; width: 100%; padding: 3px 5px; text-align: left; background: #544734; border: 0; cursor: pointer; }
.loot-title:hover { background: #65563f; }
.loot-title b { font-size: 10px; color: #fff; }
.loot-title small { flex: none; font-size: 9px; color: #ffe135; }
.loot-items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; padding: 2px; }
.loot-items .slot { height: 36px; border: 0; padding: 0; }
.loot-items .slot canvas { width: 28px; height: 28px; }
/* Hotkeys, which take over the settings tab while they are being set. */
#footer.keys > :not(#hotkeys) { display: none; }
#footer > #hotkeys { flex: 1 1 0; }
#hotkeys { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; text-align: center; }
#hotkeys[hidden] { display: none; }
#hotkeys > b { color: #ff9a1f; font-size: 13px; }
#hotkeys p { margin: 0; min-height: 2.8em; font-size: 10px; line-height: 1.4; }
#hotkeyList { display: grid; gap: 2px; }
#footer #hotkeyList button { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 8px; font-size: 11px; }
#hotkeyList button b { color: #ffe135; }
#footer #hotkeys > .choice { flex: none; padding: 5px; }
