/* yard.css — 恋人对话的「小院」（总第 9 步第 ④ 条，yard.js）：信头往下一拉展开、盖住对话的一层；还有信头这块接手指、小字旁的小箭头。
   新做的界面照精修规矩：字号只用 22 / 20 / 17 / 15 / 13 / 12，线 0.5px，强调色只有陶土，人的颜色只在楷书字和小印上，能点的至少 44px。
   颜色全用 App 的令牌（--bg、--surface、--ink、--muted、--clay、.t-* 的 --c-soft / --c-deep），三套皮肤 × 浅深跟着走。 */

/* ---------- 信头：这一块接住手指往下拉（页头默认点击穿透，chat.css）；小字旁一个小箭头，告诉人「往下有东西」 ---------- */
#app .ct-root.has-yard .ct-head:not(.is-open) .ct-head-bg { pointer-events: auto; touch-action: none; }
#app .ct-root.has-yard :is(.pp-today, .pp-miss, .ct-stamp) { touch-action: none; }
#app .ct-root.is-isl.is-letter.has-yard .ct-head:not(.is-open) .ct-sub::after {
  content: ''; display: inline-block; width: 11px; height: 11px; margin-left: 5px; vertical-align: -1px; background: currentColor; opacity: .75;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") center / contain no-repeat;
}

/* ---------- 小院这一层 ---------- */
.yd { position: absolute; inset: 0; z-index: 70; overflow: hidden; pointer-events: none; }
.yd[hidden] { display: none; }
.yd-sheet {
  position: absolute; inset: 0; display: flex; flex-direction: column; pointer-events: auto;
  background: var(--bg); color: var(--ink); transform: translate3d(0, -100%, 0); will-change: transform;
  box-shadow: 0 16px 40px -18px rgba(40, 25, 10, .36);
}
.yd.is-moving .yd-sheet { border-radius: 0 0 24px 24px; }
.yd-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px;
}
.yd.is-fit .yd-sheet, .yd.is-fit .yd-scroll { touch-action: none; }   /* 内容放得下：整张纸都能往上推 */
.yd-pull {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 56px;
  padding: 8px 0 calc(env(safe-area-inset-bottom, 0px) + 10px); font-size: 12px; line-height: 16px; color: var(--muted); touch-action: none; cursor: grab;
}
.yd-grab { width: 36px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 18%, transparent); }

/* 顶上一排：原来信头里的按钮（通话、搜索、换色、设置） */
.yd-tools { display: flex; justify-content: flex-end; gap: 2px; min-height: 44px; margin-right: -6px; }
.yd-tool { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 22px; color: var(--ink-2); }
.yd-tool:active { background: color-mix(in srgb, var(--ink) 7%, transparent); }

/* 两个人 + 在一起几天 + ta 的状态 / 小惦记 */
.yd-top { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px 4px; }
.yd-pair { display: flex; align-items: flex-start; justify-content: center; gap: 10px; }
.yd-who { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; padding: 4px 6px 6px; border-radius: 18px; color: var(--ink); }
.yd-who:active { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.yd-who .ui-avatar { width: 56px; }
.yd-who .ui-avatar > :is(.ui-char, .ui-ava-img) { --size: 46px; }
.yd-who small { max-width: 132px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; line-height: 16px; color: var(--muted); }
.yd-ln { width: 36px; height: .5px; margin-top: 30px; background: color-mix(in srgb, var(--ink) 30%, transparent); }
.yd-since { margin: 4px 0 0; padding: 4px 14px; border-radius: 14px; font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 28px; letter-spacing: .5px; color: var(--ink); }
.yd-since:active { background: color-mix(in srgb, var(--ink) 6%, transparent); }   /* 点了改在一起的日子（9-⑦） */
.yd-since b { font-weight: 600; font-variant-numeric: tabular-nums; }
.yd-since small { display: block; margin-top: 2px; font-family: var(--font-body); font-size: 13px; font-weight: 400; line-height: 18px; letter-spacing: 0; color: var(--muted); }
.yd-status { margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.yd-status i { font-style: normal; color: var(--muted); }
.yd-note { margin: 10px 0 0; max-width: 100%; padding: 10px 16px; border-radius: 16px; background: color-mix(in srgb, var(--clay) 10%, var(--surface)); text-align: left; }
.yd-note small { display: block; font-size: 12px; line-height: 16px; color: var(--clay-d); }
.yd-note p { margin: 2px 0 0; font-family: var(--font-display); font-size: 15px; line-height: 22px; color: var(--ink); overflow-wrap: anywhere; }
.yd-mynote { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: var(--muted); overflow-wrap: anywhere; }

/* 卡片：信筒、今天、写信 / 拾光记 / 一起养 */
.yd-card { display: block; width: 100%; margin-top: 12px; border-radius: 22px; background: var(--surface); color: var(--ink); text-align: left;
  box-shadow: 0 0 0 .5px color-mix(in srgb, var(--ink) 11%, transparent); }
.yd-hero { display: flex; align-items: center; gap: 16px; min-height: 96px; padding: 16px 18px; }
.yd-hero:active, .yd-row:active { background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.yd-env { position: relative; flex: none; display: inline-flex; filter: drop-shadow(0 6px 10px rgba(60, 40, 20, .14)); }
.yd-env-svg rect { fill: var(--env, #F1E8D8); stroke: color-mix(in srgb, var(--clay-d) 32%, transparent); }
.yd-env-svg path { fill: none; stroke: color-mix(in srgb, var(--clay-d) 40%, transparent); stroke-width: 1; }
.yd-env-svg .yd-env-l { stroke: color-mix(in srgb, var(--clay-d) 22%, transparent); }
.yd-wax { position: absolute; left: 29px; top: 19px; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 13px;
  background: radial-gradient(circle at 35% 30%, #C9714F, #8F3F26); box-shadow: 0 1px 2px rgba(60, 25, 10, .35); }
.yd-wax .ui-char { --size: 14px; color: #F6E2D8; }
.yd-hero.is-empty .yd-wax { display: none; }
.yd-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.yd-hero .yd-tx small { font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: .6px; color: var(--clay-d); }
.yd-hero .yd-tx b { margin-top: 4px; font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 26px; }
.yd-hero .yd-tx span { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--muted); }
.yd-hero.is-ready .yd-tx span { color: var(--clay-d); font-weight: 500; }
/* 下次见面（总第 9 步第 ⑦ 条，设计稿 ⑦）：大字几天后 + 日子 + 改的按钮；没定 / 过了是淡卡 */
.yd-meet { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 14px 12px 18px; }
.yd-meet:active { background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.yd-meet-n { flex: none; min-width: 52px; font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 38px; color: var(--ink); font-variant-numeric: tabular-nums; }
.yd-meet-n small { margin-left: 4px; font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--ink-2); }
.yd-meet .yd-tx b { font-size: 15px; font-weight: 500; line-height: 20px; }
.yd-meet .yd-tx span { font-size: 13px; line-height: 18px; color: var(--muted); }
.yd-meet-go { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--clay-soft); color: var(--clay-d); }
.yd-meet-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 13px; background: var(--clay-soft); color: var(--clay-d); }
.yd-meet.is-empty { background: color-mix(in srgb, var(--surface) 55%, transparent); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--ink) 16%, transparent); }
.yd-meet.is-empty .yd-tx b { color: var(--ink-2); }
.yd-meet.is-empty .yd-meet-go { background: transparent; color: var(--muted); }

.yd-today { display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px; }
.yd-rite { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 92px; padding: 10px 2px 8px; border-radius: 16px; color: var(--ink-2); }
.yd-rite:active { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.yd-rite-h { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; line-height: 18px; }
.yd-rite-h b { font-weight: 500; }
.yd-rite-h .ui-ico { color: var(--muted); }
/* 11＋：大图标 + 一行字（D.riteArt 画，样子在 rite-art.css） */
.yd-ric { display: inline-flex; margin: -6px 0 -8px; }
.yd-rite-l { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); }
.yd-rite small { min-height: 16px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }


.yd-grp { padding: 2px 0; }
.yd-row { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 8px 16px; text-align: left; color: var(--ink); border-radius: 0; }
.yd-row:first-child { border-radius: 22px 22px 0 0; }
.yd-row:last-child { border-radius: 0 0 22px 22px; }
.yd-row:only-child { border-radius: 22px; }
.yd-row + .yd-row::before { content: ''; position: absolute; top: 0; left: 64px; right: 0; height: .5px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.yd-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 11px; background: var(--clay-soft); color: var(--clay-d); }
.yd-row .yd-tx b { font-size: 17px; font-weight: 500; line-height: 22px; }
.yd-row .yd-tx span { overflow: hidden; font-size: 13px; line-height: 18px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.yd-row > .ui-ico:last-child { flex: none; color: var(--muted); }
.yd-pet { flex: none; display: inline-flex; width: 36px; height: 36px; }
.yd-pet svg { width: 100%; height: 100%; }
/* 拾光记那一行右边最近两张小图（总第 9 步第 ⑥ 条，设计稿 ⑦） */
.yd-thumbs { flex: none; display: flex; gap: 4px; }
.yd-thumbs i { display: block; width: 30px; height: 38px; overflow: hidden; border-radius: 5px; background: var(--clay-soft); box-shadow: 0 0 0 .5px var(--line); }
.yd-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- 三套皮肤 ---------- */
:root[data-skin="minimal"] .yd-card { border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
:root[data-skin="minimal"] .yd-row:first-child { border-radius: 16px 16px 0 0; }
:root[data-skin="minimal"] .yd-row:last-child { border-radius: 0 0 16px 16px; }
:root[data-skin="minimal"] .yd-ic { background: transparent; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
:root[data-skin="minimal"] :is(.yd-meet-go, .yd-meet-ic) { background: transparent; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
:root[data-skin="minimal"] .yd-meet.is-empty { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
:root[data-skin="minimal"] .yd-thumbs i { border-radius: 3px; background: transparent; box-shadow: 0 0 0 1px var(--line); }
:root[data-skin="cute"] .yd-card { border-radius: var(--wob, 22px); box-shadow: 0 0 0 2px var(--sk-out, var(--ink)), 4px 5px 0 2px var(--sk-fill, var(--clay-soft)); }
:root[data-skin="cute"] .yd-meet.is-empty { box-shadow: none; outline: 1.5px dashed var(--sk-out, var(--ink)); outline-offset: -1.5px; }
:root[data-skin="cute"] .yd-meet:not(.is-empty) .yd-meet-go { box-shadow: 0 0 0 1.5px var(--sk-out, var(--ink)); }
:root[data-skin="cute"] .yd-thumbs i { border-radius: 6px; box-shadow: 0 0 0 1.5px var(--sk-out, var(--ink)); transform: rotate(-3deg); }
:root[data-skin="cute"] .yd-thumbs i + i { transform: rotate(2.5deg); }

/* ---------- 聊天列表里恋人那一行（「我们」卡片收成了这一行，list.js + paper.js 的 rowDeco） ---------- */
#tabs .ls-row.is-us .ls-name::after {
  content: ''; display: inline-block; width: 13px; height: 13px; margin-left: 6px; vertical-align: -1px; background: var(--clay);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 20.5s-7.5-4.6-7.5-10.2A4.3 4.3 0 0 1 12 7.6a4.3 4.3 0 0 1 7.5 2.7c0 5.6-7.5 10.2-7.5 10.2z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 20.5s-7.5-4.6-7.5-10.2A4.3 4.3 0 0 1 12 7.6a4.3 4.3 0 0 1 7.5 2.7c0 5.6-7.5 10.2-7.5 10.2z'/></svg>") center / contain no-repeat;
}
#tabs .ls-row.has-rit .ls-meta { flex-direction: row-reverse; align-items: center; align-self: flex-start; margin-top: 2px; }   /* 时间在上；未读小太阳挪到时间左边，下面给按钮 */
#tabs .ls-row.has-rit .ls-prev { padding-right: 44px; }
.ls-us-pv { display: inline-flex; align-items: center; gap: 4px; color: var(--clay-d); }
.ls-us-pv > :is(.ui-ico, svg) { flex: none; }
.ls-rit {
  position: absolute; right: 20px; bottom: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 13px 0 11px;
  border-radius: 16px; background: var(--clay-soft); color: var(--clay-d); font-size: 13px; font-weight: 600; line-height: 1;
  transition: opacity var(--dur-2, .2s) var(--ease-out), background-color var(--dur-2, .2s) var(--ease-out);
}
.ls-rit::after { content: ''; position: absolute; inset: -6px -4px; }   /* 触控区补到 44px */
.ls-rit:active { transform: scale(.96); }
.ls-rit.is-done { background: transparent; color: var(--muted); font-weight: 500; padding: 0 2px; }
.ls-rit-ok { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 7px; background: var(--clay); color: var(--on-clay, #FFFFFF); }
.ls-row.is-swiping .ls-rit, .ls-row.is-revealed .ls-rit { opacity: 0; pointer-events: none; }   /* 左滑出置顶 / 删除时藏起来 */
:root:not([data-skin]) #tabs .ls-row.has-rit .ls-rit { right: 22px; bottom: 13px; }
:root[data-skin="minimal"] .ls-rit:not(.is-done) { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-skin="cute"] .ls-rit:not(.is-done) { box-shadow: 0 0 0 1.5px var(--sk-out, var(--ink)); }
