/* HeartMate AI (916-2) · In-App Legal Gates, Reader Sheet, UGC Red-Line Banner & Wallet Notice */

/* ── 1. Full-Screen In-App Legal & Manual Reader Sheet ── */
.hml-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 260000;
  background: rgba(10, 8, 7, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: hmlFadeIn 0.18s ease;
}

@media (min-width: 720px) {
  .hml-sheet-backdrop {
    align-items: center;
    padding: 20px;
  }
}

@keyframes hmlFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hml-sheet {
  width: 100%;
  max-width: 760px;
  height: 90vh;
  max-height: 860px;
  background: #171210;
  border: 1px solid rgba(232, 168, 124, 0.25);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  color: #f5ebe6;
}

@media (min-width: 720px) {
  .hml-sheet {
    border-radius: 22px;
    height: 86vh;
  }
}

.hml-sheet-head {
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(232, 168, 124, 0.16);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(29, 23, 20, 0.96);
}

.hml-sheet-title {
  flex: 1;
  min-width: 140px;
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
}

.hml-sheet-langs {
  display: inline-flex;
  flex-shrink: 0;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(232, 168, 124, 0.18);
  border-radius: 999px;
  padding: 2px;
}

.hml-sheet-lang {
  border: 0;
  background: transparent;
  color: #bdaaa0;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.hml-sheet-lang.active {
  background: #e8a87c;
  color: #1a120f;
}

.hml-sheet-ext {
  font-size: 12px;
  color: #e8a87c;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(232, 168, 124, 0.3);
  background: rgba(232, 168, 124, 0.08);
  white-space: nowrap;
}

.hml-sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f5ebe6;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hml-sheet-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #14100e;
  scrollbar-width: none;
}
.hml-sheet-tabs::-webkit-scrollbar { display: none; }

.hml-sheet-tab {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  color: #bdaaa0;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}

.hml-sheet-tab.active {
  background: rgba(232, 168, 124, 0.18);
  border-color: rgba(232, 168, 124, 0.45);
  color: #f6cca8;
  font-weight: 700;
}

.hml-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 36px;
  -webkit-overflow-scrolling: touch;
}

.hml-sheet-body .lr-hero-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hml-sheet-body .lr-badge {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: rgba(232, 168, 124, 0.15); color: #e8a87c; border: 1px solid rgba(232, 168, 124, 0.3);
}
.hml-sheet-body .lr-badge.muted {
  background: rgba(255, 255, 255, 0.04); color: #bdaaa0; border-color: rgba(255, 255, 255, 0.12);
}
.hml-sheet-body .lr-title { font-size: 21px; font-weight: 800; color: #fff; margin: 0 0 8px; line-height: 1.3; }
.hml-sheet-body .lr-subtitle { font-size: 13.5px; color: #bdaaa0; margin: 0 0 16px; }
.hml-sheet-body .lr-pending-banner {
  background: rgba(232, 168, 124, 0.1); border: 1px solid rgba(232, 168, 124, 0.32);
  border-radius: 10px; padding: 10px 13px; font-size: 12px; color: #f3d5bf; margin-bottom: 16px; line-height: 1.6;
}
.hml-sheet-body .lr-summary-box {
  background: rgba(125, 211, 168, 0.09); border: 1px solid rgba(125, 211, 168, 0.25);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; font-size: 13px; color: #d9ece2; line-height: 1.6;
}
.hml-sheet-body .lr-summary-box strong { display: block; color: #7dd3a8; margin-bottom: 4px; }
.hml-sheet-body .lr-summary-box p { margin: 0; }
.hml-sheet-body .lr-section { padding-top: 16px; margin-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.hml-sheet-body .lr-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.hml-sheet-body .lr-section h2 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 9px; }
.hml-sheet-body .lr-section p { font-size: 13.6px; color: #e6d8d1; line-height: 1.72; margin: 0 0 9px; }
.hml-sheet-body .lr-section ul { margin: 6px 0 10px 18px; padding: 0; color: #e6d8d1; font-size: 13.4px; line-height: 1.68; }
.hml-sheet-body .lr-section li { margin-bottom: 6px; }
.hml-sheet-body .lr-section a { color: #e8a87c; }
.hml-sheet-body .lr-callout {
  background: rgba(255, 255, 255, 0.04); border-left: 3px solid #e8a87c; border-radius: 8px;
  padding: 10px 12px; margin: 10px 0; font-size: 13px; color: #f3dfd2; line-height: 1.65;
}
.hml-sheet-body .lr-callout.danger {
  background: rgba(224, 98, 108, 0.12); border: 1px solid rgba(224, 98, 108, 0.35); border-left-width: 3px; color: #ffdce0;
}
.hml-sheet-body .lr-footer {
  margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(232, 168, 124, 0.16);
  font-size: 12px; color: #8c7b75; line-height: 1.6;
}
.hml-sheet-body .lr-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 14px; }
.hml-sheet-body .lr-figure { margin: 0; background: #100c0a; border: 1px solid rgba(232, 168, 124, 0.3); border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.hml-sheet-body .lr-figure-imgwrap { position: relative; background: #0c0908; display: flex; justify-content: center; align-items: center; }
.hml-sheet-body .lr-figure img { display: block; width: 100%; max-height: 540px; object-fit: contain; }
.hml-sheet-body .lr-figure-zoom { position: absolute; right: 8px; bottom: 8px; font-size: 10.5px; font-weight: 600; color: #fff; background: rgba(15, 11, 10, 0.8); border: 1px solid rgba(232, 168, 124, 0.38); padding: 2px 8px; border-radius: 999px; pointer-events: none; }
.hml-sheet-body .lr-figure figcaption { padding: 8px 11px; font-size: 11.8px; line-height: 1.48; color: #bdaaa0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.lr-lightbox { position: fixed; inset: 0; z-index: 300000; background: rgba(8, 6, 5, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; cursor: zoom-out; }
.lr-lightbox img { max-width: 94vw; max-height: 82vh; border-radius: 14px; border: 1px solid rgba(232, 168, 124, 0.35); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75); }
.lr-lightbox-cap { margin-top: 12px; max-width: 720px; text-align: center; font-size: 13px; color: #f3dfd2; }
.lr-lightbox-close { position: fixed; top: 16px; right: 18px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(20, 15, 13, 0.85); color: #fff; font-size: 22px; cursor: pointer; }

/* ── 2. Returning-User / Versioned 18+ Compliance Gate Modal ── */
.hml-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 255000;
  background: rgba(12, 9, 8, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hml-gate-card {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #241b17 0%, #17110f 100%);
  border: 1px solid rgba(232, 168, 124, 0.3);
  border-radius: 22px;
  padding: 22px 20px 20px;
  color: #f5ebe6;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.hml-gate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.hml-gate-brand {
  font-size: 12.5px;
  font-weight: 700;
  color: #e8a87c;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.hml-gate-h2 {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.35;
}

.hml-gate-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hml-gate-list li {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12.8px;
  line-height: 1.58;
  color: #e5d5ce;
}

.hml-gate-list li strong {
  color: #f7caa8;
}

.hml-gate-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.8px;
  line-height: 1.55;
  color: #f5ebe6;
  cursor: pointer;
  margin-bottom: 14px;
  user-select: none;
}

.hml-gate-check input {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: #e8a87c;
  flex-shrink: 0;
}

.hml-gate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.hml-inline-link {
  border: 0;
  background: rgba(232, 168, 124, 0.12);
  color: #f2be97;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}

.hml-inline-link:hover {
  background: rgba(232, 168, 124, 0.22);
}

.hml-gate-btn {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #e8a87c, #d48c7e);
  color: #1b120e;
  transition: opacity 0.16s ease, transform 0.12s ease;
}

.hml-gate-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.hml-gate-btn.danger {
  background: linear-gradient(135deg, #e05263, #b83345);
  color: #fff;
}

.hml-gate-btn-row {
  display: flex;
  gap: 10px;
}

.hml-gate-cancel {
  flex: 0.9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e5d5ce;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ── 3. #hm-login Extra Notice Strip ── */
.hml-login-notices {
  text-align: left;
  background: rgba(232, 168, 124, 0.08);
  border: 1px solid rgba(232, 168, 124, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0 12px;
  font-size: 11.8px;
  line-height: 1.55;
  color: #e5cfc4;
}
.hml-login-notices div { margin-bottom: 4px; }
.hml-login-notices div:last-child { margin-bottom: 0; }

/* ── 4. UGC Studio Top Red-Line Banner & Pre-Submit Covenant Gate (Warm Cinema Dark) ── */
.hml-ugc-banner {
  background: linear-gradient(135deg, rgba(44, 30, 29, 0.92) 0%, rgba(30, 22, 21, 0.95) 100%);
  border: 1px solid var(--wc-border-rose, rgba(201, 142, 138, 0.34));
  border-radius: 16px;
  padding: 13px 15px;
  margin-bottom: 12px;
  color: var(--wc-text-secondary, #D4C2B8);
}

.hml-ugc-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.hml-ugc-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--wc-gold-bright, #E8CFA2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hml-ugc-banner-toggle {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--wc-rose-bright, #E2ACA7);
  white-space: nowrap;
}

.hml-ugc-redlines {
  margin: 9px 0 10px 18px;
  padding: 0;
  font-size: 12.2px;
  line-height: 1.65;
  color: var(--wc-text-secondary, #D4C2B8);
}

.hml-ugc-redlines li { margin-bottom: 4px; }
.hml-ugc-redlines li strong { color: var(--wc-text-primary, #F6EEE9); }

.hml-ugc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.hml-ugc-chip {
  border: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.28));
  background: rgba(212, 180, 131, 0.10);
  color: var(--wc-gold-bright, #E8CFA2);
  font-size: 11.8px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hml-ugc-chip:hover {
  background: rgba(212, 180, 131, 0.20);
  border-color: var(--wc-gold, #D4B483);
}

.hml-ugc-covenant-card {
  background: rgba(38, 29, 26, 0.90);
  border: 1px solid var(--wc-border-default, rgba(212, 180, 131, 0.26));
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
  margin-bottom: 6px;
}

.hml-ugc-covenant-card.is-warn {
  border-color: var(--wc-danger, #DF8288);
  background: rgba(223, 130, 136, 0.14);
  box-shadow: 0 0 0 3px rgba(223, 130, 136, 0.16);
}

.hml-ugc-covenant-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--wc-text-secondary, #D4C2B8);
  cursor: pointer;
}

.hml-ugc-covenant-label input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--wc-gold, #D4B483);
  flex-shrink: 0;
}

.hml-ugc-covenant-label button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--wc-gold-bright, #E8CFA2);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

/* ── 5. Wallet / Monetization Legal Footer Notice ── */
.hml-wallet-legal {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(232, 168, 124, 0.16);
  font-size: 11.4px;
  line-height: 1.6;
  color: #bdaaa0;
}

.hml-wallet-legal button {
  border: 0;
  background: none;
  padding: 0 2px;
  color: #e8a87c;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}
