/* R4X Wissensgedaechtnis v2387 · Glossar + bestehendes Tagesritual */
body.r4x-glossar-origin-shell .r4x-memory-action{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin:0;
  padding:13px 14px;
  border-top:1px solid #eadfcc;
  background:linear-gradient(180deg,#fffdf7,#fffaf0);
}
body.r4x-glossar-origin-shell .r4x-memory-action__copy{
  display:grid;
  gap:3px;
  min-width:0;
  color:#635b4d;
  font-size:.82rem;
  line-height:1.45;
}
body.r4x-glossar-origin-shell .r4x-memory-action__copy strong{ color:#342b1c; }
body.r4x-glossar-origin-shell .r4x-memory-action__copy span{ color:#776d5c; }
body.r4x-glossar-origin-shell .r4x-memory-action__buttons{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  flex:0 0 auto;
}
body.r4x-glossar-origin-shell .r4x-memory-btn{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:8px 12px;
  border:1px solid #c99f39;
  border-radius:9px;
  background:#fffaf0;
  color:#73550f;
  font:inherit;
  font-size:.79rem;
  font-weight:700;
  line-height:1.2;
  cursor:pointer;
}
body.r4x-glossar-origin-shell .r4x-memory-btn:hover,
body.r4x-glossar-origin-shell .r4x-memory-btn:focus-visible{ background:#fff2ce; outline:none; }
body.r4x-glossar-origin-shell .r4x-memory-btn--quiet{
  border-color:transparent;
  background:transparent;
  color:#756b5a;
  font-weight:600;
  text-decoration:underline;
  text-underline-offset:3px;
}
body.r4x-glossar-origin-shell .r4x-memory-btn--quiet:hover,
body.r4x-glossar-origin-shell .r4x-memory-btn--quiet:focus-visible{ background:#f5efe4; }
body.r4x-glossar-origin-shell .r4x-memory-action.is-remembered{ border-left:3px solid #c99f39; }
body.r4x-glossar-origin-shell .r4x-memory-action.is-readonly{ border-left:3px solid #b9aa8a; }
body.r4x-glossar-origin-shell .r4x-memory-action--combined-plus{
  border-top:1px solid #eadfcc;
  border-left:3px solid #c99f39;
  background:linear-gradient(135deg,#fffdf7,#fff7e3);
}

.cockpit-ritual__memory-explanation{
  max-width:58ch;
  margin:0 0 16px;
  padding:12px 14px;
  border:1px solid rgba(200,164,92,.28);
  border-radius:10px;
  background:rgba(8,9,13,.78);
  color:var(--r4x-text-secondary);
  font-size:var(--r4x-size-sm);
  line-height:1.6;
}
.cockpit-ritual__memory-explanation strong{
  display:block;
  margin-bottom:4px;
  color:var(--r4x-gold);
  font-size:var(--r4x-size-xs);
  letter-spacing:.08em;
  text-transform:uppercase;
}
.cockpit-ritual__review{
  position:relative;
  overflow:hidden;
  margin-top:12px;
  padding:18px;
  border:1px solid rgba(200,164,92,.3);
  border-radius:14px;
  background:
    radial-gradient(circle at 92% 0,rgba(200,164,92,.12),transparent 34%),
    rgba(8,9,13,.92);
}
.cockpit-ritual__review-kicker{
  display:block;
  margin-bottom:8px;
  color:var(--r4x-gold);
  font-size:var(--r4x-size-xs);
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.cockpit-ritual__review h4{
  max-width:720px;
  margin:0 0 7px;
  color:var(--r4x-text-primary);
  font-size:clamp(1rem,2vw,1.22rem);
  line-height:1.35;
}
.cockpit-ritual__review > p{
  max-width:650px;
  margin:0 0 14px;
  color:var(--r4x-text-secondary);
  font-size:var(--r4x-size-sm);
  line-height:1.5;
}
.cockpit-ritual__review .cockpit-ritual__memory-explanation{ margin-bottom:14px; }
.cockpit-ritual__review-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:9px;
}
.cockpit-ritual__review-buttons{ display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.cockpit-ritual__week{
  max-width:620px;
  margin:4px 0 18px;
  padding:14px;
  border:1px solid rgba(200,164,92,.24);
  border-radius:12px;
  background:rgba(8,9,13,.72);
}
.cockpit-ritual__week-kicker{
  display:block;
  margin-bottom:9px;
  color:var(--r4x-gold);
  font-size:var(--r4x-size-xs);
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.cockpit-ritual__week-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}
.cockpit-ritual__week-stat{
  display:grid;
  gap:3px;
  padding:9px 10px;
  border-radius:9px;
  background:rgba(255,255,255,.045);
  color:var(--r4x-text-tertiary);
  font-size:11px;
  line-height:1.35;
}
.cockpit-ritual__week-stat strong{ color:var(--r4x-text-primary); font-size:1rem; }
.cockpit-ritual__week-actions{ display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.cockpit-ritual__week-close{
  border:0;
  background:transparent;
  color:var(--r4x-text-tertiary);
  font:inherit;
  font-size:var(--r4x-size-xs);
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
.cockpit-ritual__week-close:hover,
.cockpit-ritual__week-close:focus-visible{ color:var(--r4x-text-primary); }

@media(max-width:640px){
  body.r4x-glossar-origin-shell .r4x-memory-action{ flex-direction:column; }
  body.r4x-glossar-origin-shell .r4x-memory-action__buttons{ width:100%; justify-content:flex-start; }
  .cockpit-ritual__week-stats{ grid-template-columns:1fr; }
  .cockpit-ritual__review{ padding:15px; }
  .cockpit-ritual__review-actions,
  .cockpit-ritual__review-buttons{ width:100%; }
  .cockpit-ritual__review-actions .cockpit-btn,
  .cockpit-ritual__review-buttons .cockpit-btn{ flex:1 1 150px; }
}

/* ============================================================
   R4X v2436 · Meine vorgemerkten Begriffe
   Eigenstaendige Karte statt Textliste. Der Status eines Begriffs
   ist auf einen Blick lesbar: faellig, sicher, offen.
   ============================================================ */
body.r4x-glossar-origin-shell .r4x-memory-overview{ margin:0 0 16px; }

body.r4x-glossar-origin-shell .r4x-memory-card{
  position:relative;
  overflow:hidden;
  border:1px solid #e3d9c4;
  border-radius:16px;
  background:linear-gradient(180deg,#fffdf8 0%,#fdf8ee 100%);
  box-shadow:0 10px 28px rgba(58,45,22,.07), 0 1px 0 rgba(255,255,255,.7) inset;
}
body.r4x-glossar-origin-shell .r4x-memory-card::before{
  content:"";
  position:absolute; inset:0 0 auto 0; height:2px;
  background:linear-gradient(90deg,#e7cd8e 0%,#c9a24a 42%,rgba(201,162,74,0) 100%);
}
body.r4x-glossar-origin-shell .r4x-memory-card[data-memory-state="locked"]{
  background:linear-gradient(180deg,#fffdf8 0%,#faf6ee 100%);
  border-color:#e6ded0;
}

/* --- Kopfzeile --- */
body.r4x-glossar-origin-shell .r4x-memory-summary{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  cursor:pointer;
  list-style:none;
  -webkit-tap-highlight-color:transparent;
}
body.r4x-glossar-origin-shell .r4x-memory-summary::-webkit-details-marker{ display:none; }
body.r4x-glossar-origin-shell .r4x-memory-summary:focus-visible{
  outline:2px solid #c9a24a; outline-offset:-3px; border-radius:16px;
}
body.r4x-glossar-origin-shell .r4x-memory-summary__icon{
  display:inline-grid; place-items:center;
  width:38px; height:38px;
  border:1px solid #e0cd9d;
  border-radius:11px;
  background:linear-gradient(180deg,#fdf3dc,#f7e8c6);
  color:#8a6a17;
  flex:none;
}
body.r4x-glossar-origin-shell .r4x-memory-summary__icon svg{
  width:19px; height:19px; fill:currentColor;
}
body.r4x-glossar-origin-shell .r4x-memory-summary__titles{
  display:flex; flex-direction:column; gap:2px; min-width:0;
}
body.r4x-glossar-origin-shell .r4x-memory-summary__title{
  color:#2f2718; font-size:.94rem; font-weight:700; letter-spacing:.005em;
}
body.r4x-glossar-origin-shell .r4x-memory-summary__sub{
  color:#8a7d64; font-size:.76rem; font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
body.r4x-glossar-origin-shell .r4x-memory-summary__count{
  display:inline-grid; place-items:center;
  min-width:30px; height:30px; padding:0 9px;
  border:1px solid #d8bd76;
  border-radius:999px;
  background:linear-gradient(180deg,#fff8e6,#f8ecce);
  color:#6f5310; font-size:.8rem; font-weight:800;
  flex:none;
}
body.r4x-glossar-origin-shell .r4x-memory-card[data-memory-state="locked"] .r4x-memory-summary__count{
  border-color:#e0d8c8; background:#f5f1e8; color:#8b8069;
}
body.r4x-glossar-origin-shell .r4x-memory-summary__chevron{
  display:inline-grid; place-items:center;
  width:26px; height:26px; color:#9d8f76; flex:none;
  transition:transform .2s ease;
}
body.r4x-glossar-origin-shell .r4x-memory-summary__chevron svg{
  width:17px; height:17px; fill:none; stroke:currentColor;
  stroke-width:2.1; stroke-linecap:round; stroke-linejoin:round;
}
body.r4x-glossar-origin-shell .r4x-memory-card[open] .r4x-memory-summary__chevron{ transform:rotate(180deg); }

/* --- Liste --- */
body.r4x-glossar-origin-shell .r4x-memory-list{
  margin:0; padding:0 8px 8px; list-style:none;
  border-top:1px solid #efe7d7;
}
body.r4x-glossar-origin-shell .r4x-memory-row{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  padding:11px 8px;
  border-radius:11px;
  border-bottom:1px solid #f3ede1;
}
body.r4x-glossar-origin-shell .r4x-memory-row:last-child{ border-bottom:0; }
body.r4x-glossar-origin-shell .r4x-memory-row:hover{ background:#fbf6ea; }
body.r4x-glossar-origin-shell .r4x-memory-row__marker{
  width:9px; height:9px; border-radius:50%;
  background:#cfc4ad; box-shadow:0 0 0 3px rgba(207,196,173,.2);
  flex:none;
}
body.r4x-glossar-origin-shell .r4x-memory-row[data-status="due"] .r4x-memory-row__marker{
  background:#c9821f; box-shadow:0 0 0 3px rgba(201,130,31,.18);
}
body.r4x-glossar-origin-shell .r4x-memory-row[data-status="secure"] .r4x-memory-row__marker{
  background:#4f7d4f; box-shadow:0 0 0 3px rgba(79,125,79,.16);
}
body.r4x-glossar-origin-shell .r4x-memory-row[data-status="unsure"] .r4x-memory-row__marker{
  background:#c9a24a; box-shadow:0 0 0 3px rgba(201,162,74,.18);
}
body.r4x-glossar-origin-shell .r4x-memory-row__body{ display:flex; flex-direction:column; gap:4px; min-width:0; }
body.r4x-glossar-origin-shell .r4x-memory-row__term{
  justify-self:start;
  padding:0; border:0; background:none;
  color:#2f2718; font-size:.9rem; font-weight:700; text-align:left;
  text-decoration:none; cursor:pointer;
  overflow:hidden; text-overflow:ellipsis;
}
body.r4x-glossar-origin-shell .r4x-memory-row__term:hover,
body.r4x-glossar-origin-shell .r4x-memory-row__term:focus-visible{
  color:#8a6a17; text-decoration:underline; text-underline-offset:3px; outline:none;
}
body.r4x-glossar-origin-shell .r4x-memory-row__meta{
  display:flex; align-items:center; flex-wrap:wrap; gap:8px;
}
body.r4x-glossar-origin-shell .r4x-memory-row__badge{
  display:inline-flex; align-items:center;
  height:21px; padding:0 9px;
  border:1px solid #ddd3bf; border-radius:999px;
  background:#f7f2e7; color:#6f6552;
  font-size:.68rem; font-weight:800; letter-spacing:.045em; text-transform:uppercase;
}
body.r4x-glossar-origin-shell .r4x-memory-row[data-status="due"] .r4x-memory-row__badge{
  border-color:#e0b077; background:#fdf0dc; color:#8a5610;
}
body.r4x-glossar-origin-shell .r4x-memory-row[data-status="secure"] .r4x-memory-row__badge{
  border-color:#b9cdb9; background:#eef5ee; color:#3d6440;
}
body.r4x-glossar-origin-shell .r4x-memory-row[data-status="unsure"] .r4x-memory-row__badge{
  border-color:#dfc588; background:#fdf6e4; color:#7a5c12;
}
body.r4x-glossar-origin-shell .r4x-memory-row__due{ color:#8a7d64; font-size:.76rem; font-weight:600; }
body.r4x-glossar-origin-shell .r4x-memory-row__remove{
  display:inline-grid; place-items:center;
  width:32px; height:32px; flex:none;
  padding:0; border:1px solid transparent; border-radius:9px;
  background:transparent; color:#a2957c; cursor:pointer;
  transition:color .15s ease, background .15s ease, border-color .15s ease;
}
body.r4x-glossar-origin-shell .r4x-memory-row__remove svg{
  width:15px; height:15px; fill:none; stroke:currentColor;
  stroke-width:2.1; stroke-linecap:round;
}
body.r4x-glossar-origin-shell .r4x-memory-row__remove:hover,
body.r4x-glossar-origin-shell .r4x-memory-row__remove:focus-visible{
  color:#8b2929; background:#fbeeee; border-color:#eccfcf; outline:none;
}

/* --- Leer- und Teaserzustand --- */
body.r4x-glossar-origin-shell .r4x-memory-panel{
  padding:14px 16px 16px;
  border-top:1px solid #efe7d7;
}
body.r4x-glossar-origin-shell .r4x-memory-empty{
  margin:0; color:#6f6552; font-size:.85rem; line-height:1.55;
}
body.r4x-glossar-origin-shell .r4x-memory-empty strong{ color:#4a3f28; }
body.r4x-glossar-origin-shell .r4x-memory-unlock{
  display:inline-flex; align-items:center; gap:7px;
  margin-top:12px; min-height:40px; padding:0 17px;
  border:1px solid #d3b262; border-radius:999px;
  background:linear-gradient(180deg,#fdf3d9,#f6e7c2);
  color:#6b4f0e; font-size:.84rem; font-weight:800;
  text-decoration:none;
  box-shadow:0 3px 10px rgba(150,116,32,.14);
  transition:transform .15s ease, box-shadow .15s ease;
}
body.r4x-glossar-origin-shell .r4x-memory-unlock:hover,
body.r4x-glossar-origin-shell .r4x-memory-unlock:focus-visible{
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(150,116,32,.2);
  outline:none;
}
body.r4x-glossar-origin-shell .r4x-memory-card--notice{
  padding:14px 16px;
  border:1px solid #e3d9c4; border-radius:16px; background:#fffdf8;
}
body.r4x-glossar-origin-shell.r4x-glossar-focus-mode .r4x-memory-overview{ display:none; }

@media (max-width:640px){
  body.r4x-glossar-origin-shell .r4x-memory-summary{ grid-template-columns:auto minmax(0,1fr) auto auto; gap:10px; padding:12px 13px; }
  body.r4x-glossar-origin-shell .r4x-memory-summary__title{ font-size:.88rem; }
  body.r4x-glossar-origin-shell .r4x-memory-row{ align-items:flex-start; padding:11px 6px; }
  body.r4x-glossar-origin-shell .r4x-memory-row__marker{ margin-top:6px; }
  body.r4x-glossar-origin-shell .r4x-memory-row__remove{ margin-top:-2px; }
}

/* ============================================================
   R4X v2438 · Vorgemerkte Begriffe sind sichtbar anklickbar
   Der Begriff sah aus wie fetter Text. Jetzt: Goldton, Unterstrich
   und Pfeil, dazu die ganze Zeile als Trefferflaeche.
   ============================================================ */
body.r4x-glossar-origin-shell .r4x-memory-row{ cursor:pointer; }
body.r4x-glossar-origin-shell .r4x-memory-row__term{
  display:inline-flex;
  align-items:center;
  gap:6px;
  justify-self:start;
  padding:2px 0;
  border:0;
  background:none;
  color:#8a6a17;
  font-size:.92rem;
  font-weight:700;
  text-align:left;
  cursor:pointer;
  text-decoration:underline;
  text-decoration-color:rgba(138,106,23,.38);
  text-decoration-thickness:1.5px;
  text-underline-offset:3px;
  transition:color .15s ease, text-decoration-color .15s ease;
}
body.r4x-glossar-origin-shell .r4x-memory-row__term > span{
  overflow:hidden;
  text-overflow:ellipsis;
}
body.r4x-glossar-origin-shell .r4x-memory-row__go{
  width:14px;
  height:14px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.55;
  transition:transform .15s ease, opacity .15s ease;
}
body.r4x-glossar-origin-shell .r4x-memory-row:hover .r4x-memory-row__term,
body.r4x-glossar-origin-shell .r4x-memory-row__term:hover,
body.r4x-glossar-origin-shell .r4x-memory-row__term:focus-visible{
  color:#6b4f0e;
  text-decoration-color:#6b4f0e;
}
body.r4x-glossar-origin-shell .r4x-memory-row:hover .r4x-memory-row__go,
body.r4x-glossar-origin-shell .r4x-memory-row__term:hover .r4x-memory-row__go{
  opacity:1;
  transform:translateX(2px);
}
body.r4x-glossar-origin-shell .r4x-memory-row__term:focus-visible{
  outline:2px solid #c9a24a;
  outline-offset:3px;
  border-radius:5px;
}
/* Der Entfernen-Knopf ist keine Sprungflaeche. */
body.r4x-glossar-origin-shell .r4x-memory-row__remove{ cursor:pointer; }


/* ============================================================
   R4X v2764 · Wissensgedächtnis als eigener Lernmodus
   Normalzustand: eine kompakte Zeile unter Verstehen des Tages.
   Fällige Begriffe und Lernwoche wecken denselben Bereich auf.
   Die vollständige Zusammenfassung + manuelle Wiederholung lebt
   in einem lokalen Modal auf Mein Bereich.
   ============================================================ */
.cockpit-learning-memory{
  position:relative;
  margin-top:10px;
}
.cockpit-memory-dock{
  width:100%;
  min-height:50px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 10px 7px 8px;
  border:1px solid rgba(160,169,191,.24);
  border-radius:13px;
  background:
    linear-gradient(90deg,rgba(200,164,92,.055),rgba(160,169,191,.035) 42%,rgba(255,255,255,.018));
  color:var(--r4x-text-primary);
  font:inherit;
  text-align:left;
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
}
.cockpit-memory-dock:hover,
.cockpit-memory-dock:focus-visible{
  border-color:rgba(200,164,92,.46);
  background:
    linear-gradient(90deg,rgba(200,164,92,.09),rgba(160,169,191,.05) 42%,rgba(255,255,255,.025));
  outline:none;
}
.cockpit-memory-dock:active{ transform:translateY(1px); }
.cockpit-memory-dock__icon{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  flex:0 0 34px;
  border-radius:10px;
  color:#c8a45c;
  background:rgba(200,164,92,.08);
  border:1px solid rgba(200,164,92,.20);
}
.cockpit-memory-dock__cap{ width:23px; height:23px; display:block; }
.cockpit-memory-dock__label{
  min-width:0;
  font-size:var(--r4x-size-sm);
  font-weight:700;
  letter-spacing:.01em;
}
.cockpit-memory-dock__badge{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:2px 9px;
  margin-left:2px;
  border-radius:999px;
  border:1px solid rgba(200,164,92,.30);
  background:rgba(200,164,92,.10);
  color:#d4b873;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.cockpit-memory-dock__teaser{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#939caf;
  font-size:var(--r4x-size-xs);
  font-weight:500;
}
.cockpit-memory-dock__plus{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(200,164,92,.35);
  background:rgba(200,164,92,.09);
  color:#d8ba70;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
}
.cockpit-memory-dock.is-locked{
  border-color:rgba(200,164,92,.28);
  background:linear-gradient(90deg,rgba(200,164,92,.065),rgba(160,169,191,.03) 48%,rgba(255,255,255,.014));
}
.cockpit-memory-dock.is-locked .cockpit-memory-dock__open{ color:#cbb06d; }
.cockpit-memory-dock__open{
  margin-left:auto;
  color:#aeb7cb;
  font-size:var(--r4x-size-xs);
  font-weight:700;
  white-space:nowrap;
}
.cockpit-memory-dock:hover .cockpit-memory-dock__open,
.cockpit-memory-dock:focus-visible .cockpit-memory-dock__open{ color:#d7c18a; }

.cockpit-learning-memory__active{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:10px;
}
.cockpit-learning-memory__active > :only-child{ grid-column:1/-1; }
.cockpit-learning-memory__active .cockpit-ritual__review,
.cockpit-learning-memory__active .cockpit-ritual__week{
  max-width:none;
  margin:0;
  border-color:rgba(160,169,191,.30);
  background:
    radial-gradient(circle at 92% 0,rgba(200,164,92,.08),transparent 34%),
    radial-gradient(circle at 80% 20%,rgba(160,169,191,.06),transparent 36%),
    rgba(8,9,13,.90);
}
.cockpit-learning-memory__active .cockpit-ritual__review-kicker,
.cockpit-learning-memory__active .cockpit-ritual__week-kicker{
  color:#b7bdcb;
  letter-spacing:.09em;
}
.cockpit-learning-memory__active .cockpit-ritual__review{
  box-shadow:inset 3px 0 0 rgba(200,164,92,.30);
}
.cockpit-learning-memory__active .cockpit-ritual__week{
  box-shadow:inset 3px 0 0 rgba(160,169,191,.22);
}
.cockpit-learning-memory__active .cockpit-ritual__week-stat{
  background:rgba(160,169,191,.055);
}

/* Lokales Wissensgedächtnis-Overlay: bleibt auf Mein Bereich. */
.r4x-memory-modal-open body{ overflow:hidden; }
.cockpit-memory-modal[hidden]{ display:none !important; }
.cockpit-memory-modal{
  position:fixed;
  inset:0;
  z-index:11280;
  display:grid;
  place-items:center;
  padding:clamp(14px,3vw,34px);
}
.cockpit-memory-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(2,3,6,.80);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.cockpit-memory-modal__panel{
  position:relative;
  width:min(880px,100%);
  max-height:min(88vh,860px);
  overflow:auto;
  overscroll-behavior:contain;
  border:1px solid rgba(200,164,92,.28);
  border-radius:22px;
  background:
    radial-gradient(circle at 88% 10%,rgba(200,164,92,.10),transparent 32%),
    linear-gradient(180deg,#101116 0%,#090a0e 100%);
  box-shadow:0 34px 90px rgba(0,0,0,.58),inset 0 1px 0 rgba(255,255,255,.04);
  color:var(--r4x-text-primary);
  isolation:isolate;
}
.cockpit-memory-modal__panel:focus{ outline:none; }
.cockpit-memory-modal__cap-bg{
  position:absolute;
  z-index:-1;
  width:min(46vw,390px);
  max-width:calc(100% - 72px);
  height:auto;
  right:28px;
  top:88px;
  color:#d0ad63;
  opacity:.065;
  transform:rotate(-8deg);
  pointer-events:none;
}
.cockpit-memory-modal__header{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:20px 22px 17px;
  border-bottom:1px solid rgba(160,169,191,.16);
  background:rgba(14,15,20,.94);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.cockpit-memory-modal__heading{ display:flex; align-items:center; gap:13px; min-width:0; }
.cockpit-memory-modal__cap-icon{
  width:42px;
  height:42px;
  flex:0 0 42px;
  color:#c8a45c;
  padding:7px;
  border-radius:12px;
  border:1px solid rgba(200,164,92,.24);
  background:rgba(200,164,92,.08);
}
.cockpit-memory-modal__kicker{
  display:block;
  margin-bottom:2px;
  color:#9da6bb;
  font-size:10px;
  font-weight:800;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.cockpit-memory-modal__header h2{
  margin:0;
  font-size:clamp(1.2rem,2.8vw,1.75rem);
  line-height:1.2;
}
.cockpit-memory-modal__close{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  flex:0 0 38px;
  padding:0;
  border:1px solid rgba(160,169,191,.18);
  border-radius:11px;
  background:rgba(255,255,255,.025);
  color:#c8cedb;
  font:inherit;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.cockpit-memory-modal__close:hover,
.cockpit-memory-modal__close:focus-visible{
  border-color:rgba(200,164,92,.36);
  color:#e2c77f;
  outline:none;
}
.cockpit-memory-modal__body{
  position:relative;
  z-index:1;
  padding:20px 22px 24px;
}
.cockpit-memory-modal__stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.cockpit-memory-modal__stat{
  min-width:0;
  display:grid;
  gap:2px;
  padding:13px 14px;
  border:1px solid rgba(160,169,191,.16);
  border-radius:13px;
  background:rgba(255,255,255,.025);
}
.cockpit-memory-modal__stat strong{
  color:#f2f4f8;
  font-size:1.28rem;
  line-height:1;
}
.cockpit-memory-modal__stat small{
  color:#9099ae;
  font-size:11px;
  line-height:1.3;
}
.cockpit-memory-modal__stat.is-due{ border-color:rgba(200,164,92,.32); background:rgba(200,164,92,.07); }
.cockpit-memory-modal__stat.is-due strong{ color:#ddc179; }
.cockpit-memory-modal__stat.is-secure strong{ color:#a9cab2; }
.cockpit-memory-modal__stat.is-unsure strong{ color:#cfb36e; }
.cockpit-memory-modal__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin:10px 1px 18px;
  color:#8f98aa;
  font-size:12px;
}
.cockpit-memory-modal__meta a{
  color:#bac2d3;
  font-weight:700;
  text-decoration:none;
}
.cockpit-memory-modal__meta a:hover,
.cockpit-memory-modal__meta a:focus-visible{ color:#e0c57c; text-decoration:underline; text-underline-offset:3px; outline:none; }
.cockpit-memory-modal__review{
  position:relative;
  overflow:hidden;
  min-height:310px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:clamp(22px,4vw,38px);
  border:1px solid rgba(200,164,92,.27);
  border-radius:18px;
  background:
    radial-gradient(circle at 84% 15%,rgba(200,164,92,.11),transparent 31%),
    rgba(5,6,9,.68);
  box-shadow:inset 3px 0 0 rgba(200,164,92,.26);
}
.cockpit-memory-modal__review-kicker{
  display:block;
  margin-bottom:10px;
  color:#c2a45f;
  font-size:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.cockpit-memory-modal__review h3{
  margin:0 0 8px;
  color:#f1f3f7;
  font-size:clamp(1.15rem,3vw,1.65rem);
  line-height:1.25;
}
.cockpit-memory-modal__term{
  max-width:760px;
  margin:0 0 18px;
  color:#fff;
  font-size:clamp(1.75rem,5.5vw,3.5rem);
  font-weight:800;
  line-height:1.06;
  letter-spacing:-.035em;
  text-wrap:balance;
}
.cockpit-memory-modal__question{
  max-width:620px;
  margin:0 0 18px;
  color:#9ca5b7;
  font-size:var(--r4x-size-sm);
  line-height:1.55;
}
.cockpit-memory-modal__explanation{
  max-width:680px;
  margin:0 0 18px;
  padding:14px 15px;
  border:1px solid rgba(160,169,191,.20);
  border-radius:12px;
  background:rgba(255,255,255,.035);
}
.cockpit-memory-modal__explanation span{
  display:block;
  margin-bottom:5px;
  color:#c8a45c;
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.cockpit-memory-modal__explanation p{
  margin:0;
  color:#c3c9d5;
  font-size:var(--r4x-size-sm);
  line-height:1.6;
}
.cockpit-memory-modal__actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:9px;
}
.cockpit-memory-modal__empty-state,
.cockpit-memory-modal__done-state{
  min-height:250px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:8px;
  padding:26px;
  border:1px solid rgba(160,169,191,.18);
  border-radius:18px;
  background:rgba(5,6,9,.62);
}
.cockpit-memory-modal__empty-state strong,
.cockpit-memory-modal__done-state strong{ color:#f0f2f7; font-size:1.1rem; }
.cockpit-memory-modal__empty-state p,
.cockpit-memory-modal__done-state p,
.cockpit-memory-modal__empty{ margin:0; color:#9ca5b7; line-height:1.55; }
.cockpit-memory-modal__done-mark{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid rgba(126,167,137,.28);
  background:rgba(126,167,137,.09);
  color:#a8c9b0;
  font-weight:800;
}

@media(max-width:760px){
  .cockpit-memory-dock__teaser{ display:none; }
  .cockpit-learning-memory{ margin-top:9px; }
  .cockpit-memory-dock{ min-height:48px; padding:6px 9px 6px 7px; gap:8px; }
  .cockpit-memory-dock__icon{ width:32px; height:32px; flex-basis:32px; }
  .cockpit-memory-dock__cap{ width:21px; height:21px; }
  .cockpit-memory-dock__badge{ min-height:22px; padding:2px 7px; font-size:10px; }
  .cockpit-learning-memory__active{ grid-template-columns:1fr; gap:10px; }
  .cockpit-learning-memory__active > :only-child{ grid-column:auto; }

  .cockpit-memory-modal{ align-items:end; padding:0; }
  .cockpit-memory-modal__panel{
    width:100%;
    max-height:calc(100svh - 22px);
    border-radius:22px 22px 0 0;
    border-left:0;
    border-right:0;
    border-bottom:0;
  }
  .cockpit-memory-modal__header{ padding:16px 15px 13px; }
  .cockpit-memory-modal__body{ padding:15px 14px calc(24px + env(safe-area-inset-bottom)); }
  .cockpit-memory-modal__cap-icon{ width:38px; height:38px; flex-basis:38px; }
  .cockpit-memory-modal__cap-bg{ width:260px; max-width:calc(100% - 36px); right:18px; top:118px; opacity:.055; }
  .cockpit-memory-modal__stats{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .cockpit-memory-modal__stat{ padding:11px 12px; }
  .cockpit-memory-modal__meta{ align-items:flex-start; flex-direction:column; gap:7px; margin-bottom:14px; }
  .cockpit-memory-modal__review{ min-height:300px; padding:22px 17px; }
  .cockpit-memory-modal__actions{ width:100%; }
  .cockpit-memory-modal__actions .cockpit-btn{ flex:1 1 150px; }
}

@media(max-width:430px){
  .cockpit-memory-dock__label{ font-size:12px; }
  .cockpit-memory-dock__open{ font-size:11px; }
  .cockpit-memory-dock__badge{ margin-left:auto; }
  .cockpit-memory-dock__open{ margin-left:0; }
  .cockpit-memory-modal__term{ font-size:clamp(1.65rem,10vw,2.5rem); }
}
