/* Classes et races : création du personnage (cc-*), codex (cx-*), admin (ac-*).
   Uniquement des variables --hn-* : suit les thèmes hiru (clair) et yozakura (sombre).
   La teinte d'un emblème (--emblem-tint) vient de emblems.css via data-emblem. */

/* ───────────── pastilles communes ───────────── */
.cc-chips { display: flex; flex-wrap: wrap; gap: var(--hn-space-1); }
.cc-chip {
  display: inline-flex; align-items: center; gap: .25em; padding: .125rem .5rem;
  border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-full);
  background: var(--hn-color-surface); color: var(--hn-color-text-muted);
  font-size: var(--hn-text-xs); font-weight: var(--hn-weight-medium); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cc-chip--up { border-color: var(--hn-color-success-border); background: var(--hn-color-success-soft); color: var(--hn-color-success-text); }
.cc-chip--up::before { content: "▲"; font-size: .7em; }
.cc-chip--down { border-color: var(--hn-color-danger-border); background: var(--hn-color-danger-soft); color: var(--hn-color-danger-text); }
.cc-chip--down::before { content: "▼"; font-size: .7em; }

/* Emblème « fantôme » : un joueur sans peuple ni voie. */
.cc-ghost {
  display: inline-block; width: 3.5rem; height: 3.5rem; flex: none;
  border: 2px dashed var(--hn-color-border-strong); background: var(--hn-color-surface-sunken);
}
.cc-ghost--round { border-radius: var(--hn-radius-full); }
.cc-ghost--petal { border-radius: 30% 30% 30% 0; }

/* ───────────── création : en-tête ───────────── */
.cc-hero {
  position: relative; overflow: hidden; display: grid; gap: var(--hn-space-6);
  padding: var(--hn-space-8) var(--hn-space-6) var(--hn-space-6);
  border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-2xl);
  background:
    radial-gradient(60% 120% at 100% 0%, var(--hn-color-primary-soft), transparent 70%),
    radial-gradient(50% 100% at 0% 100%, var(--hn-color-accent-soft), transparent 70%),
    var(--hn-color-surface);
}
.cc-hero__text { --hn-stack-gap: var(--hn-space-3); max-width: 62ch; position: relative; }
.cc-steps { position: relative; }
/* Les quinze emblèmes en couronne, à droite du titre (décor : masqué sur petit écran). */
.cc-hero__art {
  position: absolute; inset-block: 0; inset-inline-end: var(--hn-space-6); width: min(38%, 24rem);
  display: grid; grid-template-columns: repeat(4, 1fr); align-content: center; justify-items: center;
  gap: var(--hn-space-1) var(--hn-space-3); padding-block: var(--hn-space-8) var(--hn-space-12);
  pointer-events: none;
}
.cc-hero__emblem { --emblem-size: clamp(2.75rem, 4.4vw, 4rem); }
.cc-hero__emblem:nth-child(even) { transform: translateY(45%); }
.cc-hero h1 { margin: 0; }
.cc-hero .hn-lead { margin: 0; }
.cc-steps { max-width: 40rem; }
.cc-steps .hn-step__label { text-decoration: none; }
.cc-steps .hn-step__label:hover { color: var(--hn-color-link-hover); }
.cc-rule { display: flex; gap: var(--hn-space-2); align-items: flex-start; margin: 0; color: var(--hn-color-text-muted); font-size: var(--hn-text-sm); }
.cc-rule hn-icon { flex: none; margin-top: .15em; color: var(--hn-color-info); }

/* ───────────── création : étapes et cartes ───────────── */
.cc-form { display: grid; gap: var(--hn-space-10); }
.cc-step { margin: 0; padding: 0; border: 0; min-width: 0; scroll-margin-top: var(--hn-space-16); }
.cc-step__legend { display: flex; gap: var(--hn-space-3); align-items: center; padding: 0; margin-bottom: var(--hn-space-5); }
.cc-step__legend > span:last-child { display: grid; gap: var(--hn-space-1); }
.cc-step__legend .hn-h3 { margin: 0; }
.cc-step__hint { color: var(--hn-color-text-muted); font-size: var(--hn-text-sm); }
.cc-step__n {
  display: inline-grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem;
  border-radius: var(--hn-radius-full); background: var(--hn-color-primary); color: var(--hn-color-on-primary);
  font-family: var(--hn-font-display); font-size: var(--hn-text-lg); font-weight: var(--hn-weight-bold);
}

.cc-grid { display: grid; gap: var(--hn-space-4); }
.cc-grid--races, .cc-grid--classes { grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); }

.cc-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-xl);
  background: var(--hn-color-surface);
  box-shadow: var(--hn-shadow-xs);
  transition: border-color var(--hn-duration-fast) var(--hn-ease-standard),
              box-shadow var(--hn-duration-normal) var(--hn-ease-standard),
              transform var(--hn-duration-normal) var(--hn-ease-bloom);
}
.cc-card:hover { border-color: color-mix(in oklch, var(--emblem-tint) 55%, var(--hn-color-border)); box-shadow: var(--hn-shadow-md); }
.cc-card:has(.cc-card__input:checked) {
  border-color: var(--emblem-tint);
  box-shadow: 0 0 0 2px var(--emblem-tint), var(--hn-shadow-lg);
  background: linear-gradient(180deg, color-mix(in oklch, var(--emblem-tint) 14%, var(--hn-color-surface)), var(--hn-color-surface) 55%);
}
.cc-card:has(.cc-card__input:focus-visible) { outline: none; box-shadow: var(--hn-focus-ring), var(--hn-shadow-md); }

.cc-card__pick {
  flex: 1; display: grid; justify-items: center; align-content: start; gap: var(--hn-space-2);
  padding: var(--hn-space-5) var(--hn-space-4) var(--hn-space-3); text-align: center; cursor: pointer;
}
/* Le bouton radio reste accessible (clavier, lecteur d'écran) mais la carte entière le représente. */
.cc-card__input { position: absolute; inset-block-start: var(--hn-space-3); inset-inline-start: var(--hn-space-3); width: 1.1rem; height: 1.1rem; margin: 0; opacity: 0; }
.cc-card__mark {
  position: absolute; inset-block-start: var(--hn-space-3); inset-inline-end: var(--hn-space-3);
  display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem;
  border: 2px solid var(--hn-color-border-strong); border-radius: var(--hn-radius-full);
  background: var(--hn-color-surface); color: transparent;
  transition: background-color var(--hn-duration-fast), border-color var(--hn-duration-fast), color var(--hn-duration-fast);
}
.cc-card__mark hn-icon { width: 1rem; height: 1rem; }
.cc-card:has(.cc-card__input:checked) .cc-card__mark { border-color: var(--emblem-tint); background: var(--emblem-tint); color: var(--hn-white); }

.cc-card__emblem { --emblem-size: 6.5rem; margin-block: var(--hn-space-2) var(--hn-space-1); transition: transform var(--hn-duration-slow) var(--hn-ease-bloom); }
.cc-card--class .cc-card__emblem { --emblem-size: 7rem; }
.cc-card:hover .cc-card__emblem, .cc-card:has(.cc-card__input:checked) .cc-card__emblem { transform: scale(1.06) rotate(-2deg); }
.cc-card__name { font-family: var(--hn-font-display); font-size: var(--hn-text-xl); font-weight: var(--hn-weight-bold); line-height: var(--hn-leading-tight); }
.cc-card__role {
  padding: .125rem .625rem; border-radius: var(--hn-radius-full);
  background: color-mix(in oklch, var(--emblem-tint) 16%, transparent); color: var(--hn-color-text);
  font-size: var(--hn-text-xs); font-weight: var(--hn-weight-bold);
}
.cc-card__flavor { color: var(--hn-color-text-muted); font-size: var(--hn-text-sm); font-style: italic; line-height: var(--hn-leading-snug); }
.cc-card .cc-chips { justify-content: center; }
.cc-resource { font-size: var(--hn-text-xs); color: var(--hn-color-text-muted); }
.cc-resource strong { color: var(--hn-color-text); }
.cc-trait {
  display: grid; gap: .125rem; width: 100%; margin-top: var(--hn-space-1); padding: var(--hn-space-2) var(--hn-space-3);
  border-radius: var(--hn-radius-md); background: var(--hn-color-bg-subtle);
  font-size: var(--hn-text-xs); line-height: var(--hn-leading-snug); text-align: start;
}
.cc-trait strong { font-size: var(--hn-text-sm); }
.cc-card__more { align-self: center; margin: 0 0 var(--hn-space-3); font-size: var(--hn-text-xs); }

.cc-skills { margin: 0 var(--hn-space-4) var(--hn-space-2); border-top: 1px solid var(--hn-color-border); }
.cc-skills > summary { padding: var(--hn-space-2) 0; cursor: pointer; font-size: var(--hn-text-sm); font-weight: var(--hn-weight-bold); color: var(--hn-color-link); }
.cc-skills > summary:focus-visible { outline: none; box-shadow: var(--hn-focus-ring); border-radius: var(--hn-radius-sm); }
.cc-skills__list { display: grid; gap: var(--hn-space-2); margin: 0 0 var(--hn-space-2); padding: 0; list-style: none; }
.cc-skills__list li { display: grid; gap: .125rem; font-size: var(--hn-text-xs); line-height: var(--hn-leading-snug); }
.cc-skills__head { display: flex; justify-content: space-between; gap: var(--hn-space-2); font-size: var(--hn-text-sm); }
.cc-skills__lvl { flex: none; color: var(--hn-color-text-muted); font-size: var(--hn-text-xs); }
.cc-skills__text { color: var(--hn-color-text-muted); }
.cc-skills__item--ultimate .cc-skills__head strong { color: var(--hn-color-primary-text); }
.cc-skills__play { margin: 0 0 var(--hn-space-2); padding-top: var(--hn-space-2); border-top: 1px dashed var(--hn-color-border); font-size: var(--hn-text-xs); line-height: var(--hn-leading-relaxed); }

.cc-next { display: flex; justify-content: center; }

/* ───────────── création : récapitulatif ───────────── */
.cc-recap { scroll-margin-top: var(--hn-space-8); }
.cc-recap[aria-busy="true"] { opacity: .6; transition: opacity var(--hn-duration-fast); }
.cc-recap__empty {
  display: grid; justify-items: center; gap: var(--hn-space-2); padding: var(--hn-space-10) var(--hn-space-6);
  border: 2px dashed var(--hn-color-border); border-radius: var(--hn-radius-2xl); text-align: center;
}
.cc-recap__empty p { margin: 0; max-width: 52ch; }
.cc-recap__empty-icons { display: flex; gap: var(--hn-space-3); margin-bottom: var(--hn-space-2); }
.cc-recap__card { overflow: hidden; }
.cc-recap__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--hn-space-6);
  padding: var(--hn-space-6); border-bottom: 1px solid var(--hn-color-border);
  background:
    radial-gradient(70% 140% at 0% 50%, var(--hn-color-primary-soft), transparent 70%),
    var(--hn-color-surface-raised);
}
.cc-recap__duo { display: flex; align-items: center; }
.cc-recap__duo .emblem { --emblem-size: clamp(5.5rem, 22vw, 8rem); }
.cc-recap__duo .emblem + .emblem { margin-inline-start: calc(var(--emblem-size) * -.18); }
.cc-recap__title { display: grid; gap: var(--hn-space-1); min-width: 0; }
.cc-recap__title > * { margin: 0; }
.cc-recap__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hn-space-6); padding: var(--hn-space-6); }
.cc-recap__block { display: grid; gap: var(--hn-space-3); align-content: start; min-width: 0; }
.cc-recap__block > h3 { margin: 0; }
.cc-recap__block--wide { grid-column: 1 / -1; }
.cc-stats th[scope="row"] { background: none; color: var(--hn-color-text); font-size: var(--hn-text-sm); font-weight: var(--hn-weight-medium); letter-spacing: normal; text-transform: none; }
.cc-delta { display: inline-flex; align-items: center; gap: .125rem; font-weight: var(--hn-weight-bold); white-space: nowrap; }
.cc-delta hn-icon { width: .9rem; height: .9rem; }
.cc-delta--up { color: var(--hn-color-success-text); }
.cc-delta--down { color: var(--hn-color-danger-text); }
.cc-traits { display: grid; gap: var(--hn-space-3); margin: 0; }
.cc-traits dt { font-weight: var(--hn-weight-bold); }
.cc-traits dd { margin: .125rem 0 0; color: var(--hn-color-text-muted); font-size: var(--hn-text-sm); line-height: var(--hn-leading-snug); }
.cc-bar { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--hn-space-3); margin: 0; padding: 0; list-style: none; }
.cc-bar__skill {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--hn-space-3); align-items: start;
  padding: var(--hn-space-3); border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-lg); background: var(--hn-color-surface-raised);
}
.cc-bar__skill--ultimate { border-color: var(--hn-color-primary-border); background: var(--hn-color-primary-soft); }
.cc-bar__key {
  display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: var(--hn-radius-full);
  background: var(--hn-color-primary-soft); color: var(--hn-color-primary-text); font-weight: var(--hn-weight-bold); font-size: var(--hn-text-sm);
}
.cc-bar__skill--ultimate .cc-bar__key { background: var(--hn-color-primary); color: var(--hn-color-on-primary); }
.cc-bar__main { display: grid; gap: .25rem; min-width: 0; }
.cc-bar__name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hn-space-2); }
.cc-bar__cost { color: var(--hn-color-text-muted); font-size: var(--hn-text-xs); }
.cc-bar__text { font-size: var(--hn-text-sm); line-height: var(--hn-leading-snug); overflow-wrap: anywhere; }
.cc-confirm { display: grid; gap: var(--hn-space-3); padding: var(--hn-space-5) var(--hn-space-6); border-top: 1px solid var(--hn-color-border); background: var(--hn-color-bg-subtle); }
.cc-confirm__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--hn-space-4); }
.cc-price { display: flex; align-items: center; gap: var(--hn-space-2); margin: 0; font-weight: var(--hn-weight-medium); }
.cc-price--free { color: var(--hn-color-success-text); }

/* Barre fixe (JavaScript) : le choix en cours, sur mobile. */
.cc-dock {
  position: sticky; bottom: var(--hn-space-3); z-index: var(--hn-z-sticky);
  display: flex; align-items: center; justify-content: space-between; gap: var(--hn-space-3);
  margin-inline: auto; width: min(100%, 36rem); padding: var(--hn-space-2) var(--hn-space-2) var(--hn-space-2) var(--hn-space-4);
  border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-full);
  background: var(--hn-color-surface-overlay); box-shadow: var(--hn-shadow-lg); backdrop-filter: blur(8px);
}
.cc-dock[hidden] { display: none; }
.cc-dock__picks { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--hn-text-sm); font-weight: var(--hn-weight-medium); }

/* ───────────── fiche personnage, profil, accueil ───────────── */
.cc-identity__body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hn-space-5); }
.cc-identity__emblems { display: flex; gap: var(--hn-space-2); }
.cc-identity__text { flex: 1 1 16rem; display: grid; gap: var(--hn-space-1); min-width: 0; }
.cc-identity__text > * { margin: 0; }
.cc-identity--todo { border-color: var(--hn-color-primary-border); background: linear-gradient(110deg, var(--hn-color-primary-soft), var(--hn-color-surface) 60%); }
.cc-player-line { display: flex; flex-wrap: wrap; gap: var(--hn-space-4); margin: 0 0 var(--hn-space-2); }
.cc-player-line__item { display: inline-flex; align-items: center; gap: var(--hn-space-2); color: var(--hn-color-text); font-weight: var(--hn-weight-medium); text-decoration: none; }
.cc-player-line__item:hover { color: var(--hn-color-link-hover); text-decoration: underline; }
.cc-prompt__body { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--hn-space-3); }

/* ───────────── codex ───────────── */
.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: var(--hn-space-4); margin: 0; padding: 0; list-style: none; }
.cx-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--hn-space-4); align-items: start;
  padding: var(--hn-space-5); border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-xl); background: var(--hn-color-surface);
  transition: border-color var(--hn-duration-fast), box-shadow var(--hn-duration-normal);
}
.cx-card:hover, .cx-card:focus-within { border-color: var(--emblem-tint); box-shadow: var(--hn-shadow-md); }
.cx-card__emblem { --emblem-size: 5rem; }
.cx-card__body { display: grid; gap: var(--hn-space-2); min-width: 0; }
.cx-card__body > * { margin: 0; }
.cx-card__link { color: var(--hn-color-text); text-decoration: none; }
.cx-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cx-card__link:focus-visible { outline: none; }
.cx-card:has(.cx-card__link:focus-visible) { box-shadow: var(--hn-focus-ring); }
.cx-card__role { font-size: var(--hn-text-sm); font-weight: var(--hn-weight-bold); color: var(--hn-color-text-muted); }
.cx-card__flavor { font-size: var(--hn-text-sm); font-style: italic; color: var(--hn-color-text-muted); line-height: var(--hn-leading-snug); }
.cx-card__meta { display: flex; flex-wrap: wrap; gap: var(--hn-space-1) var(--hn-space-3); font-size: var(--hn-text-xs); color: var(--hn-color-text-muted); }
.cx-card__trait { font-size: var(--hn-text-sm); line-height: var(--hn-leading-snug); }
.cx-card__pop { font-size: var(--hn-text-xs); color: var(--hn-color-text-subtle); font-variant-numeric: tabular-nums; }

.cx-hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--hn-space-8);
  padding: var(--hn-space-8) var(--hn-space-6); border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-2xl);
  background:
    radial-gradient(45% 110% at 12% 50%, color-mix(in oklch, var(--emblem-tint) 22%, transparent), transparent 75%),
    var(--hn-color-surface);
}
.cx-hero__text { --hn-stack-gap: var(--hn-space-2); flex: 1 1 22rem; min-width: 0; }
.cx-hero__text > p, .cx-hero__text > h1 { margin: 0; }
.cx-hero__role { font-weight: var(--hn-weight-bold); color: var(--hn-color-text-muted); }
.cx-hero__flavor { font-style: italic; }
.cx-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--hn-space-3); margin: 0; }
.cx-facts > div { padding: var(--hn-space-4); border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-lg); background: var(--hn-color-surface); }
.cx-facts dt { margin-bottom: var(--hn-space-2); font-size: var(--hn-text-xs); font-weight: var(--hn-weight-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--hn-color-text-muted); }
.cx-facts dd { margin: 0; font-size: var(--hn-text-sm); line-height: var(--hn-leading-snug); }
.cx-prose { max-width: 75ch; margin: 0; line-height: var(--hn-leading-relaxed); }
.cx-skills { display: grid; gap: var(--hn-space-3); margin: 0; padding: 0; list-style: none; }
.cx-skill {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--hn-space-4); align-items: start;
  padding: var(--hn-space-4); border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-lg); background: var(--hn-color-surface-raised);
}
.cx-skill--ultimate { border-color: var(--hn-color-primary-border); background: var(--hn-color-primary-soft); }
.cx-skill__lvl {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--hn-radius-full);
  border: 2px solid var(--hn-color-border-strong); font-family: var(--hn-font-display); font-weight: var(--hn-weight-bold); font-variant-numeric: tabular-nums;
}
.cx-skill--ultimate .cx-skill__lvl { border-color: var(--hn-color-primary); background: var(--hn-color-primary); color: var(--hn-color-on-primary); }
.cx-skill__main { display: grid; gap: var(--hn-space-1); min-width: 0; }
.cx-skill__main > * { margin: 0; }
.cx-skill__name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hn-space-2); font-size: var(--hn-text-md); }
.cx-skill__cost { font-size: var(--hn-text-sm); color: var(--hn-color-text-muted); }
.cx-skill__text { line-height: var(--hn-leading-snug); }
.cx-skill__flavor { font-size: var(--hn-text-sm); font-style: italic; color: var(--hn-color-text-muted); }
.cx-lore { display: grid; gap: var(--hn-space-2); margin: 0; padding: 0; list-style: none; }
.cx-lore__link { display: flex; gap: var(--hn-space-2); align-items: flex-start; color: var(--hn-color-text); text-decoration: none; }
.cx-lore__link:hover strong { color: var(--hn-color-link-hover); text-decoration: underline; }
.cx-others { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hn-space-2) var(--hn-space-4); }
.cx-other { display: inline-flex; align-items: center; gap: var(--hn-space-1); color: var(--hn-color-link); font-size: var(--hn-text-sm); }

/* ───────────── admin ───────────── */
.ac-kpis { align-items: stretch; }
.ac-kpi { display: grid; gap: var(--hn-space-1); align-content: center; padding: var(--hn-space-4); border-radius: var(--hn-radius-lg); }
.ac-kpi__n { font-family: var(--hn-font-display); font-size: var(--hn-text-3xl); font-weight: var(--hn-weight-bold); font-variant-numeric: tabular-nums; }
.ac-kpi--tip { display: flex; gap: var(--hn-space-3); align-items: center; font-size: var(--hn-text-sm); }
.ac-kpi--tip hn-icon { flex: none; color: var(--hn-color-info); }
.ac-table td, .ac-table th { vertical-align: middle; }
.ac-table th[scope="row"] { background: none; color: var(--hn-color-text); font-size: var(--hn-text-sm); letter-spacing: normal; text-transform: none; }
.ac-name { display: inline-flex; align-items: center; gap: var(--hn-space-3); color: var(--hn-color-text); text-decoration: none; }
.ac-name > span:last-child { display: grid; }
a.ac-name:hover strong { color: var(--hn-color-link-hover); text-decoration: underline; }
.ac-share { min-width: 9rem; }
.ac-share__n { display: block; font-size: var(--hn-text-sm); font-variant-numeric: tabular-nums; }
.ac-skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: var(--hn-space-4); }
.ac-skill-list { display: grid; margin: 0; padding: 0; list-style: none; }
.ac-skill-list > li + li { border-top: 1px solid var(--hn-color-border); }
.ac-skill { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: var(--hn-space-3); padding: var(--hn-space-3) var(--hn-space-4); color: var(--hn-color-text); text-decoration: none; }
.ac-skill:hover { background: var(--hn-color-hover); }
.ac-skill:focus-visible { outline: none; box-shadow: var(--hn-focus-ring-inset); }
.ac-skill__lvl {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--hn-radius-full);
  background: var(--hn-color-bg-muted); font-size: var(--hn-text-sm); font-weight: var(--hn-weight-bold); font-variant-numeric: tabular-nums;
}
.ac-skill__main { display: grid; gap: .125rem; min-width: 0; }
.ac-skill__main small { display: block; }
.ac-skill__text { font-size: var(--hn-text-xs); line-height: var(--hn-leading-snug); color: var(--hn-color-text-muted); }
.ac-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hn-space-4); }
.ac-head .page-head { flex: 1 1 16rem; }
.ac-head h1 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--hn-space-2); }
.ac-sim { margin: 0; }
.ac-sim > hn-icon { display: inline-block; width: 1em; height: 1em; margin-inline-end: var(--hn-space-1); vertical-align: -.125em; }
.ac-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); gap: var(--hn-space-6); align-items: start; }
.ac-columns--single { grid-template-columns: minmax(0, 1fr); max-width: 60rem; }
.ac-aside { position: sticky; top: var(--hn-space-4); }
.ac-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--hn-space-3); }
.ac-numbers { display: grid; gap: var(--hn-space-4); }
.ac-numgroup { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: var(--hn-space-3); margin: 0; padding: var(--hn-space-3) var(--hn-space-4) var(--hn-space-4); border: 1px solid var(--hn-color-border); border-radius: var(--hn-radius-lg); }
.ac-numgroup > legend { padding: 0 var(--hn-space-2); font-weight: var(--hn-weight-bold); font-size: var(--hn-text-sm); }
.ac-num { align-content: start; }
.ac-num .hn-label { font-size: var(--hn-text-xs); }
.ac-sim code { white-space: nowrap; }
.ac-change-list { display: grid; gap: var(--hn-space-2); margin: 0; padding: 0; list-style: none; font-size: var(--hn-text-sm); }
.ac-change-list li { display: grid; gap: .125rem; padding-bottom: var(--hn-space-2); border-bottom: 1px solid var(--hn-color-border); }
.ac-change-list__what { color: var(--hn-color-text-muted); font-size: var(--hn-text-xs); }
.ac-change-list__vals { overflow-wrap: anywhere; }
.ac-num__orig { display: block; margin-top: .25rem; color: var(--hn-color-warning-text); font-size: var(--hn-text-xs); }
.ac-actions { display: flex; flex-wrap: wrap; gap: var(--hn-space-3); position: sticky; bottom: 0; padding: var(--hn-space-3) 0; background: var(--hn-color-bg); }
.ac-preview__box { display: grid; gap: var(--hn-space-2); padding: var(--hn-space-4); border-radius: var(--hn-radius-lg); background: var(--hn-color-bg-subtle); border: 1px solid var(--hn-color-border); }
.ac-preview__box > p { margin: 0; }
.ac-preview__state { display: flex; gap: var(--hn-space-2); align-items: center; font-size: var(--hn-text-xs); font-weight: var(--hn-weight-bold); color: var(--hn-color-text-muted); }
.ac-preview__state--ok { color: var(--hn-color-success-text); }
.ac-preview__state--bad { color: var(--hn-color-danger-text); }
.ac-preview__text { font-size: var(--hn-text-md); line-height: var(--hn-leading-snug); }
.ac-preview__orig { padding-top: var(--hn-space-3); border-top: 1px dashed var(--hn-color-border); }
.ac-preview__orig p { margin: 0; }
.ac-siblings { display: flex; flex-wrap: wrap; gap: var(--hn-space-1); }
.ac-siblings a { padding: .25rem .75rem; border-radius: var(--hn-radius-full); border: 1px solid var(--hn-color-border); color: var(--hn-color-text-muted); font-size: var(--hn-text-xs); text-decoration: none; }
.ac-siblings a:hover { border-color: var(--hn-color-primary-border); color: var(--hn-color-text); }
.ac-siblings a[aria-current="page"] { border-color: var(--hn-color-primary); background: var(--hn-color-primary-soft); color: var(--hn-color-primary-text); font-weight: var(--hn-weight-bold); }
.ac-passive > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hn-space-1) var(--hn-space-2); }
.ac-passive__text { flex-basis: 100%; color: var(--hn-color-text-muted); font-size: var(--hn-text-sm); font-weight: var(--hn-weight-regular); }
.ac-json__area { font-family: var(--hn-font-mono); font-size: var(--hn-text-xs); line-height: var(--hn-leading-normal); }

/* ───────────── petits écrans ───────────── */
@media (max-width: 960px) {
  .cc-hero__art { display: none; }
  .ac-columns { grid-template-columns: minmax(0, 1fr); }
  .ac-aside { position: static; }
}
@media (max-width: 640px) {
  .cc-hero { padding: var(--hn-space-6) var(--hn-space-4) var(--hn-space-5); }
  .cc-recap__grid { grid-template-columns: minmax(0, 1fr); padding: var(--hn-space-4); }
  .cc-recap__head, .cc-confirm { padding: var(--hn-space-4); }
}
@media (max-width: 480px) {
  /* Une carte par ligne, emblème à gauche : la liste reste courte à parcourir. */
  .cc-grid--races, .cc-grid--classes { grid-template-columns: minmax(0, 1fr); gap: var(--hn-space-3); }
  .cc-card__pick {
    grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: start;
    column-gap: var(--hn-space-3); row-gap: var(--hn-space-1); padding: var(--hn-space-4) var(--hn-space-4) var(--hn-space-2);
  }
  .cc-card__emblem, .cc-card--class .cc-card__emblem { --emblem-size: 4.5rem; grid-row: 1 / span 3; margin: 0; }
  .cc-card__pick > :not(.cc-card__emblem):not(.cc-card__input):not(.cc-card__mark) { grid-column: 2; }
  .cc-card .cc-chips { justify-content: flex-start; }
  .cc-card__name { padding-inline-end: var(--hn-space-8); }
  .cc-card__more { align-self: flex-start; margin-inline-start: var(--hn-space-4); }
  .cc-confirm__row .hn-btn { width: 100%; }
  .cc-stats th, .cc-stats td { padding-inline: var(--hn-space-2); font-size: var(--hn-text-xs); }
  .cc-recap__block .hn-table-wrap { margin-inline: calc(-1 * var(--hn-space-2)); }
  .cx-card { grid-template-columns: minmax(0, 1fr); }
  .cx-hero { gap: var(--hn-space-4); padding: var(--hn-space-5) var(--hn-space-4); }
  .cc-steps .hn-step__desc { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-card, .cc-card__emblem, .cc-card__mark { transition: none; }
  .cc-card:hover .cc-card__emblem, .cc-card:has(.cc-card__input:checked) .cc-card__emblem { transform: none; }
}
@media (min-width: 961px) {
  .cc-hero__text, .cc-steps { max-width: min(62ch, 56%); }
}
