/* Safari 12-compatible, no-build stylesheet. */
html, body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #050505;
  color: #FFF9E9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

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

button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  background: #CFA33A;
  color: #1A1207;
  cursor: pointer;
  font-weight: 650;
  touch-action: manipulation;
}

button:hover, button:focus {
  background: #E7C15B;
}

button.secondary {
  background: #211C14;
  color: #F5E7C4;
}

button.secondary:hover, button.secondary:focus {
  background: #382D1A;
}

button.danger {
  background: #4A1F2A;
  color: #FFB8C2;
}

button.icon-button {
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 12px;
}

button:disabled {
  opacity: 0.55;
  cursor: default;
}

input, select, textarea {
  box-sizing: border-box;
  min-height: 42px;
  width: 100%;
  border: 1px solid #4C3B1F;
  border-radius: 9px;
  padding: 9px 10px;
  background: #0C0B09;
  color: #FFF9E9;
}

input:focus, select:focus, textarea:focus, button:focus {
  outline: 2px solid #F2C14E;
  outline-offset: 2px;
}

.app-shell {
  max-width: 1540px;
  margin: 0 auto;
  padding: 14px 16px 30px;
}

.apps-home-mode .nav-bar { display: none !important; }
.dashboard-view-toggle { white-space: nowrap; }
.apps-home-view { margin-top: 14px; }
.apps-home-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.apps-home-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.apps-home-heading p { margin: 3px 0 0; }
.apps-home-heading .eyebrow { margin-bottom: 4px; font-size: 10px; letter-spacing: .15em; }
.apps-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 11px; }
.app-launcher-tile { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; min-width: 0; min-height: 112px; padding: 11px; border: 1px solid #3E301A; border-radius: 15px; background: #11100D; color: #FFF9E9; text-align: left; }
.app-launcher-tile:hover, .app-launcher-tile:focus { border-color: var(--app-accent); background: #17140F; }
.app-launcher-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 11px; background: #1B1812; color: var(--app-accent); font-size: 20px; font-weight: 750; }
.app-launcher-name { display: block; width: 100%; margin-top: 10px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.22; }
.app-launcher-open { display: block; margin-top: 5px; color: #AFA58F; font-size: 11px; font-weight: 500; }
.app-workspace-toolbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; padding: 7px 0; border-bottom: 1px solid #3C301B; background: #050505; }
.app-workspace-toolbar[hidden], .apps-home-view[hidden] { display: none !important; }
.app-workspace-toolbar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-workspace-toolbar button { min-height: 36px; padding: 6px 12px; }
.app-view-not-open { display: none !important; }

.topbar {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #3C301B;
  padding: 2px 0 12px;
}

.eyebrow {
  margin: 0 0 3px;
  color: #D4AF37;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

h2 {
  margin: 0;
  font-size: 19px;
}

h3 {
  margin-bottom: 5px;
  font-size: 15px;
}

.header-meta {
  color: #B8AF9C;
  font-size: 13px;
}

.timer-widget-toggle {
  position: fixed;
  z-index: 120;
  top: 8px;
  top: constant(safe-area-inset-top);
  top: env(safe-area-inset-top, 8px);
  left: 50%;
  transform: translateX(-50%);
  min-height: 20px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #F5D889;
  box-shadow: none;
  font-size: 9px;
}
.timer-widget-toggle[hidden], .timer-widget[hidden] { display: none; }
.timer-widget {
  position: fixed;
  z-index: 120;
  top: 21px;
  top: calc(constant(safe-area-inset-top) + 18px);
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  left: 50%;
  width: auto;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #F5E7C4;
  box-shadow: none;
}
.timer-widget-heading { display: flex; align-items: center; justify-content: center; gap: 3px; color: #D8B44A; font-size: 6px; letter-spacing: .06em; }
.timer-widget-heading button { min-height: 16px; padding: 0 3px; border: 0; background: transparent; font-size: 7px; }
.timer-widget-value { display: block; margin-top: 0; color: #00D68F; font-size: 14px; line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.timer-widget-label { display: block; color: #C6B995; font-size: 7px; line-height: 1.05; text-align: center; }
.timer-widget-open { display: block; min-height: 16px; margin: 0 auto; padding: 0 4px; border: 0; background: transparent; color: #F5D889; font-size: 7px; }

.hourly-earnings-status { margin: 7px 0 5px; color: #D7C28B; font-size: 12px; font-weight: 650; }
.hourly-earnings-progress { height: 5px; overflow: hidden; border-radius: 5px; background: #282219; }
.hourly-earnings-progress span { display: block; width: 0; height: 100%; background: #00D68F; transition: width .35s linear; }
.hourly-earnings-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 8px 0; }
.hourly-earnings-summary article { min-width: 0; padding: 8px 9px; border-radius: 9px; background: #100F0C; }
.hourly-earnings-summary .hourly-earnings-primary { grid-column: 1 / -1; }
.hourly-earnings-summary span, .hourly-earnings-summary small { display: block; color: #BDAF8C; font-size: 10px; }
.hourly-earnings-summary strong { display: block; margin: 1px 0; color: #00D68F; font-size: 21px; font-variant-numeric: tabular-nums; }
.hourly-earnings-summary article:not(.hourly-earnings-primary) strong { color: #F2DCA7; font-size: 16px; }
.hourly-earnings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.hourly-earnings-form label { min-width: 0; color: #BDAF8C; font-size: 10px; }
.hourly-earnings-form input { display: block; min-height: 34px; margin-top: 3px; padding: 5px 7px; font-size: 12px; }
.hourly-earnings-form button { grid-column: 1 / -1; min-height: 34px; padding: 5px 9px; font-size: 11px; }
.hourly-earnings-note { margin: 7px 0 0; color: #958A73; font-size: 10px; line-height: 1.35; }
.smoke-tracker-summary { margin: 8px 0; padding: 10px 12px; border-left: 3px solid #CFA33A; background: #100F0C; }
.smoke-tracker-label { display: block; color: #BDAF8C; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.smoke-tracker-summary strong { display: block; color: #F2DCA7; font-size: 23px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.smoke-tracker-summary small { display: block; color: #958A73; font-size: 10px; }
.smoke-tracker-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.smoke-tracker-log-now { width: 100%; min-height: 38px; margin: 0 0 5px; padding: 7px 10px; }
.smoke-tracker-manual-label { grid-column: 1 / -1; margin: 2px 0 0; color: #958A73; font-size: 10px; }
.smoke-tracker-puffs-field { grid-column: 1 / -1; }
.smoke-tracker-total-puffs { margin-top: 4px; color: #BDAF8C !important; }
.smoke-tracker-form label { min-width: 0; color: #BDAF8C; font-size: 10px; }
.smoke-tracker-form input { display: block; min-height: 35px; margin-top: 3px; padding: 5px 7px; font-size: 12px; }
.smoke-tracker-form button { grid-column: 1 / -1; min-height: 35px; padding: 5px 9px; font-size: 11px; }
.stopwatch-display { margin: 10px 0 8px; color: #00D68F; font-size: clamp(30px, 7vw, 48px); font-weight: 700; line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .035em; }
.stopwatch-controls { display: flex; justify-content: center; gap: 8px; }
.stopwatch-controls button { min-width: 88px; }
.stopwatch-controls button:disabled { opacity: .45; }
.stopwatch-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 8px; border-top: 1px solid #302718; color: #D6C69D; font-size: 12px; }
.stopwatch-history-heading span { color: #958A73; font-size: 10px; }
.stopwatch-session strong { font-variant-numeric: tabular-nums; }
.sleep-summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; margin: 8px 0; padding: 10px; border-radius: 9px; background: #100F0C; text-align: center; }
.sleep-summary-label { color: #BDAF8C; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sleep-summary strong { color: #78D8B4; font-size: clamp(25px, 6vw, 38px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.sleep-summary small { color: #958A73; font-size: 10px; }
.sleep-toggle-button { display: block; width: 100%; min-height: 42px; }
.sleep-toggle-button.is-running { background: #78D8B4; color: #06130D; }
.sleep-wake-form { margin-top: 8px; padding: 9px; border-radius: 9px; background: #100F0C; }
.sleep-wake-form p { margin: 0 0 7px; color: #BDAF8C; font-size: 10px; }
.sleep-wake-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 7px; }
.sleep-wake-fields label { display: grid; gap: 3px; color: #958A73; font-size: 9px; }
.sleep-wake-fields input { min-width: 0; width: 100%; min-height: 36px; padding: 5px 7px; }
.sleep-wake-form button { width: 100%; min-height: 36px; }
.sleep-tracker-note { margin: 6px 0 0; color: #958A73; font-size: 10px; line-height: 1.35; }
.sleep-calendar { margin-top: 10px; }
.sleep-calendar-grid { max-width: 420px; gap: 3px; }
.sleep-calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 41px; }
.sleep-calendar-day .sleep-day-dot { visibility: hidden; display: block; width: 7px; height: 7px; border-radius: 50%; background: #78D8B4; }
.sleep-calendar-day.has-sleep .sleep-day-dot { visibility: visible; }
.sleep-calendar-legend { display: flex; align-items: center; gap: 5px; margin: 6px 0 0; color: #AFA58F; font-size: 9px; }
.sleep-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #78D8B4; }
.sleep-calendar-details li { align-items: center; color: #E8E0D0; }
.sleep-session strong { color: #78D8B4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sleep-session-remove { min-height: 24px; width: 26px; padding: 0; border-radius: 6px; }
.sleep-edit-button { min-height: 26px; padding: 3px 7px; font-size: 10px; }
.sleep-edit-form { margin: 6px 0; padding: 9px; border: 1px solid #332A1D; border-radius: 8px; background: #100F0C; }
.sleep-edit-form > strong { display: block; margin-bottom: 7px; color: #D8C8A4; font-size: 11px; }
.sleep-edit-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.sleep-edit-fields label { display: grid; gap: 3px; min-width: 0; color: #958A73; font-size: 9px; }
.sleep-edit-fields input { min-width: 0; width: 100%; min-height: 34px; padding: 5px 7px; }
.sleep-edit-actions { display: flex; gap: 6px; margin-top: 8px; }
.sleep-edit-actions button { min-height: 32px; padding: 5px 9px; font-size: 10px; }
.hygiene-today-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 5px; margin: 8px 0; }
.hygiene-today-item { min-width: 0; padding: 7px 6px; border-radius: 8px; background: #100F0C; color: #C6B995; font-size: 9px; }
.hygiene-today-item span { display: flex; min-height: 24px; align-items: center; gap: 4px; line-height: 1.15; }
.hygiene-today-item strong { display: block; margin-top: 2px; color: #FFF3D5; font-size: 16px; font-variant-numeric: tabular-nums; }
.hygiene-log-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-items: end; }
.hygiene-log-controls button { min-width: 0; min-height: 36px; padding: 6px; font-size: 11px; }
.hygiene-custom-habit-form { display: grid; grid-template-columns: minmax(0, 1fr) 58px auto; align-items: end; gap: 6px; margin-top: 9px; }
.hygiene-custom-habit-form label { min-width: 0; color: #BDAF8C; font-size: 10px; }
.hygiene-custom-habit-form input { display: block; width: 100%; min-height: 34px; margin-top: 3px; padding: 5px 7px; font-size: 11px; }
.hygiene-custom-habit-form input[type="color"] { padding: 3px; }
.hygiene-custom-habit-form button { min-height: 34px; padding: 5px 8px; font-size: 10px; }
.hygiene-custom-controls { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.hygiene-custom-controls:empty { display: none; }
.hygiene-custom-log { display: inline-flex; align-items: center; gap: 5px; min-height: 30px !important; padding: 4px 7px !important; font-size: 10px !important; }
.hygiene-log-controls label, .hygiene-manual-form label { min-width: 0; color: #BDAF8C; font-size: 10px; }
.hygiene-log-controls select, .hygiene-manual-form input, .hygiene-manual-form select { display: block; width: 100%; min-height: 34px; margin-top: 3px; padding: 5px 7px; font-size: 11px; }
.hygiene-manual-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px solid #302718; }
.hygiene-manual-form button { min-height: 34px; padding: 5px 7px; font-size: 11px; }
.hygiene-calendar { margin-top: 10px; }
.hygiene-calendar-grid { max-width: 420px; gap: 3px; }
.hygiene-calendar-day { display: flex; flex-direction: column; gap: 2px; min-height: 41px; }
.hygiene-day-dots { display: flex; min-height: 6px; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px; }
.hygiene-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; vertical-align: middle; }
.dot-brush { background: #00D68F; }
.dot-shower { background: #51A9FF; }
.dot-bathroom { background: #F2A24A; }
.hygiene-calendar-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; margin: 6px 0 0; color: #AFA58F; font-size: 9px; }
.hygiene-calendar-legend span { display: inline-flex; align-items: center; gap: 4px; }
.hygiene-date-counts { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 7px; color: #C6B995; font-size: 9px; }
.hygiene-date-counts span { display: inline-flex; align-items: center; gap: 4px; }
.hygiene-calendar-details li { align-items: center; color: #E8E0D0; }
.hygiene-entry-remove { min-height: 24px; width: 26px; padding: 0; border-radius: 6px; }
@media (max-width: 420px) {
  .hygiene-today-item { padding: 6px 4px; font-size: 8px; }
  .hygiene-today-item span { gap: 3px; }
  .hygiene-today-item .hygiene-dot { width: 6px; height: 6px; flex-basis: 6px; }
}

.header-actions, .section-actions, .button-row, .compact-form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

.compact-form {
  min-width: 330px;
}

.compact-form input, .compact-form select {
  width: auto;
  -webkit-box-flex: 1;
  -ms-flex: 1 1 120px;
  flex: 1 1 120px;
}

.compact-form button {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

.connection {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #4C3B1F;
  border-radius: 999px;
  color: #E9DAB8;
  background: #100E0A;
  white-space: nowrap;
}

.connection.online { border-color: #147B59; color: #71EDC2; }
.connection.warning { border-color: #B6892B; color: #F2D47B; }
.connection.offline { border-color: #8A3141; color: #FFB1BE; }

.nav-bar {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 10px 0;
}

.nav-bar button {
  min-height: 35px;
  padding: 6px 12px;
  border: 1px solid #4A391F;
  background: #12100D;
  color: #E6D6B1;
  font-size: 13px;
  white-space: nowrap;
}

.off-white-chart-frame,
.alarm-timer-frame,
.coinstats-frame {
  display: block;
  width: 100%;
  border: 1px solid #3C301B;
  border-radius: 12px;
  background: #050505;
}

.off-white-chart-frame { height: 650px; }
.alarm-timer-frame { height: 640px; }
.coinstats-frame { height: 1050px; }

@media (max-width: 760px) {
  .off-white-chart-frame { height: 670px; }
  .alarm-timer-frame { height: 620px; }
  .coinstats-frame { height: 1100px; }
}

.notice {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #9F7623;
  border-radius: 12px;
  background: #1B150A;
  color: #F4E0A8;
}

.notice p { margin: 0; }
.notice strong { color: #FFF9E9; }

.grid {
  display: block;
}

.metric-card, .panel {
  box-sizing: border-box;
  border: 1px solid #3E301A;
  border-radius: 15px;
  background: #11100D;
}

#metricGrid {
  display: block;
}

.overview-centered { border-top: 1px solid #3E301A; border-bottom: 1px solid #3E301A; }
.overview-center-total { padding: 14px 12px 13px; text-align: center; background: linear-gradient(180deg, #14120D, #0C0B09); }
.overview-center-label { display: block; color: #BFB294; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.overview-center-total-value { display: block; margin: 5px 0 3px; color: #FFF4D6; font-size: 38px; font-weight: 760; letter-spacing: -.045em; line-height: 1.05; }
.overview-center-note { display: block; color: #AFA58F; font-size: 10px; line-height: 1.3; }
.overview-center-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #342B1E; }
.overview-center-stat { min-width: 0; padding: 11px 8px 10px; text-align: center; border-right: 1px solid #292217; }
.overview-center-stat:last-child { border-right: 0; }
.overview-center-value { display: block; margin: 4px 0 3px; color: #FFF4D6; font-size: 19px; font-weight: 720; letter-spacing: -.02em; white-space: nowrap; }
.overview-center-stat.positive .overview-center-value,
.overview-center-total-value.positive { color: #00D68F; }
.overview-center-stat.negative .overview-center-value,
.overview-center-total-value.negative { color: #FF4D67; }
.overview-center-stat.neutral .overview-center-value,
.overview-center-total-value.neutral { color: #D8C98F; }
.overview-center-stat .overview-center-note { min-height: 13px; }

.allocation-strip { padding: 11px 12px 10px; border-top: 1px solid #342B1E; background: #0D0C0A; }
.allocation-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: #FFF4D6; font-size: 11px; }
.allocation-heading span { color: #BFB294; font-size: 10px; }
.allocation-bar { display: flex; height: 7px; overflow: hidden; margin: 8px 0 7px; border-radius: 5px; background: #242018; }
.allocation-segment.crypto { background: #00C98A; }
.allocation-segment.stocks { background: #D5AA45; }
.allocation-legend { display: flex; flex-wrap: wrap; gap: 5px 18px; color: #BFB294; font-size: 10px; }
.allocation-legend span { display: inline-flex; align-items: center; gap: 5px; }
.allocation-legend strong { color: #FFF4D6; font-size: 10px; }
.allocation-legend em { color: #AFA58F; font-style: normal; }
.allocation-dot { width: 7px; height: 7px; border-radius: 50%; background: #00C98A; }
.allocation-dot.stocks { background: #D5AA45; }
.allocation-strip small { display: block; margin-top: 5px; color: #8F8776; font-size: 9px; line-height: 1.3; }
.allocation-pie-wrap { display: flex; align-items: center; gap: 12px; }
.allocation-pie { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%; background: conic-gradient(#00C98A 0 88%, #D5AA45 88% 100%); }
.all-assets-panel { max-width: 100%; margin-bottom: 12px; overflow: hidden; }
.all-assets-panel .section-heading { margin-bottom: 8px; }
.all-assets-total { color: #00D68F; font-size: 21px; font-weight: 750; }
.all-assets-content { border-top: 1px solid #342B1E; padding-top: 12px; }
.all-assets-visual { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.2fr); align-items: center; gap: 20px; }
.asset-pie-area { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; padding: 8px; border-right: 1px solid #342B1E; }
.asset-pie-3d { display: block; width: 250px; height: 230px; overflow: visible; }
.asset-pie-3d { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.asset-pie-slice { cursor: pointer; transition: stroke-width .12s ease, opacity .12s ease; }
.asset-pie-slice:hover, .asset-pie-slice:focus, .asset-pie-slice[aria-pressed="true"] { opacity: .86; outline: none; }
.asset-pie-slice:focus { stroke-width: 15; }
.asset-pie-interaction-hint { margin-top: 3px; color: #AFA58F; font-size: 10px; text-align: center; }
.asset-pie-selection { min-height: 16px; margin-top: 4px; color: #E8D7AE; font-size: 11px; font-weight: 650; text-align: center; }
.asset-pie-area strong { margin-top: -8px; color: #FFF4D6; font-size: 24px; }
.asset-pie-area > span { color: #AFA58F; font-size: 11px; }
.all-assets-breakdown { min-width: 0; }
.all-assets-breakdown table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; }
.all-assets-breakdown th, .all-assets-breakdown td { padding: 9px 10px; border-bottom: 1px solid #332A1D; text-align: left; }
.all-assets-breakdown th { color: #BFB294; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.all-assets-breakdown td.numeric, .all-assets-breakdown th.numeric { text-align: right; }
.asset-key { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 2px; }
.asset-breakdown-total td { border-top: 1px solid #7A5B24; color: #FFF4D6; font-weight: 750; }
.asset-breakdown-debt td { color: #FF6B7D; }
.asset-breakdown-net td { color: #00D68F; font-weight: 750; }
.all-assets-breakdown td.asset-value-cash { color: #00D68F; }
.all-assets-breakdown td.asset-value-usdc { color: #4A8FE7; }
.all-assets-breakdown td.asset-value-stocks { color: #B97AE0; }
.all-assets-breakdown td.asset-value-roth { color: #E48752; }
.asset-category-detail-trigger td { padding-top: 0; padding-bottom: 0; }
.asset-category-toggle { display: flex; width: 100%; min-height: 37px; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: #FFF4D6; text-align: left; font: inherit; cursor: pointer; }
.asset-category-toggle .asset-key { flex: 0 0 auto; }
.asset-category-chevron { margin-left: auto; color: #D6B35C; font-size: 13px; }
.asset-category-detail-row[hidden] { display: none !important; }
.asset-category-detail-row > td { padding: 0 5px 10px !important; background: #0D0C0A; }
.asset-position-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.asset-position-table th, .asset-position-table td { padding: 7px 8px; border-bottom: 1px solid #332A1D; text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.asset-category-detail-row .asset-position-table { border: 1px solid #332A1D; border-radius: 8px; overflow: hidden; }
.asset-category-detail-row .asset-position-table th, .asset-category-detail-row .asset-position-table td { font-size: 10px; padding-top: 6px; padding-bottom: 6px; }
.asset-position-table th { color: #BFB294; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.asset-position-table td.numeric, .asset-position-table th.numeric { text-align: left; }
.asset-position-table th:first-child, .asset-position-table td:first-child { width: 28%; }
.asset-position-table th:nth-child(2), .asset-position-table td:nth-child(2) { width: 22%; }
.asset-position-table th:nth-child(3), .asset-position-table td:nth-child(3) { width: 25%; }
.asset-position-table th:nth-child(4), .asset-position-table td:nth-child(4) { width: 25%; }
.asset-position-table.asset-position-stocks th:first-child, .asset-position-table.asset-position-stocks td:first-child { width: 40%; }
.asset-position-table.asset-position-stocks th:nth-child(2), .asset-position-table.asset-position-stocks td:nth-child(2) { width: 29%; }
.asset-position-table.asset-position-stocks th:nth-child(3), .asset-position-table.asset-position-stocks td:nth-child(3) { width: 31%; }
.asset-position-table.asset-position-roth th:first-child, .asset-position-table.asset-position-roth td:first-child { width: 40%; }
.asset-position-table.asset-position-roth th:nth-child(2), .asset-position-table.asset-position-roth td:nth-child(2) { width: 30%; }
.asset-position-table.asset-position-roth th:nth-child(3), .asset-position-table.asset-position-roth td:nth-child(3) { width: 30%; }
.asset-position-table.asset-position-debts th:first-child, .asset-position-table.asset-position-debts td:first-child { width: 65%; }
.asset-position-table.asset-position-debts th:nth-child(2), .asset-position-table.asset-position-debts td:nth-child(2) { width: 35%; text-align: right; }
.asset-position-table.asset-position-debts td.numeric { text-align: right; }
.asset-position-table td:first-child strong { display: block; font-weight: 650; }
.asset-position-table td:first-child small { display: block; color: #AFA58F; font-size: 10px; }
.asset-position-quantity, .asset-position-table td.numeric { font-variant-numeric: tabular-nums; }
.asset-position-table th, .asset-position-table td { padding-left: 5px; padding-right: 5px; }
.asset-position-remainder td { color: #D6B35C; }
.asset-position-total td { border-top: 1px solid #7A5B24; border-bottom: 0; font-weight: 750; }
.asset-position-total td.numeric { text-align: right; white-space: nowrap; border-left: 1px solid #332A1D; padding-left: 9px; padding-right: 9px; }
.asset-position-roth .asset-position-total td { color: #E48752; }
.asset-position-crypto .asset-position-total td { color: #23D6A1; }
.asset-position-stocks .asset-position-total td { color: #B97AE0; }
@media (max-width: 600px) {
  .asset-position-table.asset-position-crypto,
  .asset-position-table.asset-position-roth { display: block; width: 100%; }
  .asset-position-table.asset-position-crypto thead,
  .asset-position-table.asset-position-roth thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .asset-position-table.asset-position-crypto tbody,
  .asset-position-table.asset-position-roth tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .asset-position-table.asset-position-crypto tbody tr,
  .asset-position-table.asset-position-roth tbody tr { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; padding: 5px 0; border-bottom: 1px solid #332A1D; }
  .asset-position-table.asset-position-crypto tbody td,
  .asset-position-table.asset-position-roth tbody td { display: block; width: auto !important; min-width: 0; padding: 4px 6px !important; border: 0; text-align: left !important; white-space: normal; overflow-wrap: anywhere; font-size: 11px; }
  .asset-position-table.asset-position-crypto tbody td.asset-position-name,
  .asset-position-table.asset-position-roth tbody td.asset-position-name,
  .asset-position-table.asset-position-crypto tbody td.asset-position-total-label,
  .asset-position-table.asset-position-roth tbody td.asset-position-total-label { grid-column: 1 / -1; }
  .asset-position-table.asset-position-crypto tbody td[data-label]::before,
  .asset-position-table.asset-position-roth tbody td[data-label]::before { display: block; margin-bottom: 2px; color: #AFA58F; font-size: 9px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
  .asset-position-table.asset-position-crypto tbody td[data-label="Quantity"]::before,
  .asset-position-table.asset-position-roth tbody td[data-label="Quantity"]::before { content: "Quantity"; }
  .asset-position-table.asset-position-crypto tbody td[data-label="Cost basis"]::before,
  .asset-position-table.asset-position-roth tbody td[data-label="Cost basis"]::before { content: "Cost basis"; }
  .asset-position-table.asset-position-crypto tbody td[data-label="Worth"]::before,
  .asset-position-table.asset-position-roth tbody td[data-label="Worth"]::before { content: "Worth"; }
  .asset-position-table.asset-position-crypto .asset-position-total,
  .asset-position-table.asset-position-roth .asset-position-total { border-top: 1px solid #7A5B24; border-bottom: 0; }
  .asset-position-table.asset-position-crypto .asset-position-total td.numeric,
  .asset-position-table.asset-position-roth .asset-position-total td.numeric { min-width: 0; padding: 5px 6px !important; white-space: nowrap; font-size: 10px; }
  .asset-position-table.asset-position-roth .asset-position-total td[data-label="Worth"] { grid-column: 2; }
}
.money-plan-panel { margin-bottom: 12px; }
.money-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-card { min-width: 0; padding: 14px; border: 1px solid #3E301A; border-radius: 12px; background: #0D0C0A; }
.plan-card h3 { margin: 0 0 10px; color: #E8D7AE; font-size: 14px; }
.plan-card-wide { grid-column: 1 / -1; }
.plan-primary { color: #FFF4D6; font-size: 26px; font-weight: 760; line-height: 1.2; }
.plan-primary.positive { color: #00D68F; }
.plan-primary.negative { color: #FF6B7D; }
.plan-caption { margin: 3px 0 9px; color: #AFA58F; font-size: 11px; }
.plan-kv, .trend-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #282219; color: #BFB294; font-size: 12px; }
.plan-kv strong { color: #FFF4D6; }
.plan-input-label { display: block; margin: 9px 0 5px; color: #BFB294; font-size: 11px; }
.plan-input-label input { margin-top: 4px; min-height: 36px; }
.plan-card small { display: block; margin-top: 8px; color: #8F8776; font-size: 10px; line-height: 1.4; }
.plan-progress { height: 7px; margin: 6px 0; overflow: hidden; border-radius: 5px; background: #29241A; }
.plan-progress span { display: block; height: 100%; border-radius: inherit; background: #00C98A; }
.plan-table-wrap { max-width: 100%; overflow-x: auto; }
.plan-card table { min-width: 760px; width: 100%; border-collapse: collapse; }
.plan-card th, .plan-card td { padding: 8px 7px; border-bottom: 1px solid #30271B; text-align: left; font-size: 11px; }
.plan-card th { color: #BFB294; font-size: 10px; text-transform: uppercase; }
.plan-card th.numeric, .plan-card td.numeric { text-align: right; }
.plan-table-input { min-height: 32px; min-width: 110px; padding: 5px 7px; font-size: 11px; }
.plan-progress-cell { min-width: 155px; color: #AFA58F; }
.concentration-row { margin: 10px 0; }
.concentration-label { display: flex; justify-content: space-between; gap: 8px; color: #E9DFC6; font-size: 11px; }
.concentration-label small { display: inline; margin: 0 0 0 4px; color: #8F8776; }
.concentration-label strong { white-space: nowrap; color: #FFF4D6; }
.trend-head { border: 0; }
.trend-head strong { color: #00D68F; font-size: 21px; }
.plan-trend-chart { display: block; width: 100%; height: 150px; margin: 4px 0; }

.everyday-finance-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.paycheck-splitter-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; margin: 10px 0 14px; }
.paycheck-splitter-controls > label { flex: 1 1 180px; max-width: 320px; color: #BFB294; font-size: 12px; }
.paycheck-splitter-controls > label input { display: block; width: 100%; min-height: 42px; margin-top: 4px; padding: 8px; font-size: 18px; }
.paycheck-cash-token { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 84px; min-height: 66px; padding: 10px; border: 1px solid #E4BD52; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #F3D778, #A47A20 76%); color: #171108; box-shadow: 0 5px 16px #D5A93455; cursor: grab; animation: paycheck-token-float 2.5s ease-in-out infinite; }
.paycheck-cash-token:active { cursor: grabbing; }
.paycheck-cash-token span { font-size: 24px; }
.paycheck-cash-token strong { font-size: 13px; font-variant-numeric: tabular-nums; }
@keyframes paycheck-token-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.paycheck-crafting-table { padding: 12px; border: 1px dashed #A47A20; border-radius: 12px; background-color: #100E0A; background-image: linear-gradient(#342A1944 1px, transparent 1px), linear-gradient(90deg, #342A1944 1px, transparent 1px); background-size: 30px 30px; }
.paycheck-crafting-table:focus-within, .paycheck-crafting-table.drag-over { border-color: #E4BD52; background-color: #17130B; }
.paycheck-table-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #E8D7AE; }
.paycheck-table-title button, .paycheck-add-category { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.paycheck-allocation-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(90px, .5fr) minmax(85px, .55fr) 34px; align-items: end; gap: 8px; padding: 8px 0; border-bottom: 1px solid #3A2E1D; }
.paycheck-allocation-row label { min-width: 0; color: #AFA58F; font-size: 10px; }
.paycheck-allocation-row input { display: block; width: 100%; min-width: 0; min-height: 36px; margin-top: 3px; padding: 6px; }
.paycheck-allocation-value { align-self: center; color: #00D68F; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.paycheck-split-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; margin-top: 9px; color: #BFB294; font-size: 11px; }
.paycheck-split-summary strong { color: #F5E7C4; }
.finance-glance-card { min-width: 0; border: 1px solid #3E301A; border-radius: 11px; background: #0D0C0A; overflow: hidden; }
.finance-glance-head { display: flex; align-items: stretch; gap: 5px; min-width: 0; padding: 8px; }
.finance-glance-head.dashboard-section-header { padding-right: 82px; }
.finance-glance-toggle { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; min-height: 49px; padding: 0; border: 0; background: transparent; color: #E8D7AE; text-align: left; cursor: pointer; }
.finance-glance-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.finance-glance-copy b, .finance-glance-copy h3 { margin: 0; color: #D6C69D; font-size: 13px; line-height: 1.25; }
.finance-glance-copy strong { overflow-wrap: anywhere; color: #00D68F; font-size: 19px; line-height: 1.12; font-variant-numeric: tabular-nums; }
.finance-glance-copy small { color: #988E7A; font-size: 10px; line-height: 1.25; }
.finance-glance-chevron { flex: 0 0 auto; color: #CBB986; font-size: 17px; }
.finance-glance-hide { align-self: flex-start; min-width: 39px; min-height: 29px; padding: 4px 6px; font-size: 10px; }
.finance-glance-details { padding: 1px 9px 10px; border-top: 1px solid #302719; }
.finance-glance-details[hidden] { display: none; }
.finance-glance-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid #282219; color: #BFB294; font-size: 11px; }
.finance-glance-row strong { flex: 0 0 auto; color: #FFF4D6; font-variant-numeric: tabular-nums; }
.finance-glance-note, .finance-glance-details small { display: block; margin: 6px 0; color: #988E7A; font-size: 10px; line-height: 1.4; }
.finance-glance-input, .finance-split-inputs label { display: block; margin: 7px 0; color: #BFB294; font-size: 10px; }
.finance-glance-input input, .finance-split-inputs input, .finance-card-limit-row input { display: block; width: 100%; min-width: 0; min-height: 32px; margin-top: 3px; padding: 5px 7px; font-size: 12px; }
.finance-split-inputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.finance-split-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
.finance-split-results > div { display: flex; justify-content: space-between; gap: 5px; padding: 5px 0; border-bottom: 1px solid #282219; color: #BFB294; font-size: 10px; }
.finance-split-results strong { color: #FFF4D6; }
.finance-card-limit-row, .finance-autopay-row { display: grid; grid-template-columns: minmax(0, 1fr) 105px; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid #282219; color: #E9DFC6; font-size: 10px; }
.finance-card-limit-row small, .finance-autopay-row small { display: block; margin: 2px 0 0; color: #988E7A; font-size: 9px; }
.finance-card-limit-row label { color: #988E7A; }
.finance-autopay-row { grid-template-columns: minmax(0, 1fr) auto minmax(90px, 130px); }
.finance-autopay-row label { display: flex; align-items: center; gap: 4px; color: #BFB294; white-space: nowrap; }
.finance-autopay-row select { min-width: 0; width: 100%; min-height: 30px; padding: 4px; font-size: 10px; }
.finance-contribution-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin: 7px 0; }
.finance-contribution-form label { min-width: 0; color: #988E7A; font-size: 9px; }
.finance-contribution-form input { width: 100%; min-width: 0; min-height: 31px; margin-top: 2px; padding: 4px 6px; font-size: 11px; }
.finance-contribution-form label:nth-child(3), .finance-contribution-form button { grid-column: 1 / -1; }
.finance-contribution-form button { min-height: 32px; padding: 5px; font-size: 10px; }
.hidden-finance-widgets-manager, .hidden-sections-manager { margin-top: 8px; padding: 7px 9px; border: 1px solid #3E301A; border-radius: 9px; color: #D6C69D; font-size: 11px; }
.hidden-finance-widgets-manager[hidden], .hidden-sections-manager[hidden] { display: none; }
.hidden-finance-widgets-manager button, .hidden-sections-manager button { display: block; width: 100%; margin-top: 4px; padding: 6px; text-align: left; }

@media (max-width: 720px) {
  .everyday-finance-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .finance-glance-head { padding: 6px; gap: 3px; }
  .finance-glance-toggle { min-height: 47px; gap: 3px; }
  .finance-glance-copy strong { font-size: 16px; }
  .finance-glance-copy b { font-size: 10px; }
  .finance-glance-copy small { font-size: 9px; }
  .finance-glance-hide { min-width: 34px; padding: 3px; font-size: 9px; }
  .finance-glance-details { padding-right: 7px; padding-left: 7px; }
  .paycheck-crafting-table { padding: 8px; }
  .sync-review-dialog { padding: 14px; }
  .sync-review-actions { display: grid; grid-template-columns: 1fr; }
  .paycheck-allocation-row { grid-template-columns: minmax(0, 1fr) minmax(72px, .5fr) 34px; gap: 6px; }
  .paycheck-allocation-row .paycheck-allocation-value { grid-column: 1 / 3; grid-row: 2; text-align: left; padding-bottom: 5px; }
  .paycheck-allocation-row > button { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .finance-split-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-card-limit-row, .finance-autopay-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .finance-autopay-row label { justify-self: start; }
  .finance-autopay-row select { max-width: 100%; }
  .finance-card-limit-row input { max-width: 100%; }
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .app-shell { width: 100%; max-width: 100%; box-sizing: border-box; }
  .overview-center-total { padding: 12px 10px; }
  .overview-center-total-value { font-size: 34px; }
  .overview-center-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-center-stat:nth-child(2) { border-right: 0; }
  .overview-center-stat:nth-child(-n+2) { border-bottom: 1px solid #292217; }
  .overview-center-stat:nth-child(3) { border-right: 1px solid #292217; }
  .overview-center-value { font-size: 17px; }
  .allocation-strip { padding: 9px 10px; }
  .allocation-legend { gap: 5px 12px; }
  .allocation-pie-wrap { gap: 9px; }
  .all-assets-visual { min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .all-assets-breakdown { width: 100%; min-width: 0; }
  .all-assets-breakdown table { width: 100%; min-width: 0; table-layout: fixed; }
  .all-assets-breakdown th:first-child, .all-assets-breakdown td:first-child { width: 48%; }
  .all-assets-breakdown th:nth-child(2), .all-assets-breakdown td:nth-child(2) { width: 30%; }
  .all-assets-breakdown th:nth-child(3), .all-assets-breakdown td:nth-child(3) { width: 22%; }
  .asset-pie-area { min-height: 260px; border-right: 0; border-bottom: 1px solid #342B1E; }
  .asset-pie-3d { width: 210px; height: 195px; }
  .all-assets-breakdown th, .all-assets-breakdown td { padding: 7px 5px; }
  .money-plan-grid { grid-template-columns: 1fr; }
  .plan-card-wide { grid-column: auto; }
  .plan-card { padding: 11px; }
  .concentration-label { align-items: flex-start; flex-direction: column; gap: 1px; }
}

#overview {
  margin: 10px 0 12px;
}

.metric-note, .muted, .tiny {
  color: #B8AF9C;
}
.metric-note { font-size: 11px; line-height: 1.25; }
.tiny { font-size: 11px; }

#overview .section-heading { align-items: center; margin-bottom: 8px; }
#overview .section-heading h2 { margin-bottom: 0; font-size: 19px; }
#overview .section-heading p { font-size: 11px; }
#overviewStatus { white-space: nowrap; font-size: 10px; }

.positive { color: #00D68F !important; }
.negative { color: #FF4D67 !important; }
.neutral { color: #D8C98F !important; }

.panel {
  margin-top: 12px;
  padding: 13px;
}

.section-heading {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 11px;
}

.section-heading p { margin: 2px 0 0; color: #B8AF9C; font-size: 13px; }
#alarm-timer .timer-sync-actions { flex: 0 0 auto; margin-right: 116px; }
#alarm-timer .timer-sync-actions button { white-space: nowrap; }
.dashboard-section-collapsible { position: relative; }
.section-collapse-toggle { position: absolute; top: 7px; right: 7px; z-index: 2; width: 32px; min-width: 32px; min-height: 30px; margin: 0; padding: 3px; border-color: #5B4725; color: #F5E7C4; font-size: 17px; line-height: 1; }
.section-visibility-toggle { position: absolute; top: 7px; right: 43px; z-index: 2; width: 32px; min-width: 32px; min-height: 30px; margin: 0; padding: 3px; border-color: #5B4725; color: #D7C28B; font-size: 15px; line-height: 1; }
.dashboard-section-header { min-width: 0; box-sizing: border-box; padding-right: 116px; }
.dashboard-section-collapsed > :not(.dashboard-section-header) { display: none !important; }
.dashboard-section-hidden { display: none !important; }
.section-reorder-handle { position: absolute; top: 7px; right: 79px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 32px; min-width: 32px; min-height: 30px; margin: 0; padding: 3px; border-color: #5B4725; color: #CBB986; font-size: 16px; line-height: 1; cursor: grab; touch-action: none; -ms-touch-action: none; }
.section-reorder-handle:active { cursor: grabbing; }
.dashboard-section-dragging { opacity: .72; outline: 1px dashed #CFA33A; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid #44351D;
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th, td {
  border-bottom: 1px solid #342918;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  background: #17130D;
  color: #D8C79D;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:last-child td { border-bottom: 0; }
td.numeric, th.numeric { text-align: right; }
.holdings-total td { border-top: 2px solid #9F7623; border-bottom: 0; background: #1B150A; font-weight: 800; }
.holdings-total td:first-child { color: #FFF4D6; }
.holdings-total .tiny { font-weight: 500; }
.holdings-group td { border-top: 2px solid #6C501E; border-bottom: 1px solid #493719; background: #20180B; color: #F2D47B; font-weight: 850; letter-spacing: 0.08em; }
.holdings-subtotal td { border-bottom: 1px solid #493719; background: #17130D; font-weight: 750; }
.holdings-subtotal td:first-child { color: #E7D9B9; }
.holdings-subtotal .tiny { font-weight: 500; }
.liability-subtotal td:nth-child(6) { color: #FF4D67; }
.asset-name { font-weight: 750; }
.ticker { color: #B8AF9C; font-size: 11px; }
.status-tag {
  display: inline-block;
  border-radius: 99px;
  padding: 3px 6px;
  background: #282116;
  color: #E3D2A8;
  font-size: 10px;
  white-space: nowrap;
}
.status-tag.live { background: #123A31; color: #74EAC4; }
.status-tag.delayed { background: #423313; color: #F2D47B; }
.status-tag.cached { background: #312719; color: #E9D3A0; }
.status-tag.manual { background: #352B17; color: #F0D687; }
.status-tag.unavailable, .status-tag.stale { background: #422330; color: #FFB4C0; }

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px;
}

/* Keep the M1 summary and account rows in one vertical reading flow. */
#finance .two-column { display: block; }
#finance .two-column > div + div { margin-top: 12px; }

.summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.summary-list li {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  border-bottom: 1px solid #3C301C;
  padding: 7px 0;
  font-size: 14px;
}
.summary-list li span { min-width: 0; }
.summary-list li strong { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; margin-left: 10px; }
.summary-list li:last-child { border-bottom: 0; }
.summary-list .total { padding-top: 9px; color: #FFF4D6; font-size: 17px; font-weight: 800; }

/* Keep the account list in familiar rows, but remove the wide empty table gaps. */
.financial-items-wrap { margin-top: 8px; }
.financial-items-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.financial-items-table th,
.financial-items-table td {
  padding: 6px 7px;
  font-size: 12px;
  line-height: 1.25;
  vertical-align: top;
}
.financial-items-table th:nth-child(1),
.financial-items-table td:nth-child(1) { width: 40%; }
.financial-items-table th:nth-child(2),
.financial-items-table td:nth-child(2) { width: 24%; }
.financial-items-table th:nth-child(3),
.financial-items-table td:nth-child(3) { width: 20%; }
.financial-items-table th:nth-child(4),
.financial-items-table td:nth-child(4) { width: 16%; }
.financial-items-table td.numeric,
.financial-items-table th.numeric { white-space: nowrap; }
.financial-items-table td:first-child .tiny {
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.2;
}

.bank-view-content { display: block; }
.bank-view-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; align-items: start; justify-items: center; }
.bank-view-group { min-width: 0; margin-top: 4px; }
.bank-view-monthly, .bank-view-calculations { grid-column: 1 / -1; }
.bank-monthly-toolbar { display: flex; align-items: center; gap: 8px; margin: 4px 0; color: #BFB294; font-size: 12px; }
.bank-monthly-toolbar button { min-height: 27px; padding: 4px 9px; font-size: 10px; }
.bank-view-monthly [hidden] { display: none !important; }
.bank-view-group h3 { margin: 0 0 4px; color: #BFB294; font-size: 12px; }
.bank-view-group .table-wrap { display: inline-block; width: auto; max-width: 100%; vertical-align: top; }
.bank-view-table { display: table; width: auto; min-width: 0; max-width: 100%; border-collapse: collapse; table-layout: auto; }
.bank-view-table th, .bank-view-table td { padding: 4px 3px; border-bottom: 1px solid #332A1D; text-align: left; }
.bank-view-table th:first-child, .bank-view-table td:first-child { width: auto; }
.bank-view-table th:last-child, .bank-view-table td:last-child { width: 1%; padding-left: 8px; }
.bank-view-table th { color: #AFA58F; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.bank-view-table td { font-size: 12px; }
.bank-view-table td.numeric, .bank-view-table th.numeric { text-align: right; white-space: nowrap; }
.bank-view-table tr.bank-view-total td { font-weight: 750; border-top: 1px solid #6A5125; }

@media (max-width: 620px) {
  .bank-view-grid { grid-template-columns: minmax(0, 1fr); }
  .bank-view-monthly { grid-column: auto; }
}

.upcoming-bills-content { display: block; }
.bill-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: #AFA58F; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.bill-total strong { color: #00D68F; font: 700 17px var(--mono, monospace); letter-spacing: 0; }
.bill-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(90px, auto) minmax(86px, auto) auto; gap: 8px 14px; align-items: center; padding: 7px 2px; border-bottom: 1px solid #332A1D; }
.bill-row:last-child { border-bottom: 0; }
.bill-name { min-width: 0; font-size: 13px; font-weight: 650; }
.bill-name small, .bill-date small { display: block; margin-top: 2px; color: #AFA58F; font-size: 10px; line-height: 1.25; font-weight: 400; }
.bill-date { white-space: nowrap; }
.bill-date strong { font-size: 12px; }
.bill-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bill-row:not(.bill-paid) .bill-name,
.bill-row:not(.bill-paid) .bill-date strong,
.bill-row:not(.bill-paid) .bill-amount { color: #FF5368; }
.bill-row:not(.bill-paid) .bill-name small,
.bill-row:not(.bill-paid) .bill-date small { color: #C56A75; }
.bill-due-today:not(.bill-paid) .bill-date strong { color: #FF5368; }
.bill-paid-toggle { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: #AFA58F; font-size: 11px; cursor: pointer; }
.bill-paid-toggle input { box-sizing: border-box; width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: #00C98A; }
.bill-paid .bill-name,
.bill-paid .bill-date strong,
.bill-paid .bill-amount,
.bill-paid .bill-paid-toggle { color: #00D68F; }
.bill-paid .bill-name small,
.bill-paid .bill-date small { color: #55B994; }
.bill-installment-row { grid-template-columns: minmax(130px, 1fr) minmax(90px, auto) minmax(110px, auto) minmax(120px, auto); }
.bill-monthly-amount small { display: block; margin-top: 2px; color: #C56A75; font-size: 9px; font-weight: 500; }
.bill-installment-tracker { display: grid; justify-items: end; gap: 3px; }
.bill-installment-tracker small { color: #C56A75; font-size: 9px; line-height: 1.2; white-space: nowrap; }
.routine-tracker { margin-top: 10px; padding-top: 8px; border-top: 1px solid #332A1D; }
.routine-tracker h3 { margin: 0 0 4px; color: #AFA58F; font-size: 11px; }
.routine-tracker-content { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 14px; }
.routine-row { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-width: 0; }
.routine-row > strong { font-size: 12px; }
.routine-checks { display: flex; align-items: center; gap: 4px; }
.routine-check { display: inline-flex; align-items: center; justify-content: center; gap: 2px; color: #AFA58F; font-size: 9px; cursor: pointer; }
.routine-check input { box-sizing: border-box; width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; accent-color: #00C98A; }
.routine-check span { font-size: 8px; line-height: 1; color: #AFA58F; }
.routine-check input:checked + span { color: #00D68F; font-weight: 800; }
.bill-calendar, .quick-notes { margin-top: 12px; padding-top: 10px; border-top: 1px solid #332A1D; }
.bill-calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.bill-calendar h3, .quick-notes h3 { margin: 0 0 7px; color: #D8C8A4; font-size: 13px; }
.bill-calendar-heading h3 { margin: 0; }
.bill-calendar-controls { display: flex; align-items: center; gap: 9px; color: #FFF9E9; font-size: 12px; }
.bill-calendar-controls button { min-height: 28px; width: 30px; padding: 2px; border-radius: 7px; font-size: 18px; line-height: 1; }
.bill-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 490px; }
.bill-calendar-weekday, .bill-calendar-day, .bill-calendar-empty { display: flex; min-height: 30px; align-items: center; justify-content: center; border-radius: 7px; }
.bill-calendar-weekday { color: #AFA58F; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.bill-calendar-day { width: 100%; min-height: 30px; padding: 0; border: 0; background: #14120F; color: #E8E0D0; font-size: 12px; font-variant-numeric: tabular-nums; }
.bill-calendar-day:hover, .bill-calendar-day:focus { background: #282116; color: #FFF9E9; }
.bill-calendar-day.has-bill { background: #4A1F2A; color: #FF5368; box-shadow: inset 0 0 0 1px #9D3447; font-weight: 800; }
.bill-calendar-day.has-bill:hover, .bill-calendar-day.has-bill:focus { background: #692838; color: #FF9BA8; }
.bill-calendar-day.has-bill.all-bills-paid { background: #123A2D; color: #00D68F; box-shadow: inset 0 0 0 1px #087A59; }
.bill-calendar-day.has-bill.all-bills-paid:hover, .bill-calendar-day.has-bill.all-bills-paid:focus { background: #19543F; color: #58F0BC; }
.bills-payday-calendar-panel { margin-bottom: 12px; }
.financial-calendar-grid { max-width: 560px; }
.financial-calendar-day { position: relative; min-height: 38px; }
.financial-calendar-day.has-payday i { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: #F2C14E; }
.financial-calendar-day.payday-only { background: #342A15; color: #F2C14E; box-shadow: inset 0 0 0 1px #8D6B28; font-weight: 800; }
.financial-calendar-day.payday-only:hover, .financial-calendar-day.payday-only:focus { background: #51401E; color: #FFE29A; }
.financial-calendar-day.has-bill.has-payday i { background: #F2C14E; box-shadow: 0 0 0 2px rgba(0, 0, 0, .55); }
.bill-calendar-day.is-today { outline: 1px solid #D9B65E; outline-offset: 1px; }
.bill-calendar-day.is-selected { box-shadow: inset 0 0 0 2px #D9B65E; }
.bill-calendar-details { max-width: 490px; min-height: 24px; margin-top: 8px; padding: 8px 10px; border: 1px solid #332A1D; border-radius: 8px; color: #E8E0D0; font-size: 11px; }
.bill-calendar-details > strong { color: #D8C8A4; }
.bill-calendar-details ul { margin: 6px 0 0; padding: 0; list-style: none; }
.bill-calendar-details li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: #FF5368; }
.bill-calendar-details li.calendar-bill-paid { color: #00D68F; }
.bill-calendar-details li.calendar-payday { color: #F2C14E; }
.bill-calendar-details li strong { white-space: nowrap; }
.bill-calendar-details p { margin: 6px 0 0; color: #AFA58F; }
.bill-calendar-legend { display: flex; align-items: center; gap: 6px; margin: 7px 0 0; color: #AFA58F; font-size: 10px; }
.bill-calendar-legend span { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: #FF5368; }
.payday-month-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.payday-month-summary article { min-width: 0; padding: 10px 12px; border: 1px solid #40331D; border-radius: 10px; background: #12100C; }
.payday-month-summary article span { display: block; color: #AFA58F; font-size: 11px; }
.payday-month-summary article strong { display: block; margin-top: 3px; color: #00D68F; font-size: 18px; }
.payday-month-summary article small { display: block; margin-top: 3px; color: #BDAF8C; font-size: 10px; line-height: 1.25; }
.payday-calendar-day.payday-only { background: #342A15; color: #F2C14E; }
.payday-calendar-day.payday-all-paid { background: #123A2D; color: #00D68F; box-shadow: inset 0 0 0 1px #087A59; font-weight: 800; }
.payday-calendar-day.payday-all-paid i { background: #00D68F; }
.payday-paid-legend-dot { background: #00D68F !important; }
.payday-occurrence-list li { align-items: center; color: #F2C14E; }
.payday-occurrence-list li.payday-received { color: #00D68F; }
.payday-occurrence-list li label { display: flex; align-items: center; gap: 6px; min-width: 0; cursor: pointer; }
.payday-occurrence-list li input { width: 16px; height: 16px; min-height: 16px; margin: 0; accent-color: #00D68F; }
.payday-occurrence-list li strong { flex: 0 0 auto; }
.financial-calendar-legend { display: flex; align-items: center; gap: 6px; margin: 7px 0 0; color: #AFA58F; font-size: 10px; }
.financial-calendar-legend span { display: inline-block; width: 9px; height: 9px; border-radius: 3px; }
.financial-calendar-legend .bill-legend-dot { background: #FF5368; }
.financial-calendar-legend .payday-legend-dot { margin-left: 8px; border-radius: 50%; background: #F2C14E; }
.quick-notes textarea { display: block; min-height: 150px; resize: vertical; font-size: 13px; line-height: 1.45; }
.quick-notes small { display: block; margin-top: 5px; color: #AFA58F; font-size: 10px; }
@media (max-width: 520px) {
  .bill-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 5px 8px; }
  .bill-name { grid-column: 1; }
  .bill-date { grid-column: 1; grid-row: 2; }
  .bill-amount { grid-column: 2; grid-row: 1 / span 2; }
  .bill-paid-toggle { grid-column: 3; grid-row: 1 / span 2; }
  .bill-installment-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 7px; }
  .bill-installment-row .bill-name { grid-column: 1; grid-row: 1; }
  .bill-installment-row .bill-date { grid-column: 1; grid-row: 2; }
  .bill-installment-row .bill-amount { grid-column: 2; grid-row: 1; align-self: start; }
  .bill-installment-row .bill-installment-tracker { grid-column: 2; grid-row: 2; }
  .bill-installment-tracker { justify-items: end; }
  .bill-installment-tracker small { font-size: 8px; }
  .routine-tracker-content { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .routine-row { gap: 16px; }
}

.bottom-hidden-sections-manager { margin: 18px 0 12px; padding: 12px 14px; border: 1px solid #59451F; border-radius: 12px; background: #100E0A; color: #E8DAB7; }
.bottom-hidden-sections-manager[hidden] { display: none; }
.bottom-hidden-sections-manager summary { cursor: pointer; font-weight: 700; }
.bottom-hidden-sections-manager p { margin: 6px 0 8px; font-size: 12px; }
#bottomHiddenSectionButtons { display: flex; flex-wrap: wrap; gap: 6px; }
#bottomHiddenSectionButtons button { width: auto; margin: 0; padding: 7px 10px; }
.financial-items-table .financial-subtotal td {
  border-top: 1px solid #786436;
  padding-top: 8px;
  font-weight: 800;
}
.financial-items-table .financial-subtotal td:nth-child(2),
.financial-items-table .financial-subtotal td:last-child {
  color: #B8AF9C;
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.form-field label {
  display: block;
  margin-bottom: 5px;
  color: #D8C8A4;
  font-size: 12px;
  font-weight: 700;
}
.form-field.full { grid-column: 1 / -1; }

.inline-note {
  margin: 9px 0 0;
  color: #B8AF9C;
  font-size: 12px;
}

.history-chart {
  display: block;
  width: 100%;
  height: 104px;
  margin: 10px 0;
  border: 1px solid #44351D;
  border-radius: 10px;
  background: #0C0B09;
}

.empty-state {
  padding: 16px;
  color: #B8AF9C;
  text-align: center;
}

.modal-backdrop {
  display: none;
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  padding: 22px;
  background: rgba(0, 0, 0, 0.75);
}
.modal-backdrop.open {
  display: block;
}
.modal {
  box-sizing: border-box;
  width: 100%;
  max-width: 760px;
  margin: 28px auto;
  padding: 19px;
  border: 1px solid #5A451F;
  border-radius: 15px;
  background: #11100D;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
}
.modal-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.modal-header button { min-height: 32px; }
.reference-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #3C301C;
}

.toast {
  position: fixed;
  z-index: 70;
  right: 18px;
  bottom: 18px;
  max-width: 410px;
  padding: 12px 15px;
  border: 1px solid #85621C;
  border-radius: 11px;
  background: #241B0D;
  color: #FFF0C5;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}
.toast.compact {
  max-width: 205px;
  padding: 6px 8px;
  font-size: 10px;
  line-height: 1.2;
}
.toast.error { border-color: #873444; background: #351B26; color: #FFD4DB; }
.toast[hidden] { display: none; }

.back-to-top, .back-to-bottom { position: fixed; z-index: 60; bottom: 20px; display: none; min-height: 42px; padding: 8px 13px; border: 1px solid #8A6929; border-radius: 24px; background: #19150E; color: #F5D889; box-shadow: 0 5px 18px rgba(0,0,0,.42); }
.back-to-top { right: 18px; }
.back-to-bottom { right: 88px; }
.back-to-top.visible, .back-to-bottom.visible { display: block; }
.back-to-top span, .back-to-bottom span { margin-left: 3px; font-size: 12px; }
.back-to-top:hover, .back-to-top:focus, .back-to-bottom:hover, .back-to-bottom:focus { background: #2B2111; }

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

.side-tab-launcher {
  position: fixed;
  right: 4px;
  top: 38%;
  transform: translateY(-50%);
  z-index: 80;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  flex-direction: column;
  gap: 3px;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
.side-tab-toggle {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 10px;
  padding: 4px;
  font-size: 15px;
  box-shadow: 0 3px 16px rgba(0,0,0,.55);
}
.side-tab-drag { width: 34px; min-width: 34px; min-height: 26px; padding: 2px; border-radius: 8px; font-size: 14px; line-height: 1; cursor: move; touch-action: none; opacity: .86; }
.side-tab-menu {
  position: absolute;
  right: 42px;
  top: 50%;
  transform: translateY(-50%);
  width: 188px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #6C501E;
  border-radius: 12px;
  background: #11100D;
  box-shadow: 0 5px 22px rgba(0,0,0,.7);
}
.side-tab-menu.menu-opens-right { right: auto; left: 42px; }
.side-tab-menu[hidden] { display: none; }
.side-tab-menu button {
  display: block;
  width: 100%;
  min-height: 38px;
  margin: 2px 0;
  padding: 7px 9px;
  border: 1px solid #332818;
  background: #19150E;
  color: #F5E7C4;
  text-align: left;
  font-size: 13px;
}
.side-tab-menu button:hover, .side-tab-menu button:focus { background: #302415; }
.side-tab-menu .quick-save-point { width: 100%; min-width: 0; min-height: 31px; margin: 1px 0 4px; padding: 5px 9px; text-align: center; font-size: 11px; }
.side-tab-menu .quick-import-point { margin-bottom: 7px; }
.quick-save-point { width: 42px; min-width: 42px; min-height: 34px; padding: 3px; border: 1px solid #CFA33A !important; background: #302415 !important; color: #FFE8A8 !important; font-size: 10px; font-weight: 800; letter-spacing: .04em; box-shadow: 0 3px 16px rgba(0,0,0,.55); }
.quick-save-point:hover, .quick-save-point:focus { background: #493719 !important; }
.device-sync-status { display: inline-block; max-width: 230px; color: #B8AF9C; font-size: 11px; line-height: 1.3; }
.device-sync-status.is-configured { color: #00D68F; }
.sync-history-wrap { position: relative; display: inline-block; }
.sync-history-toggle { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.sync-history-panel { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(340px, calc(100vw - 28px)); padding: 12px; border: 1px solid #60491F; border-radius: 12px; background: #12100C; box-shadow: 0 12px 32px #000A; }
.sync-history-panel[hidden] { display: none !important; }
.sync-history-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.sync-history-nav button, .sync-history-merge { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.sync-history-nav .sync-history-close { margin-left: auto; min-width: 34px; padding: 3px; font-size: 20px; line-height: 1; }
.sync-history-panel p { margin: 9px 0; color: #C7B993; font-size: 11px; line-height: 1.45; }
.sync-history-merge { width: 100%; }
.sync-history-explainer { color: #8F8776 !important; font-size: 10px !important; }
.sync-review-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 12px; background: rgba(0,0,0,.78); }
.sync-review-backdrop[hidden] { display: none !important; }
.sync-review-dialog { box-sizing: border-box; width: 100%; max-width: 560px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 18px; border: 1px solid #725923; border-radius: 14px; background: #11100D; color: #F5E7C4; box-shadow: 0 14px 45px #000C; }
.sync-review-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sync-review-header h2 { margin: 0; font-size: 19px; }
.sync-review-header button { min-width: 36px; min-height: 34px; padding: 3px; font-size: 20px; line-height: 1; }
.sync-review-dialog > p { font-size: 12px; line-height: 1.5; }
.sync-review-shared { display: grid; gap: 7px; padding: 11px; border: 1px solid #3C301B; border-radius: 10px; background: #0A0907; color: #C7B993; font-size: 12px; }
.sync-review-shared > strong { color: #F5D889; }
.sync-review-conflicts, .sync-review-no-conflicts { margin: 10px 0; color: #E8C36A; font-size: 11px; }
.sync-review-conflicts summary { cursor: pointer; }
.sync-review-conflicts ul { max-height: 135px; overflow-y: auto; padding-left: 20px; color: #BFB294; overflow-wrap: anywhere; }
.sync-review-rule { padding: 10px; border-left: 3px solid #CFA33A; background: #1A160E; color: #E1D5B8; }
.sync-review-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sync-review-actions button { min-width: 110px; }
.holdings-actions-column { white-space: nowrap; }
.m1-quantity-input { width: 125px; min-width: 82px; min-height: 34px; padding: 5px 7px; text-align: right; }
.display-mode-launcher .side-tab-toggle { opacity: .82; }
.daily-planner-panel { margin-bottom: 12px; }
.planner-datebar { display: flex; align-items: center; gap: 9px; margin: 10px 0; }
.planner-datebar input { width: auto; min-height: 34px; padding: 5px 8px; }
.planner-datebar strong { color: #F5E7C4; font-size: 13px; }
.planner-date-nav { width: 32px; min-width: 32px; min-height: 32px; padding: 2px; font-size: 19px; line-height: 1; }
.planner-task-form { display: grid; grid-template-columns: minmax(120px, .45fr) minmax(180px, 1fr) auto; align-items: end; gap: 8px; padding: 10px; border: 1px solid #342B1E; border-radius: 11px; background: #0D0C0A; }
.planner-task-form label { color: #AFA58F; font-size: 10px; }
.planner-task-form input { display: block; min-height: 36px; margin-top: 3px; }
.planner-task-form button { min-height: 36px; padding: 6px 12px; }
.planner-task-list { position: relative; margin-top: 12px; }
.planner-task-list:before { position: absolute; top: 6px; bottom: 8px; left: 103px; width: 2px; background: #36342C; content: ''; }
.planner-task { position: relative; display: grid; grid-template-columns: 76px 18px minmax(0, 1fr) 32px; align-items: center; gap: 10px; min-height: 58px; }
.planner-task time { color: #AFA58F; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.planner-task-marker { z-index: 1; width: 10px; height: 10px; justify-self: center; border: 2px solid #84BA4D; border-radius: 50%; background: #11100D; }
.planner-task-main { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 11px 13px; border: 1px solid #332A1D; border-radius: 10px; background: #171610; cursor: pointer; }
.planner-task-main input { width: 16px; min-height: 16px; height: 16px; margin: 0; accent-color: #84BA4D; }
.planner-task-main strong { overflow-wrap: anywhere; font-size: 14px; }
.planner-task.is-done .planner-task-main strong { color: #8F8776; text-decoration: line-through; }
.planner-task.is-done .planner-task-marker { border-color: #00D68F; background: #00D68F; }
.planner-remove { width: 30px; min-width: 30px; min-height: 30px; padding: 2px; font-size: 19px; line-height: 1; }
.planner-empty { margin: 12px 0 2px 104px; color: #AFA58F; font-size: 12px; }
.todo-panel { overflow: hidden; padding: 16px; border-color: #322336; background: radial-gradient(ellipse at 20% 0%, #24102D 0, #121014 52%, #11100D 100%); }
.todo-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.todo-back-label { margin: 0 0 10px; color: #B9B4C4; font-size: 13px; }
.todo-header h2 { margin: 0; color: #F9F7FB; font-size: 32px; line-height: 1.05; }
.todo-date-label { margin: 5px 0 0; color: #D1CBD7; font-size: 16px; }
.todo-header-actions { display: flex; gap: 6px; }
.todo-header-actions button { width: 34px; min-width: 34px; min-height: 34px; padding: 3px; border-color: #4A3B53; border: 1px solid #4A3B53; border-radius: 50%; background: transparent; color: #DDD6E4; }
.todo-views { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.todo-views button { min-height: 32px; padding: 5px 10px; border: 1px solid #3B303F; border-radius: 18px; background: #1B191D; color: #C7C1CD; font-size: 11px; }
.todo-views button.is-active { border-color: #557BF5; background: #355DE0; color: #FFF; }
.todo-add-form { display: flex; gap: 8px; margin: 0 0 9px; padding: 5px; border-radius: 10px; background: #09090A; }
.todo-add-form input { min-width: 0; min-height: 40px; border: 0; background: transparent; font-size: 14px; }
.todo-add-form button { min-height: 38px; background: #3F68ED; color: #FFF; }
.todo-task-list { display: grid; gap: 5px; }
.todo-task-card { overflow: hidden; border: 1px solid #2B292D; border-radius: 12px; background: #232326; }
.todo-task-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px 58px; align-items: center; gap: 7px; min-height: 65px; padding: 8px 12px; }
.todo-task-row .todo-complete { width: 23px; min-height: 23px; height: 23px; margin: 0; accent-color: #4776F5; }
.todo-task-title { min-width: 0; padding: 0; border: 0; background: transparent; color: #F1EFF3; text-align: left; font-size: 15px; font-weight: 450; overflow-wrap: anywhere; }
.todo-task-title:hover, .todo-task-title:focus { background: transparent; color: #FFF; text-decoration: underline; }
.todo-task-title small { display: block; margin-top: 3px; color: #A9A5AE; font-size: 11px; }
.todo-star { width: 30px; min-width: 30px; min-height: 34px; padding: 0; background: transparent; color: #AAA6AF; font-size: 24px; line-height: 1; }
.todo-star:hover, .todo-star:focus { background: transparent; color: #F5D66A; }
.todo-star.is-important { color: #F5D66A; }
.todo-priority-controls { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.todo-priority-controls button { width: 27px; min-width: 27px; min-height: 34px; padding: 0; border: 1px solid #45414A; border-radius: 7px; background: #17171A; color: #D4CFD8; font-size: 17px; line-height: 1; }
.todo-priority-controls button:hover, .todo-priority-controls button:focus { border-color: #C9A33A; color: #F5D66A; }
.todo-priority-controls button:disabled { opacity: .32; cursor: default; }
.todo-task-done .todo-task-title { color: #9C98A1; text-decoration: line-through; }
.todo-task-details { padding: 10px 14px 13px 53px; border-top: 1px solid #38353B; color: #C8C4CD; }
.todo-task-details label { display: block; color: #B7B2BD; font-size: 10px; }
.todo-task-details textarea, .todo-task-details input, .todo-task-details select { min-height: 35px; margin-top: 4px; padding: 6px 8px; font-size: 12px; }
.todo-task-details textarea { min-height: 64px; }
.todo-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 9px 0; }
.todo-steps { display: grid; gap: 5px; margin-top: 8px; }
.todo-step { display: flex !important; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #38353B; font-size: 12px !important; }
.todo-step input { width: 16px; min-height: 16px; height: 16px; margin: 0 !important; accent-color: #4776F5; }
.todo-step span { flex: 1; }
.todo-step.is-done span { color: #85818A; text-decoration: line-through; }
.todo-step button { width: 26px; min-width: 26px; min-height: 26px; padding: 0; background: transparent; color: #A9A5AE; font-size: 16px; }
.todo-step-form { display: flex; gap: 6px; }
.todo-step-form input { flex: 1; min-width: 0; }
.todo-step-form button { width: 34px; min-width: 34px; min-height: 34px; padding: 0; background: #292733; color: #BBC7FF; }
.todo-delete { margin-top: 10px; padding: 4px 0; background: transparent; color: #FF7B89; font-size: 11px; }
.todo-delete:hover, .todo-delete:focus { background: transparent; text-decoration: underline; }
.todo-empty { margin: 8px 3px 12px; color: #B6B1BC; font-size: 12px; }
.todo-suggestions { margin-top: 14px; border-top: 1px solid #44384B; padding-top: 11px; }
.todo-suggestions h3 { margin: 0 0 7px; color: #EAE4EF; font-size: 14px; }
.todo-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 4px 7px; border-bottom: 1px solid #343037; color: #D7D2DB; font-size: 12px; }
.todo-suggestion button { width: 30px; min-width: 30px; min-height: 30px; padding: 0; background: transparent; color: #BCC9FF; font-size: 22px; }
.text-to-speech-panel { border-color: #493719; }
.speech-text { display: block; min-height: 160px; resize: vertical; line-height: 1.5; }
.speech-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.speech-settings label { display: block; min-width: 0; color: #D8C8A4; font-size: 12px; font-weight: 700; }
.speech-settings select { display: block; margin-top: 5px; }
.speech-settings output { float: right; color: #00D68F; font-variant-numeric: tabular-nums; }
.speech-settings input[type="range"] { display: block; min-height: 28px; margin-top: 5px; padding: 4px 0; accent-color: #CFA33A; }
.speech-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; }
.speech-status { min-height: 18px; margin: 8px 0 0; color: #BFB294; font-size: 11px; }
.hidden-m1-wrap { margin-top: 12px; padding: 10px 12px; border: 1px solid #493719; border-radius: 10px; color: #E7D9B9; font-size: 13px; }
.hidden-m1-list { display: inline; margin-left: 8px; }
.hidden-m1-chip { display: inline-block; margin: 4px 8px 0 0; padding: 4px 7px; border-radius: 8px; background: #20180B; }
.hidden-m1-chip .icon-button { margin-left: 4px; }

.display-mode .nav-bar,
.display-mode .back-to-top,
.display-mode .back-to-bottom,
.display-mode .hide-in-display,
.display-mode #finance,
.display-mode #history,
.display-mode .watchlist-actions,
.display-mode #referenceBanner,
.display-mode #m1BackendBanner {
  display: none;
}
.display-mode .app-shell { max-width: none; padding: 12px; }
.display-mode .overview-center-total { padding: 18px 12px; }
.display-mode .overview-center-total-value { font-size: 48px; }
.display-mode .overview-center-stat { padding: 14px 8px; }
.display-mode .overview-center-value { font-size: 22px; }
.display-mode h1 { font-size: 20px; }
.display-mode .panel { margin-top: 12px; }

/* The iPad mini 2 reports a 1024px landscape viewport. Keep the title readable. */
@media (max-width: 1100px) {
  .topbar { display: block; }
  .header-actions { margin-top: 12px; }
}

@media (max-width: 720px) {
  .app-shell { padding: 10px 10px 24px; }
  .two-column { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .notice, .section-heading { display: block; }
  .notice button, .section-heading .section-actions { margin-top: 10px; }
  .sync-history-panel { position: fixed; top: 148px; left: auto; right: 8px; width: calc(100vw - 16px); max-width: 340px; }
  .compact-form { min-width: 0; }
  .financial-items-table th,
  .financial-items-table td { padding: 4px 3px; font-size: 11px; }
  .financial-items-table th:nth-child(1),
  .financial-items-table td:nth-child(1) { width: 37%; }
  .financial-items-table th:nth-child(2),
  .financial-items-table td:nth-child(2) { width: 21%; }
  .financial-items-table th:nth-child(3),
  .financial-items-table td:nth-child(3) { width: 24%; }
  .financial-items-table th:nth-child(4),
  .financial-items-table td:nth-child(4) { width: 18%; }
  .planner-task-form { grid-template-columns: 110px minmax(0, 1fr); }
  .planner-task-form > button { grid-column: 1 / -1; }
  .planner-task-list:before { left: 78px; }
  .planner-task { grid-template-columns: 55px 14px minmax(0, 1fr) 30px; gap: 6px; }
  .planner-task time { font-size: 10px; }
  .planner-task-main { gap: 6px; padding: 9px 8px; }
  .planner-task-main strong { font-size: 12px; }
  .planner-empty { margin-left: 78px; }
  .todo-panel { padding: 12px; }
  .todo-header h2 { font-size: 28px; }
  .todo-date-label { font-size: 14px; }
  .todo-task-row { grid-template-columns: 28px minmax(0, 1fr) 28px 56px; gap: 4px; padding: 7px 8px; }
  .todo-task-details { padding-left: 42px; padding-right: 9px; }
}

@media (max-width: 430px) {
  #overviewStatus { display: inline-block; margin-top: 4px; }
}

@media (orientation: portrait) and (min-width: 700px) {
  #finance .two-column { grid-template-columns: 1fr; }
}

/* Quick-glance additions: unified planner, cash tools, privacy, and device sync. */
.thc-cart-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 10px; }
.thc-cart-summary > div { min-width: 0; padding: 9px 11px; border: 1px solid #40331E; border-radius: 9px; background: #100F0C; }
.thc-cart-summary span { display: block; color: #BFB294; font-size: 11px; }
.thc-cart-summary strong { display: block; margin-top: 3px; color: #00D6A0; font: 700 18px var(--mono, monospace); }
.thc-cart-form { margin: 8px 0; }
.thc-cart-tracker-panel .cash-tool-rows { margin-top: 8px; }
@media (max-width: 520px) {
  .thc-cart-summary { gap: 5px; }
  .thc-cart-summary > div { padding: 7px; }
  .thc-cart-summary span { font-size: 10px; }
  .thc-cart-summary strong { font-size: 15px; }
}
.dashboard-search { position: relative; flex: 1 1 240px; max-width: 390px; min-width: 180px; }
.dashboard-search input { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.dashboard-search-results { position: absolute; z-index: 50; top: calc(100% + 5px); left: 0; right: 0; max-height: 300px; overflow-y: auto; border: 1px solid #5B4722; border-radius: 9px; background: #11100D; box-shadow: 0 8px 24px rgba(0,0,0,.55); }
.dashboard-search-results a { display: block; padding: 8px 10px; border-bottom: 1px solid #302718; color: #FFF4D6; text-decoration: none; font-size: 13px; }
.dashboard-search-results a:hover, .dashboard-search-results a:focus { background: #241D10; }
.dashboard-search-results small { display: block; color: #BDAF8C; font-size: 10px; }
.search-no-results { display: block; padding: 10px; color: #BDAF8C; font-size: 12px; }
.daily-brief { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; }
.daily-brief-card { display: block; min-width: 0; padding: 10px 12px; border: 1px solid #40331E; border-radius: 10px; background: #100F0C; color: #FFF4D6; text-decoration: none; }
.daily-brief-card span, .daily-brief-card small { display: block; color: #BDAF8C; font-size: 11px; }
.daily-brief-card strong { display: block; margin: 3px 0; font-size: 18px; overflow-wrap: anywhere; }
.daily-brief-card:hover, .daily-brief-card:focus { border-color: #CFA33A; }
.bill-upcoming-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 7px 0 11px; }
.bill-summary-tile { flex: 1 1 130px; padding: 8px 10px; border: 1px solid #44351D; border-radius: 9px; background: #100F0C; }
.bill-summary-tile span, .bill-summary-tile small { display: block; color: #BDAF8C; font-size: 11px; }
.bill-summary-tile strong { display: block; margin: 2px 0; color: #F2C14E; font-size: 17px; }
.cash-tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cash-tools-grid > article { min-width: 0; padding: 12px; border: 1px solid #40331E; border-radius: 11px; background: #100F0C; }
.cash-tools-grid h3 { margin: 0 0 9px; color: #F2DCA7; font-size: 16px; }
.cash-tool-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.cash-tool-form label { min-width: 0; color: #C6B995; font-size: 11px; }
.cash-tool-form input, .cash-tool-form select { min-height: 36px; padding: 6px 8px; font-size: 13px; }
.cash-tool-form button { grid-column: 1 / -1; min-height: 36px; padding: 7px 10px; }
.cash-tool-summary { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 8px 0; color: #BDAF8C; font-size: 12px; }
.cash-tool-summary > strong { flex-basis: 100%; color: #00D68F; font-size: 14px; }
.cash-tool-summary span { display: flex; justify-content: space-between; gap: 8px; }
.cash-tool-rows { margin: 7px 0; }
.cash-tool-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 2px; border-bottom: 1px solid #302718; font-size: 12px; }
.cash-tool-row > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cash-tool-row small { display: block; color: #BDAF8C; font-size: 10px; }
.cash-tool-row > strong { white-space: nowrap; color: #F2DCA7; }
.cash-tool-row button { min-width: 26px; min-height: 26px; padding: 0; background: transparent; color: #CFA33A; }
.payday-calendar { margin: 10px 0; padding: 9px; border: 1px solid #3D311E; border-radius: 9px; }
.payday-calendar-heading { margin-bottom: 7px; color: #F2DCA7; font-size: 13px; font-weight: 700; text-align: center; }
.payday-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.payday-calendar-weekdays { margin-bottom: 3px; color: #9F9479; font-size: 9px; font-weight: 700; }
.payday-calendar-day, .payday-calendar-blank { position: relative; display: flex; min-height: 25px; align-items: center; justify-content: center; border-radius: 6px; color: #DED3B9; font-size: 10px; }
.payday-calendar-day.is-today { outline: 1px solid #E7C15B; }
.payday-calendar-day.has-payday { color: #F2C14E; font-weight: 800; }
.payday-calendar-day i { position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: #F2C14E; }
.payday-calendar { max-width: 360px; }
.payday-calendar-grid > span { position: relative; display: flex; min-height: 25px; align-items: center; justify-content: center; border-radius: 6px; color: #DED3B9; font-size: 10px; }
.payday-calendar-weekdays > span { color: #9F9479; font-size: 9px; font-weight: 700; }
.account-color-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: middle; }
.account-display-editor { margin-top: 10px; padding: 8px 10px; border: 1px solid #3D311E; border-radius: 9px; color: #E7D9B9; }
.account-display-editor summary { cursor: pointer; font-size: 12px; font-weight: 650; }
.account-display-editor > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; margin-top: 8px; }
.account-label-editor { display: grid; grid-template-columns: 30px minmax(70px, 1fr) minmax(80px, 1fr); align-items: center; gap: 6px; color: #C6B995; font-size: 10px; }
.account-label-editor input[type="color"] { width: 28px; min-height: 28px; padding: 2px; }
.account-label-editor input[type="text"] { min-height: 30px; padding: 4px 6px; font-size: 11px; }
.account-investment-view { margin-top: 14px; padding-top: 10px; border-top: 1px solid #44351D; }
.account-investment-view h3 { margin: 0 0 8px; }
.account-investment-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 8px; }
.account-investment-toolbar button { flex: 0 0 auto; min-height: 28px; padding: 4px 9px; font-size: 10px; }
.investment-account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.investment-account-card { min-width: 0; padding: 9px 10px; border: 1px solid #40331E; border-radius: 9px; background: #100F0C; }
.investment-account-card h4 { margin: 0 0 6px; color: #F2DCA7; font-size: 12px; }
.investment-account-card > div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid #302718; font-size: 11px; }
.investment-account-card > div span { overflow-wrap: anywhere; }
.investment-account-card > div strong, .investment-account-card > div b { overflow-wrap: anywhere; }
.investment-account-card ul { margin: 5px 0 0; padding: 0; list-style: none; }
.investment-account-card li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid #302718; color: #C6B995; font-size: 11px; }
.investment-account-card li span { overflow-wrap: anywhere; }
.investment-account-card li strong { white-space: nowrap; color: #FFF4D6; }
.investment-account-card > strong { display: block; margin-top: 6px; text-align: right; color: #00D68F; font-size: 12px; }
.scenario-label { display: block; margin: 8px 0 3px; color: #C6B995; font-size: 12px; }
.scenario-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.scenario-result > div { padding: 7px 8px; border-radius: 8px; background: #100F0C; }
.scenario-result span, .scenario-result strong { display: block; }
.scenario-result span, .scenario-result small { color: #BDAF8C; font-size: 10px; }
.scenario-result strong { margin-top: 2px; color: #F2DCA7; font-size: 13px; }
.balances-hidden iframe { filter: blur(14px); }

@media (max-width: 900px) {
  .cash-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-tools-grid > article:last-child { grid-column: 1 / -1; }
  .investment-account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .daily-brief { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cash-tools-grid { grid-template-columns: 1fr; }
  .cash-tools-grid > article:last-child { grid-column: auto; }
  .investment-account-grid { grid-template-columns: 1fr; }
  .account-display-editor > div { grid-template-columns: 1fr; }
  .scenario-result { grid-template-columns: 1fr; }
  .dashboard-search { flex-basis: 100%; max-width: none; }
}

/* Phone layout: keep every dashboard surface inside the viewport. */
@media (max-width: 720px) {
  *, *:before, *:after { box-sizing: border-box; }
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body { font-size: 14px; }
  .app-shell { width: 100%; max-width: 100%; padding: 8px 8px 20px; }
  .topbar { min-width: 0; padding-bottom: 8px; }
  .topbar h1 { max-width: 100%; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
  .eyebrow { font-size: 9px; letter-spacing: .11em; }
  .header-meta { font-size: 11px; }
  .header-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .header-actions > * { min-width: 0; }
  .header-actions button { min-height: 34px; padding: 6px 8px; font-size: 11px; }
  .connection { max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: 10px; }
  .dashboard-search { flex: 1 1 100%; min-width: 0; }
  .nav-bar { display: none; }
  .panel { min-width: 0; margin-top: 8px; padding: 10px; border-radius: 12px; }
  .section-heading { display: block; min-width: 0; margin-bottom: 8px; }
  .section-heading h2 { font-size: 17px; }
  .section-heading p { font-size: 11px; line-height: 1.3; }
  .section-heading > * + * { margin-top: 6px; }
  .section-heading .section-actions { margin-top: 7px; }
  #alarm-timer .timer-sync-actions { margin-right: 0; }
  .section-actions, .button-row { gap: 5px; }
  button { min-height: 38px; padding: 7px 10px; font-size: 12px; }
  input, select, textarea { min-width: 0; max-width: 100%; }
  .notice { display: block; min-width: 0; margin: 4px 0 8px; padding: 8px 9px; font-size: 11px; overflow-wrap: anywhere; }
  .notice p { margin-bottom: 5px; }
  .overview-center-total { padding: 10px 8px; }
  .overview-center-total-value { font-size: 30px; }
  .overview-center-stat { padding: 8px 4px; }
  .overview-center-value { font-size: 15px; }
  .overview-center-note { font-size: 9px; }
  .daily-brief { gap: 5px; margin: 7px 0 9px; }
  .money-plan-grid { gap: 7px; }
  .daily-brief-card { padding: 7px; }
  .daily-brief-card span, .daily-brief-card small { font-size: 9px; }
  .daily-brief-card strong { font-size: 15px; }
  .all-assets-visual { gap: 6px; }
  .asset-pie-area { min-height: 210px; padding: 4px; }
  .asset-pie-3d { width: min(190px, 72vw); height: auto; }
  .all-assets-breakdown th, .all-assets-breakdown td { padding: 5px 3px; font-size: 10px; overflow-wrap: anywhere; }
  .all-assets-breakdown th:first-child, .all-assets-breakdown td:first-child { width: 44%; }
  .all-assets-breakdown th:nth-child(2), .all-assets-breakdown td:nth-child(2) { width: 36%; }
  .all-assets-breakdown th:nth-child(3), .all-assets-breakdown td:nth-child(3) { width: 20%; }
  .all-assets-breakdown td.numeric, .all-assets-breakdown th.numeric { white-space: nowrap; }
  .inline-note { font-size: 10px; line-height: 1.3; }
  .bills-payday-calendar-panel .bill-calendar-grid { gap: 3px; }
  .financial-calendar-day { min-height: 34px; }
  .bill-calendar-details { width: 100%; max-width: none; }
  .table-wrap, .plan-table-wrap { max-width: 100%; }
  #holdings .table-wrap, #finance .financial-items-wrap, #history .table-wrap, .plan-table-wrap { overflow: visible; border: 0; }
  #holdings .holdings-table, .financial-items-table, .history-table, #money-plan .plan-card table.debt-payoff-table { display: block; width: 100%; min-width: 0; table-layout: fixed; }
  #holdings .holdings-table thead, .financial-items-table thead, .history-table thead, #money-plan .plan-card table.debt-payoff-table thead { display: none; }
  #holdings .holdings-table tbody, #holdings .holdings-table tfoot,
  .financial-items-table tbody, .history-table tbody, #money-plan .plan-card table.debt-payoff-table tbody { display: block; width: 100%; min-width: 0; }
  #holdings .holdings-table tbody tr.holding-data-row,
    .financial-items-table tbody tr:not(.financial-subtotal), .history-table tbody tr, #money-plan .plan-card table.debt-payoff-table tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px;
    width: 100%; min-width: 0; margin: 0 0 6px; padding: 6px 8px;
    border: 1px solid #352B1D; border-radius: 9px; background: #100F0C;
  }
  #holdings .holdings-table td, .financial-items-table td, .history-table td, .debt-payoff-table td {
    display: block; min-width: 0; width: auto; padding: 5px 2px; border: 0;
    font-size: 11px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; word-break: break-word;
  }
  #holdings .holding-data-row td[data-label]:before,
  .financial-items-table tbody tr:not(.financial-subtotal) td[data-label]:before,
  .history-table tbody td[data-label]:before, .debt-payoff-table tbody td[data-label]:before {
    display: block; margin-bottom: 2px; color: #AFA58F; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; content: attr(data-label);
  }
  #holdings .holding-data-row td:first-child,
  .financial-items-table tbody tr:not(.financial-subtotal) td:first-child,
  .history-table tbody td:first-child, .debt-payoff-table tbody td:first-child { grid-column: 1 / -1; }
  #holdings .holding-data-row td:first-child:before, .financial-items-table td:first-child:before,
  .history-table td:first-child:before, .debt-payoff-table td:first-child:before { display: none; }
  #holdings .holding-data-row td:first-child { border-bottom: 1px solid #302718; padding-bottom: 6px; }
  #holdings .holding-data-row .asset-name { font-size: 12px; }
  #holdings .holding-data-row .ticker { font-size: 10px; }
  #holdings .holding-data-row .holdings-actions-column { grid-column: 1 / -1; display: flex; align-items: center; gap: 5px; }
  #holdings .holding-data-row .holdings-actions-column:before { margin: 0 auto 0 0; }
  #holdings .m1-quantity-input { width: 100%; min-width: 0; min-height: 32px; text-align: left; }
  #holdings .holdings-table tbody tr.holdings-group { display: block; margin: 5px 0; }
  #holdings .holdings-group td { display: block; padding: 7px 8px; font-size: 10px; }
  #holdings .holdings-group td:before { display: none; }
  #holdings .holdings-table tbody tr.holdings-subtotal,
  #holdings .holdings-table tfoot tr.holdings-total { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; margin: 0 0 5px; }
  #holdings .holdings-subtotal td, #holdings .holdings-total td { display: block; padding: 6px 4px; font-size: 10px; }
  #holdings .holdings-subtotal td:first-child, #holdings .holdings-total td:first-child { grid-column: 1; }
  #holdings .holdings-subtotal td:nth-child(2), #holdings .holdings-total td:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }
  #holdings .holdings-subtotal td:nth-child(n+3), #holdings .holdings-total td:nth-child(n+3) { display: none; }
  .financial-items-table tbody tr.financial-subtotal { display: grid; grid-template-columns: 1fr auto; margin: 4px 0; border-top: 1px solid #786436; }
  .financial-items-table tbody tr.financial-subtotal td { display: block; width: auto; padding: 6px 3px; font-size: 10px; }
  .financial-items-table tbody tr.financial-subtotal td:first-child { grid-column: 1; }
  .financial-items-table tbody tr.financial-subtotal td:nth-child(2), .financial-items-table tbody tr.financial-subtotal td:last-child { display: block; }
  .financial-items-table tbody tr.financial-subtotal td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }
  .financial-items-table tbody tr.financial-subtotal td:nth-child(4) { display: none; }
  .financial-items-table .muted { grid-column: 1 / -1; }
  .financial-items-table td.numeric, .financial-items-table th.numeric { white-space: normal; }
  .financial-items-table .financial-subtotal td.numeric { white-space: nowrap; }
  #money-plan .plan-card table.debt-payoff-table tbody td { min-width: 0; width: auto; white-space: normal; }
  #money-plan .plan-card table.debt-payoff-table tbody td input.plan-table-input { width: 100%; min-width: 0; min-height: 34px; padding: 5px 6px; font-size: 11px; }
  #money-plan .plan-card table.debt-payoff-table tbody td:first-child { font-weight: 700; }
  #money-plan .plan-card table.debt-payoff-table .plan-progress-cell { grid-column: 1 / -1; }
  #history .history-chart { height: 90px; }
  .bank-view-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; justify-items: stretch; }
  .bank-view-monthly { grid-column: auto; }
  .bank-view-group { width: 100%; }
  .bank-view-group .table-wrap { display: block; width: 100%; overflow: visible; }
  .bank-view-table { width: 100%; max-width: 100%; table-layout: fixed; }
  .bank-view-table th:last-child, .bank-view-table td:last-child { width: 76px; padding-left: 4px; }
  .bank-view-table td:first-child { overflow-wrap: anywhere; word-break: break-word; }
  .bank-view-table td.numeric, .bank-view-table th.numeric { white-space: nowrap; }
  .bill-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 5px 7px; }
  .bill-name { min-width: 0; font-size: 12px; }
  .bill-amount { font-size: 12px; }
  .bill-total { align-items: flex-start; }
  .routine-tracker-content { grid-template-columns: 1fr; gap: 4px; }
  .routine-row { justify-content: space-between; gap: 8px; }
  .quick-notes textarea { min-height: 110px; }
  .cash-tools-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .cash-tools-grid > article { min-width: 0; padding: 9px; }
  .cash-tool-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cash-tool-form label { min-width: 0; overflow-wrap: anywhere; }
  .cash-tool-form input, .cash-tool-form select { width: 100%; min-width: 0; font-size: 12px; }
  .payday-calendar { width: 100%; max-width: 360px; margin: 7px 0; padding: 7px; }
  .planner-datebar { flex-wrap: wrap; gap: 6px; }
  .planner-datebar input { flex: 1 1 135px; min-width: 0; }
  .planner-task-form { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .planner-task-form > button { grid-column: auto; }
  .planner-task-list:before { left: 56px; }
  .planner-task { grid-template-columns: 43px 14px minmax(0, 1fr) 28px; gap: 4px; }
  .planner-task time { font-size: 9px; }
  .planner-task-main { min-width: 0; padding: 8px 6px; }
  .planner-task-main strong { overflow-wrap: anywhere; }
  .planner-empty { margin-left: 61px; }
  .todo-panel { padding: 9px; }
  .todo-header { gap: 6px; margin-bottom: 8px; }
  .todo-header h2 { font-size: 24px; }
  .todo-header-actions { gap: 3px; }
  .todo-header-actions button { width: 30px; min-width: 30px; min-height: 30px; }
  .todo-views { gap: 4px; }
  .todo-views button { min-height: 30px; padding: 4px 8px; }
  .speech-text { min-height: 135px; }
  .speech-settings { grid-template-columns: minmax(0, 1fr); gap: 7px; margin-top: 7px; }
  .speech-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .speech-controls button { min-width: 0; padding: 7px 6px; }
  .speech-status { font-size: 10px; }
  .todo-task-row { grid-template-columns: 26px minmax(0, 1fr) 25px 54px; gap: 3px; padding: 6px; }
  .todo-task-details { padding: 8px; }
  .todo-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .account-investment-toolbar { align-items: flex-start; flex-direction: column; }
  .investment-account-grid { grid-template-columns: minmax(0, 1fr); }
  .scenario-result { grid-template-columns: minmax(0, 1fr); }
  .account-display-editor > div { grid-template-columns: minmax(0, 1fr); }
  .account-label-editor { grid-template-columns: 28px minmax(0, 1fr); }
  .account-label-editor input[type="text"] { grid-column: 2; width: 100%; }
  .off-white-chart-frame, .coinstats-frame, .alarm-timer-frame { width: 100%; max-width: 100%; }
  .off-white-chart-frame { height: 650px; }
  .coinstats-frame { height: 1000px; }
  .alarm-timer-frame { height: 600px; }
  .modal-backdrop { padding: 6px; }
  .modal { max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); overflow-y: auto; margin: 6px auto; padding: 12px; }
  .reference-row { grid-template-columns: minmax(0, 1fr) 90px; gap: 6px; }
  .side-tab-menu { width: min(188px, calc(100vw - 54px)); max-height: 70vh; }
  .toast { right: 50px; bottom: 12px; max-width: calc(100vw - 62px); }
  .back-to-top, .back-to-bottom { bottom: 10px; min-height: 36px; padding: 6px 10px; }
  .back-to-top { right: 8px; }
  .back-to-bottom { right: 76px; }
}

@media (max-width: 380px) {
  .app-shell { padding-right: 6px; padding-left: 6px; }
  .panel { padding: 8px; }
  .overview-center-value { font-size: 14px; }
  .daily-brief-card { padding: 6px; }
  .bill-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 5px; }
}

.watchlist-table { min-width: 780px; }
.watch-asset-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 210px; }
.watch-asset-details { min-width: 0; }
.watch-asset-details .asset-name { overflow-wrap: anywhere; }
.watch-price { flex: 0 0 auto; color: #FFF4D6; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.watchlist-actions-cell { white-space: nowrap; }

@media (max-width: 720px) {
  .watchlist-table { display: block; min-width: 0; table-layout: fixed; }
  .watchlist-table thead { display: none; }
  .watchlist-table tbody { display: block; }
  .watchlist-table tbody tr { display: grid; grid-template-columns: minmax(58px, .6fr) minmax(90px, 1fr) auto; align-items: center; border-bottom: 1px solid #44351D; }
  .watchlist-table tbody tr:last-child { border-bottom: 0; }
  .watchlist-table tbody td { min-width: 0; padding: 7px 6px; border-bottom: 0; font-size: 11px; }
  .watchlist-table tbody td:first-child { grid-column: 1 / -1; }
  .watchlist-table tbody td:nth-child(2) { grid-column: 1; text-align: left; }
  .watchlist-table tbody td:nth-child(3) { grid-column: 2; overflow-wrap: anywhere; }
  .watchlist-table tbody td:nth-child(4) { display: none; }
  .watchlist-table tbody td:nth-child(5) { grid-column: 3; padding-left: 2px; padding-right: 2px; }
  .watch-asset-line { min-width: 0; }
  .watch-price { font-size: 16px; }
  .watchlist-actions-cell button { display: block; min-width: 42px; min-height: 25px; margin: 2px 0; padding: 3px 5px; font-size: 10px; }
  .watchlist-table .tiny { font-size: 9px; }
}

.bill-installment-row { grid-template-columns: minmax(130px, 1fr) minmax(90px, auto) minmax(110px, auto) minmax(120px, auto); }
.bill-monthly-amount small { display: block; margin-top: 2px; color: #C56A75; font-size: 9px; font-weight: 500; }
.bill-installment-tracker { display: grid; justify-items: end; gap: 3px; }
.bill-installment-tracker small { color: #C56A75; font-size: 9px; line-height: 1.2; white-space: nowrap; }
@media (max-width: 720px) {
  .bill-installment-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 7px; }
  .bill-installment-row .bill-name { grid-column: 1; grid-row: 1; }
  .bill-installment-row .bill-date { grid-column: 1; grid-row: 2; }
  .bill-installment-row .bill-amount { grid-column: 2; grid-row: 1; align-self: start; }
  .bill-installment-row .bill-installment-tracker { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; justify-content: space-between; justify-items: initial; }
  .bill-installment-tracker small { font-size: 9px; }
}
