#players,#reports,#bans { min-width:0; }
.case-layout { grid-template-columns:minmax(275px,.75fr) minmax(0,1.55fr); }
#players:has(#profile:not([hidden])) { display:grid; grid-template-columns:minmax(250px,.75fr) minmax(0,1.55fr); gap:12px; align-items:start; }
#players:has(#profile:not([hidden])) #findPlayers { grid-column:1/-1; margin:0; }
#players #profile { margin:0; }
#playerList,#reportList,#banList,.record-detail { min-width:0; overflow:hidden; }
.record-detail { display:grid; padding:0; gap:0; }
.record-detail:focus { outline-offset:3px; }
.record-list-title,.record-filter,.record-link,.record-link-head,.record-sub,.record-head,.record-tools,.target-head,.case-gallery figcaption {
  display:flex;align-items:center;
}
.record-list-title,.record-filter { padding:11px 13px; gap:8px; background:var(--raised); border-bottom:1px solid var(--line); }
.record-list-title { justify-content:space-between;font-size:15px; }
.record-filter { flex-wrap:wrap; }
.record-search { position:relative; flex:1; min-width:112px; }
.record-search>.icon { position:absolute; width:15px; left:9px; top:50%; transform:translateY(-50%); color:var(--faint); }
.record-search input { width:100%; min-width:0; padding-left:31px; }
.record-filter select { max-width:150px; }
.record-filter input,.record-filter select { height:34px; font-size:12px; }
.record-count { min-width:24px; padding:2px 6px; text-align:center; border:1px solid var(--line); border-radius:5px; color:var(--muted); font:12px/1.5 var(--mono); }
.record-items { min-width:0; }
.record-link {
  gap:12px; width:100%; justify-content:space-between; text-align:left; padding:11px 13px;
  border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent;
}
.record-link:last-child { border-bottom:0; }
.record-link:hover,.record-link[aria-current=true] { background:var(--raised); }
.record-link[aria-current=true] { box-shadow:inset 3px 0 var(--accent); }
.record-link:focus-visible { outline-offset:-3px; }
.record-link>.icon { color:var(--faint); width:15px; }
.record-link-text { min-width:0; flex:1; }
.record-link-head { gap:7px; justify-content:space-between; min-width:0; margin-bottom:3px; }
.record-link-head>strong { min-width:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; font-size:13px; }
.record-sub { flex-wrap:wrap; gap:2px 11px; min-width:0; }
.record-sub,#banContext,.record-muted,.record-id,.record-empty { color:var(--muted);font-size:12px; }
.record-sub span,.record-id,.record-muted { overflow-wrap:anywhere; }
.record-sub time,.target-distance,.case-gallery time { color:var(--faint); font:11px/1.5 var(--mono); }
.identifier { font:11px/1.5 var(--mono); }
.status-tag { flex:none; display:inline-block; padding:2px 7px; border:1px solid var(--line); border-radius:10px; color:var(--muted); font-size:11px; font-weight:650; white-space:nowrap; }
.status-tag.open { background:#283846; border-color:#4a6378; color:#c6e3fa; }
.status-tag.review { background:#463a24; border-color:#76613b; color:var(--accent); }
.status-tag.closed,.status-tag.revoked { background:#263b36; border-color:#496357; color:#a5dbc2; }
.status-tag.active { background:#472e2c; border-color:#77504c; color:#ffb6a7; }
.record-top { display:grid; gap:9px; padding:18px 20px; border-top:3px solid var(--accent); background:linear-gradient(110deg,#24313a,var(--panel) 82%); }
.record-head { align-items:flex-start; justify-content:space-between;gap:10px; }
.record-head h2 { margin:0;font-size:clamp(19px,2vw,25px);line-height:1.2; letter-spacing:-.035em; overflow-wrap:anywhere; }
.case-summary,.ban-reason,.case-change>p { white-space:pre-wrap;overflow-wrap:anywhere; }
.case-summary { font-size:14px; }
.record-tools { flex-wrap:wrap;gap:6px;margin-top:3px; }
.record-tools button { font-size:12px; }
.record-empty { padding:14px; }
.record-top .case-back { justify-self:start;min-height:22px;padding:0;border:0;background:transparent;color:var(--muted);font-size:11px; }
.record-top .case-back:hover { color:var(--ink);text-decoration:underline; }
.profile-tabs { display:flex;gap:4px;flex-wrap:wrap;padding:6px 13px 0;border-top:1px solid var(--line);list-style:none; }
.profile-tabs button { font-size:12px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent; }
.profile-tabs button[aria-selected=true] { border-bottom-color:var(--accent);color:var(--accent); }
.case-section { min-width:0; padding:13px 18px; border-top:1px solid var(--line); }
.case-section h3 { margin:0 0 8px; font-size:14px; }
.record-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px; }
.record-facts>div { min-width:0; }
.record-facts dt,.record-field { color:var(--muted);font-size:12px; }
.record-facts dd { overflow-wrap:anywhere;font-size:13px; }
.record-facts time { font-variant-numeric:tabular-nums; }
.target-card,.ban-record { min-width:0; }
.target-card { padding:10px 12px; background:var(--deep);border:1px solid var(--line);border-radius:7px; }
.target-card+.target-card { margin-top:6px; }
.target-card>.record-muted { margin-top:3px; }
.target-head { gap:5px 9px;flex-wrap:wrap; }
.target-head strong,.target-name { overflow-wrap:anywhere; }
.target-head .target-distance,.ban-record .status-tag { margin-left:auto; }
.case-gallery { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(145px,100%),1fr));gap:8px;margin-top:8px; }
.case-gallery figure { display:grid; grid-template-rows:1fr auto;overflow:hidden; border:1px solid var(--line);border-radius:5px; background:#10171c; }
.case-gallery figure img { display:block;width:100%;height:clamp(105px,16vh,158px);object-fit:contain; }
.case-gallery figcaption { gap:3px 8px; justify-content:space-between;flex-wrap:wrap;padding:4px 8px; font-size:11px; border-top:1px solid var(--line); }
.case-edit { display:grid;align-items:end; grid-template-columns:minmax(122px,.62fr) minmax(0,1.4fr) auto;gap:8px; }
.record-field { display:grid;align-content:start;gap:4px; }
.record-field select,.record-field textarea { width:100%;min-width:0; }
.record-field textarea { min-height:40px;resize:vertical; }
.case-change+.case-change { border-top:1px solid var(--line);margin-top:7px;padding-top:7px; }
.case-change>p { margin-top:3px;font-size:13px; }
.record-session { padding:8px 0; }.record-session small { color:var(--muted); }
#banForm { display:grid; grid-template-columns:minmax(135px,1fr) minmax(140px,1.5fr) minmax(160px,.85fr) auto; padding:14px; }
#banForm h2,#banContext { grid-column:1/-1; }
#banForm h2 { font-size:16px; }
#banForm label,#banForm input,#banForm select { min-width:0;width:100%; }
.ban-record { padding:11px 14px; border-bottom:1px solid var(--line); }
.ban-record:last-child { border-bottom:0; }
.ban-reason { margin:3px 0; }
.ban-record>.record-tools { margin-top:7px; }
.case-section .ban-record { padding:7px 0; }
@media (max-width:920px){
  .case-layout,#players:has(#profile:not([hidden])) { grid-template-columns:minmax(0,1fr); }
  .case-layout:has(#case:not(:empty)) .record-items,#players:has(#profile:not([hidden])) #playerList .record-items { max-height:220px;overflow:auto; }
  .case-edit { grid-template-columns:minmax(0,1fr) minmax(0,2fr); }.case-edit>button { justify-self:start; }
  #banForm { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:550px){
  .record-filter,.record-link,.ban-record,.case-section,.record-top { padding:10px 11px; }
  .record-filter select { max-width:117px; }
  .case-edit { grid-template-columns:1fr; }
  .case-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .record-facts { gap:8px; }
  #banForm { padding:10px;grid-template-columns:1fr; }
}
.case-photo-zoom{width:100%;border:0;padding:0;border-radius:0;background:#131c24;cursor:zoom-in;position:relative}.case-photo-zoom:after{position:absolute;right:5px;bottom:5px;content:"⤢";font-size:16px;line-height:20px;width:20px;color:#fff;border-radius:3px;background:#13222ad9}
#casePhoto{border:1px solid #4b606b;border-radius:10px;background:var(--panel);color:var(--ink);padding:0;max-width:92vw}#casePhoto::backdrop{background:#060e17bf}#casePhoto .sheet-head{padding:9px 15px}#casePhoto h2{font-size:14px}#casePhotoImage{max-width:88vw;max-height:72vh;object-fit:contain;display:block;margin:auto}
