:root {
  color-scheme: light;
  --ink: #18322c;
  --muted: #687873;
  --paper: #f4f1e8;
  --card: rgba(255, 255, 255, 0.82);
  --forest: #173f35;
  --forest-light: #2e6657;
  --line: rgba(23, 63, 53, 0.14);
  --danger: #a13d34;
  --shadow: 0 18px 50px rgba(28, 54, 47, 0.09);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 5%, rgba(124, 161, 136, 0.3), transparent 36%),
    linear-gradient(155deg, #faf8f1 0%, #eef1e7 100%);
}

button, input, textarea, select { font: inherit; }

button { cursor: pointer; }

.hidden { display: none !important; }

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

.login-view {
  min-height: calc(100vh - 100px);
  display: grid;
  align-content: center;
  justify-items: start;
}

.login-view .card { width: 100%; margin-top: 28px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border-radius: 18px 18px 18px 4px;
  background: var(--forest);
  color: white;
  font: 700 26px/1 "Songti SC", serif;
  box-shadow: var(--shadow);
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(27px, 6vw, 40px); line-height: 1.15; letter-spacing: -0.025em; }
h2 { margin-bottom: 8px; font-size: 20px; }

.eyebrow {
  margin-bottom: 8px;
  color: var(--forest-light);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.15em;
}

.subtle { margin-bottom: 0; color: var(--muted); line-height: 1.6; }

.card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.stack { display: grid; gap: 16px; }

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input, textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(255,255,255,0.86);
  color: var(--ink);
  font-size: 16px;
}

textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--forest-light); box-shadow: 0 0 0 3px rgba(46, 102, 87, 0.12); }

button {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
}

.primary { background: var(--forest); color: #fff; }
.secondary { border: 1px solid var(--line); background: rgba(255,255,255,0.8); color: var(--forest); }
.quiet { padding-inline: 10px; background: transparent; color: var(--forest-light); }
.danger { color: var(--danger); }

.app-header, .section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.app-header { margin: 12px 2px 26px; }
.app-header h1 { max-width: 560px; }
.push-card { display: grid; gap: 18px; margin-bottom: 18px; }
.report-card { margin-bottom: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.install-hint { margin: 0; padding: 12px 14px; border-radius: 14px; background: #fff7d9; color: #725b17; line-height: 1.55; font-size: 14px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.wide { grid-column: 1 / -1; }
.message { min-height: 1.3em; margin: 12px 2px 0; color: var(--forest-light); font-size: 14px; }
.message.error { color: var(--danger); }

.compact-select { width: auto; min-width: 132px; min-height: 40px; padding: 8px 10px; font-size: 14px; }
.report-content { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink); line-height: 1.7; }
.report-content h1 { margin: 0 0 18px; font-size: 24px; }
.report-content h2 { margin: 22px 0 8px; font-size: 18px; }
.report-content h3 { margin: 18px 0 6px; font-size: 16px; }
.report-content p { margin: 8px 0; }
.report-content ul, .report-content ol { margin: 8px 0; padding-left: 24px; }
.report-content blockquote { margin: 14px 0; padding: 10px 14px; border-left: 3px solid var(--forest-light); background: rgba(46,102,87,.06); color: var(--muted); }
.report-content code { padding: 2px 5px; border-radius: 6px; background: rgba(23,63,53,.08); font-size: .9em; }

.reminders-section { margin-top: 32px; }
.reminder-list { display: grid; gap: 12px; margin-top: 14px; }
.reminder-item { padding: 17px 18px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,0.72); }
.reminder-item.disabled { opacity: 0.58; }
.reminder-top { display: flex; justify-content: space-between; gap: 14px; }
.reminder-title { margin-bottom: 5px; font-size: 17px; font-weight: 750; }
.reminder-body { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.reminder-meta { margin: 0; color: var(--forest-light); font-size: 13px; line-height: 1.5; }
.item-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 2px; margin-top: 10px; }
.item-actions button { min-height: 36px; padding: 7px 10px; font-size: 13px; }
.empty { padding: 34px 18px; border: 1px dashed var(--line); border-radius: 19px; color: var(--muted); text-align: center; }

@media (max-width: 560px) {
  .shell { padding-inline: 14px; }
  .card { padding: 19px; border-radius: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .actions button { flex: 1; }
}
