/* Event guides (Bear Hunt, Castle Battle, KvK, Flamedragon Tyrant): extras on top of the er-* styles */
.ge-hero-bh { background: radial-gradient(circle at 0 0, #e3a14433, transparent 60%), var(--panel); }
.ge-hero-cb { background: radial-gradient(circle at 0 0, #6aa6e833, transparent 60%), var(--panel); }
.ge-hero-kv { background: radial-gradient(circle at 0 0, #e06a5f33, transparent 60%), var(--panel); }
.ge-hero-fd { background: radial-gradient(circle at 0 0, #ff7a3d33, transparent 60%), var(--panel); }
.er-hero img.er-ic { width: 72px; height: 72px; object-fit: contain; }
.ge-sec-p { margin: 10px 0; }

/* draft markers */
.ge-chk { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #f0cf7e; background: #e3a14422; border: 1px solid #e3a14488; vertical-align: middle; cursor: help; white-space: nowrap; }
.ge-chk-box { margin: 10px 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: #e3a14414; border: 1px dashed #e3a14488; color: var(--muted); }
.ge-chk-box b { color: #f0cf7e; }
.ge-todo { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; border: 2px dashed var(--line); background: repeating-linear-gradient(135deg, #ffffff06 0 8px, transparent 8px 16px); font-size: 13px; color: var(--muted); }
.ge-todo b { color: var(--text); display: block; }
.ge-todo > span:first-child { font-size: 18px; line-height: 1; }

/* key fact tiles */
.ge-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
.ge-fact { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--gold)); min-width: 0; }
.ge-fact .er-ic { width: 38px; height: 38px; }
.ge-fact div { display: grid; min-width: 0; }
.ge-fact b { font: 800 20px var(--font-display); color: var(--c, var(--gold-2)); line-height: 1.1; }
.ge-fact small { color: var(--muted); font-size: 12px; }

/* hero portraits */
.ge-heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.ge-hero { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 4px 6px; border-radius: 10px; background: color-mix(in srgb, var(--c, var(--gold)) 12%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--c, var(--gold)) 45%, transparent); min-width: 0; text-align: center; }
.ge-hero img { width: 100%; max-width: 70px; aspect-ratio: 1; object-fit: cover; object-position: top; border-radius: 8px; display: block; background: #0004; }
.ge-hero b { font-size: 12px; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.ge-hero small { font-size: 11px; color: var(--muted); line-height: 1.2; }
.ge-hero.dim { opacity: .45; }
.ge-group { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--gold)); min-width: 0; }
.ge-group-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ge-group-h img { width: 30px; height: 30px; object-fit: contain; }
.ge-group-h small { color: var(--muted); font-size: 12px; }
.ge-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }

/* tier list */
.ge-tier { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; align-items: stretch; margin-top: 8px; }
.ge-tier-l { display: grid; place-items: center; border-radius: 10px; font: 800 18px var(--font-display); color: #10140f; background: var(--c); }
.ge-tier-rows { display: grid; gap: 6px; min-width: 0; }
.ge-tier-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.ge-tier-row .ge-faces { display: flex; gap: 4px; flex-wrap: wrap; }
.ge-face { position: relative; display: grid; justify-items: center; width: 52px; }
.ge-face img { width: 46px; height: 46px; object-fit: cover; object-position: top; border-radius: 8px; border: 2px solid var(--c, var(--line)); }
.ge-face small { font-size: 10px; color: var(--muted); max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ge-skill { font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--gold)) 18%, transparent); color: var(--text); }

/* troop ratio bars */
.ge-ratio { display: flex; height: 36px; border-radius: 8px; overflow: hidden; font-size: 12px; font-weight: 800; border: 1px solid var(--line); }
.ge-ratio span { display: flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; overflow: hidden; min-width: 0; color: #10140f; }
.ge-ratio span img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.ge-ratio .i { background: #6aa6e8; }
.ge-ratio .c { background: #e3a144; }
.ge-ratio .a { background: #c58be0; }
.ge-ratio.big { height: 54px; font-size: 15px; }
.ge-ratio.big span img { width: 32px; height: 32px; }
.ge-ratios { display: grid; gap: 8px; }
.ge-ratio-row { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; }
.ge-ratio-row > b { font-weight: 700; }
.ge-ratio-row small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.ge-tlegend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.ge-tlegend span { display: inline-flex; align-items: center; gap: 4px; }
.ge-tlegend img { width: 20px; height: 20px; object-fit: contain; }

/* flows and cards */
.ge-flow { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.ge-flow .er-step { min-width: 0; }
.ge-flow .er-step img { width: 56px; height: 56px; object-fit: contain; }
.ge-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px; }
.ge-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--line)); min-width: 0; }
.ge-card > img, .ge-card > .er-ic { width: 40px; height: 40px; object-fit: contain; flex: none; }
.ge-card div { display: grid; gap: 2px; min-width: 0; }
.ge-card small { color: var(--muted); font-size: 13px; }
.ge-card.ok { border-top-color: #5fbf83; }
.ge-card.bad { border-top-color: #e06a5f; }
.ge-vs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.ge-col { display: grid; gap: 8px; align-content: start; padding: 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); border-top: 4px solid var(--c); min-width: 0; }
.ge-col h3 { margin: 0; font-size: 16px; color: var(--c); display: flex; align-items: center; gap: 8px; }
.ge-col h3 img { width: 30px; height: 30px; object-fit: contain; }
.ge-col ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.ge-li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.ge-li img { width: 32px; height: 32px; object-fit: contain; flex: none; border-radius: 6px; }

/* timelines */
.ge-tl { display: grid; gap: 4px; margin-top: 10px; }
.ge-tl-bar { position: relative; display: flex; height: 40px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.ge-tl-bar > span { display: grid; place-items: center; font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; min-width: 0; color: #10140f; background: var(--c, transparent); }
.ge-tl-bar > span.off { color: var(--muted); background: transparent; }
.ge-tl-bar .ge-now { position: absolute; top: -2px; bottom: -2px; width: 3px; background: #fff; box-shadow: 0 0 0 1px #000a; border-radius: 2px; }
.ge-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ge-day { display: grid; gap: 2px; align-content: start; padding: 6px 4px; border-radius: 8px; text-align: center; font-size: 11px; background: color-mix(in srgb, var(--c, #9aa3b2) 18%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--c, #9aa3b2) 55%, transparent); min-width: 0; overflow-wrap: anywhere; cursor: default; }
.ge-day b { font-size: 12px; }
.ge-day.on { box-shadow: 0 0 0 2px var(--gold); }
.ge-day.off { opacity: .4; }
button.ge-day { cursor: pointer; color: var(--text); font: inherit; font-size: 11px; }

/* stacked meters */
.ge-meter { position: relative; height: 26px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; display: flex; }
.ge-meter > span { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 11px; font-weight: 800; color: #10140f; white-space: nowrap; overflow: hidden; background: var(--c); transition: width .2s; }
.ge-mark { position: absolute; top: 0; bottom: 0; width: 2px; background: #ffffffaa; }
.ge-marks { position: relative; height: 34px; font-size: 11px; color: var(--muted); }
.ge-marks span { position: absolute; transform: translateX(-50%); text-align: center; white-space: nowrap; display: grid; justify-items: center; }
.ge-marks span.end { transform: translateX(-100%); }
.ge-marks span.on { color: var(--gold-2); font-weight: 800; }

/* inputs */
.ge-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); gap: 8px; margin-top: 10px; }
.ge-inputs label { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-areas: "ic t" "ic in"; align-items: center; gap: 2px 8px; padding: 6px 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; }
.ge-inputs label img { grid-area: ic; width: 28px; height: 28px; object-fit: contain; }
.ge-inputs label span { grid-area: t; color: var(--muted); line-height: 1.2; }
.ge-inputs label input { grid-area: in; width: 100%; min-width: 0; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 700; }
.ge-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ge-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.ge-chip img { width: 22px; height: 22px; object-fit: contain; }
.ge-chip.plain { padding: 3px 9px; }
.ge-checks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ge-checks label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; cursor: pointer; }
.ge-checks input { width: auto; margin: 0; accent-color: var(--gold); }

/* medals, stars, icons in a row */
.ge-icons { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ge-icons img, .ge-icons .er-ic { width: 34px; height: 34px; object-fit: contain; }
.ge-icons .off { opacity: .25; filter: grayscale(1); }
.ge-pip { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 800; font-size: 13px; background: var(--panel-2); border: 2px solid var(--line); color: var(--muted); }
.ge-pip.on { background: var(--c, var(--gold)); border-color: var(--c, var(--gold)); color: #10140f; }

/* vertical bars chart */
.ge-cols { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 18px; }
.ge-colbar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.ge-colbar span { width: 100%; max-width: 64px; border-radius: 6px 6px 0 0; background: var(--c); transition: height .2s; }
.ge-colbar b { font-size: 13px; }
.ge-colbar small { font-size: 11px; color: var(--muted); text-align: center; }
.ge-colbar.off span { opacity: .3; }

/* skill table bars (lasts vs cooldown) */
.ge-skills { display: grid; gap: 8px; }
.ge-sk { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--c); }
.ge-sk-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ge-sk-h small { color: var(--muted); font-size: 12px; }
.ge-sk-bars { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 3px 8px; align-items: center; font-size: 11px; color: var(--muted); }
.ge-sk-bars .er-hbar { height: 10px; }

/* simple svg diagrams */
.ge-dia { width: 100%; max-width: 420px; height: auto; display: block; margin: 8px auto; }
.ge-dia text { font: 700 11px var(--font-body); fill: var(--text); }
.ge-dia .mut { fill: var(--muted); font-weight: 600; }
.ge-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; }
.ge-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ge-tablewrap .er-table { min-width: 460px; }
.ge-table-ic { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.ge-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--c, var(--gold)) 10%, transparent); border-left: 4px solid var(--c, var(--gold)); font-size: 14px; }
.ge-big-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: 8px; margin-top: 10px; }

@media (max-width: 700px) {
  .ge-ratio-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ge-split { grid-template-columns: minmax(0, 1fr); }
  .ge-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ge-tier { grid-template-columns: 36px minmax(0, 1fr); }
}
.ge-day span { display: block; overflow-wrap: anywhere; }
