:root {
  --bg: #f3eee4;
  --bg-deep: #ebe4d6;
  --card: #fbfaf6;
  --ink: #2f2c28;
  --muted: #7a7368;
  --line: #e6ddd0;
  --sage: #5c7464;
  --sage-deep: #486052;
  --sage-soft: #dce6dc;
  --brass: #b0895a;
  --danger-soft: #c48b74;
  --shadow: 0 18px 50px rgba(72, 56, 36, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
}

body {
  min-height: 100dvh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 22px 36px;
}

.app.mini-shell {
  max-width: none;
  padding: 10px 14px;
  min-height: 100dvh;
}

.boot,
.empty {
  color: var(--muted);
  padding-top: 40vh;
  text-align: center;
}

.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.logo {
  font-size: 28px;
  letter-spacing: 0.18em;
  font-weight: 500;
}

.date-label,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.hero {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 500;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.choices {
  display: flex;
  gap: 8px;
}

.choices.wrap {
  flex-wrap: wrap;
}

.choice,
.icon-btn,
.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  transition: 0.15s ease;
}

.choice.selected,
.icon-btn.selected {
  background: var(--sage-soft);
  border-color: var(--sage);
  color: var(--sage-deep);
}

.choice:hover,
.btn:hover,
.icon-btn:hover {
  border-color: var(--sage);
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
}

.input:focus,
.textarea:focus {
  border-color: var(--sage);
}

.textarea {
  min-height: 88px;
  resize: none;
}

.btn {
  width: 100%;
  padding: 13px 16px;
  font-size: 16px;
}

.btn.primary {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.btn.ghost {
  background: transparent;
}

.btn.tiny,
.icon-btn {
  width: auto;
  padding: 7px 12px;
  font-size: 13px;
}

a.btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row .input {
  width: auto;
  min-width: 0;
  flex: 1;
}

.row > .btn {
  width: auto;
  flex: 1 1 0;
  white-space: nowrap;
}

.row > .btn.tiny {
  flex: 0 0 auto;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.task {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.task-when {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-left: 34px;
}

.time-input {
  width: 132px;
  flex: none;
  padding: 8px 12px;
}

.task:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.task.current .task-title {
  color: var(--sage-deep);
}

.task.done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}

.check {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--sage);
  border-radius: 50%;
  background: transparent;
  padding: 0;
  flex: none;
}

.task.done .check {
  background: var(--sage);
}

.task-title {
  flex: 1;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  font-size: 16px;
}

.now-pill {
  font-size: 12px;
  color: var(--sage-deep);
  background: var(--sage-soft);
  border-radius: 999px;
  padding: 3px 8px;
}

.stats {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  margin: 8px 2px 16px;
}

.focus-shell {
  min-height: calc(100dvh - 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.clock {
  font-variant-numeric: tabular-nums;
  font-size: 84px;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 12px 0 8px;
  font-weight: 400;
}

.task-now {
  font-size: 18px;
  margin-bottom: 28px;
}

.mini-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.mini-bar .clock {
  font-size: 28px;
  margin: 0;
}

.mini-bar .task-now {
  flex: 1;
  text-align: left;
  font-size: 14px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.error {
  color: var(--danger-soft);
  font-size: 13px;
  min-height: 18px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.lan {
  word-break: break-all;
  font-size: 14px;
}

.overlay-actions .btn {
  margin-top: 8px;
}

body.rain-on {
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(220, 230, 220, 0.8), transparent),
    var(--bg-deep);
}

body.forest-on {
  background:
    radial-gradient(900px 420px at 80% 0%, rgba(180, 204, 184, 0.45), transparent),
    var(--bg-deep);
}

body.cafe-on {
  background:
    radial-gradient(800px 400px at 10% 100%, rgba(196, 165, 116, 0.18), transparent),
    var(--bg);
}

.growth-card {
  display: flex;
  gap: 14px;
  align-items: center;
}

.plant {
  width: 92px;
  height: 98px;
  flex: none;
}

.growth-copy {
  flex: 1;
  min-width: 0;
}

.growth-title {
  font-size: 16px;
  margin-bottom: 4px;
}

.xp-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin: 8px 0 4px;
}

.xp-bar span {
  display: block;
  height: 100%;
  background: var(--sage);
  border-radius: 99px;
}

.block-overlay {
  position: fixed;
  inset: 0;
  background: rgba(243, 238, 228, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 80;
  min-height: 100dvh;
  touch-action: none;
}

.block-overlay .card {
  max-width: 360px;
  width: 100%;
}

.alarm-overlay {
  z-index: 40;
  background: rgba(243, 238, 228, 0.98);
}

.app.alarm-shell {
  max-width: none;
  padding: 0;
  min-height: 100dvh;
}

.immerse-shell .plant {
  width: 140px;
  height: 148px;
  margin: 0 auto;
}

.immerse-shell .clock {
  font-size: 72px;
}
