/* ===== 《阮来是你》全局样式 · 治愈系渐变卡片风 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --pink: #f78fb3;
  --pink-deep: #e6678e;
  --peach: #ffb6a3;
  --lavender: #cdb4f6;
  --gold: #f6c667;
  --ink: #5a4a52;
  --ink-soft: #9a8590;
  --card-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 8px 24px rgba(190, 140, 150, 0.18);
  --radius: 18px;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fff3e4 0%, #ffe3ec 45%, #e9e4fb 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

#app { max-width: 1080px; margin: 0 auto; padding: 24px 16px 64px; }

h1, h2, h3 { font-weight: 700; }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
  background: #f3e9ec;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(190,140,150,.25); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--peach), var(--pink)); color: #fff; font-weight: 700; }
.btn-gold { background: linear-gradient(135deg, #ffe29a, var(--gold)); color: #7a5a12; font-weight: 700; }
.btn-ghost { background: transparent; border: 1.5px solid #e5cdd8; }
.btn-big { font-size: 18px; padding: 14px 34px; }
.btn-sm { font-size: 13px; padding: 6px 14px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- 属性条 ---------- */
.bar {
  position: relative;
  flex: 1;
  height: 18px;
  background: #f1e2e8;
  border-radius: 999px;
  overflow: hidden;
  min-width: 90px;
}
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.bar-fill.good { background: linear-gradient(90deg, #a8e6cf, #7fd8a4); }
.bar-fill.warn { background: linear-gradient(90deg, #ffd9a0, #ffab7a); }
.bar-fill.bad  { background: linear-gradient(90deg, #ffa4b6, #f76d84); }
.bar-num {
  position: absolute; right: 8px; top: 0; line-height: 18px;
  font-size: 11px; font-weight: 700; color: rgba(90,74,82,.75);
}

.stat-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.stat-ic { width: 24px; text-align: center; }
.stat-name { width: 40px; font-size: 13px; color: var(--ink-soft); }

/* ---------- 徽章/标签 ---------- */
.chip {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; margin: 2px 3px;
  background: #fdeaf1; color: var(--pink-deep);
}
.chip.buff { background: #e8f8ef; color: #2e9e63; }
.chip.debuff { background: #ffe3e8; color: #d43d5e; }
.chip.gold { background: #fff3d0; color: #a5780a; }
.chip.dim { background: #efe9ee; color: var(--ink-soft); }

.tier { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 6px; color: #fff; }
.tier-C { background: #9db8a4; }
.tier-B { background: #7aa7d9; }
.tier-A { background: #b08ad9; }
.tier-S { background: linear-gradient(135deg, #f6c667, #e0982a); }
.tier-喵 { background: linear-gradient(135deg, #ffb6d5, #f76d9c); }

.badge {
  display: inline-block; min-width: 20px; height: 20px; line-height: 20px;
  border-radius: 999px; background: #f76d84; color: #fff;
  font-size: 12px; font-weight: 800; text-align: center; padding: 0 6px;
  margin-left: 6px; vertical-align: middle;
}

/* ---------- 标题页 ---------- */
.title-hero { text-align: center; padding: 48px 16px 24px; }
.title-emoji { font-size: 72px; animation: bob 2.4s ease-in-out infinite; display: inline-block; }
.title-emoji .cat { display: inline-block; animation: bob 2.4s ease-in-out 0.5s infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.title-hero h1 {
  font-size: 44px; letter-spacing: 6px; margin: 12px 0 4px;
  background: linear-gradient(135deg, var(--pink-deep), #a5780a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.title-sub { color: var(--ink-soft); letter-spacing: 3px; margin-bottom: 28px; }
.title-intro { max-width: 620px; margin: 24px auto; line-height: 1.9; text-align: left; font-size: 14.5px; }

/* ---------- 主页 ---------- */
.home-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.home-date { font-size: 20px; font-weight: 800; }
.home-money { font-size: 17px; font-weight: 800; color: #c77f1d; }
.goal-line { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .home-grid { grid-template-columns: 1fr; } }

.avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; font-size: 36px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ffe3ec, #e9e4fb); box-shadow: inset 0 0 0 3px #fff;
}
.avatar-name { font-size: 19px; font-weight: 800; }
.avatar-title { font-size: 12.5px; color: var(--ink-soft); }

.cat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 640px) { .cat-strip { grid-template-columns: repeat(2, 1fr); } }
.cat-mini {
  background: #fff; border-radius: 14px; padding: 10px; text-align: center;
  box-shadow: 0 3px 10px rgba(190,140,150,.12); position: relative;
}
.cat-mini .emoji { font-size: 34px; }
.cat-mini .cname { font-size: 13px; font-weight: 700; margin: 2px 0; }
.cat-mini .chearts { font-size: 11px; color: var(--ink-soft); line-height: 1.6; }
.sick-tag {
  position: absolute; top: 6px; right: 6px; font-size: 11px; font-weight: 800;
  color: #fff; background: #f76d84; border-radius: 999px; padding: 1px 8px;
}

/* ---------- 日程排程 ---------- */
.sched-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
@media (max-width: 860px) { .sched-grid { grid-template-columns: repeat(2, 1fr); } }
.day-cell {
  background: #fff; border-radius: 14px; padding: 12px 8px; text-align: center;
  box-shadow: 0 3px 10px rgba(190,140,150,.12); cursor: pointer;
  transition: transform .12s, box-shadow .12s; border: 2px solid transparent; min-height: 108px;
}
.day-cell:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(190,140,150,.22); }
.day-cell.notice-day { border-color: var(--gold); background: #fffaf0; }
.day-name { font-size: 13px; font-weight: 800; color: var(--ink-soft); margin-bottom: 6px; }
.day-act-icon { font-size: 28px; }
.day-act-name { font-size: 12.5px; font-weight: 700; margin-top: 4px; line-height: 1.4; }
.day-cost { font-size: 11px; color: var(--ink-soft); }

.pick-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: #fff; border: 2px solid #f3e2ea; border-radius: 14px;
  padding: 10px 14px; margin: 8px 0; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 14px; color: var(--ink); transition: border-color .12s;
}
.pick-item:hover:not(:disabled) { border-color: var(--pink); }
.pick-item:disabled { opacity: .45; cursor: not-allowed; }
.pick-item .pi-icon { font-size: 26px; }
.pick-item .pi-name { font-weight: 800; }
.pick-item .pi-desc { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.pick-item .pi-cost { margin-left: auto; font-size: 13px; font-weight: 800; color: #c77f1d; white-space: nowrap; }

/* ---------- 通告 ---------- */
.notice-card { display: flex; gap: 14px; align-items: flex-start; }
.notice-card .n-icon { font-size: 40px; }
.notice-card .n-body { flex: 1; }
.notice-card .n-name { font-size: 16px; font-weight: 800; }
.notice-card .n-meta { font-size: 12.5px; color: var(--ink-soft); margin: 4px 0; line-height: 1.7; }
.notice-card .n-desc { font-size: 13px; line-height: 1.6; margin: 4px 0 8px; }

/* ---------- 猫咪小屋 ---------- */
.cat-full { text-align: center; }
.cat-full .emoji { font-size: 56px; }
.cat-full .breed { font-size: 12px; color: var(--ink-soft); }
.cat-full .persona { font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; margin: 8px 0; min-height: 40px; }
.cats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px) { .cats-grid { grid-template-columns: 1fr; } }
.buff-line { font-size: 12px; margin: 6px 0; }

/* ---------- 周执行日志 ---------- */
.week-log { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.log-day {
  font-weight: 800; color: var(--pink-deep); margin: 14px 0 4px;
  border-bottom: 2px dashed #f3d3de; padding-bottom: 4px;
}
.log-line {
  font-size: 14px; line-height: 1.7; padding: 5px 10px; margin: 4px 0;
  background: #fff; border-radius: 10px; box-shadow: 0 2px 6px rgba(190,140,150,.08);
  animation: slidein .3s ease both;
}
.log-line.sys { background: #fdf3e3; color: #8a6b1f; }
.log-line.bad { background: #ffe9ed; color: #c03050; }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 弹窗 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(90, 60, 75, 0.35);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  opacity: 0; transition: opacity .18s ease; padding: 16px;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  background: #fffaf7; border-radius: 20px; box-shadow: 0 18px 50px rgba(90,60,75,.3);
  max-width: 560px; width: 100%; max-height: 84vh; overflow-y: auto; padding: 24px;
  transform: scale(.94); transition: transform .18s ease;
}
.modal-backdrop.show .modal { transform: scale(1); }
.modal h3 { font-size: 19px; margin-bottom: 10px; }
.modal .ev-icon { font-size: 44px; display: block; text-align: center; margin-bottom: 6px; }
.modal .ev-text { line-height: 1.9; font-size: 14.5px; margin-bottom: 16px; }
.modal .ev-result { line-height: 1.9; font-size: 14.5px; background: #fdf0e2; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.modal .choice-btn { display: block; width: 100%; margin: 8px 0; text-align: left; }
.modal .choice-hint { font-size: 12px; color: var(--ink-soft); font-weight: 400; }

/* ---------- 颁奖典礼 ---------- */
.ceremony-banner {
  text-align: center; padding: 30px 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, #fff3d0, #ffe0e9 60%, #e9e4fb);
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.ceremony-banner h2 { font-size: 30px; letter-spacing: 4px; color: #a5780a; }
.award-card { text-align: center; }
.award-card .a-icon { font-size: 46px; }
.award-card .a-name { font-size: 18px; font-weight: 800; margin: 6px 0; }
.award-card .a-desc { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 10px; }
.award-winner { font-size: 17px; font-weight: 800; margin: 8px 0; animation: slidein .35s ease both; }
.award-winner.me { color: #c77f1d; }
.award-winner.rival { color: var(--ink-soft); }

/* ---------- 结局 ---------- */
.ending-hero { text-align: center; padding: 36px 18px; }
.ending-hero .e-icon { font-size: 66px; }
.ending-hero h2 { font-size: 30px; margin: 10px 0; }
.ending-text { max-width: 640px; margin: 0 auto; line-height: 2.0; font-size: 15px; }
.ending-text p { margin: 12px 0; }
.recap { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.recap .r-item { text-align: center; }
.recap .r-num { font-size: 24px; font-weight: 800; color: var(--pink-deep); }
.recap .r-label { font-size: 12px; color: var(--ink-soft); }

/* ---------- toast ---------- */
#toast-root { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 200; }
.toast {
  background: rgba(90,74,82,.92); color: #fff; padding: 9px 20px; border-radius: 999px;
  font-size: 13.5px; margin-top: 8px; animation: slidein .25s ease both;
}

.footer-note { text-align: center; color: var(--ink-soft); font-size: 12px; margin-top: 24px; }
.empty-tip { text-align: center; color: var(--ink-soft); padding: 24px 0; font-size: 14px; line-height: 1.8; }
