/* ============================================================
   只此一隅 · 情侣约会项目网站
   浅色暖调主题
   ============================================================ */
:root {
  --bg: #fff8f6;
  --bg-2: #fdf1f2;
  --surface: #ffffff;
  --surface-2: #fffafb;
  --primary: #e8506b;
  --primary-dark: #cf3c58;
  --primary-soft: #fff0f3;
  --accent: #ff8a5b;
  --accent-soft: #fff3ec;
  --mint: #3fbfa0;
  --mint-soft: #ecfaf6;
  --sky: #5b8def;
  --sky-soft: #eff4ff;
  --text: #2f2331;
  --text-2: #5d4d58;
  --muted: #94848c;
  --border: #f2e3e6;
  --border-2: #f7eef0;
  --shadow-sm: 0 1px 2px rgba(120, 60, 80, .05), 0 2px 8px rgba(120, 60, 80, .04);
  --shadow: 0 4px 16px rgba(140, 70, 90, .08), 0 1px 3px rgba(140, 70, 90, .05);
  --shadow-lg: 0 18px 48px rgba(140, 70, 90, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
               -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 88% -12%, #ffe6ea 0%, rgba(255, 230, 234, 0) 62%),
    radial-gradient(900px 460px at -8% 4%, #fff1e8 0%, rgba(255, 241, 232, 0) 58%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* 兜底：单栏小屏上任何一处（长的只读输入框、没换行的地址）撑宽了页面，
     都别让整页能左右拖 —— 拖起来会把顶栏也一起带偏。 */
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 250, 251, .86);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  /* 必须允许换行：窄屏时导航会独占一整行落到第二排。
     曾经这里是默认的 nowrap，下面的 .nav { order: 3; width: 100% }
     就被 flex-shrink 压成了 0 宽 —— 手机端四个入口全部消失。 */
  flex-wrap: wrap;
  gap: 10px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .3px;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(140deg, #ff9a8b, var(--primary) 62%, #d93a6a);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(232, 80, 107, .3);
  font-size: 17px;
  flex: none;
  overflow: hidden;
}

/* logo 是图片时（「我们的资料」里填了图片，或 static/assets/logo.* 自动探测到）
   就不套那层渐变印章底，直接把图铺满整个方块。 */
.brand-mark.is-image {
  background: none;
  box-shadow: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .6px;
  margin-top: -3px;
}

/* 导航栏那一整张 logo（配置文件 SITE_NAV_LOGO / 默认 nav_logo.png）。
   固定高度、宽度自适应：方形图标和长条形字标都能用同一套样式。 */
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  flex: none;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  flex-wrap: wrap;
}

.nav a {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  transition: all .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav a:hover { background: var(--primary-soft); color: var(--primary); }

.nav a.active {
  background: linear-gradient(135deg, var(--primary), #f0738a);
  color: #fff;
  box-shadow: 0 6px 16px rgba(232, 80, 107, .26);
}

.nav-dot {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.nav a.active .nav-dot { background: rgba(255, 255, 255, .28); }

.topbar-actions { margin-left: auto; display: flex; gap: 10px; }

/* ------------------------------------------------------- 布局 */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

/* 登录页顶部那一整块大 logo（配置文件 SITE_HERO_LOGO / 默认 logo.png） */
.hero-logo {
  display: flex;
  justify-content: center;
  margin: -4px 0 26px;
}

/* 登录页里的那份：离下面的卡片留点气口，尺寸也收敛些，别把表单顶出首屏 */
.login-hero { margin: 0 0 22px; }
.login-hero img { max-width: min(100%, 300px); max-height: 200px; }

.hero-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 340px);
  max-height: 260px;
  object-fit: contain;
  /* 用 drop-shadow 而不是 box-shadow：透明底的 PNG 才会贴着轮廓投出阴影 */
  filter: drop-shadow(0 18px 32px rgba(190, 90, 120, .18));
}

/* ------------------------------------------------------- 页脚 */
.site-foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 46px;
  text-align: center;
  color: var(--muted);
}

/* 题字上面一道由浅入深的细线 */
.site-foot::before {
  content: "";
  display: block;
  width: 54px;
  height: 1px;
  margin: 0 auto 16px;
  background: linear-gradient(90deg, rgba(240, 205, 214, 0), #f0cdd6, rgba(240, 205, 214, 0));
}

.site-foot .foot-orn {
  display: block;
  color: #eecdd6;
  font-size: 14px;
  line-height: 1;
  margin-bottom: 10px;
}

.site-foot p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .34em;
  /* 字距会在最后一个字后面也留一份，靠等量的缩进把视觉拉回居中 */
  text-indent: .34em;
  color: #bb9aa4;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0 0 4px;
  font-size: 26px;
  letter-spacing: -.3px;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.span-2 { grid-column: span 2; }

/* ------------------------------------------------------- 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head h3 {
  margin: 0;
  font-size: 15.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-head .sub { font-size: 12.5px; color: var(--muted); }

/* 统计卡 */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -26px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--primary-soft);
  opacity: .75;
}

.stat .icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 18px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.stat .label { font-size: 13px; color: var(--muted); position: relative; z-index: 1; }

.stat .value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  position: relative;
  z-index: 1;
}

.stat .value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }

.stat .foot { font-size: 12.5px; color: var(--muted); margin-top: 4px; position: relative; z-index: 1; }

.ic-rose { background: var(--primary-soft); color: var(--primary); }
.ic-peach { background: var(--accent-soft); color: #ef6b35; }
.ic-mint { background: var(--mint-soft); color: var(--mint); }
.ic-sky { background: var(--sky-soft); color: var(--sky); }

/* ------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 17px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
  line-height: 1.3;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, #f0657f, var(--primary));
  color: #fff;
  box-shadow: 0 6px 18px rgba(232, 80, 107, .28);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(232, 80, 107, .34); }

.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { border-color: #f0c8d1; color: var(--primary); background: var(--primary-soft); }

.btn-mint { background: var(--mint-soft); color: #1f8f76; border-color: #d3f0e7; }
.btn-mint:hover { background: #e0f7f0; }

.btn-sky { background: var(--sky-soft); color: #3f6fd8; border-color: #dbe6ff; }
.btn-sky:hover { background: #e6eeff; }

.btn-danger { background: #fff2f2; color: #d8434c; border-color: #fbdcdd; }
.btn-danger:hover { background: #ffe8e8; }

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------- 徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}

.badge-rose { background: var(--primary-soft); border-color: #ffdbe3; color: var(--primary-dark); }
.badge-peach { background: var(--accent-soft); border-color: #ffe0cf; color: #dc6a30; }
.badge-mint { background: var(--mint-soft); border-color: #d3f0e7; color: #1f8f76; }
.badge-sky { background: var(--sky-soft); border-color: #dbe6ff; color: #3f6fd8; }
.badge-grey { background: #f6f4f5; border-color: #eee9eb; color: var(--muted); }

/* ------------------------------------------------------- 表单 */
.form-grid { display: grid; gap: 14px; }
.form-row { display: grid; gap: 6px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* 预计时长：天 / 小时 / 分钟三个小输入框并排 */
.duration-input { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.duration-input input[type="number"] { width: 62px; padding: 9px 6px; text-align: center; }
.duration-input span { font-size: 12.5px; color: var(--muted); }

label.lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

label.lbl .opt { font-weight: 500; color: var(--muted); font-size: 12px; }

input[type="text"], input[type="number"], input[type="date"], input[type="datetime-local"],
input[type="url"], input[type="password"], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: all .16s ease;
}

textarea { resize: vertical; min-height: 78px; line-height: 1.6; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #f2a9b9;
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(232, 80, 107, .12);
}

input::placeholder, textarea::placeholder { color: #c1b3b9; }

.hint { font-size: 12px; color: var(--muted); }

/* 星级选择 */
.stars { display: flex; gap: 4px; align-items: center; }

.stars input { display: none; }

.stars label {
  font-size: 22px;
  cursor: pointer;
  color: #e6dade;
  transition: transform .14s ease, color .14s ease;
  line-height: 1;
}

.stars label:hover { transform: scale(1.15); }

/* 点亮状态。
   这里只能有一条上色规则 —— 曾经同时存在
     .stars input:checked ~ label { color: #e6dade; }   // 特异性 (0,2,2)
     .stars label.on            { color: #ffb01f; }      // 特异性 (0,2,1)
   后者特异性更低，永远被前者覆盖。而 DOM 顺序是 input1,label1,input2,label2…，
   选中第 N 个 input 时 `input:checked ~ label` 会把第 N 颗及之后的所有星星刷灰，
   表现为「点几颗就少亮一颗」。上色统一由 app.js 的 initStars() 用 .on 控制。 */
.stars label.on { color: #ffb01f; }

/* 无 JS 时的兜底（:has 需 Chrome 105+ / Safari 15.4+ / Firefox 121+）。
   label:nth-of-type 按同标签名计数，所以 -n+N 正好取前 N 颗，与 .on 语义一致。 */
.stars:has(input[value="1"]:checked) label:nth-of-type(-n+1),
.stars:has(input[value="2"]:checked) label:nth-of-type(-n+2),
.stars:has(input[value="3"]:checked) label:nth-of-type(-n+3),
.stars:has(input[value="4"]:checked) label:nth-of-type(-n+4),
.stars:has(input[value="5"]:checked) label:nth-of-type(-n+5) { color: #ffb01f; }

.stars-static { color: #ffb01f; letter-spacing: 2px; font-size: 13px; }
.stars-static .off { color: #e6dade; }

/* 分段选择 */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }

.seg input { display: none; }

.seg label {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .16s ease;
}

.seg label:hover { border-color: #f0c8d1; color: var(--primary); }

.seg input:checked + label {
  background: var(--primary-soft);
  border-color: #f7bcca;
  color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(232, 80, 107, .09);
}

/* ------------------------------------------------------- 灵感卡片 */
.idea-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.idea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: all .2s ease;
  position: relative;
}

.idea:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #f4d3db;
}

.idea-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.idea h4 { margin: 0; font-size: 16px; line-height: 1.4; }

.idea .meta { display: flex; flex-wrap: wrap; gap: 6px; }

.idea .desc {
  font-size: 13.5px;
  color: var(--text-2);
  margin: 0;
  flex: 1;
}

.idea .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.idea .foot .when { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

.tag {
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 7px;
  background: #faf6f7;
  border: 1px solid var(--border-2);
  color: var(--muted);
}

.hearts { color: var(--primary); font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
.hearts .off { color: #eddfe3; }

/* 空状态 */
.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--muted);
}

.empty .big { font-size: 44px; margin-bottom: 10px; opacity: .75; }
.empty h3 { margin: 0 0 6px; color: var(--text-2); font-size: 16px; }
.empty p { margin: 0 0 18px; font-size: 13.5px; }

/* ------------------------------------------------------- 筛选栏 */
.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filters form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; }

.filters input[type="text"] { width: 210px; }
.filters select { width: auto; min-width: 130px; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  transition: all .16s ease;
}

.chip:hover { border-color: #f0c8d1; color: var(--primary); }

.chip.active {
  background: linear-gradient(135deg, #f0657f, var(--primary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(232, 80, 107, .24);
}

/* ------------------------------------------------------- 提案行 */
.proposal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: box-shadow .2s ease;
  position: relative;       /* 让整卡可点的 .proposal-hit 铺满这一层 */
}

.proposal:hover { box-shadow: var(--shadow); }

/* 整张卡片可点：一层透明覆盖层铺满卡片，点哪儿都进详情页。
   之所以不把整卡包进 <a>：卡片里本来就有表单和按钮，
   嵌套 <a> 会导致点击「答应」时误跳转。 */
.proposal-hit {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  z-index: 1;
}

/* 卡片里真正的交互元素要抬到覆盖层之上，否则点不到 */
.proposal .side,
.proposal .side a,
.proposal .side button,
.proposal .main a {
  position: relative;
  z-index: 2;
}

.proposal:hover h4 { color: var(--primary); }
.proposal h4 { transition: color .16s ease; }

.proposal.is-pending { border-left: 4px solid var(--primary); }
.proposal.is-accepted { border-left: 4px solid var(--mint); }
.proposal.is-declined { border-left: 4px solid #ccc2c7; }
.proposal.is-done { border-left: 4px solid var(--sky); }

.proposal .main { flex: 1; min-width: 0; }

.proposal h4 { margin: 0 0 6px; font-size: 16px; }

.proposal .quote {
  margin: 10px 0 0;
  padding: 10px 14px;
  background: var(--surface-2);
  border-left: 3px solid #f5c9d4;
  border-radius: 0 10px 10px 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.proposal .reply {
  margin: 8px 0 0;
  padding: 10px 14px;
  background: var(--mint-soft);
  border-left: 3px solid #a8e6d5;
  border-radius: 0 10px 10px 0;
  font-size: 13.5px;
  color: #1f7f6a;
}

.proposal .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }

.proposal .side { display: flex; flex-direction: column; gap: 8px; min-width: 132px; }

/* ------------------------------------------------------- 时间线 */
.timeline { position: relative; padding-left: 30px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #ffd9e1, #ffe9dd 60%, rgba(255, 233, 221, 0));
  border-radius: 2px;
}

.tl-item { position: relative; margin-bottom: 18px; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px #fff5f7;
}

.tl-item .rec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}

.tl-item .rec:hover { box-shadow: var(--shadow); transform: translateX(2px); }

.rec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rec-head h4 { margin: 0 0 6px; font-size: 16px; }
.rec-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.rec-notes { margin: 12px 0 0; font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; }

/* 记录页照片：只有一张就放大看，多张就并排成网格 */
.rec-photos {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  grid-template-columns: 1fr;
  max-width: 320px;
}

.rec-photos.is-multi {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 560px;
}

.rec-photo {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.rec-photo img { width: 100%; display: block; }

.rec-photos.is-multi .rec-photo { aspect-ratio: 1 / 1; }
.rec-photos.is-multi .rec-photo img { height: 100%; object-fit: cover; }

/* ------------------------------------------------------- 进度条 */
.bar-row { display: grid; grid-template-columns: 84px 1fr 44px; align-items: center; gap: 12px; margin-bottom: 11px; font-size: 13px; }
.bar-row .name { color: var(--text-2); font-weight: 600; }
.bar-track { height: 8px; border-radius: 999px; background: #f7eff1; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffa88c, var(--primary)); }
.bar-fill.mint { background: linear-gradient(90deg, #7fdbc4, var(--mint)); }
.bar-fill.sky { background: linear-gradient(90deg, #9db9f7, var(--sky)); }
.bar-row .num { text-align: right; color: var(--muted); font-weight: 700; font-size: 12.5px; }

/* 月历柱状 */
.month-bars { display: flex; align-items: flex-end; gap: 7px; height: 110px; padding-top: 10px; }
.month-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.month-col .bar { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #ff9d8a, var(--primary)); min-height: 4px; transition: height .5s ease; }
.month-col .m { font-size: 11px; color: var(--muted); }
.month-col .c { font-size: 11px; font-weight: 700; color: var(--primary); height: 14px; }

/* ------------------------------------------------------- 提示条 */
.flash-wrap {
  position: fixed;
  top: 74px;
  right: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

.flash {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--mint);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  animation: slideIn .3s ease;
}

.flash.warn { border-left-color: var(--accent); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ------------------------------------------------------- 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(60, 32, 44, .38);
  backdrop-filter: blur(3px);
  z-index: 80;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
  overflow-y: auto;
}

.modal-mask.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  padding: 26px 28px;
  animation: pop .26s cubic-bezier(.2, .9, .3, 1.1);
  border: 1px solid var(--border);
}

.modal.wide { max-width: 660px; }

@keyframes pop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 14px;
}

.modal-head h3 { margin: 0; font-size: 18px; }

.modal-close {
  border: none;
  background: #f7f2f4;
  width: 32px; height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 17px;
  color: var(--muted);
  display: grid; place-items: center;
  transition: all .16s ease;
}

.modal-close:hover { background: var(--primary-soft); color: var(--primary); }

.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* 抽灵感结果 */
.draw-result {
  margin-top: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff3f5, #fff7f1);
  border: 1px dashed #f7c3ce;
  display: none;
}

.draw-result.show { display: block; animation: pop .3s ease; }
.draw-result h4 { margin: 0 0 8px; font-size: 19px; }
.draw-result .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }

/* 小工具 */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-tight { gap: 7px; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-14 { margin-top: 14px; }
.mt-18 { margin-top: 18px; }
.grow { flex: 1; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }

.hidden { display: none !important; }

/* 详情折叠 */
details.inline-edit summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  list-style: none;
  padding: 4px 0;
}
details.inline-edit summary::-webkit-details-marker { display: none; }
details.inline-edit summary:hover { color: var(--primary); }
details.inline-edit[open] summary { margin-bottom: 12px; color: var(--primary); }

/* ============================================================
   两个人 · 身份 / 头像 / 标签
   ============================================================ */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
  flex: none;
}

.avatar.lg { width: 46px; height: 46px; border-radius: 14px; font-size: 23px; }

/* 主题色：两个人的区分色，用在头像底、标签底 */
.p-rose { background: var(--primary-soft); color: var(--primary-dark); }
.p-peach { background: var(--accent-soft); color: #dc6a30; }
.p-mint { background: var(--mint-soft); color: #1f8f76; }
.p-sky { background: var(--sky-soft); color: #3f6fd8; }

/* 「🐰 小满 提的」这类标签 */
.who {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 3px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}

a.who:hover { border-color: #f0c8d1; }

/* 顶栏的「我现在是谁」 */
.me-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.me-chip.is-switchable { cursor: pointer; transition: all .16s ease; }
.me-chip.is-switchable:hover { border-color: #f0c8d1; background: var(--primary-soft); }
.me-caret { color: var(--muted); font-size: 11px; }

/* 身份切换弹窗里的大按钮 */
.person-pick {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all .16s ease;
}

.person-pick small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.person-pick:hover { border-color: #f0c8d1; background: var(--primary-soft); }
.person-pick.active { border-color: #f7bcca; background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(232, 80, 107, .09); }

/* 资料页预览 */
.person-preview { display: flex; align-items: center; gap: 14px; }
.preview-name { font-size: 19px; font-weight: 800; letter-spacing: -.2px; }

/* 资料页预览里的大 logo 缩略图 */
.preview-hero { height: 64px; width: auto; max-width: 160px; object-fit: contain; }

/* ============================================================
   两个人的评价
   ============================================================ */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.review {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 15px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
}

/* 当前登录的人那一份，给一点视觉重量 */
.review.is-mine { background: #fffafb; border-color: #f7e2e7; }
.review.is-empty { border-style: dashed; }

.review-head { display: flex; align-items: center; gap: 8px; }
.review-head strong { font-size: 14px; }

.stars-static { color: #ffb01f; letter-spacing: 2px; font-size: 13px; }

.review-notes {
  margin: 0;
  font-size: 13px;
  line-height: 1.62;
  color: var(--text-2);
  white-space: pre-wrap;
}

.review-grid.compact { margin-top: 11px; gap: 9px; }
.review-grid.compact .review { padding: 10px 12px; gap: 6px; }
.review-grid.compact .review-notes { font-size: 12.5px; }

/* 「我」这个小标记 */
.tag-you {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid #ffdbe3;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
}

/* 记录表单里按人分栏的评价区块 */
.review-block {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .18s ease;
}

.review-block.is-me { background: #fffafb; border-color: #f7e2e7; }

/* 取消勾选后整块变淡，提醒不会保存 */
.review-block.is-off { opacity: .5; background: #fbf9fa; }
.review-block.is-off .review-body { pointer-events: none; }

.review-block-head { display: flex; align-items: center; gap: 8px; }
.review-block-head strong { font-size: 14.5px; }

.review-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.review-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 0;
}

.review-body { display: grid; gap: 12px; }

/* 评分 / 花费那块的右侧信息 */
.rec-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.rec-avg {
  font-size: 21px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
  line-height: 1;
}

.rec-avg small { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ============================================================
   零碎
   ============================================================ */
.callout {
  background: linear-gradient(135deg, #fff3f5, #fff7f1);
  border-color: #f7c3ce;
}

.mb-18 { margin-bottom: 18px; }

.tips { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--text-2); line-height: 1.85; }
.tips li { margin-bottom: 2px; }

.code-block {
  margin: 12px 0;
  padding: 14px;
  border-radius: 12px;
  background: #faf6f7;
  border: 1px solid var(--border-2);
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre;
}

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: #faf6f7;
  border: 1px solid var(--border-2);
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  font-size: 12.5px;
}

/* ------------------------------------------------------- 响应式 */
@media (max-width: 720px) {
  .me-name { display: none; }
  .review-grid { grid-template-columns: 1fr; }
  .rec-side { align-items: flex-start; }
  .topbar-actions .btn-ghost { padding: 6px 10px; }
}


@media (max-width: 720px) {
  .topbar-inner { padding: 10px 16px; gap: 10px 12px; }

  /* 手机端导航独占第二行。
     关键在 flex: 1 0 100%（basis 100% + 不收缩）—— 配合 .topbar-inner 的
     flex-wrap: wrap，它才会真的换到下一行并占满整行宽。
     旧写法只有 order:3 + width:100%，在 nowrap 的 flex 容器里 width 会被
     flex-shrink 吃掉，四个入口被挤成 0 宽，于是「首页 / 约会项目池 /
     约会提案 / 约会记录」在手机上完全看不见。 */
  .nav {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    gap: 2px;
    padding-bottom: 2px;
  }

  /* 收一收内边距和字号，让四个入口在一行里就放得下（放不下时仍可左右滑动） */
  .nav a { padding: 6px 10px; font-size: 12.5px; gap: 5px; }

  .topbar-actions { margin-left: auto; gap: 8px; }

  /* 「记录一次约会」在手机上只留 ✍️，否则和品牌挤不下会多折一行 */
  .topbar-actions .btn-label { display: none; }

  .page { padding: 20px 16px 60px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; }
  .idea-list { grid-template-columns: 1fr; }
  .proposal { flex-direction: column; }
  .proposal .side { flex-direction: row; width: 100%; min-width: 0; }
  .proposal .side .btn { flex: 1; }
  .page-head h1 { font-size: 22px; }
  /* 手机上给大 logo 让出空间，别把首屏内容顶下去 */
  .hero-logo { margin-bottom: 20px; }
  .hero-logo img { max-width: min(100%, 240px); max-height: 190px; }
  .brand-logo { height: 34px; max-width: 150px; }
  /* 顶栏变两行后比原来高，提示条要往下挪，别压住导航 */
  .flash-wrap { left: 16px; right: 16px; max-width: none; top: 108px; }
  .modal { padding: 20px; }
  .bar-row { grid-template-columns: 68px 1fr 38px; }
  .site-foot { padding-bottom: 34px; }
}

/* 更窄的机器上把品牌副标题收起来，并再收一档导航，保证四个入口一行放得下 */
@media (max-width: 420px) {
  .brand { font-size: 16px; }
  .brand small { display: none; }
  .nav a { padding: 6px 7px; font-size: 12px; }
  .brand-logo { height: 30px; }
}

/* ============================================================
   登录页（独立整页，不套顶栏）
   ============================================================ */
.login-page {
  display: grid;
  place-items: center;
  /* 100vh 在这里有两个坑，都得防：
     1) 老 WebView（微信 X5）把 100vh 当成「不含地址栏的最大高度」，
        页面比可视区高的时候，居中的内容会被顶到屏幕外面去 —— 看上去就是白屏；
     2) 手机浏览器地址栏收起/展开会改 vh，一改就跳。
     所以：用 min-height 而不是 height（内容高了还能撑开），
     并且给一行 `height: auto` 的兜底。 */
  min-height: 100vh;
  padding: 32px 18px;
}

/* 内容比一屏高的时候别居中 —— 居中会把顶部那段推到可视区以上，
   在没有地址栏的 WebView 里用户根本滚不到。 */
@media (max-height: 620px) {
  .login-page { place-items: start center; }
}

.login-wrap { width: 100%; max-width: 420px; }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 30px 26px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 22px;
}

.login-brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--muted);
  font-weight: 600;
}

.login-card h1 { margin: 0 0 20px; font-size: 24px; letter-spacing: .3px; }

/* 登录页底部的题字 */
.login-foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: .3em;
  text-indent: .3em;
  color: #bfa3ab;
}

.login-form { display: grid; gap: 14px; }
.login-form .btn { margin-top: 6px; padding: 11px 18px; font-size: 15px; }

.login-flash {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #f6d6de;
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
}

/* ============================================================
   提案详情页（对外链接）
   ============================================================ */
.crumb { margin: 0 0 8px; font-size: 13px; }
.crumb a { color: var(--muted); font-weight: 600; }
.crumb a:hover { color: var(--primary); }

/* 顶部那条「这条提案的链接」＋复制按钮 */
.share-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px 16px;
  border-color: #f0c8d1;
  background: linear-gradient(96deg, var(--primary-soft), var(--surface) 78%);
}

.share-bar-main { flex: 1; min-width: 0; display: grid; gap: 6px; }

.share-bar-label { font-size: 12px; font-weight: 700; color: var(--primary-dark); }

.share-bar-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #f0ccd6;
  background: #fff;
  color: var(--text);
  /* 用 <div> 而不是 <input readonly>：
     iOS / 微信 WebView 里 readonly 输入框点一下会弹软键盘、还会被聚焦放大。
     换成普通文本块后，窄屏要能自己收缩；长链接也不撑破卡片。 */
  overflow-wrap: anywhere;
  word-break: break-all;
  line-height: 1.5;
  cursor: text;
  /* 长按能直接选中复制 —— 这在微信里比 execCommand 还可靠 */
  -webkit-user-select: text;
  user-select: text;
}

.share-bar-btn { white-space: nowrap; }

/* 手机上复制框和按钮上下排。
   注意：这条必须写在 .share-bar 的基础规则**之后** —— 同一选择器、同样的
   特异性下靠后者赢，写在前面会被上面的 flex-direction: row 盖掉，
   结果就是链接那一行被按钮挤得只剩几个字符、整页横向溢出。 */
@media (max-width: 720px) {
  .share-bar { flex-direction: column; align-items: stretch; }
  .share-bar-btn { width: 100%; }
  /* 有些老内核不认 overflow-wrap，break-all 是更硬的那道保险 */
  .share-bar-input { font-size: 12px; }
}

/* ============================================================
   图片上传
   ============================================================ */
.upload-box { position: relative; display: grid; gap: 12px; }

.upload-drop {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 22px 16px;
  border: 1.5px dashed #edd8dd;
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  text-align: center;
  transition: all .18s ease;
}

.upload-drop:hover,
.upload-drop.dragging { border-color: #f2a9b9; background: var(--primary-soft); }

.upload-box:focus-within .upload-drop {
  border-color: #f2a9b9;
  box-shadow: 0 0 0 3.5px rgba(232, 80, 107, .12);
}

.upload-icon { font-size: 22px; line-height: 1; }
.upload-drop strong { font-size: 13.5px; color: var(--text-2); }

/* 原生文件框藏起来但保留可聚焦性，点上面的虚线框就会触发它 */
.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  clip: rect(0 0 0 0);
}

/* 照片网格：新建时预览新选的照片，编辑时也用来列已有的照片 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.photo-item {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
}

.photo-item img { display: block; width: 100%; height: 108px; object-fit: cover; }

.photo-item-check {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.photo-item-mark {
  display: block;
  padding: 6px 8px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* 勾上 = 保存时删掉这张，整块变灰底 + 文字变红，避免手滑 */
.photo-item.is-removed img { filter: grayscale(1); opacity: .3; }
.photo-item.is-removed .photo-item-mark { color: var(--primary-dark); font-weight: 600; }

.photo-block { display: grid; gap: 10px; }
.photo-block-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text-2); }
.photo-new { display: grid; gap: 10px; justify-items: start; }

/* 记录页照片：点开看大图，加载失败时退化成一行提示 */
.rec-photo a { display: block; }
.rec-photo .rec-photo-fallback { display: none; padding: 14px; color: var(--muted); font-size: 13px; word-break: break-all; }
.rec-photo.is-broken a { display: none; }
.rec-photo.is-broken .rec-photo-fallback { display: block; }

@media (max-width: 720px) {
  .login-card { padding: 26px 20px 22px; }
  .login-card h1 { font-size: 21px; }
  .rec-photos.is-multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

