/* Tri-Alliance Clash, Alliance Championship and Masters guides (on top of the er-* guide styles) */
.ga-chk { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #f2c94c1f; border: 1px solid #f2c94c; color: #f2c94c; white-space: nowrap; vertical-align: middle; cursor: help; font-family: var(--font-body); letter-spacing: 0; }
.ga-todo { margin-top: 10px; padding: 8px 12px; border-radius: 10px; border: 1px dashed #e3a144; background: #e3a14412; font-size: 13px; }
.ga-todo b { color: #e3a144; }
.ga-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; align-items: start; }
.ga-box { display: grid; gap: 8px; align-content: start; min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--line)); }
.ga-box h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ga-box h3 .er-ic { width: 32px; height: 32px; }
.ga-box p { font-size: 14px; }
.ga-chips, .ga-rules { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ga-rules { margin: 12px 0 8px; }
.ga-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 700; }
.ga-chip .er-ic, .ga-chip img { width: 24px; height: 24px; flex: none; border-radius: 6px; object-fit: cover; }
.ga-chip.yes { border-color: #5fbf83; background: #5fbf831a; }
.ga-chip.no { border-color: #e06a5f; background: #e06a5f1a; }
.ga-item { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; text-align: center; }
.ga-item img { width: 44px; height: 44px; object-fit: contain; }
.ga-troop { width: 40px; height: 46px; flex: none; object-fit: cover; object-position: center top; border-radius: 8px; background: linear-gradient(#5c8fb3, #3d6a8c); }
.ga-troop.sm { width: 22px; height: 26px; border-radius: 5px; vertical-align: middle; }
.ga-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.ga-tip-h { display: flex; align-items: center; gap: 8px; }
.ga-tip-h .er-ic { width: 36px; height: 36px; }
.ga-scroll { overflow-x: auto; }
.ga-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--c); margin-left: 5px; }

.ga-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 10px 0 6px; }
.ga-day { min-width: 0; padding: 6px 2px; text-align: center; border-radius: 8px; border-top: 3px solid var(--c); background: color-mix(in srgb, var(--c) 14%, var(--panel-2)); }
.ga-day b { display: block; font-size: 13px; }
.ga-day small { display: block; font-size: 11px; color: var(--muted); line-height: 1.2; overflow-wrap: anywhere; }
.ga-day.off { opacity: .5; background: var(--panel-2); border-top-color: var(--line); }

.ga-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.ga-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #10140f; background: var(--panel); border: 1px solid var(--line); }
.ga-dot.on { background: var(--c); border-color: var(--c); }

.ga-people { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin: 12px 0; }
.ga-person { display: block; color: var(--c); transition: opacity .15s; }
.ga-person svg { width: 100%; height: auto; display: block; fill: currentColor; }
.ga-person.dim { opacity: .15; }

.ga-phasebar { display: flex; height: 40px; border-radius: 8px; overflow: hidden; font-size: 12px; font-weight: 800; }
.ga-phasebar span { display: grid; place-items: center; min-width: 0; background: var(--c); color: #10140f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.ga-phasebar span + span { border-left: 2px solid var(--bg); }
.ga-cursor { position: absolute; top: -5px; bottom: -5px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--bg); transition: left .1s; }

.ga-mix { display: flex; height: 34px; border-radius: 8px; overflow: hidden; font-size: 12px; font-weight: 800; }
.ga-mix span { display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; overflow: hidden; white-space: nowrap; background: color-mix(in srgb, var(--c) 70%, transparent); color: #10140f; }
.ga-mix img { width: 22px; height: 26px; object-fit: cover; object-position: center top; border-radius: 4px; flex: none; }

.ga-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.ga-p { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 6px 4px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.ga-p b { font-size: 13px; }
.ga-p .ga-tier { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; font-size: 12px; }
.ga-portrait { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: color-mix(in srgb, var(--c) 20%, var(--panel-2)); border: 2px solid var(--c); }
.ga-tier { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font-weight: 800; color: #10140f; background: var(--c); }

.ga-ladder { display: flex; align-items: flex-end; gap: 6px; margin: 8px 0 4px; }
.ga-rung { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ga-rung span { width: 100%; border-radius: 6px 6px 0 0; background: var(--c); }
.ga-rung small { font-size: 11px; font-weight: 700; color: var(--muted); overflow-wrap: anywhere; }

/* Tri-Alliance Clash */
.tac-hero { background: radial-gradient(circle at 0 0, #e06a5f33, transparent 60%), var(--panel); }
.tac-sides { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tac-side { flex: 1 1 0; min-width: 0; display: grid; gap: 4px; justify-items: center; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.tac-side b { font-size: 12px; color: var(--c); }
.tac-troops { display: flex; gap: 2px; }
.tac-troops .ga-troop { width: 24px; height: 28px; border-radius: 5px; }
.tac-eq { font: 800 18px var(--font-display); color: var(--muted); }
.tac-cycle { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.tac-wk { display: grid; gap: 3px; }
.tac-wk small { font-size: 11px; color: var(--muted); }
.tac-wk-days { display: flex; gap: 2px; }
.tac-wk-days i { width: 10px; height: 10px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); }
.tac-wk-days i.on { background: #e06a5f; border-color: #e06a5f; box-shadow: 0 0 6px #e06a5f; }
.tac-clock { margin-top: 6px; }
.tac-clock-bar { position: relative; height: 26px; border-radius: 8px; background: linear-gradient(90deg, #1b2433, #3a4658 50%, #1b2433); border: 1px solid var(--line); overflow: hidden; }
.tac-clock-bar span { position: absolute; top: 0; bottom: 0; background: #f2c94c; }
.tac-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 6px; margin-top: 10px; }
.tac-slot { display: grid; justify-items: center; padding: 6px 4px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); border-top: 3px solid #f2c94c; }
.tac-slot b { font: 800 17px var(--font-display); color: var(--gold-2); }
.tac-slot em { font-style: normal; font-weight: 800; font-size: 14px; white-space: nowrap; }
.tac-slot small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.tac-roster { display: grid; gap: 10px; margin: 12px 0; }
.tac-roster small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tac-lanes { max-width: 420px; margin: 10px auto 0; }
.tac-phase-wrap { position: relative; margin-top: 6px; }
.tac-now { margin-top: 10px; }
.tac-energy { display: flex; flex-wrap: wrap; gap: 6px; }
.tac-presets .er-step { flex: 1 1 90px; }

/* Alliance Championship */
.achp-hero { background: radial-gradient(circle at 0 0, #f2c94c33, transparent 60%), var(--panel); }
.achp-rounds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; margin-top: 12px; }
.achp-round { display: grid; gap: 4px; align-content: start; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.achp-rbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; font-size: 11px; font-weight: 800; }
.achp-rbar span { display: grid; place-items: center; white-space: nowrap; overflow: hidden; }
.achp-rbar .prep { flex: 11; background: #6aa6e844; }
.achp-rbar .fight { flex: 3; background: #e06a5f; color: #10140f; }
.achp-round small { font-size: 12px; }
.achp-eye { display: flex; align-items: center; gap: 6px; color: var(--text); }
.achp-eye .er-ic { width: 24px; height: 24px; }
.achp-opps { display: flex; gap: 8px; margin: 8px 0; }
.achp-opp { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 2px; }
.achp-opp svg { width: 100%; max-width: 40px; height: auto; }
.achp-opp small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.achp-lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.achp-lane { display: grid; gap: 4px; justify-items: center; padding: 14px 6px; border-radius: 12px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 10%, var(--panel-2)); color: var(--text); cursor: pointer; }
.achp-lane span { font-weight: 800; font-size: 14px; }
.achp-lane.win { background: #5fbf8326; }
.achp-lane.win span { color: #5fbf83; }
.achp-lane.lose { opacity: .7; }
.achp-lane.lose span { color: #e06a5f; }
.achp-queue { display: flex; align-items: flex-end; gap: 6px; padding: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.achp-q { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 3px; }
.achp-q span { width: 100%; max-width: 34px; border-radius: 6px 6px 0 0; background: linear-gradient(#e06a5f, #e06a5f88); }
.achp-q small { font-size: 11px; color: var(--muted); height: 14px; }
.achp-q-l { flex: 0 0 auto; align-self: center; text-align: right; }
.achp-stop { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-weight: 800; }
.achp-snap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 10px 0; }
.achp-snap .btn { justify-self: start; }
.achp-leave { display: grid; gap: 8px; }
.achp-leave-bar { display: flex; align-items: stretch; height: 30px; border-radius: 8px; overflow: hidden; font-size: 12px; font-weight: 800; }
.achp-leave-bar span { flex: 1; display: grid; place-items: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.achp-leave-bar .before { background: #e06a5f33; }
.achp-leave-bar .after { background: #5fbf8333; }
.achp-leave-bar i { flex: none; display: grid; place-items: center; padding: 0 6px; font-style: normal; background: #f2c94c; color: #10140f; }
.achp-split { margin-top: 10px; }
.achp-ranked .ga-dot { width: 24px; height: 24px; }
.achp-rd-out { margin-top: 10px; max-width: 520px; }
.achp-shop .ga-chips { justify-content: center; }

/* Masters */
.mst-hero { background: radial-gradient(circle at 0 0, #c58be033, transparent 60%), var(--panel); }
.mst-axis { position: relative; height: 128px; margin: 16px 22px 4px; border-bottom: 3px solid var(--line); }
.mst-axis-pt { position: absolute; bottom: -3px; width: 36px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.mst-axis-pics { display: flex; flex-direction: column-reverse; gap: 2px; }
.mst-axis-pics img { width: 34px; height: 34px; border-radius: 9px; border: 2px solid #c58be0; background: var(--panel-2); display: block; }
.mst-axis-pt i { width: 3px; height: 8px; background: #c58be0; }
.mst-axis-pt b { position: absolute; top: 100%; margin-top: 4px; font-size: 12px; color: #c58be0; }
.mst-axis + .er-scale { margin-top: 20px; }
.mst-pips { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.mst-pips i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(#f2c94c, #d8b25a88); }
.mst-skills { display: flex; gap: 6px; }
.mst-skills span, .mst-sk { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #a77de0; color: #10140f; font-weight: 800; }
.mst-classes { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 3px; }
.mst-cls { display: grid; justify-items: center; gap: 2px; padding: 3px 1px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); cursor: pointer; opacity: .45; filter: grayscale(.8); transition: opacity .15s; }
.mst-cls img { width: 100%; max-width: 44px; height: auto; display: block; }
.mst-cls small { font-size: 10px; font-weight: 800; }
.mst-cls.on { opacity: 1; filter: none; border-color: #c58be0; color: var(--text); }
.mst-grow { display: grid; gap: 8px; }
.mst-g-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.mst-g-in { flex: 1 1 180px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mst-g-in .er-ic { width: 40px; height: 40px; }
.mst-g-out { flex: 0 1 auto; padding: 4px 10px; border-radius: 999px; background: #e06a5f22; border: 1px solid #e06a5f; font-size: 14px; }
.mst-emb { width: 34px; height: 34px; object-fit: contain; flex: none; }
.mst-swap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 10px; border-radius: 10px; border: 1px dashed #f2c94c; }
.mst-swap > .er-ic { width: 44px; height: 44px; }
.mst-embs { display: flex; flex-wrap: wrap; gap: 2px; }
.mst-embs .mst-emb { width: 28px; height: 28px; }
.mst-queue { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.mst-queue img { width: 40px; height: 40px; border-radius: 9px; display: block; }
.mst-q-slot { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 9px; background: repeating-linear-gradient(135deg, #e3a14466 0 8px, #e3a14433 8px 16px); border: 1px solid #e3a144; font-weight: 800; font-size: 13px; white-space: nowrap; }
.mst-q-wait { flex: none; display: grid; justify-items: center; opacity: .45; }
.mst-q-wait small { font-size: 10px; color: var(--muted); }
.mst-jbar { position: relative; height: 16px; margin: 8px 0 26px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.mst-jbar > span { display: block; height: 100%; border-radius: 8px; background: #e06a5f; }
.mst-jbar i { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: var(--text); }
.mst-jbar i b { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px; font-size: 12px; font-style: normal; }
.mst-locked { opacity: .6; }
.mst-research { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px; border-radius: 10px; background: #c58be014; border: 1px solid #c58be0; }
.mst-research > .er-ic { width: 52px; height: 52px; }
.mst-res-blocks { flex: 1 1 200px; display: flex; gap: 3px; }
.mst-res-blocks span { flex: 1; min-width: 0; padding: 8px 2px; border-radius: 6px; background: #c58be055; text-align: center; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.mst-res-out { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: baseline; }
.mst-res-out b { font: 800 20px var(--font-display); color: var(--gold-2); }
.mst-res-out small { font-size: 12px; color: var(--muted); }
.mst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; margin: 10px 0; }
.mst-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) 30px; gap: 8px; align-items: center; padding: 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid #c58be0; transition: opacity .15s; }
.mst-card div { display: grid; gap: 1px; }
.mst-card small { font-size: 12px; color: var(--muted); }
.mst-card .mst-day { color: #c58be0; font-weight: 800; }
.mst-card .mst-emb { width: 30px; height: 30px; }
.mst-card.off { opacity: .35; filter: grayscale(1); border-color: var(--line); }
.mst-face { width: 48px; height: 48px; border-radius: 10px; display: block; background: var(--panel); }
.mst-rank { display: flex; align-items: flex-end; gap: 6px; margin: 12px 0; }
.mst-rank-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mst-rank-bar { width: 100%; max-width: 48px; border-radius: 6px 6px 0 0; background: var(--c); }
.mst-rank-col img { width: 100%; max-width: 44px; aspect-ratio: 1; border-radius: 9px; border: 2px solid var(--c); display: block; }
.mst-rank-col small { font-size: 11px; font-weight: 700; overflow-wrap: anywhere; text-align: center; }
.mst-tname { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.mst-tname img { width: 26px; height: 26px; border-radius: 6px; }
.mst-cost { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: #a77de014; border: 1px solid #a77de0; }
.mst-cost > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mst-cost b { font: 800 22px var(--font-display); color: var(--gold-2); }
.mst-cost small { font-size: 13px; color: var(--muted); }
.mst-orders { display: grid; gap: 8px; margin-top: 10px; }
.mst-order { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mst-order .mst-tname { width: 96px; }
.mst-chain { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mst-chain i { font-style: normal; font-weight: 800; color: var(--muted); }
.mst-kvk { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; margin-top: 10px; }
.mst-kvk label { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 8px; align-items: center; font-size: 13px; font-weight: 700; }
.mst-kvk label .er-ic { width: 40px; height: 40px; grid-row: span 2; }
.mst-kvk input { font-size: 16px; font-weight: 700; }

@media (max-width: 700px) {
  .ga-people { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .mst-classes { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .achp-q-l { display: none; }
}
