/* 正式程序在原型样式之上补的几样：测试标记、我的空间、提示条 */
.test-badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fdf0d5;
  color: #8a5a12;
  font-size: 13px;
}

.choice.nda {
  min-height: 0;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.choice.nda a {
  color: var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(12px + env(safe-area-inset-top));
  z-index: 80;
  width: min(92%, 400px);
  padding: 12px 16px;
  border-radius: 16px;
  background: #1a1814;
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  transform: translateX(-50%);
}

/* 我的空间 */
.upload {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  margin: 8px 0 18px;
  border-radius: 14px;
  background: #1a1814;
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}

.upload input {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.cell {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #e8e1d5;
  aspect-ratio: 3 / 4;
}

.cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cell .badge {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
}

.cell .play {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
}

.cell-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.cell-actions button {
  flex: 1;
  height: 32px;
  border: 1px solid #d9d1c3;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
}

.viewer-media {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.viewer-media img,
.viewer-media video {
  max-width: 100%;
  max-height: 100%;
}

/* 双指放大后松手保持，单指平移（ADR-0226） */
.viewer.mz-on {
  touch-action: none;
}

.viewer-media img.mz-zoomed,
.viewer-media video.mz-zoomed {
  will-change: transform;
}

.viewer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.7);
  font-size: 15px;
}

.viewer-bar .grow {
  flex: 1;
  min-width: 0;
}

.viewer-bar button {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.viewer-bar .on {
  background: #b2452f;
}

.legal {
  max-width: 680px;
  line-height: 1.7;
}

.legal h1 {
  font-size: 26px;
}

.legal h2 {
  margin-top: 28px;
  font-size: 18px;
}

.status-line {
  margin: 4px 0 0;
  color: #6f685d;
  font-size: 12px;
}

.status-line.bad {
  color: #b2452f;
}

/* 标题和右上角的上传按钮在一行 */
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.title-row h1 {
  margin-right: auto;
}

.upload-mini {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: #1a1814;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.upload-mini input {
  display: none;
}

.upload-mini span[aria-hidden] {
  font-size: 20px;
  line-height: 1;
}

.lead.one-line {
  margin: 0 0 14px;
}

/* 找照片：搜索、排序、跳到某月、筛选、多选 */
.muted {
  color: var(--muted);
  font-size: 13px;
}

.finder {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.finder-search,
.finder select,
.finder input[type="date"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d9d1c3;
  border-radius: 12px;
  background: #fffdf8;
  font: inherit;
  font-size: 16px;
}

.finder-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.finder-row > select,
.finder-row.dates > label {
  flex: 1;
  min-width: 0;
}

.finder-row.dates label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.finder-row .grow {
  flex: 1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips button,
button.small {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d9d1c3;
  border-radius: 999px;
  background: #fffdf8;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.chips button.on,
button.small.on {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.month {
  margin: 22px 0 10px;
  font-size: 17px;
}

.filters {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e4ddd0;
  border-radius: 16px;
  background: #faf6ee;
}

.filters #filter-clear {
  justify-self: start;
}

.finder,
.finder > *,
.filters > *,
.finder-row.dates input {
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 0 10px;
  font-size: 18px;
}

.section-title button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
}

.chips.levels {
  flex-wrap: nowrap;
  gap: 6px;
}

.chips.levels button {
  padding: 0 12px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 18px 0 4px;
  font-size: 17px;
  font-weight: 600;
}

.crumbs a {
  color: var(--muted);
  font-weight: 400;
  text-decoration: none;
}

.crumbs .sep {
  color: var(--muted);
}

/* 按年、按月的封面卡片 */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.cards.years {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #e8e1d5;
  object-fit: cover;
}

.card strong {
  margin-top: 4px;
  font-size: 15px;
}

.cards.years .card strong {
  font-size: 18px;
}

.card span {
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(5, 1fr);
  }

  .cards.years {
    grid-template-columns: repeat(4, 1fr);
  }
}

.grid.album {
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.grid.album > div {
  min-width: 0;
}

.grid.album .cell {
  border-radius: 6px;
  aspect-ratio: 1;
  cursor: pointer;
}

.grid.album .cell .badge {
  left: 4px;
  top: 4px;
  padding: 1px 6px;
  font-size: 11px;
}

.grid.album.recent > div:nth-child(10) {
  display: none;
}

@media (min-width: 640px) {
  .grid.album {
    grid-template-columns: repeat(5, 1fr);
  }

  .grid.album.recent > div:nth-child(10) {
    display: block;
  }
}

.month small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.cell-title {
  margin: 4px 2px 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell.picked {
  outline: 4px solid #b2452f;
  outline-offset: -4px;
}

.cell .tick {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
}

.cell.picked .tick {
  background: #b2452f;
}

.more {
  height: 40px;
}

.select-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: #fff;
}

.select-bar .grow {
  flex: 1;
}

.select-bar button {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.viewer-bar {
  flex-wrap: wrap;
}

.viewer-caption {
  margin: 0;
  padding: 10px 16px 0;
  background: rgba(0, 0, 0, 0.7);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(26, 24, 20, 0.35);
}

/* 底部弹层：和原型 web/ui.css 一样，顶上一根小横条，标题靠左（第一个 h2 或 strong） */
.sheet-card {
  display: grid;
  gap: 12px;
  width: min(100%, 460px);
  max-height: 92dvh;
  overflow: auto;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: #fffdf8;
}

.sheet-card::before {
  content: "";
  justify-self: center;
  width: 40px;
  height: 4px;
  margin-bottom: 4px;
  border-radius: 999px;
  background: #ddd5c7;
}

.sheet-card > h2,
.sheet-card > strong:first-child {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  text-align: left;
}

.sheet-card p {
  margin: 0;
  color: var(--muted, #6f6a62);
  line-height: 1.5;
}

.sheet-card label {
  display: grid;
  gap: 4px;
  font-size: 14px;
}

.sheet-card input,
.sheet-card textarea {
  padding: 10px 12px;
  border: 1px solid #d9d1c3;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.sheet-card button {
  height: 46px;
  border: 1px solid #d9d1c3;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.trash-list {
  display: grid;
  gap: 8px;
}

.trash-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trash-row img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.trash-row span {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.sheet-card .trash-row button {
  height: 36px;
  padding: 0 14px;
}

.sheet-card button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* 隐私和私密相册（ADR-0137） */
.vault-entry {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #d9d1c3;
  border-radius: 50%;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
}

.vault-entry .icon {
  width: 20px;
  height: 20px;
}

.lock-mini {
  width: 11px;
  height: 11px;
  margin-right: 3px;
  vertical-align: -1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.chips-label {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
}

.chips button.ai {
  border-style: dashed;
}

.chips button.ai.on {
  border-style: solid;
}

body.vault-on {
  overflow: hidden;
}

.vault {
  position: fixed;
  inset: 0;
  z-index: 55;
  overflow: auto;
  background: var(--bg);
}

.vault-page {
  width: min(100%, 420px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(96px + env(safe-area-inset-bottom));
}

button.plain {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.vault-tip {
  margin: 10px 0;
}

img.veiled {
  filter: blur(16px);
  transform: scale(1.15);
}

.trash-row img.veiled {
  cursor: pointer;
}

.vault-bar {
  z-index: 58;
}

.pin-sheet .sheet-card {
  text-align: center;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 6px 0 2px;
}

.pin-dots i {
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.pin-dots i.on {
  background: var(--ink);
}

.sheet-card .pin-msg {
  color: #b2452f;
  font-size: 14px;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sheet-card .pin-pad button {
  height: 56px;
  border-radius: 16px;
  font-size: 24px;
}

.sheet-card .pin-pad .pin-bio {
  font-size: 13px;
  line-height: 1.25;
}

.pin-pad .pin-bio[hidden] + button {
  grid-column: 2;
}

.sheet-card button.link {
  height: auto;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 14px;
}

.phone-row {
  display: flex;
  gap: 8px;
}

.phone-row select {
  padding: 0 8px;
  border: 1px solid #d9d1c3;
  border-radius: 12px;
  background: #fff;
  font: inherit;
}

.phone-row input {
  flex: 1;
  min-width: 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-brand a {
  color: #6f6a62;
  font-size: 15px;
  text-decoration: none;
}

.auth-lead {
  margin: 0;
  color: #6f6a62;
  font-size: 14px;
  line-height: 1.4;
}

/* 第一页「聊天」上的红点：没读的消息加新的加好友请求 */
.tile {
  position: relative;
}

.tile-badge {
  position: absolute;
  right: 14px;
  top: 14px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #b2452f;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}

/* 第一页「我的家人」那一行（不是格子）：红点跟在字后面 */
.all .tile-badge {
  position: static;
}

/* 第一页还没做的板块：点进去是原型里的示例页（ADR-0155 第 7 条） */
.tile-tag {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 2px 8px;
  border: 1px solid var(--line, #ddd6c8);
  border-radius: 999px;
  color: #6f6a62;
  font-size: 12px;
  line-height: 1.4;
}

.home-group .section {
  margin: 28px 0 12px;
}

.private-note {
  margin: 0 0 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fdf0d5;
  color: #6b4610;
  font-size: 14px;
  line-height: 1.55;
}

/* 来电提醒（ring.js，第一页和聊天页） */
.ring-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(26, 24, 20, 0.55);
}

.ring-card {
  display: grid;
  gap: 8px;
  width: min(100%, 460px);
  padding: 26px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #1a1814;
  color: #fff;
  text-align: center;
}

.ring-who {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.ring-sub {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.ring-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ring-actions button {
  height: 54px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}

.ring-no {
  background: #d2402f;
}

.ring-yes {
  background: #2f9a52;
}

.ring-banner {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  z-index: 85;
  width: min(92%, 420px);
  padding: 12px 16px;
  border-radius: 999px;
  background: #2f9a52;
  color: #fff;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  transform: translateX(-50%);
}

/* 我：yapom 号、网名、邮箱、隐私（ADR-0149） */
.me-row {
  gap: 12px;
}

.me-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 0;
}

.me-value {
  font-size: 17px;
  font-weight: 600;
  word-break: break-all;
}

.me-switch .me-value {
  font-weight: 500;
}

.me-foot {
  margin: 10px 4px 0;
  line-height: 1.5;
}

button.small:disabled {
  color: #b9b1a3;
  cursor: default;
}

.muted.bad,
.row-sub.bad {
  color: #b2452f;
}

/* 账户和安全（ADR-0154） */
.me-logout-all {
  margin: 12px 4px 0;
}

.pw-field {
  display: flex;
  gap: 8px;
}

.pw-field input {
  flex: 1;
  min-width: 0;
}

.sheet-card .pw-field button {
  flex: none;
  padding: 0 14px;
}

/* 开关：和原型 web/me.css 一样，开着是墨黑，关着是浅灰 */
.switch {
  flex: none;
  position: relative;
  width: 52px;
  height: 32px;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 150ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}

.switch:checked {
  background: var(--ink);
}

.switch:checked::after {
  transform: translateX(20px);
}

.switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 找人的结果：卡通形象的位置（还没有形象时是一个圆）和网名 */
.found {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.found-face {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 20px;
}

/* 有卡通形象的换掉剪影（Y.face）：头肩图，圆框里露出头 */
.has-face {
  overflow: hidden;
  background: #f3e7d6;
}

.face-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
}

.face-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  vertical-align: middle;
}

.face-chip .icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.found-name {
  flex: 1;
  min-width: 0;
  font-size: 17px;
}

/* 起 yapom 号：拼音 . 系统给的两位数字 ［换下一个］（ADR-0150 和后续） */
.idpick-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.idpick-label {
  color: var(--muted);
  font-size: 14px;
}

.idpick {
  display: flex;
  align-items: center;
  gap: 6px;
}

.idpick input {
  flex: 1;
  width: 0;
  min-width: 0;
}

.idpick-digits {
  flex: none;
  min-width: 44px;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.idpick-dot {
  flex: none;
  font-size: 22px;
  font-weight: 600;
}

.idpick button.idpick-next:disabled {
  color: #b9b1a3;
  cursor: default;
}

.idpick button.idpick-next {
  flex: none;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d9d1c3;
  border-radius: 12px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.idpick-chips:empty {
  display: none;
}

.idpick-chips button {
  height: 36px;
  border-radius: 999px;
}

/* 名片：卡通形象、网名、yapom 号、二维码（ADR-0150） */
.card-section {
  margin: 0 0 28px;
}

.namecard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  text-align: center;
}

.namecard .namecard-face {
  width: 72px;
  height: 72px;
}

.namecard-face .icon {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.namecard-name {
  font-size: 20px;
  font-weight: 600;
  word-break: break-all;
}

.namecard-id {
  color: var(--muted);
  font-size: 15px;
}

/* 名片上的「IP 属地：辽宁」（ADR-0219 第 4 条）：yapom 号下面一小行灰字 */
.namecard-ip {
  color: var(--muted);
  font-size: 13px;
}

.namecard-qr {
  width: 200px;
  height: 200px;
  margin: 6px 0 2px;
}

.namecard-link {
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.namecard-msg {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

.namecard-msg:empty {
  display: none;
}

.namecard-actions {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.namecard-actions[hidden] {
  display: none;
}

.namecard-note {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.namecard-note input {
  height: 46px;
  padding: 0 12px;
  border: 1px solid #d9d1c3;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.namecard-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border: 1px solid #d9d1c3;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}

.namecard-button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.namecard-button[hidden] {
  display: none;
}

/* 第一页：问候旁边的卡通形象、随手拍的大按钮、提示设立形象（ADR-0155 第 2、6 条） */
.greet-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.greet-row h1 {
  min-width: 0;
}

.greet-face {
  width: 52px;
  height: 52px;
  margin-top: -10px;
}

.snap-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
}

.snap-entry .icon {
  width: 34px;
  height: 34px;
}

.snap-entry span {
  display: grid;
  gap: 2px;
}

.snap-entry strong {
  font-size: 19px;
  font-weight: 600;
}

.snap-entry small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.snap-entry.mini {
  margin: 0 0 16px;
  padding: 12px 16px;
}

.snap-entry.mini .icon {
  width: 26px;
  height: 26px;
}

.notice-later {
  padding: 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.card-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

/* 上传的进度条：每个文件一条，传了多少、服务器处理中、存好了或没存上（ADR-0155 第 1 条） */
.up-list {
  display: grid;
  gap: 8px;
  max-height: 40vh;
  overflow: auto;
}

.up-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.up-pic {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
}

.up-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.up-main {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.up-name {
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.up-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--soft);
}

.up-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ink);
  transition: width 0.2s;
}

.up-row.working .up-bar i {
  animation: up-busy 1.2s ease-in-out infinite;
}

.up-row.done .up-bar i {
  background: #2f7d4f;
}

.up-row.failed .up-bar i {
  width: 100% !important;
  background: #b3261e;
}

.up-state {
  color: var(--muted);
  font-size: 12px;
}

.up-row.failed .up-state {
  color: #b3261e;
}

.up-row.done .up-state {
  color: #2f7d4f;
}

@keyframes up-busy {
  50% { opacity: 0.35; }
}

.up-tray {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 65;
  display: grid;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: 0 6px 24px rgba(26, 24, 20, 0.18);
}

.up-tray[hidden] {
  display: none;
}

.up-tray-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.up-tray-head .grow {
  flex: 1;
}

/* 超过时长的视频：选一段（ADR-0155 第 3 条） */
.trim-sheet {
  z-index: 80;
}

.trim-video {
  width: 100%;
  max-height: 38vh;
  border-radius: 12px;
  background: #000;
}

.trim-track {
  position: relative;
  height: 44px;
  margin: 6px 14px;
  border-radius: 8px;
  background: var(--soft);
  touch-action: none;
}

.trim-sel {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 8px;
  background: rgba(26, 24, 20, 0.22);
}

.trim-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #b3261e;
  pointer-events: none;
}

.sheet-card button.trim-h {
  position: absolute;
  top: -4px;
  width: 28px;
  height: 52px;
  margin-left: -14px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffdf8;
  touch-action: none;
  cursor: ew-resize;
}

.trim-len {
  text-align: center;
  font-size: 14px;
}

/* 写描述、谁能看（ADR-0155 第 2 条） */
.composer {
  z-index: 75;
}

.composer-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.composer-strip img {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.composer-count {
  justify-self: end;
  margin-top: -6px;
  font-size: 12px;
}

.sheet-card label.composer-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.sheet-card .composer-switch input {
  width: 22px;
  height: 22px;
  padding: 0;
}

.composer-place {
  margin-top: -6px !important;
  font-size: 13px;
}

.composer-label {
  font-size: 14px;
}

.sheet-card .composer-seen button {
  height: 38px;
}

/* 分享出去的那一页（/p/编号）：只能看 */
.share-media {
  margin: 0 0 12px;
}

.share-media img,
.share-media video {
  display: block;
  width: 100%;
  max-height: 72vh;
  border-radius: 14px;
  background: #000;
  object-fit: contain;
  -webkit-touch-callout: none;
  user-select: none;
}

.share-author {
  margin: 0 0 6px;
  font-weight: 600;
}

.share-text {
  margin: 0 0 10px;
  line-height: 1.6;
  white-space: pre-wrap;
}

a.share-more {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  margin-top: 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}
