/* Assistant de creation de personnage : une page, sept etapes. Palette de la
   page Ascension (nuit, or, argent bleute). Ecran d'ordinateur uniquement. */
:root {
  --cr-night: #121A2E;
  --cr-deep: #0B1020;
  --cr-panel: #172038;
  --cr-panel-2: #1B2440;
  --cr-line: #2E3A5A;
  --cr-ink: #ECE5D2;
  --cr-muted: #8C92A6;
  --cr-soft: #B9B6AC;
  --cr-gold: #C8B784;
  --cr-gold-bright: #E3D3A2;
  --cr-sky: #8FB6DA;
  --cr-good: #9CC79A;
  --cr-danger: #E39A8A;
  --cr-display: 'Cormorant SC', 'Cinzel', Georgia, serif;
  --cr-text: 'EB Garamond', Garamond, Georgia, serif;
  --cr-mono: 'DM Mono', ui-monospace, Menlo, monospace;
}

html, body { margin: 0; min-height: 100%; }
body.creation { background: var(--cr-night); color: var(--cr-ink); font-family: var(--cr-text); font-size: 17px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--cr-gold-bright); outline-offset: 2px; }

.cr-loading { padding: 80px; text-align: center; font-style: italic; color: var(--cr-soft); }

.cr-page {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 340px;
  grid-template-rows: auto 1fr auto;
  gap: 0 28px;
  max-width: 1500px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 28px;
  box-sizing: border-box;
}

/* En-tete */
.cr-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--cr-line); }
.cr-kicker { font-family: var(--cr-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--cr-muted); }
.cr-title { margin: 4px 0 2px; font-family: var(--cr-display); font-weight: 600; font-size: 40px; line-height: 1; }
.cr-identity { font-style: italic; color: var(--cr-soft); min-height: 1.3em; }
.cr-draft { display: flex; gap: 10px; align-items: center; font-family: var(--cr-mono); font-size: 11px; color: var(--cr-muted); }
.cr-link { background: none; border: 0; padding: 0; color: var(--cr-gold); font-family: var(--cr-mono); font-size: 11px; letter-spacing: .08em; text-decoration: underline; text-underline-offset: 3px; }

/* Etapes */
.cr-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; position: sticky; top: 24px; }
.cr-step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; width: 100%; padding: 10px 10px; text-align: left; background: transparent; border: 1px solid transparent; }
.cr-step span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--cr-line); font-family: var(--cr-mono); font-size: 12px; color: var(--cr-muted); }
.cr-step strong { font-weight: 500; font-size: 17px; }
.cr-step small { display: block; font-size: 13px; color: var(--cr-muted); }
.cr-step.is-done span { border-color: var(--cr-gold); color: var(--cr-gold); }
.cr-step.is-current { border-color: var(--cr-line); background: var(--cr-panel); }
.cr-step.is-current span { background: var(--cr-gold); border-color: var(--cr-gold); color: var(--cr-night); }

/* Contenu */
.cr-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.cr-section h2 { margin: 0 0 4px; font-family: var(--cr-display); font-weight: 600; font-size: 30px; }
.cr-lead { margin: 0 0 14px; color: var(--cr-soft); max-width: 70ch; line-height: 1.45; }
.cr-section h3 { margin: 0 0 8px; font-family: var(--cr-display); font-weight: 600; font-size: 21px; color: var(--cr-gold); }
.cr-card { padding: 18px 20px; background: var(--cr-panel); border: 1px solid var(--cr-line); }
.cr-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cr-note { font-size: 14px; font-style: italic; color: var(--cr-muted); }
.cr-error { color: var(--cr-danger); }
/* Competence de depart qui demande une arme absente de l'equipement. */
.cr-note.cr-warn { color: var(--cr-danger); font-style: normal; border-left: 2px solid var(--cr-danger); padding-left: 10px; }
.cr-ok { color: var(--cr-good); }

.cr-field { display: grid; gap: 6px; }
.cr-field label, .cr-label { font-family: var(--cr-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cr-muted); }
.cr-input { width: 100%; box-sizing: border-box; padding: 10px 12px; background: var(--cr-deep); border: 1px solid var(--cr-line); }
.cr-input:focus { border-color: var(--cr-gold); outline: none; }
textarea.cr-input { min-height: 64px; resize: vertical; line-height: 1.4; }

/* Carte de Runeterra */
.cr-map-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.cr-map { position: relative; border: 1px solid var(--cr-line); background: var(--cr-deep); }
.cr-map img.cr-map-img { display: block; width: 100%; height: auto; opacity: .85; }
.cr-crest { position: absolute; transform: translate(-50%, -50%); width: 38px; height: 38px; padding: 4px; border-radius: 50%; background: rgba(11, 16, 32, .75); border: 1px solid var(--cr-line); }
.cr-crest img { width: 100%; height: 100%; object-fit: contain; }
.cr-crest.is-origin { border: 2px solid var(--cr-gold); box-shadow: 0 0 0 3px rgba(200, 183, 132, .25); }
.cr-map-legend { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 14px; padding: 6px 10px; background: rgba(11, 16, 32, .8); font-family: var(--cr-mono); font-size: 11px; }
.cr-map-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; vertical-align: -1px; }
.cr-map-legend .o::before { border: 2px solid var(--cr-gold); }

.cr-region { position: relative; overflow: hidden; padding: 16px 18px; border: 1px solid var(--cr-line); background: var(--cr-panel); }
.cr-region.has-banner::before { content: ''; position: absolute; inset: 0; background-image: var(--banner); background-size: cover; background-position: center; opacity: .22; }
.cr-region > * { position: relative; }
.cr-region .cr-label { color: var(--cr-gold); }
.cr-region h4 { margin: 2px 0 6px; font-family: var(--cr-display); font-weight: 600; font-size: 26px; }
.cr-bonus { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.cr-bonus span { padding: 2px 8px; border: 1px solid var(--cr-line); font-family: var(--cr-mono); font-size: 12px; background: rgba(11, 16, 32, .6); }
.cr-bonus .up { color: var(--cr-good); }
.cr-bonus .down { color: var(--cr-danger); }
.cr-passive { padding: 8px 0; border-top: 1px solid rgba(46, 58, 90, .7); }
.cr-passive strong { display: block; font-weight: 600; }
.cr-passive span { font-size: 15px; color: var(--cr-soft); }
.cr-check { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 15px; }

/* Choix en cartes (classes, competences, objets) */
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cr-choice { position: relative; display: grid; gap: 6px; align-content: start; padding: 14px 16px; text-align: left; background: var(--cr-panel); border: 1px solid var(--cr-line); }
.cr-choice:hover:not(:disabled) { border-color: #48587e; }
.cr-choice.is-selected { border-color: var(--cr-gold); background: var(--cr-panel-2); box-shadow: inset 3px 0 0 var(--cr-gold); }
.cr-choice h4 { margin: 0; font-family: var(--cr-display); font-weight: 600; font-size: 21px; }
.cr-choice p { margin: 0; font-size: 15px; color: var(--cr-soft); line-height: 1.4; }
.cr-meta { font-family: var(--cr-mono); font-size: 11px; letter-spacing: .06em; color: var(--cr-muted); text-transform: uppercase; }
.cr-tag { display: inline-block; padding: 1px 7px; margin: 0 4px 0 0; border: 1px solid var(--cr-line); font-family: var(--cr-mono); font-size: 11px; color: var(--cr-soft); }
.cr-tag.is-gold { border-color: var(--cr-gold); color: var(--cr-gold-bright); }
.cr-tag.is-sky { border-color: var(--cr-sky); color: var(--cr-sky); }
.cr-tag.is-warn { border-color: var(--cr-danger); color: var(--cr-danger); }
.cr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-chip { padding: 6px 12px; background: transparent; border: 1px solid var(--cr-line); font-size: 15px; }
.cr-chip[aria-pressed="true"] { border-color: var(--cr-gold); background: var(--cr-panel-2); color: var(--cr-gold-bright); }

/* Caracteristiques */
.cr-stats { width: 100%; border-collapse: collapse; }
.cr-stats th { padding: 6px 10px; text-align: left; font-family: var(--cr-mono); font-size: 11px; font-weight: 400; letter-spacing: .1em; color: var(--cr-muted); text-transform: uppercase; border-bottom: 1px solid var(--cr-line); }
.cr-stats td { padding: 8px 10px; border-bottom: 1px solid rgba(46, 58, 90, .6); }
.cr-stats td.num { font-family: var(--cr-mono); font-size: 15px; }
.cr-stats .is-main td:first-child { color: var(--cr-gold-bright); }
.cr-stepper { display: inline-flex; align-items: center; border: 1px solid var(--cr-line); }
.cr-stepper button { width: 32px; height: 32px; background: transparent; border: 0; font-family: var(--cr-mono); font-size: 16px; }
.cr-stepper output { min-width: 34px; text-align: center; font-family: var(--cr-mono); }
.cr-budget { display: flex; align-items: baseline; gap: 10px; }
.cr-budget strong { font-family: var(--cr-text); font-variant-numeric: lining-nums; font-size: 40px; font-weight: 600; color: var(--cr-gold-bright); line-height: 1; }
.cr-budget span { color: var(--cr-muted); }
.cr-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cr-btn { padding: 9px 16px; background: transparent; border: 1px solid var(--cr-line); }
.cr-btn:hover:not(:disabled) { border-color: var(--cr-gold); }
.cr-btn.is-primary { background: var(--cr-gold); border-color: var(--cr-gold); color: var(--cr-night); font-family: var(--cr-display); font-weight: 600; font-size: 19px; padding: 10px 24px; }

/* Alignement */
.cr-align { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 22px; align-items: center; }
.cr-slider { display: grid; gap: 4px; margin-bottom: 14px; }
.cr-slider .ends { display: flex; justify-content: space-between; font-family: var(--cr-mono); font-size: 12px; color: var(--cr-soft); }
.cr-slider input[type="range"] { width: 100%; accent-color: var(--cr-gold); }
.cr-align-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.cr-align-grid div { padding: 8px 4px; text-align: center; font-size: 13px; border: 1px solid var(--cr-line); color: var(--cr-muted); }
.cr-align-grid div.is-on { border-color: var(--cr-gold); color: var(--cr-gold-bright); background: var(--cr-panel-2); }
.cr-align-name { font-family: var(--cr-display); font-weight: 600; font-size: 28px; }

.cr-persona { display: grid; gap: 8px; }
.cr-persona-head { display: flex; justify-content: space-between; align-items: baseline; }
.cr-suggest { display: grid; gap: 4px; }
.cr-suggest button { padding: 6px 10px; text-align: left; background: transparent; border: 1px solid transparent; font-size: 15px; color: var(--cr-soft); }
.cr-suggest button:hover { border-color: var(--cr-line); color: var(--cr-ink); }
.cr-suggest button em { margin-right: 6px; font-style: normal; font-family: var(--cr-mono); font-size: 10px; color: var(--cr-muted); text-transform: uppercase; }

/* Equipement */
.cr-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--cr-line); }
.cr-tabs button { padding: 8px 16px; background: transparent; border: 0; border-bottom: 2px solid transparent; font-family: var(--cr-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--cr-muted); }
.cr-tabs button[aria-selected="true"] { border-bottom-color: var(--cr-gold); color: var(--cr-gold-bright); }
.cr-item-img { height: 72px; display: grid; place-items: center; background: var(--cr-deep); }
.cr-item-img img { max-height: 64px; max-width: 90%; }
.cr-loadout { display: grid; gap: 6px; }
.cr-slot { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(46, 58, 90, .6); font-size: 15px; }
.cr-slot .cr-meta { font-size: 10px; }
.cr-slot .empty { color: var(--cr-muted); font-style: italic; }
.cr-x { background: none; border: 0; color: var(--cr-muted); font-family: var(--cr-mono); }
.cr-x:hover { color: var(--cr-danger); }

/* Fiche en construction */
.cr-sheet { align-self: start; position: sticky; top: 24px; display: grid; gap: 14px; padding: 18px; background: var(--cr-panel); border: 1px solid var(--cr-line); }
.cr-sheet h3 { margin: 0; font-family: var(--cr-display); font-weight: 600; font-size: 24px; }
.cr-sheet .who { font-style: italic; color: var(--cr-soft); }
.cr-sheet-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cr-sheet-stats div { padding: 6px; text-align: center; border: 1px solid var(--cr-line); }
.cr-sheet-stats b { display: block; font-family: var(--cr-mono); font-size: 10px; font-weight: 400; color: var(--cr-muted); }
.cr-sheet-stats span { font-family: var(--cr-mono); font-size: 16px; }
.cr-sheet-stats small { color: var(--cr-muted); font-family: var(--cr-mono); font-size: 11px; }
.cr-sheet-res { display: flex; gap: 16px; font-family: var(--cr-mono); font-size: 13px; }
.cr-sheet-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 15px; }
.cr-sheet-list li span { color: var(--cr-muted); font-family: var(--cr-mono); font-size: 10px; margin-right: 6px; text-transform: uppercase; }

/* Navigation */
.cr-nav { grid-column: 2 / 3; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--cr-line); }
.cr-feedback { min-height: 1.3em; font-size: 15px; }

/* Recapitulatif */
.cr-recap dl { margin: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; font-size: 15px; }
.cr-recap dt { color: var(--cr-muted); }
.cr-recap dd { margin: 0; }

/* Cartes d'objets : actions compactes */
.cr-choice .cr-actions { gap: 6px; }
.cr-choice .cr-actions .cr-btn { padding: 5px 10px; font-size: 14px; }
.cr-x { font-size: 11px; letter-spacing: .06em; text-decoration: underline; text-underline-offset: 3px; }

/* Direction céleste — composants partagés par les sept étapes. */
:root {
  --cr-night: #0b1425;
  --cr-deep: #080f1b;
  --cr-panel: #101c2d;
  --cr-panel-2: #1b293a;
  --cr-line: #334253;
  --cr-muted: #a2adbb;
  --cr-soft: #c7cbd0;
}
* { box-sizing: border-box; }
body.creation { background: #0b1425; line-height: 1.5; color-scheme: dark; }
body.creation::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 85% 0%, #26426055, transparent 60%), radial-gradient(circle at 13% 22%, #c8b78480 0 1px, transparent 1.6px), radial-gradient(circle at 75% 69%, #a1c2df80 0 .8px, transparent 1.5px); background-size: auto, 253px 293px, 349px 331px; z-index: -1; }
.cr-page { max-width: 1680px; padding: 30px 36px 36px; grid-template-columns: 176px minmax(0, 1fr) 264px; gap: 0 30px; align-items: start; }
.cr-head { position: relative; isolation: isolate; padding: 8px 0 22px; margin-bottom: 26px; min-height: 118px; border-color: #c8b78455; }
.cr-head::before { content: ''; position: absolute; inset: -30px -36px 0 32%; z-index: -1; background: url('../assets/ascension/targon-night.png') center 58% / cover; opacity: .32; mask-image: linear-gradient(90deg, transparent, black 55%), linear-gradient(0deg, transparent, black 60%); mask-composite: intersect; }
.cr-title { font-size: clamp(34px, 3.1vw, 48px); font-weight: 500; line-height: 1.15; margin: 9px 0 6px; letter-spacing: .02em; }
.cr-kicker { font-size: 10px; color: var(--cr-gold); letter-spacing: .14em; }
.cr-identity { font-size: 18px; max-width: 58ch; }
.cr-draft { max-width: 290px; justify-content: flex-end; flex-wrap: wrap; gap: 10px 20px; text-align: right; line-height: 1.7; }
.cr-draft > span { width: 100%; }
.cr-link { color: var(--cr-soft); font-size: 10px; text-decoration-color: #c8b78466; }
.cr-link:hover { color: var(--cr-gold-bright); }
.cr-steps { top: 28px; gap: 0; padding: 4px 0 20px; }
.cr-steps li { position: relative; }
.cr-steps li:not(:last-child)::after { content: ''; position: absolute; left: 17px; top: 43px; bottom: -10px; width: 1px; background: linear-gradient(var(--cr-line), #c8b78440); }
.cr-step { grid-template-columns: 34px minmax(0, 1fr); padding: 12px 0 20px; gap: 12px; min-height: 76px; border: 0; }
.cr-step span { height: 34px; width: 34px; border-radius: 50%; font-size: 11px; background: var(--cr-night); z-index: 1; }
.cr-step strong { font-family: var(--cr-display); font-size: 17px; line-height: 1.15; }
.cr-step small { font-size: 13px; line-height: 1.3; margin-top: 6px; }
.cr-step.is-current { background: transparent; color: var(--cr-gold-bright); }
.cr-step.is-current span { box-shadow: 0 0 0 4px #c8b78415, 0 0 22px #c8b78415; }
.cr-step:disabled { opacity: .62; }
.cr-main { padding: 0 0 24px; gap: 26px; min-width: 0; }
.cr-section { padding: 0 0 16px; border-bottom: 1px solid #c8b78438; }
.cr-section h2 { font-size: clamp(32px, 2.7vw, 42px); font-weight: 500; line-height: 1.1; margin-bottom: 12px; }
.cr-lead { font-size: 17px; line-height: 1.6; margin: 0; }
.cr-card { padding: 24px; background: #101c2db8; border: 1px solid #33425399; }
.cr-card > h3 { font-size: 25px; line-height: 1.25; margin: 0 0 12px; font-weight: 500; }
.cr-card > .cr-note { margin-top: 0; margin-bottom: 20px; }
.cr-field.cr-card { background: transparent; padding: 0; border: 0; }
.cr-field label, .cr-label { font-size: 10px; color: #b7c2ce; letter-spacing: .1em; }
.cr-input { min-height: 48px; padding: 12px 15px; background: #0b1524; border-color: #536071; border-radius: 3px; font-size: 18px; transition: border-color .2s, box-shadow .2s; }
.cr-input::placeholder { color: #8593a4; }
.cr-input:focus { box-shadow: 0 0 0 3px #c8b78415; }
textarea.cr-input { min-height: 108px; }
.cr-map-wrap { grid-template-columns: minmax(0, 1.45fr) minmax(220px, 1fr); gap: 20px; }
.cr-map { border-color: #c8b78477; padding: 5px; outline: 1px solid #c8b78422; outline-offset: 4px; }
.cr-map img.cr-map-img { opacity: 1; }
.cr-crest { height: 40px; width: 40px; border-color: #77818a; transition: box-shadow .2s, background .2s; }
.cr-crest:hover { background: #24354a; box-shadow: 0 0 0 4px #c8b78433; z-index: 2; }
.cr-crest.is-origin { box-shadow: 0 0 0 4px #c8b78430, 0 0 20px #c8b78444; }
.cr-map-legend { font-size: 9px; left: 7px; bottom: 7px; gap: 8px; padding: 5px 7px; }
.cr-region-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; margin-top: 14px; }
.cr-region-option { display: grid; place-items: center; gap: 6px; padding: 10px 2px; border: 1px solid transparent; background: transparent; color: var(--cr-soft); font-size: 13px; }
.cr-region-option img { width: 30px; height: 30px; object-fit: contain; }
.cr-region-option[aria-pressed="true"] { border-color: var(--cr-gold); background: #c8b78412; color: var(--cr-ink); }
.cr-region-option:hover { background: #ffffff08; }
.cr-region { padding: 20px; border-color: #c8b78444; background: #101b2b; }
.cr-region.has-banner::before { display: none; }
.cr-region-art { display: block; width: calc(100% + 40px); max-width: none; height: 116px; object-fit: cover; margin: -20px -20px 20px; }
.cr-region h4 { font-size: 29px; font-weight: 500; }
.cr-region .cr-label { line-height: 1.7; font-size: 9px; }
.cr-region .cr-note { margin-top: 4px; font-size: 15px; }
.cr-passive { margin-top: 8px; padding-top: 12px; }
.cr-passive span { display: block; line-height: 1.5; margin-top: 3px; }
.cr-check { align-items: start; font-size: 15px; margin-top: 18px; }
.cr-check input { accent-color: var(--cr-gold); margin-top: 5px; flex: 0 0 auto; }
.cr-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.cr-card .cr-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr)); }
.cr-choice { padding: 22px; gap: 12px; background: #0d1726; border-color: #3c4b5d; transition: border-color .2s, background .2s, transform .2s; }
.cr-choice h4 { font-size: 25px; font-weight: 500; line-height: 1.2; }
.cr-choice p { font-size: 16px; line-height: 1.5; }
.cr-choice:hover:not(:disabled) { border-color: #c8b784aa; transform: translateY(-2px); }
.cr-choice.is-selected { border-color: var(--cr-gold); background: #242c33; box-shadow: inset 0 3px 0 var(--cr-gold); }
.cr-choice.is-selected::after { content: ''; position: absolute; right: 10px; top: 10px; width: 5px; height: 5px; background: var(--cr-gold-bright); transform: rotate(45deg); }
.cr-meta { font-size: 10px; line-height: 1.7; letter-spacing: .04em; }
.cr-tag { font-size: 10px; margin-bottom: 4px; }
.cr-chip { min-height: 40px; padding: 8px 14px; background: #0b1524; }
.cr-stats td { padding: 14px 8px; }
.cr-stats th { padding: 10px 8px; font-size: 10px; letter-spacing: .03em; }
.cr-stats td:first-child { font-size: 19px; }
.cr-stats .cr-stepper button { width: 36px; height: 36px; }
.cr-stats td.num { font-size: 16px; }
.cr-stats tbody tr:hover { background: #c8b78408; }
.cr-budget strong { font-size: 48px; font-weight: 500; }
.cr-btn { min-height: 44px; padding: 10px 18px; border-radius: 2px; background: #0b1524; font-size: 16px; }
.cr-btn.is-primary { background: linear-gradient(110deg, #d8c493, #b7a16e); border-color: #e3d3a2; color: #111b27; font-size: 19px; min-width: 170px; box-shadow: 0 4px 18px #0003; }
.cr-btn.is-primary:hover:not(:disabled) { background: #e3d3a2; }
.cr-align { grid-template-columns: minmax(0, 1fr) 200px; gap: 28px; }
.cr-align-grid { gap: 6px; }
.cr-align-grid div { min-height: 45px; display: grid; place-items: center; }
.cr-persona { gap: 12px; }
.cr-persona .cr-note { margin: 0; }
.cr-suggest button { padding: 10px; line-height: 1.45; border-left: 1px solid var(--cr-line); }
.cr-item-img { height: 112px; background: radial-gradient(ellipse, #263549, #0b1425 75%); margin: -8px -8px 4px; }
.cr-item-img img { max-height: 92px; }
.cr-tabs { gap: 10px; }
.cr-tabs button { padding: 12px 18px; }
.cr-sheet { top: 28px; padding: 24px 22px; gap: 22px; background: linear-gradient(145deg, #122034ec, #0b1425f5); border-color: #c8b78466; box-shadow: 0 12px 40px #0002; }
.cr-sheet::before, .cr-sheet::after { content: ''; position: absolute; width: 12px; height: 12px; border-color: var(--cr-gold); pointer-events: none; }
.cr-sheet::before { left: 5px; top: 5px; border-left: 1px solid; border-top: 1px solid; }
.cr-sheet::after { right: 5px; bottom: 5px; border-right: 1px solid; border-bottom: 1px solid; }
.cr-sheet-heading { text-align: center; padding-bottom: 20px; border-bottom: 1px solid #c8b78444; }
.cr-seal { display: block; width: 78px; height: 78px; margin: 20px auto 14px; stroke: var(--cr-gold); stroke-width: .75; }
.cr-sheet h3 { font-size: 28px; margin-bottom: 5px; overflow-wrap: anywhere; }
.cr-sheet .who { font-size: 15px; line-height: 1.4; }
.cr-sheet-stats { gap: 8px; }
.cr-sheet-stats div { border-color: #c8b78455; padding: 10px 2px; background: #080f1b66; border-radius: 3px; }
.cr-sheet-stats span { display: block; font-family: var(--cr-text); font-size: 26px; line-height: 1.2; margin: 3px 0; }
.cr-sheet-res { flex-wrap: wrap; gap: 8px 14px; font-size: 11px; padding-bottom: 16px; border-bottom: 1px solid var(--cr-line); }
.cr-sheet-list { gap: 8px; }
.cr-sheet .cr-label { margin-bottom: 8px; color: var(--cr-gold); }
.cr-nav { position: sticky; bottom: 0; z-index: 5; margin-top: 6px; padding: 18px 0; background: #0b1425f5; backdrop-filter: blur(14px); border-color: #c8b78455; }
.cr-nav-status { text-align: center; min-width: 0; }
.cr-progress { font-family: var(--cr-mono); font-size: 10px; letter-spacing: .08em; color: var(--cr-muted); }
.cr-feedback { min-height: 0; font-size: 14px; }
.cr-recap dl { font-size: 17px; gap: 12px 18px; }
.cr-main { animation: cr-enter .28s ease-out; }
@keyframes cr-enter { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (min-width: 1500px) { .cr-region-list { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 1190px) {
  .cr-page { grid-template-columns: 160px minmax(0, 1fr); padding: 24px; gap: 0 26px; }
  .cr-sheet { grid-column: 2; position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
  .cr-sheet-heading { grid-row: span 2; border-bottom: 0; border-right: 1px solid var(--cr-line); padding: 0 20px 0 0; }
  .cr-nav { grid-column: 2; grid-row: 3; }
  .cr-head::before { right: -24px; }
}
@media (max-width: 760px) {
  .cr-page { display: flex; flex-direction: column; padding: 18px; gap: 22px; }
  .cr-head { width: 100%; align-items: start; flex-direction: column; padding: 10px 0 22px; margin: 0; gap: 16px; }
  .cr-head::before { inset: -18px -18px 0 0; opacity: .2; }
  .cr-title { font-size: 34px; }
  .cr-draft { text-align: left; justify-content: flex-start; max-width: none; }
  .cr-draft > span { width: auto; }
  .cr-steps { display: flex; width: 100%; overflow-x: auto; position: static; padding: 4px 0 12px; gap: 12px; scrollbar-width: thin; }
  .cr-steps li { flex: 0 0 120px; }
  .cr-steps li::after { display: none; }
  .cr-step { display: flex; flex-direction: column; align-items: flex-start; min-height: 85px; padding: 0; gap: 10px; }
  .cr-step span { width: 30px; height: 30px; }
  .cr-step small { display: none; }
  .cr-step strong { font-size: 16px; }
  .cr-main { width: 100%; gap: 22px; padding: 0; }
  .cr-section h2 { font-size: 34px; }
  .cr-map-wrap { grid-template-columns: 1fr; }
  .cr-row { grid-template-columns: 1fr; }
  .cr-card { padding: 18px; }
  .cr-align { grid-template-columns: 1fr; }
  .cr-align-grid { max-width: 340px; margin: auto; }
  .cr-sheet { width: 100%; margin: 0; padding: 20px; gap: 18px; }
  .cr-nav { order: 4; width: calc(100% + 36px); margin: 0 -18px -18px; padding: 12px 18px; gap: 10px; flex-wrap: wrap; }
  .cr-nav-status { order: -1; flex-basis: 100%; }
  .cr-nav > .cr-btn { flex: 1; min-width: 0; font-size: 16px; padding: 10px; }
  .cr-stats { font-size: 14px; }
  .cr-stats th, .cr-stats td { padding: 10px 3px; }
  .cr-stats th { font-size: 8px; }
  .cr-stats td:first-child { font-size: 15px; }
  .cr-stats td.num { font-size: 13px; }
  .cr-stats .cr-stepper button { width: 28px; height: 36px; }
  .cr-stepper output { min-width: 24px; }
  .cr-recap dl { grid-template-columns: 110px minmax(0, 1fr); font-size: 15px; }
  .cr-slot { grid-template-columns: 80px minmax(0, 1fr) auto; gap: 6px; }
}
@media (max-width: 400px) { .cr-sheet { grid-template-columns: 1fr; } .cr-sheet-heading { border-right: 0; border-bottom: 1px solid var(--cr-line); padding: 0 0 18px; } }
@media (prefers-reduced-motion: reduce) { .cr-main { animation: none; } .cr-choice, .cr-crest, .cr-input { transition: none; } }

@media (max-width: 400px) { .cr-nav > .cr-btn { font-size: 14px; padding: 10px 6px; } }

/* Composition de la maquette : panorama, rail et grand cadre de création. */
:root { --cr-night: #06131e; --cr-deep: #04101a; --cr-panel: #081724; --cr-panel-2: #142331; --cr-line: #435059; --cr-soft: #c8c7be; --cr-muted: #9da8b1; }
body.creation { background: #06131e url('../assets/creation/celestial-ruins.png') center top / cover fixed no-repeat; }
body.creation::before { display: none; }
.cr-masthead { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 62px; padding: 10px 24px; border-bottom: 1px solid #c8b78466; background: #03101bb3; }
.cr-brand { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.cr-brand > span { font: 26px/1 var(--cr-display); color: #e5cd9c; white-space: nowrap; }
.cr-brand .cr-seal { width: 38px; height: 38px; margin: 0; }
.cr-brand small { padding-left: 20px; border-left: 1px solid #c8b78455; font-size: 14px; letter-spacing: .08em; }
.cr-draft { max-width: none; font-family: var(--cr-text); font-size: 13px; align-items: center; }
.cr-draft > span { width: auto; color: #b6bec7; }
.cr-draft .cr-link { font-family: var(--cr-text); font-size: 13px; letter-spacing: .02em; }
.cr-head { margin: 0; padding: 20px 24px; min-height: 102px; border: 0; }
.cr-head::before { display: none; }
.cr-title { margin: 0 0 6px; font-size: 38px; color: #e4c58d; font-weight: 500; }
.cr-identity { font-style: normal; font-size: 15px; letter-spacing: .06em; }
.cr-main { background: #04121ef2; padding: 20px 24px 24px; border: 1px solid #b79b615e; border-bottom: 0; border-radius: 14px 0 0 0; gap: 18px; }
.cr-section { border: 0; padding: 0; }
.cr-section h2 { font-size: 43px; margin: 0 0 6px; letter-spacing: .015em; }
.cr-lead { font-size: 16px; line-height: 1.45; }
.cr-field { gap: 6px; }
.cr-field > .cr-note:empty { display: none; }
.cr-input { background: #10202d88; border-color: #76808a; min-height: 44px; border-radius: 4px; font-size: 18px; padding: 9px 13px; }
.cr-field label { font-family: var(--cr-text); font-size: 13px; letter-spacing: .06em; color: #d2caba; }
.cr-map-wrap { grid-template-columns: minmax(0, 1.85fr) minmax(220px, .95fr); gap: 18px; }
.cr-map { padding: 6px; border-color: #b59a62; outline: 1px solid #b59a6244; outline-offset: -4px; background: #04101a; }
.cr-map::after { content: ''; position: absolute; inset: 10px; pointer-events: none; border: 1px solid #c8b78466; }
.cr-region-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 0; border: 1px solid #c8b78466; border-top: 0; background: #07131ef0; }
.cr-region-option { min-width: 0; border-right-color: #c8b7840e; padding: 12px 2px 10px; font-size: 12px; }
.cr-region-option img { width: 32px; height: 32px; }
.cr-region-option[aria-pressed="true"] { box-shadow: inset 0 0 12px #c8b78415; }
.cr-region { border-color: #b79b6188; padding: 14px 16px; background: #071521e8; }
.cr-region h4 { margin: 3px 0 12px; font-size: 27px; line-height: 1; }
.cr-region .cr-label { font-family: var(--cr-text); font-size: 11px; letter-spacing: .08em; }
.cr-region-art { width: calc(100% + 32px); margin: 0 -16px 14px; height: 118px; }
.cr-region .cr-note { font-style: normal; font-size: 14px; line-height: 1.45; }
.cr-passive { margin-top: 8px; padding: 10px 0 0; border-color: #c8b78433; }
.cr-passive strong { font-size: 16px; font-weight: 500; }
.cr-passive span { font-size: 14px; line-height: 1.4; }
.cr-bonus { margin: 10px 0; gap: 5px; }
.cr-bonus span { background: transparent; font-size: 10px; padding: 3px 6px; }
.cr-check { font-size: 14px; margin-top: 14px; }
.cr-sheet { background: #04121ef2; border-color: #b79b6177; border-left: 0; box-shadow: none; border-radius: 0 10px 0 0; gap: 18px; padding: 22px 18px; }
.cr-sheet .cr-kicker { font-family: var(--cr-text); font-size: 12px; letter-spacing: .1em; color: #c6c2b8; }
.cr-sheet-heading { padding-bottom: 16px; }
.cr-sheet .cr-seal { width: 82px; height: 82px; margin: 16px auto 10px; }
.cr-sheet h3 { font-family: var(--cr-text); font-size: 24px; font-weight: 500; }
.cr-sheet .who { font-size: 14px; }
.cr-sheet-stats div { padding: 9px 3px; border-color: #ad956b99; background: #040e1888; border-radius: 4px; }
.cr-sheet-stats b { font-family: var(--cr-text); font-size: 12px; color: #d3c7b1; }
.cr-sheet-stats span { font-size: 26px; margin: 0; }
.cr-sheet-stats small { font-size: 10px; }
.cr-sheet .cr-label { font-family: var(--cr-text); font-size: 12px; }
.cr-sheet-list { font-size: 14px; gap: 6px; }
.cr-sheet-list li span { display: block; font-size: 9px; }
.cr-nav { background: #04121ef5; border: 1px solid #b79b615e; border-top: 0; padding: 16px 24px 20px; margin: 0; }
.cr-nav .cr-btn { border-color: #6d777f; }
.cr-btn.is-primary { background: linear-gradient(#e2c88e, #bba06a); border-color: #d7ba7d; min-height: 44px; padding: 9px 26px; font-family: var(--cr-text); font-size: 18px; }
.cr-steps { top: 24px; padding: 22px 22px 340px; background: linear-gradient(#03101b99 0%, #03101b55 50%, transparent 95%); }
.cr-step { min-height: 64px; grid-template-columns: 29px minmax(0, 1fr); padding: 9px 0 20px; gap: 10px; }
.cr-step span { width: 29px; height: 29px; font-family: var(--cr-text); font-size: 14px; }
.cr-step strong { font-size: 15px; font-weight: 500; }
.cr-step small { display: none; }
.cr-steps li:not(:last-child)::after { left: 14px; top: 37px; bottom: -10px; background: #c8b78477; }
.cr-step:disabled { opacity: .75; }
.cr-card { background: #0a192699; border-color: #c8b78433; }
.cr-choice { background: #07131e; border-color: #53606a; }
.cr-choice.is-selected { background: #c8b78412; border-color: #d4bd8a; }
@media (min-width: 961px) {
  .cr-page { max-width: 1800px; padding: 0; grid-template-columns: 185px minmax(0, 1fr) 230px; grid-template-rows: auto auto 1fr auto; gap: 0; }
  .cr-masthead { grid-row: 1; }
  .cr-head { grid-column: 2 / -1; grid-row: 2; }
  .cr-steps { grid-column: 1; grid-row: 2 / 5; }
  .cr-main { grid-column: 2; grid-row: 3; }
  .cr-sheet { grid-column: 3; grid-row: 3 / 5; position: sticky; top: 18px; margin: 0; display: grid; grid-template-columns: 1fr; }
  .cr-sheet-heading { grid-row: auto; border-right: 0; border-bottom: 1px solid #c8b78444; padding: 0 0 16px; }
  .cr-nav { grid-column: 2; grid-row: 4; }
}
@media (min-width: 1400px) {
  .cr-page { grid-template-columns: 225px minmax(0, 1fr) 250px; }
  .cr-steps { padding-inline: 32px; }
  .cr-region-list { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .cr-map-wrap { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
}
@media (min-width: 961px) and (max-width: 1150px) {
  .cr-page { grid-template-columns: 150px minmax(0, 1fr) 210px; }
  .cr-steps { padding-inline: 15px; }
  .cr-step strong { font-size: 13px; }
  .cr-main { padding: 18px; }
  .cr-map-wrap { grid-template-columns: 1fr; }
  .cr-map-wrap > div:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-brand small { display: none; }
}
@media (max-width: 960px) {
  .cr-page { display: flex; flex-direction: column; padding: 0 18px 18px; gap: 0; }
  .cr-masthead { width: calc(100% + 36px); margin: 0 -18px; padding: 12px 18px; flex-wrap: wrap; gap: 12px; }
  .cr-brand { gap: 12px; }
  .cr-brand > span { font-size: 23px; }
  .cr-brand small { display: none; }
  .cr-draft { text-align: left; justify-content: flex-start; gap: 5px 16px; }
  .cr-draft > span { width: 100%; }
  .cr-head { padding: 22px 4px; width: 100%; }
  .cr-title { font-size: 34px; }
  .cr-steps { display: flex; position: static; width: 100%; overflow-x: auto; padding: 8px 0 20px; gap: 18px; background: none; }
  .cr-steps li { flex: 0 0 112px; }
  .cr-steps li::after { display: none; }
  .cr-step { display: flex; flex-direction: column; align-items: flex-start; padding: 0; min-height: 70px; }
  .cr-main { width: 100%; padding: 20px 16px; border-radius: 10px 10px 0 0; }
  .cr-section h2 { font-size: 35px; }
  .cr-map-wrap { grid-template-columns: minmax(0, 1fr); }
  .cr-sheet { width: 100%; margin: 20px 0; border: 1px solid #b79b6177; border-radius: 4px; position: static; }
  .cr-nav { order: 4; width: 100%; margin: 0; padding: 12px; border-top: 1px solid #b79b615e; }
  .cr-nav .cr-btn { padding: 10px; min-width: 0; font-size: 16px; }
  .cr-region-art { height: 145px; }
}
@media (max-width: 600px) {
  .cr-map-wrap { grid-template-columns: minmax(0, 1fr); }
  .cr-region-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cr-nav .cr-btn { font-size: 14px; }
  .cr-brand .cr-seal { width: 30px; height: 30px; }
  .cr-draft > span { font-size: 12px; }
  .cr-sheet { grid-template-columns: 1fr; }
  .cr-sheet-heading { border-right: 0; }
  .cr-sheet-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .cr-sheet-stats b { font-size: 10px; }
  .cr-sheet-stats span { font-size: 22px; }
}

/* Même mannequin et mêmes emplacements que l’inventaire de la fiche. */
.cr-equipment-layout { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.cr-equipment-layout .cr-loadout { padding: 16px; min-width: 0; }
.cr-equipment-layout .cr-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.cr-mannequin { position: relative; height: 520px; isolation: isolate; margin: 12px -8px; border: 1px solid #b79b6144; border-radius: 6px; background: radial-gradient(ellipse, #28364c99, #07121eee 75%); }
.cr-character-silhouette { position: absolute; width: 100%; height: 100%; object-fit: contain; opacity: .7; pointer-events: none; z-index: -1; }
.cr-equipment-slot { position: absolute; width: 60px; height: 64px; padding: 3px; transform: translateX(-50%); background: #080e1cde; border: 1px solid #af9567; border-radius: 4px; color: #d4c9b4; cursor: pointer; font: 10px/1.15 var(--cr-text); }
.cr-equipment-slot img { width: 100%; height: 100%; object-fit: contain; }
.cr-equipment-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 1px; background: #06111aed; }
.cr-slot-mark { display: block; margin-bottom: 12px; color: #ab956370; font-size: 24px; }
.cr-equipment-slot:disabled { cursor: default; border-style: dashed; color: #a5a7aa; }
.cr-equipment-slot.is-equipped { border-color: #e3c184; box-shadow: inset 0 0 14px #c8b78422; }
.cr-equipment-slot:not(:disabled):hover, .cr-equipment-slot:focus-visible { outline: 2px solid #e3c184; outline-offset: 3px; z-index: 3; }
.cr-equipment-name { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 115px; padding: 5px; background: #06111a; border: 1px solid #b79b6177; opacity: 0; pointer-events: none; }
.cr-equipment-slot:hover .cr-equipment-name, .cr-equipment-slot:focus-visible .cr-equipment-name { opacity: 1; }
.cr-equipment-slot[data-equipment-slot="head"] { left: 50%; top: 16px; }
.cr-equipment-slot[data-equipment-slot="shoulders"] { left: 16%; top: 90px; }
.cr-equipment-slot[data-equipment-slot="amulet"] { left: 84%; top: 90px; }
.cr-equipment-slot[data-equipment-slot="chest"] { left: 50%; top: 120px; }
.cr-equipment-slot[data-equipment-slot="gloves"] { left: 16%; top: 200px; }
.cr-equipment-slot[data-equipment-slot="ringLeft"] { left: 60%; top: 200px; width: 48px; }
.cr-equipment-slot[data-equipment-slot="ringRight"] { left: 84%; top: 200px; width: 48px; }
.cr-equipment-slot[data-equipment-slot="weaponMain"] { left: 16%; top: 290px; }
.cr-equipment-slot[data-equipment-slot="weaponOff"] { left: 84%; top: 290px; }
.cr-equipment-slot[data-equipment-slot="legs"] { left: 50%; top: 355px; }
.cr-equipment-slot[data-equipment-slot="boots"] { left: 50%; top: 440px; }
@media (max-width: 1200px) {
  .cr-equipment-layout { grid-template-columns: minmax(0, 1fr); }
  .cr-equipment-layout .cr-loadout { width: 100%; max-width: 400px; justify-self: center; }
}
@media (max-width: 400px) {
  .cr-equipment-slot { width: 52px; }
  .cr-equipment-slot[data-equipment-slot="ringLeft"], .cr-equipment-slot[data-equipment-slot="ringRight"] { width: 42px; }
}

/* Choix de départ dans le ciel de l’Ascension. */
.cr-tree-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cr-starter-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; align-items: start; }
.cr-starmap-card { min-width: 0; border: 1px solid #b79b6166; background: #071420; }
.cr-tree-controls { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid #b79b6133; }
.cr-tree-controls > span { flex: 1; font-size: 14px; color: #c4b88f; }
.cr-tree-controls button { width: 32px; height: 32px; border: 1px solid #b79b6177; background: #0d1d2c; color: #e2c78e; cursor: pointer; font-size: 20px; }
.cr-tree-controls button:disabled { opacity: .35; cursor: default; }
.cr-tree-controls output { font: 11px var(--cr-mono); }
.cr-tree-viewport { overflow: auto; height: 460px; cursor: grab; overscroll-behavior: contain; scrollbar-color: #9d895b #0b1828; background: radial-gradient(ellipse at 45% 65%, #20334b88, transparent 70%), url('../assets/creation/celestial-ruins.png') center top / cover; }
.cr-tree-viewport:active { cursor: grabbing; }
.cr-tree-world { position: relative; transform-origin: 0 0; user-select: none; background: #07132155; }
.cr-tree-world > svg { position: absolute; inset: 0; pointer-events: none; }
.cr-tree-links path { fill: none; stroke: #95adcc88; stroke-width: 1.5; }
.cr-tree-links .cr-tree-future { stroke-dasharray: 4 9; opacity: .35; }
.cr-tree-root { fill: #dfc58c; stroke: #f4e4b6; stroke-width: 3; }
.cr-tree-branch { fill: #cbb88b; font: 20px var(--cr-text); letter-spacing: .04em; }
.cr-tree-node { position: absolute; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid #8aa3be; background: #0a1829; color: #a9c9e5; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 20px #769cc422; }
.cr-tree-node > svg { width: 32px; height: 32px; }
.cr-tree-node:hover, .cr-tree-node.is-focused { outline: 1px solid #d9d3bc; outline-offset: 7px; }
.cr-tree-node.is-chosen { color: #ead390; border-color: #ead390; background: #312e24; box-shadow: 0 0 24px #e2c78e44; }
.cr-tree-node:focus-visible, .cr-tree-controls button:focus-visible { outline: 3px solid #eed9a4; outline-offset: 5px; }
.cr-tree-badge { position: absolute; bottom: -9px; right: -5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #d8bf83; color: #081321; font: 12px var(--cr-mono); }
.cr-tree-recommended { position: absolute; top: -4px; right: 0; width: 8px; height: 8px; border-radius: 50%; background: #d8bf83; }
.cr-tree-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px; font-size: 13px; color: #b3c4d4; }
.cr-tree-legend span { display: flex; gap: 6px; align-items: center; }
.cr-tree-legend svg { width: 20px; height: 20px; }
.cr-starmap-card > .cr-note { padding: 0 12px 12px; margin: 0; font-size: 12px; }
.cr-tree-detail { padding: 20px 16px; background: #071420; border: 1px solid #b79b6166; min-width: 0; }
.cr-tree-detail-icon svg { width: 46px; height: 46px; color: #dfc58c; margin-bottom: 16px; }
.cr-tree-detail h3 { margin: 12px 0; font-size: 26px; }
.cr-tree-detail p { font: 16px/1.5 var(--cr-text); color: #c6cbd1; }
.cr-tree-detail .cr-btn { white-space: normal; width: 100%; margin-top: 20px; font-size: 16px; padding: 10px; }
.cr-tree-loadout { display: grid; gap: 10px; border-top: 1px solid #b79b6144; margin-top: 22px; padding-top: 18px; }
.cr-tree-loadout > div { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.cr-tree-loadout kbd { flex-shrink: 0; border: 1px solid #b79b6177; border-radius: 3px; padding: 6px 9px; color: #e2c78e; }
@media (max-width: 1200px) { .cr-starter-layout { grid-template-columns: minmax(0, 1fr); } .cr-tree-loadout { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cr-tree-viewport { height: 360px; } .cr-tree-controls { gap: 8px; } .cr-tree-loadout { grid-template-columns: 1fr; } }

.cr-tree-node.is-future { border-style: dashed; color: #8ca1b8; }
.cr-tree-node.is-future .cr-tree-badge { background: #18283b; color: #a8b9ca; border: 1px solid #687c94; }

/* Étape dédiée aux armes : catalogue compact et fiche de lecture. */
.cr-weapon-stages { display: flex; border-bottom: 1px solid var(--cr-line); gap: 20px; }
.cr-weapon-stages button { display: flex; align-items: center; gap: 10px; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; font: 17px var(--cr-text); text-align: left; }
.cr-weapon-stages button > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--cr-line); border-radius: 50%; font: 12px var(--cr-mono); }
.cr-weapon-stages button[aria-pressed="true"] { border-bottom-color: var(--cr-gold); color: var(--cr-gold); }
.cr-weapon-stages button[aria-pressed="true"] > span { background: var(--cr-gold); color: var(--cr-night); }
.cr-weapon-stages small { font: 11px var(--cr-mono); white-space: nowrap; }
.cr-weapon-intro h3 { margin: 0 0 8px; font: 25px var(--cr-display); }
.cr-weapon-intro p { margin: 0; max-width: 72ch; color: var(--cr-soft); font-size: 16px; line-height: 1.5; }
.cr-weapon-selection { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.cr-weapon-slot { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px dashed var(--cr-line); background: transparent; font: 16px var(--cr-text); text-align: left; color: var(--cr-muted); }
.cr-weapon-slot.is-filled { border: 1px solid var(--cr-gold); color: var(--cr-gold); background: #c8b7840b; }
.cr-weapon-slot > span:last-child { font-size: 13px; }
.cr-weapon-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-weapon-filters .cr-chip { font-size: 14px; padding: 7px 13px; }
.cr-weapon-browser { display: grid; grid-template-columns: minmax(190px,.9fr) minmax(260px,1.25fr); border: 1px solid var(--cr-line); align-items: stretch; }
.cr-weapon-list { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #9d895b #0b1828; padding: 8px; }
.cr-weapon-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 65px; border: 1px solid transparent; border-bottom-color: #c8b78425; background: transparent; padding: 10px; text-align: left; font: 16px var(--cr-text); }
.cr-weapon-row strong { display: block; font-weight: 500; }
.cr-weapon-row small { display: block; margin-top: 5px; font-size: 12px; color: var(--cr-muted); }
.cr-weapon-row.is-focused { border-color: var(--cr-gold); background: #c8b78410; }
.cr-weapon-state { flex-shrink: 0; color: var(--cr-gold); font-size: 11px; }
.cr-weapon-detail { padding: 22px; background: #0e1d29; border-left: 1px solid var(--cr-line); min-width: 0; }
.cr-weapon-detail h3 { margin: 10px 0 16px; font: 31px/1.15 var(--cr-display); }
.cr-weapon-rolls { margin: 0 0 16px; }
.cr-weapon-rolls > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #c8b78425; }
.cr-weapon-rolls dt { font-size: 13px; color: var(--cr-soft); }
.cr-weapon-rolls dd { margin: 0; text-align: right; font: 13px var(--cr-mono); }
.cr-weapon-rolls small { display: block; margin-top: 4px; color: var(--cr-muted); font: 11px var(--cr-text); }
.cr-weapon-effect h4 { margin: 0 0 8px; font-size: 16px; color: var(--cr-gold); font-weight: 500; }
.cr-weapon-effect p { margin: 0 0 12px; color: var(--cr-soft); font-size: 15px; line-height: 1.5; }
.cr-weapon-detail .cr-btn { width: 100%; margin-top: 8px; }
.cr-weapon-simple summary { cursor: pointer; color: var(--cr-gold); font-size: 15px; }
.cr-weapon-simple p { color: var(--cr-soft); line-height: 1.6; font-size: 14px; }
.cr-sheet-weapons p { margin: 6px 0 14px; font-size: 14px; line-height: 1.5; }
.cr-weapon-browser:has(.cr-weapon-list:only-child) { grid-template-columns: 1fr; }
@media (max-width: 680px) {
  .cr-weapon-browser { grid-template-columns: minmax(0,1fr); }
  .cr-weapon-list { max-height: 235px; }
  .cr-weapon-detail { border-left: 0; border-top: 1px solid var(--cr-line); padding: 18px; }
  .cr-weapon-stages { gap: 12px; }
  .cr-weapon-stages button { flex: 1; flex-wrap: wrap; gap: 7px; font-size: 14px; }
  .cr-weapon-stages strong { font-weight: 500; }
  .cr-weapon-selection { gap: 8px; }
  .cr-weapon-slot { padding: 10px; font-size: 14px; }
  .cr-weapon-slot:not(.is-filled) > span:last-child { display: none; }
}
