:root {
  --primary: #159a9c;
  --primary-strong: #0f7273;
  --accent: #6ee7b7;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e2ec;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --danger: #c2410c;
  --danger-soft: #fff4ed;
  --warning: #b45309;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  min-height: 100%;
  background: #eef4f7;
  overflow: hidden;
}

body {
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #f7fbff 0%, #eef3f9 50%, #f8fafc 100%);
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: flex;
  flex-direction: column;
  width: min(100%, 430px);
  height: 100vh;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  padding: 10px 10px 0;
  background: rgba(247, 250, 252, 0.9);
  transition: transform 160ms ease;
  will-change: transform;
}

.app-shell > main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.app-shell > main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@supports (height: 100dvh) {
  body,
  .app-shell {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.topbar,
.home-appbar,
.section-heading,
.item-topline,
.modal-heading,
.wellbeing-title-row,
.usage-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(217, 226, 236, 0.82);
  border-radius: 16px;
  padding: 12px;
  background:
    radial-gradient(circle at 92% 10%, rgba(223, 244, 242, 0.72), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 248, 0.9));
  box-shadow: 0 18px 38px rgba(16, 24, 40, 0.08);
  backdrop-filter: blur(16px);
}

.topbar::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -14px;
  width: 68px;
  height: 74px;
  border-radius: 999px 0 0 0;
  border-left: 2px solid rgba(45, 183, 179, 0.13);
  background:
    linear-gradient(35deg, transparent 42%, rgba(45, 183, 179, 0.14) 43% 45%, transparent 46%),
    linear-gradient(65deg, transparent 54%, rgba(45, 183, 179, 0.12) 55% 57%, transparent 58%),
    linear-gradient(135deg, rgba(223, 244, 242, 0.34), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.topbar > div:first-child {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.topbar-actions {
  position: relative;
  z-index: 1;
}

.is-home-view .app-shell {
  padding-top: 8px;
}

.is-auth-view .app-shell > main {
  padding-bottom: 24px;
}

.topbar h1,
.home-appbar h2,
.section-heading h2,
.modal-heading h2,
#profile-title {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  color: #18233d;
  font-size: clamp(1.25rem, 6vw, 1.52rem);
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.topbar-subtitle {
  max-width: 280px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.topbar .eyebrow {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 820;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.eyebrow,
.label,
.muted,
small {
  color: var(--muted);
}

.eyebrow,
.label {
  display: block;
  margin: 0 0 3px;
  font-size: 0.76rem;
  font-weight: 700;
}

.muted {
  margin: 4px 0 0;
  line-height: 1.45;
}

.topbar-actions,
.topbar-menu-actions,
.home-action-buttons,
.action-row,
.modal-actions,
.quick-grid,
.field-row,
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-menu-actions {
  display: flex;
}

.is-auth-view .topbar-menu-actions {
  display: none;
}

.is-auth-view .bottom-nav {
  display: none;
}

.icon-button,
.home-icon-button,
.small-button,
.ghost-button,
.primary-button,
.quick-action,
.filter-chip,
.tag-chip,
.segment {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  min-height: 42px;
}

.icon-button,
.home-icon-button {
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  place-items: center;
  border-radius: 999px;
}

.primary-button {
  width: 100%;
  padding: 12px 16px;
  border-color: transparent;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 22px rgba(21, 154, 156, 0.18);
}

.ghost-button,
.small-button {
  padding: 9px 13px;
  background: #fff;
}

.danger-button {
  color: var(--danger);
  border-color: #fed7aa;
  background: var(--danger-soft);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

#view-journal.view.is-active {
  display: flex;
  min-height: 0;
  height: calc(100vh - 142px);
  flex-direction: column;
}

@supports (height: 100dvh) {
  #view-journal.view.is-active {
    height: calc(100dvh - 142px);
  }
}

.auth-panel,
.summary-strip,
.profile-block,
.profile-hero-panel,
.profile-settings-panel,
.onboarding-panel,
.connection-panel,
.billing-panel,
.privacy-panel,
.search-panel,
.monthly-report-panel,
.item-card,
.latest-entry-card,
.wellbeing-card,
.home-month-panel,
.insight-card,
.billing-current-card {
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.auth-panel,
.profile-block,
.profile-settings-panel,
.onboarding-panel,
.connection-panel,
.billing-panel,
.privacy-panel,
.search-panel,
.monthly-report-panel,
.wellbeing-card,
.home-month-panel {
  padding: 16px;
}

.journey-monthly-panel {
  display: grid;
  gap: 12px;
  border-color: rgba(21, 154, 156, 0.18);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.journey-monthly-panel .section-heading h2 {
  font-size: 1.02rem;
}

.journey-monthly-panel .inline-form {
  border: 1px solid rgba(217, 226, 236, 0.8);
  border-radius: 8px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.88);
}

.auth-panel {
  margin-top: 16vh;
}

.auth-panel.auth-google-only {
  text-align: center;
}

.google-auth-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.google-auth-panel .muted {
  text-align: center;
  font-size: 0.82rem;
}

.auth-google-only .google-auth-panel {
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 31px;
  margin-top: 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.plan-badge-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
}

.plan-badge-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.95;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-badge:hover,
.plan-badge:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.11);
}

.plan-badge:focus-visible {
  outline: 3px solid rgba(124, 83, 230, 0.18);
  outline-offset: 2px;
}

.plan-gratis {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.plan-prata {
  border-color: #94a3b8;
  background: #eef2f7;
  color: #334155;
}

.plan-ouro {
  border-color: #facc15;
  background: #fef9c3;
  color: #854d0e;
}

.plan-diamante {
  border-color: #67dce8;
  background: linear-gradient(135deg, #ecfeff, #eaf4ff);
  color: #0e7490;
}

.form-stack,
.modal-readonly {
  display: grid;
  gap: 13px;
}

label span,
.tag-field > .label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.tag-combobox {
  position: relative;
  display: grid;
  gap: 8px;
}

.selected-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 0;
}

.selected-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid rgba(21, 154, 156, 0.28);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(21, 154, 156, 0.11);
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 900;
}

.selected-tag-chip.is-custom {
  border-color: rgba(124, 83, 230, 0.24);
  background: rgba(124, 83, 230, 0.1);
  color: #6842c2;
}

.selected-tag-chip span:first-child {
  max-width: 210px;
  overflow-wrap: anywhere;
}

.tag-search-box {
  position: relative;
}

.tag-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  max-height: 188px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.tag-option {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 8px 9px;
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
  text-align: left;
}

.tag-option:hover,
.tag-option:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.tag-option-empty {
  padding: 9px;
  color: var(--muted);
  font-size: 0.82rem;
}

.entry-other-field {
  margin-top: 4px;
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.segment {
  border-color: transparent;
}

.segment.is-active,
.filter-chip.is-selected,
.tag-chip.is-selected,
.mood-face-row button.is-selected {
  border-color: var(--primary);
  background: rgba(21, 154, 156, 0.12);
  color: var(--primary-strong);
}

.home-appbar {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(217, 226, 236, 0.82);
  border-radius: 16px;
  padding: 13px 12px;
  background:
    radial-gradient(circle at 92% 10%, rgba(223, 244, 242, 0.9), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 248, 0.9));
  box-shadow: 0 18px 38px rgba(16, 24, 40, 0.08);
}

.home-appbar::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -12px;
  width: 68px;
  height: 74px;
  border-radius: 999px 0 0 0;
  border-left: 2px solid rgba(45, 183, 179, 0.16);
  background:
    linear-gradient(35deg, transparent 42%, rgba(45, 183, 179, 0.18) 43% 45%, transparent 46%),
    linear-gradient(65deg, transparent 54%, rgba(45, 183, 179, 0.16) 55% 57%, transparent 58%),
    linear-gradient(135deg, rgba(223, 244, 242, 0.44), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.home-appbar > div {
  position: relative;
  z-index: 1;
}

.home-appbar h2 {
  color: #18233d;
  font-size: clamp(1.25rem, 6vw, 1.52rem);
  font-weight: 950;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.home-brand-mark {
  position: relative;
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #14a6aa;
}

.home-brand-mark svg {
  width: 45px;
  height: 45px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #8b6de8;
}

.spark-one {
  top: -1px;
  right: 13px;
}

.spark-two {
  left: -3px;
  bottom: 13px;
  width: 3px;
  height: 3px;
  background: #2db7b3;
}

.home-title-block {
  min-width: 0;
}

.home-salutation,
#home-copy,
.item-date {
  margin: 0;
  color: var(--muted);
}

.home-salutation {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 820;
}

.home-button-icon,
.atlas-icon,
.home-metric-icon,
.quick-icon,
.latest-entry-icon {
  color: var(--primary-strong);
}

.home-button-icon svg,
.atlas-icon svg,
.home-metric-icon svg,
.quick-icon svg,
.latest-entry-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-button-icon {
  display: inline-grid;
  place-items: center;
}

.dashboard-grid,
.home-month-grid,
.journey-grid,
.dashboard-insights,
.plan-grid {
  display: grid;
  gap: 12px;
}

.journey-hero-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(21, 154, 156, 0.18);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #e6fffb 0%, #ffffff 62%);
  box-shadow: var(--shadow);
}

.journey-hero-icon,
.journey-card-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--primary-strong);
  font-weight: 950;
}

.journey-hero-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.18;
}

.journey-hero-card p {
  margin: 4px 0 0;
  color: #344054;
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1.42;
}

.journey-hero-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.journey-hero-metrics span {
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.journey-hero-metrics strong,
.journey-hero-metrics small {
  display: block;
}

.journey-hero-metrics strong {
  color: var(--primary-strong);
  font-size: 1.18rem;
  font-weight: 950;
  line-height: 1;
}

.journey-hero-metrics small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.home-month-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.metric-card {
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.home-month-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(217, 226, 236, 0.84);
  border-radius: 14px;
  padding: 13px;
  background:
    radial-gradient(circle at 94% 12%, rgba(223, 244, 242, 0.62), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.home-metric-card {
  display: grid;
  gap: 3px;
  justify-items: center;
  border-color: rgba(217, 226, 236, 0.9);
  border-radius: 10px;
  min-height: 86px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: none;
}

.metric-card strong {
  display: block;
  margin: 4px 0;
  font-size: 1.35rem;
}

.home-metric-card strong {
  margin: 1px 0;
  color: #18233d;
  font-size: 1.12rem;
  line-height: 1.05;
}

.home-metric-card .label,
.home-metric-card small {
  margin: 0;
  line-height: 1.1;
}

.home-metric-card .label {
  color: #56627a;
  font-size: 0.72rem;
  font-weight: 820;
}

.home-metric-card small {
  color: #667085;
  font-size: 0.68rem;
  font-weight: 760;
}

.home-metric-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
}

.home-metric-icon svg {
  width: 18px;
  height: 18px;
}

.home-metric-icon.metric-analysis {
  background: #eaf4f9;
  color: #13759e;
}

.home-metric-icon.metric-mood {
  background: #f5f3ff;
  color: #7c5cde;
}

.home-metric-icon.metric-session {
  background: #fffbeb;
  color: #d97706;
}

.care-streak-pill,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(223, 244, 242, 0.9);
  color: var(--primary-strong);
  font-size: 0.74rem;
  font-weight: 900;
}

.home-wellbeing-card,
.home-quick-grid,
.latest-entry-card,
.profile-block,
.profile-action-grid,
.profile-settings-panel,
.connection-panel,
.billing-panel,
.search-panel,
.dashboard-insights,
.monthly-report-panel {
  margin-top: 10px;
}

.home-wellbeing-card {
  display: grid;
  gap: 10px;
}

.home-section-heading {
  align-items: center;
}

.view-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 2px 14px;
}

.view-title-row {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.view-title-row > div {
  min-width: 0;
}

.view-title-row h2 {
  margin: 0;
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: 0;
}

.view-title-row .muted {
  max-width: 310px;
  margin-top: 3px;
}

.view-header-button {
  min-width: fit-content;
  white-space: nowrap;
}

.view-page-header + .search-panel,
.view-page-header + .profile-hero-panel,
.view-page-header + .journey-tabs {
  margin-top: 0;
}

#view-journey {
  display: none;
}

#view-journey.view.is-active {
  display: grid;
  gap: 12px;
}

.home-month-title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.home-month-title-row strong {
  color: #18233d;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.15;
}

.wellbeing-title-row {
  justify-content: flex-start;
  gap: 9px;
}

.wellbeing-title-row strong {
  color: #18233d;
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.15;
}

.home-icon-button {
  border-color: rgba(217, 226, 236, 0.9);
  background: rgba(255, 255, 255, 0.88);
  color: #0f7273;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.08);
}

.home-icon-button .icon-notification {
  color: #d97706;
}

.home-wellbeing-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(217, 226, 236, 0.84);
  border-radius: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at 8% 9%, rgba(233, 227, 247, 0.7), transparent 25%),
    linear-gradient(135deg, #ffffff 0%, #fbfdff 100%);
}

.home-wellbeing-card::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 52px;
  height: 42px;
  background:
    radial-gradient(circle at 70% 20%, #8b6de8 0 3px, transparent 4px),
    radial-gradient(circle at 40% 60%, #2db7b3 0 2px, transparent 3px);
  opacity: 0.7;
  pointer-events: none;
}

.home-mood-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.home-mood-control .mood-avatar {
  display: none;
}

.home-mood-control input[type="range"] {
  --mood-progress: 44.444%;
  appearance: none;
  min-width: 0;
  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.home-mood-control input[type="range"]::-webkit-slider-runnable-track {
  height: 9px;
  border: 1px solid #b8d9da;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--primary) 0 var(--mood-progress),
    #eef4f7 var(--mood-progress) 100%
  );
}

.home-mood-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -6px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 5px 12px rgba(21, 154, 156, 0.28);
  cursor: pointer;
}

.home-mood-control input[type="range"]::-moz-range-track {
  height: 9px;
  border: 1px solid #b8d9da;
  border-radius: 999px;
  background: #eef4f7;
}

.home-mood-control input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.home-mood-control input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 5px 12px rgba(21, 154, 156, 0.28);
  cursor: pointer;
}

#wellbeing-current-value {
  color: var(--primary-strong);
  font-size: 1.24rem;
  font-weight: 950;
  line-height: 1;
}

.home-save-button {
  min-height: 44px;
  margin: 2px 0 5px;
  border-radius: 10px;
  background: linear-gradient(90deg, #18a7a9, #2db7b3);
  box-shadow: 0 16px 28px rgba(21, 154, 156, 0.2);
}

.mood-avatar,
.wellbeing-heart,
.home-month-icon,
.view-title-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--primary-strong);
  box-shadow: 0 10px 20px rgba(21, 154, 156, 0.12);
}

.wellbeing-heart {
  background: #f5f3ff;
  color: #7c5cde;
}

.home-month-icon {
  background: #e6fffb;
}

.mood-face-row,
.compact-mood-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.mood-face-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  font-size: 1.06rem;
}

.marker-link {
  width: fit-content;
  border: 0;
  background: transparent;
  color: #7c5cde;
  font-size: 0.9rem;
  font-weight: 900;
}

.home-note-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.86);
}

.home-note-field input {
  min-height: 42px;
  border: 0;
  background: transparent;
  padding: 0;
}

.home-note-field input:focus {
  outline: none;
}

.home-note-icon {
  display: inline-grid;
  margin: 0;
  color: #94a3b8;
  font-size: initial;
}

.home-note-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 66px;
  border-radius: 12px;
  padding: 10px;
  border-color: rgba(21, 154, 156, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  text-align: left;
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.08);
}

.quick-action:active {
  transform: translateY(1px);
}

.quick-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--primary-strong);
  font-size: 1.18rem;
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(21, 154, 156, 0.12);
}

.quick-icon svg {
  width: 19px;
  height: 19px;
}

.quick-icon.secondary-icon {
  background: #eaf4f9;
  color: #13759e;
}

.quick-action strong,
.quick-action small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.quick-action strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.1;
}

.quick-action small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.quick-arrow,
.latest-entry-arrow {
  color: #5b6b86;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}

.summary-strip,
.billing-current-card,
.profile-hero-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-color: rgba(21, 154, 156, 0.18);
  background: linear-gradient(135deg, #e6fffb 0%, #ffffff 62%);
}

.latest-entry-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(21, 154, 156, 0.18);
  border-radius: 14px;
  padding: 13px;
  background:
    radial-gradient(circle at 94% 14%, rgba(223, 244, 242, 0.96), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #e6fffb 120%);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.latest-entry-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--primary-strong);
  box-shadow: 0 10px 20px rgba(21, 154, 156, 0.12);
}

.latest-entry-card > div {
  min-width: 0;
}

.latest-entry-card strong,
.latest-entry-card p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.latest-entry-card strong {
  display: block;
  color: #18233d;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.18;
}

.latest-entry-card p {
  margin: 5px 0 0;
  color: #344054;
  display: -webkit-box;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.latest-entry-card:disabled {
  cursor: default;
  opacity: 1;
}

.profile-hero-icon,
.profile-section-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--primary-strong);
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(21, 154, 156, 0.12);
}

.profile-hero-panel strong {
  display: block;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 950;
  line-height: 1.18;
}

.profile-hero-panel p {
  margin: 4px 0 0;
  color: #344054;
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1.42;
}

.profile-code-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.profile-code-card .label {
  grid-column: 1 / -1;
}

.profile-code-card .copyable-id {
  min-width: 0;
  font-size: 0.94rem;
}

.profile-action-grid {
  display: grid;
  gap: 10px;
}

.profile-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.profile-action-card strong,
.profile-action-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-action-card small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.profile-action-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: rgba(21, 154, 156, 0.12);
  color: var(--primary-strong);
  font-weight: 900;
}

.passive-card {
  box-shadow: none;
}

.profile-settings-panel,
.profile-field-grid,
.profile-preferences-panel {
  display: grid;
  gap: 13px;
}

.profile-settings-panel {
  border-color: rgba(217, 226, 236, 0.9);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.profile-field-grid label,
.profile-preferences-panel label {
  border: 1px solid rgba(217, 226, 236, 0.84);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.profile-field-grid input[readonly],
.profile-field-grid select:disabled {
  background: #f8fafc;
  color: #475467;
}

.profile-preferences-panel {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.privacy-panel .section-heading,
.connection-panel .section-heading {
  align-items: center;
}

.privacy-panel {
  border-color: rgba(124, 83, 230, 0.18);
  background: linear-gradient(135deg, #f5f3ff, #ffffff);
}

.legal-status-card,
.privacy-request-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(21, 154, 156, 0.16);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 255, 251, 0.72));
}

.legal-status-card strong,
.privacy-request-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.legal-status-card small,
.privacy-request-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.privacy-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.privacy-action-grid .small-button {
  min-height: 42px;
  white-space: normal;
}

.privacy-request-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.privacy-request-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  box-shadow: none;
}

.privacy-request-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.38;
}

.connection-panel {
  border-color: rgba(21, 154, 156, 0.16);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.connection-panel .inline-form {
  border: 1px solid rgba(217, 226, 236, 0.84);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.profile-connection-card {
  display: grid;
  gap: 9px;
  box-shadow: none;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.profile-connection-topline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.profile-connection-topline strong,
.profile-connection-topline small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-connection-topline strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.18;
}

.profile-connection-topline small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  line-height: 1.28;
}

.profile-connection-card p {
  margin: 0;
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-soft);
  color: #344054;
  font-size: 0.78rem;
  font-weight: 820;
  overflow-wrap: anywhere;
}

.onboarding-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.onboarding-modal-panel {
  max-height: min(88vh, 760px);
}

.choice-dropdown {
  display: grid;
  gap: 7px;
}

.choice-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.choice-dropdown-toggle span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.choice-dropdown-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.list,
.usage-stack {
  display: grid;
  gap: 10px;
}

.item-card,
.insight-card,
.plan-card,
.usage-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.journey-insight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  box-shadow: none;
}

.journey-insight-card strong,
.journey-insight-card p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.journey-insight-card strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.22;
}

.journey-insight-card p {
  margin: 5px 0 0;
  color: #344054;
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1.42;
}

.journey-insight-card .small-button {
  margin-top: 10px;
}

.journey-insight-card.is-report {
  border-color: rgba(21, 154, 156, 0.22);
  background: linear-gradient(135deg, rgba(21, 154, 156, 0.08), #fff);
}

.journey-insight-card.is-mood {
  border-color: rgba(124, 83, 230, 0.22);
  background: #f5f3ff;
}

.journey-insight-card.is-mood .journey-card-icon {
  background: #ede9fe;
}

.journey-insight-card.is-tags {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffbeb;
}

.journey-insight-card.is-tags .journey-card-icon {
  background: #fef3c7;
}

.journey-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.journey-metric-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  text-align: left;
  box-shadow: none;
}

.journey-metric-card strong {
  margin: 1px 0 0;
  color: var(--primary-strong);
  font-size: 1.32rem;
  line-height: 1;
}

.journey-metric-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.compact-card {
  box-shadow: none;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.meta-grid span {
  min-width: 0;
  border-radius: 8px;
  padding: 7px 8px;
  background: var(--surface-soft);
  color: #344054;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.journal-list-panel,
.summary-list-panel,
.download-history-panel {
  margin-top: 12px;
}

.journal-scroll-panel {
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 1px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(21, 154, 156, 0.38) transparent;
  -webkit-overflow-scrolling: touch;
}

.journal-scroll-panel::-webkit-scrollbar {
  width: 6px;
}

.journal-scroll-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(21, 154, 156, 0.34);
}

.journal-scroll-panel .journal-search-panel {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 10px;
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at 94% 10%, rgba(223, 244, 242, 0.72), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
}

.journal-scroll-panel .journal-list-panel {
  margin-top: 0;
}

.list-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.list-panel-heading .label {
  margin-bottom: 0;
}

.journal-heading-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.journal-heading-title strong {
  display: block;
  min-width: 0;
  color: #18233d;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.journal-heading-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  box-shadow: 0 10px 20px rgba(21, 154, 156, 0.1);
}

.add-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  border-color: rgba(21, 154, 156, 0.2);
  background: #e6fffb;
  color: var(--primary-strong);
}

.add-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journal-search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid rgba(217, 226, 236, 0.95);
  border-radius: 11px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.86);
}

.journal-search-field > span {
  display: inline-grid;
  margin: 0;
  color: #94a3b8;
  font-size: initial;
}

.journal-search-field svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journal-search-field input {
  min-height: 40px;
  border: 0;
  padding: 0;
  background: transparent;
}

.journal-search-field input:focus {
  outline: none;
}

.journal-card,
.summary-list .item-card {
  box-shadow: none;
}

.journal-card {
  display: grid;
  gap: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(183, 214, 229, 0.78);
  border-radius: 18px;
  padding: 13px;
  background:
    radial-gradient(circle at 92% 12%, rgba(223, 244, 242, 0.86), transparent 30%),
    radial-gradient(circle at 8% 100%, rgba(234, 244, 249, 0.78), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fcfd 100%);
  box-shadow: 0 14px 28px rgba(37, 64, 91, 0.08);
}

.journal-card.is-pending {
  border-color: rgba(183, 214, 229, 0.78);
  background:
    radial-gradient(circle at 92% 12%, rgba(223, 244, 242, 0.86), transparent 30%),
    radial-gradient(circle at 8% 100%, rgba(234, 244, 249, 0.78), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fcfd 100%);
}

.journal-card-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.journal-card-topline strong,
.journal-card-topline .item-date {
  min-width: 0;
  overflow-wrap: anywhere;
}

.journal-card-topline strong {
  display: block;
  color: #18233d;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.2;
}

.journal-status-pill {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(37, 64, 91, 0.06);
}

.journal-status-pending {
  border-color: rgba(245, 158, 11, 0.24);
  background: #fff7ed;
  color: #b45309;
}

.journal-status-resolved {
  border-color: rgba(20, 184, 166, 0.18);
  background: #ecfeff;
  color: #0f8490;
}

.journal-card-mood {
  display: inline-grid;
  position: relative;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.96), transparent 40%),
    #e6fffb;
  color: #0f9aa2;
  font-size: 0;
  box-shadow: 0 12px 22px rgba(21, 154, 156, 0.13);
}

.journal-card-mood::before {
  content: "";
  width: 17px;
  height: 21px;
  border: 2px solid currentColor;
  border-radius: 5px;
  box-shadow:
    inset 0 7px 0 -5px currentColor,
    inset 0 13px 0 -11px currentColor;
}

.journal-card-mood::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 3px 0;
}

.journal-excerpt {
  display: -webkit-box;
  margin: 0;
  color: #263552;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.journal-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.journal-card-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(214, 226, 236, 0.92);
  border-radius: 999px;
  padding: 4px 8px 4px 5px;
  background: rgba(255, 255, 255, 0.82);
}

.journal-card-metric > span {
  display: inline-grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  font-size: 0;
}

.journal-card-metric > span svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journal-card-metric.is-mood > span::before {
  content: "\2665";
  color: currentColor;
  font-size: 0.92rem;
  line-height: 1;
}

.journal-card-metric.is-session > span::before,
.journal-card-metric.is-soft > span::before {
  content: "";
  width: 14px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-sizing: border-box;
}

.journal-card-metric.is-session > span::after,
.journal-card-metric.is-soft > span::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 9px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
}

.journal-card-metric.is-private > span::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  clip-path: polygon(26% 45%, 26% 35%, 31% 18%, 50% 8%, 69% 18%, 74% 35%, 74% 45%, 83% 45%, 83% 88%, 17% 88%, 17% 45%);
}

.journal-card-metric.is-pending > span::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.journal-card-metric.is-resolved > span::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  clip-path: polygon(42% 72%, 22% 52%, 31% 43%, 42% 54%, 70% 26%, 79% 35%);
}

.journal-card-metric.is-priority > span::before {
  content: "";
  width: 14px;
  height: 15px;
  background: currentColor;
  clip-path: polygon(20% 7%, 78% 7%, 78% 54%, 50% 42%, 22% 54%, 22% 93%, 12% 93%, 12% 7%);
}

.journal-card-metric small,
.journal-card-metric strong {
  display: block;
  min-width: 0;
  line-height: 1;
  overflow-wrap: anywhere;
}

.journal-card-metric small {
  display: none;
}

.journal-card-metric strong {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 950;
}

.journal-card-metric.is-mood {
  border-color: rgba(124, 83, 230, 0.18);
  background: rgba(245, 243, 255, 0.8);
}

.journal-card-metric.is-mood > span {
  background: #ede9fe;
}

.journal-card-metric.is-session {
  border-color: rgba(21, 154, 156, 0.2);
  background: rgba(230, 255, 251, 0.8);
}

.journal-card-metric.is-session > span,
.journal-card-metric.is-soft > span {
  position: relative;
  background: #d7fbf6;
}

.journal-card-metric.is-private {
  background: rgba(248, 250, 252, 0.84);
}

.journal-card-metric.is-private > span {
  background: #eef2f7;
}

.journal-card-metric.is-pending {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.86);
}

.journal-card-metric.is-pending > span {
  background: #fef3c7;
}

.journal-card-metric.is-resolved {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(240, 253, 244, 0.86);
}

.journal-card-metric.is-resolved > span {
  background: #dcfce7;
}

.journal-card-metric.is-priority {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(255, 247, 237, 0.86);
}

.journal-card-metric.is-priority > span {
  background: #fef3c7;
  color: #b45309;
}

.journal-card-metric.is-priority.priority-alta {
  border-color: rgba(248, 113, 113, 0.2);
  background: #fff1f2;
  color: #be123c;
}

.journal-card-metric.is-priority.priority-alta > span {
  background: #fee2e2;
  color: #be123c;
}

.journal-card-metric.is-priority.priority-baixa {
  border-color: rgba(20, 184, 166, 0.18);
  background: #ecfeff;
  color: #0f8490;
}

.journal-card-metric.is-priority.priority-baixa > span {
  background: #cffafe;
  color: #0f8490;
}

.journal-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.journal-card-tags span {
  border: 1px solid rgba(183, 214, 229, 0.92);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #53627a;
  font-size: 0.7rem;
  font-weight: 850;
}

.journal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.journal-actions .small-button {
  min-width: 0;
  min-height: 34px;
  border-radius: 11px;
  padding-inline: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #0f8490;
  font-size: 0.76rem;
}

.journal-actions .small-button:first-child {
  border-color: transparent;
  background: linear-gradient(90deg, #18a7a9, #2db7b3);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(21, 154, 156, 0.18);
}

.journal-actions .danger-button {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(255, 247, 237, 0.9);
  color: #c2410c;
}

.journal-load-more {
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.journal-load-more .small-button {
  min-width: 150px;
}

.summary-list .item-card {
  box-shadow: none;
}

.summary-card {
  display: grid;
  gap: 9px;
  overflow: hidden;
  border-color: rgba(217, 226, 236, 0.88);
  border-radius: 14px;
  padding: 12px;
  background:
    radial-gradient(circle at 94% 10%, rgba(234, 244, 249, 0.78), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.summary-card-topline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.summary-card-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: #eaf4f9;
  color: #13759e;
  box-shadow: 0 10px 20px rgba(19, 117, 158, 0.1);
}

.summary-card-icon svg {
  width: 21px;
  height: 21px;
}

.summary-card-topline > div {
  min-width: 0;
}

.summary-card-topline strong {
  display: block;
  min-width: 0;
  color: #18233d;
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.summary-status-pill {
  padding: 5px 8px;
  white-space: nowrap;
  font-size: 0.68rem;
}

.summary-status-gerado .summary-status-pill {
  background: #eaf4f9;
  color: #13759e;
}

.summary-status-revisado .summary-status-pill {
  background: #e6fffb;
  color: var(--primary-strong);
}

.summary-status-aprovado,
.summary-status-compartilhado {
  border-color: rgba(21, 154, 156, 0.2);
}

.summary-status-aprovado .summary-status-pill,
.summary-status-compartilhado .summary-status-pill {
  background: #dcfce7;
  color: #15803d;
}

.summary-card-meta {
  display: grid;
  gap: 7px;
}

.summary-period-chip {
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #344054;
  font-size: 0.72rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.summary-meta-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
}

.summary-meta-topics .topic {
  border: 1px solid rgba(199, 210, 254, 0.9);
  border-radius: 999px;
  padding: 4px 7px;
  background: #eef2ff;
  color: #344054;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.15;
}

.summary-card-body {
  display: -webkit-box;
  margin: 0;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.summary-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
}

.summary-actions .small-button {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding-inline: 7px;
  font-size: 0.76rem;
}

.journal-excerpt,
.long-text,
.item-card p,
.insight-card p {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.filter-row,
.tag-picker {
  flex-wrap: wrap;
  margin-top: 10px;
}

.journal-search-panel .filter-row {
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.journal-search-panel .filter-row::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.filter-chip,
.tag-chip {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.8rem;
}

.journal-search-panel .filter-chip {
  flex: 0 0 auto;
  min-height: 31px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
}

.journey-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(244, 247, 251, 0.94);
}

.journey-tabs button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.1;
}

.journey-tabs button span {
  font-size: 0.95rem;
}

.journey-tabs button.is-selected {
  border-color: var(--line);
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.summary-generation-form,
.inline-form {
  display: grid;
  gap: 10px;
}

.generation-status {
  margin: 0;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 9px 10px;
  background: #eef2ff;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.field-row {
  align-items: start;
}

.field-row > label {
  flex: 1;
}

.topic-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic {
  border: 1px solid #d8e6e2;
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface-soft);
  color: #344054;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.async-job-status {
  margin: 4px 0 0;
  border: 1px dashed #c7d2fe;
  border-radius: 8px;
  padding: 8px 10px;
  background: #eef2ff;
  color: #344054;
  font-size: 0.8rem;
}

.async-download-card .action-row {
  margin-top: 10px;
}

.priority-alta {
  border-color: rgba(248, 113, 113, 0.2);
  background: #fff1f2;
  color: #be123c;
}

.priority-media {
  border-color: rgba(245, 158, 11, 0.24);
  background: #fff7ed;
  color: #b45309;
}

.priority-baixa {
  border-color: rgba(20, 184, 166, 0.18);
  background: #ecfeff;
  color: #0f8490;
}

.journal-card .priority-pill {
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.68rem;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(37, 64, 91, 0.06);
}

.billing-panel {
  display: grid;
  gap: 14px;
}

.billing-modal-panel {
  max-height: min(88vh, 760px);
  border: 1px solid rgba(217, 226, 236, 0.9);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 22%);
}

.billing-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.billing-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.billing-section .section-heading {
  margin-bottom: 0;
}

.billing-section .section-heading strong {
  display: block;
  margin-top: 2px;
  font-size: 0.98rem;
  line-height: 1.2;
}

.billing-current-section {
  gap: 9px;
}

.payment-history-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.payment-history-list {
  gap: 8px;
}

.billing-payment-history-list {
  max-height: 270px;
  overflow: auto;
}

.payment-history-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.payment-history-card.is-success {
  border-color: rgba(21, 154, 156, 0.28);
  background: rgba(21, 154, 156, 0.06);
}

.payment-history-card.is-warning {
  border-color: rgba(245, 158, 11, 0.32);
  background: #fffbeb;
}

.payment-history-card.is-danger {
  border-color: rgba(244, 63, 94, 0.28);
  background: #fff7f7;
}

.payment-history-card.is-soft {
  background: var(--surface-soft);
}

.payment-history-card .item-topline {
  align-items: flex-start;
}

.payment-history-card .item-topline small {
  display: block;
  margin-top: 4px;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.35;
}

.payment-history-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.payment-history-meta span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 850;
  text-align: center;
}

.billing-cycle-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border-radius: 8px;
  padding: 4px;
  background: var(--surface-soft);
}

.billing-cycle-tabs button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.billing-cycle-tabs button.is-selected {
  border-color: var(--line);
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.billing-current-card,
.usage-row,
.plan-card {
  box-shadow: none;
}

.billing-current-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.billing-current-card {
  align-items: flex-start;
}

.billing-current-card.is-success {
  border-color: rgba(21, 154, 156, 0.28);
  background: linear-gradient(135deg, rgba(21, 154, 156, 0.12), #ffffff);
}

.billing-current-card.is-warning {
  border-color: rgba(245, 158, 11, 0.34);
  background: #fffbeb;
}

.billing-current-card.is-danger {
  border-color: rgba(244, 63, 94, 0.28);
  background: #fff7f7;
}

.billing-current-card.is-soft {
  background: var(--surface-soft);
}

.billing-current-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.billing-current-copy p {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.32;
}

.billing-state-pill {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(21, 154, 156, 0.12);
  color: var(--primary-strong);
  font-size: 0.72rem;
  font-weight: 950;
}

.billing-current-card.is-warning .billing-state-pill {
  background: #fef3c7;
  color: #92400e;
}

.billing-current-card.is-danger .billing-state-pill {
  background: #fee2e2;
  color: #991b1b;
}

.billing-current-card.is-soft .billing-state-pill {
  background: #e0f2fe;
  color: #075985;
}

.billing-current-actions {
  display: grid;
  gap: 7px;
  min-width: 112px;
}

.billing-guidance {
  display: grid;
  gap: 8px;
}

.billing-operational-checklist {
  display: grid;
}

.billing-ops-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 8px;
  padding: 11px;
  background: #fffbeb;
}

.billing-ops-card.is-ready {
  border-color: rgba(21, 154, 156, 0.28);
  background: rgba(21, 154, 156, 0.08);
}

.billing-ops-card p {
  margin: 0;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.38;
  word-break: break-word;
}

.billing-ops-list {
  display: grid;
  gap: 6px;
}

.billing-ops-list > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.billing-ops-list > div > span {
  display: grid;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
}

.billing-ops-list > div.is-done > span {
  background: rgba(21, 154, 156, 0.14);
  color: var(--primary-strong);
}

.billing-ops-list strong,
.billing-ops-list small {
  display: block;
}

.billing-ops-list strong {
  color: var(--ink);
  font-size: 0.8rem;
}

.billing-ops-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.35;
}

.billing-guidance-card {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.billing-guidance-card.soft-card {
  background: var(--surface-soft);
}

.billing-guidance-card strong {
  display: block;
  margin-bottom: 4px;
}

.billing-guidance-card p {
  margin: 0;
  color: #344054;
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1.42;
}

.billing-guidance-card .pill {
  justify-self: start;
  white-space: normal;
}

.billing-usage-overview {
  display: grid;
  gap: 9px;
}

.billing-usage-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(21, 154, 156, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(21, 154, 156, 0.12), rgba(124, 88, 222, 0.08));
}

.billing-usage-summary.is-attention {
  border-color: rgba(245, 158, 11, 0.38);
  background: #fffbeb;
}

.billing-usage-summary.is-soft {
  background: var(--surface-soft);
}

.billing-usage-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
}

.billing-usage-summary p,
.billing-reserve-card p {
  margin: 4px 0 0;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 780;
  line-height: 1.4;
}

.billing-usage-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.billing-usage-metrics article {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.billing-usage-metrics span,
.billing-usage-metrics strong,
.billing-usage-metrics small {
  display: block;
}

.billing-usage-metrics span {
  margin-bottom: 3px;
}

.billing-usage-metrics strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.billing-usage-metrics small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.billing-reserve-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px dashed rgba(124, 88, 222, 0.38);
  border-radius: 8px;
  padding: 10px;
  background: rgba(124, 88, 222, 0.06);
}

.billing-reserve-card .pill {
  white-space: normal;
}

.usage-bar {
  height: 9px;
  margin: 9px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.usage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.limit-warning {
  color: var(--warning);
  font-weight: 800;
}

.plan-card {
  display: grid;
  gap: 11px;
  position: relative;
  overflow: hidden;
  padding: 13px;
  border-color: rgba(217, 226, 236, 0.95);
  background: #fff;
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--primary);
  opacity: 0.8;
}

.plan-card-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.plan-card-hero small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.25;
}

.plan-card-hero strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.plan-card-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  box-shadow: 0 10px 20px rgba(21, 154, 156, 0.12);
  font-size: 1.05rem;
}

.plan-card-badge {
  align-self: start;
  white-space: nowrap;
}

.plan-card.is-current {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(21, 154, 156, 0.12), #fff);
}

.plan-card.is-featured {
  border-color: rgba(124, 88, 222, 0.45);
}

.plan-card.plan-gratis::before {
  background: #94a3b8;
}

.plan-card.plan-prata::before {
  background: #64748b;
}

.plan-card.plan-ouro::before {
  background: #7c3aed;
}

.plan-card.plan-diamante::before {
  background: #06b6d4;
}

.plan-card.plan-gratis .plan-card-icon {
  background: #f1f5f9;
}

.plan-card.plan-prata .plan-card-icon {
  background: #eef2f7;
}

.plan-card.plan-ouro .plan-card-icon {
  background: #ede9fe;
}

.plan-card.plan-diamante .plan-card-icon {
  background: #ecfeff;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.plan-price-row strong {
  font-size: 1.25rem;
}

.plan-saving {
  margin: -4px 0 0;
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 900;
}

.plan-limit-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.plan-limit-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(217, 226, 236, 0.8);
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(248, 250, 252, 0.9);
}

.plan-limit-list article > span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 950;
}

.plan-limit-list small,
.plan-limit-list strong {
  display: block;
}

.plan-limit-list small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.1;
}

.plan-limit-list strong {
  color: #344054;
  font-size: 0.79rem;
  font-weight: 900;
  line-height: 1.25;
}

.plan-benefit-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.plan-benefit-list span {
  border: 1px solid rgba(199, 210, 254, 0.9);
  border-radius: 999px;
  padding: 6px 8px;
  background: #eef2ff;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 830;
  line-height: 1.35;
}

.selected-plan-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.cancel-subscription-content {
  display: grid;
  gap: 10px;
}

.cancel-subscription-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 8px;
  padding: 12px;
  background: #fffbeb;
}

.cancel-subscription-card strong {
  color: var(--ink);
  font-size: 1rem;
}

.cancel-subscription-card p {
  margin: 0;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 780;
  line-height: 1.42;
}

.plan-confirmation-notes {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.plan-confirmation-notes p {
  margin: 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--surface-soft);
  color: #344054;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.4;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 8px;
  z-index: 25;
  display: grid;
  width: min(calc(100% - 20px), 398px);
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item.is-active {
  background: linear-gradient(180deg, rgba(223, 244, 242, 0.98), rgba(230, 255, 251, 0.96));
  box-shadow: inset 0 0 0 1px rgba(21, 154, 156, 0.16), 0 10px 18px rgba(21, 154, 156, 0.1);
  color: var(--primary-strong);
}

.nav-item:active {
  transform: translateY(1px);
}

.nav-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.is-active .nav-icon svg {
  stroke-width: 2.15;
  filter: drop-shadow(0 5px 8px rgba(21, 154, 156, 0.18));
}

.nav-item small {
  font-size: 0.66rem;
  line-height: 1.1;
  text-align: center;
}

.legal-page-html {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.legal-page-body {
  height: auto;
  min-height: 100vh;
  background: radial-gradient(circle at 12% 0%, rgba(223, 244, 242, 0.8), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f1f4f7 100%);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.legal-page {
  display: grid;
  gap: 16px;
  width: min(100% - 28px, 880px);
  margin: 0 auto;
  padding: 24px 0 42px;
}

.legal-page-hero,
.legal-doc-section {
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.legal-page-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.legal-page-hero svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.legal-page-hero h1,
.legal-doc-section h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 950;
  letter-spacing: 0;
}

.legal-page-hero h1 {
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.08;
}

.legal-page-hero p,
.legal-doc-section p,
.legal-doc-section li {
  color: #344054;
  font-weight: 720;
  line-height: 1.56;
}

.legal-doc-section {
  padding: 18px;
}

.legal-doc-section h2 {
  margin-top: 5px;
  font-size: 1.15rem;
}

.legal-doc-section ul {
  display: grid;
  gap: 8px;
  padding-left: 19px;
}

.legal-alert-section {
  border-color: rgba(255, 167, 38, 0.34);
  background: linear-gradient(135deg, #fffaf0, #ffffff);
}

@media (max-width: 640px) {
  .legal-page-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .legal-page-hero .small-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.38);
}

.journal-entry-backdrop {
  place-items: center;
}

.billing-modal-backdrop,
#plan-confirmation-modal {
  place-items: start center;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}

.journal-view-backdrop {
  place-items: start center;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}

#home-notifications-modal {
  place-items: start center;
  padding-top: 18px;
}

#home-menu-modal {
  place-items: start center;
  padding-top: 18px;
}

#feedback-modal {
  place-items: start center;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}

#legal-consent-modal {
  place-items: start center;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}

.modal-backdrop.is-hidden,
.is-hidden {
  display: none !important;
}

.modal-panel {
  width: min(100%, 430px);
  max-height: min(86vh, 720px);
  overflow: auto;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.journal-entry-panel {
  margin: auto;
}

.journal-view-panel {
  max-height: min(82vh, 680px);
}

.modal-content {
  margin-top: 12px;
}

.legal-modal-panel {
  max-height: min(88vh, 760px);
  border: 1px solid rgba(21, 154, 156, 0.16);
  background: linear-gradient(155deg, #ffffff 0%, #f8fffe 58%, #f5f3ff 100%);
}

.legal-summary-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(21, 154, 156, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: rgba(223, 244, 242, 0.64);
}

.legal-summary-card strong {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 950;
}

.legal-summary-card p {
  margin: 0;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 720;
  line-height: 1.45;
}

.legal-consent-checklist {
  display: grid;
  gap: 8px;
}

.legal-consent-checklist label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  border: 1px solid rgba(217, 226, 236, 0.92);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.legal-consent-checklist input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--primary);
}

.legal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px;
}

.feedback-modal-panel {
  max-height: min(88vh, 760px);
  border: 1px solid rgba(21, 154, 156, 0.16);
  background: linear-gradient(155deg, #ffffff 0%, #f8fffe 62%, #eef2ff 100%);
}

.feedback-modal-panel textarea {
  resize: vertical;
}

.feedback-history {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(217, 226, 236, 0.84);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.feedback-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  box-shadow: none;
}

.feedback-card strong,
.feedback-card small {
  display: block;
  min-width: 0;
}

.feedback-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.feedback-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.38;
}

.journal-view-shell {
  display: grid;
  gap: 12px;
}

.journal-view-hero,
.journal-view-section,
.journal-view-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.journal-view-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #e6fffb 0%, #ffffff 100%);
}

.journal-view-hero-icon,
.journal-view-metric > span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: #e6fffb;
  font-size: 1rem;
}

.journal-view-hero strong {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.journal-view-hero p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.journal-view-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.journal-view-metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  box-shadow: none;
}

.journal-view-metric small {
  display: block;
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
}

.journal-view-metric strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.journal-view-metric.is-mood {
  border-color: rgba(124, 83, 230, 0.24);
  background: #f5f3ff;
}

.journal-view-metric.is-mood > span {
  background: #ede9fe;
}

.journal-view-metric.is-session {
  border-color: rgba(21, 154, 156, 0.22);
  background: #e6fffb;
}

.journal-view-metric.is-session > span,
.journal-view-metric.is-soft > span {
  background: #d7fbf6;
}

.journal-view-metric.is-soft {
  background: #f8fafc;
}

.journal-view-metric.is-private {
  border-color: rgba(102, 112, 133, 0.28);
  background: #f8fafc;
}

.journal-view-metric.is-private > span {
  background: #eef2f7;
}

.journal-view-metric.is-warning,
.journal-view-metric.is-pending {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffbeb;
}

.journal-view-metric.is-warning > span,
.journal-view-metric.is-pending > span {
  background: #fef3c7;
}

.journal-view-metric.is-danger {
  border-color: rgba(248, 113, 113, 0.28);
  background: #fff7f7;
}

.journal-view-metric.is-danger > span {
  background: #fee2e2;
}

.journal-view-metric.is-resolved {
  border-color: rgba(34, 197, 94, 0.22);
  background: #f0fdf4;
}

.journal-view-metric.is-resolved > span {
  background: #dcfce7;
}

.journal-view-section {
  padding: 12px;
}

.journal-view-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.journal-view-tags span {
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 6px 9px;
  background: #eef2ff;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 850;
}

.journal-view-text-card {
  background: #f8fafc;
}

.journal-view-text-card .long-text {
  margin: 0;
  color: #1f2937;
  font-size: 0.92rem;
  line-height: 1.6;
}

.home-menu-content {
  display: grid;
  gap: 8px;
}

.home-menu-option {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.home-menu-option span {
  font-size: 0.95rem;
  font-weight: 900;
}

.home-menu-option small {
  font-size: 0.78rem;
  line-height: 1.3;
}

.home-menu-option:active {
  transform: translateY(1px);
}

.home-menu-option.danger-option {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b42318;
}

body.has-modal {
  overflow: hidden;
}

.choice-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.choice-list label,
.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.choice-list input,
.checkbox-line input {
  width: auto;
  margin-top: 3px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 60;
  width: min(calc(100% - 32px), 390px);
  transform: translate(-50%, 16px);
  border-radius: 8px;
  padding: 12px 14px;
  background: #101828;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: #9a3412;
}

.notification-button {
  position: relative;
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ef4444;
}

.onboarding-notification-card {
  border-color: rgba(124, 83, 230, 0.24);
  background: linear-gradient(180deg, rgba(124, 83, 230, 0.08), #fff);
}

.pull-refresh-indicator {
  height: 0;
  overflow: hidden;
  text-align: center;
  color: var(--muted);
  transition: height 120ms ease;
}

.app-pull-refresh-indicator {
  height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  transition: height 120ms ease;
}

.app-pull-refresh-indicator.is-visible,
.pull-refresh-indicator.is-visible {
  color: var(--primary-strong);
}

.app-pull-refresh-indicator.is-refreshing,
.pull-refresh-indicator.is-refreshing {
  color: var(--primary);
}

.copyable-id {
  overflow-wrap: anywhere;
}

@media (min-width: 760px) {
  .app-shell {
    height: calc(100vh - 48px);
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    border: 1px solid rgba(217, 226, 236, 0.8);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  @supports (height: 100dvh) {
    .app-shell {
      height: calc(100dvh - 48px);
      min-height: calc(100dvh - 48px);
    }
  }
}

@media (max-width: 380px) {
  .home-appbar {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 15px;
  }

  .home-brand-mark {
    width: 48px;
    height: 48px;
  }

  .home-brand-mark svg {
    width: 47px;
    height: 47px;
  }

  .home-action-buttons {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .home-appbar h2 {
    font-size: 1.42rem;
  }

  .billing-current-card {
    display: grid;
  }

  .billing-current-actions {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-metric-card {
    min-height: 78px;
    padding: 7px 3px;
  }

  .latest-entry-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .latest-entry-arrow {
    display: none;
  }

  .quick-arrow {
    display: none;
  }

  .field-row {
    display: grid;
  }
}

@media (max-height: 760px) {
  .app-shell {
    padding-top: 8px;
  }

  .home-appbar {
    padding: 11px;
    margin-bottom: 8px;
  }

  .home-brand-mark {
    width: 40px;
    height: 40px;
  }

  .home-brand-mark svg {
    width: 39px;
    height: 39px;
  }

  .home-appbar h2 {
    font-size: clamp(1.18rem, 5.2vw, 1.38rem);
  }

  .home-month-panel,
  .home-wellbeing-card {
    padding: 11px;
  }

  .home-month-grid {
    gap: 6px;
    margin-top: 9px;
  }

  .home-metric-card {
    min-height: 74px;
    padding: 6px 3px;
  }

  .home-metric-icon {
    width: 28px;
    height: 28px;
  }

  .home-metric-icon svg {
    width: 16px;
    height: 16px;
  }

  .home-metric-card strong {
    font-size: 1rem;
  }

  .home-wellbeing-card {
    gap: 8px;
  }

  .mood-face-row button {
    min-height: 34px;
    font-size: 0.98rem;
  }

  .home-note-field {
    min-height: 42px;
  }

  .home-note-field input {
    min-height: 38px;
  }

  .quick-action {
    min-height: 58px;
    padding: 8px;
  }

  .quick-icon {
    width: 34px;
    height: 34px;
  }

  .latest-entry-card {
    padding: 11px;
  }

  .latest-entry-icon {
    width: 38px;
    height: 38px;
  }
}
