@font-face {
  font-family: "GenSenRounded2TW";
  src: url("Assets/fonts/源泉圓體3分糖.otf") format("opentype");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "GenSenRounded2TW";
  src: url("Assets/fonts/源泉圓體4分糖.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "GenSenRounded2TW";
  src: url("Assets/fonts/源泉圓體5分糖.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "GenSenRounded2TW";
  src: url("Assets/fonts/源泉圓體7分糖.otf") format("opentype");
  font-weight: 700 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font: "GenSenRounded2TW", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --ink: #4f4a42;
  --muted: #7f776d;
  --paper: #fffbf2;
  --panel: #fffefa;
  --line: #e5dcd1;
  --teal: #43929e;
  --teal-dark: #367f8a;
  --teal-light: #d0eaed;
  --yellow: #ebc15a;
  --yellow-light: #faf0d0;
  --latte: #d1bba5;
  --danger: #b96758;
  --success: #4f9566;
  --warning: #b57d19;
  --shadow: 0 18px 50px rgba(79, 74, 66, 0.09);
  --shadow-raised: 0 20px 55px rgba(67, 92, 96, 0.14), 0 2px 10px rgba(79, 74, 66, 0.06);
  --focus-ring: 0 0 0 3px rgba(67, 146, 158, 0.22);
  --space-copy: 0.01em;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 0%, rgba(208, 234, 237, 0.85), transparent 25rem),
    var(--paper);
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: var(--space-copy);
}

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

button {
  cursor: pointer;
}

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

.app-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  border-bottom: 1px solid rgba(79, 74, 66, 0.14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 62px;
  height: 44px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
}

.top-actions,
.heading-actions,
.focus-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: var(--teal-dark);
  background: rgba(255, 254, 250, 0.92);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 21px;
  transition:
    transform 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.account-dot {
  width: 9px;
  height: 9px;
  background: var(--latte);
  border-radius: 50%;
}

.account-button.is-signed-in .account-dot {
  background: #68a95d;
  box-shadow: 0 0 0 4px rgba(104, 169, 93, 0.14);
}

.primary-button,
.secondary-button,
.quiet-button,
.danger-button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #5faab4 0%, #43929e 58%, #2f7783 100%);
  border: 1px solid var(--teal);
  box-shadow: 0 10px 24px rgba(54, 127, 138, 0.16), inset 0 1px rgba(255, 255, 255, 0.28);
}

.secondary-button {
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid var(--yellow);
}

#scheduleSection .heading-actions [data-open-schedule],
.secondary-button[data-open-schedule] {
  color: #fff;
  background: linear-gradient(135deg, #5da8b2 0%, #43929e 58%, #347f8a 100%);
  border-color: rgba(67, 146, 158, 0.34);
  box-shadow: 0 12px 26px rgba(67, 146, 158, 0.2);
}

.quiet-button {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.danger-button {
  color: #fff;
  background: var(--danger);
  border: 1px solid var(--danger);
}

.primary-button:hover,
.secondary-button:hover,
.quiet-button:hover,
.account-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  box-shadow: 0 10px 24px rgba(54, 127, 138, 0.24);
  filter: brightness(1.04);
}

.secondary-button:hover,
.quiet-button:hover,
.account-button:hover,
.icon-button:hover {
  border-color: rgba(67, 146, 158, 0.55);
  box-shadow: 0 8px 20px rgba(67, 146, 158, 0.12);
}

.primary-button:active,
.secondary-button:active,
.quiet-button:active,
.account-button:active,
.icon-button:active {
  transform: translateY(0) scale(0.99);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal-dark);
  outline-offset: 3px;
}

.small {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
}

.compact {
  min-height: 42px;
}

.text-action {
  padding: 6px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 12px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  padding: 48px 0 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
}

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

h1 {
  max-width: 800px;
  margin-bottom: 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

h3 {
  line-height: 1.42;
  letter-spacing: 0;
}

.hero-description,
.section-description {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.date-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--yellow);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.date-switcher button {
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
  border: 0;
  border-radius: 50%;
}

.date-switcher label {
  display: grid;
  gap: 4px;
  text-align: center;
}

.date-switcher label span {
  font-size: 11px;
  font-weight: 800;
}

.date-switcher input {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  font-weight: 700;
}

.focus-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto auto;
  gap: 28px;
  align-items: center;
  min-height: 190px;
  margin-bottom: 18px;
  padding: 30px;
  color: #fff;
  background: linear-gradient(135deg, #3f8d98 0%, #337984 100%);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.focus-panel.idle {
  color: var(--ink);
  background: linear-gradient(135deg, #d8eef0 0%, #fffefa 100%);
}

.focus-panel.paused {
  color: var(--ink);
  background: linear-gradient(135deg, #faedc4 0%, #fffefa 100%);
}

.focus-panel.time-alert {
  animation: focusTimeAlert 0.68s ease both;
}

.focus-panel .eyebrow,
.focus-panel .focus-copy > span,
.focus-panel .focus-copy p,
.focus-panel .focus-clock span,
.focus-panel .focus-clock small {
  color: rgba(255, 255, 255, 0.74);
}

.focus-panel.idle .eyebrow,
.focus-panel.idle .focus-copy > span,
.focus-panel.idle .focus-copy p,
.focus-panel.idle .focus-clock span,
.focus-panel.idle .focus-clock small,
.focus-panel.paused .eyebrow,
.focus-panel.paused .focus-copy > span,
.focus-panel.paused .focus-copy p,
.focus-panel.paused .focus-clock span,
.focus-panel.paused .focus-clock small {
  color: var(--muted);
}

.focus-copy > span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.focus-copy h2 {
  margin-bottom: 10px;
  font-size: 30px;
}

.focus-copy p {
  max-width: 650px;
  margin-bottom: 0;
  font-weight: 300;
  line-height: 1.6;
}

.focus-clock {
  min-width: 220px;
  text-align: center;
}

.focus-clock-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.focus-clock span,
.focus-clock small {
  display: block;
  font-size: 11px;
}

.focus-clock strong {
  display: block;
  margin: 8px 0;
  font-size: 38px;
  font-variant-numeric: tabular-nums;
}

.ambient-audio-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid rgba(67, 146, 158, 0.36);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(45, 101, 109, 0.1);
}

.ambient-audio-button:hover,
.ambient-audio-button:active {
  color: #fff;
  background: #d7f0f4;
  border-color: rgba(67, 146, 158, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(45, 101, 109, 0.14);
}

.ambient-audio-button.playing {
  color: #fff;
  background: linear-gradient(135deg, #bfe8ee 0%, #43929e 100%);
  border-color: rgba(67, 146, 158, 0.48);
  box-shadow: 0 10px 22px rgba(45, 101, 109, 0.16);
}

.ambient-icon {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.mobile-ambient-audio-button {
  display: none;
}

@keyframes focusTimeAlert {
  0%,
  100% {
    transform: translateX(0);
  }
  18% {
    transform: translateX(-4px);
  }
  36% {
    transform: translateX(4px);
  }
  54% {
    transform: translateX(-3px);
  }
  72% {
    transform: translateX(3px);
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  min-height: 145px;
  padding: 22px;
  background: rgba(255, 254, 250, 0.9);
  border: 1px solid rgba(79, 74, 66, 0.1);
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(79, 74, 66, 0.045);
}

.stat-card.featured {
  background: linear-gradient(135deg, #cbe8ec 0%, #eef8f9 100%);
  border-color: rgba(67, 146, 158, 0.24);
}

.stat-card:nth-child(2) {
  background: linear-gradient(135deg, #f2c85e 0%, #f9e8ad 100%);
  border-color: rgba(235, 193, 90, 0.4);
}

.stat-card > span {
  display: block;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
}

.stat-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
}

.panel {
  padding: 30px;
  background: var(--panel);
  border: 1px solid rgba(79, 74, 66, 0.1);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.schedule-panel {
  background: linear-gradient(145deg, #fffefa 0%, #f8fbfa 100%);
}

.results-panel {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, #fffefa 0%, #fff8e7 100%);
}

.daily-review-panel {
  background: linear-gradient(145deg, #fffefa 0%, #eef7f8 100%);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.schedule-heading {
  align-items: end;
}

.schedule-table-head,
.schedule-row {
  display: grid;
  grid-template-columns: 120px 1.05fr 1.8fr 140px 150px;
  gap: 18px;
  align-items: center;
}

.schedule-table-head {
  padding: 0 18px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.schedule-row {
  padding: 17px 18px;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 17px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.schedule-row:hover {
  transform: translateY(-1px);
  background: #fffefa;
  border-color: rgba(67, 146, 158, 0.36);
  box-shadow: 0 12px 28px rgba(67, 92, 96, 0.1);
}

.schedule-row.is-active {
  border-color: var(--teal);
  box-shadow: inset 5px 0 var(--teal);
}

.schedule-time strong,
.schedule-time span,
.schedule-time small,
.schedule-project strong,
.schedule-project span,
.schedule-project small,
.schedule-status strong,
.schedule-status small {
  display: block;
}

.schedule-time strong {
  font-size: 21px;
}

.schedule-time {
  padding: 12px 10px;
  background: var(--teal-light);
  border-radius: 14px;
  text-align: center;
}

.schedule-time span {
  color: var(--muted);
  font-size: 13px;
}

.schedule-time span::before {
  content: "↓";
  display: block;
  margin: 3px 0;
  color: var(--teal);
  font-size: 12px;
  line-height: 1;
}

.schedule-time small,
.schedule-project span,
.schedule-project small,
.schedule-status small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.schedule-time small {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(30, 95, 91, 0.14);
}

.schedule-project strong,
.schedule-work strong {
  font-size: 14px;
}

.schedule-work p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
}

.schedule-work span {
  font-size: 11px;
  font-weight: 700;
}

.schedule-status {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.schedule-status strong {
  font-size: 14px;
}

.status-pill,
.outcome {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.status-planned {
  color: var(--teal-dark);
  background: var(--teal-light);
}

.status-running {
  color: #fff;
  background: var(--teal);
}

.status-paused {
  background: var(--yellow);
}

.status-completed {
  background: #dcebd7;
}

.status-incomplete {
  color: var(--danger);
  background: #f4ddd8;
}

.schedule-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.schedule-project {
  position: relative;
  padding-right: 46px;
}

.schedule-copy-button {
  position: absolute;
  top: -4px;
  right: 0;
  padding: 4px 7px;
  color: var(--teal-dark);
  background: transparent;
  border: 1px solid rgba(67, 146, 158, 0.28);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.schedule-copy-button:hover {
  background: var(--teal-light);
}

.empty-state {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 50px 20px;
  color: var(--muted);
  border: 1px dashed var(--latte);
  border-radius: 16px;
  text-align: center;
}

.empty-state.compact {
  padding: 32px 15px;
}

.review-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  margin-top: 20px;
}

.strategy-review-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: start;
}

.time-block-panel,
.daily-review-panel {
  grid-column: 1 / -1;
}

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

.quadrant-cell {
  min-height: 126px;
  padding: 16px;
  border: 1px solid rgba(79, 74, 66, 0.09);
  border-radius: 16px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.65);
}

.quadrant-cell span,
.quadrant-cell strong,
.quadrant-cell small {
  display: block;
}

.quadrant-cell span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.quadrant-cell strong {
  margin: 8px 0 2px;
  font-size: 27px;
}

.quadrant-cell small {
  color: var(--muted);
  font-size: 10px;
}

.quadrant-cell p {
  margin: 11px 0 0;
  font-size: 11px;
  font-weight: 700;
}

.quadrant-cell.core {
  background: linear-gradient(135deg, #d9eedc 0%, #f1f8ec 100%);
}

.quadrant-cell.cash {
  background: linear-gradient(135deg, #f5dfa0 0%, #fff6d8 100%);
}

.quadrant-cell.growth {
  background: linear-gradient(135deg, #c5e5ea 0%, #ebf6f7 100%);
}

.quadrant-cell.drain {
  background: linear-gradient(135deg, #efd4cf 0%, #faeeeb 100%);
}

.operation-alert {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 13px 15px;
  border-left: 5px solid var(--teal);
  border-radius: 12px;
}

.operation-alert strong {
  font-size: 12px;
}

.operation-alert span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.operation-alert.neutral,
.operation-alert.healthy {
  background: linear-gradient(135deg, #cce8ec 0%, #eef8f9 100%);
}

.operation-alert.notice {
  background: linear-gradient(135deg, #f6df98 0%, #fff5cf 100%);
  border-color: #d6a82c;
}

.operation-alert.warning {
  background: linear-gradient(135deg, #f5d2aa 0%, #fff0dc 100%);
  border-color: #d9863b;
}

.operation-alert.danger {
  background: linear-gradient(135deg, #ebc5bd 0%, #fae8e4 100%);
  border-color: var(--danger);
}

.time-block-heading {
  align-items: flex-start;
}

.time-zone-panel {
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 254, 250, 0.98), rgba(238, 247, 248, 0.92));
  box-shadow: var(--shadow-raised);
}

.time-zone-details > summary {
  list-style: none;
}

.time-zone-details > summary::-webkit-details-marker {
  display: none;
}

.time-zone-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  cursor: pointer;
  user-select: none;
}

.time-zone-summary:hover {
  background: rgba(208, 234, 237, 0.2);
}

.time-zone-summary .section-description {
  max-width: 720px;
}

.time-zone-description {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.time-zone-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 13px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(67, 146, 158, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.time-zone-toggle i {
  font-style: normal;
  transition: transform 180ms ease;
}

.time-zone-details:not([open]) .time-zone-toggle-label {
  font-size: 0;
}

.time-zone-details:not([open]) .time-zone-toggle-label::after {
  content: "展開";
  font-size: 12px;
}

.time-zone-details:not([open]) .time-zone-toggle i {
  transform: rotate(180deg);
}

.time-zone-content {
  padding: 0 30px 30px;
}

.time-zone-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.time-zone-toolbar > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.time-zone-section {
  padding: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(79, 74, 66, 0.09);
  border-radius: 18px;
}

.time-zone-section + .time-zone-section {
  margin-top: 16px;
}

.time-zone-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.time-zone-section-heading h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.time-zone-section-heading small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.time-zone-kicker {
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.planned-time-zone {
  background: linear-gradient(135deg, rgba(208, 234, 237, 0.8), rgba(248, 252, 252, 0.96));
}

.actual-time-zone {
  background: linear-gradient(135deg, rgba(250, 226, 157, 0.68), rgba(255, 251, 239, 0.96));
}

.time-zone-quadrant {
  background: linear-gradient(135deg, rgba(255, 254, 250, 0.9), rgba(238, 247, 248, 0.9));
}

.planned-timeline,
.time-block-timeline {
  display: grid;
  gap: 18px;
}

.time-comparison-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.time-comparison-summary article {
  padding: 14px 16px;
  background: rgba(255, 254, 250, 0.92);
  border: 1px solid rgba(79, 74, 66, 0.09);
  border-radius: 14px;
}

.time-comparison-summary article:nth-child(1) {
  background: linear-gradient(135deg, #cbe8ec 0%, #eef8f9 100%);
}

.time-comparison-summary article:nth-child(2) {
  background: linear-gradient(135deg, #f2c85e 0%, #faedbd 100%);
}

.time-comparison-summary span,
.time-comparison-summary strong {
  display: block;
}

.time-comparison-summary span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.time-comparison-summary strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.time-comparison-summary .is-over {
  background: #fff3ee;
  border-color: rgba(185, 103, 88, 0.25);
}

.time-block-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10px;
}

.work-mode-summary {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}

.work-mode-bar {
  display: flex;
  height: 10px;
  overflow: hidden;
  background: #eee8df;
  border-radius: 999px;
}

.work-mode-bar .output {
  background: var(--yellow);
}

.work-mode-bar .input {
  background: var(--teal);
}

.work-mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.work-mode-cards article,
.work-mode-empty {
  padding: 13px 15px;
  border-radius: 13px;
}

.work-mode-cards article.output {
  background: var(--yellow-light);
}

.work-mode-cards article.input {
  background: var(--teal-light);
}

.work-mode-cards span,
.work-mode-cards strong,
.work-mode-cards small {
  display: block;
}

.work-mode-cards span,
.work-mode-cards small,
.work-mode-empty span {
  color: var(--muted);
}

.work-mode-cards strong {
  margin: 3px 0;
  font-size: 22px;
}

.work-mode-empty {
  display: grid;
  gap: 4px;
  background: #f7f2e9;
}

.unclassified-work-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.time-block-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.time-block-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.time-block-legend .output {
  background: var(--yellow);
}

.time-block-legend .input {
  background: var(--teal);
}

.time-block-legend .rest {
  background: var(--latte);
}

.timeline-half {
  min-width: 0;
}

.timeline-labels {
  position: relative;
  height: 18px;
  margin: 0 6px;
  color: var(--muted);
  font-size: 8px;
}

.timeline-labels span {
  position: absolute;
  transform: translateX(-50%);
}

.timeline-labels span:first-child {
  transform: none;
}

.timeline-labels span:last-child {
  transform: translateX(-100%);
}

.time-track {
  position: relative;
  height: 116px;
  overflow: hidden;
  background: #f8f4ec;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: crosshair;
  touch-action: pan-y;
  user-select: none;
}

.planned-track {
  height: 98px;
  cursor: default;
  background: rgba(255, 254, 250, 0.82);
}

.timeline-grid {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(8.333% - 1px),
    rgba(79, 74, 66, 0.09) calc(8.333% - 1px),
    rgba(79, 74, 66, 0.09) 8.333%
  );
  pointer-events: none;
}

.time-block {
  position: absolute;
  z-index: 2;
  top: calc(9px + var(--lane) * 34px);
  display: grid;
  min-width: 14px;
  height: 28px;
  align-content: center;
  overflow: hidden;
  padding: 3px 7px;
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  text-align: left;
}

.planned-time-block {
  position: absolute;
  z-index: 2;
  top: calc(9px + var(--lane) * 28px);
  display: grid;
  min-width: 14px;
  height: 24px;
  align-content: center;
  overflow: hidden;
  padding: 2px 7px;
  color: var(--ink);
  background: var(--yellow);
  border: 1px solid rgba(181, 125, 25, 0.2);
  border-radius: 7px;
}

.planned-time-block.input {
  color: #fff;
  background: var(--teal);
  border-color: rgba(54, 127, 138, 0.3);
}

.planned-time-block.unclassified {
  background: #f3eadb;
  border-style: dashed;
}

.planned-time-block strong,
.planned-time-block small {
  overflow: hidden;
  font-size: 8px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planned-time-block small {
  opacity: 0.72;
}

.time-block.output {
  background: var(--yellow);
}

.time-block.input {
  color: #fff;
  background: var(--teal);
}

.time-block.unclassified {
  background: var(--yellow-light);
  outline: 1px dashed var(--latte);
}

.time-block.rest {
  background: var(--latte);
}

.time-block.drag-preview {
  z-index: 4;
  opacity: 0.7;
  pointer-events: none;
}

.time-block strong,
.time-block small {
  overflow: hidden;
  font-size: 8px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-block small {
  opacity: 0.75;
}

.result-list {
  display: grid;
  gap: 10px;
}

.result-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--yellow-light);
  border-radius: 14px;
}

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

.result-heading div span,
.result-heading div strong {
  display: block;
}

.result-heading div span,
.result-detail span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}

.result-heading div strong {
  font-size: 13px;
}

.result-detail {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 11px;
}

.result-detail.featured-result {
  border-left: 4px solid var(--teal);
}

.result-detail p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

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

.outcome {
  background: var(--latte);
}

.outcome.achieved {
  background: #dcebd7;
}

.strategy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0;
}

.strategy-tags span {
  padding: 3px 7px;
  color: var(--muted);
  background: #f5efe5;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.strategy-tags span.output {
  color: var(--ink);
  background: var(--yellow-light);
}

.strategy-tags span.input {
  color: var(--teal-dark);
  background: var(--teal-light);
}

#dailyReviewForm {
  display: grid;
  gap: 16px;
}

.saved-review {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.saved-review > span {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.saved-review section {
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 254, 250, 0.42) 0%, rgba(255, 239, 184, 0.9) 28%, rgba(250, 240, 208, 0.96) 100%);
  border-radius: 13px;
}

.saved-review small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.saved-review p {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  white-space: pre-wrap;
}

.export-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(520px, 1.2fr);
  align-items: center;
  gap: 24px;
  margin-top: 20px;
  padding: 28px 30px;
  color: #fff;
  background: linear-gradient(135deg, #2f7783 0%, #43929e 52%, #79b8bd 100%);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.export-panel .eyebrow {
  margin-bottom: 16px;
}

.export-panel .eyebrow,
.export-panel p {
  color: rgba(255, 255, 255, 0.76);
}

.export-panel h2 {
  margin-bottom: 10px;
}

.export-panel p {
  margin-bottom: 0;
  font-weight: 300;
}

.export-panel .primary-button {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
  white-space: nowrap;
}

.export-actions {
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.export-presets {
  display: flex;
  gap: 6px;
}

.export-presets button {
  min-height: 42px;
  padding: 0 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-weight: 700;
}

.export-date-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
}

.export-date-range label {
  gap: 5px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
}

.export-date-range input {
  min-height: 42px;
  color: var(--ink);
  background: #fff;
}

.export-date-range > span {
  padding-bottom: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.export-actions small {
  grid-column: 1 / -1;
  justify-self: end;
  max-width: 280px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.export-choice-section {
  display: grid;
  gap: 12px;
}

.export-choice-section > span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.export-format-options,
.export-section-options {
  display: grid;
  gap: 10px;
}

.print-report {
  display: none;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  font-weight: 400;
  background: var(--paper);
  border: 1px solid #ddd1c4;
  border-radius: 12px;
  outline: none;
}

input,
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 92px;
  padding: 13px;
  resize: vertical;
  line-height: 1.6;
}

.markdown-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: -2px;
}

.markdown-toolbar button {
  display: grid;
  width: 34px;
  height: 32px;
  place-items: center;
  color: var(--teal-dark);
  background: linear-gradient(145deg, #fffefa, #f2eadf);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
}

.markdown-toolbar button:hover,
.markdown-toolbar button:focus-visible,
.markdown-toolbar button.active {
  background: linear-gradient(145deg, var(--yellow-light), #fffefa);
  box-shadow: var(--focus-ring);
}

.md-heading {
  display: inline-block;
  font-size: 1.14em;
  font-weight: 700;
}

.md-bullet::before {
  content: "- ";
  color: var(--teal-dark);
  font-weight: 700;
}

.md-number {
  font-weight: 500;
}

label small,
.auth-hint,
.registration-fields small,
.actual-metrics-heading small {
  line-height: 1.65;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: var(--focus-ring);
}

input[readonly] {
  color: var(--muted);
  background: #f4efe6;
}

.app-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: var(--ink);
  background: var(--panel);
  border: 0;
  border-radius: 26px;
  box-shadow: 0 24px 90px rgba(79, 74, 66, 0.3);
  overflow: hidden;
}

.app-dialog::backdrop {
  background: rgba(79, 74, 66, 0.58);
  backdrop-filter: blur(5px);
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 23px 27px;
}

.dialog-header {
  position: sticky;
  z-index: 4;
  top: 0;
  background: rgba(255, 254, 250, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.dialog-actions {
  position: sticky;
  z-index: 4;
  bottom: 0;
  background: rgba(255, 254, 250, 0.96);
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.dialog-close {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ink);
  background: var(--yellow-light);
  border: 0;
  border-radius: 50%;
  font-size: 25px;
}

.dialog-body {
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 190px);
  padding: 25px 27px;
  overflow-y: auto;
}

.dialog-feedback {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  color: var(--ink);
  background: #eef7f8;
  border: 1px solid rgba(67, 146, 158, 0.34);
  border-radius: 13px;
  line-height: 1.55;
}

.dialog-feedback strong,
.dialog-feedback span {
  display: block;
}

.dialog-feedback strong {
  font-weight: 700;
}

.dialog-feedback span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.dialog-feedback.success {
  background: #edf8f0;
  border-color: rgba(79, 149, 102, 0.4);
}

.dialog-feedback.warning {
  background: #fff7df;
  border-color: rgba(181, 125, 25, 0.38);
}

.dialog-feedback.error {
  background: #fff0ed;
  border-color: rgba(185, 103, 88, 0.42);
}

.time-day-offset {
  justify-self: start;
  margin-top: -2px;
  padding: 3px 8px;
  color: var(--teal-dark);
  background: var(--teal-light);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.field-grid {
  display: grid;
  gap: 16px;
}

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

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-label-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.planned-duration {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 13px 15px;
  background: linear-gradient(135deg, rgba(208, 234, 237, 0.95) 0%, rgba(235, 249, 250, 0.9) 100%);
  border-radius: 12px;
  font-size: 12px;
}

.planned-duration > div:first-child span,
.planned-duration > div:first-child small {
  display: block;
}

.planned-duration > div:first-child small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 300;
}

.duration-inputs {
  display: flex;
  gap: 8px;
}

.duration-inputs label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.duration-inputs input {
  width: 72px;
  min-height: 40px;
  background: #fff;
}

.planned-duration > strong {
  white-space: nowrap;
}

.recurrence-panel {
  display: grid;
  grid-template-columns: minmax(150px, 0.48fr) minmax(420px, 1.52fr);
  align-items: center;
  gap: 12px 18px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(208, 234, 237, 0.82) 0%, rgba(255, 251, 242, 0.88) 100%);
  border: 1px solid rgba(67, 146, 158, 0.08);
  border-radius: 18px;
}

.recurrence-panel label {
  display: grid;
  grid-template-columns: minmax(120px, 0.38fr) minmax(360px, 1.62fr);
  align-items: center;
  gap: 14px;
  grid-column: 1 / -1;
  margin: 0;
}

.recurrence-panel label > select,
.recurrence-panel label > input {
  width: 100%;
}

.recurrence-panel label.hidden {
  display: none;
}

.recurrence-panel p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.5;
}

.strategy-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(120px, 0.8fr));
  align-items: end;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(208, 234, 237, 0.82) 0%, rgba(255, 251, 242, 0.88) 100%);
  border-radius: 14px;
}

.schedule-work-mode-fields {
  grid-template-columns: minmax(150px, 0.45fr) minmax(420px, 1.55fr);
  align-items: center;
  padding: 18px 24px;
  border: 1px solid rgba(67, 146, 158, 0.08);
  border-radius: 18px;
}

.schedule-work-mode-fields > label {
  margin: 0;
}

.schedule-work-mode-fields > div {
  justify-self: center;
  text-align: center;
}

.schedule-work-mode-fields select {
  width: 100%;
}

.strategy-fields > div span,
.strategy-fields > div small {
  display: block;
}

.strategy-fields > div small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 300;
  line-height: 1.5;
}

.recurrence-label {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
}

.completion-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.completion-summary div {
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 239, 184, 0.96) 0%, rgba(255, 251, 242, 0.92) 100%);
  border-radius: 12px;
}

.completion-summary span,
.completion-summary strong {
  display: block;
}

.completion-summary span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
}

.completion-summary strong {
  font-size: 12px;
  line-height: 1.5;
}

.completion-summary small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.actual-metrics-summary button,
.actual-clock-summary button {
  margin-top: 8px;
  padding: 0;
  font-size: 11px;
}

.actual-metrics-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 239, 184, 0.96) 0%, rgba(255, 251, 242, 0.9) 100%);
  border-radius: 14px;
}

.actual-metrics-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.actual-metrics-heading strong,
.actual-metrics-heading small {
  display: block;
}

.actual-metrics-heading small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.5;
}

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

.actual-clock-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.completion-work-mode {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding: 10px 24px 12px;
  background: linear-gradient(135deg, rgba(255, 239, 184, 0.96) 0%, rgba(255, 251, 242, 0.9) 100%);
  border: 1px solid rgba(235, 193, 90, 0.22);
  border-radius: 18px;
}

.completion-work-mode label {
  margin: 0;
}

.completion-work-mode label > span {
  display: block;
  margin-bottom: 3px;
  font-weight: 700;
}

.completion-work-mode span,
.completion-work-mode small {
  display: block;
}

.completion-work-mode small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.5;
}

.rest-optional-details {
  background: var(--paper);
  border: 1px solid var(--line);
}

.review-details {
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 254, 250, 0.58) 0%, rgba(255, 239, 184, 0.9) 34%, rgba(250, 240, 208, 0.96) 100%);
  border: 1px solid rgba(235, 193, 90, 0.18);
  border-radius: 14px;
}

.review-details summary {
  cursor: pointer;
  font-weight: 800;
}

.review-details label {
  margin-top: 16px;
}

.settings-dialog {
  width: min(1120px, calc(100% - 32px));
}

.life-planning-dialog {
  width: min(1080px, calc(100% - 32px));
}

.nested-dialog {
  width: min(680px, calc(100% - 32px));
}

.planning-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: var(--yellow-light);
  border-radius: 14px;
}

.planning-tabs button {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

.planning-tabs button.active {
  color: #fff;
  background: var(--teal);
}

.life-budget-grid,
.business-finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.life-budget-card,
.finance-ledger-card,
.revenue-target-card {
  padding: 20px;
  background: #f7f2e9;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.life-budget-card.ideal {
  background: var(--yellow-light);
}

.life-budget-card > div:first-child span,
.life-budget-card > div:first-child strong,
.life-budget-card > div:first-child small {
  display: block;
}

.life-budget-card > div:first-child span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.life-budget-card > div:first-child strong {
  margin: 7px 0 3px;
  font-size: 22px;
}

.life-budget-card > div:first-child small {
  color: var(--muted);
}

.budget-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.budget-category-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.budget-category-card div span,
.budget-category-card div strong,
.budget-category-card div small {
  display: block;
}

.budget-category-card div span {
  font-weight: 800;
}

.budget-category-card div strong {
  margin-top: 4px;
  font-size: 17px;
}

.budget-category-card div small {
  margin-top: 2px;
  color: var(--muted);
}

.budget-category-card button {
  min-height: 36px;
  color: var(--teal-dark);
  background: var(--teal-light);
  border: 0;
  border-radius: 9px;
  font-weight: 800;
}

.money-input,
.percent-input {
  display: flex;
  align-items: center;
  gap: 7px;
}

.money-input span,
.percent-input span {
  color: var(--muted);
  font-weight: 500;
}

.percent-input input,
.work-mode-cards strong,
.stat-card strong,
.focus-clock strong,
.admin-record-list time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.finance-ledger-card {
  display: grid;
  gap: 10px;
}

.finance-ledger-card > span,
.finance-ledger-card > strong {
  display: block;
}

.finance-ledger-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.finance-ledger-card > strong {
  font-size: 22px;
}

.finance-ledger-card > button {
  min-height: 40px;
  color: var(--teal-dark);
  background: var(--teal-light);
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

.finance-ledger-card small {
  line-height: 1.5;
}

.coverage-ok {
  color: #52704d;
}

.coverage-short {
  color: var(--danger);
}

.revenue-target-card {
  display: grid;
  grid-template-columns: 1fr minmax(160px, 0.7fr) 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  background: var(--teal-light);
}

.revenue-target-card span,
.revenue-target-card strong {
  display: block;
}

.revenue-target-card span {
  color: var(--muted);
  font-size: 11px;
}

.revenue-target-card strong {
  margin-top: 5px;
  font-size: 20px;
}

.revenue-target-result {
  padding: 15px;
  background: #fff;
  border-radius: 13px;
}

.freedom-target {
  padding: 18px;
  text-align: center;
  background: var(--yellow-light);
  border-radius: 15px;
}

.freedom-target span,
.freedom-target strong {
  display: block;
}

.freedom-target strong {
  margin-top: 6px;
  font-size: 24px;
}

.freedom-projection-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.freedom-projection-list article {
  padding: 15px;
  background: #f7f2e9;
  border-radius: 13px;
}

.freedom-projection-list span,
.freedom-projection-list strong {
  display: block;
}

.freedom-projection-list span {
  color: var(--muted);
  font-size: 10px;
}

.freedom-projection-list strong {
  margin-top: 5px;
  font-size: 13px;
}

.freedom-projection-list p {
  margin: 9px 0 0;
  color: var(--teal-dark);
  font-size: 11px;
  line-height: 1.5;
}

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

.finance-ledger-list article {
  position: relative;
  padding: 14px;
  background: var(--yellow-light);
  border-radius: 12px;
}

.finance-ledger-list article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-right: 92px;
}

.finance-ledger-item-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 !important;
}

.finance-ledger-list details {
  margin-top: 10px;
  font-size: 11px;
}

.finance-ledger-list p {
  line-height: 1.6;
  white-space: pre-wrap;
}

.finance-ledger-entry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.finance-ledger-entry textarea {
  grid-column: 1 / -1;
}

.rest-ratings {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.rest-ratings legend {
  padding: 0 7px;
  font-weight: 800;
}

#restRatingFields {
  display: grid;
  gap: 13px;
}

.star-rating-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 12px;
}

.star-rating-row > span {
  font-size: 12px;
  font-weight: 800;
}

.star-rating {
  display: flex;
  gap: 4px;
}

.star-rating label {
  position: relative;
  display: grid;
  gap: 1px;
  place-items: center;
  cursor: pointer;
}

.star-rating input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.star-rating label span {
  color: #d8cec0;
  font-size: 24px;
}

.star-rating label small {
  color: var(--muted);
  font-size: 8px;
}

.star-rating label:has(input:checked) span,
.star-rating label:has(input:checked) ~ label span {
  color: #d8cec0;
}

.star-rating:has(input[value="1"]:checked) label:nth-child(-n + 1) span,
.star-rating:has(input[value="2"]:checked) label:nth-child(-n + 2) span,
.star-rating:has(input[value="3"]:checked) label:nth-child(-n + 3) span,
.star-rating:has(input[value="4"]:checked) label:nth-child(-n + 4) span,
.star-rating:has(input[value="5"]:checked) label:nth-child(-n + 5) span {
  color: var(--yellow);
}

.privacy-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.privacy-option:has(input:checked) {
  background: var(--yellow-light);
  border-color: var(--yellow);
}

.privacy-option input {
  width: 19px;
  min-height: 19px;
  margin-top: 2px;
}

.privacy-option strong,
.privacy-option small {
  display: block;
}

.privacy-option small {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 300;
}

.auth-dialog {
  width: min(520px, calc(100% - 30px));
}

.auth-intro {
  margin-top: 0;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
  padding: 5px;
  background: var(--yellow-light);
  border-radius: 14px;
}

.auth-tabs button {
  min-height: 40px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
}

.auth-tabs button.active {
  color: #fff;
  background: var(--teal);
}

#authForm,
#passwordRecoveryForm,
.signed-in-panel {
  display: grid;
  gap: 16px;
}

.registration-fields,
.registration-consents,
.account-setting-form,
.activation-code-form {
  display: grid;
  gap: 12px;
}

.registration-consents {
  padding: 14px;
  background: var(--yellow-light);
  border-radius: 13px;
}

.registration-consents label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 9px;
}

.inline-legal-link {
  padding: 0 3px;
  color: var(--teal-dark);
  background: transparent;
  border: 0;
  text-decoration: underline;
  font: inherit;
  font-weight: 800;
}

.membership-summary {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: var(--yellow-light);
  border-radius: 13px;
}

.membership-summary.active {
  background: var(--teal-light);
}

.membership-summary.expired,
.membership-summary.suspended {
  background: #fff0ed;
}

.membership-summary span,
.membership-summary small {
  color: var(--muted);
}

.activation-code-form,
.account-setting-form {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.legal-document-dialog {
  width: min(820px, calc(100% - 32px));
}

.legal-document-content {
  max-height: min(68vh, 720px);
  overflow: auto;
  line-height: 1.75;
}

.legal-document-content h3 {
  margin: 22px 0 6px;
}

.legal-document-content p,
.legal-document-content li {
  color: var(--muted);
}

.admin-dashboard-dialog {
  width: min(1080px, calc(100% - 32px));
  position: relative;
}

.admin-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: var(--yellow-light);
  border-radius: 14px;
}

.admin-tabs button {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-weight: 500;
}

.admin-tabs button.active {
  color: #fff;
  background: var(--teal);
  font-weight: 700;
}

.admin-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-code-forms {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 14px;
  margin: 16px 0;
}

.admin-code-forms form {
  display: grid;
  gap: 11px;
  padding: 16px;
  background: #f7f2e9;
  border-radius: 14px;
}

.admin-code-forms h3 {
  margin: 0;
}

.admin-record-list {
  display: grid;
  gap: 9px;
}

.admin-record-list article {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(110px, 0.7fr)) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(79, 74, 66, 0.04);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.admin-record-list article:hover {
  transform: translateY(-1px);
  border-color: rgba(67, 146, 158, 0.34);
  box-shadow: 0 12px 26px rgba(67, 92, 96, 0.09);
}

.admin-record-list span,
.admin-record-list small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.admin-record-list strong {
  font-weight: 700;
  line-height: 1.45;
}

.admin-record-list time,
.admin-record-list code {
  font-variant-numeric: tabular-nums;
}

.admin-member-actions {
  display: grid;
  gap: 6px;
}

.admin-code-alerts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.admin-code-alerts article {
  padding: 12px 14px;
  background: #fff7d7;
  border: 1px solid rgba(210, 154, 43, 0.26);
  border-radius: 12px;
}

.admin-code-alerts strong,
.admin-code-alerts span {
  display: block;
}

.admin-code-alerts strong {
  margin-bottom: 4px;
}

.admin-code-alerts span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.admin-code-reminder {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 8;
  display: grid;
  width: min(390px, calc(100% - 48px));
  gap: 12px;
  padding: 16px;
  background: rgba(255, 254, 250, 0.98);
  border: 1px solid rgba(210, 154, 43, 0.28);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(79, 74, 66, 0.2);
}

.admin-code-reminder strong,
.admin-code-reminder small,
.admin-code-reminder span {
  display: block;
}

.admin-code-reminder strong {
  font-size: 16px;
}

.admin-code-reminder small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.admin-code-reminder ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-code-reminder li {
  padding: 10px 12px;
  color: var(--muted);
  background: #fff7d7;
  border: 1px solid rgba(210, 154, 43, 0.18);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.admin-code-reminder li span {
  margin-bottom: 2px;
  color: var(--ink);
  font-weight: 900;
}

.admin-code-reminder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-status-label,
.admin-tier-label,
.batch-status-pill {
  display: inline-grid;
  width: fit-content;
  min-height: 24px;
  place-items: center;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.admin-status-label.active,
.batch-status-pill.found {
  color: var(--teal-dark);
  background: var(--teal-light);
}

.admin-status-label.unactivated {
  color: #6d5b16;
  background: #fff4bd;
}

.admin-status-label.expired,
.admin-status-label.suspended,
.batch-status-pill.missing,
.batch-status-pill.duplicate,
.batch-status-pill.invalid {
  color: var(--danger);
  background: #fff0ed;
}

.admin-tier-label {
  color: #5f4b1c;
  background: #fff7d7;
}

.admin-tier-label.premium {
  color: #255f67;
  background: #dff2f4;
}

.admin-tier-label.vip {
  color: #6d4c10;
  background: #ffe8b5;
}

.batch-member-dialog {
  width: min(1040px, calc(100vw - 28px));
}

.app-dialog > .batch-member-form {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.batch-member-layout {
  display: grid;
  gap: 14px;
}

.batch-member-save-notice {
  margin: 0;
  padding: 12px 14px;
  color: #6d4c10;
  background: #fff4d6;
  border: 1px solid rgba(235, 193, 90, 0.42);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}

.batch-member-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.batch-member-section h3 {
  margin: 0;
}

.batch-member-settings-panel {
  background: linear-gradient(135deg, rgba(223, 242, 244, 0.92), rgba(255, 251, 242, 0.82));
  border-color: rgba(67, 146, 158, 0.22);
}

.batch-member-summary,
.batch-member-confirm {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.batch-member-summary strong {
  color: var(--ink);
}

.batch-member-preview {
  display: grid;
  max-height: 280px;
  gap: 8px;
  overflow: auto;
}

.batch-member-row {
  display: grid;
  grid-template-columns: auto minmax(180px, 1.1fr) minmax(130px, 0.9fr) minmax(110px, 0.6fr) minmax(130px, 0.7fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.batch-member-row.is-disabled {
  opacity: 0.62;
}

.batch-member-row span,
.batch-member-row small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.batch-member-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.batch-member-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.batch-member-actions {
  box-shadow: 0 -12px 28px rgba(79, 74, 66, 0.08);
}

.batch-member-submit-hint {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.batch-member-submit-hint.is-ready {
  color: #255f67;
}

.admin-code-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.admin-code-filters button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.admin-code-filters button.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.admin-code-filters strong {
  display: grid;
  place-items: center;
  min-width: 22px;
  min-height: 22px;
  padding: 0 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 10px;
}

.admin-code-status {
  width: fit-content;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.admin-code-status.available {
  color: var(--teal-dark);
  background: var(--teal-light);
}

.admin-code-status.invalid {
  color: var(--danger);
  background: #fff0ed;
}

.generated-code-result {
  margin-bottom: 14px;
  padding: 15px;
  white-space: pre-wrap;
  background: var(--teal-light);
  border-radius: 13px;
}

#authForm .primary-button,
#passwordRecoveryForm .primary-button,
.signed-in-panel .quiet-button {
  width: 100%;
}

.auth-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
}

.auth-reset,
.danger-action {
  justify-self: center;
}

.danger-action {
  color: var(--danger);
}

.cloud-account-card {
  display: grid;
  gap: 6px;
  padding: 20px;
  background: var(--teal-light);
  border-radius: 16px;
}

.cloud-account-card span,
.cloud-account-card small {
  color: var(--muted);
  font-size: 11px;
}

.cloud-account-card strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

#cloudSyncStatus[data-state="success"] {
  color: #477c40;
}

#cloudSyncStatus[data-state="error"] {
  color: var(--danger);
}

.signed-in-panel > p,
.cloud-unavailable p {
  margin: 0;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
}

.cloud-unavailable {
  padding: 18px;
  background: var(--yellow-light);
  border-radius: 14px;
}

.cloud-unavailable strong {
  display: block;
  margin-bottom: 7px;
}

.settings-intro {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 300;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.settings-grid section {
  min-width: 0;
  padding: 18px;
  background: var(--paper);
  border-radius: 16px;
}

.settings-grid h3 {
  margin-bottom: 14px;
}

.inline-form {
  display: grid;
  gap: 8px;
}

.inline-form + .inline-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.inline-form button {
  min-height: 40px;
  color: #fff;
  background: var(--teal);
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

.settings-list {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.settings-folder {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(79, 74, 66, 0.08);
  border-radius: 12px;
}

.settings-folder summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.settings-folder summary::-webkit-details-marker {
  display: none;
}

.settings-folder summary::after {
  content: "⌄";
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 150ms ease;
}

.settings-folder[open] summary::after {
  transform: rotate(180deg);
}

.settings-folder summary strong {
  flex: 1 1 auto;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-folder summary small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
}

.folder-icon {
  position: relative;
  width: 18px;
  height: 13px;
  background: var(--yellow);
  border-radius: 3px;
}

.folder-icon::before {
  position: absolute;
  top: -4px;
  left: 2px;
  width: 8px;
  height: 5px;
  background: var(--yellow);
  border-radius: 3px 3px 0 0;
  content: "";
}

.settings-folder-content {
  display: grid;
  gap: 7px;
  padding: 0 9px 9px;
}

.drag-handle {
  color: #aaa095;
  cursor: grab;
  font-size: 12px;
  letter-spacing: -0.2em;
  user-select: none;
}

.is-dragging {
  opacity: 0.45;
}

.is-drag-over {
  outline: 2px dashed var(--teal);
  outline-offset: -3px;
}

.setting-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
}

.settings-folder-content > .setting-actions {
  padding: 0 3px 3px;
  border-bottom: 1px solid rgba(79, 74, 66, 0.08);
}

.setting-actions button {
  min-height: 32px;
  padding: 0 11px;
  color: var(--teal-dark);
  background: rgba(255, 254, 250, 0.46);
  border: 1px solid rgba(67, 146, 158, 0.32);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.setting-actions .danger-text {
  color: var(--teal-dark);
}

.folder-remove {
  justify-self: end;
  padding: 5px;
  color: var(--danger);
  background: transparent;
  border: 0;
  font-size: 10px;
}

.setting-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: #fff;
  border-radius: 10px;
}

.setting-item-copy strong,
.setting-item-copy small {
  display: block;
}

.setting-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.setting-title-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-item-copy strong {
  font-size: 12px;
}

.setting-item-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.settings-empty {
  color: var(--muted);
  font-size: 11px;
}

.responsibility-category {
  overflow: hidden;
  border: 1px solid rgba(52, 126, 138, 0.18);
  border-radius: 13px;
}

.responsibility-category > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 13px 14px;
  color: var(--teal-dark);
  background: rgba(52, 126, 138, 0.08);
  cursor: pointer;
  list-style: none;
}

.responsibility-category > summary::-webkit-details-marker {
  display: none;
}

.responsibility-category > summary::after {
  content: "⌄";
  color: var(--teal-dark);
  transition: transform 150ms ease;
}

.responsibility-category[open] > summary::after {
  transform: rotate(180deg);
}

.responsibility-category > summary strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.responsibility-category > summary small {
  color: var(--muted);
  font-size: 9px;
}

.responsibility-category-content {
  display: grid;
  gap: 8px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.5);
}

.note-eye {
  display: inline-grid;
  place-items: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  padding: 5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
}

.note-eye:hover,
.note-eye:focus-visible {
  color: var(--teal-dark);
  background: rgba(52, 126, 138, 0.1);
}

.note-eye.has-note {
  color: var(--teal-dark);
  background: rgba(52, 126, 138, 0.12);
  border-color: rgba(52, 126, 138, 0.16);
}

.note-eye svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.data-editor-dialog,
.note-dialog,
.recurrence-delete-dialog {
  width: min(560px, calc(100% - 30px));
}

.note-context {
  margin: 0;
  padding: 10px 12px;
  color: var(--teal-dark);
  background: rgba(52, 126, 138, 0.08);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.note-writing-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.note-writing-guide article {
  padding: 13px;
  background: var(--paper);
  border-radius: 12px;
}

.note-writing-guide strong,
.note-writing-guide span {
  display: block;
}

.note-writing-guide strong {
  margin-bottom: 5px;
  color: var(--teal-dark);
  font-size: 12px;
}

.note-writing-guide span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.6;
}

.form-hint,
.delete-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.65;
}

.delete-scope-options {
  display: grid;
  gap: 10px;
}

.delete-scope-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.delete-scope-option:has(input:checked) {
  background: var(--yellow-light);
  border-color: var(--yellow);
}

.delete-scope-option input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
}

.delete-scope-option strong,
.delete-scope-option small {
  display: block;
}

.delete-scope-option small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
  line-height: 1.5;
}

footer {
  padding: 28px 0 90px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin-top: 10px;
}

.footer-links a {
  color: inherit;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: var(--teal);
}

.toast {
  position: fixed;
  z-index: 2147483647;
  inset: auto 24px 24px auto;
  right: 24px;
  bottom: 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: min(360px, calc(100vw - 32px));
  margin: 0;
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.98);
  border: 1px solid rgba(67, 146, 158, 0.34);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(48, 64, 66, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 200ms ease;
}

.toast:popover-open {
  display: grid;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.toast-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-weight: 700;
}

.toast-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.toast-copy strong,
.toast-copy span {
  display: block;
}

.toast-copy strong {
  font-weight: 700;
  line-height: 1.35;
}

.toast-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.toast-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 20px;
}

.toast-close:hover {
  color: var(--ink);
  background: var(--yellow-light);
}

.toast[data-type="success"] {
  border-color: rgba(79, 149, 102, 0.42);
}

.toast[data-type="success"] .toast-icon {
  background: var(--success);
}

.toast[data-type="warning"] {
  border-color: rgba(181, 125, 25, 0.42);
}

.toast[data-type="warning"] .toast-icon {
  background: var(--warning);
}

.toast[data-type="error"] {
  border-color: rgba(185, 103, 88, 0.46);
}

.toast[data-type="error"] .toast-icon {
  background: var(--danger);
}

.is-refreshing span {
  display: inline-block;
  animation: refresh-spin 700ms linear infinite;
}

@keyframes refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.mobile-nav {
  display: none;
}

.tool-orb-cluster {
  position: fixed;
  z-index: 18;
  top: 42%;
  right: 18px;
  display: grid;
  justify-items: end;
  gap: 10px;
}

.deadline-todo-trigger {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 58px;
  padding: 14px 10px;
  color: var(--teal-dark);
  background: #fff9eb;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(73, 64, 50, 0.14);
  font-weight: 800;
}

.tool-orb-main {
  position: static;
  width: 70px;
  min-width: 70px;
  height: 70px;
  padding: 10px;
  background: linear-gradient(145deg, #fffefa 0%, #fff4d2 100%);
  border-radius: 22px;
}

.tool-orb-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tool-orb-menu {
  display: grid;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: 160ms ease;
}

.tool-orb-cluster:not(.menu-click-closed):hover .tool-orb-menu,
.tool-orb-cluster:not(.menu-click-closed):focus-within .tool-orb-menu,
.tool-orb-cluster.menu-open .tool-orb-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.tool-orb-menu button {
  min-width: 68px;
  min-height: 38px;
  color: var(--ink);
  background: linear-gradient(135deg, #fffefa, var(--yellow-light));
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(73, 64, 50, 0.12);
  font-weight: 700;
}

.deadline-todo-panel header h2 strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  margin-left: 7px;
  color: var(--ink);
  background: linear-gradient(135deg, #f5d878 0%, #ebc15a 64%, #dcae3f 100%);
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(235, 193, 90, 0.22), inset 0 1px rgba(255, 255, 255, 0.34);
  font-size: 13px;
  vertical-align: middle;
}

.deadline-todo-trigger strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  color: #fff;
  background: var(--muted);
  border-radius: 999px;
  font-size: 11px;
}

.deadline-todo-trigger.has-items strong {
  background: var(--danger);
}

.deadline-todo-panel {
  position: fixed;
  z-index: 19;
  top: 96px;
  right: 18px;
  bottom: 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(390px, calc(100vw - 36px));
  overflow: hidden;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(73, 64, 50, 0.2);
}

.tool-panel {
  background:
    linear-gradient(145deg, rgba(255, 251, 242, 0.98), rgba(255, 254, 250, 0.98)),
    radial-gradient(circle at 20% 0%, rgba(235, 193, 90, 0.2), transparent 36%),
    radial-gradient(circle at 100% 12%, rgba(67, 146, 158, 0.16), transparent 34%);
}

.deadline-todo-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.deadline-todo-panel header h2,
.deadline-todo-panel header p {
  margin: 0;
}

.deadline-todo-panel header button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  font-size: 24px;
}

.deadline-todo-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

.tool-panel-body {
  min-height: 0;
  overflow: auto;
}

.tool-tab-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.tool-tab-panel > .primary-button {
  width: 100%;
  justify-content: center;
}

.tool-form-card,
.tool-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  background: linear-gradient(145deg, #fffefa 0%, #f7f2e9 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(73, 64, 50, 0.08);
}

.tool-form-card summary {
  cursor: pointer;
  color: var(--teal-dark);
  font-weight: 700;
}

.tool-form-card form,
.tool-form-card {
  min-width: 0;
}

.tool-form-actions,
.tool-card-actions,
.tool-list-heading,
.habit-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tool-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-wrap;
}

.tool-card small {
  color: var(--muted);
  line-height: 1.5;
}

.tool-card-list {
  display: grid;
  gap: 10px;
}

.deadline-todo-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.habit-status-section {
  display: grid;
  gap: 10px;
}

.habit-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
  color: var(--ink);
}

.habit-section-heading strong {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.habit-section-heading span {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(210, 235, 238, 0.72);
  color: var(--teal-dark);
  font-weight: 700;
}

.habit-section-empty {
  min-height: 84px;
}

.habit-card-heading strong {
  font-weight: 700;
}

.habit-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.habit-eye {
  width: 34px;
  height: 34px;
}

.habit-detail {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: rgba(255, 251, 242, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.habit-card-heading span {
  color: var(--teal-dark);
  font-weight: 700;
}

.habit-progress {
  height: 14px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #fffefa 0%, #f6f2e9 100%) padding-box,
    linear-gradient(90deg, rgba(210, 235, 238, 0.95), rgba(67, 146, 158, 0.48), rgba(210, 235, 238, 0.95)) border-box;
  box-shadow: inset 0 1px 2px rgba(67, 146, 158, 0.1);
}

.habit-progress span {
  display: block;
  height: 100%;
  max-width: 100%;
  background: linear-gradient(90deg, #f8dc78 0%, #ebc15a 58%, #d8a542 100%);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(216, 165, 66, 0.18);
}

.habit-over-goal {
  color: var(--teal-dark) !important;
  font-weight: 700;
}

.habit-check {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.habit-check input {
  width: auto;
  min-height: auto;
}

.strategy-fields.compact {
  grid-template-columns: minmax(0, 1fr);
  padding: 14px;
}

@media (max-width: 680px) {
  .todo-entry-dialog .field-grid.two,
  .todo-entry-dialog .strategy-fields.compact {
    grid-template-columns: 1fr;
  }

  .tool-orb-cluster {
    top: auto;
    right: 14px;
    bottom: 92px;
  }

  .tool-orb-main {
    width: 58px;
    min-width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .tool-orb-menu {
    margin-bottom: 4px;
  }

  .deadline-todo-panel.tool-panel {
    top: auto;
    right: 10px;
    bottom: 82px;
    width: min(430px, calc(100vw - 20px));
    max-height: min(720px, calc(100vh - 112px));
  }

  .strategy-fields.compact,
  .tool-form-card .field-grid.two,
  #todoScheduleForm .field-grid.three {
    grid-template-columns: 1fr;
  }
}

.deadline-todo-item {
  display: grid;
  gap: 5px;
  padding: 14px;
  color: inherit;
  text-align: left;
  background: linear-gradient(135deg, #fffefa 0%, #ece9e3 52%, #fffefa 100%);
  border: 1px solid transparent;
  border-left: 5px solid var(--teal);
  border-radius: 13px;
}

.deadline-todo-item.overdue {
  border-left-color: #9b968f;
  background: linear-gradient(135deg, #fffefa 0%, #e8e5df 48%, #fffefa 100%);
}

.deadline-todo-item.today,
.deadline-todo-item.soon {
  border-left-color: var(--yellow);
  background: var(--yellow-light);
}

.deadline-todo-item small,
.deadline-todo-item span,
.deadline-todo-item p {
  color: var(--muted);
}

.deadline-todo-item p {
  margin: 2px 0 0;
  line-height: 1.5;
}

.temporary-result-row {
  border-left: 5px solid var(--yellow);
  background: linear-gradient(135deg, #fffaf0, #fffefa);
}

.temporary-project strong {
  color: var(--ink);
}

.deadline-urgency {
  width: fit-content;
  color: var(--danger) !important;
  font-size: 10px;
  font-weight: 800;
}

.deadline-completed-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.toast-extra {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.toast-extra input {
  width: auto;
  min-height: auto;
}

.hidden {
  display: none !important;
}

.membership-access-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0;
  padding: 22px;
  background: var(--yellow-light);
  border: 1px solid var(--yellow);
  border-radius: 18px;
}

.membership-access-notice h2,
.membership-access-notice p {
  margin: 0;
}

.membership-access-notice h2 {
  margin: 4px 0 7px;
}

.membership-access-copy {
  min-width: 0;
  max-width: 820px;
}

.membership-access-notice #membershipAccessDescription {
  color: var(--muted);
}

.membership-product-summary {
  max-width: 760px;
  margin-top: 16px !important;
  padding-top: 14px;
  color: var(--ink);
  border-top: 1px solid rgba(79, 74, 66, 0.14);
  font-size: 14px;
  line-height: 1.75;
}

.membership-public-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
}

.membership-public-links a {
  min-height: 32px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 32px;
  text-decoration: underline;
  text-decoration-color: rgba(67, 146, 158, 0.34);
  text-underline-offset: 4px;
}

.membership-public-links a:hover,
.membership-public-links a:focus-visible {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.membership-access-actions {
  display: grid;
  flex: 0 0 min(250px, 28%);
  gap: 9px;
  justify-items: stretch;
}

.membership-access-actions small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.account-identity,
.account-backup {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.account-identity span,
.account-backup small {
  color: var(--muted);
}

.account-identity small,
.account-backup small {
  font-size: 11px;
  line-height: 1.6;
}

.activation-consent {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.65;
}

.activation-consent input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.account-backup-actions,
.generated-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-backup-label {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.backup-dialog {
  width: min(820px, calc(100vw - 28px));
}

.backup-dialog > form {
  display: grid;
  max-height: min(88vh, 920px);
}

.backup-dialog-body {
  display: grid;
  gap: 14px;
  overflow: auto;
}

.backup-section,
.backup-import-preview {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.backup-section p,
.backup-section small,
.backup-import-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.backup-section-title,
.backup-option-grid label,
.backup-range-options label,
.backup-tree label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.backup-section-title input,
.backup-option-grid input,
.backup-range-options input,
.backup-tree input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.backup-option-grid,
.backup-summary,
.backup-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.backup-option-grid label,
.backup-range-options label {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}

.backup-option-grid label.is-unavailable {
  opacity: 0.45;
}

.backup-range-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.backup-tree {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.backup-pick-section {
  display: grid;
  gap: 8px;
}

.backup-picker-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.backup-picker-list label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.backup-picker-list input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
}

.backup-picker-list span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.backup-picker-list strong,
.backup-picker-list small {
  overflow-wrap: anywhere;
}

.backup-tree-category {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.backup-tree-category summary {
  cursor: pointer;
}

.backup-tree-category summary::marker {
  color: var(--teal);
}

.backup-tree-children,
.backup-tree-items {
  display: grid;
  gap: 8px;
  margin: 9px 0 0 26px;
}

.backup-tree-role {
  display: grid;
  gap: 6px;
}

.backup-tree-items {
  margin-top: 0;
}

.backup-empty {
  margin: 0;
  color: var(--muted);
}

.backup-summary > div,
.backup-preview-grid > div {
  display: grid;
  gap: 4px;
  padding: 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.backup-summary span,
.backup-preview-grid span {
  color: var(--muted);
  font-size: 11px;
}

.backup-summary strong,
.backup-preview-grid strong {
  font-size: 13px;
  line-height: 1.5;
}

.backup-version-note {
  color: var(--teal);
}

.backup-import-preview {
  background: var(--yellow-light);
  border-color: var(--yellow);
}

.backup-import-preview h3 {
  margin: 0;
}

.generated-code-result pre {
  max-height: 240px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body.membership-locked main > section:not(.membership-access-notice),
body.membership-locked .deadline-todo-trigger {
  display: none;
}

body.membership-locked #openLifePlanningButton,
body.membership-locked #openSettingsButton,
body.membership-locked [data-open-schedule],
body.membership-locked .mobile-nav a,
body.membership-locked .mobile-nav button:not(.mobile-account):not(.mobile-refresh) {
  display: none !important;
}

body.membership-readonly [data-open-schedule],
body.membership-readonly [data-open-settings],
body.membership-readonly #openSettingsButton,
body.membership-readonly [data-start],
body.membership-readonly [data-confirm-start],
body.membership-readonly #focusStartButton,
body.membership-readonly [data-pause],
body.membership-readonly [data-resume],
body.membership-readonly [data-finish],
body.membership-readonly [data-edit],
body.membership-readonly [data-copy-entry],
body.membership-readonly #addRestBlockButton,
body.membership-readonly #dailyReviewForm button,
body.membership-readonly #syncNowButton,
body.membership-readonly #uploadBackupLabel,
body.membership-readonly #completionDialog [data-edit-actual-metrics],
body.membership-readonly #completionDialog #saveIncompleteButton,
body.membership-readonly #completionDialog #deleteEntryButton,
body.membership-readonly #completionDialog button[type="submit"] {
  display: none !important;
}

@media (max-width: 640px) {
  .backup-option-grid,
  .backup-summary,
  .backup-preview-grid {
    grid-template-columns: 1fr;
  }

  .backup-date-range {
    grid-template-columns: 1fr;
  }

  .backup-date-range span {
    display: none;
  }
}

body.membership-readonly #timeBlockTimeline {
  pointer-events: none;
}

body.membership-readonly .finance-ledger-list [data-remove-finance-item],
body.membership-readonly .finance-ledger-list [data-edit-finance-item],
.finance-ledger-dialog.is-readonly .finance-ledger-entry,
.finance-ledger-dialog.is-readonly .dialog-actions {
  display: none !important;
}

@media (max-width: 980px) {
  .deadline-todo-trigger,
  .deadline-todo-panel {
    display: none;
  }

  .focus-panel {
    grid-template-columns: 1fr auto;
  }

  .focus-actions {
    grid-column: 1 / -1;
  }

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

  .admin-record-list article {
    grid-template-columns: 1fr 1fr;
  }

  .admin-record-list article > div:first-child {
    grid-column: 1 / -1;
  }

  .admin-code-reminder {
    right: 14px;
    bottom: 14px;
    width: calc(100% - 28px);
  }

  .schedule-table-head {
    display: none;
  }

  .schedule-row {
    grid-template-columns: 90px 1fr 1.5fr;
  }

  .schedule-status {
    grid-column: 2;
  }

  .schedule-actions {
    grid-column: 3;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .strategy-fields,
  .revenue-target-card {
    grid-template-columns: 1fr 1fr;
  }

  .strategy-fields > div,
  .revenue-target-result {
    grid-column: 1 / -1;
  }

  .export-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .export-actions {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .export-date-range {
    min-width: 0;
  }

  .export-date-range label,
  .export-date-range input {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 820px) {
  .export-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .export-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .export-actions .primary-button {
    width: 100%;
  }

  .export-actions small {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: calc(100% - 24px);
  }

  .membership-access-notice,
  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .membership-access-actions {
    width: 100%;
    flex-basis: auto;
  }

  .membership-product-summary {
    font-size: 13px;
  }

  .membership-public-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .membership-public-links a {
    min-height: 44px;
    line-height: 44px;
  }

  .admin-toolbar-actions {
    flex-direction: column;
  }

  .admin-code-forms,
  .admin-record-list article,
  .batch-member-row,
  .batch-member-settings,
  .work-mode-cards {
    grid-template-columns: 1fr;
  }

  .topbar {
    min-height: 70px;
  }

  .top-actions {
    display: none;
  }

  .brand-logo {
    width: 54px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 40px 0 28px;
  }

  h1 {
    font-size: 36px;
    line-height: 1.2;
  }

  .date-switcher {
    justify-self: stretch;
    justify-content: space-between;
  }

  .focus-panel {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px;
  }

  .focus-clock {
    min-width: auto;
    text-align: center;
  }

  .focus-clock-label {
    justify-content: center;
  }

  .focus-clock .mobile-ambient-audio-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
  }

  .focus-clock strong {
    font-size: 34px;
  }

  .focus-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 9px;
    margin-top: -6px;
  }

  .focus-actions .focus-ambient-audio-button {
    display: none;
  }

  .focus-actions button {
    width: 100%;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat-card {
    min-height: 140px;
    padding: 17px;
  }

  .stat-card > span {
    margin-bottom: 18px;
  }

  .stat-card strong {
    font-size: 20px;
  }

  .panel {
    padding: 20px;
    border-radius: 20px;
  }

  .schedule-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .heading-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .schedule-row {
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding: 15px;
  }

  .schedule-work,
  .schedule-status,
  .schedule-actions {
    grid-column: 2;
  }

  .schedule-actions {
    justify-content: flex-start;
  }

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

  .time-zone-section {
    padding: 16px;
  }

  .time-zone-summary {
    align-items: center;
    padding: 20px;
  }

  .time-zone-summary h2 {
    font-size: 34px;
    line-height: 1.14;
  }

  .time-zone-summary .section-description {
    font-size: 12px;
  }

  .time-zone-description {
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.65;
  }

  .time-zone-toggle {
    padding: 8px 10px;
  }

  .time-zone-content {
    padding: 0 16px 20px;
  }

  .time-zone-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .time-zone-toolbar button {
    width: 100%;
  }

  .time-zone-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
  }

  .time-comparison-summary {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .time-comparison-summary article {
    padding: 12px;
  }

  .time-comparison-summary strong {
    font-size: 13px;
  }

  .quadrant-chart {
    grid-template-columns: 1fr 1fr;
  }

  .quadrant-cell {
    min-height: 112px;
    padding: 13px;
  }

  .quadrant-cell strong {
    font-size: 23px;
  }

  .time-block-heading {
    display: grid;
  }

  .time-block-heading button {
    width: 100%;
  }

  .time-track {
    height: 126px;
  }

  .planned-track {
    height: 106px;
  }

  .strategy-fields,
  .life-budget-grid,
  .business-finance-grid,
  .revenue-target-card,
  .freedom-projection-list,
  .finance-ledger-entry {
    grid-template-columns: 1fr;
  }

  .strategy-fields > div,
  .revenue-target-result,
  .finance-ledger-entry label:last-child {
    grid-column: auto;
  }

  .budget-fields {
    grid-template-columns: 1fr;
  }

  .star-rating-row {
    grid-template-columns: 1fr;
  }

  .star-rating {
    justify-content: space-between;
  }

  .result-item {
    padding: 15px;
  }

  .result-heading,
  .result-review-grid {
    grid-template-columns: 1fr;
  }

  .result-heading {
    gap: 9px;
  }

  .result-heading .outcome {
    justify-self: start;
  }

  .export-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .export-actions {
    width: 100%;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .export-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .export-date-range {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .export-date-range > span {
    display: none;
  }

  .export-actions small {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
    text-align: left;
  }

  .export-panel button {
    width: 100%;
  }

  .app-dialog {
    width: calc(100% - 18px);
    max-height: calc(100vh - 18px);
    border-radius: 20px;
  }

  .dialog-header,
  .dialog-actions,
  .dialog-body {
    padding: 19px;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .batch-member-submit-hint {
    margin-right: 0;
  }

  .dialog-actions button {
    width: 100%;
  }

  .field-grid.two,
  .field-grid.three,
  .completion-summary,
  .completion-work-mode,
  .actual-clock-inputs {
    grid-template-columns: 1fr;
  }

  .planned-duration {
    grid-template-columns: 1fr;
  }

  .recurrence-panel {
    grid-template-columns: 1fr;
  }

  .recurrence-panel label {
    grid-template-columns: 1fr;
  }

  .recurrence-panel p {
    grid-column: auto;
  }

  .schedule-work-mode-fields,
  .todo-entry-dialog .todo-strategy-section {
    grid-template-columns: 1fr;
  }

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

  .setting-item .setting-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .duration-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .duration-inputs input {
    width: 100%;
  }

  .actual-time-inputs {
    grid-template-columns: 1fr 1fr;
  }

  .note-writing-guide {
    grid-template-columns: 1fr;
  }

  input,
  select {
    min-height: 52px;
    font-size: 16px;
  }

  textarea {
    font-size: 16px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 20;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 7px;
    background: rgba(79, 74, 66, 0.97);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(79, 74, 66, 0.28);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
  }

  .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav a,
  .mobile-nav button {
    display: grid;
    gap: 3px;
    place-items: center;
    flex: 0 0 72px;
    min-height: 48px;
    color: rgba(255, 255, 255, 0.76);
    background: transparent;
    border: 0;
    border-radius: 12px;
    font-size: 10px;
    text-decoration: none;
    scroll-snap-align: start;
  }

  .mobile-nav .mobile-account,
  .mobile-nav [data-open-settings] {
    color: rgba(255, 255, 255, 0.76);
    background: transparent;
  }

  .mobile-nav [data-open-schedule] {
    color: var(--ink);
    background: var(--yellow);
    font-weight: 800;
  }

  .mobile-nav span {
    font-size: 18px;
  }

  .toast {
    right: 18px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    width: min(360px, calc(100vw - 36px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* MVP Design UI/UX focus-first refinement */
body.modal-open {
  overflow: hidden;
}

.today-header {
  display: flex;
  justify-content: flex-end;
  padding: 34px 0 18px;
}

.brand {
  gap: 15px;
  min-width: 0;
}

.brand-logo {
  width: 66px;
  height: 52px;
}

.brand > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand strong {
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.brand .workspace-display-name {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.primary-button {
  background: linear-gradient(135deg, #4a9da8 0%, #347d88 100%);
}

.secondary-button {
  background: linear-gradient(135deg, #f3cf70 0%, #e8b947 100%);
}

.quiet-button,
.account-button {
  background: linear-gradient(135deg, #fffefa 0%, #f8f2e8 100%);
}

.danger-button {
  background: linear-gradient(135deg, #c77868 0%, #aa594d 100%);
}

.focus-panel {
  box-shadow: 0 24px 64px rgba(45, 101, 109, 0.18);
}

.focus-panel.idle {
  background: linear-gradient(135deg, #d8eef0 0%, #f7fbfa 48%, #fff9ed 100%);
}

.focus-panel.running {
  background: linear-gradient(135deg, #428f9a 0%, #296d78 100%);
}

.focus-panel.paused {
  background: linear-gradient(135deg, #f8dfa0 0%, #fff7df 62%, #fffefa 100%);
}

.focus-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: flex-end;
  min-width: min(320px, 100%);
}

.focus-actions .focus-ambient-audio-button {
  grid-column: 1 / -1;
  justify-self: end;
}

.focus-entry-picker {
  display: grid;
  gap: 4px;
  min-width: 260px;
}

.focus-entry-picker span {
  color: inherit;
  font-size: 10px;
  opacity: 0.72;
}

.focus-entry-picker select {
  min-height: 44px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(67, 146, 158, 0.25);
  border-radius: 999px;
}

#focusStartButton.focus-plan-button {
  color: #fff;
  background: linear-gradient(135deg, #4a9da8 0%, #347d88 100%);
  border-color: var(--teal);
}

#focusStartButton.focus-start-button {
  color: var(--ink);
  background: linear-gradient(135deg, #f3cf70 0%, #e8b947 100%);
  border-color: var(--yellow);
}

.collapsible-panel {
  padding: 0;
  overflow: hidden;
}

.collapsible-panel > details > summary {
  list-style: none;
}

.collapsible-panel > details > summary::-webkit-details-marker {
  display: none;
}

.collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px;
  cursor: pointer;
}

.collapsible-summary:hover {
  background: rgba(208, 234, 237, 0.18);
}

.collapsible-summary h2,
.collapsible-summary p {
  margin-bottom: 0;
}

.collapsible-content {
  padding: 0 30px 30px;
}

.collapse-label {
  flex: 0 0 auto;
  padding: 8px 13px;
  color: var(--teal-dark);
  background: #fff;
  border: 1px solid rgba(67, 146, 158, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

details[open] > .collapsible-summary .collapse-label {
  font-size: 0;
}

details[open] > .collapsible-summary .collapse-label::after {
  content: "收合";
  font-size: 12px;
}

.count-badge,
.deadline-todo-trigger strong {
  display: inline-grid;
  min-width: 25px;
  min-height: 25px;
  place-items: center;
  padding: 0 7px;
  color: var(--ink);
  background: linear-gradient(135deg, #f8d77c 0%, #e9bb4b 100%);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.deadline-todo-trigger.has-items strong {
  color: var(--ink);
  background: linear-gradient(135deg, #f8d77c 0%, #e9bb4b 100%);
}

.segmented-toggle,
.deadline-filters {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  background: #f3eee5;
  border-radius: 999px;
}

.segmented-toggle button,
.deadline-filters button {
  min-height: 36px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.segmented-toggle button.active,
.deadline-filters button.active {
  color: #fff;
  background: linear-gradient(135deg, #4a9da8 0%, #347d88 100%);
  box-shadow: 0 7px 16px rgba(54, 127, 138, 0.2);
}

.start-action-button,
.deadline-start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink);
  background: linear-gradient(135deg, #f8d77c 0%, #e9bb4b 100%);
  border: 1px solid rgba(181, 125, 25, 0.22);
  border-radius: 11px;
  font-size: 11px;
  font-weight: 800;
}

.result-execution-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.result-execution-meta > span {
  padding: 7px 10px;
  color: var(--muted);
  background: linear-gradient(135deg, #ffffff 0%, #f7f2e9 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
}

.result-execution-meta strong {
  color: var(--ink);
}

.result-list {
  display: grid;
  gap: 10px;
}

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

.result-time {
  background: linear-gradient(135deg, #f5cf6c 0%, #fff1bd 100%);
  border: 1px solid rgba(181, 125, 25, 0.2);
}

.result-time span::before {
  color: var(--warning);
}

.result-work {
  min-width: 0;
}

.result-work .actual-work-copy {
  color: var(--ink);
  font-weight: 400;
}

.planned-outcome-copy {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.stored-result-details {
  margin-top: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #fffdf8 0%, #fff8e5 100%);
  border: 1px solid rgba(235, 193, 90, 0.32);
  border-radius: 13px;
}

.stored-result-details > summary {
  padding: 11px 13px;
  color: var(--warning);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  list-style-position: inside;
}

.stored-result-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.stored-result-content section {
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 10px;
}

.stored-result-content span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.stored-result-content p {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.add-rest-button {
  margin-bottom: 14px;
}

.time-comparison-summary article:nth-child(3),
.time-comparison-summary article:nth-child(4),
.time-comparison-summary .is-over {
  background: linear-gradient(135deg, #ffffff 0%, #fbf7ef 100%);
  border-color: rgba(79, 74, 66, 0.09);
}

.time-comparison-summary .is-over {
  box-shadow: inset 4px 0 rgba(181, 125, 25, 0.45);
}

.work-mode-cards article.output {
  background: linear-gradient(135deg, #fffdf8 0%, #fffaf0 55%, #f7e8b8 100%);
  border: 1px solid rgba(235, 193, 90, 0.28);
}

.work-mode-cards article.input {
  background: linear-gradient(135deg, #f7fcfc 0%, #e6f3f4 55%, #cce8ec 100%);
  border: 1px solid rgba(67, 146, 158, 0.2);
}

.saved-review {
  overflow: hidden;
}

.saved-review > summary {
  padding: 14px 16px;
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 700;
}

.saved-review > section {
  margin: 0 14px 14px;
}

.app-dialog,
.app-dialog > form {
  max-height: min(90dvh, 760px);
}

.app-dialog > form,
.app-dialog[open]:not(:has(> form)) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.app-dialog .dialog-body {
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.app-dialog .dialog-actions {
  padding-bottom: calc(23px + env(safe-area-inset-bottom, 0px));
}

.compact-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: min(82dvh, 520px);
}

.compact-dialog[open]:not(:has(> form)) {
  grid-template-rows: auto auto auto;
  max-height: min(82dvh, 520px);
}

.compact-dialog .dialog-body {
  max-height: min(44dvh, 260px);
}

.todo-entry-dialog {
  width: min(840px, calc(100% - 32px));
  max-height: min(88dvh, 760px);
}

.todo-entry-dialog .dialog-body {
  max-height: none;
  gap: 24px;
}

.todo-entry-dialog .field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.todo-entry-dialog .todo-form-section {
  display: grid;
  min-width: 0;
}

.todo-entry-dialog .todo-strategy-section {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(420px, 1.55fr);
  align-items: center;
  gap: 16px;
  padding: 18px 18px 20px;
  background: linear-gradient(135deg, rgba(208, 234, 237, 0.82) 0%, rgba(255, 251, 242, 0.88) 100%);
  border: 1px solid rgba(67, 146, 158, 0.08);
  border-radius: 18px;
}

.todo-entry-dialog .todo-strategy-section::before {
  color: var(--ink);
  content: "工作屬性";
  font-size: 15px;
  font-weight: 700;
  justify-self: center;
  text-align: center;
}

.todo-entry-dialog .todo-summary-section {
  margin-top: 14px;
  padding-top: 26px;
  border-top: 1px dashed rgba(79, 74, 66, 0.18);
}

.todo-entry-dialog .strategy-fields.compact {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin: 0;
  padding: 0;
  background: transparent;
}

.todo-entry-dialog .strategy-fields.compact label {
  margin: 0;
}

.todo-entry-dialog .strategy-fields.compact label {
  min-width: 0;
}

.todo-entry-dialog .strategy-fields.compact select {
  min-height: 54px;
}

.todo-entry-dialog .todo-summary-field {
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.todo-entry-dialog textarea {
  min-height: 120px;
}

.idea-entry-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: min(82dvh, 560px);
}

.idea-entry-dialog .dialog-body {
  max-height: none;
}

.idea-entry-dialog textarea {
  min-height: 180px;
}

.confirm-work-description {
  margin: 0;
  padding: 18px;
  background: linear-gradient(135deg, #eef8f9 0%, #fffaf0 100%);
  border-radius: 16px;
  line-height: 1.7;
}

.mobile-settings-actions {
  gap: 10px;
}

.mobile-settings-actions button {
  width: 100%;
}

.toast {
  inset: auto 24px 24px auto;
  max-height: none;
  overflow: visible;
  isolation: isolate;
}

.deadline-todo-panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.deadline-filters {
  margin: 12px 14px 0;
}

.deadline-filters button {
  flex: 1;
}

.deadline-todo-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
}

.deadline-todo-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.deadline-todo-copy > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.deadline-panel-note {
  margin: 0;
  padding: 12px 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
}

.export-actions,
.export-date-range,
.export-date-range label,
.export-date-range input {
  min-width: 0;
}

.export-presets button,
.export-panel .primary-button {
  white-space: nowrap;
}

@media screen and (max-width: 1180px) {
  .tool-orb-cluster {
    top: auto;
    right: 18px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .tool-orb-main.deadline-todo-trigger {
    top: auto;
    right: auto;
    bottom: auto;
  }

  .export-panel {
    align-items: start;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  }

  .export-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .export-date-range {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
  }

  .export-date-range input {
    min-height: 48px;
    padding-inline: 12px;
    font-size: clamp(14px, 1.35vw, 16px);
    text-align: center;
  }

  .export-actions > .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media screen and (max-width: 980px) {
  .deadline-todo-trigger {
    display: grid;
    top: auto;
    right: 14px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .deadline-todo-panel {
    display: grid;
    top: auto;
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: auto;
    max-height: min(72dvh, 620px);
    border-radius: 24px;
  }

  .export-panel {
    grid-template-columns: 1fr;
  }

  .export-actions {
    grid-template-columns: 1fr;
  }

  .export-actions > .primary-button {
    grid-column: 1;
  }
}

@media screen and (max-width: 820px) {
  .export-actions {
    grid-template-columns: 1fr;
  }

  .export-actions > .primary-button {
    grid-column: auto;
  }
}

@media screen and (max-width: 680px) {
  .topbar {
    padding: 7px 0;
  }

  .brand {
    gap: 11px;
  }

  .brand-logo {
    width: 52px;
    height: 43px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand .workspace-display-name {
    font-size: 10px;
  }

  .today-header {
    justify-content: stretch;
    padding: 24px 0 14px;
  }

  .date-switcher {
    width: 100%;
  }

  .focus-actions {
    min-width: 0;
  }

  .focus-entry-picker {
    min-width: 0;
  }

  .collapsible-summary {
    align-items: flex-start;
    padding: 20px;
  }

  .collapsible-content {
    padding: 0 20px 20px;
  }

  .collapse-label {
    padding: 7px 10px;
  }

  .schedule-heading {
    gap: 12px;
  }

  .segmented-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

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

  .stored-result-content {
    grid-template-columns: 1fr;
  }

  .deadline-start-button {
    width: 100%;
  }

  .export-date-range {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .export-date-range label,
  .export-date-range input {
    max-width: 100%;
  }

  .export-date-range input {
    min-height: 52px;
    font-size: 16px;
    text-align: center;
  }

  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
    background: linear-gradient(135deg, rgba(74, 157, 168, 0.97), rgba(52, 125, 136, 0.98));
  }

  .mobile-nav a,
  .mobile-nav button {
    min-width: 0;
    min-height: 52px;
    color: #fff;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .mobile-nav a:active,
  .mobile-nav button:active {
    color: var(--ink);
    background: linear-gradient(135deg, #f8d77c 0%, #e9bb4b 100%);
    transform: scale(0.97);
  }

  .mobile-nav [data-open-schedule] {
    color: #fff;
    background: transparent;
  }

  .toast {
    right: 12px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 24px);
  }

  .app-dialog,
  .app-dialog > form {
    max-height: calc(100dvh - 18px);
  }
}

@media (display-mode: standalone) and (hover: hover) and (pointer: fine) {
  .focus-panel {
    grid-template-columns: minmax(0, 1.5fr) auto auto;
    gap: 28px;
    padding: 30px;
  }

  .focus-clock {
    min-width: 220px;
    text-align: center;
  }

  .focus-clock .mobile-ambient-audio-button {
    display: none;
  }

  .focus-actions {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: min(320px, 100%);
    margin-top: 0;
  }

  .focus-actions .focus-ambient-audio-button {
    display: inline-grid;
  }

  .focus-actions button {
    width: auto;
  }

  .compact-dialog {
    width: min(520px, calc(100% - 32px));
    max-height: min(82dvh, 520px);
  }

  .compact-dialog .dialog-body {
    max-height: min(44dvh, 260px);
  }

  .compact-dialog .dialog-actions {
    display: flex;
    justify-content: flex-end;
  }

  .compact-dialog .dialog-actions button {
    width: auto;
  }
}

@media print {
  @page {
    size: A4;
    margin: 13mm;
  }

  html,
  body {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: auto !important;
    overflow: visible !important;
  }

  html {
    background: #fff !important;
  }

  body {
    color: #332f2a;
    background: #fff !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body > .app-shell,
  body > .toast,
  body > dialog,
  body > .mobile-nav {
    display: none !important;
  }

  .print-report {
    display: block;
    width: 184mm;
    max-width: 184mm;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: visible;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  }

  .print-report * {
    box-sizing: border-box;
  }

  .print-report,
  .print-overview-page,
  .print-day-page {
    background: #fff !important;
    background-image: none !important;
  }

  .print-overview-page,
  .print-day-page {
    width: 100%;
    max-width: 100%;
    min-height: 265mm;
    overflow: visible;
  }

  .print-day-page {
    break-before: page;
    page-break-before: always;
  }

  .print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--teal);
  }

  .print-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .print-brand img {
    width: 54px;
    height: 38px;
    object-fit: contain;
  }

  .print-brand strong,
  .print-brand span,
  .print-date span,
  .print-date strong {
    display: block;
  }

  .print-brand strong {
    font-size: 15px;
  }

  .print-brand span,
  .print-date span {
    color: #746d64;
    font-size: 9px;
  }

  .print-date {
    text-align: right;
  }

  .print-date strong {
    margin-top: 4px;
    font-size: 13px;
  }

  .print-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0;
  }

  .print-summary div {
    padding: 11px;
    background: var(--yellow-light);
    border-radius: 8px;
  }

  .print-summary span,
  .print-summary strong {
    display: block;
  }

  .print-summary span {
    margin-bottom: 5px;
    color: #746d64;
    font-size: 8px;
  }

  .print-summary strong {
    font-size: 11px;
  }

  .print-quadrant-section {
    margin: 16px 0;
    break-inside: avoid;
  }

  .print-quadrant-section h2 {
    margin-bottom: 8px;
    color: var(--teal-dark);
    font-size: 14px;
  }

  .print-work-mode-bar {
    display: flex;
    height: 7px;
    margin-bottom: 8px;
    overflow: hidden;
    background: #eee8de;
    border-radius: 999px;
  }

  .print-work-mode-bar .output {
    background: #e7bd4d;
  }

  .print-work-mode-bar .input {
    background: #4a919d;
  }

  .print-work-mode-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
    margin-bottom: 8px;
  }

  .print-work-mode-cards article {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 3px 8px;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .print-work-mode-cards article.output {
    background: #fff4cf;
  }

  .print-work-mode-cards article.input {
    background: #e5f4f6;
  }

  .print-work-mode-cards span {
    color: #746d64;
    font-size: 8px;
    font-weight: 700;
  }

  .print-work-mode-cards strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    font-size: 17px;
  }

  .print-work-mode-cards small {
    color: #746d64;
    font-size: 8px;
  }

  .print-unclassified-work {
    margin: -2px 0 8px;
    color: #746d64;
    font-size: 7px;
  }

  .print-quadrant-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
  }

  .print-quadrant-grid article {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 7px;
  }

  .print-quadrant-grid article.core {
    background: #e2f1e2;
  }

  .print-quadrant-grid article.cash {
    background: var(--yellow-light);
  }

  .print-quadrant-grid article.growth {
    background: var(--teal-light);
  }

  .print-quadrant-grid article.drain {
    background: #f4e3df;
  }

  .print-quadrant-grid span,
  .print-quadrant-grid strong,
  .print-quadrant-grid small {
    font-size: 8px;
  }

  .print-quadrant-grid strong {
    font-size: 10px;
  }

  .print-allocation-score {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding: 9px 11px;
    background: #f7f2e9;
    border-left: 4px solid var(--yellow);
    border-radius: 7px;
  }

  .print-allocation-score div span,
  .print-allocation-score div strong {
    display: block;
  }

  .print-allocation-score div span {
    color: #746d64;
    font-size: 7px;
  }

  .print-allocation-score div strong {
    font-size: 13px;
  }

  .print-allocation-score p {
    margin: 0;
    color: #746d64;
    font-size: 8px;
    line-height: 1.5;
  }

  .print-allocation-score p strong {
    display: block;
    color: var(--ink);
    font-size: 9px;
  }

  .print-report-title {
    padding: 36px 0 24px;
    text-align: center;
  }

  .print-report-title span {
    color: var(--teal-dark);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.18em;
  }

  .print-report-title h1 {
    margin: 8px 0;
    font-size: 25px;
  }

  .print-report-title p {
    margin: 0;
    color: #746d64;
    font-size: 10px;
  }

  .print-insights,
  .print-project-summary {
    margin-top: 22px;
  }

  .print-insights h2,
  .print-project-summary h2 {
    margin-bottom: 9px;
    color: var(--teal-dark);
    font-size: 15px;
  }

  .print-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .print-insight-grid article {
    padding: 13px;
    background: #f7f2e9;
    border-left: 4px solid var(--yellow);
  }

  .print-insight-grid span,
  .print-insight-grid strong {
    display: block;
  }

  .print-insight-grid span {
    color: #746d64;
    font-size: 8px;
  }

  .print-insight-grid strong {
    margin: 5px 0;
    font-size: 12px;
  }

  .print-insight-grid p {
    margin: 0;
    color: #746d64;
    font-size: 8px;
  }

  .print-project-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .print-project-summary h2 {
    grid-column: 1 / -1;
  }

  .print-project-summary div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    background: var(--teal-light);
    border-radius: 7px;
    font-size: 9px;
  }

  .print-section {
    margin-top: 18px;
    break-inside: avoid;
  }

  .print-section h2 {
    margin-bottom: 9px;
    color: var(--teal-dark);
    font-size: 15px;
  }

  .print-section table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8px;
  }

  .print-section th,
  .print-section td {
    padding: 7px;
    border: 1px solid #ddd4c8;
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
  }

  .print-section th {
    background: var(--teal-light);
  }

  .print-result-table th {
    background: var(--yellow-light);
  }

  .print-section table strong {
    font-size: 8px;
  }

  .print-work-review {
    break-inside: auto;
  }

  .print-results {
    display: grid;
    gap: 7px;
  }

  .print-results article {
    padding: 10px;
    background: var(--yellow-light);
    border-radius: 8px;
    break-inside: avoid;
  }

  .print-results span,
  .print-results strong,
  .print-results small {
    display: block;
  }

  .print-results span,
  .print-results small {
    color: #746d64;
    font-size: 8px;
  }

  .print-results strong {
    margin: 4px 0;
    font-size: 10px;
  }

  .print-results p,
  .print-review p {
    margin: 4px 0 0;
    font-size: 9px;
    line-height: 1.6;
    white-space: pre-wrap;
  }

  .print-results dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 0;
  }

  .print-results dl div {
    padding: 6px;
    background: #fff;
    border-radius: 5px;
  }

  .print-results dt {
    color: #746d64;
    font-size: 7px;
    font-weight: 800;
  }

  .print-results dd {
    margin: 3px 0 0;
    font-size: 8px;
    line-height: 1.5;
    white-space: pre-wrap;
  }

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

  .print-review h2 {
    grid-column: 1 / -1;
  }

  .print-review div {
    padding: 11px;
    background: #f7f2e9;
    border-left: 4px solid var(--yellow);
  }

  .print-review span {
    color: #746d64;
    font-size: 8px;
    font-weight: 800;
  }

  .print-rest-list {
    display: grid;
    gap: 7px;
  }

  .print-rest-list article {
    padding: 10px;
    background: #eee3d7;
    border-left: 4px solid var(--latte);
    break-inside: avoid;
  }

  .print-rest-list span,
  .print-rest-list strong {
    display: block;
  }

  .print-rest-list span {
    color: #746d64;
    font-size: 8px;
  }

  .print-rest-list strong {
    margin-top: 4px;
    font-size: 10px;
  }

  .print-rest-list dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 8px 0;
  }

  .print-rest-list dl div {
    padding: 6px;
    background: rgba(255, 255, 255, 0.7);
  }

  .print-rest-list dt {
    color: #746d64;
    font-size: 7px;
  }

  .print-rest-list dd,
  .print-rest-list p {
    margin: 3px 0 0;
    font-size: 8px;
    line-height: 1.5;
  }

  .print-empty {
    padding: 10px;
    color: #746d64;
    background: #f7f2e9;
    font-size: 9px;
  }

  .print-footer {
    margin-top: 22px;
    padding-top: 9px;
    color: #746d64;
    border-top: 1px solid #ddd4c8;
    font-size: 8px;
    text-align: center;
  }
}

/* OpenDesign desktop-first polish v2: preserve brand palette, reduce visible grid */
html {
  max-width: 100vw;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100vw;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 0%, rgba(208, 234, 237, 0.85), transparent 25rem),
    var(--paper);
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

@media screen and (min-width: 981px) {
  .app-shell {
    width: min(1280px, calc(100% - 48px));
  }

  .topbar {
    position: sticky;
    z-index: 12;
    top: 0;
    min-height: 78px;
    background: rgba(255, 251, 242, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .top-actions .quiet-button,
  .account-button {
    background: rgba(255, 254, 250, 0.82);
    border-color: rgba(229, 220, 209, 0.82);
    box-shadow: 0 8px 22px rgba(79, 74, 66, 0.045);
  }

  .today-header {
    padding: 34px 0 18px;
  }

  .date-switcher {
    background: linear-gradient(135deg, rgba(235, 193, 90, 0.95), rgba(250, 240, 208, 0.95));
    border: 1px solid rgba(235, 193, 90, 0.28);
    box-shadow: 0 14px 34px rgba(79, 74, 66, 0.075);
  }

  .focus-panel {
    grid-template-columns: minmax(0, 1.42fr) minmax(220px, auto) minmax(300px, auto);
    gap: 26px;
    min-height: 198px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 26px;
    box-shadow: 0 24px 58px rgba(45, 101, 109, 0.16);
  }

  .focus-panel.idle {
    background: linear-gradient(135deg, #d8eef0 0%, #f7fbfa 48%, #fff9ed 100%);
  }

  .focus-panel.running {
    background: linear-gradient(135deg, #428f9a 0%, #296d78 100%);
  }

  .focus-panel.paused {
    background: linear-gradient(135deg, #f8dfa0 0%, #fff7df 62%, #fffefa 100%);
  }

  .focus-clock,
  .focus-actions {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
  }

  .focus-clock {
    min-width: 220px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.14);
  }

  .focus-panel.idle .focus-clock,
  .focus-panel.paused .focus-clock,
  .focus-panel.idle .focus-actions,
  .focus-panel.paused .focus-actions {
    background: rgba(255, 254, 250, 0.58);
    border-color: rgba(67, 146, 158, 0.12);
  }

  .focus-clock strong {
    font-size: 40px;
  }

  .focus-actions {
    justify-self: stretch;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.12);
  }

  .focus-entry-picker {
    min-width: 0;
  }

  .focus-entry-picker select {
    width: 100%;
  }

  .panel,
  .collapsible-panel,
  .time-zone-panel {
    border-color: rgba(79, 74, 66, 0.09);
    box-shadow: 0 18px 46px rgba(79, 74, 66, 0.075);
  }

  .collapsible-summary,
  .time-zone-summary {
    padding: 28px 30px;
  }

  .collapse-label,
  .time-zone-toggle {
    background: rgba(255, 254, 250, 0.86);
    border-color: rgba(67, 146, 158, 0.18);
  }

  .schedule-table-wrap {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .schedule-table-head,
  .schedule-row {
    grid-template-columns: 120px minmax(170px, 1.05fr) minmax(280px, 1.8fr) 140px 150px;
    gap: 18px;
  }

  .schedule-table-head {
    padding: 0 18px 10px;
    color: var(--muted);
    letter-spacing: 0.08em;
  }

  .schedule-row {
    background: rgba(255, 254, 250, 0.78);
    border: 1px solid rgba(229, 220, 209, 0.68);
    box-shadow: 0 10px 26px rgba(79, 74, 66, 0.045);
  }

  .schedule-row:hover {
    background: rgba(255, 254, 250, 0.96);
    border-color: rgba(67, 146, 158, 0.32);
    box-shadow: 0 16px 34px rgba(67, 92, 96, 0.1);
  }

  .schedule-row.is-active {
    border-color: rgba(67, 146, 158, 0.55);
    box-shadow: inset 5px 0 var(--teal), 0 14px 30px rgba(67, 92, 96, 0.1);
  }

  .schedule-time {
    background: rgba(208, 234, 237, 0.82);
    border: 1px solid rgba(67, 146, 158, 0.12);
  }

  .time-zone-section {
    background: rgba(255, 254, 250, 0.72);
    border-color: rgba(229, 220, 209, 0.72);
  }

  .export-panel {
    background: linear-gradient(135deg, #2f7783 0%, #43929e 52%, #79b8bd 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 22px 54px rgba(45, 101, 109, 0.17);
  }

  .export-panel .primary-button,
  .secondary-button,
  .start-action-button,
  .deadline-start-button {
    background: linear-gradient(135deg, #f3cf70 0%, #e8b947 100%);
  }

  .deadline-todo-trigger,
  .deadline-todo-panel {
    background: rgba(255, 254, 250, 0.94);
    border-color: rgba(229, 220, 209, 0.78);
  }
}

/* OpenDesign focus panel frame softening v3 */
@media screen and (min-width: 981px) {
  .focus-clock,
  .focus-actions {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  .focus-panel.idle .focus-clock,
  .focus-panel.paused .focus-clock,
  .focus-panel.idle .focus-actions,
  .focus-panel.paused .focus-actions {
    background: rgba(255, 254, 250, 0.24);
    border-color: transparent;
    box-shadow: none;
  }

  .focus-panel.running .focus-clock,
  .focus-panel.running .focus-actions {
    background: rgba(255, 255, 255, 0.08);
    border-color: transparent;
    box-shadow: none;
  }

  .focus-clock {
    padding: 10px 8px;
  }

  .focus-actions {
    padding: 10px 0 10px 12px;
  }

  .focus-entry-picker select {
    background: rgba(255, 254, 250, 0.82);
    border-color: rgba(67, 146, 158, 0.2);
  }

  .focus-panel.running .focus-entry-picker select {
    background: rgba(255, 255, 255, 0.9);
  }

  .focus-panel .ambient-audio-button {
    background: rgba(255, 254, 250, 0.58);
    border-color: rgba(67, 146, 158, 0.22);
    box-shadow: 0 8px 18px rgba(45, 101, 109, 0.08);
  }

  .focus-panel.running .ambient-audio-button {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.28);
  }
}

/* OpenDesign color/alignment refinement v4 */
@media screen and (min-width: 981px) {
  .focus-clock,
  .focus-actions,
  .focus-panel.idle .focus-clock,
  .focus-panel.paused .focus-clock,
  .focus-panel.running .focus-clock,
  .focus-panel.idle .focus-actions,
  .focus-panel.paused .focus-actions,
  .focus-panel.running .focus-actions {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  .focus-panel .ambient-audio-button,
  .focus-panel .ambient-audio-button.playing,
  .focus-panel.running .ambient-audio-button,
  .focus-panel.running .ambient-audio-button.playing {
    color: var(--teal-dark);
    background: rgba(255, 254, 250, 0.46);
    border-color: rgba(67, 146, 158, 0.22);
    box-shadow: none;
  }

  .focus-panel.running .ambient-audio-button,
  .focus-panel.running .ambient-audio-button.playing {
    color: #e7f5f6;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.26);
  }

  .focus-panel .ambient-icon {
    color: currentColor;
    opacity: 1;
    visibility: visible;
  }

  .segmented-toggle button.active#showPlanViewButton {
    background: linear-gradient(135deg, #4a9da8 0%, #347d88 100%);
    color: #fff;
  }

  .segmented-toggle button.active#showResultViewButton {
    background: linear-gradient(135deg, #f4d36f 0%, #e6b844 100%);
    color: var(--ink);
  }

  .schedule-time {
    background: linear-gradient(135deg, #cfe9ee 0%, #e9f6f8 100%);
    border-color: rgba(67, 146, 158, 0.18);
  }

  .result-table-wrap .schedule-row,
  .result-row {
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 252, 242, 0.94) 0%, rgba(255, 246, 220, 0.9) 100%);
  }

  .result-table-wrap .schedule-row:hover,
  .result-row:hover {
    background: linear-gradient(135deg, rgba(255, 253, 246, 0.98) 0%, rgba(255, 242, 204, 0.96) 100%);
    border-color: rgba(235, 193, 90, 0.38);
    box-shadow: 0 16px 34px rgba(181, 125, 25, 0.09);
  }

  .result-time {
    align-self: center;
    background: linear-gradient(135deg, #f7d978 0%, #fff0b8 100%);
    border: 1px solid rgba(181, 125, 25, 0.18);
  }

  .result-table-wrap .schedule-project,
  .result-table-wrap .schedule-status,
  .result-table-wrap .schedule-actions,
  .result-row .schedule-project,
  .result-row .schedule-status,
  .result-row .schedule-actions {
    align-self: center;
  }

  .result-table-wrap .schedule-status,
  .result-row .schedule-status {
    justify-content: center;
  }

  .result-table-wrap .schedule-actions,
  .result-row .schedule-actions {
    align-items: center;
  }

  .result-table-wrap .status-pill,
  .result-row .status-pill {
    margin-bottom: 6px;
  }

  .planned-time-zone .time-zone-section-heading,
  .planned-time-zone .time-zone-kicker {
    color: var(--teal-dark);
  }

  .actual-time-zone .time-zone-section-heading,
  .actual-time-zone .time-zone-kicker {
    color: var(--warning);
  }
}

/* OpenDesign brand gradient refinement v5 */
:root {
  --brand-cream: #fffbf2;
  --brand-coffee: #4f4a42;
  --brand-yellow: #ebc15a;
  --brand-teal: #43929e;
  --brand-latte: #d1bba5;
  --brand-blue-soft: #dff2f4;
  --brand-yellow-soft: #fff1bd;
}

@media screen and (max-width: 980px) {
  #planView .schedule-row {
    background: linear-gradient(135deg, rgba(223, 242, 244, 0.72) 0%, rgba(255, 251, 242, 0.9) 62%, rgba(208, 234, 237, 0.58) 100%);
    border-color: rgba(67, 146, 158, 0.16);
  }

  #planView .schedule-time {
    background: linear-gradient(135deg, #d2edf1 0%, #e9f7f8 58%, #c8e7ec 100%);
    border-color: rgba(67, 146, 158, 0.2);
  }

  .result-table-wrap .schedule-row,
  .result-row {
    background: linear-gradient(135deg, rgba(255, 246, 210, 0.84) 0%, rgba(255, 251, 242, 0.92) 54%, rgba(250, 224, 150, 0.62) 100%);
    border-color: rgba(235, 193, 90, 0.26);
  }

  .result-time {
    background: linear-gradient(135deg, #f7d978 0%, #fff1bd 55%, #ebc15a 100%);
    border-color: rgba(181, 125, 25, 0.22);
  }

  .actual-time-zone {
    background: linear-gradient(135deg, rgba(255, 246, 210, 0.78) 0%, rgba(255, 251, 242, 0.9) 100%);
    border-color: rgba(235, 193, 90, 0.26);
  }

  .actual-time-zone .time-zone-kicker,
  .actual-time-zone .time-zone-section-heading h3 {
    color: #b57d19;
  }

  .planned-time-zone {
    background: linear-gradient(135deg, rgba(223, 242, 244, 0.76) 0%, rgba(255, 251, 242, 0.9) 100%);
    border-color: rgba(67, 146, 158, 0.2);
  }

  .planned-time-zone .time-zone-kicker,
  .planned-time-zone .time-zone-section-heading h3 {
    color: var(--brand-teal);
  }

  .time-block.output,
  .planned-time-block.output,
  .work-mode-cards article.output {
    color: #fff;
    background: linear-gradient(135deg, #efc85f 0%, #d7a93f 58%, #bd852a 100%);
    border-color: rgba(181, 125, 25, 0.32);
  }

  .time-block.input,
  .planned-time-block.input,
  .work-mode-cards article.input {
    color: #fff;
    background: linear-gradient(135deg, #5faab4 0%, #43929e 58%, #2f7783 100%);
    border-color: rgba(67, 146, 158, 0.34);
  }

  .time-block.rest,
  .time-block-legend .rest {
    background: linear-gradient(135deg, #ded0bd 0%, #d1bba5 58%, #bfa88f 100%);
  }

  .deadline-todo-item.overdue {
    border-left-color: #9b968f;
    background: linear-gradient(135deg, #fffefa 0%, #e8e5df 48%, #fffefa 100%);
  }

  .deadline-todo-item.upcoming {
    border-left-color: #43929e;
    background: linear-gradient(135deg, rgba(220, 242, 245, 0.92) 0%, rgba(255, 251, 242, 0.9) 78%);
  }

  .deadline-todo-item.priority,
  .deadline-todo-item.today,
  .deadline-todo-item.soon {
    border-left-color: #ebc15a;
    background: linear-gradient(135deg, rgba(255, 239, 184, 0.96) 0%, rgba(255, 251, 242, 0.9) 76%);
  }

  .deadline-todo-item.overdue .deadline-urgency {
    color: #8b8780 !important;
  }

  .deadline-todo-item.upcoming .deadline-urgency {
    color: #347f8a !important;
  }

  .deadline-todo-item.priority .deadline-urgency,
  .deadline-todo-item.today .deadline-urgency,
  .deadline-todo-item.soon .deadline-urgency {
    color: #b57d19 !important;
  }
}

@media screen and (min-width: 981px) {
  body {
    color: var(--brand-coffee);
    background:
      radial-gradient(circle at 88% 0%, rgba(67, 146, 158, 0.18), transparent 28rem),
      radial-gradient(circle at 8% 18%, rgba(235, 193, 90, 0.18), transparent 26rem),
      linear-gradient(135deg, #fffbf2 0%, #f9f4e8 40%, #eaf5f4 100%);
  }

  .topbar {
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
    padding-right: max(24px, calc((100vw - 1280px) / 2));
    padding-left: max(24px, calc((100vw - 1280px) / 2));
    background:
      linear-gradient(90deg, rgba(255, 251, 242, 0.96) 0%, rgba(255, 248, 226, 0.9) 42%, rgba(226, 242, 241, 0.94) 100%);
    border-bottom: 1px solid rgba(79, 74, 66, 0.14);
    box-shadow: 0 10px 32px rgba(79, 74, 66, 0.055);
  }

  .panel,
  .collapsible-panel,
  .time-zone-panel,
  .export-panel,
  .focus-panel {
    box-shadow:
      0 22px 58px rgba(79, 74, 66, 0.09),
      0 1px 0 rgba(255, 255, 255, 0.72) inset;
  }

  .focus-panel {
    border: 1px solid rgba(255, 255, 255, 0.36);
  }

  .focus-panel.idle {
    background:
      linear-gradient(135deg, rgba(223, 242, 244, 0.96) 0%, rgba(255, 251, 242, 0.96) 58%, rgba(255, 241, 189, 0.72) 100%);
  }

  .focus-panel.running {
    background: linear-gradient(135deg, #43929e 0%, #377f89 54%, #2f6c76 100%);
  }

  .focus-panel.paused {
    background:
      linear-gradient(135deg, rgba(235, 193, 90, 0.55) 0%, rgba(255, 251, 242, 0.95) 58%, rgba(255, 241, 189, 0.72) 100%);
  }

  .focus-clock,
  .focus-actions,
  .focus-panel.idle .focus-clock,
  .focus-panel.paused .focus-clock,
  .focus-panel.running .focus-clock,
  .focus-panel.idle .focus-actions,
  .focus-panel.paused .focus-actions,
  .focus-panel.running .focus-actions {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  .date-switcher,
  .export-panel .primary-button,
  .start-action-button,
  .deadline-start-button {
    background: linear-gradient(135deg, #f6d56f 0%, #ebc15a 62%, #dca941 100%);
    border-color: rgba(181, 125, 25, 0.22);
  }

  .segmented-toggle button.active#showPlanViewButton {
    color: #fff;
    background: linear-gradient(135deg, #5da8b2 0%, #43929e 58%, #347f8a 100%);
  }

  .segmented-toggle button.active#showResultViewButton {
    color: var(--brand-coffee);
    background: linear-gradient(135deg, #f6d56f 0%, #ebc15a 62%, #dca941 100%);
  }

  #planView .schedule-row {
    background: linear-gradient(135deg, rgba(223, 242, 244, 0.72) 0%, rgba(255, 251, 242, 0.9) 62%, rgba(208, 234, 237, 0.58) 100%);
    border-color: rgba(67, 146, 158, 0.16);
  }

  #planView .schedule-row:hover {
    background: linear-gradient(135deg, rgba(223, 242, 244, 0.88) 0%, rgba(255, 251, 242, 0.96) 58%, rgba(208, 234, 237, 0.72) 100%);
    border-color: rgba(67, 146, 158, 0.34);
  }

  #planView .schedule-time {
    background: linear-gradient(135deg, #d2edf1 0%, #e9f7f8 58%, #c8e7ec 100%);
    border-color: rgba(67, 146, 158, 0.2);
  }

  .result-table-wrap .schedule-row,
  .result-row {
    background: linear-gradient(135deg, rgba(255, 246, 210, 0.84) 0%, rgba(255, 251, 242, 0.92) 54%, rgba(250, 224, 150, 0.62) 100%);
    border-color: rgba(235, 193, 90, 0.26);
  }

  .result-table-wrap .schedule-row:hover,
  .result-row:hover {
    background: linear-gradient(135deg, rgba(255, 242, 196, 0.9) 0%, rgba(255, 251, 242, 0.98) 52%, rgba(245, 211, 116, 0.72) 100%);
    border-color: rgba(235, 193, 90, 0.44);
  }

  .result-time {
    background: linear-gradient(135deg, #f7d978 0%, #fff1bd 55%, #ebc15a 100%);
    border-color: rgba(181, 125, 25, 0.22);
  }

  .actual-time-zone {
    background: linear-gradient(135deg, rgba(255, 246, 210, 0.78) 0%, rgba(255, 251, 242, 0.9) 100%);
    border-color: rgba(235, 193, 90, 0.26);
  }

  .actual-time-zone .time-zone-kicker,
  .actual-time-zone .time-zone-section-heading h3 {
    color: #b57d19;
  }

  .planned-time-zone {
    background: linear-gradient(135deg, rgba(223, 242, 244, 0.76) 0%, rgba(255, 251, 242, 0.9) 100%);
    border-color: rgba(67, 146, 158, 0.2);
  }

  .planned-time-zone .time-zone-kicker,
  .planned-time-zone .time-zone-section-heading h3 {
    color: var(--brand-teal);
  }

  .quadrant-cell.core {
    background: linear-gradient(135deg, rgba(223, 242, 244, 0.9) 0%, rgba(255, 251, 242, 0.92) 100%);
  }

  .quadrant-cell.cash {
    background: linear-gradient(135deg, rgba(255, 241, 189, 0.96) 0%, rgba(255, 251, 242, 0.92) 100%);
  }

  .quadrant-cell.growth {
    background: linear-gradient(135deg, rgba(208, 234, 237, 0.95) 0%, rgba(255, 251, 242, 0.9) 100%);
  }

  .quadrant-cell.drain {
    background: linear-gradient(135deg, rgba(209, 187, 165, 0.38) 0%, rgba(255, 251, 242, 0.94) 72%, rgba(185, 103, 88, 0.12) 100%);
  }

  .time-block.output,
  .planned-time-block.output,
  .work-mode-cards article.output {
    background: linear-gradient(135deg, #f6d56f 0%, #ebc15a 60%, #dca941 100%);
  }

  .time-block.input,
  .planned-time-block.input,
  .work-mode-cards article.input {
    background: linear-gradient(135deg, #5da8b2 0%, #43929e 58%, #347f8a 100%);
  }

  .focus-panel .ambient-audio-button.playing,
  .focus-panel.running .ambient-audio-button.playing {
    color: #fff;
    background: linear-gradient(135deg, #5da8b2 0%, #43929e 58%, #347f8a 100%);
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 10px 24px rgba(67, 146, 158, 0.28);
  }

  .ambient-audio-button.playing .ambient-icon {
    animation: ambient-note-wiggle 950ms ease-in-out infinite;
    transform-origin: 50% 70%;
  }
}

@keyframes ambient-note-wiggle {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-1.5px) rotate(-6deg); }
  50% { transform: translateX(1.5px) rotate(5deg); }
  75% { transform: translateX(-1px) rotate(-3deg); }
}

/* OpenDesign app-depth and dialog polish v6 */
@media screen and (min-width: 981px) {
  body {
    background:
      radial-gradient(circle at 18% 16%, rgba(235, 193, 90, 0.18), transparent 30rem),
      radial-gradient(circle at 86% 8%, rgba(67, 146, 158, 0.18), transparent 32rem),
      radial-gradient(circle at 74% 72%, rgba(67, 146, 158, 0.08), transparent 34rem),
      linear-gradient(135deg, #fffbf2 0%, #fff8e7 38%, #f8f2e8 62%, #eaf5f4 100%);
  }

  .topbar {
    background: linear-gradient(90deg, rgba(255, 251, 242, 0.72), rgba(255, 248, 231, 0.66), rgba(234, 245, 244, 0.72));
    border-bottom: 1px dashed rgba(79, 74, 66, 0.22);
    box-shadow: none;
  }

  .topbar::after {
    content: "";
    position: absolute;
    right: max(24px, calc((100vw - 1280px) / 2));
    bottom: -1px;
    left: max(24px, calc((100vw - 1280px) / 2));
    height: 1px;
    background: linear-gradient(90deg, rgba(235, 193, 90, 0.32), rgba(67, 146, 158, 0.32));
    opacity: 0.45;
    pointer-events: none;
  }

  .focus-panel,
  .collapsible-panel,
  .time-zone-panel,
  .export-panel,
  .membership-access-notice {
    border-color: rgba(255, 255, 255, 0.54);
    box-shadow:
      0 26px 70px rgba(79, 74, 66, 0.1),
      0 12px 28px rgba(67, 146, 158, 0.055),
      inset 0 1px rgba(255, 255, 255, 0.78);
  }

  .schedule-panel,
  .daily-review-panel,
  .time-zone-panel {
    background: linear-gradient(145deg, rgba(255, 254, 250, 0.84) 0%, rgba(255, 251, 242, 0.72) 54%, rgba(234, 245, 244, 0.54) 100%);
  }

  .quadrant-cell.output,
  .work-mode-cards article.output,
  .time-block.output,
  .planned-time-block.output {
    color: #fff;
    background: linear-gradient(135deg, #efc85f 0%, #d7a93f 58%, #bd852a 100%);
    border-color: rgba(181, 125, 25, 0.32);
  }

  .quadrant-cell.output span,
  .quadrant-cell.output strong,
  .quadrant-cell.output small,
  .quadrant-cell.output p,
  .work-mode-cards article.output span,
  .work-mode-cards article.output strong,
  .work-mode-cards article.output small {
    color: rgba(255, 255, 255, 0.92);
  }

  .quadrant-cell.input,
  .work-mode-cards article.input,
  .time-block.input,
  .planned-time-block.input {
    color: #fff;
    background: linear-gradient(135deg, #5faab4 0%, #43929e 58%, #2f7783 100%);
    border-color: rgba(67, 146, 158, 0.34);
  }

  .quadrant-cell.input span,
  .quadrant-cell.input strong,
  .quadrant-cell.input small,
  .quadrant-cell.input p,
  .work-mode-cards article.input span,
  .work-mode-cards article.input strong,
  .work-mode-cards article.input small {
    color: rgba(255, 255, 255, 0.92);
  }

  .quadrant-cell.core {
    background: linear-gradient(135deg, rgba(210, 236, 211, 0.95) 0%, rgba(255, 251, 242, 0.82) 100%);
  }

  .quadrant-cell.cash {
    background: linear-gradient(135deg, rgba(255, 239, 180, 0.95) 0%, rgba(255, 251, 242, 0.82) 100%);
  }

  .quadrant-cell.growth {
    background: linear-gradient(135deg, rgba(204, 234, 239, 0.95) 0%, rgba(255, 251, 242, 0.82) 100%);
  }

  .quadrant-cell.drain {
    background: linear-gradient(135deg, rgba(230, 198, 186, 0.68) 0%, rgba(255, 251, 242, 0.86) 100%);
  }

  .app-dialog {
    background:
      radial-gradient(circle at 12% 0%, rgba(235, 193, 90, 0.12), transparent 26rem),
      radial-gradient(circle at 92% 0%, rgba(67, 146, 158, 0.13), transparent 28rem),
      linear-gradient(135deg, rgba(255, 251, 242, 0.98), rgba(255, 248, 232, 0.96) 48%, rgba(239, 248, 247, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.68);
    box-shadow: 0 32px 96px rgba(79, 74, 66, 0.28), inset 0 1px rgba(255, 255, 255, 0.8);
  }

  .dialog-header,
  .dialog-actions {
    background: rgba(255, 251, 242, 0.68);
    border-color: rgba(79, 74, 66, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .dialog-header {
    border-bottom-style: dashed;
  }

  .dialog-header h2 {
    font-size: 34px;
    line-height: 1.18;
  }

  .dialog-close {
    width: 52px;
    height: 52px;
    background: radial-gradient(circle, #fff6d8 0%, #fff0bd 62%, #f1d477 100%);
    border: 3px solid var(--brand-teal);
    box-shadow: 0 10px 24px rgba(67, 146, 158, 0.16);
  }

  .settings-grid section,
  .life-budget-card,
  .finance-ledger-card,
  .revenue-target-card,
  .freedom-target,
  .freedom-projection-list article,
  .cloud-account-card,
  .account-identity,
  .account-backup,
  .membership-summary,
  .cloud-unavailable,
  .registration-consents {
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 18px 44px rgba(79, 74, 66, 0.075), inset 0 1px rgba(255, 255, 255, 0.76);
  }

  .settings-grid section {
    background: linear-gradient(145deg, rgba(255, 251, 242, 0.86), rgba(255, 248, 230, 0.62) 46%, rgba(232, 246, 245, 0.54));
  }

  .settings-grid h3,
  .life-budget-card > div:first-child span,
  .finance-ledger-card > span,
  .cloud-account-card span,
  .account-identity span,
  .account-backup small {
    color: var(--brand-teal);
    letter-spacing: 0.08em;
  }

  .inline-form button,
  .settings-grid .primary-button,
  .settings-grid section button:not(.text-action):not(.folder-remove):not(.note-eye),
  .life-budget-card .secondary-button,
  .budget-category-card button,
  .finance-ledger-card > button,
  #authForm .primary-button,
  #passwordRecoveryForm .primary-button,
  .activation-code-form .primary-button,
  .account-setting-form .primary-button {
    color: #fff;
    background: linear-gradient(135deg, #5da8b2 0%, #43929e 58%, #347f8a 100%);
    border: 0;
    box-shadow: 0 12px 26px rgba(67, 146, 158, 0.18);
  }

  .life-budget-card {
    background: linear-gradient(145deg, rgba(255, 251, 242, 0.86), rgba(245, 239, 229, 0.78));
  }

  .life-budget-card.ideal {
    background: linear-gradient(145deg, rgba(255, 246, 210, 0.92), rgba(255, 251, 242, 0.78) 58%, rgba(235, 193, 90, 0.2));
  }

  .budget-category-card {
    background: linear-gradient(145deg, rgba(255, 254, 250, 0.86), rgba(255, 251, 242, 0.72));
    box-shadow: 0 10px 26px rgba(79, 74, 66, 0.055);
  }

  .budget-category-card button,
  .life-budget-card .secondary-button {
    min-height: 42px;
    border-radius: 12px;
    font-size: 14px;
  }

  .freedom-target {
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 241, 189, 0.95), rgba(255, 251, 242, 0.86));
  }

  .freedom-target span {
    color: var(--brand-coffee);
    font-size: 18px;
  }

  .freedom-target strong {
    font-size: 36px;
  }

  .freedom-projection-list {
    gap: 14px;
  }

  .freedom-projection-list article {
    min-height: 128px;
    padding: 18px 20px;
    background: linear-gradient(145deg, rgba(255, 251, 242, 0.86), rgba(245, 239, 229, 0.78));
  }

  .freedom-projection-list span {
    font-size: 12px;
  }

  .freedom-projection-list strong {
    font-size: 17px;
  }

  .auth-dialog {
    width: min(620px, calc(100% - 30px));
  }

  .auth-intro {
    color: rgba(79, 74, 66, 0.78);
    font-size: 15px;
  }

  .auth-tabs,
  .planning-tabs,
  .admin-tabs {
    background: linear-gradient(135deg, rgba(255, 241, 189, 0.72), rgba(234, 245, 244, 0.72));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
  }

  .auth-tabs button.active,
  .planning-tabs button.active,
  .admin-tabs button.active {
    background: linear-gradient(135deg, #5da8b2 0%, #43929e 58%, #347f8a 100%);
    box-shadow: 0 10px 22px rgba(67, 146, 158, 0.18);
  }

  .cloud-account-card,
  .membership-summary.active,
  .account-identity,
  .account-backup {
    background: linear-gradient(135deg, rgba(223, 242, 244, 0.94), rgba(255, 251, 242, 0.78));
  }

  .activation-code-form,
  .account-setting-form {
    border-top-color: rgba(79, 74, 66, 0.14);
  }

  #activationCode,
  #authForm input,
  #profileForm input,
  #changePasswordForm input {
    min-height: 52px;
    background: rgba(255, 254, 250, 0.78);
    border-color: rgba(209, 187, 165, 0.78);
    border-radius: 14px;
    font-size: 15px;
  }
}

/* OpenDesign detail refinement v7 */
@media screen and (min-width: 981px) {
  .topbar {
    border-bottom: 1px solid rgba(79, 74, 66, 0.14);
  }

  .topbar::after {
    background: linear-gradient(90deg, rgba(209, 187, 165, 0.44), rgba(67, 146, 158, 0.2));
    opacity: 0.52;
  }

  #focusStartButton,
  .start-action-button {
    color: #4f4a42;
    background: linear-gradient(135deg, #f8dc78 0%, #ebc15a 58%, #d8a542 100%);
    border: 1px solid rgba(181, 125, 25, 0.16);
    box-shadow: 0 14px 28px rgba(181, 125, 25, 0.18), inset 0 1px rgba(255, 255, 255, 0.42);
  }

  #focusStartButton:hover,
  .start-action-button:hover {
    background: linear-gradient(135deg, #ffe593 0%, #efc85f 54%, #d9a743 100%);
  }

  .time-block.rest,
  .time-block-legend .rest {
    background: linear-gradient(135deg, #ded0bd 0%, #d1bba5 58%, #bfa88f 100%);
  }

  .time-block.rest {
    color: #4f4a42;
    border: 1px solid rgba(120, 96, 72, 0.14);
    box-shadow: 0 8px 18px rgba(79, 74, 66, 0.12), inset 0 1px rgba(255, 255, 255, 0.28);
  }

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

  .setting-actions button,
  .settings-grid section .setting-actions button,
  .settings-grid section .setting-actions .danger-text {
    display: inline-grid;
    place-items: center;
    width: auto;
    height: 34px;
    min-width: 48px;
    min-height: 34px;
    padding: 0 13px;
    color: #347f8a;
    background: rgba(255, 254, 250, 0.38);
    border: 1px solid rgba(67, 146, 158, 0.38);
    border-radius: 999px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
  }

  .setting-actions button:hover,
  .settings-grid section .setting-actions button:hover {
    color: #347f8a;
    background: rgba(255, 254, 250, 0.64);
    transform: translateY(-1px);
  }

  .setting-actions .danger-text,
  .settings-grid section .setting-actions .danger-text {
    color: #347f8a;
    border-color: rgba(67, 146, 158, 0.38);
  }

  .settings-grid select {
    min-height: 38px;
    padding: 5px 34px 5px 10px;
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
  }

  .life-budget-card .secondary-button,
  .budget-category-card button,
  .finance-ledger-card > button {
    color: #347f8a;
    background: linear-gradient(135deg, rgba(255, 254, 250, 0.96) 0%, rgba(231, 247, 248, 0.92) 58%, rgba(203, 235, 239, 0.86) 100%);
    border: 1px solid rgba(67, 146, 158, 0.16);
    box-shadow: 0 10px 22px rgba(67, 146, 158, 0.1), inset 0 1px rgba(255, 255, 255, 0.72);
  }

  .life-budget-card .secondary-button:hover,
  .budget-category-card button:hover,
  .finance-ledger-card > button:hover {
    color: #2f7783;
    background: linear-gradient(135deg, #fffdf8 0%, #e5f7f8 58%, #c4eaf0 100%);
  }

  [data-open-freedom],
  .life-budget-card [data-open-freedom] {
    color: #4f4a42;
    background: linear-gradient(135deg, #fff3c2 0%, #ebc15a 62%, #d8a542 100%);
    border: 1px solid rgba(181, 125, 25, 0.18);
    box-shadow: 0 12px 26px rgba(181, 125, 25, 0.16), inset 0 1px rgba(255, 255, 255, 0.5);
  }

  .deadline-todo-item {
    border-left-width: 5px;
    box-shadow: 0 12px 28px rgba(79, 74, 66, 0.08), inset 0 1px rgba(255, 255, 255, 0.68);
  }

  .deadline-todo-item.overdue {
    border-left-color: #9b968f;
    background: linear-gradient(135deg, #f0eee9 0%, #fffbf2 78%);
  }

  .deadline-todo-item.upcoming {
    border-left-color: #43929e;
    background: linear-gradient(135deg, rgba(220, 242, 245, 0.92) 0%, rgba(255, 251, 242, 0.9) 78%);
  }

  .deadline-todo-item.priority,
  .deadline-todo-item.today,
  .deadline-todo-item.soon {
    border-left-color: #ebc15a;
    background: linear-gradient(135deg, rgba(255, 239, 184, 0.96) 0%, rgba(255, 251, 242, 0.9) 76%);
  }

  .deadline-todo-item.overdue .deadline-urgency {
    color: #8b8780 !important;
  }

  .deadline-todo-item.upcoming .deadline-urgency {
    color: #347f8a !important;
  }

  .deadline-todo-item.priority .deadline-urgency,
  .deadline-todo-item.today .deadline-urgency,
  .deadline-todo-item.soon .deadline-urgency {
    color: #b57d19 !important;
  }
}

/* OpenDesign system layout refinement v8 */
@media screen and (min-width: 981px) {
  #settingsDialog .settings-grid section:first-child .inline-form {
    gap: 7px;
  }

  #projectForm {
    grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.25fr) minmax(72px, 0.55fr);
    align-items: center;
  }

  #projectForm select,
  #projectForm input {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 13px;
  }

  #projectForm button {
    grid-column: 1 / -1;
    min-height: 38px;
  }

  #categoryForm input,
  #roleForm input,
  #roleForm select,
  #workItemForm input,
  #workItemForm select {
    min-height: 38px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 14px;
  }

  .settings-folder-content > .setting-actions {
    align-items: center;
    justify-content: flex-end;
    min-height: 34px;
    padding: 0 6px 6px;
  }

  .setting-actions,
  .settings-grid section .setting-actions {
    gap: 6px;
  }

  .setting-actions button,
  .settings-grid section .setting-actions button,
  .settings-grid section .setting-actions .danger-text {
    width: auto;
    height: 30px;
    min-width: 42px;
    min-height: 30px;
    padding: 0 10px;
    color: #347f8a;
    background: rgba(255, 254, 250, 0.48);
    border: 1px solid rgba(67, 146, 158, 0.34);
    border-radius: 999px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
    font-size: 9px;
    font-weight: 800;
  }

  .settings-folder summary {
    min-height: 54px;
  }

  .life-budget-card:not(.ideal) {
    background: linear-gradient(145deg, rgba(255, 254, 250, 0.9) 0%, rgba(237, 248, 249, 0.72) 58%, rgba(223, 242, 244, 0.62) 100%);
  }

  .time-block.rest,
  .time-block.rest strong,
  .time-block.rest small {
    color: rgba(255, 255, 255, 0.94);
  }

  .time-block.rest {
    text-shadow: 0 1px 1px rgba(79, 74, 66, 0.18);
  }

  .auth-dialog {
    width: min(720px, calc(100% - 30px));
  }

  .signed-in-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
  }

  .account-workspace-card,
  .account-inline-card,
  .account-meta-card,
  .activation-code-form,
  .account-backup,
  #openAdminDashboardButton,
  #syncNowButton,
  #signOutButton {
    grid-column: auto;
  }

  .account-workspace-card {
    min-height: 100%;
    background: linear-gradient(135deg, rgba(223, 242, 244, 0.94) 0%, rgba(255, 251, 242, 0.82) 78%);
  }

  .account-inline-card {
    gap: 10px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 254, 250, 0.88) 0%, rgba(238, 248, 248, 0.62) 100%);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(79, 74, 66, 0.065), inset 0 1px rgba(255, 255, 255, 0.76);
  }

  .account-inline-card label {
    font-size: 12px;
  }

  .account-inline-card input {
    min-height: 42px;
    font-size: 14px;
  }

  .account-inline-card .quiet-button {
    min-height: 40px;
    color: #347f8a;
    background: linear-gradient(135deg, rgba(255, 254, 250, 0.96), rgba(224, 244, 246, 0.9));
    border: 1px solid rgba(67, 146, 158, 0.16);
    border-radius: 999px;
  }

  .account-meta-card {
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(255, 251, 242, 0.86), rgba(237, 248, 249, 0.58));
  }

  .membership-summary,
  .account-identity {
    align-content: center;
    min-height: 112px;
  }

  .activation-code-form,
  .account-backup {
    grid-column: 1 / -1;
  }

  .activation-code-form {
    margin-top: 4px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 251, 242, 0.9), rgba(255, 247, 222, 0.72));
    border: 1px solid rgba(209, 187, 165, 0.28);
    border-radius: 16px;
  }

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

  #openAdminDashboardButton,
  #syncNowButton,
  #signOutButton {
    justify-self: center;
  }
}

/* MVP3 tool orb overrides */
.tool-orb-main.deadline-todo-trigger {
  position: static;
}

.deadline-todo-panel.tool-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

@media screen and (max-width: 980px) {
  .tool-orb-cluster {
    top: auto;
    right: 14px;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .tool-orb-main.deadline-todo-trigger {
    top: auto;
    right: auto;
    bottom: auto;
  }

  .deadline-todo-panel.tool-panel {
    display: grid;
  }
}

@media screen and (max-width: 680px) {
  .deadline-todo-panel.tool-panel {
    right: 10px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    width: auto;
    max-height: min(72dvh, 640px);
  }
}

#settingsDialog .setting-actions button,
#settingsDialog .setting-actions .danger-text {
  width: auto !important;
  min-width: 48px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  color: #347f8a !important;
  background: transparent !important;
  border: 1px solid rgba(67, 146, 158, 0.42) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-weight: 800;
}

#settingsDialog .setting-actions button:hover,
#settingsDialog .setting-actions .danger-text:hover {
  color: #2f7f8c !important;
  background: rgba(224, 244, 246, 0.22) !important;
  border-color: rgba(67, 146, 158, 0.62) !important;
}

/* Life Journal: Google sign-in + read-only Calendar */
.google-auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 18px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(79, 74, 66, 0.24);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(79, 74, 66, 0.06);
  font-weight: 800;
}

.google-auth-button:hover {
  border-color: rgba(67, 146, 158, 0.5);
  box-shadow: 0 8px 24px rgba(67, 146, 158, 0.11);
}

.google-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #4285f4;
  background: #fff;
  border: 1px solid rgba(66, 133, 244, 0.22);
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.auth-google-legal {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.auth-google-legal .inline-legal-link {
  font-size: inherit;
}

.account-connection-card {
  grid-column: 1 / -1;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(224, 244, 246, 0.7), rgba(255, 254, 250, 0.94));
  border: 1px solid rgba(67, 146, 158, 0.18);
  border-radius: 18px;
}

.account-connection-heading,
.calendar-chooser-heading,
.calendar-account-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.account-connection-heading > div,
.calendar-chooser-heading > div {
  min-width: 0;
}

.account-connection-heading span,
.account-connection-heading strong,
.account-connection-heading small,
.calendar-chooser-heading strong,
.calendar-chooser-heading small {
  display: block;
}

.account-connection-heading span {
  margin-bottom: 2px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.account-connection-heading small,
.calendar-chooser-heading small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.5;
}

.calendar-chooser {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(67, 146, 158, 0.16);
}

.calendar-chooser-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.calendar-choice {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(79, 74, 66, 0.11);
  border-radius: 13px;
}

.calendar-choice input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--teal);
}

.calendar-choice > i {
  width: 11px;
  height: 11px;
  background: var(--calendar-color);
  border-radius: 4px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--calendar-color) 18%, transparent);
}

.calendar-choice span,
.calendar-choice strong,
.calendar-choice small {
  display: block;
  min-width: 0;
}

.calendar-choice strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-choice small,
.calendar-empty-copy {
  color: var(--muted);
}

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

.calendar-track-hint {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.calendar-timeline {
  min-width: 0;
}

.calendar-timeline .timeline-half + .timeline-half {
  margin-top: 12px;
}

.calendar-track {
  min-height: 108px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(208, 234, 237, 0.17), transparent),
    rgba(255, 255, 255, 0.62);
}

.calendar-time-block {
  position: absolute;
  top: calc(9px + var(--lane) * 30px);
  z-index: 2;
  display: block;
  min-width: 30px;
  height: 26px;
  padding: 2px 7px;
  overflow: hidden;
  color: #3f4b4d;
  text-align: left;
  white-space: nowrap;
  background: color-mix(in srgb, var(--calendar-color) 18%, #fff);
  border: 0;
  border-left: 4px solid var(--calendar-color);
  border-radius: 7px;
  box-shadow: 0 3px 9px rgba(79, 74, 66, 0.09);
}

.calendar-time-block:hover,
.calendar-time-block:focus-visible {
  z-index: 4;
  overflow: visible;
  outline: 2px solid color-mix(in srgb, var(--calendar-color) 55%, #fff);
  box-shadow: 0 7px 18px rgba(79, 74, 66, 0.16);
}

.calendar-time-block strong,
.calendar-time-block small {
  display: inline;
  font-size: 11px;
  line-height: 1;
}

.calendar-time-block small::before {
  content: " · ";
}

.calendar-all-day-list {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.calendar-all-day-list button {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 40px;
  max-width: min(360px, 88vw);
  padding: 7px 11px;
  color: var(--ink);
  background: color-mix(in srgb, var(--calendar-color) 13%, #fff);
  border: 1px solid color-mix(in srgb, var(--calendar-color) 35%, #fff);
  border-radius: 11px;
}

.calendar-all-day-list button > span {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
}

.calendar-all-day-list button strong,
.calendar-all-day-list button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-track-state {
  display: grid;
  min-height: 112px;
  padding: 22px;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed rgba(67, 146, 158, 0.26);
  border-radius: 16px;
}

.calendar-track-state strong {
  color: var(--ink);
}

.calendar-track-state span {
  max-width: 540px;
  margin: 3px 0 11px;
}

.calendar-track-state.is-error {
  color: var(--danger);
  border-color: rgba(185, 103, 88, 0.3);
}

.calendar-source-summary {
  display: grid;
  gap: 3px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(208, 234, 237, 0.34);
  border-left: 4px solid var(--teal);
  border-radius: 4px 14px 14px 4px;
}

.calendar-source-summary span {
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar-source-summary small,
.calendar-dialog-note {
  color: var(--muted);
}

.calendar-plan-conflict {
  margin-top: 12px;
  padding: 10px 12px;
  color: #795314;
  background: var(--yellow-light);
  border: 1px solid rgba(181, 125, 25, 0.2);
  border-radius: 11px;
  font-size: 13px;
}

.calendar-dialog-note {
  margin: 14px 0 0;
  font-size: 13px;
}

.calendar-dialog-actions {
  flex-wrap: wrap;
}

.calendar-dialog-actions > a {
  margin-right: auto;
}

.danger-action {
  color: var(--danger) !important;
}

@media screen and (max-width: 680px) {
  .account-connection-card {
    padding: 15px;
    border-radius: 15px;
  }

  .account-connection-heading,
  .calendar-chooser-heading,
  .calendar-account-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-connection-heading button,
  .calendar-account-actions button {
    width: 100%;
    min-height: 44px;
  }

  .calendar-chooser-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-choice {
    min-height: 50px;
  }

  .calendar-section-actions {
    width: 100%;
  }

  .calendar-section-actions > * {
    flex: 1 1 0;
    min-height: 42px;
  }

  .calendar-time-zone .time-zone-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-track {
    min-height: 116px;
  }

  .calendar-time-block {
    top: calc(8px + var(--lane) * 32px);
    height: 28px;
    padding-inline: 5px;
  }

  .calendar-time-block small {
    display: none;
  }

  .calendar-event-dialog .field-grid.three {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-event-dialog .field-grid.three label:first-child {
    grid-column: 1 / -1;
  }

  .calendar-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .calendar-dialog-actions > * {
    width: 100%;
    min-height: 46px;
    margin: 0;
  }
}

/* Life Journal day-grid flow · 2026-07-27 */

.legacy-section,
.legacy-time-zone-hooks,
.legacy-control {
  display: none !important;
}

#toolOrbCluster {
  display: none !important;
}

.tools-hub-button {
  border-color: rgba(67, 146, 158, 0.24);
  background: rgba(255, 254, 250, 0.74);
}

.tools-hub-dialog {
  width: min(760px, calc(100vw - 32px));
}

.tools-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tools-hub-card,
.tools-hub-account {
  min-width: 0;
  color: var(--ink);
  text-align: left;
  border: 1px solid rgba(79, 74, 66, 0.1);
}

.tools-hub-card {
  display: grid;
  align-content: end;
  min-height: 156px;
  padding: 22px;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(79, 74, 66, 0.07);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.tools-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(79, 74, 66, 0.11);
}

.tools-hub-card.money {
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.82), transparent 30%),
    linear-gradient(145deg, #fff0bd 0%, #f9df9d 48%, #eef7ef 100%);
}

.tools-hub-card.todo {
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 255, 255, 0.8), transparent 32%),
    linear-gradient(145deg, #d9f0f0 0%, #b9dde0 54%, #f8edce 100%);
}

.tools-hub-card.idea {
  background:
    radial-gradient(circle at 88% 4%, rgba(255, 255, 255, 0.84), transparent 32%),
    linear-gradient(145deg, #f5e7d8 0%, #efcfbd 52%, #f7efcf 100%);
}

.tools-hub-card.habit {
  background:
    radial-gradient(circle at 90% 2%, rgba(255, 255, 255, 0.8), transparent 32%),
    linear-gradient(145deg, #def0dc 0%, #b9d9bd 54%, #dceceb 100%);
}

.tools-hub-card span,
.tools-hub-card strong,
.tools-hub-card small,
.tools-hub-account span,
.tools-hub-account strong {
  display: block;
}

.tools-hub-card span {
  margin-bottom: 16px;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.tools-hub-card strong {
  font-size: 20px;
}

.tools-hub-card small {
  max-width: 30ch;
  margin-top: 6px;
  color: rgba(79, 74, 66, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

.tools-hub-account {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 14px 18px;
  background: #fffefa;
  border-radius: 14px;
}

.tools-hub-account span {
  color: var(--muted);
  font-size: 12px;
}

.tools-hub-account strong {
  color: var(--teal-dark);
  font-size: 13px;
}

.todo-entry-dialog .legacy-control {
  display: none !important;
}

.deadline-todo-item.undated {
  border-color: rgba(67, 146, 158, 0.24);
  background: linear-gradient(145deg, rgba(236, 247, 246, 0.92), rgba(255, 251, 242, 0.94));
}

.deadline-todo-item.undated .deadline-urgency {
  color: var(--teal-dark);
  background: rgba(67, 146, 158, 0.12);
}

.review-grid.strategy-review-grid {
  grid-template-columns: minmax(0, 1fr);
}

.focus-activity-input {
  flex: 1 1 320px;
}

.focus-activity-input input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.96);
  border: 1px solid rgba(67, 146, 158, 0.32);
  border-radius: 12px;
  outline: none;
}

.focus-activity-input input:focus {
  border-color: var(--teal);
  box-shadow: var(--focus-ring);
}

.time-zone-panel {
  overflow: clip;
}

.time-zone-content {
  display: grid;
  gap: 26px;
}

.life-zone-intro,
.life-day-board-heading,
.life-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.life-zone-intro {
  padding: 0 2px 22px;
  border-bottom: 1px solid var(--line);
}

.life-zone-intro .time-zone-description {
  max-width: 720px;
  margin: 0;
}

.life-zone-help {
  margin: 6px 0 0;
  color: var(--teal-dark);
  font-size: 13px;
}

.life-zone-actions,
.life-grid-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.life-day-board,
.life-day-summary-section,
.life-activity-report-section,
.life-activity-records-section {
  min-width: 0;
}

.life-day-board-heading,
.life-section-heading {
  margin-bottom: 14px;
}

.life-day-board-heading h3,
.life-section-heading h3 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.25;
}

.life-section-heading small {
  color: var(--muted);
  font-size: 12px;
}

.life-grid-legend {
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
}

.life-grid-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.life-grid-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.life-grid-legend .calendar {
  background: rgba(67, 146, 158, 0.28);
  border: 1px solid var(--teal);
}

.life-grid-legend .plan {
  background: var(--yellow);
}

.life-grid-legend .actual {
  background: var(--teal-dark);
}

.life-day-grid {
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.life-calendar-state,
.life-all-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.life-all-day-row {
  align-items: flex-start;
}

.life-all-day-row > span {
  width: 44px;
  flex: 0 0 44px;
  padding-top: 4px;
  font-size: 11px;
}

.life-all-day-row > div {
  display: flex;
  flex: 1;
  gap: 6px;
  flex-wrap: wrap;
}

.life-all-day-row button {
  padding: 4px 9px;
  color: var(--teal-dark);
  background: var(--teal-light);
  border: 0;
  border-radius: 6px;
  font-size: 12px;
}

.life-grid-column-headings {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1fr);
  position: relative;
  z-index: 5;
  min-height: 42px;
  padding-right: var(--life-grid-scrollbar-gutter, 0px);
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
}

.life-grid-column-headings strong {
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.life-grid-scroll {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  position: relative;
  height: min(64vh, 680px);
  min-height: 460px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.life-grid-axis,
.life-grid-lanes,
.life-grid-lane {
  height: 1536px;
}

.life-grid-axis {
  position: relative;
  color: var(--muted);
  background: #fbf7ef;
  border-right: 1px solid var(--line);
  user-select: none;
}

.life-grid-axis span {
  position: absolute;
  right: 9px;
  transform: translateY(-50%);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.life-grid-axis span:first-child {
  transform: none;
}

.life-grid-lanes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
}

.life-grid-lane {
  position: relative;
  min-width: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(127, 119, 109, 0.08) 0,
      rgba(127, 119, 109, 0.08) 1px,
      transparent 1px,
      transparent 16px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(127, 119, 109, 0.18) 0,
      rgba(127, 119, 109, 0.18) 1px,
      transparent 1px,
      transparent 64px
    );
}

.life-grid-lane + .life-grid-lane {
  border-left: 1px solid var(--line);
}

.life-grid-lane.plan-lane {
  cursor: crosshair;
  touch-action: pan-y;
}

.life-grid-block {
  position: absolute;
  left: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  min-height: 15px;
  padding: 5px 8px;
  overflow: hidden;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  color: var(--ink);
  text-align: left;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(79, 74, 66, 0.09);
  touch-action: pan-y;
}

.life-grid-block strong,
.life-grid-block small {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.life-grid-block strong {
  font-size: 12px;
}

.life-grid-block small {
  margin-top: 2px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}

.life-grid-block.calendar {
  z-index: 1;
  left: 4px;
  right: 4px;
  color: #345b61;
  background: color-mix(in srgb, var(--calendar-color) 18%, #fffdf8);
  border-left: 3px solid var(--calendar-color);
  box-shadow: none;
}

.life-grid-block.plan {
  left: 10px;
  right: 10px;
  overflow: visible;
  background: #f5d77e;
  border: 1px solid #dfba50;
}

.life-grid-block.plan.draft {
  z-index: 4;
  background: #fff4c9;
  border: 2px solid var(--teal);
  box-shadow:
    0 0 0 2px rgba(67, 146, 158, 0.14),
    0 8px 18px rgba(55, 119, 129, 0.18);
}

.life-grid-block.actual {
  color: #fff;
  background: var(--teal-dark);
  border-left: 3px solid #245f68;
}

.life-grid-block.actual.running {
  background: #2c8996;
  box-shadow: 0 0 0 3px rgba(67, 146, 158, 0.16);
}

.life-grid-block:hover,
.life-grid-block:focus-visible {
  z-index: 6;
  outline: 2px solid rgba(67, 146, 158, 0.5);
  outline-offset: 1px;
}

.life-grid-handle {
  position: absolute;
  left: 50%;
  z-index: 8;
  width: 36px;
  height: 36px;
  opacity: 0;
  transform: translateX(-50%);
  cursor: ns-resize;
  touch-action: none;
  transition: opacity 140ms ease;
}

.life-grid-handle::after {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 18px;
  height: 18px;
  content: "";
  background: #fffdf8;
  border: 3px solid var(--teal);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(55, 119, 129, 0.2);
}

.life-grid-handle.start {
  top: -18px;
}

.life-grid-handle.end {
  bottom: -18px;
}

.life-grid-block.plan:hover .life-grid-handle,
.life-grid-block.plan:focus-visible .life-grid-handle,
.life-grid-block.plan.draft .life-grid-handle {
  opacity: 1;
}

.life-grid-drag-preview {
  pointer-events: none;
  opacity: 0.84;
}

.life-now-line {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 9;
  height: 1px;
  pointer-events: none;
  background: #cc5d4e;
}

.life-now-line::before {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  content: "";
  background: #cc5d4e;
  border-radius: 50%;
}

.life-grid-draft-editor {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 12px 14px;
  background: #fff7da;
  border: 1px solid #e7ca74;
  border-radius: 12px;
}

.life-grid-draft-editor > div:first-child span,
.life-grid-draft-editor > div:first-child strong {
  display: block;
}

.life-grid-draft-editor > div:first-child span {
  color: var(--warning);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.life-grid-draft-editor input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  background: #fffefa;
  border: 1px solid #d8bd6c;
  border-radius: 8px;
  outline: none;
}

.life-grid-draft-actions {
  display: flex;
  gap: 6px;
}

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

.life-day-summary article {
  position: relative;
  min-width: 0;
  min-height: 126px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(79, 74, 66, 0.09);
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(79, 74, 66, 0.06);
}

.life-day-summary article::after {
  position: absolute;
  inset: auto -22px -40px auto;
  width: 108px;
  height: 108px;
  background: rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  content: "";
}

.life-day-summary .summary-actual {
  background: linear-gradient(145deg, #c7e8e8 0%, #8fc9ce 56%, #f6e8be 132%);
}

.life-day-summary .summary-calendar {
  background: linear-gradient(145deg, #e4f4ed 0%, #c7e4d6 58%, #f7f0d8 126%);
}

.life-day-summary .summary-plan {
  background: linear-gradient(145deg, #fff2bf 0%, #efd58f 58%, #e8efdd 126%);
}

.life-day-summary .summary-pause {
  background: linear-gradient(145deg, #f6e9dc 0%, #e8cbbb 56%, #e1ebdf 126%);
}

.life-day-summary span,
.life-day-summary strong,
.life-day-summary small {
  display: block;
}

.life-day-summary span,
.life-day-summary small {
  position: relative;
  z-index: 1;
  color: rgba(79, 74, 66, 0.7);
  font-size: 11px;
}

.life-day-summary strong {
  position: relative;
  z-index: 1;
  margin: 14px 0 4px;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.life-activity-report {
  display: grid;
  gap: 5px;
}

.life-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 18px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(229, 220, 209, 0.72);
}

.life-report-label,
.life-report-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.life-report-label {
  min-width: 0;
}

.life-report-label > span {
  color: var(--latte);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.life-report-label strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.life-report-value {
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.life-report-value span {
  min-width: 46px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.life-report-bar {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  background: #eee7dd;
  border-radius: 0;
}

.life-report-bar i {
  display: block;
  height: 100%;
  background: var(--teal);
  transform-origin: left;
  transition: width 260ms ease;
}

.life-activity-records {
  display: grid;
  gap: 10px;
}

.life-record-card {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.life-record-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

#completionDialog #deleteActivityRecordButton {
  margin-right: auto;
}

.life-record-time strong,
.life-record-time span {
  display: block;
  font-variant-numeric: tabular-nums;
}

.life-record-time strong {
  font-size: 14px;
}

.life-record-time span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.life-record-copy {
  min-width: 0;
}

.life-record-copy > strong {
  font-size: 16px;
}

.life-record-copy > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.life-record-copy > p.is-pending {
  color: var(--warning);
}

.life-record-copy dl {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
}

.life-record-copy dl div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
}

.life-record-copy dt {
  color: var(--muted);
  font-size: 12px;
}

.life-record-copy dd {
  margin: 0;
  font-size: 13px;
}

.activity-dialog {
  width: min(620px, calc(100vw - 32px));
}

.activity-dialog .dialog-actions {
  flex-wrap: wrap;
}

.activity-dialog .dialog-actions > * {
  flex: 1 1 128px;
}

.activity-duration-preview {
  margin: -4px 0 2px;
  color: var(--teal-dark);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.optional-reflection-fields textarea {
  min-height: 108px;
}

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

@media screen and (max-width: 760px) {
  .review-grid.strategy-review-grid {
    gap: 14px;
  }

  .time-zone-content {
    gap: 22px;
  }

  .life-zone-intro,
  .life-day-board-heading,
  .life-section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .life-zone-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .life-zone-actions .secondary-button {
    grid-column: 1 / -1;
  }

  .life-zone-actions > * {
    width: 100%;
  }

  .life-grid-legend {
    justify-content: flex-start;
  }

  .life-grid-scroll {
    height: 62vh;
    min-height: 480px;
    grid-template-columns: 46px minmax(0, 1fr);
    overscroll-behavior-y: contain;
    scrollbar-gutter: auto;
  }

  .life-grid-column-headings {
    grid-template-columns: 46px minmax(0, 1fr) minmax(0, 1fr);
  }

  .life-grid-column-headings strong {
    padding-inline: 4px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .life-grid-axis span {
    right: 6px;
    font-size: 9px;
  }

  .life-grid-block {
    right: 3px;
    left: 3px;
    padding: 4px 5px;
  }

  .life-grid-block.plan {
    right: 5px;
    left: 5px;
  }

  .life-grid-block strong {
    font-size: 10px;
  }

  .life-grid-block small {
    display: none;
  }

  .life-grid-handle {
    width: 44px;
    height: 44px;
  }

  .life-grid-handle.start {
    top: -22px;
  }

  .life-grid-handle.end {
    bottom: -22px;
  }

  .life-grid-handle::after {
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
  }

  .life-grid-block.plan:not(.draft) .life-grid-handle {
    opacity: 0;
  }

  .life-grid-draft-editor {
    position: sticky;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
    box-shadow: 0 16px 40px rgba(79, 74, 66, 0.18);
  }

  .life-grid-draft-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .life-day-summary {
    grid-template-columns: 1fr 1fr;
  }

  .life-record-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .life-record-time {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .life-record-copy dl div {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .activity-dialog .field-grid.three {
    grid-template-columns: 1fr 1fr;
  }

  .activity-dialog .field-grid.three label:first-child {
    grid-column: 1 / -1;
  }

  .activity-dialog input,
  .activity-dialog textarea,
  #completionDialog textarea {
    font-size: 16px;
  }

  .optional-reflection-fields {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 430px) {
  .tools-hub-dialog {
    width: calc(100vw - 16px);
  }

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

  .tools-hub-card {
    min-height: 118px;
    padding: 17px;
    border-radius: 14px;
  }

  .tools-hub-card span {
    margin-bottom: 9px;
  }

  .tools-hub-account {
    grid-column: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .life-grid-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .life-calendar-state {
    align-items: flex-start;
    flex-direction: column;
  }

  .life-day-summary article {
    min-height: 112px;
    padding: 14px 12px;
  }

  .life-day-summary strong {
    margin-top: 10px;
    font-size: 19px;
  }

  .life-report-row {
    gap: 4px 10px;
  }

  .life-report-value strong {
    font-size: 13px;
  }

  .activity-dialog {
    width: calc(100vw - 16px);
  }
}

@media screen and (max-width: 360px) {
  .focus-panel.idle .focus-actions {
    grid-template-columns: 1fr;
  }

  .focus-panel.idle .focus-actions > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .life-report-bar i,
  .life-grid-block,
  .life-grid-scroll {
    scroll-behavior: auto;
    transition: none;
  }
}
