:root {
  color-scheme: dark;
  --bg: #0d1425;
  --bg-deep: #070b14;
  --surface: rgba(24, 35, 58, 0.74);
  --surface-strong: rgba(32, 47, 77, 0.88);
  --surface-soft: rgba(246, 231, 193, 0.07);
  --text: #f5ead5;
  --muted: #b7c0d4;
  --dim: #7f8aa3;
  --line: rgba(245, 234, 213, 0.13);
  --amber: #f2a84b;
  --amber-soft: #ffd08a;
  --blue: #79a8d8;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 50% -10%, rgba(242, 168, 75, 0.2), transparent 34rem),
    linear-gradient(180deg, #111c32 0%, var(--bg) 42%, var(--bg-deep) 100%);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(165deg, rgba(121, 168, 216, 0.09), transparent 42%),
    transparent;
}

button {
  font: inherit;
}

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

.hero {
  position: relative;
  min-height: 210px;
  padding: 34px 4px 22px;
  overflow: hidden;
}

.date-line {
  margin: 0 0 14px;
  color: var(--amber-soft);
  font-size: 0.92rem;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(3rem, 18vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: 0;
  font-weight: 740;
}

h2 {
  margin-bottom: 7px;
  font-size: 1.06rem;
  letter-spacing: 0;
}

.opening {
  max-width: 25rem;
  margin-bottom: 0;
  color: #e9dcc2;
  font-size: 1.12rem;
  line-height: 1.75;
}

.skyline {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lamp-glow {
  position: absolute;
  right: 12px;
  bottom: 26px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 210, 138, 0.95) 0 9%, rgba(242, 168, 75, 0.24) 34%, transparent 70%),
    linear-gradient(180deg, transparent 0 48%, rgba(242, 168, 75, 0.8) 49% 52%, transparent 53%);
  filter: blur(0.2px);
  opacity: 0.92;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(245, 234, 213, 0.82);
}

.star-one {
  top: 54px;
  right: 86px;
}

.star-two {
  top: 96px;
  right: 28px;
  opacity: 0.58;
}

.progress-card,
.history-card,
.rest-cue {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.progress-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.progress-card p,
.history-card p,
.section-heading p,
.rest-cue p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.62;
}

.progress-lamp {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 234, 213, 0.06);
  border: 1px solid rgba(255, 208, 138, 0.24);
}

.progress-lamp span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 var(--glow, 14px) rgba(242, 168, 75, 0.7);
  transform: scale(var(--glow-scale, 0.78));
  transition: transform 320ms ease, box-shadow 320ms ease;
}

.rest-cue {
  margin-top: 14px;
  padding: 16px 17px;
  background:
    linear-gradient(135deg, rgba(242, 168, 75, 0.14), rgba(121, 168, 216, 0.08)),
    var(--surface);
}

.list-section {
  margin-top: 28px;
}

.section-heading {
  margin-bottom: 12px;
  padding-inline: 2px;
}

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

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  min-height: 78px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-align: left;
  background: rgba(17, 27, 48, 0.72);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.task-card:active {
  transform: translateY(1px) scale(0.995);
}

.task-card:focus-visible {
  outline: 2px solid var(--amber-soft);
  outline-offset: 3px;
}

.task-card.is-essential {
  background:
    linear-gradient(135deg, rgba(242, 168, 75, 0.16), rgba(17, 27, 48, 0.72) 54%),
    rgba(17, 27, 48, 0.74);
  border-color: rgba(255, 208, 138, 0.3);
}

.task-card.is-complete {
  background: rgba(35, 52, 78, 0.7);
  border-color: rgba(255, 208, 138, 0.34);
}

.check {
  display: grid;
  width: 29px;
  height: 29px;
  margin-top: 2px;
  place-items: center;
  border: 1px solid rgba(245, 234, 213, 0.22);
  border-radius: 50%;
  color: transparent;
  background: rgba(245, 234, 213, 0.04);
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.task-card.is-complete .check {
  color: #1a2234;
  background: var(--amber-soft);
  transform: scale(1.04);
}

.task-content {
  min-width: 0;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 7px;
  color: var(--dim);
  font-size: 0.78rem;
}

.task-kind {
  color: var(--amber-soft);
}

.task-title {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.task-detail {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.58;
}

.history-card {
  margin-top: 28px;
  padding: 17px;
  background: var(--surface-soft);
  box-shadow: none;
}

.encouragement {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 10;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 17px;
  border: 1px solid rgba(255, 208, 138, 0.34);
  border-radius: var(--radius);
  color: #2b1c0a;
  background: rgba(255, 219, 159, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  line-height: 1.58;
  opacity: 0;
  transform: translateY(22px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.encouragement.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 700px) {
  .app-shell {
    padding-top: 44px;
  }

  .hero {
    min-height: 250px;
  }

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

  .core-list {
    grid-template-columns: 1fr;
  }
}

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