:root {
  --primary: #3d8b7d;
  --primary-dark: #1c5b53;
  --primary-light: #d9eee8;
  --p: var(--primary);
  --pd: var(--primary-dark);
  --pl: var(--primary-light);
  --bg: #f3efe4;
  --card: #fffdf8;
  --text: #1d2a28;
  --muted: #76837e;
  --amber: #a77727;
  --line: rgba(28, 91, 83, 0.12);
  --border: rgba(28, 91, 83, 0.12);
  --danger: #c44343;
  --warn: #9d6c16;
  --shadow: 0 12px 32px rgba(16, 38, 34, 0.08);
  --shadow-strong: 0 18px 42px rgba(16, 38, 34, 0.14);
  --display-font: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Songti SC", serif;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 246, 233, 0.95), transparent 28%),
    radial-gradient(circle at top right, rgba(217, 238, 232, 0.8), transparent 34%),
    linear-gradient(180deg, #f7f2e7 0%, var(--bg) 100%);
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.app {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  min-height: 100vh;
}

.task-surface {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 253, 248, 0.96), rgba(245, 239, 228, 0.98));
  border: 1px solid rgba(28, 91, 83, 0.12);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.task-surface::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at top right, rgba(61, 139, 125, 0.16), transparent 36%),
    radial-gradient(circle at bottom left, rgba(167, 119, 39, 0.12), transparent 30%);
  pointer-events: none;
}

.task-surface-body {
  position: relative;
  z-index: 1;
}

.task-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(28, 91, 83, 0.08);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.task-title {
  font-family: var(--display-font);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.task-subtitle {
  font-size: 13px;
  line-height: 1.7;
  color: #56635f;
}

.task-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(28, 91, 83, 0.08);
  color: #55625e;
  font-size: 11px;
  font-weight: 700;
}

.task-meta-pill strong {
  color: var(--primary-dark);
}

.task-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.task-primary-btn,
.task-secondary-btn {
  min-height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.task-primary-btn {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  box-shadow: 0 12px 24px rgba(28, 91, 83, 0.2);
}

.task-secondary-btn {
  background: rgba(255, 255, 255, 0.84);
  color: var(--primary-dark);
  border: 1px solid rgba(28, 91, 83, 0.12);
}

.task-primary-btn:active,
.task-secondary-btn:active {
  transform: scale(0.97);
}

.bottom-tab {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 390px;
  height: 78px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(28, 91, 83, 0.1);
  box-shadow: 0 -10px 30px rgba(18, 43, 38, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 80;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 72px;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.tab-item svg {
  width: 22px;
  height: 22px;
  color: #8a938e;
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
  color: #8a938e;
}

.tab-item.active svg,
.tab-item.active .tab-label {
  color: var(--primary-dark);
}

.tab-item.active::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--amber);
}

a:focus-visible,
button:focus-visible,
textarea:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid rgba(61, 139, 125, 0.42);
  outline-offset: 3px;
}

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