/* PROTOTYPE 聊天列表。結構照 LINE，元件照 iOS。介面用系統字。 */
.pt-root.ch-root, .ch-root .pt-tabbar {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
}
.pt-root.ch-root { padding-bottom: calc(70px + env(safe-area-inset-bottom)); background: #fff; }
.pt-root.ch-root.md-root.md-has-merit { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
/* 媒體首頁自己捲。整份文件不捲，功德區是固定的，不把清單收成一欄就滑不到被蓋住的卡片。 */
.pt-root.ch-root.md-root.md-has-merit:not(.pt-page) {
  box-sizing: border-box; display: flex; flex-direction: column;
  height: 100dvh; min-height: 0; overflow: hidden;
}
/* 子頁蓋住分頁列。功德區貼在頁面底，只留安全區，不再空出 50px 分頁列。 */
.pt-root.ch-root.md-root.pt-page.md-has-merit { padding-bottom: calc(36px + env(safe-area-inset-bottom)); }
.pt-page.md-has-merit .md-merit {
  bottom: 0; z-index: 8; box-sizing: border-box;
  height: calc(36px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}
.md-has-merit .ch-feed { padding-bottom: 8px; }
.ch-root .pt-nav { background: rgba(255, 255, 255, 0.86); }
.ch-compose { display: flex; align-items: center; justify-content: flex-end; color: #1c1c1e; }
.pt-root .ch-thread-back { display: flex; align-items: center; color: #007aff; }
.ch-thread-back svg { margin-left: -6px; }

.ch-search {
  display: flex; align-items: center; gap: 6px; margin: 4px 16px 8px;
  padding: 0 10px; height: 36px; border-radius: 10px; background: var(--fill); color: var(--label3);
}
.ch-search input {
  flex: 1; height: 36px; border: 0; background: transparent; padding: 0;
  font: inherit; font-size: 17px; color: var(--label); outline: none;
}

.ch-empty { margin: 48px 24px; text-align: center; color: var(--label3); font-size: 15px; }
.ch-start { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 64px 32px; text-align: center; }
.ch-start b { font-size: 20px; }
.ch-start p { margin: 0 0 8px; font-size: 15px; line-height: 1.6; color: var(--label3); }
.pt-root .ch-start button, .pt-root .ch-start a { min-width: 200px; height: 44px; padding: 0 20px; border-radius: 22px; background: var(--fill); font-size: 16px; font-weight: 600; color: var(--tap); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
.pt-root .ch-start button:first-of-type, .pt-root .ch-start a:first-of-type { background: var(--tap); color: #fff; }

.ch-push { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 10px 16px 6px; padding: 16px; border-radius: 14px; background: var(--fill); text-align: center; }
.ch-push-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tap); color: #fff; }
.ch-push b { font-size: 16px; line-height: 1.4; }
.ch-push p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--label3); }
.ch-push .ap-steps { background: #fff; }
.ch-push .ap-steps li { font-size: 15px; }
.pt-root .ch-push-go { align-self: stretch; height: 44px; border-radius: 22px; background: var(--tap); color: #fff; font-size: 16px; font-weight: 600; }
.pt-root .ch-push-go:disabled { opacity: 0.6; }
.pt-root .ch-push-later { padding: 6px 12px; font-size: 15px; color: var(--tap); }

.ch-list { flex: 1; min-height: 0; overflow: auto; background: #fff; }
.ch-swipe { position: relative; overflow: hidden; background: #fff; }
.ch-swipe:not(:last-child) .ch-row::after {
  content: ''; position: absolute; left: 76px; right: 0; bottom: 0; height: 0.5px; background: var(--sep);
}
.ch-actions {
  position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 8px;
}
.ch-actions-left { left: 0; padding-left: 10px; }
.ch-actions-right { right: 0; padding-right: 10px; }
.pt-root .ch-actions button {
  flex: none; width: 64px; height: 64px; border: 0; border-radius: 12px; color: #fff; font-size: 15px; font-weight: 600;
}
.ch-actions button[hidden] { display: none; }
.ch-actions .pin { background: #8e8e93; }
.ch-actions .mute { background: #ff9500; }
.ch-actions .read { background: #007aff; }
.ch-actions .read:disabled { opacity: 0.45; }
.ch-actions .hide { background: #8e8e93; }
.ch-actions .del { background: #ff3b30; }

.pt-root .ch-row {
  position: relative; z-index: 1; box-sizing: border-box; display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 72px; padding: 10px 16px; background: #fff; text-align: left;
  touch-action: pan-y pinch-zoom; will-change: transform;
}
.pt-root .ch-row.ch-snap { transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ch-swipe.dragging .ch-row { transition: none; }
.ch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ch-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ch-name b { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-name .ch-n, .ch-title-line .ch-n {
  flex: none; font-size: 17px; font-weight: 400; color: var(--label2);
}
.pt-root .ch-title-stack {
  display: flex; flex-direction: row; align-items: baseline; justify-content: center; gap: 4px;
  min-width: 0; max-width: 100%;
}
.ch-title-stack .ch-title-name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 17px; font-weight: 600; line-height: 1.15;
}
.pt-root .ch-title-stack button.ch-count {
  display: inline-flex; align-items: center; gap: 1px;
  width: auto; min-height: 0; height: auto; padding: 0; margin: 0;
  background: transparent; box-shadow: none;
  font-size: 12px; font-weight: 400; line-height: 1.1; color: var(--label3);
}
.ch-count svg.up { transform: rotate(180deg); }
.ch-main small {
  font-size: 14px; color: var(--label3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ch-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ch-time { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--label3); }
.ch-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #ff3b30; color: #fff; font-style: normal; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.ch-group { position: relative; width: 48px; height: 48px; flex: none; }
.ch-group .hm-ava { position: absolute; overflow: hidden; }
.ch-group .hm-ava:first-child { left: 0; top: 0; }
.ch-group .hm-ava:last-child { right: 0; bottom: 0; }
.ch-root.pt-page .pt-nav { grid-template-columns: 72px 1fr 72px; }
.pt-root.ch-thread > .pt-nav:has(.ex-tools button + button) { grid-template-columns: 88px 1fr 88px; }
.pt-root .pt-nav-done:disabled { color: var(--label3); }
.ch-check {
  width: 22px; height: 22px; border-radius: 11px; border: 1.5px solid #c7c7cc; flex: none;
}
.ch-check.on { background: #007aff; border-color: #007aff; box-shadow: inset 0 0 0 3px #fff; }
.ch-root .pt-page { background: var(--bg); }

.ch-menu-shade { position: absolute; inset: 0; z-index: 30; }
.ch-menu {
  position: absolute; top: 50px; right: 12px; width: 254px; overflow: hidden;
  border-radius: 13px; background: rgba(242, 242, 247, 0.86);
  -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  transform-origin: top right; animation: ch-menu-in 0.18s ease-out;
}
@keyframes ch-menu-in { from { opacity: 0; transform: scale(0.85); } }
.ch-menu-top { display: grid; grid-template-columns: repeat(3, 1fr); }
.ch-menu-group { border-top: 8px solid rgba(0, 0, 0, 0.08); }
.pt-root .ch-menu button,
.pt-root .ch-menu a {
  width: 100%; height: 44px; padding: 0 16px; border-radius: 0; background: transparent;
  display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 400; color: #000;
  text-decoration: none; box-sizing: border-box;
}
.pt-root .ch-menu-group button + button,
.pt-root .ch-menu-group a + a { box-shadow: inset 0 0.5px 0 rgba(60, 60, 67, 0.29); }
.pt-root .ch-menu-top button,
.pt-root .ch-menu-top a { height: 72px; padding: 0; flex-direction: column; justify-content: center; gap: 6px; font-size: 12px; }
.pt-root .ch-menu-top button + button,
.pt-root .ch-menu-top a { box-shadow: inset 0.5px 0 0 rgba(60, 60, 67, 0.29); }
.pt-root .ch-menu button:active,
.pt-root .ch-menu a:active { background: rgba(0, 0, 0, 0.08); }
.ch-gface { flex: none; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; }
.ch-gface-photo { overflow: hidden; padding: 0; }
.ch-gface-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* 新交流各頁照 iOS：灰底、圓角分組清單 */
.ch-ios { background: var(--bg); }
.pt-root.ch-ios .pt-nav-action { color: #007aff; }
.ch-ios .ch-search { margin: 4px 16px 12px; }
.ch-inset { margin: 0 16px 8px; border-radius: 10px; overflow: hidden; background: #fff; }
.pt-root .ch-irow, .pt-root a.ch-irow {
  position: relative; display: flex; align-items: center; gap: 12px; box-sizing: border-box;
  width: 100%; min-height: 44px; padding: 0 16px; border-radius: 0; background: #fff;
  font-size: 17px; font-weight: 400; color: #000; text-align: left; text-decoration: none;
}
#chat-friend-list form, #chat-recent form { display: contents; }
#chat-friend-list form.is-off { display: none; }
.pt-root .ch-irow.ch-iperson { min-height: 52px; }
.pt-root .ch-irow + .ch-irow::before {
  content: ''; position: absolute; top: 0; right: 0; left: var(--inset, 57px); height: 0.5px; background: rgba(60, 60, 67, 0.29);
}
.pt-root .ch-irow.ch-iperson + .ch-irow.ch-iperson::before { --inset: 64px; }
.pt-root .ch-inset:has(.ch-icheck) .ch-irow + .ch-irow::before { --inset: 100px; }
.pt-root .ch-irow:active { background: #e5e5ea; }
.pt-root .ch-irow:disabled { color: #8e8e93; }
.pt-root .ch-irow:disabled:active { background: none; }
.pt-root .ch-irow .ch-soon { margin-left: auto; color: #8e8e93; font-size: 13px; }
.ch-ilabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-ivalue { flex: none; font-size: 17px; color: var(--label3); }
.ch-chev { flex: none; color: #c4c4c7; }
.ch-tile { flex: none; width: 29px; height: 29px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.ch-icheck {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px #c4c4c7; color: #fff;
}
.ch-icheck.on { background: #007aff; box-shadow: none; }
.ch-icheck svg { opacity: 0; }
.ch-icheck.on svg { opacity: 1; }
.ch-ihead { margin: 18px 32px 6px; font-size: 13px; color: var(--label3); }
.ch-ifoot { margin: 0 32px 8px; font-size: 13px; line-height: 1.45; color: var(--label3); }
.ch-iempty { margin: 0; padding: 14px 16px; font-size: 15px; color: var(--label3); }
.ch-ifield input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 17px; }
.ch-ifield small { flex: none; font-size: 15px; color: var(--label3); }
.ch-picked { flex: none; display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
.pt-root .ch-picked button {
  position: relative; flex: none; width: 56px; height: auto; padding: 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.ch-picked i {
  position: absolute; top: 0; right: 2px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; background: #8e8e93; color: #fff; box-shadow: 0 0 0 2px var(--bg);
}
.ch-picked span { width: 100%; font-size: 12px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-gphoto { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 0 18px; }
.pt-root .ch-glink {
  width: auto; height: 32px; padding: 0 8px; background: transparent;
  display: inline-flex; align-items: center; gap: 6px; font-size: 17px; color: #007aff;
}
.ch-gcolors { display: flex; justify-content: center; gap: 12px; }
.pt-root .ch-gcolors button { width: 22px; height: 22px; padding: 0; border-radius: 50%; }
.pt-root .ch-gcolors button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #007aff; }
.ch-seg { display: flex; margin: 0 16px 10px; padding: 2px; border-radius: 9px; background: rgba(118, 118, 128, 0.12); }
.pt-root .ch-seg button {
  flex: 1; height: 30px; padding: 0; border-radius: 7px; background: transparent; font-size: 14px; font-weight: 500; color: #000;
}
.pt-root .ch-seg button.on { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04); font-weight: 600; }
.pt-root .ch-gface-btn { width: auto; height: auto; padding: 0; border-radius: 50%; background: transparent; }
.ch-avgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 12px; }
.pt-root .ch-avgrid button { width: auto; height: auto; padding: 3px; justify-self: center; border-radius: 50%; background: transparent; }
.pt-root .ch-avgrid button.on { box-shadow: 0 0 0 2.5px #007aff; }
.ch-join { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 16px 24px; }
.ch-join b { margin-top: 8px; font-size: 22px; }
.ch-join > small { font-size: 15px; color: var(--label3); }
.ch-join-friends { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.ch-join-friends span { display: flex; }
.ch-join-friends span .hm-ava + .hm-ava { margin-left: -8px; box-shadow: 0 0 0 2px var(--bg); }
.ch-join-friends small { font-size: 13px; color: var(--label2); }
.ch-join-actions { padding: 0 16px; }
.ch-join-actions .ch-ifoot { margin: 10px 16px; text-align: center; }
.pt-root .ch-join-go { width: 100%; height: 50px; border-radius: 12px; background: #0A0A0A; color: #fff; font-size: 17px; font-weight: 600; }
.pt-root .ch-req-row { min-height: 64px; }
.ch-req-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #e5f1ff; color: #007aff; }
.ch-req-row .ch-main b { font-size: 17px; font-weight: 600; }
.pt-root .ch-irow.ch-req { min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.ch-req-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-req-body b { font-size: 17px; font-weight: 600; }
.ch-req-body small { font-size: 14px; color: var(--label3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-req-actions { flex: none; display: flex; gap: 6px; }
.pt-root .ch-req-actions button { width: auto; height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(118, 118, 128, 0.12); font-size: 14px; color: #000; }
.pt-root .ch-req-actions button.on { background: #007aff; color: #fff; }
.ch-ifoot-top { margin-top: 4px; margin-bottom: 12px; }
.ch-myqr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 8px 16px 24px; padding: 24px 16px; border-radius: 10px; background: #fff; }
.ch-myqr b { font-size: 17px; }
.ch-myqr small { color: var(--label3); font-size: 13px; }
.pt-root .ex-invite-empty {
  width: auto; height: 40px; margin-top: 8px; padding: 0 18px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 6px; background: rgba(0, 122, 255, 0.12); color: #007aff; font-size: 15px;
}

/* 對話頁 */
.pt-root.ch-thread {
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden;
  padding-bottom: 0; background: #f2f2f7; overscroll-behavior: none;
}
.ch-thread .pt-nav { background: rgba(242, 242, 247, 0.86); }
.ch-thread .ch-bar {
  background: rgba(242, 242, 247, 0.94);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.pt-root .ch-thread .ch-send:disabled,
.pt-root .ch-thread .ch-send.is-empty { background: #c7c7cc; color: #fff; }
.ch-thread-title { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 0; }
.ch-title-line { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; min-width: 0; }
button.ch-title-line, a.ch-title-line { margin: 0 auto; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.ch-title-line > span, .ch-thread-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-thread-title em {
  flex: none; font-style: normal; font-size: 11px; font-weight: 600; color: #007aff;
  background: rgba(0, 122, 255, 0.12); border-radius: 4px; padding: 1px 5px;
}
.ch-log {
  flex: 1; min-height: 0; overflow: auto; padding: 12px 12px 8px;
  background: #f2f2f7; display: flex; flex-direction: column;
}
.ch-push { margin-top: auto; }
.ch-day { align-self: center; margin: 10px 0 2px; font-size: 12px; color: var(--label3); }
.ch-msg { display: flex; align-items: flex-end; gap: 6px; margin-top: 2px; max-width: 100%; }
.ch-msg.start { margin-top: 12px; }
.ch-msg.mine { justify-content: flex-end; }
.ch-ava-gap { width: 28px; flex: none; }
.ch-bubble-col { max-width: 78%; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.ch-msg.mine .ch-bubble-col { align-items: flex-end; }
.ch-sender { margin: 0 0 2px 2px; font-size: 12px; color: var(--label3); }
.ch-bubble-line { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.ch-msg.mine .ch-bubble-line { flex-direction: row-reverse; }
.ch-bubble-line time { flex: none; margin-bottom: 2px; font-size: 11px; color: var(--label3); }
.pt-root .ch-bubble {
  max-width: 100%; padding: 8px 12px; border-radius: 18px; background: #e5e5ea; color: #1c1c1e;
  font-size: 17px; line-height: 1.35; text-align: left; user-select: none; white-space: pre-wrap;
}
.pt-root .ch-bubble.mine { background: #c7c7cc; color: #1c1c1e; }
.pt-root .ch-bubble.has-image { padding: 4px; }
.ch-bubble img { display: block; width: 180px; max-width: 100%; border-radius: 14px; }
.ch-bubble.has-image span { display: block; padding: 4px 8px 4px; }
.ch-quote {
  display: block; margin-bottom: 4px; padding-left: 6px; border-left: 2px solid currentColor;
  font-size: 13px; line-height: 1.3; opacity: 0.85;
}
.ch-quote b { display: block; font-size: 12px; }
.ch-reply {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff;
  border-top: 0.5px solid var(--sep); font-size: 13px; color: var(--label2);
}
.ch-reply span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-reply b { display: block; color: #007aff; font-size: 12px; }
.pt-root .ch-reply button { width: 28px; height: 28px; font-size: 20px; color: var(--label3); }
.ch-bar {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 0.5px solid var(--sep);
}
.ch-thread.kb .ch-bar { padding-bottom: 8px; }
.ch-thread:has(.ch-plus-panel):not(.kb) .ch-bar { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.ch-plus-panel {
  display: flex; gap: 18px; padding: 14px 18px 10px;
  background: #f2f2f7; border-top: 0.5px solid var(--sep);
}
.ch-thread:has(.ch-plus-panel):not(.kb) .ch-plus-panel { padding-bottom: 10px; }
.ch-thread.kb .ch-plus-panel { padding-bottom: 10px; }
.pt-root .ch-plus-panel button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; color: var(--label2);
}
.pt-root .ch-plus-panel button span {
  width: 54px; height: 54px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center; color: #1c1c1e;
}
.ch-viewer {
  position: absolute; inset: 0; z-index: 8; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.ch-viewer img { max-width: 100%; max-height: 80%; }
.pt-root .ch-viewer button {
  position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 8px; color: #fff;
}

/* 交流：盤在上，留言在下。元件照 iOS 群組列表。 */
.ex-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px;
}
.ex-empty p { margin: 0; font-size: 17px; font-weight: 600; text-align: center; line-height: 1.45; color: var(--label); }
.ex-load {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.ex-load-mark { width: 72px; height: 72px; animation: ex-load-pulse 1.6s ease-in-out infinite; }
.ex-load-mark.still { animation: none; opacity: 1; }
@keyframes ex-load-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ex-load-mark { animation: none; opacity: 1; } }
.pt-root .ex-load button { padding: 8px 12px; font-size: 15px; color: #007aff; }
.pt-root .ex-send-chart {
  min-width: 160px; height: 50px; padding: 0 22px; border-radius: 14px; background: #0A0A0A; color: #fff; font-size: 17px; font-weight: 600;
}
.ex-switch {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 0;
}
.pt-root .ex-current {
  flex: 1; min-width: 0; height: 40px; padding: 0 10px 0 6px; border-radius: 10px; background: #fff;
  display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.pt-root .ex-current .hm-ava { flex: none; }
.pt-root .ex-current em {
  flex: none; max-width: 5.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-style: normal; font-size: 13px; font-weight: 600; line-height: 20px; padding: 0 6px; border-radius: 6px;
}
.pt-root .ex-current.mine em { color: #0b6e4f; background: #e3f6ec; }
.pt-root .ex-current.theirs em { color: #9a3412; background: #fde8dc; }
.pt-root .ex-current .ex-chart-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-root .ex-caption { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px 4px; text-align: center; }
.pt-root .ex-current svg { flex: none; color: var(--label3); }
.pt-root .ex-switch .ex-more {
  flex: none; height: 44px; padding: 0; background: transparent; box-shadow: none;
  color: #007aff;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
  font-size: 17px; font-weight: 400; line-height: 22px;
  -webkit-font-smoothing: antialiased;
}
.ex-horizon-row { position: relative; z-index: 3; flex: none; min-width: 0; display: flex; align-items: center; gap: 8px; margin: 2px 12px 0; }
.ex-method {
  flex: none; display: flex; align-items: center; gap: 12px; margin: 0 16px 4px;
  font-size: 13px; color: var(--label3);
}
.pt-root .ex-method button {
  border: 0; background: none; padding: 0; color: #007aff; font-size: 13px;
}
.pt-root .ex-horizon {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px;
  width: auto; height: 32px; margin: 0; padding: 0 4px;
  background: transparent; color: #007aff; font-size: 15px;
}
.pt-root .ex-horizon em { flex: none; font-style: normal; }
.ex-horizon-row > :nth-child(2) { margin-left: auto; }
.ex-driving {
  flex: 0 1 auto; min-width: 0; margin-left: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right;
  font-size: 12px; color: #ff9500;
}
.ex-driving.off { color: var(--label3); }
.pt-root .ex-current:disabled { opacity: 1; }
.pt-root .ex-horizon:disabled { color: var(--label3); }
.pt-root .ex-pen {
  flex: none; width: 32px; height: 32px; padding: 0; border-radius: 16px;
  background: rgba(0, 122, 255, 0.12); color: #007aff;
  display: flex; align-items: center; justify-content: center;
}
.pt-root .ex-pen.on { background: #007aff; color: #fff; }
.ex-board > .pt-ink-bar { margin: 0 0 6px; }
.pt-root .ex-drive {
  flex: none; width: auto; height: 26px; padding: 0 10px; border-radius: 13px;
  background: rgba(0, 122, 255, 0.12); color: #007aff; font-size: 13px;
}
.pt-root .ex-horizon span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-stage { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.ex-board { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 6px 10px 0; touch-action: manipulation; }
.ex-board:not(:has(.ex-bazi)) { overflow: auto; container-type: inline-size; }
.ex-board.theirs { padding-top: 22px; }
.ex-chart { position: relative; min-width: 0; min-height: 0; }
.ex-board:not(:has(.ex-bazi)) > .ex-chart { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 100cqw; }
.ex-board:has(.ex-bazi) > .ex-chart { flex: 0 0 auto; height: auto; }
.ex-chart.theirs { border-radius: 8px; box-shadow: 0 0 0 3px #c2410c; }
.ex-frame-name {
  position: absolute; z-index: 2; top: 0; left: 10px; transform: translateY(-100%);
  max-width: calc(100% - 24px); margin: 0; padding: 0 6px; border-radius: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none;
  background: #fde8dc; color: #9a3412; font-style: normal; font-size: 13px; font-weight: 600; line-height: 20px;
}
.ex-chart > .pt-root.pt-bare { flex: 1 1 auto; min-height: 100%; width: 100%; height: auto; overflow: hidden; }
.ex-dock { flex: none; }
.ex-sheet { display: flex; flex-direction: column; min-height: 0; background: #f2f2f7; }
.pt-root .ex-grab {
  flex: none; height: 22px; display: flex; align-items: center; justify-content: center; touch-action: none;
}
.ex-grab i { width: 36px; height: 5px; border-radius: 3px; background: rgba(60, 60, 67, 0.28); }
.ex-board .ex-bazi.bz-stack {
  flex: none; align-items: stretch; width: 100%; overflow: visible; height: auto;
  margin: 0; padding: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.ex-ziwei {
  flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr);
  gap: 1px; background: var(--board-line, #8e8e93); outline: 1.5px solid var(--board-line, #8e8e93); outline-offset: -1.5px; border-radius: 6px; overflow: hidden;
}
.pt-root .ex-cell {
  min-width: 0; padding: 2px; background: #fff; border: 0; border-radius: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.pt-root .ex-cell b { font-size: 11px; font-weight: 600; color: var(--palace-name); }
.pt-root .ex-cell span { font-size: 12px; color: var(--main-star); writing-mode: vertical-rl; letter-spacing: 1px; }
.pt-root .ex-cell i { font-style: normal; font-size: 10px; color: var(--label3); }
.pt-root .ex-cell.focus { background: rgba(0, 122, 255, 0.1); box-shadow: inset 0 0 0 1.5px #007aff; }
.ex-center {
  grid-column: 2 / 4; grid-row: 2 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #f7f7f8;
}
.ex-center b { font-size: 15px; font-weight: 600; color: var(--label2); }
.ex-bazi {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  padding: 12px 8px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.ex-pillars { display: flex; gap: 8px; width: 100%; justify-content: center; }
.ex-set { display: flex; gap: 4px; padding: 6px; border-radius: 12px; box-shadow: inset 0 0 0 0.5px var(--sep); }
.ex-set.luck { box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.35); }
.ex-pillar { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ex-pillar small { font-size: 11px; color: var(--label3); }
.pt-root .ex-pillar button {
  width: 36px; height: 34px; border-radius: 8px; background: var(--fill); border: 0; font-size: 17px;
}
.pt-root .ex-pillar button.on { background: rgba(0, 122, 255, 0.14); color: #007aff; font-weight: 600; }
.ex-seg { flex: none; display: flex; margin: 8px 12px 0; padding: 2px; border-radius: 9px; background: var(--fill); }
.pt-root .ex-seg button { flex: 1; height: 30px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--label); }
.pt-root .ex-seg button.on { background: #fff; font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.1); }
.ex-log { flex: none; height: 148px; overflow: auto; padding: 8px 12px 4px; background: transparent; }
.ch-thread:has(.ch-count):has(.pt-bare) .ex-log { height: 72px; }
.ex-body { display: flex; flex-direction: column; min-height: 0; }
.ex-body .ch-bar { flex: none; }
.ex-body .ex-blocks { flex: 1 1 auto; box-sizing: border-box; min-height: 0; overflow: auto; }
.ex-msg { display: flex; flex-direction: column; align-items: flex-start; margin-top: 6px; max-width: 100%; }
.ex-msg.mine { align-items: flex-end; }
.ex-msg b { margin: 0 10px 2px; font-size: 12px; font-weight: 500; color: var(--label); }
.ex-msg.ex-gone b { color: var(--label3); }
.ex-with-face { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.ex-with-face > b { margin: 0 10px 2px 44px; font-size: 12px; font-weight: 500; color: var(--label); }
.ex-msg.ex-gone .ex-with-face > b { color: var(--label3); }
.pt-root .ex-with-face > .ex-chip { margin-left: 44px; }
.ex-face-row { display: flex; align-items: flex-start; gap: 8px; max-width: 100%; }
.ex-face-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 100%; }
.pt-root button.ex-ava, .ex-ava {
  flex: none; width: 36px; height: 36px; padding: 0; border: 0; background: none; border-radius: 50%;
}
.ex-line { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.ex-msg.mine .ex-line { flex-direction: row-reverse; }
.ex-line > span {
  max-width: 74%; padding: 8px 12px; border-radius: 18px; background: #e5e5ea; font-size: 17px; line-height: 1.3;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.ex-quote {
  display: block; margin: 0 0 4px; padding-left: 6px; border-left: 2px solid currentColor;
  font-size: 13px; font-style: normal; line-height: 1.3; opacity: 0.85;
}
.ex-quote b { display: block; font-size: 12px; font-weight: 600; }
.pt-root .ex-line > span .ex-anchor {
  display: block; width: auto; min-height: 0; margin: 0 0 4px; padding: 0 0 0 6px;
  border: 0; border-left: 2px solid currentColor; border-radius: 0; background: transparent;
  color: inherit; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: left;
}
.ex-body .ch-plus-panel { flex: none; }
.pt-root .ex-line > span .ex-photo {
  display: block; width: 160px; max-width: 100%; height: auto; margin: 0 0 4px; border-radius: 12px;
}
.ex-zhan-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.pt-root .ex-zhan-row small { font-size: 13px; }
.ex-body .ch-bar,
.ex-body .ch-reply { flex: none; }
.ex-msg.mine .ex-line > span { background: #c7c7cc; color: #1c1c1e; }
.ex-line time { flex: none; margin-bottom: 2px; font-size: 11px; color: var(--label3); }
.ex-xiaotong-actions { display: grid; gap: 7px; width: min(250px, 100%); margin-top: 8px; }
.ex-xiaotong-actions a {
  box-sizing: border-box; min-height: 38px; padding: 8px 12px; border: 1px solid rgba(0, 122, 255, 0.28); border-radius: 12px;
  background: #fff; color: #007aff; font-size: 15px; font-weight: 600; line-height: 20px; text-align: left; text-decoration: none;
}
.pt-root .ex-zhan-glyph {
  flex: none; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr);
  gap: 1.5px; width: 48px; height: 48px;
}
.pt-root .ex-zhan-glyph i { border-radius: 2px; background: #F4DEDA; }
.pt-root .ex-zhan-glyph i.mid { background: transparent; }
.pt-root .ex-zhan-glyph i.life { background: #B8322A; }
.pt-root .ex-zhan .ex-zhan-kicker { font-size: 12px; font-weight: 600; line-height: 1.2; color: #B8322A; }
.pt-root .ex-zhan .ex-zhan-life {
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--label);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pt-root .ex-zhan .ex-zhan-how { font-size: 11px; font-weight: 500; color: var(--label2); }
.pt-root .ex-line > .ex-retry,
.pt-root .ex-card-row > .ex-retry {
  flex: none; width: 22px; height: 22px; margin-bottom: 2px; padding: 0;
  border-radius: 50%; background: #d0344a; color: #fff; font-size: 14px; font-weight: 700;
}
.ex-note {
  flex: 1; min-height: 120px; margin: 8px 12px 12px; padding: 12px 14px; border: 0; border-radius: 12px;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font: inherit; font-size: 17px; resize: none; outline: none;
}
.ex-mark { display: inline-flex; align-items: center; gap: 2px; color: #007aff; flex: none; }
.ex-mark-check { flex: none; width: 18px; height: 18px; display: grid; place-items: center; }
.ex-hz {
  max-height: 70dvh; overflow: auto; background: #fff; border-radius: 14px; padding: 14px 12px 16px;
}
.ex-hz .pt-chips { flex-wrap: wrap; }
.pt-root .ex-hz button.pt-chip {
  display: flex; flex-direction: column; align-items: center; width: auto; min-width: 54px; min-height: 0;
  border-radius: 12px; background: var(--fill); font-size: 14px;
}
.pt-root .ex-hz button.pt-chip small { font-size: 10.5px; color: var(--label3); line-height: 1.2; }
.pt-root .ex-hz button.pt-chip.on { background: var(--label); color: #fff; }
.pt-root .ex-hz button.pt-chip.on small { color: rgba(255, 255, 255, 0.7); }
.pt-root .ex-hz .pt-year-kind { margin: 14px 4px 8px; }
.pt-root .ex-hz .pt-mini-seg { width: 100%; }
.pt-root .ex-hz .pt-mini-seg button {
  flex: 1; width: auto; min-height: 0; height: 28px; border-radius: 6px; background: transparent; font-size: 15px;
}
.pt-root .ex-hz .pt-mini-seg button.on { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.pt-root .ex-hz .pt-mini-seg.pt-off button { opacity: 0.35; }
.pt-root .ex-hz .pt-link { width: auto; min-height: 0; background: transparent; font-size: 15px; color: #007aff; }
.ex-hz-links { display: flex; gap: 12px; }
.pt-root .ex-hz .pt-link:disabled { color: var(--label3); }
.pt-root .ex-hz button.pt-chip:disabled, .pt-root .ex-hz .pt-chips.pt-off .pt-chip { opacity: 0.35; }
.ex-hz-empty { margin: 0 4px 8px; font-size: 13px; color: var(--label3); }
.ex-group { border-radius: 14px; overflow: hidden; background: #fff; }
.ch-sheet .ex-group { overflow: auto; max-height: 60vh; max-height: 60dvh; -webkit-overflow-scrolling: touch; }
.pt-root .ch-sheet .ex-group button.ex-pick-new { position: sticky; top: 0; z-index: 1; background: #fff; box-shadow: inset 0 -0.5px 0 rgba(60, 60, 67, 0.16); }
.pt-root .ch-sheet .ex-group button {
  width: 100%; min-height: 52px; border-radius: 0; background: #fff; font-size: 17px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  box-shadow: inset 0 -0.5px 0 var(--sep);
}
.pt-root .ch-sheet .ex-group button:last-child { box-shadow: none; }
.pt-root .ex-group small { color: var(--label3); font-size: 15px; font-weight: 400; }
.pt-root .ex-pick .md-go { justify-content: center; border-radius: 14px; }
.ch-sheet.ex-pick { background: #f2f2f7; border-radius: 14px 14px 0 0; padding-top: 12px; }
.ex-form-bar { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; min-height: 44px; }
.ex-form-bar span { text-align: center; font-size: 17px; font-weight: 600; }
.pt-root .ch-sheet .ex-form-bar button {
  width: auto; min-height: 44px; padding: 0; border-radius: 0; background: transparent;
  font-size: 17px; font-weight: 400; color: #007aff; justify-self: start;
}
.ex-pick-head {
  background: #fff; border-radius: 14px; padding: 14px 12px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.ex-pick-title { margin: 0; text-align: center; font-size: 17px; font-weight: 600; }
.ex-pick-head .ex-name { background: var(--fill); }
.ex-pick-seg, .md-almanac-seg { display: flex; padding: 2px; border-radius: 9px; background: var(--fill); }
:is(.pt-root .ch-sheet .ex-pick-seg, .pt-root .md-almanac-seg) button {
  flex: 1; width: auto; height: 30px; min-height: 30px; padding: 0; border-radius: 7px;
  background: transparent; font-size: 13px; font-weight: 500; color: var(--label); box-shadow: none;
}
:is(.pt-root .ch-sheet .ex-pick-seg, .pt-root .md-almanac-seg) button.on { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.1); }
:is(.ex-pick-seg, .md-almanac-seg) em { font-style: normal; font-weight: 400; color: var(--label3); }
.ex-pick-body {
  height: 46vh; overflow: auto; display: flex; flex-direction: column;
  -webkit-overflow-scrolling: touch;
}
.pt-root .ch-sheet .ex-pick-body .ex-group { flex: none; max-height: none; overflow: visible; }
.pt-root .ch-sheet .md-go:disabled { background: #c7c7cc; color: #fff; }
.pt-root .ex-kind button { flex: 1; width: auto; min-height: 44px; font-size: 17px; }
.ex-log .ch-empty { margin: 28px 0; }
.ex-name {
  width: 100%; height: 44px; border: 0; border-radius: 12px; background: #fff; padding: 0 14px; font: inherit; font-size: 17px;
}
.ex-kind { display: flex; gap: 8px; }
.pt-root .ex-kind button { flex: 1; justify-content: center; }
.pt-root .ex-kind button.on { box-shadow: inset 0 0 0 2px #007aff; color: #007aff; }

.ch-thread > .pt-nav { align-items: center; }
.pt-root .ch-title-line {
  width: auto; height: auto; padding: 0; background: transparent; box-shadow: none; font-size: 17px; font-weight: 600;
}
.pt-root .ex-plus {
  flex: none; width: 32px; height: 32px; padding: 0; border-radius: 16px;
  background: transparent; color: #007aff; box-shadow: none;
}
.pt-root .ex-plus:disabled { color: #c7c7cc; }
/* 外觀維持原尺寸，點擊範圍補到 44 */
.pt-root .ex-horizon::before,
.pt-root .ex-drive::before,
.pt-root .ex-work button::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}
.pt-root .ex-plus { position: relative; z-index: 1; }
.pt-root .ex-plus::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.pt-root .ex-horizon,
.pt-root .ex-drive,
.pt-root .ex-work button { position: relative; }
.ex-person { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0 8px; }
.ex-person b { font-size: 20px; }
.ex-person small { color: var(--label3); font-size: 13px; }
.pt-root .ex-page .ex-member { width: 100%; border-radius: 0; background: #fff; text-align: left; }
.ch-cover .pt-page { bottom: calc(58px + env(safe-area-inset-bottom)); }
.ch-cover .pt-root.ch-thread { height: auto; min-height: 0; }
.ch-cover .pt-root .pt-toast { z-index: 50; }
.pt-root .ex-tools { display: flex; justify-content: flex-end; align-items: center; gap: 0; }
.pt-root .ex-tools button.ex-dots { color: var(--label); }
.pt-root .ex-tools button {
  position: relative; display: flex; align-items: center; justify-content: flex-end;
  width: 44px; height: 44px; padding: 0; background: transparent; color: #007aff; box-shadow: none;
}
.pt-root .ex-tools i {
  position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #ff3b30; color: #fff; font-style: normal; font-size: 11px; line-height: 16px;
}
.ex-faces { flex: none; display: flex; align-items: center; gap: 4px; padding: 2px 8px 6px; }
.ex-faces > div { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; }
.pt-root .ex-faces > div > button { flex: none; width: 48px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; background: transparent; }
.ex-faces small { max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--label2); }
.pt-root .ex-faces > button { flex: none; width: 44px; height: 44px; margin-right: -8px; padding: 0; background: transparent; color: #8e8e93; }
.ex-work {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 6px; font-size: 13px; color: var(--label2);
}
.pt-root .ex-work button {
  width: auto; height: 28px; padding: 0 10px; border-radius: 14px; background: #fff; font-size: 13px; color: #007aff;
}
.pt-root .ex-work button:disabled { color: #c7c7cc; }
.ex-blocks { flex: 1; min-height: 0; overflow: auto; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.ex-read { color: var(--label3); font-size: 12px; }
.ex-blocks .ex-note {
  flex: 1 1 auto; width: auto; min-height: 72px; margin: 0; border: 0; resize: none;
  background: transparent; font: inherit; font-size: 16px; box-shadow: none;
}
.pt-root .ex-submit {
  width: auto; height: 36px; padding: 0 12px; border-radius: 10px; background: #007aff; color: #fff; font-size: 15px;
}
.ex-page {
  position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: #f2f2f7;
}
.ex-page-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.ex-page-body > * { flex: none; }
.ex-label { margin: 8px 4px 0; font-size: 13px; color: var(--label3); }
.ex-person-block { display: flex; flex-direction: column; gap: 6px; }
.ex-owner {
  display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 4px 0;
  font-size: 15px; font-weight: 600; color: var(--label);
}
.pt-root .ex-page button.ex-owner {
  width: 100%; min-height: 36px; padding: 4px 4px 0; border-radius: 0; background: transparent;
  box-shadow: none; font-size: 15px; font-weight: 600; justify-content: flex-start; text-align: left; color: var(--label);
}
.ex-owner > .hm-ava { flex: none; }
.ex-owner > .ex-person-name { flex: 1; min-width: 0; }
.ex-owner > .ex-role { margin-left: 0; }
.pt-root .ex-page .ex-group.ex-charts { max-height: none; }
.pt-root .ex-page .ex-group.ex-charts button:last-child { box-shadow: none; }
.pt-root .ex-page .ex-chart > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-root .ex-page .ex-group button {
  width: 100%; min-height: 48px; padding: 0 16px; border-radius: 0; background: #fff; font-size: 17px;
  display: flex; align-items: center; justify-content: space-between; text-align: left;
  box-shadow: inset 0 -0.5px 0 var(--sep);
}
.pt-root .ex-page .ex-group button:disabled { color: var(--label3); }
.pt-root .ex-page .ex-group .ex-join { display: flex; }
.pt-root .ex-page .ex-group .ex-album {
  display: flex; align-items: stretch; background: #fff; box-shadow: inset 0 -0.5px 0 var(--sep);
}
.pt-root .ex-page .ex-group .ex-album > button { box-shadow: none; }
.pt-root .ex-page .ex-group .ex-album > button.ex-album-open {
  flex: 1; width: auto; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 2px; padding: 10px 16px;
}
.pt-root .ex-page .ex-group .ex-album > button.ex-album-open b {
  font-weight: 400; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pt-root .ex-page .ex-group .ex-album > button.ex-album-open small,
.pt-root .ex-page .ex-group .ex-album > button.ex-album-open em {
  font-size: 13px; font-style: normal; font-weight: 400; color: var(--label3);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pt-root .ex-page .ex-group .ex-album > button.ex-pin {
  width: 44px; flex: none; justify-content: center; padding: 0; color: var(--label3);
}
.pt-root .ex-page .ex-group .ex-album > button.ex-pin.on { color: #007aff; }
.pt-root .ex-page .ex-group .ex-join button { width: auto; flex: 1; justify-content: center; }
.pt-root .ex-page .ex-group .ex-join button:first-child { color: #ff3b30; }
.pt-root .ex-page .ex-group .ex-join button:last-child { color: #007aff; }
.ex-member {
  min-height: 48px; padding: 8px 16px; display: flex; align-items: center; gap: 8px; background: #fff;
  box-shadow: inset 0 -0.5px 0 var(--sep); font-size: 17px;
}
.ex-member > span { flex: 1; min-width: 0; }
.ex-person-name { display: flex; align-items: center; justify-content: flex-start; gap: 6px; }
.ex-person-name em { font-style: normal; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-role { flex: none; margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--label3); }
.ex-member > .ex-role { margin-left: 0; }
.ex-danger { color: #ff3b30; }
.ex-hint { margin: -2px 4px 4px; font-size: 12px; line-height: 1.4; color: var(--label3); }
.ex-confirm { margin: 0; padding: 14px 16px; font-size: 13px; line-height: 1.4; color: var(--label3); text-align: center; box-shadow: inset 0 -0.5px 0 var(--sep); }
.pt-root .ch-sheet .ex-group .ex-danger-row { justify-content: center; color: #ff3b30; }
.pt-root .ch-sheet .ex-group button.ex-post-go { justify-content: center; color: #007aff; font-weight: 600; }
.ex-post-shade { z-index: 31; }
.ch-shade.ex-hw-shade { z-index: 45; }
.ex-gone span { color: var(--label3); }
.pt-root .ex-work button.ex-retract { color: #ff3b30; }
.pt-root .ex-work button.ex-retract:disabled { color: #c7c7cc; }
.ex-sub-filter { margin-bottom: 8px; }
.pt-root .ex-invite-row span { display: inline-flex; align-items: center; gap: 8px; color: #007aff; }
.ex-invite-share { display: flex; gap: 16px; align-items: center; padding: 14px; margin-bottom: 12px; border-radius: 12px; background: #fff; }
.ex-invite-share > div { display: flex; flex-direction: column; gap: 4px; }
.ex-invite-share small { color: var(--label3); }
.ex-invite-share .hm-qr { display: block; flex: none; width: 112px; }
.ex-invite-share .hm-qr svg { display: block; width: 100%; height: auto; }
.pt-root .ex-copy { width: auto; height: 30px; padding: 0 12px; border-radius: 15px; background: rgba(0, 122, 255, 0.12); color: #007aff; font-size: 14px; }
.pt-root .ex-invite-go { width: auto; padding: 0 0 0 8px; background: transparent; color: #007aff; font-size: 16px; justify-self: end; }
.pt-root .ex-invite-go:disabled { color: var(--label3); }
.ex-tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--label3); color: #fff;
}
.ex-tick.on { background: #007aff; box-shadow: none; }
.ex-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; }
.pt-root .ex-page .ex-chart { font-weight: 400; }
.ex-member > .hm-ava { flex: none; }
.ex-member small, .ex-member label { flex: none; color: var(--label3); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.pt-root .ch-sheet .ex-group button.ex-open-note {
  width: 100%; height: auto; min-height: 52px; padding: 10px 16px; border-radius: 0;
  background: #fff; color: inherit; font-size: 17px; font-weight: 400; text-align: left;
  align-items: flex-start; justify-content: space-between; gap: 8px;
}
.ex-open-note > span { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ex-open-note p { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 400; color: var(--label2); }
.ex-open-note small { font-size: 13px; color: var(--label3); }
.ex-open-note b.ex-left-name { color: var(--label3); font-weight: 400; }
.ex-open-note svg { flex: none; margin-top: 2px; color: var(--label3); }
.ex-note-body {
  margin: 0; padding: 16px; border-radius: 12px; background: #fff;
  font-size: 17px; line-height: 1.5; white-space: pre-wrap;
}
.ex-form { display: flex; flex-direction: column; gap: 8px; max-height: 70dvh; overflow: auto; }
.ex-birth { display: flex; gap: 6px; }
.ex-birth select {
  flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 12px; background: #fff; padding: 0 8px; font: inherit; font-size: 16px;
}
.ex-star { margin: 0; text-align: center; color: #007aff; font-size: 15px; }
.ex-star.ex-form-error { color: #ff3b30; font-size: 13px; }

/* 媒體 */
.ch-feed { flex: 1; min-height: 0; overflow: auto; padding: 8px 0 16px; background: var(--bg); }
.pt-root.ch-root.md-root { background: var(--bg); min-height: 100vh; }
.md-album-row { margin-bottom: 4px; }
.md-album-card .rk-preview-head > span:first-child { color: inherit; }
.md-album-recent { display: flex; justify-content: center; gap: 28px; margin: 12px 0 4px; }
.md-album-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 72px; }
.md-album-slot small { font-size: 12px; font-weight: 400; color: var(--label2); }
.md-book .pt-set-row { padding-top: 10px; padding-bottom: 10px; }

/* 排行榜 */
.rk-seg { margin-top: 10px; }
.rk-feed { padding-bottom: 80px; }
.lb-ava { flex: none; display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; }
.rk-ming { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rk-ming small { font-size: 11px; line-height: 1.2; color: var(--label2); text-align: center; }
.rk-ming-empty {
  display: block; border-radius: 8px; box-sizing: border-box;
  box-shadow: inset 0 0 0 1px #e5e5ea; outline: 1px dashed #c7c7cc; outline-offset: -1px;
}
.rk-list { margin: 0 16px; }
.pt-root .rk-row, .rk-me {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; background: #fff;
}
.pt-root .rk-row + .rk-row { box-shadow: inset 0 0.5px 0 var(--sep); }
.rk-no { flex: none; width: 26px; text-align: center; font-size: 17px; font-weight: 600; color: var(--label2); }
.rk-no.top1 { color: #c9a227; } .rk-no.top2 { color: #8e9aa6; } .rk-no.top3 { color: #b26b3a; }
.rk-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 17px; }
.rk-name > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-sub { font-size: 12px; color: #c2410c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-sub b { font-weight: 600; }
.rk-n { flex: none; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--label2); }
.rk-me {
  position: fixed; left: 0; right: 0; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 20;
  box-shadow: 0 -0.5px 0 var(--sep), 0 -6px 16px rgba(0, 0, 0, 0.06); background: #fffaf0;
}
.pt-page .rk-me { bottom: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.md-root.md-has-merit .rk-me { bottom: calc(86px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
.md-root.pt-page.md-has-merit .rk-me { bottom: calc(36px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
.md-rank-screen { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.md-rank-screen .rk-feed { flex: 1; min-height: 0; padding-bottom: 96px; }
.rk-card .rk-sub { margin-top: -4px; }
.rk-seals { display: flex; gap: 24px; }
.rk-natal { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rk-natal i { font-style: normal; font-size: 11px; letter-spacing: 4px; color: #b8a98c; }
.rk-natal b { font-size: 14px; }
.rk-stats { display: flex; gap: 32px; margin: 4px 0; }
.rk-stats div { display: flex; flex-direction: column; align-items: center; }
.rk-stats b { font-size: 22px; }
.rk-stats small { font-size: 12px; color: var(--label3); }
.rk-foot { font-size: 12px; color: var(--label3); }
.pt-root .rk-preview { display: block; width: calc(100% - 32px); margin: 0 16px 12px; padding: 12px 14px 10px; border-radius: 12px; background: #fff; text-align: left; }
.rk-preview-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 600; }
.rk-preview-head > span:first-child { display: inline-flex; align-items: center; gap: 6px; color: #c9a227; }
.rk-preview-head .md-row-end { font-weight: 400; font-size: 14px; color: var(--label3); }
.rk-podium { display: flex; justify-content: center; align-items: flex-end; gap: 18px; margin: 12px 0 8px; }
.rk-pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 88px; }
.rk-pod b { max-width: 100%; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-pod > small { font-size: 12px; color: var(--label3); }
.rk-pod i { position: absolute; top: -6px; right: 12px; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; display: grid; place-items: center; }
.rk-pod.p1 i { background: #c9a227; } .rk-pod.p2 i { background: #8e9aa6; } .rk-pod.p3 i { background: #b26b3a; }
.rk-preview-me { padding-top: 8px; border-top: 0.5px solid var(--sep); font-size: 14px; color: var(--label2); text-align: center; }
.md-book-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.md-book-parts { font-size: 12px; color: var(--label3); }
.md-book-name { display: inline-flex; align-items: baseline; gap: 8px; }
.md-book-name small { font-size: 13px; color: var(--label3); }
.md-book-seal {
  width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 6px;
  background: #f6efe3; color: #a0782c; font-size: 9px; font-weight: 700; line-height: 1.05; text-align: center;
}
.md-row-end { display: inline-flex; align-items: center; gap: 4px; color: var(--label3); }
.md-seal {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
  border-radius: 10px; background: #f6efe3; font-weight: 700;
}
.md-seal.missed { background: #ececee; color: #b8b8bd !important; }
.md-seal.soon { background: transparent; box-shadow: inset 0 0 0 1px #c7c7cc; color: #c7c7cc !important; border-radius: 10px; outline: 1px dashed #c7c7cc; outline-offset: -1px; box-shadow: none; }
.md-root { position: relative; }
/* 捐款頁要固定在螢幕、自己捲；離開確認框跟著螢幕，不跟著捲到最底的頁面 */
.pt-root.ch-root.md-root.pt-page.md-donate { position: fixed; bottom: calc(50px + env(safe-area-inset-bottom)); min-height: 0; padding-bottom: 16px; }
.md-donate .ch-shade { position: fixed; }
.md-shelf-head { display: flex; flex-direction: column; align-items: center; margin: 12px 20px 8px; }
.md-shelf-head b { font-size: 22px; font-weight: 600; letter-spacing: 0.42em; margin-right: -0.42em; }
.md-shelf-zhuan { height: 64px; width: auto; display: block; }
/* 釋文拿掉後仍佔同一行，書的位置不往上移。 */
.md-shelf-head:has(.md-shelf-zhuan) { gap: 4px; }
.md-shelf-gap { display: block; height: 18px; }
.md-shelf-screen.pt-page {
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden;
}
.md-shelf-screen .ch-feed {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}
.md-shelf-pager { touch-action: pan-y; min-height: 0; }
.md-shelf-screen .md-shelf-pager { flex: 1; display: flex; flex-direction: column; overflow: auto; }
.md-shelf-page { padding-bottom: 8px; }
.md-shelf-screen .md-shelf-page {
  flex: 1; display: flex; flex-direction: column;
}
.md-shelf-row {
  display: grid; grid-template-columns: 22px 1fr 22px; align-items: center;
  gap: 2px; padding: 8px 16px 0;
}
.md-couplet {
  writing-mode: vertical-rl; letter-spacing: 0.22em; font-size: 12px; line-height: 1.15;
  font-family: "Songti TC", "STSong", "Noto Serif TC", serif;
  color: #6e6e73; height: 148px; text-align: center; justify-self: center;
  box-sizing: border-box; padding: 10px 0;
  border-top: 1px solid #aeaeb2; border-bottom: 1px solid #aeaeb2;
}
.md-shelf { display: flex; justify-content: center; align-items: flex-end; gap: 18px; padding: 4px 0 0; }
.pt-root button.md-cover, .md-cover {
  width: 72px; height: 168px; padding: 0; border: 0; display: grid; place-items: center;
  font: inherit; cursor: pointer; box-sizing: border-box;
}
.md-cover.art { background: none; box-shadow: none; }
.md-cover.art img { width: 100%; height: 100%; object-fit: contain; }
.md-cover b {
  writing-mode: vertical-rl; letter-spacing: 0.18em; font-size: 26px; font-weight: 600;
  font-family: "Songti TC", "STSong", "Noto Serif TC", serif;
}
.pt-root button.md-cover.ziwei, .md-cover.ziwei {
  background: #2b1424; color: #d4b46a; border-radius: 4px;
  box-shadow: inset 0 0 0 1px #c9a227, inset 0 0 0 5px #2b1424, inset 0 0 0 6px rgba(201, 162, 39, 0.55);
}
.pt-root button.md-cover.bazi, .md-cover.bazi {
  background: #141414; color: #d4b46a; border-radius: 36px 36px 8px 8px;
}
.pt-root button.md-cover.terms, .md-cover.terms {
  background: #163528; color: #d4b46a; border-radius: 4px;
  box-shadow: inset 0 0 0 1px #c9a227, inset 0 0 0 5px #163528, inset 0 0 0 6px rgba(201, 162, 39, 0.45);
}
.pt-root button.md-cover.tian, .md-cover.tian {
  background: #1a1c22; color: #e8e4da; border-radius: 4px;
  box-shadow: inset 0 0 0 1px #8a7350, inset 0 0 0 5px #1a1c22, inset 0 0 0 6px rgba(201, 162, 39, 0.4);
}
.pt-root button.md-cover.mark, .md-cover.mark {
  background: #1a1c22; color: #e8e4da; border-radius: 4px;
  box-shadow: inset 0 0 0 1px #94211b, inset 0 0 0 5px #1a1c22, inset 0 0 0 6px rgba(148, 33, 27, 0.45);
}
.md-tian-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; padding: 8px 16px 24px; }
.md-tian-grid h3 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13px; color: #8e8e93; }
.pt-root button.md-tian-cell, .md-tian-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; height: auto; padding: 0; border: 0; background: none; color: inherit; }
.md-tian-cell img { width: 84px; height: 84px; object-fit: contain; }
.md-tian-cell.soon img { filter: grayscale(1) brightness(0.55); }
.md-tian-cell.dim img { opacity: 0.25; }
.md-seal-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #d9534a; vertical-align: 1px; }
.md-tian-cell { position: relative; }
.md-tian-cell .md-seal-dot { position: absolute; top: 4px; right: 8px; margin: 0; }
.md-tian-cell small { font-size: 11px; color: #8e8e93; text-align: center; }
.md-tian-sheet { display: block; width: 160px; height: 160px; margin: 0 auto 8px; object-fit: contain; }
.pt-root button.md-cover.soon, .md-cover.soon {
  background: transparent; color: #c7c7cc; border-radius: 10px;
  box-shadow: inset 0 0 0 1px #d8d8dc; outline: 1px dashed #c7c7cc; outline-offset: -6px;
  cursor: pointer;
}
.pt-root button.md-cover.soon b, .md-cover.soon b { font-weight: 500; font-size: 22px; color: #c7c7cc; }
.md-shelf-caps { display: flex; justify-content: center; gap: 18px; margin: 10px 16px 0; }
.md-shelf-caps span { width: 72px; text-align: center; font-size: 13px; color: var(--label); line-height: 1.35; }
.md-shelf-caps.one span { width: auto; white-space: nowrap; }
.md-shelf-caps.three span { width: 72px; color: var(--label2); }
.md-shelf-caps small { display: block; margin-top: 2px; font-size: 12px; color: var(--label3); }
.md-shelf-sum { margin: 14px 20px 4px; text-align: center; font-size: 13px; color: var(--label3); }
.pt-root button.md-tiaba.md-stage {
  margin: 16px 20px 8px; width: calc(100% - 40px); aspect-ratio: auto;
  height: 108px; min-height: 108px; max-height: 108px;
  flex-direction: column; gap: 6px; padding: 18px 16px;
}
.md-shelf-screen.pt-root button.md-tiaba.md-stage,
.md-shelf-screen .md-stage-daluo { margin-top: auto; }
.md-stage-daluo {
  margin: 16px 20px 8px; width: calc(100% - 40px); box-sizing: border-box;
  display: flex; flex-direction: row; align-items: center; gap: 12px;
  padding: 14px 16px 14px 10px; border-radius: 16px; text-align: left;
  background: linear-gradient(180deg, #3c3016 0%, #16110b 100%);
}
.md-stage-daluo img { width: 96px; height: 96px; flex: none; object-fit: contain; }
.md-stage-daluo > div { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.md-stage-daluo b {
  font-family: "Songti TC", "STSong", "Noto Serif TC", serif;
  font-size: 19px; font-weight: 500; letter-spacing: 0.04em; line-height: 1.45; color: #F4E6B8;
}
.md-stage-daluo small { font-size: 12px; font-weight: 400; line-height: 1.45; color: #cbb98a; }
.pt-root button.md-tiaba.md-stage span { font-size: 15px; color: #aeaeb2; }
.pt-root button.md-tiaba.md-stage small { font-size: 12px; color: #c7c7cc; font-weight: 400; }
.md-soon-toast {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 8;
  padding: 12px 28px; border-radius: 12px; background: #3a3a3c; color: #fff;
  font-size: 16px; font-weight: 600; pointer-events: none; white-space: nowrap;
}
.pt-root .pt-icon.md-clock { color: #007aff; display: grid; place-items: center; justify-self: end; }
.pt-root .md-past-row { gap: 12px; min-height: 64px; padding: 8px 12px 8px 14px; justify-content: flex-start; }
.pt-root .md-past-row .md-cover {
  width: 28px; height: calc(28px * 236 / 96); flex: none; pointer-events: none;
}
.pt-root .md-past-row .md-cover.art img {
  width: 28px; height: calc(28px * 236 / 96); object-fit: contain;
}
.pt-root .md-past-row .md-cover b { font-size: 11px; letter-spacing: 0.06em; }
.md-past-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.md-past-meta b { font-size: 17px; font-weight: 400; }
.md-past-meta small { font-size: 13px; color: var(--label3); }
.md-shelf-note { margin: 4px 32px 12px; font-size: 13px; line-height: 1.5; color: var(--label3); text-align: center; }
.md-vol-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 20px 12px; }
.pt-root button.md-vol-area {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0; border: 0;
  background: none; color: var(--label); font: inherit; font-size: 15px; font-weight: 600;
}
.md-vol-bar > span, .md-leaf { font-size: 13px; color: var(--label3); display: inline-flex; align-items: center; gap: 6px; }
.pt-root .md-leaf button { width: 28px; height: 28px; padding: 0; border: 0; background: none; color: #007aff; font-size: 20px; }
.pt-root .md-leaf button:disabled { color: #c7c7cc; }
.md-yin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 10px; margin: 8px 16px 16px; }
.md-leaf-wrap { display: flex; align-items: stretch; margin: 4px 16px 12px; }
.md-yin-leaf {
  flex: 1; min-width: 0; background: #f6f0e3;
  box-shadow: inset 0 0 0 1px #c4b49a, inset 0 0 0 5px #f6f0e3, inset 0 0 0 6px #d9ccb6;
  padding: 14px 10px 12px 12px;
}
.md-yin-leaf .md-yin-grid { margin: 0; gap: 0; }
.md-yin-leaf .md-seal-cell {
  min-height: 128px; padding: 12px 8px; box-sizing: border-box; gap: 10px;
  justify-content: center;
  box-shadow: inset -0.5px -0.5px 0 #e0d4c0, inset 0.5px 0.5px 0 #e0d4c0;
}
.md-yin-leaf .md-seal-cell small {
  font-family: "Songti TC", "STSong", "Noto Serif TC", serif;
  font-size: 12px; color: #3a2a1a;
}
.md-leaf-wrap + .pt-set-foot, .md-area-note + .pt-set-foot { text-align: center; margin-top: 10px; }
.md-slot-blank { pointer-events: none; }
.md-corner { position: relative; width: 40px; height: 54px; display: block; }
.md-corner i { position: absolute; width: 7px; height: 7px; border-color: #c7c7cc; border-style: solid; }
.md-corner i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.md-corner i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.md-corner i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.md-corner i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.md-shukou {
  width: 28px; flex: none; background: #f6f0e3; color: #3a2a1a;
  border: 1px solid #c4b49a; border-left: 0;
  display: flex; flex-direction: column; align-items: center; padding: 12px 2px 10px;
  font-family: "Songti TC", "STSong", "Noto Serif TC", serif;
}
.md-shukou b { writing-mode: vertical-rl; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; flex: 1; }
.md-fish {
  width: 9px; height: 7px; margin: 10px 0 8px; background: #3a2a1a;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.md-shukou span { writing-mode: vertical-rl; font-size: 10px; color: #8a7a68; letter-spacing: 0.08em; }
.md-seal.zhu { background: #7a1f1a; color: #f6efe3; }
.md-seal.bai { background: #f6efe3; color: #7a1f1a; box-shadow: inset 0 0 0 1px #7a1f1a; }
.md-sheet-empty { width: 88px; height: 88px; box-shadow: inset 0 0 0 1px #e5e5ea; }
.md-seal.md-seal-v { flex-direction: column; border-radius: 6px; padding: 8px 4px; box-sizing: border-box; letter-spacing: 0.06em; }
.md-seal.md-seal-v.four { display: inline-flex; flex-direction: column; direction: ltr; padding: 6px 4px; }
.md-seal.empty { background: transparent; color: #d0d0d4 !important; box-shadow: inset 0 0 0 1px #e5e5ea; }
.md-tiaba-wrap { display: flex; justify-content: center; margin: 8px 16px 16px; }
.pt-root button.md-tiaba, .md-tiaba {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: min(220px, 58vw); aspect-ratio: 3 / 4; height: auto; padding: 20px 16px;
  border: 0; border-radius: 4px; box-sizing: border-box; font: inherit; text-align: center;
  background: #f4eee4; color: #6a3b2a; box-shadow: inset 0 0 0 1px #e2d4c4;
}
.pt-root button.md-tiaba.mini {
  width: calc(100% - 32px); max-width: none; aspect-ratio: auto; height: 72px; margin: 12px 16px 8px;
  flex-direction: row; gap: 10px; padding: 8px 12px;
}
.pt-root button.md-tiaba.mini b { font-size: 15px; letter-spacing: 0.08em; }
.pt-root button.md-tiaba.mini span { font-size: 13px; }
.pt-root button.md-tiaba.mini.got { justify-content: flex-start; padding: 6px 14px 6px 8px; }
.md-tiaba.mini img { height: 100%; width: auto; aspect-ratio: 440 / 640; border-radius: 2px; box-shadow: 0 1px 3px rgba(60, 40, 20, 0.25); }
.md-tiaba-cap { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pt-root button.md-tiaba.mini .md-tiaba-cap small { font-size: 12px; color: #a0782c; }
.md-tiaba-full { display: block; width: min(100%, 360px, calc((100dvh - 200px) * 440 / 640)); height: auto; margin: 4px auto 12px; border-radius: 2px; box-shadow: 0 2px 10px rgba(60, 40, 20, 0.2); }
.md-pick { position: absolute; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); }
.md-pick-group, .md-pick-cancel {
  border-radius: 14px; background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.md-pick-group { overflow: hidden; }
.md-pick-title { padding: 14px 16px 10px; text-align: center; font-size: 13px; font-weight: 600; color: var(--label3); }
.pt-root .md-pick-group button, .md-pick-group button {
  display: block; position: relative; width: 100%; min-height: 52px; border: 0; border-top: 0.5px solid var(--sep);
  background: none; color: #007aff; font-size: 20px; text-align: center;
}
.md-pick-check {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 18px; pointer-events: none;
}
.pt-root button.md-pick-cancel, .md-pick-cancel {
  display: block; width: 100%; min-height: 52px; margin-top: 8px; border: 0;
  color: #007aff; font-size: 20px; font-weight: 600;
}
.pt-root button.md-tiaba.empty { background: #f2f2f7; color: #aeaeb2; box-shadow: inset 0 0 0 1px #d8d8dc; }
.pt-root button.md-tiaba.empty span { font-size: 15px; line-height: 1.4; color: #aeaeb2; }
.pt-root button.md-tiaba.got { cursor: pointer; }
.md-tiaba b { font-size: 20px; font-weight: 600; letter-spacing: 0.12em; }
.md-tiaba span { font-size: 13px; line-height: 1.6; color: #8a5a2b; }
.md-tiaba small { font-size: 11px; color: #a0782c; }
.md-tiaba.tall { width: min(280px, 72vw); }
.md-album-head { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 20px 4px; }
.md-album-head b { font-size: 22px; }
.md-album-head span { font-size: 13px; color: var(--label3); }
.md-season { margin: 12px 16px; }
.md-season h3 { margin: 0 0 8px 4px; font-size: 15px; display: flex; align-items: baseline; gap: 8px; }
.md-season h3 small { font-size: 12px; font-weight: 400; color: var(--label3); }
.md-season-foot { margin: 8px 4px 0; font-size: 12px; color: var(--label3); }
.md-seal.four { display: inline-grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: 1fr 1fr; place-items: center; padding: 6px; box-sizing: border-box; direction: rtl; }
.md-seal-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.md-seal-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pt-root button.md-seal-cell { height: auto; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.pt-root .md-seal-sheet .md-go:disabled { opacity: 1; background: #e5e5ea; color: #8e8e93; }
.md-seal-cell small { font-size: 11px; color: var(--label2); }
.md-area-grid { grid-template-columns: repeat(4, 1fr); margin: 8px 16px 16px; gap: 10px 6px; }
.md-area-note { margin: 4px 20px 12px; font-size: 15px; font-weight: 600; color: #8a5a2b; }
.md-seal-shade { position: fixed; z-index: 60; font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", system-ui, sans-serif; }
.md-seal-sheet {
  width: 100%; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0;
  background: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  animation: md-seal-up 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes md-seal-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.art-seal { display: block; object-fit: contain; }
.md-grab { width: 36px; height: 5px; border-radius: 3px; background: #d1d1d6; margin-bottom: 8px; touch-action: none; }
.md-seal-sheet > small { font-size: 13px; color: var(--label3); }
.md-seal-sheet h2 { margin: 4px 0 0; font-size: 24px; }
.md-seal-sheet p { margin: 0; font-size: 15px; color: var(--label2); }
.md-hou { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; background: #f2f2f7; font-size: 14px; }
.md-receipt { display: grid; grid-template-columns: repeat(3, 72px); justify-content: center; gap: 10px 14px; width: 100%; }
.md-receipt-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.md-receipt-cell small { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--label2); }
.md-receipt-more { font-size: 13px; color: var(--label3); }
.md-complete-mark { font-size: 28px; font-weight: 600; letter-spacing: 0.24em; color: #8a5a2b; }
.pt-root .md-seal-sheet .md-go, .md-seal-sheet .md-go { width: 100%; min-height: 50px; border-radius: 12px; background: #0A0A0A; color: #fff; font-size: 17px; font-weight: 600; margin-top: 4px; }
.pt-root .md-seal-sheet.md-seal-sheet-yin .md-go { background: #0A0A0A; }
.pt-root .md-seal-sheet.md-seal-sheet-yin .md-go:disabled { background: #e5e5ea; color: #8e8e93; }
.ch-tab-icon { position: relative; display: inline-flex; }
.ch-tab-dot { position: absolute; top: -1px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; }
.md-post { margin: 12px 16px; padding: 0 0 8px; border-radius: 12px; background: #fff; overflow: hidden; }
.md-post p { margin: 0; padding: 6px 14px 0; font-size: 17px; line-height: 1.45; }
.md-donate-note p:last-child { padding-bottom: 10px; }
.md-mail-run { white-space: nowrap; }
a.md-mail { color: #007aff; text-decoration: none; }
.pt-root button.md-mail {
  display: inline; width: auto; height: auto; min-height: 0; padding: 0;
  font-size: inherit; font-weight: 400; color: #007aff; vertical-align: baseline;
}
.md-report-sheet {
  text-align: left; align-items: stretch;
  max-height: calc(100dvh - env(safe-area-inset-top) - 24px); box-sizing: border-box;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.md-report-sheet > * { flex-shrink: 0; }
.md-report-field.md-report-orgs { display: grid; grid-template-columns: 1fr 1fr; }
.md-report-field.md-report-orgs > span { grid-column: 1 / -1; }
.md-report-sheet h2, .md-report-sheet > p { text-align: center; }
.md-report-field { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; width: 100%; }
.md-report-field > span { font-size: 13px; color: var(--label3); }
.pt-root .md-report-field button {
  width: 100%; min-height: 44px; padding: 0 14px; border-radius: 10px;
  background: var(--fill); font-size: 15px; text-align: left;
}
.pt-root .md-report-field button.on { background: #e8f1ff; color: #007aff; }
.md-report-input {
  height: 44px; padding: 0 14px; border: 0; border-radius: 10px; box-sizing: border-box; width: 100%;
  background: var(--fill); font: inherit; font-size: 17px; outline: none;
}
.md-photo {
  aspect-ratio: 4 / 3; overflow: hidden; background: #f4efe6;
}
.md-photo img { display: block; width: 100%; height: auto; }
.md-post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-bottom: 8px; }
.md-meta { display: flex; align-items: center; gap: 8px; padding: 10px 14px 0; font-size: 13px; color: var(--label3); }
.md-pin { display: inline-flex; align-items: center; gap: 2px; color: var(--label2); }
.md-ad { padding: 1px 6px; border-radius: 4px; box-shadow: inset 0 0 0 0.5px var(--label3); font-size: 12px; color: var(--label2); }
.md-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 0 14px; }
.pt-root .md-link { font-size: 15px; color: #007aff; text-align: left; padding: 6px 0; }
.pt-root .md-share { width: 36px; height: 36px; display: grid; place-items: center; color: #007aff; }
.md-merit {
  position: fixed; left: 0; right: 0; bottom: calc(50px + env(safe-area-inset-bottom)); z-index: 7;
  height: 36px; display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 0; border: 0; border-top: 0.5px solid rgba(60, 60, 67, 0.29);
  background: rgba(249, 249, 249, 0.9);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: #007aff; font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.md-org { margin: 12px 16px; padding: 14px; border-radius: 12px; background: #fff; display: flex; flex-direction: column; gap: 4px; }
.md-org b { font-size: 17px; }
.md-org p { margin: 0 0 4px; font-size: 15px; line-height: 1.45; color: var(--label2); }
.md-org small { font-size: 13px; color: var(--label3); }
.pt-root .md-org-go { margin-top: 10px; min-height: 40px; border-radius: 10px; background: var(--fill); color: #007aff; font-size: 15px; font-weight: 600; }
.md-org-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.md-org-cat { flex: none; padding: 1px 8px; border-radius: 6px; background: var(--fill); font-size: 12px; color: var(--label2); }
.md-org-flag { align-self: flex-start; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.md-org-flag.watch { background: #fff4d6; color: #8a5a00; }
.md-org-flag.stop { margin-top: 10px; background: #fde2e1; color: #b3261e; }
.md-org-love { display: flex; align-items: center; gap: 8px; }
.pt-root .md-org-love button { padding: 2px 10px; border-radius: 6px; background: var(--fill); color: #007aff; font-size: 13px; }
.md-sheet { background: transparent; }
.md-leave { padding: 16px 12px 4px; border-radius: 14px; background: #fff; }
.md-sheet b { display: block; text-align: center; font-size: 17px; }
.md-url { display: block; margin: 6px 0 12px; text-align: center; font-size: 13px; color: var(--label3); }
.pt-root .ch-sheet .md-go { background: #0A0A0A; color: #fff; font-weight: 600; }
.ch-bar input {
  flex: 1; height: 36px; border: 0; border-radius: 18px; background: #c7c7cc;
  padding: 0 14px; font: inherit; font-size: 17px; color: #1c1c1e; outline: none;
}
.ch-bar input::placeholder { color: #3c3c43; opacity: 1; }
.pt-root .ch-plus, .pt-root .ch-send {
  width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; flex: none;
}
.pt-root .ch-plus { background: var(--fill); color: #1c1c1e; }
.pt-root .ch-send { background: #007aff; color: #fff; }
.ch-shade {
  position: absolute; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.28);
  display: flex; align-items: flex-end;
}
/* 排行榜這頁自己會捲。absolute 會把會員卡排到整頁最底，看起來像沒點到。 */
.ch-shade.md-seal-shade { position: fixed; z-index: 60; }
.ch-shade-clear { display: block; background: transparent; }
.ch-sheet { width: 100%; padding: 0 8px calc(8px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.pt-root .ch-sheet button {
  width: 100%; min-height: 56px; border-radius: 14px; background: #fff; font-size: 20px;
}
.pt-root .ch-sheet .cancel { font-weight: 600; }
.ch-pop {
  position: absolute; min-width: 148px; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}
.pt-root .ch-pop button {
  display: block; width: 100%; min-height: 44px; padding: 0 16px; text-align: left; font-size: 17px; background: #fff;
}
.pt-root .ch-pop button + button { box-shadow: inset 0 0.5px 0 var(--sep); }
.pt-root .ch-pop .danger { color: #ff3b30; }
.pt-root .ch-sheet .ex-kind button { width: auto; flex: 1; min-height: 36px; font-size: 15px; }

/* 聊天串（2026-10-13）：像 LINE，盤是一則訊息，點開才是全版面 */
.ex-stream { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 12px 12px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.ex-stream-in, .ex-log-in { display: flex; flex-direction: column; flex: none; }
.ex-card-row { display: flex; flex-direction: column; align-items: flex-start; margin-top: 10px; }
.ex-card-row.mine { align-items: flex-end; }
.ex-chart-send-row { align-self: stretch; width: 100%; box-sizing: border-box; display: flex; align-items: flex-end; justify-content: flex-end; gap: 7px; }
.ex-chart-send-row > small { padding-bottom: 4px; color: var(--label3); font-size: 11px; white-space: nowrap; }
.ex-chart-spinner { width: 21px; height: 21px; flex: none; border: 2px solid #c7c7cc; border-top-color: #7f7f86; border-radius: 50%; animation: ex-chart-spin .8s linear infinite; }
@keyframes ex-chart-spin { to { transform: rotate(360deg); } }
.ex-chart-failed { display: grid; width: 23px; height: 23px; flex: none; place-items: center; border-radius: 50%; color: #fff; background: #e5372b; font-size: 15px; font-weight: 800; }
.ex-chart-fail-line { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 6px; }
.ex-chart-fail-line span { max-width: 185px; overflow: hidden; color: #d9342b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pt-root .ex-chart-fail-line button { padding: 5px 11px; border: .5px solid var(--sep); border-radius: 999px; color: var(--label2); background: var(--card); font-size: 13px; font-weight: 600; }
.pt-root .ex-chart-fail-line button.retry { border-color: #007aff; color: #fff; background: #007aff; }
.ex-chart-send-row:has(.ex-chart-spinner) .ex-card, .ex-chart-send-row:has(.ex-chart-failed) .ex-card { opacity: .8; }
.ex-card-row > b { margin: 0 10px 2px; font-size: 12px; font-weight: 500; color: var(--label); }
.pt-root .ex-card {
  display: flex; flex: none; align-items: center; gap: 10px; box-sizing: border-box; width: min(250px, 78%); padding: 10px 12px; border-radius: 16px;
  text-align: left; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0.5px var(--sep);
  -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
}
.pt-root .ex-card { position: relative; overflow: hidden; padding-left: 16px; }
.pt-root .ex-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--tint, #c7c7cc); }
.pt-root .ex-card.writing { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 2px var(--tint); }
.ex-card-glyph { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 1.5px; width: 48px; height: 48px; }
.ex-card-glyph i { border-radius: 2px; background: #e5e5ea; }
.ex-card-glyph i { background: color-mix(in srgb, var(--tint, #8e8e93) 22%, #fff); }
.ex-card-glyph i.mid { background: transparent; }
.ex-card-glyph.bazi { grid-template-rows: repeat(2, 1fr); gap: 2px; padding: 8px 0; }
.ex-card-glyph.bazi i.day { background: color-mix(in srgb, var(--tint, #8e8e93) 60%, #fff); }
.ex-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ex-card-text b { font-size: 16px; font-weight: 600; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-card-text small { font-size: 12px; color: var(--label3); white-space: nowrap; }
.ex-card-text em { font-style: normal; font-size: 13px; color: var(--label2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ex-card-tags { display: flex; gap: 4px; margin-top: 2px; }
.ex-card-tag { padding: 1px 6px; border-radius: 6px; font-size: 11px; color: #c2410c; background: rgba(194, 65, 12, 0.1); }
.ex-card-writing { padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #fff; background: var(--tint); }
@media (prefers-reduced-motion: reduce) { .ex-chart-spinner { animation: none; } }
.pt-root .ex-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 70%; margin: 0 10px 2px; padding: 0;
  font-size: 11px; font-weight: 500; color: color-mix(in srgb, var(--tint) 80%, #000); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ex-chip .ex-card-glyph { width: 12px; height: 12px; gap: 0.5px; }
.ex-chip .ex-card-glyph.bazi { padding: 2px 0; gap: 0.5px; }
.ex-chip .ex-card-glyph i { border-radius: 0.5px; }
.ex-stream-foot { flex: none; background: #fff; }
.pt-root .ex-target {
  display: flex; align-items: center; gap: 8px; width: calc(100% - 20px); margin: 8px 10px 0; padding: 6px 10px 6px 12px;
  border-radius: 10px; text-align: left; background: color-mix(in srgb, var(--tint) 10%, #fff);
  box-shadow: inset 4px 0 0 var(--tint);
}
.ex-target .ex-card-glyph { width: 22px; height: 22px; gap: 1px; }
.ex-target .ex-card-glyph.bazi { padding: 4px 0; }
.ex-target > .ex-target-text { flex: 1; min-width: 0; font-size: 13px; color: var(--label2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-target b { font-weight: 600; color: var(--label); }
.ex-target small { font-size: 12px; color: var(--label3); }
.ex-target em { flex: none; display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--tint) 85%, #000); }
.pt-root .ex-target:disabled em { color: var(--label3); font-weight: 400; }
.pt-root .ch-sheet .ex-group button.ex-target-row { display: flex; align-items: center; gap: 12px; min-height: 56px; text-align: left; box-shadow: inset 4px 0 0 var(--tint); }
.ex-target-row .ex-card-glyph { width: 30px; height: 30px; gap: 1px; }
.ex-target-row .ex-card-glyph.bazi { padding: 5px 0; }
.ex-target-row > .ex-target-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ex-target-row b { font-size: 16px; font-weight: 600; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-target-row small { font-size: 12px; color: var(--label3); }
.ex-target-row svg { flex: none; color: var(--tint); }
.ex-target-list { max-height: 60vh; overflow-y: auto; }
.ex-stream-foot .ch-bar { border-top: 0; }

/* 全版面：盤固定不動；留言、筆記面板蓋上去，不推擠盤 */
.ch-thread .ex-stage.ex-fixed > .ex-board { flex: 1 1 auto; min-height: 0; height: auto; overflow: auto; }
.ch-thread .ex-stage.ex-fixed .ex-dock { flex: none; height: auto; min-height: 0; overflow: visible; display: block; }
.ex-dock-bar {
  display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 0.5px solid var(--sep);
}
.pt-root .ex-dock-bar button {
  flex: 1; height: 38px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--label); background: var(--fill);
}
.pt-root .ex-dock-bar button.on { color: #007aff; background: rgba(0, 122, 255, 0.12); }
.ch-thread .ex-stage.ex-fixed .ex-sheet.ex-over {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 58%; min-height: 260px; max-height: 100%;
  overflow: hidden; border-radius: 14px 14px 0 0; box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.14);
}
.ch-thread .ex-stage.ex-fixed .ex-over .ex-body { flex: 1 1 auto; height: auto; min-height: 0; overflow: hidden; }
.ch-thread .ex-stage.ex-fixed .ex-over .ex-log { flex: 1 1 auto; height: auto; min-height: 0; }
.ch-thread .ex-stage.ex-fixed .ex-over .ex-blocks { flex: 1 1 auto; min-height: 0; }
.ch-thread .ex-stage.ex-fixed .ex-over .ex-note { flex: 1; height: auto; min-height: 120px; }
.pt-root .ex-over .ex-grab { cursor: pointer; }
.ex-dock-bar .ex-dot { display: inline-block; width: 6px; height: 6px; margin-left: 5px; vertical-align: middle; border-radius: 50%; background: #007aff; }
.ex-event {
  align-self: center; max-width: 85%; margin: 10px 0 0; padding: 3px 10px; border-radius: 10px;
  font-size: 12px; line-height: 1.4; text-align: center; color: var(--label2); background: rgba(118, 118, 128, 0.12);
}
@media (min-width: 900px) {
  .ch-thread .ex-stage.ex-fixed > .ex-board:not(:has(.ex-bazi)) { overflow: hidden; }
  .ch-thread .ex-stage.ex-fixed > .ex-board:not(:has(.ex-bazi)) > .ex-chart { flex: 1 1 auto; min-height: 0; }
}
/* 手機交流：紫微盤拉滿標題和留言列中間，四排等高。別人的名字占上面一條，盤跟著矮一點。 */
@media (max-width: 899px) {
  .ch-thread .ex-stage.ex-fixed > .ex-board:not(:has(.ex-bazi)) {
    flex: 1 1 0; height: auto; overflow: hidden;
  }
  .ch-thread .ex-stage.ex-fixed > .ex-board:not(:has(.ex-bazi)) > .ex-chart {
    flex: 1 1 0; align-self: stretch; width: auto; min-height: 0; height: auto; aspect-ratio: auto;
  }
  .ch-thread .ex-stage.ex-fixed .ex-chart > .pt-root.pt-bare {
    flex: 1 1 0; height: auto; min-height: 0;
  }
}
/* 全版面的紫微盤：四排等高，下方留空讓紅框和朝外的自化箭頭露出來 */
.ch-thread .ex-stage.ex-fixed > .ex-board:not(:has(.ex-bazi)) { padding-bottom: 12px; }
.ch-thread .ex-stage.ex-fixed .pt-root.pt-bare .pt-board { grid-template-rows: repeat(4, minmax(0, 1fr)); }
.ch-thread .ex-stage.ex-fixed .pt-root.pt-bare > .pt-compass { --r2: 0.375; --r3: 0.625; }
/* 網站交流的中宮沒有 .pt-center-edit，末項的 auto 會獨占剩餘高度。 */
.ch-thread .ex-stage.ex-fixed .pt-root.pt-bare .pt-center > :last-child { margin-bottom: 0; }
.ch-thread .ex-stage.ex-fixed .pt-root.pt-bare .pt-center {
  justify-content: center;
  justify-content: safe center;
  padding-block: 8px;
}
.ch-thread .ex-stage.ex-fixed .pt-root.pt-bare .pt-center > .pt-hua-pick { width: 100%; }
.ch-thread .ex-stage.ex-fixed .pt-root.pt-bare .pt-hua-pick button { font-size: 13px; }

/* 印譜總表 */
.md-nav-end { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-right: 14px; }
.pt-root .md-all-go { padding: 6px 0; font-size: 16px; color: #007aff; white-space: nowrap; }
/* 印譜子頁吃到 .md-root 的 relative，會被內容撐高；body 不捲，總表要自己捲 */
.pt-root.md-root.md-all-screen { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.md-all-sum { margin: 12px 20px 0; font-size: 13px; color: var(--label2); }
.md-all-sec { margin: 12px 16px; padding: 12px 8px 4px; border-radius: 12px; background: #fff; }
.md-all-sec h3 { display: flex; align-items: baseline; justify-content: space-between; margin: 0 8px 8px; font-size: 15px; font-weight: 600; }
.md-all-sec h3 small { font-size: 12px; font-weight: 400; color: var(--label3); }
.md-all-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 4px; }
.md-all-empty { margin: 80px 20px; text-align: center; color: var(--label3); }

/* 對方的頭像（2026-11-03）：像 LINE，對方訊息左邊一顆 36px 圓頭像；同一人連續傳只留第一則的頭像和名字，後面的照樣縮排對齊。自己的訊息沒有頭像。 */
.ex-msg.ex-face, .ex-card-row.ex-face { position: relative; box-sizing: border-box; padding-left: 44px; }
.ex-face > .ex-ava { position: absolute; left: 0; top: 0; overflow: hidden; }
.ex-face > .ex-ava > .hm-ava { width: 36px; height: 36px; }
.ex-face.ex-cont > .ex-ava, .ex-face.ex-cont > b { display: none; }
.ex-msg.ex-face.ex-cont { margin-top: 3px; }
/* 對方傳的命盤卡跟自己的一樣大（2026-11-19）。對方那列左邊讓出 44px 給頭像，78% 算在讓過的寬度上，卡就小一號。
   換算回整列的 min(250px, 78%)：(100% + 44px) × 0.78。高度、字級、縮圖沿用同一組 .ex-card 規則，只差左右對齊。 */
.pt-root .ex-card-row.ex-face[data-posted] > .ex-card { width: min(250px, calc((100% + 44px) * 0.78)); }
