/* ProJB Enhancement journal — shared local styles, 3 November 2026. */
@import url('/projb-2026/fonts.css');

:root {
  color-scheme: dark;
  --bg: #111715;
  --surface: #19211e;
  --surface-raised: #202a26;
  --surface-deep: #0d1311;
  --text: #eee8d9;
  --muted: #b1b8ad;
  --subtle: #87958a;
  --bronze: #b99454;
  --bronze-light: #d1b779;
  --blue: #6fbbdf;
  --blue-soft: #add7e9;
  --green: #97bf96;
  --line: #3b473c;
  --line-soft: #2b372f;
  --radius: 10px;
  --body: 'Lora', Georgia, serif;
  --ui: Arial, Helvetica, sans-serif;
  font-family: var(--body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse at 88% 1%, #263b3448, transparent 42%), var(--bg);
  font-size: 15px;
  line-height: 1.65;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, input, select, textarea, summary, a { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button, select, input { min-height: 44px; }
button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 10px 14px; font-family: var(--ui); font-size: 13px; line-height: 1.4; }
button:hover { background: #2b382f; border-color: #7d7955; }
button:disabled { cursor: default; opacity: .45; }
button:disabled:hover { background: var(--surface); border-color: var(--line); }
a { color: var(--blue-soft); text-underline-offset: 4px; }
a:hover { color: #d4ebf5; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: Georgia, 'Lora', serif; font-weight: 500; line-height: 1.2; text-wrap: balance; }
h1, h2, h3, h4, p { margin-top: 0; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 23px; }
li + li { margin-top: 6px; }
strong { font-weight: 700; color: #f4eddd; }
code, pre, kbd { font-family: Consolas, 'Courier New', monospace; }
code { font-size: .92em; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
::selection { color: #fff9e8; background: #42718b; }
[hidden] { display: none !important; }
.shell { width: min(1240px, calc(100% - 32px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.print-only { display: none; }
.skip { position: fixed; top: 12px; left: 16px; z-index: 100; transform: translateY(-180%); padding: 12px 18px; background: var(--text); color: var(--bg); border-radius: 5px; }
.skip:focus { transform: translateY(0); }

.topbar { min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); font: 700 21px/1 var(--body); letter-spacing: -.5px; }
.brand img { width: 39px; height: 39px; object-fit: contain; }
.brand small { color: var(--muted); font: 10px/1.3 var(--ui); letter-spacing: 1px; text-transform: uppercase; }
.topnav { display: flex; align-items: center; gap: 16px; font: 12px/1.4 var(--ui); }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.topnav a:hover { color: var(--bronze-light); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 34px 0 25px; }
.hero-copy { align-self: center; max-width: 760px; }
.eyebrow { margin-bottom: 13px; color: var(--bronze-light); font: 700 10px/1.5 var(--ui); letter-spacing: 1.8px; text-transform: uppercase; }
.hero h1 { max-width: 850px; margin-bottom: 17px; font-size: clamp(36px, 7vw, 64px); line-height: 1.08; letter-spacing: -1.6px; }
.hero h1 span { color: var(--blue-soft); }
.hero-description { max-width: 690px; color: #c4c9bd; font-size: 15px; line-height: 1.8; margin-bottom: 21px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 4px 8px; border: 1px solid #53604b; border-radius: 4px; color: #d5d1ba; background: #222b2170; font: 10px/1.4 var(--ui); }
.badge.blue { color: var(--blue-soft); border-color: #426274; background: #19364470; }
.hero-art {
  position: relative; min-height: 136px; overflow: hidden; border: 1px solid #71603c; border-radius: var(--radius);
  background: linear-gradient(90deg, #101714a6, #11171525 50%, #111715aa), linear-gradient(0deg, #111715dd, #11171520 75%), url('/projb-2026/assets/alliance-watercolor.webp') center 40% / cover;
  display: flex; align-items: center; justify-content: center; isolation: isolate;
}
.hero-art::after { content: ''; position: absolute; inset: 7px; border: 1px solid #c2a86a45; border-radius: 5px; pointer-events: none; }
.hero-art .crest { width: 100px; max-height: 115px; object-fit: contain; filter: drop-shadow(0 5px 14px #000b); opacity: .95; }
.hero-art .crest:not(img) { width: auto; color: var(--bronze-light); font-size: 64px; line-height: 1; text-shadow: 0 4px 24px #000; }
.source-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; padding: 13px 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); font: 11px/1.6 var(--ui); }
.source-strip a { color: #c9b78d; }
.source-dot { flex: 0 0 6px; width: 6px; height: 6px; background: var(--bronze); border-radius: 50%; box-shadow: 0 0 10px #b9945440; }

.level-console { margin: 24px 0; padding: 17px; border: 1px solid #60583b; border-radius: var(--radius); background: linear-gradient(115deg, #33332355, #1b2722); }
.level-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.level-picker label, .level-console label { color: var(--muted); font: 11px/1.5 var(--ui); }
.level-number { display: flex; align-items: center; gap: 10px; }
.level-number input, input#character-level { width: 70px; min-height: 46px; padding: 7px 8px; border: 1px solid #746542; border-radius: 5px; background: var(--surface-deep); text-align: center; font: 500 26px/1.1 Georgia, serif; color: var(--bronze-light); }
input#level-range { flex: 1; min-width: 130px; width: 100%; height: 44px; margin: 0; accent-color: var(--bronze); cursor: pointer; }
.level-stepper { display: inline-flex; gap: 5px; }
.level-stepper button { min-width: 44px; padding-inline: 10px; font-size: 18px; }
.level-pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.level-pills button { flex: 1; min-width: 46px; padding: 8px; color: var(--muted); background: transparent; border-color: transparent; font-size: 11px; }
.level-pills button:hover { color: var(--text); border-color: var(--line); }
.level-pills button.active { color: var(--bronze-light); border-color: #837047; background: #4b432b60; }
.level-console p { margin: 12px 0 0; color: var(--muted); font: 11px/1.6 var(--ui); }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.journal-sidebar { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #19211dbb; padding: 15px; }
.journal-sidebar h2, .journal-sidebar h3 { margin-bottom: 12px; font-size: 18px; color: var(--bronze-light); }
.journey-nav { display: flex; gap: 5px; overflow-x: auto; padding: 2px 1px 9px; scrollbar-width: thin; }
.journey-nav button { min-width: max-content; text-align: left; padding: 10px 11px; border-color: transparent; background: transparent; color: var(--muted); }
.journey-nav button span, .journey-nav button small { display: block; }
.journey-nav button small { color: var(--subtle); font-size: 10px; margin-top: 3px; }
.journey-nav button.active { color: var(--text); background: #3445357a; border-color: #6f754d; box-shadow: inset 3px 0 var(--bronze); }
.journey-nav button.active small { color: #c4c8b5; }
.save-note { margin: 12px 0; color: var(--muted); font: 11px/1.7 var(--ui); }
.progress-track { height: 5px; background: #0d1511; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; max-width: 100%; background: linear-gradient(90deg, #8e763f, #c1a568); border-radius: inherit; transition: width 180ms ease; }
.side-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.side-actions button, .side-actions a { flex: 1; min-width: 115px; font: 11px/1.4 var(--ui); }
.side-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.guide-content { min-width: 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 21px; padding-bottom: 1px; border-bottom: 1px solid #5f5b40; scrollbar-width: thin; }
.tabs button { flex: 1; min-width: max-content; padding: 12px 13px; border: 0; border-bottom: 3px solid transparent; border-radius: 5px 5px 0 0; background: transparent; color: var(--muted); font-size: 12px; }
.tabs button[aria-selected=true] { border-bottom-color: var(--bronze); background: #34433355; color: #f0deba; }
.tab-panel { min-width: 0; scroll-margin-top: 20px; }
.section-heading { margin-bottom: 17px; font-size: clamp(25px, 4vw, 32px); color: #f0e8d5; }
.section-heading + p { color: var(--muted); margin-bottom: 22px; font-size: 13px; }
.panel, .current-card { padding: 20px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel h2, .panel h3, .current-card h2, .current-card h3 { margin-bottom: 12px; font-size: 23px; }
.current-card { border-color: #6c7250; background: linear-gradient(110deg, #2d3825a0, #1a2722); box-shadow: inset 3px 0 var(--bronze); }
.current-card p, .panel p { font-size: 13px; color: #c8cbbd; }
.notice { margin: 18px 0; padding: 15px 17px; border: 1px solid #3f6474; border-left: 3px solid var(--blue); border-radius: 5px; color: #cadde2; background: #172d3385; font-size: 12px; line-height: 1.75; }
.notice.warning { border-color: #76613c; border-left-color: var(--bronze); color: #e1d4b4; background: #3b311c70; }
.notice.compact { padding: 10px 13px; margin: 12px 0; font-size: 11px; }
.notice strong { color: inherit; }
.cards-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 18px 0 24px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 17px; align-items: center; }
.toolbar .search { flex: 1; min-width: 170px; }
.toolbar .search input, .search input, .filters select { width: 100%; min-height: 44px; border: 1px solid #53604f; border-radius: 5px; padding: 10px 12px; background: var(--surface-deep); color: var(--text); font: 12px/1.4 var(--ui); }
input::placeholder, textarea::placeholder { color: #849587; opacity: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters select { width: auto; max-width: 100%; }
.filters button { font-size: 11px; }
.filters button.active, .filters button[aria-pressed=true] { color: var(--bronze-light); border-color: #837047; background: #4b432b60; }

.macro-card { min-width: 0; overflow: hidden; border: 1px solid #3e4b40; border-radius: 8px; background: var(--surface); }
.macro-card[open], .macro-card details[open] { border-color: #657251; }
.macro-card > summary, .macro-card details > summary { display: flex; gap: 11px; align-items: center; min-height: 75px; list-style: none; padding: 16px; }
.macro-card > summary::-webkit-details-marker, .macro-card details > summary::-webkit-details-marker { display: none; }
.macro-card > summary::after, .macro-card details > summary::after { content: '+'; margin-left: auto; padding-left: 8px; color: var(--bronze-light); font: 20px/1 var(--ui); }
.macro-card[open] > summary::after, .macro-card details[open] > summary::after { content: '−'; }
.macro-card > summary:hover, .macro-card details > summary:hover { background: #2a382d70; }
.macro-card > :not(summary), .macro-card details > :not(summary) { margin-left: 16px; margin-right: 16px; }
.macro-card > :last-child, .macro-card details > :last-child { margin-bottom: 16px; }
.macro-card .macro-icon { flex: 0 0 35px; width: 35px; height: 35px; object-fit: cover; border: 1px solid #9c8250; border-radius: 5px; background: #0c1715; }
.macro-title { min-width: 0; font-size: 16px; line-height: 1.35; color: #f0e6cf; }
.macro-title small { display: block; margin-top: 4px; color: var(--muted); font: 10px/1.45 var(--ui); }
.keycap, .mini-key { display: inline-flex; justify-content: center; align-items: center; min-width: 26px; min-height: 25px; padding: 3px 7px; border: 1px solid #6c735c; border-bottom-width: 3px; border-radius: 4px; background: #101914; color: #ded3b2; font: 11px/1.3 Consolas, monospace; white-space: nowrap; }
.macro-description { color: #bfc8bd; font-size: 12px; margin-top: 0; margin-bottom: 12px; }
.macro-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font: 10px/1.5 var(--ui); margin-block: 10px; }
.macro-code { position: relative; min-width: 0; margin-block: 12px; border: 1px solid #35483d; border-radius: 5px; background: #0a110e; }
.macro-code pre { max-width: 100%; margin: 0; padding: 15px 13px; overflow-x: auto; color: #b7d9e5; font-size: 12px; line-height: 1.8; tab-size: 2; }
.macro-code pre code { font-size: inherit; }
.copy-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--blue-soft); background: #203b4255; border-color: #426272; min-height: 44px; font-size: 11px; }
.copy-button:hover { background: #2a505970; border-color: var(--blue); }
.ready-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--muted); font: 11px/1.5 var(--ui); cursor: pointer; }
.ready-toggle input, .phase-check input { flex: 0 0 auto; min-height: 0; width: 18px; height: 18px; accent-color: var(--bronze); }

.phase-card { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #1a241e; margin-bottom: 15px; }
.phase-card.current, .phase-card.active { border-color: #8b7b4c; box-shadow: inset 3px 0 var(--bronze); }
.phase-title { font-size: 22px; margin-bottom: 7px; }
.phase-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font: 10px/1.5 var(--ui); color: var(--bronze-light); margin-bottom: 14px; }
.phase-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.phase-actions button { font-size: 11px; }
.phase-tips { color: #c0c7b8; font-size: 12px; line-height: 1.8; padding-left: 19px; margin: 13px 0; }
.phase-macros { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; margin-top: 14px; border-top: 1px solid var(--line-soft); }
.phase-macros a, .phase-macros button { display: inline-flex; gap: 7px; align-items: center; min-height: 44px; color: var(--blue-soft); font: 11px/1.5 var(--ui); text-decoration: none; }
.phase-check { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-soft); color: #c8cfc1; font: 12px/1.7 var(--ui); cursor: pointer; }
.phase-check input { margin-top: 2px; }
.phase-check small { display: block; margin-top: 4px; color: var(--subtle); }

.talent-tablewrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; margin: 20px 0; scrollbar-width: thin; }
.talent-tablewrap table { width: 100%; min-width: 550px; border-collapse: collapse; text-align: left; font: 12px/1.6 var(--ui); }
.talent-tablewrap th { padding: 12px 13px; background: #263329; color: #d7c99e; font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
.talent-tablewrap td { padding: 13px; border-top: 1px solid var(--line); vertical-align: top; color: #c6cebf; }
.talent-tablewrap tr.current td, .talent-tablewrap tr.available td { background: #34492a55; }
.talent-tablewrap td small { display: block; color: var(--subtle); font-size: 10px; margin-top: 4px; }
.talent-tablewrap td:first-child { color: var(--bronze-light); font-weight: 700; white-space: nowrap; }
.talent-icon { display: inline-block; vertical-align: middle; width: 28px; height: 28px; object-fit: cover; border: 1px solid #807044; border-radius: 4px; margin-right: 8px; }
.status-tag { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #526749; padding: 3px 6px; border-radius: 4px; background: #29402460; color: #bdd1ac; font: 9px/1.5 var(--ui); white-space: nowrap; }
.status-tag.pending, .status-tag .pending, .pending.status-tag { border-color: #76613d; background: #4f3f2250; color: #d5bc83; }

.key-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.key-tile { position: relative; display: flex; gap: 9px; align-items: center; min-width: 0; min-height: 71px; text-align: left; padding: 10px; background: #1c2a21; border: 1px solid #4d6048; border-bottom-width: 3px; border-radius: 6px; color: #dedbc9; }
.key-tile img { flex: 0 0 28px; width: 28px; height: 28px; object-fit: cover; border: 1px solid #6a6d46; border-radius: 4px; }
.key-tile span { min-width: 0; }
.key-tile strong { display: block; color: #e7dfc9; font: 700 11px/1.5 var(--ui); }
.key-tile small { display: block; color: #99aa98; font: 9px/1.5 var(--ui); margin-top: 3px; }
.key-tile .keycap { position: absolute; top: -6px; right: 5px; min-width: 21px; min-height: 20px; font-size: 9px; padding: 2px 5px; }
.key-tile.locked { background: #19201b; border-color: #364237; color: #94a08f; opacity: .62; }
.key-tile.locked img { filter: grayscale(.85); }
.key-tile.ready { border-color: #748a56; }
.key-tile.selected { background: #263f3b; border-color: var(--blue); box-shadow: 0 0 0 1px #6fbbdf60, 0 4px 17px #0003; opacity: 1; }
.key-tile.selected strong { color: var(--blue-soft); }
.keyboard-row { display: flex; gap: 5px; flex-wrap: wrap; margin: 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-deep); }
.keyboard-row button { min-width: 36px; min-height: 44px; padding: 7px; border-bottom-width: 3px; color: #d5c99e; font: 11px/1.3 Consolas, monospace; }
.keyboard-row button.selected { color: var(--blue-soft); border-color: var(--blue); background: #294840; }
.key-detail { padding: 19px; border: 1px solid #496d72; border-radius: 8px; background: #192e2c; margin-top: 16px; }
.key-detail h3 { font-size: 22px; color: var(--blue-soft); margin-bottom: 12px; }
.key-detail p { font-size: 12px; color: #c1d0c6; }

.source-card { padding: 17px 18px; margin-bottom: 12px; border: 1px solid var(--line); border-left: 3px solid var(--bronze); border-radius: 6px; background: var(--surface); }
.source-card h3 { font-size: 18px; margin-bottom: 9px; }
.source-card p { margin-bottom: 9px; font-size: 12px; color: #b8c2b3; overflow-wrap: anywhere; }
.source-card small { display: block; color: var(--subtle); font: 10px/1.7 var(--ui); }
.notes-area { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 26px; }
.notes-area h2, .notes-area h3 { font-size: 23px; margin-bottom: 10px; }
.notes-area label { display: block; margin-bottom: 10px; color: var(--muted); font: 12px/1.6 var(--ui); }
.notes-area textarea { width: 100%; min-height: 150px; resize: vertical; padding: 13px 14px; border: 1px solid #596549; border-radius: 6px; background: #101b14; color: #e0e4d4; font-size: 13px; line-height: 1.8; }
.notes-area p { color: var(--subtle); font: 11px/1.7 var(--ui); }
.empty-state { padding: 27px 20px; margin-block: 20px; border: 1px dashed #65744f; border-radius: 8px; color: var(--muted); background: #25332255; text-align: center; font-size: 13px; }
.empty-state h3 { color: var(--text); font-size: 22px; margin-bottom: 9px; }
.toast, #toast { position: fixed; z-index: 100; bottom: 20px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 13px 18px; border: 1px solid #8d8a59; border-radius: 7px; color: #f1ead5; background: #29372bf5; box-shadow: 0 8px 32px #0006; font: 12px/1.6 var(--ui); text-align: center; }
.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 22px; margin-top: 42px; padding: 24px 0 30px; border-top: 1px solid var(--line); color: var(--subtle); font: 11px/1.7 var(--ui); }
.footer a { color: #bdc6b4; }

@media (min-width: 540px) {
  .shell { width: min(1240px, calc(100% - 48px)); }
  .hero { grid-template-columns: minmax(0, 1fr) 160px; gap: 25px; }
  .hero-art { min-height: 190px; }
  .hero-art .crest { width: 112px; max-height: 145px; }
  .hero-description { font-size: 14px; }
  .key-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .level-console { padding: 18px 21px; }
}

@media (min-width: 800px) {
  .shell { width: min(1240px, calc(100% - 64px)); }
  .topbar { min-height: 86px; }
  .topnav { gap: 26px; font-size: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr) 240px; gap: 38px; padding: 42px 0 29px; }
  .hero-art { min-height: 222px; }
  .hero-art .crest { width: 140px; max-height: 175px; }
  .hero-description { font-size: 15px; }
  .workspace { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .journal-sidebar { position: sticky; top: 22px; padding: 17px 14px; }
  .journey-nav { display: grid; gap: 5px; overflow: visible; padding-bottom: 5px; }
  .journey-nav button { width: 100%; min-width: 0; }
  .side-actions { display: grid; }
  .side-actions button, .side-actions a { width: 100%; min-width: 0; }
  .save-note { padding-top: 12px; border-top: 1px solid var(--line-soft); }
  .level-picker { flex-wrap: nowrap; gap: 20px; }
  input#level-range { width: auto; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs button { padding: 13px 15px; }
  .panel, .current-card { padding: 22px; }
  .phase-card { padding: 21px; }
}

@media (min-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) 290px; gap: 48px; }
  .hero h1 { font-size: 62px; }
  .hero-art { min-height: 225px; }
  .workspace { gap: 30px; }
  .key-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .shell { width: calc(100% - 24px); }
  .topbar { gap: 10px; }
  .brand { font-size: 18px; gap: 7px; }
  .brand img { width: 32px; height: 32px; }
  .topnav { gap: 10px; font-size: 10px; }
  .hero h1 { font-size: 36px; letter-spacing: -1px; }
  .hero-art { min-height: 115px; }
  .level-console { padding: 13px; }
  .level-picker { gap: 9px; }
  .key-tile { padding: 9px 7px; gap: 7px; }
  .key-tile img { width: 24px; height: 24px; flex-basis: 24px; }
  .tabs button { padding-inline: 10px; font-size: 11px; }
  .macro-card > summary, .macro-card details > summary { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Layout refinements for the assembled journal markup. */
.brand > span { display: block; }
.brand img { flex-shrink: 0; }
.brand-sub { display: block; margin-top: 7px; color: var(--subtle); font: 8px/1.4 var(--ui); letter-spacing: 1.6px; }
.hero-subtitle { color: var(--bronze-light); font: 15px/1.5 var(--ui); letter-spacing: 1px; margin-bottom: 20px; }
.hero h1 span { display: inline-block; margin-left: .12em; }
.hero-subtitle span { margin-inline: 8px; color: var(--subtle); }
.hero-cta { display: inline-flex; align-items: center; gap: 20px; margin-top: 23px; min-height: 44px; color: var(--bronze-light); font: 12px/1.4 var(--ui); text-decoration: none; }
.hero-art .crest:not(img) { position: relative; z-index: 2; display: grid; place-items: center; width: 100px; height: 100px; max-height: none; border: 2px solid #ac8b50; border-radius: 50%; background: #0d1714; box-shadow: 0 0 0 7px #151c16, 0 0 0 8px #6a5b38, 0 12px 40px #000a; }
.hero-art .crest img { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; }
.hero-art .crest > span { display: none; }
.crest-caption { position: absolute; inset: auto 12px 16px; color: #d0c49d; text-align: center; font: 8px/1.6 var(--ui); letter-spacing: 1.7px; }
.rune-orbit { position: absolute; width: 175px; height: 175px; border: 1px solid #baa36355; border-radius: 50%; }
.orbit-two { width: 197px; height: 197px; border-style: dashed; opacity: .35; }
.source-strip { margin-bottom: 18px; }
.source-strip a { margin-left: auto; }
.source-strip .source-dot { display: block; }
.notice p { margin: 5px 0 8px; }
.notice p:last-child { margin-bottom: 0; }
.level-console { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 24px; padding: 22px; }
.level-picker { display: block; }
.level-picker > label, .level-mode > label { display: block; margin-bottom: 10px; font-weight: 700; font-size: 9px; letter-spacing: 1.2px; }
.level-stepper { gap: 7px; align-items: center; }
.level-slider { min-width: 0; }
input#level-range { width: 100%; min-width: 0; display: block; }
.slider-labels { display: flex; justify-content: space-between; gap: 16px; color: var(--subtle); font: 9px/1.5 var(--ui); }
.level-pills { flex-wrap: nowrap; gap: 3px; }
.level-pills button { min-width: 0; min-height: 36px; padding: 6px 8px; }
.level-mode { display: grid; grid-template-columns: 1fr; align-content: center; }
.level-mode select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #52614e; border-radius: 5px; background: #101b15; font: 12px/1.4 var(--ui); }
.level-mode small { display: block; margin-top: 8px; font: 10px/1.6 var(--ui); color: var(--subtle); }
.progress-fill { display: block; }
.journey-progress > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 10px; font: 10px/1.5 var(--ui); }
.journey-nav button strong { display: block; margin-top: 5px; font-weight: 400; line-height: 1.5; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 28px 0 20px; font-size: inherit; }
.section-heading h2 { margin: 0; font-size: clamp(25px,3vw,31px); }
.section-heading .eyebrow { margin-bottom: 9px; }
.section-heading > span { flex-shrink: 0; color: var(--subtle); font: 10px/1.5 var(--ui); }
.current-binds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.current-binds .mini-key { gap: 9px; min-height: 42px; padding: 8px 11px; }
.current-binds kbd { color: var(--bronze-light); padding-right: 4px; }
.next-unlock { color: var(--subtle); font: 11px/1.6 var(--ui); }
.phase-card > p { color: #bec9bc; font-size: 13px; line-height: 1.9; margin-bottom: 22px; }
.phase-talents { padding: 16px; border: 1px solid var(--line-soft); border-radius: 6px; background: #111a1490; }
.phase-talents .eyebrow { margin-bottom: 10px; }
.talent-line { display: flex; align-items: start; gap: 12px; padding: 9px 0; font: 12px/1.7 var(--ui); }
.talent-line + .talent-line { border-top: 1px solid var(--line-soft); }
.talent-line .level-label { min-width: 38px; color: var(--bronze-light); }
.talent-line b { margin-left: 8px; color: var(--blue-soft); }
.talent-line.pending { flex-wrap: wrap; }
.phase-macros { gap: 8px; padding-top: 18px; margin-top: 20px; }
.phase-macros > .eyebrow { flex-basis: 100%; margin-bottom: 4px; }
.phase-macros .mini-key { justify-content: start; min-height: 44px; white-space: normal; gap: 8px; padding: 8px 10px; font: 10px/1.5 var(--ui); border-bottom-width: 1px; }
.phase-macros .mini-key kbd { color: var(--bronze-light); min-width: 20px; }
.phase-macros .mini-key small { margin-left: auto; color: var(--subtle); font-size: 9px; }
.phase-tips { margin: 20px 0; }
.phase-check { align-items: center; padding-top: 17px; }
.macro-title > strong { display: block; font-size: 13px; }
.macro-title > span { display: block; margin-top: 5px; color: var(--subtle); font: 10px/1.5 var(--ui); }
.macro-body { padding-top: 4px; }
.modifier-list { margin: 14px 0; color: var(--muted); font: 11px/1.8 var(--ui); }
.modifier-list kbd { color: var(--bronze-light); }
.macro-code .copy-button { display: flex; width: calc(100% - 20px); margin: 0 10px 10px; }
.talent-name { display: flex; align-items: center; gap: 9px; }
.talent-name .talent-icon { flex: 0 0 28px; margin: 0; }
.talent-detail { font-size: 10px; color: var(--subtle); margin: 9px 0 0; }
.talent-tablewrap td input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--bronze); }
.key-tile { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px 10px; align-content: center; padding: 14px; }
.key-tile kbd { grid-row: span 2; color: var(--bronze-light); font-size: 15px; padding-right: 4px; }
.key-tile > span { font: 11px/1.5 var(--ui); }
.key-tile small { margin: 0; font-size: 9px; }
.keyboard-legend { display: flex; flex-wrap: wrap; gap: 7px 20px; font: 10px/1.6 var(--ui); color: var(--subtle); }
.key-detail ul { margin: 17px 0; font: 12px/1.8 var(--ui); color: var(--muted); }
.setup-notes > summary { font: 13px/1.6 var(--ui); }
.setup-notes li { color: var(--muted); font: 12px/1.8 var(--ui); }
.notes-area small { color: var(--subtle); font: 10px/1.7 var(--ui); }
.sr-only:focus { width: auto; height: auto; margin: 0; clip: auto; white-space: normal; }
@media (min-width: 800px) {
 .level-console { grid-template-columns: 165px minmax(0,1fr) 180px; gap: 28px; align-items: center; }
 .level-picker { display: block; }
 .level-slider { border-inline: 1px solid var(--line-soft); padding-inline: 25px; }
 .hero { padding-block: 35px 28px; }
 .hero-cta { display: none; }
 .hero-description { margin-bottom: 20px; }
 .hero-art { min-height: 230px; }
 .hero-art .crest:not(img) { width: 118px; height: 118px; }
 .hero-art .crest img { width: 88px; height: 88px; }
}
@media (max-width: 799px) {
 .workspace { display: flex; flex-direction: column; }
 .guide-content { order: 0; width: 100%; }
 .journal-sidebar { order: 1; width: 100%; }
 .journal-sidebar { padding: 14px; }
 .journey-nav button { max-width: 210px; min-width: 180px; }
 .journey-nav button strong { white-space: normal; }
 .journey-progress { margin-top: 7px; }
 .journey-progress .save-note { margin-bottom: 3px; }
 .side-actions { gap: 5px; }
 .side-actions button { min-width: 0; flex: 1 1 40%; min-height: 38px; padding: 8px; font-size: 10px; }
}
@media (max-width: 539px) {
 .topbar { min-height: 68px; gap: 14px; }
 .brand { font-size: 21px; }
 .brand-sub { display: none; }
 .topnav { gap: 15px; font-size: 10px; }
 .topnav a:last-child { display: none; }
 .hero { padding-block: 30px 24px; gap: 0; }
 .hero h1 { font-size: 43px; margin-bottom: 12px; }
 .hero-subtitle { font-size: 12px; margin-bottom: 16px; }
 .hero-description { font-size: 13px; line-height: 1.8; margin-bottom: 16px; }
 .hero-description br { display: none; }
 .hero-art { display: none; }
 .hero-badges { gap: 5px; }
 .badge { font-size: 9px; padding-inline: 6px; }
 .hero-cta { display: none; }
 .source-strip { font-size: 10px; gap: 6px; margin-bottom: 12px; padding-bottom: 13px; }
 .source-strip a { margin-left: 12px; }
 .notice.compact { font-size: 12px; padding: 14px; }
 .level-console { grid-template-columns: 1fr 1fr; gap: 17px; padding: 17px; margin-block: 19px; }
 .level-picker { grid-column: 1; }
 .level-mode { grid-column: 2; }
 .level-slider { grid-row: 2; grid-column: 1/-1; }
 .level-picker > label, .level-mode > label { font-size: 8px; letter-spacing: .6px; }
 .level-number input, input#character-level { width: 53px; font-size: 24px; }
 .level-stepper { gap: 4px; }
 .level-stepper button { min-width: 35px; padding-inline: 7px; }
 .level-mode small { font-size: 9px; }
 .level-pills { margin-top: 10px; padding-top: 8px; }
 .level-pills button { padding-inline: 4px; }
 .section-heading { align-items: start; gap: 10px; }
 .section-heading > span { margin-top: 4px; font-size: 9px; }
 .section-heading h2 { font-size: 25px; }
 .phase-card { padding: 17px; }
 .phase-talents { padding: 12px; }
 .macro-card > summary { gap: 9px; }
 .macro-title > strong { font-size: 12px; }
 .macro-card .keycap { font-size: 9px; min-width: 24px; }
 .macro-code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}
@media print {
  :root { color-scheme: light; --text: #161d17; --muted: #485047; --subtle: #556052; --line: #c1c8b9; --surface: #fff; --bronze-light: #6d5023; --blue-soft: #245169; }
  @page { size: A4; margin: 16mm; }
  body { background: #fff; color: #161d17; font-size: 10pt; line-height: 1.5; }
  .shell { width: 100%; max-width: none; }
  .topbar, .hero-art, .level-console, .journal-sidebar, .tabs, .toolbar, .copy-button,
  .ready-toggle, .phase-actions, .keyboard-row, .notes-area, .toast, #toast, .footer,
  .skip, .key-grid, .key-detail, .filters, .empty-state { display: none !important; }
  .print-only { display: block; }
  .workspace, .hero, .cards-grid { display: block; }
  .hero { padding: 0 0 12pt; }
  .hero h1 { color: #171c17; font-size: 29pt; letter-spacing: -.7pt; }
  .hero h1 span, .eyebrow, a { color: #295167; }
  .hero-description { color: #40493d; font-size: 10pt; }
  .hero-badges { gap: 5pt; }
  .badge { background: #fff; color: #444c3b; border-color: #bdc3b2; }
  .source-strip { padding: 8pt 0; font-size: 8pt; margin-bottom: 15pt; }
  .source-strip a { color: #4c533f; }
  .tab-panel[hidden] { display: block !important; }
  .tab-panel + .tab-panel { margin-top: 22pt; }
  .section-heading { font-size: 20pt; color: #1f291c; break-after: avoid; }
  h2, h3, h4, .phase-title { break-after: avoid; color: #24321e; }
  strong { color: #172217; }
  .panel, .current-card, .phase-card, .macro-card, .source-card, .notice, .notice.warning { background: #fff; border: 1px solid #bdc6b5; color: #35402f; box-shadow: none; margin-bottom: 12pt; padding: 11pt; break-inside: avoid; }
  .macro-card > summary, .macro-card details > summary { padding: 0 0 7pt; min-height: 0; }
  .macro-card > summary::after, .macro-card details > summary::after { display: none; }
  .macro-card > :not(summary), .macro-card details > :not(summary) { margin-inline: 0; }
  .macro-card > :last-child, .macro-card details > :last-child { margin-bottom: 0; }
  details > :not(summary) { display: block !important; }
  .macro-title, .macro-description, .macro-meta, .phase-tips, .phase-meta, .phase-check, .panel p, .current-card p, .source-card p { color: #35402f; }
  .macro-code { background: #f5f7f1; border-color: #c5cdbd; }
  .macro-code pre { white-space: pre-wrap; overflow: visible; overflow-wrap: anywhere; color: #203f47; padding: 8pt; font-size: 8pt; }
  .talent-tablewrap { overflow: visible; border-color: #bdc6b5; }
  .talent-tablewrap table { min-width: 0; font-size: 8pt; }
  .talent-tablewrap th { color: #34402b; background: #edf0e7; }
  .talent-tablewrap td { color: #283422; padding: 7pt; }
  .talent-tablewrap tr.current td, .talent-tablewrap tr.available td { background: #f1f4ec; }
  .talent-icon { width: 19pt; height: 19pt; }
  .phase-check input { appearance: none; border: 1px solid #607050; width: 11pt; height: 11pt; }
  .status-tag, .status-tag.pending { color: #485334; background: #f0f2e9; border-color: #a5b297; }
  a { text-decoration: none; }
}
