/* eekk 网页版 —— 浅粉 × 浅蓝，粉蓝渐变底，移动优先 */
:root {
  --color-primary: #FF9BB2;
  --color-primary-soft: #FFF0F4;
  --color-primary-text: #EC7C96;
  --color-blue: #93B8F6;
  --color-blue-soft: #EFF4FE;
  --color-blue-text: #6E99E4;
  --color-text: #1F2329;
  --color-text-secondary: #86909C;
  --color-card: #FFFFFF;
  --color-line: #F0E3E7;
  --color-danger: #E5484D;
  --radius: 14px;
  --shadow: 0 4px 14px rgba(255, 155, 178, 0.10);
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: var(--fs-base);
  color: var(--color-text);
  background: linear-gradient(160deg, #FFEDF3 0%, #F9F1FB 48%, #E9F2FD 100%);
  background-attachment: fixed;
  overflow: hidden;
}

/* 自定义背景图层 */
#bg-layer {
  position: fixed; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
}

.hidden { display: none !important; }

/* 视图切换 */
.view { display: none; height: 100%; overflow-y: auto; padding: 16px 0 calc(76px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.view.active { display: block; }
#view-login.active, #view-pair.active { padding-bottom: 32px; }
#view-main.active { display: flex; flex-direction: column; overflow: hidden; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

/* 通用 */
.card {
  background: var(--color-card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin: 0 14px 14px;
}
.card-title { font-size: var(--fs-lg); font-weight: 700; margin-bottom: 12px; }
.page-title { font-size: var(--fs-xl); font-weight: 700; margin: 12px 18px 16px; }
.form-label { font-size: var(--fs-sm); color: var(--color-text-secondary); margin: 14px 0 6px; display: block; }
.form-input, .form-picker {
  width: 100%; background: #FDF5F8; border: none; outline: none;
  border-radius: 10px; padding: 12px 14px; font-size: var(--fs-base); color: var(--color-text);
}
select.form-picker { appearance: none; }
.btn-primary {
  display: block; width: 100%; margin-top: 18px;
  background: linear-gradient(135deg, #FFB7C6, #FF9BB2);
  color: #fff; border: none; border-radius: 26px;
  font-size: var(--fs-lg); font-weight: 600; padding: 12px 0; cursor: pointer;
}
.btn-primary:disabled { opacity: 0.5; }
.btn-ghost {
  background: var(--color-primary-soft); color: var(--color-primary-text);
  border: none; border-radius: 22px; font-size: var(--fs-base); padding: 10px 16px; cursor: pointer;
}
.btn-ghost.full { display: block; width: 100%; margin-top: 10px; }
.btn-danger {
  display: block; width: calc(100% - 28px); margin: 10px 14px 24px;
  background: #fff; color: var(--color-danger); border: none; border-radius: 26px;
  font-size: var(--fs-base); padding: 12px 0; box-shadow: var(--shadow); cursor: pointer;
}
.error { color: var(--color-danger); font-size: var(--fs-sm); text-align: center; margin: 10px 18px; }
.auth-link { color: var(--color-blue-text); font-size: var(--fs-sm); text-align: center; margin-top: 14px; cursor: pointer; }
.auth-link.center { margin: 4px 0 24px; }
.seg { display: flex; background: var(--color-primary-soft); border-radius: 22px; padding: 4px; margin-bottom: 8px; }
.seg-item { flex: 1; text-align: center; font-size: var(--fs-sm); color: var(--color-text-secondary); padding: 8px 0; border-radius: 18px; cursor: pointer; }
.seg-item.active { background: #fff; color: var(--color-primary-text); font-weight: 600; }
.code-row { display: flex; gap: 10px; }
.code-row .form-input { flex: 1; }
.code-btn { flex-shrink: 0; white-space: nowrap; }

/* 登录页 */
.login-hero { text-align: center; margin: 64px 0 32px; }
.login-title { font-size: 42px; font-weight: 800; color: var(--color-primary-text); letter-spacing: 2px; }
.btn-wechat {
  display: block; width: 100%; background: #07C160; color: #fff; border: none;
  border-radius: 26px; font-size: var(--fs-lg); font-weight: 600; padding: 13px 0; cursor: pointer;
}
.divider {
  display: flex; align-items: center; gap: 12px; margin: 18px 0 14px;
  color: var(--color-text-secondary); font-size: var(--fs-xs);
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--color-line); }

/* 颜色/头像选择 */
.color-row { display: flex; gap: 12px; }
.color-option {
  width: 64px; text-align: center; padding: 10px 0; border-radius: 12px;
  color: #fff; font-size: var(--fs-sm); cursor: pointer; opacity: 0.55; border: 2px solid transparent;
}
.color-option.selected { opacity: 1; border-color: var(--color-text); }
.bg-pink { background: var(--color-primary); }
.bg-blue { background: var(--color-blue); }
.bg-amber { background: #F0A73C; }
.color-pink { color: var(--color-primary-text); }
.color-blue { color: var(--color-blue-text); }
.avatar-row { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar-option {
  width: 44px; height: 44px; line-height: 44px; text-align: center; font-size: 24px;
  background: #FDF5F8; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
}
.avatar-option.selected { border-color: var(--color-primary); background: var(--color-primary-soft); }
.code-input { letter-spacing: 4px; font-weight: 700; text-align: center; }

/* 主界面 */
/* 主界面顶部：成员视图切换 + 类型筛选小按钮 */
.top-row { display: flex; gap: 8px; margin: 6px 14px 10px; align-items: center; flex-shrink: 0; }
.top-row .view-switch { flex: 1; margin: 0; }
.type-toggle {
  flex-shrink: 0; min-width: 56px; text-align: center; cursor: pointer;
  background: #fff; color: var(--color-text-secondary); box-shadow: var(--shadow);
  border-radius: 22px; padding: 9px 12px; font-size: var(--fs-sm);
}
.type-toggle.on { background: #FFF6E6; color: #A9660A; font-weight: 600; }
.view-switch {
  display: flex; background: #fff; border-radius: 22px; padding: 4px;
  margin: 6px 14px 10px; box-shadow: var(--shadow); flex-shrink: 0;
}
.view-switch-item {
  flex: 1; text-align: center; font-size: var(--fs-sm); color: var(--color-text-secondary);
  padding: 8px 0; border-radius: 18px; cursor: pointer;
}
.view-switch-item.active { background: var(--color-primary); color: #fff; font-weight: 600; }
.week-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 14px 8px; flex-shrink: 0; }
.week-arrow {
  width: 36px; height: 30px; line-height: 30px; text-align: center; font-size: 22px;
  color: var(--color-primary-text); background: rgba(255,255,255,0.72); border-radius: 15px; cursor: pointer;
}
.week-label { min-width: 130px; text-align: center; font-weight: 600; padding: 4px 0; cursor: pointer; }
.week-label.far { color: var(--color-primary-text); }
.week-jump {
  width: 34px; height: 30px; line-height: 30px; text-align: center; font-size: 15px;
  background: rgba(255,255,255,0.72); border-radius: 15px; cursor: pointer; flex-shrink: 0;
}

/* 月历：跳到指定日期 */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.cal-title { font-weight: 700; font-size: var(--fs-base); }
.cal-nav {
  width: 32px; height: 30px; line-height: 30px; text-align: center; font-size: 20px;
  color: var(--color-primary-text); background: var(--color-primary-soft);
  border-radius: 15px; cursor: pointer;
}
.cal-week-head {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  font-size: var(--fs-xs); color: var(--color-text-secondary); text-align: center; margin-bottom: 4px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell { aspect-ratio: 1 / 1; border-radius: 9px; position: relative; }
.cal-day {
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: var(--fs-sm); color: var(--color-text);
}
.cal-day.cal-out { color: #C9CDD4; }
.cal-day.cal-inweek { background: var(--color-blue-soft); }
.cal-day.cal-today { background: var(--color-primary); color: #fff; font-weight: 700; }
.cal-num { line-height: 1; }
.cal-dot {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #F0B23C;
}
.cal-today .cal-dot { background: #fff; }
.cal-quick { display: flex; gap: 10px; margin-top: 14px; }
.cal-quick .btn-ghost { flex: 1; text-align: center; }
.legend { display: flex; gap: 16px; margin: 0 18px 6px; font-size: var(--fs-xs); color: var(--color-text-secondary); flex-shrink: 0; }
.legend-item { display: flex; align-items: center; gap: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.tt-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tt-grid { padding: 0 6px; }
.tt-header { display: flex; position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,0.72); border-radius: 10px; padding: 4px 0; backdrop-filter: blur(4px); }
.tt-axis-corner { width: 42px; flex-shrink: 0; }
.tt-day { flex: 1; text-align: center; border-radius: 8px; padding: 3px 0; }
.tt-day.today { background: var(--color-primary-soft); }
.tt-day-label { font-size: var(--fs-sm); font-weight: 600; }
.tt-day.today .tt-day-label { color: var(--color-primary-text); }
.tt-day-date { font-size: 10px; color: var(--color-text-secondary); }
.tt-body { display: flex; position: relative; }
.tt-axis { width: 42px; flex-shrink: 0; }
.tt-hour { font-size: 10px; color: var(--color-text-secondary); text-align: right; padding-right: 5px; transform: translateY(-6px); }
.tt-col { flex: 1; position: relative; }
.tt-slot { border-top: 1px solid var(--color-line); border-left: 1px solid var(--color-line); }
.tt-slot.today { background: rgba(255, 240, 244, 0.4); }
.tt-allday {
  font-size: 10px; border-radius: 5px; padding: 2px 5px; margin: 2px 2px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 3; cursor: pointer;
}
.tt-block {
  position: absolute; left: 2px; right: 2px; border-radius: 7px; padding: 4px 6px;
  overflow: hidden; z-index: 2; cursor: pointer;
}
.block-pink { background: var(--color-primary-soft); border-left: 3px solid var(--color-primary); }
.block-blue { background: var(--color-blue-soft); border-left: 3px solid var(--color-blue); }
/* 日程：橙色背景区分类型，左侧竖条保留成员色区分是谁的（双通道） */
.block-amber { background: #FFF6E6; }
.block-amber.owner-pink { border-left: 3px solid var(--color-primary); }
.block-amber.owner-blue { border-left: 3px solid var(--color-blue); }
.block-amber .tt-block-title { color: #A9660A; }
.block-amber .tt-block-note { color: #8A5A0B; background: rgba(240, 167, 60, 0.28); }
.block-amber.has-note::after { background: #D98B1E; }
.block-event { border-right: 1px dashed rgba(0,0,0,0.12); }
.tt-block-title { font-size: 11px; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tt-block-title.clamp1 { -webkit-line-clamp: 1; }
.block-pink .tt-block-title { color: var(--color-primary-text); }
.block-blue .tt-block-title { color: var(--color-blue-text); }
.tt-block-sub, .tt-block-time { font-size: 10px; color: var(--color-text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 备注：像便利贴一样贴在色块里，一眼能看到 */
.tt-block-note {
  font-size: 10px; line-height: 1.35; margin-top: 2px;
  color: #8A5A0B; background: rgba(255, 209, 102, 0.45);
  border-radius: 4px; padding: 1px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 空间不够放备注文字时，角落亮一个小圆点提示「有备注」 */
.tt-block.has-note { padding-right: 11px; }
.tt-block.has-note::after {
  content: ''; position: absolute; top: 3px; right: 3px;
  width: 6px; height: 6px; border-radius: 50%; background: #F0B23C;
}
.tt-allday-note { color: #8A5A0B; font-weight: 600; }
.empty { text-align: center; color: var(--color-text-secondary); font-size: var(--fs-sm); padding: 48px 24px; }
.empty-icon { font-size: 44px; display: block; margin-bottom: 10px; }

/* 添加页 */
.add-hero { text-align: center; margin: 16px 0 18px; }
.add-title { font-size: 22px; font-weight: 700; color: var(--color-primary-text); }
.add-sub { font-size: var(--fs-sm); color: var(--color-text-secondary); margin-top: 6px; }
.text-area {
  width: 100%; min-height: 110px; background: #FDF5F8; border: none; outline: none; resize: none;
  border-radius: 10px; padding: 14px; font-size: var(--fs-base); font-family: inherit; margin-bottom: 4px;
}
.quick-row { display: flex; margin: 4px 14px 0; }
.quick-card {
  background: var(--color-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 12px; text-align: center; cursor: pointer;
}
.quick-full { width: 100%; }
.quick-card.recording { background: var(--color-primary-soft); }
.quick-icon { font-size: 36px; }
.quick-label { font-weight: 600; margin-top: 8px; }
.quick-hint { font-size: var(--fs-xs); color: var(--color-text-secondary); margin-top: 4px; }
.hint-card { margin: 20px 14px 0; background: var(--color-card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.hint-title { font-size: var(--fs-sm); font-weight: 600; margin-bottom: 8px; }
.hint-item { font-size: var(--fs-xs); color: var(--color-text-secondary); line-height: 1.9; }

/* 我的页 */
.me-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.me-avatar {
  width: 56px; height: 56px; line-height: 56px; text-align: center; font-size: 30px;
  background: linear-gradient(135deg, #FFB7C6, #FF9BB2); border-radius: 50%;
}
.me-nick { font-size: var(--fs-lg); font-weight: 700; }
.me-email { font-size: var(--fs-xs); color: var(--color-text-secondary); margin-top: 2px; }
.invite-row { display: flex; gap: 10px; align-items: center; }
.invite-code {
  flex: 1; text-align: center; font-size: 24px; font-weight: 800; letter-spacing: 6px;
  background: #FDF5F8; border-radius: 10px; padding: 12px 0; color: var(--color-primary-text);
}
.invite-copy { flex-shrink: 0; }
.invite-tip { font-size: var(--fs-xs); color: var(--color-text-secondary); margin-top: 8px; }
/* 提示为空时不占位置 */
.invite-tip:empty, .hint-card:empty { display: none; }
.partner-row { margin-top: 12px; font-size: var(--fs-sm); color: var(--color-text-secondary); }
/* 空间切换列表 */
.space-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; border-radius: 10px; margin-bottom: 6px;
  background: #FDF5F8; font-size: var(--fs-sm); cursor: pointer;
}
.space-row.active { background: var(--color-primary-soft); cursor: default; }
.space-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-flag { color: var(--color-primary-text); font-size: var(--fs-xs); flex-shrink: 0; margin-left: 10px; }
.space-go { color: var(--color-blue-text); font-size: var(--fs-xs); flex-shrink: 0; margin-left: 10px; }

/* 底部导航 */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-line); padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1; text-align: center; font-size: var(--fs-sm); color: #9AA0A6; padding: 12px 0; cursor: pointer;
}
.tab-item.active { color: var(--color-primary); font-weight: 700; }

/* 弹层 */
.mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(31,35,41,0.36);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 480px; max-height: 82vh; overflow-y: auto;
  background: #fff; border-radius: 18px 18px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
}
.sheet-title { font-size: var(--fs-lg); font-weight: 700; margin-bottom: 4px; }
.sheet-sub { font-size: var(--fs-xs); color: var(--color-text-secondary); margin-bottom: 12px; }
.sheet-row { margin-top: 10px; font-size: var(--fs-base); line-height: 1.5; }
.sheet-actions { display: flex; gap: 12px; margin-top: 20px; }
.sheet-actions .btn-ghost, .sheet-actions .btn-primary { flex: 1; margin-top: 0; text-align: center; }
/* 快速记事的次要入口：收窄、不抢主按钮的风头 */
.sheet-actions .btn-alt { flex: 0 0 auto; font-size: var(--fs-sm); padding: 10px 12px; white-space: nowrap; }
.btn-sheet-danger {
  flex: 1; text-align: center; background: #FDECEA; color: var(--color-danger);
  border: none; border-radius: 22px; font-size: var(--fs-base); padding: 10px 0; cursor: pointer;
}
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--color-line); }
.check-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--color-primary); flex-shrink: 0; }
.check-main { flex: 1; }
.check-title { font-weight: 600; font-size: var(--fs-sm); }
.check-sub { font-size: var(--fs-xs); color: var(--color-text-secondary); margin-top: 2px; }
.time-2col { display: flex; gap: 10px; }
.time-2col > div { flex: 1; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%);
  background: rgba(31,35,41,0.85); color: #fff; font-size: var(--fs-sm);
  border-radius: 20px; padding: 10px 20px; z-index: 200; white-space: nowrap;
}

/* AI 全能化：冲突/置信度/反问/例外/偏好/diff */
.conflict-warn {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: #FFF7E6; color: #B25E09; font-size: var(--fs-sm); line-height: 1.5;
}
.low-conf { color: #B25E09; font-weight: 600; }
.clarify-options { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.skip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.skip-empty { font-size: var(--fs-xs); color: var(--color-text-secondary); padding: 4px 0; }
.skip-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-primary-soft); color: var(--color-primary-text);
  border-radius: 14px; padding: 5px 12px; font-size: var(--fs-xs);
}
.skip-chip b { cursor: pointer; font-weight: 700; }
.skip-add { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.skip-add .form-input { flex: 1; }
.pref-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--color-line); font-size: var(--fs-sm);
}
.pref-row b { color: var(--color-danger); font-size: var(--fs-xs); cursor: pointer; flex-shrink: 0; margin-left: 12px; }
.diff-badge {
  display: inline-block; border-radius: 8px; padding: 1px 8px;
  font-size: 10px; font-weight: 700; margin-right: 4px; vertical-align: 1px;
}
.diff-new { background: #E8F7EF; color: #1F9D55; }
.diff-changed { background: #FFF7E6; color: #B25E09; }
.diff-exists { background: #F2F3F5; color: #86909C; }
.diff-cancelled { background: #FDECEA; color: #E5484D; }

/* 版本标记：方便确认手机加载的是不是最新版（用于排查缓存） */
.build-tag {
  text-align: center; margin: 18px 0 8px;
  font-size: var(--fs-xs); color: rgba(31,35,41,0.35); letter-spacing: 0.5px;
}
