/* ============================================================
   Sentiment Lens — landing/app page chrome (index.html).
   Report modules themselves live in report.css.
   Palette: #684280/#8C61AD/#7A5499 primary, #B9724E deviation
   hint, #F4F1F7 background, #2A2833/#746E80 text.
   No animations here — motion whitelist is AuraCard gradient +
   module fade-in only (see report.css).
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #F4F1F7;
  /* Extremely faint SVG noise texture (2.5% opacity), off in print */
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  color: #2A2833;
  line-height: 1.75;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ---- Top bar / auth status ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid #E1D9E8;
}
.brand {
  color: #684280;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.5px;
}
.auth-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #746E80;
  flex-wrap: wrap;
}
.auth-bar .balance {
  color: #684280;
  font-weight: 500;
}

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 44px 12px 32px;
}
.hero h1 {
  color: #2A2833;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.3;
  margin-bottom: 14px;
}
.hero .sub {
  color: #746E80;
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Generic panel ---- */
.panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: 0 1px 6px rgba(104, 66, 128, 0.06);
}
.panel-title {
  font-size: 16px;
  font-weight: 500;
  color: #684280;
  margin-bottom: 14px;
}

/* ---- Buttons ---- */
.btn {
  font: inherit;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid rgba(104, 66, 128, 0.35);
  background: #ffffff;
  color: #684280;
  cursor: pointer;
}
.btn:hover { background: rgba(104, 66, 128, 0.06); }
.btn.primary {
  background: #684280;
  border-color: #684280;
  color: #ffffff;
}
.btn.primary:hover { background: #7A5499; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.linkish {
  border: none;
  background: none;
  padding: 4px 6px;
  text-decoration: underline;
}

/* ---- Notice bar ---- */
.notice {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(104, 66, 128, 0.25);
  background: rgba(104, 66, 128, 0.05);
  color: #2A2833;
}
.notice.error {
  border-color: #E9D8CE;
  border-left: 3px solid #B9724E;
  background: rgba(249, 243, 239, 0.6);
}

/* ---- Letter input ---- */
#letter {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: #2A2833;
  background: #FDFCFe;
  border: 1px solid #DCD4E2;
  border-radius: 12px;
  padding: 14px 16px;
  resize: vertical;
  min-height: 180px;
  line-height: 1.7;
}
#letter:focus {
  outline: none;
  border-color: #8C61AD;
  box-shadow: 0 0 0 3px rgba(140, 97, 173, 0.12);
}
.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.counter {
  font-size: 13px;
  color: #746E80;
}
.counter.invalid { color: #B9724E; font-weight: 500; }
.privacy {
  margin-top: 14px;
  font-size: 13px;
  color: #868094;
}
.changed-hint {
  margin-top: 10px;
  font-size: 13px;
  color: #945A3C;
}

/* ---- Sample showcase ---- */
.value-list {
  list-style: none;
  margin-bottom: 12px;
}
.value-list li {
  position: relative;
  padding-left: 18px;
  margin: 8px 0;
  font-size: 15px;
  color: #444152;
}
.value-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  background: #8C61AD;
  opacity: 0.7;
  transform: rotate(45deg);
}
.text-link {
  color: #684280;
  font-size: 14px;
  text-decoration: underline;
}

/* ---- Pricing cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.price-card {
  position: relative;
  border: 1px solid #E1D9E8;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.price-card.best { border: 2px solid #8C61AD; }
.badge {
  position: absolute;
  top: -11px;
  left: 16px;
  background: #684280;
  color: #ffffff;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
}
.price-name { font-size: 15px; font-weight: 500; color: #2A2833; }
.price-value { font-size: 26px; font-weight: 600; color: #684280; }
.price-desc { font-size: 13px; color: #746E80; margin-bottom: 10px; }
.refund-note {
  margin-top: 16px;
  font-size: 13px;
  color: #868094;
}
.pay-status {
  margin-top: 12px;
  font-size: 14px;
  color: #684280;
  font-weight: 500;
}
/* Highlighted when balance is insufficient — outline only, no big color blocks */
#pricing.attn {
  outline: 2px solid rgba(140, 97, 173, 0.55);
  outline-offset: 4px;
}

/* ---- AuraCard actions ---- */
.aura-actions {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: 0 1px 6px rgba(104, 66, 128, 0.06);
  flex-wrap: wrap;
}
.aura-actions img {
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(104, 66, 128, 0.18);
  aspect-ratio: 9 / 16;
  width: 180px;
  height: auto;
}
.aura-actions .action-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
}
.aura-actions .hint {
  font-size: 13px;
  color: #746E80;
  max-width: 300px;
}

/* ---- Footer ---- */
.site-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #E1D9E8;
  font-size: 13px;
  color: #868094;
  line-height: 1.7;
}

/* ---- Loading veil (text rotates via JS; no CSS animation per whitelist) ---- */
.loading-veil {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(244, 241, 247, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(104, 66, 128, 0.12);
  padding: 34px 44px;
  text-align: center;
  max-width: 420px;
}
.loading-card p {
  color: #684280;
  font-size: 16px;
  font-weight: 500;
}
.loading-card .loading-sub {
  margin-top: 8px;
  font-size: 13px;
  color: #868094;
  font-weight: 400;
}

/* ---- Copy fallback modal (WebView clipboard workaround) ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(42, 40, 51, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px;
  max-width: 440px;
  width: 100%;
}
.modal-card p { font-size: 14px; color: #2A2833; margin-bottom: 12px; }
.modal-card input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #DCD4E2;
  border-radius: 10px;
  margin-bottom: 14px;
  color: #2A2833;
}

[hidden] { display: none !important; }

/* ---- Print: only the report itself should print ---- */
@media print {
  body { background: #ffffff; background-image: none; }
  .no-print { display: none !important; }
  .page { padding: 0; max-width: none; }
}
