@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0c0f14;
  --bg-elevated: #111620;
  --surface: #151b26;
  --surface-2: #1a2230;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #eef2f7;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.14);
  --pos: #34d399;
  --neg: #fb7185;
  --warn: #fbbf24;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: radial-gradient(120% 80% at 50% -20%, rgba(56, 189, 248, 0.06), transparent 45%), var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.35rem;
  background: linear-gradient(180deg, var(--surface) 0%, rgba(17, 22, 32, 0.97) 100%);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  gap: 1rem;
}
.brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 50%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.top nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
  max-width: 100%;
}
.top nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.42rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.top nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
}
.top nav a.nav-active {
  color: var(--text);
  font-weight: 600;
  background: var(--accent-dim);
  border-color: rgba(56, 189, 248, 0.35);
}
.top nav a.nav-secondary {
  opacity: 0.9;
  font-weight: 500;
}

/* Mobile: header + nav (calendar, list, forms, report) */
@media (max-width: 640px) {
  .top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
  }
  .top .brand {
    font-size: 1.05rem;
    line-height: 1.2;
  }
  .top nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.5rem;
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .cal-page .top.cal-top nav {
    border-top-color: rgba(255, 255, 255, 0.08);
  }
  .top nav a {
    margin-left: 0;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.45rem 0.55rem;
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
    white-space: nowrap;
  }
  .top nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
  }
  .top nav a.nav-active,
  .cal-page .top nav a.nav-active {
    color: var(--text);
    font-weight: 600;
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.12);
  }
  .top nav a.nav-secondary {
    opacity: 0.95;
  }
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}
.container-wide {
  max-width: 920px;
}

/* Imported history letter (history-range tag) — read view matches playbook typography */
body.entry-letter-page {
  min-height: 100vh;
}

.container-entry-letter {
  max-width: min(42rem, 100%);
  padding-bottom: 2.5rem;
}

.top nav a.letter-nav-current {
  max-width: min(16rem, 38vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top nav a.letter-nav-current.nav-active {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 640px) {
  .top nav a.letter-nav-current {
    max-width: 100%;
  }
}

.entry-letter-head {
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.entry-letter-meta {
  margin: 0.25rem 0 0 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}

.entry-letter-body {
  margin-top: 0.25rem;
}

.entry-letter-foot {
  margin-top: 1.75rem;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.86rem;
  line-height: 1.5;
}

.entry-letter-foot a {
  color: var(--accent);
}

.foot {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.foot code { color: var(--muted); }

h1 { font-size: 1.75rem; margin-top: 0; }
h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0;
}

.muted { color: var(--muted); font-size: 0.9rem; }
.warn { color: var(--warn); }
.nav-inline { margin-bottom: 0.5rem; }
.nav-inline a { color: var(--accent); }

.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.grid th, .grid td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.grid th { color: var(--muted); font-weight: 600; }
.grid tbody tr:hover {
  background: rgba(61, 156, 240, 0.06);
}
.brokers-cell {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 12rem;
  line-height: 1.35;
}
.streak-grid {
  margin-top: 1rem;
}
.streak-grid th,
.streak-grid td {
  font-size: 0.9rem;
}
.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* Expandable rows (home) */
.journal-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}
.journal-head {
  display: grid;
  grid-template-columns: 6.75rem 2.75rem minmax(4rem, 1fr) 4.75rem 3rem 4.5rem;
  gap: 0.4rem 0.65rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
.entry-acc {
  border-bottom: 1px solid var(--border);
}
.entry-acc:last-child {
  border-bottom: none;
}
.entry-sum {
  display: grid;
  grid-template-columns: 6.75rem 2.75rem minmax(4rem, 1fr) 4.75rem 3rem 4.5rem;
  gap: 0.4rem 0.65rem;
  align-items: center;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.92rem;
}
.entry-sum::-webkit-details-marker { display: none; }
.entry-sum::marker { content: ""; }
.entry-sum .col-date a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.entry-sum .col-date a:hover { color: var(--accent); }
.entry-sum .col-brok {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-sum .col-pnl {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.entry-sum .col-edit {
  text-align: center;
}
.entry-sum .col-edit a {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}
.entry-sum .col-edit a:hover { color: var(--accent); }
.entry-sum .col-expand {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.expand-btn {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(61, 156, 240, 0.5);
  border-radius: 6px;
  background: rgba(61, 156, 240, 0.1);
  user-select: none;
}
.entry-acc[open] .expand-btn {
  background: rgba(61, 156, 240, 0.22);
  border-color: var(--accent);
}
.entry-expand {
  padding: 0 1rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}
.curated-label {
  margin: 0.65rem 0 0.35rem 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.curated-pre {
  margin: 0;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 18rem;
  overflow: auto;
  color: var(--text);
}
.open-day {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
}
@media (max-width: 720px) {
  .journal-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .journal-head,
  .entry-sum {
    min-width: 34rem;
  }
}

.form fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.35rem;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.form legend {
  padding: 0 0.5rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.form label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.form label.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}
.form input[type="text"],
.form input[type="number"],
.form input[type="date"],
.form textarea {
  width: 100%;
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9375rem;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}
.form textarea { font-family: inherit; resize: vertical; min-height: 5rem; }

.voice-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.voice-row .voice-label-text {
  flex: 1;
  min-width: 0;
}
.btn-voice {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.btn-voice:hover {
  background: rgba(56, 189, 248, 0.22);
  color: var(--text);
}
.btn-voice:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.voice-status {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.25rem 0 0.5rem 0;
  min-height: 1.1rem;
}

.btn {
  display: inline-block;
  padding: 0.62rem 1.2rem;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(165deg, #38bdf8 0%, #0ea5e9 100%);
  color: #0c1118;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  text-decoration: none;
  margin-right: 0.5rem;
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.25);
}
.btn:hover { filter: brightness(1.06); }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  box-shadow: none;
}
.btn.secondary:hover {
  border-color: var(--muted);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--accent);
  box-shadow: none;
}
.btn-ghost:hover {
  background: rgba(56, 189, 248, 0.12);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card-highlight {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.06);
}
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { margin-bottom: 0.35rem; }

.body-text {
  white-space: pre-wrap;
  margin: 0;
  font-family: inherit;
  font-size: 0.95rem;
}

.pnl { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0; }
.pnl-img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 0.75rem;
}
.tags { color: var(--muted); font-size: 0.9rem; }

a { color: var(--accent); }

.action-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.inline-form { margin: 0; display: inline; }
.action-hint { font-size: 0.85rem; color: var(--muted); max-width: 32rem; }
.setup-hint { font-size: 0.85rem; color: var(--muted); margin: 0 0 1rem 0; }

.sm { font-size: 0.85rem; }

.top nav a.nav-secondary {
  font-size: 0.85em;
  opacity: 0.85;
}

.alltime-strip {
  margin: 0 0 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.container-report {
  max-width: 52rem;
}

.report-note {
  font-size: 0.88rem;
  max-width: 48rem;
}

.report-nav-months {
  margin: 0 0 1.25rem 0;
}

.report-nav-months a { font-weight: 500; }

.card-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.report-summary h2,
.report-days h2,
.report-month-picker h2 {
  margin-top: 0;
}

.report-dl {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.35rem 1.25rem;
  margin: 0;
}
.report-dl dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.report-dl dd {
  margin: 0;
  font-weight: 500;
}

.month-pills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.month-pills li { margin: 0; }
.month-pill {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
}
.month-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}
.month-pill.current {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.report-day-head h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
}
.report-day-head h3 a {
  color: var(--text);
  text-decoration: none;
}
.report-day-head h3 a:hover { color: var(--accent); }
.report-day-meta {
  margin: 0;
  font-size: 0.88rem;
}
.report-body-label {
  margin: 1rem 0 0.35rem 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.report-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

@media print {
  body.report-page .top nav,
  body.report-page .foot,
  body.report-page .report-note,
  body.report-page .report-month-picker {
    display: none !important;
  }
  body.report-page {
    background: #fff;
    color: #111;
  }
  body.report-page .card-surface {
    border-color: #ccc;
    break-inside: avoid;
  }
}

/* --------------------------------------------------------------------------
   Calendar home (broker-style month grid)
   -------------------------------------------------------------------------- */

body.cal-page {
  font-family: "Outfit", "SF Pro Text", system-ui, -apple-system, sans-serif;
  background: #070b10;
  position: relative;
  overflow-x: hidden;
}

.cal-ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(61, 156, 240, 0.18), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 40%, rgba(62, 207, 142, 0.06), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(240, 113, 120, 0.05), transparent 40%),
    linear-gradient(180deg, #0b1018 0%, #070b10 40%, #05080c 100%);
}

.cal-page .top.cal-top {
  position: relative;
  z-index: 2;
  background: rgba(15, 20, 28, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cal-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #5eb8ff 0%, #3ecf8e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cal-page .top nav a.nav-active {
  color: var(--text);
  font-weight: 600;
}

.cal-main {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.cal-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}

.cal-kicker {
  margin: 0 0 0.35rem 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(139, 156, 179, 0.9);
}

.cal-title {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f2f6fb;
}

.cal-sub {
  margin: 0.5rem 0 0 0;
  max-width: 28rem;
  font-size: 0.95rem;
  color: rgba(139, 156, 179, 0.95);
  line-height: 1.5;
}

.cal-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cal-stat-card {
  min-width: 9.5rem;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(145deg, rgba(26, 35, 50, 0.95), rgba(18, 24, 34, 0.88));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cal-stat-card--dim .cal-stat-value,
.cal-stat-card--dim .cal-stat-mid {
  font-size: 1rem;
}

.cal-stat-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(139, 156, 179, 0.85);
  margin-bottom: 0.35rem;
}

.cal-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.cal-stat-mid {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cal-slash {
  margin: 0 0.35rem;
  color: var(--muted);
  font-weight: 400;
}

.cal-stat-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: rgba(139, 156, 179, 0.75);
}

.cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.cal-nav-btn:hover {
  background: rgba(61, 156, 240, 0.12);
  border-color: rgba(61, 156, 240, 0.45);
}

.cal-nav-today {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cal-grid-wrap {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(10, 14, 20, 0.55);
  padding: 0.85rem 0.75rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.45rem;
  padding: 0 0.15rem;
}

.cal-wd {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(139, 156, 179, 0.65);
}

.cal-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.45rem;
}

.cal-cell-wrap {
  min-width: 0;
}

.cal-cell {
  position: relative;
  min-height: 7.25rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(165deg, rgba(30, 40, 56, 0.55), rgba(16, 22, 32, 0.75));
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.cal-cell--empty {
  min-height: 7.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.04);
}

.cal-cell--has-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(61, 156, 240, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.cal-cell--win {
  border-color: rgba(62, 207, 142, 0.22);
  box-shadow: inset 0 0 0 1px rgba(62, 207, 142, 0.08);
}

.cal-cell--loss {
  border-color: rgba(240, 113, 120, 0.22);
  box-shadow: inset 0 0 0 1px rgba(240, 113, 120, 0.08);
}

.cal-cell--today {
  box-shadow: 0 0 0 2px rgba(61, 156, 240, 0.55), 0 8px 28px rgba(61, 156, 240, 0.12);
}

.cal-cell--history-range {
  background: linear-gradient(152deg, rgba(38, 48, 68, 0.92) 0%, rgba(18, 24, 34, 0.98) 100%);
  border: 1px solid rgba(230, 192, 108, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 14px 36px rgba(0, 0, 0, 0.28);
}

.cal-cell--history-range:hover {
  border-color: rgba(244, 210, 140, 0.48);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 0 0 1px rgba(230, 192, 108, 0.12),
    0 20px 44px rgba(0, 0, 0, 0.38);
}

.cal-story-panel {
  position: relative;
  margin: 0.1rem 0.3rem 0.35rem;
  padding: 0.55rem 0.5rem 0.55rem;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(0, 0, 0, 0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  align-items: stretch;
  flex: 1;
  min-height: 5rem;
}

.cal-story-eyebrow {
  display: block;
  margin: 0;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(230, 192, 108, 0.95);
}

.cal-cell-body--history {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 4.5rem;
  gap: 0;
  padding-top: 0.2rem;
}

.cal-history-kicker {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.28;
  color: #f6f9fc;
}

.cal-history-label {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(176, 194, 214, 0.95);
}

.cal-history-hint {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.35;
}

.cal-btn-history {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.1rem;
  padding: 0.48rem 0.65rem;
  min-height: 2.55rem;
  line-height: 1.25;
  border-radius: 999px;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #0c0e11;
  background: linear-gradient(165deg, #f0d491 0%, #c9a24d 55%, #b8923f 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 4;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.cal-btn-history__text {
  flex: 0 1 auto;
  text-align: center;
}

.cal-btn-history::after {
  content: "→";
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cal-btn-history:hover {
  filter: brightness(1.05);
  color: #080a0c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 4px 16px rgba(201, 162, 77, 0.35);
}

.cal-btn-history:hover::after {
  transform: translateX(4px);
  opacity: 1;
}

.cal-cell-body--history .cal-add-day--story {
  position: relative;
  z-index: 4;
  text-align: center;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  border-color: rgba(61, 156, 240, 0.4);
  background: rgba(61, 156, 240, 0.1);
}

.cal-cell-body--history .cal-add-day--story:hover {
  background: rgba(61, 156, 240, 0.18);
}

.cal-cell-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cal-cell-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.55rem 0 0.55rem;
  pointer-events: none;
}

.cal-dom {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(231, 236, 243, 0.95);
  font-variant-numeric: tabular-nums;
}

.cal-today-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(61, 156, 240, 0.2);
  color: #7ec8ff;
}

.cal-cell-body {
  position: relative;
  z-index: 2;
  padding: 0.15rem 0.55rem 0.35rem;
  pointer-events: none;
}

/* Must come after .cal-cell-body — that rule's pointer-events:none would otherwise block "Open story" / + Log */
.cal-cell-body.cal-cell-body--history {
  pointer-events: auto;
}

.cal-cell-body--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  gap: 0.35rem;
  pointer-events: auto;
}

.cal-pnl {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cal-pnl--muted {
  color: rgba(139, 156, 179, 0.5);
  font-weight: 600;
}

.cal-tickers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.4rem;
}

.cal-ticker {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #c8d4e6;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cal-no-tickers {
  margin: 0.35rem 0 0 0;
  font-size: 0.68rem;
  color: rgba(139, 156, 179, 0.55);
  line-height: 1.35;
}

.cal-cell-foot {
  position: relative;
  z-index: 3;
  padding: 0 0.5rem 0.45rem;
  text-align: right;
}

.cal-mini-link {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(126, 200, 255, 0.95);
  text-decoration: none;
  pointer-events: auto;
}

.cal-mini-link:hover {
  text-decoration: underline;
}

.cal-empty-hint {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(139, 156, 179, 0.55);
}

.cal-add-day {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(61, 156, 240, 0.35);
  background: rgba(61, 156, 240, 0.08);
}

.cal-add-day:hover {
  background: rgba(61, 156, 240, 0.15);
}

.cal-footer-hint {
  margin: 1.25rem 0 0 0;
  text-align: center;
  font-size: 0.85rem;
}

.cal-foot {
  position: relative;
  z-index: 2;
}

@media (max-width: 820px) {
  .cal-week {
    grid-template-columns: repeat(7, minmax(4.25rem, 1fr));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }
  .cal-weekdays {
    grid-template-columns: repeat(7, minmax(4.25rem, 1fr));
    overflow-x: auto;
  }
  .cal-cell {
    min-height: 6.5rem;
  }
}

/* --- Sign-in page (TJOURNAL_WEB_SECRET) --- */
body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: var(--bg, #0c0f14);
}

.login-box {
  max-width: 22rem;
}

.login-box h1 {
  margin: 0 0 0.35rem 0;
  font-size: 1.5rem;
}

.login-error {
  color: #f87171;
  font-size: 0.9rem;
  margin: 0.75rem 0;
}

.login-form label {
  display: block;
  font-size: 0.85rem;
  margin: 1rem 0 0.35rem 0;
  color: var(--muted, #8b949e);
}

.login-form input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font-size: 1rem;
}

.login-form .btn {
  margin-top: 1.1rem;
  width: 100%;
}

/* Playbook — editorial “letter to future you” */
body.playbook-page {
  position: relative;
  min-height: 100vh;
}

.playbook-ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 12% -8%, rgba(61, 156, 240, 0.14), transparent 52%),
    radial-gradient(90% 60% at 88% 12%, rgba(230, 192, 108, 0.1), transparent 48%),
    radial-gradient(70% 50% at 50% 100%, rgba(88, 120, 180, 0.12), transparent 55%);
  opacity: 0.95;
}

body.playbook-page > .top,
body.playbook-page > .container {
  position: relative;
  z-index: 1;
}

header.top.playbook-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(12, 14, 18, 0.92) 0%, rgba(12, 14, 18, 0.55) 100%);
  backdrop-filter: blur(10px);
}

.container-playbook {
  max-width: min(42rem, 100%);
  padding-bottom: 3rem;
}

.playbook-hero {
  margin: 0 0 1.5rem 0;
  padding: 0.25rem 0 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.playbook-eyebrow {
  margin: 0 0 0.5rem 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(230, 192, 108, 0.92);
}

.playbook-title {
  margin: 0 0 0.65rem 0;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: clamp(2.35rem, 6.2vw, 3.15rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: #f6f8fc;
}

.playbook-lead {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(0.98rem, 2.2vw, 1.12rem);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(176, 194, 214, 0.95);
  max-width: 36rem;
}

.playbook-meta {
  margin: 0 0 0.85rem 0;
  line-height: 1.65;
  font-size: 0.9rem;
  font-family: "Outfit", system-ui, sans-serif;
  color: rgba(155, 170, 188, 0.95);
}

.playbook-updated {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.playbook-mode-hint {
  margin: 0 0 1.5rem 0;
  font-size: 0.84rem;
  font-family: "Outfit", system-ui, sans-serif;
  font-style: italic;
  color: rgba(139, 156, 176, 0.95);
}

.playbook-article {
  font-family: "Source Serif 4", "Georgia", "Times New Roman", serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.82;
  letter-spacing: 0.006em;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  color: rgba(232, 238, 246, 0.96);
  padding: clamp(1.5rem, 4vw, 2.15rem) clamp(1.35rem, 4vw, 2.25rem) clamp(1.65rem, 4vw, 2.35rem);
  background:
    linear-gradient(165deg, rgba(32, 40, 54, 0.55) 0%, transparent 42%),
    linear-gradient(180deg, rgba(22, 28, 38, 0.97) 0%, rgba(16, 20, 28, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.25);
}

.playbook-article .pb-h1 {
  margin: 0 0 0.65rem 0;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: #fafbfe;
}

.playbook-article .pb-h2 {
  margin: 2.25rem 0 0.85rem 0;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: rgba(220, 232, 248, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.45rem;
}

.playbook-article .pb-h2:first-of-type {
  margin-top: 0.25rem;
}

.playbook-article .pb-h3 {
  margin: 1.6rem 0 0.6rem 0;
  font-family: "Cormorant Garamond", "Georgia", serif;
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.32;
  color: rgba(200, 216, 236, 0.98);
}

.playbook-article .pb-p {
  margin: 0 0 1.05em 0;
  max-width: 38rem;
  text-wrap: pretty;
}

.playbook-article .pb-p:last-child {
  margin-bottom: 0;
}

.playbook-article .pb-muted {
  color: rgba(155, 170, 188, 0.9);
}

.playbook-article .pb-ul,
.playbook-article .pb-ol {
  margin: 0.4rem 0 1.2rem 0;
  padding-left: 1.25rem;
  max-width: 38rem;
}

.playbook-article .pb-ul li,
.playbook-article .pb-ol li {
  margin-bottom: 0.55em;
  padding-left: 0.2rem;
}

.playbook-article .pb-ul li::marker {
  color: rgba(100, 180, 255, 0.85);
}

.playbook-article .pb-ol li::marker {
  color: rgba(230, 192, 108, 0.95);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.playbook-article strong {
  color: #f4f7fb;
  font-weight: 600;
}

.playbook-article .pb-hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 2rem 0;
}

.playbook-article .pb-bq {
  margin: 0 0 1.4rem 0;
  padding: 1.1rem 1.2rem 1.15rem 1.35rem;
  border-left: 3px solid rgba(230, 192, 108, 0.75);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(95deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.12) 100%);
  max-width: 38rem;
}

.playbook-article .pb-bq p {
  margin: 0;
  font-size: 1.14rem;
  line-height: 1.75;
  font-style: italic;
  color: rgba(248, 238, 216, 0.96);
}

.playbook-footer {
  margin: 2rem 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  align-items: center;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.88rem;
}

.playbook-foot-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(200, 228, 255, 0.95);
  background: rgba(61, 156, 240, 0.12);
  border: 1px solid rgba(61, 156, 240, 0.28);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.playbook-foot-link:hover {
  color: #fff;
  background: rgba(61, 156, 240, 0.22);
  border-color: rgba(61, 156, 240, 0.45);
}

/* Streak detail, wealth, voice upload */
.progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.progress--tall {
  height: 12px;
}
.progress-bar-inner {
  height: 100%;
  min-width: 0;
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.progress-bar-inner--alt {
  background: linear-gradient(90deg, #a78bfa, #818cf8);
}
.progress-bar-inner--pos {
  background: linear-gradient(90deg, #34d399, #22c55e);
}

.streak-detail-page .streak-progress-section {
  margin: 1.75rem 0;
}
.streak-detail-page .streak-progress-section h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
.streak-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.streak-progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}
.streak-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.streak-log-form-section {
  margin: 2rem 0;
}
.form-streak-log {
  display: grid;
  gap: 0.65rem;
  max-width: 32rem;
}

.wealth-page .wealth-hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.wealth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.wealth-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.wealth-card-value {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.form-wealth-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  max-width: 48rem;
}
.form-wealth-inline label {
  margin: 0;
}

.entry-form-page main.container {
  max-width: 44rem;
}
.entry-voice-upload-fieldset .voice-upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0 0;
}

.report-page .container-report h1 {
  letter-spacing: -0.02em;
  font-weight: 650;
}

.list-page main.container {
  max-width: 960px;
}

.cal-grid-wrap {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.streak-log-table form {
  display: inline;
  margin: 0;
}
.streak-log-table .btn.secondary {
  font-size: 0.75rem;
  padding: 0.28rem 0.55rem;
}

/* --------------------------------------------------------------------------
   Premium UI polish layer
   -------------------------------------------------------------------------- */

:root {
  --bg: #080d14;
  --bg-elevated: #0f1623;
  --surface: rgba(18, 26, 40, 0.9);
  --surface-2: rgba(16, 23, 35, 0.95);
  --border: rgba(150, 190, 255, 0.14);
  --border-strong: rgba(168, 206, 255, 0.22);
  --text: #f3f8ff;
  --muted: #a7b8d0;
  --accent: #64d2ff;
  --accent-dim: rgba(100, 210, 255, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 24px 64px rgba(0, 0, 0, 0.36);
}

body {
  background:
    radial-gradient(100% 70% at 50% -8%, rgba(83, 175, 255, 0.2), transparent 46%),
    radial-gradient(70% 50% at 96% 12%, rgba(110, 219, 255, 0.08), transparent 50%),
    linear-gradient(180deg, #070b11 0%, #080d14 48%, #060a11 100%);
}

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(14, 22, 34, 0.9) 0%, rgba(11, 18, 30, 0.82) 100%);
  border-bottom: 1px solid rgba(170, 210, 255, 0.18);
}

.top nav a {
  position: relative;
  overflow: hidden;
}

.top nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.top nav a:hover::before {
  opacity: 1;
}

.container,
.cal-main {
  animation: pageFadeIn 260ms ease-out;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.35rem);
  letter-spacing: -0.03em;
}

.foot {
  background: rgba(6, 11, 18, 0.58);
}

.grid {
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 20, 30, 0.92), rgba(11, 17, 27, 0.92));
  border: 1px solid rgba(163, 206, 255, 0.14);
  box-shadow: var(--shadow-sm);
}

.grid th {
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.03em;
}

.grid tbody tr {
  transition: background 0.16s ease, transform 0.16s ease;
}

.grid tbody tr:hover {
  transform: translateY(-1px);
}

.journal-wrap {
  border-radius: 14px;
  border-color: rgba(150, 195, 255, 0.16);
  background: linear-gradient(180deg, rgba(13, 19, 29, 0.9), rgba(10, 16, 26, 0.95));
  box-shadow: var(--shadow-md);
}

.journal-head {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
}

.entry-sum {
  transition: background 0.15s ease;
}

.entry-sum:hover {
  background: rgba(104, 178, 255, 0.08);
}

.curated-pre {
  border-radius: 10px;
  background: rgba(7, 12, 20, 0.82);
}

.form fieldset {
  border-color: rgba(170, 210, 255, 0.18);
  background:
    linear-gradient(160deg, rgba(29, 40, 60, 0.62) 0%, rgba(14, 20, 31, 0.84) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 16px 34px rgba(0, 0, 0, 0.28);
}

.form legend {
  color: #d4e9ff;
}

.form input[type="text"],
.form input[type="number"],
.form input[type="date"],
.form input[type="file"],
.form select,
.form textarea {
  border-color: rgba(170, 210, 255, 0.22);
  background: linear-gradient(180deg, rgba(5, 10, 17, 0.9), rgba(10, 16, 25, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.form input::placeholder,
.form textarea::placeholder {
  color: rgba(170, 188, 212, 0.74);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: rgba(99, 210, 255, 0.75);
  box-shadow:
    0 0 0 3px rgba(100, 210, 255, 0.18),
    0 8px 24px rgba(45, 163, 226, 0.24);
}

.btn {
  border: 1px solid rgba(174, 228, 255, 0.35);
  background:
    linear-gradient(180deg, rgba(118, 216, 255, 0.98) 0%, rgba(35, 176, 241, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 10px 24px rgba(24, 158, 226, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  border-color: rgba(170, 210, 255, 0.28);
  color: #d3e4f8;
}

.btn-voice {
  border-color: rgba(112, 208, 255, 0.48);
  background: rgba(86, 188, 247, 0.16);
}

.alltime-strip,
.action-strip,
.card,
.card-surface,
.wealth-card,
.streak-progress-card,
.cal-stat-card {
  border-color: rgba(164, 203, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 38px rgba(0, 0, 0, 0.28);
}

.alltime-strip,
.action-strip,
.card,
.card-surface {
  background:
    linear-gradient(180deg, rgba(18, 26, 40, 0.82), rgba(11, 18, 29, 0.9));
  border-radius: 14px;
}

.entry-acc {
  position: relative;
}

.entry-acc[open] {
  background: rgba(86, 167, 246, 0.06);
}

.cal-grid-wrap {
  border: 1px solid rgba(165, 202, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(7, 12, 19, 0.74), rgba(9, 14, 22, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 58px rgba(0, 0, 0, 0.42);
}

.cal-cell {
  border-color: rgba(166, 202, 255, 0.13);
  background: linear-gradient(165deg, rgba(34, 47, 66, 0.6), rgba(16, 24, 36, 0.82));
}

.cal-cell--has-entry:hover {
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(111, 182, 255, 0.26);
}

.cal-ticker {
  color: #dbedff;
  border-color: rgba(174, 214, 255, 0.16);
}

.report-page .container-report h1,
.list-page h1,
.entry-form-page h1,
.wealth-page h1,
.streak-detail-page h1 {
  background: linear-gradient(130deg, #f8fbff 0%, #cce7ff 42%, #90d9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.month-pill {
  background: rgba(7, 13, 21, 0.9);
  border-color: rgba(170, 210, 255, 0.2);
}

.month-pill.current {
  box-shadow: 0 6px 18px rgba(73, 169, 226, 0.25);
}

.pnl-img {
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.progress {
  background: rgba(255, 255, 255, 0.12);
}

.progress-bar-inner {
  box-shadow: 0 0 16px rgba(74, 192, 255, 0.45);
}

@media (max-width: 640px) {
  .container {
    padding: 1.4rem 1rem 1.6rem;
  }

  .form fieldset {
    padding: 0.9rem 1rem;
  }

  .journal-head,
  .entry-sum {
    min-width: 36rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
