/* 角色頁專用，沿用 app.css 的主題變數與 3px 圓角。 */
/* 本人 11-19「角色頁不要上下滑動」「選角畫面不要上下滑動 其他照舊」：只收間距（卡片上下、小檔案內距與欄距、
   台詞列留兩行），圖、版面、按鍵都不動；手機 375×667 與 518×690 的面板一頁放得下。 */
.role-card { padding-top: 14px; padding-bottom: 14px; }
.role-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.role-test-chip { color: var(--accent); }
.role-card .role-stage { gap: 0; margin: 12px -10px 0; }
.role-card .role-arrow { width: 32px; min-height: 44px; padding: 10px 0; }
.role-card .role-arrow:disabled { opacity: 0.25; cursor: default; }
.role-overview {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.role-portrait { min-width: 0; text-align: center; }
/* 還不能預覽的自訂格只剩一個大＋，蓋滿整個框（本人 11-19「自訂和尚未完成都刪除 只留大大的+」）。
   框的大小不變：左欄的圖高、右欄的疊放都還佔著位置。黑色＝§4「新增用黑色＋」。 */
.role-overview { position: relative; }
.role-plus { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); pointer-events: none; }
.role-plus svg { width: clamp(112px, 34vw, 200px); height: auto; aspect-ratio: 1; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; }
.role-interact {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: none;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}
.role-interact:focus-visible,
.role-card .role-arrow:focus-visible,
.role-card .role-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.role-card .role-art { width: 100%; height: clamp(180px, 27vw, 320px); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.role-interact:active .role-art { transform: scale(0.97); }
.role-pose-caption { display: grid; gap: 5px; font-size: 11px; line-height: 1.5; }
.role-pose-label { color: var(--ink); font-size: 12px; }
/* 本人 11-19「角色框固定一樣大小」：右欄檔案與下方按鍵都把每一格的版本疊在同一格
   （roles.js :: stackOf），大小＝最大那份；別格的只佔位、看不見。 */
.role-stack { display: grid; min-width: 0; }
.role-stack > * { grid-area: 1 / 1; align-self: start; min-width: 0; }
.role-ghost { visibility: hidden; }
.role-profile { min-width: 0; padding: 4px 0; overflow-wrap: anywhere; }
.role-profile-heading { color: var(--muted); font-size: 11px; margin: 0 0 6px; }
.role-profile-name { font-size: clamp(18px, 2vw, 24px); line-height: 1.3; font-weight: 600; margin: 0; }
.role-facts { display: grid; gap: 10px; margin: 12px 0 0; }
.role-facts dt { color: var(--muted); font-size: 12px; line-height: 1.4; }
.role-facts dd { font-size: 13px; line-height: 1.65; margin: 4px 0 0; }
.role-trait { display: block; }
/* 台詞列固定留兩行高（含上框線與 12px 內距），換姿勢、換角色時下面的按鍵不會跟著跳。 */
.role-card .role-speech { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; min-height: calc(13px + 3.2em); line-height: 1.6; }
.role-speech-empty > * { visibility: hidden; }

@media (min-width: 700px) {
  .role-card { padding: 28px; }
  .role-card .role-stage { margin-top: 28px; }
  .role-overview { gap: 32px; }
  .role-profile-heading, .role-facts dt { font-size: 14px; }
  .role-facts dd, .role-card .role-speech { font-size: 16px; }
  .role-facts { gap: 20px; margin-top: 24px; }
  .role-card .role-speech { margin-top: 32px; }
}
