/* 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; }
