/* 社群頁面共用樣式（docs/09 P1-3，log #100；log #116 換成 docs/11 v4 的樣式：照 Printables 的結構，使用者在調色面板調的顏色和字）
   規則（docs/ui/printables-teardown.md）：1px 細線、幾乎沒有陰影、圓角 6px、一個主色；先只做淺色模式。 */
:root {
  /* 顏色：使用者 2026-11-05 用調色面板調的（log #114） */
  --text: #6e665d; --title: #423833; --text-light: #7c7b78; --text-muted: #aaa49c;
  --bg: #fafaf8; --section: #e8e7e5; --line: #ecdcc3; --line-strong: #e4dedb;
  --cta: #62b8bc; --cta-hover: #4aa8ac; --cta-text: #f6fbff; --cta-soft: #e3f3f3;
  --accent: #13afb4; --accent-hover: #ff921d; --accent-text: #ffffff;
  --link: #2f8488;          /* 連結：比按鈕深的藍綠，字才讀得清楚（使用者沒調，log #116 選的） */
  --highlight: #dab88a; --footer-bg: #b6a696; --footer-text: #ffffff;
  --warn: #b3261e; --warn-soft: #fdecea; --ok: #2f6f52; --ok-soft: #e6f2ec;
  --radius: 6px;
  /* 字的大小、粗細（log #111、#114） */
  --fs-body: 13px; --fw-body: 400; --fs-brand: 17px; --fw-brand: 500; --fs-menu: 14px; --fw-menu: 400;
  --fs-create: 15px; --fw-create: 700; --fs-page: 36px; --fw-page: 500; --fs-sort: 15px; --fw-sort: 500;
  --fs-author: 14px; --fw-author: 400; --fs-handle: 11px; --fs-card: 14px; --fw-card: 500;
  --fs-crumbs: 13px; --fs-stats: 13px; --fs-cta: 19px; --fw-cta: 700; --fs-title: 28px; --fw-title: 700;
  --fs-sec: 24px; --fw-sec: 700; --fs-para: 16px; --fs-table: 15px; --fs-facts: 15px;
  /* 舊的名字（其他規則還在用）對到新的顏色 */
  --ink: var(--text); --muted: var(--text-light); --card: #ffffff;
  --accent-ink: var(--link); --accent-soft: var(--cta-soft); --accent-soft-ink: var(--link);
  --honey: var(--highlight); --on-accent: var(--cta-text);
  --sage: var(--title); --sage-soft: var(--section); --sage-ink: var(--title); --olive: var(--text-muted);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: var(--fs-body); font-weight: var(--fw-body); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1; width: 100%; }
a { color: var(--link); }
button, input, textarea, select { font: inherit; color: inherit; }
.i { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.i.sm { width: 16px; height: 16px; } .i.lg { width: 26px; height: 26px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* 頂部 1：工具列 44px（語言｜搜尋｜帳號） */
.util { background: var(--section); }
.util .wrap { display: grid; grid-template-columns: 1fr minmax(0, 400px) 1fr; align-items: center; height: 44px; gap: 16px; }
.util-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text-light); cursor: pointer; padding: 4px 6px;
  border-radius: var(--radius); text-decoration: none; white-space: nowrap; font-size: 14px; min-height: 32px; }
.util-btn:hover { color: var(--title); }
.util-btn img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.search { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg); color: var(--text-muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); height: 100%; }
.search:focus-within { border-color: var(--link); }
.util .right { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }

/* 頂部 2：選單列 60px */
.navbar { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.navbar .wrap { display: flex; align-items: stretch; height: 60px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: var(--fw-brand); font-size: var(--fs-brand); white-space: nowrap; color: var(--title); text-decoration: none; }
.brand .logo { width: 32px; height: 32px; }
.menu { display: flex; align-items: stretch; font-weight: var(--fw-menu); font-size: var(--fs-menu); }
.menu a { display: flex; align-items: center; padding: 0 18px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; color: var(--text); text-decoration: none; }
.menu a.on { border-bottom-color: var(--title); color: var(--title); }
.menu a:hover { color: var(--cta-hover); }
.create { position: relative; margin-left: auto; align-self: center; }
.create > button { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius); background: var(--accent);
  color: var(--accent-text); cursor: pointer; white-space: nowrap; font-size: var(--fs-create); font-weight: var(--fw-create); }
.create > button:hover { background: var(--accent-hover); }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 6px 0; z-index: 30; box-shadow: 0 2px 12px rgba(40, 25, 10, .08); }
.dropdown a { display: flex; gap: 12px; padding: 10px 16px; color: var(--text); text-decoration: none; }
.dropdown a:hover, .dropdown a:focus-visible { background: var(--section); }
.dropdown .i { margin-top: 1px; color: var(--cta-hover); }
.dropdown b { display: block; font-weight: 700; color: var(--title); }
.dropdown small { display: block; color: var(--text-light); font-size: 13px; }

.chip-btn { font-size: 13px; border: 1px solid var(--line-strong); background: var(--card); border-radius: var(--radius); padding: 5px 10px; color: var(--text-light);
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 32px; }
.chip-btn:hover { border-color: var(--title); color: var(--title); }

/* 頁尾 */
.footer { background: var(--footer-bg); color: var(--footer-text); padding: 24px 0; font-size: 13px; margin-top: 48px; }
.footer .wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.footer b { font-size: 16px; letter-spacing: .02em; }
.footer a { color: var(--footer-text); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer .copy { margin-left: auto; opacity: .85; }

@media (max-width: 767px) {
  .wrap { padding: 0 16px; }
  .util .wrap { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .util-btn span { display: none; }
  .menu { display: none; }
  .navbar .wrap { gap: 10px; }
}

/* 內容 */
main.page { max-width: 720px; margin: 0 auto; padding: 32px 16px 16px; }
main.narrow { max-width: 440px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
h1 { font-size: 24px; line-height: 1.3; margin: 0 0 8px; color: var(--title); font-weight: 700; }
h2 { font-size: 17px; margin: 0 0 12px; color: var(--title); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: grid; gap: 16px; }

.btn { border: 1px solid var(--line-strong); background: var(--card); border-radius: var(--radius); padding: 10px 16px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink); min-height: 44px; }
.btn:hover { border-color: var(--title); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--cta); border-color: var(--cta); color: var(--cta-text); font-weight: 700; }
.btn.primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn:focus-visible, .chip-btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.btn.block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }
.gbtn { min-height: 44px; display: flex; justify-content: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

label.field { display: grid; gap: 4px; }
label.field > span { font-weight: 600; font-size: 14px; }
.field input, .field textarea, .field select { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; background: var(--card); width: 100%; min-height: 44px; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent-ink); outline-offset: -1px; border-color: var(--accent-ink); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .prefix { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); }
.field .prefix:focus-within { outline: 2px solid var(--accent-ink); outline-offset: -1px; border-color: var(--accent-ink); }
.field .prefix b { font-weight: normal; color: var(--muted); padding-left: 12px; white-space: nowrap; }
.field .prefix input { border: none; outline: none; padding-left: 2px; }
.field.bad input { border-color: var(--warn); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.note { border-radius: var(--radius); padding: 10px 14px; font-size: 14px; }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.err { background: var(--warn-soft); color: var(--warn); }
.note.info { background: var(--accent-soft); color: var(--accent-soft-ink); }
[hidden] { display: none !important; }

/* 個人頁 */
.profile-head { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: start; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--honey); color: var(--on-accent);
  display: grid; place-items: center; font-size: 40px; font-weight: 700; }
.profile-head h1 { margin: 0; overflow-wrap: anywhere; }
.handle { color: var(--muted); margin: 0 0 8px; }
.bio { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.links a { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 12px;
  text-decoration: none; color: var(--ink); background: var(--card); }
.links a:hover { border-color: var(--line-strong); }
.links small { color: var(--muted); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 32px 0 16px; }
.tabs button { padding: 8px 14px; color: var(--muted); border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: none; cursor: pointer; min-height: 44px; }
.tabs button.on { color: var(--title); font-weight: 700; border-bottom-color: var(--cta); }
.tabs small { color: var(--muted); font-weight: normal; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* 發佈（P1-4，log #102）*/
main.wide { max-width: 1040px; }
.req { color: var(--warn); font-style: normal; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field > legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 4px 0; }
label.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.field.bad, label.check.bad { color: var(--warn); }
.mono, pre.pattern-text { font-family: ui-monospace, "SF Mono", Menlo, "PingFang TC", monospace; font-size: 14px; }
.pick-grid { display: grid; gap: 12px; }
.pick { display: grid; gap: 4px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; }
.pick:hover { border-color: var(--line-strong); }
.pick b { font-size: 16px; }
.doll-src { display: flex; gap: 16px; align-items: center; padding: 12px; background: var(--bg); border-radius: var(--radius); }
.doll-src img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius); background: var(--card); flex: none; }
.tag-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pick label { cursor: pointer; }
.tag-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tag-pick span { display: inline-block; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px; font-size: 13.5px; background: var(--card); }
.tag-pick input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-soft-ink); font-weight: 600; }
.tag-pick input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
#free_tags { margin-top: 10px; }
.lic-pick { display: grid; gap: 8px; }
.lic-pick label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; }
.lic-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.lic-pick input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--accent); }
.lic-pick span { display: grid; gap: 2px; }
.lic-pick small { font-size: 13px; color: var(--muted); }
.lic-pick small.cc { font-size: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-grid:empty { display: none; }
.photo-grid figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .cover { position: absolute; top: 6px; left: 6px; background: var(--honey); color: var(--on-accent); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: var(--radius); }
.photo-grid .ops { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.45)); }
.photo-grid .ops button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); cursor: pointer; font-size: 14px; }
.photo-grid .ops button:disabled { opacity: .35; cursor: default; }
#addPhotoBtn { justify-self: start; }
.danger { border-top: 1px solid var(--line); padding-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #fff; font-weight: 700; }

.post { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.gallery { display: grid; gap: 8px; }
.gallery .main { width: 100%; height: auto; max-height: 72vh; object-fit: contain; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.gallery .thumbs { display: flex; gap: 8px; overflow-x: auto; }
.gallery .thumbs button { padding: 0; border: 2px solid transparent; border-radius: var(--radius); background: none; cursor: pointer; flex: none; }
.gallery .thumbs button.on { border-color: var(--accent); }
.gallery .thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; display: block; }
.no-photo { aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.post-info h1 { margin: 6px 0 4px; overflow-wrap: anywhere; font-size: var(--fs-title); font-weight: var(--fw-title); line-height: 1.25; }
.badge { display: inline-block; font-size: 12.5px; padding: 1px 10px; border-radius: var(--radius); background: var(--sage-soft); color: var(--sage-ink); font-weight: 600; }
.badge.muted-badge { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.byline { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; }
.byline img, .mini-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.mini-avatar { display: grid; place-items: center; background: var(--honey); color: var(--on-accent); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); font-size: var(--fs-facts); }
.facts dt { color: var(--muted); white-space: nowrap; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { font-size: 14px; padding: 3px 9px; border-radius: var(--radius); border: 1px solid var(--line-strong); color: var(--text); }
.post-section { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 1170px; }
.post-section h2 { font-size: var(--fs-sec); font-weight: var(--fw-sec); margin-bottom: 16px; }
.post-section .prose { font-size: var(--fs-para); }
.post-section h3 { font-size: 15px; margin: 20px 0 8px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
pre.pattern-text { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0; line-height: 1.7; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 4px; }
.seg button { border: 0; background: var(--card); padding: 6px 14px; cursor: pointer; min-height: 36px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--sage-soft); color: var(--sage-ink); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.cards a { display: grid; gap: 4px; color: var(--ink); text-decoration: none; }
.cards img, .cards .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--line); display: block; }
.cards b { font-weight: 600; overflow-wrap: anywhere; line-height: 1.4; }
.cards a:hover b { text-decoration: underline; }

@media (max-width: 760px) {
  .post { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 560px) {
  main.page { padding: 20px 16px 48px; }
  .card { padding: 18px; }
  .row2 { grid-template-columns: 1fr; }
  .profile-head { grid-template-columns: 72px 1fr; gap: 14px; }
  .avatar { width: 72px; height: 72px; font-size: 30px; }
}

/* 頁尾、隱私權政策（docs/10，log #105） */
.site-foot { max-width: 720px; margin: 0 auto; padding: 0 16px 32px; display: flex; gap: 16px; justify-content: center;
  font-size: 13px; color: var(--muted); }
.site-foot a { color: inherit; }
html[lang="en"] .i18n-zh, html:not([lang="en"]) .i18n-en { display: none; }
.policy { line-height: 1.75; }
.policy h2 { margin: 32px 0 8px; }
.policy ul { padding-left: 1.3em; }
.policy li + li { margin-top: 6px; }
.table-wrap { overflow-x: auto; margin: 8px 0 0; }
.policy table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.6; }
.policy th, .policy td { border-bottom: 1px solid var(--line); padding: 8px 10px 8px 0; text-align: left; vertical-align: top; }
.policy th { color: var(--muted); font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) {
  .policy table, .policy tbody, .policy tr, .policy td { display: block; }
  .policy thead { display: none; }
  .policy tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .policy td { border: 0; padding: 2px 0; }
}
.danger-zone { border: 1px solid var(--warn-soft); }
.danger-zone h2 { color: var(--warn); }

/* 娃娃織圖表格：和娃娃設計器「織圖」分頁同樣的樣子（log #104） */
.tnote { font-size: 12.5px; color: var(--muted); line-height: 1.65; margin: 0 0 8px; white-space: pre-line; }
.pat-wrap { overflow-x: auto; }
table.pat { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; background: var(--card); }
table.pat th, table.pat td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
table.pat th { background: var(--bg); font-weight: 600; white-space: nowrap; }
table.pat td.n { white-space: nowrap; text-align: right; width: 1%; }
table.pat tr.stuff td { background: var(--accent-soft); color: var(--accent-soft-ink); text-align: center; }

/* ── v4（log #116）：作品牆、卡片、詳細頁 ── */
h1.page-title { font-size: var(--fs-page); font-weight: var(--fw-page); margin: 32px 0 20px; line-height: 1.2; color: var(--title); }
.sorts { display: flex; align-items: flex-end; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; }
.sorts a { padding: 10px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-light); font-weight: var(--fw-sort); font-size: var(--fs-sort); text-decoration: none; white-space: nowrap; }
.sorts a.on { color: var(--title); border-bottom-color: var(--cta); }
.sorts .tail { margin-left: auto; display: flex; gap: 10px; padding-bottom: 8px; }
.btn-outline { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: none; cursor: pointer; white-space: nowrap; color: var(--text-light); text-decoration: none; }
.btn-outline.on, .btn-outline:hover { border-color: var(--title); color: var(--title); }

/* 卡片牆：≥1170 4 欄、≥768 3 欄、≥420 2 欄，欄距 32px */
.feed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 420px) { .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1170px) { .feed { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.pcard-head { display: flex; align-items: center; height: 50px; padding: 10px 15px; gap: 8px; color: var(--text); text-decoration: none; min-width: 0; }
.pcard-head .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pcard-head b { font-size: var(--fs-author); font-weight: var(--fw-author); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-head small { font-size: var(--fs-handle); color: var(--text-light); }
.av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: var(--highlight); font-size: 12px; font-weight: 700; object-fit: cover; }
.pcard .pic { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--section); overflow: hidden; }
.pcard .pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pcard .pic .none { display: grid; place-items: center; height: 100%; color: var(--text-muted); }
.flag { position: absolute; left: 0; top: 0; display: flex; background: var(--cta); color: #fff; padding: 7px; border-bottom-right-radius: var(--radius); }
.pcard-body { padding: 10px 15px 15px; display: flex; flex-direction: column; flex: 1; }
.pcard-body h3 { margin: 0; font-size: var(--fs-card); font-weight: var(--fw-card); line-height: 1.35; color: var(--title);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pcard-body a { text-decoration: none; }
.pcard:hover h3 { color: var(--cta-hover); }
.crumbs { color: var(--text-light); font-size: var(--fs-crumbs); margin-top: 4px; }
.stats { display: flex; align-items: center; gap: 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-light); font-size: var(--fs-stats); }
.pcard-body .stats { margin-top: auto; }
.pcard-body .crumbs + .stats, .pcard-body h3 + .stats { margin-top: 12px; }
.stats span, .stats button { display: flex; align-items: center; gap: 4px; }
.stats button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; }
.stats .i { width: 17px; height: 17px; color: var(--text-muted); }
.stats button:hover .i { color: var(--text-light); }
.stats .end { margin-left: auto; }
.btn-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 40px; background: var(--cta); color: var(--cta-text);
  border: 0; border-radius: var(--radius); font-size: var(--fs-cta); font-weight: var(--fw-cta); cursor: pointer; text-decoration: none; }
.btn-cta:hover { background: var(--cta-hover); }
.btn-cta.full { width: 100%; padding: 0 16px; }
.more-row { display: flex; justify-content: center; margin: 40px 0 16px; }
.feed-empty { text-align: center; padding: 64px 16px; color: var(--text-light); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.feed-empty p { margin: 0 0 16px; }

/* 詳細頁（照 Printables 作品頁） */
main.detail { max-width: 1440px; margin: 0 auto; padding: 24px 32px 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips a, .chips span { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px; background: var(--section); border-radius: var(--radius); color: var(--text-light); font-size: 13px; text-decoration: none; }
.author-row { display: flex; align-items: center; gap: 12px; padding: 14px 0 20px; border-bottom: 1px solid var(--line); }
.author-row .byline .mini-avatar, .author-row .byline img { width: 44px; height: 44px; }
.summary { font-size: 18px; margin: 20px 0; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.trio { display: grid; grid-template-columns: 1fr 72px 1fr; margin-top: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.trio button, .trio a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; background: none; border: 0; border-left: 1px solid var(--line-strong);
  font-size: 16px; cursor: pointer; color: var(--text); text-decoration: none; }
.trio > :first-child { border-left: 0; }
.trio button:hover, .trio a:hover { background: var(--section); }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 14px 0 22px; color: var(--text-light); }
.meta span { display: flex; align-items: center; gap: 4px; } .meta .end { margin-left: auto; }
.gallery .main { border-radius: var(--radius); border: 1px solid var(--line); background: var(--section); }
.gallery .thumbs button.on { border-color: var(--highlight); }
.no-photo { aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--muted); background: var(--section); border: 0; border-radius: var(--radius); }
.owner-bar { margin-top: 12px; }

@media (max-width: 900px) {
  main.detail { padding: 16px 16px 8px; }
  .post { grid-template-columns: 1fr; gap: 24px; }
  .post-info h1 { font-size: calc(var(--fs-title) * .85); }
}
@media (max-width: 767px) {
  h1.page-title { font-size: calc(var(--fs-page) * .72); margin: 20px 0 14px; }
  .sorts .tail { display: none; }
  .feed { gap: 20px; }
}
/* 詳細頁下面的分頁列：名字下面放數字（照 Printables） */
.ptabs { display: flex; margin-top: 40px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ptabs a, .ptabs span { flex: none; min-width: 110px; padding: 12px 22px; text-align: center; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-light); text-decoration: none; }
.ptabs b { display: block; font-size: 16px; font-weight: 700; } .ptabs small { display: block; font-size: 12px; min-height: 18px; }
.ptabs a.on { color: var(--title); border-bottom-color: var(--cta); }
.ptabs a:hover { color: var(--title); }
.ptabs + .post-section { border-top: 0; }
.used { display: flex; align-items: center; gap: 16px; color: var(--title); text-decoration: none; }
.used .mini { width: 96px; aspect-ratio: 1; border-radius: var(--radius); background: var(--section) center / cover; flex: none; }
.used b { display: block; font-size: 16px; } .used small { color: var(--text-light); font-size: 14px; }
@media (max-width: 767px) { .ptabs a, .ptabs span { min-width: 0; padding: 12px 14px; } }
main.page.profile { max-width: 1440px; padding: 32px 32px 16px; }
@media (max-width: 767px) { main.page.profile { padding: 20px 16px 8px; } }
/* 讚、收藏（log #117）：按過的實心＋主色 */
[data-like].on .i, [data-save].on .i { --icon-fill: currentColor; }
.stats [data-like].on .i, .stats [data-save].on .i { color: var(--cta-hover); }
.trio [data-like].on, .trio [data-save].on { color: var(--cta-hover); }
.trio.two { grid-template-columns: 1fr 1fr; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--title); color: #fff; padding: 10px 18px; border-radius: var(--radius);
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* 帳號選單（log #118） */
.acct-wrap { position: relative; }
.acct-menu { top: calc(100% + 4px); width: 220px; }
.acct-menu button { display: flex; gap: 12px; padding: 10px 16px; width: 100%; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; }
.acct-menu button:hover { background: var(--section); }
.acct-menu b { font-weight: 500; }
/* 原地登入小視窗（照 Printables：大標題、好處列表、登入方式） */
.login-backdrop { position: fixed; inset: 0; background: rgba(20, 14, 8, .5); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-backdrop[hidden] { display: none !important; }
.login-modal { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border-radius: var(--radius); }
.login-head { position: relative; padding: 20px 56px 16px; border-bottom: 1px solid var(--line); text-align: center; font-size: 22px; font-weight: 700; color: var(--title); line-height: 1.3; }
.login-head .x { position: absolute; right: 12px; top: 14px; background: none; border: 0; cursor: pointer; color: var(--text-light); padding: 4px; }
.login-body { padding: 20px 28px 24px; }
.login-sub { margin: 0; text-align: center; font-weight: 700; color: var(--title); font-size: 15px; }
.perk { display: grid; grid-template-columns: 50px 1fr; align-items: center; }
.perk .ring { width: 40px; height: 40px; border-radius: 50%; background: var(--section); display: grid; place-items: center; color: var(--cta-hover); }
.perk b { display: block; font-size: 15px; font-weight: 500; color: var(--title); } .perk p { margin: 2px 0 0; color: var(--text-light); font-size: 13px; }
.textbtn { background: none; border: 0; color: var(--text-light); cursor: pointer; justify-self: center; font-size: 14px; padding: 4px 8px; }
.textbtn:hover { color: var(--title); }
@media (max-width: 560px) { .login-body { padding: 16px 18px 20px; } .login-head { font-size: 19px; } }
