/* ========================================
   For Your Heart — Calm Depth Module + Screens
   ======================================== */

/* ---- Home module entry card ---- */
.heart-module {
  margin-top: 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(212,175,106,0.08), rgba(16,185,129,0.04) 60%, rgba(0,0,0,0));
  border: 1px solid rgba(212,175,106,0.18);
  padding: 1px; /* allows inner gradient breathing */
  cursor: pointer;
  transition: opacity 400ms ease, transform 400ms ease;
}
.heart-module:active { transform: scale(0.985); opacity: 0.9; }

.heart-module__inner {
  background: linear-gradient(180deg, rgba(8,12,20,0.6), rgba(8,12,20,0.85));
  border-radius: 17px;
  padding: 18px 18px 16px;
}

.heart-module__top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}
.heart-module__arabic {
  font-family: "Amiri", "Scheherazade New", "Noto Naskh Arabic", serif;
  font-size: 22px;
  color: #d4af6a;
  letter-spacing: 0;
  margin: 0;
  line-height: 1;
}
.heart-module__label {
  font-size: 16px;
  color: #fafaf6;
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.2px;
}
.heart-module__sub {
  font-size: 13.5px;
  color: rgba(250,250,246,0.62);
  margin: 0 0 14px 0;
  line-height: 1.45;
}
.heart-module__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #d4af6a;
  letter-spacing: 0.4px;
}

/* ---- Heart screens shared ---- */
.heart-screen {
  position: relative;
  min-height: 100%;
  background: linear-gradient(180deg, #04060b 0%, #060a14 50%, #02040a 100%);
  color: #fafaf6;
  overflow-y: auto;
  padding-bottom: 40px;
}
.heart-screen .v5-stars,
.heart-screen .v5-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.heart-screen .screen-header {
  position: relative;
  z-index: 2;
}

.heart-content {
  position: relative;
  z-index: 1;
  padding: 8px 22px 24px;
}
.heart-content--center {
  text-align: center;
  padding-top: 24px;
}

.heart-prompt__title {
  font-size: 22px;
  font-weight: 500;
  color: #fafaf6;
  margin: 6px 0 6px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
.heart-prompt__sub {
  font-size: 13.5px;
  color: rgba(250,250,246,0.55);
  margin: 0 0 18px 0;
  line-height: 1.45;
}

/* ---- Heart state groups + cards ---- */
.heart-group {
  margin-top: 22px;
}
.heart-group__label {
  font-size: 11.5px;
  color: rgba(212,175,106,0.7);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin: 0 0 10px 2px;
}

.heart-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.heart-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(250,250,246,0.07);
  border-radius: 14px;
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: border-color 300ms ease, background 300ms ease, transform 300ms ease;
  text-align: left;
  font-family: inherit;
  color: inherit;
  min-height: 76px;
}
.heart-card:hover { background: rgba(255,255,255,0.04); }
.heart-card:active { transform: scale(0.98); border-color: rgba(212,175,106,0.45); }
.heart-card__ar {
  font-family: "Amiri", "Scheherazade New", "Noto Naskh Arabic", serif;
  font-size: 19px;
  color: #d4af6a;
  line-height: 1;
}
.heart-card__en {
  font-size: 14px;
  color: #fafaf6;
  font-weight: 400;
  line-height: 1.25;
}

/* ---- Humility + crisis copy ---- */
.heart-humility {
  margin-top: 28px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(250,250,246,0.05);
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(250,250,246,0.6);
}
.heart-crisis {
  display: block;
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(250,250,246,0.45);
  text-decoration: underline;
  text-decoration-color: rgba(250,250,246,0.2);
  text-underline-offset: 3px;
}
.heart-crisis:hover { color: rgba(250,250,246,0.7); }

/* ---- Length screen ---- */
.heart-state-tag {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #d4af6a;
  background: rgba(212,175,106,0.08);
  border: 1px solid rgba(212,175,106,0.25);
  border-radius: 999px;
  padding: 6px 12px;
  margin: 12px auto 0;
}

.heart-length-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px auto 24px;
  max-width: 320px;
  text-align: left;
}
.heart-length {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(250,250,246,0.08);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 300ms ease, background 300ms ease, transform 300ms ease;
  font-family: inherit;
  color: inherit;
  text-align: left;
}
.heart-length:active {
  transform: scale(0.985);
  border-color: rgba(212,175,106,0.45);
  background: rgba(212,175,106,0.05);
}
.heart-length__title {
  font-size: 16px;
  color: #fafaf6;
  font-weight: 500;
  margin-bottom: 4px;
}
.heart-length__sub {
  font-size: 13px;
  color: rgba(250,250,246,0.55);
  line-height: 1.4;
}
.heart-length--ghost { background: transparent; }

/* ---- Result screen ---- */
.heart-result { text-align: center; padding-top: 18px; }
.heart-result__for {
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(212,175,106,0.7);
  margin: 0 0 22px;
}
.heart-result__arabic {
  font-family: "Amiri", "Scheherazade New", "Noto Naskh Arabic", serif;
  font-size: 56px;
  color: #d4af6a;
  margin: 0 0 10px 0;
  line-height: 1.25;
  font-weight: 400;
  direction: rtl;
}
.heart-result__title {
  font-size: 20px;
  color: #fafaf6;
  font-weight: 500;
  margin: 0 0 4px;
  letter-spacing: -0.1px;
}
.heart-result__english {
  font-size: 13.5px;
  color: rgba(250,250,246,0.55);
  font-style: italic;
  margin: 0 0 16px;
}
.heart-result__meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.heart-badge {
  font-size: 11.5px;
  letter-spacing: 0.8px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(250,250,246,0.12);
  color: rgba(250,250,246,0.75);
  background: rgba(255,255,255,0.02);
}
.heart-badge--type { color: #d4af6a; border-color: rgba(212,175,106,0.3); }

.heart-rationale {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(250,250,246,0.07);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 auto 14px;
  max-width: 360px;
  text-align: left;
}
.heart-rationale__text {
  font-size: 14.5px;
  color: rgba(250,250,246,0.85);
  line-height: 1.6;
  margin: 0;
}

.heart-basis {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(16,185,129,0.04);
  border: 1px solid rgba(16,185,129,0.14);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 auto 24px;
  max-width: 360px;
  text-align: left;
}
.heart-basis__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(16,185,129,0.15);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.heart-basis__label {
  font-size: 12px;
  color: #10b981;
  margin: 0 0 3px;
  letter-spacing: 0.4px;
  font-weight: 500;
}
.heart-basis__detail {
  font-size: 12.5px;
  color: rgba(250,250,246,0.65);
  margin: 0;
  line-height: 1.5;
}

.heart-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #d4af6a;
  color: #0a0e16;
  border: none;
  border-radius: 14px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  width: 100%;
  max-width: 360px;
  cursor: pointer;
  font-family: inherit;
  margin: 0 auto 10px;
  transition: opacity 300ms ease;
}
.heart-cta-primary:hover { opacity: 0.93; }
.heart-cta-secondary {
  display: block;
  width: 100%;
  max-width: 360px;
  background: transparent;
  border: 1px solid rgba(250,250,246,0.15);
  color: #fafaf6;
  border-radius: 14px;
  padding: 12px 24px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  margin: 0 auto 14px;
  transition: border-color 300ms ease;
}
.heart-cta-secondary:hover { border-color: rgba(250,250,246,0.35); }
.heart-link {
  display: inline-block;
  font-size: 13px;
  color: rgba(212,175,106,0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 16px;
}

.heart-why {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(250,250,246,0.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 auto 18px;
  max-width: 360px;
  text-align: left;
}
.heart-why__title {
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #d4af6a;
  margin: 0 0 8px;
}
.heart-why__body {
  font-size: 13.5px;
  color: rgba(250,250,246,0.78);
  line-height: 1.6;
  margin: 0 0 10px;
}
.heart-why__small {
  font-size: 12px;
  color: rgba(250,250,246,0.5);
  margin: 0;
  font-style: italic;
}

.heart-feedback {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(250,250,246,0.06);
  border-radius: 14px;
  padding: 16px;
  margin: 0 auto 16px;
  max-width: 360px;
  text-align: center;
}
.heart-feedback__q {
  font-size: 14px;
  color: #fafaf6;
  margin: 0 0 12px;
}
.heart-feedback__btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.heart-feedback__btns button {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(250,250,246,0.15);
  color: #fafaf6;
  border-radius: 10px;
  padding: 10px;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 300ms ease, background 300ms ease;
}
.heart-feedback__btns button:hover {
  border-color: rgba(212,175,106,0.4);
  background: rgba(212,175,106,0.05);
}

/* ========================================
   Additions: free-text path, mini-player, AI reflection, crisis sheet
   ======================================== */

/* "or" divider between cards and free-text on state screen */
.heart-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 14px;
  color: rgba(250,250,246,0.32);
  font-size: 11.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.heart-or::before, .heart-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(250,250,246,0.08);
}

/* Free-text entry card on state screen */
.heart-text-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: linear-gradient(160deg, rgba(212,175,106,0.06), rgba(16,185,129,0.03));
  border: 1px solid rgba(212,175,106,0.22);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: left;
  transition: border-color 300ms ease, transform 300ms ease;
}
.heart-text-entry:active { transform: scale(0.985); border-color: rgba(212,175,106,0.45); }
.heart-text-entry__icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(212,175,106,0.12);
  color: #d4af6a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.heart-text-entry__body { flex: 1; min-width: 0; }
.heart-text-entry__title {
  font-size: 14.5px;
  color: #fafaf6;
  margin: 0 0 3px;
  font-weight: 500;
}
.heart-text-entry__sub {
  font-size: 12.5px;
  color: rgba(250,250,246,0.55);
  margin: 0;
  line-height: 1.4;
}
.heart-text-entry__arrow {
  flex: 0 0 auto;
  color: rgba(250,250,246,0.4);
}

/* Free-text screen */
.heart-textarea-wrap {
  margin-top: 4px;
}
.heart-textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(250,250,246,0.1);
  border-radius: 14px;
  padding: 16px;
  color: #fafaf6;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.55;
  resize: none;
  outline: none;
  transition: border-color 300ms ease, background 300ms ease;
}
.heart-textarea::placeholder {
  color: rgba(250,250,246,0.28);
  font-style: italic;
}
.heart-textarea:focus {
  border-color: rgba(212,175,106,0.4);
  background: rgba(255,255,255,0.045);
}

/* AI notice block */
.heart-ai-notice {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(250,250,246,0.06);
  border-radius: 10px;
  align-items: flex-start;
}
.heart-ai-notice__icon {
  flex: 0 0 auto;
  color: rgba(212,175,106,0.7);
  margin-top: 1px;
}
.heart-ai-notice__text {
  font-size: 11.5px;
  color: rgba(250,250,246,0.55);
  line-height: 1.55;
  margin: 0;
}

/* Make the submit button full-width on text screen, centered */
#screenHeartText .heart-cta-primary {
  margin-top: 18px;
}

/* AI reflection block on result screen */
.heart-ai-reflection {
  background: linear-gradient(160deg, rgba(212,175,106,0.07), rgba(212,175,106,0.02));
  border: 1px solid rgba(212,175,106,0.25);
  border-radius: 14px;
  padding: 14px 16px 16px;
  margin: 0 auto 14px;
  max-width: 360px;
  text-align: left;
}
.heart-ai-reflection__label {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #d4af6a;
  margin: 0 0 6px;
  opacity: 0.85;
}
.heart-ai-reflection__body {
  font-size: 14px;
  color: rgba(250,250,246,0.85);
  line-height: 1.6;
  margin: 0;
}

/* Mini-player */
.heart-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(10,14,22,0.25);
  border-top-color: rgba(10,14,22,0.85);
  border-radius: 50%;
  animation: heart-spin 0.9s linear infinite;
}
@keyframes heart-spin { to { transform: rotate(360deg); } }

.heart-mini-player {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,175,106,0.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 4px auto 12px;
  max-width: 360px;
}
.heart-mini-player__times {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: rgba(250,250,246,0.55);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.heart-mini-player__track {
  height: 4px;
  background: rgba(250,250,246,0.08);
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 12px;
}
.heart-mini-player__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d4af6a, #c89855);
  border-radius: 999px;
  transition: width 200ms linear;
}
.heart-mini-player__controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.heart-mini-player__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(250,250,246,0.12);
  color: rgba(250,250,246,0.75);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 300ms ease, color 300ms ease;
}
.heart-mini-player__btn:hover {
  border-color: rgba(212,175,106,0.4);
  color: #d4af6a;
}

/* Crisis sheet (modal) */
.heart-crisis-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.heart-crisis-sheet[hidden] { display: none; }
.heart-crisis-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.heart-crisis-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, #0a0e16, #060a14);
  border-top: 1px solid rgba(212,175,106,0.25);
  border-radius: 20px 20px 0 0;
  padding: 22px 22px 28px;
  color: #fafaf6;
  animation: heart-sheet-up 320ms ease;
}
@keyframes heart-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.heart-crisis-sheet__title {
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 6px;
  color: #fafaf6;
}
.heart-crisis-sheet__sub {
  font-size: 13px;
  color: rgba(250,250,246,0.6);
  line-height: 1.5;
  margin: 0 0 16px;
}
.heart-crisis-sheet__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.heart-crisis-sheet__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(250,250,246,0.1);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms ease;
}
.heart-crisis-sheet__row:hover { border-color: rgba(212,175,106,0.4); }
.hcs-region {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #d4af6a;
}
.hcs-line {
  font-size: 14px;
  color: #fafaf6;
}
.heart-crisis-sheet__close {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(250,250,246,0.15);
  color: #fafaf6;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

/* ============================================================
   Per-card result wrappers (single + paired "Show me both")
   ============================================================ */

#heartResultCards {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.heart-pick-card {
  text-align: center;
  position: relative;
}

/* When two cards stack (Show me both) — separator + breathing room */
.heart-pick-card--in-pair {
  padding: 28px 0 32px;
  border-top: 1px solid rgba(212,175,106,0.14);
  margin-top: 8px;
}
.heart-pick-card--in-pair:first-child {
  border-top: none;
  padding-top: 4px;
  margin-top: 0;
}

/* Variant eyebrow that appears above each card in the pair view */
.heart-card-variant {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0 auto 18px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.03);
}
.heart-card-variant--quick {
  color: #10b981;
  border-color: rgba(16,185,129,0.28);
  background: rgba(16,185,129,0.06);
}
.heart-card-variant--deep {
  color: #d4af6a;
  border-color: rgba(212,175,106,0.32);
  background: rgba(212,175,106,0.06);
}
