/* PUBLIC-DETAIL-R3-20261020: 条目详情（人设 / skill / 工具）的局部样式。

   逐条搬自 Claude r3 `demos/rooms/detail.css`（类名一律 h-dt- 前缀），只改三处：
   纹理路径改到本产品的 assets/（纸纹在 ../../assets/decor/，木料与绒布在
   ../house/）；r3 的「从列表进入」角标飞入动画在单文档壳里没有对应信号，
   去掉那段；`html[data-kind]` 改由视图容器上的 [data-kind] 提供
   （选择器本身不变）。色值仍只用 --pm-* / --h-* 变量与设计稿里的半透明黑，
   窄屏单列按 P-05 顺序重排（display: contents + order）。 */

/* ---------- 位置条：墙上的一行，左边面包屑，右边返回 ---------- */
.h-dt-crumb { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: var(--pm-s-6) 0 var(--pm-s-5); flex-wrap: wrap; }
.h-dt-crumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: var(--pm-fs-sm); color: var(--h-on-2); }
.h-dt-crumb a { color: var(--h-on-2); text-decoration: none; border-bottom: 1px solid rgb(222 210 186 / .35); }
.h-dt-crumb a:hover { color: var(--h-on); border-bottom-color: currentColor; }
.h-dt-crumb [aria-current] { color: var(--h-on); }
.h-dt-crumb .pm-diamond { background: #A8894F; }

/* ---------- 两栏：桌 | 纸 ---------- */
.h-dt-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--pm-s-7); align-items: start; padding-bottom: var(--pm-s-9); }
.h-dt-left { display: grid; gap: var(--pm-s-6); position: sticky; top: 24px; }
.h-dt-right { display: grid; gap: var(--pm-s-6); }

/* ---------- 桌面：胡桃木包边 + 衬布（按种类换衬布） ---------- */
.h-dt-desk { position: relative; padding: 16px; border-radius: 8px;
  background: linear-gradient(180deg, rgb(255 230 180 / .08), rgb(0 0 0 / .25)), url("../../assets/house/walnut.webp") 0 0 / 512px 512px, #2E2016;
  box-shadow: inset 0 1px 0 rgb(255 220 170 / .2), inset 0 0 0 1px rgb(0 0 0 / .45), var(--pm-light-x) 26px 40px -20px rgb(0 0 0 / .9); }
.h-dt-cloth { position: relative; min-height: 380px; border-radius: 3px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse 70% 55% at 30% 18%, rgb(var(--h-candle) / .22), transparent 70%), var(--cloth-img) 0 0 / 256px 256px, var(--cloth-c);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .55), inset 0 10px 30px rgb(0 0 0 / .55); }
[data-kind="persona"] .h-dt-cloth { --cloth-img: url("../../assets/house/velvet-green.webp"); --cloth-c: #1A3229; }
[data-kind="skill"]   .h-dt-cloth { --cloth-img: url("../../assets/decor/paper-night.webp"); --cloth-c: #EADFC6; min-height: 0; padding: 28px 24px 22px; place-items: stretch;
  box-shadow: inset 0 0 0 1px rgb(110 76 30 / .45), inset 0 0 40px rgb(110 76 30 / .3); }
[data-kind="tool"]    .h-dt-cloth { --cloth-img: url("../../assets/house/velvet-ink.webp"); --cloth-c: #1C2840; }
.h-dt-cloth__cap { position: absolute; left: 14px; bottom: 10px; font: 600 10px/1 var(--pm-font-sans); letter-spacing: .24em; color: rgb(242 234 218 / .7); }
[data-kind="skill"] .h-dt-cloth__cap { position: static; color: var(--h-accent-ink); margin-bottom: 6px; }

/* 人设：镜子平放（透视 38°），桌上有一道椭圆的影子；镜面映着灯 */
.h-dt-flat { position: relative; width: min(260px, 74%); transform: perspective(900px) rotateX(38deg) rotateZ(-4deg); transform-origin: 50% 70%;
  filter: drop-shadow(0 26px 18px rgb(0 0 0 / .7)); transition: transform 420ms var(--pm-ease-out); }
.h-dt-flat .h-mirror__frame { transform: none !important; }
.h-dt-flat .h-mirror__glass { background:
    radial-gradient(ellipse 22% 12% at 34% 26%, rgb(255 236 190 / .85), rgb(255 206 128 / .25) 60%, transparent 75%),   /* 头顶的灯映在镜里 */
    linear-gradient(115deg, transparent 22%, rgb(255 255 255 / .22) 30%, rgb(255 255 255 / .05) 38%, transparent 44%),
    radial-gradient(ellipse 70% 60% at 30% 22%, #C8D2CE, #8E9C98 45%, #4D5A58 85%, #36403F); }
.h-dt-flat .h-mirror__face { font-size: 4.2rem; }
.h-dt-cloth:hover .h-dt-flat { transform: perspective(900px) rotateX(30deg) rotateZ(-3deg) translateY(-6px); }

/* skill：印立在纸角，纸上是印痕；印痕下面是“印记账” */
.h-dt-sealset { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.h-dt-sealset .h-seal { width: 96px; height: 96px; transform: rotate(-8deg); }
.h-dt-sealset .h-seal__face { width: 56px; height: 56px; }
.h-dt-sealset .h-seal__face svg { width: 42px; height: 42px; }
.h-dt-impress { position: relative; width: 132px; height: 132px; justify-self: center; display: grid; place-items: center; color: #2A5248;
  border-radius: 50%; mix-blend-mode: multiply; opacity: .82; transform: rotate(6deg);
  background: radial-gradient(circle, transparent 0 58%, currentColor 59% 62%, transparent 63% 66%, currentColor 67% 70%, transparent 71%);
  -webkit-mask: radial-gradient(circle at 30% 70%, rgb(0 0 0 / .55), #000 60%); mask: radial-gradient(circle at 30% 70%, rgb(0 0 0 / .55), #000 60%); }   /* 印泥不匀：左下浅 */
.h-dt-impress svg { width: 66px; height: 66px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.h-dt-impress::after { content: attr(data-ver); position: absolute; bottom: 14px; font: 600 9px/1 var(--pm-font-mono); letter-spacing: .1em; }
.h-dt-ledger { margin-top: 18px; border-top: 1px solid rgb(110 76 30 / .35); }
.h-dt-ledger h2 { font: 600 1rem/1.3 var(--pm-font-serif); margin: 14px 0 8px; color: var(--pm-ink); }
.h-dt-ledger ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.h-dt-ledger li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 8px 0 8px; border-bottom: 1px dashed rgb(110 76 30 / .3); font-size: 14px; line-height: 1.55; }
.h-dt-ledger li svg { width: 18px; height: 18px; color: #2A5248; margin-top: 2px; }
.h-dt-ledger small { display: block; font: 12px/1.5 var(--pm-font-mono); color: var(--pm-ink-3); }
/* “新增”：一枚小方印（铜绿，不用红；红只给危险） */
.h-dt-new { display: inline-block; margin-left: 8px; padding: 1px 6px; border: 1.5px solid #2A5248; border-radius: 2px; color: #2A5248; font: 700 11px/1.4 var(--pm-font-sans); letter-spacing: .1em; transform: rotate(-3deg); vertical-align: 1px; }
/* 工具：绒垫 + 玻璃钟罩 */
.h-dt-dome { position: relative; width: 210px; height: 250px; display: grid; place-items: end center; padding-bottom: 46px; }
.h-dt-dome::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; bottom: 34px; border-radius: 100px 100px 6px 6px / 110px 110px 6px 6px;
  background: linear-gradient(100deg, rgb(220 240 245 / .05) 10%, rgb(255 255 255 / .28) 18%, rgb(220 240 245 / .06) 26%, transparent 60%, rgb(220 240 245 / .12) 88%),
              radial-gradient(ellipse 60% 30% at 50% 6%, rgb(255 255 255 / .22), transparent 70%);
  box-shadow: inset 0 0 0 1px rgb(220 240 245 / .35), inset 0 -10px 20px rgb(220 240 245 / .08); z-index: 2; pointer-events: none; }
.h-dt-dome::after { content: ""; position: absolute; left: 0; right: 0; bottom: 20px; height: 22px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #3A2A12, #1A120A 70%); box-shadow: 0 1px 0 #D3B474, 0 10px 14px rgb(0 0 0 / .65); }   /* 钟罩的铜底座 */
.h-dt-dome .h-object { z-index: 1; }
.h-dt-dome .h-object svg { width: 76px; height: 76px; }
.h-dt-perms { margin-top: 2px; padding: 16px 18px; border-radius: 3px; background: radial-gradient(ellipse 80% 70% at 20% 0%, rgb(var(--h-candle) / .2), transparent 70%), url("../../assets/decor/paper-night.webp") 0 0 / 512px 512px, var(--h-vellum); color: var(--pm-ink);
  box-shadow: inset 0 0 22px rgb(110 76 30 / .25), 2px 10px 16px -8px rgb(0 0 0 / .8); }
.h-dt-perms .h-dt-ledger { margin-top: 0; border-top: 0; }
.h-dt-perms .h-dt-ledger h2 { margin-top: 0; }

/* ---------- 入馆卡：象牙卡 + 铜角，写着它什么时候、由谁送来 ---------- */
.h-dt-acc { position: relative; padding: 20px 22px 20px; border-radius: 3px; color: var(--pm-ink);
  background: linear-gradient(180deg, #F4ECD7, #E8DCBF); box-shadow: inset 0 0 0 1px rgb(110 76 30 / .35), inset 0 0 0 4px #F4ECD7, inset 0 0 0 5px rgb(168 137 79 / .55), var(--pm-light-x) 18px 28px -14px rgb(0 0 0 / .85); }
.h-dt-acc__no { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid rgb(110 76 30 / .35); }
.h-dt-acc__no b { font: 600 .9375rem/1.3 var(--pm-font-serif); letter-spacing: .04em; }
.h-dt-acc__no span { font: 12px/1.4 var(--pm-font-mono); color: var(--pm-ink-2); }
.h-dt-acc .pm-dir { font-size: 14px; }
.h-dt-hash { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; font: 13px var(--pm-font-mono); color: var(--pm-ink-2); }
/* 条目没带校验值：「暂无」退一档，与 pm-dir 的 data-unknown 同口径 */
.h-dt-hash b[data-unknown] { color: var(--pm-ink-3); }
/* 复制成功后字暂时变成「已复制」：只换字换色，不挪位置 */
.h-dt-hash .pm-btn[data-copied], .h-dt-code .pm-btn[data-copied] { color: #2A5248; }
.h-dt-acc .pm-btn--primary { margin-top: 16px; }
.h-dt-acc__note { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--pm-ink-2); }
.h-dt-code { margin-top: 14px; padding: 10px 12px; border: 1px dashed rgb(110 76 30 / .55); border-radius: 3px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.h-dt-code b { font: 600 15px var(--pm-font-mono); letter-spacing: .14em; }
/* 真实条目没有安装口令：值与「版本 / 大小」同口径写「暂无」，字退一档 */
.h-dt-code b[data-unknown] { color: var(--pm-ink-3); letter-spacing: .04em; }
.h-dt-code span { display: block; font-size: 12px; color: var(--pm-ink-3); }

/* 入馆卡里的「复制」是 button，行内尺寸与 r3 的 a 一致 */
.h-dt-hash .pm-btn, .h-dt-code .pm-btn { flex: none; }

/* ---------- 右栏：羊皮纸。左上伸出一枚来源角标（WEB-M14） ---------- */
.h-dt-leaf { padding: 40px 40px 34px; }
.h-dt-leaf--head { padding-top: 44px; }
.h-dt-echo { position: absolute; left: -10px; top: -14px; z-index: 3; box-shadow: 0 0 0 3px #EADFC6, 2px 6px 10px -2px rgb(0 0 0 / .6); }
.h-dt-leaf h1 { font: 600 clamp(1.75rem, 1.2rem + 1.4vw, 2.375rem)/1.25 var(--pm-font-serif); margin: 0 0 10px; color: var(--pm-ink); overflow-wrap: anywhere; }
.h-dt-by { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: var(--pm-fs-sm); color: var(--pm-ink-2); }
.h-dt-by .pm-diamond { background: #A8894F; }
/* 「只是示例」小标：与目录卡上同一枚（class 同名），羊皮纸底上换成暗铜牌 */
.h-dt-by .h-sample-flag { display: inline-block; padding: 2px 7px 3px; border-radius: 2px; font: 600 11px/1.3 var(--pm-font-sans);
  letter-spacing: .08em; color: #F3E3B4; background: rgb(90 48 32 / .88); box-shadow: inset 0 0 0 1px rgb(211 180 116 / .5); white-space: nowrap; }
.h-dt-lede { margin: 16px 0 0; font: 1.0625rem/1.85 var(--pm-font-serif); color: var(--pm-ink-2); max-width: 34em; }
.h-dt-disclaim { margin: 18px 0 0; padding: 10px 12px; border-left: 3px solid #A8894F; background: rgb(168 137 79 / .08); font-size: 13px; line-height: 1.6; color: var(--pm-ink-2); }
.h-dt-sec + .h-dt-sec { margin-top: var(--pm-s-7); }
.h-dt-sec h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font: 600 1.1875rem/1.3 var(--pm-font-serif); color: var(--pm-ink); }
.h-dt-sec h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgb(168 137 79 / .6), transparent); }
.h-dt-body p { font: 1.0625rem/1.85 var(--pm-font-serif); margin: 0 0 .9em; max-width: 34em; overflow-wrap: anywhere; }
/* 人设正文：七个栏目，一张可复制的稿 */
.h-dt-sheet { position: relative; padding: 18px 20px; border-radius: 3px; background: #F6EFDE; box-shadow: inset 0 0 0 1px rgb(110 76 30 / .3), inset 0 2px 6px rgb(110 76 30 / .15); }
.h-dt-sheet dl { margin: 0; display: grid; grid-template-columns: 7em 1fr; gap: 8px 14px; font-size: 14.5px; line-height: 1.7; }
.h-dt-sheet dt { font-weight: 600; color: var(--h-accent-ink); }
.h-dt-sheet dd { margin: 0; }
.h-dt-sheet__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font: 12px var(--pm-font-mono); color: var(--pm-ink-3); }
/* 设置预览（C-030）与试拨（DEL10） */
.h-dt-set { display: grid; gap: 0; }
.h-dt-set__row { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; padding: 14px 0; border-top: 1px dashed rgb(110 76 30 / .3); }
.h-dt-set__label { font-weight: 600; }
.h-dt-set__desc { font-size: 13px; color: var(--pm-ink-2); line-height: 1.6; margin-top: 4px; }
.h-dt-set__tag { font: 12px/1.5 var(--pm-font-mono); color: var(--pm-ink-3); margin-top: 6px; }
.h-dt-set__tag[data-preview] { color: #2A5248; }
.h-dt-set__tag[data-preview]::before { content: "◆ "; }
.h-dt-num { display: flex; align-items: center; gap: 8px; }
.h-dt-num .pm-input { width: 120px; }
.h-dt-secret { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pm-ink-2); }
.h-dt-secret svg { width: 16px; height: 16px; flex: none; }
/* 镜中的其他脸 / 更早的映像 */
.h-dt-faces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.h-dt-face { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; text-decoration: none; color: var(--pm-ink); }
.h-dt-face .h-mirror__frame { width: 100%; max-width: 120px; padding: 7px; }
.h-dt-face .h-mirror__face { font-size: 1.9rem; }
.h-dt-face b { font: 600 14px/1.35 var(--pm-font-serif); }
.h-dt-face small { font-size: 12px; color: var(--pm-ink-3); }
.h-dt-face::after { content: ""; position: absolute; inset: 0; }
.h-dt-face:hover .h-mirror__frame { transform: rotate(-1.2deg); }
.h-dt-face:focus-visible { outline: none; } .h-dt-face:focus-visible .h-mirror__frame { box-shadow: 0 0 0 2px #1A1206, 0 0 0 4px #E8C878; }
.h-dt-echoes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.h-dt-echoes li { display: grid; grid-template-columns: 6.5em 7em 1fr; gap: 12px; padding: 10px 0; border-top: 1px dashed rgb(110 76 30 / .3); font-size: 14px; line-height: 1.6; }
.h-dt-echoes li:nth-child(2) { opacity: .82; } .h-dt-echoes li:nth-child(3) { opacity: .66; }   /* 越早的映像越淡：像镜子里更远的那一层 */
.h-dt-echoes b { font-family: var(--pm-font-mono); font-weight: 600; }
.h-dt-echoes span { font: 12.5px var(--pm-font-mono); color: var(--pm-ink-3); }

/* ---------- 窄屏：按 P-05 顺序重排 ---------- */
@media (max-width: 899px) {
  .h-dt-grid { grid-template-columns: 1fr; gap: var(--pm-s-5); }
  .h-dt-left, .h-dt-right { display: contents; }
  .h-dt-leaf--head { order: 1; } .h-dt-acc { order: 2; } .h-dt-desk { order: 3; } .h-dt-leaf--body { order: 4; }
  .h-dt-leaf { padding: 32px 22px 26px; }
  .h-dt-cloth { min-height: 280px; }
  .h-dt-set__row { grid-template-columns: 1fr; gap: 10px; }
  .h-dt-sheet dl { grid-template-columns: 1fr; gap: 2px; } .h-dt-sheet dd { margin-bottom: 8px; }
  .h-dt-faces { gap: 12px; }
  .h-dt-echoes li { grid-template-columns: 5.5em 1fr; } .h-dt-echoes li > span:last-child { grid-column: 1 / -1; }
  .h-dt-sealset { grid-template-columns: 1fr; justify-items: center; }
}
@media (prefers-reduced-motion: reduce) { .h-dt-flat { transition: none; } }

/* 修正：桌上的羊皮纸（skill 印痕纸）与入馆卡里，字一律用纸上的墨（body.h-house 默认是墙上的浅字） */
[data-kind="skill"] .h-dt-cloth, .h-dt-acc { color: var(--pm-ink); }
.h-dt-acc a:not(.pm-btn), .h-dt-cloth a:not(.pm-btn) { color: var(--pm-link); }
.h-vellum .h-dt-face { color: var(--pm-ink); }
