:root {
  --bg: #020714;
  --bg-soft: #050d22;
  --panel: rgba(7, 16, 40, 0.75);
  --panel-2: rgba(10, 22, 52, 0.75);
  --line: rgba(104, 139, 210, 0.28);
  --text: #e6ecff;
  --muted: #9fb0d3;
  --brand: #84a7ff;
  --brand-2: #5fd0ff;
  --accent: #8698ff;
  --danger: #f79cb6;
  --shadow: 0 18px 42px rgba(1, 6, 26, 0.46);
  --body-bg:
    radial-gradient(circle at 8% 10%, rgba(89, 125, 204, 0.16), transparent 35%),
    radial-gradient(circle at 92% 3%, rgba(73, 132, 191, 0.12), transparent 32%),
    radial-gradient(circle at 50% 108%, rgba(55, 73, 140, 0.24), transparent 45%),
    linear-gradient(170deg, #01050f, #020a1f 52%, #04112f);
  --topbar-bg: rgba(6, 15, 38, 0.75);
  --menu-bg: rgba(9, 26, 68, 0.75);
  --menu-btn-bg: #102a64;
  --menu-btn-line: #4965a6;
  --menu-title: #d7e3ff;
  --install-bg: rgba(8, 18, 45, 0.75);
  --install-line: #3f5890;
  --dock-bg: #050f2c;
  --dock-active-bg: rgba(96, 122, 183, 0.28);
  --dock-active-line: rgba(145, 174, 238, 0.5);
  --ripple-light: rgba(176, 198, 244, 0.275);
  --ripple-mid: rgba(109, 139, 216, 0.23);
  --ripple-dark: rgba(13, 22, 48, 0.48);
  --ripple-glow: rgba(126, 160, 242, 0.23);
  --ambient-ripple-x: 50%;
  --ambient-ripple-y: 56%;
  --bottom-nav-occupied: 62px;
  --capture-nav-gap: 8px;
  --page-top-gap: max(4px, calc(env(safe-area-inset-top) + 2px));
}

body[data-theme="noir"] {
  --panel: rgba(7, 11, 24, 0.75);
  --panel-2: rgba(11, 14, 31, 0.75);
  --line: rgba(126, 138, 170, 0.24);
  --text: #edf2ff;
  --muted: #a8b0c3;
  --body-bg:
    radial-gradient(circle at 12% 12%, rgba(95, 103, 129, 0.12), transparent 36%),
    radial-gradient(circle at 92% 0%, rgba(84, 89, 112, 0.1), transparent 33%),
    radial-gradient(circle at 50% 110%, rgba(50, 56, 76, 0.25), transparent 45%),
    linear-gradient(180deg, #030308, #06070d 54%, #080a14);
  --topbar-bg: rgba(12, 13, 20, 0.75);
  --menu-bg: rgba(20, 22, 37, 0.75);
  --menu-btn-bg: #1d2239;
  --menu-btn-line: #515b7f;
  --menu-title: #dde5ff;
  --install-bg: rgba(14, 16, 30, 0.75);
  --install-line: #505a83;
  --dock-bg: #0b0d16;
  --dock-active-bg: rgba(117, 128, 170, 0.22);
  --dock-active-line: rgba(153, 166, 209, 0.42);
  --ripple-light: rgba(196, 202, 223, 0.23);
  --ripple-mid: rgba(129, 139, 171, 0.23);
  --ripple-dark: rgba(9, 11, 22, 0.575);
  --ripple-glow: rgba(141, 156, 202, 0.184);
}

body[data-theme="deepsea"] {
  --panel: rgba(3, 20, 36, 0.75);
  --panel-2: rgba(5, 28, 48, 0.75);
  --line: rgba(99, 160, 186, 0.25);
  --text: #deeff7;
  --muted: #9cb8c7;
  --body-bg:
    radial-gradient(circle at 9% 8%, rgba(56, 105, 128, 0.18), transparent 35%),
    radial-gradient(circle at 90% 4%, rgba(66, 122, 150, 0.14), transparent 34%),
    radial-gradient(circle at 52% 108%, rgba(19, 66, 92, 0.25), transparent 44%),
    linear-gradient(170deg, #020b12, #031722 52%, #062736);
  --topbar-bg: rgba(3, 22, 38, 0.75);
  --menu-bg: rgba(7, 48, 71, 0.75);
  --menu-btn-bg: #0d4565;
  --menu-btn-line: #3b7798;
  --menu-title: #d7effb;
  --install-bg: rgba(4, 24, 39, 0.75);
  --install-line: #316684;
  --dock-bg: #031a2b;
  --dock-active-bg: rgba(80, 145, 171, 0.28);
  --dock-active-line: rgba(129, 201, 229, 0.45);
  --ripple-light: rgba(163, 220, 239, 0.253);
  --ripple-mid: rgba(103, 171, 200, 0.23);
  --ripple-dark: rgba(7, 29, 45, 0.506);
  --ripple-glow: rgba(104, 180, 211, 0.184);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scrollbar-width: none;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html {
  background: #03060f;
}

body {
  min-height: 100svh;
  background: var(--body-bg);
  color: var(--text);
  font-family: Manrope, sans-serif;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  left: var(--ambient-ripple-x, 50%);
  top: var(--ambient-ripple-y, 56%);
  width: min(70vmin, 420px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.24);
  background:
    radial-gradient(
      circle,
      transparent 53%,
      var(--ripple-light) 57%,
      var(--ripple-mid) 60%,
      var(--ripple-dark) 64%,
      transparent 69%
    );
  box-shadow:
    inset 0 12px 26px rgba(213, 223, 255, 0.08),
    inset 0 -14px 28px rgba(4, 7, 18, 0.28),
    0 0 30px var(--ripple-glow);
  animation: ambientRipple 10.5s ease-out infinite;
  will-change: transform, opacity;
}

body.splash-active {
  overflow: hidden;
}

body.splash-active .settings-button {
  pointer-events: none;
}

p {
  margin: 0 0 10px;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  line-height: 1.08;
  font-family: Outfit, sans-serif;
}

h2 {
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
}

button,
textarea,
input {
  font: inherit;
  touch-action: manipulation;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(185deg, rgba(4, 6, 16, 0.98), rgba(5, 8, 19, 0.98));
  backdrop-filter: blur(6px);
  transition: opacity 420ms ease, visibility 420ms ease;
}

.splash-screen::before,
.splash-screen::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  border-radius: 50%;
  pointer-events: none;
}

.splash-screen::before {
  width: min(158vmin, 980px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(142, 173, 245, 0.26) 0%,
    rgba(99, 129, 208, 0.17) 34%,
    rgba(39, 58, 113, 0.11) 56%,
    rgba(6, 10, 22, 0) 74%
  );
  filter: blur(5px);
  opacity: 0.92;
  animation: splashGlowDrift 7.6s ease-in-out infinite;
}

.splash-screen::after {
  width: min(120vmin, 780px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(132, 157, 224, 0.2), rgba(15, 22, 46, 0) 70%);
  opacity: 0.52;
}

.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  text-align: center;
  opacity: 0;
  animation: splashTextFade 820ms ease forwards 140ms;
}

.splash-inner h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: 0.03em;
  text-shadow: 0 0 28px rgba(160, 185, 242, 0.2);
}

.splash-inner p {
  margin: 0;
  color: #c6d4f0;
  font-size: clamp(0.9rem, 2.7vw, 1rem);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 14px);
  width: 100vw;
  max-width: 100vw;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  background: linear-gradient(185deg, rgba(3, 6, 14, 0.94), rgba(3, 7, 17, 0.94));
  backdrop-filter: blur(6px);
}

.auth-gate[hidden] {
  display: none !important;
}

.auth-gate-card {
  width: min(460px, calc(100vw - 32px));
  margin-top: 2px;
  border: 1px solid #4f6eaf;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(9, 20, 49, 0.92), rgba(8, 18, 44, 0.92));
  box-shadow: 0 28px 60px rgba(2, 8, 30, 0.56);
  padding: 18px 16px;
  display: grid;
  gap: 10px;
}

@media (min-width: 720px) {
  .auth-gate {
    align-content: center;
    padding: 24px;
  }

  .auth-gate-card {
    margin-top: 0;
  }
}

.auth-gate-card h2 {
  margin: 0;
  font-size: 1.18rem;
}

.auth-gate-card p {
  margin: 0 0 2px;
  color: #c4d4f5;
  font-size: 0.9rem;
}

.auth-gate-intro {
  margin: 0 0 2px;
  color: #d2e0ff;
}

.auth-gate-card label {
  margin: 4px 0 0;
  color: #c3d4f9;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.auth-gate-card input[type="text"],
.auth-gate-card input[type="email"] {
  min-height: 44px;
  border: 1px solid #4f6fae;
  border-radius: 10px;
  background: rgba(7, 18, 44, 0.92);
  color: #ebf2ff;
  padding: 0 12px;
}

.auth-gate-ack {
  margin-top: 2px;
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: start;
  gap: 9px;
  border: 1px solid rgba(82, 107, 168, 0.58);
  border-radius: 10px;
  background: rgba(8, 18, 44, 0.64);
  padding: 8px 10px;
  color: #c4d4f5;
  font-size: 0.72rem;
  line-height: 1.35;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}

.auth-gate-ack input[type="checkbox"] {
  margin: 1px 0 0;
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: #8badff;
}

.auth-gate-policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-gate-policy-link {
  border: 0;
  background: transparent;
  color: #9fd3ff;
  padding: 0;
  margin: 0;
  min-height: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.auth-gate-policy-link:focus-visible {
  outline: 1px solid rgba(158, 203, 255, 0.75);
  outline-offset: 2px;
  border-radius: 4px;
}

.auth-gate-privacy-note {
  margin-top: 2px;
  color: #afc2e6;
  font-size: 0.74rem;
  line-height: 1.36;
}

.auth-gate-submit {
  min-height: 46px;
  border: 1px solid #6a86c8;
  border-radius: 11px;
  background: linear-gradient(135deg, #9eb6ff, #6fd9ff);
  color: #03132f;
  font-weight: 800;
}

.auth-gate-submit:disabled {
  opacity: 0.66;
  cursor: not-allowed;
}

.auth-gate-error {
  min-height: 1.1rem;
  color: #ffbfd2;
  font-size: 0.82rem;
  margin: 0;
}

body.policy-modal-open {
  overflow: hidden;
}

.policy-modal {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: 16px;
  width: 100vw;
  max-width: 100vw;
  background: linear-gradient(180deg, rgba(2, 5, 13, 0.8), rgba(3, 6, 14, 0.8));
  backdrop-filter: blur(6px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.policy-modal[hidden] {
  display: none !important;
}

.policy-modal-card {
  position: relative;
  width: min(760px, 96vw);
  max-height: min(86svh, 860px);
  overflow: auto;
  border: 1px solid rgba(84, 106, 165, 0.6);
  border-radius: 14px;
  background: linear-gradient(170deg, rgba(8, 16, 38, 0.96), rgba(8, 16, 34, 0.96));
  box-shadow: 0 34px 70px rgba(1, 6, 24, 0.6);
  padding: 16px 14px 14px;
}

.policy-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(123, 149, 214, 0.64);
  background: rgba(16, 27, 60, 0.9);
  color: #dbe8ff;
  font-size: 1.15rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.policy-modal-card h3 {
  margin: 0 36px 2px 0;
  font-size: 1.14rem;
  color: #f0f5ff;
}

.policy-effective-date {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: #b6c6e6;
}

.policy-modal-body {
  display: grid;
  gap: 10px;
  color: #d9e4fa;
  font-size: 0.84rem;
  line-height: 1.48;
}

.policy-modal-body section {
  display: grid;
  gap: 6px;
}

.policy-modal-body h4 {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: #f0f5ff;
}

.policy-modal-body h5 {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: #e1ebff;
}

.policy-modal-body p {
  margin: 0;
  color: #d2def6;
  font-size: 0.84rem;
}

.policy-modal-body ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: #d2def6;
}

.app {
  width: min(980px, 94vw);
  margin: 0 auto;
  padding: 0;
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 32;
  margin-bottom: 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  padding: calc(env(safe-area-inset-top) + 4px) 0 4px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(3, 6, 16, 0.96), rgba(3, 6, 16, 0));
  backdrop-filter: blur(2px);
  box-shadow: none;
}

.top-bar-minimal {
  min-height: calc(env(safe-area-inset-top) + 48px);
}

.settings-wrap {
  position: relative;
}

.settings-button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--menu-btn-line);
  background: var(--menu-bg);
  cursor: pointer;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 140ms ease, background 140ms ease;
}

.settings-button:focus:not(:focus-visible),
.settings-button:active {
  outline: none;
}

.settings-button span {
  width: 18px;
  height: 2px;
  border-radius: 3px;
  background: var(--menu-title);
}

.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(280px, 84vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--menu-bg);
  box-shadow: var(--shadow);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.settings-menu[hidden] {
  display: none !important;
}

.settings-title {
  margin: 0;
  color: var(--menu-title);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
}

.settings-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.menu-button {
  min-height: 42px;
  border: 1px solid var(--menu-btn-line);
  border-radius: 10px;
  background: var(--menu-btn-bg);
  color: var(--menu-title);
  font-weight: 700;
  cursor: pointer;
}

.menu-theme {
  min-height: 34px;
  border-radius: 8px;
  font-size: 0.75rem;
  padding: 0 6px;
}

.menu-theme.is-active {
  border-color: var(--dock-active-line);
  background: var(--dock-active-bg);
}

.menu-button.danger {
  border-color: #aa5670;
  background: #471a30;
  color: #ffdce8;
}

.overview {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 14% 0%, rgba(124, 181, 255, 0.18), transparent 44%),
    linear-gradient(152deg, rgba(10, 25, 60, 0.75), rgba(10, 29, 72, 0.75));
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.install-status {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--install-line);
  border-radius: 10px;
  background: var(--install-bg);
  color: #d5e3ff;
  font-size: 0.88rem;
}

.overview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview-card {
  border: 1px solid #4a6eb5;
  border-radius: 12px;
  background: rgba(7, 17, 43, 0.75);
  padding: 10px;
}

.overview-card span {
  display: block;
  margin-bottom: 4px;
  color: #bad0ff;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.overview-card strong {
  font-size: 1.03rem;
}

.tab-page {
  display: grid;
  gap: 12px;
}

.tab-page[data-page="capture"] {
  gap: 0;
  padding-bottom: 0;
}

.tab-page:not([data-page="capture"]) {
  padding-top: var(--page-top-gap);
  padding-bottom: calc(var(--bottom-nav-occupied) + env(safe-area-inset-bottom));
}

.tab-page[hidden] {
  display: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  padding: 14px;
  box-shadow: var(--shadow);
}

.history-overview {
  opacity: 1;
  transform: none;
  animation: none;
}

.daily-brief {
  border: 1px solid #4869ab;
  border-radius: 14px;
  background:
    radial-gradient(circle at 14% 0%, rgba(127, 176, 255, 0.2), transparent 42%),
    linear-gradient(156deg, rgba(10, 24, 59, 0.82), rgba(8, 20, 50, 0.82));
  padding: 12px;
}

.daily-brief-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.daily-brief-head h3 {
  margin: 0;
  font-size: 1rem;
}

.daily-brief-head-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.daily-brief-head span {
  color: #b7caed;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.daily-brief-confidence {
  border: 1px solid rgba(121, 151, 216, 0.58);
  border-radius: 999px;
  padding: 3px 8px;
  color: #dbe7ff !important;
  font-size: 0.63rem !important;
  letter-spacing: 0.06em !important;
  background: rgba(12, 28, 65, 0.72);
}

.daily-brief-confidence[data-tier="high"] {
  border-color: rgba(111, 190, 149, 0.72);
  background: rgba(15, 45, 34, 0.75);
}

.daily-brief-confidence[data-tier="medium"] {
  border-color: rgba(126, 161, 216, 0.66);
  background: rgba(14, 34, 74, 0.76);
}

.daily-brief-confidence[data-tier="low"] {
  border-color: rgba(179, 149, 105, 0.72);
  background: rgba(44, 32, 16, 0.76);
}

.daily-brief-status {
  margin: 0;
  min-height: 1.12rem;
  color: #bed2f7;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  animation: pulseSoft 1.2s ease-in-out infinite;
}

.daily-brief-skeleton {
  display: grid;
  gap: 7px;
  margin-top: 6px;
}

.daily-brief-skeleton span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(110deg, rgba(116, 146, 208, 0.18) 8%, rgba(184, 205, 245, 0.48) 18%, rgba(116, 146, 208, 0.18) 33%);
  background-size: 220% 100%;
  animation: briefSkeleton 1.25s linear infinite;
}

.daily-brief-skeleton span:nth-child(1) {
  width: 96%;
}

.daily-brief-skeleton span:nth-child(2) {
  width: 88%;
}

.daily-brief-skeleton span:nth-child(3) {
  width: 92%;
}

.daily-brief-skeleton span:nth-child(4) {
  width: 74%;
}

.daily-brief-content {
  display: grid;
  gap: 9px;
}

.daily-brief-content.is-visible .daily-brief-section {
  animation: briefCardIn 260ms ease both;
}

.daily-brief-content.is-visible .daily-brief-section:nth-child(2) {
  animation-delay: 40ms;
}

.daily-brief-content.is-visible .daily-brief-section:nth-child(3) {
  animation-delay: 80ms;
}

.daily-brief-content.is-visible .daily-brief-section:nth-child(4) {
  animation-delay: 120ms;
}

.daily-brief-content.is-visible .daily-brief-section:nth-child(5) {
  animation-delay: 160ms;
}

.daily-brief-content.is-visible .daily-brief-section:nth-child(6) {
  animation-delay: 200ms;
}

.daily-brief-content.is-visible .daily-brief-section:nth-child(7) {
  animation-delay: 240ms;
}

.daily-brief-section {
  border: 1px solid rgba(79, 110, 177, 0.62);
  border-radius: 11px;
  background: rgba(8, 19, 46, 0.74);
  padding: 9px;
}

.daily-brief-section h4 {
  margin: 0 0 5px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #bfd4fb;
}

.daily-brief-section p {
  margin: 0;
  color: #dce8ff;
  font-size: 0.86rem;
  line-height: 1.4;
}

.daily-brief-meta {
  color: #d2e0fb;
  font-size: 0.8rem;
}

.daily-brief-meta strong {
  color: #eaf2ff;
}

.daily-brief-divider {
  opacity: 0.45;
  margin: 0 5px;
}

.daily-brief-subtle {
  margin-top: 6px !important;
  color: #b9caea !important;
  font-size: 0.78rem !important;
}

.daily-brief-list {
  margin: 0;
  padding-left: 17px;
  display: grid;
  gap: 5px;
  color: #dbe8ff;
  font-size: 0.84rem;
}

.daily-brief-list li {
  line-height: 1.35;
}

.mood-sparkline {
  margin-top: 7px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 9px;
  height: 48px;
}

.mood-spark-point {
  position: relative;
  display: block;
  height: var(--point-height, 14px);
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, rgba(147, 188, 255, 0.92), rgba(98, 137, 233, 0.7));
  border: 1px solid rgba(145, 183, 255, 0.64);
  box-shadow: 0 6px 16px rgba(39, 70, 135, 0.24);
  transition: height 220ms ease, background 220ms ease, border-color 220ms ease;
}

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

.focus-pill {
  border: 1px solid rgba(86, 116, 182, 0.58);
  border-radius: 10px;
  background: rgba(10, 24, 58, 0.7);
  padding: 8px;
}

.focus-pill span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b5caef;
  font-weight: 700;
}

.focus-pill strong {
  font-size: 0.92rem;
  color: #e8f1ff;
}

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

.daily-brief-action {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(106, 138, 205, 0.75);
  background: rgba(16, 35, 79, 0.82);
  color: #dfebff;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
}

.daily-brief-action:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

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

.daily-brief-subtle.error {
  color: #f9a9ab !important;
}

.support-text {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.93rem;
}

.today-card {
  margin: 0 0 12px;
  border: 1px solid #44639d;
  border-radius: 12px;
  background: rgba(8, 20, 52, 0.75);
  padding: 11px;
}

.today-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.today-card-head h3 {
  margin: 0;
  font-size: 0.98rem;
}

.today-card-head span {
  color: #b3c8ef;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.today-card-summary {
  margin: 0 0 8px;
  color: #dce9ff;
  font-size: 0.9rem;
}

.today-card-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.today-card-metric {
  border: 1px solid #3d5a91;
  border-radius: 9px;
  background: rgba(9, 27, 67, 0.74);
  padding: 7px 8px;
}

.today-card-metric span {
  display: block;
  margin-bottom: 4px;
  color: #b4caf2;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.today-card-metric strong {
  font-size: 0.86rem;
  color: #e4efff;
}

.capture-hero-panel {
  --capture-top-gap: var(--page-top-gap);
  position: relative;
  margin-top: var(--capture-top-gap);
  margin-bottom: var(--capture-nav-gap);
  min-height: calc(
    100svh - var(--bottom-nav-occupied) - env(safe-area-inset-bottom) - var(--capture-top-gap) - var(--capture-nav-gap)
  );
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 6%, rgba(115, 150, 242, 0.18), transparent 44%),
    linear-gradient(160deg, rgba(8, 18, 45, 0.78), rgba(8, 18, 42, 0.78));
  overflow-anchor: none;
}

.capture-settings-wrap {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
}

.capture-eyebrow {
  margin: 0 0 2px;
  color: #b9cbef;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.capture-hero-title {
  margin: 8px 0 8px;
  font-size: clamp(1.5rem, 4.9vw, 2.2rem);
  max-width: 18ch;
}

.capture-hero-subtitle {
  max-width: 38ch;
  margin: 0 auto 16px;
  color: #b8c9ea;
  font-size: 0.92rem;
}

.voice-orb-stage {
  position: relative;
  width: fit-content;
  margin: auto auto 14px;
  display: grid;
  place-items: center;
  z-index: 1;
  animation: orbFloat 6.4s ease-in-out infinite;
}

.voice-orb-stage::before {
  content: none;
  position: absolute;
  width: min(88vw, 358px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 36% 24%, rgba(168, 197, 255, 0.26), rgba(168, 197, 255, 0.02) 45%),
    radial-gradient(circle at 62% 68%, rgba(123, 98, 228, 0.24), rgba(123, 98, 228, 0.02) 54%);
  filter: blur(13px);
  opacity: 0.44;
  animation: orbAuraDrift 6.8s ease-in-out infinite;
}

.voice-orb-stage::after {
  content: none;
  position: absolute;
  width: min(80vw, 318px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(112, 145, 255, 0.08) 0%,
    rgba(120, 103, 238, 0.1) 44%,
    rgba(14, 20, 50, 0) 72%
  );
  opacity: 0.28;
  animation: orbWelcomeRing 4.2s ease-in-out infinite;
}

.voice-orb-halo {
  display: none;
  position: absolute;
  width: min(74vw, 290px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(120, 162, 255, 0.28) 0%,
    rgba(136, 114, 248, 0.2) 38%,
    rgba(94, 111, 235, 0.08) 56%,
    rgba(90, 112, 220, 0.01) 70%
  );
  filter: blur(1.2px);
  transform: scale(calc(1.02 + var(--orb-level, 0) * 0.42));
  opacity: calc(0.54 + var(--orb-level, 0) * 0.3);
  transition: transform 140ms ease, opacity 140ms ease;
  animation: orbHaloBreath 5.8s ease-in-out infinite;
}

.record-button,
.save-button,
.ghost-button {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}

.voice-orb {
  --orb-level: 0;
  --orb-wobble-x: 0;
  --orb-wobble-y: 0;
  width: min(74.4vw, 298px);
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 0;
  color: #eaf1ff;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: none;
  background: 50% 50% / 146% no-repeat url("./assets/orb-custom-cropped.png");
  box-shadow: none;
  transform: scale(calc(1 + var(--orb-level, 0) * 0.16));
  transition: transform 120ms ease, border-color 200ms ease, background 220ms ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  padding: 0;
  text-shadow: 0 1px 6px rgba(3, 8, 25, 0.6);
  animation: none;
  -webkit-tap-highlight-color: transparent;
}

.voice-orb-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.voice-orb::before,
.voice-orb::after {
  content: none;
  position: absolute;
  pointer-events: none;
}

.voice-orb::before {
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 16%, rgba(244, 249, 255, 0.5), rgba(211, 225, 255, 0.05) 34%, rgba(0, 0, 0, 0) 60%);
  opacity: calc(0.34 + var(--orb-level, 0) * 0.24);
  transform: scale(calc(0.97 + var(--orb-level, 0) * 0.1));
  transition: transform 120ms ease, opacity 120ms ease;
}

.voice-orb::after {
  inset: 1.2%;
  border-radius: 50%;
  border: 1.6px solid rgba(197, 216, 255, 0.7);
  opacity: calc(0.54 + var(--orb-level, 0) * 0.26);
  transform: scale(calc(1 + var(--orb-level, 0) * 0.08));
  transition: transform 120ms ease, opacity 120ms ease;
  box-shadow:
    inset 0 0 18px rgba(171, 196, 255, 0.24),
    0 0 20px rgba(141, 173, 255, 0.42),
    0 0 44px rgba(126, 95, 255, 0.28);
  filter: blur(0.05px);
  pointer-events: none;
}

.voice-orb.is-recording {
  border-color: rgba(210, 227, 255, 0.78);
  background-image: url("./assets/orb-custom-cropped.png");
  background-size: 146%;
  background-position: 50% 50%;
  box-shadow: none;
}

.record-button:not(.voice-orb) {
  color: #05122d;
  background: linear-gradient(135deg, #9db4ff, #66dfff);
}

.record-button:not(.voice-orb).is-recording {
  color: #f3f8ff;
  background: linear-gradient(135deg, #3e7cff, #5a50ff);
  animation: pulse 1.2s ease-in-out infinite;
}

.capture-status {
  margin: 2px 0 10px;
  min-height: 1.2rem;
  max-height: 1.2rem;
  line-height: 1.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 120ms ease;
  color: #d4e1f9;
  position: relative;
  z-index: 2;
}

.capture-status.has-text {
  opacity: 1;
}

.capture-hero-actions {
  margin: 8px auto 8px;
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.capture-draft-actions {
  width: min(100%, 420px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.capture-draft-toggle {
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.84rem;
  width: 100%;
  margin: 0;
}

.capture-draft-clear {
  min-width: 116px;
}

.capture-draft-state {
  margin: 7px 0 0;
  color: #aebfdf;
  font-size: 0.79rem;
}

.capture-draft-panel {
  animation: dissolveIn 220ms ease;
  overflow-anchor: none;
}

.capture-draft-panel[hidden] {
  display: none !important;
}

.ghost-button {
  color: var(--text);
  border-color: #506dac;
  background: #0e2660;
  padding: 0 14px;
}

.save-button {
  width: 100%;
  color: #03132f;
  background: linear-gradient(135deg, #9eb0ff, #65dbff);
}

.save-button:disabled {
  cursor: not-allowed;
  color: #89a6db;
  background: #162a59;
}

.status {
  margin: 0 0 8px;
  color: #d2e0ff;
  font-weight: 700;
}

.status.recording {
  color: #b5d1ff;
}

.status.error {
  color: #ffc2d5;
}

.record-timer {
  margin: 4px 0 10px;
  min-height: 1.2rem;
  line-height: 1.2rem;
  opacity: 0;
  transition: opacity 120ms ease;
  color: #c8dcff;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  position: relative;
  z-index: 2;
}

.record-timer.is-active {
  opacity: 1;
}

.preview-wrap {
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #4e6dac;
  background: rgba(9, 23, 61, 0.75);
}

audio {
  width: 100%;
}

.prompt-row {
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chip {
  border: 1px solid #506fac;
  border-radius: 999px;
  background: #102a67;
  color: #dce8ff;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}

.prompt-chip:hover {
  border-color: #8fb1ff;
  background: #17357a;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #d8e6ff;
}

textarea,
input {
  width: 100%;
  border: 1px solid #4a6bb0;
  border-radius: 10px;
  background: #08173b;
  color: var(--text);
  padding: 10px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input {
  min-height: 44px;
}

#transcriptInput,
#highlightInput {
  margin: 0 0 12px;
}

.capture-meta-grid {
  margin-top: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.meta-block {
  border: 1px solid #4d6eb2;
  border-radius: 12px;
  background: rgba(11, 26, 68, 0.75);
  padding: 10px;
}

#moodInput {
  min-height: auto;
  padding: 0;
  accent-color: #8db2ff;
}

.mood-readout {
  margin: 8px 0 0;
  color: #dce8ff;
  font-size: 1rem;
}

.mood-readout strong {
  color: #8ed9ff;
}

.mood-mode-hint {
  margin: 6px 0 0;
  color: #9fb5dd;
  font-size: 0.72rem;
  line-height: 1.35;
}

.save-row {
  margin-top: 12px;
}

.dashboard-panel {
  background:
    radial-gradient(circle at 8% 0%, rgba(124, 181, 255, 0.12), transparent 42%),
    linear-gradient(160deg, rgba(8, 20, 50, 0.75), rgba(10, 29, 72, 0.75));
}

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

.range-tabs {
  display: flex;
  gap: 8px;
}

.range-tab {
  border: 1px solid #4e6cab;
  border-radius: 999px;
  background: #102960;
  color: #d5e4ff;
  font-size: 0.83rem;
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
}

.range-tab.is-active {
  border-color: #9bc1ff;
  color: #031026;
  background: linear-gradient(135deg, #9bb4ff, #66dcff);
}

.dashboard-cards {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dash-card {
  border: 1px solid #4a6eb2;
  border-radius: 12px;
  background: rgba(10, 26, 67, 0.75);
  padding: 10px;
}

.dash-label {
  display: block;
  margin: 0 0 4px;
  color: #b8cdf7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.dash-card strong {
  display: block;
  font-size: 1.25rem;
}

.dash-note {
  margin: 4px 0 0;
  font-size: 0.83rem;
  color: #abc2ed;
}

.trend-wrap {
  margin-top: 12px;
  border: 1px solid #4a6db0;
  border-radius: 12px;
  background: rgba(9, 25, 63, 0.75);
  padding: 12px;
}

.trend-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.trend-chart {
  margin-top: 12px;
}

.trend-grid {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.trend-axis {
  min-height: 176px;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  align-items: end;
  font-size: 0.66rem;
  color: #98add7;
  text-align: right;
  padding-bottom: 2px;
}

.trend-axis span {
  position: relative;
  top: 6px;
}

.trend-columns {
  min-height: 176px;
  display: grid;
  gap: 8px;
  align-items: end;
}

.trend-column {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  font: inherit;
  position: relative;
}

.trend-bubble {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(245, 250, 255, 0.96);
  color: #061125;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
}

.trend-column.is-active .trend-bubble,
.trend-column:hover .trend-bubble {
  opacity: 1;
}

.trend-column-track {
  position: relative;
  width: min(18px, 100%);
  height: 142px;
  border-radius: 999px;
  border: 1px solid #3c517f;
  background: linear-gradient(180deg, rgba(97, 111, 145, 0.32), rgba(56, 66, 94, 0.46));
  overflow: hidden;
  box-shadow: inset 0 8px 12px rgba(4, 8, 20, 0.32);
}

.trend-column.is-active .trend-column-track {
  border-color: #8eb1fb;
  box-shadow:
    inset 0 8px 12px rgba(4, 8, 20, 0.34),
    0 0 0 1px rgba(142, 177, 251, 0.36);
}

.trend-fill {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border-radius: 999px;
  min-height: 2px;
}

.trend-fill.deliverables {
  background: linear-gradient(180deg, #79e8ff, #2e82e3);
  opacity: 0.9;
}

.trend-fill.mood {
  left: 4px;
  right: 4px;
  background: linear-gradient(180deg, rgba(193, 214, 255, 0.95), rgba(127, 161, 235, 0.9));
  mix-blend-mode: screen;
  opacity: 0.82;
}

.trend-column-day {
  font-size: 0.7rem;
  color: #b8cbef;
  font-weight: 700;
}

.trend-column-value {
  font-size: 0.65rem;
  color: #9eb4dd;
  letter-spacing: 0.01em;
}

.trend-column.is-active .trend-column-day {
  color: #dbe8ff;
}

.trend-insight {
  margin: 12px 0 0;
  color: #d8e6ff;
  font-size: 0.86rem;
}

.audit-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 12px;
}

.audit-card {
  border: 1px solid #4a6eb2;
  border-radius: 12px;
  background: rgba(9, 26, 66, 0.75);
  padding: 10px;
}

.audit-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #bed2f8;
  font-weight: 700;
}

.audit-card strong {
  font-size: 1.18rem;
}

.summary-output {
  border: 1px solid #4a6eb2;
  border-radius: 12px;
  background: rgba(9, 25, 63, 0.75);
  padding: 12px;
  color: #dce8ff;
}

.summary-output p {
  margin: 0 0 8px;
}

.summary-output p:last-child {
  margin-bottom: 0;
}

.summary-list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #dfe9ff;
}

.weekly-brief-card {
  margin-top: 12px;
  border: 1px solid #4a6eb2;
  border-radius: 12px;
  background: rgba(9, 25, 63, 0.75);
  padding: 12px;
}

.weekly-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

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

.weekly-brief-source {
  border: 1px solid #4968a6;
  border-radius: 999px;
  background: rgba(10, 26, 64, 0.75);
  color: #bed1f7;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 6px 8px;
}

.weekly-brief-head h3 {
  margin: 0;
  font-size: 1rem;
}

.weekly-brief-refresh {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.76rem;
  border-radius: 8px;
}

.weekly-brief-text {
  margin: 0 0 10px;
  color: #d8e6ff;
  font-size: 0.9rem;
  line-height: 1.45;
}

.weekly-brief-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.weekly-brief-metric {
  border: 1px solid #4768a8;
  border-radius: 10px;
  background: rgba(11, 29, 71, 0.74);
  padding: 8px;
}

.weekly-brief-metric span {
  display: block;
  margin-bottom: 4px;
  color: #b8cef7;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.weekly-brief-metric strong {
  color: #e3eeff;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.entries-list {
  display: grid;
  gap: 8px;
}

.history-tools {
  margin: 0 0 10px;
  display: block;
}

.review-queue {
  margin: 0 0 10px;
  border: 1px solid #46649f;
  border-radius: 11px;
  background: rgba(9, 26, 67, 0.75);
  padding: 10px;
}

.review-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.review-queue-head h3 {
  margin: 0;
  font-size: 0.96rem;
}

.review-queue-head strong {
  min-width: 24px;
  text-align: center;
  border: 1px solid #5680cd;
  border-radius: 999px;
  background: rgba(34, 66, 132, 0.72);
  color: #e6f0ff;
  font-size: 0.74rem;
  padding: 3px 8px;
}

.review-queue-list {
  display: grid;
  gap: 7px;
}

.review-queue-item {
  width: 100%;
  border: 1px solid #496db1;
  border-radius: 9px;
  background: rgba(14, 35, 81, 0.74);
  color: #dbe8ff;
  text-align: left;
  padding: 8px 9px;
  cursor: pointer;
}

.review-queue-item strong {
  display: block;
  font-size: 0.83rem;
  margin-bottom: 2px;
}

.review-queue-item span {
  display: block;
  color: #b8ceef;
  font-size: 0.73rem;
}

.entry-card {
  border: 1px solid #4a6eb2;
  border-radius: 12px;
  background: rgba(9, 26, 66, 0.75);
  overflow: hidden;
}

.entry-toggle-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: rgba(11, 36, 87, 0.75);
  color: #e6efff;
  padding: 11px 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.entry-toggle-row small {
  display: block;
  color: #aac1ef;
  font-weight: 600;
  font-size: 0.77rem;
}

.entry-toggle-row .entry-chevron {
  color: #afcbff;
  font-size: 0.82rem;
  transition: transform 180ms ease;
}

.entry-card.is-open .entry-toggle-row {
  border-bottom-color: #4a6eb2;
}

.entry-card.is-open .entry-chevron {
  transform: rotate(180deg);
}

.entry-content {
  padding: 10px 12px 12px;
  display: none;
  animation: dissolveIn 220ms ease;
}

.entry-card.is-open .entry-content {
  display: block;
}

.entry-highlight {
  color: #c8d9ff;
  margin-bottom: 8px;
}

.entry-transcript {
  color: #d8e5ff;
  margin: 0 0 8px;
}

.entry-meta {
  margin: 0 0 8px;
  color: #b1c7ef;
  font-size: 0.84rem;
}

.entry-structured {
  margin: 0 0 8px;
  display: grid;
  gap: 6px;
}

.entry-structured-row {
  border: 1px solid #44639f;
  border-radius: 8px;
  background: rgba(10, 31, 78, 0.72);
  padding: 7px 8px;
}

.entry-structured-row span {
  display: block;
  color: #a9c0eb;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 3px;
}

.entry-structured-row strong {
  color: #dbe8ff;
  font-size: 0.81rem;
  line-height: 1.4;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.entry-review-editor {
  margin-top: 10px;
  border: 1px solid #4969a9;
  border-radius: 10px;
  background: rgba(7, 22, 56, 0.75);
  padding: 10px;
}

.entry-review-editor[hidden] {
  display: none !important;
}

.entry-review-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.entry-review-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

.entry-review-field {
  display: grid;
  gap: 5px;
}

.entry-review-field label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b8cdf2;
  font-weight: 700;
}

.entry-review-field input,
.entry-review-field textarea {
  margin: 0;
  min-height: 36px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #45639d;
  background: rgba(7, 18, 47, 0.8);
  color: #e4eeff;
  font-size: 0.85rem;
}

.entry-review-field textarea {
  min-height: 70px;
  resize: vertical;
}

.entry-review-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.entry-review-actions .save-button {
  width: auto;
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
}

.entry-toggle,
.delete-button {
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}

.entry-toggle {
  border: 1px solid #5a7fc3;
  background: #123470;
  color: #dfebff;
}

.delete-button {
  border: 1px solid #8e4f64;
  background: #411a2b;
  color: #ffd7e2;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: env(safe-area-inset-bottom);
  z-index: 28;
  width: 100%;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 2px max(12px, env(safe-area-inset-left)) 2px max(12px, env(safe-area-inset-right));
  background: var(--dock-bg);
  box-shadow: 0 -8px 22px rgba(1, 8, 29, 0.45);
  display: grid;
  gap: 0;
  align-items: center;
  justify-items: center;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  isolation: isolate;
}

.bottom-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: env(safe-area-inset-bottom);
  background: var(--dock-bg);
  pointer-events: none;
}

.nav-tab {
  width: 56px;
  height: 56px;
  min-height: 56px;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  margin: 0;
}

.nav-tab.is-active {
  box-shadow: 0 0 0 1px var(--dock-active-line);
  background: var(--dock-active-bg);
}

.nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  border: 1px solid rgba(164, 52, 89, 0.64);
  background: #7b2341;
  color: #ffe0eb;
  font-size: 0.66rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.nav-badge[hidden] {
  display: none !important;
}

.nav-icon {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
}

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

.dissolve {
  opacity: 0;
  transform: translateY(8px);
  animation: dissolveIn 500ms ease forwards;
}

.dissolve.delay-1 {
  animation-delay: 120ms;
}

.dissolve.delay-2 {
  animation-delay: 220ms;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid #9fc1ff;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .overview-grid,
  .dashboard-cards,
  .audit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .weekly-brief-grid {
    grid-template-columns: 1fr;
  }

  .entry-review-grid.two-col {
    grid-template-columns: 1fr;
  }

  .today-card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --page-top-gap: max(46px, calc(env(safe-area-inset-top) + 2px));
  }

  .app {
    width: min(980px, 96vw);
  }

  .capture-hero-panel {
    min-height: calc(
      100svh - var(--bottom-nav-occupied) - env(safe-area-inset-bottom) - var(--capture-top-gap) -
        var(--capture-nav-gap)
    );
  }

  .capture-meta-grid {
    grid-template-columns: 1fr;
  }

  .capture-draft-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .voice-orb {
    width: min(86.4vw, 286px);
    font-size: 0.9rem;
  }

  .overview-grid,
  .dashboard-cards,
  .audit-grid {
    grid-template-columns: 1fr;
  }

  .history-tools {
    grid-template-columns: 1fr;
  }

  .trend-grid {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 6px;
  }

  .trend-columns {
    gap: 6px;
  }

  .trend-column-track {
    width: 16px;
    height: 128px;
  }

  .bottom-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.low-power-motion::before {
  animation: none;
  opacity: 0.1;
  transform: translate(-50%, -50%) scale(1.9);
}

body.low-power-motion .voice-orb,
body.low-power-motion .voice-orb::before,
body.low-power-motion .voice-orb::after,
body.low-power-motion .voice-orb-stage,
body.low-power-motion .voice-orb-stage::before,
body.low-power-motion .voice-orb-stage::after,
body.low-power-motion .voice-orb-halo {
  animation: none !important;
}

body.low-power-motion .voice-orb {
  transition: none;
  transform: none;
  box-shadow: none;
}

body.low-power-motion .voice-orb::after {
  box-shadow: none;
}

body.low-power-motion .voice-orb-stage::before,
body.low-power-motion .voice-orb-stage::after,
body.low-power-motion .voice-orb-halo {
  opacity: 0.16;
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
    opacity: 0.08;
    transform: translate(-50%, -50%) scale(1.8);
  }

  .dissolve {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .record-button.is-recording,
  .voice-orb,
  .voice-orb::before,
  .voice-orb::after,
  .voice-orb-stage::before,
  .voice-orb-stage::after,
  .voice-orb-halo,
  .splash-screen::before,
  .daily-brief-status,
  .daily-brief-skeleton span,
  .daily-brief-content.is-visible .daily-brief-section {
    animation: none;
    transition: none;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 rgba(94, 149, 255, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(94, 149, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 rgba(94, 149, 255, 0);
  }
}

@keyframes pulseSoft {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 1;
  }
}

@keyframes briefSkeleton {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

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

@keyframes splashGlowDrift {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.95);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.04);
  }
}

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

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

@keyframes ambientRipple {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.24);
  }
  14% {
    opacity: 0.47;
  }
  70% {
    opacity: 0.212;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4.2);
  }
}

@keyframes orbAuraDrift {
  0% {
    opacity: 0.36;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.36;
    transform: scale(0.96);
  }
}

@keyframes orbFloat {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes orbWelcomeRing {
  0% {
    opacity: 0.18;
    transform: scale(0.98);
  }
  55% {
    opacity: 0.32;
    transform: scale(1.06);
  }
  100% {
    opacity: 0.18;
    transform: scale(0.98);
  }
}

@keyframes orbHaloBreath {
  0% {
    filter: blur(0.5px);
  }
  50% {
    filter: blur(1.1px);
  }
  100% {
    filter: blur(0.5px);
  }
}

@keyframes orbLiquidDrift {
  0% {
    background-position:
      33% 24%,
      70% 76%,
      50% 50%;
  }
  50% {
    background-position:
      40% 20%,
      65% 82%,
      50% 50%;
  }
  100% {
    background-position:
      33% 24%,
      70% 76%,
      50% 50%;
  }
}

@keyframes orbBlobMorph {
  0% {
    border-radius: 49% 51% 47% 53% / 52% 48% 54% 46%;
  }
  25% {
    border-radius: 52% 48% 53% 47% / 46% 54% 48% 52%;
  }
  50% {
    border-radius: 47% 53% 49% 51% / 55% 45% 52% 48%;
  }
  75% {
    border-radius: 54% 46% 50% 50% / 49% 51% 46% 54%;
  }
  100% {
    border-radius: 49% 51% 47% 53% / 52% 48% 54% 46%;
  }
}

@keyframes orbInnerMorph {
  0% {
    border-radius: 47% 53% 50% 50% / 53% 47% 56% 44%;
  }
  50% {
    border-radius: 54% 46% 49% 51% / 48% 52% 44% 56%;
  }
  100% {
    border-radius: 47% 53% 50% 50% / 53% 47% 56% 44%;
  }
}

@keyframes orbEdgeMorph {
  0% {
    border-radius: 50% 50% 51% 49% / 47% 53% 49% 51%;
  }
  50% {
    border-radius: 46% 54% 48% 52% / 53% 47% 54% 46%;
  }
  100% {
    border-radius: 50% 50% 51% 49% / 47% 53% 49% 51%;
  }
}
