/* Hashrate Hero. Loaded only on the game page. Uses the site's theme tokens. */
.compare-bar { display: none !important; } /* never sits on top of the game's own controls */

/* ---------- artwork ---------- */
.hh svg { overflow: visible; }
.hh .scene { width: 100%; height: 100%; overflow: hidden; }
.c0 { fill: var(--art-bg); } .c1 { fill: var(--panel-2); } .c2 { fill: var(--art-cell); }
.ol { stroke: var(--line-strong); stroke-width: 1.5; } path.ol:not([class*="c"]) { fill: none; }
.ln { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.up { fill: none; stroke: #2FD08A; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.am { fill: #F7A531; } .gr { fill: #2FD08A; }

/* ---------- page top ---------- */
.hh { position: relative; padding: 22px 0 clamp(2rem, 4vw, 3.5rem); background: radial-gradient(46rem 26rem at 22% 4%, var(--amber-soft), transparent 70%), radial-gradient(40rem 24rem at 88% 22%, var(--green-soft), transparent 70%); }
.hh h2 { font-size: 1.15rem; }
.hh-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hh-head h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem); letter-spacing: -.03em; margin-top: 10px; }
.hh-tag { color: var(--accent-ink); font: 600 .82rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }
.hh-sim { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; }
.hh-sim svg { width: 17px; height: 17px; flex-shrink: 0; }
.hh-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; } .hh-alert[hidden] { display: none; }

/* ---------- stats ---------- */
.hh-stats-wrap { position: sticky; top: var(--header-h); z-index: 20; margin-top: 12px; padding: 8px 0; pointer-events: none; }
.hh-stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1px; margin: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; background: var(--line); box-shadow: var(--shadow); pointer-events: auto; }
.hh-stat { background: var(--panel); padding: 12px 18px 13px; min-width: 0; }
.hh-stat dt { color: var(--muted); font-size: .78rem; }
.hh-stat dd { margin: 2px 0 0; font: 700 clamp(1.05rem, .85rem + 1vw, 1.6rem)/1.2 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-sats dd { color: var(--accent-ink); } .is-green dd { color: var(--green); }

/* ---------- layout ---------- */
.hh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; margin-top: 10px; }
.hh-grid section { scroll-margin-top: calc(var(--header-h) + 100px); min-width: 0; }
.hh-earn i, .hh-clk i { font-style: normal; }
.hh-set { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; padding-block: 16px; }

/* ---------- mining ---------- */
.hh-mine { text-align: center; overflow: hidden; }
.hh-mine-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 20px 0; text-align: left; }
.hh-mine-top h2 { color: var(--accent-ink); font: 600 .86rem/1.3 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.hh-save { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.hh-save::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.hh-save.is-ok::before { background: var(--green); } .hh-save.is-bad { color: var(--red); } .hh-save.is-bad::before { background: var(--red); }
.hh-stage { position: relative; display: grid; place-items: center; height: 318px; margin-top: 4px; }
.hh-stage > [data-scene] { position: absolute; inset: auto 0 0; height: 208px; -webkit-mask-image: linear-gradient(transparent, #000 26%); mask-image: linear-gradient(transparent, #000 26%); }
/* each rank's place has its own light */
.hh-stage { --sky: rgba(247, 165, 49, .14); background: linear-gradient(transparent, var(--sky) 78%); }
.hh-stage[data-now="workshop"] { --sky: rgba(108, 182, 255, .3); } .hh-stage[data-now="garage"] { --sky: rgba(170, 140, 255, .3); } .hh-stage[data-now="farm"] { --sky: rgba(47, 208, 138, .36); }
.hh-stage[data-now="datacenter"] { --sky: rgba(40, 120, 255, .46); } .hh-stage[data-now="megasite"] { --sky: rgba(255, 90, 70, .5); } .hh-stage[data-now="campus"] { --sky: rgba(255, 176, 40, .62); }
.hh-stage::after { content: ""; position: absolute; left: 50%; top: 4px; width: 330px; height: 290px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--panel) 40%, transparent); opacity: .6; pointer-events: none; }
.hh-coin { position: relative; z-index: 2; width: 216px; height: 216px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .32)); margin-bottom: 34px; }
.hh-coin::before { content: ""; position: absolute; inset: -26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(247, 165, 49, .42), transparent); z-index: -1; transition: opacity .2s; opacity: .7; }
.hh-coin svg { width: 100%; height: 100%; transition: transform .15s; pointer-events: none; }
.hh-coin:hover::before { opacity: 1; } .hh-coin:hover svg { transform: scale(1.02); } .hh-coin:active svg { transform: scale(.97); }
.hh-coin:focus-visible { border-radius: 50%; box-shadow: 0 0 0 4px var(--panel), 0 0 0 8px var(--amber); }
.hh-floats { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hh-floats span { position: absolute; left: 0; top: 0; opacity: 0; color: #fff; font: 700 1.5rem/1 var(--mono); text-shadow: 0 0 2px #4A2A00, 0 0 3px #4A2A00, 0 2px 8px #4A2A00; white-space: nowrap; }
/* the last three upgrades change the coin's light */
.hh-stage[data-tier="7"] .hh-coin::before { background: radial-gradient(closest-side, rgba(108, 182, 255, .55), transparent); } .hh-stage[data-tier="8"] .hh-coin::before { background: radial-gradient(closest-side, rgba(190, 130, 255, .6), transparent); }
.hh-stage[data-tier="9"] .hh-coin::before { inset: -40px; opacity: 1; background: radial-gradient(closest-side, transparent 69%, rgba(255, 214, 120, .95) 70%, rgba(255, 190, 70, .5) 73%, transparent); }
.hh-cta { color: var(--accent-ink); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-top: 14px; }
.hh-per { color: var(--muted); font-size: .9rem; }
.hh-next { margin: 16px 20px 0; text-align: left; font-size: .86rem; color: var(--text-2); }
.hh-next .row { gap: 4px 12px; } .hh-next .mono { font-size: .8rem; }
.hh-bar { height: 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line-strong); overflow: hidden; margin: 8px 0; }
.hh-bar i { display: block; height: 100%; background: linear-gradient(90deg, #20B575, #2FD08A); transform-origin: left; transform: scaleX(0); border-radius: 99px; }
.hh-goal { color: var(--muted); min-height: 2.8em; }
.hh-tip { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; text-align: left; padding: 14px 14px 14px 16px; border: 1px solid var(--green-line); background: var(--green-soft); border-radius: var(--r); }
.hh-tip[hidden] { display: none; } .hh-tip .eyebrow { color: var(--green); } .hh-tip h3 { font-size: 1rem; margin: 8px 0 4px; } .hh-tip p { color: var(--text-2); font-size: .88rem; margin-bottom: 8px; line-height: 1.5; }
.hh-tip .icon-btn { flex-shrink: 0; width: 44px; height: 44px; } .hh-tip a { color: var(--green); min-height: 28px; align-items: center; }
.hh-ups { margin-top: 16px; padding: 16px 20px 20px; border-top: 1px solid var(--line); text-align: left; }
.hh-ups ul, .hh-items, .hh-recent, .hh-cards { list-style: none; margin: 0; padding: 0; }
.hi { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .hh-sprite { position: absolute; width: 0; height: 0; }
.hh-ti { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--rc, var(--amber-line)); color: var(--ri, var(--accent-ink)); background: var(--panel-2); }
/* installed upgrades shrink to chips, the next one stands out, later ones stay slim */
.hh-ups ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; } .hh-ups li { flex: 1 1 100%; min-width: 0; } .hh-ups li.is-has { flex: 1 1 30%; }
.hh-up { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 12px 4px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text-2); font: inherit; text-align: left; cursor: default; transition: border-color .15s, background .15s; }
.hh-up .hh-ti { width: 32px; height: 32px; } .hh-up .hi { width: 17px; height: 17px; } .hh-up-t { flex: 1; min-width: 0; } .hh-up b { display: block; font-size: .88rem; line-height: 1.25; } .hh-up small { display: none; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.hh-up-n { color: var(--green); font: 600 .84rem var(--mono); } .hh-up-c, .hh-up-c > span { display: inline-flex; align-items: center; gap: 5px; } .hh-up-c { min-width: 62px; justify-content: flex-end; font: 700 .88rem var(--mono); color: var(--muted); } .hh-up-c [hidden] { display: none; } .hh-up-c svg { width: 13px; height: 13px; }
.is-locked .hh-ti { --rc: var(--line); --ri: var(--muted); }
.is-next .hh-up { min-height: 62px; padding-block: 8px; border-color: var(--amber-line); background: var(--amber-soft); color: var(--text); } .is-next small { display: block; } .is-next b { font-size: .96rem; } .is-next .hh-ti { width: 42px; height: 42px; } .is-next .hi { width: 21px; height: 21px; }
.is-next .hh-up[aria-disabled="false"] { border-color: var(--amber); cursor: pointer; } .is-next .hh-up[aria-disabled="false"]:hover { background: var(--panel-2); } .is-next .hh-up[aria-disabled="false"] .hh-up-c { padding: 8px 12px; border-radius: 8px; background: var(--amber); color: var(--on-amber); }
.hh-up.has { background: var(--green-soft); border-color: var(--green-line); gap: 8px; padding-right: 8px; } .has .hh-ti { --rc: transparent; --ri: var(--green); background: none; width: 24px; } .hh-up.has b { font-size: .78rem; } .hh-up.has .hh-up-c { position: absolute; clip-path: inset(50%); } .hh-up.has .hh-up-n { font-size: .76rem; }
.hh-ups li { position: relative; } .hh-ups-done { margin-top: 12px; color: var(--accent-ink); font-size: .88rem; font-weight: 600; }

/* ---------- shop ---------- */
.hh-shop { padding: 18px; }
.hh-shop-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; } .hh-shop-top p { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.hh-shop .seg { flex-wrap: nowrap; } .hh-shop .seg button { min-width: 48px; min-height: 40px; padding: 0 10px; font-family: var(--mono); }
.hh-shop .seg button[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); box-shadow: none; }
.hh-items { display: grid; gap: 8px; margin-top: 14px; }
.hh-item { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 118px; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .15s; }
.hh-item:hover { border-color: var(--line-hover); }
.hh-img { display: grid; place-items: center; width: 64px; height: 54px; border-radius: 9px; background: var(--art-bg); border: 1px solid var(--line); overflow: hidden; } .hh-img svg { width: 50px; height: 50px; }
.hh-img.is-photo { background: #fff; } .hh-img img { width: 100%; height: 100%; object-fit: contain; }
.hh-info h3 { font-size: .98rem; line-height: 1.25; } .hh-earn { color: var(--green); font: 600 .84rem/1.5 var(--mono); } .hh-earn b { font-weight: 600; } .hh-earn span { font-family: var(--font); font-weight: 500; }
.hh-clk { color: var(--accent-ink); font: 600 .84rem/1.4 var(--mono); } .hh-clk span { font-family: var(--font); font-weight: 500; }
.hh-kind { color: var(--muted); font-size: .78rem; line-height: 1.4; } .hh-kind a { position: relative; text-decoration: underline; text-underline-offset: 2px; } .hh-kind a::after { content: ""; position: absolute; inset: -6px -10px; }
.hh-kind a { white-space: nowrap; } .hh-kind [data-boost] { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 6px; background: var(--panel-2); font-family: var(--mono); font-size: .7rem; white-space: nowrap; } .hh-kind [data-boost].on { color: var(--green); background: var(--green-soft); }
.hh-own { min-width: 2.2em; text-align: center; color: var(--faint); font: 700 1.1rem var(--mono); } .hh-item.has .hh-own { color: var(--text); }
.hh-buy { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; padding: 4px 8px; border: 1px solid var(--amber); border-radius: 10px; background: var(--amber); color: var(--on-amber); cursor: pointer; font-family: var(--font); touch-action: manipulation; transition: background .15s, transform .1s; }
.hh-buy span { font-size: .78rem; font-weight: 600; line-height: 1; } .hh-buy b { font: 700 1rem/1.1 var(--mono); letter-spacing: -.02em; }
.hh-buy:hover { background: #FFB64F; } .hh-buy:active { transform: translateY(1px); } .hh-buy:focus-visible { border-radius: 10px; }
.hh-buy[aria-disabled="true"] { background: var(--panel-2); border-color: var(--line-strong); color: var(--muted); cursor: default; transform: none; }
.hh-credit { margin-top: 12px; }

/* ---------- fleet, achievements, settings ---------- */
.hh-fleet, .hh-awards { display: flex; flex-direction: column; } /* equal height: the grid stretches both, and the lists fill the space */
.hh-fleet-list { flex: 1; display: grid; } .hh-awards > [data-view] { margin-top: auto; } .hh-awards > [data-share] { margin-top: 8px; }
.hh-empty { color: var(--muted); margin-top: 10px; }
.hh-fleet table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .92rem; }
.hh-fleet th, .hh-fleet td { padding: 6px 0; border-bottom: 1px solid var(--line); text-align: right; font-weight: 500; vertical-align: middle; } .hh-fleet th:first-child { text-align: left; padding-right: 12px; width: 62%; }
.hh-fleet thead th { color: var(--muted); font-size: .76rem; } .hh-fleet td { font-family: var(--mono); padding-left: 10px; } .hh-fleet td:last-child { color: var(--green); } .hh-fleet thead th { height: 30px; }
.hh-fl { display: flex; align-items: center; gap: 12px; } .hh-fl > span:last-child { flex: 1; min-width: 0; } .hh-fl .hh-img { width: 48px; height: 40px; flex-shrink: 0; } .hh-fl .hh-img svg { width: 36px; height: 36px; }
.hh-fleet tr:not(.has) th, .hh-fleet tr:not(.has) td { color: var(--muted); } .hh-fleet tr:not(.has) .hh-img { filter: grayscale(1); opacity: .6; }
.hh-share { display: block; height: 4px; border-radius: 9px; background: var(--panel-2); margin-top: 6px; overflow: hidden; } .hh-share i { display: block; height: 100%; width: 0; background: #2FD08A; border-radius: 9px; }
.hh-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 14px; } .hh-totals div { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; }
.hh-totals dt { color: var(--muted); font-size: .78rem; } .hh-totals dd { margin: 2px 0 0; font: 700 1.05rem var(--mono); overflow-wrap: anywhere; }
.hh-count { color: var(--accent-ink); font-weight: 700; }
/* rarity: --rc is the outline, --ri the text and icon */
.r-common { --rc: #7d8a9b; --ri: var(--text-2); } .r-uncommon { --rc: #2FB57C; --ri: var(--green); } .r-rare { --rc: #4C94E8; --ri: #7DB8FF; } .r-epic { --rc: #A06BEB; --ri: #C9A2FF; } .r-legendary { --rc: #F0A02C; --ri: var(--accent-ink); } .r-mythic { --rc: #FFD36B; --ri: var(--accent-ink); }
:root[data-theme="light"] .r-rare { --ri: #1B5FB0; } :root[data-theme="light"] .r-epic { --ri: #7336C4; }
.r-mythic .hh-ti, .hh-ti.r-mythic { background: linear-gradient(135deg, #FFE7AE, #F0A02C 60%, #B86C0C); color: #2B1800; }
.hh-awards em, .hh-card em, .hh-toast em { font: 600 .7rem var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ri); }
.hh-sub { color: var(--muted); font: 600 .74rem var(--mono); letter-spacing: .06em; text-transform: uppercase; margin: 20px 0 10px; }
.hh-ach-p { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .88rem; margin: 8px 0; }
.hh-slim { display: block; height: 6px; border-radius: 9px; background: var(--panel-2); overflow: hidden; } .hh-slim i { display: block; height: 100%; border-radius: 9px; background: var(--rc, var(--amber)); transform-origin: left; transform: scaleX(0); } .hh-slim.is-amber { height: 8px; }
.hh-awards [data-recent-none] { display: grid; place-items: center; min-height: 130px; margin: 0; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--r); text-align: center; } .hh-awards [data-recent-none][hidden] { display: none; } .hh-recent { display: grid; gap: 8px; } .hh-recent li { display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 9px; border: 1px solid var(--line); border-left: 3px solid var(--rc); border-radius: 10px; background: var(--surface); } .hh-recent div { flex: 1; min-width: 0; }
.hh-awards b { display: block; font-size: .94rem; line-height: 1.3; } .hh-awards small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.hh-near > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 16px; } .hh-near .mono { display: block; font-size: .82rem; margin-bottom: 6px; text-align: right; }
.hh-rare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 20px; } .hh-rare div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-bottom: 2px solid var(--rc); border-radius: 10px; background: var(--surface); } .hh-rare dt { color: var(--ri); font-size: .8rem; font-weight: 600; text-transform: capitalize; } .hh-rare dd { margin: 0; font: 600 .8rem var(--mono); }
.hh-honors { margin-bottom: 18px; } .hh-honors .hh-sub { margin-top: 0; } .hh-honors p[data-honor] { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .84rem; margin-bottom: 6px; } .hh-honors p[hidden] { display: none; } .hh-honors svg { width: 17px; height: 17px; color: var(--accent-ink); flex-shrink: 0; margin-top: 2px; } .hh-honors b { display: inline; font-size: inherit; color: var(--text-2); }

/* the full collection: built when opened, removed when closed */
.hh-col { width: min(1120px, calc(100vw - 48px)); max-width: none; height: min(820px, calc(100dvh - 48px)); max-height: none; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden; } .hh-col::backdrop { background: rgba(5, 8, 12, .72); }
.hh-col-in { display: flex; flex-direction: column; height: 100%; } .hh-col-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 0 24px; } .hh-col-top h2 { font-size: 1.35rem; } .hh-col-top h2:focus { outline: none; } .hh-col-top .icon-btn { width: 44px; height: 44px; }
.hh-col-tools { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 24px 0; } .hh-col .seg { flex-wrap: nowrap; } .hh-col .seg button { min-height: 44px; padding: 0 14px; } .hh-col .seg button[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); box-shadow: none; }
.hh-find { position: relative; flex: 1 1 220px; } .hh-find svg { position: absolute; left: 13px; top: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; } .hh-find input { width: 100%; padding-left: 40px; } .hh-sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; white-space: nowrap; } .hh-col input, .hh-col select { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: 500 .92rem var(--font); padding-right: 12px; } .hh-col select { padding-left: 12px; } .hh-col option { background: var(--panel); color: var(--text); } .hh-col input::placeholder { color: var(--muted); opacity: 1; } .hh-sort select { width: auto; }
.hh-col-n { color: var(--muted); font-size: .82rem; padding: 10px 24px; border-bottom: 1px solid var(--line); } .hh-col-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 24px; }
.hh-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .hh-cards + .hh-empty + .hh-honors { margin-top: 24px; }
.hh-card { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); } .hh-card > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .hh-card h3 { font-size: .94rem; line-height: 1.3; } .hh-card p { color: var(--muted); font-size: .82rem; line-height: 1.4; margin-top: 2px; }
.hh-card .hh-cf { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; } .hh-cf span { font: 500 .76rem var(--mono); color: var(--text-2); } .hh-card .hh-slim { height: 4px; margin-top: 6px; }
.hh-card:not(.on) .hh-ti { background: none; border-style: dashed; color: var(--muted); } .hh-card:not(.on) h3 { color: var(--text-2); } .hh-card.on { border-color: var(--rc); background: linear-gradient(120deg, var(--panel-2), var(--surface)); } .hh-card.on .hh-cf span { color: var(--green); } .hh-card.r-mythic.on { background: linear-gradient(120deg, rgba(255, 200, 90, .24), var(--surface) 70%); }
.hh-toggles, .hh-set-b { display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center; } .hh-set-b { margin-left: auto; gap: 8px; } .hh-set .btn, .hh-awards .btn { min-height: 44px; }
.hh-toggles button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; border: 0; background: none; color: var(--text-2); font: 500 .92rem var(--font); cursor: pointer; padding: 0 4px; }
.hh-toggles i { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--faint); transition: background .15s; } .hh-toggles i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--faint); transition: transform .15s; }
.hh-toggles [aria-checked="true"] i { background: var(--amber); border-color: var(--amber-700); } .hh-toggles [aria-checked="true"] i::after { transform: translateX(18px); background: var(--on-amber); }
.hh-reset:hover { color: var(--red); border-color: var(--red-line); }
.hh-nav { display: none; }

/* ---------- toasts, dialog ---------- */
.hh-toasts { position: fixed; z-index: 70; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.hh-toast { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--rc, var(--amber-line)); border-left: 4px solid var(--rc, var(--amber)); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow-lg); } .hh-toast div { min-width: 0; } .hh-toast b { display: block; font-size: .94rem; } .hh-toast div > span { display: block; color: var(--text-2); font-size: .86rem; } .hh-toast small { display: block; color: var(--muted); font-size: .74rem; } .hh-toast .hh-ti { width: 50px; height: 50px; } .hh-toast .hi { width: 26px; height: 26px; }
.hh-dlg { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg); } .hh-dlg::backdrop { background: rgba(5, 8, 12, .6); }
.hh-dlg h2 { font-size: 1.25rem; } .hh-dlg p { color: var(--text-2); margin: 10px 0 22px; } .hh-dlg-b { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- below the game ---------- */
.hh-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 56px; align-items: start; } .hh-about h2 { font-size: var(--fs-lg); margin-bottom: 14px; }
.hh-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 12px; } .hh-steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; } .hh-steps li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 .9rem var(--mono); background: var(--amber); color: var(--on-amber); } .hh-steps span { color: var(--muted); font-size: .93rem; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hh-toast.r-legendary::after, .hh-toast.r-mythic::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 34px 4px rgba(255, 190, 70, .75); opacity: 0; animation: hhGlow 1.4s ease-out; } /* one glow, then still */
  .hh-toast { animation: hhIn .22s ease-out; } .hh-toast.bye { opacity: 0; transition: opacity .2s; } .hh-tip { animation: hhIn .25s ease-out; }
  .hh-item.pop .hh-own b { display: inline-block; animation: hhPop .3s ease-out; }
  .is-running .fan { animation: hhSpin 1.6s steps(18) infinite; } .is-running .led { animation: hhLed 2.4s steps(2) infinite; } :is(.is-hidden, .is-off, .is-covered) :is(.fan, .led, .steam) { animation-play-state: paused; }
  .hh-stage > [data-scene] { animation: hhScene .6s ease-out; } .is-running .steam { animation: hhLed 3s steps(8) infinite; }
  .hh-bar i { transition: transform .2s linear; }
}
@media (prefers-reduced-motion: reduce) { .hh-coin svg, .hh-buy { transition: none; transform: none !important; } }
@keyframes hhScene { from { opacity: 0; } }
@keyframes hhGlow { 25% { opacity: 1; } }
@keyframes hhIn { from { opacity: 0; transform: translateY(8px); } } @keyframes hhPop { 40% { transform: scale(1.45); color: var(--green); } } @keyframes hhSpin { to { transform: rotate(360deg); } } @keyframes hhLed { 50% { opacity: .35; } }

@media (min-width: 861px) { /* side by side, the upgrade list fills the panel next to the shop */
  .hh-mine, .hh-ups { display: flex; flex-direction: column; } .hh-ups { flex: 1; } .hh-stage { height: 350px; flex-shrink: 0; } .hh-stage > [data-scene] { height: 232px; } .hh-goal { min-height: 1.5em; }
  .hh-awards { justify-content: space-between; } .hh-awards > [data-view] { margin-top: 0; }
  .hh-ups ul { flex: 1; display: grid; grid-auto-rows: 1fr; gap: 8px; } .hh-ups li { display: flex; } .hh-up, .hh-up.has { gap: 12px; padding: 4px 14px 4px 8px; min-height: 52px; } .hh-up small { display: block; } .hh-up b, .hh-up.has b { font-size: .92rem; }
  .hh-up .hh-ti, .hh-up.has .hh-ti { width: 38px; height: 38px; } .hh-up.has .hh-ti { border-color: var(--green-line); } .hh-up.has .hh-up-n { font-size: .84rem; } .hh-up.has .hh-up-c { position: static; clip-path: none; color: var(--green); font-size: .78rem; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1080px) and (min-width: 861px) { .hh-item { grid-template-columns: 56px minmax(0, 1fr) auto 104px; gap: 10px; } .hh-img { width: 56px; } .hh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .hh { padding-top: 14px; padding-bottom: 0; } .hh-head h1 { font-size: 1.7rem; margin-top: 6px; } .hh-tag { font-size: .72rem; margin-top: 2px; } .hh-sim { font-size: .78rem; } .hh-head { gap: 4px 16px; }
  .hh-grid, .hh-about { grid-template-columns: minmax(0, 1fr); } .hh-grid { gap: 14px; margin-top: 6px; }
  .hh-stats-wrap { padding: 6px 0; margin-top: 4px; } .hh-stats { grid-template-columns: 1.25fr 1fr 1fr; border-radius: var(--r); } .hh-stat { padding: 7px 11px 8px; } .hh-stat dt { font-size: .7rem; } .hh-stat dd { font-size: clamp(.9rem, .55rem + 1.8vw, 1.15rem); } .hh-stat.is-wide { display: none; }
  .hh-grid section { scroll-margin-top: calc(var(--header-h) + 72px); }
  .hh-ups li.is-has { flex-basis: 45%; } .hh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hh-awards > [data-view] { margin-top: 0; }
  .hh-set-b { margin-left: 0; } .hh-shop .seg button { min-height: 44px; }
  .hh-nav { position: sticky; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; padding: 4px max(8px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); background: var(--panel); border-top: 1px solid var(--line-strong); }
  .hh-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; color: var(--muted); font-size: .74rem; font-weight: 600; border-radius: var(--r-sm); text-decoration: none; } .hh-nav svg { width: 20px; height: 20px; } .hh-nav a[aria-current] { color: var(--accent-ink); }
  .hh-toasts { bottom: auto; top: calc(var(--header-h) + 76px); left: 16px; right: 16px; width: auto; }
}
@media (max-width: 560px) {
  .hh-stage { height: 262px; } .hh-stage > [data-scene] { height: 170px; } .hh-coin { width: 176px; height: 176px; margin-bottom: 26px; } .hh-stage::after { width: 270px; height: 240px; }
  .hh-shop { padding: 14px 10px; } .hh-shop-top { padding: 0 4px; } .hh-shop .seg { width: 100%; } .hh-shop .seg button { flex: 1; min-height: 44px; }
  .hh-item { grid-template-columns: 52px minmax(0, 1fr) auto 92px; gap: 9px; padding: 7px; } .hh-img { width: 52px; height: 48px; } .hh-img svg { width: 42px; } .hh-info h3 { font-size: .9rem; } .hh-earn, .hh-clk { font-size: .78rem; } .hh-own { min-width: 1.3em; font-size: 1rem; } .hh-earn i, .hh-clk i { display: none; } .hh-kind [data-boost] { margin-left: 0; padding: 1px 5px; } .hh-kind a + [data-boost] { margin-left: 5px; }
  .hh-set .btn { flex: 1 1 auto; } .hh-set-b, .hh-toggles { width: 100%; } .hh-dlg-b .btn { flex: 1 1 100%; } .hh-dlg-b { flex-direction: column-reverse; } .hh-alert { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 640px) { /* the collection fills the phone */
  .hh-col { width: 100vw; height: 100dvh; border: 0; border-radius: 0; } .hh-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; } .hh-col-top { padding: 8px 8px 0 16px; } .hh-col-top h2 { font-size: 1.15rem; } .hh-col-tools { padding: 4px 16px 0; } .hh-col-n { padding: 8px 16px; } .hh-col-body { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
  .hh-find { flex-basis: 100%; } .hh-col .seg { width: 100%; } .hh-col .seg button { flex: 1; padding: 0 4px; } .hh-sort { width: 100%; } .hh-sort select { flex: 1; }
}
@media (max-width: 420px) { .hh-rare { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hh-ups { padding-inline: 14px; } .hh-awards, .hh-fleet { padding: 16px 14px; } }
@media (max-width: 380px) { .hh-rare div { padding: 8px 7px; gap: 4px; } .hh-rare dt, .hh-rare dd { font-size: .74rem; } .hh-stat .w, .hh-earn i, .hh-clk i { display: none; } .hh-earn span { font-size: .74rem; } .hh-item { grid-template-columns: 44px minmax(0, 1fr) auto 84px; gap: 7px; } .hh-img { width: 44px; height: 44px; } .hh-img svg { width: 36px; } }
@media (max-height: 480px) { .hh-stats-wrap, .hh-nav { position: static; } }
