/* ===== 歇一会儿 · 海岛蓝主题 ===== */
:root {
  --bg: #F0FCFA;
  --primary: #00AFA8;
  --primary-dark: #008C86;
  --text: #154747;
  --card: #FFFFFF;
  --light: #DDF7F4;
  --sub: #647D80;
  --line: #E6F4F2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
}

/* 海浪装饰：固定在页面顶部与底部，内容层压在上面 */
.wave {
  position: fixed;
  left: 0;
  width: 100%;
  height: 150px;
  pointer-events: none;
  z-index: 0;
}
.wave-top { top: 0; }
.wave-bottom { bottom: 0; }

.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 20px calc(28px + env(safe-area-inset-bottom));
}

/* ===== 视图切换 ===== */
.view { display: none; }
.view.active { display: block; }

/* ===== 顶栏 ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px 8px;
}
.brand { font-size: 26px; font-weight: 700; letter-spacing: 1px; }

.pill-btn {
  background: var(--light);
  color: var(--primary-dark);
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.pill-btn:active { background: #C8F0EB; }

/* ===== 首页推荐卡片 ===== */
.home-main { margin-top: 18px; }

.card {
  background: var(--card);
  border-radius: 24px;
}

.recommend-card {
  min-height: 330px;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
}

.hint { color: var(--sub); font-size: 17px; }

.recommend-text {
  font-size: 34px;
  font-weight: 700;
  color: #0B7C76;
  line-height: 1.4;
  word-break: break-word;
}

.empty-tip { color: var(--sub); font-size: 16px; }

.primary-btn {
  background: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 16px 56px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  min-height: 56px;
}
.primary-btn:active { background: #00756F; transform: scale(0.97); }
.primary-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ===== 添加区（两页共用） ===== */
.add-block { margin-top: 28px; }
.add-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }

.add-row { display: flex; gap: 12px; }
.add-row input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #D8EEEB;
  background: #fff;
  border-radius: 16px;
  padding: 15px 16px;
  font-size: 16px;
  color: var(--text);
}
.add-row input:focus { outline: none; border-color: var(--primary); }

.add-btn {
  background: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  min-height: 52px;
}
.add-btn:active { background: #00756F; transform: scale(0.97); }

/* ===== 全部方式 ===== */
.list-main { margin-top: 10px; }

.list-count {
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 17px;
  margin: 14px 4px 12px;
}

.list-card { padding: 8px 20px; }

.method-list { list-style: none; }
.method-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.method-item:last-child { border-bottom: none; }

.method-item .name {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  word-break: break-word;
}

.del-btn {
  background: var(--light);
  color: var(--primary-dark);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.del-btn:active { background: #C8F0EB; }

.list-empty { padding: 36px 12px; text-align: center; color: var(--sub); font-size: 16px; }

/* ===== 撤销提示条 ===== */
.undo-toast[hidden] { display: none; }
.undo-toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #154747;
  color: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 40px);
  z-index: 20;
}
.undo-text { font-size: 15px; word-break: break-word; }
.undo-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.undo-btn:active { background: rgba(255, 255, 255, 0.15); }

/* 桌面端：内容居中，卡片宽度收敛 */
@media (min-width: 520px) {
  .recommend-card { min-height: 360px; }
}
