/* Fantasy RPG interface: parchment, dark leather and gold. */
:root {
  --body: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --display: "Cinzel", "Trajan Pro", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ink: #2b2118;
  --ink-soft: #5a4a3a;
  --paper: #e9dcc0;
  --paper-hi: #f4ead3;
  --paper-lo: #d8c7a3;
  --leather: #241a12;
  --leather-hi: #3d2c1e;
  --gold: #c9a227;
  --gold-hi: #f0d77a;
  --blood: #8a2a22;
  --ok: #3f7d3a;
  --bad: #a8322a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d0907; font-family: var(--body); color: var(--ink); }
[hidden] { display: none !important; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

button {
  font-family: var(--display); font-size: 13px; letter-spacing: 0.06em; cursor: pointer;
  color: var(--paper-hi); background: linear-gradient(var(--leather-hi), var(--leather));
  border: 1px solid var(--gold); border-radius: 4px; padding: 7px 14px;
  box-shadow: inset 0 1px 0 #ffffff22, 0 2px 4px #0006;
}
button:hover:not(:disabled) { color: #fff; border-color: var(--gold-hi); box-shadow: inset 0 1px 0 #ffffff33, 0 0 10px #c9a22766; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
button.big { font-size: 16px; padding: 11px 22px; background: linear-gradient(#a23a2e, #6a1c16); text-transform: uppercase; }

/* Parchment surfaces */
.card, .window {
  background: radial-gradient(ellipse at 30% 0%, var(--paper-hi), var(--paper) 55%, var(--paper-lo));
  border: 1px solid #6b5230; border-radius: 6px;
  box-shadow: 0 0 0 3px var(--leather), 0 0 0 4px var(--gold), 0 18px 50px #000b;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; }

.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: flex-start; padding: 3vh 3vw; overflow: auto; pointer-events: none; }
.card { pointer-events: auto; width: min(560px, 94vw); max-height: 94vh; overflow: auto; padding: 22px 26px; }
.card.small { margin: auto; text-align: center; }
#death { justify-content: center; background: radial-gradient(#3a0a0a99, #000000cc); }
.logo { margin: 0 0 8px; font-size: 38px; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.08em; color: #7a5a12; text-shadow: 0 1px 0 #fff6, 0 2px 3px #0005; }
.logo span { color: var(--blood); }
.story { font-size: 14px; font-style: italic; line-height: 1.45; border-top: 1px solid #a88f5a; border-bottom: 1px solid #a88f5a; padding: 9px 4px; margin: 0 0 6px; }
label { display: block; font-family: var(--display); font-weight: 700; letter-spacing: 0.03em; margin: 12px 0 5px; }
textarea, input { font-family: var(--body); font-size: 16px; width: 100%; border: 1px solid #8a6f42; border-radius: 4px; padding: 8px 10px; background: #fbf5e6; color: var(--ink); box-shadow: inset 0 1px 3px #0003; }
textarea { resize: vertical; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
/* the creation wizard: rows of choices, one chosen in each */
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices button { font-family: var(--body); font-size: 14px; letter-spacing: 0; padding: 5px 11px; color: var(--ink); background: #fbf5e699; border: 1px solid #a88f5a; box-shadow: none; }
.choices button:hover { background: #fffaf0; border-color: var(--gold); }
.choices button.on { background: #5a3d12; color: #fbf5e6; border-color: #3a2608; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches button { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #8a6f42; box-shadow: none; }
.swatches button.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--paper-hi), 0 0 0 4px var(--ink); }
#wizard label { margin: 10px 0 4px; font-size: 13px; }
#wz-blurb { margin: 6px 0 0; }
.fine { font-size: 12px; color: var(--ink-soft); margin: 10px 0 0; }
.or { text-align: center; font-size: 13px; margin: 8px 0 0; color: var(--ink-soft); font-style: italic; }
.note { background: #f3d6cf; border: 1px solid var(--bad); border-radius: 4px; padding: 6px 10px; font-size: 13px; margin: 6px 0; }
#pv-name { margin: 6px 0 0; font-size: 26px; color: var(--blood); }
#pv-desc { margin: 4px 0 10px; font-size: 14px; line-height: 1.4; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 14px; }
.stats div { background: #fbf5e699; border: 1px solid #a88f5a; border-radius: 4px; padding: 4px 8px; }
.stats b { float: right; }
h3 { margin: 14px 0 6px; font-size: 16px; color: #5a3d12; border-bottom: 1px solid #a88f5a; padding-bottom: 3px; }
#create-status { font-size: 14px; font-style: italic; }

/* default heroes */
#presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 520px) { #presets { grid-template-columns: 1fr; } }
.preset { text-align: left; font-family: var(--body); letter-spacing: 0; padding: 7px 10px; color: var(--ink); background: #fbf5e699; border: 1px solid #a88f5a; box-shadow: none; }
.preset b { display: block; font-family: var(--display); font-size: 14px; color: #5a3d12; }
.preset small { display: block; font-size: 12px; line-height: 1.25; color: var(--ink-soft); }
.preset:hover:not(:disabled) { color: var(--ink); background: #fffaf0; border-color: var(--gold); box-shadow: 0 0 8px #c9a22755; }

/* skill tree */
.tree { position: relative; margin: 4px auto; }
.tree svg { position: absolute; inset: 0; pointer-events: none; }
.node { position: absolute; width: 96px; height: 76px; border: 1px solid #6b5230; border-radius: 6px; background: #fbf5e6; text-align: center; font-size: 11px; line-height: 1.1; padding: 3px; cursor: default; overflow: hidden; box-shadow: 0 0 0 2px var(--leather), 0 2px 5px #0005; }
.node .ico { display: block; line-height: 1; margin: 3px 0 2px; }
.node .rk { position: absolute; right: 4px; top: 2px; font-size: 10px; font-weight: bold; color: var(--ink-soft); }
.node.ability { border-radius: 38px 38px 6px 6px; }
.node.learned { background: #e6efcf; box-shadow: 0 0 0 2px var(--ok), 0 2px 5px #0005; }
.node.maxed { background: #f3e3a6; box-shadow: 0 0 0 2px var(--gold), 0 0 10px #c9a22788; }
.node.open { background: #fffaf0; cursor: pointer; box-shadow: 0 0 0 2px var(--gold-hi), 0 0 12px #f0d77a; animation: glow 1.6s ease-in-out infinite; }
.node.locked { background: #c9bda3; color: #6b5f50; }
.node.locked .ico { filter: grayscale(0.9); opacity: 0.6; }
.node.pv { background: #fbf5e6; }
@keyframes glow { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 4px #f0d77a88; } }
@media (prefers-reduced-motion: reduce) { .node.open { animation: none; } }
#tip { position: fixed; z-index: 50; max-width: 270px; background: var(--leather); color: var(--paper-hi); border: 1px solid var(--gold); border-radius: 4px; padding: 8px 11px; font-size: 13px; line-height: 1.35; pointer-events: none; box-shadow: 0 6px 18px #000a; }
#tip b { color: var(--gold-hi); font-family: var(--display); }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; color: #f4ead3; text-shadow: 0 1px 2px #000, 0 0 4px #000c; }
#bars { position: absolute; left: 16px; top: 14px; width: 300px; }
#me-name { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 4px; color: var(--gold-hi); }
.bar { position: relative; height: 20px; background: #120c08cc; border: 1px solid var(--gold); border-radius: 3px; overflow: hidden; margin-bottom: 4px; box-shadow: 0 0 0 2px #000a; }
.bar div { position: absolute; left: 0; top: 0; bottom: 0; width: 0; transition: width 0.15s; }
.bar.hp div { background: linear-gradient(#c4443a, #7a1a14); }
.bar.xp { height: 12px; }
.bar.xp div { background: linear-gradient(#e8c95a, #a8801a); }
.bar span { position: absolute; inset: 0; text-align: center; font-size: 12px; line-height: 18px; }
.bar.xp span { font-size: 9px; line-height: 10px; }
#buffs { font-size: 13px; }
#zone { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: 0.08em; text-align: center; color: var(--gold-hi); }
#zone small { display: block; font-family: var(--body); font-size: 12px; font-weight: normal; letter-spacing: 0; color: #f4ead3; font-style: italic; }
#right { position: absolute; right: 16px; top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#minimap { border: 2px solid var(--gold); border-radius: 50%; background: #0006; box-shadow: 0 0 0 3px var(--leather), 0 4px 12px #000a; }
#online { font-size: 12px; font-style: italic; }
#tracker { width: 250px; font-size: 13px; text-align: right; }
#tracker .q { margin-bottom: 9px; }
#tracker .q b { display: block; font-family: var(--display); color: var(--gold-hi); font-size: 13px; letter-spacing: 0.03em; }
#tracker .q.main { padding: 4px 8px 5px; border-right: 3px solid var(--gold-hi); background: linear-gradient(to left, #0007, #0000); }
#tracker .q.main b { color: #ffe28a; font-size: 14px; }
#tracker i.mainmark { display: block; margin: 0 0 1px; padding: 0; background: none; color: var(--gold-hi); font: 700 9px/1.4 var(--display); letter-spacing: 0.14em; text-transform: uppercase; }
#tracker .q.more { color: #d8ceb8; font-style: italic; }
#tracker .q.wanted b { color: #ff8a6a; }
#tracker .done { color: #a8e08a; }
#abilities { position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.slot { position: relative; width: 60px; height: 60px; border: 1px solid var(--gold); border-radius: 5px; background: radial-gradient(#3d2c1e, #170f0a); text-align: center; font-size: 27px; line-height: 50px; overflow: hidden; box-shadow: 0 0 0 2px #000a, inset 0 0 8px #000; }
.slot .key { position: absolute; left: 4px; top: 0; font-size: 11px; line-height: 16px; color: var(--gold-hi); font-family: var(--display); }
.slot .nm { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; line-height: 12px; background: #000b; text-shadow: none; white-space: nowrap; overflow: hidden; }
.slot .cd { position: absolute; left: 0; right: 0; bottom: 0; background: #000c; }
.slot.empty { opacity: 0.4; }
#hint, #autorun { position: absolute; left: 50%; transform: translateX(-50%); background: #170f0ae6; border: 1px solid var(--gold); border-radius: 4px; padding: 6px 16px; font-size: 16px; }
#hint { bottom: 132px; }
#autorun { bottom: 178px; font-size: 13px; font-style: italic; }
#hint b, #autorun b { color: var(--gold-hi); font-family: var(--display); font-style: normal; }
#toasts { position: absolute; top: 158px; left: 50%; transform: translateX(-50%); width: min(520px, 90vw); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { background: #170f0aee; border: 1px solid #a88f5a; border-left-width: 4px; border-radius: 4px; padding: 6px 14px; font-size: 15px; animation: pop 0.2s; text-shadow: none; color: var(--paper-hi); }
.toast.good { border-color: #6fae5a; }
.toast.bad { border-color: #d0584a; }
.toast.quest { border-color: var(--gold-hi); }
@keyframes pop { from { transform: translateY(-6px); opacity: 0; } }
#chat { position: absolute; left: 16px; bottom: 42px; width: 360px; pointer-events: auto; }
#chat-log { max-height: 150px; overflow: hidden; font-size: 13px; display: flex; flex-direction: column; justify-content: flex-end; }
#chat-log .sys { color: var(--gold-hi); font-style: italic; }
#chat-log b { color: #bfe0ff; }
#chat-input { font-size: 13px; padding: 4px 8px; background: #0007; color: #fff; border-color: #a88f5a88; opacity: 0.55; box-shadow: none; }
#chat-input::placeholder { color: #d8c7a3; }
#chat-input:focus { opacity: 1; background: #000c; }
#keys { position: absolute; bottom: 9px; left: 0; right: 0; text-align: center; font-size: 12px; opacity: 0.9; }
#keys b { color: var(--gold-hi); font-family: var(--display); }

/* windows */
.window { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(720px, 94vw); max-height: calc(86vh / var(--ui-scale, 1)); overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px; z-index: 20; }
.window.wide { width: auto; max-width: 96vw; }
.window h2 { margin: 0 0 8px; font-size: 22px; color: #5a3d12; border-bottom: 1px solid #a88f5a; padding-bottom: 6px; }
.window .x { position: absolute; right: 12px; top: 12px; padding: 4px 10px; }
.window .sub { font-size: 13px; color: var(--ink-soft); font-style: italic; margin: 0 0 9px; }
.list { display: grid; gap: 6px; }
.item { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; align-items: center; background: #fbf5e699; border: 1px solid #a88f5a; border-radius: 4px; padding: 5px 10px; font-size: 14px; }
.item .ico { font-size: 26px; text-align: center; }
.item small { display: block; color: var(--ink-soft); font-size: 12px; }
.item .cost .no { color: var(--bad); font-weight: bold; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .cols { grid-template-columns: 1fr; } }
.quest { background: #fbf5e699; border: 1px solid #a88f5a; border-radius: 4px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; line-height: 1.35; }
.quest h4 { margin: 0 0 4px; font-size: 15px; color: #5a3d12; }
.quest.main { border: 2px solid var(--gold); border-left-width: 6px; background: #fff3cf; }
/* The main quest's badge, in the quest list and beside the map. */
.mainmark { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 3px; background: var(--gold); color: #2a1c0a; font: 700 10px/1.5 var(--display); letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 2px; }
.quest .track { float: right; margin-left: 10px; font-size: 12px; color: #5a4a2c; cursor: pointer; user-select: none; }
.quest .track { white-space: nowrap; }
.quest .track input { width: auto; display: inline; padding: 0; margin: 0 4px 0 0; border: 0; box-shadow: none; background: none; vertical-align: -2px; accent-color: #8a6a1c; }

.quest ul { margin: 4px 0; padding-left: 20px; }
.quest .ok { color: var(--ok); }
.greeting { font-style: italic; line-height: 1.45; border-top: 1px solid #a88f5a; border-bottom: 1px solid #a88f5a; padding: 9px 4px; margin-bottom: 12px; }

/* map */
.mapwrap { display: grid; grid-template-columns: auto minmax(270px, 330px); gap: 18px; align-items: start; }
/* The quests beside the map: a column of its own width that scrolls, however many there are. */
.mapside { overflow-y: auto; padding-right: 6px; }
.mapside .quest { font-size: 13px; padding: 6px 10px; margin-bottom: 6px; }
.mapside .quest h4 { font-size: 14px; }
.mapside .legend { margin-top: 10px; }
@media (max-width: 640px) { .mapwrap { grid-template-columns: 1fr; justify-items: center; } .mapside { max-height: none; } }
#bigmap { border: 1px solid var(--gold); border-radius: 3px; box-shadow: 0 0 0 3px var(--leather), 0 4px 14px #0008; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; margin-top: 10px; color: var(--ink-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #0008; vertical-align: -1px; }

#banner { position: fixed; top: 22%; left: 0; right: 0; text-align: center; font-family: var(--display); font-size: 42px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-hi); text-shadow: 0 2px 0 #5a3d12, 0 4px 14px #000; pointer-events: none; opacity: 0; transition: opacity 0.8s; z-index: 30; }
#banner small { display: block; font-family: var(--body); font-size: 18px; font-style: italic; letter-spacing: 0.02em; text-transform: none; color: #f4ead3; text-shadow: 0 1px 4px #000; margin-top: 6px; }
#banner.show { opacity: 1; }
#connection { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #000d; color: var(--paper-hi); font-family: var(--display); font-size: 22px; z-index: 99; text-align: center; padding: 20px; }

/* drawn icons */
.ic { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.node .ico { color: #5a3d12; height: 30px; }
.node.locked .ico { color: #7a6f5e; }
.item .ico { color: #5a3d12; line-height: 1; }
.slot .ic { color: var(--gold-hi); vertical-align: middle; margin-top: 8px; }
.slot .key { font-size: 10px; }
.stats .ic { color: #7a5a12; }
#buffs span { margin-right: 10px; }
#buffs .ic { color: var(--gold-hi); }
.window .x { font-size: 11px; }

/* start-up */
#loading { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; text-align: center; background: radial-gradient(#2a1d14, #0d0907); color: var(--paper-hi); padding: 24px; }
#loading .logo { color: var(--gold-hi); text-shadow: 0 2px 8px #000; }
#loading .logo span { color: #d86a5a; }
#loading-text { font-style: italic; font-size: 18px; }
#loading-error { max-width: 720px; margin: 18px auto 0; padding: 12px 16px; background: #3a1410; border: 1px solid #d0584a; border-radius: 4px; font-size: 14px; text-align: left; white-space: pre-wrap; }
#page-error { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 95; padding: 10px 14px; background: #3a1410ee; color: #f4ead3; border: 1px solid #d0584a; border-radius: 4px; font-size: 13px; white-space: pre-wrap; }

/* login, crosshair, menu */
#login { justify-content: center; }
#login .card { width: min(460px, 94vw); }
#login-status { font-size: 14px; font-style: italic; color: var(--bad); }
#account-line { margin: 0 0 8px; text-align: right; }
#account-line button { font-size: 11px; padding: 3px 9px; margin-left: 8px; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none;
  background:
    linear-gradient(#f4ead3, #f4ead3) center / 2px 2px no-repeat,
    linear-gradient(#f4ead3, #f4ead3) left center / 7px 2px no-repeat,
    linear-gradient(#f4ead3, #f4ead3) right center / 7px 2px no-repeat,
    linear-gradient(#f4ead3, #f4ead3) center top / 2px 7px no-repeat,
    linear-gradient(#f4ead3, #f4ead3) center bottom / 2px 7px no-repeat;
  filter: drop-shadow(0 0 1.5px #000) drop-shadow(0 0 1.5px #000); }
.window.narrow { width: min(380px, 94vw); text-align: center; }
.menu { display: grid; gap: 8px; margin-top: 6px; }
.menu button { font-size: 15px; padding: 10px; }
.menu .sep { height: 1px; background: #a88f5a; margin: 4px 0; }
#me-name small { display: block; font-family: var(--body); font-size: 13px; font-weight: normal; letter-spacing: 0; color: #f4ead3; font-style: italic; }

/* sizes chosen in the settings */
#hud, .window, #banner { zoom: var(--ui-scale, 1); }
.settings label { display: grid; grid-template-columns: 150px 1fr 70px; gap: 10px; align-items: center; margin: 10px 0; font-family: var(--body); font-weight: normal; text-align: left; }
.settings input[type=range] { padding: 0; box-shadow: none; border: none; background: none; accent-color: #8a2a22; }
.settings output { font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-soft); }

/* administration */
#admin { justify-content: center; align-items: flex-start; pointer-events: auto; background: radial-gradient(#2a1d14, #0d0907); }
.card.admin { width: min(1040px, 96vw); max-height: none; margin: 2vh 0; }
.admin h3 { margin-top: 16px; }
.admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin th, .admin td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #a88f5a88; vertical-align: middle; }
.admin th { font-family: var(--display); font-size: 12px; letter-spacing: 0.05em; color: #5a3d12; }
.admin td.num, .admin th.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin td button, .admin .tools button { font-size: 11px; padding: 4px 8px; margin: 1px 2px 1px 0; }
.admin input { width: auto; font-size: 14px; padding: 4px 8px; }
.admin input.small { width: 64px; }
.admin .tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.admin .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; font-size: 14px; margin-bottom: 10px; }
.admin .facts div { background: #fbf5e699; border: 1px solid #a88f5a; border-radius: 4px; padding: 5px 10px; }
.admin .facts b { float: right; }
.admin .on { color: var(--ok); font-weight: bold; }
.admin .danger { background: linear-gradient(#a23a2e, #6a1c16); }
#admin-note { background: #e6efcf; border-color: var(--ok); }

/* target focus, nearby heroes, afflictions, purse */
#target { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); width: 320px; padding: 6px 10px 5px; background: #170f0ad9; border: 1px solid var(--gold); border-radius: 4px; text-align: center; }
#target.foe { border-color: #c0483a; }
#target.friend { border-color: #5aa85a; }
#target b { display: block; font-family: var(--display); font-size: 15px; letter-spacing: 0.03em; color: var(--gold-hi); }
#target.foe b { color: #ffb3a8; }
#target.friend b { color: #b8f0a8; }
#target small { display: block; font-size: 12px; font-style: italic; margin-bottom: 4px; }
#target .bar { margin-bottom: 3px; }
#target.friend .bar.hp div { background: linear-gradient(#5aa85a, #2a6a2a); }
.fxs { min-height: 2px; }
.fx { display: inline-block; font-size: 12px; margin: 1px 6px 1px 0; white-space: nowrap; }
.fx .ic { vertical-align: -2px; }
.fx.burn { color: #ffa25a; } .fx.poison { color: #9ae85a; } .fx.drain { color: #c890ff; } .fx.slow { color: #8ac0ff; } .fx.freeze { color: #cff4ff; } .fx.regen { color: #8af0a0; }
#purse { font-size: 13px; margin-bottom: 3px; }
#purse .ic { color: var(--gold-hi); vertical-align: -2px; }
#party { margin-top: 12px; width: 220px; font-size: 13px; }
#party h5 { margin: 0 0 4px; font-family: var(--display); font-size: 12px; letter-spacing: 0.06em; color: var(--gold-hi); font-weight: 700; }
#party .hero { position: relative; margin-bottom: 5px; padding-left: 6px; border-left: 2px solid transparent; }
#party .hero.focus { border-left-color: #5dff8a; }
#party .hero.dead { opacity: 0.55; }
#party .nm small { color: var(--gold-hi); }
#party .d { float: right; font-size: 11px; font-style: italic; }
#party .mini { height: 5px; background: #120c08cc; border: 1px solid #0008; border-radius: 2px; overflow: hidden; margin-top: 2px; }
#party .mini div { height: 100%; background: linear-gradient(#5aa85a, #2a6a2a); }
.slot.tgt::after { content: ""; position: absolute; right: 3px; top: 3px; width: 8px; height: 8px; border: 1.5px solid var(--gold-hi); border-radius: 50%; }
.window h3 .purse { float: right; font-family: var(--body); font-size: 14px; font-weight: normal; letter-spacing: 0; }
.window h4 { margin: 4px 0 6px; }
.item .pair { display: flex; gap: 4px; }
.item .have { font-style: italic; }
.item button .ic { vertical-align: -2px; }

/* the heroes of an account */
#hero-list { display: grid; gap: 6px; margin-bottom: 6px; }
.hero-row { display: flex; gap: 6px; align-items: stretch; }
.hero-pick { flex: 1; text-align: left; padding: 8px 12px; }
.hero-pick small { display: block; font-weight: normal; font-style: italic; text-transform: none; letter-spacing: 0; }
.hero-del { font-size: 11px; padding: 3px 9px; }

/* energy, skillbook, quick item slots */
.bar.en { height: 12px; }
.bar.en div { background: linear-gradient(#6ab8ff, #1c5ab8); }
.bar.en span { font-size: 9px; line-height: 10px; }
.slot .en { position: absolute; right: 4px; top: 0; font-size: 11px; line-height: 16px; color: #9fd0ff; font-family: var(--display); }
.slot.poor { filter: saturate(0.3) brightness(0.7); }
.slot.poor .en { color: #ff8a7a; }
.slot.tgt::after { top: 19px; }
.slot.quick .en { color: #f4ead3; }
.slot.quick.none { opacity: 0.5; }
#abilities .gap { width: 10px; }
.bookbar { display: flex; gap: 8px; justify-content: center; margin: 4px 0 12px; color: #f4ead3; }
.item.spell.locked { opacity: 0.6; }
.item .pair button { min-width: 30px; padding: 5px 8px; }
.item .pair button.on { background: #3f7d3a; color: #fff; border-color: #2a5a26; opacity: 1; }

/* the administrator's console */
#con-log { height: 240px; overflow: auto; margin: 0 0 6px; padding: 8px 10px; background: #170f0a; color: #e8dcc0; border: 1px solid var(--gold); border-radius: 4px; font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; text-align: left; }
#con-form { display: flex; gap: 6px; }
#con-in { flex: 1; font: 14px ui-monospace, Menlo, Consolas, monospace; }

/* the developer's console inside the game */
#devcon { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); width: min(820px, 94vw); z-index: 40; background: #120c08f2; border: 1px solid var(--gold); border-radius: 4px; padding: 8px; box-shadow: 0 8px 24px #000a; }
#dev-log { height: 220px; overflow: auto; margin: 0 0 6px; color: #e8dcc0; font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; }
#dev-in { width: 100%; box-sizing: border-box; font: 14px ui-monospace, Menlo, Consolas, monospace; }

/* everyone in the realm */
table.who { width: 100%; border-collapse: collapse; font-size: 14px; }
table.who th { text-align: left; font-family: var(--display); font-size: 12px; letter-spacing: 0.04em; color: #5a3d12; border-bottom: 1px solid #a88f5a; padding: 4px 8px; }
table.who td { padding: 6px 8px; border-bottom: 1px solid #a88f5a55; vertical-align: middle; }
table.who .num { text-align: right; }
table.who small { color: var(--ink-soft); }
table.who tr.dead { opacity: 0.6; }
table.who .mini { width: 90px; height: 7px; background: #120c0833; border: 1px solid #0006; border-radius: 2px; overflow: hidden; }
table.who .mini div { height: 100%; background: linear-gradient(#5aa85a, #2a6a2a); }

/* A ride on the tram: the world goes dark for a moment. */
#fade { position: fixed; inset: 0; background: #0b0906; opacity: 0; pointer-events: none; transition: opacity 0.45s; z-index: 25; }
#fade.on { opacity: 1; transition: opacity 0.12s; }
.stops .item small.here { color: #2a6a2a; font-style: normal; font-weight: 700; }
.stops .item.unknown { opacity: 0.6; }
.stops .item small.warn { color: #a03a1c; font-style: normal; font-weight: 700; }

/* Whom the targeted foe is after, and my own threat against the highest. */
#target .threat { position: relative; display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; padding: 2px 6px; font-size: 11px; color: #e8dcc0; background: #0007; border-radius: 3px; overflow: hidden; }
#target .threat b { display: inline; font-family: inherit; font-size: inherit; letter-spacing: 0; color: #fff; }
#target .threat span { position: relative; z-index: 1; }
#target .threat i { position: absolute; left: 0; top: 0; bottom: 0; background: #6a7a3a88; }
#target .threat.close i { background: #b8862a99; }
#target .threat.mine i { background: #a8322a99; }

/* Gear: what is worn, and how rare it is. */
.item.r1 b { color: #1f7a2a; } .item.r2 b { color: #1f55b8; } .item.r3 b { color: #7a2ab8; } .item.r4 b { color: #c06a00; }
.item .rar { font-style: normal; font-weight: 700; }
.item.r1 .rar { color: #1f7a2a; } .item.r2 .rar { color: #1f55b8; } .item.r3 .rar { color: #7a2ab8; } .item.r4 .rar { color: #c06a00; }
.item.r1 { box-shadow: inset 3px 0 0 #1f7a2a; } .item.r2 { box-shadow: inset 3px 0 0 #1f55b8; } .item.r3 { box-shadow: inset 3px 0 0 #7a2ab8; } .item.r4 { box-shadow: inset 3px 0 0 #c06a00; }
.wornlist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.item.worn button { white-space: nowrap; }
.item.worn .slotname { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; font-style: normal; }
.item.worn.empty { opacity: 0.55; }
@media (max-width: 620px) { .wornlist { grid-template-columns: 1fr; } }
