/* 기본 스타일: 디자인 토큰, 다크 모드, 모바일 우선 레이아웃 (360px 기준) */

:root {
  color-scheme: light dark;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-muted: #eef0f4;
  --text: #1b1f27;
  --text-muted: #5b6475;
  --border: #d9dde5;
  --primary: #3a5bd9;
  --primary-hover: #2f4cc0;
  --on-primary: #ffffff;
  --success: #1d7a46;
  --danger: #c2333b;
  --focus: #3a5bd9;

  --radius: 12px;
  --radius-sm: 8px;
  --gap: 16px;
  --tabbar-height: 64px;
  --font: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic",
    "Noto Sans KR", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a;
    --surface: #1b1e26;
    --surface-muted: #252935;
    --text: #e8eaf0;
    --text-muted: #a2a9b8;
    --border: #343947;
    --primary: #7f9cff;
    --primary-hover: #9ab0ff;
    --on-primary: #10131a;
    --success: #5cc98b;
    --danger: #ff7b82;
    --focus: #9ab0ff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--primary);
}

h1,
h2 {
  line-height: 1.3;
  margin: 0 0 8px;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 12px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- 레이아웃 --- */

.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px var(--gap);
}

.page--with-tabbar {
  padding-bottom: calc(var(--tabbar-height) + 24px + env(safe-area-inset-bottom));
}

.page--centered {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.muted {
  color: var(--text-muted);
}

.stack > * + * {
  margin-top: 16px;
}

/* --- 폼 --- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
}

.hint,
.field-status {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.field-status.is-ok {
  color: var(--success);
}

.field-status.is-error,
.form-error {
  color: var(--danger);
}

.form-error {
  margin: 0;
  font-size: 0.95rem;
}

/* --- 버튼 --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

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

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn--primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.9rem;
}

.btn--block {
  width: 100%;
}

.form-footer {
  text-align: center;
  margin-top: 20px;
}

/* --- 하단 탭 바 --- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.tabbar__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 480px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--tabbar-height);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: none;
}

.tabbar__item[aria-current="page"] {
  color: var(--primary);
  font-weight: 700;
}

.tabbar__item[aria-disabled="true"] {
  opacity: 0.45;
}

.tabbar__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.btn--danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn--danger.is-armed {
  background: var(--danger);
  color: var(--on-primary);
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

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

.back-link {
  display: inline-block;
  margin-bottom: 12px;
  text-decoration: none;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.status {
  min-height: 1.5em;
  margin: 0;
  font-size: 0.95rem;
  color: var(--success);
}

.status.is-error {
  color: var(--danger);
}

/* --- 루틴 카드 --- */

.routine-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.routine-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--routine-color, var(--border));
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}

a.routine-card:hover {
  border-color: var(--primary);
  border-left-color: var(--routine-color, var(--primary));
}

.routine-card__emoji {
  font-size: 1.75rem;
  line-height: 1;
}

.routine-card__body {
  flex: 1;
  min-width: 0;
}

.routine-card__name {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.routine-card__meta {
  margin: 2px 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
}

/* --- 요일 칩, 색상 견본 --- */

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
}

.chip input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.swatch span {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  background: var(--swatch, var(--surface));
}

.swatch input:checked + span {
  background: var(--swatch, var(--surface));
  border: 3px solid var(--text);
  color: var(--text);
}

.legend {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
  padding: 0;
}

.inline-fields {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.inline-fields .field {
  flex: 1;
}

.input--narrow {
  max-width: 96px;
}

/* --- 항목 목록 --- */

.item-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.item-row + .item-row {
  border-top: 1px solid var(--border);
}

.item-row[draggable="true"] {
  cursor: grab;
}

.item-row.is-dragging {
  opacity: 0.4;
}

.item-row.is-drop-target {
  box-shadow: inset 0 3px 0 var(--primary);
}

.item-row.is-editing {
  background: var(--surface-muted);
}

.item-row__emoji {
  width: 1.75rem;
  text-align: center;
  font-size: 1.25rem;
}

.item-row__body {
  flex: 1;
  min-width: 0;
}

.item-row__name {
  margin: 0;
  overflow-wrap: anywhere;
}

.item-row__duration {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.item-row__actions {
  display: flex;
  gap: 4px;
}

/* --- 탭 --- */

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.tab {
  flex: none;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.template-items {
  margin: 8px 0 12px;
  padding-left: 1.2em;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tabs--wrap {
  flex-wrap: wrap;
  overflow: visible;
}

/* --- 실행(타이머) 화면 --- */

.run__header {
  margin-bottom: 8px;
}

.run__header .back-link {
  margin-bottom: 4px;
}

.run__routine {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.run__progress {
  margin: 0;
  font-size: 0.875rem;
}

.run__current {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.run__name {
  margin: 12px 0 0;
  font-size: 1.4rem;
  overflow-wrap: anywhere;
}

.run__planned {
  margin: 0;
  font-size: 0.9rem;
}

.ring {
  position: relative;
  width: min(72vw, 280px);
  aspect-ratio: 1;
  --ring-color: var(--primary);
}

.ring.is-overtime {
  --ring-color: var(--danger);
}

.ring.is-paused {
  --ring-color: var(--text-muted);
}

.ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring__track,
.ring__bar {
  fill: none;
  stroke-width: 8;
}

.ring__track {
  stroke: var(--surface-muted);
}

.ring__bar {
  stroke: var(--ring-color);
  stroke-linecap: round;
  stroke-dasharray: 100;
  transition: stroke-dashoffset 0.25s linear;
}

.ring__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.ring__emoji {
  font-size: 2rem;
  line-height: 1;
  min-height: 2rem;
}

.ring__time {
  font-size: clamp(2.25rem, 13vw, 3.25rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ring-color);
}

.ring__caption {
  font-size: 0.85rem;
}

.run__adjust,
.run__main {
  display: grid;
  gap: 8px;
}

.run__adjust {
  grid-template-columns: 1fr 1.4fr 1fr;
}

.run__main {
  grid-template-columns: 1fr 2fr;
}

.run__main .btn {
  min-height: 56px;
  font-size: 1.05rem;
}

.run__next {
  padding: 12px 16px;
}

.run__next-label {
  margin: 0;
  font-size: 0.8rem;
}

.run__next-name {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.run__add {
  padding: 12px 16px;
}

.run__add summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.run__add[open] summary {
  margin-bottom: 12px;
}

.run-items {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.run-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.run-item + .run-item {
  border-top: 1px solid var(--border);
}

.run-item.is-current {
  background: var(--surface-muted);
  font-weight: 700;
}

.run-item--done .run-item__name,
.run-item--skipped .run-item__name {
  color: var(--text-muted);
}

.run-item--skipped .run-item__name {
  text-decoration: line-through;
}

.run-item__emoji {
  width: 1.5rem;
  text-align: center;
}

.run-item__name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.run-item__meta {
  flex: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.run__ended-emoji {
  font-size: 3rem;
  line-height: 1;
  margin: 0;
}

.run__ended-actions {
  justify-content: center;
}

/* --- 오늘 화면: 시작 버튼, 이어하기 배너 --- */

.routine-card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}

.badge-done {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
}

.resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
}

.resume-banner__name {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  min-width: 0;
}

.routine-card__edit {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* .routine-list, .run-items의 margin: 0이 .stack의 간격을 덮어쓰지 않도록 한다. */
.stack > * + .routine-list,
.stack > * + .run-items,
.stack > * + .bar-list,
.stack > * + .calendar__detail,
.stack > * + .calendar-legend {
  margin-top: 16px;
}

/* --- 실행 설정, 완료 화면 통계 --- */

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex: none;
  accent-color: var(--primary);
}

.toggle-row .hint {
  display: block;
}

.toggle-row__text {
  flex: 1;
  font-size: 0.95rem;
}

div.toggle-row {
  cursor: default;
}

.run-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 0; /* 위쪽 여백은 .stack이 정한다 */
  padding: 16px;
}

.run-stats dt {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.run-stats dd {
  margin: 2px 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.run-stats__diff {
  margin-bottom: 0;
  text-align: center;
}

.run-item__meta.is-over {
  color: var(--danger);
}

/* --- 기록(통계) 화면 --- */

/* 히트맵 단계: 한 색상(파랑) 3단계. dataviz 검증(--ordinal) 통과값.
   다크 모드는 순서를 뒤집어 "많을수록 밝게" 한다. */
:root {
  --heat-0: var(--surface-muted);
  --heat-1: #86b6ef;
  --heat-2: #3987e5;
  --heat-3: #184f95;
  --heat-ink-1: #10131a;
  --heat-ink-2: #ffffff;
  --heat-ink-3: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --heat-1: #184f95;
    --heat-2: #3987e5;
    --heat-3: #86b6ef;
    --heat-ink-1: #ffffff;
    --heat-ink-2: #ffffff;
    --heat-ink-3: #10131a;
  }
}

.period-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.period-nav__label {
  margin: 0;
  font-weight: 700;
  text-align: center;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stat-tile {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-tile--hero {
  grid-column: 1 / -1;
}

.stat-tile__label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stat-tile__value {
  margin: 2px 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-tile--hero .stat-tile__value {
  font-size: 2.25rem;
  line-height: 1.15;
}

.stat-tile__hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meter {
  height: 8px;
  margin-top: 8px;
  border-radius: 4px;
  background: var(--surface-muted);
  overflow: hidden;
}

.meter__bar {
  display: block;
  height: 100%;
  width: calc(var(--value, 0) * 100%);
  border-radius: 4px;
  background: var(--primary);
}

.calendar__title {
  margin: 0;
  font-size: 1.05rem;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar__weekday {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.heat-cell {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--heat-0);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.heat-cell:hover {
  outline: 2px solid var(--text-muted);
  outline-offset: 1px;
}

.heat-level-1 {
  background: var(--heat-1);
  color: var(--heat-ink-1);
}

.heat-level-2 {
  background: var(--heat-2);
  color: var(--heat-ink-2);
}

.heat-level-3 {
  background: var(--heat-3);
  color: var(--heat-ink-3);
}

/* 미달성은 색이 아니라 × 기호로, 오늘은 테두리로 구분한다. */
.heat-cell__mark {
  position: absolute;
  right: 3px;
  bottom: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.heat-cell--pending {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.heat-cell--future {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border);
  opacity: 0.6;
}

.calendar__detail {
  margin: 0;
  min-height: 1.5em;
  font-size: 0.875rem;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.calendar-legend li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.heat-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  font-size: 0.65rem;
}

.heat-swatch--0,
.heat-swatch--missed {
  background: var(--heat-0);
}

.heat-swatch--1 {
  background: var(--heat-1);
}

.heat-swatch--2 {
  background: var(--heat-2);
}

.heat-swatch--3 {
  background: var(--heat-3);
}

.heat-swatch--pending {
  background: var(--heat-0);
  box-shadow: inset 0 0 0 2px var(--primary);
}

/* 가로 막대: 한 계열, 두께 12px, 끝 4px 둥글게, 기준선 쪽은 각지게 */
.bar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bar-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "track track"
    "detail detail";
  gap: 2px 8px;
  align-items: center;
}

.bar-list__label {
  grid-area: label;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.bar-list__value {
  grid-area: value;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bar-list__track {
  grid-area: track;
  position: relative;
  display: block;
  height: 12px;
}

.bar-list__bar {
  display: block;
  height: 100%;
  width: max(2px, calc(var(--value, 0) * 100%));
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}

.bar-list__bar.is-over {
  background: var(--danger);
}

/* 계획 시간 눈금 */
.bar-list__tick {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: calc(var(--value, 0) * 100% - 1px);
  width: 2px;
  background: var(--text);
}

.bar-list__detail {
  grid-area: detail;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-key {
  display: inline-block;
}

.legend-key--bar {
  width: 14px;
  height: 10px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.legend-key--tick {
  width: 2px;
  height: 14px;
  margin-left: 8px;
  background: var(--text);
}

.subheading {
  margin: 16px 0 8px;
  font-size: 0.95rem;
}

.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list__row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  font-size: 0.875rem;
}

.history-list__row + .history-list__row {
  border-top: 1px solid var(--border);
}

.history-list__date {
  font-variant-numeric: tabular-nums;
}

.history-list__status {
  font-size: 0.75rem;
  font-weight: 700;
}

.history-list__status--completed {
  color: var(--success);
}

.history-list__status--aborted {
  color: var(--text-muted);
}

.history-list__meta {
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- 식물 배지 --- */

.plant-card {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
}

a.plant-card:hover {
  border-color: var(--primary);
}

.plant-card__emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.plant-card__body {
  flex: 1;
  min-width: 0;
}

.plant-card__title {
  margin: 0;
  font-weight: 700;
}

.plant-card__hint {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- 일기 --- */

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.mood-picker .chip span {
  min-width: 44px;
  font-size: 1.25rem;
}

.diary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.diary-entry {
  padding: 16px;
}

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

.diary-entry__mood {
  font-size: 1.4rem;
  line-height: 1;
}

.diary-entry__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.diary-entry__content {
  margin: 8px 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.diary-entry__actions {
  margin: 0;
}
