.view-tabs {
  display:flex;
  flex:none;
  gap:6px;
  border-bottom:1px solid var(--line);
}
.view-tabs[hidden] { display:none; }
.view-tabs button {
  min-height:44px;
  padding:7px 15px;
  color:var(--muted);
  background:none;
  border:0;
  border-bottom:2px solid transparent;
  font-size:13px;
  font-weight:500;
}
.view-tabs button:hover,.view-tabs button[aria-selected="true"] { color:var(--gold); }
.view-tabs button[aria-selected="true"] { border-color:var(--gold); }
.view-tabs button:focus-visible { outline-offset:-3px; }
.breakdown-tabs { padding-inline:20px; background:#1a1d1a; }
.match-card .breakdown-tabs { padding-inline:12px; background:transparent; }
#shared-breakdown .breakdown-tabs { position:sticky; z-index:2; top:0; }
#breakdown-content[data-view="map"] .breakdown-grid { grid-template-columns:minmax(0,5fr) minmax(0,3fr); }
.breakdown-lobby { table-layout:fixed; }
.breakdown-lobby th:first-child { width:33px; }
.breakdown-lobby th:last-child { width:84px; }
.breakdown-lobby .hero span { min-width:0; }
.atlas-panel { min-width:0; }
.atlas-panel [hidden] { display:none; }
.map-feedback { display:flex; align-items:center; flex-wrap:wrap; gap:8px; font-size:12px; color:var(--muted); }
.map-feedback:has(p:empty):not(:has(button:not([hidden]))) { display:none; }
#match-map-panel .map-feedback { min-height:72px; align-content:center; }
.map-subject { margin-bottom:8px; }
.map-player-badge .hero { min-height:34px; font-size:15px; font-weight:500; }
.map-player-badge .hero img { width:30px; height:30px; }
.map-player-badge .hero span { overflow-wrap:anywhere; }
#map-player { display:none; width:100%; min-width:0; text-overflow:ellipsis; }
.map-layers {
  display:flex;
  gap:3px;
  padding:3px;
  border:1px solid #41483e;
  border-radius:6px;
  background:#121714;
}
.match-map-layers { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.map-layers button {
  min-height:34px;
  min-width:0;
  padding:3px 8px;
  border:1px solid transparent;
  border-radius:4px;
  background:transparent;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
  transition:color 150ms ease-out,background-color 150ms ease-out;
}
.map-layers button:hover { color:var(--text); }
.map-layers button[aria-pressed="true"] { background:#2d2b21; border-color:#665a40; color:#f3daa1; }
.map-layers button:focus-visible { outline-offset:-1px; }
.map-timeline {
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  margin:7px 0 8px;
}
.map-timeline button {
  min-height:42px;
  padding-inline:9px;
  border:1px solid #505143;
  background:#20241d;
  border-radius:5px;
  font-size:11px;
  font-weight:500;
  color:var(--gold);
  white-space:nowrap;
}
.map-timeline button:hover { border-color:var(--gold); background:#292a20; }
.map-play span {
  display:block;
  width:0;
  height:0;
  margin-inline:auto;
  border-block:6px solid transparent;
  border-left:9px solid currentColor;
  transform:translateX(1px);
}
.map-play.playing span { width:10px; height:11px; border-block:0; border-inline:3px solid currentColor; transform:none; }
.map-scrubber { display:grid; align-content:center; min-width:0; }
.map-time { display:flex; align-items:baseline; gap:4px; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; }
.map-time output { color:var(--text); font-size:14px; font-weight:500; }
#map-seek {
  --progress:0%;
  appearance:none;
  display:block;
  margin:0;
  width:100%;
  min-width:0;
  min-height:28px;
  padding:0;
  border:0;
  background:none;
  cursor:ew-resize;
}
#map-seek::-webkit-slider-runnable-track {
  height:4px;
  border-radius:5px;
  background:linear-gradient(to right,var(--gold) var(--progress),#495249 var(--progress));
}
#map-seek::-webkit-slider-thumb {
  appearance:none;
  width:15px;
  height:15px;
  margin-top:-5.5px;
  border:2px solid #24251b;
  border-radius:50%;
  background:#f4d68e;
  box-shadow:0 0 0 1px #f4d68e;
}
#map-seek::-moz-range-track { height:4px; border-radius:5px; background:#495249; }
#map-seek::-moz-range-progress { height:4px; border-radius:5px; background:var(--gold); }
#map-seek::-moz-range-thumb { width:12px; height:12px; border:2px solid #24251b; border-radius:50%; background:#f4d68e; }
.map-economy {
  --economy-height:92px;
  margin:8px 0;
  padding:8px 12px 6px;
  border:1px solid #41483e;
  border-radius:7px;
  background:#181e1b;
  font-variant-numeric:tabular-nums;
}
.map-economy-head { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:3px 10px; margin-bottom:7px; }
.map-economy-head h3 { margin:0; font-size:13px; font-weight:500; }
.map-economy-key { display:flex; flex-wrap:wrap; gap:3px 10px; margin:0; padding:0; list-style:none; font-size:10px; color:var(--muted); }
.map-economy-key li { display:flex; align-items:center; gap:4px; white-space:nowrap; }
.map-economy-key li::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--economy-color); }
.map-economy [data-team="Team0"] { --economy-color:var(--team-0); }
.map-economy [data-team="Team1"] { --economy-color:var(--team-1); }
.map-economy-body { position:relative; display:grid; grid-template-columns:max-content minmax(0,1fr); gap:8px; }
.map-economy-scale { display:grid; height:var(--economy-height); padding-left:4px; text-align:right; }
.map-economy-scale,.map-economy-times { color:var(--muted); font-size:10px; line-height:1; white-space:nowrap; }
.map-economy-scale span { grid-area:1/1; align-self:start; position:relative; transform:translateY(-50%); }
.map-economy-scale span:nth-child(1) { top:6%; }
.map-economy-scale span:nth-child(2) { top:50%; }
.map-economy-scale span:nth-child(3) { top:94%; }
.map-economy-plot { position:relative; height:var(--economy-height); }
.map-economy-plot svg { display:block; width:100%; height:100%; }
.map-economy-plot stop { stop-color:var(--economy-color); }
.map-economy-zero { stroke:#687265; stroke-dasharray:3 4; stroke-width:1; vector-effect:non-scaling-stroke; }
.map-economy-line { fill:none; stroke:url(#map-economy-line); stroke-width:2; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.map-economy-cursor { position:absolute; inset-block:0; left:0; width:1px; background:#ebdfc68c; pointer-events:none; }
.map-economy-point,.map-economy-event { position:absolute; border:0; padding:0; background:transparent; }
.map-economy-point { inset-block:0; }
.map-economy-point::after,.map-economy-event::after {
  position:absolute;
  width:9px;
  height:9px;
  border:1px solid #181e1b;
  background:var(--economy-color,var(--muted));
  content:"";
  pointer-events:none;
}
.map-economy-point::after { left:var(--point-x); top:var(--point-y); border-radius:50%; transform:translate(-50%,-50%); pointer-events:auto; }
.map-economy-events { position:relative; border-top:1px solid var(--line); }
.map-economy-event-track { position:relative; height:24px; }
.map-economy-event { top:0; width:24px; height:24px; border-radius:4px; transform:translateX(-50%); }
.map-economy-event::after { left:50%; top:50%; border-radius:2px; transform:translate(-50%,-50%) rotate(45deg); }
.map-economy-event[data-kind="midboss"]::after {
  width:12px;
  height:12px;
  border:2px solid var(--economy-color,var(--gold));
  border-radius:50%;
  background:#181e1b;
  transform:translate(-50%,-50%);
}
.map-economy-event[data-cluster] { padding-right:2px; text-align:right; color:var(--muted); font-size:10px; }
.map-economy-event[data-cluster]::after { left:6px; }
.map-economy-event:is(:hover,[aria-expanded="true"]) { color:var(--text); background:#30372d; }
.map-economy-event-menu { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.map-economy-event-choice {
  min-height:28px;
  padding:4px 7px;
  border:1px solid var(--line);
  border-radius:4px;
  background:#222921;
  color:var(--text);
  font-size:11px;
  text-align:left;
}
.map-economy-event-choice:hover { border-color:var(--gold); }
.map-economy-point:focus-visible { outline:0; }
.map-economy-point:is(:hover,:focus-visible)::after,.map-economy-event:is(:hover,:focus-visible)::after { box-shadow:0 0 0 2px var(--text); }
.map-economy-times { display:flex; justify-content:space-between; padding-top:4px; }
.map-economy-tip {
  position:absolute;
  top:0;
  right:0;
  z-index:1;
  max-width:100%;
  padding:3px 7px;
  border:1px solid #52574a;
  border-radius:4px;
  background:#20261f;
  color:var(--text);
  font-size:11px;
  pointer-events:none;
}
.atlas-stage {
  isolation:isolate;
  position:relative;
  width:100%;
  aspect-ratio:1;
  overflow:hidden;
  border:1px solid #52574a;
  border-radius:7px;
  background:
    linear-gradient(#9fafa40c 1px,transparent 1px),
    linear-gradient(90deg,#9fafa40c 1px,transparent 1px),
    radial-gradient(ellipse at 50% 40%,#35443b,#17201b 80%);
  background-size:12.5% 12.5%,12.5% 12.5%,100% 100%;
  box-shadow:0 12px 30px -19px #020705;
}
.atlas-image,.atlas-canvas { position:absolute; inset:0; display:block; width:100%; height:100%; }
.atlas-image { object-fit:fill; filter:grayscale(.82) sepia(.16) hue-rotate(40deg) brightness(1.05) contrast(.86); opacity:.85; }
.atlas-no-image .atlas-image { display:none; }
.atlas-stage::after {
  content:"";
  position:absolute;
  inset:6px;
  pointer-events:none;
  opacity:.7;
  background:
    linear-gradient(#9b9f85,#9b9f85) left top/12px 1px,
    linear-gradient(#9b9f85,#9b9f85) left top/1px 12px,
    linear-gradient(#9b9f85,#9b9f85) right top/12px 1px,
    linear-gradient(#9b9f85,#9b9f85) right top/1px 12px,
    linear-gradient(#9b9f85,#9b9f85) left bottom/12px 1px,
    linear-gradient(#9b9f85,#9b9f85) left bottom/1px 12px,
    linear-gradient(#9b9f85,#9b9f85) right bottom/12px 1px,
    linear-gradient(#9b9f85,#9b9f85) right bottom/1px 12px;
  background-repeat:no-repeat;
}
.atlas-north { position:absolute; left:17px; top:12px; font-size:10px; color:#e5dbbf; text-shadow:0 1px 3px #0a1110; }
.atlas-north::before { content:""; display:block; margin:0 auto 1px; border:3px solid transparent; border-top:0; border-bottom:4px solid currentColor; }
.match-atlas-wrap { position:relative; }
.map-event-inspection {
  position:absolute;
  top:11px;
  right:11px;
  max-width:calc(100% - 48px);
  padding:5px 9px;
  background:#171e18f2;
  border:1px solid #59604e;
  border-radius:5px;
  font-size:11px;
  overflow-wrap:anywhere;
  pointer-events:none;
}
.atlas-marker-active { cursor:help; }
.map-marker-tip {
  position:absolute;
  z-index:2;
  width:max-content;
  max-width:calc(100% - 16px);
  padding:5px 8px;
  background:#272e25;
  border:1px solid #626954;
  border-radius:5px;
  box-shadow:0 4px 12px #080c08a6;
  font-size:11px;
  overflow-wrap:anywhere;
  pointer-events:none;
}
.match-atlas-wrap:has(.map-marker-tip:not([hidden])) .map-event-inspection { visibility:hidden; }
.map-key { display:flex; align-items:center; flex-wrap:wrap; gap:5px 15px; margin-top:8px; color:var(--muted); font-size:11px; }
.map-legend-item { display:inline-flex; align-items:center; gap:6px; }
.map-mark { width:10px; height:10px; flex:none; }
.map-mark-line,.map-mark-farm,.map-mark-trail { width:13px; height:3px; border-radius:2px; background:#f4d68e; }
.map-mark-farm { background:#77ddc2; }
.map-mark-trail { background:#d3c19c92; }
.map-mark-camp,.map-mark-kill { border:1px solid #9ae1bf; border-radius:50%; }
.map-mark-kill { background:#466556; }
.map-mark-death { width:8px; height:8px; border:1px solid #fb9e90; background:#623b35; transform:rotate(45deg); }
.map-note { margin-top:5px; color:var(--muted); font-size:11px; }
.map-note:empty { display:none; }
.map-farm-totals {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:3px 12px;
  border-block:1px solid var(--line);
  margin-top:12px;
  padding:8px 0;
}
.map-farm-totals span,.map-farm-totals small { color:var(--muted); font-size:11px; }
.map-farm-totals strong { display:block; font-weight:500; font-size:17px; font-variant-numeric:tabular-nums; }
.map-farm-totals small { grid-column:1/-1; }
.map-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:8px; }
.map-actions .button { color:var(--gold); font-size:12px; }
.map-actions input { flex-basis:100%; min-width:0; }
.map-events { border-top:1px solid var(--line); margin-top:10px; }
.map-events summary { min-height:44px; padding:11px 0; cursor:pointer; color:var(--muted); }
.map-events summary span { margin-left:4px; font-size:11px; color:var(--gold); }
.map-events ul { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(127px,100%),1fr)); gap:1px 5px; }
.map-events li { position:relative; }
.map-events button {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  width:100%;
  min-height:40px;
  padding-inline:7px;
  border:0;
  border-radius:4px;
  background:transparent;
  font-size:11px;
  text-align:left;
}
.map-events button:hover,.map-events button:focus-visible { background:#282f27; outline-offset:-2px; }
.map-events time { font-variant-numeric:tabular-nums; color:var(--muted); }
.map-event-tip {
  position:absolute;
  z-index:1;
  inset-inline:0;
  bottom:calc(100% - 2px);
  padding:6px 8px;
  background:#272e25;
  border:1px solid #626954;
  border-radius:5px;
  box-shadow:0 4px 12px #080c08a6;
  font-size:11px;
  overflow-wrap:anywhere;
  visibility:hidden;
}
.map-events li:not([data-tip-dismissed]):has(button:focus-visible) .map-event-tip { visibility:visible; }
@media (hover:hover) {
  .map-events li:not([data-tip-dismissed]):hover .map-event-tip { visibility:visible; }
}
@media (max-width:620px) {
  .breakdown-tabs { padding-inline:12px; }
  #breakdown-content[data-view="map"] .breakdown-grid { grid-template-columns:minmax(0,1fr); }
  #breakdown-content[data-view="map"] #breakdown-lobby-panel,.map-player-badge { display:none; }
  #breakdown-content[data-view="build"] #breakdown-lobby-panel { display:none; }
  #match-build-panel:has(#build-player:not([hidden])) .build-player-badge { display:none; }
  #build-player:not([hidden]) { display:block; min-width:0; max-width:100%; flex:1 1 150px; }
  .build-events { max-height:none; overflow:visible; }
  .build-event { grid-template-columns:36px minmax(0,1fr) auto; gap:5px; padding-inline:6px; }
  #map-player { display:block; }
  .map-subject { margin-bottom:5px; }
  .map-layers button { min-height:38px; padding-inline:4px; }
  .match-map-layers { padding:2px; }
  .map-timeline { grid-template-columns:44px minmax(0,1fr) auto; gap:7px; margin-block:4px 6px; }
  .map-timeline button,.map-events button { min-height:44px; }
  .map-scrubber { position:relative; height:49px; }
  .map-time { position:absolute; top:0; left:0; line-height:1.25; pointer-events:none; }
  #map-seek { position:absolute; inset:auto 0 0; min-height:35px; }
}
@container match-detail (max-width:610px) {
  #match-breakdown .breakdown-grid { grid-template-columns:minmax(0,1fr); }
  #breakdown-content:is([data-view="map"],[data-view="build"]) #breakdown-lobby-panel,
  .map-player-badge,#match-build-panel:has(#build-player:not([hidden])) .build-player-badge { display:none; }
  #map-player,#build-player:not([hidden]) { display:block; min-width:0; max-width:100%; }
  .build-events { max-height:none; overflow:visible; }
}
@media (pointer:coarse) {
  .map-layers button,.map-events button,#map-seek { min-height:44px; }
}
@media (prefers-reduced-motion:reduce) {
  .map-layers button { transition:none; }
}
