

html { --gc-start-face: 'Satoshi', 'Ioskeley Mono', sans-serif; }
#ego-ui .ego-card { display: none; position: absolute; left: 0; right: 0; top: 24%; transform: translateY(-28px); } 
#ego-ui .ego-card .c-num { color: var(--faint); letter-spacing: 0.3em; }
#ego-ui .ego-card .c-name { margin-top: 8px; font-size: clamp(22px, 4.4vw, 54px); letter-spacing: 0.04em; text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }
#ego-ui .ego-card .c-pil { max-width: min(100%, 24em); margin: 0 auto 12px; padding: 0 16px; box-sizing: border-box; color: var(--dim); letter-spacing: 0.16em; text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
#ego-ui .ego-card .c-pil:empty { display: none; }
#ego-ui .ego-card .c-sub { display: block; margin-top: 10px; color: var(--dim); letter-spacing: 0.24em; } 
#ego-ui .ego-card .c-sub:empty { display: none; }
#ego-ui .ego-clear { display: none; position: absolute; left: 0; right: 0; top: 14%; }
#ego-ui .ego-clear .k-title { font-size: clamp(26px, 5.4vw, 66px); color: var(--accent); letter-spacing: 0.04em; }
#ego-ui .ego-clear .k-score { margin-top: 14px; font-size: clamp(14px, 2.2vw, 20px); color: var(--ink); }
#ego-ui .ego-clear .k-bonus { margin-top: 8px; color: var(--dim); }
#ego-ui .ego-clear .gc-cta { margin-top: 22px; }
#ego-ui .ego-hud { display: none; position: absolute; text-align: left; } 
#ego-ui .ego-hud span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 700 12px / 1.5 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.16em; color: var(--dim); }
#ego-ui .ego-over .o-again { pointer-events: auto; background: transparent; cursor: pointer; min-height: 44px; }
#ego-ui .ego-over .o-again:hover, #ego-ui .ego-over .o-again:focus-visible { background: var(--accent); color: var(--bg); outline: none; }
#ego-ui .ego-over .o-level { color: var(--faint); margin-bottom: 4px; }
#ego-ui .ego-over .o-start { pointer-events: auto; display: none; margin: 12px auto 0; padding: 8px 18px; background: transparent; border: 1px solid var(--faint); color: var(--dim); font: 700 12px / 1 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.16em; cursor: pointer; min-height: 44px; }
#ego-ui .ego-over .o-start:hover, #ego-ui .ego-over .o-start:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
@media (max-width: 600px) {
  #ego-ui .ego-card { top: 20%; }
}
@media (orientation: landscape) and (max-height: 520px) {
  #ego-ui .ego-card { top: 12%; }
  #ego-ui .ego-clear { top: 8%; }
}

#ego-ui .ego-stage { position: absolute; left: 0; right: 0; top: 0; bottom: 0; text-align: left; }
#ego-ui .e-t { position: absolute; margin: 0; white-space: pre; text-align: left; font: 700 14px / 21px 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.16em; color: var(--faint); }

#ego-ui { --e-body: #e5483f; --e-armour: #9db4ca; --e-extra: #f2c14e; --e-coin: #f2c14e; --e-crack: #0b0507; --e-blade: #c9d3de; --e-hilt: #8a7256; }
html.mode-light #ego-ui { --e-body: #b3261e; --e-armour: #46607c; --e-extra: #8c6200; --e-coin: #8c6200; --e-blade: #4a5868; --e-hilt: #2b2118; }
#ego-ui .e-hearts { display: none; position: absolute; }
#ego-ui .e-heart { position: absolute; display: block; line-height: 0; }
#ego-ui .e-heart svg { display: block; width: 100%; height: 100%; shape-rendering: crispEdges; overflow: visible; }
#ego-ui .e-heart[data-kind="body"] { --hc: var(--e-body); }
#ego-ui .e-heart[data-kind="armour"] { --hc: var(--e-armour); }
#ego-ui .e-heart[data-kind="extra"] { --hc: var(--e-extra); }
#ego-ui .e-heart .hf { fill: var(--hc); }
#ego-ui .e-heart .hl { fill: #fff; fill-opacity: 0.5; }
#ego-ui .e-heart .hr { fill: var(--dim); display: none; }
#ego-ui .e-heart .hc { fill: var(--e-crack); display: none; }
#ego-ui .e-heart[data-state="empty"] .hf, #ego-ui .e-heart[data-state="empty"] .hl { display: none; }
#ego-ui .e-heart[data-state="empty"] .hr { display: inline; }
#ego-ui .e-heart[data-kind="extra"][data-state="empty"] .hr { fill-opacity: 0.4; } 
#ego-ui .e-heart[data-hit="1"] { animation: e-shake 0.42s steps(1, end) 1; }
#ego-ui .e-heart[data-hit="1"] .hf { display: inline; fill-opacity: 0.55; }
#ego-ui .e-heart[data-hit="1"] .hc { display: inline; }
#ego-ui .e-heart[data-hit="1"] .hr { display: none; }
@keyframes e-shake {
  0% { transform: translate(0, 0); }
  14% { transform: translate(calc(var(--hs) * -1), 0); }
  28% { transform: translate(var(--hs), calc(var(--hs) * -1)); }
  42% { transform: translate(calc(var(--hs) * -1), var(--hs)); }
  56% { transform: translate(var(--hs), 0); }
  70% { transform: translate(calc(var(--hs) * -1), 0); }
  84% { transform: translate(var(--hs), 0); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { #ego-ui .e-heart[data-hit="1"] { animation: none; } }
#ego-ui .e-gold { display: none; position: absolute; white-space: nowrap; font: 700 20px 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.08em; color: var(--ink); }
#ego-ui .e-gold svg { display: inline-block; vertical-align: middle; width: calc(7 * var(--hs)); height: calc(7 * var(--hs)); margin-right: calc(2 * var(--hs)); shape-rendering: crispEdges; }
#ego-ui .e-gold .cf { fill: var(--e-coin); }
#ego-ui .e-gold .cl { fill: #fff; fill-opacity: 0.5; }
#ego-ui .e-gold .cs { fill: var(--e-crack); fill-opacity: 0.55; }
#ego-ui .e-gn { vertical-align: middle; }
#ego-ui .e-prog { display: none; position: absolute; }
#ego-ui .e-pline { position: relative; width: 100%; background: color-mix(in srgb, var(--dim) 50%, transparent); }
#ego-ui .e-pfill { display: block; width: 0; height: 100%; background: var(--ink); }
#ego-ui .e-pk { position: absolute; display: block; background: var(--e-extra); } 
#ego-ui .e-pt { position: absolute; left: 0; white-space: pre; font: 700 12px / 16px 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.16em; color: var(--dim); }
#ego-ui .e-pop { display: none; position: absolute; white-space: pre; font: 700 13px / 16px 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.08em; color: var(--e-extra); }
#ego-ui .e-fly { position: absolute; display: block; line-height: 0; width: calc(7 * var(--hs)); height: calc(7 * var(--hs)); pointer-events: none; }
#ego-ui .e-fly svg { display: block; width: 100%; height: 100%; shape-rendering: crispEdges; }
#ego-ui .e-fly .cf { fill: var(--e-coin); }
#ego-ui .e-fly .cl { fill: #fff; fill-opacity: 0.5; }
#ego-ui .e-fly .cs { fill: var(--e-crack); fill-opacity: 0.55; }

#ego-ui .e-lant { display: none; position: absolute; white-space: pre; font: 700 13px / 16px 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.06em; padding: 3px 6px; background: color-mix(in srgb, var(--bg) 72%, transparent); color: var(--e-extra); }
#ego-ui .e-score { display: none; position: absolute; top: 0; width: 0; height: 0; }
#ego-ui .e-score .e-t { right: 0; text-align: right; }
#ego-ui .e-sn { font-family: 'Satoshi', 'Ioskeley Mono', sans-serif; font-weight: 900; letter-spacing: 0.02em; color: var(--ink); }
#ego-ui .e-bar { position: absolute; right: 0; height: 2px; background: var(--faint); }
#ego-ui .e-bar i { display: block; width: 0; height: 100%; background: var(--dim); }
#ego-ui .e-bar[data-surge="1"] i { background: var(--accent); }
#ego-ui .e-sg { color: var(--dim); }
#ego-ui .e-sg[data-surge="1"] { color: var(--accent); }
#ego-ui .e-say { display: none; position: absolute; margin: 0; white-space: pre; text-align: left; font: 900 28px / 1.12 'Satoshi', 'Ioskeley Mono', sans-serif; letter-spacing: -0.01em; color: var(--ink); }
#ego-ui .e-say[data-gold="1"] { color: var(--accent); }

#ego-ui .e-say[data-teach] { font-family: 'Ioskeley Mono', ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: 0.06em; padding: 3px 6px; background: color-mix(in srgb, var(--bg) 72%, transparent); color: var(--ink); }

#ego-ui .e-combo { display: none; position: absolute; white-space: pre; text-align: right; transform-origin: right center; font: 700 13px / 16px 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.06em; padding: 3px 6px; background: color-mix(in srgb, var(--bg) 72%, transparent); color: var(--accent); pointer-events: none; }

#ego-ui .e-ic svg { display: block; height: calc(8 * var(--hs)); width: auto; shape-rendering: crispEdges; overflow: visible; }
#ego-ui .e-ic svg[viewBox="0 0 7 7"] { height: calc(7 * var(--hs)); }
#ego-ui .e-ic .hf { fill: var(--e-extra); }
#ego-ui .e-ic .hl, #ego-ui .e-ic .cl { fill: #fff; fill-opacity: 0.5; }
#ego-ui .e-ic .hr, #ego-ui .e-ic .hc { display: none; }
#ego-ui .e-ic .cf { fill: var(--e-coin); }
#ego-ui .e-ic .cs { fill: var(--e-crack); fill-opacity: 0.55; }
#ego-ui .e-ic .mf { fill: var(--e-body); }
#ego-ui .e-ic .mt { fill: var(--ink); }
#ego-ui .e-ic .sf { fill: var(--e-armour); }
#ego-ui .e-ic .sg { fill: #fff; fill-opacity: 0.55; }
#ego-ui .e-shop { display: none; position: absolute; box-sizing: border-box; pointer-events: none; }
#ego-ui .e-sbar { position: relative; height: 20px; margin-bottom: 6px; padding: 0 6px; background: color-mix(in srgb, var(--bg) 72%, transparent); font: 700 12px / 17px 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.06em; color: var(--e-extra); white-space: pre; }
#ego-ui .e-sbtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#ego-ui .e-shb { pointer-events: auto; box-sizing: border-box; min-width: 44px; min-height: 60px; margin: 0; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--faint); border-radius: 0; background: color-mix(in srgb, var(--bg) 80%, transparent); color: var(--ink); font: 700 12px / 16px 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.04em; text-transform: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#ego-ui .e-shl { white-space: normal; text-align: center; text-wrap: balance; } 
#ego-ui .e-shl em { font-style: normal; color: var(--e-extra); }
#ego-ui .e-shb[data-highlight] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
#ego-ui .e-shb:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#ego-ui .e-shb:disabled { opacity: 0.4; cursor: default; }
#ego-ui .e-shb[data-state="poor"] .e-shl em, #ego-ui .e-shb[data-state="full"] .e-shl em { color: var(--dim); }

#ego-ui .e-buff { display: none; position: absolute; width: calc(7 * var(--hs)); height: calc(8 * var(--hs)); line-height: 0; pointer-events: none; }
#ego-ui .e-bb { position: absolute; left: 0; bottom: 0; width: 0; height: var(--hs); background: var(--e-body); }

#ego-ui .e-blade .bf { fill: var(--e-blade); }
#ego-ui .e-blade .bh { fill: var(--e-hilt); }
#ego-ui .e-blade[data-empty] { opacity: 0.45; }

#ego-ui .e-boss { display: none; position: absolute; text-align: left; }
#ego-ui .e-bname { display: block; margin-bottom: 3px; font: 700 12px / 16px 'Ioskeley Mono', ui-monospace, Menlo, monospace; letter-spacing: 0.16em; color: var(--ink); }
#ego-ui .e-bbar { box-sizing: border-box; height: calc(3 * var(--hs) + 4px); border: 2px solid var(--ink); background: color-mix(in srgb, var(--bg) 72%, transparent); }
#ego-ui .e-bbar i { display: block; width: 0; height: 100%; background: var(--e-body); }

#ego-pick { position: fixed; inset: 0; z-index: 5; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 8px 16px; overflow: hidden; font-family: var(--gc-mono); color: var(--gc-ink); background: color-mix(in srgb, var(--gc-bg) 45%, transparent); -webkit-user-select: none; user-select: none; }
#ego-pick[hidden] { display: none; }
html[data-device='phone'] #ego-pick { padding-top: var(--gc-edge-top); padding-bottom: 8px; }
#ego-pick .pick-card { --pk-s: 1; --pk-cols: 3; --pk-h: 112; --pk-cw: calc(96px * var(--pk-s) + 12px); box-sizing: border-box; flex: none; width: max-content; max-width: none; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 24px 28px 28px; background: var(--gc-bg); border: 1px solid color-mix(in srgb, var(--gc-ink) 45%, var(--gc-bg)); }
#ego-pick .pick-card[data-view='scroll'] { max-width: 100%; max-height: 100%; overflow: auto; }
#ego-pick .pick-title { margin: 0; font: 900 24px / 1 var(--gc-display); letter-spacing: 0.06em; text-indent: 0.06em; text-align: center; color: var(--gc-ink); }
#ego-pick .pick-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: calc(var(--pk-cols) * var(--pk-cw) + (var(--pk-cols) - 1) * 8px); }
#ego-pick .pick-b { appearance: none; -webkit-appearance: none; box-sizing: border-box; margin: 0; width: var(--pk-cw); padding: 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: inherit; color: var(--gc-ink); background: color-mix(in srgb, var(--gc-bg) 86%, var(--gc-ink)); border: 2px solid color-mix(in srgb, var(--gc-ink) 22%, var(--gc-bg)); border-radius: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#ego-pick .pick-b:not([aria-pressed='true']):hover { background: color-mix(in srgb, var(--gc-bg) 78%, var(--gc-ink)); }
#ego-pick .pick-b[aria-pressed='true'] { border-color: var(--gc-accent); box-shadow: 0 0 0 2px var(--gc-accent); background: color-mix(in srgb, var(--gc-bg) 72%, var(--gc-ink)); }
#ego-pick .pick-b:focus { outline: none; }
html:not([data-touch='true']) #ego-pick .pick-b:not([aria-pressed='true']):focus-visible { outline: 2px solid var(--gc-ink); outline-offset: 4px; }
#ego-pick .pick-pt { display: block; flex: none; width: calc(96px * var(--pk-s)); height: calc(var(--pk-h) * 1px * var(--pk-s)); overflow: hidden; }
#ego-pick .pick-pt canvas { display: block; width: calc(96px * var(--pk-s)); height: calc(160px * var(--pk-s)); image-rendering: pixelated; }
#ego-pick .pick-nm { display: block; max-width: 100%; min-height: 24px; font: 700 10px / 12px var(--gc-mono); letter-spacing: 0.06em; text-transform: uppercase; text-align: center; text-wrap: balance; overflow-wrap: anywhere; color: color-mix(in srgb, var(--gc-ink) 70%, var(--gc-bg)); }
#ego-pick .pick-b[aria-pressed='true'] .pick-nm { color: var(--gc-ink); }
#ego-pick .pick-seams { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 100%; } 
#ego-pick .pick-seams i { display: block; width: 4px; height: 4px; background: #ffd24a; }
@media (max-width: 700px), (max-height: 500px) {
  #ego-pick .pick-card { gap: 12px; padding: 14px 8px 14px; }
  #ego-pick .pick-title { font-size: 18px; }
}
@media (orientation: landscape) and (max-height: 520px) { html[data-device='phone'] #ego-pick { padding: 8px var(--gc-edge-right); } }
@media (prefers-reduced-motion: no-preference) { #ego-pick .pick-b { transition: border-color 0.08s steps(2); } }
