:root {
  --ink: #27323a;
  --deep: #1f3940;
  --muted: #66707e;
  --line: #e6e8ed;
  --paper: #fbfbf8;
  --card: #ffffff;
  --sun: #f6b544;
  --leaf: #5dbb91;
  --blue: #6aa8d8;
  --coral: #ef7c67;
  --shadow: 0 24px 70px rgba(31, 57, 64, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 16%, rgba(246, 181, 68, 0.24), transparent 32%),
    radial-gradient(circle at 80% 18%, rgba(106, 168, 216, 0.22), transparent 34%),
    linear-gradient(135deg, #f8f6ef 0%, #eef5f2 54%, #f7efe9 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 56px;
  align-items: center;
  padding: 34px 0;
}

.brand-panel {
  padding: 18px 0;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fffaf0;
  box-shadow: 0 18px 40px rgba(31, 57, 64, 0.2);
}

.brand-mark svg {
  width: 42px;
  height: 42px;
}

.logo-sun {
  fill: #f6b544;
}

.logo-ray {
  fill: none;
  stroke: #74bc92;
  stroke-linecap: round;
  stroke-width: 4.4;
}

.logo-check {
  fill: none;
  stroke: #27323a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.eyebrow {
  margin: 34px 0 12px;
  color: #7b5f22;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(54px, 8vw, 108px);
  line-height: 0.92;
  letter-spacing: 0;
}

.lead {
  width: min(560px, 100%);
  margin: 26px 0 0;
  color: #424953;
  font-size: 22px;
  line-height: 1.45;
}

.concept-card {
  width: min(520px, 100%);
  margin-top: 34px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(23, 26, 31, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(16px);
}

.steps-card {
  width: min(520px, 100%);
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.steps-card div {
  min-height: 54px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(23, 26, 31, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.steps-card strong {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff4d9;
  color: #8a6207;
  font-size: 14px;
}

.steps-card span {
  color: #3b424c;
  font-weight: 750;
}

.examples-card {
  width: min(520px, 100%);
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(23, 26, 31, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.examples-card p {
  margin: 0 0 10px;
  color: #53606c;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.examples-card ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
}

.examples-card li {
  position: relative;
  padding-left: 22px;
  color: #3b424c;
  line-height: 1.35;
}

.examples-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--leaf);
}

.contact-card {
  width: min(520px, 100%);
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #53606c;
  font-size: 14px;
}

.contact-card span {
  font-weight: 850;
}

.contact-card a {
  padding: 9px 12px;
  border: 1px solid rgba(93, 187, 145, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: #1f6b55;
  font-weight: 850;
  text-decoration: none;
}

.contact-card a:hover {
  background: #eaf7f1;
}

.concept-card p {
  margin: 0;
  color: #3b424c;
  line-height: 1.45;
}

.dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--leaf);
}

.phone-stage {
  display: flex;
  justify-content: center;
}

.phone {
  width: min(100%, 410px, calc((100vh - 48px) * 0.5));
  aspect-ratio: 410 / 820;
  padding: 12px;
  border-radius: 42px;
  background: linear-gradient(180deg, #344a50, #20323a);
  box-shadow: var(--shadow);
}

.phone-top {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  color: #fff8ed;
  font-size: 13px;
  font-weight: 750;
}

.status-pill {
  width: 66px;
  height: 20px;
  border-radius: 999px;
  background: rgba(5, 14, 17, 0.42);
}

.screen {
  position: relative;
  height: calc(100% - 36px);
  overflow: hidden;
  padding: 20px 20px 88px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(246, 181, 68, 0.18), transparent 28%),
    var(--paper);
}

.app-header,
.task-hero,
.alarm-card,
.time-editor,
.wake-score,
.insights-panel,
.verification-panel,
.chat-title,
.quick-actions,
.composer {
  width: 100%;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

body.task-view .app-header {
  display: none;
}

body.task-view .screen {
  display: flex;
  flex-direction: column;
}

.task-hero {
  flex: 0 0 auto;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.task-hero strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

h2 {
  margin: 2px 0 0;
  font-size: 48px;
  line-height: 1;
  letter-spacing: 0;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #7b5f22;
  font-weight: 850;
  box-shadow: 0 8px 24px rgba(31, 57, 64, 0.08);
}

.logo-button svg {
  width: 30px;
  height: 30px;
}

.logo-button .logo-ray {
  stroke-width: 4.8;
}

.logo-button .logo-check {
  stroke-width: 5.4;
}

.alarm-card {
  margin-top: 20px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 14px 34px rgba(31, 57, 64, 0.08);
}

.alarm-card strong {
  display: block;
  margin: 4px 0 7px;
  font-size: 18px;
}

#missionSummary {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

#missionMeta {
  display: block;
  margin-top: 6px;
  color: #4f9b77;
  font-size: 11px;
  font-weight: 800;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 54px;
  height: 32px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  display: block;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: #d8dde3;
  transition: background 0.2s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch input:checked + span {
  background: var(--leaf);
}

.switch input:checked + span::after {
  transform: translateX(22px);
}

.time-editor {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
}

.time-editor label {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.time-editor input {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  outline: none;
}

.time-editor button,
.verification-panel button {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--leaf), #7bc9a3);
  color: #12382e;
  font-size: 13px;
  font-weight: 850;
}

.morning-plan {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.morning-plan ol {
  margin: 9px 0 0;
  padding-left: 19px;
  color: #424953;
  font-size: 12px;
  line-height: 1.34;
}

.morning-plan li + li {
  margin-top: 5px;
}

.wake-score {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wake-score > div {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.score {
  display: block;
  font-size: 24px;
  font-weight: 850;
}

.wake-score p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.insights-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(31, 57, 64, 0.08);
}

.insight-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.insight-row:first-child {
  padding-top: 0;
}

.insight-row span {
  color: var(--muted);
}

.insight-row strong {
  max-width: 160px;
  text-align: right;
}

.progress-bar {
  height: 10px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--sun), var(--leaf));
}

.verification-panel {
  min-height: 362px;
  margin-top: 16px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(246, 181, 68, 0.18), transparent 54%),
    #fff;
  box-shadow: 0 14px 34px rgba(23, 26, 31, 0.08);
}

.verify-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin: 22px 0 18px;
  border-radius: 50%;
  background: var(--leaf);
  color: #fff;
  font-size: 42px;
  font-weight: 850;
}

.verification-panel h3 {
  margin: 8px 0 10px;
  font-size: 26px;
  line-height: 1.1;
}

.verification-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.verification-panel button {
  width: 100%;
  min-height: 48px;
  margin-top: auto;
}

.chat-panel {
  height: 574px;
  margin-top: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 26, 31, 0.08);
}

body.task-view .chat-panel {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.chat-title strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.15;
}

.messages {
  flex: 1;
  min-height: 0;
  margin: 14px -4px 0;
  padding: 0 4px;
  overflow: auto;
  scrollbar-width: none;
}

.messages::-webkit-scrollbar {
  display: none;
}

.message {
  width: fit-content;
  max-width: 92%;
  margin-bottom: 10px;
  padding: 10px 11px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.message p {
  margin: 0;
}

.message.ai {
  background: #f4f6f8;
  color: #28303b;
}

.message.user {
  margin-left: auto;
  background: #e0f3ea;
  color: #1b4639;
}

.task-catalog {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.task-group {
  padding: 9px;
  border-radius: 8px;
  background: #fbfcfd;
  border: 1px solid var(--line);
}

.task-group-title {
  margin: 0 0 8px;
  color: #53606c;
  font-size: 12px;
  font-weight: 850;
}

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

.mission-option {
  width: 100%;
  min-height: 54px;
  padding: 8px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 9px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.mission-option b {
  min-width: 0;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff4d9;
  color: #8a6207;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.task-group.quiet .mission-option b {
  background: #e9f4ff;
  color: #2d6f9f;
}

.task-group.action .mission-option b {
  background: #eaf7f1;
  color: #1f6b55;
}

.task-group.focus .mission-option b {
  background: #fff4d9;
  color: #8a6207;
}

.mission-option strong {
  display: block;
  font-size: 13px;
}

.mission-option em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.choice-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.choice-list button {
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

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

.choice-list strong {
  font-size: 13px;
}

.choice-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.mission-option:hover {
  border-color: rgba(93, 187, 145, 0.65);
  background: #f7fbf9;
}

.composer {
  display: grid;
  grid-template-columns: 1fr 42px 48px;
  gap: 8px;
  padding-top: 9px;
}

.composer input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fbfcfd;
  color: var(--ink);
  font-size: 13px;
}

.composer input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(106, 168, 216, 0.16);
}

.composer button {
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--sun), #f8c764);
  color: #563b00;
  font-size: 12px;
  font-weight: 850;
}

.voice-btn {
  position: relative;
  display: grid;
  place-items: center;
  background: #eaf7f1 !important;
  color: #1f6b55 !important;
  box-shadow: inset 0 0 0 1px rgba(93, 187, 145, 0.32);
}

.voice-btn span {
  width: 12px;
  height: 18px;
  border-radius: 999px;
  background: #5dbb91;
  position: relative;
}

.voice-btn span::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -5px;
  height: 9px;
  border: 2px solid #5dbb91;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.voice-btn span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 2px;
  height: 6px;
  background: #5dbb91;
  transform: translateX(-50%);
}

.voice-btn.listening {
  animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(93, 187, 145, 0.32), 0 0 0 0 rgba(93, 187, 145, 0.32);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(93, 187, 145, 0.32), 0 0 0 7px rgba(93, 187, 145, 0);
  }
}

.bottom-nav {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  height: 54px;
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.bottom-nav button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.bottom-nav button.active {
  background: #eaf7f1;
  color: #1f6b55;
  box-shadow: inset 0 0 0 1px rgba(93, 187, 145, 0.28);
}

.panel-hidden {
  display: none;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 0;
  }

  .brand-panel {
    display: none;
  }

  .phone {
    max-width: 410px;
  }
}

@media (max-width: 440px) {
  .app-shell {
    width: 100%;
    padding: 0;
  }

  .phone {
    width: 100%;
    min-height: 100vh;
    aspect-ratio: auto;
    padding: 0;
    border-radius: 0;
  }

  .phone-top {
    background: #20323a;
  }

  .screen {
    min-height: calc(100vh - 36px);
    border-radius: 28px 28px 0 0;
  }

  .chat-panel {
    height: calc(100vh - 170px);
  }
}
