.wish-banner {
  background: linear-gradient(135deg, #fffbeb, #fef9c3);
  border: 1.5px solid #fde68a;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

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

.wish-banner .wish-label {
  font-size: 11px;
  color: #92400e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.wish-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(146, 64, 14, .15);
  background: rgba(255,255,255,.7);
  color: #92400e;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.wish-preview {
  font-size: 15px;
  line-height: 1.5;
  color: #78350f;
  font-weight: 500;
}

.wish-expanded {
  display: none;
  margin-top: 10px;
  font-size: 14px;
  color: #92400e;
  line-height: 1.7;
  white-space: pre-wrap;
}

.wish-banner.open .wish-expanded { display: block; }

.score-block {
  text-align: center;
  padding: 10px 0 14px;
}

.score-top-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .8px;
  color: var(--muted);
  margin-bottom: 8px;
}

.score-number {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
}

.score-number.positive { color: var(--green); }
.score-number.negative { color: var(--red); }
.score-number.zero { color: var(--muted); }

.score-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 500;
}

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

.today-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.7);
}

.section-tone-morning {
  background: linear-gradient(180deg, #fbfefc 0%, #f7fcf8 100%);
  border-color: #edf7ef;
}

.section-tone-day {
  background: linear-gradient(180deg, #f8fdf9 0%, #f1faf3 100%);
  border-color: #e7f3ea;
}

.section-tone-evening {
  background: linear-gradient(180deg, #f6fcf7 0%, #eef8f0 100%);
  border-color: #e1efe5;
}

.section-tone-general {
  background: linear-gradient(180deg, #f3fbf5 0%, #ebf7ee 100%);
  border-color: #dceee2;
}

.section-tone-minus {
  background: linear-gradient(180deg, #fff1f4 0%, #ffe8ec 100%);
  border-color: #efc7d0;
}

.section-tone-notes {
  background: linear-gradient(180deg, #fffdf7 0%, #fff9ea 100%);
  border-color: #f4ead0;
}

.daily-recommendation-inline {
  position: relative;
  margin: 0 0 10px;
  display: grid;
  justify-items: center;
  gap: 0;
}

.daily-recommendation-inline.open {
  gap: 8px;
}

.daily-recommendation-inline::before {
  content: "";
  position: absolute;
  inset: 0 18px auto;
  height: 72px;
  border-radius: 999px;
  background:
    radial-gradient(circle at left center, rgba(38, 179, 88, 0.10), transparent 42%),
    radial-gradient(circle at right center, rgba(214, 163, 58, 0.16), transparent 48%);
  filter: blur(10px);
  pointer-events: none;
  opacity: 0.9;
}

.daily-recommendation-panel {
  min-height: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
  width: min(100%, 352px);
}

.daily-recommendation-panel[data-collapse-open="1"] {
  border-radius: 24px;
  border: 1px solid rgba(204, 173, 97, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 228, 0.94) 100%);
  box-shadow: var(--shadow-sm);
}

#daily-recommendation-toggle {
  position: relative;
  z-index: 1;
  width: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 228, 0.96) 100%);
  border: 1px solid rgba(204, 173, 97, 0.24);
  box-shadow:
    0 10px 26px rgba(120, 93, 32, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  color: #7a5a1c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  opacity: 1;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    color .18s ease;
}

#daily-recommendation-toggle::before {
  content: "✦";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(245, 203, 92, 0.34) 0%, rgba(70, 182, 101, 0.18) 100%);
  color: #6a4d18;
  font-size: 9px;
  line-height: 1;
}

#daily-recommendation-toggle::after {
  content: "▾";
  font-size: 11px;
  color: rgba(122, 90, 28, 0.72);
  transition: transform .18s ease;
}

.daily-recommendation-inline.open #daily-recommendation-toggle {
  transform: translateY(-1px);
  border-color: rgba(76, 148, 81, 0.28);
  box-shadow:
    0 16px 32px rgba(120, 93, 32, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.daily-recommendation-inline.open #daily-recommendation-toggle::after {
  transform: rotate(180deg);
}

.daily-recommendation-copy {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px 18px 20px;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  line-height: 1.74;
  color: #44331a;
  text-align: left;
  word-break: break-word;
  opacity: 1;
}

.daily-recommendation-copy[data-state="idle"] {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.daily-recommendation-shell {
  display: none;
  gap: 14px;
}

.daily-recommendation-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8d6c2c;
}

.daily-recommendation-paragraphs {
  display: grid;
  gap: 14px;
}

.daily-recommendation-paragraph {
  margin: 0;
}

.daily-recommendation-status {
  display: none;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #7a5a1c;
}

#daily-recommendation-body[data-state="loading"] .daily-recommendation-status,
#daily-recommendation-body[data-state="error"] .daily-recommendation-status {
  display: flex;
}

#daily-recommendation-body[data-state="ready"] .daily-recommendation-shell {
  display: grid;
}

.daily-recommendation-status::before {
  content: "✦";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(245, 203, 92, 0.36) 0%, rgba(70, 182, 101, 0.22) 100%);
  color: #6a4d18;
  box-shadow: 0 8px 18px rgba(120, 93, 32, 0.10);
}

#daily-recommendation-body[data-state="loading"],
#daily-recommendation-body[data-state="error"] {
  padding: 12px 14px;
}

.daily-recommendation-copy[data-state="loading"] .daily-recommendation-status::before {
  animation: dailyRecommendationPulse 1.4s ease-in-out infinite;
}

.daily-recommendation-copy[data-state="error"] {
  border-color: rgba(214, 131, 92, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 252, 249, 0.98) 0%, rgba(255, 243, 236, 0.96) 100%);
}

.daily-recommendation-copy[data-state="error"] .daily-recommendation-status {
  color: #9a5a36;
}

.daily-recommendation-copy[data-state="error"] .daily-recommendation-status::before {
  background: linear-gradient(180deg, rgba(255, 181, 149, 0.42) 0%, rgba(255, 224, 197, 0.24) 100%);
  color: #9a5a36;
}

@keyframes dailyRecommendationPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 18px rgba(120, 93, 32, 0.10);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 12px 22px rgba(120, 93, 32, 0.16);
  }
}

.today-section-head {
  width: 100%;
  border: none;
  background: transparent;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  color: var(--text);
}

.today-section-arrow {
  color: var(--muted);
  transition: transform .18s ease;
}

.today-section.open .today-section-arrow {
  transform: rotate(180deg);
}

.today-section-body {
  min-height: 0;
  contain: layout paint;
}

.today-section-content {
  padding: 0 12px 12px;
}

.today-section:not(.open) .today-section-body {
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.today-section.open .today-section-body {
  opacity: 1;
  pointer-events: auto;
}

.habit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: rgba(255,255,255,.7);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    border-color .15s ease,
    background-color .15s ease;
  border: 1.5px solid transparent;
}

.habit-item:active { transform: scale(.98); }
.habit-item.checked-item { border-color: var(--green-light); background: #f0fdf4; }

.habit-checkbox {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.habit-checkbox.checked.plus {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 2px 6px rgba(22,163,74,.3);
}

.habit-checkbox.checked.minus {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 2px 6px rgba(220,38,38,.3);
}

.habit-checkbox.checked::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: 800;
}

.habit-item-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.habit-name { font-size: 15px; font-weight: 500; line-height: 1.35; }
.habit-focus-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: #0f7a54;
  font-size: 11px;
  vertical-align: text-top;
}
.habit-description {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  word-break: break-word;
}
.habit-weight { font-size: 14px; color: var(--muted); font-weight: 700; min-width: 30px; text-align: right; }

.diary-textarea {
  width: 100%;
  min-height: 110px;
  padding: 14px 16px;
  border: 1.5px solid rgba(229,231,235,.9);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.75;
  resize: vertical;
  outline: none;
  font-family: inherit;
  color: var(--text);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-sm);
}

.diary-textarea::placeholder {
  color: #a7afbc;
  white-space: pre-line;
}

.diary-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.08);
  background: white;
}

.today-section.open .diary-textarea {
  min-height: 260px;
}

/* ===== live goals ===== */

.goal-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.goal-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goal-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 16px;
}

.goal-item-index {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(40, 29, 16, 0.58);
  background: rgba(255, 252, 247, 0.72);
  border: 1px solid rgba(154, 116, 40, 0.12);
}

.goal-check-btn {
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}

.goal-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.68);
  border: 1px solid rgba(154, 116, 40, 0.12);
}

.goal-editor[hidden] {
  display: none;
}

.goal-textarea {
  min-height: 138px;
  resize: vertical;
}

.today-section.open .goal-textarea {
  min-height: 138px;
}

.goal-editor-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.goal-edit-toggle,
.goal-save-btn {
  min-height: 42px;
  border: 1px solid rgba(154, 116, 40, 0.16);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.86);
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.goal-save-btn {
  padding: 0 16px;
  background: linear-gradient(135deg, #24180d 0%, #6b4a18 58%, #a57c2c 100%);
  color: #fffef9;
}

.goal-save-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.goal-empty {
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px dashed rgba(154, 116, 40, 0.18);
  background: rgba(255, 252, 247, 0.62);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.goal-card-status {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.goal-card-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 4px;
}

.goal-card-meta {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ===== today usage guide ===== */

.today-usage-guide {
  position: relative;
  overflow: hidden;
  margin: 2px 0 2px;
  padding: 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(202,166,75,.14), transparent 30%),
    radial-gradient(circle at bottom left, rgba(15,107,82,.10), transparent 28%),
    linear-gradient(180deg, rgba(255,249,237,.97) 0%, rgba(246,236,211,.93) 100%);
  border: 1px solid rgba(202,166,75,.18);
  box-shadow: var(--shadow-sm);
}

.today-usage-guide::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(215,184,106,1) 0%, rgba(154,116,40,1) 48%, rgba(15,107,82,1) 100%);
}

.today-usage-guide-head {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

.today-usage-guide-kicker {
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .9px;
  font-weight: 800;
  color: #8a6928;
  margin-bottom: 6px;
}

.today-usage-guide-title {
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
  color: #23180c;
}

.today-usage-guide-subtitle {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.68;
  color: #5c4a26;
}

.today-usage-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.today-usage-guide-card {
  position: relative;
  min-width: 0;
  padding: 14px 14px 13px;
  border-radius: 16px;
  border: 1px solid rgba(202,166,75,.16);
  background: rgba(255,252,246,.82);
  box-shadow: 0 8px 18px rgba(56, 39, 10, 0.06);
}

.today-usage-guide-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  opacity: .95;
}

.today-usage-guide-card-habits::before {
  background: linear-gradient(180deg, #0f6b52 0%, #0b4f3d 100%);
}

.today-usage-guide-card-notes::before {
  background: linear-gradient(180deg, #caa64b 0%, #8a6928 100%);
}

.today-usage-guide-card-label {
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .7px;
  font-weight: 800;
  color: #8a6928;
  margin-bottom: 6px;
}

.today-usage-guide-card-title {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  color: #23180c;
  margin-bottom: 6px;
}

.today-usage-guide-card-text {
  font-size: 13px;
  line-height: 1.64;
  color: #5c4a26;
}

@media (max-width: 640px) {
  .today-usage-guide {
    padding: 14px;
    border-radius: 16px;
  }

  .today-usage-guide-title {
    font-size: 15px;
  }

  .today-usage-guide-subtitle,
  .today-usage-guide-card-text {
    font-size: 12px;
    line-height: 1.6;
  }

  .today-usage-guide-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .today-usage-guide-card {
    padding: 12px 12px 11px;
    border-radius: 14px;
  }
}

/* ===== today section dividers ===== */

.today-section-divider {
  position: relative;
  overflow: hidden;
  margin: 4px 0 2px;
  padding: 14px 16px 13px;
  border-radius: 18px;
  border: 1px solid rgba(202,166,75,.16);
  box-shadow: var(--shadow-sm);
}

#today-habits-guide .today-section-divider {
  margin-top: 0;
}

.today-section-divider::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(215,184,106,1) 0%, rgba(154,116,40,1) 50%, rgba(15,107,82,1) 100%);
}

.today-section-divider-habits {
  background:
    radial-gradient(circle at top right, rgba(15,107,82,.10), transparent 28%),
    linear-gradient(180deg, rgba(255,249,237,.97) 0%, rgba(246,236,211,.93) 100%);
}

.today-section-divider-journal {
  background:
    radial-gradient(circle at top right, rgba(202,166,75,.14), transparent 30%),
    linear-gradient(180deg, rgba(255,249,237,.97) 0%, rgba(247,238,216,.93) 100%);
}

.today-section-divider-kicker {
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 800;
  color: #8a6928;
  margin-bottom: 5px;
}

.today-section-divider-title {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
  color: #23180c;
  margin-bottom: 6px;
}

.today-section-divider-text {
  font-size: 13px;
  line-height: 1.62;
  color: #5c4a26;
}

@media (max-width: 640px) {
  .today-section-divider {
    padding: 12px 14px 11px;
    border-radius: 16px;
  }

  .today-section-divider-title {
    font-size: 15px;
  }

  .today-section-divider-text {
    font-size: 12px;
    line-height: 1.56;
  }
}

@media (max-width: 768px) {
  .goal-card {
    flex-direction: column;
  }
}
