/* Study Quest — panels.css · EMBER & IRON (docs/DESIGN.md is law)
 * Content styles for windows, dialogs, cards and the full-screen character creation / select screens (ui-panels.js).
 * The window frame itself (forged iron band, bronze rim, thorned corners, riveted title plate) is base.css's
 * .window.frame. Reading happens on parchment pages held inside iron (.parchment: Quest Log, Handbook, letters): ink,
 * oxblood heads, initials, ember/oxblood bullets. Playing happens on dark (smoked-steel window bodies): bronze
 * hairlines, recessed iron sockets, iron plates; ember marks only the selection, focus and the one main action.
 * Module rule (DESIGN §14): no rules for .codex-* / .cx-* here — only this module's own classes.
 */

/* ============================================================== shared bits */
.window, .modal, .sqp-overlay, .sqp-card {
  /* a recessed iron socket sunk into the smoked steel: the box everything sits in on dark */
  --well: linear-gradient(180deg, rgba(5, 6, 7, 0.62), rgba(14, 16, 19, 0.5));
  --well-sh: inset 0 0 0 1px rgba(176, 122, 60, 0.22), inset 0 2px 7px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(196, 204, 214, 0.04);
  --gilt: rgba(176, 122, 60, 0.7);          /* legacy name: the bronze hairline */
  --gilt-dim: rgba(176, 122, 60, 0.34);
  --rule-gilt: linear-gradient(90deg, rgba(226, 181, 106, 0.7), rgba(176, 122, 60, 0.35) 45%, rgba(176, 122, 60, 0));
}
.window.sqp { max-width: calc(100vw - 32px); max-height: calc(100vh - 86px); }
.window.sqp .win-body { padding: 12px 16px 16px; }
.window.sqp .win-body::-webkit-scrollbar { width: 10px; }

/* iron tabs on a bronze base line; the active tab is lighter iron with an ember underline and a glow rising from below */
.sqp-tabs { display: flex; align-items: flex-end; gap: 3px; margin: 0 -2px 12px; padding: 0 6px; border-bottom: 2px solid var(--cx-bronze-2); box-shadow: 0 1px 0 #000, 0 -1px 0 rgba(226, 181, 106, 0.15) inset; }
.sqp-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 -2px;
  padding: 7px 14px 6px;
  font: 700 var(--cx-fs-h3)/1 var(--cx-font-label);
  letter-spacing: 0.05em;
  color: var(--cx-text-dim);
  text-shadow: 0 1px 0 #000;
  background: var(--cx-tex-iron), linear-gradient(180deg, #2a2e33, #141619);
  border: 1px solid #000;
  border-bottom: 0;
  border-radius: var(--cx-r-3) var(--cx-r-3) 0 0;
  box-shadow: inset 0 1px 0 rgba(196, 204, 214, 0.13), inset 0 0 0 1px rgba(176, 122, 60, 0.22);
  cursor: pointer;
  transition: color var(--cx-dur-quick);
}
.sqp-tab:hover { color: var(--cx-text); }
.sqp-tab.active {
  padding-top: 10px;
  color: var(--cx-gold-leaf);
  background: linear-gradient(90deg, rgba(255, 138, 61, 0), var(--cx-torch) 30%, var(--cx-torch) 70%, rgba(255, 138, 61, 0)) left 4px bottom 0 / calc(100% - 8px) 2px no-repeat, radial-gradient(ellipse at 50% 130%, rgba(255, 138, 61, 0.3), rgba(255, 138, 61, 0) 70%), var(--cx-tex-iron), linear-gradient(180deg, #3e434a, #1d2024 75%, #17191c);
  box-shadow: inset 0 1px 0 rgba(196, 204, 214, 0.2), inset 0 0 0 1px rgba(226, 181, 106, 0.6);
  z-index: 1;
}
.sqp-tab:focus { outline: none; }
.sqp-tab:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: -3px; }
.sqp-badge {
  font: 700 11px/15px var(--cx-font-num);
  min-width: 18px;
  padding: 0 4px;
  text-align: center;
  color: #ebe4d6;
  background: linear-gradient(180deg, #1d2024, #0c0e10);
  border: 1px solid #000;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.45);
}
.sqp-tabs-parch { margin-bottom: 10px; }

/* section heading: carved Cinzel in molten gold, a bronze rule running out to the right */
.sqp-section { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; }
.sqp-section::after { content: ''; flex: 1; height: 1px; background: var(--rule-gilt); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); order: 1; }
.sqp-section > :not(.sqp-section-title) { order: 2; }
.sqp-section-title { font: 700 var(--cx-fs-h2)/1.1 var(--cx-font-head); letter-spacing: 0.03em; color: var(--cx-gold-text); text-shadow: var(--cx-sh-text-gold); }
.sqp-section-sub { font: 400 14px/1.3 var(--cx-font-body); color: var(--cx-text-dim); }
.sqp-section .btn-small .icon { width: 10px; height: 10px; }

/* thin progress bar: an iron channel, molten fill */
.sqp-bar { height: 8px; border: 1px solid #000; border-radius: 2px; background: linear-gradient(180deg, #040405, #0c0e10 60%, #15181c); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 0 1px #3a3f46; overflow: hidden; }
.sqp-bar-fill { height: 100%; background: var(--cx-bar-enamel), var(--cx-bar-capital); transition: width 0.4s var(--cx-ease); }

/* notes: a recessed socket with an ember-red rule in the margin */
.sqp-note {
  margin: 8px 0;
  padding: 8px 12px 8px 14px;
  font: 400 15px/1.45 var(--cx-font-body);
  color: var(--cx-text);
  background: var(--well);
  border: 1px solid rgba(0, 0, 0, 0.6);
  border-left: 3px solid var(--cx-vermilion);
  border-radius: 0 3px 3px 0;
  box-shadow: var(--well-sh);
}
.sqp-note.muted { color: var(--cx-text-dim); background: transparent; border-color: transparent; border-left-color: var(--cx-bronze-2); box-shadow: none; }
.sqp-note.gold { border-left-color: var(--cx-gold-3); color: var(--cx-text); }
.sqp-note.warn { border-left-color: var(--cx-torch); }
.sqp-note code { font-size: 12px; color: var(--cx-gold-leaf); }

.sqp-empty { text-align: center; color: var(--cx-text-dim); padding: 22px 14px; font: 700 17px/1.3 var(--cx-font-head); letter-spacing: 0.03em; }
.sqp-empty small { display: block; font: 400 15px/1.45 var(--cx-font-body); letter-spacing: 0; margin-top: 6px; max-width: 420px; margin-left: auto; margin-right: auto; }
.parchment .sqp-empty, .sqp-parch .sqp-empty { color: var(--cx-ink-text-dim); }
.sqp-loading { color: var(--cx-text-dim); padding: 20px; text-align: center; font: italic 500 17px/1.4 var(--cx-font-flavor); }
.sqp-red, .sqp-tt-red { color: var(--cx-vermilion-hi); }
.tooltip .sqp-tt-red { color: var(--cx-vermilion-hi); }
.sqp-form-error { color: var(--cx-vermilion-hi); font-size: 14px; min-height: 0; margin: 4px 0; }
.sqp-form-error:empty { margin: 0; }

.sqp-flash {
  position: sticky; top: -10px; z-index: 5; margin: -4px 0 10px; padding: 7px 12px; border-radius: 2px;
  font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.03em; text-align: center; animation: sqpFlashIn var(--cx-dur-calm) var(--cx-ease);
  background: var(--cx-caps), var(--cx-bg-ink); color: #ffb39a; border: 1px solid #000;
  box-shadow: inset 0 0 0 1px rgba(232, 97, 59, 0.75), inset 0 0 0 3px rgba(5, 5, 6, 0.85), 0 4px 14px rgba(0, 0, 0, 0.6);
  transition: opacity 0.35s;
}
.sqp-flash.ok { color: #c6e2d6; box-shadow: inset 0 0 0 1px rgba(134, 176, 165, 0.75), inset 0 0 0 3px rgba(5, 5, 6, 0.85), 0 4px 14px rgba(0, 0, 0, 0.6); }
/* window-level flashes float over the top of the window instead of pushing the content down */
.win-body > .sqp-flash { margin: -4px 0 -30px; min-height: 34px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.sqp-flash.out { opacity: 0; }
@keyframes sqpFlashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.sqp-shake { animation: sqpShake 0.36s ease; }
@keyframes sqpShake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

.sqp-row { display: flex; align-items: center; gap: 10px; }
/* an armed (second-press) destructive button: base.css .btn.armed (hot oxblood plate, a static ember-red glow) */
.btn .icon { vertical-align: -0.15em; }
.btn kbd { font-size: 11px; padding: 0 3px; margin-left: 4px; opacity: 0.9; }
.btn-primary kbd { color: #f7e3b2; text-shadow: 0 1px 0 #000; background: rgba(20, 12, 4, 0.35); border-color: rgba(20, 12, 4, 0.7); box-shadow: none; }

/* toggles: a forged slide-bolt in a slot with a bronze knob; shot home (on), an ember line glows in the slot */
.sqp-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.sqp-toggle input, .cc-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sqp-switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 18px;
  border: 1px solid #000;
  border-radius: 2px;
  background:
    linear-gradient(rgba(134, 176, 165, 0), rgba(134, 176, 165, 0)) left 4px bottom 3px / calc(100% - 8px) 1px no-repeat,
    linear-gradient(180deg, #040405, #121417);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(176, 122, 60, 0.42), 0 1px 0 1px rgba(196, 204, 214, 0.06);
}
.sqp-switch::after {
  /* the bolt: an iron bar with a bronze knob */
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 12px;
  background:
    radial-gradient(circle at 42% 36%, #ffe6b0 0, #d29a52 1.6px, #7a5228 3.8px, #2c1a08 5.2px, rgba(0, 0, 0, 0) 5.8px) right 0 center / 12px 12px no-repeat,
    linear-gradient(180deg, #7d848c 0%, #3a3f46 45%, #16181b 100%) left 0 center / 18px 8px no-repeat;
  transition: transform var(--cx-dur-calm) var(--cx-ease);
}
input:checked + .sqp-switch {
  background:
    linear-gradient(90deg, var(--cx-candle), var(--cx-torch)) left 4px bottom 3px / 12px 2px no-repeat,
    radial-gradient(ellipse 30% 100% at 20% 100%, rgba(255, 138, 61, 0.35), rgba(255, 138, 61, 0) 70%),
    linear-gradient(180deg, #040405, #121417);
}
input:checked + .sqp-switch::after { transform: translateX(14px); }
input:focus-visible + .sqp-switch { outline: 2px solid var(--cx-torch); outline-offset: 2px; }
input:disabled + .sqp-switch { opacity: 0.45; }
.sqp-toggle-text { display: flex; flex-direction: column; }
.sqp-toggle-text small { color: var(--cx-text-dim); }
.sqp-toggle-text span:empty { display: none; }

/* slider: an iron groove with a bronze knob */
.sqp-slider { display: inline-flex; align-items: center; gap: 8px; }
.sqp-range { -webkit-appearance: none; appearance: none; width: 130px; height: 6px; border-radius: 1px; background: linear-gradient(180deg, #040405, #15181c); border: 1px solid #000; box-shadow: 0 0 0 1px rgba(176, 122, 60, 0.32), inset 0 1px 2px #000; outline: none; }
.sqp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 42% 36%, #ffe6b0 0, #d29a52 25%, #7a5228 62%, #2c1a08 100%);
  border: 1px solid #050506; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.sqp-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 42% 36%, #ffe6b0, #d29a52 25%, #7a5228 62%, #2c1a08); border: 1px solid #050506; }
.sqp-range:disabled { opacity: 0.4; }
.sqp-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--cx-torch); }
.sqp-slider-val { font: 700 12px/1 var(--cx-font-num); font-variant-numeric: lining-nums tabular-nums; color: var(--cx-text-dim); min-width: 34px; }

/* segmented choice: iron plates side by side; the chosen one is lit iron with an ember underline and gold-leaf letters */
.sqp-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #000; border-radius: var(--cx-r-1); overflow: hidden; background: linear-gradient(180deg, #1b1e23, #0e1013); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.3), 0 2px 0 rgba(0, 0, 0, 0.45); }
.sqp-seg-btn {
  font: 700 13px/1 var(--cx-font-label);
  letter-spacing: 0.035em;
  color: var(--cx-text-dim);
  background: transparent;
  border: none;
  border-right: 1px solid rgba(0, 0, 0, 0.7);
  box-shadow: 1px 0 0 rgba(176, 122, 60, 0.14);
  padding: 7px 13px 6px;
  cursor: pointer;
  text-shadow: 0 1px 0 #000;
  transition: color var(--cx-dur-quick);
}
.sqp-seg-btn:last-child { border-right: none; box-shadow: none; }
.sqp-seg-btn:hover { color: var(--cx-gold-leaf); background: rgba(255, 138, 61, 0.07); }
.sqp-seg-btn.active { color: var(--cx-gold-leaf); text-shadow: 0 1px 0 #000, 0 0 8px rgba(255, 138, 61, 0.35); background: linear-gradient(90deg, rgba(255, 138, 61, 0), var(--cx-torch) 30%, var(--cx-torch) 70%, rgba(255, 138, 61, 0)) left 4px bottom 0 / calc(100% - 8px) 2px no-repeat, radial-gradient(ellipse at 50% 130%, rgba(255, 138, 61, 0.3), rgba(255, 138, 61, 0) 70%), var(--cx-tex-iron), linear-gradient(180deg, #3e434a, #1d2024 75%, #17191c); box-shadow: inset 0 1px 0 rgba(255, 214, 150, 0.35), inset 0 0 0 1px rgba(226, 181, 106, 0.5); }
.sqp-seg-btn:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: -3px; }
.sqp-seg-tiers .sqp-seg-btn { color: var(--seg); }
.sqp-seg-tiers .sqp-seg-btn.active { background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.5)); box-shadow: inset 0 -3px 0 var(--seg), inset 0 0 0 1px rgba(226, 181, 106, 0.3); color: var(--seg); }

.sqp-stepper { display: inline-flex; align-items: center; gap: 0; }
.sqp-step-btn {
  width: 28px; height: 32px; border: 1px solid #000; cursor: pointer; display: grid; place-items: center; color: var(--cx-gold-text);
  background: var(--cx-tex-oak), linear-gradient(180deg, #34383e 0%, #222529 55%, #141619 100%);
  box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.42);
}
.sqp-step-btn:first-child { border-radius: 3px 0 0 3px; }
.sqp-step-btn:last-child { border-radius: 0 3px 3px 0; }
.sqp-step-btn .icon { width: 11px; height: 11px; }
.sqp-step-btn:hover { color: var(--cx-gold-leaf); box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.85); }
.input.sqp-step-input { width: 60px; text-align: center; border-radius: 0; height: 32px; font: 700 15px/1 var(--cx-font-num); font-variant-numeric: lining-nums tabular-nums; -moz-appearance: textfield; }
.sqp-step-input::-webkit-outer-spin-button, .sqp-step-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.field small { font-family: var(--cx-font-body); color: var(--cx-text-dim); }
.parchment .field small { color: var(--cx-ink-text-dim); }
.sqp-cf-row { display: flex; gap: 10px; }
.sqp-cf-row > .field { flex: 1; min-width: 0; }
.sqp-cf-row > .field.grow { flex: 2; }

/* chips */
.sqp-chip { font: 700 12px/1 var(--cx-font-num); border-radius: 2px; cursor: pointer; }

/* ============================================================== tooltips */
.sqp-tt-item { min-width: 220px; }
.tooltip .sqp-tt-eff { color: #8fd98a; font-weight: 400; font-size: 12.5px; }
.tooltip .sqp-tt-sell { margin-top: 4px; color: var(--cx-text); }
.tooltip .sqp-tt-src { margin-top: 3px; font-size: 12px; color: var(--cx-text-dim); }
.tooltip .sqp-tt-desc { color: var(--cx-gold-3); max-width: 280px; }
.tooltip .tt-flavor { margin-top: 3px; }

/* ============================================================== item icons: an enamel square in an iron ring, rarity on the inner rim */
.sqp-icon {
  --dye: #5a5a6a; --rc: #3a3a3a;
  width: 40px; height: 40px; border-radius: 3px; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, color-mix(in srgb, var(--dye) 72%, #fff 12%), color-mix(in srgb, var(--dye) 55%, #000) 72%);
  color: color-mix(in srgb, var(--dye) 30%, #fff 70%);
  border: 2px solid var(--rc);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8), inset 0 -6px 10px rgba(0, 0, 0, 0.35), 0 0 0 1px #000, 0 0 0 3px #2c2d30, 0 0 0 4px #000;
  position: relative;
}
.sqp-icon .icon { width: 24px; height: 24px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.7)); }
.sqp-icon.r-empty { background: radial-gradient(circle at 50% 40%, #261d15, #0e0a07); color: #4e4230; --rc: #2a2216; }
.r-poor { --rc: var(--q-poor); }
.r-common { --rc: #d8d0c0; }
.r-uncommon { --rc: var(--q-uncommon); }
.r-rare { --rc: var(--q-rare); }
.r-epic { --rc: var(--q-epic); }
.r-legendary { --rc: var(--q-legendary); }
.sqp-icon.r-rare, .sqp-icon.r-epic, .sqp-icon.r-legendary { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8), inset 0 -6px 10px rgba(0, 0, 0, 0.35), 0 0 0 1px #000, 0 0 0 3px #2c2d30, 0 0 0 4px #000, 0 0 8px color-mix(in srgb, var(--rc) 60%, transparent); }
.sqp-icon.v-mount { --dye: #7a5a3a; }
.sqp-icon.v-charge { --dye: #2f4f96; }
.sqp-icon.v-wager { --dye: #b8862e; }
.sqp-icon.v-pet, .sqp-icon.v-tabard, .sqp-icon.v-mount, .sqp-icon.v-charge, .sqp-icon.v-wager { --rc: var(--cx-brass); }

/* ============================================================== character */
.sqp-doll { display: grid; grid-template-columns: 52px 1fr 52px; gap: 10px; align-items: start; }
.doll-col { display: flex; flex-direction: column; gap: 9px; padding-top: 2px; }
.sqp-slot { width: 48px; height: 48px; border-radius: 3px; padding: 3px; background: transparent; border: 0; cursor: default; outline: none; }
.sqp-slot .sqp-icon { width: 42px; height: 42px; }
.sqp-slot .sqp-icon .icon { width: 26px; height: 26px; }
.sqp-slot:hover .sqp-icon, .sqp-slot:focus-visible .sqp-icon { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8), 0 0 0 1px #000, 0 0 0 3px var(--cx-gold-2), 0 0 0 4px #000; }
.sqp-slot.empty .sqp-icon { opacity: 0.8; }
.doll-center {
  display: flex; flex-direction: column; align-items: center; min-width: 0;
  padding: 10px 6px 8px;
  background: radial-gradient(ellipse at 50% 78%, rgba(255, 138, 61, 0.16), rgba(255, 138, 61, 0) 55%), linear-gradient(180deg, #17110c, #0b0907);
  border: 1px solid #000;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px var(--gilt-dim), inset 0 0 30px rgba(0, 0, 0, 0.8);
}
.doll-name { font: 400 21px/1.15 var(--cx-font-head); text-shadow: var(--cx-sh-text-gold); text-align: center; }
.doll-sub { font: 400 13.5px/1.3 var(--cx-font-body); color: var(--cx-text-dim); text-align: center; }
.doll-model { width: 100%; height: 200px; position: relative; }
.doll-model::after {
  /* a small stone dais under the hero */
  content: '';
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 54%;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #6e675f, #3a3632 60%, #1d1c1b);
  box-shadow: 0 0 0 1px #000, 0 0 0 2px rgba(176, 122, 60, 0.45), 0 4px 10px rgba(0, 0, 0, 0.7);
  z-index: 0;
}
.doll-model canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.doll-weapon { margin-top: 2px; }
.sqp-ilvl { display: flex; gap: 18px; justify-content: center; margin: 12px 0 2px; font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.03em; color: var(--cx-gold-text); flex-wrap: wrap; }
.sqp-ilvl b { color: #ebe4d6; font-family: var(--cx-font-num); font-variant-numeric: lining-nums; }

.sqp-attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.sqp-attr-col { background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); border-radius: 3px; padding: 7px 11px; box-shadow: var(--well-sh); }
.sqp-attr-h { font: 400 16px/1.2 var(--cx-font-head); color: var(--cx-gold-text); margin-bottom: 4px; padding-bottom: 3px; background: var(--rule-gilt) left bottom / 100% 1px no-repeat; }
.sqp-attr { display: flex; justify-content: space-between; font-size: 13.5px; padding: 1px 0; outline: none; }
.sqp-attr span { color: var(--cx-text-dim); }
.sqp-attr b { font: 700 13px/1.4 var(--cx-font-num); font-variant-numeric: lining-nums tabular-nums; color: #ebe4d6; }
/* V7.24.2: the Mudrost bar on the character sheet (js/ui-panels.js mudrostBar): the share of cards truly remembered, the Wisdom rank */
.sqp-mud { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 11px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); border-radius: 3px; box-shadow: var(--well-sh); outline: none; }
.sqp-mud:focus-visible, .sqp-mud:hover { border-color: rgba(120, 200, 190, 0.5); }
.sqp-mud-name { font: 400 15px/1.2 var(--cx-font-head); color: var(--cx-gold-text); }
.sqp-mud-bar { position: relative; height: 9px; border-radius: 5px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(0, 0, 0, 0.6); overflow: hidden; }
.sqp-mud-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #2f7f74, #5fc0ae); transition: width 0.4s ease; }
.sqp-mud-pct { font: 700 13px/1.4 var(--cx-font-num); font-variant-numeric: lining-nums tabular-nums; color: #ebe4d6; }
.sqp-mud-rank { font-size: 12px; color: #8fd3c4; }
@media (prefers-reduced-motion: reduce) { .sqp-mud-fill { transition: none; } }
.sqp-attr b.pos { color: #4fd43a; }
.sqp-attr[tabindex]:hover span, .sqp-attr:focus-visible span { color: var(--cx-gold-leaf); }

.sqp-racials { display: flex; gap: 8px; flex-wrap: wrap; }
.sqp-racial { display: inline-flex; align-items: center; gap: 7px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); border-radius: 3px; padding: 3px 12px 3px 4px; font-size: 13.5px; color: var(--cx-text); cursor: default; outline: none; box-shadow: var(--well-sh); }
.sqp-racial:hover, .sqp-racial:focus-visible { color: var(--cx-gold-leaf); box-shadow: inset 0 0 0 1px var(--gilt), inset 0 1px 6px rgba(0, 0, 0, 0.45); }
.sqp-racial-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, #1d2126 0, #0b0c0e 7.5px, rgba(11, 8, 6, 0) 8px), linear-gradient(135deg, #f2c97a 0%, #c48a45 24%, #86592a 58%, #3e2711 100%); color: var(--cx-gold-text); box-shadow: 0 0 0 1px #050506; }
.sqp-racial-ico .icon { width: 11px; height: 11px; }
.sqp-title-row { margin-top: 12px; }
.sqp-title-row .field-label { margin: 0; }
.sqp-title-sel { width: auto; min-width: 200px; }

.sqp-bigstat { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); border-radius: 3px; padding: 10px 14px; box-shadow: var(--well-sh); }
.sqp-bigstat-label { font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.04em; color: var(--cx-text-dim); }
.sqp-bigstat-val { font: 700 26px/1 var(--cx-font-num); font-variant-numeric: lining-nums; color: #4fd43a; text-shadow: 0 2px 0 #000; }
.sqp-rested-chip { font: 700 12px/1.3 var(--cx-font-label); color: var(--cx-lapis-3); background: rgba(16, 29, 61, 0.55); border: 1px solid rgba(142, 168, 212, 0.5); border-radius: 2px; padding: 2px 9px; }
.sqp-sources { display: flex; flex-direction: column; gap: 4px; }
.sqp-source { display: flex; align-items: center; gap: 10px; padding: 5px 8px; background: var(--well); border-radius: 2px; box-shadow: var(--well-sh); }
.sqp-source-ico { width: 26px; height: 26px; border-radius: 2px; display: grid; place-items: center; background: linear-gradient(180deg, #1d2024, #0c0e10); color: var(--cx-gold-text); border: 1px solid #000; box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.4); flex: none; }
.sqp-source-ico .icon { width: 15px; height: 15px; }
.sqp-source-ico.k-buff { color: #9fd6e6; } .sqp-source-ico.k-streak { color: var(--cx-torch); } .sqp-source-ico.k-momentum { color: var(--cx-gold-3); }
.sqp-source-ico.k-gear { color: #4fd43a; } .sqp-source-ico.k-talent { color: var(--cx-q-epic-text); } .sqp-source-ico.k-alt { color: var(--cx-q-legendary); }
.sqp-source-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sqp-source-text b { font-weight: 700; color: var(--cx-text); font-size: 13.5px; }
.sqp-source-text small { color: var(--cx-text-dim); font-size: 12.5px; }
.sqp-source-pct { font: 700 13px/1 var(--cx-font-num); color: #4fd43a; }
.sqp-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; }
.sqp-kv-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 2px 0; border-bottom: 1px dotted rgba(176, 122, 60, 0.18); }
.sqp-kv-row span { color: var(--cx-text-dim); }
.sqp-kv-row b { font: 700 13px/1.4 var(--cx-font-num); font-variant-numeric: lining-nums tabular-nums; color: #ebe4d6; }

.sqp-collect { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; }
.sqp-collectible { --tint: #888; display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; border-radius: 3px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); color: var(--cx-text); cursor: pointer; font-size: 13.5px; text-align: left; position: relative; }
.sqp-collectible:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--gilt), inset 0 1px 6px rgba(0, 0, 0, 0.45); color: var(--cx-gold-leaf); }
.sqp-collectible.active { box-shadow: inset 3px 0 0 var(--cx-verdigris-3), inset 0 0 0 1px rgba(134, 176, 165, 0.55); background: rgba(36, 87, 75, 0.2); }
.sqp-collectible.missing { opacity: 0.45; cursor: default; }
.sqp-collect-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tint) 60%, #fff 20%), color-mix(in srgb, var(--tint) 50%, #000)); color: #fff; flex: none; border: 2px solid transparent; background-clip: padding-box; box-shadow: 0 0 0 1px #050506, 0 0 0 2px var(--cx-brass); }
.sqp-collectible.missing .sqp-collect-ico { filter: grayscale(1) brightness(0.5); }
.sqp-collect-ico .icon { width: 16px; height: 16px; filter: drop-shadow(0 1px 0 #000); }
.sqp-collect-name { line-height: 1.2; }
.sqp-collect-tag { position: absolute; top: -7px; right: 6px; font: 700 11px/14px var(--cx-font-num); color: #06201a; background: var(--cx-verdigris-3); border: 1px solid #000; border-radius: 2px; padding: 0 5px; }
.sqp-mount { display: flex; align-items: center; gap: 12px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 3px; padding: 8px 10px; }
.sqp-mount-ico { width: 40px; height: 40px; border-radius: 3px; display: grid; place-items: center; background: #1a140c; color: #5a4a30; border: 1px solid #000; box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.2); }
.sqp-mount-ico.has { color: var(--cx-gold-leaf); background: radial-gradient(circle at 35% 30%, #7a5a3a, #2a1c10); box-shadow: inset 0 0 0 1px var(--gilt), 0 0 0 1px #000, 0 0 8px rgba(163, 53, 238, 0.4); }
.sqp-mount-ico .icon { width: 24px; height: 24px; }
.sqp-mount-text { flex: 1; display: flex; flex-direction: column; }
.sqp-mount-text small { color: var(--cx-text-dim); }

.sqp-loot-summary { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 8px; font-weight: 700; }
.sqp-loot { display: flex; flex-direction: column; gap: 2px; }
.sqp-loot-row { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 2px; outline: none; border-bottom: 1px solid rgba(176, 122, 60, 0.08); }
.sqp-loot-row:hover, .sqp-loot-row:focus-visible { background-image: linear-gradient(90deg, rgba(255, 138, 61, 0.1), rgba(255, 138, 61, 0) 85%); }
.sqp-loot-row .sqp-icon { width: 32px; height: 32px; }
.sqp-loot-row .sqp-icon .icon { width: 18px; height: 18px; }
.sqp-loot-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sqp-loot-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqp-loot-name.q-rare, .sqp-loot-row .q-rare { color: var(--cx-q-rare-text); }
.sqp-loot-name.q-epic, .sqp-loot-row .q-epic { color: var(--cx-q-epic-text); }
.sqp-loot-text small { color: var(--cx-text-dim); font-size: 12.5px; }
.sqp-loot-state { font-size: 12.5px; color: var(--cx-text-dim); white-space: nowrap; }
.sqp-loot-state.eq { color: #4fd43a; font: 700 12px/1 var(--cx-font-label); letter-spacing: 0.03em; }
.sqp-loot-state .money { font-size: 12px; }

/* ============================================================== talents */
.tal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.tal-points { font: 700 14px/1 var(--cx-font-label); letter-spacing: 0.04em; color: var(--cx-gold-text); }
.tal-points b { font: 700 20px/1 var(--cx-font-num); color: #ebe4d6; margin-left: 4px; }
.tal-points.has b { color: #4fd43a; }
.tal-spent { font: 700 13px/1 var(--cx-font-num); color: var(--cx-text-dim); }
.tal-locked-banner { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--cx-text); background: linear-gradient(90deg, rgba(114, 27, 23, 0.55), rgba(0, 0, 0, 0.2)); border: 1px solid #000; box-shadow: inset 0 0 0 1px rgba(216, 96, 63, 0.4); border-radius: 2px; padding: 8px 12px; font-size: 13.5px; margin-bottom: 10px; }
.tal-locked-banner .icon { width: 16px; height: 16px; color: var(--cx-gold-text); }
.tal-trees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tal-trees.locked .tal-grid { filter: grayscale(0.85) brightness(0.7); }
/* each tree is a smoked-steel leaf tinted by its school: cold steel blue (Scholar), bronze (Adventurer), oxblood (Discipline) */
.tal-tree { position: relative; border-radius: 3px; border: 1px solid #000; padding: 9px 10px 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--gilt-dim), inset 0 0 40px rgba(0, 0, 0, 0.7); }
.tree-scholar { background: var(--cx-tex-grain), radial-gradient(ellipse at 50% 0%, rgba(142, 168, 212, 0.16), rgba(142, 168, 212, 0) 60%), linear-gradient(170deg, #1a2638 0%, #10161f 55%, #090c11 100%); }
.tree-adventurer { background: var(--cx-tex-grain), radial-gradient(ellipse at 50% 0%, rgba(226, 181, 106, 0.14), rgba(226, 181, 106, 0) 60%), linear-gradient(170deg, #2c2218 0%, #18130e 55%, #0c0a08 100%); }
.tree-discipline { background: var(--cx-tex-grain), radial-gradient(ellipse at 50% 0%, rgba(232, 97, 59, 0.14), rgba(232, 97, 59, 0) 60%), linear-gradient(170deg, #2e1512 0%, #1a0d0b 55%, #0d0706 100%); }
.tal-watermark { position: absolute; right: -24px; bottom: -24px; width: 150px; height: 150px; opacity: 0.06; pointer-events: none; color: var(--cx-gold-leaf); }
.tal-watermark .icon { width: 100%; height: 100%; }
.tal-tree-head { display: flex; align-items: center; gap: 8px; padding-bottom: 5px; background: var(--rule-gilt) left bottom / 100% 1px no-repeat; }
.tal-tree-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, #1d2126 0, #0b0c0e 9px, rgba(11, 8, 6, 0) 9.6px), linear-gradient(135deg, #f2c97a 0%, #c48a45 24%, #86592a 58%, #3e2711 100%); color: var(--cx-gold-text); box-shadow: 0 0 0 1px #050506; }
.tal-tree-ico .icon { width: 13px; height: 13px; }
.tal-tree-name { font: 700 17px/1.1 var(--cx-font-head); letter-spacing: 0.03em; color: var(--cx-gold-text); flex: 1; text-shadow: var(--cx-sh-text-gold); }
.tal-tree-spent { font: 700 16px/1 var(--cx-font-num); color: #ebe4d6; min-width: 22px; text-align: right; }
.tal-tree-desc { font-size: 13.5px; color: var(--cx-text-dim); margin: 6px 0 10px; min-height: 30px; line-height: 1.3; }
.tal-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 58px; gap: 4px; justify-items: center; align-items: center; position: relative; z-index: 1; }
.tal-cell.empty { width: 44px; height: 44px; }
.tal-btn {
  width: 44px; height: 44px; border-radius: 4px; padding: 0; position: relative; cursor: pointer;
  background: radial-gradient(circle at 38% 30%, #3a3f46, #121417 75%); color: #b9b3a7;
  border: 2px solid; border-color: #5a6068 #1d2024 #0d0e10 #3a3f46;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #000, inset 0 0 8px rgba(0, 0, 0, 0.8);
  transition: transform 0.08s;
}
.tal-btn .tal-ico { display: grid; place-items: center; }
.tal-btn .tal-ico .icon { width: 24px; height: 24px; filter: drop-shadow(0 1px 0 #000); }
.tal-rank {
  position: absolute; right: -9px; bottom: -8px; font: 700 11px/14px var(--cx-font-num);
  background: #07080a; border: 1px solid #46505b; border-radius: 2px; padding: 0 4px; color: #cfc9bd; min-width: 24px; text-align: center;
}
.tal-btn.capstone { border-radius: 50%; }
.tal-btn.learnable, .tal-btn.partial { border-color: #8acb7a #24572b #12301a #5a9a64; color: #effbe2; background: radial-gradient(circle at 38% 30%, #4f7a3a, #142010 75%); }
.tal-btn.learnable .tal-rank, .tal-btn.partial .tal-rank { color: #6fdc4a; border-color: #3f8a32; }
.tal-btn.learnable:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #000, 0 0 10px rgba(80, 200, 60, 0.45); }
.tal-btn.maxed { border-color: #f2c97a #86592a #3e2711 #c48a45; color: var(--cx-gold-leaf); background: radial-gradient(circle at 38% 30%, #7a5229, #24180c 75%); box-shadow: 0 0 0 1px #000, 0 0 8px rgba(255, 138, 61, 0.35); }
.tal-btn.maxed .tal-rank { color: var(--cx-gold-leaf); border-color: var(--cx-bronze-3); }
.tal-btn.row-locked { filter: grayscale(1) brightness(0.5); }
.tal-btn:not(.learnable):not(.maxed):not(.partial) { cursor: default; }
.tal-btn:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: 2px; }
.tal-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 14px; color: var(--cx-text-dim); gap: 10px; }

/* ============================================================== parchment windows (pages inside iron covers) */
.sqp-parch .win-body { background: var(--cx-tex-iron), linear-gradient(180deg, #1b1d21, #101114); }
.parchment {
  border-radius: 2px;
  box-shadow: var(--cx-vellum-burn), 0 0 0 1px rgba(60, 34, 12, 0.7);
  font-family: var(--cx-font-body);
}
.parchment p, .parchment li, .parchment td { color: var(--cx-ink-text); }
.parchment h1, .parchment h2, .parchment h3 { color: var(--cx-ink-rubric); font-family: var(--cx-font-head); font-weight: 700; }
.parchment .muted, .parchment .ql-hint { color: var(--cx-ink-text-dim); }
.parchment .sqp-form-error { color: var(--cx-ink-rubric); font-weight: 700; }
.parchment .sqp-seg { background: rgba(255, 250, 236, 0.35); border-color: rgba(60, 34, 12, 0.6); box-shadow: none; }
.parchment .sqp-seg-btn { color: var(--cx-ink-text-dim); text-shadow: none; border-right-color: rgba(60, 34, 12, 0.35); box-shadow: none; }
.parchment .sqp-seg-btn:hover { color: var(--cx-ink-rubric); background: rgba(138, 36, 20, 0.06); }
.parchment .sqp-seg-btn.active { color: var(--cx-gold-leaf); text-shadow: 0 1px 0 #000; }
.parchment .sqp-seg-tiers .sqp-seg-btn { color: var(--cx-ink-text); text-shadow: none; }
.parchment .sqp-seg-tiers .sqp-seg-btn.active { background: rgba(58, 36, 18, 0.12); color: var(--cx-ink-text); box-shadow: inset 0 -3px 0 var(--seg); text-shadow: none; }
.parchment .sqp-bar { background: rgba(58, 36, 18, 0.18); border-color: rgba(60, 34, 12, 0.6); box-shadow: inset 0 1px 2px rgba(58, 36, 18, 0.4); }
.parchment .sqp-flash { position: relative; top: 0; }
.parchment .sqp-note { color: var(--cx-ink-text); background: rgba(255, 250, 236, 0.4); border-color: rgba(60, 34, 12, 0.3); border-left-color: var(--cx-ink-rubric-lg); box-shadow: none; }

/* ============================================================== quest log (v1 list / detail) */
.ql-split { display: grid; grid-template-columns: 230px 1fr; gap: 10px; height: min(470px, calc(100vh - 170px)); min-height: 280px; }
.ql-left { display: flex; flex-direction: column; min-height: 0; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 3px; }
.ql-list { flex: 1; overflow: auto; padding: 4px 0; }
.ql-group { font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.04em; color: var(--cx-gold-text); padding: 7px 10px 3px; display: flex; align-items: center; gap: 6px; }
.ql-group::before { content: '\00B6\FE0E'; font: 400 14px/1 var(--cx-font-body); color: var(--cx-vermilion-hi); }
.ql-group.rev { color: #ff9a7a; }
.ql-item { --tier: #fff; display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; background: transparent; border: none; padding: 4px 10px 4px 18px; color: var(--tier); font: 400 14px/1.3 var(--cx-font-body); cursor: pointer; border-left: 3px solid transparent; }
.ql-item:hover { background-image: linear-gradient(90deg, rgba(255, 138, 61, 0.1), rgba(255, 138, 61, 0) 85%); }
.ql-item.active { background-image: linear-gradient(90deg, rgba(226, 181, 106, 0.22), rgba(226, 181, 106, 0.02)); border-left-color: var(--cx-gold-3); }
.ql-tier { font: 700 11px/1 var(--cx-font-num); opacity: 0.9; }
.ql-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 #000; }
.ql-ripe { font: 700 11px/1 var(--cx-font-num); color: var(--cx-text-dim); }
.ql-ripe.on { color: #4fd43a; }
.ql-item.ripe .ql-name::after { content: ' \2605\FE0E'; color: #4fd43a; }
.ql-empty { color: var(--cx-text-dim); padding: 14px; font-style: italic; text-align: center; }
.ql-add { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 6px; padding: 6px; border-radius: 2px; border: 1px dashed var(--gilt-dim); background: transparent; color: var(--cx-gold-text); font: 700 13px/1 var(--cx-font-label); letter-spacing: 0.03em; cursor: pointer; }
.ql-add:hover, .ql-add.active { background: rgba(255, 138, 61, 0.08); border-style: solid; color: var(--cx-gold-leaf); }
.ql-add .icon { width: 11px; height: 11px; }
.ql-count { text-align: center; font-size: 12px; color: var(--cx-text-dim); padding: 0 0 6px; }
.ql-detail { overflow: auto; padding: 14px 18px; min-height: 0; }
.ql-detail .sqp-empty { padding-top: 60px; }
.ql-title { margin: 0 0 4px; font: 400 22px/1.2 var(--cx-font-head); color: var(--cx-ink-rubric-lg); }
.ql-detail h3 { margin: 14px 0 4px; font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.06em; color: var(--cx-ink-text-dim); }
.ql-detail p { margin: 4px 0; line-height: 1.5; }
.ql-diff { --tier: #fff; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--cx-ink-text); font-size: 13.5px; }
.ql-diff-min { font-weight: 400; color: var(--cx-ink-text-dim); }
.ql-diff-dot { width: 10px; height: 10px; border-radius: 1px; transform: rotate(45deg); background: var(--tier, #fff); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); display: inline-block; flex: none; }
.ql-plan { font-style: italic; }
.ql-revenge { padding: 6px 10px; border-radius: 0 2px 2px 0; background: rgba(138, 36, 20, 0.08); border-left: 3px solid var(--cx-ink-rubric-lg); }
.ql-revenge.ripe { background: rgba(24, 86, 29, 0.1); border-left-color: var(--cx-con-green-ink); font-weight: 700; }
.ql-rewards { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--cx-ink-text); }
.ql-rewards b { font-family: var(--cx-font-num); }
.ql-rewards .money, .parchment .money { color: var(--cx-ink-text); }
.ql-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.ql-hint { font-size: 13px; color: var(--cx-text-dim); }

.ql-chapters, .ql-codex { padding: 14px 16px; max-height: min(520px, calc(100vh - 160px)); overflow: auto; }
.ql-ch-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.ql-ch-head .btn .icon { width: 10px; height: 10px; }
.ql-chain { background: rgba(255, 250, 236, 0.4); border: 1px solid rgba(90, 56, 18, 0.35); border-radius: 2px; padding: 10px 12px; margin-bottom: 10px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.ql-chain.done { background: rgba(184, 134, 46, 0.12); border-color: rgba(125, 87, 25, 0.5); }
.ql-chain-head { display: flex; align-items: center; gap: 10px; }
.ql-chain-name { font: 400 17px/1.2 var(--cx-font-head); color: var(--cx-ink-rubric); flex: 1; min-width: 0; }
.ql-chain-mastery { font: 700 12px/1 var(--cx-font-num); color: var(--cx-ink-text-dim); }
.ql-chain.done .ql-chain-mastery { color: var(--cx-ink-gold); }
.ql-chain-tools { display: flex; gap: 4px; align-items: center; }
.ql-tool { width: 24px; height: 24px; border-radius: 2px; border: 1px solid rgba(60, 34, 12, 0.5); background: rgba(255, 250, 236, 0.5); color: var(--cx-ink-text-dim); cursor: pointer; display: grid; place-items: center; padding: 0; }
.ql-tool:hover { color: var(--cx-ink-rubric); border-color: var(--cx-ink-rubric); }
.ql-tool .icon { width: 12px; height: 12px; }
.ql-remove { padding: 2px 8px !important; font-size: 12px !important; }
.ql-chain-bar { display: flex; align-items: center; gap: 8px; margin: 7px 0 5px; }
.ql-chain-bar .sqp-bar { flex: 1; height: 8px; }
.ql-chain-bar .sqp-bar-fill { background: var(--cx-bar-enamel), var(--cx-bar-verdigris); }
.ql-chain.done .ql-chain-bar .sqp-bar-fill { background: var(--cx-bar-enamel), var(--cx-bar-capital); }
.ql-chain-bar span { font: 700 12px/1 var(--cx-font-num); color: var(--cx-ink-text-dim); min-width: 44px; text-align: right; }
.ql-chain-tiers { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--cx-ink-text-dim); margin-bottom: 7px; }
.ql-tierprog { display: inline-flex; align-items: center; gap: 5px; font: 700 12px/1 var(--cx-font-num); }
.ql-tierprog.full { color: var(--cx-con-green-ink); }
.ql-tierprog .ql-diff-dot { background: var(--tier); }
.ql-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ql-ex {
  --tier: #fff; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; min-width: 40px; justify-content: center;
  font: 700 12.5px/1.2 var(--cx-font-num);
  border: 1px solid rgba(60, 34, 12, 0.45); border-bottom: 3px solid var(--tier); border-radius: 2px;
  background: rgba(255, 252, 240, 0.75); color: var(--cx-ink-text); cursor: pointer; transition: transform 0.08s;
}
.ql-ex:hover { background: #fffaf0; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(58, 36, 18, 0.25); }
.ql-ex.done { background: color-mix(in srgb, var(--tier) 30%, #3a2412); color: #ebe4d6; border-color: rgba(0, 0, 0, 0.4); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }
.ql-ex.done:hover { background: color-mix(in srgb, var(--tier) 40%, #3a2412); }
.ql-check .icon { width: 10px; height: 10px; }
.ql-ex.mini { cursor: default; padding: 1px 6px; min-width: 0; font-size: 11px; }
.ql-ex.mini:hover { transform: none; box-shadow: none; }
.ql-chainform { background: rgba(255, 252, 240, 0.5); }
.ql-chainform .field { margin: 6px 0; }
.ql-listin { resize: vertical; min-height: 44px; font-family: var(--cx-font-num); }
.ql-parse { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0; min-height: 20px; }
.ql-parse-sum { font-size: 12.5px; font-weight: 700; color: var(--cx-ink-text-dim); margin-right: 4px; }
/* the Codex tab of the quest log: lore notes in the scholar's own words */
.ql-codex-intro { font: italic 400 15px/1.4 var(--cx-font-flavor); color: var(--cx-ink-gold); margin-bottom: 4px; }
.ql-codex-h { margin: 16px 0 6px; font: 400 18px/1.2 var(--cx-font-head); color: var(--cx-ink-rubric); padding-bottom: 3px; background: linear-gradient(90deg, rgba(122, 29, 16, 0.4), rgba(122, 29, 16, 0)) left bottom / 100% 1px no-repeat; }
.ql-note { padding: 6px 10px 6px 16px; margin: 0 0 7px; border-left: 3px solid var(--cx-ink-rubric-lg); background: rgba(255, 252, 240, 0.35); border-radius: 0 2px 2px 0; }
.ql-note-text { font: italic 400 16px/1.4 var(--cx-font-flavor); color: var(--cx-ink-text); }
.ql-note-text::before { content: '\201C'; color: var(--cx-ink-rubric-lg); margin-right: 1px; }
.ql-note-text::after { content: '\201D'; color: var(--cx-ink-rubric-lg); margin-left: 1px; }
.ql-note-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--cx-ink-text-dim); margin-top: 2px; }

/* ---- repeat & revenge (spaced repetition) */
.ql-item.rep .ql-name { font-style: italic; }
.ql-later { display: flex; align-items: center; gap: 6px; width: calc(100% - 12px); margin: 8px 6px 2px; padding: 5px 8px; border: 1px solid rgba(0, 0, 0, 0.6); border-radius: 2px; background: rgba(255, 138, 61, 0.04); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.18); color: var(--cx-text-dim); font: 700 12px/1.2 var(--cx-font-label); cursor: pointer; text-align: left; }
.ql-later:hover { color: var(--cx-gold-leaf); box-shadow: inset 0 0 0 1px var(--gilt); }
.ql-later .icon { width: 12px; height: 12px; color: var(--cx-lapis-3); flex: none; }
.ql-later-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ql-later small { color: var(--cx-text-dim); font: 400 12px/1.25 var(--cx-font-body); }
.rr-open { width: 100%; margin: 0 0 6px; }
.rr-form-h { position: relative; }
.rr-form-x { position: absolute; right: -4px; top: -2px; width: 22px; height: 22px; }
.rr-form-x .icon { width: 9px; height: 9px; }
.ql-revenge.rep { background: rgba(31, 58, 118, 0.08); border-left-color: var(--cx-ink-lapis); }
.ql-revenge.rep.ripe { background: rgba(24, 86, 29, 0.1); border-left-color: var(--cx-con-green-ink); }
.rr-resched-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rr-ico-star { color: var(--cx-gold-2); display: inline-flex; }
.btn.btn-mastered { --_plate: var(--_p-bronze); --_plate-hot: var(--_p-bronze-hot); --_plate-down: var(--_p-bronze-down); color: #f7e3b2; }
.btn.btn-mastered .rr-ico-star { color: var(--cx-gold-leaf); }
.rr-ico-star .icon { width: 12px; height: 12px; vertical-align: -0.1em; }

.ql-rr { padding: 12px 14px; max-height: min(540px, calc(100vh - 160px)); min-height: 280px; overflow: auto; }
.rr-intro { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--cx-ink-text); margin-bottom: 10px; }
.rr-intro-ico { flex: none; width: 32px; height: 32px; background: var(--cx-orn-seal-verdigris) center / 100% 100% no-repeat; }
.rr-intro-ico .icon { display: none; }
.rr-intro-text b { color: var(--cx-ink-rubric); }

.rr-form { background: rgba(255, 252, 240, 0.45); border: 1px solid rgba(90, 56, 18, 0.35); border-radius: 2px; padding: 8px 12px 10px; margin-bottom: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.rr-form-h { display: flex; align-items: center; gap: 6px; font: 400 16px/1.2 var(--cx-font-head); color: var(--cx-ink-rubric); margin-bottom: 4px; }
.rr-form-h .icon { width: 10px; height: 10px; }
.rr-form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.rr-form-row > .field { margin: 4px 0; min-width: 0; }
.rr-form-row > .field.grow { flex: 1 1 180px; }
.rr-form-row .rr-exfield { width: 104px; }
.rr-form-row .btn.rr-add { margin: 4px 0 4px auto; }

.rr-ivs { display: inline-flex; border: 1px solid #000; border-radius: var(--cx-r-1); overflow: hidden; background: linear-gradient(180deg, #1b1e23, #0e1013); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.3); }
.rr-iv { font: 700 12px/1 var(--cx-font-num); min-width: 36px; height: 30px; padding: 0 8px; border: none; border-right: 1px solid rgba(0, 0, 0, 0.7); background: transparent; color: var(--cx-text-dim); cursor: pointer; }
.rr-iv:last-child { border-right: none; }
.rr-iv:hover { color: var(--cx-gold-leaf); background: rgba(142, 168, 212, 0.12); }
.rr-iv.active { color: #ebe4d6; background: linear-gradient(180deg, #2f4f96, #1e3468 70%, #101d3d); text-shadow: 0 1px 0 #000; box-shadow: inset 0 0 0 1px rgba(142, 168, 212, 0.6); }
.parchment .rr-ivs { background: rgba(255, 250, 236, 0.35); border-color: rgba(60, 34, 12, 0.6); box-shadow: none; }
.parchment .rr-iv { color: var(--cx-ink-text-dim); border-right-color: rgba(60, 34, 12, 0.35); }
.parchment .rr-iv:hover { background: rgba(31, 58, 118, 0.1); color: var(--cx-ink-lapis); }
.parchment .rr-iv.active { color: #ebe4d6; background: linear-gradient(180deg, #2f4f96, #1e3468); }

.rr-group { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 5px; padding-bottom: 3px; font: 400 17px/1.2 var(--cx-font-head); color: var(--cx-ink-rubric); background: linear-gradient(90deg, rgba(122, 29, 16, 0.4), rgba(122, 29, 16, 0)) left bottom / 100% 1px no-repeat; }
.rr-group small { font: 400 12.5px/1.2 var(--cx-font-body); color: var(--cx-ink-text-dim); }
.rr-group.due { color: var(--cx-con-green-ink); }

.rr-row-wrap { margin-bottom: 5px; }
.rr-row-wrap > .rr-row { margin-bottom: 0; }
.rr-row { --tier: #fff; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 7px; margin-bottom: 5px; border-radius: 0 2px 2px 0; background: rgba(255, 252, 240, 0.32); border: 1px solid rgba(90, 56, 18, 0.28); border-left: 4px solid var(--tier); transition: background-color var(--cx-dur-quick); }
.rr-row:hover { background-color: rgba(255, 252, 240, 0.6); }
.rr-row.due { background-color: rgba(24, 86, 29, 0.09); border-color: rgba(24, 86, 29, 0.35); border-left-color: var(--tier); }
.rr-row.due:hover { background-color: rgba(24, 86, 29, 0.15); }
.rr-kind { flex: none; width: 28px; height: 28px; background: var(--cx-orn-seal-lapis) center / 100% 100% no-repeat; }
.rr-row.rev .rr-kind { background-image: var(--cx-orn-seal); }
.rr-kind .icon { display: none; }
.rr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rr-name { font: 400 16px/1.2 var(--cx-font-head); color: var(--cx-ink-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-name .ql-tier { color: color-mix(in srgb, var(--tier) 45%, #24160b); }
.rr-meta { font-size: 12.5px; color: var(--cx-ink-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-due { flex: none; width: 76px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.rr-due b { font: 700 14px/1.2 var(--cx-font-num); color: var(--cx-ink-text); }
.rr-due small { font-size: 12px; color: var(--cx-ink-text-dim); white-space: nowrap; }
.rr-due.on b { color: var(--cx-con-green-ink); font: 400 15px/1.2 var(--cx-font-head); }
.rr-due.on small { color: var(--cx-con-green-ink); font-weight: 700; }
.rr-acts { flex: none; display: flex; gap: 4px; }
.rr-acts .btn .icon { width: 11px; height: 11px; }
.rr-acts .btn.on { color: #8fb6ff; text-shadow: 0 1px 0 #000, 0 0 6px rgba(110, 150, 220, 0.6); }
.rr-acts .rr-done { --_plate: var(--_p-bronze); --_plate-hot: var(--_p-bronze-hot); --_plate-down: var(--_p-bronze-down); color: #f7e3b2; }
.rr-row:not(.due) .rr-done { --_plate: var(--_p-iron); --_plate-hot: var(--_p-iron-hot); --_plate-down: var(--_p-iron-down); color: var(--cx-text); }
.rr-resched { display: flex; align-items: center; gap: 10px; padding: 6px 10px 7px 42px; border: 1px solid rgba(90, 56, 18, 0.28); border-top: none; border-radius: 0 0 2px 2px; background: rgba(31, 58, 118, 0.06); }
.rr-foot { display: flex; gap: 18px; justify-content: center; margin-top: 12px; font-size: 12.5px; color: var(--cx-ink-text-dim); }
.rr-foot b { font-family: var(--cx-font-num); color: var(--cx-ink-text); margin: 0 3px; }

.ql-ex.sched { box-shadow: 0 0 0 2px rgba(31, 58, 118, 0.5); }
.ql-ex.sched.due { box-shadow: 0 0 0 2px rgba(24, 86, 29, 0.7); }
.ql-sched { display: inline-flex; margin-left: 3px; color: var(--cx-ink-lapis); }
.ql-ex.done .ql-sched { color: #c8d6ff; }
.ql-ex.sched.due .ql-sched { color: var(--cx-con-green-ink); }
.ql-ex.done.sched.due .ql-sched { color: #c8f2b8; }
.ql-sched .icon { width: 10px; height: 10px; }
.tooltip .sqp-tt-rep { color: #9ab8ff; }

/* ============================================================== dungeons */
.dg-split { display: grid; grid-template-columns: 240px 1fr; gap: 12px; }
.dg-list { display: flex; flex-direction: column; gap: 1px; max-height: min(520px, calc(100vh - 150px)); overflow: auto; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 3px; padding: 4px; }
.dg-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border: none; border-radius: 2px; background: transparent; cursor: pointer; text-align: left; font: 400 13.5px/1.25 var(--cx-font-body); border-left: 3px solid transparent; }
.dg-item:hover { background-image: linear-gradient(90deg, rgba(255, 138, 61, 0.1), rgba(255, 138, 61, 0) 85%); }
.dg-item.active { background-image: linear-gradient(90deg, rgba(226, 181, 106, 0.22), rgba(226, 181, 106, 0.02)); border-left-color: var(--cx-gold-3); }
.dg-item-name { text-shadow: 0 1px 0 #000; }
.dg-item-lvl { font: 700 11px/1 var(--cx-font-num); opacity: 0.9; white-space: nowrap; }
.con-grey { color: #9d9d9d; } .con-green { color: #40c040; } .con-yellow { color: #ffd200; } .con-orange { color: #ff8040; } .con-red { color: #ff3a2a; }
.con-locked { color: #6a6050; }
.parchment .con-grey { color: var(--cx-con-grey-ink); } .parchment .con-green { color: var(--cx-con-green-ink); } .parchment .con-yellow { color: var(--cx-con-yellow-ink); }
.parchment .con-orange { color: var(--cx-con-orange-ink); } .parchment .con-red { color: var(--cx-con-red-ink); }
.dg-item.locked .dg-item-name::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; transform: rotate(45deg); background: #4a4030; vertical-align: 1px; }
.dg-detail { min-width: 0; }
.dg-hero {
  border-radius: 3px; padding: 14px 16px 12px; margin-bottom: 10px; border: 1px solid #000; position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 80% 0%, rgba(255, 160, 60, 0.18), transparent 60%), linear-gradient(160deg, #2a1e14, #0e0a06);
  box-shadow: inset 0 0 0 1px var(--gilt-dim), inset 0 0 40px rgba(0, 0, 0, 0.8);
}
.theme-crypt .dg-hero, .theme-library .dg-hero { background: radial-gradient(ellipse at 80% 0%, rgba(142, 168, 212, 0.18), transparent 60%), linear-gradient(160deg, #1c1a2a, #0a0910); }
.theme-sunken .dg-hero { background: radial-gradient(ellipse at 80% 0%, rgba(134, 176, 165, 0.2), transparent 60%), linear-gradient(160deg, #10221e, #060c0a); }
.theme-molten .dg-hero, .theme-depths .dg-hero, .theme-cave .dg-hero { background: radial-gradient(ellipse at 80% 0%, rgba(216, 87, 42, 0.28), transparent 60%), linear-gradient(160deg, #2a120a, #0e0604); }
.theme-lair .dg-hero { background: radial-gradient(ellipse at 80% 0%, rgba(163, 53, 238, 0.18), transparent 60%), linear-gradient(160deg, #1a1020, #08060a); }
.theme-temple .dg-hero, .theme-vault .dg-hero { background: radial-gradient(ellipse at 80% 0%, rgba(255, 210, 120, 0.2), transparent 60%), linear-gradient(160deg, #2a2210, #0e0c06); }
.dg-name { font: 600 25px/1.1 var(--cx-font-title); color: var(--cx-gold-text); text-shadow: var(--cx-sh-text-gold); }
.dg-meta { font: 700 12px/1.3 var(--cx-font-label); color: var(--cx-text-dim); letter-spacing: 0.04em; }
.dg-meta.center { text-align: center; margin-bottom: 6px; }
.dg-flavor { font: italic 400 15px/1.4 var(--cx-font-flavor); color: var(--cx-gold-3); margin: 8px 0 6px; }
.dg-boss { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--cx-text); }
.dg-boss .icon { color: var(--cx-vermilion-hi); }
.dg-boss b { color: #ffb39a; }
.dg-form .field { margin: 6px 0; }
.dg-limit-row { display: flex; align-items: center; gap: 8px; height: 32px; cursor: pointer; font-size: 13.5px; }
.input.dg-limit { width: 70px; }
.input.dg-limit:disabled { opacity: 0.4; }
.dg-xp { font-size: 13.5px; color: var(--cx-text-dim); line-height: 1.45; margin: 6px 0 8px; }
.dg-xp b { color: #ebe4d6; }
.dg-focus-cards { display: flex; gap: 10px; margin: 6px 0; }
.dg-focus { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 3px; border: 1px solid #000; background: var(--cx-tex-iron), linear-gradient(180deg, #23262b, #121417); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.25); cursor: pointer; color: var(--cx-text); transition: color var(--cx-dur-quick); }
.dg-focus:hover { box-shadow: inset 0 0 0 1px var(--gilt); color: var(--cx-gold-leaf); }
.dg-focus.active { background: linear-gradient(90deg, rgba(255, 138, 61, 0), var(--cx-torch) 30%, var(--cx-torch) 70%, rgba(255, 138, 61, 0)) left 4px bottom 0 / calc(100% - 8px) 2px no-repeat, radial-gradient(ellipse at 50% 130%, rgba(255, 138, 61, 0.3), rgba(255, 138, 61, 0) 70%), var(--cx-tex-iron), linear-gradient(180deg, #3e434a, #1d2024 75%, #17191c); box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.7), 0 0 10px rgba(255, 138, 61, 0.25); }
.dg-focus-min { font: 700 30px/1 var(--cx-font-num); color: var(--cx-gold-leaf); text-shadow: 0 2px 0 #000; }
.dg-focus-lbl { font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.03em; }
.dg-focus-rest { font-size: 12px; color: var(--cx-text-dim); }
.dg-phone { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 2px; border: 1px solid #000; background: linear-gradient(90deg, rgba(30, 52, 104, 0.35), rgba(0, 0, 0, 0.15)); box-shadow: inset 0 0 0 1px rgba(142, 168, 212, 0.35); cursor: pointer; margin: 8px 0 4px; }
.dg-phone input { width: 16px; height: 16px; accent-color: var(--cx-lapis-2); }
.dg-phone .icon { color: var(--cx-lapis-3); width: 20px; height: 20px; }
.dg-phone span:last-child { display: flex; flex-direction: column; font-size: 13.5px; }
.dg-phone b { font-weight: 700; color: #dfe8ff; }
.dg-phone small { color: #9aaacc; }
.dg-phone.on { box-shadow: inset 0 0 0 1px rgba(142, 168, 212, 0.8); }
.dg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--cx-text-dim); }
.dg-active { border-radius: 3px; border: 1px solid #000; padding: 16px; background: radial-gradient(ellipse at 50% 0%, rgba(216, 87, 42, 0.18), transparent 60%), linear-gradient(180deg, #1e140c, #0a0604); box-shadow: inset 0 0 0 1px var(--gilt-dim); }
.dg-bossbar { margin: 12px 0; }
.dg-bossname { display: flex; align-items: center; gap: 6px; font: 400 16px/1.2 var(--cx-font-head); color: #ffb39a; margin-bottom: 4px; }
.dg-hp { height: 14px; }
.dg-hp .sqp-bar-fill { background: var(--cx-bar-enamel), var(--cx-bar-danger); }
.dg-runstats { display: flex; gap: 10px; flex-wrap: wrap; }
.dg-runstats > div { flex: 1; min-width: 90px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 3px; padding: 6px 10px; display: flex; flex-direction: column; }
.dg-runstats small { color: var(--cx-text-dim); font: 700 12px/1.2 var(--cx-font-label); letter-spacing: 0.03em; }
.dg-runstats b { font: 700 18px/1.2 var(--cx-font-num); font-variant-numeric: lining-nums tabular-nums; color: #ebe4d6; }
/* V5 Dungeons & Raids: the section tabs over the split, and the dungeon chest ladder (the run-stat wells, smaller) */
.sqp-tabs.dg-sections { margin-bottom: 10px; }
.dg-chests { margin: 8px 0 4px; }
.dg-chests > div { min-width: 0; gap: 1px; }
.dg-chests b { font: 600 13px/1.25 var(--cx-font-head); color: var(--cx-gold-text); }
.dg-chest-odds { font-size: 12px; line-height: 1.3; color: var(--cx-text-dim); }
.dg-active .dg-chests { margin-top: 12px; }

/* ============================================================== vendor (the Quartermaster) */
.vd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding-bottom: 10px; background: var(--rule-gilt) left bottom / 100% 1px no-repeat; }
.vd-npc { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, #8a6a3a 0, #2a1a0a 15px, #050506 18.5px, rgba(0, 0, 0, 0) 19px), linear-gradient(135deg, #f2c97a 0%, #c48a45 24%, #86592a 58%, #3e2711 100%); color: var(--cx-gold-leaf); box-shadow: 0 0 0 1px #050506, 0 3px 6px rgba(0, 0, 0, 0.5); flex: none; }
.vd-npc .icon { width: 22px; height: 22px; }
.vd-greet { flex: 1; }
.vd-npc-name { font: 400 18px/1.2 var(--cx-font-head); color: var(--cx-gold-text); }
.vd-line { font: italic 400 14px/1.35 var(--cx-font-flavor); color: var(--cx-gold-3); }
.vd-money { background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 2px; padding: 4px 10px; }
.vd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vd-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 3px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); outline: none; min-width: 0; }
.vd-item:hover, .vd-item:focus-visible { box-shadow: inset 0 0 0 1px var(--gilt), inset 0 1px 6px rgba(0, 0, 0, 0.45); }
.vd-item.locked { opacity: 0.55; }
.vd-item.owned .vd-name { color: var(--cx-text-dim); }
.vd-text { flex: 1; min-width: 0; }
.vd-name { font: 700 13.5px/1.2 var(--cx-font-body); color: var(--cx-text); }
.vd-price { font-size: 12.5px; margin-top: 2px; }
.vd-price .money { font-size: 12px; }
.vd-short .money { color: #ff6a50; }
.vd-buy { flex: none; }

/* ============================================================== achievements */
.ac-split { display: grid; grid-template-columns: 154px 1fr; gap: 12px; }
.ac-side { display: flex; flex-direction: column; gap: 3px; }
/* categories are leather bookmarks down the left edge; the open one is oxblood */
.ac-cat { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; border-radius: 2px var(--cx-r-3) var(--cx-r-3) 2px; border: 1px solid #000; background: var(--cx-tex-iron), linear-gradient(90deg, #26292e, #15171a); box-shadow: inset 0 1px 0 rgba(196, 204, 214, 0.1), inset 0 0 0 1px rgba(176, 122, 60, 0.16); color: var(--cx-text-dim); font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.03em; cursor: pointer; text-align: left; }
.ac-cat small { font: 700 11px/1 var(--cx-font-num); color: var(--cx-text-faint); }
.ac-cat:hover { color: var(--cx-gold-leaf); }
.ac-cat.active { color: var(--cx-gold-leaf); background: linear-gradient(var(--cx-torch), var(--cx-torch)) left 0 top 0 / 3px 100% no-repeat, radial-gradient(ellipse 80% 120% at 0% 50%, rgba(255, 120, 40, 0.26), rgba(255, 120, 40, 0) 70%), var(--cx-tex-iron), linear-gradient(90deg, #2e3237, #1b1d21 70%, #141619); box-shadow: inset 0 1px 0 rgba(255, 214, 150, 0.35), inset 0 0 0 1px rgba(226, 181, 106, 0.55); }
.ac-cat.active small { color: var(--cx-gold-3); }
.ac-main { max-height: min(500px, calc(100vh - 140px)); overflow: auto; padding-right: 4px; }
.ac-points { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font: 400 18px/1.2 var(--cx-font-head); color: var(--cx-gold-text); }
.ac-points b { color: #ebe4d6; font: 700 24px/1 var(--cx-font-num); }
.ac-points .muted { font: 400 13px/1.2 var(--cx-font-body); }
.ac-shield { color: var(--cx-gold-3); }
.ac-shield .icon { width: 26px; height: 26px; }
.ac-sumrow { display: grid; grid-template-columns: 90px 1fr 46px; gap: 10px; align-items: center; font-size: 13.5px; padding: 3px 0; }
.ac-sumrow small { color: var(--cx-text-dim); font: 700 11px/1 var(--cx-font-num); text-align: right; }
.ac-bar .sqp-bar-fill { background: var(--cx-bar-enamel), var(--cx-bar-verdigris); }
.ac-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 3px; margin-bottom: 4px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); opacity: 0.62; }
.ac-row.earned { opacity: 1; background: linear-gradient(90deg, rgba(90, 64, 20, 0.45), rgba(30, 20, 8, 0.45)); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.42), inset 0 1px 6px rgba(0, 0, 0, 0.35); }
.ac-row.hidden { opacity: 0.5; }
.ac-ico { width: 36px; height: 36px; border-radius: 3px; display: grid; place-items: center; background: #1a140c; border: 1px solid #000; box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.18); color: #6a5a40; flex: none; }
.ac-row.earned .ac-ico { width: 38px; height: 38px; border: 0; background: var(--cx-orn-seal-gold) center / 100% 100% no-repeat; box-shadow: none; }
.ac-row.earned .ac-ico .icon { display: none; }
.ac-ico .icon { width: 20px; height: 20px; }
.ac-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ac-text b { font: 400 16px/1.2 var(--cx-font-head); color: var(--cx-text); }
.ac-row.earned .ac-text b { color: var(--cx-gold-text); }
.ac-text small { font-size: 12.5px; color: var(--cx-text-dim); }
.ac-text em { font-size: 12.5px; color: var(--cx-q-epic-text); font-style: normal; }
.ac-right { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.ac-pts { width: 30px; height: 34px; display: grid; place-items: center; padding-bottom: 5px; font: 700 13px/1 var(--cx-font-num); color: var(--cx-text-dim); background: linear-gradient(180deg, #4a3a24, #1e160c); -webkit-clip-path: polygon(0 0, 100% 0, 100% 56%, 86% 80%, 50% 100%, 14% 80%, 0 56%); clip-path: polygon(0 0, 100% 0, 100% 56%, 86% 80%, 50% 100%, 14% 80%, 0 56%); }
.ac-row.earned .ac-pts { background: var(--cx-tex-gilt), linear-gradient(180deg, #e2b56a 0%, #b07a3c 22%, #7a5229 60%, #3e2711 100%); color: #fff1d0; text-shadow: 0 1px 0 #000; }
.ac-right small { font-size: 11px; color: var(--cx-text-dim); white-space: nowrap; }
.ac-title { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border: 1px solid rgba(0, 0, 0, 0.6); border-radius: 2px; margin-bottom: 4px; font: 400 15px/1.2 var(--cx-font-head); color: var(--cx-q-epic-text); background: var(--well); box-shadow: var(--well-sh); }
.ac-title.active { box-shadow: inset 3px 0 0 var(--cx-q-epic), inset 0 0 0 1px rgba(163, 53, 238, 0.5); background: rgba(163, 53, 238, 0.1); }

/* ============================================================== statistics */
.stt-played { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; }
.stt-played > div, .stt-best { background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 3px; padding: 7px 11px; display: flex; flex-direction: column; min-width: 0; }
.stt-played small, .stt-best small { color: var(--cx-text-dim); font: 700 12px/1.2 var(--cx-font-label); letter-spacing: 0.04em; }
.stt-played b, .stt-best b { color: #ebe4d6; font: 700 17px/1.3 var(--cx-font-num); font-variant-numeric: lining-nums tabular-nums; }
.stt-exam { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 8px 12px; border-radius: 0 3px 3px 0; border: 1px solid rgba(0, 0, 0, 0.6); border-left: 3px solid var(--cx-gold-3); background: linear-gradient(90deg, rgba(184, 134, 46, 0.14), transparent); font-size: 13.5px; }
.stt-exam b { color: var(--cx-gold-text); font: 400 16px/1.2 var(--cx-font-head); }
.stt-exam.none { border-color: transparent; border-left-color: var(--cx-gold-1); background: transparent; color: var(--cx-text-dim); }
.stt-exam-ico { color: var(--cx-gold-3); }
.stt-exam-ico .icon { width: 18px; height: 18px; }
.stt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
.stt-box { background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 3px; padding: 7px 11px; }
.stt-box-h { font: 400 16px/1.2 var(--cx-font-head); color: var(--cx-gold-text); margin-bottom: 4px; padding-bottom: 3px; background: var(--rule-gilt) left bottom / 100% 1px no-repeat; }
.stt-kv { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; padding: 1px 0; }
.stt-kv span { color: var(--cx-text-dim); }
.stt-kv b { font: 700 13px/1.4 var(--cx-font-num); font-variant-numeric: lining-nums tabular-nums; color: #ebe4d6; white-space: nowrap; }
.stt-kv .money { font-size: 12px; }
.stt-bests { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stt-legend { font-size: 12px; color: var(--cx-text-dim); display: inline-flex; align-items: center; gap: 3px; }
.stt-legend i { width: 10px; height: 10px; border-radius: 1px; display: inline-block; }

.hm-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 420px; }
.hm-wd { font: 700 12px/1.2 var(--cx-font-label); color: var(--cx-text-dim); text-align: center; }
.hm-cell { aspect-ratio: 1.6; border-radius: 2px; position: relative; display: grid; place-items: center; font: 700 11px/1 var(--cx-font-num); color: rgba(255, 246, 224, 0.5); outline: none; border: 1px solid rgba(0, 0, 0, 0.6); }
.hm-cell.blank { border: none; }
.hm-l0 { background: #17120d; }
.hm-l1 { background: #3d2c12; color: rgba(255, 246, 224, 0.7); }
.hm-l2 { background: #6b4a16; color: rgba(255, 246, 224, 0.85); }
.hm-l3 { background: #a8792a; color: #ebe4d6; }
.hm-l4 { background: var(--cx-tex-gilt), linear-gradient(180deg, #e2b56a 0%, #b07a3c 22%, #7a5229 60%, #3e2711 100%); color: #fff1d0; text-shadow: 0 1px 0 #000; }
.hm-cell.blank { background: transparent; }
.hm-cell.today { box-shadow: 0 0 0 2px var(--cx-gold-leaf); }
.hm-cell.hit::after { content: ''; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; transform: rotate(45deg); background: var(--cx-verdigris-3); box-shadow: 0 0 0 1px #000; }
.hm-cell:not(.blank):hover, .hm-cell:focus-visible { box-shadow: 0 0 0 2px var(--cx-torch); }

.xb-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; height: 130px; align-items: end; }
.xb-col { display: flex; flex-direction: column; align-items: center; height: 100%; outline: none; }
.xb-val { font: 700 11px/1 var(--cx-font-num); color: var(--cx-text-dim); height: 14px; }
.xb-track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: rgba(196, 204, 214, 0.03); border-radius: 1px 1px 0 0; box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.06); }
.xb-fill { width: 100%; background: var(--cx-bar-enamel), var(--cx-bar-xp); border-radius: 1px 1px 0 0; box-shadow: inset 0 1px 0 rgba(255, 236, 250, 0.25); transition: height 0.4s; }
.xb-col.today .xb-fill { background: var(--cx-bar-enamel), linear-gradient(180deg, #c45cbc, #94008c); box-shadow: inset 0 0 0 1px rgba(244, 220, 148, 0.6); }
.xb-col:hover .xb-fill, .xb-col:focus-visible .xb-fill { filter: brightness(1.25); }
.xb-lbl { font: 700 12px/1.2 var(--cx-font-label); color: var(--cx-text-dim); margin-top: 3px; }
.xb-col.today .xb-lbl { color: var(--cx-gold-leaf); }

.pm-rows { display: flex; flex-direction: column; gap: 5px; }
.pm-row { display: grid; grid-template-columns: 120px 1fr 64px; gap: 10px; align-items: center; font-size: 13.5px; outline: none; }
.pm-lbl { color: var(--cx-text); }
.pm-track { height: 12px; border: 1px solid #000; background: linear-gradient(180deg, #040405, #0c0e10 60%, #15181c); border-radius: 2px; box-shadow: inset 0 1px 2px #000, 0 0 0 1px #3a3b3e; overflow: hidden; }
.pm-fill { display: block; height: 100%; opacity: 0.88; }
.pm-val { font: 700 13px/1 var(--cx-font-num); text-align: right; color: #ebe4d6; }
.pm-row:hover .pm-fill { opacity: 1; }

.sb-intro { font-size: 12.5px; color: var(--cx-text-dim); margin-bottom: 8px; }
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.sb-shot { padding: 0; border: 1px solid #000; border-radius: 2px; overflow: hidden; background: #0a0806; cursor: zoom-in; position: relative; aspect-ratio: 16 / 10; box-shadow: 0 0 0 2px #2e1d11, 0 0 0 3px var(--gilt), 0 0 0 4px #000; }
.sb-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.sb-shot:hover img { transform: scale(1.03); }
.sb-shot:hover { box-shadow: 0 0 0 2px #2e1d11, 0 0 0 3px var(--cx-gold-3), 0 0 0 4px #000; }
.sb-shot.broken img { visibility: hidden; }
.sb-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: baseline; padding: 14px 8px 4px; background: linear-gradient(transparent, rgba(7, 8, 10, 0.88)); }
.sb-cap b { font: 400 14px/1.2 var(--cx-font-head); color: var(--cx-gold-text); text-shadow: 0 1px 0 #000; }
.sb-cap small { color: var(--cx-text-dim); font-size: 11px; }
.sb-light { text-align: center; }
.sb-big { max-width: min(860px, 86vw); max-height: 70vh; border: 1px solid #000; box-shadow: 0 0 0 3px #2e1d11, 0 0 0 4px var(--gilt); display: block; margin: 0 auto; }
.sb-bigcap { font: 400 17px/1.2 var(--cx-font-head); color: var(--cx-gold-text); margin-top: 10px; }
.modal.sqp-dlg-photo { max-width: min(920px, calc(100vw - 32px)); }

/* ============================================================== settings */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 2px; border-bottom: 1px solid rgba(176, 122, 60, 0.12); }
.set-label { display: flex; flex-direction: column; min-width: 0; }
.set-label span { color: var(--cx-text); font-size: 14.5px; }
.set-label small { color: var(--cx-text-dim); font-size: 12.5px; line-height: 1.35; }
.set-ctl { flex: none; }
.set-pair { display: inline-flex; align-items: center; gap: 12px; }
.set-pair .input { width: 150px; }
.set-chars, .set-classes { display: flex; flex-direction: column; gap: 5px; }
.set-char, .set-class { --cls: #fff; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 0 3px 3px 0; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-left: 3px solid var(--cls); }
.set-char.active { background: linear-gradient(90deg, rgba(226, 181, 106, 0.16), rgba(7, 8, 10, 0.42)); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.4); }
.set-char-text, .set-class-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.set-char-text b, .set-class-text b { font: 400 16px/1.2 var(--cx-font-head); }
.set-char-text small, .set-class-text small { font-size: 12.5px; color: var(--cx-text-dim); }
.set-char-text small.muted { color: var(--cx-text-faint); }
.set-char-tools, .set-class-tools { display: flex; gap: 6px; align-items: center; flex: none; }
.set-char-tools .btn-danger .icon { width: 13px; height: 13px; }
.set-playing { font: 700 12px/1.3 var(--cx-font-label); letter-spacing: 0.03em; color: var(--cx-verdigris-3); border: 1px solid rgba(134, 176, 165, 0.5); border-radius: 2px; padding: 1px 9px; }
.set-class-gem { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--cls) 45%, #000 120%); box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--cx-brass), 0 0 0 3px #000; flex: none; }
.set-formbox { border: 1px solid #000; border-radius: 3px; padding: 10px 12px; margin: 6px 0 10px; background: var(--well); box-shadow: inset 0 0 0 1px var(--gilt-dim), inset 0 1px 6px rgba(0, 0, 0, 0.45); }
.set-data { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.set-import { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 4px; }
.set-import input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hk-urls { display: flex; flex-direction: column; gap: 3px; }
.hk-row { display: grid; grid-template-columns: 150px 1fr 30px; gap: 8px; align-items: center; font-size: 12.5px; }
.hk-row.hk-curl { grid-template-columns: 1fr 30px; }
.hk-lbl { color: var(--cx-text); }
.hk-row code, .sqp-note code { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(176, 122, 60, 0.18); border-radius: 2px; padding: 3px 6px; color: var(--cx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: all; -webkit-user-select: all; }
.hk-copy { width: 28px; height: 26px; border-radius: 3px; border: 1px solid #000; background: var(--cx-tex-oak), linear-gradient(180deg, #34383e, #141619); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.42); color: var(--cx-gold-text); cursor: pointer; display: grid; place-items: center; }
.hk-copy:hover { color: var(--cx-gold-leaf); box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.85); }
.hk-copy.ok { color: var(--cx-verdigris-3); }
.hk-copy .icon { width: 13px; height: 13px; }
.hk-steps { margin: 4px 0 6px; padding-left: 22px; font-size: 13.5px; line-height: 1.55; }
.hk-steps li::marker { color: var(--cx-vermilion-hi); font-family: var(--cx-font-title); }
.kb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 18px; }
.kb-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.3; padding: 2px 0; }
.kb-keys { flex: none; min-width: 76px; white-space: nowrap; color: var(--cx-text-dim); font-size: 11px; }

/* Settings → Interface → Weather (real local weather, SPEC UPDATE 22:20): Real / Simulated / Subtle / Off, the city
   written on a ruled line beside the quill, and the live line ("Stockholm · light rain · 9°C") under the label. */
.set-wx-seg .sqp-seg-btn { padding-left: 11px; padding-right: 11px; }
.set-wx-row .set-label { gap: 3px; }
.set-label .set-wx-line { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font: italic 400 13.5px/1.3 var(--cx-font-flavor); color: var(--cx-text-dim); }
.set-wx-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.set-wx-dot {
  /* a little armillary star: lapis while it mirrors the sky outside, faint brass otherwise */
  flex: none; width: 9px; height: 9px; transform: rotate(45deg);
  background: var(--cx-gold-1); box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(255, 240, 200, 0.25);
}
.set-label .set-wx-line.is-live { color: var(--cx-text); }
.set-wx-line.is-live .set-wx-dot { background: radial-gradient(circle at 35% 30%, #c9d8ff, var(--cx-lapis-3) 45%, var(--cx-lapis-1)); }
.set-wx-ctl { display: inline-flex; align-items: center; gap: 6px; }
.set-wx-quill { flex: none; width: 20px; height: 20px; background: var(--cx-orn-quill) center / 100% 100% no-repeat; opacity: 0.9; }
.set-wx-ctl .input { width: 220px; }
.set-wx-ctl .input.bad { box-shadow: inset 0 0 0 1px var(--cx-vermilion-hi); }

/* class form */
.sqp-classform .field { margin: 6px 0; }
.sqp-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.sqp-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #000; cursor: pointer; box-shadow: 0 0 0 1px var(--cx-brass); transition: transform 0.08s; padding: 0; }
.sqp-swatch:hover { transform: scale(1.08); }
.sqp-swatch.active { box-shadow: 0 0 0 2px var(--cx-gold-leaf), 0 0 8px rgba(255, 210, 120, 0.55); }
.sqp-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px; }
.sqp-style { --st: #fff; display: grid; grid-template-columns: 14px 1fr; grid-template-rows: auto auto; column-gap: 7px; align-items: center; text-align: left; padding: 5px 8px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.6); background: var(--well); box-shadow: var(--well-sh); cursor: pointer; position: relative; }
.sqp-style:hover { box-shadow: inset 0 0 0 1px var(--gilt), inset 0 1px 6px rgba(0, 0, 0, 0.45); }
.sqp-style.active { background: linear-gradient(90deg, color-mix(in srgb, var(--st) 20%, transparent), rgba(7, 8, 10, 0.42)); box-shadow: inset 3px 0 0 var(--st), inset 0 0 0 1px color-mix(in srgb, var(--st) 55%, transparent); }
.sqp-style.suggested:not(.active) { border-style: dashed; border-color: color-mix(in srgb, var(--st) 60%, #000); }
.sqp-style-gem { grid-row: 1 / 3; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--st) 50%, #000 130%); box-shadow: 0 0 0 1px #000; }
.sqp-style-name { font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.02em; color: var(--st); text-shadow: 0 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqp-style-sub { font-size: 12px; color: var(--cx-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sqp-style-tag { position: absolute; top: -7px; right: 6px; font: 700 11px/14px var(--cx-font-num); letter-spacing: 0.03em; color: #2b1405; background: var(--cx-gold-3); border: 1px solid #000; border-radius: 2px; padding: 0 5px; }
.sqp-cf-preview { margin: 8px 0 2px; padding: 8px 10px; border-radius: 2px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); }
.sqp-cf-name { font: 400 17px/1.2 var(--cx-font-head); text-shadow: 0 1px 0 #000; }
.sqp-cf-sub { font-size: 12.5px; color: var(--cx-text-dim); }
.sqp-cf-mobs { font: italic 400 13.5px/1.3 var(--cx-font-flavor); color: var(--cx-gold-3); margin-top: 3px; }
.sqp-cf-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* realm pace cards */
.sqp-realms { display: flex; flex-direction: column; gap: 5px; }
.sqp-realm { display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 7px 10px; border-radius: 0 3px 3px 0; border: 1px solid rgba(0, 0, 0, 0.6); border-left: 3px solid transparent; background: var(--well); box-shadow: var(--well-sh); cursor: pointer; color: var(--cx-text); }
.sqp-realm:hover { box-shadow: inset 0 0 0 1px var(--gilt), inset 0 1px 6px rgba(0, 0, 0, 0.45); }
.sqp-realm.active { border-left-color: var(--cx-gold-3); background: linear-gradient(90deg, rgba(226, 181, 106, 0.16), rgba(7, 8, 10, 0.42)); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.45); }
.sqp-realm-top { display: flex; align-items: center; gap: 8px; }
.sqp-realm-name { font: 400 16px/1.2 var(--cx-font-head); color: var(--cx-gold-text); }
.sqp-realm-tag { font: 700 11px/14px var(--cx-font-num); letter-spacing: 0.04em; color: #2b1405; background: var(--cx-gold-3); border-radius: 2px; padding: 0 4px; }
.sqp-realm-hours { margin-left: auto; font: 700 12px/1 var(--cx-font-num); color: #ebe4d6; white-space: nowrap; }
.sqp-realm.needs .sqp-realm-hours { color: var(--cx-text-dim); font: italic 400 12.5px/1 var(--cx-font-body); }
.sqp-realm-desc { font-size: 12.5px; color: var(--cx-text-dim); line-height: 1.35; }
.sqp-examedit { margin: 6px 0; padding: 8px 10px; border: 1px dashed var(--gilt-dim); border-radius: 2px; background: var(--well); }
.sqp-examedit-row { display: flex; gap: 8px; align-items: flex-end; }
.sqp-examedit-row .field { margin: 0; flex: 1; }
.sqp-examedit-row .btn { margin-bottom: 1px; }

/* ============================================================== help (v1) */
.hp { padding: 16px 20px; }
.hp h2 { margin: 0 0 6px; font: 400 24px/1.15 var(--cx-font-head); }
.hp h3 { margin: 18px 0 6px; font: 400 18px/1.2 var(--cx-font-head); }
.hp-lead { font-size: 16px; line-height: 1.5; margin: 0 0 10px; }
.hp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hp-table th { text-align: left; font: 700 12px/1.2 var(--cx-font-label); letter-spacing: 0.05em; color: var(--cx-ink-rubric); border-bottom: 1px solid rgba(122, 29, 16, 0.4); padding: 4px 6px; }
.hp-table td { padding: 4px 6px; border-bottom: 1px solid rgba(90, 60, 30, 0.14); vertical-align: middle; }
.hp-table td:nth-child(2) { white-space: nowrap; }
.hp-rubric { display: flex; flex-direction: column; gap: 4px; }
.hp-tier { --tier: #fff; display: grid; grid-template-columns: 34px 104px 120px 1fr; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 0 2px 2px 0; background: rgba(255, 252, 240, 0.35); border-left: 4px solid var(--tier); font-size: 13.5px; }
.hp-tier b { color: var(--cx-ink-text); font: 400 15px/1.2 var(--cx-font-head); }
.hp-tier-min { font-weight: 700; color: var(--cx-ink-text); font-family: var(--cx-font-num); }
.hp-tier small { color: var(--cx-ink-text-dim); font-size: 12.5px; }
.hp-tips { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.hp-tips li { margin: 3px 0; }
.hp-tips b { color: var(--cx-ink-rubric); }
.hp .kb-row { color: var(--cx-ink-text); }
.hp .kb-keys { color: var(--cx-ink-text-dim); }
.hp-foot { margin-top: 12px; font: italic 400 15px/1.4 var(--cx-font-flavor); color: var(--cx-ink-gold); }

/* ============================================================== dialogs */
.modal.sqp-dialog { min-width: 340px; }
/* Short windows (compact mode): the dialog body scrolls instead of running under the buttons. */
.modal > .modal-body { min-height: 0; flex: 1 1 auto; }
.modal.sqp-dlg-small { width: 440px; }
.modal.sqp-dlg-wide { width: 560px; }
.modal.sqp-dlg-exam { width: 500px; }
.sqp-dlg-danger .modal-title { border-image-source: var(--cx-orn-ribbon-ink); }
.sqp-del .input { margin-top: 6px; }

/* V7.2.0: the batch prompt (.bp*) is gone with batch logging (D4 §2.1 row 10) */

.wp p { margin-top: 0; font-size: 15px; color: var(--cx-text); }
.wp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wp-tier { --tier: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 3px; cursor: pointer; border: 1px solid #000; border-top: 3px solid var(--tier); background: var(--cx-tex-iron), linear-gradient(180deg, #23262b, #121417); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.2); color: var(--cx-text); }
.wp-tier:hover, .wp-tier:focus-visible { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier) 70%, transparent), 0 0 10px color-mix(in srgb, var(--tier) 30%, transparent); }
.wp-tier b { font: 700 16px/1.2 var(--cx-font-label); color: var(--tier); text-shadow: 0 1px 0 #000; }
.wp-tier small { font-size: 13px; color: var(--cx-text-dim); }
.wp-xp { font: 700 12px/1 var(--cx-font-num); color: var(--cx-q-epic-text); }
.wp-key { opacity: 0.9; }

/* phone at the Inn: cold steel blue is rest */
.pf { text-align: center; }
.pf-ico { width: 54px; height: 54px; margin: 0 auto 4px; color: var(--cx-torch); }
.pf-ico .icon { width: 100%; height: 100%; filter: drop-shadow(0 0 8px rgba(255, 140, 50, 0.5)); }
.pf p { font-size: 15px; }
.pf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.pf-opt { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 2px 6px; border-radius: 3px; border: 1px solid #000; background: var(--cx-tex-iron), linear-gradient(180deg, #1c2a40, #0e141e); box-shadow: inset 0 0 0 1px rgba(142, 168, 212, 0.35); color: #dfe8ff; cursor: pointer; }
.pf-opt:hover, .pf-opt.rec { box-shadow: inset 0 0 0 1px rgba(142, 168, 212, 0.85); }
.pf-opt.rec { box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.7), 0 0 10px rgba(142, 168, 212, 0.4); }
.pf-min { font: 700 25px/1 var(--cx-font-num); color: #ebe4d6; }
.pf-lbl { font-size: 13px; color: #b4c2da; }
.pf-rest { font: 700 11px/1.2 var(--cx-font-num); color: var(--cx-lapis-3); margin: 2px 0; }

/* exam finish */
.ef { text-align: center; }
.ef-score { font-family: var(--cx-font-num); color: var(--cx-gold-leaf); line-height: 1; margin: 4px 0 6px; text-shadow: 0 3px 0 #000; }
.ef-score span { font-size: 54px; font-weight: 700; }
.ef-score small { font-size: 22px; margin-left: 2px; }
.ef-range { width: 100%; height: 8px; }
.ef-brackets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 8px; }
.ef-bracket { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.6); background: var(--well); box-shadow: var(--well-sh); cursor: pointer; color: var(--cx-text-dim); }
.ef-bracket b { font: 700 14px/1.2 var(--cx-font-label); letter-spacing: 0.02em; }
.ef-bracket small { font: 700 12px/1.25 var(--cx-font-num); }
.ef-bracket.active { color: #ebe4d6; }
.ef-bracket.b-survived.active { box-shadow: inset 0 0 0 1px #1eff00, 0 0 8px rgba(30, 255, 0, 0.3); }
.ef-bracket.b-cleared.active { box-shadow: inset 0 0 0 1px var(--cx-q-rare-text), 0 0 8px rgba(0, 112, 221, 0.45); }
.ef-bracket.b-heroic.active { box-shadow: inset 0 0 0 1px var(--cx-q-epic-text), 0 0 8px rgba(163, 53, 238, 0.45); }
.ef-bracket.b-flawless.active { box-shadow: inset 0 0 0 1px var(--cx-q-legendary), 0 0 10px rgba(255, 128, 0, 0.5); background: rgba(255, 128, 0, 0.1); }
.ef-info { font-size: 15px; line-height: 1.55; text-align: left; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 3px; padding: 8px 11px; }
.ef-info b { color: #4fd43a; }
.ef-chest { color: #9ac8ff; }
.ef-info .tt-green { color: #4fd43a; }

.sqp-dlg-run .field { margin: 6px 0; }

/* ============================================================== cards (welcome, report, lore, repeat): forged cards with a medallion */
.sqp-card-layer { position: fixed; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: min(520px, calc(100vw - 20px)); }
.sqp-card-layer.top { top: 92px; }
.sqp-card-layer.center { top: 50%; transform: translate(-50%, -50%); }
.sqp-card-layer.bottom { bottom: 128px; }
/* Full mode: the bottom of the screen belongs to the hero, the chat and the HUD toasts, so the
   interactive repeat / lore cards live in the quiet top-left, under the unit frame. */
body:not(.sq-compact) .sqp-card-layer.bottom { left: 12px; bottom: auto; top: 142px; transform: none; align-items: stretch; width: min(470px, calc(100vw - 24px)); }
.sqp-card.frame {
  /* a forged card: iron band, bronze rim, iron cap corners (no title plate — cards are not windows) */
  pointer-events: auto;
  width: 100%;
  padding: 14px 18px 13px;
  background: var(--cx-bg-oak);
  box-shadow: var(--cx-sh-frame);
  animation: cx-rise var(--cx-dur-calm) var(--cx-ease) both;
  transition: opacity 0.3s, transform 0.3s;
}
.sqp-card.frame::before { inset: 1px; background: var(--cx-caps); }
.sqp-card.frame::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid var(--gilt);
  border-radius: 2px;
  background: var(--cx-bg-smoke);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.8), inset 0 3px 12px rgba(0, 0, 0, 0.5);
  z-index: -1;
  pointer-events: none;
}
.sqp-card.frame { isolation: isolate; }
.sqp-card.out { opacity: 0; transform: translateY(6px); }
@keyframes sqpCardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.sqp-card-x { position: absolute; top: 9px; right: 9px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--cx-orn-close) center / 100% 100% no-repeat; cursor: pointer; padding: 0; z-index: 6; }
.sqp-card-x .icon { display: none; }
.sqp-card-x:hover { filter: brightness(1.2); }

.sqp-lore { width: min(440px, 100%); }
.lore-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; padding-right: 24px; }
.lore-ico { color: var(--cx-gold-text); }
.lore-ico .icon { width: 18px; height: 18px; }
.lore-title { font: 700 17px/1.2 var(--cx-font-head); letter-spacing: 0.03em; color: var(--cx-gold-text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lore-title small { font: 400 14px/1.2 var(--cx-font-body); letter-spacing: 0; color: var(--cx-text-dim); }
.lore-xp { font: 700 13px/1 var(--cx-font-num); color: var(--cx-q-epic-text); white-space: nowrap; }
.lore-input { font: italic 500 18px/1.3 var(--cx-font-flavor); }
.lore-hint { font-size: 13px; color: var(--cx-text-dim); margin-top: 6px; }
.lore-hint.err { color: var(--cx-vermilion-hi); }
.lore-meter { position: absolute; left: 10px; right: 10px; bottom: 6px; height: 2px; background: rgba(196, 204, 214, 0.06); overflow: hidden; }
.lore-meter-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--cx-ember), var(--cx-torch) 60%, var(--cx-candle)); }
.sqp-lore.typing .lore-meter { opacity: 0; }
.lore-done { display: flex; align-items: center; gap: 8px; font: 700 13px/1.2 var(--cx-font-label); color: var(--cx-verdigris-3); justify-content: center; padding: 4px 0; }
.lore-done b { color: var(--cx-q-epic-text); font-family: var(--cx-font-num); }

.sqp-welcome { width: min(460px, 100%); text-align: center; padding-top: 16px; }
.wb-title { font: 700 22px/1.2 var(--cx-font-head); letter-spacing: 0.03em; color: var(--cx-gold-text); text-shadow: var(--cx-sh-text-gold); }
.wb-lines { margin: 6px 0 8px; font-size: 16px; line-height: 1.5; color: var(--cx-text); }
.wb-rest { color: var(--cx-lapis-3); }
.wb-rest b { color: #ebe4d6; font-family: var(--cx-font-num); }
.wb-gold { color: var(--cx-gold-3); font: italic 500 17px/1.4 var(--cx-font-flavor); }
.wb-dailies { text-align: left; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 3px; padding: 6px 10px; margin: 6px 0; }
.wb-h { font: 700 12px/1.3 var(--cx-font-label); letter-spacing: 0.05em; color: var(--cx-text-dim); margin-bottom: 2px; }
.wb-daily { font-size: 15px; color: var(--cx-gold-text); display: flex; align-items: baseline; gap: 6px; }
.wb-daily small { color: var(--cx-text-dim); font-size: 13.5px; }
.wb-daily.done { color: var(--cx-molten); }
.wb-q { font-weight: 700; color: var(--cx-torch); width: 10px; text-align: center; }
.wb-q.wb-q--mark { width: 16px; display: inline-flex; align-items: center; justify-content: center; }   /* V7.3: the scroll mark */
.wb-q .wb-qi { width: 15px; height: 15px; }
.wb-streak { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: #ffc080; margin: 4px 0; }
.wb-streak .icon { color: var(--cx-torch); }
.wb-foot, .rp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; color: var(--cx-text-dim); }

.sqp-report { width: min(480px, 100%); padding-top: 16px; }
.rp-title { font: 700 23px/1.2 var(--cx-font-head); letter-spacing: 0.03em; color: var(--cx-gold-text); text-align: center; text-shadow: var(--cx-sh-text-gold); }
.rp-sub { text-align: center; color: var(--cx-text-dim); font-size: 15px; margin-bottom: 10px; }
.rp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rp-cell { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: var(--well-sh); border-radius: 3px; }
.rp-cell b { font: 700 19px/1.2 var(--cx-font-num); font-variant-numeric: lining-nums; color: #ebe4d6; }
.rp-cell small { color: var(--cx-text-dim); font: 700 12px/1.2 var(--cx-font-label); letter-spacing: 0.03em; }
.rp-best { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 6px 8px; border-radius: 3px; background: var(--well); border: 1px solid rgba(0, 0, 0, 0.6); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc, #6b4626) 60%, transparent); outline: none; }
.rp-best span { display: flex; flex-direction: column; }
.rp-best small { color: var(--cx-text-dim); font-size: 13px; }
.rp-best b { font-size: 15px; }
.rp-links { margin-top: 8px; font-size: 15px; line-height: 1.6; }
.rp-links .item-link { cursor: default; }

/* The welcome & session cards carry thorned corner brackets instead of caps and one medallion riveted to the top
   edge (steel crescent = rest, bronze star = a session sealed) — the single focal ornament of the card (DESIGN §6.7, §8). */
.sqp-card.frame.sqp-report, .sqp-card.frame.sqp-welcome { padding-top: 30px; margin-top: 18px; }
.sqp-card.frame.sqp-report::before, .sqp-card.frame.sqp-welcome::before { inset: -6px; background: var(--cx-corners); z-index: 5; }
.sqp-report > .rp-title::before, .sqp-welcome > .wb-title::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -22px;
  width: 46px;
  height: 46px;
  margin-left: -23px;
  background: var(--cx-orn-seal-gold) center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55));
  z-index: 6;
}
.sqp-welcome > .wb-title::before { background-image: var(--cx-orn-seal-lapis); }
.sqp-report > .sqp-card-x, .sqp-welcome > .sqp-card-x { top: 10px; right: 44px; z-index: 7; }   /* clear of the cornerpiece */
.rp-cell { background: var(--cx-tex-grain), linear-gradient(180deg, rgba(7, 8, 10, 0.6), rgba(7, 8, 10, 0.42)); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.18), inset 0 1px 6px rgba(0, 0, 0, 0.5); }
.rp-cell b { color: var(--cx-gold-leaf); font-variant-numeric: lining-nums tabular-nums; }

/* ============================================================== full-screen overlays: the CHARACTER-CREATION HALL (and v1 select)
 * An Ember & Iron standalone screen (DESIGN §6.2 / §8 "Character creation"): a forged band at the viewport edge, a
 * bronze rule with grand thorned corners; behind, storm clouds over misty ridges, a cold break in the sky and firelight
 * rising from below, cold smoke banks and sparse drifting embers (theme .ei-smoke / .ei-embers). The hero stands on a
 * rocky outcrop above the mist; left a smoked-steel panel of race sockets & traits, right a smoked-steel panel of the
 * class (course) and realm pace in recessed sockets; the name in a recessed socket by the quill; ONE big carved bronze
 * ENTER WORLD plate (.ei-btn-plate); Back as a ghost. */
.sqp-overlay {
  position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; color: var(--cx-text);
  background: #07080a; animation: fadeIn var(--cx-dur-calm) ease-out; overflow: hidden;
  font-family: var(--cx-font-body);
}
.sqp-overlay.out { opacity: 0; transition: opacity 0.35s; }
.sqp-overlay > :not(.cc-bg):not(.cc-vignette):not(.ei-smoke):not(.ei-embers) { position: relative; z-index: 2; }
.sqp-overlay > .cc-bg, .sqp-overlay > .cc-vignette { position: absolute; z-index: 0; }
.sqp-overlay > .ei-smoke, .sqp-overlay > .ei-embers { z-index: 1; }
.sqp-overlay.reduced > .ei-embers { display: none; }
.sqp-overlay::before {
  /* the forged iron band between the viewport edge and the bronze rule (as .codex-screen) */
  content: '';
  position: absolute;
  inset: 0;
  --_b: var(--cx-screen-band);
  background: var(--cx-bg-oak);
  -webkit-clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, var(--_b) var(--_b), var(--_b) calc(100% - var(--_b)), calc(100% - var(--_b)) calc(100% - var(--_b)), calc(100% - var(--_b)) var(--_b), var(--_b) var(--_b));
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, var(--_b) var(--_b), var(--_b) calc(100% - var(--_b)), calc(100% - var(--_b)) calc(100% - var(--_b)), calc(100% - var(--_b)) var(--_b), var(--_b) var(--_b));
  pointer-events: none;
  z-index: 7;
}
.sqp-overlay::after {
  /* the bronze rule and the four grand thorned corners (ember-diamond bosses) */
  content: '';
  position: absolute;
  top: var(--cx-screen-band); right: var(--cx-screen-band); bottom: var(--cx-screen-band); left: var(--cx-screen-band);
  border: 1px solid rgba(176, 122, 60, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 0 30px rgba(0, 0, 0, 0.55);
  background:
    var(--cx-orn-grand-tl) left -10px top -10px / var(--cx-grand) var(--cx-grand) no-repeat,
    var(--cx-orn-grand-tr) right -10px top -10px / var(--cx-grand) var(--cx-grand) no-repeat,
    var(--cx-orn-grand-bl) left -10px bottom -10px / var(--cx-grand) var(--cx-grand) no-repeat,
    var(--cx-orn-grand-br) right -10px bottom -10px / var(--cx-grand) var(--cx-grand) no-repeat;
  pointer-events: none;
  z-index: 8;
}
/* the sky: storm clouds, a cold break of light behind the hero, firelight from below */
.cc-bg { inset: 0; pointer-events: none;
  background:
    /* two faint cold shafts of light falling from a break in the clouds (static) */
    linear-gradient(112deg, rgba(196, 210, 228, 0) 38%, rgba(196, 210, 228, 0.045) 41%, rgba(196, 210, 228, 0) 45%, rgba(196, 210, 228, 0) 47%, rgba(196, 210, 228, 0.035) 49%, rgba(196, 210, 228, 0) 53%),
    radial-gradient(ellipse 26% 34% at 50% 34%, rgba(196, 210, 228, 0.16), rgba(196, 210, 228, 0) 72%),
    radial-gradient(ellipse 60% 26% at 50% 104%, rgba(255, 120, 40, 0.24), rgba(226, 84, 31, 0.06) 50%, rgba(226, 84, 31, 0) 72%),
    radial-gradient(ellipse 70% 22% at 25% 12%, rgba(70, 80, 91, 0.36), rgba(70, 80, 91, 0) 70%),
    radial-gradient(ellipse 60% 20% at 78% 18%, rgba(70, 80, 91, 0.3), rgba(70, 80, 91, 0) 70%),
    linear-gradient(180deg, #07080a 0%, #10141a 22%, #1d242c 44%, #262e37 54%, #1a1e23 70%, #0e0f11 86%, #130c08 100%);
}
.cc-bg::before {
  /* misty mountain ranges (far, mid, near) lit along their crests from the cloud break, a ruined watchtower with one
     ember window on a far peak, fog banks between the ranges (one SVG, rasterised once per size) */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 12%;
  height: 60%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 500' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='.1' stop-color='%2365717d'/%3E%3Cstop offset='.45' stop-color='%23434c56'/%3E%3Cstop offset='.8' stop-color='%232a3139'/%3E%3C/linearGradient%3E%3ClinearGradient id='m' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='.4' stop-color='%23323a42'/%3E%3Cstop offset='.7' stop-color='%2321262c'/%3E%3Cstop offset='1' stop-color='%2316191d'/%3E%3C/linearGradient%3E%3ClinearGradient id='n' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='.5' stop-color='%2315181b'/%3E%3Cstop offset='1' stop-color='%230a0b0d'/%3E%3C/linearGradient%3E%3ClinearGradient id='fog' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%237d8995' stop-opacity='0'/%3E%3Cstop offset='.55' stop-color='%237d8995' stop-opacity='.32'/%3E%3Cstop offset='1' stop-color='%2368737f' stop-opacity='.5'/%3E%3C/linearGradient%3E%3ClinearGradient id='fog2' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%2356616c' stop-opacity='0'/%3E%3Cstop offset='.6' stop-color='%2356616c' stop-opacity='.34'/%3E%3Cstop offset='1' stop-color='%2346505a' stop-opacity='.55'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0,560 L0,230.0 L6,227.3 L12,232.9 L19,219.7 L25,219.5 L31,211.9 L38,195.3 L44,186.5 L50,195.2 L56,190.2 L62,196.2 L69,205.9 L75,213.1 L81,218.5 L88,209.5 L94,222.6 L100,231.1 L106,226.3 L112,230.3 L119,252.2 L125,257.3 L131,258.5 L138,271.8 L144,259.8 L150,267.4 L156,252.4 L162,246.7 L169,245.4 L175,246.3 L181,234.1 L188,239.7 L194,228.0 L200,229.4 L206,229.0 L212,233.9 L219,239.3 L225,241.8 L231,238.0 L238,249.2 L244,259.9 L250,276.1 L256,290.7 L262,289.5 L269,298.6 L275,288.2 L281,276.3 L288,258.0 L294,258.5 L300,251.2 L306,262.2 L312,269.7 L319,267.2 L325,279.2 L331,258.5 L338,256.6 L344,247.7 L350,258.3 L356,267.4 L362,260.0 L369,267.5 L375,266.8 L381,265.3 L388,245.1 L394,233.7 L400,241.6 L406,246.3 L412,245.5 L419,254.3 L425,263.9 L431,276.5 L438,279.7 L444,269.0 L450,265.7 L456,279.0 L462,272.2 L469,257.3 L475,259.6 L481,260.5 L488,259.5 L494,270.5 L500,271.8 L506,276.8 L512,265.6 L519,255.2 L525,235.1 L531,232.2 L538,221.0 L544,229.0 L550,225.2 L556,230.0 L562,218.1 L569,215.0 L575,217.8 L581,230.6 L588,235.8 L594,241.7 L600,231.3 L606,227.6 L612,208.9 L619,191.5 L625,177.5 L631,174.2 L638,159.2 L644,170.0 L650,166.1 L656,179.8 L662,190.6 L669,189.9 L675,184.1 L681,175.1 L688,170.9 L694,175.0 L700,175.8 L706,175.8 L712,171.5 L719,168.5 L725,182.5 L731,193.8 L738,199.4 L744,209.3 L750,199.1 L756,210.8 L762,207.0 L769,221.0 L775,225.7 L781,218.3 L788,215.5 L794,221.5 L800,218.1 L806,208.6 L812,195.8 L819,196.9 L825,200.4 L831,199.2 L838,184.2 L844,180.7 L850,194.0 L856,211.5 L862,218.9 L869,219.2 L875,238.5 L881,236.3 L888,230.1 L894,233.6 L900,237.8 L906,239.5 L912,252.0 L919,259.9 L925,259.8 L931,254.7 L938,249.6 L944,250.9 L950,247.5 L956,256.3 L962,248.1 L969,244.9 L975,251.6 L981,262.3 L988,292.8 L994,294.9 L1000,305.0 L1006,300.9 L1012,289.5 L1019,276.3 L1025,275.1 L1031,269.3 L1038,276.8 L1044,283.6 L1050,273.9 L1056,289.1 L1062,297.8 L1069,297.0 L1075,298.5 L1081,297.4 L1088,280.5 L1094,278.1 L1100,282.6 L1106,280.4 L1112,271.4 L1119,270.6 L1125,282.1 L1131,287.7 L1138,296.2 L1144,296.5 L1150,284.5 L1156,313.1 L1162,325.0 L1169,342.9 L1175,345.4 L1181,342.5 L1188,344.3 L1194,353.3 L1200,358.9 L1206,347.5 L1212,343.4 L1219,338.2 L1225,347.6 L1231,351.0 L1238,354.5 L1244,357.3 L1250,346.4 L1256,354.2 L1262,348.0 L1269,339.1 L1275,321.8 L1281,330.5 L1288,321.0 L1294,325.6 L1300,339.3 L1306,334.9 L1312,343.8 L1319,330.8 L1325,319.9 L1331,313.3 L1338,315.8 L1344,295.9 L1350,287.6 L1356,285.6 L1362,287.1 L1369,286.1 L1375,280.1 L1381,270.0 L1388,260.1 L1394,248.8 L1400,245.1 L1406,247.7 L1412,236.7 L1419,254.8 L1425,253.3 L1431,252.9 L1438,254.3 L1444,260.7 L1450,284.4 L1456,275.4 L1462,285.4 L1469,278.9 L1475,257.2 L1481,247.2 L1488,255.8 L1494,267.5 L1500,270.9 L1506,272.3 L1512,270.9 L1519,260.7 L1525,258.1 L1531,261.1 L1538,252.3 L1544,247.4 L1550,261.9 L1556,263.9 L1562,280.6 L1569,278.8 L1575,278.9 L1581,263.6 L1588,267.5 L1594,265.4 L1600,250.0 L1600,560 Z' fill='url(%23f)'/%3E%3Cpath d='M0,230.0 L6,227.3 L12,232.9 L19,219.7 L25,219.5 L31,211.9 L38,195.3 L44,186.5 L50,195.2 L56,190.2 L62,196.2 L69,205.9 L75,213.1 L81,218.5 L88,209.5 L94,222.6 L100,231.1 L106,226.3 L112,230.3 L119,252.2 L125,257.3 L131,258.5 L138,271.8 L144,259.8 L150,267.4 L156,252.4 L162,246.7 L169,245.4 L175,246.3 L181,234.1 L188,239.7 L194,228.0 L200,229.4 L206,229.0 L212,233.9 L219,239.3 L225,241.8 L231,238.0 L238,249.2 L244,259.9 L250,276.1 L256,290.7 L262,289.5 L269,298.6 L275,288.2 L281,276.3 L288,258.0 L294,258.5 L300,251.2 L306,262.2 L312,269.7 L319,267.2 L325,279.2 L331,258.5 L338,256.6 L344,247.7 L350,258.3 L356,267.4 L362,260.0 L369,267.5 L375,266.8 L381,265.3 L388,245.1 L394,233.7 L400,241.6 L406,246.3 L412,245.5 L419,254.3 L425,263.9 L431,276.5 L438,279.7 L444,269.0 L450,265.7 L456,279.0 L462,272.2 L469,257.3 L475,259.6 L481,260.5 L488,259.5 L494,270.5 L500,271.8 L506,276.8 L512,265.6 L519,255.2 L525,235.1 L531,232.2 L538,221.0 L544,229.0 L550,225.2 L556,230.0 L562,218.1 L569,215.0 L575,217.8 L581,230.6 L588,235.8 L594,241.7 L600,231.3 L606,227.6 L612,208.9 L619,191.5 L625,177.5 L631,174.2 L638,159.2 L644,170.0 L650,166.1 L656,179.8 L662,190.6 L669,189.9 L675,184.1 L681,175.1 L688,170.9 L694,175.0 L700,175.8 L706,175.8 L712,171.5 L719,168.5 L725,182.5 L731,193.8 L738,199.4 L744,209.3 L750,199.1 L756,210.8 L762,207.0 L769,221.0 L775,225.7 L781,218.3 L788,215.5 L794,221.5 L800,218.1 L806,208.6 L812,195.8 L819,196.9 L825,200.4 L831,199.2 L838,184.2 L844,180.7 L850,194.0 L856,211.5 L862,218.9 L869,219.2 L875,238.5 L881,236.3 L888,230.1 L894,233.6 L900,237.8 L906,239.5 L912,252.0 L919,259.9 L925,259.8 L931,254.7 L938,249.6 L944,250.9 L950,247.5 L956,256.3 L962,248.1 L969,244.9 L975,251.6 L981,262.3 L988,292.8 L994,294.9 L1000,305.0 L1006,300.9 L1012,289.5 L1019,276.3 L1025,275.1 L1031,269.3 L1038,276.8 L1044,283.6 L1050,273.9 L1056,289.1 L1062,297.8 L1069,297.0 L1075,298.5 L1081,297.4 L1088,280.5 L1094,278.1 L1100,282.6 L1106,280.4 L1112,271.4 L1119,270.6 L1125,282.1 L1131,287.7 L1138,296.2 L1144,296.5 L1150,284.5 L1156,313.1 L1162,325.0 L1169,342.9 L1175,345.4 L1181,342.5 L1188,344.3 L1194,353.3 L1200,358.9 L1206,347.5 L1212,343.4 L1219,338.2 L1225,347.6 L1231,351.0 L1238,354.5 L1244,357.3 L1250,346.4 L1256,354.2 L1262,348.0 L1269,339.1 L1275,321.8 L1281,330.5 L1288,321.0 L1294,325.6 L1300,339.3 L1306,334.9 L1312,343.8 L1319,330.8 L1325,319.9 L1331,313.3 L1338,315.8 L1344,295.9 L1350,287.6 L1356,285.6 L1362,287.1 L1369,286.1 L1375,280.1 L1381,270.0 L1388,260.1 L1394,248.8 L1400,245.1 L1406,247.7 L1412,236.7 L1419,254.8 L1425,253.3 L1431,252.9 L1438,254.3 L1444,260.7 L1450,284.4 L1456,275.4 L1462,285.4 L1469,278.9 L1475,257.2 L1481,247.2 L1488,255.8 L1494,267.5 L1500,270.9 L1506,272.3 L1512,270.9 L1519,260.7 L1525,258.1 L1531,261.1 L1538,252.3 L1544,247.4 L1550,261.9 L1556,263.9 L1562,280.6 L1569,278.8 L1575,278.9 L1581,263.6 L1588,267.5 L1594,265.4 L1600,250.0' fill='none' stroke='%23c9d4de' stroke-opacity='.2' stroke-width='1.6'/%3E%3Cpath d='M959.75,250.87133796376003 L959.75,222.87133796376003 L961.75,222.87133796376003 L961.75,214.87133796376003 L965.75,218.87133796376003 L969.75,214.87133796376003 L972.75,214.87133796376003 L972.75,222.87133796376003 L976.75,222.87133796376003 L976.75,250.87133796376003 Z' fill='%232e353d'/%3E%3Crect x='967.8' y='226.9' width='2.6' height='3.6' fill='%23ffa050' fill-opacity='.85'/%3E%3Crect x='0' y='200' width='1600' height='360' fill='url(%23fog)'/%3E%3Cpath d='M0,560 L0,310.0 L6,310.7 L12,308.3 L19,315.3 L25,319.1 L31,311.4 L38,310.7 L44,307.6 L50,314.3 L56,322.5 L62,327.8 L69,322.7 L75,327.1 L81,331.1 L88,334.2 L94,334.9 L100,325.7 L106,327.1 L112,329.2 L119,322.7 L125,320.2 L131,315.4 L138,318.9 L144,312.3 L150,309.9 L156,306.7 L162,307.2 L169,297.5 L175,295.8 L181,290.7 L188,281.4 L194,278.6 L200,273.6 L206,269.4 L212,260.5 L219,258.2 L225,264.1 L231,261.6 L238,264.4 L244,266.8 L250,260.2 L256,258.0 L262,266.2 L269,261.3 L275,259.1 L281,264.4 L288,263.0 L294,254.4 L300,251.5 L306,250.9 L312,256.2 L319,259.8 L325,260.5 L331,252.1 L338,248.9 L344,249.8 L350,254.2 L356,251.5 L362,251.1 L369,253.0 L375,259.1 L381,267.1 L388,271.7 L394,281.3 L400,286.0 L406,289.5 L412,287.4 L419,297.7 L425,297.9 L431,286.3 L438,283.7 L444,282.1 L450,285.6 L456,287.9 L462,279.9 L469,285.4 L475,284.7 L481,289.0 L488,287.9 L494,286.5 L500,291.0 L506,281.7 L512,280.3 L519,278.9 L525,282.3 L531,285.9 L538,281.3 L544,290.0 L550,293.4 L556,288.1 L562,285.5 L569,289.0 L575,289.1 L581,291.3 L588,288.5 L594,294.0 L600,303.9 L606,302.0 L612,308.3 L619,309.0 L625,303.1 L631,310.3 L638,313.2 L644,315.3 L650,310.9 L656,305.6 L662,295.2 L669,291.0 L675,289.6 L681,293.0 L688,293.1 L694,291.2 L700,292.0 L706,300.8 L712,301.1 L719,295.3 L725,297.4 L731,300.1 L738,298.6 L744,301.9 L750,308.5 L756,312.2 L762,307.2 L769,312.6 L775,311.6 L781,313.4 L788,322.0 L794,315.6 L800,319.4 L806,317.9 L812,321.9 L819,323.5 L825,315.4 L831,316.2 L838,311.2 L844,309.2 L850,302.9 L856,303.4 L862,310.0 L869,305.6 L875,307.2 L881,308.7 L888,311.5 L894,312.7 L900,313.3 L906,317.8 L912,320.0 L919,321.8 L925,332.9 L931,337.1 L938,334.0 L944,328.6 L950,328.7 L956,334.4 L962,335.7 L969,332.4 L975,333.0 L981,326.0 L988,323.3 L994,329.9 L1000,328.6 L1006,325.4 L1012,328.2 L1019,331.0 L1025,333.8 L1031,339.8 L1038,337.8 L1044,346.8 L1050,348.8 L1056,361.8 L1062,370.1 L1069,371.4 L1075,378.2 L1081,379.9 L1088,378.9 L1094,382.6 L1100,386.9 L1106,386.9 L1112,391.1 L1119,393.1 L1125,389.4 L1131,388.6 L1138,384.0 L1144,386.6 L1150,380.9 L1156,381.4 L1162,383.5 L1169,383.1 L1175,390.2 L1181,383.7 L1188,382.0 L1194,380.5 L1200,373.9 L1206,377.2 L1212,376.3 L1219,372.2 L1225,365.2 L1231,360.1 L1238,357.1 L1244,351.2 L1250,343.7 L1256,340.7 L1262,346.8 L1269,346.0 L1275,353.8 L1281,350.2 L1288,340.1 L1294,335.1 L1300,338.3 L1306,335.1 L1312,329.2 L1319,325.2 L1325,325.5 L1331,322.6 L1338,326.6 L1344,330.7 L1350,328.8 L1356,332.4 L1362,327.8 L1369,322.9 L1375,321.9 L1381,323.8 L1388,333.0 L1394,329.7 L1400,327.2 L1406,326.1 L1412,333.1 L1419,343.9 L1425,345.0 L1431,341.7 L1438,348.5 L1444,342.8 L1450,336.9 L1456,331.6 L1462,333.4 L1469,319.5 L1475,316.0 L1481,322.1 L1488,317.7 L1494,321.4 L1500,321.3 L1506,322.8 L1512,319.9 L1519,326.8 L1525,328.0 L1531,324.6 L1538,315.1 L1544,314.4 L1550,311.3 L1556,318.1 L1562,321.3 L1569,317.2 L1575,317.0 L1581,305.7 L1588,302.9 L1594,303.8 L1600,300.0 L1600,560 Z' fill='url(%23m)'/%3E%3Cpath d='M0,310.0 L6,310.7 L12,308.3 L19,315.3 L25,319.1 L31,311.4 L38,310.7 L44,307.6 L50,314.3 L56,322.5 L62,327.8 L69,322.7 L75,327.1 L81,331.1 L88,334.2 L94,334.9 L100,325.7 L106,327.1 L112,329.2 L119,322.7 L125,320.2 L131,315.4 L138,318.9 L144,312.3 L150,309.9 L156,306.7 L162,307.2 L169,297.5 L175,295.8 L181,290.7 L188,281.4 L194,278.6 L200,273.6 L206,269.4 L212,260.5 L219,258.2 L225,264.1 L231,261.6 L238,264.4 L244,266.8 L250,260.2 L256,258.0 L262,266.2 L269,261.3 L275,259.1 L281,264.4 L288,263.0 L294,254.4 L300,251.5 L306,250.9 L312,256.2 L319,259.8 L325,260.5 L331,252.1 L338,248.9 L344,249.8 L350,254.2 L356,251.5 L362,251.1 L369,253.0 L375,259.1 L381,267.1 L388,271.7 L394,281.3 L400,286.0 L406,289.5 L412,287.4 L419,297.7 L425,297.9 L431,286.3 L438,283.7 L444,282.1 L450,285.6 L456,287.9 L462,279.9 L469,285.4 L475,284.7 L481,289.0 L488,287.9 L494,286.5 L500,291.0 L506,281.7 L512,280.3 L519,278.9 L525,282.3 L531,285.9 L538,281.3 L544,290.0 L550,293.4 L556,288.1 L562,285.5 L569,289.0 L575,289.1 L581,291.3 L588,288.5 L594,294.0 L600,303.9 L606,302.0 L612,308.3 L619,309.0 L625,303.1 L631,310.3 L638,313.2 L644,315.3 L650,310.9 L656,305.6 L662,295.2 L669,291.0 L675,289.6 L681,293.0 L688,293.1 L694,291.2 L700,292.0 L706,300.8 L712,301.1 L719,295.3 L725,297.4 L731,300.1 L738,298.6 L744,301.9 L750,308.5 L756,312.2 L762,307.2 L769,312.6 L775,311.6 L781,313.4 L788,322.0 L794,315.6 L800,319.4 L806,317.9 L812,321.9 L819,323.5 L825,315.4 L831,316.2 L838,311.2 L844,309.2 L850,302.9 L856,303.4 L862,310.0 L869,305.6 L875,307.2 L881,308.7 L888,311.5 L894,312.7 L900,313.3 L906,317.8 L912,320.0 L919,321.8 L925,332.9 L931,337.1 L938,334.0 L944,328.6 L950,328.7 L956,334.4 L962,335.7 L969,332.4 L975,333.0 L981,326.0 L988,323.3 L994,329.9 L1000,328.6 L1006,325.4 L1012,328.2 L1019,331.0 L1025,333.8 L1031,339.8 L1038,337.8 L1044,346.8 L1050,348.8 L1056,361.8 L1062,370.1 L1069,371.4 L1075,378.2 L1081,379.9 L1088,378.9 L1094,382.6 L1100,386.9 L1106,386.9 L1112,391.1 L1119,393.1 L1125,389.4 L1131,388.6 L1138,384.0 L1144,386.6 L1150,380.9 L1156,381.4 L1162,383.5 L1169,383.1 L1175,390.2 L1181,383.7 L1188,382.0 L1194,380.5 L1200,373.9 L1206,377.2 L1212,376.3 L1219,372.2 L1225,365.2 L1231,360.1 L1238,357.1 L1244,351.2 L1250,343.7 L1256,340.7 L1262,346.8 L1269,346.0 L1275,353.8 L1281,350.2 L1288,340.1 L1294,335.1 L1300,338.3 L1306,335.1 L1312,329.2 L1319,325.2 L1325,325.5 L1331,322.6 L1338,326.6 L1344,330.7 L1350,328.8 L1356,332.4 L1362,327.8 L1369,322.9 L1375,321.9 L1381,323.8 L1388,333.0 L1394,329.7 L1400,327.2 L1406,326.1 L1412,333.1 L1419,343.9 L1425,345.0 L1431,341.7 L1438,348.5 L1444,342.8 L1450,336.9 L1456,331.6 L1462,333.4 L1469,319.5 L1475,316.0 L1481,322.1 L1488,317.7 L1494,321.4 L1500,321.3 L1506,322.8 L1512,319.9 L1519,326.8 L1525,328.0 L1531,324.6 L1538,315.1 L1544,314.4 L1550,311.3 L1556,318.1 L1562,321.3 L1569,317.2 L1575,317.0 L1581,305.7 L1588,302.9 L1594,303.8 L1600,300.0' fill='none' stroke='%23aebccb' stroke-opacity='.13' stroke-width='1.4'/%3E%3Crect x='0' y='290' width='1600' height='270' fill='url(%23fog2)'/%3E%3Cpath d='M0,560 L0,334.0 L12,334.4 L25,333.9 L38,335.6 L50,338.2 L62,337.9 L75,330.6 L88,329.0 L100,326.7 L112,328.7 L125,326.3 L138,324.5 L150,329.0 L162,327.6 L175,329.8 L188,332.1 L200,329.9 L212,326.9 L225,323.3 L238,325.3 L250,323.2 L262,325.1 L275,328.0 L288,331.9 L300,329.6 L312,333.2 L325,343.9 L338,344.7 L350,349.2 L362,357.8 L375,364.4 L388,367.1 L400,369.5 L412,373.8 L425,375.6 L438,374.2 L450,373.3 L462,375.6 L475,374.9 L488,381.5 L500,383.7 L512,391.6 L525,402.2 L538,404.8 L550,414.5 L562,417.1 L575,423.5 L588,423.4 L600,425.4 L612,429.3 L625,425.8 L638,427.9 L650,423.0 L662,429.3 L675,432.6 L688,432.6 L700,437.1 L712,440.9 L725,438.2 L738,438.3 L750,443.6 L762,444.9 L775,451.4 L788,453.6 L800,451.3 L812,451.1 L825,453.0 L838,455.9 L850,460.2 L862,458.4 L875,459.9 L888,455.0 L900,457.2 L912,449.1 L925,446.4 L938,440.4 L950,440.7 L962,431.6 L975,429.6 L988,420.0 L1000,417.1 L1012,409.2 L1025,405.9 L1038,406.0 L1050,405.8 L1062,401.0 L1075,396.3 L1088,395.9 L1100,391.3 L1112,393.5 L1125,391.1 L1138,387.8 L1150,384.1 L1162,378.6 L1175,372.3 L1188,365.8 L1200,366.8 L1212,359.2 L1225,358.2 L1238,353.7 L1250,344.3 L1262,346.7 L1275,342.8 L1288,337.4 L1300,334.4 L1312,335.6 L1325,331.5 L1338,331.7 L1350,326.4 L1362,320.0 L1375,317.6 L1388,308.6 L1400,306.1 L1412,305.9 L1425,311.5 L1438,314.9 L1450,324.5 L1462,321.6 L1475,325.4 L1488,326.6 L1500,327.1 L1512,325.0 L1525,326.9 L1538,324.1 L1550,315.4 L1562,320.8 L1575,325.6 L1588,325.2 L1600,324.0 L1600,560 Z' fill='url(%23n)'/%3E%3Cpath d='M0,334.0 L12,334.4 L25,333.9 L38,335.6 L50,338.2 L62,337.9 L75,330.6 L88,329.0 L100,326.7 L112,328.7 L125,326.3 L138,324.5 L150,329.0 L162,327.6 L175,329.8 L188,332.1 L200,329.9 L212,326.9 L225,323.3 L238,325.3 L250,323.2 L262,325.1 L275,328.0 L288,331.9 L300,329.6 L312,333.2 L325,343.9 L338,344.7 L350,349.2 L362,357.8 L375,364.4 L388,367.1 L400,369.5 L412,373.8 L425,375.6 L438,374.2 L450,373.3 L462,375.6 L475,374.9 L488,381.5 L500,383.7 L512,391.6 L525,402.2 L538,404.8 L550,414.5 L562,417.1 L575,423.5 L588,423.4 L600,425.4 L612,429.3 L625,425.8 L638,427.9 L650,423.0 L662,429.3 L675,432.6 L688,432.6 L700,437.1 L712,440.9 L725,438.2 L738,438.3 L750,443.6 L762,444.9 L775,451.4 L788,453.6 L800,451.3 L812,451.1 L825,453.0 L838,455.9 L850,460.2 L862,458.4 L875,459.9 L888,455.0 L900,457.2 L912,449.1 L925,446.4 L938,440.4 L950,440.7 L962,431.6 L975,429.6 L988,420.0 L1000,417.1 L1012,409.2 L1025,405.9 L1038,406.0 L1050,405.8 L1062,401.0 L1075,396.3 L1088,395.9 L1100,391.3 L1112,393.5 L1125,391.1 L1138,387.8 L1150,384.1 L1162,378.6 L1175,372.3 L1188,365.8 L1200,366.8 L1212,359.2 L1225,358.2 L1238,353.7 L1250,344.3 L1262,346.7 L1275,342.8 L1288,337.4 L1300,334.4 L1312,335.6 L1325,331.5 L1338,331.7 L1350,326.4 L1362,320.0 L1375,317.6 L1388,308.6 L1400,306.1 L1412,305.9 L1425,311.5 L1438,314.9 L1450,324.5 L1462,321.6 L1475,325.4 L1488,326.6 L1500,327.1 L1512,325.0 L1525,326.9 L1538,324.1 L1550,315.4 L1562,320.8 L1575,325.6 L1588,325.2 L1600,324.0' fill='none' stroke='%239aa8b6' stroke-opacity='.1' stroke-width='1.2'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.cc-bg::after {
  /* the mist sea below the outcrop: cold smoke banks with a warm underglow */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40%;
  background:
    radial-gradient(ellipse 40% 30% at 30% 30%, rgba(125, 136, 149, 0.2), rgba(125, 136, 149, 0) 70%),
    radial-gradient(ellipse 40% 26% at 72% 36%, rgba(125, 136, 149, 0.16), rgba(125, 136, 149, 0) 70%),
    linear-gradient(180deg, rgba(42, 48, 56, 0) 0%, rgba(42, 48, 56, 0.5) 30%, rgba(20, 22, 26, 0.85) 70%, #0a0b0d 100%);
}
.cc-vignette { inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0) 48%, rgba(2, 3, 4, 0.72) 100%); }
.cc-head { position: relative; text-align: center; padding: calc(var(--cx-screen-band) + 12px) 0 4px; flex: none; }
.cc-title {
  /* carved molten-metal capitals (as .ei-title), a faint ember halo */
  display: inline-block;
  font: 700 40px/1.05 var(--cx-font-title);
  letter-spacing: 0.05em;
  color: var(--cx-gold-3);
  background: linear-gradient(180deg, #fff1cf 0%, #f4d58c 26%, #d9a54a 50%, #7a4e1c 58%, #b67e36 74%, #f2c97a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #120a03) drop-shadow(0 0 1px #000) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 16px rgba(255, 120, 40, 0.2));
}
.cc-sub { font: 700 17px/1.3 var(--cx-font-head); letter-spacing: 0.05em; color: var(--cx-text); display: flex; gap: 8px; justify-content: center; text-shadow: var(--cx-sh-text-dark); }
.cc-dot { color: var(--cx-torch); }
.cc-main { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(250px, 300px) 1fr minmax(300px, 360px); gap: 18px; padding: 8px calc(var(--cx-screen-band) + 46px) 0; }
.sqp-create.adding .cc-main { grid-template-columns: minmax(230px, 280px) 1fr minmax(400px, 480px); }
/* the side panels: standing smoked steel in a bronze-ruled iron edge with thorned corners (= .ei-plate) */
.cc-panel {
  min-height: 0; overflow: auto; padding: 16px 18px 18px; border-radius: var(--cx-r-2);
  background: var(--cx-corners), var(--cx-bg-smoke);
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(196, 204, 214, 0.1), inset 0 0 0 1px rgba(176, 122, 60, 0.6), inset 0 0 0 4px rgba(5, 5, 6, 0.85),
    inset 0 0 0 5px rgba(138, 145, 154, 0.14), inset 0 0 40px rgba(0, 0, 0, 0.45), 0 18px 40px rgba(0, 0, 0, 0.7);
}
.cc-panel { background-attachment: scroll; }
.cc-h { font: 700 var(--cx-fs-h2)/1.15 var(--cx-font-head); letter-spacing: 0.04em; color: var(--cx-gold-text); margin: 4px 0 9px; text-shadow: var(--cx-sh-text-gold); }
.cc-h small { font: 400 14px/1.2 var(--cx-font-body); letter-spacing: 0; color: var(--cx-text-dim); text-shadow: none; }
.cc-races { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
/* each race is a recessed iron socket: the portrait in its forged ring above the carved name (names are never cut);
   the chosen one gets an ember rim and firelight rising from below */
.cc-race {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0;
  padding: 7px 4px 7px; border-radius: 2px; border: 1px solid #000;
  background: linear-gradient(180deg, #08090b, #121417 70%, #181b1f); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.3), inset 0 2px 6px rgba(0, 0, 0, 0.7);
  color: var(--cx-text); cursor: pointer; font: 700 13px/1.1 var(--cx-font-label); letter-spacing: 0.06em; text-align: center; transition: color var(--cx-dur-quick);
}
.cc-race-name { min-width: 0; max-width: 100%; white-space: nowrap; text-shadow: 0 1px 0 #000; }
.cc-race:hover { color: var(--cx-gold-leaf); box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.7), inset 0 2px 6px rgba(0, 0, 0, 0.7); }
.cc-race:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--cx-torch), 0 0 0 1px #000, 0 0 10px rgba(255, 138, 61, 0.55); }
.cc-race.active {
  color: var(--cx-gold-leaf);
  background: linear-gradient(var(--cx-torch), var(--cx-torch)) center bottom / 56% 2px no-repeat,
    radial-gradient(ellipse 80% 70% at 50% 100%, rgba(255, 120, 40, 0.32), rgba(255, 120, 40, 0) 72%), linear-gradient(180deg, #16191d, #1c1f24);
  box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.8), 0 0 10px rgba(255, 120, 40, 0.24);
  text-shadow: 0 1px 0 #000, 0 0 8px rgba(255, 138, 61, 0.4);
}
.cc-race-ring {
  /* the portrait in a forged iron ring with a bronze bezel */
  width: 48px; height: 48px; border-radius: 50%; padding: 3px; flex: none;
  background: radial-gradient(circle, rgba(0, 0, 0, 0) 0 20.6px, #e2b56a 21px, #86592a 22.4px, rgba(0, 0, 0, 0) 23px), linear-gradient(135deg, #6d747c 0%, #3a3f46 30%, #1b1d21 66%, #0a0b0d 100%);
  box-shadow: 0 0 0 1px #030304, 0 2px 4px rgba(0, 0, 0, 0.6);
}
.cc-race.active .cc-race-ring { box-shadow: 0 0 0 1px #030304, 0 0 10px rgba(255, 138, 61, 0.55); }
.cc-race-pic { width: 42px; height: 42px; max-width: 100%; max-height: 100%; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a3038, #0e1013 62%, #07080a); display: block; box-shadow: inset 0 0 0 1px #000, inset 0 0 8px rgba(0, 0, 0, 0.7); }
.cc-raceinfo { margin-top: 14px; padding-top: 14px; background: var(--cx-orn-filler-dark) center top / 180px 16px no-repeat; }
.cc-race-title { font: 700 26px/1.1 var(--cx-font-title); letter-spacing: 0.04em; color: var(--cx-gold-text); text-shadow: var(--cx-sh-text-gold); margin-top: 4px; }
.cc-race-blurb { font: italic 500 17px/1.4 var(--cx-font-flavor); color: var(--cx-gold-3); margin: 3px 0 8px; }
.cc-racials-h { font: 700 12px/1.2 var(--cx-font-label); color: var(--cx-text-dim); letter-spacing: 0.1em; margin: 10px 0 4px; }
.cc-racial { display: flex; gap: 9px; align-items: flex-start; margin: 6px 0; font-size: 14.5px; line-height: 1.35; }
.cc-racial > span:last-child { display: flex; flex-direction: column; }
.cc-racial b { color: var(--cx-text); font-weight: 700; }
.cc-racial b + span { color: var(--cx-text-dim); }
.cc-racial-ico {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--cx-gold-text);
  background: radial-gradient(circle at 50% 46%, #1d2126 0, #0b0c0e 7.6px, #e2b56a 8.1px, #86592a 9.2px, rgba(0, 0, 0, 0) 9.7px), linear-gradient(135deg, #6d747c 0%, #3a3f46 30%, #1b1d21 66%, #0a0b0d 100%);
  box-shadow: 0 0 0 1px #030304;
}
.cc-racial-ico .icon { width: 12px; height: 12px; }

/* centre: the hero on a rocky outcrop above the mist, a cold rim light from the cloud break */
.cc-center { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cc-stage { position: relative; flex: 1; min-height: 200px; }
.cc-spot { position: absolute; left: 50%; top: 4%; bottom: 2%; width: 74%; transform: translateX(-50%); background: radial-gradient(ellipse 40% 54% at 50% 50%, rgba(196, 210, 228, 0.08), rgba(255, 140, 60, 0.04) 55%, rgba(0, 0, 0, 0) 72%); pointer-events: none; }
.cc-stage {
  /* the preview draws the hero in a 58x48 box scaled by k = min(w/58, h/48), centred, feet at y = 44: the outcrop is
     placed with the same numbers (container units), so the hero always stands on the rock at any size */
  container-type: size;
  overflow: hidden;
}
.cc-rock {
  --k: min(calc(100cqw / 58), calc(100cqh / 48));
  --feet: calc((100cqh - 48 * var(--k)) / 2 + 4 * var(--k));
  position: absolute;
  left: 50%;
  bottom: calc(var(--feet) - 8.25 * var(--k));
  width: min(calc(44 * var(--k)), 100%);
  height: calc(9.6 * var(--k));
  transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 96' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23545a62'/%3E%3Cstop offset='.14' stop-color='%2330343a'/%3E%3Cstop offset='.5' stop-color='%23191b1f'/%3E%3Cstop offset='1' stop-color='%230b0c0d'/%3E%3C/linearGradient%3E%3ClinearGradient id='mist' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='.45' stop-color='%23262c33' stop-opacity='0'/%3E%3Cstop offset='.85' stop-color='%23262c33' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%23262c33' stop-opacity='.95'/%3E%3C/linearGradient%3E%3CradialGradient id='e' cx='.5' cy='1.05' r='.6'%3E%3Cstop offset='0' stop-color='%23ff7a2a' stop-opacity='.26'/%3E%3Cstop offset='.55' stop-color='%23e2541f' stop-opacity='.07'/%3E%3Cstop offset='1' stop-color='%23e2541f' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='t' cx='.5' cy='.08' r='.42'%3E%3Cstop offset='0' stop-color='%23ffc06a' stop-opacity='.2'/%3E%3Cstop offset='1' stop-color='%23ffc06a' stop-opacity='0'/%3E%3C/radialGradient%3E%3Cfilter id='z' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.4 0 0 0 -1.1'/%3E%3CfeComposite in2='SourceGraphic' operator='in'/%3E%3C/filter%3E%3C/defs%3E%3Cpath d='M0,96 L4,86 L12,80 L10,72 L20,64 L28,60 L32,52 L46,48 L52,40 L66,36 L74,29 L90,26 L100,20 L114,18 L122,14 L142,13 L162,11.5 L190,12 L214,10.5 L240,11 L262,10 L284,11.5 L300,11 L316,13.5 L330,13 L342,17 L350,22 L358,36 L354,46 L368,52 L374,60 L388,66 L398,78 L408,84 L420,96 Z' fill='url(%23g)'/%3E%3Cpath d='M20,64 L28,60 L32,52 L46,48 L52,40 L66,36 L74,29 L90,26 L100,20 L114,18 L110,40 L96,52 L78,58 L60,70 L40,80 L14,90 Z' fill='%23aab6c2' fill-opacity='.08'/%3E%3Cpath d='M142,13 L162,11.5 L190,12 L214,10.5 L240,11 L262,10 L284,11.5 L286,24 L250,30 L200,29 L160,26 Z' fill='%23c4ccd6' fill-opacity='.05'/%3E%3Cpath d='M342,17 L350,22 L358,36 L354,46 L368,52 L374,60 L388,66 L398,78 L408,84 L420,96 L344,96 L338,60 Z' fill='%23000' fill-opacity='.32'/%3E%3Cpath d='M10,72 L20,64 L28,60 L22,96 L0,96 L4,86 L12,80 Z' fill='%23000' fill-opacity='.18'/%3E%3Cpath d='M0,96 L4,86 L12,80 L10,72 L20,64 L28,60 L32,52 L46,48 L52,40 L66,36 L74,29 L90,26 L100,20 L114,18 L122,14 L142,13 L162,11.5 L190,12 L214,10.5 L240,11 L262,10 L284,11.5 L300,11 L316,13.5 L330,13 L342,17 L350,22 L358,36 L354,46 L368,52 L374,60 L388,66 L398,78 L408,84 L420,96 Z' fill='%23000' filter='url(%23z)' opacity='.5'/%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M140,13 L148,32 L140,50 L152,80' stroke='%23040506' stroke-opacity='.8' stroke-width='1.3'/%3E%3Cpath d='M139,14 L147,32' stroke='%23c4ccd6' stroke-opacity='.16' stroke-width='.8'/%3E%3Cpath d='M300,11 L291,30 L303,46 L294,72' stroke='%23040506' stroke-opacity='.8' stroke-width='1.3'/%3E%3Cpath d='M84,27 L92,46 L80,64 L86,88' stroke='%23040506' stroke-opacity='.6' stroke-width='1.1'/%3E%3Cpath d='M350,22 L338,40 L346,62 L340,90' stroke='%23040506' stroke-opacity='.65' stroke-width='1.1'/%3E%3Cpath d='M196,29 L230,33 L262,29' stroke='%23040506' stroke-opacity='.45' stroke-width='1'/%3E%3Cpath d='M46,48 L60,58 L52,74' stroke='%23040506' stroke-opacity='.5' stroke-width='1'/%3E%3Cpath d='M10,72 L20,64 L28,60 L32,52 L46,48 L52,40 L66,36 L74,29 L90,26 L100,20 L114,18 L122,14 L142,13 L162,11.5 L190,12 L214,10.5 L240,11 L262,10 L284,11.5 L300,11 L316,13.5' stroke='%23dae2ea' stroke-opacity='.5' stroke-width='1.3'/%3E%3Cpath d='M316,13.5 L330,13 L342,17 L350,22' stroke='%23dae2ea' stroke-opacity='.2' stroke-width='1.1'/%3E%3Cpath d='M368,52 L374,60 L388,66' stroke='%23dae2ea' stroke-opacity='.14' stroke-width='1'/%3E%3C/g%3E%3Crect x='0' y='0' width='440' height='96' fill='url(%23t)'/%3E%3Crect x='0' y='0' width='440' height='96' fill='url(%23e)'/%3E%3Cpath d='M0,96 L4,86 L12,80 L10,72 L20,64 L28,60 L32,52 L46,48 L52,40 L66,36 L74,29 L90,26 L100,20 L114,18 L122,14 L142,13 L162,11.5 L190,12 L214,10.5 L240,11 L262,10 L284,11.5 L300,11 L316,13.5 L330,13 L342,17 L350,22 L358,36 L354,46 L368,52 L374,60 L388,66 L398,78 L408,84 L420,96 Z' fill='url(%23mist)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 0;
}
.cc-stage::after {
  /* the outcrop's foot sinks into the mist (over the rock, under the hero) */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26%;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(20, 24, 29, 0.94) 0%, rgba(22, 26, 31, 0.62) 46%, rgba(22, 26, 31, 0) 78%);
  pointer-events: none;
  z-index: 0;
}
@supports not (width: 1cqw) {
  .cc-rock { --k: 8px; --feet: 52px; }
}
.cc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.cc-plate { position: absolute; left: 0; right: 0; top: 4px; text-align: center; pointer-events: none; z-index: 2; }
.cc-plate-name { font: 700 26px/1.15 var(--cx-font-head); letter-spacing: 0.04em; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, 0.85); min-height: 30px; }
.cc-plate-sub { font: 700 13px/1.3 var(--cx-font-label); letter-spacing: 0.08em; color: var(--cx-text-dim); text-shadow: 0 1px 0 #000; }
.cc-plate-zone { font: 700 13px/1.3 var(--cx-font-label); letter-spacing: 0.05em; color: var(--cx-gold-3); }
/* the appearance bar: a riveted iron plate holding recessed swatch sockets */
.cc-appearance {
  position: relative; z-index: 2;
  flex: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; padding: 11px 18px 10px; margin: 6px auto 0; max-width: 100%;
  border: 1px solid #000; border-radius: var(--cx-r-1);
  background: var(--cx-rivets-4), linear-gradient(180deg, rgba(196, 204, 214, 0.12), rgba(196, 204, 214, 0) 2px), var(--cx-bg-iron);
  box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.5), inset 0 0 0 3px rgba(0, 0, 0, 0.45), 0 8px 22px rgba(0, 0, 0, 0.65);
}
.cc-ap-group { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cc-ap-label { font: 700 12px/1 var(--cx-font-label); color: var(--cx-text-dim); letter-spacing: 0.1em; text-shadow: 0 1px 0 #000; }
.cc-swatches { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; max-width: 236px; }
.cc-swatch { width: 21px; height: 21px; border-radius: 2px; border: 1px solid #000; box-shadow: 0 0 0 1px rgba(176, 122, 60, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -3px 5px rgba(0, 0, 0, 0.35); cursor: pointer; padding: 0; transition: transform 0.08s; }
.cc-swatch:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--cx-bronze-hi); }
.cc-swatch.active { box-shadow: 0 0 0 1px #000, 0 0 0 3px var(--cx-torch), 0 0 9px rgba(255, 138, 61, 0.6); }
.cc-swatch:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: 3px; }
.cc-stepper { display: flex; align-items: center; gap: 6px; }
.cc-step-name { font: 700 16px/1.2 var(--cx-font-head); letter-spacing: 0.04em; color: var(--cx-text); min-width: 76px; text-align: center; }
.cc-arrow {
  width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--cx-bone);
  background: radial-gradient(circle at 50% 46%, #1d2126 0, #0b0c0e 8.4px, #e2b56a 8.9px, #86592a 10px, rgba(0, 0, 0, 0) 10.5px), linear-gradient(135deg, #6d747c 0%, #3a3f46 30%, #1b1d21 66%, #0a0b0d 100%);
  box-shadow: 0 0 0 1px #030304, 0 2px 3px rgba(0, 0, 0, 0.55);
}
.cc-arrow:hover { color: var(--cx-gold-leaf); box-shadow: 0 0 0 1px #030304, 0 0 9px rgba(255, 138, 61, 0.5); }
.cc-arrow:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: 2px; }
.cc-arrow .icon { width: 11px; height: 11px; }
.cc-random .icon { width: 14px; height: 14px; }
.cc-check { position: relative; display: block; cursor: pointer; height: 26px; padding-top: 4px; }

/* the right panel: the class (course) and realm pace, chosen in recessed sockets (dark — parchment is Codex-only) */
.cc-panel.cc-right, .cs-right.cc-panel { color: var(--cx-text); }
.cc-right .cc-h + * { margin-top: 2px; }
.cc-right .cc-h:not(:first-child) { margin-top: 16px; padding-top: 16px; background: var(--cx-orn-filler-dark) center top / 170px 16px no-repeat; }
.cc-classes { display: flex; flex-direction: column; gap: 6px; }
.cc-class {
  --cls: #fff; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 2px; border: 1px solid #000; border-left: 3px solid transparent;
  background: var(--well); box-shadow: var(--well-sh); cursor: pointer; text-align: left; color: var(--cx-text);
}
.cc-class:hover { box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.6), inset 0 2px 7px rgba(0, 0, 0, 0.6); }
.cc-class:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: 1px; }
.cc-class.active {
  border-left-color: var(--cx-torch);
  background: radial-gradient(ellipse 90% 140% at 0% 50%, rgba(255, 120, 40, 0.24), rgba(255, 120, 40, 0) 70%), linear-gradient(180deg, #1b1e23, #121417);
  box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.6), 0 0 10px rgba(255, 120, 40, 0.16);
}
.cc-class-gem {
  width: 34px; height: 34px; border-radius: 2px; display: grid; place-items: center; flex: none; color: #fff;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cls) 70%, #c4ccd6 20%), color-mix(in srgb, var(--cls) 40%, #000)); border: 2px solid transparent; background-clip: padding-box;
  box-shadow: 0 0 0 1px #030304, 0 0 0 2px var(--cx-bronze-3), 0 0 0 3px #030304, inset 0 0 6px rgba(0, 0, 0, 0.5);
}
.cc-class-gem .icon { width: 20px; height: 20px; filter: drop-shadow(0 1px 0 #000); }
.cc-class-text { display: flex; flex-direction: column; min-width: 0; }
.cc-class-name { font: 700 16px/1.2 var(--cx-font-head); letter-spacing: 0.03em; color: var(--cx-text); }
.cc-class.active .cc-class-name { color: var(--cx-gold-leaf); }
.cc-class-sub { font-size: 14px; color: var(--cx-text-dim); }
.cc-addclass {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 8px 0 4px; padding: 8px; border-radius: 2px;
  border: 1px dashed rgba(176, 122, 60, 0.55); background: transparent; color: var(--cx-gold-text); font: 700 13px/1 var(--cx-font-label); letter-spacing: 0.06em; cursor: pointer;
}
.cc-class-note { margin: 0 0 8px; font-size: 13px; line-height: 1.4; color: var(--cx-text-dim, rgba(235, 228, 214, 0.7)); }   /* V7.2.3: one hero per course */
.cc-addclass:hover { background: rgba(255, 138, 61, 0.07); border-style: solid; color: var(--cx-gold-leaf); }
.cc-addclass:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: 1px; }
.cc-addclass .icon { width: 11px; height: 11px; }
.cc-formbox { margin: 8px 0; padding: 8px 10px 10px; border-radius: 2px; border: 1px solid #000; background: var(--well); box-shadow: var(--well-sh); animation: sqpFlashIn var(--cx-dur-calm) var(--cx-ease); }
.cc-formbox-title { font: 700 17px/1.2 var(--cx-font-head); letter-spacing: 0.03em; color: var(--cx-gold-text); }
.cc-targets { margin-bottom: 4px; }
.cc-targets .sqp-seg-btn { padding: 6px 10px 5px; }
.cc-right .sqp-realm-desc { font-size: 14px; }
.cc-right .sqp-realm-name { font-weight: 700; letter-spacing: 0.03em; }

/* the foot: Back (ghost) clear of the corners, the name in a recessed socket by the quill, the big ENTER WORLD plate */
.cc-foot { position: relative; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 12px calc(var(--cx-screen-band) + var(--cx-grand) + 6px) calc(var(--cx-screen-band) + 16px); }
.cc-foot-l { justify-self: start; }
.cc-foot-r { justify-self: end; }
.cc-foot-c { display: flex; flex-direction: column; align-items: center; }
.cc-name-wrap {
  position: relative; display: flex; align-items: center; gap: 6px; padding: 5px 7px 5px 40px; border-radius: 2px; border: 1px solid #000;
  background: var(--cx-orn-quill) 9px center / 24px 24px no-repeat, var(--cx-rivet) left 3px top 3px / 7px 7px no-repeat, var(--cx-rivet) left 3px bottom 3px / 7px 7px no-repeat, var(--cx-bg-iron);
  box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.55), 0 10px 24px rgba(0, 0, 0, 0.7);
}
.input.cc-name {
  width: 230px; height: 38px; font: 700 22px/1 var(--cx-font-head); letter-spacing: 0.06em; text-align: center; color: var(--cx-gold-leaf); caret-color: var(--cx-torch);
  background: linear-gradient(180deg, #050607, #101215); border: 1px solid #000; border-radius: 1px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(176, 122, 60, 0.35); padding: 2px 6px 0;
}
.input.cc-name:focus { box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--cx-torch), 0 0 12px rgba(255, 138, 61, 0.4); }
.input.cc-name::placeholder { color: var(--cx-text-faint); font-style: normal; }
.cc-dice {
  width: 34px; height: 34px; border-radius: 2px; border: 1px solid #000; display: grid; place-items: center; cursor: pointer; color: var(--cx-bone);
  background: var(--cx-caps), linear-gradient(180deg, rgba(196, 204, 214, 0.16), rgba(196, 204, 214, 0) 2px), var(--cx-tex-iron), linear-gradient(180deg, #34383e, #141619);
  box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.5);
}
.cc-dice:hover { color: var(--cx-gold-leaf); box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.85), 0 0 8px rgba(255, 138, 61, 0.35); }
.cc-dice:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: 2px; }
.cc-dice .icon { width: 18px; height: 18px; }
.cc-name-err { color: #ffb39a; font-size: 14px; min-height: 18px; margin-top: 5px; text-shadow: 0 1px 0 #000; text-align: center; }
/* ENTER WORLD is theme.css's big carved plate (.ei-btn-plate, added in the markup); .btn's chamfered plate is replaced */
.btn.cc-enter.ei-btn-plate { --_h: 58px; padding-top: 2px; font-size: calc(var(--_h) * 0.33); }
.btn.cc-enter.ei-btn-plate:disabled { border-image-source: var(--_plate); }
.btn.cc-enter.ei-btn-plate:focus-visible { filter: none; }
.btn.cc-enter.dim { color: rgba(249, 231, 187, 0.62); }
.btn.cc-enter.dim:hover { color: #fff4d6; }
/* Back / Delete are quiet: ghost letters with an ember underline (destructive Delete in ember-red, small and away from Enter) */
.btn.cc-back, .btn.cc-back:hover, .btn.cc-back:active { border-image-source: none; }
.btn.cc-back { color: var(--cx-text-dim); }
.btn.cc-back:hover, .btn.cc-back:focus-visible { color: var(--cx-gold-leaf); filter: none; }
.btn.cc-back::after {
  content: ''; position: absolute; left: 0.9em; right: 0.9em; bottom: 5px; height: 1px; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 138, 61, 0), var(--cx-torch) 30%, var(--cx-torch) 70%, rgba(255, 138, 61, 0)); transition: opacity var(--cx-dur-quick);
}
.btn.cc-back:hover::after, .btn.cc-back:focus-visible::after { opacity: 1; }
.sqp-create .btn.cc-back::before { content: '\2039\00A0'; }
.sqp-select .btn.cc-back { font-size: var(--cx-fs-sc-min); color: var(--cx-vermilion-hi); }
.sqp-select .btn.cc-back:hover { color: #ff9a7a; }

/* character select (v1 overlay; the standalone roster screen lives in ui-world.js): the forged roster on the right */
.cs-main { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr minmax(300px, 360px); gap: 22px; padding: 8px calc(var(--cx-screen-band) + 46px) 0; }
.cs-center { display: flex; flex-direction: column; min-height: 0; }
.cs-stage { flex: 1; }
.cs-right { display: flex; flex-direction: column; }
.cs-list { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.cs-char {
  --cls: #fff; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border-radius: 2px; border: 1px solid #000; border-left: 3px solid transparent;
  background: var(--well); box-shadow: var(--well-sh); cursor: pointer; text-align: left; color: var(--cx-text);
}
.cs-char:hover { box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.55), inset 0 2px 7px rgba(0, 0, 0, 0.6); }
.cs-char:focus-visible { outline: 2px solid var(--cx-torch); outline-offset: 1px; }
.cs-char.active {
  border-left-color: var(--cx-torch);
  background: radial-gradient(ellipse 90% 140% at 0% 50%, rgba(255, 120, 40, 0.26), rgba(255, 120, 40, 0) 70%), linear-gradient(180deg, #1b1e23, #121417);
  box-shadow: inset 0 0 0 1px rgba(226, 181, 106, 0.65), 0 0 10px rgba(255, 120, 40, 0.18);
}
.cs-ring {
  width: 46px; height: 46px; border-radius: 50%; padding: 3px; flex: none;
  background: radial-gradient(circle, rgba(0, 0, 0, 0) 0 19.6px, #e2b56a 20px, #86592a 21.4px, rgba(0, 0, 0, 0) 22px), linear-gradient(135deg, #6d747c 0%, #3a3f46 30%, #1b1d21 66%, #0a0b0d 100%);
  box-shadow: 0 0 0 1px #030304;
}
.cs-ring.small { width: 40px; height: 40px; padding: 2px; }
.cs-pic { border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a3038, #0e1013 62%, #07080a); display: block; }
.cs-text { display: flex; flex-direction: column; min-width: 0; }
.cs-name { font: 700 17px/1.2 var(--cx-font-head); letter-spacing: 0.03em; color: var(--cx-text); }
.cs-char.active .cs-name { color: var(--cx-gold-leaf); }
.cs-sub { font-size: 14px; color: var(--cx-text-dim); }
.cs-class { font-size: 13px; color: var(--cx-text-dim); }
.cs-zone { font-size: 13px; color: var(--cx-gold-3); }
.cs-new { margin-top: 10px; }

/* ============================================================== talent points wait (V7.2.0: no Auto mode), prefilled dialogs */
.tal-wait { display: flex; align-items: center; gap: 9px; margin-left: auto; padding: 4px 10px 4px 8px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.6); background: var(--well); box-shadow: var(--well-sh); }
.tal-wait.has { background: linear-gradient(90deg, rgba(120, 60, 18, 0.42), rgba(7, 8, 10, 0.4)); box-shadow: inset 0 0 0 1px rgba(255, 170, 90, 0.55), 0 0 10px rgba(255, 138, 61, 0.28); }
.tal-wait-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #8a8270; background: radial-gradient(circle at 50% 46%, #1d2126 0, #0b0c0e 8px, rgba(11, 8, 6, 0) 8.6px), linear-gradient(135deg, #f2c97a 0%, #c48a45 24%, #86592a 58%, #3e2711 100%); box-shadow: 0 0 0 1px #050506; }
.tal-wait.has .tal-wait-ico { color: #ffd27a; box-shadow: 0 0 0 1px #050506, 0 0 8px rgba(255, 170, 80, 0.75); }
.tal-wait-ico .icon { width: 13px; height: 13px; }
.tal-wait-text { display: flex; flex-direction: column; line-height: 1.15; }
.tal-wait-text b { font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.03em; color: var(--cx-gold-text); }
.tal-wait.has .tal-wait-text b { color: #ffd9a0; }
.tal-wait-text small { font-size: 12px; color: var(--cx-text-dim); }
.tal-top .tal-points + .tal-spent { margin-right: 4px; }

.wp-tier.def { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tier) 70%, transparent), 0 0 10px color-mix(in srgb, var(--tier) 30%, transparent); }
.dg-dlg-seg { display: flex; justify-content: center; margin: 0 0 10px; }
.dg-dlg-seg .sqp-seg-btn { padding: 7px 22px 6px; font-size: 14px; }
.sqp-note.vd-auto .icon { width: 13px; height: 13px; color: var(--cx-lapis-3); vertical-align: -0.15em; }

/* repeat card (after a scheduled repeat is completed): verdigris is repeat/review */
.sqp-repeat { --tier: #fff; width: min(470px, 100%); }
.sqp-repeat.frame::after { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 0 0 2px rgba(134, 176, 165, 0.35); }
.rc-ico { color: var(--cx-verdigris-3); }
.rc-sub { display: flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--cx-text-dim); margin: -3px 0 8px 26px; }
.rc-sub .ql-diff-dot { width: 8px; height: 8px; margin-right: 3px; }
.rc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-lbl { font: 700 13px/1.2 var(--cx-font-label); letter-spacing: 0.03em; color: var(--cx-gold-text); }
.rc-ivs .rr-iv { height: 28px; min-width: 38px; }
.btn.rc-master { margin-left: auto; }
.rc-hint { font-size: 12px; color: var(--cx-text-dim); margin-top: 7px; }
.rc-hint.err { color: var(--cx-vermilion-hi); }
.sqp-repeat.mastered.frame::after { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 0 0 2px rgba(226, 181, 106, 0.45); }
.rc-done { color: #c8f2e4; }
.rc-done .icon { width: 15px; height: 15px; }
.sqp-repeat.mastered .rc-done { color: var(--cx-gold-leaf); }
.rc-done b { color: #ebe4d6; font: 400 15px/1.2 var(--cx-font-head); }

/* small screens */
@media (max-width: 1100px) {
  .cc-main { grid-template-columns: minmax(240px, 272px) 1fr minmax(280px, 320px); gap: 12px; padding: 4px calc(var(--cx-screen-band) + 24px) 0; }
  .sqp-create.adding .cc-main { grid-template-columns: 0 1fr minmax(380px, 440px); }
  .sqp-create.adding .cc-left { visibility: hidden; padding: 0; border: 0; }
  .cc-race { font-size: 12.5px; gap: 4px; padding: 6px 2px; letter-spacing: 0.04em; }
  .cc-race-ring { width: 40px; height: 40px; background: radial-gradient(circle, rgba(0, 0, 0, 0) 0 16.6px, #e2b56a 17px, #86592a 18.4px, rgba(0, 0, 0, 0) 19px), linear-gradient(135deg, #6d747c 0%, #3a3f46 30%, #1b1d21 66%, #0a0b0d 100%); }
  .cc-race-pic { width: 34px; height: 34px; }
  .cc-title { font-size: 34px; }
}
@media (max-height: 760px) {
  .cc-head { padding: calc(var(--cx-screen-band) + 6px) 0 0; }
  .cc-title { font-size: 32px; }
  .cc-sub { font-size: 15px; }
  .cc-foot { padding-top: 8px; padding-bottom: calc(var(--cx-screen-band) + 10px); }
  .btn.cc-enter { min-height: 40px; font-size: 18px; }
  .btn.cc-enter.ei-btn-plate { --_h: 50px; font-size: calc(var(--_h) * 0.34); }
  .cc-appearance { padding: 8px 12px 7px; gap: 6px 14px; }
  .cc-panel .sqp-realm:not(.active) .sqp-realm-desc { display: none; }
  .cc-panel .sqp-realm { padding: 5px 10px; }
}
@media (max-width: 820px) {
  .rr-lbl { display: none; }
  .rr-due { width: 64px; }
  .sqp-doll { grid-template-columns: 52px 1fr 52px; }
  .ql-split, .dg-split, .ac-split { grid-template-columns: 1fr; height: auto; }
  .ql-left { max-height: 180px; }
  .tal-trees { grid-template-columns: 1fr; }
  .stt-bests { grid-template-columns: 1fr 1fr; }
  .vd-grid, .kb-grid, .sqp-kv { grid-template-columns: 1fr; }
}
/* compact (480x360): the hall becomes one scrolling column inside the board; corners shrink first */
@media (max-width: 560px), (max-height: 420px) {
  .sqp-overlay::after {
    background:
      var(--cx-orn-grand-tl) left -6px top -6px / var(--cx-grand) var(--cx-grand) no-repeat,
      var(--cx-orn-grand-tr) right -6px top -6px / var(--cx-grand) var(--cx-grand) no-repeat,
      var(--cx-orn-grand-bl) left -6px bottom -6px / var(--cx-grand) var(--cx-grand) no-repeat,
      var(--cx-orn-grand-br) right -6px bottom -6px / var(--cx-grand) var(--cx-grand) no-repeat;
  }
  .cc-head { padding: calc(var(--cx-screen-band) + 4px) 0 0; }
  .cc-title { font-size: 24px; }
  .cc-sub { font-size: 13px; }
  .cc-main, .sqp-create.adding .cc-main { display: flex; flex-direction: column; gap: 8px; overflow: auto; padding: 4px calc(var(--cx-screen-band) + 14px) 4px; }
  .cc-main > * { flex: none; }
  .sqp-create.adding .cc-left { visibility: visible; padding: 10px 12px; border: 1px solid #000; }
  .cc-panel { overflow: visible; padding: 10px 12px; }
  .cc-panel.cc-right { padding-left: 22px; }
  .cc-center { order: -1; }
  .cc-stage { min-height: 150px; height: 150px; flex: none; }
  .cc-appearance { gap: 6px 10px; padding: 7px 8px 6px; }
  .cc-races { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .cc-race { font-size: 12px; letter-spacing: 0.02em; }
  /* Back and Enter World stay clear of the grand corners (corner-safe zone, DESIGN §7) */
  .cc-foot { grid-template-columns: auto 1fr auto; gap: 6px; padding: 6px calc(var(--cx-screen-band) + 26px) calc(var(--cx-screen-band) + 6px); }
  .input.cc-name { width: 100px; font-size: 17px; height: 28px; }
  .cc-name-wrap { padding: 3px 5px 3px 30px; background-size: 18px 18px, auto; background-position: 6px center, 0 0; }
  .cc-dice { width: 26px; height: 26px; }
  .cc-name-err { font-size: 12px; min-height: 0; }
  .btn.cc-enter { min-height: 32px; font-size: 14px; padding: 1px 0.9em 0; }
  .btn.cc-enter.ei-btn-plate { --_h: 36px; min-width: 0; padding: 1px calc(var(--_end) + 0.2em) 0; font-size: 13px; letter-spacing: 0.1em; }
  .btn.cc-back { font-size: 13px; padding: 1px 0.4em 0; }
  .cs-main { display: flex; flex-direction: column; gap: 8px; padding: 4px calc(var(--cx-screen-band) + 14px) 4px; overflow: auto; }
}

/* reduced motion */
.sqp-overlay.reduced, .sqp-overlay.reduced * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .sqp-card, .sqp-shake, .btn.armed, .sqp-flash, .sqp-switch::after { animation: none !important; transition: none !important; }
}
body.reduced-motion .sqp-switch::after { transition: none; }

/* ============================================================== iteration 2: quest log (Repeat list, exercise tree, zone) — a vellum page */
.sqp-questlog .win-body { padding: 10px 12px 12px; }
.ql2 { display: grid; grid-template-columns: minmax(0, 1fr) 244px; height: min(540px, calc(100vh - 150px)); min-height: 300px; overflow: hidden; }
.sqp-tabs-parch + .ql2 { height: min(540px, calc(100vh - 196px)); }
.ql2-main {
  overflow: auto; min-height: 0; padding: 16px 16px 20px 26px;
  /* drypoint ruling: a double margin rule down the left of the page */
  background: linear-gradient(rgba(138, 36, 20, 0.2), rgba(138, 36, 20, 0.2)) 12px 0 / 1px 100% no-repeat local,
    linear-gradient(rgba(138, 36, 20, 0.2), rgba(138, 36, 20, 0.2)) 15px 0 / 1px 100% no-repeat local;
}
.ql2-side { overflow: auto; min-height: 0; padding: 16px 14px 14px 16px; border-left: 1px solid rgba(122, 29, 16, 0.25); background: linear-gradient(90deg, rgba(60, 30, 8, 0.12), rgba(60, 30, 8, 0) 14px), rgba(110, 70, 20, 0.05); }
.ql2-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ql2-title { margin: 0; font: 600 26px/1.1 var(--cx-font-title); color: var(--cx-ink-rubric-lg); }
.ql2-sum { display: flex; gap: 5px; margin-left: auto; }
.ql2-pill { font: 700 11px/16px var(--cx-font-num); padding: 0 7px; border-radius: 2px; color: #fbf3dd; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.ql2-pill.r4 { background: var(--cx-con-red-ink); } .ql2-pill.r3 { background: var(--cx-con-orange-ink); } .ql2-pill.r2 { background: var(--cx-con-green-ink); }
.ql2-lead { font-size: 13.5px; line-height: 1.5; margin: 6px 0 10px; color: var(--cx-ink-text); }
.parchment .ink-r2 { color: var(--cx-con-green-ink); } .parchment .ink-r3 { color: var(--cx-con-orange-ink); } .parchment .ink-r4 { color: var(--cx-con-red-ink); }
.ql2-table { display: flex; flex-direction: column; }
.ql2-row { display: grid; grid-template-columns: 82px 82px 58px 34px minmax(0, 1fr) 22px; align-items: center; gap: 8px; padding: 4px 4px 4px 9px; border-radius: 0 2px 2px 0;
  border-left: 3px solid transparent; border-bottom: 1px solid rgba(90, 60, 30, 0.1); font-size: 13.5px; color: var(--cx-ink-text); cursor: pointer; outline: none; }
.ql2-row:hover, .ql2-row:focus-visible, .ql2-row.open { background: rgba(255, 252, 240, 0.55); }
.ql2-row:focus-visible { box-shadow: inset 0 0 0 1px rgba(122, 29, 16, 0.55); }
.ql2-row.r4 { border-left-color: var(--cx-con-red-ink); } .ql2-row.r3 { border-left-color: var(--cx-con-orange-ink); } .ql2-row.r2 { border-left-color: var(--cx-con-green-ink); }
.ql2-th { cursor: default; font: 700 12px/1.2 var(--cx-font-label); letter-spacing: 0.05em; color: var(--cx-ink-rubric); border-bottom: 1px solid rgba(122, 29, 16, 0.4); border-radius: 0; padding-top: 0; }
.ql2-th:hover { background: none; }
.ql2-group { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 3px; padding-left: 2px; font: 400 17px/1.2 var(--cx-font-head); }
.ql2-group::before { content: '\00B6\FE0E'; font: 400 17px/1 var(--cx-font-body); color: var(--cx-ink-rubric-lg); }
.ql2-group.r3::before { color: var(--cx-ink-lapis); }
.ql2-group small { font: 400 12.5px/1.2 var(--cx-font-body); color: var(--cx-ink-text-dim); }
.ql2-group.r4 { color: var(--cx-con-red-ink); } .ql2-group.r3 { color: var(--cx-con-orange-ink); } .ql2-group.r2 { color: var(--cx-con-green-ink); }
.ql2-num { display: flex; flex-direction: column; line-height: 1.1; font: 700 14.5px var(--cx-font-num); font-variant-numeric: lining-nums; color: var(--cx-ink-text); min-width: 0; }
.ql2-of { font-weight: 400; font-size: 11px; color: var(--cx-ink-text-dim); }
.ql2-rating { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.ql2-dot { width: 7px; height: 7px; transform: rotate(45deg); background: currentColor; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); flex: none; }
.ql2-row.r2 .ql2-rating, .ql2-rating.r2 { color: var(--cx-con-green-ink); }
.ql2-row.r3 .ql2-rating, .ql2-rating.r3 { color: var(--cx-con-orange-ink); }
.ql2-row.r4 .ql2-rating, .ql2-rating.r4 { color: var(--cx-con-red-ink); }
.ql2-rating.r1 { color: var(--cx-con-grey-ink); }
.ql2-date, .ql2-reps { font: 12.5px var(--cx-font-num); color: var(--cx-ink-text-dim); white-space: nowrap; }
.ql2-where { font-size: 12.5px; color: var(--cx-ink-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql2-x { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: none; border-radius: 2px; background: transparent; color: var(--cx-ink-text-dim); opacity: 0; cursor: pointer; }
.ql2-x .icon { width: 9px; height: 9px; }
.ql2-row:hover .ql2-x, .ql2-row:focus-within .ql2-x { opacity: 0.85; }
.ql2-x:hover { background: rgba(140, 18, 11, 0.12); color: var(--cx-con-red-ink); }
.ql2-row.armed { background: rgba(140, 18, 11, 0.08); }
.ql2-row.armed .ql2-x { opacity: 1; background: var(--cx-con-red-ink); color: #fbf3dd; }
.ql2-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px 9px 14px; background: rgba(255, 252, 240, 0.55); border-radius: 0 0 2px 2px; }
.ql2-pick-q { font: italic 400 14px/1.3 var(--cx-font-flavor); color: var(--cx-ink-text-dim); margin-right: 4px; }
.ql2-rate { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 2px; border: 1px solid rgba(60, 34, 12, 0.5); border-left-width: 3px; background: rgba(255, 252, 240, 0.7); font: 400 13px var(--cx-font-body); color: var(--cx-ink-text); cursor: pointer; }
.ql2-rate b { font-family: var(--cx-font-num); }
.ql2-rate:hover { background: #fffaf0; }
.ql2-rate.r2 { border-left-color: var(--cx-con-green-ink); } .ql2-rate.r3 { border-left-color: var(--cx-con-orange-ink); } .ql2-rate.r4 { border-left-color: var(--cx-con-red-ink); }
.ql2-empty { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px dashed rgba(122, 29, 16, 0.35); border-radius: 2px; font-size: 13.5px; }
.ql2-empty small { display: block; color: var(--cx-ink-text-dim); margin-top: 2px; line-height: 1.4; }
.ql2-empty-ico .icon { width: 26px; height: 26px; color: var(--cx-ink-gold); }
/* sub-headings: a manuscript line-filler above the rubric heading */
.ql2-sub { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 6px; padding-top: 18px; padding-bottom: 3px;
  font: 600 22px/1.1 var(--cx-font-title); color: var(--cx-ink-rubric-lg);
  background: var(--cx-orn-filler) center top / 180px 16px no-repeat, linear-gradient(90deg, rgba(122, 29, 16, 0.38), rgba(122, 29, 16, 0)) left bottom / 100% 1px no-repeat; }
.ql2-sub small { font: 400 12.5px/1.2 var(--cx-font-body); color: var(--cx-ink-text-dim); }
.ql2-none { font: italic 400 14px/1.4 var(--cx-font-flavor); color: var(--cx-ink-text-dim); }
.ql2-done { display: flex; flex-direction: column; gap: 1px; }
.ql2-node { padding: 4px 8px 5px; border-radius: 2px; color: var(--cx-con-grey-ink); }
.ql2-node:hover { background: rgba(255, 252, 240, 0.35); }
.ql2-node-h { display: grid; grid-template-columns: minmax(84px, auto) auto minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; }
.ql2-node-name { font: 700 14px var(--cx-font-body); color: var(--cx-ink-text-dim); white-space: nowrap; }
.ql2-node.open { background: rgba(255, 252, 240, 0.6); box-shadow: inset 3px 0 0 var(--cx-ink-gold), inset 0 0 0 1px rgba(94, 61, 12, 0.35); margin: 2px 0 4px; }
.ql2-node.open .ql2-node-name { color: var(--cx-ink-text); }
.ql2-state { font: italic 400 12px/1.2 var(--cx-font-body); color: var(--cx-ink-text-dim); white-space: nowrap; }
.ql2-state.open { font: 700 12px/1.2 var(--cx-font-label); letter-spacing: 0.04em; font-style: normal; color: var(--cx-ink-gold); }
.ql2-state.turned { color: var(--cx-con-grey-ink); }
.ql2-done-meta { font-size: 12.5px; color: var(--cx-ink-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql2-done-xp { font: 700 12px var(--cx-font-num); color: var(--cx-q-epic-ink); white-space: nowrap; }
.ql2-done-at { font: 12px var(--cx-font-num); color: var(--cx-ink-text-dim); white-space: nowrap; }
.ql2-parts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 3px 0 0 4px; }
.ql2-caret { color: var(--cx-ink-text-dim); font-size: 11px; margin-right: 1px; }
.ql2-part { display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; line-height: 20px; border-radius: 2px; border: 1px solid rgba(74, 74, 74, 0.4);
  background: rgba(255, 252, 240, 0.4); font: 12.5px var(--cx-font-num); color: var(--cx-con-grey-ink); cursor: pointer; }
.ql2-part b { font-weight: 700; }
.ql2-part small { font-size: 11px; }
.ql2-part:hover { background: rgba(255, 252, 240, 0.9); }
.ql2-part.r2 { color: var(--cx-con-green-ink); border-color: rgba(24, 86, 29, 0.45); }
.ql2-part.r3 { color: var(--cx-con-orange-ink); border-color: rgba(121, 52, 4, 0.5); }
.ql2-part.r4 { color: var(--cx-con-red-ink); border-color: rgba(140, 18, 11, 0.5); background: rgba(140, 18, 11, 0.06); }
.ql2-part.listed { border-style: solid; border-width: 1px 1px 1px 3px; }
.ql2-node-hint { margin: 4px 0 0 4px; font: italic 400 13px/1.35 var(--cx-font-flavor); color: var(--cx-ink-text-dim); }
.ql2-node-hint kbd { font-style: normal; }
/* side: where you are */
.ql2-travel { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; padding: 7px 9px; border-radius: 0 2px 2px 0; background: rgba(31, 58, 118, 0.07); border-left: 3px solid var(--cx-ink-lapis); font-size: 13px; color: var(--cx-ink-text); }
.ql2-travel small { display: block; color: var(--cx-ink-text-dim); margin-top: 2px; }
.ql2-travel-ico .icon { width: 18px; height: 18px; color: var(--cx-ink-lapis); }
.ql2-trek { border-left-style: dashed; }
.ql2-trek-back { display: block; margin-top: 5px; font: inherit; font-size: 12px; padding: 2px 8px; border: 1px solid var(--cx-ink-lapis); border-radius: 2px; background: transparent; color: var(--cx-ink-text); cursor: pointer; }
.ql2-trek-back:hover { background: rgba(31, 58, 118, 0.1); }
.ql2-zone-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ql2-zone-name { font: 600 21px/1.1 var(--cx-font-title); color: var(--cx-ink-rubric-lg); }
.ql2-zone-lvl { font: 700 12.5px var(--cx-font-num); white-space: nowrap; }
.ql2-lore { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 8px; margin: 8px 0 10px; }
.ql2-lore-lbl { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; font: 700 12px/1.2 var(--cx-font-label); letter-spacing: 0.04em; color: var(--cx-ink-rubric); }
.ql2-lore.done .ql2-lore-lbl { color: var(--cx-ink-gold); }
.ql2-lore-ico .icon { width: 11px; height: 11px; }
.ql2-lore-n { font: 12px var(--cx-font-num); color: var(--cx-ink-text-dim); white-space: nowrap; }
.ql2-lore .sqp-bar-fill { background: var(--cx-bar-enamel), var(--cx-bar-verdigris); }
.ql2-frames { display: flex; flex-direction: column; gap: 2px; }
.ql2-frame { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; gap: 6px; align-items: center; width: 100%; padding: 4px 6px; border: none; border-radius: 0 2px 2px 0;
  border-left: 3px solid transparent; background: transparent; text-align: left; font: inherit; color: var(--cx-ink-text); }
.ql2-frame.go { cursor: pointer; }
.ql2-frame.go:hover { background: rgba(255, 252, 240, 0.6); }
.ql2-frame.here { background: linear-gradient(90deg, rgba(138, 36, 20, 0.11), rgba(138, 36, 20, 0.02) 85%); border-left-color: var(--cx-ink-rubric); }
.ql2-here .icon { width: 9px; height: 9px; color: var(--cx-ink-rubric); }
.ql2-frame-name { display: flex; flex-direction: column; min-width: 0; }
.ql2-frame-name span { font: 400 15px/1.2 var(--cx-font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql2-frame.here .ql2-frame-name span { color: var(--cx-ink-rubric); }
.ql2-frame-name small { font-size: 11.5px; font-weight: 700; }
.ql2-frame-q { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.ql2-frame-q b { font: 700 15px var(--cx-font-num); color: var(--cx-ink-text); }
.ql2-frame-q small { font-size: 11px; color: var(--cx-ink-text-dim); }
.ql2-frame.out { opacity: 0.62; }
.ql2-frame.out .ql2-frame-q b { color: var(--cx-con-green-ink); }
.ql2-hint { margin-top: 8px; padding: 6px 9px; border-radius: 0 2px 2px 0; background: rgba(184, 134, 46, 0.12); border-left: 3px solid var(--cx-ink-gold); font-size: 12.5px; line-height: 1.4; color: var(--cx-ink-text); }
.ql2-side-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(122, 29, 16, 0.25); font-size: 13px; color: var(--cx-ink-text); }
.ql2-lore-total { display: flex; align-items: center; gap: 4px; }
.ql2-lore-total .icon, .ql2-side-foot .btn .icon { width: 13px; height: 13px; }
.ql2-invasion { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: var(--cx-con-red-ink); }
.ql2-invasion > span:first-child { display: inline-block; vertical-align: -2px; margin-right: 3px; }
.ql2-invasion .icon { width: 13px; height: 13px; }
@media (max-width: 760px) {
  .ql2, .sqp-tabs-parch + .ql2 { grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; max-height: calc(100vh - 150px); overflow: auto; }
  .sqp-tabs-parch + .ql2 { max-height: calc(100vh - 196px); }
  .ql2-main, .ql2-side { overflow: visible; }
  .ql2-side { border-left: none; border-top: 1px solid rgba(122, 29, 16, 0.25); }
  .ql2-row { grid-template-columns: 70px 76px 52px 30px minmax(0, 1fr) 22px; gap: 6px; }
}

/* ============================================================== iteration 2: the Adventurer's Handbook — an open book */
.sqp-help .win-body { padding: 10px 12px 12px; }
.hb { display: grid; grid-template-columns: 212px minmax(0, 1fr); height: min(600px, calc(100vh - 146px)); min-height: 320px; overflow: hidden; }
.hb-toc { display: flex; flex-direction: column; min-height: 0; padding: 16px 10px 10px 14px; border-right: 1px solid rgba(122, 29, 16, 0.3);
  background: linear-gradient(90deg, rgba(110, 60, 15, 0.1), rgba(110, 60, 15, 0.03)); box-shadow: inset -12px 0 16px -12px rgba(60, 30, 8, 0.6); }
.hb-book { display: flex; align-items: center; gap: 8px; margin: 0 2px 12px; font: 600 19px/1.05 var(--cx-font-title); color: var(--cx-ink-rubric-lg); }
.hb-book-ico { flex: none; width: 34px; height: 34px; background: var(--cx-orn-seal) center / 100% 100% no-repeat; }
.hb-book-ico .icon { display: none; }
.hb-search { width: 100%; margin-bottom: 8px; padding: 5px 8px; font-size: 13.5px; -webkit-appearance: none; appearance: none; }
.hb-chapters { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.hb-ch { display: flex; align-items: baseline; gap: 8px; padding: 4px 8px; border: none; border-radius: 0 2px 2px 0; border-left: 3px solid transparent; background: transparent; text-align: left;
  font: 400 15px/1.25 var(--cx-font-head); color: var(--cx-ink-text); cursor: pointer; }
.hb-ch:hover { background: rgba(255, 252, 240, 0.5); }
.hb-ch.active { background: linear-gradient(90deg, rgba(138, 36, 20, 0.12), rgba(138, 36, 20, 0.02) 85%); color: var(--cx-ink-rubric); border-left-color: var(--cx-ink-rubric); }
.hb-ch:focus-visible { outline: 2px solid var(--cx-ink-rubric); outline-offset: -2px; }
.hb-ch-n { flex: none; min-width: 18px; text-align: right; font: 600 14px/1 var(--cx-font-title); color: var(--cx-ink-rubric-lg); }
.hb-ch:nth-child(even) .hb-ch-n { color: var(--cx-ink-lapis); }
.hb-page { overflow: auto; min-height: 0; padding: 20px 30px 26px 34px;
  background: linear-gradient(rgba(138, 36, 20, 0.2), rgba(138, 36, 20, 0.2)) 16px 0 / 1px 100% no-repeat local,
    linear-gradient(rgba(138, 36, 20, 0.2), rgba(138, 36, 20, 0.2)) 19px 0 / 1px 100% no-repeat local; }
.hb-kicker { font: 700 12px/1.2 var(--cx-font-label); letter-spacing: 0.1em; color: var(--cx-ink-text-dim); }
.hb-title { margin: 2px 0 14px; padding-bottom: 8px; font: 600 32px/1.05 var(--cx-font-title); color: var(--cx-ink-rubric-lg); background: linear-gradient(90deg, rgba(122, 29, 16, 0.4), rgba(122, 29, 16, 0)) left bottom / 100% 1px no-repeat; }
.hb-page p { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.hb-page p.hb-lead { font-size: var(--cx-fs-read); line-height: 1.55; }
/* the first paragraph opens with an illuminated initial: a gold letter on a lapis ground with white penwork */
.hb-page p.hb-lead::first-letter {
  float: left;
  margin: 5px 10px 0 0;
  padding: 0.19em 0.24em 0.11em;
  font: 900 calc(var(--cx-dropcap) * 0.64)/1 var(--cx-font-initial);
  color: var(--cx-gold-leaf);
  text-shadow: 0 1px 0 #2a1404, 0 0 1px #000, 0 2px 5px rgba(0, 0, 0, 0.55);
  background: var(--cx-orn-dropcap) center / 100% 100% no-repeat;
}
.hb-h { margin: 18px 0 6px; font: 400 20px/1.2 var(--cx-font-head); color: var(--cx-ink-rubric); }
.hb-list { margin: 0 0 10px; padding: 0; list-style: none; font-size: 15px; line-height: 1.5; }
.hb-list li { position: relative; margin: 4px 0; padding-left: 1.25em; }
.hb-list li::before { content: '\00B6\FE0E'; position: absolute; left: 0; top: -0.04em; font: 400 1.18em/1.25 var(--cx-font-body); color: var(--cx-ink-rubric-lg); }
.hb-list li:nth-child(even)::before { color: var(--cx-ink-lapis); }
.hb-table { width: 100%; border-collapse: collapse; margin: 2px 0 14px; font-size: 14px; }
.hb-table th { text-align: left; padding: 4px 8px; border-bottom: 1px solid rgba(122, 29, 16, 0.4); font: 700 12px/1.2 var(--cx-font-label); letter-spacing: 0.05em; color: var(--cx-ink-rubric); }
.hb-table td { padding: 5px 8px; border-bottom: 1px solid rgba(90, 60, 30, 0.13); vertical-align: top; color: var(--cx-ink-text); line-height: 1.4; }
.hb-table td:first-child { white-space: nowrap; }
.hb-table td small { display: block; font-size: 12px; color: var(--cx-ink-text-dim); }
.hb-table code { white-space: nowrap; }
.hb-urls td:last-child code { white-space: normal; word-break: break-all; font-size: 11.5px; }
.hb-ratings tr td:first-child { border-left: 3px solid transparent; }
.hb-ratings tr.r1 td:first-child { border-left-color: var(--cx-con-grey-ink); } .hb-ratings tr.r2 td:first-child { border-left-color: var(--cx-con-green-ink); }
.hb-ratings tr.r3 td:first-child { border-left-color: var(--cx-con-orange-ink); } .hb-ratings tr.r4 td:first-child { border-left-color: var(--cx-con-red-ink); }
.hb-ratings tr.r2 b { color: var(--cx-con-green-ink); } .hb-ratings tr.r3 b { color: var(--cx-con-orange-ink); } .hb-ratings tr.r4 b { color: var(--cx-con-red-ink); }
.hb-keys td:nth-child(2) { color: var(--cx-ink-text-dim); font-size: 12.5px; white-space: nowrap; }
.hb-r1 { color: var(--cx-con-grey-ink); } .hb-r2 { color: var(--cx-con-green-ink); } .hb-r3 { color: var(--cx-con-orange-ink); } .hb-r4 { color: var(--cx-con-red-ink); }
.hb-con { display: inline-block; width: 11px; height: 13px; vertical-align: -1px; -webkit-clip-path: polygon(0 0, 100% 0, 100% 52%, 86% 78%, 50% 100%, 14% 78%, 0 52%); clip-path: polygon(0 0, 100% 0, 100% 52%, 86% 78%, 50% 100%, 14% 78%, 0 52%); }
.hb-cons td:first-child { width: 18px; }
.hb-zones tr.home td { background: rgba(138, 36, 20, 0.06); }
.hb-zones td:first-child { white-space: normal; }
.hb-zones td:nth-child(2), .hb-zones td:nth-child(3) { font-family: var(--cx-font-num); font-weight: 700; white-space: nowrap; }
.hb-table td small.hb-tag, .hb-tag { display: inline; font: 700 11px/1 var(--cx-font-label); letter-spacing: 0.04em; color: var(--cx-ink-lapis); }
.hb-races td:last-child { font-size: 13px; }
.hb-note { margin: 12px 0; padding: 8px 12px; border-left: 3px solid var(--cx-ink-rubric-lg); background: rgba(255, 252, 240, 0.4); font: italic 400 15px/1.45 var(--cx-font-flavor); color: var(--cx-ink-text); }
.hb-page .hb-muted { color: var(--cx-ink-text-dim); font-style: italic; }
.hb-rarities { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; padding: 6px 12px; border-radius: 2px; background: var(--cx-bg-ink); box-shadow: inset 0 0 0 1px rgba(176, 122, 60, 0.5); font: 700 13.5px var(--cx-font-body); text-shadow: 0 1px 0 #000; }
.hb-rarities .q-poor { color: var(--q-poor); } .hb-rarities .q-common { color: var(--q-common); } .hb-rarities .q-uncommon { color: var(--q-uncommon); }
.hb-rarities .q-rare { color: var(--cx-q-rare-text); } .hb-rarities .q-epic { color: var(--cx-q-epic-text); } .hb-rarities .q-legendary { color: var(--q-legendary); }
.hb-page code { padding: 0 4px; border-radius: 2px; background: rgba(58, 36, 18, 0.1); font-size: 12px; }
.hb-next { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 4px 0; border: none; background: transparent; font: 700 14px/1.2 var(--cx-font-label); letter-spacing: 0.04em; color: var(--cx-ink-rubric); cursor: pointer; }
.hb-next::before { content: '\00B6\FE0E'; font: 400 16px/1 var(--cx-font-body); color: var(--cx-ink-lapis); }
.hb-next:hover { text-decoration: underline; text-underline-offset: 3px; }
.hb-next .icon { width: 10px; height: 10px; }
.hb-hit { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 6px; padding: 0; border: none; background: none; font: 400 18px/1.2 var(--cx-font-head); color: var(--cx-ink-rubric); cursor: pointer; }
.hb-hit:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .hb { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .hb-toc { border-right: none; border-bottom: 1px solid rgba(122, 29, 16, 0.3); padding-bottom: 6px; }
  .hb-chapters { flex-direction: row; flex-wrap: wrap; max-height: 74px; }
  .hb-page { padding: 14px 18px 18px 26px; }
}

/* ============================================================== iteration 2: settings → music */
.set-url { width: 270px; max-width: 46vw; }
.set-url.bad { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--cx-vermilion); }
.set-music-info { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 4px; padding: 8px 11px; border-radius: 0 3px 3px 0; border: 1px solid rgba(0, 0, 0, 0.6); border-left: 3px solid var(--cx-gold-2); background: var(--well); box-shadow: var(--well-sh); font-size: 13px; color: var(--cx-text); line-height: 1.45; }
.set-music-info ul { margin: 3px 0 4px; padding-left: 16px; }
.set-music-info code { color: var(--cx-gold-leaf); font-size: 11.5px; }
.set-music-info small { color: var(--cx-text-dim); }
.set-music-ico .icon { width: 18px; height: 18px; color: var(--cx-gold-text); }
.set-music-scan { margin-left: auto; flex: none; }
.cc-race-home { display: flex; align-items: center; gap: 5px; margin: -2px 0 8px; font-size: 13px; color: var(--cx-text-dim); }
.cc-race-home b { color: var(--cx-gold-text); font-weight: 700; }
.cc-race-home .icon { width: 13px; height: 13px; color: var(--cx-gold-2); }

/* ============================================================== compact (480x360): windows and dialogs stay legible */
@media (max-width: 560px), (max-height: 420px) {
  .window.sqp { max-width: calc(100vw - 12px); max-height: calc(100vh - 24px); }
  .set-wx-ctl .input { width: 168px; }
  .set-wx-quill { display: none; }
  .window.sqp .win-body { padding: 8px 10px 10px; }
  .sqp-tab { padding: 6px 9px 5px; }
  .sqp-tab.active { padding-top: 8px; }
  .sqp-section { margin: 10px 0 6px; }
  .modal { min-width: 0; }
  .modal.sqp-dlg-small, .modal.sqp-dlg-wide, .modal.sqp-dlg-exam { width: calc(100vw - 16px); }
  .modal-body { padding: 8px 10px; }
  .ql2-main { padding: 12px 10px 14px 22px; }
  .hb-page { padding: 12px 14px 16px 26px; }
  .hb-title { font-size: 24px; }
  /* the centre cards (welcome back, session report) fit 360 px tall, medallion included */
  .sqp-card-layer.center { top: calc(50% + 8px); }
  .sqp-card.frame.sqp-report, .sqp-card.frame.sqp-welcome { padding-top: 22px; padding-bottom: 10px; margin-top: 12px; }
  .wb-title, .rp-title { font-size: 18px; }
  .wb-lines { font-size: 14px; line-height: 1.38; margin: 3px 0 5px; }
  .wb-gold { font-size: 15px; }
  .wb-dailies { padding: 4px 8px; margin: 4px 0; }
  .wb-daily { font-size: 14px; }
  .wb-daily small { display: none; }
  .wb-streak { font-size: 14px; margin: 2px 0; }
  .wb-foot, .rp-foot { margin-top: 4px; }
}
