@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url(fonts/barlow-condensed-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format("woff2"); }

:root {
  --ink: #111111;
  --ink-2: #3a3a3a;
  --mute: #666666;
  --red: #e60012;
  --red-deep: #b5000e;
  --red-tint: #fff0f1;
  --red-line: #f6c2c7;
  --fill: #f2f2f2;
  --fill-2: #f7f7f7;
  --line: #e0e0e0;
  --line-2: #d6d6d6;
  --gray: #7a7a7a;
  --ground: #ffffff;
  --q1: #636a73; --q2: #237a36; --q3: #1864ab; --q4: #6f37a8; --q5: #8f5d00; --q6: #a81e4c;
  --red-text: #d40011;
  --cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Malgun Gothic", sans-serif;
  --gap: 10px;
}

* { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 13px/1.45 var(--sans); font-variant-numeric: tabular-nums;
}
::selection { background: var(--red); color: #fff; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }
input { caret-color: var(--red); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }
h1, h2, h3 { margin: 0; font-family: var(--cond); font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: 40px; letter-spacing: -0.015em; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
small, .sub { color: var(--mute); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.cond { font-family: var(--cond); }
.ico { flex: none; vertical-align: -3px; }
.loss { color: var(--red-text); }
.up { color: var(--q2); }
.down { color: var(--red-text); }

/* Shell */
.top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; gap: 16px; padding: 10px 16px 8px; max-width: 1680px; margin: 0 auto; }
.brand { display: flex; align-items: stretch; font-family: var(--cond); font-weight: 700; font-size: 20px; letter-spacing: .02em; line-height: 1; }
.brand:hover { text-decoration: none; color: inherit; }
.brand-mark { background: var(--red); color: #fff; padding: 5px 6px 4px; }
.brand-word { border: 1px solid var(--ink); border-left: 0; padding: 4px 7px 3px; }
.search { flex: 1; max-width: 560px; display: flex; border: 1px solid var(--line-2); background: #fff; }
.search:focus-within { border-color: var(--red); }
.search input { flex: 1; border: 0; padding: 7px 10px; font: inherit; background: transparent; min-width: 0; outline: none; }
.search input::placeholder { color: #767676; }
.search button { border: 0; border-left: 1px solid var(--line-2); background: var(--fill); padding: 0 12px; cursor: pointer; color: var(--ink); }
.search button:hover { background: var(--red); color: #fff; }
.status { margin-left: auto; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); padding: 5px 10px; font-family: var(--cond); font-weight: 600; font-size: 13px; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.status .dot { width: 8px; height: 8px; background: var(--gray); }
.status[data-status="live"] .dot { background: var(--q2); animation: beat 2.4s ease-out infinite; }
.status[data-status="connecting"] .dot, .status[data-status="reconnecting"] .dot { background: #e8a200; }
.status[data-status="stopped"] .dot { background: var(--red); }
.status .status-detail { font-family: var(--sans); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--mute); font-size: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(43,138,62,.45); } 70%, 100% { box-shadow: 0 0 0 6px rgba(43,138,62,0); } }
.nav { display: flex; gap: 2px; padding: 0 16px; max-width: 1680px; margin: 0 auto; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 7px 14px 8px; font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: .02em; border-bottom: 3px solid transparent; color: var(--ink-2); }
.nav a:hover { color: var(--red); text-decoration: none; }
.nav a.on { color: var(--red); border-bottom-color: var(--red); }
.nav .count { font-family: var(--sans); font-weight: 400; font-size: 12px; color: var(--mute); }
.page { max-width: 1680px; margin: 0 auto; padding: 12px 16px 40px; }
footer { max-width: 1680px; margin: 0 auto; padding: 0 16px 24px; color: var(--mute); font-size: 12px; }

/* Modules: hairline boxes headed by a solid tab */
.mod { border: 1px solid var(--line); background: #fff; min-width: 0; }
.mod + .mod { margin-top: var(--gap); }
.mod-h { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); min-height: 32px; padding-right: 10px; }
.tab { align-self: stretch; display: flex; align-items: center; gap: 6px; background: var(--red); color: #fff; font-family: var(--cond); font-weight: 600; font-size: 13.5px; letter-spacing: .05em; text-transform: uppercase; padding: 0 10px; white-space: nowrap; }
.def .tab, .tab.ink { background: var(--ink); }
.tab.quiet { background: var(--fill); color: var(--ink); }
.mod-h .meta { color: var(--mute); font-size: 12px; }
.mod-h .more { margin-left: auto; display: flex; align-items: center; gap: 2px; font-size: 12px; white-space: nowrap; }
.mod-b { padding: 10px; }
.mod-b.flush { padding: 0; }
.empty { padding: 18px 12px; color: var(--mute); }
.empty b { color: var(--ink); display: block; margin-bottom: 2px; font-size: 13.5px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-2); padding: 1px 6px; font-family: var(--cond); font-weight: 600; font-size: 12.5px; letter-spacing: .03em; line-height: 16px; white-space: nowrap; color: var(--ink-2); background: #fff; }
.badge.red { background: var(--red); border-color: var(--red); color: #fff; }
.badge.red-o { border-color: var(--red); color: var(--red); }
.badge.ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.badge.gray { background: var(--fill); border-color: var(--fill); }
.badge.up { border-color: var(--q2); color: var(--q2); }
.badge.down { border-color: var(--red); color: var(--red); }
.badge.new { background: var(--ink); color: #fff; border-color: var(--ink); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--red); background: var(--red); color: #fff; font: 600 14px/1 var(--cond); letter-spacing: .03em; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; text-decoration: none; }
.btn.sec { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.sec:hover { border-color: var(--ink); background: var(--fill); color: var(--ink); }
.btn[disabled] { background: var(--fill); border-color: var(--line-2); color: var(--mute); cursor: not-allowed; }
.btn.loading .ico { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font: 600 12px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); background: var(--fill); padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r, .tbl th.r { text-align: right; }
.tbl .c, .tbl th.c { text-align: center; }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr[data-href]:hover td { background: var(--fill-2); }
.tbl tr.flash td { animation: flash 2.4s cubic-bezier(.16,1,.3,1); }
@keyframes flash { 0% { background: var(--red-tint); } 100% { background: transparent; } }

/* Item tiles */
.tile { --s: 40px; --q: var(--line-2); position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--s); height: var(--s); border: 1.5px solid var(--q); background: color-mix(in srgb, var(--q) 9%, #fff); color: var(--ink); overflow: hidden; vertical-align: middle; }
img.tile { object-fit: cover; padding: 0; }
.tile.q1 { --q: var(--q1); } .tile.q2 { --q: var(--q2); } .tile.q3 { --q: var(--q3); }
.tile.q4 { --q: var(--q4); } .tile.q5 { --q: var(--q5); } .tile.q6 { --q: var(--q6); }
.tile .mono { font: 700 calc(var(--s) * .42)/1 var(--cond); letter-spacing: .01em; }
.tile i { position: absolute; font: 700 12px/1 var(--cond); font-style: normal; padding: 1px 2px; background: #fff; }
.tile .gen { left: 0; top: 0; background: var(--q); color: #fff; }
.tile .corner { right: 0; bottom: 0; padding: 1px; background: #fff; display: flex; }
.tile .tier { left: 0; bottom: 0; background: var(--q); color: #fff; }
.tile .fc { right: 0; top: 0; background: var(--ink); color: #fff; }
.tile .stars { right: 1px; top: 1px; background: transparent; color: var(--q); padding: 0; display: flex; }
.tile.charm { border: 0; background: transparent; color: var(--ink-2); }
.tile.charm .ico { position: absolute; inset: 0; width: 100%; height: 100%; stroke-width: 1.3; }
.tile.charm.ct1 { color: var(--q3); } .tile.charm.ct2 { color: var(--q2); } .tile.charm.ct3 { color: var(--q5); }
.tile.charm .lvl { position: relative; font: 700 calc(var(--s) * .4)/1 var(--cond); color: var(--ink); }
.tile.skill { border-color: var(--line-2); background: var(--fill-2); }
.tile.troop-skill { border-style: dashed; }
.tile.avatar { --q: var(--line-2); }
.tile.avatar.lord { background: var(--fill); color: var(--gray); }
.avatar-wrap { position: relative; display: inline-flex; width: var(--s); height: var(--s); flex: none; vertical-align: middle; }
.avatar-wrap > .tile:not(.photo) { position: absolute; inset: 0; visibility: hidden; }
.avatar-wrap.failed > .photo { visibility: hidden; }
.avatar-wrap.failed > .tile:not(.photo) { visibility: visible; }
.pips { display: inline-block; vertical-align: -1px; color: var(--q5); }

/* Chief chips used in lists */
.chief { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chief .who { min-width: 0; display: flex; flex-direction: column; }
.chief .who > a, .chief .who > b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chief .who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chief .tag { font: 600 12px/1 var(--cond); color: var(--mute); margin-right: 3px; }

/* Reports list */
.layout-3 { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: var(--gap); align-items: start; }
.rail .mod-b { padding: 4px 0; }
.facet { display: flex; justify-content: space-between; gap: 8px; padding: 5px 10px; font-size: 12.5px; }
.facet:hover { background: var(--fill-2); text-decoration: none; }
.facet .n { color: var(--mute); font-size: 12px; }
.facet.on { background: var(--red-tint); color: var(--red-text); font-weight: 600; }
.facet.on .n { color: var(--red-text); }
.facet.clear { color: var(--red-text); }
.reports td.when { white-space: nowrap; width: 1%; }
.reports td.when b { display: block; font-weight: 600; }
.reports td.when .badges { margin: 3px 0 2px; flex-wrap: nowrap; }
.reports td.when small { display: block; }
.reports td.party { width: 30%; max-width: 0; }
.reports td.party.won .who > a { color: var(--ink); }
.reports .side-mark { width: 6px; height: 6px; flex: none; align-self: center; }
.reports .atk .side-mark { background: var(--red); }
.reports .def .side-mark { background: var(--ink); }
.stamp { display: inline-block; font: 700 12px/1 var(--cond); letter-spacing: .05em; padding: 4px 6px 3px; white-space: nowrap; }
.stamp.atk { background: var(--red); color: #fff; }
.stamp.def { background: var(--ink); color: #fff; }
.pair { display: grid; grid-template-columns: 6px auto; column-gap: 5px; align-items: center; justify-content: end; white-space: nowrap; }
.pair i { width: 6px; height: 6px; background: var(--red); }
.pair i.d { background: var(--ink); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.pager .btns { display: flex; gap: 6px; }
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.rail-list li:last-child { border-bottom: 0; }
.mini-chat { list-style: none; margin: 0; padding: 0; }
.mini-chat li { padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mini-chat li:last-child { border-bottom: 0; }
.mini-chat .line1 { display: flex; justify-content: space-between; gap: 6px; color: var(--mute); font-size: 12px; }
.mini-chat .line1 a { color: var(--ink); font-weight: 600; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-chat p { margin: 1px 0 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line-2); border-top: 3px solid var(--red); padding: 10px 12px; max-width: 380px; transform: translateY(0); opacity: 1; transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .35s; }
.toast[hidden] { display: flex; transform: translateY(16px); opacity: 0; pointer-events: none; }

/* Report detail */
.report-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; padding: 12px; align-items: end; }
.report-head .title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 7px 12px; border-right: 1px solid var(--line); min-width: 0; }
.facts > div:last-child { border-right: 0; }
.facts dt { font: 600 12px/1.1 var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.facts dd small { font-weight: 400; }
.matchup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1.1fr) minmax(0, 1fr); border: 1px solid var(--line); margin-top: var(--gap); }
.matchup .side { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.matchup .side { padding: 0 12px 12px; }
.matchup .side .mod-h { margin: 0 -12px; padding-right: 12px; }
.matchup .side.def .mod-h { flex-direction: row-reverse; padding-right: 0; padding-left: 12px; }
.matchup .side.def { align-items: flex-end; text-align: right; }
.matchup .side .chief { gap: 10px; }
.matchup .side.def .chief { flex-direction: row-reverse; }
.matchup .side h2 { font-size: 22px; overflow-wrap: anywhere; }
.matchup .side .mod-h { align-self: stretch; }
.matchup .compare { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.compare table { width: 100%; border-collapse: collapse; }
.compare td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.compare tr:last-child td { border-bottom: 0; }
.compare td.v { width: 40%; font-weight: 600; font-size: 14px; }
.compare td.v.a { text-align: right; }
.compare td.l { text-align: center; font: 600 12px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); white-space: nowrap; background: var(--fill-2); }
.compare td.v.loss.zero { color: var(--mute); }
.compare .better { color: var(--ink); }
.surv { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.bar { height: 6px; background: var(--fill); position: relative; }
.bar > span { position: absolute; top: 0; bottom: 0; }
.bar.a > span { right: 0; background: var(--red); }
.bar.d > span { left: 0; background: var(--ink); }
.halves { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); margin-top: var(--gap); align-items: start; }
.half > .mod + .mod { margin-top: var(--gap); }
.member-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--fill-2); }
.member-h .chief { flex: 1; }
.member-h .badge { flex: none; }
details.member > summary { list-style: none; cursor: pointer; }
details.member > summary::-webkit-details-marker { display: none; }
details.member > summary .chev { transition: transform .2s cubic-bezier(.16,1,.3,1); color: var(--mute); }
details.member[open] > summary .chev { transform: rotate(90deg); }
details.member + details.member { border-top: 1px solid var(--line); }
.troops td .chief { gap: 6px; }
.troops td.name { width: 40%; }
.troops tfoot td { background: var(--fill-2); font-weight: 600; border-top: 1px solid var(--line); }
.hero-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); }
.hero-row:last-child { border-bottom: 0; }
.hero-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.hero-top h3 { font-size: 17px; }
.hero-top .lv { font-weight: 600; }
.skills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.skill-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); padding: 2px 6px 2px 2px; font-size: 12px; background: #fff; cursor: help; }
.skill-chip b { font-family: var(--cond); font-weight: 700; font-size: 12.5px; color: var(--red); }
.kit { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; align-items: center; }
.kit-item { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.2; }
.kit-item .n { font-family: var(--cond); font-weight: 700; font-size: 13px; }
.kit-item small { display: block; }
.gear-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gear-slot { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 4px 8px; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); align-items: start; }
.gear-slot:nth-child(3n) { border-right: 0; }
.gear-slot:nth-last-child(-n+3) { border-bottom: 0; }
.gear-slot .slot { font: 600 12px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.gear-slot .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-slot .gr { font-size: 12px; color: var(--ink-2); }
.gear-slot .charms { grid-column: 1 / -1; display: flex; gap: 4px; align-items: center; }
.gear-slot .charms small { margin-left: 2px; }
.expert-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); align-items: center; }
.expert-row:last-child { border-bottom: 0; }
.expert-row .skills { margin-top: 3px; }
.stats td.v { width: 22%; font-weight: 600; }
.stats td.v.a { text-align: right; }
.stats td.v.hi { color: var(--red-text); }
.stats td.v.d.hi { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink); text-underline-offset: 3px; }
.stats td.l { text-align: center; color: var(--ink-2); }
.stats td.l .troop-type { color: var(--mute); margin-right: 4px; }
.special { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); border-top: 1px solid var(--line); }
.special > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.special .vals { display: flex; gap: 10px; font-weight: 600; white-space: nowrap; }
.special .vals .off { color: var(--mute); font-weight: 400; }
.note { padding: 8px 10px; color: var(--mute); font-size: 12px; border-top: 1px solid var(--line); background: var(--fill-2); }
.skillcmp td.s { width: 50%; }
.skillcmp .sk { display: flex; align-items: center; gap: 6px; }
.skillcmp .sk .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skillcmp .sk .st { font-weight: 600; white-space: nowrap; text-align: right; }
.skillcmp .sk .st small { display: block; font-weight: 400; }
.skillcmp th { text-align: left; }
.skillcmp td { vertical-align: top; }
.skillcmp td.def-col { border-left: 1px solid var(--line); }
.skillcmp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

/* Chief profile */
.chief-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 12px; align-items: center; }
.chief-head h1 { font-size: 44px; overflow-wrap: anywhere; }
.chief-head .badges { margin-top: 6px; }
.chief-head form { align-self: start; text-align: right; }
.chief-head form small { display: block; margin-top: 4px; max-width: 220px; }
.power-fig { font: 700 22px/1 var(--cond); }
.notice { border: 1px solid var(--q2); color: var(--q2); padding: 8px 12px; margin-top: var(--gap); font-weight: 600; }
.notice.err { border-color: var(--red); color: var(--red); background: var(--red-tint); }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; margin-top: var(--gap); }
.changes { list-style: none; margin: 0; padding: 0; }
.changes > li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--line); align-items: baseline; }
.changes > li:last-child { border-bottom: 0; }
.changes .what b { font-weight: 600; }
.changes .what .ft { color: var(--ink-2); }
.changes .what .delta { font-weight: 700; font-family: var(--cond); font-size: 13.5px; margin-left: 4px; }
.changes .what ul { margin: 3px 0 0; padding-left: 16px; color: var(--ink-2); font-size: 12px; columns: 2 240px; column-gap: 24px; }
.changes .what ul li { break-inside: avoid; }
.obs { color: var(--mute); font-size: 12px; }
.history td.opp { max-width: 0; width: 55%; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 3; }
.chart .line { fill: none; stroke: var(--red); stroke-width: 2; }
.chart .dot { fill: #fff; stroke: var(--red); stroke-width: 1.5; }
.chart .dot.profile { fill: var(--ink); stroke: var(--ink); }
.chart .axis { font: 600 12px var(--cond); fill: var(--mute); }
.chart .axis.end { text-anchor: end; }
.legend { display: flex; gap: 12px; padding: 0 10px 8px; font-size: 12px; color: var(--mute); }
.legend i { display: inline-block; width: 8px; height: 8px; border: 1.5px solid var(--red); border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.legend i.p { background: var(--ink); border-color: var(--ink); }

/* Chiefs directory */
.sorts { display: flex; gap: 0; margin-left: auto; }
.sorts a { padding: 4px 10px; font-family: var(--cond); font-weight: 600; font-size: 13px; border: 1px solid var(--line-2); margin-left: -1px; }
.sorts a.on { background: var(--red); border-color: var(--red); color: #fff; position: relative; }
.sorts a:hover { text-decoration: none; }

/* Chat */
.chat-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.channels a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.channels a:last-child { border-bottom: 0; }
.channels a:hover { background: var(--fill-2); text-decoration: none; }
.channels a.on { background: var(--red-tint); color: var(--red-text); }
.channels .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.channels .n { color: var(--mute); font-size: 12px; }
.chan-ico { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: var(--fill); color: var(--ink-2); }
.feed { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 210px); overflow-y: auto; }
.feed .day { position: sticky; top: 0; background: #fff; padding: 6px 10px; border-bottom: 1px solid var(--line); font: 600 12px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); z-index: 1; }
.msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.msg.out { background: var(--fill-2); }
.msg .hd { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.msg .hd a.nm { font-weight: 600; }
.msg .hd time { color: var(--mute); font-size: 12px; }
.msg p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; max-width: 75ch; }
.msg .card { margin-top: 4px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); padding: 5px 8px; font-size: 12px; }
.msg .card:hover { border-color: var(--red); text-decoration: none; }
.msg .card .ico { color: var(--red); }

/* Error page */
.error-mod { max-width: 620px; margin: 40px auto; }
.error-mod .mod-b { padding: 20px; }
.error-mod p { margin: 8px 0 16px; }

@media (max-width: 1280px) {
  .layout-3 { grid-template-columns: 190px minmax(0, 1fr); }
  .layout-3 > .rail-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
  .layout-3 > .rail-right .mod + .mod { margin-top: 0; }
  .layout-2 { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 980px) {
  .layout-3, .layout-2, .halves, .chat-layout { grid-template-columns: minmax(0, 1fr); }
  .layout-3 > .rail-right { grid-template-columns: minmax(0, 1fr); }
  .rail-left .mod-b { display: flex; flex-wrap: wrap; padding: 4px; }
  .rail-left .facet { border: 1px solid var(--line); margin: 2px; }
  .matchup { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .matchup .compare { grid-column: 1 / -1; grid-row: 2; border: 0; border-top: 1px solid var(--line); }
  .gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gear-slot:nth-child(3n) { border-right: 1px solid var(--line); }
  .gear-slot:nth-child(2n) { border-right: 0; }
  .gear-slot:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .gear-slot:nth-last-child(-n+2) { border-bottom: 0; }
  .chief-head { grid-template-columns: auto minmax(0, 1fr); }
  .chief-head form { grid-column: 1 / -1; text-align: left; }
  .feed { max-height: none; }
}
@media (max-width: 720px) {
  .top-row { flex-wrap: wrap; gap: 8px 10px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .status .status-detail { display: none; }
  .page { padding: 10px 10px 32px; }
  .reports thead { display: none; }
  .reports tbody tr { display: grid; gap: 8px 10px; padding: 10px; border-bottom: 1px solid var(--line); }
  .reports tbody td { border: 0; padding: 0; width: auto !important; max-width: none !important; }
  .matchup .side h2 { font-size: 18px; }
  .gear-grid { grid-template-columns: minmax(0, 1fr); }
  .gear-slot { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .gear-slot:last-child { border-bottom: 0 !important; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div { border-bottom: 1px solid var(--line); }
  .report-head { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 24px; }
  .chief-head h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.mt { margin-top: var(--gap); }
.minw0 { min-width: 0; }
.delta-inline { font-weight: 600; margin-left: 4px; }
.skill-chip.plain { padding-left: 6px; }
.power-fig.small { font-size: 17px; }
.hero-wrap + .hero-wrap { border-top: 1px solid var(--line); }
.hero-wrap .hero-row { border-bottom: 0; }
.hero-wrap .note { border-top: 0; }
.msg.fresh { animation: flash 2.4s cubic-bezier(.16,1,.3,1); }

.chat-layout > .mod + .mod, .layout-2 .mod:first-child { margin-top: 0; }
.statgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.statgrid > .tbl + .tbl { border-left: 1px solid var(--line); }
.stats th .ico { vertical-align: -2px; }
.stats td.v { width: 34%; }
.stats.one td:first-child { color: var(--ink-2); }
.sw { display: inline-block; width: 8px; height: 8px; margin: 0 5px; vertical-align: 0; }
.sw.a { background: var(--red); }
.sw.d { background: var(--ink); }
.lineup { display: flex; gap: 8px; }
.side.def .lineup { flex-direction: row-reverse; }
.lineup-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 52px; }
.lineup-hero small { font-size: 12px; color: var(--ink-2); max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); }
.side.def .comp { flex-direction: row-reverse; }
.comp-item { display: grid; grid-template-columns: auto auto; column-gap: 5px; align-items: center; padding: 5px 10px; border-right: 1px solid var(--line); }
.side.def .comp-item { border-right: 0; border-left: 1px solid var(--line); }
.comp-item:last-child { border-right: 0; }
.side.def .comp-item:last-child { border-left: 0; }
.comp-item b { font: 700 15px/1 var(--cond); }
.comp-item small { grid-column: 1 / -1; font-size: 12px; }
.comp-item .ico { color: var(--mute); }
.skillcmp ul { gap: 2px; }
.skillcmp .sk { padding: 2px 0; }
.skillcmp .sk .val { color: var(--mute); font-size: 12px; white-space: nowrap; }
.skillcmp .sk .st { min-width: 44px; font-family: var(--cond); font-size: 14px; }
.skillcmp .sk .st .sub { font-family: var(--sans); font-size: 12px; font-weight: 400; }
@media (max-width: 980px) {
  .statgrid { grid-template-columns: minmax(0, 1fr); }
  .statgrid > .tbl + .tbl { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .reports tbody tr { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .reports td.when { grid-column: 1 / -1; }
  .reports td.when .badges { display: inline-flex; margin: 0 0 0 6px; vertical-align: 1px; }
  .reports td.when b { display: inline; }
  .reports td.party { grid-column: span 3; order: 1; }
  .reports td.result { grid-column: 1 / -1; order: 2; }
  .reports td.nums { grid-column: span 2; order: 3; text-align: left; }
  .reports td.nums::before { content: attr(data-label); display: block; font: 600 12px/1.2 var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
  .reports td.nums .pair { justify-content: start; }
  .matchup .side.def { align-items: flex-start; text-align: left; }
  .matchup .side.def .chief, .matchup .side.def .role, .side.def .lineup, .side.def .comp { flex-direction: row; }
}
.mod-h h2.tab { font-size: 13.5px; line-height: 1; letter-spacing: .05em; margin: 0; }
.matchup .won { font: 700 14px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; }
.matchup .atk .won { color: var(--red-text); }
@media (max-width: 720px) {
  .tbl.troops, .tbl.history { display: block; overflow-x: auto; white-space: nowrap; }
  .tbl.troops td.name { min-width: 180px; }
}

.report-head { padding: 14px 12px 12px; }
.report-head .more { align-self: start; display: flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.compare tr.key td.v { font: 700 22px/1 var(--cond); padding-top: 8px; padding-bottom: 8px; }
.pairs { margin-top: var(--gap); }
.pair-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.pair-row + .pair-row { margin-top: var(--gap); }
.pair-row > .half { display: flex; flex-direction: column; min-width: 0; }
.pair-row > .half > .mod { flex: 1; }
.pair-row > .half > .mod + .mod { margin-top: var(--gap); }
.troops tr.grp td { background: var(--fill); font-weight: 600; border-bottom: 1px solid var(--line); }
.troops tr.grp td.name { font: 600 13px/1.2 var(--cond); letter-spacing: .05em; text-transform: uppercase; }
.troops tr.grp .ico { color: var(--mute); margin-right: 4px; }
details.member .member-body { padding: 0 10px 10px; background: var(--fill-2); }
details.member .member-body > .mod { margin-top: var(--gap); }
.layout-2 aside .statgrid { grid-template-columns: minmax(0, 1fr); }
.layout-2 aside .statgrid > .tbl + .tbl { border-left: 0; border-top: 1px solid var(--line); }
.layout-2 > aside > .mod + .mod, .layout-2 > div > .mod + .mod { margin-top: var(--gap); }
.badge.new-row { margin-left: 4px; }
.nav .unread { display: none; min-width: 18px; height: 18px; padding: 0 5px; background: var(--red); color: #fff; font: 700 12px/18px var(--cond); text-align: center; }
.nav .unread.on { display: inline-block; }
@media (max-width: 980px) {
  .pair-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  h1 { font-size: 30px; }
  .chief-head h1 { font-size: 32px; }
  .matchup { grid-template-columns: minmax(0, 1fr); }
  .matchup .compare { grid-row: auto; order: 3; }
  .matchup .side.def { order: 2; border-top: 1px solid var(--line); }
  .matchup .side .chief .who small, .chief .who small { white-space: normal; }
  .reports td.party .who small { white-space: normal; }
}
@media (max-width: 720px) {
  .skillcmp thead { display: none; }
  .skillcmp tr, .skillcmp td, .skillcmp th { display: block; width: auto !important; }
  .skillcmp td.def-col { border-left: 0; }
  .skillcmp td.s::before { content: attr(data-side); display: block; margin-bottom: 4px; font: 600 12px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
}
.troops.folded tbody.grp-body:not(.open) tr.ln { display: none; }
.fold-toggle { margin-left: 8px; border: 1px solid var(--line-2); background: #fff; font: 600 12px/1 var(--cond); letter-spacing: .03em; padding: 3px 6px; cursor: pointer; color: var(--ink-2); text-transform: none; }
.fold-toggle:hover { border-color: var(--red); color: var(--red); }
.troops:not(.folded) .fold-toggle { display: none; }
.pair-row.troops-row { align-items: start; }
.pair-row.troops-row > .half > .mod { flex: none; }
.msg p.tr { color: var(--ink-2); }
.msg p.tr .sub { font: 600 12px/1 var(--cond); letter-spacing: .05em; text-transform: uppercase; margin-right: 4px; }
