:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --border: rgba(148, 163, 184, 0.18);
  --text: #0f172a;
  --muted: #64748b;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10), 0 4px 18px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 10px 26px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.05);

  --brand: #5b6cff;
  --brand-2: #8b5cf6;
  --brand-soft: rgba(91, 108, 255, 0.12);
  --brand-border: rgba(91, 108, 255, 0.20);

  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 100%);
  --glass-soft: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(248, 250, 252, 0.90) 100%);
  --panel-soft: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(244, 247, 251, 0.92) 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top left, rgba(91, 108, 255, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.10), transparent 26%),
    radial-gradient(circle at bottom center, rgba(16, 185, 129, 0.08), transparent 28%),
    linear-gradient(180deg, #f7f9fd 0%, #edf3fb 100%);
  color: var(--text);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(50px);
  opacity: 0.55;
}

body::before {
  width: 280px;
  height: 280px;
  top: -40px;
  left: -30px;
  border-radius: 50%;
  background: rgba(91, 108, 255, 0.18);
}

body::after {
  width: 260px;
  height: 260px;
  right: -20px;
  top: 120px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.16);
}

#auth-screen,
#app {
  position: relative;
  z-index: 1;
}

#auth-screen {
  background:
    radial-gradient(circle at 15% 10%, rgba(91, 108, 255, 0.16), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.14), transparent 24%),
    linear-gradient(180deg, #f7f9fd 0%, #edf3fb 100%);
}

#app {
  overflow-x: hidden;
}

.main-content {
  max-width: 1240px;
  padding: 24px 14px calc(152px + var(--safe-bottom));
}

.page-title {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.02;
  letter-spacing: -1px;
  margin-bottom: 22px;
  color: var(--text);
  background: linear-gradient(135deg, #0f172a 0%, #334155 42%, #5b6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-card,
.profile-section,
.notes-entry,
.notes-recent-card,
.analysis-period-card,
.analysis-top-card,
.analysis-counts-card,
.analysis-insight-card,
.analysis-actions-card,
.chart-details-card,
.analysis-ai-card,
.habit-segment-card,
.add-habit-form,
.goal-card,
.chart-landing-summary-line,
.chart-landing-forecast-line,
.chart-hero-card,
.chart-detail-metric,
.chart-detail-panel,
.prompt-card,
.modal-card,
.today-card,
.score-block,
.wish-banner {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.auth-card,
.profile-section,
.notes-entry,
.notes-recent-card,
.analysis-period-card,
.analysis-top-card,
.analysis-counts-card,
.chart-details-card,
.analysis-ai-card,
.habit-segment-card,
.add-habit-form,
.goal-card,
.prompt-card,
.modal-card,
.today-card,
.score-block,
.wish-banner {
  border-radius: 22px;
}

.auth-card,
.profile-section,
.notes-entry,
.notes-recent-card,
.analysis-period-card,
.analysis-top-card,
.analysis-counts-card,
.chart-details-card,
.analysis-ai-card,
.habit-segment-card,
.add-habit-form,
.goal-card,
.chart-hero-card,
.chart-detail-metric,
.chart-detail-panel,
.prompt-card,
.modal-card,
.today-card,
.score-block,
.wish-banner,
.habit-manage-item,
.goal-item,
.chart-btn,
.analysis-period-btn,
.notes-range-btn,
.notes-tab,
.auth-tab,
.type-btn,
.btn,
.btn-outline,
.goal-add-btn,
.goal-icon-btn,
.icon-btn,
.nav-btn,
.habit-item,
.today-section-head {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease,
    opacity 0.22s ease;
}

.auth-card {
  max-width: 430px;
  padding: 36px 30px;
  position: relative;
  overflow: hidden;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #5b6cff 0%, #8b5cf6 55%, #22c55e 100%);
}

.auth-card h1 {
  font-size: 34px;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
  color: var(--text);
}

.auth-card .subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.auth-tabs,
.notes-tabs {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.auth-tab,
.notes-tab,
.chart-btn,
.analysis-period-btn,
.notes-range-btn,
.type-btn {
  border: 1px solid transparent;
}

.auth-tab:hover,
.notes-tab:hover,
.chart-btn:hover,
.analysis-period-btn:hover,
.notes-range-btn:hover,
.type-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 108, 255, 0.18);
}

.auth-tab.active,
.notes-tab.active,
.chart-btn.active,
.analysis-period-btn.active,
.notes-range-btn.active {
  background: linear-gradient(135deg, #111827 0%, #334155 100%);
  color: #ffffff;
  border-color: rgba(17, 24, 39, 0.16);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.12);
}

.form-group input,
.form-group textarea,
.form-group select,
.goal-add-input,
.goal-inline-input,
.habit-manage-weight,
.profile-big-textarea,
.date-picker-row input[type=date],
.notes-date-row input[type=date] {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.goal-add-input:focus,
.goal-inline-input:focus,
.habit-manage-weight:focus,
.profile-big-textarea:focus,
.date-picker-row input[type=date]:focus,
.notes-date-row input[type=date]:focus {
  border-color: rgba(91, 108, 255, 0.45);
  box-shadow:
    0 0 0 4px rgba(91, 108, 255, 0.12),
    0 10px 22px rgba(91, 108, 255, 0.10);
  background: rgba(255, 255, 255, 0.98);
}

.btn,
.goal-add-btn {
  background: linear-gradient(135deg, #111827 0%, #334155 100%);
  border: 1px solid rgba(17, 24, 39, 0.12);
  color: #ffffff;
  box-shadow: 0 14px 24px rgba(17, 24, 39, 0.14);
}

.btn:hover,
.goal-add-btn:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(17, 24, 39, 0.16);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(91, 108, 255, 0.22);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.type-btn.plus.active {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.16) 0%, rgba(220, 252, 231, 0.85) 100%);
  border-color: rgba(34, 197, 94, 0.22);
  color: #14532d;
}

.type-btn.minus.active {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.14) 0%, rgba(254, 226, 226, 0.92) 100%);
  border-color: rgba(239, 68, 68, 0.22);
  color: #7f1d1d;
}

.score-block {
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top right, rgba(91, 108, 255, 0.14), transparent 28%),
    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.92) 100%);
  box-shadow: var(--shadow);
}

.score-block::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(91, 108, 255, 0.10);
  filter: blur(10px);
}

.score-top-label,
.score-label {
  letter-spacing: 0.7px;
  color: var(--muted);
}

.score-number {
  letter-spacing: -2px;
  text-shadow: 0 10px 24px rgba(91, 108, 255, 0.10);
}

.today-collapse-link {
  display: block;
  width: 100%;
  padding: 4px 0 8px;
  border: none;
  background: none;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.55;
  text-align: center;
  cursor: pointer;
  transition: opacity .2s;
}
.today-collapse-link:hover,
.today-collapse-link:active {
  opacity: 1;
}

.today-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.today-card {
  overflow: hidden;
}

.today-card.section-tone-morning {
  background: linear-gradient(180deg, rgba(250, 255, 251, 0.96) 0%, rgba(245, 252, 247, 0.92) 100%);
}

.today-card.section-tone-day {
  background: linear-gradient(180deg, rgba(249, 255, 250, 0.96) 0%, rgba(242, 251, 245, 0.92) 100%);
}

.today-card.section-tone-evening {
  background: linear-gradient(180deg, rgba(247, 252, 248, 0.96) 0%, rgba(239, 248, 242, 0.92) 100%);
}

.today-card.section-tone-general {
  background: linear-gradient(180deg, rgba(246, 252, 248, 0.96) 0%, rgba(236, 247, 241, 0.92) 100%);
}

.today-card.section-tone-minus {
  background: linear-gradient(180deg, rgba(255, 246, 248, 0.98) 0%, rgba(255, 236, 241, 0.94) 100%);
}

.today-card.section-tone-notes {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
}

.today-section-head {
  width: 100%;
  min-height: 66px;
  padding: 18px 18px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.today-section-head:hover {
  background: rgba(255, 255, 255, 0.45);
}

.today-section-arrow {
  color: var(--muted);
}

.today-section.open .today-section-head {
  background: rgba(255, 255, 255, 0.48);
}

.today-section.open .today-section-arrow {
  transform: rotate(180deg);
}

.today-section-body {
  padding: 0 18px 18px;
}

.wish-banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 248, 251, 0.94) 100%);
  box-shadow: var(--shadow-sm);
}

.wish-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wish-label {
  font-weight: 800;
  color: var(--text);
}

.wish-close-btn,
.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.wish-preview,
.wish-expanded {
  line-height: 1.72;
  color: var(--text);
}

.habit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.habit-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.habit-item.checked-item {
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(255, 255, 255, 0.90) 100%);
  border-color: rgba(34, 197, 94, 0.16);
}

.habit-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.92);
  flex-shrink: 0;
}

.habit-checkbox.checked.plus {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-color: rgba(34, 197, 94, 0.15);
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.24);
}

.habit-checkbox.checked.minus {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: rgba(239, 68, 68, 0.15);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.22);
}

.habit-name {
  flex: 1;
  min-width: 0;
  font-weight: 650;
  line-height: 1.4;
}

.habit-weight {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.goal-card {
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(91, 108, 255, 0.10), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
}

.goal-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.goal-card-meta {
  margin-top: 4px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

.goal-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goal-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.goal-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.goal-item.done {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.92) 0%, rgba(255, 255, 255, 0.82) 100%);
}

.goal-text-wrap {
  min-width: 0;
}

.goal-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.goal-item.done .goal-text {
  color: var(--muted);
  text-decoration: line-through;
}

.goal-check-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: transparent;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

.goal-check-btn.checked {
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-color: rgba(34, 197, 94, 0.14);
  box-shadow: 0 12px 20px rgba(34, 197, 94, 0.22);
}

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

.goal-icon-btn,
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

.goal-icon-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 108, 255, 0.20);
}

.goal-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.goal-add-input,
.goal-inline-input {
  min-width: 0;
}

.goal-inline-input {
  margin: 0;
}

.goal-add-btn {
  width: auto;
  min-width: 120px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
}

.goal-empty {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed rgba(148, 163, 184, 0.22);
  color: var(--muted);
  text-align: center;
}

.habits-layout {
  gap: 20px;
}

.add-habit-form {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 249, 235, 0.92) 100%);
}

.habit-segment-card {
  box-shadow: var(--shadow-sm);
}

.habit-manage-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
}

.habit-manage-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.habit-manage-name {
  font-weight: 700;
}

.habit-manage-meta {
  color: var(--muted);
}

.chart-summary {
  margin-bottom: 16px;
}

.chart-landing-hero {
  gap: 10px;
}

.chart-hero-card,
.chart-detail-metric {
  border-radius: 18px;
}

.chart-hero-card {
  background:
    radial-gradient(circle at top right, rgba(91, 108, 255, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.92) 100%);
}

.chart-hero-card:hover,
.chart-detail-metric:hover,
.chart-detail-panel:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

#chart-canvas {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(91, 108, 255, 0.06), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.94) 100%);
  box-shadow: var(--shadow);
}

.chart-details-card,
.analysis-ai-card,
.profile-section,
.notes-entry,
.notes-recent-card,
.analysis-period-card,
.analysis-top-card,
.analysis-counts-card {
  box-shadow: var(--shadow-sm);
}

.chart-landing-summary-line,
.chart-landing-forecast-line {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.84);
}

.analysis-score {
  font-size: clamp(46px, 9vw, 68px);
  font-weight: 900;
  letter-spacing: -2px;
  text-shadow: 0 10px 22px rgba(91, 108, 255, 0.08);
}

.analysis-list-title,
.chart-details-title,
.analysis-ai-title,
.profile-section h3,
.prompt-card h4,
.habit-segment-title {
  color: var(--text);
}

.analysis-item,
.analysis-period-row,
.analysis-counts-row {
  border-color: rgba(148, 163, 184, 0.12);
}

.analysis-item:hover {
  background: rgba(255, 255, 255, 0.44);
  border-radius: 14px;
}

.analysis-glossary-item {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.notes-recent-card {
  border-left-width: 5px;
  box-shadow: var(--shadow-sm);
}

.notes-recent-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

.notes-entry-title {
  line-height: 1.35;
}

.notes-entry-text,
.notes-recent-text,
.analysis-ai-text {
  color: #1e293b;
}

.profile-section {
  position: relative;
  overflow: hidden;
}

.profile-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.prompt-grid {
  gap: 16px;
}

.prompt-card {
  border-radius: 18px;
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  box-shadow: var(--shadow);
}

.char-count,
.analysis-date-label,
.notes-days-count,
.notes-recent-date,
.notes-entry-date {
  color: var(--muted);
}

#toast {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.24);
  border-radius: 999px;
}

nav {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(780px, calc(100% - 18px));
  height: auto;
  bottom: 10px;
  padding: 8px 8px calc(8px + var(--safe-bottom));
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.nav-btn {
  border-radius: 18px;
  padding: 10px 6px;
  color: #64748b;
}

.nav-btn .icon {
  font-size: 21px;
}

.nav-btn:hover {
  background: rgba(91, 108, 255, 0.08);
  color: var(--text);
}

.nav-btn.active {
  background: linear-gradient(135deg, #111827 0%, #334155 100%);
  color: #ffffff;
  box-shadow: 0 12px 22px rgba(17, 24, 39, 0.14);
}

.nav-btn.active .icon {
  transform: scale(1.08);
}

.error-msg {
  font-weight: 600;
}

.analysis-ai-main-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(241, 245, 249, 0.92) 100%);
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.analysis-ai-pro-btn {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.12) 0%, rgba(91, 108, 255, 0.12) 100%);
  color: #5b21b6;
  border: 1px solid rgba(139, 92, 246, 0.18);
}

.analysis-ai-main-btn:hover,
.analysis-ai-pro-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  nav {
    width: calc(100% - 14px);
  }

  .habits-layout {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding-bottom: calc(84px + var(--safe-bottom));
  }
}

@media (max-width: 640px) {
  body::before,
  body::after {
    opacity: 0.42;
  }

  .auth-card {
    padding: 30px 20px;
  }

  .page-title {
    letter-spacing: -0.7px;
  }

  .score-block,
  .goal-card,
  .today-card,
  .profile-section,
  .analysis-period-card,
  .analysis-top-card,
  .analysis-counts-card,
  .chart-details-card,
  .analysis-ai-card,
  .habit-segment-card,
  .add-habit-form,
  .notes-entry,
  .notes-recent-card {
    border-radius: 18px;
  }

  .goal-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .goal-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .goal-add-form {
    grid-template-columns: 1fr;
  }

  .goal-add-btn {
    width: 100%;
    min-height: 46px;
  }

  nav {
    border-radius: 22px;
    bottom: 8px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .nav-btn {
    border-radius: 16px;
    font-size: 10px;
    padding: 9px 4px;
  }

  .nav-btn .icon {
    font-size: 19px;
  }
}
/* === BRAND HERO START === */
.auth-brand-hero,
.app-brand-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(91, 108, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(91, 108, 255, 0.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 248, 255, 0.94) 100%);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.10),
    0 4px 18px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-brand-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  margin-bottom: 18px;
  border-radius: 22px;
}

.app-brand-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 18px;
  border-radius: 24px;
}

.auth-brand-hero::after,
.app-brand-hero::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #5b6cff 0%, #8b5cf6 55%, #22c55e 100%);
}

.app-brand-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.brand-copy,
.app-brand-copy {
  min-width: 0;
}

.brand-kicker,
.app-brand-kicker {
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  color: #5b6cff;
  margin-bottom: 4px;
}

.brand-title {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #0f172a 0%, #334155 42%, #5b6cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle,
.app-brand-subtitle {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}

.app-brand-title {
  font-size: clamp(17px, 3vw, 24px);
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.4px;
  color: #0f172a;
}

.brand-sprout-logo {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78) 46%, rgba(226, 232, 240, 0.92) 100%);
  border: 1px solid rgba(91, 108, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 24px rgba(91, 108, 255, 0.14);
  animation: growinBrandFloat 4.6s ease-in-out infinite;
}

.brand-sprout-logo-compact {
  width: 54px;
  height: 54px;
  border-radius: 17px;
}

.brand-seed {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 13px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 50% 50% 60% 60%;
  background: linear-gradient(180deg, #a16207 0%, #7c3f00 100%);
  box-shadow: 0 4px 8px rgba(124, 63, 0, 0.18);
}

.brand-stem {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 4px;
  height: 20px;
  margin-left: -2px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
  box-shadow: 0 6px 10px rgba(34, 197, 94, 0.18);
}

.brand-leaf {
  position: absolute;
  bottom: 28px;
  width: 17px;
  height: 11px;
  background: linear-gradient(135deg, #86efac 0%, #22c55e 55%, #16a34a 100%);
  box-shadow: 0 6px 12px rgba(34, 197, 94, 0.18);
}

.brand-leaf-left {
  left: 12px;
  border-radius: 100% 0 100% 0;
  transform: rotate(-30deg);
}

.brand-leaf-right {
  right: 12px;
  border-radius: 0 100% 0 100%;
  transform: rotate(30deg);
}

.app-brand-glow {
  width: 116px;
  height: 116px;
  flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 108, 255, 0.18) 0%, rgba(139, 92, 246, 0.08) 46%, rgba(255, 255, 255, 0) 74%);
  filter: blur(6px);
  opacity: 0.9;
}

@keyframes growinBrandFloat {
  0%,
  100% {
    transform: translateY(0px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 14px 24px rgba(91, 108, 255, 0.14);
  }
  50% {
    transform: translateY(-2px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 18px 28px rgba(91, 108, 255, 0.18);
  }
}

@media (max-width: 640px) {
  .auth-brand-hero,
  .app-brand-hero {
    padding: 14px;
    border-radius: 20px;
  }

  .app-brand-hero {
    align-items: flex-start;
  }

  .app-brand-glow {
    width: 72px;
    height: 72px;
  }

  .brand-title {
    font-size: 24px;
  }

  .app-brand-title {
    font-size: 16px;
  }

  .brand-subtitle,
  .app-brand-subtitle {
    font-size: 12px;
  }

  .brand-sprout-logo,
  .brand-sprout-logo-compact {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .brand-leaf {
    width: 15px;
    height: 10px;
    bottom: 25px;
  }

  .brand-leaf-left {
    left: 10px;
  }

  .brand-leaf-right {
    right: 10px;
  }

  .brand-stem {
    height: 18px;
    bottom: 17px;
  }

  .brand-seed {
    bottom: 9px;
    width: 12px;
    height: 12px;
  }
}
/* === BRAND HERO END === */
/* === SHEIKH UI OVERRIDE 01 START === */
:root {
  --bg: #f7f2e8;
  --card: #fff8ec;
  --border: rgba(150, 118, 45, 0.16);
  --text: #1d170e;
  --muted: #6e6246;

  --brand: #caa64b;
  --brand-2: #0f6b52;
  --brand-soft: rgba(202, 166, 75, 0.14);
  --brand-border: rgba(202, 166, 75, 0.24);

  --shadow: 0 18px 50px rgba(56, 39, 10, 0.12), 0 4px 18px rgba(56, 39, 10, 0.07);
  --shadow-sm: 0 10px 26px rgba(56, 39, 10, 0.09), 0 2px 8px rgba(56, 39, 10, 0.05);

  --glass: linear-gradient(180deg, rgba(255,250,241,0.96) 0%, rgba(247,238,216,0.90) 100%);
  --glass-soft: linear-gradient(180deg, rgba(255,250,241,0.82) 0%, rgba(247,238,216,0.90) 100%);
  --panel-soft: linear-gradient(180deg, rgba(255,250,241,0.92) 0%, rgba(247,238,216,0.92) 100%);
}

::selection {
  background: rgba(202,166,75,0.3);
  color: #20150a;
}

body {
  background:
    radial-gradient(circle at top left, rgba(202, 166, 75, 0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 107, 82, 0.11), transparent 25%),
    radial-gradient(circle at bottom center, rgba(133, 92, 30, 0.10), transparent 30%),
    linear-gradient(180deg, #fbf7ef 0%, #efe2c3 100%);
  color: var(--text);
}

body::before {
  background: rgba(202, 166, 75, 0.16);
}

body::after {
  background: rgba(15, 107, 82, 0.13);
}

#auth-screen {
  background:
    radial-gradient(circle at 15% 10%, rgba(202, 166, 75, 0.16), transparent 24%),
    radial-gradient(circle at 85% 20%, rgba(15, 107, 82, 0.11), transparent 24%),
    linear-gradient(180deg, #fbf7ef 0%, #efe2c3 100%);
}

.page-title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.04;
  letter-spacing: -0.6px;
  background: linear-gradient(135deg, #1d170e 0%, #6e5120 45%, #caa64b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-card::after,
.auth-brand-hero::after,
.app-brand-hero::after {
  background: linear-gradient(90deg, #d7b86a 0%, #9a7428 48%, #0f6b52 100%);
}

.auth-brand-hero,
.app-brand-hero {
  border-color: rgba(202, 166, 75, 0.22);
  background:
    radial-gradient(circle at top right, rgba(202, 166, 75, 0.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(15, 107, 82, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(255, 249, 237, 0.98) 0%, rgba(247, 238, 216, 0.95) 100%);
}

.brand-kicker,
.app-brand-kicker {
  color: #9a7428;
}

.brand-title {
  background: linear-gradient(135deg, #1d170e 0%, #6e5120 50%, #caa64b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle,
.app-brand-subtitle {
  color: #6e6246;
}

.app-brand-title {
  color: #1d170e;
}

.brand-sprout-logo {
  border-color: rgba(202, 166, 75, 0.22);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 252, 246, 0.98), rgba(255, 247, 230, 0.88) 48%, rgba(236, 222, 188, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 14px 24px rgba(154, 116, 40, 0.14);
}

.app-brand-glow {
  background: radial-gradient(circle, rgba(202, 166, 75, 0.20) 0%, rgba(15, 107, 82, 0.08) 46%, rgba(255, 255, 255, 0) 74%);
}

.btn,
.goal-add-btn,
.auth-tab.active,
.notes-tab.active,
.chart-btn.active,
.analysis-period-btn.active,
.notes-range-btn.active,
.nav-btn.active {
  background: linear-gradient(135deg, #1d170e 0%, #5c4318 54%, #a57c2c 100%);
  border-color: rgba(92, 67, 24, 0.26);
  box-shadow: 0 14px 24px rgba(92, 67, 24, 0.16);
  color: #fffefb;
}

.btn:hover,
.goal-add-btn:hover,
.auth-tab.active:hover,
.notes-tab.active:hover,
.chart-btn.active:hover,
.analysis-period-btn.active:hover,
.notes-range-btn.active:hover,
.nav-btn.active:hover {
  box-shadow: 0 18px 28px rgba(92, 67, 24, 0.18);
}

.btn-outline,
.goal-icon-btn,
.icon-btn,
.goal-check-btn,
.auth-tabs,
.notes-tabs {
  border-color: rgba(202, 166, 75, 0.18);
  background: rgba(255, 250, 241, 0.84);
}

.nav-btn:hover,
.auth-tab:hover,
.notes-tab:hover,
.chart-btn:hover,
.analysis-period-btn:hover,
.notes-range-btn:hover,
.type-btn:hover,
.goal-icon-btn:hover,
.icon-btn:hover {
  border-color: rgba(202, 166, 75, 0.26);
  background: rgba(202, 166, 75, 0.10);
}

.score-block {
  background:
    radial-gradient(circle at top right, rgba(202, 166, 75, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(15, 107, 82, 0.10), transparent 30%),
    linear-gradient(180deg, rgba(255, 249, 237, 0.98) 0%, rgba(246, 236, 211, 0.95) 100%);
  box-shadow: var(--shadow);
}

.score-number {
  text-shadow: 0 10px 24px rgba(154, 116, 40, 0.12);
}

.goal-card,
.today-card,
.profile-section,
.notes-entry,
.notes-recent-card,
.analysis-period-card,
.analysis-top-card,
.analysis-counts-card,
.analysis-insight-card,
.analysis-actions-card,
.chart-details-card,
.analysis-ai-card,
.habit-segment-card,
.add-habit-form,
.chart-landing-summary-line,
.chart-landing-forecast-line,
.chart-hero-card,
.chart-detail-metric,
.chart-detail-panel,
.prompt-card,
.modal-card,
.auth-card,
.wish-banner {
  background: linear-gradient(180deg, rgba(255, 249, 237, 0.97) 0%, rgba(247, 238, 216, 0.93) 100%);
  border-color: rgba(202, 166, 75, 0.14);
}

.goal-item,
.habit-item,
.habit-manage-item {
  background: rgba(255, 251, 243, 0.86);
  border-color: rgba(202, 166, 75, 0.14);
}

.goal-item.done {
  background: linear-gradient(180deg, rgba(243, 236, 223, 0.94) 0%, rgba(255, 251, 243, 0.84) 100%);
}

.goal-check-btn.checked,
.habit-checkbox.checked.plus {
  background: linear-gradient(135deg, #0f6b52 0%, #0b4f3d 100%);
  border-color: rgba(15, 107, 82, 0.18);
  box-shadow: 0 12px 20px rgba(15, 107, 82, 0.22);
}

.habit-checkbox.checked.minus {
  background: linear-gradient(135deg, #7b2f1b 0%, #5c2113 100%);
  border-color: rgba(123, 47, 27, 0.18);
  box-shadow: 0 12px 20px rgba(123, 47, 27, 0.18);
}

.habit-weight {
  background: rgba(93, 67, 22, 0.07);
}

.chart-hero-card.positive,
.chart-detail-metric.positive {
  background: linear-gradient(180deg, rgba(227, 247, 238, 0.98) 0%, rgba(244, 250, 246, 0.94) 100%);
}

.chart-hero-card.negative,
.chart-detail-metric.negative {
  background: linear-gradient(180deg, rgba(255, 244, 239, 0.98) 0%, rgba(252, 240, 235, 0.94) 100%);
}

.chart-help-note,
.chart-detail-panel {
  background: linear-gradient(180deg, rgba(255, 248, 232, 0.98) 0%, rgba(248, 238, 214, 0.94) 100%);
  border-color: rgba(202, 166, 75, 0.18);
}

#chart-canvas {
  border-color: rgba(202, 166, 75, 0.14);
  background:
    radial-gradient(circle at top left, rgba(202, 166, 75, 0.07), transparent 28%),
    linear-gradient(180deg, rgba(255, 250, 241, 0.97) 0%, rgba(248, 239, 219, 0.94) 100%);
}

nav {
  background: rgba(255, 248, 236, 0.90);
  border-color: rgba(202, 166, 75, 0.18);
  box-shadow: 0 18px 40px rgba(56, 39, 10, 0.14);
}

.nav-btn {
  color: #6e6246;
}

.analysis-ai-main-btn {
  background: linear-gradient(180deg, rgba(255, 249, 237, 0.94) 0%, rgba(243, 236, 223, 0.92) 100%);
  color: #4a3a1a;
  border-color: rgba(202, 166, 75, 0.20);
}

.analysis-ai-pro-btn {
  background: linear-gradient(180deg, rgba(202, 166, 75, 0.12) 0%, rgba(15, 107, 82, 0.10) 100%);
  color: #6f541b;
  border-color: rgba(202, 166, 75, 0.18);
}
/* === SHEIKH UI OVERRIDE 01 END === */
/* === PIC POINT FIX 02 START === */
#screen-today .today-section-head,
#screen-today .today-section-head span,
#screen-today .goal-card-title,
#screen-today .goal-text,
#screen-today .score-top-label,
#screen-today .score-label,
.app-brand-kicker,
.app-brand-title,
.app-brand-subtitle {
  color: #23180c !important;
}

#screen-today .goal-card-meta,
#screen-today .score-top-label,
#screen-today .score-label,
.app-brand-subtitle,
.app-brand-kicker {
  color: #4d3a19 !important;
}
/* === PIC POINT FIX 02 END === */

/* === PIC POINT FIX 03 (collapse btn) — migrated to .today-collapse-link === */
