/* ── MAGG role-space UX layer ──────────────────────────────── */

.top-actions { display: flex; gap: 8px; align-items: center; }

.chip-btn {
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(5,26,20,.42);
  color: var(--cream);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  font-size: .84rem;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.chip-btn:hover, .chip-btn:focus-visible { outline: none; border-color: var(--glow); background: rgba(22,76,58,.7); transform: translateY(-1px); }

.space-badge {
  position: relative; z-index: 2;
  display: inline-flex;
  margin-top: 18px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,230,108,.14);
  border: 1px solid rgba(255,230,108,.4);
  color: var(--yellow);
  font-size: .74rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Today dashboards */
.today-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  margin: clamp(26px,4vw,40px) 0 16px;
}
.today-card {
  border-radius: 18px;
  padding: 20px;
  background: rgba(5,26,20,.28);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.today-card h3 { margin: 10px 0 8px; font-size: 1.22rem; }
.today-card p { margin: 0 0 14px; line-height: 1.5; font-weight: 650; color: rgba(255,247,217,.9); font-size: 1.02rem; }
.today-tag {
  display: inline-flex; padding: 5px 11px; border-radius: 999px;
  background: rgba(255,230,108,.16); color: var(--yellow);
  font-size: .72rem; font-weight: 950; letter-spacing: .1em; text-transform: uppercase;
}

/* Quick action (Log a catch) */
.quick-action {
  position: relative; z-index: 2;
  width: 100%;
  display: flex; align-items: center; gap: 16px;
  margin: 6px 0 8px;
  padding: 18px 22px;
  border-radius: 20px;
  cursor: pointer;
  text-align: left;
  color: #0f2a1f;
  background: linear-gradient(135deg, rgba(255,230,108,.96), rgba(255,206,84,.94));
  border: 1px solid rgba(255,230,108,.6);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
  transition: transform .16s ease, box-shadow .16s ease;
}
.quick-action:hover, .quick-action:focus-visible { outline: none; transform: translateY(-2px); box-shadow: 0 18px 38px rgba(0,0,0,.34); }
.qa-icon {
  width: 46px; height: 46px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(15,42,31,.14);
  font-size: 1.8rem; font-weight: 800; line-height: 1;
}
.qa-text { display: flex; flex-direction: column; }
.qa-text strong { font-size: 1.2rem; }
.qa-text small { font-weight: 700; opacity: .78; }

.choose-line { color: var(--cream); }

/* Notes / banners */
.privacy-note, .progress-note, .demo-inline-note, .empty-note {
  position: relative; z-index: 2;
  border-radius: 14px;
  line-height: 1.55;
  font-weight: 650;
}
.privacy-note {
  margin: 22px 0 6px; padding: 14px 18px;
  background: rgba(122,178,158,.16);
  border: 1px solid rgba(160,210,190,.4);
  color: rgba(255,247,217,.94);
  font-size: .96rem;
}
.progress-note {
  margin: 20px 0 8px; padding: 16px 18px;
  background: rgba(5,26,20,.26);
  border: 1px solid var(--line);
  color: rgba(255,247,217,.92);
  font-size: 1rem;
}
.demo-inline-note {
  margin: 18px 0 0; padding: 12px 16px;
  background: rgba(255,230,108,.1);
  border: 1px dashed rgba(255,230,108,.42);
  color: rgba(255,247,217,.82);
  font-size: .88rem;
}
.empty-note {
  padding: 22px; background: rgba(5,26,20,.22); border: 1px solid var(--line);
  color: rgba(255,247,217,.72); font-style: italic; font-size: .98rem;
}

/* Lists (journal / sessions / queue) */
.journal-list { position: relative; z-index: 2; display: grid; gap: 12px; margin-top: 14px; }
.journal-entry, .session-card, .queue-item {
  border-radius: 18px; padding: 18px;
  background: rgba(5,26,20,.26);
  border: 1px solid var(--line);
}
.je-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.je-head h2, .je-head h3 { margin: 0; font-size: 1.18rem; }
.je-meta { margin: 8px 0 0; font-size: .9rem; color: rgba(255,247,217,.72); font-weight: 700; }
.je-reflection { margin: 12px 0 0; font-size: 1.02rem; line-height: 1.5; color: rgba(255,247,217,.92); font-style: italic; font-weight: 650; }
.je-care { margin: 10px 0 0; font-size: .88rem; color: rgba(255,247,217,.74); font-weight: 700; }
.joining-note { margin: 12px 0 0; font-size: .96rem; line-height: 1.5; color: rgba(255,247,217,.9); font-weight: 650; }
.je-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* Visibility + status badges (never red for ordinary states) */
.vis-badge, .mini-tag, .stone-chip {
  display: inline-flex; padding: 6px 12px; border-radius: 999px;
  font-size: .76rem; font-weight: 900; white-space: nowrap;
}
.vis-green  { background: rgba(122,178,158,.24); color: #dff3e6; border: 1px solid rgba(160,210,190,.5); }
.vis-blue   { background: rgba(120,166,196,.22); color: #dcecf6; border: 1px solid rgba(150,196,226,.5); }
.vis-amber  { background: rgba(255,200,90,.18);  color: #ffe9b8; border: 1px solid rgba(255,220,140,.5); }
.mini-tag   { background: rgba(255,255,255,.1); color: var(--cream); border: 1px solid var(--line); }

/* Pathway clusters */
.cluster-card {
  position: relative; z-index: 2;
  border-radius: 18px; padding: 18px 20px; margin-top: 12px;
  background: rgba(5,26,20,.26); border: 1px solid var(--line);
}
.cluster-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.cluster-head h3 { margin: 0; font-size: 1.2rem; }
.stone-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stone-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.08); font-weight: 650; color: rgba(255,247,217,.9); }
.stone-list li:first-child { border-top: none; }
.chip-explored   { background: rgba(122,178,158,.24); color: #dff3e6; border: 1px solid rgba(160,210,190,.5); }
.chip-revisiting { background: rgba(120,166,196,.2);  color: #dcecf6; border: 1px solid rgba(150,196,226,.45); }
.chip-neutral    { background: rgba(255,255,255,.08); color: rgba(255,247,217,.7); border: 1px solid var(--line); }

/* Keepsakes */
.keepsake-grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.keepsake-card { border-radius: 18px; padding: 16px; background: rgba(5,26,20,.26); border: 1px solid var(--line); }
.keepsake-thumb {
  width: 100%; aspect-ratio: 4/3; border-radius: 12px; margin-bottom: 12px;
  display: grid; place-items: center; font-size: 2rem; font-weight: 900; color: rgba(15,42,31,.5);
  background: linear-gradient(135deg, rgba(140,171,169,.7), rgba(122,178,158,.55));
}
.keepsake-card h3 { margin: 0 0 6px; font-size: 1.06rem; }
.keepsake-card p { margin: 0; font-size: .9rem; color: rgba(255,247,217,.78); font-weight: 650; line-height: 1.4; }

/* Calm forms */
.calm-form { position: relative; z-index: 2; display: grid; gap: 16px; margin-top: 20px; max-width: 640px; }
.form-field { display: grid; gap: 8px; }
.field-label { font-weight: 850; font-size: 1.02rem; }
.field-hint { font-style: normal; font-weight: 650; font-size: .84rem; color: var(--yellow); opacity: .9; }
.form-input {
  width: 100%; padding: 13px 15px; border-radius: 13px;
  background: rgba(5,26,20,.35); border: 1px solid rgba(255,255,255,.22);
  color: var(--cream); font-size: 1.02rem; font-family: inherit; font-weight: 650;
}
.form-input::placeholder { color: rgba(255,247,217,.5); }
.form-input:focus-visible { outline: none; border-color: var(--glow); background: rgba(5,26,20,.5); }
textarea.form-input { resize: vertical; }
.photo-drop {
  width: 100%; padding: 20px; border-radius: 14px; cursor: pointer;
  background: rgba(5,26,20,.25); border: 1px dashed rgba(255,255,255,.3);
  color: var(--cream); font-weight: 800; font-size: 1rem; font-family: inherit;
}
.photo-drop small { display: block; font-weight: 650; opacity: .6; margin-top: 4px; }
.photo-drop.added { border-color: rgba(160,210,190,.6); background: rgba(122,178,158,.16); }

.radio-row { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-pill { position: relative; }
.radio-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-pill span {
  display: inline-flex; padding: 11px 16px; border-radius: 999px;
  background: rgba(5,26,20,.32); border: 1px solid rgba(255,255,255,.22);
  color: var(--cream); font-weight: 750; font-size: .96rem; transition: all .15s ease;
}
.radio-pill input:checked + span { background: rgba(122,178,158,.28); border-color: rgba(160,210,190,.7); color: #eafaf0; }
.radio-pill input:focus-visible + span { outline: 2px solid var(--glow); outline-offset: 2px; }

.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn-primary {
  padding: 14px 26px; border-radius: 999px; cursor: pointer; border: none;
  background: linear-gradient(135deg, rgba(255,230,108,.98), rgba(255,206,84,.95));
  color: #10281d; font-weight: 900; font-size: 1.02rem; font-family: inherit;
  box-shadow: 0 12px 26px rgba(0,0,0,.26); transition: transform .15s ease;
}
.btn-primary.small { padding: 11px 18px; font-size: .92rem; }
.btn-primary:hover, .btn-primary:focus-visible { outline: none; transform: translateY(-2px); }
.btn-secondary {
  padding: 13px 22px; border-radius: 999px; cursor: pointer;
  background: rgba(5,26,20,.42); border: 1px solid rgba(255,255,255,.26);
  color: var(--cream); font-weight: 850; font-size: .98rem; font-family: inherit;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.btn-secondary:hover, .btn-secondary:focus-visible { outline: none; border-color: var(--glow); transform: translateY(-1px); background: rgba(22,76,58,.6); }

/* Checklists */
.check-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.check-item { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 8px 0; font-weight: 650; }
.check-item input { width: 22px; height: 22px; accent-color: #7ab29e; }

/* Safeguarding = distinct but calm (warm amber, never alarming red) */
.safeguard-panel, .safeguard-card {
  background: rgba(255,150,60,.1) !important;
  border: 1px solid rgba(255,170,80,.4) !important;
}

/* Toast */
.magg-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  z-index: 60; max-width: min(520px, 92vw);
  padding: 14px 22px; border-radius: 16px;
  background: rgba(12,42,32,.95); border: 1px solid rgba(160,210,190,.45);
  color: var(--cream); font-weight: 750; font-size: .98rem; line-height: 1.4;
  box-shadow: 0 18px 40px rgba(0,0,0,.42); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .3s ease, transform .3s ease; text-align: center;
}
.magg-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Accessible single-column view */
@media (max-width: 760px) {
  .today-grid, .keepsake-grid { grid-template-columns: 1fr; }
  .space-badge { margin-top: 14px; }
  .app-shell { padding-bottom: 96px; }
  .wing-av-widget { bottom: 16px; right: 10px; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
}
