/* TEVIA Kimi 版 · 动态页样式 */

.social-page { padding-bottom: clamp(60px, 8vw, 110px); }

/* 人物资料头 */
.sp-profile {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 56px);
  padding-top: clamp(36px, 6vw, 72px); align-items: center;
}
.sp-avatar {
  display: block; width: clamp(120px, 16vw, 176px); height: clamp(120px, 16vw, 176px);
  border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line); outline: 5px solid var(--surface);
}
.sp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sp-name-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.sp-name-row h1 { font-family: var(--font-serif); font-size: clamp(34px, 5vw, 52px); }
.sp-name-sub { color: var(--muted); letter-spacing: .14em; font-size: 14px; }
.sp-stats { display: flex; gap: 26px; margin-block: 12px 14px; color: var(--muted); font-size: 14.5px; }
.sp-stats strong { color: var(--ink); font-family: var(--font-serif); font-size: 20px; margin-right: 4px; }
.sp-intro { max-width: 520px; }
.sp-tags { color: var(--faint); font-size: 13.5px; margin-top: 6px; letter-spacing: .06em; }
.sp-creator { margin-top: 10px; font-size: 14px; color: var(--muted); }
.sp-creator a { border-bottom: 1px dotted var(--ink); }
.sp-creator a:hover { color: var(--accent-deep); border-bottom-style: solid; }

/* 圆形栏目 */
.sp-highlights {
  display: flex; gap: clamp(18px, 4vw, 44px); padding-block: clamp(28px, 4vw, 44px);
  margin-top: 8px; border-top: 1px dotted var(--line); flex-wrap: wrap;
}
.hl-item { display: grid; justify-items: center; gap: 10px; font-size: 14px; }
.hl-ring {
  display: block; width: clamp(72px, 9vw, 96px); height: clamp(72px, 9vw, 96px);
  border-radius: 50%; padding: 4px; position: relative;
  border: 1.5px solid var(--line);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.hl-ring::after {
  content: ""; position: absolute; right: 2px; bottom: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--dot, var(--accent)); border: 2.5px solid var(--paper);
}
.hl-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.hl-item:hover .hl-ring { border-color: var(--ink); transform: translateY(-3px); }
.hl-item[aria-pressed="true"] .hl-ring { border-color: var(--ink); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--ink); }
.hl-label { letter-spacing: .04em; }

/* 工具栏与网格 */
.sg-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.sg-filters { display: flex; gap: 10px; }
.sg-filters button {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .25s var(--ease);
}
.sg-filters button:hover { border-color: var(--ink); }
.sg-filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sg-status { font-size: 13px; color: var(--faint); }
.sg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.sg-card { position: relative; }
.sg-card[hidden] { display: none; }
.sg-open { display: block; width: 100%; text-align: left; }
.sg-frame { display: block; position: relative; overflow: hidden; aspect-ratio: 1; background: var(--surface); }
.sg-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.sg-open:hover .sg-frame img, .sg-open:focus-visible .sg-frame img { transform: scale(1.045); }
.sg-badge {
  position: absolute; left: 10px; top: 10px;
  background: rgba(23, 20, 15, .72); color: var(--dark-ink);
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
}
.sg-badge svg { width: 13px; height: 13px; fill: currentColor; }
.sg-badge-alt { left: auto; right: 10px; width: auto; padding: 0 10px; border-radius: 999px; height: 24px; font-size: 12px; }
.sg-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 2px 10px; flex-wrap: wrap; margin-top: 10px; }
.sg-title { font-size: 14.5px; }
.sg-date { color: var(--faint); font-size: 12px; white-space: nowrap; }
.sg-like {
  position: absolute; right: 10px; bottom: 52px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(242, 239, 233, .94); border-radius: 999px; padding: 6px 13px;
  font-size: 13px; color: var(--ink);
  transition: transform .2s var(--ease), color .2s var(--ease);
}
.sg-like:hover { transform: scale(1.06); }
.sg-like:disabled { opacity: .6; cursor: wait; }
.sg-like[aria-pressed="true"] { color: var(--accent-deep); }
.sg-like[aria-pressed="true"] svg path { fill: currentColor; stroke: currentColor; }
.sg-empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* 详情对话框 */
.sp-dialog {
  border: 0; padding: 0; background: var(--paper); color: var(--ink);
  width: min(1060px, 94vw); max-width: 94vw; height: min(760px, 92vh); max-height: 92vh;
  margin: auto; overflow: hidden;
}
.sp-dialog::backdrop { background: rgba(23, 20, 15, .55); }
.sp-close {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(242, 239, 233, .94); display: grid; place-items: center; font-size: 17px;
  transition: transform .2s var(--ease);
}
.sp-close:hover { transform: scale(1.1); }
.sp-layout { display: grid; grid-template-columns: 1.35fr 1fr; height: 100%; }
.sp-media { background: var(--dark); position: relative; display: grid; }
.sp-stage { display: grid; place-items: center; min-height: 0; overflow: hidden; }
.sp-stage img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.sp-stage video { max-height: 100%; max-width: 100%; width: 100%; height: 100%; object-fit: contain; }
.sp-photo-nav[hidden] { display: none; }
.sp-photo-nav {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  background: rgba(23, 20, 15, .72); border-radius: 999px; padding: 6px 14px;
  color: var(--dark-ink); font-size: 13px;
}
.sp-photo-nav button { width: 32px; height: 32px; display: grid; place-items: center; color: var(--dark-ink); border-radius: 50%; }
.sp-photo-nav button:hover { background: rgba(239, 233, 221, .18); }
.sp-photo-nav button:disabled { opacity: .35; cursor: default; }
.sp-side { display: grid; grid-template-rows: auto 1fr auto auto; min-height: 0; }
.sp-author {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-bottom: 1px dotted var(--line);
}
.sp-author img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.sp-author > div { display: grid; line-height: 1.4; margin-right: auto; }
.sp-author > div span { font-size: 12px; color: var(--faint); }
.sp-author .text-link { font-size: 13px; }
.sp-scroll { overflow-y: auto; padding: 18px 20px; min-height: 0; }
.sp-caption p { margin-bottom: 10px; font-size: 14.5px; line-height: 1.95; }
.sp-credit { font-size: 12px; color: var(--faint); margin-block: 14px 20px; line-height: 1.8; }
.sp-comments h3 { font-size: 13px; letter-spacing: .18em; color: var(--muted); margin-bottom: 12px; font-weight: 500; }
.sp-comment-status { font-size: 13px; color: var(--faint); margin-bottom: 10px; }
[data-comments-retry] { font-size: 13px; border-bottom: 1px dotted var(--ink); margin-bottom: 10px; }
.sp-comment { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding-block: 10px; border-top: 1px dotted var(--line); }
.sp-comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: 14px;
}
.sp-comment-text { font-size: 14px; line-height: 1.8; word-break: break-word; }
.sp-comment-text strong { margin-right: 8px; }
.sp-comment-meta { display: flex; gap: 14px; margin-top: 4px; font-size: 12px; color: var(--faint); }
.sp-comment-meta button { color: var(--accent-deep); font-size: 12px; border-bottom: 1px dotted currentColor; }
.sp-interact { border-top: 1px dotted var(--line); padding: 10px 20px 6px; }
.sp-actions { display: flex; gap: 6px; }
.sp-act {
  width: 42px; height: 42px; display: grid; place-items: center; font-size: 21px;
  border-radius: 50%; transition: background .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}
.sp-act:hover { background: var(--surface); transform: scale(1.08); }
.sp-act:disabled { opacity: .55; cursor: wait; }
.sp-act[aria-pressed="true"] { color: var(--accent-deep); }
.sp-act[aria-pressed="true"] svg path { fill: currentColor; stroke: currentColor; }
.sp-like-total { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sp-date { font-size: 12px; color: var(--faint); display: block; margin-bottom: 6px; }
.sp-form {
  display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: end;
  padding: 12px 20px 16px; border-top: 1px dotted var(--line);
}
.sp-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.sp-form input, .sp-form textarea {
  font: inherit; font-size: 14px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 6px 2px; border-radius: 0; resize: none;
}
.sp-form input:focus, .sp-form textarea:focus { outline: none; border-bottom-color: var(--ink); }
.sp-send {
  border: 1px solid var(--ink); border-radius: 999px; padding: 8px 20px; font-size: 14px;
  transition: all .25s var(--ease);
}
.sp-send:hover { background: var(--ink); color: var(--paper); }
.sp-send:disabled { opacity: .5; cursor: wait; }
.sp-form-status { grid-column: 1 / -1; font-size: 12.5px; color: var(--faint); min-height: 1em; }

@media (max-width: 860px) {
  .sp-layout { grid-template-columns: 1fr; grid-template-rows: minmax(240px, 44%) 1fr; }
  .sg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .sp-profile { grid-template-columns: 1fr; text-align: left; gap: 18px; }
  .sp-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; }
  .sp-form { grid-template-columns: 1fr auto; }
  .sp-name { display: none; }
  .sp-form::before {
    content: ""; display: none;
  }
  .sp-form { grid-template-columns: 1fr auto; }
  .sg-like { bottom: 58px; }
}
@media (max-width: 340px) {
  .sg-grid { grid-template-columns: 1fr; }
}
