/* R194 厉鬼图鉴详情——与 App 的 GhostDetailR194 同一套：大图（R195：点赞 / 收藏在大图右下角）、档案卡、帖子同款评论区与底部输入框
   R197：整块大图（图 + 底部暗带 + 等级光 + 名称）作为一个共享元素飞行，底部条与图片不再分离；等级光在大图底边前收尽 */
@view-transition { navigation: auto; }
:root { --gd-bg:#06070a; --gd-card:#17181f; --gd-card-2:#1e1f28; --gd-line:#333541; --gd-text:#f8f8fa; --gd-muted:#a6a8b5; --gd-dim:#6f7280; --gd-faint:#75717d; --gd-like:#ef8aa6; --gd-fav:#e9c77c; --gd-warn:#ff8e95; --gd-ease:cubic-bezier(.22,1,.36,1); --gd-spring:cubic-bezier(.3,1.45,.5,1); }
body { background:var(--gd-bg); }
.gd { max-width:760px; margin:0 auto; padding:2px 12px 180px; color:var(--gd-text); -webkit-tap-highlight-color:transparent; }
.gd button { font-family:inherit; }
.gd-missing { padding:90px 20px; text-align:center; color:var(--gd-muted); }
.gd-missing a { display:inline-block; margin-top:14px; padding:10px 22px; border-radius:20px; background:#fff; color:#111; font-weight:800; text-decoration:none; }

/* ---------- hero ---------- */
.gd-hero { position:relative; border-radius:28px; overflow:hidden; aspect-ratio:1 / 1.14; max-height:64vh; width:100%; background:#101116; isolation:isolate; view-transition-name:gh-hero; }
.gd-art { position:absolute; inset:0; display:block; }
.gd-img { width:100%; height:100%; object-fit:cover; display:block; -webkit-user-drag:none; user-select:none; pointer-events:none; }
.gd-shade { position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg, rgba(5,6,8,.35), rgba(5,6,8,0) 26%), linear-gradient(180deg, rgba(6,7,10,0) 40%, rgba(6,7,10,.65) 68%, rgba(6,7,10,.98)), linear-gradient(180deg, transparent 62%, color-mix(in srgb, var(--lv) 15%, transparent) 86%, transparent); box-shadow:inset 0 0 0 1px rgba(255,255,255,.08); border-radius:inherit; }
.gd-info { position:absolute; left:0; right:0; bottom:0; padding:0 20px 18px; pointer-events:none; animation:gdUp .6s var(--gd-ease) .12s both; }
/* like / favourite straight on the artwork (bottom-right, centred on the level row), no container */
.gd-corner { position:absolute; right:8px; bottom:8px; height:44px; display:flex; align-items:center; animation:gdUp .6s var(--gd-ease) .2s both; }
.gd-corner .gd-seg { flex:none; height:44px; padding:0 9px; gap:5px; color:rgba(255,255,255,.95); font-size:13.5px; border-radius:22px; text-shadow:0 1px 4px rgba(0,0,0,.5); }
.gd-corner .gd-seg svg { width:24px; height:24px; stroke-width:1.75; filter:drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
.gd-code { display:block; font-size:11px; font-weight:800; letter-spacing:.16em; color:rgba(255,255,255,.62); }
.gd-info h1 { margin:8px 0 0; font-size:30px; line-height:1.08; font-weight:900; color:#fff; letter-spacing:.01em; text-wrap:balance; }
.gd-tags { display:flex; align-items:center; gap:8px; margin-top:12px; }
.gd-badge { min-width:32px; height:24px; padding:0 9px; box-sizing:border-box; display:grid; place-items:center; border-radius:12px; font-style:normal; font-weight:900; font-size:12px; color:color-mix(in srgb, var(--lv) 65%, #fff); background:color-mix(in srgb, var(--lv) 24%, rgba(7,8,12,.6)); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--lv) 60%, transparent); }
.gd-src { height:24px; padding:0 10px; display:inline-flex; align-items:center; border-radius:12px; font-size:11.5px; font-weight:800; color:rgba(255,255,255,.82); background:rgba(255,255,255,.14); box-shadow:inset 0 0 0 1px rgba(255,255,255,.14); }
@keyframes gdUp { from { opacity:0; transform:translateY(16px); } }

/* ---------- body ---------- */
.gd-body { padding:4px 2px 0; animation:gdUp .62s var(--gd-ease) .18s both; }
.gd-seg { flex:1; height:100%; display:flex; align-items:center; justify-content:center; gap:7px; border:0; background:transparent; color:var(--gd-muted); font-weight:800; font-size:13.5px; cursor:pointer; border-radius:24px; transition:transform .4s var(--gd-spring), color .25s ease; }
.gd-seg:active { transform:scale(.94); transition-duration:.1s; }
.gd-seg svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; stroke-linecap:round; transition:fill .2s ease; }
.gd-seg.like.on { color:var(--gd-like); }
.gd-seg.fav.on { color:var(--gd-fav); }
.gd-seg.on svg { fill:currentColor; }
.gd-pop { animation:gdPop .46s ease both; }
.gd-dip { animation:gdDip .26s ease both; }
@keyframes gdPop { 0% { transform:scale(1); } 28% { transform:scale(1.34); } 58% { transform:scale(.9); } 100% { transform:scale(1); } }
@keyframes gdDip { 0% { transform:scale(1); } 45% { transform:scale(.84); } 100% { transform:scale(1); } }

.gd-up { display:flex; align-items:center; gap:10px; margin-top:12px; padding:10px 14px 10px 12px; border-radius:20px; background:var(--gd-card); box-shadow:inset 0 0 0 1px var(--gd-line); color:inherit; text-decoration:none; transition:transform .4s var(--gd-spring); }
.gd-up:active { transform:scale(.985); }
.gd-up .gd-meta { margin-top:3px; }
.gd-sec { position:relative; margin-top:10px; padding:14px 16px 16px; border-radius:22px; background:var(--gd-card); box-shadow:inset 0 0 0 1px var(--gd-line); }
.gd-sec:first-of-type { margin-top:12px; }
.gd-sec header { display:flex; align-items:center; gap:10px; }
.gd-sec header span { font-size:11px; font-weight:800; letter-spacing:.14em; color:var(--gd-faint); }
.gd-sec header strong { font-size:15px; font-weight:850; }
.gd-sec p { margin:10px 0 0; font-size:14.5px; line-height:1.62; color:rgba(244,241,244,.9); white-space:normal; word-break:break-word; }
.gd-sec.rule::before { content:""; position:absolute; left:0; top:18px; bottom:18px; width:3px; border-radius:2px; background:color-mix(in srgb, var(--lv) 85%, transparent); }
.gd-head { display:flex; align-items:baseline; gap:8px; margin:26px 4px 12px; }
.gd-head h2 { margin:0; font-size:17px; font-weight:850; }
.gd-head span { font-size:13px; font-weight:800; color:var(--gd-muted); }

/* ---------- comments (post-detail metrics) ---------- */
.gd-c { margin-bottom:10px; padding:13px 14px 4px; border-radius:20px; background:var(--gd-card); box-shadow:inset 0 0 0 1px var(--gd-line); cursor:pointer; transition:transform .5s var(--gd-spring), background .3s ease; -webkit-user-select:none; user-select:none; }
.gd-c.rise, .gd-k.rise { animation:gdUp .46s var(--gd-ease) both; animation-delay:calc(var(--d, 0) * 40ms); }
.gd-c.flash { animation:gdFlash .7s ease both; }
@keyframes gdFlash { 25% { transform:scale(1.012); background:var(--gd-card-2); } }
.gd-c.leave, .gd-k.leave { animation:gdLeave .32s ease both; overflow:hidden; }
@keyframes gdLeave { to { opacity:0; transform:scale(.98); } }
.gd-row { display:flex; align-items:center; gap:9px; }
.gd-who { flex:1; min-width:0; }
.gd-name { display:flex; align-items:center; gap:6px; min-width:0; }
.gd-nm { font-size:13.5px; font-weight:800; color:var(--gd-text); text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:60%; }
.gd-k .gd-nm { font-size:13px; }
.gd-to { width:16px; height:16px; flex:none; fill:none; stroke:rgba(166,168,181,.72); stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.gd-meta { font-size:10px; color:var(--gd-muted); margin-top:2px; }
.gd-text { padding:11px 0 5px; font-size:14px; line-height:1.55; color:var(--gd-text); white-space:pre-wrap; word-break:break-word; -webkit-user-select:text; user-select:text; }
.gd-k .gd-text { padding:8px 0 0; }
.gd-acts { display:flex; align-items:center; min-height:40px; margin-top:2px; }
.gd-k .gd-acts { min-height:38px; margin-top:0; }
.gd-acts .sp { flex:1; }
.gd-reply { border:0; background:transparent; color:var(--gd-muted); font-size:12.5px; padding:0 16px 0 0; height:40px; cursor:pointer; }
.gd-act { display:inline-flex; align-items:center; gap:5px; min-width:44px; height:40px; padding:0 8px; border:0; background:transparent; color:var(--gd-muted); font-size:12.5px; cursor:pointer; }
.gd-act svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; transition:fill .2s ease; }
.gd-act.like.on { color:var(--gd-like); }
.gd-act.fav.on { color:var(--gd-fav); }
.gd-act.on svg { fill:currentColor; }
.gd-act:disabled { opacity:1; }

/* identity: avatar + frame, nickname colour, title chip */
.gd-av { position:relative; flex:none; width:38px; height:38px; display:block; }
.gd-k .gd-av { width:32px; height:32px; }
.gd-up .gd-av { width:32px; height:32px; }
.gd-av .a { width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; background:#2a2a2a; }
.gd-av .f { position:absolute; left:50%; top:50%; width:100%; height:100%; transform:translate(-50%, calc(-50% + var(--fy, 0px))) scale(var(--fs, 1.3)); pointer-events:none; object-fit:contain; }
.gd-tc { --f:#3d3529; --s:#dabf85; --x:#f1d9a4; flex:none; display:inline-flex; align-items:center; gap:.3em; height:1.75em; padding:0 .66em 0 .46em; border-radius:.7em; background:var(--f); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--s) 80%, transparent); color:var(--x); font-size:10.5px; font-weight:800; line-height:1; white-space:nowrap; letter-spacing:.04em; max-width:9em; overflow:hidden; text-overflow:ellipsis; }
.gd-tc i { font-style:normal; font-size:.8em; width:1em; text-align:center; }
.gd-tc.t-night { --f:#23283b; --s:#8ea3d3; --x:#d9e5ff; }
.gd-tc.t-gold { --f:#503022; --s:#edb65b; --x:#ffdf9b; }
.gd-tc.t-archive-seal { --f:#531222; --s:#f65572; --x:#ffe3ea; border-radius:.55em; }
.gd-tc.t-candle-watch { --f:#341d55; --s:#bb85ff; --x:#efe3ff; }
.gd-tc.t-golden-containment { --f:#392b12; --s:#f7ca5b; --x:#ffebaf; border-radius:1.1em; }

/* replies inside a comment: the block opens by animating its row track from 0fr to 1fr */
.gd-kids { display:grid; grid-template-rows:0fr; transition:grid-template-rows .36s var(--gd-ease), opacity .3s ease; opacity:0; }
.gd-kids.open { grid-template-rows:1fr; opacity:1; }
.gd-kids > div { min-height:0; overflow:hidden; }
.gd-k { padding-top:10px; cursor:pointer; }
.gd-toggle { display:flex; align-items:center; min-height:40px; }
.gd-toggle button { border:0; background:transparent; color:var(--gd-muted); font-size:12.5px; height:40px; cursor:pointer; display:inline-flex; align-items:center; gap:3px; padding:0 12px 0 0; }
.gd-toggle svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:transform .32s var(--gd-ease); }
.gd-toggle.up svg { transform:rotate(180deg); }
.gd-toggle .fold { margin-left:auto; padding:0 2px 0 12px; }
.gd-toggle[hidden], .gd-toggle .fold[hidden] { display:none; }

.gd-empty { display:flex; flex-direction:column; align-items:center; gap:10px; padding:30px 16px; color:var(--gd-muted); font-size:13px; cursor:pointer; animation:gdUp .4s var(--gd-ease) both; }
.gd-empty svg { width:30px; height:30px; fill:none; stroke:rgba(255,255,255,.32); stroke-width:1.4; stroke-linejoin:round; }
.gd-foot { height:56px; display:grid; place-items:center; }
.gd-spin, .gd-sendspin { width:20px; height:20px; border-radius:50%; border:2px solid rgba(255,255,255,.14); border-top-color:rgba(255,255,255,.7); animation:gdSpin .8s linear infinite; }
.gd-spin[hidden] { display:none; }
@keyframes gdSpin { to { transform:rotate(360deg); } }

/* ---------- composer (same as the post detail, without attachments) ---------- */
.gd-veil { position:fixed; left:0; right:0; bottom:0; height:calc(110px + env(safe-area-inset-bottom)); pointer-events:none; z-index:880; background:linear-gradient(180deg, rgba(6,7,10,0), rgba(6,7,10,.85) 55%, rgba(6,7,10,.96)); }
.gd-barwrap { position:fixed; left:0; right:0; bottom:calc(12px + env(safe-area-inset-bottom)); z-index:900; display:flex; justify-content:center; padding:0 10px; pointer-events:none; transform:translateY(calc(-1 * var(--kb, 0px))); transition:transform .18s ease; animation:gdBar .56s var(--gd-ease) .2s both; }
@keyframes gdBar { from { transform:translateY(120px); } }
.gd-bar { pointer-events:auto; width:100%; max-width:740px; display:flex; align-items:flex-end; gap:0; padding:7px 6px; box-sizing:border-box; border-radius:27px; background:rgba(17,18,24,.96); box-shadow:inset 0 0 0 1px var(--gd-line), 0 14px 34px rgba(0,0,0,.45); -webkit-backdrop-filter:blur(18px); backdrop-filter:blur(18px); }
.gd-bar.shake { animation:gdShake .36s ease; }
@keyframes gdShake { 20% { transform:translateX(-6px); } 45% { transform:translateX(5px); } 70% { transform:translateX(-3px); } }
.gd-x { flex:none; width:36px; height:48px; border:0; background:transparent; color:var(--gd-muted); display:grid; place-items:center; cursor:pointer; animation:gdIn .26s var(--gd-ease) both; }
.gd-x[hidden] { display:none; }
.gd-x svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
@keyframes gdIn { from { opacity:0; transform:scale(.6); } }
.gd-bar textarea { flex:1; min-width:0; min-height:48px; max-height:104px; padding:13px 8px 13px 12px; box-sizing:border-box; border:0; outline:0; resize:none; background:transparent; color:var(--gd-text); font:14px/22px inherit; font-family:inherit; overflow-y:auto; }
.gd-bar textarea::placeholder { color:var(--gd-dim); }
.gd-send { position:relative; flex:none; width:48px; height:48px; border:0; border-radius:50%; background:#fff; color:#000; display:grid; place-items:center; cursor:pointer; transition:transform .4s var(--gd-spring), opacity .16s ease; }
.gd-send:active { transform:scale(.88); transition-duration:.1s; }
.gd-send.idle { opacity:.5; }
.gd-send svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linejoin:round; stroke-linecap:round; }
.gd-sendspin { position:absolute; border-color:rgba(0,0,0,.15); border-top-color:#000; display:none; }
.gd-send.busy svg { display:none; }
.gd-send.busy .gd-sendspin { display:block; }

/* ---------- long-press sheet ---------- */
.gd-sheet { position:fixed; inset:0; z-index:3000; }
.gd-sheet .dim { position:absolute; inset:0; background:rgba(0,0,0,.55); opacity:0; transition:opacity .24s ease; }
.gd-sheet .panel { position:absolute; left:10px; right:10px; bottom:calc(12px + env(safe-area-inset-bottom)); max-width:740px; margin:0 auto; padding:8px; border-radius:26px; background:rgba(21,22,29,.98); box-shadow:inset 0 0 0 1px var(--gd-line), 0 24px 50px rgba(0,0,0,.55); transform:translateY(calc(100% + 40px)); transition:transform .42s var(--gd-spring); }
.gd-sheet.on .dim { opacity:1; }
.gd-sheet.on .panel { transform:none; }
.gd-sheet .pv { padding:8px 12px 10px; font-size:12.5px; color:var(--gd-muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.gd-sheet button { display:flex; align-items:center; gap:14px; width:100%; height:52px; padding:0 14px; border:0; border-radius:18px; background:transparent; color:var(--gd-text); font-size:15px; font-weight:800; cursor:pointer; transition:background .16s ease; }
.gd-sheet button:hover { background:rgba(255,255,255,.05); }
.gd-sheet button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.gd-sheet button.warn { color:var(--gd-warn); }
.gd-sheet button.warn.armed { background:rgba(255,92,102,.15); box-shadow:inset 0 0 0 1px rgba(255,92,102,.25); }

::view-transition-group(gh-hero) { animation-duration:.56s; animation-timing-function:cubic-bezier(.22,1,.36,1); border-radius:28px; overflow:hidden; }
/* card and hero have different proportions: both snapshots stay pinned to the bottom-left, where the name and the dark floor live */
::view-transition-old(gh-hero), ::view-transition-new(gh-hero) { width:100%; height:100%; object-fit:cover; object-position:0 100%; overflow:hidden; }
::view-transition-old(gh-hero) { animation:gdVtOut .3s ease both; }
::view-transition-new(gh-hero) { animation:gdVtIn .42s ease .06s both; }
@keyframes gdVtOut { to { opacity:0; } }
@keyframes gdVtIn { from { opacity:0; } }
/* arriving through the shared-element flight: the name and corner are already part of the flying picture */
.vt .gd-info, .vt .gd-corner { animation:none; }

@media (min-width:760px) { .gd { padding-top:10px; } .gd-info h1 { font-size:36px; } }
@media (prefers-reduced-motion:reduce) {
  .gd *, .gd-barwrap, .gd-sheet * { animation-duration:.01ms !important; transition-duration:.01ms !important; }
  @view-transition { navigation: none; }
}
