/* Targets shares the saved-player identity and private-account controls of the explorer. */
.targets-page{display:flex;flex-direction:column;gap:22px;max-width:1400px;margin:0 auto;padding-bottom:48px;min-width:0}
.targets-builder,.targets-list-section{border:1px solid var(--line);border-radius:16px;background:var(--surface);min-width:0}
.targets-pickers{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(250px,1.2fr) minmax(200px,1fr);gap:18px;padding:22px}
.targets-pickers label,.targets-attacker-field,.targets-alliance-field,.targets-filters label{display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:11px;font-weight:600;min-width:0}
.targets-pickers select,.targets-pickers input,.targets-toolbar select,.targets-toolbar input,.targets-filters select,.targets-filters input{min-width:0;width:100%;min-height:40px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);padding:8px 10px;font-size:12px}
.targets-attacker-field,.targets-alliance-field{position:relative}
.targets-attacker-search,.targets-alliance-search{position:relative;min-width:0}
.targets-attacker-options{position:absolute;z-index:35;left:0;right:0;top:calc(100% + 6px);max-height:320px;overflow:auto;padding:5px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:0 14px 36px #0005}
.targets-attacker-options[hidden],.targets-notice[hidden],.targets-plan-bar button[hidden]{display:none}
.targets-attacker-options button{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:4px 10px;width:100%;min-height:52px;padding:9px 10px;border-radius:7px;text-align:left}
.targets-attacker-options button:hover,.targets-attacker-options button[aria-selected=true]{background:var(--row-hover)}
.targets-attacker-options button[aria-selected=true]{box-shadow:inset 3px 0 var(--accent)}
.targets-attacker-options button>strong,.targets-attacker-options button>span:not(.avatar){overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}
.targets-attacker-options button>strong{grid-column:2;grid-row:1;font-size:12px;color:var(--ink)}
.targets-attacker-options button>span:not(.avatar){grid-column:2;grid-row:2;font-size:9px;color:var(--muted)}
.targets-attacker-options button>small{grid-column:3;grid-row:1/3;align-self:center;font-size:10px;color:var(--muted)}
.targets-attacker-options p{padding:14px;font-size:11px;color:var(--muted)}
.targets-rule{display:flex;align-items:center;gap:20px;padding:14px 22px;border-top:1px solid var(--line);background:var(--surface-alt)}
.targets-rule p{color:var(--muted);font-size:11px;line-height:1.6}
.targets-rule p strong{color:var(--ink);font-weight:600}
.targets-kinds{display:flex;flex:none;gap:4px;padding:3px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.targets-kinds .button{min-height:32px;padding:5px 14px;border:0;background:transparent;font-size:11px}
.targets-kinds .button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink)}
.targets-scope-note{padding:10px 22px;color:var(--muted);font-size:10px;line-height:1.6}
.targets-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.targets-metrics>div{display:flex;flex-direction:column;gap:10px;padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.targets-metrics dt{color:var(--muted);font-size:11px}
.targets-metrics dd{margin:0;font-size:25px;font-weight:650;letter-spacing:-.6px;font-variant-numeric:tabular-nums}
.targets-list-section{padding:20px}
.targets-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.targets-toolbar>label{min-width:0}
.targets-query{display:flex;align-items:center;position:relative;flex:1;min-width:200px!important}
.targets-query .ico{position:absolute;left:12px;width:15px;height:15px;color:var(--muted);pointer-events:none}
.targets-query input{padding-left:36px}
.targets-toolbar>label:not(.targets-query){flex:0 1 auto}
.targets-toolbar select{width:auto;max-width:230px}
.targets-plan-bar{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:15px 0;margin-top:5px;border-bottom:1px solid var(--line)}
.targets-plan-bar p{max-width:78ch;color:var(--muted);font-size:10px;line-height:1.7}
.targets-plan-bar p span{display:block}
.targets-plan-bar>div{display:flex;flex:none;gap:14px}
.targets-plan-bar .text-button,.targets-result-bar .text-button{font-size:11px;white-space:nowrap}
.targets-result-bar{display:flex;gap:16px;align-items:center;justify-content:space-between;min-height:48px}
.targets-result-bar p{color:var(--muted);font-size:11px}
.targets-notice{padding:12px 14px;margin-bottom:12px;border:1px solid var(--line);border-radius:8px;background:var(--surface-alt);color:var(--ink);font-size:11px;line-height:1.7}
.targets-table-wrap{width:100%;overflow:auto;border:1px solid var(--line);border-radius:10px}
.targets-table{width:100%;min-width:1120px;border-collapse:collapse}
.targets-table th{padding:10px 12px;border-bottom:1px solid var(--line);background:var(--surface-alt);color:var(--muted);font-size:10px;font-weight:600;text-align:left;white-space:nowrap}
.targets-table td{padding:12px;border-bottom:1px solid var(--line);font-size:11px}
.targets-table .num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.targets-sort-heading{display:inline-flex;align-items:center;gap:7px;min-height:28px;white-space:nowrap;font:inherit;color:inherit}
.targets-sort-heading span{color:var(--accent);font-size:12px}
.targets-sort-heading:hover:enabled{color:var(--ink)}
.targets-table tr:last-child td{border-bottom:0}
.targets-table tbody tr:hover{background:var(--row-hover)}
.targets-table .target-completed{background:color-mix(in srgb,var(--positive) 5%,transparent)}
.targets-check-cell{width:36px;text-align:center}
.targets-check-cell input{width:17px;height:17px;cursor:pointer;accent-color:var(--accent);vertical-align:middle}
.targets-check-cell input:disabled{cursor:default}
.targets-player-cell{min-width:220px;max-width:370px}
.targets-name-cell{display:flex;gap:8px;align-items:center;min-width:0}
.targets-name-cell .player-button{display:flex;align-items:center;gap:10px;min-width:0;flex:1;text-align:left}
.targets-name-cell .player-button>span:first-child{flex:none}
.targets-name-cell .avatar{display:block;width:36px;height:36px;border-radius:9px}
.targets-name-cell .player-button>span:last-child{display:flex;flex-direction:column;gap:4px;min-width:0}
.targets-name-cell .player-name-line{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.targets-name-cell strong{font-size:12px;overflow-wrap:anywhere}
.targets-name-cell small{color:var(--muted);font-size:9px;line-height:1.6}
.targets-name-cell .favorite-star{flex:none}
.targets-alliance-cell{min-width:80px;max-width:120px}
.targets-state-cell{min-width:110px;max-width:170px;line-height:1.6}
.targets-state-cell small,.targets-shield-cell small,.targets-gather-cell small{display:block;margin-top:4px;font-size:9px;color:var(--muted);line-height:1.6}
.targets-gather-cell{min-width:110px;line-height:1.6}
.targets-location{display:inline-flex;align-items:center;gap:6px;color:var(--accent);font-size:11px;white-space:nowrap}
.targets-location .ico{width:14px;height:14px}
.targets-observed{max-width:155px;color:var(--muted);font-size:9px!important;line-height:1.6}
.targets-drag{flex:none;width:24px;min-height:34px;color:var(--muted);cursor:grab;font-size:19px}
.targets-drag:active{cursor:grabbing}
.targets-drag:disabled{cursor:default}
.targets-move-cell{width:65px;white-space:nowrap}
.targets-arrow{width:26px;min-height:30px;border:1px solid var(--line);border-radius:5px;color:var(--muted);font-size:15px}
.targets-arrow+button{margin-left:3px}
.targets-arrow:hover:enabled{color:var(--ink);background:var(--surface-alt)}
.targets-arrow:disabled{opacity:.35}
.targets-dragging{opacity:.45}
.targets-drop-before{box-shadow:inset 0 3px var(--accent)}
.targets-drop-after{box-shadow:inset 0 -3px var(--accent)}
.targets-pagination{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:22px 8px 0;text-align:center}
.targets-pagination:empty{display:none}
.targets-pagination p{color:var(--muted);font-size:11px;line-height:1.6}
#targetsSentinel{display:block;width:100%;height:1px}
.targets-reset-dialog{width:min(420px,calc(100vw - 32px));padding:24px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);box-shadow:0 24px 70px #0006}
.targets-reset-dialog::backdrop{background:#0008}
.targets-reset-dialog h2{font-size:20px;font-weight:650;letter-spacing:-.3px}
.targets-reset-dialog p{margin-top:14px;color:var(--muted);font-size:12px;line-height:1.7}
.targets-reset-dialog form>div{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
.targets-page button:focus-visible,.targets-page input:focus-visible,.targets-page select:focus-visible,.targets-reset-dialog button:focus-visible{outline:2px solid var(--focus,var(--accent));outline-offset:3px}
.matchup-target-summary .panel-heading{align-items:center}
.matchup-target-summary .targets-summary-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;padding-top:16px;border-top:1px solid var(--line)}
.targets-summary-metrics dt{font-size:10px;color:var(--muted)}
.targets-summary-metrics dd{margin:8px 0 0;font-size:20px;font-weight:650;font-variant-numeric:tabular-nums}
.matchup-target-summary .targets-summary-note{color:var(--muted);font-size:11px;line-height:1.7}
@container content (max-width:900px){.targets-pickers{grid-template-columns:minmax(140px,1fr) minmax(200px,1.3fr)}.targets-pickers>.targets-alliance-field{grid-column:1/-1}.targets-metrics{gap:8px}.targets-metrics>div{padding:14px 10px}.targets-metrics dt{font-size:10px}}
@container content (max-width:600px){
  .targets-page{gap:16px}.targets-pickers{grid-template-columns:1fr;gap:16px;padding:18px 14px}.targets-pickers>.targets-alliance-field{grid-column:auto}.targets-rule{flex-direction:column;align-items:flex-start;gap:10px;padding:14px}.targets-kinds{width:100%}.targets-kinds button{flex:1}.targets-scope-note{padding:10px 14px}.targets-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.targets-metrics>div{padding:12px 10px;gap:7px}.targets-metrics dd{font-size:21px}.targets-list-section{padding:14px}.targets-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.targets-query{grid-column:1/-1;min-width:0!important}.targets-toolbar select{width:100%;max-width:none;font-size:11px}.targets-toolbar>#targetsFilterToggle{grid-column:1/-1}.targets-plan-bar{flex-direction:column;align-items:flex-start;gap:10px}.targets-plan-bar>div{width:100%;justify-content:space-between}.targets-result-bar{gap:8px;flex-wrap:wrap;padding:10px 0}.targets-result-bar p,.targets-result-bar .text-button{font-size:10px}
  .targets-table-wrap{border:0;overflow:visible}.targets-table{display:block;min-width:0}.targets-table thead{display:none}.targets-table tbody{display:flex;flex-direction:column;gap:10px}.targets-table tr{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}.targets-table td{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;padding:0;border:0;font-size:11px}.targets-table td[data-label]::before{content:attr(data-label);font-size:9px;color:var(--muted)}.targets-table td.num{text-align:left}.targets-check-cell{position:absolute;top:18px;left:12px;width:17px}.targets-player-cell{grid-column:1/-1;min-width:0;max-width:none;padding-left:26px!important}.targets-name-cell{width:100%;gap:4px}.targets-name-cell .player-button{gap:8px}.targets-name-cell .avatar{width:30px;height:30px}.targets-name-cell strong{font-size:11px}.targets-name-cell .player-name-line{gap:4px}.targets-name-cell .alliance-title{font-size:8px;max-width:100%}.targets-name-cell .favorite-star{width:26px;min-width:26px;padding:0}.targets-drag{width:18px;font-size:17px}.targets-alliance-cell{min-width:0;max-width:none}.targets-observed{max-width:none}.targets-move-cell{grid-column:1/-1;flex-direction:row!important;justify-content:flex-end;width:auto;border-top:1px solid var(--line)!important;padding-top:10px!important}.targets-arrow{min-width:38px;min-height:32px}.targets-arrow+button{margin-left:0}.matchup-target-summary .targets-summary-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 10px}.targets-summary-metrics dd{font-size:19px}.matchup-target-summary .panel-heading>.button{width:100%;justify-content:center}
}
@media(prefers-reduced-motion:reduce){.targets-page *{scroll-behavior:auto!important}}

.targets-attacker-options button>.avatar{grid-column:1;grid-row:1/3;align-self:center;width:32px;height:32px;border-radius:8px}

.targets-filter-popup{position:fixed;inset:auto;margin:0;padding:0;width:408px;max-width:calc(100vw - 24px);border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:0 14px 42px #0004;overflow:auto}
.targets-filter-popup .targets-filters{padding:0;display:block}
.targets-filter-popup .filter-header{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line)}
.targets-filter-popup .filter-header h2{font-size:13px;font-weight:650;letter-spacing:0}
.targets-filter-popup .filter-header>span{font-size:10px;color:var(--muted);margin-left:auto}
.targets-filter-popup .filter-header .text-button{font-size:11px;padding:4px 0}
.targets-filter-popup .filter-body{display:flex;flex-direction:column;gap:13px;padding:15px 16px}
.targets-popup-row{display:grid;grid-template-columns:60px minmax(0,1fr);align-items:center;gap:12px}
.targets-popup-row .filter-label{font-size:11px;color:var(--muted)}
.targets-filter-choices{display:flex;flex-wrap:wrap;gap:5px}
.targets-filter-choice{position:relative;cursor:pointer}
.targets-filter-choice input{position:absolute;width:1px;height:1px;min-height:0;opacity:0;padding:0}
.targets-filter-choice span{display:flex;align-items:center;gap:4px;padding:6px 7px;min-height:30px;border:1px solid var(--line);border-radius:6px;font-size:10px;background:var(--surface-alt);color:var(--muted)}
.targets-filter-choice .ico{width:12px;height:12px}
.targets-filter-choice input:checked+span{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.targets-filter-choice input:focus-visible+span{outline:2px solid var(--focus,var(--accent));outline-offset:3px}
.targets-popup-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.targets-popup-range label{min-width:0}
.targets-popup-range input{width:100%;min-width:0;min-height:34px;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg);font-size:11px}
#targetsFilterError:empty{display:none}
.targets-shield-status{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border:1px solid var(--line);border-radius:6px;background:var(--surface-alt);font-size:10px;line-height:1.3;white-space:nowrap}
.targets-shield-status .ico{width:12px;height:12px}
.targets-shield-status.shield-active{color:#15735c;background:color-mix(in srgb,#39b98b 12%,var(--surface));border-color:color-mix(in srgb,#39b98b 35%,var(--line))}
.app[data-theme=dark] .targets-shield-status.shield-active{color:#6adbb1}
.targets-shield-status.shield-unknown{color:var(--muted);background:transparent;border-style:dashed}
.targets-table tr.selected{background:var(--row-hover);box-shadow:inset 3px 0 var(--accent)}


.targets-alliance-options button>.ico{grid-column:1;grid-row:1/3;align-self:center;justify-self:center;width:21px;height:21px;color:var(--muted)}
.targets-alliance-options button>small{display:flex;align-items:center;gap:4px;color:var(--accent)}
.targets-alliance-options button>small .ico{width:12px;height:12px}

.targets-position-cell{width:44px;min-width:36px;color:var(--muted);font-weight:650}
.targets-move-cell{white-space:nowrap}
.targets-move-cell .targets-drag{vertical-align:middle}
@container content (max-width:600px){
 .targets-table .targets-position-cell{position:absolute;top:16px;left:12px;width:26px;padding:0;display:block}
 .targets-table .targets-position-cell::before{display:none}
 .targets-table .targets-move-cell{position:static;grid-column:1/-1;grid-row:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;width:auto;border-top:0!important;padding:0 28px!important}
 .targets-table .targets-check-cell{left:auto;right:12px;top:18px}
 .targets-table .targets-player-cell{padding-left:0!important;padding-right:24px!important}
}
@container content (max-width:600px){
 .targets-table thead{display:block;margin-bottom:12px}
 .targets-table thead tr{position:static;display:flex;gap:6px;padding:0;border:0;background:none;overflow:auto;white-space:nowrap;max-width:100%;box-shadow:none}
 .targets-table thead th{display:none}
 .targets-table thead th:has(.targets-sort-heading){display:block;flex:none;border:0;padding:0;background:none}
 .targets-table thead .targets-sort-heading{min-height:32px;padding:5px 9px;border:1px solid var(--line);border-radius:6px;background:var(--surface-alt);font-size:10px}
}

.targets-order-number{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:50px}
.targets-order-number>span{min-width:20px;text-align:right;margin-left:auto}
.targets-order-number .targets-drag{width:16px;min-height:28px}
.targets-position-cell{width:62px;min-width:52px}
.targets-table .targets-position-cell{padding-left:8px}
@container content (max-width:600px){
 .targets-table .targets-position-cell{left:8px;top:16px;width:56px;padding:0}
 .targets-table .targets-position-cell + .targets-player-cell{padding-top:32px}
 .targets-table .targets-move-cell{padding-left:70px!important}
 .targets-order-number{gap:14px;font-size:10px}
 .targets-order-number .targets-drag{min-height:24px}
}

.targets-state-field,.targets-state-search{position:relative;min-width:0}
.targets-state-field{display:flex;flex-direction:column;gap:7px}
.targets-state-options button{display:flex;align-items:center;gap:10px}
.targets-state-options .ico{flex:none;width:18px;height:18px;color:var(--muted)}
.targets-state-options strong{min-width:0;overflow-wrap:anywhere}
