/* overlays.css - the Settings window, the chat and the teleport confirm
 * (2026-10-19, the Ember redesign - DESIGN.md). Behaviour (positions,
 * pointer-events, layout the suite pins) stays inline in the JS; this is the
 * look. */

/* ---- Settings (SettingsUI) ---- */
.ed-settings { width: min(calc(540px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); }
.ed-settings .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-settings__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 18px 24px 22px;
}
.ed-settings__section { display: flex; flex-direction: column; }
.ed-settings__section > .ed-section-title { margin-bottom: 6px; }
.ed-settings__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 5px 0;
  border-bottom: 1px solid var(--ed-line-faint);
}
.ed-settings__row:last-child { border-bottom: 0; }
label.ed-settings__row { cursor: pointer; }
label.ed-settings__row:hover .ed-settings__label { color: #fff; }
.ed-settings__label {
  font-size: calc(15px * var(--ed-fs));
  font-weight: 500;
  color: var(--ed-text);
  transition: color var(--ed-fast) var(--ed-ease);
}
.ed-settings__slider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 236px;
}
.ed-settings__value {
  flex: 0 0 40px;
  text-align: right;
  font-size: calc(14px * var(--ed-fs));
  font-weight: 600;
  color: var(--ed-text-2);
  font-variant-numeric: tabular-nums;
}
.ed-settings .ed-select { min-width: 236px; }
.ed-settings__note {
  margin: 6px 0 4px;
  font-size: calc(13px * var(--ed-fs));
  line-height: 1.55;
  color: var(--ed-text-3);
}
.ed-settings__status { font-size: calc(13px * var(--ed-fs)); line-height: 1.5; color: var(--ed-danger-text); }
.ed-settings__status:empty { display: none; }

/* the key bindings: a keycap per action */
.ed-settings__keys { display: flex; flex-direction: column; margin-top: 4px; }
.ed-settings__keyrow { min-height: 40px; padding: 4px 0; }
.ed-settings__key {
  min-width: 84px;
  height: 30px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 196, 140, 0.30);
  border-bottom-width: 3px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 236, 214, 0.08), rgba(255, 236, 214, 0.02)), #1b161c;
  color: var(--ed-gold-300);
  font-family: var(--ed-font-ui);
  font-size: calc(13px * var(--ed-fs));
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.42);
  transition: border-color var(--ed-fast) var(--ed-ease), color var(--ed-fast) var(--ed-ease),
    background-color var(--ed-fast) var(--ed-ease), box-shadow var(--ed-med) var(--ed-ease), transform var(--ed-fast) var(--ed-ease);
}
.ed-settings__key:hover { border-color: rgba(255, 196, 140, 0.62); color: var(--ed-gold-200); }
.ed-settings__key:active { transform: translateY(1px); }
.ed-settings__key.is-capturing {
  border-color: var(--ed-ember-400);
  background: linear-gradient(180deg, rgba(255, 154, 82, 0.26), rgba(255, 122, 47, 0.12)), #22170f;
  color: var(--ed-ember-200);
  box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.20), 0 0 18px rgba(255, 110, 40, 0.30);
}
.ed-settings__key.is-reserved {
  border-color: rgba(255, 98, 87, 0.75);
  background: rgba(255, 98, 87, 0.13);
  color: var(--ed-danger-text);
  box-shadow: 0 0 0 3px rgba(255, 98, 87, 0.15);
}
.ed-settings__reset { align-self: flex-start; margin-top: 12px; }
/* THE CONTROLLER SECTION (round 2 part 25i2 - SettingsUI): a line that says
   whether one is connected, then what each button does. The button's name is
   a plain chip, not a keycap: it cannot be pressed or changed. */
.ed-settings__pad-status {
  padding: 8px 0 6px;
  font-size: calc(14px * var(--ed-fs));
  line-height: 1.4;
  color: var(--ed-text-dim, var(--ed-text));
  overflow-wrap: anywhere;
}
.ed-settings__pad-status.is-on { color: var(--ed-gold-200); }
.ed-settings__padbtn {
  flex: 0 0 auto;
  min-width: 84px;
  padding: 5px 12px;
  box-sizing: border-box;
  border: 1px solid var(--ed-line);
  border-radius: 7px;
  background: rgba(255, 236, 214, 0.04);
  color: var(--ed-text);
  font-size: calc(13px * var(--ed-fs));
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

/* the account section: switch and quit side by side */
.ed-settings__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.ed-settings__actions .ed-btn--danger.is-armed {
  border-color: #ff8f85;
  background: linear-gradient(180deg, #ff6a5e, #d43a2f);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 98, 87, 0.18), 0 6px 18px rgba(212, 58, 47, 0.35);
}
.ed-settings__actions .ed-btn--danger.is-note {
  border-color: var(--ed-line-strong);
  background: transparent;
  color: var(--ed-text-2);
  cursor: default;
}
.ed-settings .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-settings__hint { font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-settings__hint .ed-kbd { margin-right: 2px; }

/* ---- Chat (MultiplayerPresence.mountChat / openChatInput) ---- */
/* No box per line: the log sits in one soft, edgeless shade (a fill plus a
 * wide blurred shadow of the same tint), so Inter reads on grass, sand and
 * the pale plaza stone alike - and an empty log draws nothing. Static: no
 * animation over the world. */
.ed-chat-log {
  padding: 6px 10px 6px 8px;
  border-radius: 16px;
  background: rgba(10, 8, 12, 0.42);
  box-shadow: 0 0 22px 14px rgba(10, 8, 12, 0.34);
  font-family: var(--ed-font-ui);
  font-size: calc(14px * var(--ed-fs));
  line-height: 1.38;
}
.ed-chat-log:empty { padding: 0; background: none; box-shadow: none; }
/* High contrast: the log on a solid card like the others - nothing of the
 * world shows through (2026-10-20 review). */
#ui-root.ed-hc .ed-chat-log:not(:empty) {
  background: #120e13;
  box-shadow: none;
  border: 1px solid var(--ed-line);
  border-radius: 10px;
}
.ed-chat__line {
  color: var(--ed-text);
  text-shadow: 0 1px 2px rgba(6, 4, 3, 0.85);
}
.ed-chat__name { font-weight: 700; color: var(--ed-ember-200); }
.ed-chat__name--self { color: var(--ed-ember-400); }
.ed-chat__name--system { color: var(--ed-gold-400); }
.ed-chat__line--system .ed-chat__text { color: var(--ed-gold-200); }
/* A whisper (2026-11-19): violet, both ways - "From Mira:" and "To Mira:". */
.ed-chat__name--whisper { color: #d6a8ff; }
.ed-chat__line--whisper .ed-chat__text { color: #ecd8ff; }
/* An operator's yell (2026-11-19): a hot coral, the name bold. */
.ed-chat__name--yell { color: #ff7f66; }
/* An operator's /announce (2026-11-20): the server's voice, in gold, to everyone. */
.ed-chat__name--announce { color: #ffd166; }
.ed-chat__line--announce .ed-chat__text { color: #fff1c4; font-weight: 600; }
.ed-chat__line--yell .ed-chat__text { color: #ffd2c6; font-weight: 600; }
/* A line fades in the last second of its 10 (2026-11-19 - CHAT_FADE_MS; the
 * duration and the delay, set where it is drawn, keep a redraw from
 * restarting it), and the log's shade with its newest line (set inline -
 * MultiplayerPresence._renderChatLog). Not while typing or looking back. */
@keyframes ed-chat-fade { 0%, 90% { opacity: 1; } 100% { opacity: 0; } }
.ed-chat__line.is-fading { animation-name: ed-chat-fade; animation-timing-function: linear; animation-fill-mode: forwards; }
/* "4 newer below: Page Down" while looking back. */
.ed-chat__more { color: var(--ed-text-3); font-size: calc(12px * var(--ed-fs)); text-align: right; }

.ed-chat__input.ed-input {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border-color: rgba(255, 176, 110, 0.32);
  background: rgba(14, 11, 15, 0.94);
  font-size: calc(14px * var(--ed-fs));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.ed-chat__input.ed-input::placeholder { color: var(--ed-text-3); }
#ui-root .ed-chat__input.ed-input:focus {
  border-color: var(--ed-line-hot);
  background: rgba(14, 11, 15, 0.96);
  box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.20), 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* ---- Teleport confirm (MultiplayerPresence.showTeleportConfirm) ---- */
.ed-tp {
  box-sizing: border-box;
  min-width: 280px;
  max-width: min(420px, calc(var(--ed-vw, 100vw) - 32px));
  padding: 18px 22px 16px;
  text-align: center;
  /* opacity only: the box is centred by an inline transform, which a
   * transform animation would override */
  animation: ed-fade-in var(--ed-med) var(--ed-ease) both;
}
.ed-tp__label {
  margin-bottom: 14px;
  font-size: calc(16px * var(--ed-fs));
  font-weight: 600;
  color: var(--ed-text);
}
.ed-tp__actions { display: flex; justify-content: center; gap: 10px; }

/* ---- The Guide (GuideUI - 2026-10-20) ---- */
/* Topics on the left, the page on the right; the page scrolls, the head,
 * the list and the foot stay put. Same family as Settings. */
.ed-guide { width: min(calc(880px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); height: min(calc(640px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-guide .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-guide .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-guide__wrap { display: flex; flex: 1; min-height: 0; }
.ed-guide__nav {
  flex: 0 0 calc(210px * var(--ed-fs));
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 12px;
  overflow-y: auto;
  border-right: 1px solid var(--ed-line-faint);
  background: rgba(6, 5, 8, 0.28);
}
/* A topic's picture strip (round 2 part 25g2): small stills of what the game already draws, each with the game's own name. */
.ed-guide__pic { box-sizing: border-box; margin: 2px 0 14px; padding: 12px; border: 1px solid var(--ed-line-faint); border-radius: var(--ed-r-lg); background: rgba(6, 5, 8, 0.28); }
.ed-guide__picrow { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.ed-guide__piccell { display: flex; flex-direction: column; align-items: center; gap: 4px; width: calc(80px * var(--ed-fs)); }
.ed-guide__piccanvas { display: block; width: 72px; height: 72px; image-rendering: pixelated; }
.ed-guide__picname { font-size: calc(12px * var(--ed-fs)); line-height: 1.25; text-align: center; color: var(--ed-text-2); }
.ed-guide__picnote { margin-top: 8px; font-size: calc(13px * var(--ed-fs)); line-height: 1.4; color: var(--ed-text-3); }
/* The search over the topics (round 2 part 25g1): the box and its count stay, the list scrolls under them. */
.ed-guide__side { flex: 0 0 calc(210px * var(--ed-fs)); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--ed-line-faint); background: rgba(6, 5, 8, 0.28); }
.ed-guide__side .ed-guide__nav { flex: 1 1 auto; min-height: 0; border-right: 0; background: transparent; padding-top: 6px; }
.ed-guide__search { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 4px; }
.ed-guide__searchlabel { font-size: calc(12px * var(--ed-fs)); font-weight: 600; color: var(--ed-text-3); }
.ed-guide__searchbox { height: 36px; padding: 0 10px; }
.ed-guide__searchcount { min-height: calc(18px * var(--ed-fs)); padding: 0 14px; font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-guide__p.is-hit, .ed-guide__sub.is-hit, .ed-guide__list li.is-hit { border-radius: 4px; background: rgba(255, 176, 110, 0.14); box-shadow: 0 0 0 4px rgba(255, 176, 110, 0.14); }
.ed-guide__topic {
  display: block;
  /* Never squeezed by the list's height: a title on two lines keeps its
   * room and the list scrolls instead (2026-10-21 - the 16th topic). */
  flex: 0 0 auto;
  width: 100%;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: var(--ed-r);
  background: transparent;
  color: var(--ed-text-2);
  font-family: var(--ed-font-ui);
  font-size: calc(15px * var(--ed-fs));
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: color var(--ed-fast) var(--ed-ease), background-color var(--ed-fast) var(--ed-ease), border-color var(--ed-fast) var(--ed-ease);
}
.ed-guide__topic:hover { color: var(--ed-text); background: rgba(255, 176, 110, 0.07); }
.ed-guide__topic.is-current {
  color: var(--ed-gold-200);
  border-color: rgba(255, 176, 110, 0.32);
  background: rgba(255, 140, 60, 0.12);
  font-weight: 600;
}
.ed-guide__page {
  flex: 1;
  min-width: 0;
  padding: 18px 28px 26px;
  overflow-y: auto;
}
.ed-guide__title {
  margin: 0 0 10px;
  font-family: var(--ed-font-display);
  font-weight: 500;
  font-size: calc(22px * var(--ed-fs));
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--ed-gold-200);
}
.ed-guide__sub {
  margin: 20px 0 6px;
  font-size: calc(16px * var(--ed-fs));
  font-weight: 700;
  color: var(--ed-gold-300);
}
.ed-guide__p {
  margin: 0 0 10px;
  font-size: calc(15px * var(--ed-fs));
  line-height: 1.6;
  color: var(--ed-text);
  max-width: 64ch;
}
.ed-guide__list {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: calc(15px * var(--ed-fs));
  line-height: 1.6;
  color: var(--ed-text);
  max-width: 64ch;
}
.ed-guide__list li { margin: 3px 0; }
.ed-guide__list li::marker { color: var(--ed-ember-400); }
.ed-guide__p .ed-kbd, .ed-guide__list .ed-kbd { margin: 0 1px; }

/* ---- Class mastery (MasteryUI - the shrine in the town square, phase 4a) ---- */
/* The Guide's family: a window over the dimmed town, the body scrolls. Each
 * class a card: its name and rank, a bar to the next rank, and what that
 * rank gives. Nothing here animates (it sits over the live town). */
.ed-mastery { width: min(calc(820px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(700px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-mastery .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-mastery .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-mastery__body { flex: 1; min-height: 0; padding: 16px 24px 18px; }
.ed-mastery__intro {
  margin: 0 0 14px;
  font-size: calc(15px * var(--ed-fs));
  line-height: 1.6;
  color: var(--ed-text-2);
  max-width: 72ch;
}
.ed-mastery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(320px * var(--ed-fs)), 1fr)); gap: 10px; }
.ed-mastery__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r-lg);
  background: rgba(6, 5, 8, 0.32);
}
.ed-mastery__row.is-current { border-color: rgba(255, 176, 110, 0.45); background: rgba(255, 140, 60, 0.08); }
.ed-mastery__head { display: flex; align-items: baseline; gap: 8px; }
.ed-mastery__name { font-family: var(--ed-font-display); font-size: calc(17px * var(--ed-fs)); font-weight: 500; color: var(--ed-text); }
.ed-mastery__tag {
  padding: 1px 8px;
  border: 1px solid rgba(255, 176, 110, 0.35);
  border-radius: 999px;
  font-size: calc(12px * var(--ed-fs));
  font-weight: 600;
  color: var(--ed-gold-300);
}
.ed-mastery__rank { margin-left: auto; font-size: calc(15px * var(--ed-fs)); font-weight: 700; color: var(--ed-gold-300); }
.ed-mastery__row.is-max .ed-mastery__rank { color: var(--ed-gold-200); }
.ed-mastery__bar { height: 8px; overflow: hidden; border-radius: 4px; background: rgba(255, 236, 214, 0.08); }
.ed-mastery__fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #e2581c, #ff9a52 60%, #ffd08a); }
.ed-mastery__row.is-max .ed-mastery__fill { background: linear-gradient(90deg, #d4a256, #ffdca6); }
/* The track (round 2 part 25f): ten steps, a rank each, with what the rank gives drawn in it, and the class in its rank 10 skin at the end. */
.ed-mastery__track { display: flex; align-items: flex-start; gap: 3px; margin: 2px 0; }
.ed-mastery__step { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1 1 0; min-width: 0; max-width: 28px; }
.ed-mastery__step .ed-mastery__steppic { opacity: 0.45; } /* (the picture dims, never the number: 12 px words stay readable) */
.ed-mastery__step.is-reached .ed-mastery__steppic { opacity: 1; }
.ed-mastery__steppic {
  display: block;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed var(--ed-line-strong);
  border-radius: 6px;
  background: rgba(255, 236, 214, 0.03);
  image-rendering: pixelated;
}
.ed-mastery__steppic--dye { background: linear-gradient(135deg, var(--dye-a) 50%, var(--dye-b) 50%); }
.ed-mastery__step.is-reached .ed-mastery__steppic { border-style: solid; border-color: rgba(255, 220, 166, 0.55); }
.ed-mastery__step.is-current .ed-mastery__steppic { border-color: var(--ed-gold-200); box-shadow: 0 0 0 2px rgba(255, 176, 110, 0.35); }
.ed-mastery__stepnum { font-size: calc(12px * var(--ed-fs)); font-weight: 600; line-height: 1; color: var(--ed-text-3); }
.ed-mastery__step.is-current .ed-mastery__stepnum { color: var(--ed-gold-200); }
.ed-mastery__figure { display: block; flex: 0 0 auto; width: 36px; height: 36px; margin-left: auto; image-rendering: pixelated; } /* (the hero sheet's cell, texel for texel) */
.ed-mastery__points { font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-mastery__reward { font-size: calc(14px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text); }

/* ---- The town book (TownBookUI - its own key in town; proposal 8) ---- */
.ed-book { width: min(calc(900px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(700px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-book .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-book .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-book__body { flex: 1; min-height: 0; padding: 14px 24px 18px; }
.ed-book__intro { margin: 0 0 12px; font-size: calc(15px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-book__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 760px) { .ed-book__cols { grid-template-columns: minmax(0, 1fr); } }
.ed-book__title { margin: 0 0 10px; font-family: var(--ed-font-display); font-size: calc(19px * var(--ed-fs)); font-weight: 500; color: var(--ed-gold-300); }
.ed-book__section { margin: 0 0 14px; }
.ed-book__head { margin: 0 0 6px; font-size: calc(12px * var(--ed-fs)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ed-text-3); }
.ed-book__row { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; margin: 0 0 6px; border: 1px solid var(--ed-line); border-radius: var(--ed-r-lg); background: rgba(6, 5, 8, 0.32); }
.ed-book__row.is-ready { border-color: rgba(255, 176, 110, 0.45); background: rgba(255, 140, 60, 0.08); }
.ed-book__row.is-done { opacity: 0.6; }
.ed-book__rowhead { display: flex; align-items: baseline; gap: 8px; }
.ed-book__name { font-size: calc(14px * var(--ed-fs)); font-weight: 600; color: var(--ed-text); }
.ed-book__state { margin-left: auto; font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); white-space: nowrap; }
.ed-book__line { margin: 0; font-size: calc(13px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text-2); }
.ed-book__none { margin: 0; font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-book__pages { display: flex; flex-direction: column; gap: 6px; }
#ui-root .ed-book__page {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r-lg);
  background: rgba(6, 5, 8, 0.32);
}
#ui-root .ed-book__page:hover, #ui-root .ed-book__page:focus-visible { border-color: rgba(255, 176, 110, 0.55); background: rgba(255, 140, 60, 0.1); }
.ed-book__pagename { font-size: calc(15px * var(--ed-fs)); font-weight: 600; color: var(--ed-text); }
.ed-book__new { margin-left: 8px; vertical-align: middle; } /* (the "New" mark on What's new - round 2) */
.ed-book__pagetext { font-size: calc(13px * var(--ed-fs)); line-height: 1.4; color: var(--ed-text-3); }

/* ---- The Forge (ForgeUI - from the town book; proposal 10) ---- */
.ed-forge { width: min(calc(640px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(700px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-forge .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-forge .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-forge__body { flex: 1; min-height: 0; padding: 14px 24px 18px; }
.ed-forge__intro { margin: 0 0 12px; font-size: calc(15px * var(--ed-fs)); line-height: 1.55; color: var(--ed-text-2); }
.ed-forge__purse { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.ed-forge__purse-label { font-size: calc(12px * var(--ed-fs)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ed-text-3); }
.ed-forge__slag { font-size: calc(22px * var(--ed-fs)); font-weight: 700; color: var(--ed-gold-300); }
.ed-forge__notice { margin: 0 0 10px; font-size: calc(14px * var(--ed-fs)); color: var(--ed-gold-300); }
.ed-forge__list { display: flex; flex-direction: column; gap: 6px; }
.ed-forge__row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--ed-line); border-radius: var(--ed-r-lg); background: rgba(6, 5, 8, 0.32); }
.ed-forge__row.is-armed { border-color: rgba(255, 88, 114, 0.6); }
.ed-forge__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.ed-forge__name { font-size: calc(15px * var(--ed-fs)); font-weight: 600; color: var(--ed-text); }
.ed-forge__meta { font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-forge__gives { font-size: calc(14px * var(--ed-fs)); font-weight: 600; color: var(--ed-gold-300); white-space: nowrap; }
.ed-forge__tabs { padding: 10px 24px 0; }
.ed-forge__row.is-short .ed-forge__cost { color: var(--ed-text-3); }
.ed-forge__none { margin: 0; font-size: calc(14px * var(--ed-fs)); color: var(--ed-text-3); }
/* The Engrave tab (round 2 part 11): a piece's engraving on its row, and the name field under the row it is for. */
.ed-forge__engraved { font-size: calc(12.5px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-forge__engraved.is-on { color: var(--ed-gold-300); font-style: italic; }
.ed-forge__editor { display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px; margin-top: -4px; border: 1px solid var(--ed-line); border-top: 0; border-radius: 0 0 8px 8px; background: rgba(255, 236, 214, 0.03); }
.ed-forge__editor .ed-input { flex: 1; min-width: 0; }

/* ---- The profile (ProfileUI - character select; proposal 7) ---- */
.ed-profile { width: min(calc(820px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(700px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-profile .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-profile .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-profile__body { flex: 1; min-height: 0; padding: 16px 24px 18px; }
.ed-profile__intro { margin: 0 0 6px; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); }
.ed-profile__h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0 10px;
  font-family: var(--ed-font-display);
  font-size: calc(17px * var(--ed-fs));
  font-weight: 500;
  color: var(--ed-text);
}
.ed-profile__count { font-family: var(--ed-font-ui); font-size: calc(13px * var(--ed-fs)); font-weight: 400; color: var(--ed-text-3); }
.ed-profile__records { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(170px * var(--ed-fs)), 1fr)); gap: 10px; }
.ed-profile__record {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r-lg);
  background: rgba(6, 5, 8, 0.32);
}
.ed-profile__record-value { font-size: calc(20px * var(--ed-fs)); font-weight: 700; color: var(--ed-gold-300); }
.ed-profile__record-label { font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-profile__feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(320px * var(--ed-fs)), 1fr)); gap: 10px; }
.ed-profile__feat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 14px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r-lg);
  background: rgba(6, 5, 8, 0.32);
}
.ed-profile__feat.is-done { border-color: rgba(255, 176, 110, 0.45); background: rgba(255, 140, 60, 0.08); }
.ed-profile__feat-head { display: flex; align-items: baseline; gap: 8px; }
.ed-profile__feat-name { font-size: calc(15px * var(--ed-fs)); font-weight: 600; color: var(--ed-text); }
.ed-profile__feat-state { margin-left: auto; font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); white-space: nowrap; }
.ed-profile__feat.is-done .ed-profile__feat-state { font-weight: 700; color: var(--ed-gold-300); }
.ed-profile__feat-text { font-size: calc(13px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text-2); }
/* What a feat gives: its title (round 2 part 6). */
.ed-profile__feat-pays { font-size: calc(12px * var(--ed-fs)); line-height: 1.4; color: var(--ed-gold-300); }
.ed-profile__note { margin: 0 0 8px; font-size: calc(12.5px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text-3); }
.ed-profile__bar { height: 6px; overflow: hidden; border-radius: 3px; background: rgba(255, 236, 214, 0.08); }
.ed-profile__fill { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #e2581c, #ff9a52 60%, #ffd08a); }
.ed-profile__fallen { display: flex; flex-direction: column; gap: 6px; }
.ed-profile__fallen-row { padding: 8px 12px; border-left: 2px solid var(--ed-line); font-size: calc(14px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text-2); }
.ed-profile__none { margin: 0; font-size: calc(14px * var(--ed-fs)); color: var(--ed-text-3); }

/* ---- What shows in your room (RoomShowsUI - round 2 part 10b) ---- */
.ed-roomshows { width: min(calc(720px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(700px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-roomshows .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-roomshows .ed-modal__foot { justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px 16px; }
.ed-roomshows__body { flex: 1; min-height: 0; padding: 16px 24px 18px; display: flex; flex-direction: column; gap: 16px; }
.ed-roomshows__intro { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); }
.ed-roomshows__section { display: flex; flex-direction: column; gap: 8px; }
.ed-roomshows__head { display: flex; align-items: baseline; gap: 12px; }
.ed-roomshows__head .ed-btn { margin-left: auto; align-self: center; }
.ed-roomshows__h { margin: 0; font-family: var(--ed-font-display); font-size: calc(17px * var(--ed-fs)); font-weight: 600; color: var(--ed-gold-200); }
.ed-roomshows__count { font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-roomshows__note, .ed-roomshows__none { margin: 0; font-size: calc(13px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text-3); }
.ed-roomshows__rows { display: flex; flex-direction: column; gap: 5px; }
.ed-roomshows__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  box-sizing: border-box;
  border: 1px solid var(--ed-line);
  border-radius: 8px;
  background: rgba(255, 236, 214, 0.025);
  color: var(--ed-text-3);
  font: inherit;
  font-size: calc(14px * var(--ed-fs));
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--ed-fast) var(--ed-ease), border-color var(--ed-fast) var(--ed-ease), color var(--ed-fast) var(--ed-ease);
}
.ed-roomshows__row:hover { border-color: rgba(255, 176, 110, 0.6); color: var(--ed-text); background: rgba(255, 176, 110, 0.07); }
.ed-roomshows__row.is-on { border-color: #ffc08a; background: linear-gradient(180deg, rgba(255, 166, 98, 0.20), rgba(255, 122, 47, 0.10)); color: var(--ed-text); }
.ed-roomshows__mark { flex: none; color: var(--ed-text-3); }
.ed-roomshows__row.is-on .ed-roomshows__mark { color: var(--ed-gold-200); }
.ed-roomshows__notice { flex: 1; min-height: 1.4em; font-size: calc(13px * var(--ed-fs)); line-height: 1.4; color: var(--ed-gold-300); }

/* ---- Visit a room (RoomVisitUI - round 2 part 10c) ---- */
.ed-roomvisit { width: min(calc(520px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(620px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-roomvisit .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-roomvisit .ed-modal__foot { justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px 16px; }
.ed-roomvisit__body { flex: 1; min-height: 0; padding: 16px 24px 18px; display: flex; flex-direction: column; gap: 12px; }
.ed-roomvisit__intro { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); }
.ed-roomvisit__status { margin: 0; min-height: 1.4em; font-size: calc(14px * var(--ed-fs)); line-height: 1.4; color: var(--ed-gold-300); }
.ed-roomvisit__note { margin: 0; font-size: calc(13px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text-3); }
.ed-roomvisit__list { display: flex; flex-direction: column; gap: 5px; }
.ed-roomvisit__door {
  width: 100%;
  padding: 9px 12px;
  box-sizing: border-box;
  border: 1px solid var(--ed-line-strong);
  border-radius: 8px;
  background: rgba(255, 236, 214, 0.025);
  color: var(--ed-text);
  font: inherit;
  font-size: calc(15px * var(--ed-fs));
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--ed-fast) var(--ed-ease), border-color var(--ed-fast) var(--ed-ease);
}
.ed-roomvisit__door:hover { border-color: rgba(255, 176, 110, 0.6); background: rgba(255, 176, 110, 0.07); }
/* Your party (ui/PartyUI.js - round 2 part 13): the same window, a name and "Ask" on each row */
.ed-partywin__head { margin: 0; font-size: calc(13px * var(--ed-fs)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ed-text-2); }
.ed-partywin__ask { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ed-partywin__do { font-size: calc(13px * var(--ed-fs)); color: var(--ed-gold-300); }
/* ---- The season (ui/SeasonUI.js - round 2 part 16a) ---- */
.ed-season__body { display: flex; flex-direction: column; gap: 14px; }
.ed-season__name { font-family: var(--ed-font-display, var(--ed-font-ui)); font-size: calc(22px * var(--ed-fs)); font-weight: 700; color: var(--ed-gold-300); }
.ed-season__dates { margin-top: -10px; font-size: calc(14px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-season__sec { display: flex; flex-direction: column; gap: 6px; }
.ed-season__head { margin: 0; font-size: calc(13px * var(--ed-fs)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ed-text-2); }
.ed-season__line { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text); }
/* The season's track (round 2 part 16b2): the marks, the bar, twelve steps, the deeds. */
.ed-season__tracks { display: flex; flex-direction: column; gap: 14px; }
.ed-season__tracks:empty { display: none; }
.ed-season__bar { height: 8px; border-radius: 4px; background: var(--ed-surface-3, rgba(255, 255, 255, 0.08)); overflow: hidden; }
.ed-season__fill { display: block; height: 100%; background: var(--ed-gold-300); }
.ed-season__steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ed-season__step { display: grid; grid-template-columns: calc(72px * var(--ed-fs)) 1fr auto; gap: 10px; align-items: baseline; padding: 5px 8px; border-radius: 4px; font-size: calc(14px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-season__step.is-open { color: var(--ed-text); background: rgba(255, 196, 92, 0.08); }
.ed-season__stepno { font-weight: 700; }
.ed-season__stepmine { font-size: calc(12px * var(--ed-fs)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ed-gold-300); }
.ed-season__deeds { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 2px; font-size: calc(14px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text); }
.ed-season__note { font-size: calc(14px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-season__picks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ed-season__picked { font-size: calc(14px * var(--ed-fs)); color: var(--ed-gold-300); }
/* The season's board on its page (round 2 part 16c). */
.ed-season__board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ed-season__boardrow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: baseline; padding: 5px 8px; border-radius: 4px; font-size: calc(14px * var(--ed-fs)); color: var(--ed-text); background: rgba(255, 255, 255, 0.03); }
.ed-season__boardrow.is-you { box-shadow: inset 3px 0 0 var(--ed-gold-300); }
.ed-season__boardwho { font-weight: 600; }
.ed-season__boardrun { font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-season__say { min-height: 1.2em; font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-partywin__notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: calc(13px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text-3); }

/* ---- The stair's card (StairCardUI - the Archive, 2026-11-21 item 19) ---- */
/* RoomVisitUI's family: the way down, then a button for each fight to
 * practice. The list scrolls when it is long. */
.ed-stair { width: min(calc(520px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(680px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-stair .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-stair .ed-modal__foot { justify-content: flex-end; align-items: center; gap: 16px; padding: 14px 24px 16px; }
.ed-stair__body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px 18px; display: flex; flex-direction: column; gap: 10px; }
.ed-stair__intro { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); }
.ed-stair__note { margin: 0; min-height: 1.2em; font-size: calc(13px * var(--ed-fs)); line-height: 1.45; color: var(--ed-gold-300); }
.ed-stair__heading { margin: 8px 0 0; font-size: calc(16px * var(--ed-fs)); font-weight: 700; color: var(--ed-text); }
.ed-stair__list { display: flex; flex-direction: column; gap: 5px; }
.ed-stair__fight {
  width: 100%;
  padding: 9px 12px;
  box-sizing: border-box;
  border: 1px solid var(--ed-line-strong);
  border-radius: 8px;
  background: rgba(255, 236, 214, 0.025);
  color: var(--ed-text);
  font: inherit;
  font-size: calc(15px * var(--ed-fs));
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--ed-fast) var(--ed-ease), border-color var(--ed-fast) var(--ed-ease);
}
.ed-stair__fight:hover, .ed-stair__fight:focus-visible { border-color: rgba(255, 176, 110, 0.6); background: rgba(255, 176, 110, 0.07); }

/* ---- The event board (BoardUI - the town square, phase 5e) ---- */
/* MasteryUI's family: a window over the dimmed town, the body scrolls. The
 * day's three requests as cards (a villager's portrait, what they ask, how
 * far, their hearts and what the next gives), then every villager's regard
 * and the lines of their story told. Nothing here animates (it sits over
 * the live town). */
.ed-board { width: min(calc(860px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(780px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-board .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-board .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-board__footbuttons { display: flex; gap: 8px; }
.ed-board__body { flex: 1; min-height: 0; padding: 16px 24px 18px; display: flex; flex-direction: column; gap: 10px; }
.ed-board__intro, .ed-board__note, .ed-board__none { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); max-width: 72ch; }
.ed-board__note { font-size: calc(13.5px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-board__section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 6px; }
.ed-board__heading { margin: 0; font-family: var(--ed-font-display); font-size: calc(19px * var(--ed-fs)); font-weight: 500; color: var(--ed-gold-300); }
.ed-board__refresh { font-size: calc(13px * var(--ed-fs)); font-weight: 600; color: var(--ed-ember-300); }
/* PLAY WITH A FRIEND (2026-11-13, CrazyGames' frame - BoardUI._fillInvite):
 * the invite link in a field of its own, there to be copied. */
.ed-board__invitelink { height: 36px; font-size: calc(13px * var(--ed-fs)); }
.ed-board__invitelink[hidden] { display: none; }
/* ...and on its own, from the HUD's Invite a friend button (2026-11-14 -
 * ui/InviteUI.js InvitePanel): the same section in a small window. */
.ed-invite { width: min(calc(460px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); }
.ed-invite .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 22px 16px; }
.ed-invite__body { display: flex; flex-direction: column; gap: 12px; }
.ed-invite__body .ed-board__note[hidden] { display: none; }
.ed-board__requests { display: flex; flex-direction: column; gap: 8px; }
.ed-board__card, .ed-board__villager {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r-lg);
  background: rgba(6, 5, 8, 0.32);
}
.ed-board__card.is-ready { border-color: rgba(150, 214, 120, 0.5); background: rgba(110, 180, 80, 0.08); }
.ed-board__card.is-done { opacity: 0.72; }
.ed-board__card.is-grudge { border-color: rgba(232, 48, 74, 0.5); background: rgba(232, 48, 74, 0.07); }
.ed-board__card.is-grudge .ed-board__title { color: #ff9c9c; }
.ed-board__avenged { margin: 0; font-size: calc(13.5px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text-3); }
/* (the account's own list's label: a label, not a line - phase 3c) */
.ed-board__sublabel { margin-top: 6px; font-weight: 700; color: var(--ed-text-2); }
.ed-board__villager.is-full { border-color: rgba(255, 176, 110, 0.4); }
.ed-board__pic, .ed-board__vpic { image-rendering: pixelated; border-radius: var(--ed-r); background: rgba(216, 194, 122, 0.12); }
.ed-board__pic { width: 44px; height: 44px; }
.ed-board__vpic { width: 40px; height: 40px; }
.ed-board__text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ed-board__cardhead { display: flex; align-items: baseline; gap: 10px; }
/* A row's pin (round 2 part 25h2): the map's own pin, in its cyan when it is on this row. */
.ed-board__pin { flex: 0 0 auto; min-height: 26px; padding: 0 10px; border: 1px solid var(--ed-line-strong); border-radius: 999px; background: transparent; color: var(--ed-text-2); font-family: var(--ed-font-ui); font-size: calc(13px * var(--ed-fs)); font-weight: 600; cursor: pointer; }
.ed-board__pin:hover { border-color: rgba(143, 246, 255, 0.6); color: var(--ed-text); }
.ed-board__pin.is-on { border-color: #8ff6ff; background: rgba(143, 246, 255, 0.10); color: #8ff6ff; }
.ed-board__title, .ed-board__name { font-family: var(--ed-font-display); font-size: calc(16.5px * var(--ed-fs)); color: var(--ed-text); }
.ed-board__progress, .ed-board__points { margin-left: auto; font-size: calc(14px * var(--ed-fs)); font-weight: 700; color: var(--ed-gold-300); white-space: nowrap; }
.ed-board__card.is-ready .ed-board__progress { color: #b8e08a; }
.ed-board__card.is-done .ed-board__progress { color: var(--ed-text-3); }
.ed-board__line { font-size: calc(14px * var(--ed-fs)); line-height: 1.45; color: var(--ed-text-2); }
.ed-board__regardline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ed-board__hearts { display: inline-flex; gap: 2px; font-size: calc(14px * var(--ed-fs)); letter-spacing: 0; }
.ed-board__heart { color: rgba(255, 236, 214, 0.22); }
.ed-board__heart.is-full { color: #ff8fa8; }
.ed-board__chip {
  padding: 1px 8px;
  border: 1px solid rgba(255, 143, 168, 0.4);
  border-radius: 999px;
  font-size: calc(12px * var(--ed-fs));
  font-weight: 600;
  color: #ffb4c4;
}
.ed-board__next { font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-board__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(360px * var(--ed-fs)), 1fr)); gap: 8px; }
.ed-board__story { font-size: calc(13.5px * var(--ed-fs)); line-height: 1.45; font-style: italic; color: var(--ed-text-2); }

/* ---- The wardrobe (WardrobeUI - in the Lantern, phase 4b) ---- */
/* MasteryUI's family: a window over the dimmed town, the body scrolls.
 * Classes as chips; the class drawn four ways beside its dyes; the title
 * row; the balance and any refusal. A dye's two tones come in as custom
 * properties on its button (--dye-a, --dye-a2, --dye-b, --dye-b2). Nothing
 * here animates (it sits over the live town). */
/* The account's mastery, over the classes' rows (2026-11-30 - MasteryUI). */
.ed-mastery__account { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--ed-line); border-radius: var(--ed-r-lg); background: rgba(6, 5, 8, 0.32); }
.ed-mastery__account .ed-emblem { width: calc(22px * var(--ed-fs)); height: calc(22px * var(--ed-fs)); }
.ed-mastery__accountwords { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ed-mastery__accounthead { font-size: calc(14.5px * var(--ed-fs)); font-weight: 700; color: var(--ed-gold-300); }
.ed-mastery__accountnote { font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-wardrobe { width: min(calc(860px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(760px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-wardrobe .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-wardrobe .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-wardrobe__body { flex: 1; min-height: 0; padding: 16px 24px 18px; display: flex; flex-direction: column; gap: 14px; }
.ed-wardrobe__intro { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); max-width: 72ch; }
.ed-wardrobe__classes, .ed-wardrobe__titles { display: flex; flex-wrap: wrap; gap: 6px; }
/* The dyes' filters (round 2 part 25e): a row of chips over the list, each with how many it shows. */
.ed-wardrobe__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ed-wardrobe__filtername { font-size: calc(13.5px * var(--ed-fs)); font-weight: 600; color: var(--ed-text-2); margin-right: 4px; }
.ed-wardrobe__filter { font-size: calc(13px * var(--ed-fs)); }
.ed-wardrobe__main { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.ed-wardrobe__preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r-lg);
  background: rgba(6, 5, 8, 0.32);
  /* in view while the dyes scroll (2026-11-30 - WardrobeUI: the left column) */
  position: sticky;
  top: 0;
  z-index: 1;
}
.ed-wardrobe__right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ed-wardrobe__views { display: grid; grid-template-columns: repeat(2, auto); gap: 4px; }
.ed-wardrobe__view { width: calc(108px * var(--ed-fs)); height: calc(108px * var(--ed-fs)); image-rendering: pixelated; border-radius: var(--ed-r); background: rgba(255, 236, 214, 0.04); }
/* Your look: what goes with the hero, and the one kept on this device (round 2 part 25o2). */
.ed-wardrobe__look { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--ed-line-faint); text-align: left; align-self: center; width: 100%; max-width: calc(300px * var(--ed-fs)); }
.ed-wardrobe__looktitle { margin: 0; font-size: calc(14.5px * var(--ed-fs)); font-weight: 700; color: var(--ed-gold-300); }
.ed-wardrobe__looknow, .ed-wardrobe__looksaved { font-size: calc(13.5px * var(--ed-fs)); line-height: 1.5; color: var(--ed-text-2); }
.ed-wardrobe__lookbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.ed-wardrobe__lookbtn { font-size: calc(13px * var(--ed-fs)); }
.ed-wardrobe__looknote { font-size: calc(12.5px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-wardrobe__shown { font-family: var(--ed-font-display); font-size: calc(16px * var(--ed-fs)); color: var(--ed-gold-300); }
.ed-wardrobe__dyes { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(158px * var(--ed-fs)), 1fr)); gap: 6px; }
.ed-wardrobe__dye {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r);
  background: rgba(255, 236, 214, 0.025);
  color: var(--ed-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ed-wardrobe__dye:hover, .ed-wardrobe__dye:focus-visible { border-color: rgba(255, 176, 110, 0.6); background: rgba(255, 176, 110, 0.07); }
.ed-wardrobe__dye.is-worn { border-color: #ffc08a; background: linear-gradient(180deg, rgba(255, 166, 98, 0.22), rgba(255, 122, 47, 0.10)); cursor: default; }
.ed-wardrobe__dye.is-locked { border-style: dashed; cursor: default; }
.ed-wardrobe__dye.is-locked .ed-wardrobe__dyename { color: var(--ed-text-2); }
.ed-wardrobe__swatch {
  grid-row: 1 / span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 6px;
}
.ed-wardrobe__tone--a { background: linear-gradient(180deg, var(--dye-a, transparent) 55%, var(--dye-a2, transparent) 55%); }
.ed-wardrobe__tone--b { background: linear-gradient(180deg, var(--dye-b, transparent) 55%, var(--dye-b2, transparent) 55%); }
.ed-wardrobe__swatch.is-none { border-style: dashed; border-color: var(--ed-line-strong); background: rgba(255, 236, 214, 0.04); }
.ed-wardrobe__dyename { font-size: calc(14px * var(--ed-fs)); font-weight: 600; }
.ed-wardrobe__dyestate { font-size: calc(12.5px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-wardrobe__dye.is-worn .ed-wardrobe__dyestate { color: var(--ed-gold-300); font-weight: 700; }
.ed-wardrobe__dye.is-buy .ed-wardrobe__dyestate { color: var(--ed-gold-300); }
.ed-wardrobe__dye.is-short .ed-wardrobe__dyestate { color: var(--ed-text-3); }
.ed-wardrobe__section { display: flex; flex-direction: column; gap: 6px; }
/* The Gleaming dyes not owned yet (the bestiary's phase 3b): one line under
 * the list, across it. */
.ed-wardrobe__gleamnote { grid-column: 1 / -1; margin: 4px 0 0; font-size: calc(13px * var(--ed-fs)); line-height: 1.5; color: var(--ed-text-3); }
/* A class's own looks (phase 4d): its skin and its gravestone, each a
 * button like a dye's, a small picture in the swatch's place; worn is a
 * toggle here (a click takes it off), so it keeps the pointer. */
.ed-wardrobe__looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(220px * var(--ed-fs)), 1fr)); gap: 6px; }
.ed-wardrobe__look.is-worn { cursor: pointer; }
.ed-wardrobe__lookpic { grid-row: span 2; width: 36px; height: 36px; image-rendering: pixelated; border-radius: var(--ed-r); background: rgba(255, 236, 214, 0.05); }
.ed-wardrobe__head { margin: 0; font-family: var(--ed-font-display); font-size: calc(17px * var(--ed-fs)); font-weight: 500; color: var(--ed-text); }
.ed-wardrobe__note, .ed-wardrobe__none { margin: 0; font-size: calc(13.5px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-wardrobe__status { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; }
.ed-wardrobe__embers { font-size: calc(14px * var(--ed-fs)); font-weight: 600; color: var(--ed-gold-300); }
.ed-wardrobe__notice { flex: 1; min-width: 0; text-align: center; font-size: calc(14px * var(--ed-fs)); color: var(--ed-ember-300); }
@media (max-width: 640px) {
  .ed-wardrobe__main { grid-template-columns: 1fr; }
  .ed-wardrobe__preview { position: static; } /* one column: it would cover the list */
}

/* ---- The companion pen (PenUI - west of the town square, phase 4c) ---- */
/* The wardrobe's family. Each companion a card: its picture, its name, a
 * bar to the next stage, its trick, and two chips (out, feed); the feed
 * chip opens the backpack's food below its card. Nothing animates. */
.ed-pen { width: min(calc(760px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(720px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-pen .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-pen .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-pen__body { flex: 1; min-height: 0; padding: 16px 24px 18px; display: flex; flex-direction: column; gap: 12px; }
.ed-pen__intro, .ed-pen__empty { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); max-width: 72ch; }
.ed-pen__treats { margin: 0; font-size: calc(14px * var(--ed-fs)); line-height: 1.5; color: #ffb4c4; }
/* Brann's stall (phase 5f2): his words and the buy button on one line, wrapping on a narrow window. */
.ed-pen__shop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 8px; }
.ed-pen__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(320px * var(--ed-fs)), 1fr)); gap: 10px; }
.ed-pen__row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r-lg);
  background: rgba(6, 5, 8, 0.32);
}
.ed-pen__row.is-out { border-color: rgba(255, 176, 110, 0.45); background: rgba(255, 140, 60, 0.08); }
.ed-pen__pic { width: 72px; height: 60px; image-rendering: pixelated; border-radius: var(--ed-r); background: rgba(216, 194, 122, 0.12); }
.ed-pen__text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ed-pen__name { font-family: var(--ed-font-display); font-size: calc(17px * var(--ed-fs)); color: var(--ed-text); }
.ed-pen__bar { height: 8px; overflow: hidden; border-radius: 4px; background: rgba(255, 236, 214, 0.08); }
.ed-pen__fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #8ab84a, #d8e07a); }
.ed-pen__stage { font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-pen__trick { font-size: calc(13.5px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-pen__buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ed-pen__food { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border: 1px dashed var(--ed-line-strong); border-radius: var(--ed-r-lg); }
.ed-pen__item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r);
  background: rgba(255, 236, 214, 0.025);
  color: var(--ed-text);
  font: inherit;
  font-size: calc(13.5px * var(--ed-fs));
  cursor: pointer;
}
.ed-pen__item:hover, .ed-pen__item:focus-visible { border-color: rgba(255, 176, 110, 0.6); background: rgba(255, 176, 110, 0.07); }
/* Asked once, a press away from feeding (the phase 4 review, U6). */
.ed-pen__item.is-armed { flex-wrap: wrap; border-color: var(--ed-ember-300); background: rgba(255, 120, 60, 0.14); }
.ed-pen__itemgrowth { color: #b8d86a; font-weight: 700; }
.ed-pen__none { margin: 0; font-size: calc(13.5px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-pen__notice { flex: 1; min-width: 0; text-align: center; font-size: calc(14px * var(--ed-fs)); color: var(--ed-ember-300); }
.ed-pen__itemask { flex-basis: 100%; font-size: calc(12.5px * var(--ed-fs)); color: var(--ed-ember-300); }

/* ---- Tam's trades (TamUI - phase 5f3): the pen's family; his trades are
 * buttons like the wardrobe's dyes. ---- */
.ed-tam { width: min(calc(720px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(680px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-tam .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-tam .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-tam__body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px 18px; display: flex; flex-direction: column; gap: 10px; }
.ed-tam__intro { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); max-width: 72ch; }
.ed-tam__catch { margin: 0; font-size: calc(14px * var(--ed-fs)); line-height: 1.5; color: #8fd8e8; }
.ed-tam__have { margin: 0; font-size: calc(14px * var(--ed-fs)); line-height: 1.5; color: var(--ed-gold-300); }
.ed-tam__trades { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(200px * var(--ed-fs)), 1fr)); gap: 6px; }
.ed-tam__notice { flex: 1; min-width: 0; text-align: center; font-size: calc(14px * var(--ed-fs)); color: var(--ed-ember-300); }

/* ---- Dagna's caravan (DagnaUI - phase 5f4): Tam's family; her goods are
 * buttons like the wardrobe's dyes, with where each comes from, and her
 * request of the week is the board's card. ---- */
.ed-dagna { width: min(calc(760px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(720px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-dagna .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-dagna .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-dagna__body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px 18px; display: flex; flex-direction: column; gap: 10px; }
.ed-dagna__intro { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); max-width: 72ch; }
.ed-dagna__pet { margin: 0; font-size: calc(14px * var(--ed-fs)); line-height: 1.5; color: #f0c98a; }
.ed-dagna__have { margin: 0; font-size: calc(14px * var(--ed-fs)); line-height: 1.5; color: var(--ed-gold-300); }
.ed-dagna__goods { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(210px * var(--ed-fs)), 1fr)); gap: 6px; }
.ed-dagna__good { grid-template-rows: auto auto auto; }
.ed-dagna__good .ed-wardrobe__swatch { grid-row: 1 / span 3; }
.ed-dagna__goodfrom { font-size: calc(12.5px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-dagna__heading { margin: 8px 0 0; font-family: var(--ed-font-display); font-size: calc(16px * var(--ed-fs)); font-weight: 600; color: var(--ed-gold-300); }
.ed-dagna__note { margin: 0; font-size: calc(13.5px * var(--ed-fs)); line-height: 1.5; color: var(--ed-text-3); }
.ed-dagna__notice { flex: 1; min-width: 0; text-align: center; font-size: calc(14px * var(--ed-fs)); color: var(--ed-ember-300); }

/* ---- The Hall of Legends (LegendsUI - the book in the Archive, phase 4e) ---- */
/* The wardrobe's family, read only: three lists - finales, the Descent,
 * the fallen - each row its line, who was there, and when. Nothing
 * animates. */
.ed-legends { width: min(calc(720px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); max-height: min(calc(760px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-legends .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-legends .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
/* The class chips under the title (round 2 part 25n2). */
.ed-legends__classes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 24px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-legends__classes[hidden] { display: none; }
.ed-legends__classname { font-size: calc(13.5px * var(--ed-fs)); font-weight: 600; color: var(--ed-text-2); margin-right: 4px; }
.ed-legends__classbtn { font-size: calc(13px * var(--ed-fs)); }
.ed-legends__body { flex: 1; min-height: 0; padding: 16px 24px 18px; display: flex; flex-direction: column; gap: 14px; }
.ed-legends__intro { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); max-width: 72ch; }
.ed-legends__note { margin: 0; font-size: calc(13.5px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-legends__section { display: flex; flex-direction: column; gap: 6px; }
.ed-legends__head { margin: 0; font-family: var(--ed-font-display); font-size: calc(17px * var(--ed-fs)); font-weight: 500; color: var(--ed-gold-300); }
.ed-legends__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ed-legends__row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  padding: 7px 10px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r);
  background: rgba(255, 236, 214, 0.025);
}
.ed-legends__row.is-won { border-color: rgba(255, 192, 110, 0.45); }
.ed-legends__row.is-you { box-shadow: inset 3px 0 0 var(--ed-gold-300); }
.ed-legends__main { font-size: calc(14px * var(--ed-fs)); font-weight: 600; color: var(--ed-text); }
.ed-legends__sub { grid-column: 1; font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-legends__when { grid-column: 2; grid-row: 1; font-size: calc(12.5px * var(--ed-fs)); color: var(--ed-text-3); white-space: nowrap; }
.ed-legends__dive-note { margin-bottom: -6px; }
.ed-legends__empty { font-size: calc(13.5px * var(--ed-fs)); color: var(--ed-text-3); padding: 4px 2px; }

/* ---- The Bestiary (BestiaryUI - Yew's desk in the Archive, the bestiary's phase 2g) ---- */
/* The Hall of Legends' family: the chapters as tabs, each family's pages
 * as tiles on the left (that column scrolls), the page picked on the
 * right (it scrolls on its own). Nothing here animates: the one moving
 * thing is a full page's live picture, a canvas the town's frame draws. */
.ed-bestiary { width: min(calc(1000px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); height: min(calc(780px * var(--ed-fs)), calc(var(--ed-vh, 100vh) - 48px)); }
.ed-bestiary .ed-modal__head { padding: 20px 24px 12px; border-bottom: 1px solid var(--ed-line-faint); }
.ed-bestiary .ed-modal__foot { justify-content: space-between; align-items: center; padding: 14px 24px 16px; }
.ed-bestiary__body { flex: 1; min-height: 0; padding: 14px 24px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.ed-bestiary__intro { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text-2); max-width: 80ch; }
.ed-bestiary__note { margin: 0; font-size: calc(13.5px * var(--ed-fs)); color: var(--ed-text-3); }
.ed-bestiary__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
/* NEARLY FULL, and the order (round 2 part 25b): a row of chips over the tabs, and two under them. */
.ed-bestiary__nearly, .ed-bestiary__sort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ed-bestiary__nearly[hidden] { display: none; }
.ed-bestiary__nearname, .ed-bestiary__sortname { font-size: calc(13.5px * var(--ed-fs)); font-weight: 600; color: var(--ed-text-2); margin-right: 4px; }
.ed-bestiary__nearbtn, .ed-bestiary__sortbtn { font-size: calc(13px * var(--ed-fs)); }
.ed-bestiary__tab {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r);
  background: rgba(255, 236, 214, 0.025);
  color: var(--ed-text-2);
  font: inherit;
  font-size: calc(14.5px * var(--ed-fs));
  font-weight: 600;
  cursor: pointer;
}
.ed-bestiary__tab:hover { color: var(--ed-text); border-color: rgba(255, 176, 110, 0.5); background: rgba(255, 176, 110, 0.06); }
.ed-bestiary__tab.is-current { color: var(--ed-gold-200); border-color: #ffc08a; background: linear-gradient(180deg, rgba(255, 166, 98, 0.22), rgba(255, 122, 47, 0.10)); }
.ed-bestiary__tabcount { font-size: calc(12.5px * var(--ed-fs)); font-weight: 500; color: var(--ed-text-3); }
.ed-bestiary__main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) calc(392px * var(--ed-fs)); gap: 16px; }
.ed-bestiary__grid { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 2px 6px 8px 2px; }
.ed-bestiary__family { display: flex; flex-direction: column; gap: 6px; }
.ed-bestiary__famhead { display: flex; align-items: baseline; gap: 10px; }
.ed-bestiary__famname { margin: 0; font-family: var(--ed-font-display); font-size: calc(17px * var(--ed-fs)); font-weight: 500; color: var(--ed-gold-300); }
.ed-bestiary__famcount { margin-left: auto; font-size: calc(13px * var(--ed-fs)); color: var(--ed-text-3); white-space: nowrap; }
.ed-bestiary__family.is-done .ed-bestiary__famcount { color: var(--ed-gold-300); font-weight: 700; }
.ed-bestiary__reward { margin: 0; font-size: calc(13.5px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-bestiary__family.is-done .ed-bestiary__reward { color: var(--ed-gold-300); }
.ed-bestiary__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(92px * var(--ed-fs)), 1fr)); gap: 6px; }
.ed-bestiary__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 6px 4px 7px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r);
  background: rgba(255, 236, 214, 0.025);
  color: var(--ed-text);
  font: inherit;
  cursor: pointer;
}
.ed-bestiary__tile:hover { border-color: rgba(255, 176, 110, 0.6); background: rgba(255, 176, 110, 0.07); }
.ed-bestiary__tile.is-unseen { background: rgba(6, 5, 8, 0.35); }
.ed-bestiary__tile.is-full { border-color: rgba(255, 210, 140, 0.55); background: rgba(255, 196, 110, 0.07); }
.ed-bestiary__tile.is-current { border-color: #ffc08a; box-shadow: inset 0 0 0 1px #ffc08a; background: rgba(255, 140, 60, 0.12); }
.ed-bestiary__pic { width: 64px; height: 64px; image-rendering: pixelated; }
.ed-bestiary__tilename { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(12.5px * var(--ed-fs)); color: var(--ed-text-2); }
.ed-bestiary__tile.is-full .ed-bestiary__tilename { color: var(--ed-gold-300); }
.ed-bestiary__tile.is-unseen .ed-bestiary__tilename { color: var(--ed-text-3); }
.ed-bestiary__bar { display: block; width: 100%; height: 5px; overflow: hidden; border-radius: 3px; background: rgba(255, 236, 214, 0.08); }
.ed-bestiary__bar--page { height: 8px; border-radius: 4px; flex: none; } /* (flex: none - round 2 part 25b: the page is a column that shrinks what it holds when its words run long, and an open page with a Gleaming box under it lost its bar to that) */
.ed-bestiary__fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a85cff, #ff9a52); }
.ed-bestiary__page {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 18px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-r-lg);
  background: rgba(6, 5, 8, 0.32);
}
.ed-bestiary__stage { flex: 0 0 auto; align-self: center; width: 360px; max-width: 100%; height: auto; aspect-ratio: 360 / 200; image-rendering: pixelated; border-radius: var(--ed-r); }
.ed-bestiary__portrait { flex: 0 0 auto; align-self: center; width: 128px; height: 128px; image-rendering: pixelated; border-radius: var(--ed-r); background: rgba(255, 236, 214, 0.04); }
.ed-bestiary__name { margin: 6px 0 0; font-family: var(--ed-font-display); font-size: calc(21px * var(--ed-fs)); font-weight: 500; color: var(--ed-gold-200); }
.ed-bestiary__where, .ed-bestiary__count { margin: 0; font-size: calc(13.5px * var(--ed-fs)); color: var(--ed-text-3); }
/* A page's way to the map and what its foe drops (round 2 part 25n1). */
.ed-bestiary__whererow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.ed-bestiary__mapbtn { flex: none; font-size: calc(13px * var(--ed-fs)); }
.ed-bestiary__drops { margin: 0; padding-left: 18px; }
.ed-bestiary__drop { font-size: calc(14.5px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text); }
.ed-bestiary__sub { margin: 10px 0 0; font-size: calc(14.5px * var(--ed-fs)); font-weight: 700; color: var(--ed-gold-300); }
.ed-bestiary__p { margin: 0; font-size: calc(14.5px * var(--ed-fs)); line-height: 1.6; color: var(--ed-text); }
/* a boss's attacks by phase (2026-11-20 - data/BossMoves.js): one line a phase */
.ed-bestiary__moves { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.ed-bestiary__move { font-size: calc(14px * var(--ed-fs)); line-height: 1.5; color: var(--ed-text); }
/* A Gleaming slot (the bestiary's phase 3b): its picture beside its words; a
 * tile whose Gleaming one is caught wears a gold mark in its corner. */
.ed-bestiary__tile { position: relative; }
.ed-bestiary__gleammark { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; background: #ffe08a; transform: rotate(45deg); box-shadow: 0 0 0 1px rgba(30, 20, 36, 0.8); }
.ed-bestiary__gleam { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; margin-top: 12px; padding: 10px; border: 1px solid var(--ed-line); border-radius: var(--ed-r); background: rgba(255, 236, 214, 0.03); }
.ed-bestiary__gleam.is-caught { border-color: rgba(255, 224, 138, 0.55); background: rgba(255, 224, 138, 0.06); }
.ed-bestiary__gleampic { width: 64px; height: 64px; image-rendering: pixelated; }
.ed-bestiary__gleamtext .ed-bestiary__sub { margin-top: 0; }
@media (max-width: 760px) {
  .ed-bestiary__main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
}

/* KEEP YOUR HERO (2026-11-12, the guest start - ui/KeepHeroUI.js): a modal
 * like Settings', over the select screen or the game. */
.ed-keep { width: min(calc(440px * var(--ed-fs)), calc(var(--ed-vw, 100vw) - 32px)); }
.ed-keep__body { display: flex; flex-direction: column; gap: 14px; }
.ed-keep__lede { margin: 0; font-size: calc(15px * var(--ed-fs)); line-height: 1.5; color: var(--ed-text-2); }
.ed-keep__status[hidden] { display: none; }
.ed-keep__foot { align-items: center; justify-content: space-between; }
.ed-keep__ways { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.ed-settings__keep { margin-top: 6px; }
/* The prompt (services/KeepHero.js) sits where the tips do, with two buttons. */
.ed-keep-prompt { align-items: center; cursor: default; }
.ed-keep-prompt__ways { display: inline-flex; gap: 6px; flex: none; }
