/* 墨園 mockup v0 — 老師目錄 / 老師個人頁 專用樣式
   疊在 style.css 之上，只用既有 token（宣紙／墨／朱印／淡墨／楷體），不另立色系。 */

/* ---------- 頭像 placeholder：墨色圓章＋姓氏 ---------- */
.t-avatar {
  --tone: var(--ink);
  width: 72px; height: 72px; flex: none; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.18), transparent 55%), var(--tone);
  color: #fbf8f2; font-family: var(--font-kai); font-size: 2rem; line-height: 1;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.12), 0 0 0 1px var(--line);
}
.t-avatar.lg { width: 132px; height: 132px; font-size: 3.6rem; }
.t-avatar.sm { width: 40px; height: 40px; font-size: 1.15rem; }
.t-avatar.tone-seal { --tone: var(--seal); }
.t-avatar.tone-jade { --tone: var(--jade); }
.t-avatar.tone-gold { --tone: var(--gold); }
.t-avatar.tone-soft { --tone: var(--ink-soft); }
.t-avatar .ph-note {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-ui); font-size: 10px; letter-spacing: .05em; white-space: nowrap;
  background: var(--paper-card); color: var(--ink-faint); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 6px; line-height: 1.6;
}

/* ---------- 目錄頁頂部 ---------- */
.t-intro {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
  margin-bottom: 32px;
}
@media (max-width: 860px) { .t-intro { grid-template-columns: minmax(0, 1fr); } }
.t-intro .lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 36em; margin: 0; }
.t-intro .eyebrow { font-family: var(--font-ui); font-size: 13px; letter-spacing: .3em; color: var(--seal); }
.t-summary { display: flex; gap: 0; font-family: var(--font-ui); }
.t-summary > div { padding: 4px 22px; border-left: 1px solid var(--line); text-align: center; }
.t-summary > div:first-child { border-left: 0; }
.t-summary b { display: block; font-family: var(--font-kai); font-weight: 400; font-size: 2rem; line-height: 1.2; color: var(--ink); }
.t-summary span { font-size: 12px; color: var(--ink-faint); letter-spacing: .08em; }

/* ---------- 老師卡 ---------- */
.t-card { display: flex; flex-direction: column; gap: 14px; padding: 26px 26px 22px; position: relative; transition: transform .15s ease, box-shadow .15s ease; }
.t-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(29,27,24,.12); }
.t-card .head { display: flex; gap: 18px; align-items: center; }
.t-card .name { font-family: var(--font-kai); font-size: 1.5rem; letter-spacing: .1em; line-height: 1.3; margin: 0; }
.t-card .name small { font-size: .95rem; color: var(--ink-faint); letter-spacing: .05em; margin-left: 4px; }
.t-card .hao { font-family: var(--font-ui); font-size: 12px; color: var(--ink-faint); letter-spacing: .08em; }
.t-card .bio { color: var(--ink-soft); font-size: 15.5px; line-height: 1.8; margin: 0; }
.t-card .sample {
  font-family: var(--font-kai); font-size: 1.05rem; color: var(--ink-faint); letter-spacing: .3em;
  border-top: 1px dashed var(--line); padding-top: 12px;
}
.t-card .sample b { color: var(--ink); font-weight: 400; font-size: 1.6rem; letter-spacing: .2em; margin-right: 6px; }
.t-card .foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-ui); font-size: 13px; color: var(--ink-faint);
  border-top: 1px solid var(--line); padding-top: 14px;
}
.t-card .foot .nums { display: flex; gap: 14px; }
.t-card .foot .nums b { color: var(--ink); font-weight: 600; }
.t-card .go { font-family: var(--font-ui); font-size: 14px; color: var(--seal); text-decoration: none; letter-spacing: .06em; font-weight: 600; }
.t-card .go::after { content: ""; position: absolute; inset: 0; } /* 整張卡可點 */
.t-card .go:hover { text-decoration: underline; }
.t-card .following {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; font-size: 12px;
}
.t-card.soon { opacity: .78; }

/* ---------- 個人頁 hero ---------- */
.t-hero {
  display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 36px; align-items: center;
  padding: 36px 40px; position: relative; overflow: hidden;
}
.t-hero::before { /* 右側淡墨暈 */
  content: ""; position: absolute; right: -120px; top: -80px; width: 460px; height: 360px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(29,27,24,.07), transparent 65%);
}
.t-hero > * { position: relative; }
@media (max-width: 900px) { .t-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 24px; } }
.t-hero .kicker { font-family: var(--font-ui); font-size: 12px; letter-spacing: .2em; color: var(--ink-faint); }
.t-hero .kicker a { color: var(--seal); text-decoration: none; }
.t-hero h1 { font-size: clamp(2rem, 3.4vw, 2.9rem); margin: 4px 0 6px; }
.t-hero h1 small { font-size: .5em; color: var(--ink-faint); letter-spacing: .1em; margin-left: 8px; }
.t-hero .motto { font-family: var(--font-kai); font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 14px; }
.t-hero .actions { display: flex; flex-direction: column; gap: 10px; min-width: 200px; }
.t-hero .actions .btn { justify-content: center; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.t-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
@media (max-width: 720px) { .t-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; } }
.t-stats > div { padding: 2px 18px; border-left: 1px solid var(--line); font-family: var(--font-ui); }
.t-stats > div:first-child { border-left: 0; padding-left: 0; }
.t-stats b { display: block; font-family: var(--font-kai); font-weight: 400; font-size: 1.7rem; line-height: 1.2; }
.t-stats span { font-size: 12px; color: var(--ink-faint); letter-spacing: .06em; }

/* ---------- 個人頁內容區 ---------- */
.t-section + .t-section { margin-top: 48px; }
.t-section > h2 { display: flex; align-items: baseline; gap: 14px; }
.t-section > h2 small { font-family: var(--font-ui); font-size: 13px; color: var(--ink-faint); letter-spacing: .06em; }
.t-section > h2 .spacer { flex: 1; }
.t-section > h2 a { font-family: var(--font-ui); font-size: 14px; letter-spacing: .04em; color: var(--seal); text-decoration: none; }
.t-section > h2 a:hover { text-decoration: underline; }

.scripts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 16px; }
.script-cell { text-align: center; }
.script-cell .grid-cell { margin-bottom: 8px; }
.script-cell .grid-cell .glyph { font-size: 3.6rem; }
.script-cell b { font-family: var(--font-kai); font-weight: 400; font-size: 1.1rem; display: block; }
.script-cell span { font-family: var(--font-ui); font-size: 12px; color: var(--ink-faint); }

.creed { border-left: 3px solid var(--seal); padding: 4px 0 4px 22px; margin: 0; }
.creed p { font-family: var(--font-kai); font-size: 1.25rem; line-height: 1.9; color: var(--ink); margin: 0 0 .6em; }
.creed footer { font-family: var(--font-ui); font-size: 13px; color: var(--ink-faint); }

.course.compact .cover { aspect-ratio: 2 / 1; font-size: clamp(2.4rem, 4vw, 3.4rem); }

.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.review-card { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; }
.review-card .stars { color: var(--seal); letter-spacing: .15em; font-size: 14px; }
.review-card blockquote { margin: 0; font-size: 15.5px; line-height: 1.85; color: var(--ink-soft); }
.review-card .by { display: flex; align-items: center; gap: 10px; font-family: var(--font-ui); font-size: 13px; color: var(--ink-faint); margin-top: auto; }
.review-card .by b { color: var(--ink); font-weight: 600; }
.rating-sum { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; font-family: var(--font-ui); }
.rating-sum .big { font-family: var(--font-kai); font-size: 3rem; line-height: 1; }
.rating-sum .bars { display: grid; gap: 4px; font-size: 12px; color: var(--ink-faint); min-width: 220px; }
.rating-sum .bars div { display: grid; grid-template-columns: 28px 1fr 32px; gap: 8px; align-items: center; }
.rating-sum .bars i { display: block; height: 4px; background: var(--paper-deep); border-radius: 2px; overflow: hidden; }
.rating-sum .bars i span { display: block; height: 100%; background: var(--seal); }

/* 側欄 */
.side-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.side-card dl { margin: 0; font-family: var(--font-ui); font-size: 14px; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; }
.side-card dt { color: var(--ink-faint); }
.side-card dd { margin: 0; }
.peers { list-style: none; margin: 0; padding: 0; }
.peers li + li { border-top: 1px dashed var(--line); }
.peers a { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; }
.peers a:hover b { text-decoration: underline; }
.peers b { font-family: var(--font-kai); font-weight: 400; font-size: 1.1rem; display: block; line-height: 1.3; }
.peers span { font-family: var(--font-ui); font-size: 12px; color: var(--ink-faint); }
.t-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: var(--paper); font-family: var(--font-ui); font-size: 14px;
  padding: 10px 20px; border-radius: 999px; box-shadow: var(--shadow); transition: opacity .2s ease, transform .2s ease;
  pointer-events: none; z-index: 50; max-width: calc(100vw - 32px);
}
.t-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.t-card[hidden] { display: none; }

/* ---------- RWD（桌面 >1024 不受影響） ---------- */
@media (max-width: 720px) {
  .t-section + .t-section { margin-top: 36px; }
  .t-section > h2 { flex-wrap: wrap; gap: 4px 12px; }
  .t-summary > div { padding: 4px 16px; }
  .t-hero .actions { min-width: 0; }
  .t-card { padding: 20px 18px 18px; }
  .rating-sum .bars { min-width: 0; flex: 1 1 200px; }
}
@media (max-width: 480px) {
  .t-avatar.lg { width: 104px; height: 104px; font-size: 2.8rem; }
  .t-card .head { gap: 14px; }
  .t-avatar { width: 60px; height: 60px; font-size: 1.7rem; }
}
