/* Heldenruf (ui/heroes.js): one view - tavern head, missions left, heroes right; layers for the altar (with the
   summoning animation), the loot and on phones the chosen hero. Art-pixel coordinates; phones at the end (html.touch). */
#heroes { max-width: calc(100% - 12px); }
#heroes > .win-body { position: relative; height: 336px; max-height: calc(100vh / var(--px) - 38px); overflow: hidden; padding: 0; font-size: 8px; line-height: 1.25; }
#heroes .hr-view { display: flex; flex-direction: column; height: 100%; }
#heroes button { font-family: inherit; }
#heroes img { image-rendering: auto; }
#heroes .hr-btn { height: auto; min-height: 15px; font-size: 8px; padding: 2px 6px; line-height: 1.15; white-space: normal; }
#heroes .hr-btn > span { display: inline-flex; align-items: center; gap: 3px; }
#heroes .hr-btn img { width: 10px; height: 10px; }
#heroes .hr-btn:disabled { opacity: .45; }
#heroes .gold { color: #ffd98c; }
#heroes .dim { color: #a59a8c; }
#heroes .good { color: #8fe08f; }

/* head: the tavern backdrop with rank, summons and the actions */
#heroes .hr-head { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 7px;
  background: linear-gradient(90deg, #120d0bf2 0%, #120d0bb8 45%, #120d0bf0 100%), url('/assets/ui/heroes/tavern.webp') center 40% / cover; border-bottom: 1px solid #6d5434; }
#heroes .hr-rank { display: flex; align-items: center; gap: 5px; min-width: 0; }
#heroes .hr-sign { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 1px 2px #000); }
#heroes .hr-rank-text { display: flex; flex-direction: column; gap: 1px; min-width: 96px; }
#heroes .hr-rank-text b { color: #ffd98c; font-size: 10px; font-weight: 400; white-space: nowrap; }
#heroes .hr-rank-text span { color: #c8b9a3; font-size: 7px; white-space: nowrap; }
#heroes .hr-fame { height: 4px; background: #0b0807; border: 1px solid #5a4429; }
#heroes .hr-fame i { display: block; height: 100%; background: linear-gradient(90deg, #a8742c, #ffd98c); }
#heroes .hr-purse { display: flex; justify-content: center; min-width: 0; }
#heroes .hr-chip { display: inline-flex; align-items: center; gap: 2px; color: #f3e6cf; white-space: nowrap; }
#heroes .hr-chip img { width: 12px; height: 12px; }
#heroes .hr-chip b { font-weight: 400; font-size: 9px; }
#heroes .hr-chip i { font-style: normal; color: #c8b9a3; font-size: 7px; margin-left: 2px; }
#heroes .hr-tickets img { width: 16px; height: 16px; }
#heroes .hr-tickets b { font-size: 11px; color: #ffe2a6; }
#heroes .hr-acts { display: flex; gap: 3px; align-items: center; }
#heroes .hr-summon-btn { min-height: 18px; }

/* the two columns */
#heroes .hr-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 210px; }
#heroes .hr-board, #heroes .hr-grid { overflow-y: auto; overflow-x: hidden; }
#heroes .hr-board { padding: 3px 6px 6px; border-right: 1px solid #3c3024; }
#heroes .hr-side { display: flex; flex-direction: column; min-height: 0; padding: 4px 6px 6px; }
#heroes .hr-sec { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; margin: 4px 0 3px; min-height: 15px; }
#heroes .hr-sec > b { color: #e8c98c; font-weight: 400; font-size: 9px; flex: 1 0 auto; }
#heroes .hr-count { color: #a59a8c; }
#heroes .hr-empty, #heroes .hr-foot { color: #a59a8c; padding: 5px 2px; }
#heroes .hr-foot { display: flex; align-items: center; gap: 4px; font-size: 7px; border-top: 1px solid #2f261d; margin-top: 4px; }
#heroes .hr-foot img { width: 10px; height: 10px; flex: none; }

/* heroes away */
#heroes .hr-run { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 5px; padding: 3px; margin-bottom: 3px; border-bottom: 1px solid #2f261d; }
#heroes .hr-run-art { width: 40px; height: 26px; background: center / cover; border: 1px solid #574330; }
#heroes .hr-run-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#heroes .hr-run-main > b { font-weight: 400; color: #f0e2c8; line-height: 1.1; }
#heroes .hr-run-team { display: flex; align-items: center; gap: 2px; }
#heroes .hr-mini { width: 13px; height: 13px; border: 1px solid #6d5434; background: #1a1410; object-fit: cover; object-position: top; }
#heroes .hr-run-time { margin-left: auto; color: #e8c98c; font-variant-numeric: tabular-nums; }
#heroes .hr-prog { height: 3px; background: #0b0807; border: 1px solid #3c3024; }
#heroes .hr-prog i { display: block; height: 100%; background: linear-gradient(90deg, #4e7d55, #9bd69c); transition: width 1s linear; }
#heroes .hr-prog.gold i { background: linear-gradient(90deg, #a8742c, #ffd98c); }
#heroes .hr-run.back { background: linear-gradient(90deg, #ffd98c18, transparent); }
#heroes .hr-run.back .hr-run-time { color: #8fe08f; }
#heroes .hr-run.back .hr-prog i { background: linear-gradient(90deg, #a8742c, #ffd98c); }
#heroes .hr-run-btn, #heroes .hr-claim-all { position: relative; }
#heroes .hr-run-btn::after, #heroes .hr-claim-all::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: 0 0 6px #ffd98c; animation: glow-in 1.4s ease-in-out infinite; }
#heroes .hr-x { min-width: 15px; padding: 2px 3px; }
/* what a click just changed moves in; the answer to a click */
#heroes .hr-fresh { animation: hr-fresh .5s ease-out; }
@keyframes hr-fresh { from { opacity: 0; transform: translateY(-4px); } }
#heroes .hr-note { position: absolute; left: 50%; bottom: 6px; z-index: 4; transform: translateX(-50%); width: max-content; max-width: 90%; padding: 3px 8px; text-align: center; color: #ffe2a6; background: #120d0bf2; border: 1px solid #8a6a3c; pointer-events: none; }
#heroes .hr-note.bad { color: #ff9d8c; border-color: #b5523f; }
#heroes .hr-note:empty { display: none; }

/* the board */
#heroes .hr-offer { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 6px; padding: 4px; margin-bottom: 4px; border: 1px solid #3c3024;
  background: linear-gradient(90deg, #1b1511, #120e0b); }
#heroes .hr-offer.editing { border-color: #ffd98c; box-shadow: 0 0 5px #ffd98c66; }
#heroes .hr-offer-art { position: relative; min-height: 48px; background: center / cover; border: 1px solid #574330; }
#heroes .hr-diff { position: absolute; top: 1px; left: 1px; padding: 1px 3px; font-size: 7px; line-height: 1.3; background: #000a; }
#heroes .hr-diff.d0 { color: #9bd69c; } #heroes .hr-diff.d1 { color: #ffd98c; } #heroes .hr-diff.d2 { color: #ff8a7a; }
#heroes .hr-dur { position: absolute; bottom: 1px; right: 1px; display: inline-flex; align-items: center; gap: 1px; padding: 1px 3px; line-height: 1.3; background: #000b; color: #f3e6cf; font-size: 7px; }
#heroes .hr-dur img { width: 8px; height: 8px; }
#heroes .hr-offer-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
#heroes .hr-offer-title { font-weight: 400; font-size: 9px; color: #ffe2a6; line-height: 1.1; }
#heroes .hr-offer-meta { color: #a59a8c; font-size: 7px; }
#heroes .hr-role { color: #c7b0ff; }
#heroes .hr-items { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
#heroes .hr-items .slot { flex: none; }
#heroes .hr-items .hr-chip img { width: 11px; height: 11px; }
#heroes .hr-offer-team { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 3px; }
#heroes .hr-sockets { display: flex; gap: 2px; }
#heroes .hr-socket { width: 20px; height: 20px; padding: 0; border: 1px solid var(--c); background: #0f0b09; color: #8c7a63; font-size: 10px; overflow: hidden; }
#heroes .hr-socket img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
#heroes .hr-socket.empty { border-style: dashed; }
#heroes .hr-socket.on { box-shadow: 0 0 0 1px #ffd98c; }
#heroes .hr-offer-go { display: flex; align-items: center; gap: 4px; }
#heroes .hr-chance { display: flex; flex-direction: column; align-items: center; line-height: 1; }
#heroes .hr-chance b { font-weight: 400; font-size: 11px; }
#heroes .hr-chance span { font-size: 6px; color: #a59a8c; }
#heroes .hr-send { min-height: 18px; }

/* the chosen hero */
#heroes .hr-detail { position: relative; flex: none; padding: 4px; border: 1px solid var(--c); background: linear-gradient(#1d1611, #120e0b); overflow: hidden; }
#heroes .hr-detail.r4::before, #heroes .hr-detail.r3::before { content: ''; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--c) 22%, transparent), transparent 30%); animation: hr-spin 9s linear infinite; pointer-events: none; }
#heroes .hr-detail > * { position: relative; }
#heroes .hr-detail-top { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 5px; }
#heroes .hr-face { width: 46px; height: 46px; border: 1px solid var(--c); background: radial-gradient(circle at 50% 35%, #3b2c20, #0f0b09); }
#heroes .hr-face img { width: 100%; height: 100%; object-fit: contain; }
#heroes .hr-face.locked img { filter: grayscale(1) brightness(.5); }
#heroes .hr-detail-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#heroes .hr-detail-name { color: var(--c); font-weight: 400; font-size: 11px; line-height: 1; }
#heroes .hr-detail-tags { color: #a59a8c; font-size: 7px; }
#heroes .hr-detail-power { color: #f3e6cf; }
#heroes .hr-detail-power i { font-style: normal; color: #a59a8c; }
#heroes .hr-stars { color: #ffd98c; letter-spacing: -1px; }
#heroes .hr-skill { color: #c8b9a3; font-size: 7px; }
#heroes .hr-skill b { color: #c7b0ff; font-weight: 400; }
#heroes .hr-detail-note { color: #a59a8c; margin: 3px 0; font-size: 7px; }
#heroes .hr-xp { margin-top: 4px; color: #c8b9a3; font-size: 7px; }
#heroes .hr-xp .hr-prog { margin-top: 1px; }
#heroes .hr-detail-away { display: flex; align-items: center; gap: 3px; margin-top: 3px; color: #e8c98c; font-size: 7px; }
#heroes .hr-detail-away img { width: 9px; height: 9px; }
#heroes .hr-wide { width: 100%; margin-top: 4px; }

/* the collection */
#heroes .hr-pickbar { margin: 4px 0 3px; padding: 3px; border: 1px solid #ffd98c88; background: #ffd98c12; color: #ffe2a6; }
#heroes .hr-pickbar .eq-btns { margin-top: 3px; gap: 3px; }
#heroes .hr-grid { --tile: 36px; flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, var(--tile)); justify-content: space-between; gap: 3px; align-content: start; padding: 1px; }
#heroes .hr-group { grid-column: 1 / -1; color: #e8c98c; font-size: 8px; line-height: 1.2; padding: 2px 0 0; border-bottom: 1px solid #2f261d; }
#heroes .hr-group.on { color: #c7b0ff; }
#heroes .hr-starall { margin-top: 0; }
#heroes .hr-tile { position: relative; width: var(--tile); height: var(--tile); padding: 0; border: 1px solid var(--c); background: radial-gradient(circle at 50% 35%, #2e2219, #0f0b09); overflow: hidden; }
#heroes .hr-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
#heroes .hr-tile.r4 { box-shadow: inset 0 0 6px var(--c); }
#heroes .hr-tile.r4::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 12%, #fff6 50%, transparent 88%); animation: hr-shine 3s ease-in-out infinite; pointer-events: none; }
#heroes .hr-tile.locked img { filter: grayscale(1) brightness(.45); }
#heroes .hr-tile.locked::after { display: none; }
#heroes .hr-tile.chosen { box-shadow: 0 0 0 1px #ffd98c, 0 0 5px #ffd98c88; }
#heroes .hr-tile.away img { filter: brightness(.55); }
#heroes .hr-tile.picked { box-shadow: 0 0 0 1px #8fe08f; }
#heroes .hr-tile:disabled { opacity: .5; }
#heroes .hr-tile-lv { position: absolute; left: 1px; bottom: 0; font-size: 7px; color: #fff; text-shadow: var(--ol); }
#heroes .hr-tile-st { position: absolute; right: 1px; top: 0; font-size: 5px; color: #ffd98c; text-shadow: var(--ol); letter-spacing: -1px; }
#heroes .hr-tile-up { position: absolute; left: 1px; top: 1px; color: #8fe08f; font-size: 9px; line-height: 1.3; text-shadow: var(--ol); }
#heroes .hr-tile img.hr-tile-away { inset: auto 1px 1px auto; width: 10px; height: 10px; }
#heroes .hr-tile-ok { position: absolute; right: 1px; bottom: 0; color: #8fe08f; font-size: 9px; text-shadow: var(--ol); }
#heroes .hr-all { font-size: 7px; }
@keyframes hr-shine { 0%, 60% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
@keyframes hr-spin { to { transform: rotate(1turn); } }

/* layers over the window */
#heroes .hr-layer { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 8px; background: #050302e0; animation: hr-fade .15s; }
@keyframes hr-fade { from { opacity: 0; } }
#heroes .hr-layer.hr-again { animation: none; }
#heroes .hr-layer-box { position: relative; max-height: 100%; overflow-y: auto; border: 1px solid #8a6a3c; background: linear-gradient(#1f1712, #0f0b09); padding: 8px; }
#heroes .hr-layer-x { position: absolute; top: 4px; right: 4px; z-index: 2; }
#heroes .hr-line { display: flex; justify-content: space-between; gap: 5px; margin: 2px 0; }
#heroes .hr-line b { font-weight: 400; color: #f3e6cf; }

/* the altar and the reveal */
#heroes .hr-altar { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 10px; width: 100%; height: 100%; overflow: hidden;
  background: radial-gradient(ellipse at 38% 40%, #2b1a2e, #0c0807 70%); }
#heroes .hr-altar-main { display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 0; }
#heroes .hr-stage { --glow: #ffd278; position: relative; flex: 1; width: 100%; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
#heroes .hr-flash { position: absolute; inset: 0; background: radial-gradient(circle, #fff 0%, #ffd278cc 35%, transparent 75%); opacity: 0; pointer-events: none; z-index: 2; animation: hr-flash .9s var(--at) ease-out both; }
@keyframes hr-flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
/* the painted light of the summon (ui/summonfx.js): behind the cards and in front of them, art pixels like the game */
#heroes .hr-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
#heroes .hr-fx.back { z-index: 0; }
#heroes .hr-fx.front { z-index: 2; }
#heroes .hr-altar-title { position: relative; display: block; color: #ffd98c; font-weight: 400; font-size: 14px; margin: 3px 0; text-shadow: 0 0 6px #000; }
#heroes .hr-altar-text { position: relative; color: #e8dcc8; margin: 2px 0 5px; text-align: center; text-shadow: 0 0 4px #000; }
#heroes .hr-altar-btns { position: relative; gap: 4px; width: min(250px, 100%); flex: none; }
#heroes .hr-altar-btns .hr-btn { min-height: 22px; font-size: 9px; }
#heroes .hr-altar-have { display: block; margin-top: 3px; color: #a59a8c; flex: none; }
#heroes .hr-altar-info { min-width: 0; padding: 14px 0 0; overflow-y: auto; }
#heroes .hr-altar-info .hr-prog { margin-bottom: 4px; }
/* --cw / --cg: width of a card and the gap (the cards fly out of the middle in steps of both, ui/heroes.js --fx/--fy) */
#heroes .hr-cards { --cw: 46px; --cg: 6px; position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, var(--cw)); gap: var(--cg); perspective: 400px; }
#heroes .hr-cards.n1 { grid-template-columns: 64px; }
/* ten summons bring eleven heroes (ticket #138): the ten in two rows of five, beside them the place of the free one, a pull
   of its own after the ten (ui/summonfx.js): "+1 gratis" pops up, the ten dim while its vortex charges */
#heroes .hr-pull { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
#heroes .hr-bonus { display: flex; flex-direction: column; align-items: center; gap: 3px; }
#heroes .hr-bonus-tag { color: #ffd98c; font-weight: 400; font-size: 9px; line-height: 1; white-space: nowrap; text-shadow: var(--ol); }
#heroes .hr-bonus-slot { position: relative; width: 64px; aspect-ratio: 3 / 4; perspective: 400px; }
#heroes .hr-stage.hr-anim .hr-pull.bonus .hr-cards { animation: hr-dim var(--bd) var(--bf) ease-in-out both; }
#heroes .hr-stage.hr-anim .hr-bonus-tag { animation: hr-pop .5s var(--bf) cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes hr-dim { 0%, 100% { opacity: 1; } 15%, 80% { opacity: .45; } }
#heroes .hr-card { position: relative; width: 100%; aspect-ratio: 3 / 4; animation: hr-deal .35s var(--deal) ease-out both; }
#heroes .hr-cards.n1 .hr-card { width: 64px; }
#heroes .hr-card-in { position: absolute; inset: 0; transform-style: preserve-3d; animation: hr-flip .45s var(--at) ease-in-out both; }
#heroes .hr-card-back, #heroes .hr-card-front { position: absolute; inset: 0; backface-visibility: hidden; border: 1px solid #8a6a3c; overflow: hidden; }
#heroes .hr-card-back img { width: 100%; height: 100%; object-fit: cover; }
#heroes .hr-card-front { transform: rotateY(180deg); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border-color: var(--c);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 35%, #1a120d), #0c0807 75%); }
#heroes .hr-card-front img { position: absolute; inset: 0 0 12px; width: 100%; height: calc(100% - 12px); object-fit: contain; }
#heroes .hr-card-front b { position: relative; color: var(--c); font-weight: 400; font-size: 7px; line-height: 1; text-shadow: var(--ol); }
#heroes .hr-card-front span { position: relative; color: #e8dcc8; font-size: 5px; line-height: 1.2; margin-bottom: 1px; text-shadow: var(--ol); }
#heroes .hr-card.r2 .hr-card-front, #heroes .hr-card.r3 .hr-card-front, #heroes .hr-card.r4 .hr-card-front { box-shadow: 0 0 6px var(--c); }
#heroes .hr-card::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--c); border-radius: 50%; opacity: 0; pointer-events: none; }
#heroes .hr-card.r2::after, #heroes .hr-card.r3::after, #heroes .hr-card.r4::after { animation: hr-burst .6s calc(var(--at) + .2s) ease-out both; }
#heroes .hr-card.r4 { z-index: 1; }
#heroes .hr-card.r4 .hr-card-front::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 12%, #fff8 50%, transparent 88%); animation: hr-shine 2s ease-in-out infinite; }
#heroes .hr-card.shown, #heroes .hr-card.shown .hr-card-in, #heroes .hr-card.shown::after { animation: none; }
#heroes .hr-card.shown .hr-card-in { transform: rotateY(180deg); }
@keyframes hr-deal { from { opacity: 0; transform: translate(var(--fx, 0), var(--fy, 0)) scale(.15) rotate(-12deg); } }
@keyframes hr-flip { from { transform: rotateY(0); } 60% { transform: rotateY(200deg) scale(1.15); } to { transform: rotateY(180deg); } }
@keyframes hr-burst { 0% { opacity: 0; transform: scale(.4); } 10% { opacity: .9; } 100% { opacity: 0; transform: scale(1.8); } }

/* the loot of a claim */
#heroes .hr-lootbox { width: min(340px, 100%); text-align: center; }
#heroes .hr-loot-runs { display: flex; flex-direction: column; gap: 3px; margin: 4px 0; text-align: left; }
#heroes .hr-loot-run { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 5px; align-items: center; padding: 2px; border-left: 2px solid #ff8a7a; }
#heroes .hr-loot-run.ok { border-left-color: #8fe08f; }
#heroes .hr-loot-run b { display: block; font-weight: 400; color: #f0e2c8; }
#heroes .hr-loot-run span { font-size: 7px; color: #c8b9a3; }
#heroes .hr-loot-run.ok span { color: #8fe08f; }
#heroes .hr-loot-label { color: #a59a8c; font-size: 7px; margin-top: 4px; }
#heroes .hr-loot-items { justify-content: center; margin: 4px 0; gap: 4px 6px; }
#heroes .hr-pop { animation: hr-pop .4s var(--d) cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes hr-pop { from { opacity: 0; transform: scale(.2); } }
#heroes .hr-levelup { display: flex; align-items: center; justify-content: center; gap: 4px; color: #9bd69c; margin: 2px 0; }
#heroes .hr-levelup img { width: 14px; height: 14px; object-fit: cover; object-position: top; border: 1px solid #6d5434; }
#heroes .hr-rankup { display: flex; align-items: center; justify-content: center; gap: 4px; color: #ffd98c; font-size: 10px; margin: 4px 0; animation: hr-pop .5s .4s both; }
#heroes .hr-rankup img { width: 20px; height: 20px; }
#heroes .hr-locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; flex: 1; color: #c8b9a3; }
#heroes .hr-locked img { width: 40px; height: 40px; }

/* phones: full window, bigger targets, the collection only on the right (the chosen hero is a layer) */
html.touch #ui #heroes { width: calc((100% - 12px) / var(--wz)) !important; left: 6px !important; top: 6px !important; }
html.touch #ui #heroes > .win-body { height: calc((100vh - 12px) / (var(--px) * var(--wz)) - 20px); max-height: none; }
html.touch #heroes .hr-btn, html.touch #heroes .hr-socket { min-height: calc(44px / (var(--px) * var(--wz))); }
html.touch #heroes .hr-btn { min-width: calc(44px / (var(--px) * var(--wz))); }
html.touch #heroes .hr-socket { width: calc(44px / (var(--px) * var(--wz))); height: calc(44px / (var(--px) * var(--wz))); }
html.touch #heroes .hr-grid { --tile: calc(44px / (var(--px) * var(--wz))); }
html.touch #heroes .hr-main { grid-template-columns: minmax(0, 1fr) minmax(0, 38%); }
html.touch #heroes .hr-head { gap: 4px; padding: 3px 5px; }
html.touch #heroes .hr-sign, html.touch #heroes .hr-tickets i { display: none; }
html.touch #heroes .hr-rank-text { min-width: 0; }
html.touch #heroes .hr-offer { grid-template-columns: 52px minmax(0, 1fr); }
html.touch #heroes .hr-offer-art { min-height: 40px; }
html.touch #heroes .hr-offer-team { grid-column: 1 / -1; flex-direction: row; align-items: center; }
html.touch #heroes .hr-herobox { width: min(340px, 100%); padding: 6px; }
html.touch #heroes .hr-herobox .hr-detail { border: 0; background: none; padding: 0 24px 0 0; }
html.touch #heroes .hr-altar { grid-template-columns: 1fr; overflow-y: auto; height: auto; }
html.touch #heroes .hr-stage { min-height: 120px; padding-top: calc(44px / (var(--px) * var(--wz)) + 4px); }
html.touch #heroes .hr-altar-info { padding-top: 0; }
/* the ten and the free hero side by side fit the narrow stage of a phone (640 px: 269 px in a stage of 276; PC 332) */
html.touch #heroes .hr-pull.bonus { gap: 5px; }
html.touch #heroes .hr-pull.bonus .hr-cards { --cw: 40px; --cg: 4px; }
html.touch #heroes .hr-bonus-slot { width: 48px; }
@media (prefers-reduced-motion: reduce) { #heroes .hr-layer, #heroes .hr-pop, #heroes .hr-rankup, #heroes .hr-fresh { animation: none; } #heroes .hr-run-btn::after, #heroes .hr-claim-all::after { animation: none; opacity: .6; } #heroes .hr-prog i { transition: none; } }
