:root {
  color-scheme: light;
  --bg: #f3f4f1;
  --surface: #ffffff;
  --surface-muted: #e9ece7;
  --text: #151817;
  --text-soft: #606762;
  --line: #d9ddd7;
  --graphite: #202522;
  --green: #346c52;
  --green-soft: #dce9e1;
  --coral: #c95c46;
  --coral-soft: #f4dfda;
  --amber: #8a672c;
  --amber-soft: #eee5d2;
  --shadow: 0 12px 34px rgba(25, 33, 29, 0.1);
  --content-width: 960px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  display: block;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #fff;
  background: var(--graphite);
  border-radius: 6px;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(18px, env(safe-area-inset-left));
  background: rgba(243, 244, 241, 0.82);
  border-bottom: 1px solid rgba(217, 221, 215, 0.8);
  backdrop-filter: blur(22px) saturate(140%);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--graphite);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
}

.topbar-actions {
  display: flex;
  gap: 6px;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-muted);
}

.icon-button img,
.text-button img,
.primary-button img,
.secondary-button img {
  width: 19px;
  height: 19px;
}

.shell-grid {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.app-nav {
  position: sticky;
  top: 64px;
  display: flex;
  height: calc(100vh - 64px);
  flex-direction: column;
  gap: 5px;
  padding: 22px 14px;
  border-right: 1px solid var(--line);
}

.nav-item {
  display: grid;
  min-height: 44px;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--text-soft);
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.nav-item img {
  width: 20px;
  height: 20px;
  opacity: 0.72;
}

.nav-item.is-active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(25, 33, 29, 0.06);
  font-weight: 650;
}

.nav-item.is-active img {
  opacity: 1;
}

.main-content {
  width: min(100%, calc(var(--content-width) + 72px));
  margin: 0 auto;
  padding: 30px 36px 100px;
  outline: none;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.day-heading {
  display: grid;
  min-height: 176px;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.day-heading > div:first-child {
  align-self: center;
  padding: 28px 30px;
}

.day-heading h1,
.page-heading h1 {
  margin: 3px 0 8px;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.day-summary,
.page-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.5;
}

.day-visual {
  min-height: 176px;
  background-image: url("/static/assets/morning-workspace.jpg");
  background-position: 67% 52%;
  background-size: cover;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.freshness-bar {
  display: grid;
  width: 100%;
  min-height: 44px;
  grid-template-columns: 10px 1fr 18px;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 0 14px;
  color: var(--text-soft);
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.freshness-bar:hover {
  background: var(--surface-muted);
}

.freshness-bar > img {
  width: 17px;
  height: 17px;
  opacity: 0.55;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--green-soft);
}

.freshness-bar.is-stale .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.cautions {
  margin: 0 0 20px;
  padding: 12px 15px;
  color: #634713;
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
  border-radius: 6px;
  line-height: 1.45;
}

.cautions p {
  margin: 0;
}

.cautions p + p {
  margin-top: 6px;
}

.focus-panel {
  position: relative;
  overflow: hidden;
  padding: 30px;
  color: #fff;
  background: var(--graphite);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.focus-panel::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 7px;
  height: 100%;
  background: var(--silo-color, var(--coral));
  content: "";
}

.focus-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 650;
}

.focus-kicker img {
  width: 18px;
  height: 18px;
  filter: invert(1);
}

.silo-label {
  margin: 0 0 8px;
  color: var(--focus-accent, #d9e7df);
  font-size: 13px;
  font-weight: 700;
}

.focus-panel h2 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: 31px;
  line-height: 1.13;
  letter-spacing: 0;
}

.focus-reason {
  max-width: 700px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  line-height: 1.55;
}

.focus-meta {
  display: flex;
  min-height: 24px;
  gap: 18px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.focus-meta span:not(:empty)::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 8px 2px 0;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.first-step {
  display: grid;
  max-width: 720px;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.first-step span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  text-transform: uppercase;
}

.first-step strong {
  font-size: 14px;
  line-height: 1.5;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: var(--graphite);
  background: #fff;
}

.primary-button:hover {
  background: #edf0ec;
}

.secondary-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.focus-panel .primary-button img {
  filter: none;
}

.secondary-button {
  color: #fff;
  background: var(--graphite);
}

.feedback-widget {
  position: fixed;
  z-index: 45;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  flex-direction: column-reverse;
  gap: 12px;
  pointer-events: none;
}

.feedback-widget > * {
  pointer-events: auto;
}

.feedback-fab {
  display: grid;
  width: 56px;
  height: 56px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: var(--graphite);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 14px 34px rgba(15, 20, 17, 0.24);
  cursor: pointer;
}

.feedback-fab:hover {
  background: #2d3430;
}

.feedback-fab img {
  width: 24px;
  height: 24px;
  filter: invert(1);
}

.feedback-chat {
  width: min(392px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 116px));
  overflow: auto;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(217, 221, 215, 0.92);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 20, 17, 0.24);
  backdrop-filter: blur(28px) saturate(145%);
}

.feedback-chat-header {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 13px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.feedback-chat-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.feedback-prompts {
  display: grid;
  gap: 9px;
  padding: 14px 16px 4px;
}

.feedback-prompt {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 11px 13px;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.42;
  text-align: left;
  cursor: pointer;
}

.feedback-prompt:hover,
.feedback-prompt.is-active {
  background: var(--green-soft);
  border-color: rgba(52, 108, 82, 0.26);
}

.feedback-form {
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
}

.feedback-form textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 12px 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  line-height: 1.45;
  outline: none;
}

.feedback-form textarea:focus {
  border-color: rgba(52, 108, 82, 0.72);
  box-shadow: 0 0 0 3px rgba(52, 108, 82, 0.12);
}

.feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-status {
  min-height: 18px;
  margin: 0;
  color: var(--green);
  font-size: 13px;
  line-height: 1.35;
}

.feedback-status.is-error {
  color: var(--coral);
}

.feedback-submit img {
  filter: invert(1);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.content-section {
  padding: 34px 0 2px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.section-heading h2,
.day-plan h2,
.day-agenda h2,
.day-occasions h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.text-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--green);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.text-button img {
  width: 16px;
  height: 16px;
}

.sequence-list,
.agenda-preview,
.occasion-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sequence-item {
  display: grid;
  width: 100%;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 12px 16px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.sequence-item:last-child {
  border-bottom: 0;
}

.sequence-item:hover {
  background: #f8f9f7;
}

.sequence-index {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--text-soft);
  background: var(--surface-muted);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
}

.sequence-copy {
  min-width: 0;
}

.sequence-copy strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.sequence-copy span {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 13px;
}

.duration {
  color: var(--text-soft);
  font-size: 13px;
  white-space: nowrap;
}

.empty-line {
  margin: 0;
  padding: 18px;
  color: var(--text-soft);
  line-height: 1.45;
}

.agenda-row {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 16px;
  min-height: 70px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.agenda-row:last-child {
  border-bottom: 0;
}

.agenda-time {
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 650;
}

.agenda-copy strong {
  display: block;
  line-height: 1.35;
}

.agenda-copy span {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

.occasion-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.occasion-row:last-child {
  border-bottom: 0;
}

.occasion-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 8px;
}

.occasion-icon img {
  width: 19px;
  height: 19px;
}

.occasion-copy {
  min-width: 0;
}

.occasion-copy > strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.occasion-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
}

.occasion-message {
  margin-top: 9px;
}

.occasion-message summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.occasion-message summary::-webkit-details-marker {
  display: none;
}

.occasion-message summary img {
  width: 15px;
  height: 15px;
  transition: transform 160ms ease;
}

.occasion-message[open] summary img {
  transform: rotate(90deg);
}

.occasion-message-body {
  position: relative;
  margin-top: 10px;
  padding: 12px 46px 12px 13px;
  background: #f6f7f4;
  border-left: 3px solid var(--green);
  border-radius: 0 6px 6px 0;
}

.occasion-message-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.occasion-copy-button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
}

.occasion-copy-button img {
  width: 17px;
  height: 17px;
}

.occasion-copy-button.is-copied {
  color: var(--green);
  background: var(--green-soft);
}

.page-heading {
  padding: 10px 0 28px;
  border-bottom: 1px solid var(--line);
}

.day-plan,
.day-agenda,
.day-occasions {
  padding: 30px 0 0;
}

.day-plan h2,
.day-agenda h2,
.day-occasions h2 {
  margin-bottom: 15px;
}

.plan-row {
  display: grid;
  width: 100%;
  grid-template-columns: 84px 4px minmax(0, 1fr) auto;
  gap: 15px;
  min-height: 92px;
  align-items: center;
  padding: 12px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.plan-order {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.plan-accent {
  width: 4px;
  height: 52px;
  background: var(--silo-color);
  border-radius: 3px;
}

.plan-copy strong {
  display: block;
  line-height: 1.35;
}

.plan-copy span {
  display: block;
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 13px;
}

.contexts-list {
  margin-top: 10px;
}

.context-group {
  border-bottom: 1px solid var(--line);
}

.context-group summary {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 15px;
  min-height: 94px;
  padding: 12px 0;
  list-style: none;
  cursor: pointer;
}

.context-group summary::-webkit-details-marker {
  display: none;
}

.context-accent {
  width: 5px;
  height: 54px;
  background: var(--silo-color);
  border-radius: 3px;
}

.context-copy strong {
  display: block;
  font-size: 17px;
}

.context-copy span {
  display: block;
  max-width: 610px;
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

.context-count {
  color: var(--text-soft);
  font-size: 13px;
  white-space: nowrap;
}

.context-chevron {
  width: 18px;
  height: 18px;
  transition: transform 160ms ease;
}

.context-group[open] .context-chevron {
  transform: rotate(90deg);
}

.context-actions {
  padding: 0 0 18px 20px;
}

.context-action {
  display: grid;
  width: 100%;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
  padding: 12px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.context-action-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  background: var(--silo-color);
  border-radius: 50%;
}

.context-action strong {
  display: block;
  line-height: 1.35;
}

.context-action span {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 13px;
}

.loading-state,
.error-state {
  display: grid;
  min-height: 62vh;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.loading-state p,
.error-state p {
  margin: 0;
  color: var(--text-soft);
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.error-state > img {
  width: 30px;
  height: 30px;
}

.error-state h1 {
  margin: 5px 0 0;
  font-size: 24px;
}

.error-state .secondary-button {
  margin-top: 12px;
}

.detail-sheet {
  width: min(620px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 40px));
  padding: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(217, 221, 215, 0.9);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 20, 17, 0.24);
  backdrop-filter: blur(28px) saturate(145%);
}

.detail-sheet::backdrop {
  background: rgba(19, 24, 21, 0.34);
  backdrop-filter: blur(5px);
}

.sheet-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.sheet-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.sheet-body {
  padding: 22px;
}

.sheet-body section + section {
  margin-top: 26px;
}

.sheet-body h3 {
  margin: 0 0 7px;
  font-size: 14px;
}

.sheet-body p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.sheet-intro {
  margin-bottom: 18px !important;
}

.provenance-item,
.source-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  border-bottom: 1px solid var(--line);
}

.provenance-item:last-child,
.source-item:last-child {
  border-bottom: 0;
}

.source-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--surface-muted);
  border-radius: 8px;
}

.source-icon img {
  width: 18px;
  height: 18px;
}

.source-copy strong {
  display: block;
  font-size: 14px;
}

.source-copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.source-state {
  padding: 4px 7px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 750;
}

.source-state.is-partial {
  color: var(--amber);
  background: var(--amber-soft);
}

.source-state.is-unavailable {
  color: var(--coral);
  background: var(--coral-soft);
}

.login-page {
  overflow: hidden;
  background: #dfe2dd;
}

.login-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  align-items: center;
  padding: max(32px, env(safe-area-inset-top)) max(7vw, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom)) max(7vw, env(safe-area-inset-left));
  background-image: url("/static/assets/morning-workspace.jpg");
  background-position: center;
  background-size: cover;
}

.login-hero::before {
  position: absolute;
  inset: 0;
  background: rgba(244, 246, 243, 0.3);
  content: "";
}

.login-copy {
  position: relative;
  z-index: 1;
  width: min(590px, 100%);
}

.login-copy .brand-lockup {
  margin-bottom: 68px;
}

.login-copy h1 {
  max-width: 560px;
  margin: 0 0 20px;
  font-size: 58px;
  line-height: 1.01;
  letter-spacing: 0;
}

.login-lead {
  max-width: 470px;
  margin: 0 0 28px;
  color: #424945;
  font-size: 18px;
  line-height: 1.5;
}

.login-form {
  display: grid;
  width: min(390px, 100%);
  gap: 12px;
}

.login-field {
  display: grid;
  gap: 6px;
  color: #424945;
  font-size: 12px;
  font-weight: 760;
}

.login-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(45, 49, 46, 0.22);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--graphite);
  background: rgba(255, 255, 255, 0.76);
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  outline: none;
  box-shadow: 0 1px 2px rgba(28, 31, 29, 0.08);
}

.login-field input:focus {
  border-color: rgba(57, 112, 96, 0.8);
  box-shadow: 0 0 0 3px rgba(57, 112, 96, 0.15);
}

.login-error {
  margin: 0;
  color: var(--coral);
  font-size: 13px;
  font-weight: 720;
}

.login-button {
  margin-top: 6px;
  color: #fff;
  background: var(--graphite);
}

.login-button img {
  filter: invert(1);
}

.login-security {
  margin: 14px 0 0;
  color: #59605b;
  font-size: 12px;
}

.login-footnote {
  position: absolute;
  z-index: 1;
  right: max(7vw, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  margin: 0;
  color: #646a66;
  font-size: 12px;
}

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

@media (max-width: 760px) {
  .topbar {
    height: 58px;
  }

  .shell-grid {
    display: block;
    min-height: calc(100vh - 58px);
  }

  .main-content {
    padding: 18px 14px calc(96px + env(safe-area-inset-bottom));
  }

  .app-nav {
    position: fixed;
    z-index: 30;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: calc(64px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 5px max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom)
      max(8px, env(safe-area-inset-left));
    background: rgba(248, 249, 247, 0.9);
    border-top: 1px solid rgba(217, 221, 215, 0.9);
    border-right: 0;
    backdrop-filter: blur(24px) saturate(145%);
  }

  .nav-item {
    display: flex;
    min-height: 54px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 0;
    font-size: 11px;
    text-align: center;
  }

  .nav-item img {
    width: 21px;
    height: 21px;
  }

  .nav-item.is-active {
    background: transparent;
    box-shadow: none;
  }

  .day-heading {
    min-height: 190px;
    grid-template-columns: 1fr 108px;
  }

  .day-heading > div:first-child {
    padding: 22px 18px;
  }

  .day-heading h1,
  .page-heading h1 {
    font-size: 28px;
  }

  .day-summary {
    font-size: 14px;
  }

  .day-visual {
    min-height: 190px;
    background-position: 74% 50%;
  }

  .freshness-bar {
    margin-bottom: 16px;
  }

  .focus-panel {
    padding: 22px 18px;
  }

  .focus-kicker {
    margin-bottom: 24px;
  }

  .focus-panel h2 {
    font-size: 25px;
  }

  .focus-reason {
    font-size: 14px;
  }

  .first-step {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .feedback-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .feedback-submit {
    width: 100%;
  }

  .feedback-widget {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .feedback-chat {
    max-height: calc(100vh - 154px - env(safe-area-inset-bottom));
  }

  .sequence-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .sequence-item .duration {
    display: none;
  }

  .agenda-row {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 11px;
  }

  .occasion-row {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 11px;
    padding: 14px;
  }

  .occasion-icon {
    width: 34px;
    height: 34px;
  }

  .plan-row {
    grid-template-columns: 58px 4px minmax(0, 1fr);
    gap: 11px;
  }

  .plan-row .duration {
    display: none;
  }

  .context-group summary {
    grid-template-columns: 5px minmax(0, 1fr) 18px;
  }

  .context-count {
    display: none;
  }

  .detail-sheet {
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 18px);
    margin: auto 0 0;
    border-radius: 8px 8px 0 0;
  }

  .login-hero {
    align-items: end;
    padding: max(24px, env(safe-area-inset-top)) 22px max(42px, env(safe-area-inset-bottom));
    background-position: 61% center;
  }

  .login-hero::before {
    background: rgba(244, 246, 243, 0.48);
  }

  .login-copy .brand-lockup {
    margin-bottom: 44px;
  }

  .login-copy h1 {
    font-size: 42px;
  }

  .login-lead {
    font-size: 16px;
  }

  .login-form {
    width: 100%;
  }

  .login-footnote {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
