/* Weapon Mastery — Chronicle of Arms
   Route-scoped implementation of Facelift/Mastery/REFERENCE.html. */
.fl-mastery-chronicle {
  --mc-gold: #d8ad58;
  --mc-gold-hi: #f0cf87;
  --mc-bronze: #8c6b2f;
  --mc-ink: #ede4cf;
  --mc-muted: #b9aa8e;
  --mc-line: rgba(216, 173, 88, .28);
  --mc-hairline: rgba(237, 228, 207, .13);
  --mc-night: #0d0a07;
  color: var(--mc-ink);
}

.fl-mastery-chronicle .mastery-scene {
  display: flex;
  min-height: calc(100vh - 108px);
  height: auto;
  max-height: none;
  flex-direction: column;
  overflow: visible;
  background-image: url('/assets/scenes/training.jpg');
  background-position: center 36%;
  background-size: cover;
}

.fl-mastery-chronicle .mastery-scene::after {
  background:
    linear-gradient(180deg, rgba(5, 4, 3, .38), rgba(5, 4, 3, .72) 58%, rgba(5, 4, 3, .94)),
    linear-gradient(90deg, rgba(5, 4, 3, .78), transparent 44%, rgba(5, 4, 3, .35));
}

.fl-mastery-chronicle .char-tabs-wrap {
  position: relative;
  z-index: 5;
  flex: none;
}

.fl-mastery-chronicle .mc-scene-wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 22% 15%, rgba(216, 173, 88, .12), transparent 31%);
}

.fl-mastery-chronicle .mc-shell {
  position: relative;
  z-index: 3;
  width: min(1520px, calc(100% - 32px));
  margin: 0 auto;
  /* Ei yläpehmustetta: Character-välilehtien palkin ja sisällön rako on 4 px joka
     hahmosivulla (omistaja 13.9.2026, deviations.json: character-tab-gap). */
  padding: 0 0 28px;
}

.fl-mastery-chronicle .mc-identity {
  display: flex;
  min-height: 142px;
  align-items: center;
  gap: 22px;
  padding: 12px clamp(14px, 2.4vw, 34px);
  border-top: 1px solid var(--mc-line);
  border-bottom: 1px solid var(--mc-line);
  background: linear-gradient(90deg, rgba(9, 7, 5, .92), rgba(9, 7, 5, .58) 68%, transparent);
}

.fl-mastery-chronicle .mc-hero-weapon {
  width: 118px;
  height: 118px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .62));
}

.fl-mastery-chronicle .mc-kicker,
.fl-mastery-chronicle .mc-road-heading,
.fl-mastery-chronicle .mc-details h3,
.fl-mastery-chronicle .mc-rack header small {
  margin: 0;
  color: var(--mc-gold);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .115em;
  text-transform: uppercase;
}

.fl-mastery-chronicle .mc-identity h1 {
  margin: 3px 0 2px;
  color: #fff7e7;
  font-family: var(--font-display);
  font-size: clamp(29px, 3vw, 46px);
  font-weight: 500;
  letter-spacing: .025em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .8);
}

.fl-mastery-chronicle .mc-rankline {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 5px 0 0;
  color: var(--mc-gold-hi);
  line-height: 1.35;
}

.fl-mastery-chronicle .mc-rankline > span {
  flex: none;
  font-family: var(--font-display);
  font-size: 13px;
}

.fl-mastery-chronicle .mc-rankline em {
  max-width: 760px;
  color: #d8c9ac;
  font-size: 12px;
  font-style: normal;
}

.fl-mastery-chronicle .mc-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: stretch;
  border-bottom: 1px solid var(--mc-line);
  background: rgba(8, 6, 4, .74);
}

.fl-mastery-chronicle .mc-road-panel {
  min-width: 0;
  padding: 18px 16px 20px;
  border-right: 1px solid var(--mc-line);
}

.fl-mastery-chronicle .mc-road-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 11px;
}

.fl-mastery-chronicle .mc-road-heading b {
  color: #a79472;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .09em;
}

.fl-mastery-chronicle .mc-road {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  min-width: 0;
  border-top: 1px solid var(--mc-hairline);
  border-bottom: 1px solid var(--mc-hairline);
}

.fl-mastery-chronicle .mc-rank {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 238px;
  flex-direction: column;
  align-items: center;
  padding: 12px 5px 10px;
  border: 0;
  border-right: 1px solid var(--mc-hairline);
  border-radius: 0;
  background: rgba(8, 6, 4, .34);
  color: #766b5a;
  cursor: pointer;
  font: inherit;
}

.fl-mastery-chronicle .mc-rank:last-child { border-right: 0; }
.fl-mastery-chronicle .mc-rank.is-long-service { background: rgba(97, 66, 29, .11); }

.fl-mastery-chronicle .mc-rank::before {
  content: '';
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
  height: 1px;
  background: #4a3e2d;
}

.fl-mastery-chronicle .mc-road-mark {
  position: relative;
  z-index: 1;
  display: flex;
  width: 58px;
  height: 104px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.fl-mastery-chronicle .mc-road-mark img {
  position: absolute;
  top: 0;
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: saturate(.72) brightness(.68);
}

.fl-mastery-chronicle .mc-road-mark b {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid #5c4c36;
  background: #17120d;
  color: #817461;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  transform: rotate(45deg);
}

.fl-mastery-chronicle .mc-road-mark b > i {
  font-style: normal;
  transform: rotate(-45deg);
}
.fl-mastery-chronicle .mc-road-copy { display: block; min-width: 0; width: 100%; margin-top: 8px; text-align: center; }

.fl-mastery-chronicle .mc-road-copy strong,
.fl-mastery-chronicle .mc-road-copy small,
.fl-mastery-chronicle .mc-road-copy em {
  display: block;
  overflow-wrap: anywhere;
}

/* Rank-tien ja asekorttien tekstit ovat referenssiä 2 px suuremmat: omistaja ei
   saanut 7-9 px:n teksteistä selvää (13.9.2026). Ks. deviations.json
   readable-road-and-rack-text. */
.fl-mastery-chronicle .mc-road-copy strong {
  min-height: 31px;
  color: #8f816b;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
}

.fl-mastery-chronicle .mc-road-copy small { margin-top: 3px; color: #746957; font-size: 10px; }
.fl-mastery-chronicle .mc-road-copy em {
  min-height: 38px;
  margin-top: 8px;
  color: #6d6251;
  font-size: 10px;
  font-style: normal;
  line-height: 1.25;
}

/* Hover-sävy vain osoittimelle joka oikeasti leijuu. Kosketusnäytöllä :hover jää
   kiinni siihen mitä sormi vain vieritti, ja se näyttää toiselta valinnalta
   (omistaja 13.9.2026). Näppäimistön :focus-visible saa sävyn kaikilla laitteilla. */
.fl-mastery-chronicle .mc-rank:focus-visible { background: rgba(216, 173, 88, .08); }
@media (hover: hover) {
  .fl-mastery-chronicle .mc-rank:hover { background: rgba(216, 173, 88, .08); }
}

.fl-mastery-chronicle .mc-rank:focus-visible {
  z-index: 2;
  outline: 2px solid var(--mc-gold-hi);
  outline-offset: -2px;
}

.fl-mastery-chronicle .mc-rank.is-earned::before { background: var(--mc-bronze); }
.fl-mastery-chronicle .mc-rank.is-earned .mc-road-mark b {
  border-color: var(--mc-gold);
  background: #39250f;
  color: var(--mc-gold-hi);
  box-shadow: 0 0 15px rgba(216, 173, 88, .17);
}
.fl-mastery-chronicle .mc-rank.is-earned .mc-road-copy strong { color: #ccb383; }
.fl-mastery-chronicle .mc-rank.is-earned .mc-road-copy small { color: #aa9878; }
.fl-mastery-chronicle .mc-rank.is-earned .mc-road-mark img { filter: none; }

.fl-mastery-chronicle .mc-rank.is-next .mc-road-mark b {
  border-color: var(--mc-gold-hi);
  color: var(--mc-gold-hi);
  box-shadow: 0 0 0 4px rgba(216, 173, 88, .1), 0 0 18px rgba(216, 173, 88, .25);
}

.fl-mastery-chronicle .mc-rank.is-selected {
  background: linear-gradient(180deg, rgba(216, 173, 88, .15), rgba(216, 173, 88, .035));
  box-shadow: inset 0 -2px var(--mc-gold);
}
.fl-mastery-chronicle .mc-rank.is-selected .mc-road-copy strong { color: var(--mc-gold-hi); }
.fl-mastery-chronicle .mc-rank.is-selected .mc-road-mark img { filter: none; }

.fl-mastery-chronicle .mc-progress {
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 80px;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--mc-line);
  background: rgba(6, 5, 4, .9);
}

.fl-mastery-chronicle .mc-progress small,
.fl-mastery-chronicle .mc-progress strong { display: block; }
.fl-mastery-chronicle .mc-progress > div:first-child small { color: var(--mc-gold); font-size: 9px; }
.fl-mastery-chronicle .mc-progress > div:first-child strong {
  margin-top: 4px;
  color: #e2d4b9;
  font-size: 13px;
  font-weight: 400;
}

.fl-mastery-chronicle .mc-progress-track {
  position: relative;
  height: 11px;
  overflow: hidden;
  border: 1px solid #57472f;
  background: #1b150e;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .75);
}

.fl-mastery-chronicle .mc-progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #765221, var(--mc-gold), #e5c476);
  box-shadow: 0 0 13px rgba(216, 173, 88, .35);
}

.fl-mastery-chronicle .mc-progress > span { min-width: 94px; text-align: right; }
.fl-mastery-chronicle .mc-progress > span b {
  display: block;
  color: var(--mc-gold-hi);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
}
.fl-mastery-chronicle .mc-progress > span small { color: var(--mc-muted); font-size: 9px; }

.fl-mastery-chronicle .mc-details {
  min-height: 492px;
  padding: 22px 22px 20px;
  background: rgba(10, 8, 6, .91);
}

.fl-mastery-chronicle .mc-detail-head {
  display: grid;
  min-height: 96px;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--mc-line);
}

.fl-mastery-chronicle .mc-detail-head small {
  color: var(--mc-gold);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.fl-mastery-chronicle .mc-detail-head h2 {
  margin: 5px 0 0;
  color: #f1dfbc;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.18;
}

.fl-mastery-chronicle .mc-detail-art {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
}
.fl-mastery-chronicle .mc-detail-medal {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 11px rgba(216, 173, 88, .22));
}

.fl-mastery-chronicle .mc-rank-standard {
  display: flex;
  width: 64px;
  align-items: center;
  gap: 7px;
  color: var(--mc-gold-hi);
}
.fl-mastery-chronicle .mc-rank-standard i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--mc-bronze));
}
.fl-mastery-chronicle .mc-rank-standard i:last-child { transform: scaleX(-1); }
.fl-mastery-chronicle .mc-rank-standard b {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}

.fl-mastery-chronicle .mc-detail-section {
  min-height: 142px;
  padding: 17px 0 13px;
  border-bottom: 1px solid var(--mc-hairline);
}
.fl-mastery-chronicle .mc-detail-section.mc-unlocked {
  min-height: 180px;
  border-bottom: 0;
}
.fl-mastery-chronicle .mc-details h3 { margin-bottom: 9px; }
.fl-mastery-chronicle .mc-ledger { margin: 0; }
.fl-mastery-chronicle .mc-ledger > div {
  display: grid;
  grid-template-columns: 91px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(237, 228, 207, .075);
}
.fl-mastery-chronicle .mc-ledger > div:first-child { border-top: 0; }
.fl-mastery-chronicle .mc-ledger dt {
  color: #8e806a;
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.fl-mastery-chronicle .mc-ledger dd {
  margin: 0;
  color: #ded1b7;
  font-size: 11px;
  line-height: 1.4;
}
.fl-mastery-chronicle .mc-benefit-link { color: var(--mc-gold-hi); text-decoration-color: var(--mc-bronze); }
.fl-mastery-chronicle .mc-empty { margin: 8px 0 0; color: var(--mc-muted); font-size: 11px; line-height: 1.45; }

.fl-mastery-chronicle .mc-rack {
  padding: 18px 16px 16px;
  background: rgba(7, 5, 4, .91);
}
.fl-mastery-chronicle .mc-rack header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px 12px;
}
.fl-mastery-chronicle .mc-rack header h2 {
  margin: 2px 0 0;
  color: #ead9b8;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  text-transform: uppercase;
}
.fl-mastery-chronicle .mc-rack header p { margin: 0; color: #9e8f75; font-size: 10px; }
.fl-mastery-chronicle .mc-weapon-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  border: 1px solid var(--mc-line);
}
.fl-mastery-chronicle .mc-weapon {
  display: grid;
  min-width: 0;
  min-height: 98px;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 4px 9px;
  padding: 9px 8px;
  border: 0;
  border-right: 1px solid var(--mc-hairline);
  border-radius: 0;
  background: rgba(19, 14, 9, .66);
  color: var(--mc-ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.fl-mastery-chronicle .mc-weapon:last-child { border-right: 0; }
@media (hover: hover) {
  /* Sama kuin radalla: kosketusnäytöllä värjätään vain valittu ase. */
  .fl-mastery-chronicle .mc-weapon:hover { background: rgba(216, 173, 88, .08); }
}
.fl-mastery-chronicle .mc-weapon:focus-visible { z-index: 1; outline: 2px solid var(--mc-gold-hi); outline-offset: -2px; }
.fl-mastery-chronicle .mc-weapon.is-selected {
  background: linear-gradient(180deg, rgba(105, 70, 29, .55), rgba(33, 23, 13, .82));
  box-shadow: inset 0 2px var(--mc-gold);
}
.fl-mastery-chronicle .mc-weapon > img {
  width: 46px;
  height: 60px;
  grid-row: 1 / 3;
  object-fit: contain;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .6));
}
.fl-mastery-chronicle .mc-weapon > span:nth-child(2) { min-width: 0; }
.fl-mastery-chronicle .mc-weapon strong,
.fl-mastery-chronicle .mc-weapon small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-mastery-chronicle .mc-weapon strong { color: #dac9a9; font-family: var(--font-display); font-size: 11px; font-weight: 500; }
.fl-mastery-chronicle .mc-weapon small { margin-top: 3px; color: #998a71; font-size: 10px; }
.fl-mastery-chronicle .mc-mini { display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 5px; }
.fl-mastery-chronicle .mc-mini b { color: #9f8e72; font-size: 9px; font-weight: 400; text-align: right; }
.fl-mastery-chronicle .mc-mini i { display: block; height: 3px; background: rgba(237, 228, 207, .11); }
.fl-mastery-chronicle .mc-mini em { display: block; height: 100%; background: var(--mc-gold); }
.fl-mastery-chronicle .mc-empty-state { padding: 32px; background: rgba(8, 6, 4, .86); }

@media (max-width: 1240px) {
  .fl-mastery-chronicle .mc-workbench { grid-template-columns: 1fr; }
  .fl-mastery-chronicle .mc-road-panel { border-right: 0; border-bottom: 1px solid var(--mc-line); }
  /* Yksityiskohdat ovat tien alla, joten korkeuslattioita ei ole (omistaja 13.9.2026). */
  .fl-mastery-chronicle .mc-details,
  .fl-mastery-chronicle .mc-detail-head,
  .fl-mastery-chronicle .mc-detail-section,
  .fl-mastery-chronicle .mc-detail-section.mc-unlocked { min-height: 0; }
  .fl-mastery-chronicle .mc-weapon-grid { grid-template-columns: repeat(3, 1fr); }
  .fl-mastery-chronicle .mc-weapon:nth-child(3n) { border-right: 0; }
  .fl-mastery-chronicle .mc-weapon:nth-child(n+4) { border-top: 1px solid var(--mc-hairline); }
}

/* LEVEYS SEURAA SISÄLTÖÄ EIKÄ IKKUNAA. Pelin kehys vie työpöydällä noin 455 px,
   joten 1440 px:n ikkunassa Chronicle on vain 985 px leveä ja referenssin
   kymmenen rankin tie jäi 56 px:n ruutuihin: nimet katkesivat kesken sanan
   (VETERAN-US) ja asenimet lyhenivät (GLA...), jo ennen kuin tekstejä
   suurennettiin (omistaja 13.9.2026). Jako tehdään siksi säiliökyselyillä
   sisällön leveydestä:
   - yksityiskohdat siirtyvät tien alle, kun sisältöä on enintään 1420 px;
   - tie jakautuu kahdelle viiden rankin riville, kun tietä on enintään 1000 px
     (11 px:n nimi tarvitsee noin 100 px:n ruudun);
   - asekortit ovat viidessä sarakkeessa enintään 1400 px:n ja kolmessa
     enintään 780 px:n levyisinä, tabletilla kahdessa enintään 480 px:n.
   Mitattu 1920-390 px: ei katkenneita sanoja eikä lyhentyneitä nimiä.
   Lohko on 1240 px:n lohkon JÄLKEEN, koska kahden sarakkeen asekortit
   kumoavat sen kolmen sarakkeen säännöt. */
.fl-mastery-chronicle .mc-shell { container: mc-shell / inline-size; }
.fl-mastery-chronicle .mc-road-panel { container: mc-road / inline-size; }
.fl-mastery-chronicle .mc-rack { container: mc-rack / inline-size; }

@media (min-width: 1241px) {
  @container mc-shell (width <= 1420px) {
    .fl-mastery-chronicle .mc-workbench { grid-template-columns: minmax(0, 1fr); }
    .fl-mastery-chronicle .mc-road-panel { border-right: 0; border-bottom: 1px solid var(--mc-line); }
    .fl-mastery-chronicle .mc-details,
    .fl-mastery-chronicle .mc-detail-head,
    .fl-mastery-chronicle .mc-detail-section,
    .fl-mastery-chronicle .mc-detail-section.mc-unlocked { min-height: 0; }
  }
  @container mc-rack (width > 1400px) {
    /* Kymmenes ase (koulutettu aloitusase) rivittyy yhdeksän sarakkeen alle. */
    .fl-mastery-chronicle .mc-weapon:nth-child(9n) { border-right: 0; }
    .fl-mastery-chronicle .mc-weapon:nth-child(n+10) { border-top: 1px solid var(--mc-hairline); }
  }
  @container mc-rack (width <= 1400px) {
    .fl-mastery-chronicle .mc-weapon-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .fl-mastery-chronicle .mc-weapon:nth-child(5n) { border-right: 0; }
    .fl-mastery-chronicle .mc-weapon:nth-child(n+6) { border-top: 1px solid var(--mc-hairline); }
  }
  @container mc-rack (width <= 780px) {
    .fl-mastery-chronicle .mc-weapon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fl-mastery-chronicle .mc-weapon:nth-child(5n) { border-right: 1px solid var(--mc-hairline); }
    .fl-mastery-chronicle .mc-weapon:nth-child(3n),
    .fl-mastery-chronicle .mc-weapon:last-child { border-right: 0; }
    .fl-mastery-chronicle .mc-weapon:nth-child(n+4) { border-top: 1px solid var(--mc-hairline); }
  }
}

@media (min-width: 900px) {
  @container mc-road (width <= 1000px) {
    .fl-mastery-chronicle .mc-road { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .fl-mastery-chronicle .mc-rank:nth-child(5n) { border-right: 0; }
    .fl-mastery-chronicle .mc-rank:nth-child(n+6) { border-top: 1px solid var(--mc-hairline); }
  }
}

@media (min-width: 561px) and (max-width: 1240px) {
  @container mc-rack (width <= 480px) {
    .fl-mastery-chronicle .mc-weapon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fl-mastery-chronicle .mc-weapon:nth-child(3n) { border-right: 1px solid var(--mc-hairline); }
    .fl-mastery-chronicle .mc-weapon:nth-child(2n),
    .fl-mastery-chronicle .mc-weapon:last-child { border-right: 0; }
    .fl-mastery-chronicle .mc-weapon:nth-child(n+3) { border-top: 1px solid var(--mc-hairline); }
  }
}

@media (max-width: 899px) {
  .fl-mastery-chronicle .mastery-scene {
    min-height: 0;
    background-position: 50% top;
  }
  .fl-mastery-chronicle .mastery-scene::after { display: block; }
  .fl-mastery-chronicle .mc-shell { width: 100%; padding: 0; }
  .fl-mastery-chronicle .mc-identity { min-height: 132px; padding: 12px 14px; }
  .fl-mastery-chronicle .mc-hero-weapon { width: 92px; height: 108px; }
  .fl-mastery-chronicle .mc-rankline { align-items: flex-start; flex-direction: column; gap: 5px; }
  .fl-mastery-chronicle .mc-road { grid-template-columns: repeat(5, 1fr); }
  .fl-mastery-chronicle .mc-rank { min-height: 176px; }
  .fl-mastery-chronicle .mc-rank:nth-child(n+6) { border-top: 1px solid var(--mc-hairline); }
  .fl-mastery-chronicle .mc-rank:nth-child(5n) { border-right: 0; }
  .fl-mastery-chronicle .mc-road-mark { height: 82px; }
  .fl-mastery-chronicle .mc-rank::before { top: 57px; }
  .fl-mastery-chronicle .mc-road-mark img { width: 42px; height: 42px; }
  .fl-mastery-chronicle .mc-road-copy em { display: none; }
  .fl-mastery-chronicle .mc-progress { grid-template-columns: 1fr; gap: 8px; }
  .fl-mastery-chronicle .mc-progress > span { display: flex; justify-content: space-between; text-align: left; }
  /* Kapealla ruudulla yksityiskohdat ovat radan alla eivätkä sen vieressä, joten
     korkeuslattioilla ei ole paria jonka mittaisina pysyä: ne jättivät laatikoihin
     tyhjää ruudun verran (omistaja 13.9.2026). Laatikko on nyt rivojensa korkuinen. */
  .fl-mastery-chronicle .mc-details { min-height: 0; padding: 16px 18px 6px; }
  .fl-mastery-chronicle .mc-detail-head { min-height: 0; padding-bottom: 12px; }
  .fl-mastery-chronicle .mc-detail-section,
  .fl-mastery-chronicle .mc-detail-section.mc-unlocked { min-height: 0; padding: 12px 0 10px; }
}

@media (max-width: 560px) {
  .fl-mastery-chronicle .mc-identity { align-items: flex-start; gap: 10px; }
  .fl-mastery-chronicle .mc-hero-weapon { width: 76px; height: 92px; }
  .fl-mastery-chronicle .mc-kicker { font-size: 8px; line-height: 1.5; }
  .fl-mastery-chronicle .mc-identity h1 { font-size: 27px; }
  .fl-mastery-chronicle .mc-rankline > span { font-size: 11px; }
  .fl-mastery-chronicle .mc-rankline em { font-size: 10px; }
  .fl-mastery-chronicle .mc-road-panel,
  .fl-mastery-chronicle .mc-rack { padding-inline: 8px; }
  .fl-mastery-chronicle .mc-rank { min-height: 160px; padding-inline: 2px; }
  .fl-mastery-chronicle .mc-road-copy strong { font-size: 9px; }
  .fl-mastery-chronicle .mc-road-copy small { font-size: 8.5px; }
  .fl-mastery-chronicle .mc-details { padding: 14px 14px 4px; }
  .fl-mastery-chronicle .mc-detail-head { grid-template-columns: 66px 1fr; }
  .fl-mastery-chronicle .mc-detail-art { width: 66px; }
  .fl-mastery-chronicle .mc-detail-head h2 { font-size: 17px; }
  .fl-mastery-chronicle .mc-ledger > div { grid-template-columns: 82px 1fr; }
  .fl-mastery-chronicle .mc-rack header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .fl-mastery-chronicle .mc-weapon-grid { grid-template-columns: 1fr; }
  .fl-mastery-chronicle .mc-weapon,
  .fl-mastery-chronicle .mc-weapon:nth-child(3n) { border-right: 0; border-top: 1px solid var(--mc-hairline); }
  .fl-mastery-chronicle .mc-weapon:first-child { border-top: 0; }
  .fl-mastery-chronicle .mc-weapon { min-height: 76px; grid-template-columns: 54px 1fr 80px; grid-template-rows: 1fr; }
  .fl-mastery-chronicle .mc-weapon > img { width: 50px; height: 56px; grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .fl-mastery-chronicle * { scroll-behavior: auto !important; transition: none !important; }
}
