/* =========================================
   小事胶囊 APP V2 — Figma 精确还原样式
   设计稿: 852 x 1848px → 目标 393 x 852px
   缩放比: 393/852 ≈ 0.461
   ========================================= */

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100%;
  height: 100%;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  background: #f0ebe5;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* ─── Phone Wrapper ─── */
.phone-wrapper {
  width: 393px;
  height: 852px;
  overflow: hidden;
  position: relative;
  border-radius: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.phone {
  width: 852px;
  height: 1848px;
  transform: scale(0.461);
  transform-origin: top left;
  position: absolute;
  top: 0;
  left: 0;
}

/* ─── Page Switching ─── */
.page {
  display: none;
  width: 852px;
  height: 1848px;
  position: absolute;
  top: 0;
  left: 0;
}
.page.active {
  display: block;
}

/* ─── Colors ─── */
:root {
  --bg-warm: #fff8ef;
  --card-bg: #fffdf8;
  --card-stroke: #f5d6b6;
  --red: #f7604f;
  --red-dark: #f0473a;
  --red-light: #ff6f60;
  --green: #7cc465;
  --green-light: #eaf6d9;
  --green-text: #259034;
  --blue-light: #e1f0ff;
  --blue-text: #0c83db;
  --text-dark: #2b1d1c;
  --text-body: #4c332d;
  --text-light: #8c756d;
  --stroke: #f1c79e;
  --stroke-dark: #e9b37f;
  --orange-light: #fff7ea;
  --shadow: rgba(138, 82, 35, 0.08);
  --nav-height: 128px;
}

/* ─── Bottom Navigation ─── */
.bottom-nav {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 852px;
  height: 128px;
  background: #fffdf8;
  border-radius: 48px 48px 0 0;
  border: 1px solid #f4d9bd;
  box-shadow: 0 8px 24px rgba(128, 78, 36, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 20px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  gap: 6px;
  width: 76px;
}

.nav-item .nav-icon {
  width: 56px;
  height: 56px;
  transition: opacity 0.3s;
}
.nav-item.active .nav-icon-inactive {
  display: none;
}
.nav-item:not(.active) .nav-icon-active {
  display: none;
}

.nav-item .nav-label {
  font-size: 22px;
  font-weight: 600;
  color: #4c332d;
}

.nav-item.active .nav-label {
  color: #f0473a;
}

.nav-add {
  width: 130px;
  height: 130px;
  cursor: pointer;
  margin-top: -40px;
  filter: drop-shadow(0 10px 24px rgba(247, 96, 79, 0.32));
}

.nav-add img {
  width: 130px;
  height: 130px;
  display: block;
}

/* ─── Home Page ─── */
.home-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  background: #fff8ef;
}
.home-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  object-fit: cover;
}
.gacha-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 836px;
  object-fit: cover;
}

.gacha-btn {
  position: absolute;
  right: 240px;
  top: 560px;
  width: 140px;
  height: 140px;
  cursor: pointer;
  z-index: 2;
  transition:
    transform 0.15s,
    opacity 0.3s;
  object-fit: contain;
}
.gacha-btn:active {
  transform: scale(0.88);
}
.gacha-btn.disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* ═══ 扭蛋机提示文字（内容卡片内） ═══ */
.gacha-hint {
  padding: 6px 0 12px;
  text-align: left;
}
.gacha-hint-text {
  font-size: 24px;
  font-weight: 500;
  color: #a08060;
}

.gacha-open-btn {
  position: absolute;
  left: 50%;
  top: 470px;
  width: 336px;
  height: 336px;
  cursor: pointer;
  z-index: 4;
  object-fit: contain;
  animation: gachaFadeIn 0.3s ease;
  transform: translateX(-50%);
}
.gacha-open-btn:active {
  transform: translateX(-50%) scale(0.88);
}

/* ═══ 扭蛋机视频动画遮罩 ═══ */
.gacha-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 836px;
  z-index: 3;
  animation: gachaFadeIn 0.3s ease;
  overflow: hidden;
}
.gacha-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes gachaFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ═══ 扭蛋机结果 — 任务卡片 ═══ */
.gacha-result-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 60px 40px;
  z-index: 5;
  pointer-events: auto;
  cursor: pointer;
}
.gacha-result-card {
  width: 100%;
  max-width: 660px;
  background: rgba(255, 249, 239, 0.96);
  border-radius: 28px;
  padding: 30px 36px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  animation: gachaCardSlideUp 0.5s ease forwards;
  opacity: 0;
  transform: translateY(30px);
  text-align: left;
}
.gacha-result-card:nth-child(1) {
  animation-delay: 0.05s;
}
.gacha-result-card:nth-child(2) {
  animation-delay: 0.2s;
}
.gacha-result-card:nth-child(3) {
  animation-delay: 0.35s;
}

@keyframes gachaCardSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gacha-result-goal {
  font-size: 24px;
  font-weight: 600;
  color: #8b7355;
  margin-bottom: 6px;
}
.gacha-result-task {
  font-size: 34px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
}
.gacha-result-badges {
  display: flex;
  gap: 14px;
}
.gacha-result-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 100px;
  font-size: 22px;
  font-weight: 500;
}

/* ═══ 扭蛋机结果 — 关闭提示 ═══ */
.gacha-result-close-hint {
  color: rgba(255, 255, 255, 0.7);
  font-size: 22px;
  text-align: center;
  margin-top: 10px;
  animation: gachaFadeIn 0.6s ease 0.6s forwards;
  opacity: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Weather Card */
.weather-card {
  position: absolute;
  left: 54px;
  top: 88px;
  width: 630px;
  height: 88px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid #f1bc85;
  border-radius: 32px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 10;
}
.weather-icon {
  font-size: 40px;
  line-height: 1;
}
.weather-label {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
}
.weather-divider {
  width: 2px;
  height: 34px;
  background: #dca36f;
  flex-shrink: 0;
}
.weather-status {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
}
.weather-temp {
  font-size: 38px;
  font-weight: 700;
  color: #f0473a;
  margin-left: auto;
}

/* Content Card */
.content-card {
  position: absolute;
  left: 26px;
  top: 805px;
  width: 800px;
  max-height: 895px;
  overflow: hidden;
  background: #fffdf8;
  border-radius: 36px;
  border: 1px solid var(--card-stroke);
  box-shadow: 0 10px 28px var(--shadow);
  padding: 16px 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
}
.goal-section {
  flex-shrink: 0;
}
.plan-section {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 8px;
}
.plan-section::-webkit-scrollbar {
  width: 4px;
}
.plan-section::-webkit-scrollbar-track {
  background: transparent;
}
.plan-section::-webkit-scrollbar-thumb {
  background: #e2a06a;
  border-radius: 2px;
}

/* Goal Header */
.goal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  margin-bottom: 8px;
}
.goal-header-icon {
  width: 49px;
  height: 49px;
}
.goal-header-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark);
}
.goal-change-btn {
  margin-left: auto;
  padding: 10px 18px;
  background: #fff9f3;
  border: 1.5px solid #f1bc85;
  border-radius: 28px;
  font-size: 24px;
  font-weight: 600;
  color: #f0473a;
  cursor: pointer;
}

/* Goal Tags */
.goal-tags {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.goal-tag {
  flex: 1;
  height: 74px;
  border-radius: 20px;
  border: 2px solid #e9b37f;
  background: #fff7ea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0 20px;
  position: relative;
}

.goal-tag.active {
  background: #ff6f60;
  border-color: #ff5a4d;
  color: #fff;
}
.goal-tag .tag-checkmark {
  display: none;
  width: 32px;
  height: 32px;
  background: #f0473a;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -10px;
  right: -10px;
}
.goal-tag.active .tag-checkmark {
  display: flex;
}

/* Expired/completed goal tags */
.goal-tag.completed {
  background: #e8e0d8;
  border-color: #d0c8c0;
  color: #8c8c8c;
  opacity: 0.7;
}
.goal-tag.completed .tag-checkmark {
  display: none;
}
.goal-tag .tag-completed-badge {
  display: none;
}
.goal-tag.completed .tag-completed-badge {
  display: flex;
  font-size: 18px;
  color: #fff;
  background: #bbb;
  border-radius: 12px;
  padding: 2px 8px;
  position: absolute;
  top: -8px;
  right: -8px;
}

/* Goal Task Cards (from gacha) — Figma 推荐任务卡样式 */
.goal-tasks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
.goal-task-card {
  flex: 1;
  min-width: 0;
  background: #fff9ef;
  border: 1px solid #f0cbae;
  border-radius: 24px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.goal-task-card .gt-main-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.goal-task-card .gt-header {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.goal-task-card .gt-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #f5e6d3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
}
.goal-task-card .gt-icon-player {
  background: none;
  border-radius: 0;
}
.goal-task-card .gt-player-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
.goal-task-card .gt-info {
  flex: 1;
  min-width: 0;
}
.goal-task-card .gt-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.goal-task-card .gt-badges {
  display: flex;
  gap: 10px;
}
.goal-task-card .gt-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 24px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}
.goal-task-card .gt-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.goal-task-card .gt-btn-complete {
  width: 150px;
  height: 60px;
  background: #7cc465;
  border: 1px solid #6aad55;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  user-select: none;
}
.goal-task-card .gt-btn-swap {
  width: 150px;
  height: 60px;
  background: #fffdf9;
  border: 1px solid #f8a327;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #333;
  cursor: pointer;
  user-select: none;
}
.goal-task-card .gt-expand-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.goal-task-card .gt-expand-btn.expanded {
  transform: rotate(180deg);
}
.goal-task-card .gt-detail-panel {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0cbae;
}
.goal-task-card .gt-detail-panel.open {
  display: block;
}
.goal-task-card .gt-detail-row {
  font-size: 24px;
  color: #666;
  line-height: 1.6;
  padding: 3px 0;
}
.goal-task-card .gt-detail-tip {
  margin-top: 8px;
  padding: 10px 16px;
  background: #f5e6d3;
  border-radius: 12px;
  color: #8b6b4a;
}
.goal-task-card .gt-detail-section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.goal-task-card .gt-detail-note-item {
  background: #fef9f4;
  border: 1px solid #f0dcc8;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.goal-task-card .gt-detail-note-title {
  font-size: 23px;
  font-weight: 600;
  color: #5a4030;
  line-height: 1.4;
}
.goal-task-card .gt-detail-note-content {
  font-size: 21px;
  color: #8a7a6a;
  line-height: 1.5;
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid #f0dcc8;
}
.goal-task-card .gt-detail-note-diff {
  display: inline-block;
  font-size: 18px;
  color: #fff;
  background: #d4a373;
  border-radius: 8px;
  padding: 2px 10px;
  margin-top: 6px;
}

/* Plan Header */
.plan-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fffdf8;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 12px;
  padding-bottom: 4px;
}
.plan-header-icon {
  width: 49px;
  height: 49px;
  object-fit: cover;
}
.plan-header-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark);
}
.plan-add-btn {
  margin-left: auto;
  padding: 10px 18px;
  background: #fff9f3;
  border: 1.5px solid #f1bc85;
  border-radius: 28px;
  font-size: 24px;
  font-weight: 600;
  color: #f0473a;
  cursor: pointer;
}

/* Plan List */
.plan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: hidden;
  padding-right: 4px;
}
.plan-item {
  width: 756px;
  height: 100px;
  flex-shrink: 0;
  background: #fff9f1;
  border: 1px solid #f1c79e;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  position: relative;
}
.plan-delete-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  background: #f7604f;
  color: #fff;
  border-radius: 50%;
  font-size: 24px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  user-select: none;
}
.plan-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #e2a06a;
  background: #fffdf9;
  cursor: pointer;
  flex-shrink: 0;
}
.plan-check.checked {
  background: #7cc465;
  border-color: #7cc465;
  position: relative;
}
.plan-check.checked::after {
  content: "✓";
  color: #fff;
  font-size: 16px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.plan-text {
  flex: 1;
  font-size: 30px;
  font-weight: 400;
  color: var(--text-dark);
}
.plan-tag {
  height: 48px;
  border-radius: 24px;
  padding: 0 18px;
  font-size: 22px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.tag-study {
  background: #eaf6d9;
  color: #259034;
  border: 1px solid #d4e8c0;
}
.tag-fun {
  background: #ffebe5;
  color: #f7604f;
  border: 1px solid #ffd5cc;
}
.tag-work {
  background: #e1f0ff;
  color: #0c83db;
  border: 1px solid #c8e4fa;
}
.tag-sport {
  background: #fbe6bb;
  color: #eb5757;
  border: 1px solid #ebcb57;
}
.tag-diet {
  background: #d1f0fb;
  color: #57adeb;
  border: 1px solid #a8def7;
}
.tag-life {
  background: #d9f5e4;
  color: #196556;
  border: 1px solid #b8e8cc;
}
.tag-food {
  background: #ffebe5;
  color: #f7604f;
  border: 1px solid #ffd5cc;
}
.tag-custom {
  background: #f0ebe5;
  color: #6b5b55;
  border: 1px solid #d4ccc7;
}

/* Urgency Tag */
.plan-urgency {
  height: 36px;
  border-radius: 18px;
  padding: 0 12px;
  font-size: 19px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 2px;
}
.plan-urgency.urgent-important {
  background: #fff0ee;
  color: #d1453b;
  border: 1px solid #fccac4;
}
.plan-urgency.urgent-not {
  background: #fff6e5;
  color: #c7912e;
  border: 1px solid #f5deb4;
}
.plan-urgency.important-not {
  background: #ecf7ff;
  color: #2f8bc9;
  border: 1px solid #c3def7;
}
.plan-urgency.not-urgent-not {
  background: #f2f2f2;
  color: #888888;
  border: 1px solid #ddd;
}

/* ─── Goal Empty State ─── */
.goal-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  text-align: center;
}
.goal-empty.show {
  display: flex;
}
.goal-empty-icon {
  font-size: 80px;
  margin-bottom: 20px;
}
.goal-empty-text {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 28px;
}
.goal-empty-btn {
  padding: 16px 48px;
  background: var(--red);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(247, 96, 79, 0.35);
  transition: transform 0.2s;
}
.goal-empty-btn:active {
  transform: scale(0.95);
}

/* ─── Plan Empty State ─── */
.plan-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0 20px;
  text-align: center;
}
.plan-empty.show {
  display: flex;
}
.plan-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.plan-empty-text {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 24px;
}
.plan-empty-btn {
  padding: 14px 44px;
  background: var(--red);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(247, 96, 79, 0.35);
  transition: transform 0.2s;
}
.plan-empty-btn:active {
  transform: scale(0.95);
}

/* ─── Diary Page ─── */
.diary-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  background: image-set(
      url("../assets/日记页面/暖色背景.webp") type("image/webp"),
      url("../assets/日记页面/暖色背景.png") type("image/png")
    )
    no-repeat center top / 852px 1848px;
}

.diary-header {
  position: absolute;
  top: 100px;
  left: 48px;
  z-index: 10;
}
.diary-title {
  font-size: 54px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.diary-subtitle {
  font-size: 28px;
  font-weight: 400;
  color: var(--text-body);
}

.diary-content {
  position: absolute;
  top: 300px;
  left: 0;
  width: 852px;
  z-index: 10;
  padding: 0 29px;
}

/* Calendar Card */
.calendar-card {
  width: 784px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #f5d6b6;
  border-radius: 32px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 28px 32px;
  margin-bottom: 28px;
}

.cal-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}
.cal-arrow {
  font-size: 44px;
  color: #ffb575;
  cursor: pointer;
  width: 44px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.cal-month-text {
  font-size: 34px;
  font-weight: 600;
  color: #1e1714;
  min-width: 180px;
  text-align: center;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 26px;
  color: var(--text-body);
  margin-bottom: 12px;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 8px;
}
.cal-day {
  font-size: 30px;
  color: #1e1714;
  padding: 12px 0;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
}
.cal-day.selected {
  color: #fff;
}
.cal-day .day-bg {
  position: absolute;
  width: 62px;
  height: 62px;
  background: #f7604f;
  border-radius: 50%;
  z-index: -1;
}
.cal-day .day-dot {
  position: absolute;
  bottom: 6px;
  width: 12px;
  height: 12px;
  background: #f7604f;
  border-radius: 50%;
}

/* Diary Review Card */
.diary-review-card {
  width: 784px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #f5d6b6;
  border-radius: 32px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 24px 28px;
  position: relative;
  min-height: 400px;
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.review-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
}
.review-all {
  font-size: 24px;
  color: #8b4f3a;
  cursor: pointer;
}
.review-divider {
  width: 100%;
  height: 1px;
  background: #eed8c1;
  margin-bottom: 20px;
}

/* Timeline */
.review-timeline {
  position: relative;
  min-height: 200px;
}
.timeline-item {
  display: flex;
  gap: 0;
  position: relative;
  margin-bottom: 20px;
  min-height: 60px;
}
.timeline-time-col {
  width: 100px;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 4px;
  padding-right: 12px;
}
.timeline-time {
  font-size: 24px;
  color: var(--text-body);
  white-space: nowrap;
}
.timeline-mid {
  width: 30px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.timeline-dot {
  width: 20px;
  height: 20px;
  background: #f7604f;
  border-radius: 50%;
  flex-shrink: 0;
  z-index: 1;
  margin-top: 4px;
}
.timeline-line {
  width: 2px;
  flex: 1;
  background: #e2a06a;
  min-height: 20px;
}
.timeline-item:last-child .timeline-line {
  display: none;
}
.timeline-body {
  flex: 1;
  padding-left: 16px;
}
.timeline-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.timeline-desc {
  font-size: 26px;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 8px;
}
.timeline-tag {
  display: inline-flex;
  height: 46px;
  border-radius: 24px;
  padding: 0 16px;
  align-items: center;
  font-size: 24px;
  font-weight: 600;
}
.timeline-tag.life {
  background: #fff8ee;
  border: 1px solid #ffd6a1;
  color: #d4873a;
}
.timeline-tag.study {
  background: #eaf6d9;
  border: 1px solid #d4e8c0;
  color: #259034;
}
.timeline-tag.food {
  background: #ffebe5;
  border: 1px solid #ffd5cc;
  color: #f7604f;
}
.timeline-tag.sport {
  background: #fbe6bb;
  border: 1px solid #ebcb57;
  color: #eb5757;
}
.timeline-tag.custom {
  background: #f0ebe5;
  border: 1px solid #d4ccc7;
  color: #6b5b55;
}
.timeline-tag.travel {
  background: #e8f4f0;
  border: 1px solid #b5dfd0;
  color: #2d8f7a;
}

/* ─── Plan Timeline (Diary) ─── */
.plan-timeline {
  position: relative;
  min-height: 100px;
}
.plan-timeline-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff9f1;
  border: 1px solid #f1c79e;
  border-radius: 20px;
  margin-bottom: 16px;
}
.plan-timeline-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #e2a06a;
  background: #fffdf9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
}
.plan-timeline-check.checked {
  background: #7cc465;
  border-color: #7cc465;
}
.plan-timeline-check.checked::after {
  content: "✓";
}
.plan-timeline-text {
  flex: 1;
  font-size: 26px;
  color: var(--text-dark);
}
.plan-timeline-text.done {
  text-decoration: line-through;
  color: #aaa;
}
.plan-timeline-tag {
  height: 41px;
  border-radius: 20px;
  padding: 0 16px;
  font-size: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* Goal tag for diary timeline */
.timeline-tag.goal {
  background: #efe3ff;
  border: 1px solid #d5b8f5;
  color: #8b4dcf;
}

.review-btn {
  width: 626px;
  height: 70px;
  background: linear-gradient(180deg, #ff7e6d, #f7604f);
  border-radius: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 24px auto 0;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(247, 96, 79, 0.24);
}

/* ─── Review Tabs ─── */
.review-tabs {
  display: flex;
  gap: 0;
  margin-left: auto;
  flex-shrink: 0;
}
.review-tab {
  padding: 6px 24px;
  font-size: 24px;
  font-weight: 600;
  color: #8c756d;
  background: #f5ede6;
  border: 1px solid #e2c9b8;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}
.review-tab:first-child {
  border-radius: 20px 0 0 20px;
}
.review-tab:last-child {
  border-radius: 0 20px 20px 0;
}
.review-tab.active {
  background: #f7604f;
  border-color: #f7604f;
  color: #fff;
}

/* ─── Diary Entry View (AI Diary) ─── */
.diary-entry-view {
  min-height: 200px;
  padding: 8px 0;
}
.diary-entry-empty {
  text-align: center;
  padding: 60px 0;
  font-size: 26px;
  color: #8c756d;
}
.diary-entry-card {
  background: #fffdf8;
  border: 1px solid #f5d6b6;
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: 0 4px 12px rgba(138, 82, 35, 0.06);
}
.diary-entry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3e3dc;
}
.diary-entry-date {
  font-size: 28px;
  font-weight: 700;
  color: #2b1d1c;
}
.diary-entry-mood {
  font-size: 32px;
  margin-left: auto;
}
.diary-entry-body {
  font-size: 26px;
  color: #4c332d;
  line-height: 1.8;
  white-space: pre-wrap;
}
.diary-entry-body p {
  margin-bottom: 12px;
}
.diary-entry-divider {
  height: 1px;
  background: #f3e3dc;
  margin: 16px 0;
}
.diary-entry-images {
  padding: 0;
}
.diary-entry-images .timeline-images {
  margin-top: 0;
}

/* ─── Diary Input Modal ─── */
.diary-input-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.diary-input-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.diary-input-box {
  width: 700px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 28px;
  padding: 28px 36px 32px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}
.diary-input-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.diary-close-btn {
  width: 61px;
  height: 60px;
  background: #fffaf3;
  border: 1px solid #e9b37f;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #33363f;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.diary-close-btn:active {
  background: #f5ede4;
}
.diary-input-textarea {
  width: 100%;
  min-height: 280px;
  border: 2px solid #f1cfc8;
  border-radius: 16px;
  padding: 16px;
  font-size: 24px;
  font-family: inherit;
  color: #2b1d1c;
  resize: none;
  outline: none;
  box-sizing: border-box;
  line-height: 1.6;
  background: #fffdfc;
}
.diary-input-textarea:focus {
  border-color: #f7604f;
}
.diary-input-textarea::placeholder {
  color: #b5a59d;
  white-space: pre-line;
}

/* ─── Datetime row ─── */
.diary-datetime-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.diary-date {
  font-size: 24px;
  font-weight: 400;
  color: #444;
}
.diary-time {
  font-size: 24px;
  font-weight: 400;
  color: #444;
}

/* ─── Separator ─── */
.diary-separator {
  height: 2px;
  background: #f3e3dc;
  margin: 16px 0;
}

/* ─── Mood section ─── */
.diary-mood-label {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}
.diary-mood-options {
  display: flex;
  gap: 12px;
  margin: 0 0 4px;
}
.diary-mood-option {
  flex: 1;
  padding: 14px 0;
  border-radius: 15.5px;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 2px solid #f3c9c4;
  background: #fffdfb;
  color: #f36b5e;
  user-select: none;
  transition: all 0.2s;
}
.diary-mood-option.active {
  background: #f36b5e;
  border-color: #f36b5e;
  color: #fff;
}

/* ─── Text label ─── */
.diary-text-label {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Char count ─── */
.diary-char-count {
  text-align: right;
  font-size: 16px;
  color: #999;
  margin-top: 6px;
}

/* ─── Photo section ─── */
.diary-photo-label {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.diary-photo-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.diary-photo-btn {
  flex: 1;
  padding: 18px 0;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 2px solid #f1cfc8;
  background: #fffdfb;
  color: #f36b5e;
  user-select: none;
  transition: all 0.2s;
}
.diary-photo-btn:active {
  background: #fff1e0;
  border-color: #f7604f;
}

/* ─── Tag label ─── */
.diary-tag-label {
  font-size: 24px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

/* ─── Tag styles ─── */
.diary-input-tags {
  display: flex;
  gap: 12px;
  margin: 0 0 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.diary-input-tag {
  padding: 8px 20px;
  border-radius: 14.5px;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid #f3c9c4;
  background: #fffdfb;
  color: #cdaa9a;
  user-select: none;
  transition: all 0.2s;
}
.diary-input-tag.active {
  color: #fff;
  border-color: #f75c4f;
  background: #f75c4f;
}
.diary-input-tag[data-tag="food"].active {
  background: #36b0a5;
  border-color: #36b0a5;
}
.diary-input-tag[data-tag="sport"].active {
  background: #eb5757;
  border-color: #ebcb57;
}
.diary-input-tag[data-tag="travel"].active {
  background: #36b0a5;
  border-color: #36b0a5;
}

/* ─── Save button ─── */
.diary-save-btn {
  width: 100%;
  padding: 22px 0;
  border-radius: 23px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  background: #f24e3e;
  color: #fff;
  margin-top: 8px;
  user-select: none;
  box-shadow: 0 4px 16px rgba(242, 78, 62, 0.3);
  transition: background 0.2s;
}
.diary-save-btn:active {
  background: #d94030;
}

/* ─── Diary Image Previews ─── */
.diary-media-row {
  display: flex;
  gap: 12px;
  margin: 12px 0 8px;
  justify-content: center;
}
.diary-media-btn {
  padding: 10px 24px;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  border: 2px dashed #f1c79e;
  background: #fff9f1;
  color: #4c332d;
  user-select: none;
  transition: all 0.2s;
  flex: 1;
  text-align: center;
}
.diary-media-btn:active {
  background: #fff1e0;
  border-color: #f7604f;
}
.diary-image-previews {
  margin: 0 0 8px;
}
.diary-image-previews-inner {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.diary-image-preview {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #f1c79e;
  flex-shrink: 0;
}
.diary-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.diary-image-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  background: #f7604f;
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  user-select: none;
}

/* ─── Custom Tag Input ─── */
.diary-custom-tag-row {
  display: flex;
  justify-content: center;
  margin: -4px 0 8px;
}
.diary-custom-tag-input {
  width: 220px;
  padding: 8px 16px;
  border: 2px solid #f1c79e;
  border-radius: 16px;
  font-size: 24px;
  font-family: inherit;
  color: #2b1d1c;
  outline: none;
  text-align: center;
  box-sizing: border-box;
}
.diary-custom-tag-input:focus {
  border-color: #f7604f;
}

/* ─── Timeline Images ─── */
.timeline-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.timeline-img {
  width: 144px;
  height: 125px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid #f1c79e;
  transition: transform 0.2s;
  display: block;
}
.timeline-img:active {
  transform: scale(0.96);
}

/* ─── Image Lightbox ─── */
.image-lightbox {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.image-lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  object-fit: contain;
}

/* ─── Growth Page ─── */
.growth-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  background: #fff8ef;
}
.growth-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  object-fit: cover;
}

.growth-header {
  position: absolute;
  top: 90px;
  left: 57px;
  z-index: 10;
}
.growth-title {
  font-size: 54px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.growth-subtitle {
  font-size: 28px;
  font-weight: 400;
  color: var(--text-body);
}

.growth-content {
  position: absolute;
  top: 280px;
  left: 0;
  width: 852px;
  z-index: 10;
  padding: 0 37px;
}

/* Stats Card */
.stats-card {
  width: 768px;
  height: 150px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #f5d6b6;
  border-radius: 32px;
  box-shadow: 0 10px 28px var(--shadow);
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-num {
  font-size: 44px;
  font-weight: 700;
  color: var(--text-dark);
}
.stat-label {
  font-size: 22px;
  color: var(--text-body);
  text-align: center;
  line-height: 1.3;
}
.stat-divider {
  width: 1px;
  height: 84px;
  background: #eed8c1;
}

/* Report Toggle */
.report-toggle {
  position: relative;
  width: 566px;
  height: 86px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.toggle-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 566px;
  height: 86px;
  background: #fff8ef;
  border: 2px solid #f1bc85;
  border-radius: 43px;
}
.toggle-slider {
  position: absolute;
  top: 4px;
  width: 257px;
  height: 75px;
  background: #f7604f;
  border-radius: 38px;
  transition: left 0.3s;
  z-index: 1;
}
.toggle-option {
  position: relative;
  z-index: 2;
  flex: 1;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-body);
  line-height: 86px;
  user-select: none;
}
.toggle-option.active {
  color: #fff;
}

/* AI Advice Card */
.ai-advice-card {
  width: 768px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #f5d6b6;
  border-radius: 32px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 28px 36px;
  margin-bottom: 24px;
}
.ai-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
}
.ai-item {
  margin-bottom: 16px;
}
.ai-item:last-child {
  margin-bottom: 0;
}
.ai-item-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
}
.ai-item-desc {
  font-size: 24px;
  color: #6a554d;
  margin-top: 4px;
}

/* Week Report Card */
.week-report-card {
  width: 774px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #f5d6b6;
  border-radius: 32px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 28px 24px;
  margin-bottom: 24px;
}
.report-header {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-left: 8px;
}

/* Chart */
.chart-area {
  position: relative;
  display: flex;
  height: 260px;
  margin-bottom: 20px;
}
.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 50px;
  padding-right: 8px;
  font-size: 20px;
  color: var(--text-body);
  padding-bottom: 28px;
}
.chart-y-axis span {
  line-height: 1;
}
.chart-bars {
  flex: 1;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding-bottom: 28px;
  position: relative;
}
.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.chart-bar {
  width: 33px;
  background: #f7604f;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 4px;
  position: relative;
  min-height: 10px;
}
.chart-bar.highlight {
  background: #ffa84a;
}
.bar-val {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  position: absolute;
  top: -24px;
}
.bar-label {
  font-size: 20px;
  color: var(--text-body);
}
.chart-grid {
  position: absolute;
  top: 0;
  left: 50px;
  right: 0;
  bottom: 28px;
  pointer-events: none;
}
.chart-grid::before,
.chart-grid::after {
  display: none;
}

/* Report Footer */
.report-footer {
  display: flex;
  gap: 16px;
}
.report-stat {
  flex: 1;
  height: 103px;
  background: #fff9f1;
  border: 1px solid #f1c79e;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.report-stat-num {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-dark);
}
.report-stat-label {
  font-size: 22px;
  color: var(--text-body);
}

/* Tag Pie Chart Card */
.tag-pie-card {
  width: 774px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #f5d6b6;
  border-radius: 32px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 28px 24px;
  margin-bottom: 24px;
}
.tag-pie-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-left: 8px;
}
.tag-pie-body {
  display: flex;
  align-items: center;
  gap: 32px;
}
.tag-pie-circle-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tag-pie-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
}
.tag-pie-center {
  position: absolute;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-body);
}
.tag-pie-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tag-pie-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  color: var(--text-body);
}
.tag-pie-legend-dot {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  flex-shrink: 0;
}
.tag-pie-legend-count {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 20px;
}

/* Highlight Card */
.highlight-card {
  width: 774px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #f5d6b6;
  border-radius: 32px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 24px 28px;
  margin-bottom: 150px;
}
.highlight-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.highlight-text {
  font-size: 24px;
  color: var(--text-body);
}

/* ─── Profile Page ─── */
.profile-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  background: #fff8ef;
}

/* Status Bar */
.status-bar {
  position: absolute;
  top: 28px;
  left: 0;
  width: 852px;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  z-index: 10;
}
.status-time {
  font-size: 30px;
  font-weight: 700;
  color: #2a1713;
}
.status-icons {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.signal-dot {
  width: 7px;
  background: #0b0a09;
  border-radius: 3px;
  display: inline-block;
}
.wifi-icon {
  font-size: 36px;
  color: #0b0a09;
  margin-left: 8px;
  line-height: 1;
}
.battery {
  margin-left: 8px;
}
.battery-frame {
  width: 54px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 2px;
}
.battery-level {
  width: 38px;
  height: 14px;
  background: #111;
  border-radius: 3px;
}

/* Profile Card */
.profile-card {
  position: absolute;
  left: 32px;
  top: 126px;
  width: 788px;
  height: 238px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #f5d6b6;
  border-radius: 36px;
  box-shadow: 0 10px 28px var(--shadow);
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 40px;
  z-index: 10;
}
.profile-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe3bf, #ffc8a0);
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}
.profile-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-name {
  font-size: 44px;
  font-weight: 700;
  color: var(--text-dark);
}
.profile-edit {
  font-size: 36px;
  color: #f7604f;
  cursor: pointer;
}

/* Features Card */
.features-card {
  position: absolute;
  left: 26px;
  top: 429px;
  width: 788px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #f5d6b6;
  border-radius: 32px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 24px 28px;
  z-index: 10;
}
.feature-item {
  display: flex;
  align-items: center;
  padding: 28px 8px;
  gap: 20px;
  cursor: pointer;
}
.feature-icon {
  font-size: 36px;
  width: 52px;
  text-align: center;
}
.feature-text {
  flex: 1;
  font-size: 30px;
  color: var(--text-dark);
  font-weight: 500;
}
.feature-arrow {
  font-size: 36px;
  color: var(--text-light);
}
.feature-divider {
  height: 1px;
  background: #eed8c1;
  margin: 0 8px;
}

/* =========================================
   更换目标 Flow — 目标管理 / 删除 / 添加 / AI结果
   ========================================= */

/* ─── Shared: Goal Manage / Delete / Success ─── */
.gm-bg,
.gd-bg,
.gs-bg,
.ga-bg,
.gr-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  background: #fbeede;
}

/* Back button (shared style) */
.gm-back,
.gd-back,
.gs-back,
.ga-back,
.gr-back {
  position: absolute;
  left: 38px;
  top: 56px;
  z-index: 20;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gm-back-box,
.gd-back-box,
.gs-back-box,
.ga-back-box,
.gr-back-box {
  width: 61px;
  height: 60px;
  background: #fffaf3;
  border: 1px solid #e9b37f;
  border-radius: 10px;
  position: absolute;
}
.gm-back-arrow,
.gd-back-arrow,
.gs-back-arrow,
.ga-back-arrow,
.gr-back-arrow {
  font-size: 48px;
  color: #33363f;
  line-height: 1;
  position: relative;
  z-index: 1;
  font-weight: 300;
}

/* Page title (shared) */
.gm-page-title,
.gd-page-title,
.gs-page-title,
.ga-page-title {
  position: absolute;
  left: 257px;
  top: 87.5px;
  transform: translateY(-50%);
  font-size: 40px;
  font-weight: 700;
  color: #000;
  z-index: 20;
  white-space: nowrap;
}

/* Card area (shared) */
.gm-card-area,
.gd-card-area,
.gs-card-area {
  position: absolute;
  left: 44px;
  top: 159px;
  width: 763px;
  background: #fdf9f3;
  border-radius: 31px;
  padding: 22px 24px 40px;
  z-index: 10;
}
.ga-card-area {
  position: absolute;
  left: 44px;
  top: 159px;
  width: 763px;
  background: #fdf9f3;
  border-radius: 31px;
  padding: 22px 24px 80px;
  z-index: 10;
}

/* Section header */
.gm-section-header,
.gd-section-header,
.gs-section-header,
.ga-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  margin-top: 8px;
}
.gm-section-icon,
.gd-section-icon,
.gs-section-icon {
  width: 40px;
  height: 40px;
}
.ga-section-icon {
  width: 42px;
  height: 42px;
}
.ga-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.gm-section-title,
.gd-section-title,
.gs-section-title,
.ga-section-title {
  font-size: 32px;
  font-weight: 700;
  color: #000;
}

/* Goal cards (GM - Goal Manage) */
.gm-goal-card {
  width: 714px;
  min-height: 187px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 30px 32px;
  margin-bottom: 20px;
  cursor: pointer;
  position: relative;
}
.gm-goal-name {
  font-size: 36px;
  font-weight: 700;
  color: #2b1d1c;
  margin-bottom: 24px;
}
.gm-goal-card-completed {
  opacity: 0.6;
  background: #f5f0eb !important;
  border-color: #d4ccc7 !important;
}
.gm-completed-badge {
  display: inline-block;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  background: #a0d080;
  border-radius: 20px;
  padding: 4px 16px;
  margin-left: 16px;
  vertical-align: middle;
}
.gm-goal-badges,
.gd-goal-badges,
.gs-goal-badges {
  display: flex;
  gap: 12px;
}
.gm-badge,
.gd-badge,
.gs-badge {
  height: 34px;
  border-radius: 20px;
  padding: 0 14px;
  font-size: 24px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gm-badge-green,
.gd-badge-green,
.gs-badge-green {
  background: #eaf6d9;
  color: #259034;
  border: 1px solid #eaf6d9;
}
.gm-badge-blue,
.gd-badge-blue,
.gs-badge-blue {
  background: #b1eafc;
  color: #256290;
  border: 1px solid #eaf6d9;
}
.gm-badge-purple,
.gd-badge-purple,
.gs-badge-purple {
  background: #d0b1fc;
  color: #256290;
  border: 1px solid #eaf6d9;
}

/* Add task button */
.gm-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 413px;
  height: 129px;
  background: #f7604f;
  border-radius: 30px;
  margin: 12px auto 8px;
  cursor: pointer;
}
.gd-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 413px;
  height: 129px;
  background: #8b8b8b;
  border-radius: 30px;
  margin: 12px auto 8px;
  cursor: pointer;
}
.gm-add-text,
.gd-add-text {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}
.gm-add-icon svg,
.gd-add-icon svg {
  display: block;
}
.gm-add-btn.disabled {
  background: #8b8b8b;
  opacity: 0.5;
  cursor: not-allowed;
}
/* ─── Delete Goal Cards ─── */
.gd-goal-card {
  width: 714px;
  min-height: 187px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 30px 32px;
  margin-bottom: 20px;
  position: relative;
}
.gd-goal-name {
  font-size: 36px;
  font-weight: 700;
  color: #2b1d1c;
  margin-bottom: 24px;
  max-width: 500px;
}
.gd-delete-btn {
  position: absolute;
  right: 0;
  top: 0;
  width: 131px;
  height: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.gd-delete-text {
  font-size: 24px;
  color: #000;
  font-weight: 400;
  margin-top: 4px;
}

/* ─── Delete Success ─── */
.gs-goal-card {
  width: 714px;
  min-height: 187px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 30px 32px;
  margin-bottom: 20px;
  position: relative;
}
.gs-goal-name {
  font-size: 36px;
  font-weight: 700;
  color: #2b1d1c;
  margin-bottom: 24px;
}
.gs-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 413px;
  height: 129px;
  background: #ed6464;
  border-radius: 30px;
  margin: 20px auto 8px;
  cursor: pointer;
}
.gs-add-text {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
}
.gs-add-icon svg {
  display: block;
}

/* ─── Add Goal Form ─── */
.ga-input {
  width: 714px;
  min-height: 89px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 24px 28px;
  font-size: 24px;
  color: #2b1d1c;
  margin-bottom: 16px;
  outline: none;
}
.ga-placeholder {
  color: #878787;
}
.ga-duration-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.ga-dur-btn {
  width: 170px;
  height: 77px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #eb5757;
  cursor: pointer;
  transition: all 0.2s;
}
.ga-dur-btn.active {
  background: #eb5757;
  color: #fff;
}
.ga-custom-row {
  margin-bottom: 16px;
}
.ga-custom-input {
  width: 714px;
  height: 77px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 20px 24px;
  font-size: 24px;
  font-weight: 700;
  color: #eb5757;
  outline: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ga-custom-label {
  color: #eb5757;
}
.ga-custom-placeholder {
  color: #8c8c8c;
  font-weight: 400;
}
.ga-textarea {
  width: 719px;
  min-height: 282px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 24px 28px;
  font-size: 24px;
  color: #2b1d1c;
  outline: none;
  margin-bottom: 16px;
}
.ga-ta-placeholder {
  color: #878787;
}
.ga-link-row {
  margin-bottom: 24px;
}
.ga-link-input {
  width: 714px;
  height: 77px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 20px 24px;
  font-size: 24px;
  font-weight: 700;
  outline: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ga-link-label {
  color: #eb5757;
}
.ga-link-placeholder {
  color: #8c8c8c;
  font-weight: 400;
}
.ga-ai-btn {
  width: 445px;
  height: 129px;
  background: #ed6464;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin: 0 auto;
  cursor: pointer;
}
.ga-ai-btn.disabled {
  background: #8b8b8b;
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Add Task Page (今日计划) ─── */
.at-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  background: image-set(
      url("../assets/首页/今日计划-添加任务背景图.webp") type("image/webp"),
      url("../assets/首页/今日计划-添加任务背景图.png") type("image/png")
    )
    no-repeat center top / 852px 1848px;
}
.at-back {
  position: absolute;
  left: 38px;
  top: 56px;
  z-index: 20;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.at-back-box {
  width: 61px;
  height: 60px;
  background: #fffaf3;
  border: 1px solid #e9b37f;
  border-radius: 10px;
  position: absolute;
}
.at-back-arrow {
  font-size: 48px;
  color: #33363f;
  line-height: 1;
  position: relative;
  z-index: 1;
  font-weight: 300;
}
.at-page-title {
  position: absolute;
  left: 50%;
  top: 87.5px;
  transform: translate(-50%, -50%);
  font-size: 40px;
  font-weight: 700;
  color: #000;
  z-index: 20;
  white-space: nowrap;
}
.at-card-area {
  position: absolute;
  left: 44px;
  top: 159px;
  width: 763px;
  background: #fdf9f3;
  border-radius: 31px;
  padding: 22px 24px 80px;
  z-index: 10;
  box-sizing: border-box;
}
.at-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  margin-top: 8px;
}
.at-icon-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
.at-icon-svg {
  display: block;
  flex-shrink: 0;
}
.at-section-title {
  font-size: 32px;
  font-weight: 700;
  color: #000;
}
.at-input {
  width: 100%;
  height: 89px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 0 28px;
  font-size: 24px;
  color: #2b1d1c;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.at-input::placeholder {
  color: #878787;
}
.at-input:focus {
  border-color: #f7604f;
}
.at-type-row,
.at-urgency-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}
.at-type-btn,
.at-urgency-btn {
  height: 77px;
  width: 167px;
  border-radius: 27px;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box;
  padding: 0 10px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.at-type-btn:active,
.at-urgency-btn:active {
  opacity: 0.8;
}

/* Type button variants */
.at-type-btn[data-type="study"] {
  background: #eb5757;
  border-color: #eb5757;
  color: #fff;
}
.at-type-btn[data-type="study"]:not(.active) {
  background: #fffdf9;
  color: #eb5757;
  border-color: #eb5757;
}
.at-type-btn[data-type="sport"] {
  background: #fbe6bb;
  border-color: #ebcb57;
  color: #eb5757;
}
.at-type-btn[data-type="sport"]:not(.active) {
  background: #fffdf9;
  color: #ebcb57;
  border-color: #ebcb57;
}
.at-type-btn[data-type="diet"] {
  background: #d1f0fb;
  border-color: #57b5eb;
  color: #57adeb;
}
.at-type-btn[data-type="diet"]:not(.active) {
  background: #fffdf9;
  color: #57b5eb;
  border-color: #57b5eb;
}
.at-type-btn[data-type="fun"] {
  background: #f9cef7;
  border-color: #d541c9;
  color: #df57eb;
}
.at-type-btn[data-type="fun"]:not(.active) {
  background: #fffdf9;
  color: #d541c9;
  border-color: #d541c9;
}
.at-type-btn[data-type="life"] {
  background: #77dda2;
  border-color: #196945;
  color: #196556;
}
.at-type-btn[data-type="life"]:not(.active) {
  background: #fffdf9;
  color: #196945;
  border-color: #196945;
}
.at-type-btn[data-type="work"] {
  background: #8ab4f8;
  border-color: #1a73e8;
  color: #fff;
}
.at-type-btn[data-type="work"]:not(.active) {
  background: #fffdf9;
  color: #1a73e8;
  border-color: #1a73e8;
}

/* Urgency button variants */
.at-urgency-btn[data-urgency="urgent-important"] {
  background: #eb5757;
  border-color: #eb5757;
  color: #fff;
}
.at-urgency-btn[data-urgency="urgent-important"]:not(.active) {
  background: #fffdf9;
  color: #eb5757;
  border-color: #eb5757;
}
.at-urgency-btn[data-urgency="urgent-not"] {
  background: #fbe6bb;
  border-color: #ebcb57;
  color: #eb5757;
}
.at-urgency-btn[data-urgency="urgent-not"]:not(.active) {
  background: #fffdf9;
  color: #ebcb57;
  border-color: #ebcb57;
}
.at-urgency-btn[data-urgency="important-not"] {
  background: #d1f0fb;
  border-color: #57b5eb;
  color: #57adeb;
}
.at-urgency-btn[data-urgency="important-not"]:not(.active) {
  background: #fffdf9;
  color: #57b5eb;
  border-color: #57b5eb;
}
.at-urgency-btn[data-urgency="not-urgent-not"] {
  background: #77dda2;
  border-color: #196945;
  color: #196556;
}
.at-urgency-btn[data-urgency="not-urgent-not"]:not(.active) {
  background: #fffdf9;
  color: #196945;
  border-color: #196945;
}

.at-textarea {
  width: 100%;
  height: 283px;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 20px 28px;
  font-size: 24px;
  color: #2b1d1c;
  outline: none;
  resize: none;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.5;
}
.at-textarea::placeholder {
  color: #878787;
}
.at-textarea:focus {
  border-color: #f7604f;
}

.at-submit-btn {
  width: 445px;
  height: 129px;
  background: #ed6464;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  margin: 40px auto 0;
  transition: opacity 0.2s;
}
.at-submit-btn:active {
  opacity: 0.85;
}

/* ─── AI Result Page ─── */
.gr-page-title {
  position: absolute;
  left: 50%;
  top: 60px;
  transform: translateX(-50%);
  font-size: 40px;
  font-weight: 700;
  color: #111;
  z-index: 20;
  white-space: nowrap;
}

/* Banner */
.gr-banner {
  position: absolute;
  left: 60px;
  top: 135px;
  width: 731px;
  height: 117px;
  background: #fff8f6;
  border-radius: 26px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gr-banner-inner {
  width: 670px;
  height: 74px;
  background: rgba(255, 234, 230, 0.35);
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.gr-banner-star {
  font-size: 40px;
  color: #e94c55;
}
.gr-banner-text {
  font-size: 32px;
  font-weight: 600;
  color: #d84d55;
}

/* Main content card */
.gr-main-card {
  position: absolute;
  left: 39px;
  top: 278px;
  width: 775px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  padding: 28px 30px 40px;
  z-index: 20;
  max-height: 1500px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gr-main-card::-webkit-scrollbar {
  display: none;
}

.gr-section-title {
  font-size: 36px;
  font-weight: 700;
  color: #111;
  margin-bottom: 16px;
}

/* Overview box */
.gr-overview-box {
  background: #fffdfb;
  border: 1px solid #f1cfc8;
  border-radius: 8px;
  padding: 20px 24px;
}
.gr-overview-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}
.gr-overview-row + .gr-overview-row {
  border-top: 1px solid #f5e5df;
}
.gr-ov-label {
  font-size: 32px;
  font-weight: 700;
  color: #111;
  min-width: 180px;
}
.gr-ov-value {
  font-size: 32px;
  color: #666;
}

/* Plan cards */
.gr-plan-cards {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 8px;
}
.gr-plan-card {
  flex: 1;
  background: #fff9f7;
  border: 1px solid #f1cfc8;
  border-radius: 8px;
  padding: 20px 16px;
  text-align: center;
  min-height: 236px;
}
.gr-plan-num {
  width: 44px;
  height: 44px;
  background: #e94c55;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.gr-plan-week {
  font-size: 28px;
  font-weight: 700;
  color: #e94c55;
  margin-bottom: 12px;
}
.gr-plan-desc {
  font-size: 28px;
  color: #555;
  line-height: 1.5;
}
.gr-plan-arrow {
  display: flex;
  align-items: center;
  font-size: 40px;
  color: #e94c55;
  font-weight: 700;
  flex-shrink: 0;
}

/* Task list */
.gr-task-list {
  background: #fffdfb;
  border: 1px solid #f1cfc8;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 24px;
}
.gr-tasks-inner {
  padding: 8px 0;
}
.gr-task-item {
  padding: 0;
  cursor: default;
}
.gr-task-header {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  gap: 10px;
}
.gr-task-badge {
  display: inline-block;
  font-size: 24px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}
.gr-task-badge[data-level="轻松"] {
  background: #e8f5e9;
  color: #2e7d32;
}
.gr-task-badge[data-level="一般"] {
  background: #fff3e0;
  color: #e65100;
}
.gr-task-badge[data-level="困难"] {
  background: #fbe9e7;
  color: #c62828;
}
.gr-task-text {
  flex: 1;
  font-size: 28px;
  color: #333;
  line-height: 1.4;
}
.gr-task-expand {
  font-size: 28px;
  color: #b7aaa6;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  padding: 4px;
  user-select: none;
}
.gr-task-expand.open {
  transform: rotate(180deg);
}
.gr-task-delete {
  font-size: 24px;
  color: #ccc;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px 6px;
  user-select: none;
  transition: color 0.2s;
}
.gr-task-delete:hover {
  color: #e94c55;
}
.gr-task-detail {
  display: none;
  padding: 0 24px 16px;
}
.gr-task-detail.open {
  display: block;
}
.gr-task-notes {
  background: #fafafa;
  border-radius: 8px;
  padding: 14px 18px;
}
.gr-notes-label {
  display: block;
  font-size: 26px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}
.gr-notes-content {
  font-size: 26px;
  color: #555;
  line-height: 1.6;
  margin: 0;
}
.gr-task-divider {
  height: 1px;
  background: #f5e5df;
  margin: 0 20px;
}

/* Tip */
.gr-tip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.gr-tip-star {
  font-size: 28px;
  color: #e94c55;
}
.gr-tip-title {
  font-size: 24px;
  font-weight: 700;
  color: #111;
}
.gr-tip-box {
  background: #fffdfb;
  border: 1px solid #f1cfc8;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 32px;
}
.gr-tip-text {
  font-size: 28px;
  color: #666;
  line-height: 1.5;
}

/* Bottom buttons */
.gr-bottom-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.gr-btn-regenerate {
  width: 347px;
  height: 100px;
  background: #fff;
  border: 1px solid #f0525b;
  border-radius: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #f0525b;
  cursor: pointer;
}
.gr-btn-save {
  width: 347px;
  height: 100px;
  background: #e94c55;
  border: none;
  border-radius: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

/* ─── AI Loading ─── */
.gr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}
.gr-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f0e8e5;
  border-top-color: #e94c55;
  border-radius: 50%;
  animation: gr-spin 0.8s linear infinite;
}
@keyframes gr-spin {
  to {
    transform: rotate(360deg);
  }
}
.gr-loading-text {
  margin-top: 20px;
  font-size: 28px;
  color: #999;
}
.diary-loading-text {
  font-size: 28px;
  color: #bbb;
  text-align: center;
  padding: 60px 20px;
  line-height: 1.6;
}
.diary-waiting-text {
  font-size: 32px;
  color: #b8956a;
  text-align: center;
  padding: 80px 20px;
  line-height: 1.6;
  font-weight: 500;
}
.swap-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ─── Toast Notification ─── */
.toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(44, 44, 44, 0.92);
  color: #fff;
  font-size: 28px;
  padding: 24px 48px;
  border-radius: 16px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s;
}
.toast.show {
  opacity: 1;
}

/* ─── Confirmation Modal ─── */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 852px;
  height: 1848px;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: #fff;
  border-radius: 24px;
  padding: 40px 36px 32px;
  width: 500px;
  text-align: center;
}
.modal-title {
  font-size: 32px;
  font-weight: 700;
  color: #2b1d1c;
  margin-bottom: 16px;
}
.modal-msg {
  font-size: 28px;
  color: #4c332d;
  margin-bottom: 32px;
  line-height: 1.5;
}
.modal-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
}
.modal-btn {
  padding: 16px 40px;
  border-radius: 16px;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  min-width: 160px;
  text-align: center;
  user-select: none;
}
.modal-btn-cancel {
  background: #f5f0eb;
  color: #4c332d;
}
.modal-btn-confirm {
  background: #eb5757;
  color: #fff;
}

/* ─── Swipe Card Wrapper ─── */
.gm-card-wrapper {
  width: 714px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  border-radius: 27px;
}
.gm-card-slide {
  display: flex;
  width: calc(100% + 131px);
  transform: translateX(0);
  transition: transform 0.3s ease;
  will-change: transform;
  touch-action: pan-y;
}
.gm-card-slide .gm-goal-card {
  width: 714px;
  min-height: 187px;
  flex-shrink: 0;
  margin-bottom: 0;
  cursor: pointer;
  background: #fffdf9;
  border: 2px solid #eb5757;
  border-radius: 27px;
  padding: 30px 32px;
  position: relative;
}
.gm-delete-reveal {
  width: 131px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gm-delete-reveal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px;
}
.gm-delete-reveal-btn span {
  font-size: 24px;
  color: #eb5757;
  font-weight: 600;
}

/* ─── Plan Item Link Button ─── */
.plan-link-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #b8956a;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 50%;
  transition:
    background 0.2s,
    color 0.2s;
  user-select: none;
}
.plan-link-btn:hover {
  background: #f0e6d8;
}
.plan-link-btn.has-link {
  color: #eb5757;
}

/* ─── Link Modal ─── */
.link-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.link-modal-box {
  width: 600px;
  background: #fffdf9;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}
.link-modal-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
  text-align: center;
}
.link-type-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.link-type-btn {
  flex: 1;
  height: 56px;
  border: 2px solid #f0cbae;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: #8c756d;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  gap: 8px;
}
.link-type-btn.active {
  border-color: #eb5757;
  background: #fff5f0;
  color: #eb5757;
}
.link-type-btn:hover {
  border-color: #eb5757;
}
.link-input {
  width: 100%;
  height: 56px;
  border: 2px solid #f0cbae;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 20px;
  color: var(--text-dark);
  background: #fffdf9;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 12px;
}
.link-input:focus {
  border-color: #eb5757;
}
.link-input::placeholder {
  color: #c0a898;
}
.link-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f5ede6;
  border-radius: 12px;
  margin-bottom: 12px;
}
.link-modal-btns {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}
.link-btn {
  height: 52px;
  padding: 0 28px;
  border-radius: 26px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  user-select: none;
}
.link-btn-save {
  background: #eb5757;
  color: #fff;
}
.link-btn-save:hover {
  background: #d94a4a;
}
.link-btn-cancel {
  background: #f0ebe5;
  color: #6b5b55;
}
.link-btn-cancel:hover {
  background: #e5ddd5;
}
.link-btn-delete {
  background: transparent;
  color: #eb5757;
  border: 1px solid #eb5757;
  margin-right: auto;
}
.link-btn-delete:hover {
  background: #fff5f0;
}

/* ─── Responsive for smaller screens ─── */
@media (max-width: 440px) {
  .phone-wrapper {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}
