.stats-dialog{margin:auto;width:min(780px,calc(100% - 28px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #728574;border-radius:18px;color:#e4ecdd;background:linear-gradient(145deg,#23382f,#101c19 60%);box-shadow:0 24px 90px #0009;font-family:Tahoma,sans-serif;overflow:hidden}.stats-dialog::backdrop{background:#020b08b0;backdrop-filter:blur(5px)}.stats-dialog[open]{display:flex;flex-direction:column}.stats-dialog header{display:flex;justify-content:space-between;align-items:center;padding:22px 26px;border-bottom:1px solid #ffffff16}.stats-dialog header small,.stats-identity small{font-size:9px;letter-spacing:2px;color:#a3bea8}.stats-dialog h1{font-size:21px;margin:7px 0 0}.stats-dialog header button{width:44px;height:44px;border-radius:50%;background:#ffffff0d;color:#dce8d9;font-size:26px}.stats-dialog button:focus-visible{outline:2px solid #e5c785;outline-offset:3px}.stats-body{padding:22px 26px;overflow:auto;overscroll-behavior:contain}.stats-identity{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:12px}.stats-identity h2{font-size:24px;margin:6px 0;overflow-wrap:anywhere}.stats-identity>span{border:1px solid #c5ab7055;background:#c5ab7010;padding:9px 14px;border-radius:30px;color:#e5c785;white-space:nowrap}.stats-core{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.stats-core article{padding:16px 12px;border:1px solid #ffffff14;border-radius:12px;background:#ffffff05;display:grid;gap:10px}.stats-core article>span{font-size:24px;color:#d8c18c}.stats-core small{color:#abbcaf;font-size:11px}.stats-core strong{font-size:18px;overflow-wrap:anywhere}.stats-columns{display:grid;grid-template-columns:1fr 1fr;gap:0 24px;min-width:0}.stats-dialog section{min-width:0}.stats-dialog h3{font-size:13px;color:#e1c58c;margin:25px 0 12px}.survivor-stat-row{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid #ffffff0b;font-size:11px;line-height:1.6}.survivor-stat-row span{color:#adbdaf}.survivor-stat-row strong{text-align:right;font-weight:500}.stats-note,.stats-equipped p{font-size:10px;line-height:1.9;color:#91a69b;margin:8px 0}.stats-warning{padding:12px;border-radius:8px;background:#d69c6c12;color:#e2b491;font-size:11px;line-height:1.8}.stats-equipped{padding:13px 15px;background:#ffffff04;border:1px solid #ffffff10;border-radius:9px;margin:5px 0}.stats-equipped b{font-size:11px;font-weight:500}.stats-equipped p.stats-active{color:#a5d5a8}.stats-dialog footer{display:flex;justify-content:space-between;padding:15px 26px;border-top:1px solid #ffffff16;color:#91a69b;font-size:10px}.stats-dialog footer span{color:#d0bd8c}@media(max-width:600px){.stats-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 24px);border-radius:14px}.stats-dialog header,.stats-body{padding:18px}.stats-core{grid-template-columns:1fr 1fr}.stats-columns{grid-template-columns:1fr}.stats-core strong{font-size:17px}.stats-dialog footer{padding:14px 18px}}

.player-equipment-dialog .stats-equipped>div{display:flex;align-items:center;gap:12px;margin:10px 0}.player-equipment-dialog .stats-equipped b{font-size:14px;line-height:1.6;overflow-wrap:anywhere}.player-equipment-dialog .stats-equipped>small{font-size:12px;letter-spacing:0}.player-equipment-dialog .stats-equipped p{font-size:12px}.player-equipment-dialog .item-image{flex-shrink:0}

/* Keep the character window readable at desktop and tablet viewing distance.
   The body owns scrolling so the title and close control stay reachable. */
@media (min-width: 700px) and (min-height: 600px) and (pointer: coarse) {
  dialog.stats-dialog { width: min(1180px, calc(100% - 48px)); }
  .stats-dialog > header, .stats-dialog > footer { flex-shrink: 0; }
  .stats-dialog > .stats-body { min-height: 0; padding: 28px 32px; }
  .stats-dialog h1 { font-size: 28px; }
  .stats-dialog header small, .stats-dialog .stats-identity small { font-size: 12px; letter-spacing: 1px; }
  .stats-dialog .stats-identity h2 { font-size: 30px; }
  .stats-dialog .stats-core { gap: 16px; }
  .stats-dialog .stats-core article { padding: 20px 16px; }
  .stats-dialog .stats-core small { font-size: 15px; }
  .stats-dialog .stats-core strong { font-size: 26px; }
  .stats-dialog .stats-columns { gap: 0 32px; }
  .stats-dialog h3 { font-size: 19px; }
  .stats-dialog .survivor-stat-row { font-size: 16px; gap: 16px; overflow-wrap: anywhere; }
  .stats-dialog :is(.stats-note, .stats-equipped p, .stats-warning) { font-size: 14px; }
  .stats-dialog .stats-equipped b { font-size: 16px; }
  .stats-dialog > footer { font-size: 13px; }
  /* The current Stats shortcut opens this native notebook destination. */
  #game-shell .survivor-upgrade-layer .survivor-panel {
    width: min(1200px, 100%);
    height: min(900px, calc(100% - 16px));
  }
  #game-shell .survivor-upgrade-layer .su-content { padding: 20px 24px; }
  #game-shell .survivor-upgrade-layer .su-header h2 { font-size: 24px; }
  #game-shell .survivor-upgrade-layer .su-header-name { font-size: 15px !important; }
  #game-shell .survivor-upgrade-layer .su-tabs button,
  #game-shell .survivor-upgrade-layer .su-character-tabs button { font-size: 16px; min-height: 52px; }
  #game-shell .survivor-upgrade-layer .su-character-stats .stats-identity h2 { font-size: 28px; }
  #game-shell .survivor-upgrade-layer .su-character-stats .stats-identity small { font-size: 12px; letter-spacing: 1px; }
  #game-shell .survivor-upgrade-layer .su-character-stats .stats-core small { font-size: 15px; }
  #game-shell .survivor-upgrade-layer .su-character-stats .stats-core strong { font-size: 26px; }
  #game-shell .survivor-upgrade-layer .su-character-stats h3 { font-size: 19px; }
  #game-shell .survivor-upgrade-layer .su-character-stats .survivor-stat-row { font-size: 16px; overflow-wrap: anywhere; }
  #game-shell .survivor-upgrade-layer .su-character-stats :is(.stats-note, .stats-equipped p, .stats-warning) { font-size: 14px; }
  #game-shell .survivor-upgrade-layer .su-character-stats .stats-equipped b { font-size: 16px; }
}
@media (min-width: 700px) and (max-width: 900px) and (min-height: 600px) and (pointer: coarse) {
  .stats-dialog .stats-columns { grid-template-columns: minmax(0, 1fr); }
  #game-shell .survivor-upgrade-layer .su-character-stats .stats-columns { grid-template-columns: minmax(0, 1fr); }
}
