:root {
  --bg: #fff7ef;
  --ink: #4d3431;
  --muted: #8d6860;
  --rose: #f7b6bd;
  --rose-dark: #dc6f80;
  --leaf: #7cb89a;
  --leaf-dark: #4f8e70;
  --cream: #fffdf8;
  --tea: #b87949;
  --line: rgba(103, 64, 55, 0.14);
  --shadow: 0 18px 46px rgba(158, 89, 75, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  background:
    radial-gradient(circle at 16% 8%, rgba(247, 182, 189, 0.46), transparent 24rem),
    radial-gradient(circle at 92% 14%, rgba(124, 184, 154, 0.35), transparent 22rem),
    linear-gradient(180deg, #fff6ec 0%, #f9eee4 100%);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
}

.hero {
  position: relative;
  min-height: 286px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 30px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 244, 231, 0.68)),
    linear-gradient(135deg, #ffe4df, #fff7d6 48%, #d8f1e0);
  box-shadow: var(--shadow);
}

.sky {
  position: absolute;
  inset: 0;
}

.cloud,
.cloud::before,
.cloud::after {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.cloud {
  width: 74px;
  height: 24px;
}

.cloud::before,
.cloud::after {
  content: "";
}

.cloud::before {
  width: 34px;
  height: 34px;
  left: 11px;
  bottom: 8px;
}

.cloud::after {
  width: 42px;
  height: 42px;
  right: 8px;
  bottom: 5px;
}

.cloud-a {
  top: 28px;
  left: 24px;
}

.cloud-b {
  top: 82px;
  right: 18px;
  transform: scale(0.72);
}

.sun {
  position: absolute;
  top: 30px;
  right: 62px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffd66f;
  box-shadow: 0 0 0 13px rgba(255, 214, 111, 0.22);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 292px;
  padding: 30px 24px;
}

.eyebrow,
.panel-label {
  margin: 0 0 8px;
  color: var(--rose-dark);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  max-width: 8em;
  margin: 0;
  font-size: clamp(34px, 9vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.today {
  width: fit-content;
  margin: 18px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--leaf-dark);
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.7);
}

.mascot {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 164px;
  height: 168px;
}

.pot-lid {
  position: absolute;
  left: 38px;
  top: 34px;
  width: 88px;
  height: 22px;
  border-radius: 50% 50% 42% 42%;
  background: #8fc8aa;
  box-shadow: inset 0 -5px 0 rgba(69, 129, 98, 0.22);
}

.pot-lid::before {
  content: "";
  position: absolute;
  left: 36px;
  top: -12px;
  width: 18px;
  height: 16px;
  border-radius: 50% 50% 40% 40%;
  background: #de7d8e;
}

.pot {
  position: absolute;
  left: 18px;
  bottom: 8px;
  width: 132px;
  height: 112px;
  border-radius: 38px 38px 48px 48px;
  background: linear-gradient(160deg, #cf8757, #a9653e);
  box-shadow: inset 0 -10px 0 rgba(86, 42, 29, 0.12), 0 16px 24px rgba(121, 69, 46, 0.22);
}

.pot::before,
.pot::after {
  content: "";
  position: absolute;
  top: 42px;
  width: 28px;
  height: 38px;
  border: 8px solid #a9653e;
  border-radius: 50%;
}

.pot::before {
  left: -24px;
}

.pot::after {
  right: -24px;
}

.steam {
  position: absolute;
  top: -52px;
  width: 12px;
  height: 44px;
  border-radius: 999px;
  border-left: 5px solid rgba(255, 255, 255, 0.82);
  animation: floatSteam 2.8s ease-in-out infinite;
}

.steam-1 {
  left: 46px;
}

.steam-2 {
  left: 76px;
  animation-delay: 0.8s;
}

.eye-left,
.eye-right {
  position: absolute;
  top: 47px;
  width: 10px;
  height: 14px;
  border-radius: 50%;
  background: #51322a;
}

.eye-left {
  left: 42px;
}

.eye-right {
  right: 42px;
}

.blush-left,
.blush-right {
  position: absolute;
  top: 66px;
  width: 22px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 181, 190, 0.82);
}

.blush-left {
  left: 28px;
}

.blush-right {
  right: 28px;
}

.mouth {
  position: absolute;
  left: 60px;
  top: 68px;
  width: 16px;
  height: 9px;
  border-bottom: 3px solid #51322a;
  border-radius: 0 0 999px 999px;
}

.next-panel,
.note,
.course-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 12px 30px rgba(120, 82, 70, 0.1);
  backdrop-filter: blur(16px);
}

.next-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.next-panel p {
  margin: 0;
}

#nextDetail,
#statusText {
  color: var(--muted);
  line-height: 1.5;
}

.countdown {
  flex: 0 0 auto;
  min-width: 98px;
  padding: 14px 10px;
  border-radius: 20px;
  color: #fffdf8;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, var(--rose-dark), #e6a34e);
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.reminder-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 8px 20px rgba(112, 74, 64, 0.08);
}

.reminder-card.done {
  background: rgba(235, 250, 239, 0.92);
}

.reminder-card.disabled {
  opacity: 0.68;
}

.check-button {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(124, 184, 154, 0.72);
  border-radius: 50%;
  background: #fff;
  color: #fff;
}

.reminder-card.done .check-button {
  border-color: var(--leaf);
  background: var(--leaf);
}

.reminder-card.done .check-button::after {
  content: "";
  display: block;
  width: 15px;
  height: 8px;
  margin: 11px auto 0;
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  transform: rotate(-45deg);
}

.time-block {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.time-block strong {
  font-size: 28px;
  line-height: 1;
}

.time-block span {
  color: var(--leaf-dark);
  font-weight: 900;
  white-space: nowrap;
}

.reminder-card p {
  grid-column: 2;
  margin: -2px 0 0;
  color: var(--muted);
}

.meal-action {
  grid-column: 2;
  min-height: 44px;
  margin-top: 2px;
  border: 0;
  border-radius: 16px;
  color: #fffdf8;
  font-weight: 900;
  background: linear-gradient(135deg, var(--leaf), #e6a34e);
  box-shadow: 0 10px 22px rgba(118, 96, 77, 0.14);
}

.meal-action:disabled {
  color: var(--muted);
  background: rgba(141, 104, 96, 0.12);
  box-shadow: none;
}

.time-input {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  color: var(--muted);
}

.time-input input {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 0.62fr 0.72fr;
  gap: 10px;
  margin-top: 16px;
}

.primary-action,
.ghost-action {
  min-height: 50px;
  border: 0;
  border-radius: 18px;
  font-weight: 900;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--leaf), var(--rose-dark));
  box-shadow: 0 12px 26px rgba(118, 96, 77, 0.18);
}

.ghost-action {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid var(--line);
}

.ghost-action.compact {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  white-space: nowrap;
}

.bell-icon {
  position: relative;
  width: 16px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 9px 9px 6px 6px;
}

.bell-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -6px;
  width: 4px;
  height: 5px;
  border-radius: 99px;
  background: currentColor;
}

.bell-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: -7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.progress-ring {
  display: grid;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  font-weight: 900;
  background: conic-gradient(var(--leaf) 0deg, rgba(124, 184, 154, 0.16) 0deg);
}

.progress-ring span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--cream);
}

.course-panel {
  display: block;
}

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

.course-head h2 {
  margin: 0;
  font-size: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.stats-grid div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.stats-grid strong,
.stats-grid span {
  display: block;
}

.stats-grid strong {
  font-size: 28px;
  line-height: 1;
}

.stats-grid span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.day-dots {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.day-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(141, 104, 96, 0.14);
}

.day-dot.due {
  background: rgba(220, 111, 128, 0.28);
}

.day-dot.complete {
  background: var(--leaf);
}

.day-dot.partial {
  background: #e6a34e;
}

.day-dot.today-dot {
  outline: 3px solid rgba(77, 52, 49, 0.28);
  outline-offset: 2px;
}

.course-note {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

@keyframes floatSteam {
  0%,
  100% {
    opacity: 0.45;
    transform: translateY(8px);
  }
  50% {
    opacity: 1;
    transform: translateY(-6px);
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding-inline: 12px;
  }

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

  .course-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 270px;
  }

  .mascot {
    right: -6px;
    transform: scale(0.86);
    transform-origin: bottom right;
  }
}
