/* The web's main island laid out like the mobile app's (unity-client Screens/IslandScreen.cs, the owner's choices of
   11–12/11/2026), since the web became a live beta beside the app (15/11/2026). html.app-look is set in index.html.
   - a game screen, not a page: the 3D island fills the window, the top bar floats over it with a soft shade;
   - top bar: DRAGONBUM, BEM and Kim cương (no logo, no BUMX GAME tag, no Lượt quay, no Điểm), language, sound, mail, account;
   - no island name / number; the left column: Lv chip, next unlock, food, Xây dựng đảo (the way into building and
     upgrading, with the count of what can be upgraded), Tân Thủ;
   - no row of icons over the island (Thuyền chiến, Nâng cấp, Xây dựng, Hạm đội, Nhiệm vụ, Bạn bè, Xếp hạng, Thế giới):
     the moored ship opens the ships (Thuyền Chiến and Hạm đội in one panel), the rest are in the account menu;
   - the feature buttons: a 3 × 3 grid on the right;
   - bottom: Ghé thăm (3 captains) on the left; Thu hoạch, Sửa chữa, Đảo Rồng, Xem đảo khác centred. */
html.app-look { --top: 58px; background: #092c36; }
html.app-look body { overflow: hidden; }
html.app-look #app-scroll { position: fixed; inset: 0; overflow: hidden; }
html.app-look .topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--top) !important; min-height: 0 !important; padding: 6px 14px 0 !important;
    background: linear-gradient(180deg, #04161eb8 0%, #04161e80 60%, #04161e00 100%) !important; border: 0 !important; box-shadow: none !important; gap: 8px !important; flex-wrap: nowrap !important;
}
html.app-look .brand-logo, html.app-look .demo-badge, html.app-look .topbar .resource:has(#energy), html.app-look .topbar .resource.score, html.app-look #settings-open { display: none !important; }
html.app-look .brand { font-size: 21px; font-weight: 900; letter-spacing: 1.3px; color: #ffd77a; white-space: nowrap; }
html.app-look .brand .brand-bottom { color: #ff8a3a; display: inline !important; font-size: inherit !important; letter-spacing: inherit !important; }
html.app-look .brand > span { white-space: nowrap; }
html.app-look .topbar .resources { margin-left: 16px !important; gap: 8px; }
html.app-look .topbar .resource { background: #153842; border: 1px solid #34515b; border-radius: 12px; padding: 4px 12px !important; min-width: 0 !important; height: 46px; }
html.app-look .topbar .resource.coin { min-width: 150px !important; }
html.app-look .topbar .resource.diamond > span { color: #bfefff; }
html.app-look .topbar .resource.diamond strong { color: #bfefff; }
html.app-look main { position: fixed; inset: 0; margin: 0 !important; padding: 0 !important; max-width: none !important; }
html.app-look .heading, html.app-look .captain-dashboard, html.app-look main > footer, html.app-look .land-tools, html.app-look .island-progress,
html.app-look .sea-label, html.app-look .island-footer, html.app-look .island-social, html.app-look #island-number, html.app-look .island-title h2,
html.app-look #ship-hub, html.app-look #island-hub, html.app-look #expand-note { display: none !important; }
html.app-look .game-layout { position: absolute; inset: 0; margin: 0; display: block !important; }
html.app-look .island-panel { position: absolute; inset: 0; min-height: 0 !important; height: auto; margin: 0; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; overflow: visible; padding: 0 !important; }
html.app-look .island-scene { position: absolute !important; inset: 0; height: auto !important; min-height: 0 !important; border-radius: 0 !important; overflow: hidden; }
html.app-look #island-3d { inset: 0; border-radius: 0; }
/* the left column, under the top bar */
html.app-look .island-title { position: absolute !important; left: 14px !important; top: calc(var(--top) + 8px) !important; right: auto !important; max-width: 400px; }
html.app-look .island-title > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
html.app-look .island-title .level-chip { margin: 0; }
html.app-look .island-title .island-summary { margin: 0; flex-basis: auto; }
html.app-look #expand-open { position: relative; margin: 0; flex: none; padding: 6px 16px 6px 12px; border-radius: 999px; border: 1.5px solid #ffd77a; background: linear-gradient(90deg, #2f8a3add, #1d5a2add); box-shadow: 0 2px 8px #0005; }
html.app-look #expand-open b { font-weight: 900; }
html.app-look #expand-badge { position: absolute; top: -8px; right: -8px; }
html.app-look .island-title > div > :is(.level-chip, .island-summary, #expand-open, .newbie-pill, .next-unlock) { flex: none; }
html.app-look .island-title .island-summary, html.app-look .island-title #expand-open, html.app-look .island-title .newbie-pill { flex-basis: 100%; width: max-content; max-width: max-content; }
/* the feature buttons: three columns of 64 */
html.app-look .feature-sidebar { display: grid !important; grid-template-columns: repeat(3, 64px) !important; grid-auto-rows: 66px !important; gap: 8px 6px !important; width: auto !important; top: calc(var(--top) + 6px) !important; right: 12px !important; left: auto !important; bottom: auto !important; }
html.app-look .feature-sidebar button { min-height: 0 !important; height: 66px !important; width: 64px !important; padding: 5px 2px !important; gap: 1px !important; border-radius: 12px !important; font-size: 21px !important; }
html.app-look .feature-sidebar button > span:first-child, html.app-look .feature-sidebar .chest-icon, html.app-look .feature-sidebar .mini-wheel { transform: scale(.8); }
html.app-look .feature-sidebar small { font-size: 9px !important; line-height: 1.15 !important; }
html.app-look .feature-sidebar b { font-size: 8.5px !important; }
/* bottom: Ghé thăm (three captains, no Tấn công half), the pills centred */
html.app-look .island-scene .visitors-bar { left: 12px !important; bottom: 8px !important; right: auto !important; max-width: none !important; height: auto !important; max-height: none !important; padding-top: 7px !important; padding-bottom: 5px !important; }
html.app-look .visitors-bar .attackers-title, html.app-look .visitors-bar .attacker, html.app-look .visitors-bar .visitor:nth-of-type(n + 5) { display: none !important; }
/* the title as a small line on top (the rotated one made the box as tall as the words) */
html.app-look .island-scene .visitors-bar { display: grid !important; grid-template-columns: repeat(3, auto); justify-content: start; align-items: start !important; gap: 3px 8px !important; }
html.app-look .visitors-bar .attackers-list { display: none !important; }
html.app-look .visitors-bar .visitors-title { writing-mode: horizontal-tb !important; transform: none !important; grid-column: 1 / -1; align-self: auto !important; text-align: left !important; padding: 1px 6px !important; letter-spacing: 0 !important; }
/* the raid alert drops under the floating top bar instead of covering BEM */
html.app-look .raid-alert { top: calc(var(--top, 56px) + 6px) !important; }
html.app-look .visitors-bar:has(.visitors-empty):not(:has(.visitor)) { display: none !important; }
html.app-look .scene-pills { position: absolute !important; left: 50% !important; right: auto !important; top: auto !important; bottom: 12px !important; translate: -50% 0 !important; display: flex !important; flex-direction: row !important; align-items: center !important; gap: 8px !important; max-width: none !important; }
html.app-look .hub-pill {
    position: relative; display: flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 14px 0 6px; border-radius: 999px;
    border: 2px solid #9fe8ff; color: #fff; font-weight: 900; font-size: 13px; box-shadow: 0 4px 14px #0006; cursor: pointer; white-space: nowrap;
}
html.app-look .visit-pill { background: linear-gradient(135deg, #1d6a8a, #0f3f5c); }
html.app-look .visit-pill img { position: static !important; width: 30px; height: 30px; flex: none; }
html.app-look .visit-pill span { display: inline !important; }
html.app-look .scene-pills > button { flex: none; }
/* the clan tag sits on the account card's side in the app, not over the island */
html.app-look .island-title .cl-chip { display: none !important; }
html.app-look .scene-pills .repair-pill span { display: inline !important; }
/* not wide enough to centre the pills clear of Ghé thăm (the app: never over the bar): they line up on the right */
@media (max-width: 1100px) {
    html.app-look .scene-pills { left: auto !important; right: 12px !important; translate: none !important; justify-content: flex-end; flex-wrap: wrap !important; max-width: calc(100% - 250px) !important; }
}
/* a phone held upright with the page upright too: the grid narrows to two columns. Not when the game is turned to
   landscape on that phone (html.rotated): it then has the landscape layout, the pills on the bottom edge as in the app */
@media (max-width: 600px) {
    html.app-look:not(.rotated) .topbar .resource.coin { min-width: 0 !important; }
    html.app-look:not(.rotated) .brand { font-size: 15px; }
    html.app-look:not(.rotated) .feature-sidebar { grid-template-columns: repeat(2, 60px) !important; grid-auto-rows: 60px !important; }
    html.app-look:not(.rotated) .feature-sidebar button { width: 60px !important; height: 60px !important; }
    html.app-look:not(.rotated) .scene-pills { bottom: 78px !important; max-width: calc(100% - 24px) !important; }
}
/* the account menu: links to what the island's icon row used to open */
.acc-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.acc-links button { position: relative; }
.acc-links .quest-badge { position: static; display: inline-grid; margin-left: 4px; }

/* ---- Đảo Rồng as the app (Screens/DragonIsleScreen.cs, the owner 12/11/2026) ----------------------------------------
   the design team's icons; a 3 × 2 grid of 66 buttons (Đập trứng, Chợ trời, Thu vàng, Bách khoa, Kho đồ, Thần Khí);
   bottom row: Rồng của tôi, Dung hợp, Đội hình, Leo hạng, Ải Viễn Chinh; Thu vàng's bag shakes while gold is ready. */
.isle-ic { display: block; width: 40px; height: 40px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 3px #0007); }
.dragon-top h2 .isle-ic { display: inline-block; width: 30px; height: 30px; vertical-align: -7px; margin-right: 6px; }
.boss-launch-head img { width: 40px; height: auto; display: block; margin: 0 auto; }
html .dragon-actions { display: grid !important; grid-template-columns: repeat(3, 66px) !important; gap: 6px !important; top: 58px !important; right: 10px !important; }
html .dragon-actions button { width: 66px !important; height: 66px !important; min-height: 0 !important; padding: 3px 3px 4px !important; gap: 1px !important; justify-content: flex-start; border-radius: 14px; background: linear-gradient(145deg, #4a2f6acc, #22163acc); }
html .dragon-actions small { font-size: 10px !important; font-weight: 700; line-height: 1.12; }
.dragon-actions [data-dragon-collect].has-gold small { color: #ffd77a; font-weight: 900; font-size: 10.5px !important; }
.money-bag { display: block; transform-origin: 50% 92%; }
.has-gold .money-bag { animation: bag-shake 2.4s ease-in-out infinite; }
.has-gold .money-bag .isle-ic { filter: drop-shadow(0 0 6px #ffd77acc) drop-shadow(0 2px 3px #0007); }
@keyframes bag-shake {
    0%, 55%, 100% { transform: none; }
    60% { transform: translateY(-4px) rotate(-9deg) scale(1.04, .96); }
    66% { transform: translateY(-2px) rotate(8deg); }
    72% { transform: rotate(-6deg) scale(.97, 1.04); }
    78% { transform: rotate(4deg); }
    84% { transform: translateY(-3px) rotate(-2deg); }
    90% { transform: scale(1.05, .95); }
}
html .dragon-quick button { height: 44px !important; padding: 0 12px 0 6px !important; gap: 6px !important; border-radius: 15px !important; }
html .dragon-quick button .isle-ic { width: 36px; height: 36px; }
html .dragon-quick small { font-size: 12.5px !important; font-weight: 800; }
.market-orbs { margin-left: 10px; font-size: 13px; vertical-align: middle; }
.fstone { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -.28em; object-fit: contain; }
.res-icon .fstone, .stone-icon .fstone, .mc-stone .fstone { width: auto; height: 1.3em; }
.dragon-top h2 { display: flex !important; align-items: center; white-space: nowrap; }
/* Dung hợp as the app (FuseDialog.cs, the owner 12/11/2026): the two slots and the core on top, the info panel full
   width under the need row, the roster in three columns */
html .fuse-top { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important; justify-content: stretch !important; }
html .fuse-work > .fuse-panel { grid-column: auto !important; margin-top: 8px; max-height: 150px !important; min-height: 0 !important; overflow: auto; }
html .fuse-cards { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.fuse-heart .fuse-ic { width: 58%; height: 58%; object-fit: contain; filter: drop-shadow(0 0 8px #c89bffaa); animation: fuse-ic-pulse 2.2s ease-in-out infinite; }
@keyframes fuse-ic-pulse { 50% { transform: scale(1.08) rotate(6deg); filter: drop-shadow(0 0 14px #e2c7ffdd); } }

/* ---- Trang bị: the design team's layered icons (gear-icons.js gearIconImg; the app's GearIcons.cs) -------------------- */
.gear-img { position: relative; display: inline-block; vertical-align: middle; flex: none; isolation: isolate; }
.gear-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.gear-img.empty > img { opacity: .45; }
.gi-aura { position: absolute; inset: -6%; z-index: -1; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; opacity: .9; }
.gi-aura.throb { animation: gi-throb 1.6s ease-in-out infinite; }
@keyframes gi-throb { 50% { opacity: .55; transform: scale(1.06); } }
.gi-badge { position: absolute; right: 8.6%; bottom: 8.6%; width: 28.1%; height: 18.75%; display: grid; place-items: center; background: center / 100% 100% no-repeat; color: #fff; font-weight: 900; line-height: 1; text-shadow: 0 1px 2px #000e; font-style: normal; }
/* the tier's sparkle: t3 a glint now and then, t4 two, t5 + a breathing glow, t6 + a light sweep, t7 turning rays */
.gear-img[class*="gear-shine-t"]::before, .gear-img[class*="gear-shine-t"]::after { content: none; }
.gear-shine-t3::after, .gear-shine-t4::after, .gear-shine-t5::after, .gear-shine-t6::after, .gear-shine-t7::after {
    content: ''; position: absolute; width: 22%; height: 22%; left: 18%; top: 14%; pointer-events: none;
    background: radial-gradient(circle, #fff 0 12%, transparent 13%), conic-gradient(from 0deg, transparent 0 40deg, #fffc 45deg, transparent 50deg 130deg, #fffc 135deg, transparent 140deg 220deg, #fffc 225deg, transparent 230deg 310deg, #fffc 315deg, transparent 320deg);
    border-radius: 50%; opacity: 0; animation: gi-glint 3.2s ease-in-out infinite;
}
.gear-shine-t4::after, .gear-shine-t5::after { animation-duration: 2.4s; }
.gear-shine-t6::after, .gear-shine-t7::after { animation-duration: 1.8s; }
@keyframes gi-glint { 0%, 70%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 80% { opacity: 1; transform: scale(1) rotate(45deg); } 90% { opacity: 0; transform: scale(.4) rotate(90deg); } }
.gear-shine-t5, .gear-shine-t6 { filter: drop-shadow(0 0 3px var(--tier)) drop-shadow(0 2px 2px #0007); animation: gi-breathe 2.6s ease-in-out infinite; }
@keyframes gi-breathe { 50% { filter: drop-shadow(0 0 7px var(--tier)) drop-shadow(0 2px 2px #0007); } }
.gear-shine-t6::before, .gear-shine-t7::before { content: ''; position: absolute; inset: 9%; border-radius: 12%; pointer-events: none; z-index: 2; overflow: hidden;
    background: linear-gradient(105deg, transparent 35%, #ffffff88 48%, transparent 60%) -150% 0 / 250% 100% no-repeat; animation: gi-sweep 3s ease-in-out infinite; mix-blend-mode: screen; }
.gear-shine-t7::before { animation-duration: 1.9s; }
@keyframes gi-sweep { 0%, 40% { background-position: 150% 0; } 75%, 100% { background-position: -150% 0; } }
.gear-shine-t7 { filter: drop-shadow(0 0 5px #ff9ff0) drop-shadow(0 0 2px #9ff3ff); animation: gi-diamond 3s linear infinite; }
@keyframes gi-diamond { 33% { filter: drop-shadow(0 0 6px #9ff3ff) drop-shadow(0 0 2px #fff); } 66% { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 2px #ff9ff0); } }

/* ---- Nâng cấp Rồng as the app: the overview on Nâng cấp; Cường hoá inside Trang bị --------------------------------------- */
.up-overview { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 10px; }
.up-overview button { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; border: 1px solid #ffd77a55; background: linear-gradient(135deg, #3b1d5acc, #1d1430cc); color: #fff; text-align: left; cursor: pointer; }
.up-overview i { font-style: normal; font-size: 11px; font-weight: 800; color: #ffd77a; margin-left: auto; white-space: nowrap; }
.ov-orb { font-weight: 900; font-size: 15px; color: #e7c8ff; white-space: nowrap; }
.ov-soul span:nth-child(2) { display: grid; line-height: 1.2; } .ov-soul small { color: #ffcf8a; font-size: 11px; }
.ov-items { display: flex; gap: 4px; }
.up-forge { display: block; width: 100%; margin-top: 12px; background: linear-gradient(135deg, #c0392b, #7a1f3d) !important; border: 2px solid #ffd77a !important; color: #fff !important; font-weight: 900; letter-spacing: .5px; }
.up-back-gear { margin-bottom: 8px; }

/* ---- Người chơi trên biển: island cards, two columns (the app's OceanDialog) ---------------------------------------- */
.ocean-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
.ocean-card { display: grid; grid-template-columns: 36% minmax(0, 1fr); gap: 8px; padding: 6px; border-radius: 14px; background: linear-gradient(145deg, #173f4a, #0f2b33); border: 1px solid #34515b; min-height: 140px; }
.ocean-card.damaged { border-color: #b8873a88; } .ocean-card.ruined { border-color: #c0563a99; }
.oc-pic { position: relative; border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 55%, #3fc3d6, #137a9a); display: grid; place-items: center; }
.damaged .oc-pic { background: radial-gradient(circle at 50% 55%, #2f7f8f, #164a58); } .ruined .oc-pic { background: radial-gradient(circle at 50% 55%, #4a5a60, #1c2a30); }
.oc-pic > img { width: 100%; height: 100%; object-fit: cover; }
.oc-pic .oc-shield { position: absolute; inset: 0; object-fit: contain; pointer-events: none; }
.oc-rank { position: absolute; left: 4px; top: 4px; padding: 1px 7px; border-radius: 999px; background: #0008; color: #d7eef0; font-size: 10.5px; font-weight: 800; }
.oc-lv { position: absolute; right: 4px; top: 4px; padding: 1px 7px; border-radius: 999px; background: linear-gradient(90deg, #ffcd69, #ff8a3d); border: 1px solid #fff0c4; color: #3e2410; font-size: 10.5px; font-weight: 900; }
.oc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.oc-name { color: #ffe3a3; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-who { font-size: 10.5px; color: #fff; line-height: 1.3; } .oc-who span { color: #8fb0b3; }
.oc-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.oc-box { display: flex; align-items: center; gap: 5px; padding: 4px; border-radius: 10px; background: #0004; border: 1px solid #ffffff14; min-width: 0; }
.oc-box > img, .oc-box > i { width: 38px; height: 38px; object-fit: contain; flex: none; font-style: normal; font-size: 22px; display: grid; place-items: center; }
.oc-box span { display: grid; min-width: 0; line-height: 1.15; } .oc-box b { font-size: 10px; font-weight: 800; color: #cfe3e2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.oc-box small { font-size: 9.5px; color: #ffd9a8; } .oc-box:last-child small { color: #8fb0b3; }
.oc-line { font-size: 10.5px; color: #bcd1d1; } .oc-line b { color: #ffd166; } .oc-line .sc-chest img { width: 14px; vertical-align: -2px; }
.oc-actions { margin-top: auto; display: grid; grid-template-columns: 1fr 2fr; gap: 4px; }
.oc-actions .raid-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.oc-actions button { min-height: 30px; padding: 0 6px; font-size: 12px; font-weight: 800; border-radius: 8px; }
@media (max-width: 600px) { html:not(.rotated) .ocean-cards { grid-template-columns: 1fr; } }

/* ---- Rồng của tôi as the app (DragonIsleScreen.MineCard, the owner 12/11/2026) ---------------------------------------
   two columns; the frame grows with the level: plain under 10, bronze, silver, gold (glow pulsing from 30), blazing gold,
   and a living diamond rim at 50; a red NEW ribbon for a day; a jewel Lv pill; the gear at 40 px with its sparkle. */
html .mine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
.mine-card { --b1: var(--rc); --b2: var(--rc); }
.mine-card.lb-1 { --b1: #e0975a; --b2: #8a4d22; } .mine-card.lb-2 { --b1: #e8f0f6; --b2: #8ea3b4; } .mine-card.lb-3 { --b1: #ffd45a; --b2: #c98a12; }
.mine-card.lb-4 { --b1: #ffe27a; --b2: #ff8a1e; } .mine-card.lb-5 { --b1: #bff4ff; --b2: #c58bff; }
.mine-card[class*="lb-"]:not(.lb-0) { border-color: var(--b1) !important; background: linear-gradient(180deg, color-mix(in srgb, var(--b1) 22%, #0c2129), #0c2129 70%) !important; }
.mine-card.lb-1 { border-width: 1.9px !important; box-shadow: 0 0 13px color-mix(in srgb, var(--b1) 35%, transparent), 0 6px 16px #0007; }
.mine-card.lb-2 { border-width: 2.3px !important; box-shadow: 0 0 18px color-mix(in srgb, var(--b1) 45%, transparent), 0 6px 16px #0007; }
.mine-card.lb-3, .mine-card.lb-4, .mine-card.lb-5 { border-width: 2.7px !important; animation: mine-glow 2.8s ease-in-out infinite; }
.mine-card.lb-4, .mine-card.lb-5 { outline: 1px solid color-mix(in srgb, var(--b2) 80%, transparent); outline-offset: -5px; }
.mine-card.lb-5 { animation: mine-glow 2.4s ease-in-out infinite, mine-diamond 4s linear infinite; }
@keyframes mine-glow { 0%, 100% { box-shadow: 0 0 10px color-mix(in srgb, var(--b1) 35%, transparent), 0 6px 16px #0007; } 50% { box-shadow: 0 0 26px color-mix(in srgb, var(--b1) 75%, transparent), 0 6px 16px #0007; } }
@keyframes mine-diamond { 0%, 100% { border-color: #bff4ff; } 33% { border-color: #ffc6f2; } 66% { border-color: #ffffff; } }
.mine-new { display: inline-block; padding: 1px 6px; border-radius: 6px; background: linear-gradient(180deg, #ff6a4d, #d4202f); border: 1px solid #ffd0b8; color: #fff; font-size: 9px; font-weight: 900; letter-spacing: .8px; box-shadow: 0 2px 5px #0008; font-style: normal; }
html .mine-lv { display: flex; align-items: baseline; gap: 1.5px; padding: 1px 8px !important; border-radius: 999px !important; color: #ffe7a8 !important; font-size: 12.5px !important; font-weight: 900; background: linear-gradient(180deg, #2a3a40, #132228) !important; border: 1px solid #ffffff4d; box-shadow: 0 2px 6px #0009; }
.mine-lv small { font-size: 8.5px; font-weight: 800; }
.mine-card:not(.lb-0):not(.lb-1) .mine-lv { color: #2b1a00 !important; }
.mine-card:not(.lb-0) .mine-lv { background: linear-gradient(180deg, var(--b1), var(--b2)) !important; border-color: #ffffffbf; }
.mine-card.lb-5 .mine-lv { animation: mine-diamond 4s linear infinite; }
/* 4 gear slots share the info column evenly (a filled slot's border and glow no longer push the 4th out of the card) */
html .mine-gear { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px !important; width: 100%; max-width: 186px; }
html .mine-gear span { box-sizing: border-box; width: 100% !important; height: auto !important; aspect-ratio: 1; min-width: 0; opacity: 1 !important; background: #0005; border-radius: 8px; overflow: hidden; }
html .mine-gear span:not(.on) .gear-img { width: 70% !important; height: 70% !important; }
html .mine-gear .gear-img { width: 100% !important; height: 100% !important; }
/* Nâng cấp / Bán: same fixed height on every card, pinned to the bottom, never stretched by a taller neighbour */
html .mine-grid .mine-card { grid-template-rows: 1fr auto; align-content: stretch; }
html .mine-grid .mine-main { align-self: start; }
html .mine-acts button { -webkit-appearance: none; appearance: none; height: 34px; min-height: 34px; max-height: 34px; padding: 0 4px; }
html .mine-acts .up { background-color: #f0a92e; }
html .mine-gear .gear-img > img { width: 100% !important; height: 100% !important; }
.gear-img > img { max-width: none; }

/* ---- skill icons (gear-icons.js skillIconHtml; the app's SkillIcons) ------------------------------------------------- */
.skill-img { position: relative; display: inline-block; width: 1em; height: 1em; vertical-align: middle; flex: none; }
.skill-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.skill-img > i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: .42em; }
.skill-img.locked > img:first-child { filter: grayscale(.85) brightness(.8); }
.skill-img .skill-lock { inset: 20%; width: 60%; height: 60%; }
.skill-icon.has-img { padding: 2px !important; font-size: 44px !important; line-height: 0; background: none !important; border: 0 !important; }
.dk-skill .skill-img { font-size: 30px; margin-right: 6px; }
.gi-count { font-style: normal; font-weight: 900; color: #ffd77a; margin-left: 4px; }
.up-item .take-back { background: #4a2f6a; color: #ffe3a3; } .up-item .take-back.armed { background: #c0392b; color: #fff; }

/* ---- Dung hợp: the reveal's intro (the app's FuseReveal) ------------------------------------------------------------- */
.fusion-reveal.intro .fr-wrap, .fusion-reveal.intro .egg-rays, .fusion-reveal.intro .mut-shout { opacity: 0; }
.fusion-reveal .fr-wrap { transition: opacity .5s ease; }
.fr-intro { position: absolute; inset: 0; z-index: 20; pointer-events: none; display: grid; place-items: center; }
.fr-intro b { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: var(--rarity, #fff); box-shadow: 0 0 10px var(--rarity, #fff), 0 0 3px #fff;
    animation: fr-mote 1.3s cubic-bezier(.55, 0, .8, .5) var(--d) both; }
@keyframes fr-mote { from { transform: rotate(var(--a)) translateX(var(--r)) rotate(0) scale(1.2); opacity: 0; } 15% { opacity: 1; } to { transform: rotate(calc(var(--a) + 300deg)) translateX(0) scale(.3); opacity: .9; } }
.fr-core { position: absolute; width: 14vmin; height: 14vmin; border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, var(--rarity, #fff) 45%, transparent 70%); animation: fr-core 1.75s ease-in both; }
@keyframes fr-core { 0% { transform: scale(.2); opacity: .3; } 75% { transform: scale(1.1); opacity: 1; } 92% { transform: scale(1.6); opacity: 1; } 100% { transform: scale(2.6); opacity: 0; } }
.fr-ring { position: absolute; width: 20vmin; height: 20vmin; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 24px var(--rarity, #fff); opacity: 0; animation: fr-ring .8s ease-out 1.65s both; }
@keyframes fr-ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(6); opacity: 0; } }
.fr-intro::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0; animation: fr-flash .55s ease-out 1.65s both; }
@keyframes fr-flash { 0% { opacity: 0; } 15% { opacity: .95; } 100% { opacity: 0; } }

/* Màn bắn pháo: the standing hint about the enemy's Chiến hạm bảo vệ Đảo (Pháo phản kích), game/aim.js guide() */
.aim-guide { position: absolute; left: 50%; top: 104px; translate: -50% 0; z-index: 2; margin: 0; padding: 7px 14px; border-radius: 12px; max-width: min(92%, 560px); text-align: center;
    background: #3b0f0ae6; border: 1px solid #ff8a5c; color: #ffe2cf; font-weight: 800; font-size: 13px; line-height: 1.35; pointer-events: none; box-shadow: 0 4px 16px #0006; }
.aim-guide.is-good { background: #0f3b1de6; border-color: #7fe39a; color: #dfffe6; }
/* Chiến hạm bảo vệ Đảo panel (app.js showGuard) */
.guard-sum { margin: 8px 0; font-size: 14px; }
.guard-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; max-height: 46vh; overflow: auto; }
.guard-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; background: #1d4a55; border: 1px solid #3d6f78; }
.guard-row.is-broken { background: #4a2620; border-color: #b0573f; }
.guard-row small { display: block; color: #bcd1d1; font-size: 12px; }
.guard-ic { font-size: 24px; text-align: center; }
.guard-act { display: flex; gap: 6px; }
.guard-act button { font-size: 12px; padding: 6px 9px; border-radius: 8px; border: 1px solid #5d7f86; background: #27535c; color: #f4e4b8; }

/* Chiến hạm bảo vệ Đảo count under the island, above the bottom pills (the owner, 16/11). */
.guard-line { position: absolute; left: 50%; translate: -50% 0; bottom: 64px; z-index: 4; border: 0; background: #06324acc; color: #e8f7ff; font-weight: 700; font-size: 13px; padding: 5px 14px; border-radius: 999px; white-space: nowrap; text-shadow: 0 1px 2px #0008; box-shadow: 0 2px 8px #0004; }
.guard-line.warn { color: #ffd98a; }
html.bp-720:not(.app-look) .guard-line { bottom: 140px; }
@media (max-width: 600px) { html.app-look:not(.rotated) .guard-line { bottom: 130px; } }

/* Xem đảo khác cards (the owner 16/11): the leader dragon's picture alone (its power under it), the warship turning in
   3D (spinShips) with the count of intact Chiến hạm bảo vệ Đảo. */
.oc-box.oc-dragon, .oc-box.oc-ship { flex-direction: column; justify-content: center; gap: 2px; padding: 4px 2px; }
.oc-box.oc-dragon > img { width: 56px; height: 56px; }
.oc-box.oc-dragon > img.oc-none { width: 40px; height: 40px; opacity: .45; filter: grayscale(.6); margin: 8px 0; }
.oc-box.oc-dragon small, .oc-box.oc-ship small { font-size: 10px; font-weight: 800; }
.oc-spin { width: 76px; height: 64px; display: block; background: center / contain no-repeat; }
.oc-spin.spinning { background-size: calc(var(--frames) * 100%) 100%; background-position: 0 0; animation: oc-spin 3.6s steps(var(--frames)) infinite; }
@keyframes oc-spin { to { background-position: calc(var(--frames) * -56px) 0; } }
.oc-box.oc-ship small.oc-guard { color: #9fe3ff; white-space: nowrap; } .oc-box.oc-ship small.oc-guard.none { color: #8fb0b3; }
@media (prefers-reduced-motion: reduce) { .oc-spin.spinning { animation: none; } }

/* The red dragon icon (assets/ui/isle/my-dragons.webp, the app's) in place of the 🐉 emoji everywhere (dragon-icon in app.js). */
img.dragon-ic { width: 1.25em; height: 1.25em; vertical-align: -.28em; object-fit: contain; display: inline-block; }
.dragon-pill .dragon-pill-icon { flex: none; width: 26px; height: 26px; display: grid; place-items: center; }
.dragon-pill .dragon-pill-icon img.dragon-ic { width: 26px; height: 26px; vertical-align: 0; }

/* ---- Tà Long · bàn cờ xếp gạch (boss-board.js, the owner 16/11) ---------------------------------------------------- */
.bb-root { position: absolute; inset: 0; pointer-events: none; z-index: 6; --cell: 44px; }
.bb-wrap { position: absolute; left: 50%; top: calc(50% - 34px); translate: -50% -50%; display: grid; gap: 6px; justify-items: center; pointer-events: auto; transition: opacity .35s, scale .35s, translate .35s; }
.bb-root.is-small .bb-wrap { translate: -50% -50%; }
.bb-root.is-playing .bb-wrap { opacity: 0; scale: .82; pointer-events: none; }
.bb-status { min-height: 22px; padding: 3px 14px; border-radius: 999px; background: #08202bcc; border: 1px solid #ffd77a55; color: #fff3d0; font-size: 12.5px; font-weight: 800; text-align: center; max-width: calc(var(--cell) * 7); }
.bb-status:empty { visibility: hidden; }
.bb-status[data-kind="bad"] { color: #ffb4a8; border-color: #ff7a6a88; } .bb-status[data-kind="go"] { color: #b9ffcf; border-color: #6dffa088; }
.bb-board { display: grid; grid-template-columns: repeat(7, var(--cell)); grid-auto-rows: var(--cell); padding: 6px; border-radius: 16px; background: linear-gradient(#0d2f3df2, #061823f2); border: 2px solid #ffd77a99; box-shadow: 0 10px 30px #000a, inset 0 0 18px #0008; touch-action: none; user-select: none; -webkit-user-select: none; }
.bb-root.is-wait .bb-board { filter: saturate(.55) brightness(.8); }
.bb-board.shake { animation: bb-shake .35s; }
@keyframes bb-shake { 25% { translate: -6px 0; } 50% { translate: 6px 0; } 75% { translate: -3px 0; } }
.bb-cell { all: unset; box-sizing: border-box; width: var(--cell); height: var(--cell); padding: 2px; display: grid; place-items: center; cursor: pointer; position: relative; transition: transform .17s ease-out; }
.bb-cell.falling { transition: transform .3s cubic-bezier(.3, 1.3, .5, 1); }
.bb-cell:focus-visible { outline: 2px solid #ffd77a; border-radius: 10px; }
.bb-gem { width: 100%; height: 100%; border-radius: 28%; display: grid; place-items: center; box-shadow: inset 0 -4px 0 #0004, inset 0 3px 0 #fff6, 0 2px 4px #0006; border: 1.5px solid #ffffff55; }
.bb-gem svg { width: 62%; height: 62%; filter: drop-shadow(0 1px 1px #0007); }
.bb-gem.k-sword { background: radial-gradient(circle at 35% 30%, #ffe48a, #f0a21a 60%, #b56a06); }
.bb-gem.k-shield { background: radial-gradient(circle at 35% 30%, #a9dcff, #2f86e8 60%, #17509e); }
.bb-gem.k-heart { background: radial-gradient(circle at 35% 30%, #b8ffb0, #34b84d 60%, #187a2d); }
.bb-gem.k-power { background: radial-gradient(circle at 35% 30%, #ffb4a0, #ef4d33 60%, #a11e14); }
.bb-gem.k-skill { background: radial-gradient(circle at 35% 30%, #f0c2ff, #9b4ce6 60%, #5a1d9e); }
.bb-skill { width: 74%; height: 74%; display: grid; place-items: center; font-size: calc(var(--cell) * .42); }
.bb-skill .skill-img, .bb-skill img { width: 100%; height: 100%; object-fit: contain; border-radius: 22%; }
.bb-skill .skill-img { position: relative; display: block; } .bb-skill .skill-img i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: calc(var(--cell) * .3); }
.bb-cell.is-sel .bb-gem { outline: 3px solid #fff; outline-offset: -1px; scale: 1.08; box-shadow: 0 0 14px #fff, inset 0 -4px 0 #0004; }
.bb-cell.is-hint .bb-gem { animation: bb-hint 1s ease-in-out infinite; }
@keyframes bb-hint { 50% { scale: 1.1; box-shadow: 0 0 16px #fff8, inset 0 -4px 0 #0004; } }
.bb-cell.pop .bb-gem { animation: bb-pop .42s ease-in forwards; }
@keyframes bb-pop { 30% { scale: 1.25; filter: brightness(1.8); } 100% { scale: 0; opacity: 0; filter: brightness(2.5); } }
/* the combo column: square cards down the left of the screen */
.bb-combo { position: absolute; left: 10px; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; gap: 6px; }
.bb-card { width: 64px; padding: 5px 4px 4px; border-radius: 12px; background: #08202be6; border: 2px solid #ffd77a; display: grid; justify-items: center; gap: 1px; box-shadow: 0 4px 12px #0008; animation: bb-card-in .3s ease-out; transition: opacity .25s, scale .25s; }
.bb-card .bb-gem { width: 38px; height: 38px; } .bb-card .bb-skill { font-size: 18px; }
.bb-card b { color: #fff; font-size: 15px; font-weight: 900; line-height: 1; } .bb-card b i { font-style: normal; }
.bb-card small { color: #ffe3a3; font-size: 8.5px; font-weight: 800; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bb-card { box-sizing: border-box; overflow: hidden; } .bb-combo { align-items: center; }
.bb-card.k-sword { border-color: #ffc54a; } .bb-card.k-shield { border-color: #6cb8ff; } .bb-card.k-heart { border-color: #6be07a; } .bb-card.k-power { border-color: #ff7a5a; } .bb-card.k-skill { border-color: #c98bff; }
.bb-card.bump { animation: bb-bump .3s ease-out; } .bb-card.used { animation: bb-used .35s ease-out; } .bb-card.spent { opacity: 0; scale: .6; }
@keyframes bb-card-in { from { opacity: 0; translate: -30px 0; } }
@keyframes bb-bump { 40% { scale: 1.18; box-shadow: 0 0 18px #ffd77a; } }
@keyframes bb-used { 40% { scale: .88; filter: brightness(2); } }
.bb-root.is-small .bb-card { width: 54px; } .bb-root.is-small .bb-card .bb-gem { width: 30px; height: 30px; }
/* the light that flies from a burst line to its card */
.bb-fly { position: absolute; inset: 0; pointer-events: none; }
.bb-orb { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: radial-gradient(circle, #fff, var(--c, #ffd77a) 45%, transparent 70%); box-shadow: 0 0 18px 6px var(--c, #ffd77a); animation: bb-orb .6s cubic-bezier(.5, 0, .7, 1) forwards; }
.bb-orb.k-sword { --c: #ffc54a; } .bb-orb.k-shield { --c: #6cb8ff; } .bb-orb.k-heart { --c: #6be07a; } .bb-orb.k-power { --c: #ff7a5a; } .bb-orb.k-skill { --c: #c98bff; }
@keyframes bb-orb { 0% { scale: .4; } 20% { scale: 1.4; } 100% { translate: var(--dx) var(--dy); scale: .7; opacity: .9; } }
/* while the board is up the fight's own footer buttons and side lists step back */
.boss-overlay.has-board .boss-side, .boss-overlay.has-board .boss-feed { opacity: .35; }
.boss-pop { position: absolute; z-index: 8; left: 42%; top: 44%; max-width: 80vw; translate: -50% 0; pointer-events: none; font-weight: 900; font-size: 20px; color: #fff; text-shadow: 0 2px 6px #000, 0 0 12px var(--c, #ffd77a); white-space: nowrap; animation: boss-pop 1.1s ease-out forwards; }
.boss-pop.at-boss { left: 70%; top: 34%; } .boss-pop.k-heart { --c: #6be07a; } .boss-pop.k-shield { --c: #6cb8ff; } .boss-pop.k-power { --c: #ff7a5a; } .boss-pop.k-hurt { --c: #ff3a2a; color: #ffd0c8; font-size: 22px; }
@keyframes boss-pop { 0% { opacity: 0; translate: -50% 10px; scale: .7; } 15% { opacity: 1; translate: -50% 0; scale: 1.1; } 100% { opacity: 0; translate: -50% -50px; } }
.boss-atkup { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #ef4d3333; border: 1px solid #ff7a5a99; color: #ffd0c4; font-size: 11px; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .bb-orb, .bb-cell.pop .bb-gem, .boss-pop { animation-duration: .01ms; } }
.bb-card.pending { opacity: .25; }
.bb-wrap .bb-status { order: 2; } .bb-wrap .bb-board { order: 1; }
/* the dragon's card under the board: big numbers (the 💪 and 🛡️ tiles move them) */
.boss-me .bs-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 2px 0 3px; }
.boss-me .bs-stat { display: grid; line-height: 1.05; }
.boss-me .bs-stat small { font-size: 10.5px; font-weight: 800; color: #bcd1d1; letter-spacing: .3px; }
.boss-me .bs-stat b { font-size: 20px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000a; }
.boss-me .bs-stat b em { font-style: normal; font-size: 12px; font-weight: 800; margin-left: 3px; color: #9fb4b6; }
.boss-me .bs-stat.hp b { color: #b9ffcf; } .boss-me .bs-stat.atk b { color: #ffd38a; } .boss-me .bs-stat.def b { color: #a9dcff; }
.boss-me .bs-stat.atk.up b em { color: #ff8a6a; }
.boss-me .bs-dmg { font-size: 11px; color: #bcd1d1; } .boss-me .bs-dmg b { color: #ffe3a3; }
.boss-me .boss-me-info .hpbar { height: 10px; }
.bb-root.is-away .bb-wrap { opacity: 0; scale: .82; pointer-events: none; }
.boss-me .bs-stats > .bs-stat { flex: 0 0 auto; width: auto; min-width: 0; }
.boss-me .bs-stats { flex-wrap: nowrap; }
/* the chosen tile: a bright streak runs round its edge (the owner 16/11) */
@property --bb-spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.bb-cell.is-sel::after { content: ''; position: absolute; inset: -1px; border-radius: 30%; padding: 3px; pointer-events: none; z-index: 2;
    background: conic-gradient(from var(--bb-spin), transparent 0 55%, #fff6c0 70%, #ffffff 76%, #ffd77a 82%, transparent 92%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px #ffd77a); animation: bb-spin 1.1s linear infinite; }
@keyframes bb-spin { to { --bb-spin: 360deg; } }
@media (prefers-reduced-motion: reduce) { .bb-cell.is-sel::after { animation: none; background: #ffd77a; } }
.bb-cell.is-sel .bb-gem { outline: 2px solid #ffffff66; outline-offset: 0; }
.bb-cell.is-sel::after { inset: -3px; padding: 4px; }
.bb-cell.is-sel::after { background: conic-gradient(from var(--bb-spin), transparent 0 38%, #ffb800 55%, #fff6c0 66%, #ffffff 72%, #fff6c0 78%, #ffb800 88%, transparent 97%); filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 7px #ffc94a) drop-shadow(0 0 12px #ffb800); }
.bb-status { white-space: pre-line; line-height: 1.35; }
/* Khoá mù (the last boss's snap): half the board hidden behind a blind eye */
.bb-cell.is-blind .bb-gem { visibility: hidden; }
.bb-blind { position: absolute; inset: 2px; border-radius: 28%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #3a2a5a, #120a22 75%); border: 1.5px solid #9a6cff88; box-shadow: inset 0 0 10px #000c, 0 0 8px #6a2aff66; animation: bb-blind-in .35s ease-out; pointer-events: none; }
.bb-blind svg { width: 58%; height: 58%; opacity: .9; filter: drop-shadow(0 0 3px #b07cff); }
@keyframes bb-blind-in { from { opacity: 0; scale: 1.3; } }
/* the bursts and the comets (the owner 16/11) */
.bb-orb { width: 16px; height: 16px; margin: -8px 0 0 -8px; opacity: 0; animation: bb-comet .62s cubic-bezier(.55, 0, .75, 1) forwards; }
.bb-orb .bb-tail { position: absolute; left: 50%; top: 50%; width: 70px; height: 6px; margin-top: -3px; transform-origin: 0 50%; rotate: calc(var(--ang) + 180deg); border-radius: 6px; background: linear-gradient(90deg, var(--c), transparent); filter: blur(1px); opacity: .9; }
@keyframes bb-comet { 0% { opacity: 0; scale: .3; } 12% { opacity: 1; scale: 1.5; } 100% { opacity: 1; translate: var(--dx) var(--dy); scale: .8; } }
.bb-blast { position: absolute; width: 0; height: 0; pointer-events: none; --c: #ffd77a; }
.bb-blast.k-sword { --c: #ffc54a; } .bb-blast.k-shield { --c: #6cb8ff; } .bb-blast.k-heart { --c: #6be07a; } .bb-blast.k-power { --c: #ff7a5a; } .bb-blast.k-skill { --c: #c98bff; }
.bb-blast b { position: absolute; left: calc(var(--cell) * -.5); top: calc(var(--cell) * -.5); width: var(--cell); height: var(--cell); border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, var(--c) 35%, transparent 70%); box-shadow: 0 0 0 3px var(--c); animation: bb-boom .45s ease-out forwards; }
.bb-blast.big b { animation-duration: .6s; }
.bb-blast i { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px var(--c); animation: bb-spark .55s ease-out forwards; }
@keyframes bb-boom { 0% { scale: .3; opacity: 1; } 60% { opacity: .9; } 100% { scale: 1.9; opacity: 0; box-shadow: 0 0 0 1px var(--c); } }
@keyframes bb-spark { to { translate: var(--sx) var(--sy); scale: .2; opacity: 0; } }
.bb-chain { position: absolute; left: 50%; top: 42%; translate: -50% -50%; display: grid; justify-items: center; pointer-events: none; z-index: 3; animation: bb-chain .9s ease-out forwards; }
.bb-chain small { font-size: 14px; font-weight: 900; letter-spacing: 4px; color: #fff3d0; text-shadow: 0 2px 6px #000; }
.bb-chain b { font-size: 46px; font-weight: 900; line-height: .9; color: #ffd77a; -webkit-text-stroke: 2px #5a2a00; text-shadow: 0 0 18px #ffb800, 0 4px 0 #8a4a00; }
.bb-chain.hot b { color: #ff7a5a; text-shadow: 0 0 22px #ff3a1a, 0 4px 0 #7a1a00; }
@keyframes bb-chain { 0% { scale: .4; opacity: 0; } 18% { scale: 1.25; opacity: 1; } 40% { scale: 1; } 100% { scale: 1.05; opacity: 0; translate: -50% -80%; } }
@media (prefers-reduced-motion: reduce) { .bb-blast, .bb-chain { display: none; } }
/* new tiles drop in from above the board: hidden until they enter it */
.bb-board { overflow: hidden; }

/* ---- Xây dựng đảo: Nâng cấp / Mua thêm (app.js showUpgrades, the owner 16/11) ----------------------------------- */
.bu-hero { margin: -4px 0 10px; padding: 12px 14px; text-align: center; font-size: 19px; font-weight: 900; line-height: 1.3; color: #ffe08a; background: linear-gradient(90deg, transparent, #0a3a4acc 15%, #0a3a4acc 85%, transparent); border-top: 1px solid #ffd77a55; border-bottom: 1px solid #ffd77a55; text-shadow: 0 2px 8px #000a; }
.growth-mark em { position: absolute; top: 40px; left: 50%; translate: -50% 0; font-style: normal; font-size: 10px; font-weight: 800; color: #9fe3ff; white-space: nowrap; }
.growth-road { margin-bottom: 18px; } .bu-hero ~ .growth-road .growth-text, .growth-road .growth-text { margin-top: 30px; }
.bu-tabs { display: flex; gap: 8px; margin: 6px 0 12px; position: sticky; top: -24px; z-index: 3; padding: 6px 0; background: #123841; }
.bu-tabs button { flex: 1; padding: 11px; border-radius: 12px; border: 1px solid #4d6f76; background: #163c46; color: #cfe3e2; font-weight: 900; font-size: 15px; }
.bu-tabs button[aria-selected="true"] { background: linear-gradient(#ffd77a, #f0a21a); color: #3e2410; border-color: #fff0c4; box-shadow: 0 4px 14px #f0a21a55; }
.bu-sec { margin: 14px 0 8px; font-size: 15px; color: #ffe3a3; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .bu-sec small { font-size: 11px; color: #9fb4b6; font-weight: 600; }
.bu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.bu-card { display: flex; gap: 10px; padding: 10px; border-radius: 14px; background: #163c46; border: 1px solid #35525a; align-items: stretch; }
.bu-card.is-broken { border-color: #d78265; }
.bu-thumb { position: relative; flex: none; width: 72px; height: 72px; border-radius: 12px; background: radial-gradient(circle at 50% 60%, #2a5a63, #0e2a33); display: grid; place-items: center; overflow: hidden; }
.bu-thumb img { width: 100%; height: 100%; object-fit: contain; display: none; } .bu-thumb img.is-3d { display: block; }
.bu-thumb .thumb-emoji { font-size: 34px; }
.bu-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bu-head { display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; } .bu-head h3 { margin: 0; font-size: 14.5px; line-height: 1.25; }
.bu-badge { flex: none; font-size: 10.5px; font-weight: 900; color: #ffcd69; background: #584e343b; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.bu-bar { display: block; height: 6px; border-radius: 6px; background: #2b525a; overflow: hidden; } .bu-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffe08a, #7be36a); border-radius: 6px; }
.bu-fx { margin: 0; font-size: 11.5px; line-height: 1.45; color: #b9f0c0; flex: 1; } .bu-fx b { color: #fff3c4; }
.bu-body > button, .ws-card { font: inherit; }
.bu-body > button { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 9px 11px; border-radius: 10px; border: 1px solid #4d6f76; background: #254a50; color: #f4e4b8; font-weight: 800; font-size: 13px; }
.bu-body > button[disabled] { opacity: .5; } .bu-body > button.is-full { border-color: #d78265; }
.bu-price { color: #ffd166; font-weight: 900; white-space: nowrap; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ws-card { display: grid; justify-items: center; gap: 3px; padding: 8px 6px; border-radius: 14px; border: 1px solid #35525a; background: #163c46; color: #eaf4ed; text-align: center; }
.ws-card .bu-thumb { width: 96px; height: 76px; } .ws-card b { font-size: 12px; line-height: 1.2; } .ws-card small { font-size: 10px; color: #9fb4b6; }
.ws-card:hover:not(:disabled) { border-color: #ffd77a; }
.bu-pop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: #00141c99; }
.bu-pop > div { width: min(340px, 86vw); padding: 20px; border-radius: 18px; background: #123841; border: 2px solid #ffd77a; text-align: center; box-shadow: 0 20px 60px #000a; animation: bb-card-in .25s ease-out; }
.bu-pop b { font-size: 18px; color: #ffe08a; } .bu-pop p { margin: 10px 0 4px; color: #eaf4ed; font-size: 14px; line-height: 1.5; }
@media (max-width: 600px) { html:not(.rotated) .bu-hero { font-size: 16px; } html:not(.rotated) .bu-grid { grid-template-columns: 1fr; } }

/* Tà Long, 17/11 (the owner): the 3 dragons on the field together, the team's death, and the Gunny-style damage numbers. */
.boss-me .bm-team { display: flex; align-items: flex-end; gap: 0; }
.boss-me .bm-team { gap: 4px; }
.boss-me .bm-team .bm-one { display: block; filter: drop-shadow(0 2px 4px #000c); } /* three equal boxes (the owner 17/11) */
.boss-me .boss-me-info > b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; display: block; }
.bl-card.is-mydead { filter: grayscale(.85) brightness(.7); }
.bl-card.is-mydead .bl-tag { background: #3a0d12e6; color: #ffb4b4; }
.boss-float { position: absolute; z-index: 9; translate: -50% -50%; pointer-events: none; display: grid; justify-items: center; line-height: 1; animation: boss-float 1.45s cubic-bezier(.2, .9, .3, 1) forwards; }
.boss-float b { font: 900 46px/1 'Lilita One', 'Baloo 2', system-ui, sans-serif; letter-spacing: 1px; color: #ffe14a; background: linear-gradient(#fff6a8 0%, #ffd21a 45%, #ff9a0a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; -webkit-text-stroke: 2px #5a2400; filter: drop-shadow(0 3px 0 #5a2400) drop-shadow(0 0 10px #ffb40099) drop-shadow(0 5px 6px #000a); }
.boss-float small { font: 900 15px/1 system-ui, sans-serif; color: #fff; -webkit-text-stroke: 1px #7a1000; text-shadow: 0 0 8px #ff3a00; margin-bottom: 2px; letter-spacing: 2px; }
.boss-float.is-crit b { font-size: 62px; background: linear-gradient(#fff3c4 0%, #ffb21a 40%, #ff4a0a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 2.5px #4a0800; filter: drop-shadow(0 3px 0 #4a0800) drop-shadow(0 0 16px #ff5a00cc) drop-shadow(0 6px 8px #000b); }
@keyframes boss-float { 0% { opacity: 0; scale: .3; } 12% { opacity: 1; scale: 1.45; } 24% { scale: .95; } 34% { scale: 1.05; } 70% { opacity: 1; translate: -50% calc(-50% - 46px); scale: 1; } 100% { opacity: 0; translate: -50% calc(-50% - 92px); scale: .9; } }
@media (max-height: 480px) { .boss-float b { font-size: 34px; } .boss-float.is-crit b { font-size: 44px; } }
@media (prefers-reduced-motion: reduce) { .boss-float { animation-duration: 1.2s; animation-timing-function: linear; } }

/* The boss list (17/11, the owner): at most 4 cards a row, bigger, each boss in turning 3D (boss-still.js bossSpin). */
html .boss-overlay .bl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
html .boss-overlay .bl-card:not(.final) { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 8px 10px 10px; gap: 4px; min-width: 0; }
html .boss-overlay .bl-card:not(.final) .bl-body { width: 100%; justify-items: center; }
html .boss-overlay .bl-card:not(.final) .bl-body .hpbar { width: 100%; }
html .boss-overlay .bl-art { display: grid; place-items: center; }
html .boss-overlay .bl-card:not(.final) .bl-art { width: 100%; height: clamp(96px, 20vh, 170px); }
html .boss-overlay .bl-card:not(.final) .bl-art svg, html .boss-overlay .bl-card:not(.final) .bl-art img { width: auto; height: 100%; max-width: 100%; }
html .boss-overlay .bl-card.final .bl-art { width: clamp(96px, 20vh, 170px); height: clamp(96px, 20vh, 170px); }
.bl-spin { display: block; width: 100%; height: 100%; aspect-ratio: 1; max-height: 100%; background: 0 0 / calc(var(--frames) * 100%) 100% no-repeat; animation: bl-spin 6s steps(var(--frames)) infinite; filter: drop-shadow(0 6px 10px #000c); }
html .boss-overlay .bl-art.is-3d { width: auto; }
html .boss-overlay .bl-card:not(.final) .bl-art.is-3d { width: 100%; }
html .boss-overlay .bl-art.is-3d .bl-spin { width: auto; height: 100%; }
@keyframes bl-spin { to { background-position: calc(var(--frames) / (var(--frames) - 1) * 100%) 0; } }
@media (prefers-reduced-motion: reduce) { .bl-spin { animation: none; } }

/* Tà Long (17/11, the owner): each dragon's own HP under its picture; a fallen one greyed; all three down → a popup over the screen. */
.boss-me .bm-team .bm-one { position: relative; }
.boss-me .bm-hp { position: absolute; left: 3px; right: 3px; bottom: 1px; height: 4px; border-radius: 3px; background: #0009; overflow: hidden; }
.boss-me .bm-hp > i { display: block; height: 100%; background: linear-gradient(90deg, #ff5a4a, #6be07a); }
.boss-me .bm-one.is-down { filter: grayscale(1) brightness(.55); }
.boss-me .bm-one > em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 20px; filter: none; }
.boss-defeat { position: absolute; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 45%, #2a0a12cc, #050208f2); animation: bd-in .35s ease-out; }
.boss-defeat[hidden] { display: none; }
.boss-defeat .bd-card { max-width: min(460px, 92%); text-align: center; padding: 22px 24px 20px; border-radius: 20px; background: linear-gradient(180deg, #2b1620, #150b12); border: 2px solid #ff6a5a88; box-shadow: 0 0 40px #ff3a2a55, 0 10px 30px #000c; color: #fff; }
.boss-defeat .bd-icon { font-size: 54px; display: block; line-height: 1; }
.boss-defeat h2 { margin: 10px 0 6px; font-size: clamp(20px, 3.4vw, 28px); color: #ffd0c8; }
.boss-defeat p { margin: 0 0 10px; font-size: 15px; color: #f2e6e0; }
.boss-defeat .bd-dmg { font-size: 13px; color: #ffcf7a; }
.boss-defeat button { min-width: 200px; font-size: 16px; }
@keyframes bd-in { from { opacity: 0; } to { opacity: 1; } }

/* The turn's countdown round the board (boss-board.js countdown): gold, then amber under 6 s, red and pulsing under 3 s;
   the other captain's turn (Siêu Cúp) in a quiet blue. */
.bb-timer { position: absolute; z-index: 3; pointer-events: none; overflow: visible; opacity: 0; transition: opacity .25s; }
.bb-timer.on { opacity: 1; }
.bb-timer rect { fill: none; stroke: #ffd447; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100 100; filter: drop-shadow(0 0 5px #ffd447aa); transition: stroke .3s; }
.bb-timer.warn rect { stroke: #ff9d2e; filter: drop-shadow(0 0 6px #ff9d2ecc); }
.bb-timer.hot rect { stroke: #ff3b3b; filter: drop-shadow(0 0 8px #ff3b3b); animation: bb-timer-hot .5s ease-in-out infinite alternate; }
.bb-timer.foe rect { stroke: #7fb4ff; filter: drop-shadow(0 0 4px #7fb4ff88); animation: none; }
@keyframes bb-timer-hot { to { stroke-width: 7; } }
.bb-root.is-playing .bb-timer, .bb-root.is-away .bb-timer { opacity: 0; }

/* The other captain's combo (Siêu Cúp replay): the column on the right, cards slide in from the right. */
.bb-root.is-foe-turn .bb-combo { left: auto; right: 10px; } .bb-root.is-foe-turn .bb-card { animation-name: bb-card-in-r; } @keyframes bb-card-in-r { from { opacity: 0; translate: 30px 0; } }
/* Chiến hạm bảo vệ Đảo: each row shows its warship's own picture (guardArt), a flame on a wrecked one */
.guard-row { grid-template-columns: 56px 1fr auto; }
.guard-ic { position: relative; width: 56px; height: 44px; display: grid; place-items: center; }
.guard-ic .bu-thumb { width: 56px; height: 44px; margin: 0; }
.guard-ic .bu-thumb img { width: 52px; height: 42px; object-fit: contain; }
.guard-row.is-broken .guard-ic .bu-thumb { filter: grayscale(.6) brightness(.75); }
.guard-fire { position: absolute; right: -2px; bottom: -2px; font-size: 16px; font-style: normal; }
html.short .guard-row { grid-template-columns: 44px minmax(0, 1fr); }
html.short .guard-ic, html.short .guard-ic .bu-thumb { width: 44px; height: 34px; }
.guard-ic .thumb-emoji { font-size: 22px; }
html.short .guard-ic .bu-thumb img { width: 40px; height: 32px; }
.cf-egg svg{width:30px;height:36px;display:block;margin:auto}

/* ---- Đập trứng (egg-open.js playBatch, the owner 19/11/2026): one big egg in the middle, light flies in, it cracks,
   a blinding flash, the shell bursts, the dragon on a full-size card. Sizes in container units of the overlay so a
   phone turned sideways (html.rotated: the body is rotated) gets the same layout as a landscape screen. */
.egg-open.hatch { container-type: size; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6cqh; padding: 2cqh 3cqw; box-sizing: border-box; overflow: hidden; background: radial-gradient(ellipse at center, #2c1f4d 0%, #0d0a1c 60%, #05040b 100%); cursor: default; }
.egg-open.hatch .egg-rays { opacity: 0; transition: opacity .8s; }
.egg-open.hatch.hx-charge .egg-rays { opacity: .18; }
.egg-open.hatch.hx-tint .egg-rays, .egg-open.hatch.hx-revealed .egg-rays { opacity: .5; }
/* the egg */
.hx-stage { position: absolute; left: 50%; top: 50%; width: min(34cqw, 46cqh); aspect-ratio: 100 / 120; transform: translate(-50%, -54%); z-index: 2; cursor: pointer; }
.hx-egg, .hx-frag { position: absolute; inset: 0; }
.hx-egg .egg-svg, .hx-frag .egg-svg { width: 100%; height: 100%; display: block; }
.hx-stage { animation: hxRise .9s cubic-bezier(.2, .9, .25, 1.15) both; }
.hx-egg { filter: drop-shadow(0 0 2.5cqmin #ffcd3a) brightness(1.5); transition: filter .6s; }
.hatch.hx-charge .hx-egg { animation: hxWobble 1.1s ease-in-out infinite; filter: drop-shadow(0 0 5cqmin #ffe7a6) brightness(1.75); }
.hatch.hx-tint .hx-egg { filter: drop-shadow(0 0 7cqmin var(--rarity)) brightness(1.7); }
.hatch.hx-shake .hx-egg { animation: hxShake .09s linear infinite; filter: drop-shadow(0 0 10cqmin var(--rarity)) brightness(1.9) saturate(1.3); }
.hx-egg .crack { opacity: 0; stroke-width: 3.6; stroke-dasharray: 60; stroke-dashoffset: 60; transition: opacity .1s, stroke-dashoffset .35s ease-out; }
.hatch.hx-c1 .hx-egg .crack.c0, .hatch.hx-c2 .hx-egg .crack.c1, .hatch.hx-c3 .hx-egg .crack.c2 { opacity: 1; stroke-dashoffset: 0; stroke: #fff6d0; filter: drop-shadow(0 0 3px #fff); }
.hx-halo { position: absolute; left: 50%; top: 55%; width: 210%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.6); border-radius: 50%; background: radial-gradient(circle, #fff8 0%, color-mix(in srgb, var(--rarity) 55%, transparent) 30%, transparent 68%); opacity: 0; transition: opacity 1s, transform 2.6s cubic-bezier(.3, .1, .3, 1); pointer-events: none; }
.hatch.hx-charge .hx-halo { opacity: .55; transform: translate(-50%, -50%) scale(.85); }
.hatch.hx-shake .hx-halo { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
.hx-count { position: absolute; right: -8%; top: 4%; font-size: 5cqmin; color: #ffe7a6; text-shadow: 0 0 12px #000, 0 0 18px var(--rarity); }
/* the motes: from far out to the egg, over and over while it charges */
.hx-motes { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hx-motes i { position: absolute; left: 50%; top: 46%; width: calc(1.6cqmin * var(--s)); height: calc(1.6cqmin * var(--s)); margin: -.8cqmin; border-radius: 50%; background: #fff; box-shadow: 0 0 1.4cqmin #ffe7a6, 0 0 3cqmin #ffcd3a; opacity: 0; }
.hatch.hx-charge .hx-motes i { animation: hxMote 1.35s cubic-bezier(.55, 0, .9, .45) var(--d) infinite; }
.hatch.hx-tint .hx-motes i { background: color-mix(in srgb, var(--rarity) 45%, #fff); box-shadow: 0 0 1.4cqmin var(--rarity), 0 0 3.4cqmin var(--rarity); }
.hatch.hx-burst .hx-motes i { animation: none; opacity: 0; }
/* the flash, then the shell in pieces */
.hx-flash { position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 46%, #fff 0%, #fff 30%, color-mix(in srgb, var(--rarity) 70%, #fff) 60%, var(--rarity) 100%); }
.hatch.hx-flashing .hx-flash { animation: hxFlash 1.1s ease-out forwards; }
.hx-frag { display: none; }
.hatch.hx-burst .hx-egg { visibility: hidden; }
.hatch.hx-burst .hx-frag { display: block; animation: hxFrag 1s cubic-bezier(.15, .7, .3, 1) forwards; }
.hatch.hx-revealed .hx-stage { pointer-events: none; }
/* title, cards, buttons */
.egg-open.hatch .batch-title { position: relative; z-index: 3; margin: 0; font-size: clamp(18px, 5cqh, 34px); color: #ffe7a6; text-shadow: 0 2px 10px #000; opacity: 1; transition: opacity .4s; }
.egg-open.hatch .egg-skip { z-index: 6; }
.egg-open.hatch .batch-grid { display: none; position: relative; z-index: 3; }
.egg-open.hatch.hx-revealed .batch-grid { display: grid; }
.egg-open.hatch .batch-slot { min-height: 0; animation: hxCard .7s cubic-bezier(.2, .9, .25, 1.2) both; animation-delay: var(--delay); }
.egg-open.hatch .batch-result { height: 100%; box-sizing: border-box; display: grid; gap: 1cqh 2cqw; padding: 1.4cqh 1.4cqw; border: 2px solid var(--rarity); border-radius: 18px; background: linear-gradient(160deg, #0d2a40ee, #07131fee); box-shadow: 0 0 4cqmin color-mix(in srgb, var(--rarity) 40%, transparent), inset 0 0 3cqmin color-mix(in srgb, var(--rarity) 18%, transparent); animation: none; }
.egg-open.hatch .batch-dragon { position: relative; height: auto; min-height: 0; min-width: 0; width: 100%; overflow: hidden; }
.egg-open.hatch .batch-dragon canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.egg-open.hatch .batch-info { display: flex; flex-direction: column; justify-content: center; gap: .6cqh; text-align: center; min-width: 0; }
.egg-open.hatch .batch-info b { color: #fff1ce; font-size: clamp(15px, 3.6cqh, 26px); line-height: 1.15; }
.egg-open.hatch .batch-rarity { font-weight: 800; font-size: clamp(13px, 2.8cqh, 20px); }
.egg-open.hatch .batch-info small { color: #d7e8ef; font-size: clamp(11px, 2.3cqh, 15px); }
.egg-open.hatch .batch-info strong { color: #ffe7a6; font-size: clamp(14px, 3.2cqh, 22px); }
/* one dragon: a wide card filling the screen, the 3D dragon big on the left, its card on the right */
.egg-open.hatch .batch-grid.n-1 { width: min(92cqw, 980px); height: min(66cqh, 600px); grid-template-columns: 1fr; }
.egg-open.hatch .n-1 .batch-result { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: stretch; }
.egg-open.hatch .n-1 .batch-info { text-align: left; align-items: flex-start; padding-right: 1cqw; }
.egg-open.hatch .n-1 .batch-info b { font-size: clamp(20px, 6cqh, 40px); }
.egg-open.hatch .n-1 .batch-rarity { font-size: clamp(15px, 4cqh, 26px); }
.egg-open.hatch .n-1 .batch-info small { font-size: clamp(12px, 3cqh, 18px); }
.egg-open.hatch .n-1 .batch-info strong { font-size: clamp(16px, 4.4cqh, 28px); }
/* several: three across, one or two rows, each card the dragon over its line */
.egg-open.hatch .batch-grid:not(.n-1) { width: min(94cqw, 1100px); height: min(70cqh, 640px); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4cqh 1.4cqw; grid-auto-rows: minmax(0, 1fr); }
.egg-open.hatch .batch-grid:not(.n-1) .batch-result { grid-template-rows: minmax(0, 1fr) auto; }
.egg-open.hatch .batch-grid.n-6 .batch-info small.batch-stats { display: none; }
.egg-open.hatch .batch-footer { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6cqh 1cqw; }
.egg-open.hatch .batch-footer[hidden] { display: none; }
.egg-open.hatch .batch-footer p { flex-basis: 100%; margin: 0; font-size: clamp(10px, 2.2cqh, 13px); }
.egg-open.hatch .batch-footer button { margin: 0; padding: clamp(6px, 1.6cqh, 12px) clamp(18px, 3cqw, 34px); font-size: clamp(13px, 2.8cqh, 17px); }
.egg-open.hatch .egg-model-status { position: absolute; inset: auto 0 6% 0; text-align: center; color: #bcd1d1; font-size: 12px; }
@keyframes hxRise { from { translate: 0 40cqh; scale: .4; opacity: 0; } to { translate: 0 0; scale: 1; opacity: 1; } }
@keyframes hxWobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3.5deg); } 75% { transform: rotate(3.5deg); } }
@keyframes hxShake { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-1.2%, .6%) rotate(-2deg); } 50% { transform: translate(1.2%, -.4%) rotate(2deg); } 75% { transform: translate(-.6%, -.8%) rotate(-1deg); } 100% { transform: translate(0, 0) rotate(0); } }
@keyframes hxMote { 0% { transform: rotate(var(--a)) translateX(var(--r)) scale(.4); opacity: 0; } 18% { opacity: 1; } 100% { transform: rotate(calc(var(--a) + 70deg)) translateX(0) scale(1.4); opacity: .9; } }
@keyframes hxFlash { 0% { opacity: 0; } 18% { opacity: 1; } 45% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hxFrag { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.75); opacity: 0; } }
@keyframes hxCard { from { transform: scale(.6) translateY(4cqh); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .egg-open.hatch * { animation: none !important; transition: none !important; } .egg-open.hatch .hx-stage, .egg-open.hatch .hx-motes { display: none; } }
.hatch.hx-revealed .hx-halo { opacity: 0; transition: opacity .5s; } .hatch.hx-revealed .hx-count { display: none; }
.egg-open.hatch:not(.hx-revealed) .batch-title { position: absolute; top: 6cqh; left: 0; right: 0; text-align: center; }
.hx-motes i { width: calc(2.4cqmin * var(--s)); height: calc(2.4cqmin * var(--s)); margin: calc(-1.2cqmin * var(--s)); box-shadow: 0 0 2cqmin #fff, 0 0 4cqmin #ffcd3a, 0 0 7cqmin #ffcd3a88; }
.egg-open.hatch .egg-rays { mix-blend-mode: screen; }
/* the card stretches in its slot (a grid item), so the dragon's row (1fr) gets what the text leaves */
.egg-open.hatch .batch-slot { display: grid; min-width: 0; }
.egg-open.hatch .batch-result { height: auto; min-height: 0; min-width: 0; }
.egg-open.hatch .batch-grid.n-6 .batch-info { gap: 0; }
.egg-open.hatch .batch-grid.n-6 .batch-info b { font-size: clamp(12px, 2.8cqh, 18px); }
.egg-open.hatch .batch-grid.n-6 .batch-info small { display: none; }
.egg-open.hatch .batch-grid.n-6 .batch-info strong { font-size: clamp(11px, 2.4cqh, 16px); }
.egg-open.hatch .batch-result { align-items: stretch; justify-items: stretch; }
/* while a hatched dragon's 3D model is still on its way: its canvas hidden (no edge-on circle), a magic circle turns with a "?" */
.egg-open.hatch .batch-dragon .hx-wait { display: none; }
.egg-open.hatch .batch-dragon.is-loading canvas { visibility: hidden; }
.egg-open.hatch .batch-dragon canvas { transition: opacity .5s; }
.egg-open.hatch .batch-dragon.is-loading .hx-wait { display: grid; position: absolute; inset: 0; place-items: center; color: color-mix(in srgb, var(--rarity) 70%, #fff); }
.hx-wait svg { position: absolute; width: min(82%, 82cqh, 240px); aspect-ratio: 1; filter: drop-shadow(0 0 8px currentColor); }
.hx-wait .w1 { transform-origin: 100px 100px; animation: hxSpin 9s linear infinite; }
.hx-wait .w2 { transform-origin: 100px 100px; animation: hxSpin 6s linear infinite reverse; }
.hx-wait b { position: relative; font-size: clamp(30px, 9cqh, 64px); font-weight: 900; color: #fff; text-shadow: 0 0 12px currentColor, 0 0 24px var(--rarity); animation: hxPulse 1.4s ease-in-out infinite; }
.egg-open.hatch .batch-grid.n-6 .hx-wait b { font-size: clamp(18px, 5cqh, 30px); }
@keyframes hxSpin { to { transform: rotate(360deg); } }
@keyframes hxPulse { 50% { transform: scale(1.15); opacity: .8; } }
.egg-open.hatch .egg-model-status { z-index: 1; }
.egg-open.hatch .egg-model-status { background: none; border: 0; padding: 0; inset: auto 0 4% 0; text-shadow: 0 1px 4px #000; }
