/* ui-v3 · 03 資料 */
.dat { height: 100%; display: grid; grid-template-columns: 252px 300px minmax(0, 1fr); }
.dat-cats, .dat-list, .dat-doc { height: 100%; min-height: 0; overflow-y: auto; }
.dat-cats { display: flex; flex-direction: column; gap: 10px; padding: 18px 14px 24px 22px; border-right: 1px solid var(--line); }
.dat-cats > * { flex-shrink: 0; }
.dcats { display: flex; flex-direction: column; gap: 2px; }
.dcat { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r2); font-size: 13px; color: var(--fg2); text-align: left; transition: background var(--t1), color var(--t1); }
.dcat:hover { background: var(--s3); color: var(--fg); }
.dcat.on { background: var(--sig-a); color: var(--fg); box-shadow: inset 2px 0 0 var(--sig); }
.dcat .mono { font-size: 10.5px; }
.dcat-o { min-width: 18px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--warn); color: #1a1406; font-size: 10px; text-align: center; line-height: 16px; }
.dat-ovr { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 16px; }
.dat-ovr p { font-size: 11.5px; line-height: 1.6; }

.dat-list { display: flex; flex-direction: column; border-right: 1px solid var(--line); overflow: hidden; }
.dat-list .search { margin: 14px 12px 8px; flex-shrink: 0; }
.dlis { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 8px 24px; }
.dli { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 4px 8px; border-radius: var(--r2); font-size: 12.5px; color: var(--fg2); text-align: left; transition: background var(--t1), color var(--t1); }
.dli:hover { background: var(--s3); color: var(--fg); }
.dli.on { background: var(--sig-a); color: var(--fg); box-shadow: inset 2px 0 0 var(--sig); }
.dli-ico { width: 26px; height: 26px; flex-shrink: 0; border-radius: var(--r1); overflow: hidden; background: var(--s3); }
.dli-ico img { width: 100%; height: 100%; object-fit: cover; }
.dli-mod { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); flex-shrink: 0; }

.dat-doc { display: flex; flex-direction: column; padding: 0 28px 40px; container-type: inline-size; }
.dat-doc > * { flex-shrink: 0; }
.doc-hd { display: flex; align-items: center; gap: 14px; padding: 22px 0 14px; border-bottom: 1px solid var(--line); }
.doc-ico { width: 52px; height: 52px; border-radius: var(--r2); overflow: hidden; background: var(--s3); box-shadow: 0 0 0 1px var(--line2); flex-shrink: 0; }
.doc-ico img { width: 100%; height: 100%; object-fit: cover; }
.doc-hd h2 { font-size: 26px; font-weight: 900; line-height: 1.2; letter-spacing: .02em; margin-top: 2px; }
.doc-tabs { padding: 14px 0 4px; }
.doc-body { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; animation: fadeIn 220ms var(--ease) backwards; }
.doc-body > * { flex-shrink: 0; }
.doc-src { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; padding-right: 6px; }
.dt { display: flex; flex-direction: column; }
.dt-h, .dt-r { display: grid; grid-template-columns: minmax(140px, 1.4fr) minmax(90px, 1fr) minmax(90px, 1fr); gap: 10px; align-items: center; padding: 5px 0; }
.dt-r.four, .dt-h:has(+ .dt-r.four) { grid-template-columns: minmax(140px, 1.4fr) 100px minmax(100px, 1fr) 110px; }
.dt-h { border-bottom: 1px solid var(--line2); }
.dt-r { border-bottom: 1px solid var(--line); font-size: 12.5px; }
.dt.diff .dt-r .mono { font-size: 11.5px; overflow-wrap: anywhere; }
.doc-buffs { display: flex; flex-direction: column; gap: 10px; }
.bcard { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; }
.bcard-hd { display: flex; align-items: center; gap: 8px; }
.bcard-hd b { font-size: 14px; }
.bcard-k { font-size: 10.5px; }
.bcard-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.bcard-cond { font-size: 11.5px; padding-bottom: 6px; }
.mods { display: flex; flex-direction: column; overflow-x: auto; }
.mods-h, .mods-r { display: grid; grid-template-columns: minmax(150px, 1.6fr) minmax(70px, .8fr) minmax(70px, .8fr) repeat(var(--n), minmax(80px, 96px)); gap: 6px; align-items: center; padding: 4px 0; min-width: 560px; }
.mods-h { border-bottom: 1px solid var(--line2); }
.mods-r { border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mods-k { display: flex; flex-direction: column; }
.mods-k small { font-size: 10.5px; }
.trg { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mvt { display: flex; flex-direction: column; overflow-x: auto; }
.mvt-h, .mvt-r { display: grid; grid-template-columns: 80px minmax(140px, 1.5fr) 80px 104px minmax(100px, 1fr) minmax(110px, 1fr); gap: 8px; align-items: center; padding: 5px 0; min-width: 720px; }
.mvt-h { border-bottom: 1px solid var(--line2); }
.mvt-r { border-bottom: 1px solid var(--line); font-size: 12px; }
.mvt-r .mono { font-size: 10.5px; }
.gt { display: flex; flex-direction: column; overflow-x: auto; }
.gt-h, .gt-r { display: grid; grid-template-columns: minmax(170px, 1.6fr) repeat(var(--n), minmax(var(--cw), 1fr)); gap: 6px; align-items: center; padding: 4px 0; min-width: calc(180px + var(--n) * var(--cw)); }
.gt-h { border-bottom: 1px solid var(--line2); }
.gt-r { border-bottom: 1px solid var(--line); font-size: 12px; }
.gt-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg2); }
textarea.json { min-height: 520px; font-size: 12px; line-height: 1.6; tab-size: 2; }

@media (max-width: 1180px) { .dat { grid-template-columns: 220px 260px minmax(0, 1fr); } .dat-doc { padding: 0 18px 32px; } }
@media (max-width: 900px) {
  body:has(.dat) { overflow: auto; }
  .app:has(.dat) { height: auto; }
  .dat { display: flex; flex-direction: column; height: auto; }
  .dat-cats, .dat-list, .dat-doc { height: auto; overflow: visible; }
  .dat-list { max-height: 50vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .dat-cats { border-right: 0; border-bottom: 1px solid var(--line); }
}
.saved { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--up); animation: savedIn 2.8s var(--ease) both; white-space: nowrap; }
.saved svg { width: 14px; height: 14px; }
.saved kbd { margin-left: 4px; color: var(--dim); border: 1px solid var(--line2); border-radius: 3px; padding: 0 4px; }
@keyframes savedIn { 0% { opacity: 0; transform: translateY(4px); } 8% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: .55; } }

/* 排版隔離 */
@media (min-width: 901px) { .dat-cats, .dat-list, .dat-doc { contain: strict; } }
