/* R4X Tools Library Feature Cards v958
   v955 sharp card assets bleiben aktiv.
   Größenkorrektur nicht über Cropping, sondern über stabile Grid-Spalten.
   Situationstraining nutzt bereinigtes Card-Asset ohne weißen Canva-Rand.
*/
body.cockpit[data-page="tools"] .cockpit-card--library-feature{
  overflow:hidden;
  gap:12px;
}

body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__media{
  position:relative;
  margin:calc(var(--r4x-space-5) * -1) calc(var(--r4x-space-5) * -1) 0;
  width:calc(100% + (var(--r4x-space-5) * 2));
  aspect-ratio:16 / 9;
  height:auto;
  overflow:hidden;
  border-radius:var(--r4x-radius-lg) var(--r4x-radius-lg) 18px 18px;
  background:#07080b;
  border-bottom:1px solid rgba(255,255,255,.08);
}

body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__media > img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  transform:none !important;
  filter:none !important;
  opacity:1 !important;
  backface-visibility:visible;
  image-rendering:auto;
}

body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__media::after{
  content:none;
}

body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__top{
  position:relative;
  z-index:1;
  margin:0;
  align-items:flex-start;
}

body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__top-actions{
  align-items:flex-start;
  gap:8px;
}

body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__badges{
  justify-content:flex-end;
}

body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__title{
  margin-top:2px;
}

body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__desc{
  color:var(--r4x-text-secondary);
}

body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__footer--actions{
  margin-top:auto;
}


/* v957 · Perceived-sharpness guard: do not dim/composite image cards through lock opacity overlays. */
body.cockpit[data-page="tools"] .cockpit-card--library-feature.cockpit-card--locked,
body.cockpit[data-page="tools"] .cockpit-card--library-feature.is-locked{
  opacity:1 !important;
}
body.cockpit[data-page="tools"] .cockpit-card--library-feature.cockpit-card--locked::after,
body.cockpit[data-page="tools"] .cockpit-card--library-feature.is-locked::after{
  content:none !important;
  display:none !important;
}
body.cockpit[data-page="tools"] .cockpit-card--library-feature:hover,
body.cockpit[data-page="tools"] .cockpit-card--library-feature:focus-visible{
  transform:none !important;
}
body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__media{
  isolation:isolate;
  contain:paint;
}
body.cockpit[data-page="tools"] .cockpit-card--library-feature .cockpit-card__media > img{
  max-width:none;
  will-change:auto;
}


/* v958 · Karten nicht künstlich flach drücken.
   Die Schärfe bleibt erhalten, weil das 16:9-Bild vollständig bleibt.
   Gegen übergroße Karten wird das Grid stabiler gemacht: mehr, kleinere Spalten statt niedriger Bild-Crop. */
body.cockpit[data-page="tools"] #library-mount .cockpit-grid--tools,
body.cockpit[data-page="tools"] .cockpit-library-group .cockpit-grid--tools{
  grid-template-columns:repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
@media (min-width:1280px){
  body.cockpit[data-page="tools"] #library-mount .cockpit-grid--tools,
  body.cockpit[data-page="tools"] .cockpit-library-group .cockpit-grid--tools{
    grid-template-columns:repeat(auto-fill, minmax(248px, 1fr));
  }
}
@media (max-width:640px){
  body.cockpit[data-page="tools"] #library-mount .cockpit-grid--tools,
  body.cockpit[data-page="tools"] .cockpit-library-group .cockpit-grid--tools{
    grid-template-columns:1fr;
  }
}

/* R4X v961 · konsolidierte Spezialkarten in Alle Hilfsmittel */
body.cockpit[data-page="tools"] .r4x-library-special-card{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:minmax(260px, 390px) minmax(0, 1fr);
  gap:18px;
  align-items:stretch;
  overflow:hidden;
  border:1px solid var(--r4x-border-default);
  border-radius:var(--r4x-radius-xl);
  background:linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)), var(--r4x-bg-surface);
  color:var(--r4x-text-primary);
  text-decoration:none;
  box-shadow:none;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__media{
  position:relative;
  min-height:100%;
  aspect-ratio:16/9;
  background:#07080b;
  overflow:hidden;
  contain:paint;
  isolation:isolate;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  transform:none !important;
  filter:none !important;
  opacity:1 !important;
  max-width:none;
}
body.cockpit[data-page="tools"] .r4x-library-special-card--book .r4x-library-special-card__media img{
  object-fit:contain;
  padding:12px 16px;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__body{
  display:flex;
  flex-direction:column;
  gap:var(--r4x-space-3);
  padding:var(--r4x-space-5);
  min-width:0;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
body.cockpit[data-page="tools"] .r4x-library-special-card h3{
  margin:4px 0 0;
  font-size:22px;
  line-height:1.18;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__text{
  margin:0;
  color:var(--r4x-text-secondary);
  font-size:var(--r4x-size-sm);
  line-height:1.55;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:4px;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__item{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(255,255,255,.032);
}
body.cockpit[data-page="tools"] .r4x-library-special-card__icon{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.045);
}
body.cockpit[data-page="tools"] .r4x-library-special-card__copy strong{
  display:block;
  color:var(--r4x-text-primary);
  font-size:13px;
  line-height:1.25;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__copy p{
  margin:2px 0 0;
  color:var(--r4x-text-secondary);
  font-size:12px;
  line-height:1.35;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__actions{margin-top:auto;}
body.cockpit[data-page="tools"] .r4x-library-special-card--book .cockpit-knowledge-card__points{margin-bottom:4px;}
@media (max-width:900px){
  body.cockpit[data-page="tools"] .r4x-library-special-card{grid-template-columns:1fr;}
  body.cockpit[data-page="tools"] .r4x-library-special-card__list{grid-template-columns:1fr;}
}
@media (max-width:640px){
  body.cockpit[data-page="tools"] .r4x-library-special-card__item{grid-template-columns:auto minmax(0,1fr);}
  body.cockpit[data-page="tools"] .r4x-library-special-card__item .r4x-card-cta{grid-column:1/-1;width:100%;}
}

/* R4X v962 · Spezialkarten in Alle Hilfsmittel nicht abschneiden. */
body.cockpit[data-page="tools"] .r4x-library-special-card{
  grid-template-columns:minmax(300px, 360px) minmax(0, 1fr) !important;
  gap:0 !important;
  align-items:start !important;
  overflow:visible !important;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__media{
  width:100% !important;
  max-width:360px !important;
  height:auto !important;
  min-height:0 !important;
  aspect-ratio:16 / 9 !important;
  align-self:start !important;
  overflow:hidden !important;
  border-radius:var(--r4x-radius-xl) 0 18px 0;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__media img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:cover !important;
  object-position:center center !important;
  transform:none !important;
  filter:none !important;
  opacity:1 !important;
}
body.cockpit[data-page="tools"] .r4x-library-special-card--book .r4x-library-special-card__media img{
  object-fit:contain !important;
  padding:12px 16px !important;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__body{
  min-width:0 !important;
  overflow:visible !important;
  padding:22px 24px 24px !important;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__text,
body.cockpit[data-page="tools"] .r4x-library-special-card__copy p,
body.cockpit[data-page="tools"] .r4x-library-special-card__copy strong{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  overflow-wrap:anywhere;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__list{
  grid-template-columns:1fr 1fr !important;
  align-items:stretch !important;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__item{
  min-width:0 !important;
  align-items:center !important;
}
body.cockpit[data-page="tools"] .r4x-library-special-card__copy{
  min-width:0 !important;
}
@media (max-width:980px){
  body.cockpit[data-page="tools"] .r4x-library-special-card{
    grid-template-columns:1fr !important;
    overflow:hidden !important;
  }
  body.cockpit[data-page="tools"] .r4x-library-special-card__media{
    max-width:none !important;
    border-radius:var(--r4x-radius-xl) var(--r4x-radius-xl) 18px 18px;
  }
}
@media (max-width:760px){
  body.cockpit[data-page="tools"] .r4x-library-special-card__list{
    grid-template-columns:1fr !important;
  }
}

/* R4X v1221 · Alle Hilfsmittel: normale Karten nutzen dieselbe scharfe Feature-Renderstruktur wie Bereichsseiten. */
body.cockpit[data-page="tools"] .cockpit-library-group .cockpit-grid--feature-render{
  --r4x-feature-card-w:365px;
  display:grid;
  gap:18px;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 300px), 365px));
  justify-content:start;
  align-items:stretch;
  padding:2px;
}
body.cockpit[data-page="tools"] .cockpit-library-group .r4x-library-feature-card{
  flex:initial;
  width:100%;
  max-width:365px;
  min-height:100%;
  transform:none!important;
  box-shadow:none;
}
body.cockpit[data-page="tools"] .cockpit-library-group .r4x-library-feature-card:hover,
body.cockpit[data-page="tools"] .cockpit-library-group .r4x-library-feature-card:focus-within{
  transform:none!important;
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-card__topline{
  justify-content:space-between;
  gap:8px;
  pointer-events:none;
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-badges,
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-library-feature-card__fav{
  pointer-events:auto;
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-badges{
  flex:1 1 auto;
  justify-content:flex-end;
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-badge--single{
  color:var(--r4x-gold-warm);
  border:1px solid rgba(212,175,55,.42);
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-library-feature-card__fav{
  flex:0 0 auto;
  width:32px;
  height:32px;
  background:rgba(5,6,10,.72);
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-card__title-row{
  align-items:flex-start;
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-card__title-copy{
  min-width:0;
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-card__kicker{
  margin:0 0 8px;
  color:var(--r4x-text-tertiary);
  font-size:var(--r4x-size-xs);
  line-height:1.2;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-card__actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:auto;
}
body.cockpit[data-page="tools"] .r4x-library-feature-card.r4x-feature-card--access-mixed{
  border-color:var(--r4x-silver-border);
  box-shadow:0 0 0 2px var(--r4x-bg-base), 0 0 0 3px rgba(212,175,55,.32);
}
body.cockpit[data-page="tools"] .r4x-library-feature-card.r4x-feature-card--access-mixed:hover,
body.cockpit[data-page="tools"] .r4x-library-feature-card.r4x-feature-card--access-mixed:focus-within{
  box-shadow:0 0 0 2px var(--r4x-bg-base), 0 0 0 3px rgba(212,175,55,.48);
}
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-card__media,
body.cockpit[data-page="tools"] .r4x-library-feature-card .r4x-feature-card__media img{
  transform:none!important;
  filter:none!important;
  opacity:1!important;
  image-rendering:auto;
  backface-visibility:hidden;
  will-change:auto;
}
@media(max-width:640px){
  body.cockpit[data-page="tools"] .cockpit-library-group .cockpit-grid--feature-render{
    grid-template-columns:1fr;
  }
  body.cockpit[data-page="tools"] .cockpit-library-group .r4x-library-feature-card{
    max-width:none;
  }
}

/* R4X v2079 · Bibliothekskarten sind schmaler als Bereichskarten (4 pro Reihe).
   Bereichskarten klammern auf 2 Zeilen; hier reichen 2 Zeilen nicht und schneiden Text ab.
   3 Zeilen zeigen die gekürzten Texte vollständig, bei gleichbleibender Rasteroptik. */
body.cockpit[data-page="tools"] .cockpit-library-group .cockpit-grid--focus .r4x-feature-card__text{
  -webkit-line-clamp: 3;
}

/* R4X v2323 · neues hochformatiges Krypto-Decoder-Cover in der breiten Buchkarte. */
body.cockpit[data-page="tools"] .r4x-library-special-card--book .r4x-library-special-card__media{
  display:grid;
  place-items:center;
  background:
    radial-gradient(circle at 50% 46%, rgba(212,175,55,.11), transparent 52%),
    linear-gradient(145deg, #090b11, #050609);
}
body.cockpit[data-page="tools"] .r4x-library-special-card--book .r4x-library-special-card__media img.r4x-krypto-decoder-cover--library{
  width:auto !important;
  height:auto !important;
  max-width:126px !important;
  max-height:178px !important;
  padding:0 !important;
  object-fit:contain !important;
  object-position:center !important;
  filter:drop-shadow(0 12px 18px rgba(0,0,0,.38)) !important;
}
@media(max-width:640px){
  body.cockpit[data-page="tools"] .r4x-library-special-card--book .r4x-library-special-card__media img.r4x-krypto-decoder-cover--library{
    max-width:112px !important;
    max-height:164px !important;
  }
}
