:root {
    --ink: #f8f0dc;
    --soft-ink: #e0d1b1;
    --panel: #3b241d;
    --panel-dark: #1d1216;
    --panel-line: #f2c86c;
    --stone: #bd9264;
    --stone-light: #f1d297;
    --jade: #39d2b0;
    --ruby: #ee5676;
    --sapphire: #508af3;
    --violet: #9d65ff;
    --leaf: #72df31;
    --gold: #ffd056;
    --danger: #ff4d52;
    --shadow: rgba(17, 8, 15, 0.62);
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #1b1420;
    color: var(--ink);
}

button {
    font: inherit;
}

.game-shell {
    position: relative;
    display: grid;
    grid-template-rows: minmax(64px, 8.5vh) minmax(48px, auto) 1fr;
    width: 100vw;
    height: 100vh;
    min-height: 520px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(44, 18, 25, 0.98), rgba(36, 26, 40, 0.98) 22%, rgba(47, 30, 24, 0.98) 78%, rgba(36, 18, 24, 0.98)),
        #251a29;
}

.view-panel {
    display: none;
    min-height: 0;
    overflow: hidden;
}

.view-panel.active {
    display: block;
}

.campaign-panel.active {
    display: grid;
    grid-template-rows: 1fr minmax(62px, 9vh);
}

.top-rail,
.bottom-rail {
    position: relative;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.2vw, 18px);
    padding: max(7px, env(safe-area-inset-top)) clamp(10px, 2vw, 28px) 8px;
    background: linear-gradient(180deg, rgba(55, 32, 24, 0.94), rgba(27, 15, 21, 0.88));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    min-width: 0;
}

.bottom-rail {
    justify-content: center;
    padding: 8px clamp(10px, 2vw, 28px) max(8px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(28, 14, 18, 0.84), rgba(55, 32, 24, 0.96));
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.24);
}

.title-stack {
    display: grid;
    min-width: clamp(156px, 16vw, 220px);
    line-height: 1;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.42);
}

.title-stack span {
    color: var(--gold);
    font-size: clamp(0.86rem, 1.45vw, 1.34rem);
    font-weight: 900;
    white-space: nowrap;
}

.title-stack strong {
    margin-top: 4px;
    color: #ebf8ff;
    font-size: clamp(0.72rem, 1.2vw, 1rem);
    letter-spacing: 0;
}

.resource-tray {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1 1 330px;
    min-width: 230px;
    max-width: 430px;
}

.resource-chip {
    display: grid;
    gap: 1px;
    min-width: 72px;
    padding: 5px 9px;
    color: #fff9dc;
    background: rgba(14, 18, 30, 0.46);
    border: 2px solid rgba(255, 216, 116, 0.44);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.resource-chip span {
    color: #d6e4ef;
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
}

.resource-chip strong {
    font-size: clamp(0.74rem, 1vw, 0.94rem);
    line-height: 1;
}

.top-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(6px, 1vw, 12px);
    flex: 1 1 auto;
    min-width: 0;
}

.hub-tabs {
    position: relative;
    z-index: 7;
    display: grid;
    grid-template-columns: repeat(8, minmax(82px, 1fr));
    gap: 6px;
    padding: 6px clamp(8px, 1.6vw, 22px);
    overflow-x: auto;
    background: linear-gradient(180deg, rgba(29, 20, 30, 0.98), rgba(19, 13, 22, 0.96));
    border-top: 1px solid rgba(255, 224, 145, 0.12);
    border-bottom: 2px solid rgba(255, 224, 145, 0.28);
}

.hub-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    min-width: 82px;
    color: #dfeaff;
    font-weight: 1000;
    background: rgba(67, 79, 103, 0.58);
    border: 2px solid rgba(116, 169, 218, 0.38);
    border-radius: 8px;
    cursor: pointer;
}

.hub-tab.active {
    color: #2d2117;
    background: linear-gradient(180deg, #ffe177, #d99635);
    border-color: rgba(255, 241, 182, 0.9);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 3px 0 #714320;
}

.hub-tab svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.icon-button,
.command-button,
.gold-button,
.primary-button,
.preset-button,
.leave-button,
.duel-button,
.menu-grid button {
    min-height: 44px;
    border: 3px solid rgba(255, 222, 135, 0.88);
    border-radius: 8px;
    color: #3a231a;
    background: linear-gradient(180deg, #ffda61, #d58f2e);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.45),
        0 4px 0 #6d3b20,
        0 9px 18px rgba(0, 0, 0, 0.24);
    cursor: pointer;
}

.icon-button:focus-visible,
.command-button:focus-visible,
.gold-button:focus-visible,
.primary-button:focus-visible,
.preset-button:focus-visible,
.leave-button:focus-visible,
.duel-button:focus-visible,
.formation-slot:focus-visible,
.formation-choice:focus-visible,
.hero-filter:focus-visible,
.focus-choice:focus-visible,
.menu-grid button:focus-visible,
.hub-tab:focus-visible,
.summon-button:focus-visible,
.card-actions button:focus-visible,
.market-actions button:focus-visible,
.hero-detail-actions button:focus-visible,
.event-card button:focus-visible,
.daily-mission-card button:focus-visible,
.quest-card button:focus-visible,
.opponent-card button:focus-visible,
.gear-card button:focus-visible,
.idle-chest button:focus-visible,
.campaign-map-entry:focus-visible,
.stage-node:focus-visible,
.close-button:focus-visible {
    outline: 3px solid #8ff5ff;
    outline-offset: 3px;
}

.icon-button:active,
.command-button:active,
.gold-button:active,
.primary-button:active,
.preset-button:active,
.leave-button:active,
.duel-button:active,
.menu-grid button:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.34),
        0 2px 0 #6d3b20,
        0 6px 12px rgba(0, 0, 0, 0.24);
}

.icon-button {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(42px, 4.6vw, 56px);
    height: clamp(42px, 4.6vw, 56px);
    padding: 0;
}

.round-button {
    flex: 0 0 auto;
    border-radius: 50%;
}

.icon-button svg,
.command-button svg,
.gold-button svg {
    width: clamp(20px, 2.2vw, 28px);
    height: clamp(20px, 2.2vw, 28px);
}

.command-button,
.gold-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: clamp(84px, 9vw, 104px);
    padding: 0 13px;
    color: #f7ead1;
    border-color: rgba(107, 214, 255, 0.55);
    background: linear-gradient(180deg, #4d637f, #26324c);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.24),
        0 4px 0 #162036,
        0 9px 18px rgba(0, 0, 0, 0.24);
}

.gold-button {
    min-width: clamp(72px, 7.6vw, 86px);
    color: #382118;
    border-color: rgba(255, 229, 145, 0.92);
    background: linear-gradient(180deg, #ffe47a, #e09a35);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.42),
        0 4px 0 #714320,
        0 9px 18px rgba(0, 0, 0, 0.24);
}

#pauseButton .icon-play {
    display: none;
}

#soundButton .icon-muted {
    display: none;
}

#musicButton .icon-music-play {
    display: none;
}

.game-shell.paused #pauseButton .icon-pause {
    display: none;
}

.game-shell.paused #pauseButton .icon-play {
    display: block;
}

.game-shell.sound-muted #soundButton .icon-sound {
    display: none;
}

.game-shell.sound-muted #soundButton .icon-muted {
    display: block;
}

.game-shell.music-paused #musicButton .icon-music-pause {
    display: none;
}

.game-shell.music-paused #musicButton .icon-music-play {
    display: block;
}

.game-shell.music-volume-zero #musicVolumeButton .icon-volume-wave {
    display: none;
}

.music-volume-button span {
    position: absolute;
    right: 4px;
    bottom: 3px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 18px;
    padding: 0 4px;
    color: #fff8dc;
    font-size: 0.58rem;
    font-weight: 1000;
    line-height: 1;
    background: rgba(42, 27, 21, 0.78);
    border: 1px solid rgba(255, 240, 174, 0.55);
    border-radius: 999px;
}

.arena {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
}

.arena-floor {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(29, 16, 25, 0.16), rgba(29, 16, 25, 0.08)),
        url("assets/art/arenas/astral-arena-v1.png") center / cover no-repeat;
}

.arena-floor::before {
    content: "";
    display: none;
    position: absolute;
    left: 50%;
    top: 56%;
    width: min(70vw, 1040px);
    height: min(56vh, 510px);
    border: min(1.6vw, 18px) solid rgba(107, 69, 43, 0.46);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        inset 0 0 0 min(0.8vw, 10px) rgba(255, 232, 164, 0.34),
        inset 0 -22px 36px rgba(67, 37, 31, 0.18),
        0 24px 42px rgba(66, 30, 24, 0.18);
}

.arena-floor::after {
    content: "";
    display: none;
    position: absolute;
    left: 50%;
    top: 56%;
    width: min(21vw, 280px);
    height: min(16vh, 170px);
    border: 3px solid rgba(120, 76, 42, 0.42);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.rear-arches {
    position: absolute;
    display: none;
    inset: 0 0 auto;
    height: 24%;
    background:
        linear-gradient(90deg, transparent 4%, rgba(43, 34, 48, 0.82) 5% 12%, transparent 13% 26%, rgba(43, 34, 48, 0.82) 27% 34%, transparent 35% 64%, rgba(43, 34, 48, 0.82) 65% 72%, transparent 73% 86%, rgba(43, 34, 48, 0.82) 87% 95%, transparent 96%),
        linear-gradient(180deg, rgba(67, 48, 51, 0.9), rgba(221, 175, 122, 0.16));
    opacity: 0.72;
}

.sigil {
    position: absolute;
    display: none;
    left: 50%;
    width: clamp(34px, 5vw, 68px);
    aspect-ratio: 1;
    transform: translateX(-50%) rotate(45deg);
    border: 3px solid rgba(251, 210, 114, 0.78);
    background: linear-gradient(135deg, #ffd987, #e74975 65%, #8b4db7);
    box-shadow: 0 8px 14px rgba(67, 26, 37, 0.24);
}

.sigil-top {
    top: 26%;
}

.sigil-mid {
    top: 53%;
    width: clamp(42px, 6vw, 84px);
}

.sigil-low {
    top: 79%;
}

.rail-spikes {
    position: absolute;
    display: none;
    inset: auto 0 0;
    height: 17%;
    background:
        linear-gradient(130deg, transparent 0 8%, #302841 8% 12%, transparent 12% 20%),
        linear-gradient(90deg, rgba(20, 15, 27, 0.95), rgba(52, 36, 55, 0.9), rgba(20, 15, 27, 0.95));
    clip-path: polygon(0 100%, 4% 0, 8% 100%, 15% 100%, 20% 12%, 25% 100%, 34% 100%, 39% 8%, 44% 100%, 55% 100%, 60% 8%, 65% 100%, 74% 100%, 79% 12%, 84% 100%, 92% 100%, 96% 0, 100% 100%);
}

.center-badge {
    position: absolute;
    left: 50%;
    top: 2.8%;
    z-index: 4;
    display: grid;
    place-items: center;
    min-width: 94px;
    padding: 6px 16px 9px;
    color: var(--gold);
    text-align: center;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.48);
    background: linear-gradient(180deg, #66412d, #2a1b20);
    border: 3px solid rgba(255, 215, 113, 0.86);
    border-radius: 0 0 8px 8px;
    transform: translateX(-50%);
}

.center-badge span {
    color: #fff5ce;
    font-size: 0.7rem;
    font-weight: 800;
}

.center-badge strong {
    font-size: clamp(1.25rem, 2.2vw, 2rem);
    line-height: 0.95;
}

.team-layer,
.effects-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.boss-health {
    --main: #d64470;
    --accent: #ffd365;
    --aura: #7b6cff;
    position: absolute;
    left: 50%;
    top: clamp(10px, 1.7vw, 18px);
    z-index: 8;
    display: grid;
    gap: 7px;
    width: min(660px, 46vw);
    padding: 9px 12px 11px;
    color: #fff8dc;
    background:
        linear-gradient(180deg, rgba(47, 25, 36, 0.9), rgba(22, 15, 25, 0.86)),
        radial-gradient(circle at 50% 0, color-mix(in srgb, var(--aura) 28%, transparent), transparent 62%);
    border: 2px solid color-mix(in srgb, var(--accent) 72%, #ffffff 20%);
    border-radius: 8px;
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transform: translateX(-50%);
    pointer-events: none;
}

.boss-health.hidden {
    display: none;
}

.boss-health-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.boss-health-head span {
    overflow: hidden;
    color: #ffffff;
    font-size: clamp(0.82rem, 1.3vw, 1.08rem);
    font-weight: 1000;
    text-overflow: ellipsis;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.52);
    white-space: nowrap;
}

.boss-health-head strong {
    color: #ffe98d;
    font-size: clamp(0.72rem, 1vw, 0.92rem);
    font-weight: 1000;
    text-align: right;
    white-space: nowrap;
}

.boss-health-bar {
    height: clamp(16px, 1.55vw, 22px);
    overflow: hidden;
    background: linear-gradient(180deg, #211524, #120d18);
    border: 2px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.48);
}

.boss-health-bar span {
    display: block;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, var(--main), var(--accent)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 48%);
    border-radius: inherit;
    box-shadow:
        0 0 18px color-mix(in srgb, var(--aura) 70%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.46);
    transform-origin: left center;
    transition: transform 220ms ease;
}

.idle-chest {
    position: absolute;
    right: clamp(10px, 2vw, 24px);
    top: clamp(10px, 2vw, 22px);
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: min(270px, 42vw);
    padding: 8px;
    color: #fff6d7;
    background: rgba(28, 18, 24, 0.76);
    border: 2px solid rgba(255, 214, 106, 0.72);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.idle-chest div {
    display: grid;
    flex: 1;
    gap: 2px;
    min-width: 0;
}

.idle-chest span {
    color: #bbeaff;
    font-size: 0.64rem;
    font-weight: 900;
    text-transform: uppercase;
}

.idle-chest strong {
    overflow: hidden;
    font-size: clamp(0.78rem, 1.2vw, 1rem);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.idle-chest button {
    min-height: 34px;
    padding: 0 12px;
    color: #2c2418;
    font-weight: 1000;
    background: linear-gradient(180deg, #ffe478, #d99635);
    border: 2px solid #fff0ae;
    border-radius: 7px;
    cursor: pointer;
}

.idle-chest button:disabled {
    cursor: default;
    opacity: 0.55;
    filter: grayscale(0.4);
}

.campaign-map-entry {
    position: absolute;
    left: clamp(10px, 2vw, 24px);
    top: clamp(10px, 2vw, 22px);
    z-index: 9;
    display: grid;
    gap: 2px;
    min-width: min(286px, 42vw);
    padding: 10px 12px;
    color: #fff6d7;
    text-align: left;
    background: rgba(28, 18, 24, 0.76);
    border: 2px solid rgba(131, 232, 255, 0.58);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
    cursor: pointer;
}

.campaign-map-entry span {
    color: #83e8ff;
    font-size: 0.64rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.campaign-map-entry strong {
    overflow: hidden;
    color: #ffffff;
    font-size: clamp(0.82rem, 1.3vw, 1.05rem);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.campaign-map-entry small {
    overflow: hidden;
    color: #ffdf76;
    font-size: 0.68rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fighter {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: clamp(74px, 8.4vw, 144px);
    height: clamp(102px, 14vw, 214px);
    transform: translate(-50%, -50%);
    transform-origin: 50% 85%;
    transition: filter 160ms ease, opacity 220ms ease, transform 220ms ease;
}

.fighter.acting {
    transform: translate(-50%, -53%) scale(1.04);
}

.fighter.hit {
    filter: saturate(1.5) brightness(1.24);
}

.fighter.defeated {
    opacity: 0.26;
    filter: grayscale(0.8);
    transform: translate(-50%, -45%) rotate(-7deg) scale(0.92);
}

.fighter.boss-unit {
    z-index: 6;
    width: clamp(150px, 19vw, 286px);
    height: clamp(216px, 31vw, 430px);
}

.fighter.boss-unit.acting {
    transform: translate(-50%, -52%) scale(1.03);
}

.fighter.boss-unit.defeated {
    opacity: 0.34;
    transform: translate(-50%, -44%) rotate(-4deg) scale(0.9);
}

.fighter.boss-unit .status-card {
    display: none;
}

.fighter.boss-unit .sprite-wrap {
    inset: 0;
}

.fighter.boss-unit .sprite-wrap::before {
    bottom: 5%;
    width: 82%;
    height: 15%;
    filter: blur(3px);
}

.fighter.boss-unit .sprite-wrap::after {
    bottom: 11%;
    width: 88%;
    height: 82%;
    opacity: 0.9;
}

.fighter.boss-unit .sprite-img {
    width: 164%;
}

.status-card {
    position: absolute;
    left: 50%;
    top: -40px;
    z-index: 4;
    width: min(132px, 106%);
    min-width: 74px;
    padding: 3px 4px 4px;
    color: white;
    background: rgba(32, 24, 34, 0.82);
    border: 2px solid rgba(110, 196, 255, 0.65);
    border-radius: 7px;
    box-shadow: 0 4px 0 rgba(7, 12, 24, 0.45);
    transform: translateX(-50%);
}

.status-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    height: 15px;
    margin-bottom: 1px;
}

.rank {
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    color: #173a21;
    font-size: 0.72rem;
    font-weight: 900;
    background: linear-gradient(180deg, #7cff65, #1ca14e);
    border: 2px solid #ecffd6;
    border-radius: 50%;
}

.level {
    flex: 1;
    color: #f8f1d4;
    font-size: clamp(0.56rem, 0.9vw, 0.72rem);
    font-weight: 900;
    text-align: right;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.56);
}

.bars {
    display: grid;
    gap: 2px;
}

.bar {
    height: 8px;
    overflow: hidden;
    background: #172337;
    border: 1px solid rgba(0, 0, 0, 0.6);
    border-radius: 999px;
}

.bar span {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transition: transform 220ms ease;
}

.hp-bar span {
    background: linear-gradient(90deg, #6ee52e, #ffd75a);
}

.energy-bar {
    height: 5px;
}

.energy-bar span {
    background: linear-gradient(90deg, #5ceaff, #a875ff, #ff65b1);
}

.buff-row {
    display: flex;
    gap: 2px;
    min-height: 13px;
    margin-top: 2px;
}

.buff {
    display: grid;
    place-items: center;
    width: 13px;
    height: 13px;
    color: white;
    font-size: 0.56rem;
    font-weight: 900;
    background: #236aa8;
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: 3px;
}

.buff.fire {
    background: #c13c45;
}

.buff.shield {
    background: #3d83d2;
}

.buff.focus {
    background: #8157dd;
}

.sprite-wrap {
    position: absolute;
    inset: 20px 0 0;
    display: grid;
    place-items: end center;
}

.sprite-wrap::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 7%;
    width: 76%;
    height: 18%;
    background: rgba(45, 28, 25, 0.36);
    border-radius: 50%;
    transform: translateX(-50%);
    filter: blur(2px);
}

.sprite-wrap::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 14%;
    width: 82%;
    height: 74%;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at center, color-mix(in srgb, var(--aura) 42%, transparent) 0 45%, transparent 70%);
    transform: translateX(-50%);
    opacity: 0.75;
    animation: aura-pulse 1.8s ease-in-out infinite;
}

.team-right .sprite-svg {
    transform: scaleX(-1);
}

.team-right .sprite-img {
    transform: none;
}

.sprite-img {
    position: relative;
    z-index: 2;
    width: 128%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 8px 0 rgba(32, 16, 19, 0.32)) drop-shadow(0 18px 16px rgba(0, 0, 0, 0.24));
}

.sprite-svg {
    position: relative;
    z-index: 2;
    width: 100%;
    max-height: 100%;
    overflow: visible;
    filter: drop-shadow(0 8px 0 rgba(32, 16, 19, 0.32)) drop-shadow(0 18px 16px rgba(0, 0, 0, 0.24));
}

.fighter.front {
    z-index: 5;
}

.fighter.back {
    z-index: 4;
}

.fighter[data-role="guard"] .sprite-svg {
    width: 112%;
}

.fighter[data-role="guard"] .sprite-img {
    width: 150%;
}

.fighter[data-role="caster"] .sprite-svg,
.fighter[data-role="seer"] .sprite-svg {
    width: 96%;
}

.floating {
    position: absolute;
    z-index: 20;
    left: var(--x);
    top: var(--y);
    min-width: 46px;
    color: white;
    font-size: clamp(1rem, 2.5vw, 2.5rem);
    font-weight: 1000;
    text-align: center;
    text-shadow:
        0 4px 0 #321727,
        0 0 8px rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%);
    animation: float-hit 920ms ease-out forwards;
}

.floating.heal {
    color: #6fff5c;
}

.floating.crit {
    color: #ff62d6;
}

.floating.guard {
    color: #aeeeff;
}

.bolt {
    position: absolute;
    z-index: 18;
    left: var(--sx);
    top: var(--sy);
    width: clamp(26px, 3vw, 52px);
    height: clamp(10px, 1.2vw, 20px);
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--bolt), #fffbd1);
    box-shadow: 0 0 18px var(--bolt);
    transform: translate(-50%, -50%) rotate(var(--angle));
    transform-origin: center;
    animation: bolt-flight 520ms ease-in forwards;
}

.slash {
    position: absolute;
    z-index: 18;
    left: var(--x);
    top: var(--y);
    width: clamp(88px, 11vw, 182px);
    aspect-ratio: 3 / 2;
    background: url("assets/art/effects/slash-star-v1.png") center / contain no-repeat;
    transform: translate(-50%, -50%) rotate(var(--angle));
    filter: drop-shadow(0 0 14px var(--bolt));
    animation: slash-fade 520ms ease-out forwards;
}

.burst {
    position: absolute;
    z-index: 17;
    left: var(--x);
    top: var(--y);
    width: clamp(82px, 11vw, 168px);
    aspect-ratio: 1;
    border: 6px solid var(--bolt);
    border-radius: 50%;
    box-shadow: inset 0 0 28px var(--bolt), 0 0 24px var(--bolt);
    transform: translate(-50%, -50%) scale(0.3);
    animation: burst-pop 560ms ease-out forwards;
}

.score-chip {
    display: grid;
    gap: 2px;
    min-width: clamp(86px, 12vw, 150px);
    padding: 6px 12px;
    color: var(--ink);
    background: rgba(26, 17, 24, 0.7);
    border: 2px solid rgba(255, 213, 116, 0.58);
    border-radius: 8px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.score-chip span {
    color: var(--soft-ink);
    font-size: 0.72rem;
    font-weight: 800;
}

.score-chip strong {
    color: #ffffff;
    font-size: clamp(0.86rem, 1.7vw, 1.25rem);
}

.action-meter {
    position: relative;
    flex: 1;
    min-width: 96px;
    max-width: 540px;
    height: 22px;
    overflow: hidden;
    background: #251422;
    border: 3px solid rgba(255, 217, 119, 0.78);
    border-radius: 999px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.52);
}

.action-meter div {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #6d49ff, #ff6bd0, #ffe46c);
    transform: scaleX(0);
    transform-origin: left center;
}

.primary-button {
    min-width: clamp(110px, 14vw, 180px);
    padding: 0 20px;
    font-size: clamp(0.92rem, 1.8vw, 1.15rem);
    font-weight: 900;
}

.overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vw, 34px);
    background: rgba(5, 5, 12, 0.62);
    backdrop-filter: blur(3px);
}

.overlay.hidden {
    display: none;
}

.modal {
    position: relative;
    width: min(1120px, 96vw);
    max-height: min(86vh, 760px);
    overflow: auto;
    color: #43291d;
    background: linear-gradient(180deg, #f5e1bd, #c6976e);
    border: 5px solid rgba(255, 228, 151, 0.95);
    border-radius: 8px;
    box-shadow:
        0 0 0 4px rgba(59, 34, 28, 0.84),
        0 28px 44px rgba(0, 0, 0, 0.46);
}

.modal h2 {
    margin: 0;
    padding: 16px 64px 14px;
    color: #fff2cd;
    font-size: clamp(1.32rem, 3.1vw, 2.5rem);
    text-align: center;
    text-shadow: 0 4px 0 #5c3925;
    background: linear-gradient(180deg, #b87043, #7d492c);
    border-bottom: 4px solid rgba(112, 63, 35, 0.54);
}

.close-button {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: #fff5d5;
    background: linear-gradient(180deg, #f47446, #b83f2d);
    border: 4px solid #ffe5a0;
    border-radius: 50%;
    box-shadow: 0 5px 0 #7d291f, 0 9px 18px rgba(0, 0, 0, 0.24);
    cursor: pointer;
}

.close-button svg {
    width: 28px;
    height: 28px;
}

.formation-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px clamp(18px, 4vw, 48px) 10px;
}

.boss-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 270px;
    padding: 10px 18px;
    color: #fff8df;
    background: linear-gradient(90deg, #5c3629, #8f664d);
    border-radius: 7px;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.44);
}

.boss-chip svg {
    width: 34px;
    height: 34px;
    color: #b9d4e5;
}

.boss-chip strong {
    font-size: clamp(1.05rem, 2vw, 1.65rem);
}

.formation-selected {
    display: grid;
    gap: 3px;
    min-width: 150px;
    padding: 10px 14px;
    color: #fff8dc;
    background: linear-gradient(90deg, #4a4f65, #263247);
    border: 2px solid rgba(131, 232, 255, 0.44);
    border-radius: 8px;
}

.formation-selected span {
    color: #83e8ff;
    font-size: 0.66rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.formation-selected strong {
    color: #fff8dc;
    font-size: 1rem;
}

.preset-button {
    min-width: min(300px, 42vw);
    padding: 0 22px;
    color: #1d3b13;
    background: linear-gradient(180deg, #8af22d, #42b923);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.42),
        0 4px 0 #246c20,
        0 9px 18px rgba(0, 0, 0, 0.24);
}

.formation-board {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: clamp(12px, 2vw, 28px);
    align-items: end;
    margin: 8px clamp(18px, 4vw, 48px) 20px;
    padding: 18px;
    background: rgba(105, 68, 45, 0.38);
    border-radius: 8px;
}

.formation-board h3,
.bonus-box h3,
.report-columns h3 {
    margin: 0 0 10px;
    color: #5b3126;
    font-size: clamp(0.98rem, 1.8vw, 1.45rem);
    text-align: center;
}

.formation-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 10px;
}

.formation-slot {
    position: relative;
    display: grid;
    align-content: end;
    justify-items: center;
    min-height: 150px;
    min-width: 0;
    padding: 8px;
    overflow: hidden;
    color: #fff8dc;
    background:
        radial-gradient(circle at 50% 72%, color-mix(in srgb, var(--aura) 38%, transparent), transparent 56%),
        linear-gradient(180deg, color-mix(in srgb, var(--main) 58%, #232533), #20202d);
    border: 3px solid rgba(251, 217, 121, 0.72);
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px rgba(68, 26, 45, 0.34), 0 6px 0 rgba(63, 42, 35, 0.7);
    cursor: pointer;
}

.formation-slot.selected {
    border-color: #83e8ff;
    box-shadow: inset 0 0 0 2px rgba(131, 232, 255, 0.2), 0 0 0 3px rgba(131, 232, 255, 0.24), 0 6px 0 rgba(63, 42, 35, 0.7);
}

.formation-slot > span {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 4px 6px;
    color: #1e1719;
    font-size: 0.58rem;
    font-weight: 1000;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffe177, #d99635);
    border-radius: 5px;
    z-index: 1;
}

.formation-slot img {
    width: 130%;
    height: 102px;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.34));
}

.formation-slot strong {
    max-width: 100%;
    overflow: hidden;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 1000;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.54);
}

.formation-slot small {
    color: #d8e4ef;
    font-size: 0.66rem;
    font-weight: 900;
}

.duel-button {
    display: grid;
    place-items: center;
    width: clamp(74px, 9vw, 120px);
    height: clamp(74px, 9vw, 120px);
    color: #744220;
}

.duel-button svg {
    width: 58%;
    height: 58%;
}

.formation-bench {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 10px;
    margin: 0 clamp(18px, 4vw, 48px) 20px;
    padding: 14px;
    background: rgba(47, 37, 42, 0.34);
    border: 2px solid rgba(255, 241, 182, 0.38);
    border-radius: 8px;
}

.formation-choice {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 8px;
    min-height: 58px;
    min-width: 0;
    padding: 6px 8px;
    color: #fff8dc;
    text-align: left;
    background: linear-gradient(180deg, rgba(56, 55, 72, 0.92), rgba(30, 28, 42, 0.92));
    border: 2px solid rgba(131, 232, 255, 0.26);
    border-radius: 8px;
    cursor: pointer;
}

.formation-choice.active {
    border-color: color-mix(in srgb, var(--accent) 68%, #ffe177);
    background: linear-gradient(180deg, color-mix(in srgb, var(--main) 34%, #3a3a4a), rgba(30, 28, 42, 0.94));
}

.formation-choice img {
    grid-row: 1 / 3;
    width: 42px;
    height: 48px;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 6px 7px rgba(0, 0, 0, 0.32));
}

.formation-choice span {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 0.84rem;
    font-weight: 1000;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.formation-choice small {
    color: #83e8ff;
    font-size: 0.66rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.bonus-box {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 clamp(18px, 4vw, 48px) 22px;
    padding: 18px;
    color: #5a3428;
    background: rgba(255, 250, 221, 0.72);
    border: 3px solid rgba(255, 241, 182, 0.8);
    border-radius: 8px;
}

.aura-emblem {
    position: relative;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    flex: 0 0 auto;
    background: #fbd054;
    border: 4px solid #875231;
    border-radius: 50%;
}

.aura-emblem::before {
    content: "";
    width: 20px;
    height: 20px;
    background: #a56bff;
    border-radius: 50%;
}

.aura-emblem span {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #7f63ff;
    border: 3px solid #daf8ff;
    border-radius: 50%;
}

.aura-emblem span:nth-child(1) { transform: translateY(-34px); }
.aura-emblem span:nth-child(2) { transform: rotate(60deg) translateY(-34px); }
.aura-emblem span:nth-child(3) { transform: rotate(120deg) translateY(-34px); }
.aura-emblem span:nth-child(4) { transform: translateY(34px); }
.aura-emblem span:nth-child(5) { transform: rotate(240deg) translateY(-34px); }
.aura-emblem span:nth-child(6) { transform: rotate(300deg) translateY(-34px); }

.bonus-box p {
    margin: 0;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: 900;
}

.leave-button {
    display: block;
    min-width: 180px;
    margin: 0 clamp(18px, 4vw, 48px) 26px auto;
    padding: 0 28px;
    font-size: 1.25rem;
    font-weight: 1000;
}

.report-modal {
    width: min(980px, 96vw);
}

.report-tabs {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 20px 20px 8px;
}

.report-tabs button {
    min-width: 170px;
    min-height: 48px;
    color: #5d3822;
    font-weight: 1000;
    background: #f8ead3;
    border: 3px solid rgba(102, 57, 32, 0.38);
    border-radius: 7px;
    cursor: pointer;
}

.report-tabs button.active {
    background: linear-gradient(180deg, #ffd75f, #e49e35);
    border-color: #8d512a;
}

.report-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 14px clamp(18px, 4vw, 42px) 32px;
}

.report-list {
    display: grid;
    gap: 8px;
}

.report-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 54px;
    padding: 6px 8px;
    background: rgba(111, 69, 44, 0.34);
    border-radius: 7px;
}

.report-icon {
    display: grid;
    place-items: center;
    width: 42px;
    aspect-ratio: 1;
    color: white;
    font-weight: 1000;
    background: var(--main);
    border: 3px solid #f6d576;
    border-radius: 8px;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.46);
}

.report-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    color: #3d281f;
    font-size: 0.9rem;
    font-weight: 900;
}

.report-bar {
    height: 14px;
    overflow: hidden;
    background: #2b1714;
    border-radius: 999px;
}

.report-bar span {
    display: block;
    width: var(--fill);
    height: 100%;
    min-width: 3px;
    background: linear-gradient(90deg, #ffdb6a, #ff7d5b, #a265ff);
    border-radius: inherit;
}

.menu-modal {
    width: min(520px, 92vw);
}

.menu-grid {
    display: grid;
    gap: 14px;
    padding: 28px 36px 12px;
}

.menu-grid button {
    color: #3a231a;
    font-weight: 1000;
}

.menu-modal p {
    margin: 6px 0 28px;
    color: #4f3125;
    font-weight: 900;
    text-align: center;
}

.campaign-map-modal {
    width: min(1120px, 96vw);
}

.campaign-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px clamp(18px, 4vw, 42px) 10px;
}

.campaign-map-head strong {
    display: block;
    margin-top: 4px;
    color: #4c2d21;
    font-size: clamp(1rem, 2vw, 1.45rem);
}

.map-reward-chip {
    display: grid;
    gap: 3px;
    min-width: min(350px, 44vw);
    padding: 10px 14px;
    color: #fff8dc;
    background: linear-gradient(90deg, #5c3629, #835b45);
    border: 2px solid rgba(255, 231, 164, 0.82);
    border-radius: 8px;
}

.map-reward-chip span {
    color: #bdf4ff;
    font-size: 0.68rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.map-reward-chip strong {
    color: #fff8dc;
}

.campaign-path {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
    padding: 16px clamp(18px, 4vw, 42px) 18px;
}

.stage-node {
    position: relative;
    display: grid;
    gap: 5px;
    min-height: 116px;
    padding: 12px;
    color: #fff9df;
    text-align: left;
    background: linear-gradient(180deg, #4b4f64, #252434);
    border: 3px solid rgba(131, 232, 255, 0.44);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 0 rgba(47, 34, 32, 0.58);
    cursor: pointer;
}

.stage-node::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 12px;
    width: 16px;
    aspect-ratio: 1;
    background: #83e8ff;
    border: 2px solid #fff4c0;
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(131, 232, 255, 0.52);
}

.stage-node span {
    color: #83e8ff;
    font-size: 0.72rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.stage-node strong {
    color: #ffffff;
    font-size: clamp(0.98rem, 1.6vw, 1.25rem);
}

.stage-node small {
    align-self: end;
    color: #dfe8ef;
    font-weight: 900;
}

.stage-node.cleared {
    border-color: rgba(128, 240, 140, 0.58);
}

.stage-node.cleared::after {
    background: #7cf05c;
}

.stage-node.current {
    color: #2b2117;
    background: linear-gradient(180deg, #ffdf73, #d69334);
    border-color: #fff1b7;
}

.stage-node.current span,
.stage-node.current strong,
.stage-node.current small {
    color: #2b2117;
}

.stage-node.boss {
    border-color: rgba(255, 109, 148, 0.8);
}

.stage-node.boss::after {
    background: #ff6d94;
}

.stage-node.locked {
    cursor: default;
    opacity: 0.46;
    filter: grayscale(0.45);
}

.map-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 clamp(18px, 4vw, 42px) 28px;
}

.summon-reveal-modal {
    width: min(1080px, 96vw);
}

.hero-detail-modal {
    width: min(1080px, 96vw);
}

.hero-detail-shell {
    display: grid;
    grid-template-columns: minmax(240px, 38%) 1fr;
    min-height: 560px;
    color: #fff7df;
    background:
        linear-gradient(135deg, rgba(29, 24, 35, 0.96), rgba(26, 36, 49, 0.94)),
        #17141d;
}

.hero-detail-portrait {
    position: relative;
    display: grid;
    align-content: end;
    justify-items: center;
    min-height: 560px;
    padding: 18px 18px 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--aura) 42%, transparent), transparent 58%),
        linear-gradient(180deg, color-mix(in srgb, var(--main) 46%, #17151f), #17151f);
}

.hero-detail-portrait img {
    width: min(430px, 145%);
    max-height: 500px;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 20px 18px rgba(0, 0, 0, 0.36));
}

.hero-detail-tags {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.hero-detail-tags span {
    padding: 5px 8px;
    color: #fff9dc;
    font-size: 0.68rem;
    font-weight: 1000;
    text-transform: uppercase;
    background: rgba(10, 14, 24, 0.68);
    border: 1px solid rgba(255, 236, 172, 0.28);
    border-radius: 6px;
}

.hero-detail-info {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
    padding: clamp(16px, 3vw, 28px);
}

.hero-detail-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.hero-detail-title span,
.skill-row span {
    display: block;
    color: #83e8ff;
    font-size: 0.72rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.hero-detail-title strong {
    display: block;
    color: #fff;
    font-size: clamp(1.65rem, 3.6vw, 2.8rem);
    line-height: 0.98;
}

.hero-detail-title small {
    color: #d9e9f4;
    font-size: 0.86rem;
    font-weight: 900;
}

.hero-detail-title b {
    flex: 0 0 auto;
    padding: 8px 10px;
    color: #211715;
    font-size: 0.78rem;
    background: linear-gradient(180deg, #ffe177, #d99635);
    border-radius: 7px;
}

.hero-detail-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(76px, 1fr));
    gap: 8px;
}

.hero-detail-stats div {
    display: grid;
    gap: 3px;
    min-height: 66px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
}

.hero-detail-stats span,
.hero-detail-progress span {
    color: #bdd8ee;
    font-size: 0.66rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.hero-detail-stats strong,
.hero-detail-progress strong {
    color: #fff7df;
    font-size: 0.96rem;
}

.hero-detail-progress {
    display: grid;
    gap: 8px;
    padding: 10px;
    background: rgba(8, 13, 22, 0.48);
    border: 1px solid rgba(255, 223, 118, 0.18);
    border-radius: 8px;
}

.hero-detail-progress > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hero-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero-detail-actions button {
    min-height: 46px;
    line-height: 1.05;
    white-space: normal;
}

.skill-list {
    display: grid;
    gap: 8px;
}

.skill-row {
    display: grid;
    gap: 6px;
    padding: 11px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid color-mix(in srgb, var(--accent) 74%, #fff4bf);
    border-radius: 8px;
}

.skill-row.locked {
    opacity: 0.62;
    filter: grayscale(0.35);
}

.skill-row strong {
    display: block;
    color: #fff;
    font-size: 0.98rem;
}

.skill-row p {
    margin: 0;
    color: #d8e4ef;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
}

.reveal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
    justify-content: center;
    gap: 12px;
    padding: 24px clamp(18px, 4vw, 42px);
}

.reveal-card {
    display: grid;
    gap: 10px;
    min-height: 260px;
    overflow: hidden;
    color: #fff8df;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--main) 46%, #1d1722), #1c1520);
    border: 3px solid color-mix(in srgb, var(--accent) 72%, #fff3bc);
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
    animation: reveal-pop 420ms ease-out both;
    animation-delay: var(--delay);
}

.reveal-card.bonus {
    border-color: #ffe982;
    box-shadow: 0 0 0 2px rgba(255, 233, 130, 0.18), 0 16px 34px rgba(255, 191, 84, 0.22);
}

.reveal-card.ready {
    border-color: #94ffbd;
}

.reveal-art {
    display: grid;
    place-items: end center;
    min-height: 166px;
    background:
        radial-gradient(ellipse at 50% 76%, color-mix(in srgb, var(--accent) 48%, transparent), transparent 58%);
}

.reveal-art img {
    width: 142%;
    height: 160px;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.35));
}

.reveal-card div:last-child {
    display: grid;
    gap: 4px;
    padding: 0 12px 14px;
}

.reveal-card strong {
    color: #ffffff;
    font-size: 1.05rem;
}

.reveal-card span {
    color: #d7e8f3;
    font-size: 0.78rem;
    font-weight: 900;
}

.reveal-card b,
.reveal-card small {
    color: #ffdf76;
    font-size: 0.78rem;
    font-weight: 1000;
}

.reveal-card em {
    color: #9effc2;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 1000;
}

.hub-view {
    min-height: 0;
    padding: clamp(14px, 2.4vw, 30px);
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(22, 17, 27, 0.82), rgba(19, 13, 19, 0.94)),
        linear-gradient(90deg, rgba(54, 35, 29, 0.34), rgba(29, 39, 54, 0.3), rgba(45, 28, 45, 0.36)),
        #1b1420;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 auto clamp(14px, 2vw, 22px);
    width: min(1180px, 100%);
}

.view-header h1 {
    margin: 2px 0 0;
    color: #fff4cf;
    font-size: clamp(1.45rem, 3.2vw, 2.65rem);
    line-height: 0.98;
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.44);
}

.eyebrow {
    color: #83e8ff;
    font-size: 0.75rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.view-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.collection-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) auto minmax(360px, 1.8fr);
    gap: 12px;
    width: min(1180px, 100%);
    margin: 0 auto 12px;
    padding: 12px;
    color: #fff8dc;
    background: linear-gradient(135deg, rgba(28, 31, 45, 0.92), rgba(39, 28, 43, 0.82));
    border: 2px solid rgba(255, 232, 151, 0.28);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 24px rgba(0, 0, 0, 0.18);
}

.collection-progress,
.collection-stats {
    display: grid;
    gap: 8px;
}

.collection-progress span,
.collection-stats span,
.hero-filter-result {
    color: #b9d4e5;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.collection-progress strong,
.collection-stats strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1rem, 1.7vw, 1.32rem);
}

.collection-meter {
    height: 14px;
    overflow: hidden;
    background: rgba(8, 13, 22, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.collection-meter span {
    display: block;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, #62ffd6, #83e8ff, #ffe77c);
    border-radius: inherit;
}

.collection-stats {
    grid-template-columns: repeat(2, minmax(104px, 1fr));
    min-width: 250px;
}

.collection-stats div {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
}

.hero-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.hero-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 10px;
    color: #fff8dc;
    font-weight: 1000;
    background: rgba(255, 255, 255, 0.09);
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    cursor: pointer;
}

.hero-filter.active {
    color: #241b16;
    background: linear-gradient(180deg, #83e8ff, #ffd95c);
    border-color: #fff2b8;
    box-shadow: 0 4px 0 rgba(90, 57, 28, 0.66);
}

.hero-filter span {
    font-size: 0.76rem;
}

.hero-filter strong {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    color: inherit;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
}

.hero-filter-result {
    width: min(1180px, 100%);
    margin: 0 auto 10px;
    color: #83e8ff;
}

.hero-roster,
.bag-grid,
.opponent-list,
.quest-list,
.event-grid,
.daily-mission-list,
.market-grid,
.summon-layout,
.summon-log {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.hero-roster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(86px, 34%) 1fr;
    min-height: 212px;
    overflow: hidden;
    color: #fff6de;
    background: linear-gradient(135deg, rgba(37, 24, 31, 0.94), rgba(39, 52, 68, 0.86));
    border: 2px solid color-mix(in srgb, var(--accent) 64%, #fff0b2);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 26px rgba(0, 0, 0, 0.22);
}

.hero-card.locked {
    border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.32));
}

.hero-card-art {
    position: relative;
    display: grid;
    place-items: end center;
    min-height: 212px;
    background:
        radial-gradient(circle at 50% 72%, color-mix(in srgb, var(--aura) 46%, transparent), transparent 54%),
        linear-gradient(180deg, color-mix(in srgb, var(--main) 44%, #1c1421), #201620);
}

.hero-card-art img {
    width: 150%;
    height: 96%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 12px 13px rgba(0, 0, 0, 0.34));
}

.hero-card.locked .hero-card-art img {
    opacity: 0.68;
    filter: grayscale(0.35) drop-shadow(0 12px 13px rgba(0, 0, 0, 0.34));
}

.locked-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    padding: 4px 7px;
    color: #fff9dc;
    font-size: 0.64rem;
    font-weight: 1000;
    text-transform: uppercase;
    background: rgba(16, 18, 28, 0.72);
    border: 1px solid rgba(255, 236, 172, 0.32);
    border-radius: 6px;
}

.hero-card-body {
    display: grid;
    align-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 14px;
}

.hero-card-title {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

.hero-card-title strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1rem, 1.7vw, 1.28rem);
}

.hero-card-title span,
.hero-meta span,
.card-actions span,
.quest-card span,
.gear-card small,
.opponent-card span {
    color: #d8e4ef;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-card-title b {
    flex: 0 0 auto;
    max-width: 74px;
    overflow: hidden;
    padding: 4px 6px;
    color: #231a18;
    font-size: 0.62rem;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    background: linear-gradient(180deg, #ffdf7a, #eaa245);
    border-radius: 6px;
}

.star-row {
    display: flex;
    gap: 2px;
    color: rgba(255, 255, 255, 0.25);
    font-size: 1rem;
}

.star-row span.filled {
    color: #ffd95c;
    text-shadow: 0 0 8px rgba(255, 217, 92, 0.38);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hero-meta span {
    padding: 4px 7px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.upgrade-cost {
    min-height: 26px;
    padding: 5px 8px;
    color: #ffdf76;
    font-size: 0.72rem;
    font-weight: 900;
    background: rgba(9, 14, 24, 0.5);
    border: 1px solid rgba(255, 223, 118, 0.18);
    border-radius: 7px;
}

.shard-track {
    height: 12px;
    overflow: hidden;
    background: rgba(8, 13, 22, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.shard-track span {
    display: block;
    width: var(--fill);
    height: 100%;
    min-width: 4px;
    background: linear-gradient(90deg, var(--aura), var(--accent), #ffe77c);
    border-radius: inherit;
}

.card-actions {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
}

.card-actions div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    width: 100%;
}

.card-actions div button {
    flex: 1 1 0;
    min-width: 82px;
}

.card-actions button,
.market-actions button,
.hero-detail-actions button,
.event-card button,
.daily-mission-card button,
.quest-card button,
.opponent-card button,
.summon-button,
.primary-button.compact {
    min-height: 40px;
    padding: 0 10px;
    color: #2c2117;
    font-weight: 1000;
    background: linear-gradient(180deg, #ffdf73, #d69334);
    border: 2px solid #fff0ae;
    border-radius: 8px;
    cursor: pointer;
}

.card-actions button:disabled,
.market-actions button:disabled,
.hero-detail-actions button:disabled,
.event-card button:disabled,
.daily-mission-card button:disabled,
.quest-card button:disabled,
.opponent-card button:disabled,
.summon-button:disabled,
.primary-button.compact:disabled {
    cursor: default;
    opacity: 0.5;
    filter: grayscale(0.45);
}

.summon-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 340px);
    gap: 16px;
    align-items: stretch;
}

.summon-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 320px;
    padding: 24px;
    overflow: hidden;
    color: #fff9dc;
    text-align: center;
    background:
        radial-gradient(circle at 50% 46%, rgba(255, 223, 112, 0.34), transparent 28%),
        radial-gradient(circle at 50% 54%, rgba(80, 138, 243, 0.27), transparent 44%),
        linear-gradient(180deg, rgba(25, 25, 42, 0.9), rgba(25, 14, 24, 0.94));
    border: 2px solid rgba(119, 207, 255, 0.42);
    border-radius: 8px;
}

.summon-stage strong {
    position: relative;
    z-index: 1;
    align-self: end;
    margin-top: 190px;
    font-size: clamp(1.2rem, 2.6vw, 2rem);
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.48);
}

.summon-stage p {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 8px 0 0;
    color: #d8edf7;
    font-weight: 800;
}

.summon-ring {
    position: absolute;
    left: 50%;
    top: 42%;
    width: min(220px, 48vw);
    aspect-ratio: 1;
    border: 8px solid rgba(255, 216, 103, 0.8);
    border-radius: 50%;
    box-shadow: inset 0 0 34px rgba(122, 96, 255, 0.54), 0 0 42px rgba(83, 202, 255, 0.28);
    transform: translate(-50%, -50%);
    animation: aura-pulse 2.4s ease-in-out infinite;
}

.summon-ring span {
    position: absolute;
    width: 24px;
    aspect-ratio: 1;
    background: #83e8ff;
    border: 3px solid #fff2b6;
    border-radius: 50%;
}

.summon-ring span:nth-child(1) { left: 50%; top: -12px; transform: translateX(-50%); }
.summon-ring span:nth-child(2) { right: -12px; top: 50%; transform: translateY(-50%); }
.summon-ring span:nth-child(3) { left: 50%; bottom: -12px; transform: translateX(-50%); }
.summon-ring span:nth-child(4) { left: -12px; top: 50%; transform: translateY(-50%); }

.summon-orb {
    display: grid;
    place-items: center;
    width: 72px;
    aspect-ratio: 1;
    border: 3px solid rgba(255, 236, 172, 0.92);
    border-radius: 50%;
    background: radial-gradient(circle, #fff5b8, #73ddff 46%, #6b49ff);
    box-shadow: 0 0 24px rgba(115, 221, 255, 0.42);
}

.summon-orb span {
    width: 24px;
    aspect-ratio: 1;
    background: #fff;
    border-radius: 50%;
    opacity: 0.8;
}

.summon-header-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.summon-stat-row {
    flex-wrap: nowrap;
}

.summon-actions {
    display: grid;
    gap: 12px;
}

.summon-meter {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    width: min(420px, 100%);
    margin-top: 14px;
    padding: 10px 12px;
    text-align: left;
    background: rgba(8, 13, 22, 0.48);
    border: 1px solid rgba(131, 232, 255, 0.22);
    border-radius: 8px;
}

.summon-meter div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.summon-meter span {
    color: #83e8ff;
    font-size: 0.72rem;
    font-weight: 1000;
}

.summon-meter strong {
    margin: 0;
    color: #fff7d4;
    font-size: 0.78rem;
    text-align: right;
    text-shadow: none;
}

.summon-button {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 92px;
    width: 100%;
    text-align: left;
}

.summon-button span {
    font-size: clamp(1rem, 1.8vw, 1.32rem);
}

.summon-button strong {
    color: #644124;
    font-size: 0.8rem;
}

.summon-button.premium {
    color: #191928;
    background: linear-gradient(180deg, #83e8ff, #6a8dff);
    border-color: #d8fbff;
}

.summon-button.ten {
    color: #2d171f;
    background: linear-gradient(180deg, #ff8ab4, #d55376);
    border-color: #ffd3df;
}

.focus-panel {
    display: grid;
    grid-template-columns: minmax(290px, 0.9fr) minmax(360px, 1.4fr);
    gap: 14px;
    width: min(1180px, 100%);
    margin: 14px auto 0;
}

.focus-target {
    display: grid;
    grid-template-columns: 142px 1fr;
    gap: 12px;
    min-height: 170px;
    overflow: hidden;
    padding: 12px;
    color: #fff8dc;
    background:
        radial-gradient(circle at 16% 82%, color-mix(in srgb, var(--aura) 44%, transparent), transparent 44%),
        linear-gradient(135deg, rgba(31, 25, 38, 0.94), rgba(35, 47, 57, 0.88));
    border: 2px solid color-mix(in srgb, var(--accent) 58%, #fff0b2);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 12px 24px rgba(0, 0, 0, 0.2);
}

.focus-target-art {
    display: grid;
    place-items: end center;
    min-height: 146px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--main) 44%, transparent), transparent 58%),
        rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
}

.focus-target-art img {
    width: 175%;
    max-width: none;
    height: 96%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.36));
}

.focus-target > div:last-child {
    display: grid;
    align-content: center;
    gap: 7px;
    min-width: 0;
}

.focus-target span,
.focus-target-progress span,
.focus-choice small {
    color: #83e8ff;
    font-size: 0.72rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.focus-target strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1.12rem, 2vw, 1.56rem);
}

.focus-target small {
    color: #d8e4ef;
    font-weight: 800;
    line-height: 1.28;
}

.focus-target-progress {
    display: grid;
    gap: 7px;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(86px, 1fr));
    gap: 8px;
}

.focus-choice {
    position: relative;
    display: grid;
    grid-template-rows: 74px auto auto;
    gap: 3px;
    min-height: 128px;
    overflow: hidden;
    padding: 7px;
    color: #fff8dc;
    text-align: center;
    background:
        radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--aura) 36%, transparent), transparent 54%),
        linear-gradient(180deg, color-mix(in srgb, var(--main) 36%, #1a1e2b), #201823);
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    cursor: pointer;
}

.focus-choice.active {
    color: #201913;
    background:
        radial-gradient(circle at 50% 56%, rgba(255, 255, 255, 0.32), transparent 54%),
        linear-gradient(180deg, #83e8ff, #ffd95c);
    border-color: #fff3b8;
    box-shadow: 0 4px 0 rgba(90, 57, 28, 0.66);
}

.focus-choice img {
    justify-self: center;
    width: 96px;
    max-width: 126%;
    height: 74px;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.34));
}

.focus-choice span {
    overflow: hidden;
    font-size: 0.77rem;
    font-weight: 1000;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.focus-choice small {
    color: inherit;
    font-size: 0.58rem;
    opacity: 0.86;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 14px;
}

.market-card {
    display: grid;
    grid-template-rows: clamp(178px, 24vw, 260px) 1fr;
    min-height: 430px;
    overflow: hidden;
    color: #fff7df;
    background: linear-gradient(180deg, rgba(31, 24, 34, 0.94), rgba(32, 42, 55, 0.92));
    border: 2px solid color-mix(in srgb, var(--accent) 58%, #fff0b2);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 26px rgba(0, 0, 0, 0.22);
}

.market-card.owned {
    border-color: rgba(145, 242, 169, 0.7);
}

.market-art {
    position: relative;
    display: grid;
    place-items: end center;
    min-height: 178px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 72%, color-mix(in srgb, var(--aura) 46%, transparent), transparent 56%),
        linear-gradient(180deg, color-mix(in srgb, var(--main) 42%, #151824), #1e1621);
}

.market-art img {
    width: min(280px, 118%);
    height: 98%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.34));
}

.market-body {
    display: grid;
    align-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 13px;
}

.market-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.market-title span,
.market-title small {
    display: block;
    color: #d9e8f4;
    font-size: 0.72rem;
    font-weight: 900;
}

.market-title strong {
    display: block;
    color: #fff;
    font-size: clamp(1.04rem, 1.8vw, 1.34rem);
}

.market-title b {
    flex: 0 0 auto;
    padding: 4px 7px;
    color: #231a18;
    font-size: 0.68rem;
    font-weight: 1000;
    background: linear-gradient(180deg, #ffdf7a, #eaa245);
    border-radius: 6px;
}

.market-actions {
    display: grid;
    gap: 7px;
}

.market-actions span {
    color: #ffdf76;
    font-size: 0.78rem;
    font-weight: 1000;
}

.market-actions button {
    width: 100%;
    min-height: 44px;
    padding: 7px 8px;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
}

.summon-log {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.summon-log-row,
.arena-notice {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    color: #fff8dc;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.summon-log-row span {
    color: #8cf2ff;
    font-weight: 900;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.event-card {
    display: grid;
    align-content: space-between;
    gap: 10px;
    min-height: 176px;
    padding: 16px;
    color: #fff8dc;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 223, 115, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(55, 37, 41, 0.94), rgba(28, 37, 55, 0.9));
    border: 2px solid rgba(255, 224, 145, 0.42);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 26px rgba(0, 0, 0, 0.18);
}

.bonus-check-card {
    background:
        radial-gradient(circle at 78% 18%, rgba(148, 255, 189, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(35, 52, 46, 0.94), rgba(34, 30, 55, 0.9));
    border-color: rgba(148, 255, 189, 0.42);
}

.event-tag {
    width: max-content;
    padding: 4px 7px;
    color: #1d171b;
    font-size: 0.68rem;
    font-weight: 1000;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffe77c, #dca13a);
    border-radius: 6px;
}

.event-card strong {
    color: #fff;
    font-size: clamp(1.12rem, 2vw, 1.56rem);
}

.event-card p {
    margin: 0;
    color: #d9e9f4;
    font-weight: 900;
}

.event-card button,
.daily-mission-card button {
    min-height: 42px;
}

.event-card button {
    width: 100%;
}

.daily-mission-list {
    display: grid;
    gap: 10px;
}

.daily-mission-card {
    display: grid;
    grid-template-columns: minmax(190px, 1.15fr) minmax(160px, 0.85fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 82px;
    padding: 12px;
    color: #fff8dc;
    background: rgba(38, 31, 42, 0.82);
    border: 2px solid rgba(132, 219, 255, 0.24);
    border-radius: 8px;
}

.daily-mission-card.ready {
    border-color: rgba(148, 255, 189, 0.66);
}

.daily-mission-card.claimed {
    opacity: 0.72;
}

.daily-mission-card span {
    display: block;
    color: #83e8ff;
    font-size: 0.72rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.daily-mission-card strong {
    display: block;
    color: #fff;
    font-size: 1rem;
}

.daily-mission-card small {
    color: #ffdf76;
    font-size: 0.75rem;
    font-weight: 900;
}

.daily-progress {
    display: grid;
    gap: 6px;
}

.daily-progress b {
    color: #fff6dc;
    font-size: 0.78rem;
    text-align: right;
}

.quest-list,
.opponent-list {
    display: grid;
    gap: 10px;
}

.quest-card,
.opponent-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: 74px;
    padding: 12px;
    color: #fff8dc;
    background: rgba(38, 31, 42, 0.82);
    border: 2px solid rgba(132, 219, 255, 0.24);
    border-radius: 8px;
}

.quest-card strong,
.opponent-card strong,
.gear-card strong {
    display: block;
    color: #ffffff;
    font-size: 1rem;
}

.quest-reward,
.opponent-power {
    color: #ffdf76;
    font-weight: 1000;
}

.opponent-power {
    display: grid;
    gap: 2px;
}

.opponent-power span {
    color: #bdd8ee;
    text-transform: uppercase;
}

.bag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.gear-card {
    display: grid;
    gap: 7px;
    min-height: 218px;
    padding: 14px;
    color: #fff8dc;
    background: linear-gradient(180deg, rgba(42, 35, 45, 0.9), rgba(25, 18, 28, 0.94));
    border: 2px solid color-mix(in srgb, var(--gear, #ffd56a) 58%, rgba(255, 255, 255, 0.2));
    border-radius: 8px;
}

.gear-card.locked {
    opacity: 0.48;
    filter: grayscale(0.55);
}

.gear-card.equipped-score {
    --gear: #ffd56a;
    background: linear-gradient(180deg, rgba(82, 57, 38, 0.96), rgba(42, 25, 25, 0.94));
}

.gear-card span {
    color: #8ceeff;
    font-size: 0.72rem;
    font-weight: 1000;
    text-transform: uppercase;
}

.gear-stat {
    display: grid;
    gap: 3px;
    min-height: 48px;
    padding: 8px;
    color: #fff8dc;
    background: rgba(8, 13, 22, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
}

.gear-stat b {
    color: #ffffff;
    font-size: 0.8rem;
}

.gear-stat em {
    color: #ffdf76;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 1000;
}

.gear-card button {
    min-height: 40px;
    padding: 0 10px;
    color: #2c2117;
    font-size: 0.78rem;
    font-weight: 1000;
    background: linear-gradient(180deg, #ffdf73, #d69334);
    border: 2px solid #fff0ae;
    border-radius: 8px;
    cursor: pointer;
}

.gear-card button:disabled {
    cursor: default;
    opacity: 0.5;
    filter: grayscale(0.45);
}

.gear-icon {
    width: 54px;
    aspect-ratio: 1;
    background:
        linear-gradient(135deg, transparent 0 32%, #fff8d4 32% 40%, transparent 40%),
        radial-gradient(circle, var(--gear), transparent 68%);
    border: 3px solid rgba(255, 241, 183, 0.86);
    border-radius: 8px;
    box-shadow: 0 0 18px color-mix(in srgb, var(--gear) 42%, transparent);
}

@keyframes aura-pulse {
    0%,
    100% {
        opacity: 0.48;
        transform: translateX(-50%) scale(0.92);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.04);
    }
}

@keyframes float-hit {
    0% {
        opacity: 0;
        transform: translate(-50%, -10%) scale(0.7);
    }
    18% {
        opacity: 1;
        transform: translate(-50%, -68%) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -135%) scale(0.88);
    }
}

@keyframes bolt-flight {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) scaleX(0.4);
    }
    22% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--dx) - 50%), calc(var(--dy) - 50%)) rotate(var(--angle)) scaleX(1.08);
    }
}

@keyframes slash-fade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) scale(0.56);
    }
    35% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) scale(1.28);
    }
}

@keyframes burst-pop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.25);
    }
    40% {
        opacity: 0.88;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.28);
    }
}

@keyframes reveal-pop {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.88);
    }
    72% {
        opacity: 1;
        transform: translateY(-2px) scale(1.03);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 920px) {
    .collection-panel {
        grid-template-columns: 1fr;
    }

    .focus-panel {
        grid-template-columns: 1fr;
    }

    .focus-grid {
        grid-template-columns: repeat(3, minmax(86px, 1fr));
    }

    .hero-filters {
        justify-content: flex-start;
    }

    .game-shell {
        grid-template-rows: minmax(52px, 7.5vh) minmax(46px, auto) 1fr;
        min-height: 420px;
    }

    .title-stack {
        min-width: 132px;
    }

    .resource-tray {
        min-width: 186px;
        max-width: 230px;
        overflow: hidden;
    }

    .resource-chip {
        min-width: 58px;
        padding: 4px 6px;
    }

    .resource-chip span {
        font-size: 0.5rem;
    }

    .hub-tabs {
        display: flex;
        grid-template-columns: none;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .command-button {
        min-width: 48px;
        width: 48px;
        padding: 0;
    }

    .command-button span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .gold-button {
        min-width: 66px;
        padding: 0 8px;
    }

    .fighter {
        width: clamp(58px, 10.5vw, 92px);
        height: clamp(88px, 16vw, 142px);
    }

    .fighter.boss-unit {
        width: clamp(120px, 26vw, 190px);
        height: clamp(176px, 36vw, 282px);
    }

    .status-card {
        width: 104%;
        top: -34px;
    }

    .buff {
        width: 12px;
        height: 12px;
        font-size: 0.5rem;
    }

    .hero-card {
        grid-template-columns: minmax(74px, 30%) 1fr;
    }

    .hero-detail-shell {
        grid-template-columns: 1fr;
    }

    .hero-detail-portrait {
        min-height: 320px;
    }

    .hero-detail-portrait img {
        max-height: 320px;
        width: min(360px, 110%);
    }

    .hero-detail-stats {
        grid-template-columns: repeat(3, minmax(86px, 1fr));
    }

    .summon-layout {
        grid-template-columns: 1fr;
    }

    .campaign-path {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .campaign-map-head {
        align-items: stretch;
        flex-direction: column;
    }

    .map-reward-chip {
        min-width: 0;
    }

    .daily-mission-card,
    .quest-card,
    .opponent-card {
        grid-template-columns: 1fr auto;
    }

    .daily-progress,
    .quest-reward,
    .opponent-power {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .top-rail,
    .bottom-rail {
        gap: 5px;
        padding-left: 5px;
        padding-right: 5px;
    }

    .round-button,
    .icon-button {
        width: 40px;
        height: 40px;
        min-height: 40px;
    }

    .command-button {
        width: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .gold-button {
        min-width: 58px;
        min-height: 40px;
        gap: 3px;
        padding: 0 6px;
    }

    .gold-button svg {
        width: 18px;
        height: 18px;
    }

    .title-stack {
        display: none;
    }

    .title-stack span {
        font-size: 0.67rem;
    }

    .title-stack strong {
        font-size: 0.68rem;
    }

    .resource-tray {
        display: none;
    }

    .score-chip {
        width: 68px;
        min-width: 68px;
        padding: 5px 7px;
    }

    .score-chip span {
        font-size: 0.62rem;
    }

    .action-meter {
        height: 18px;
        min-width: 70px;
    }

    .primary-button {
        width: 82px;
        min-width: 82px;
        min-height: 42px;
        padding: 0 6px;
        font-size: 0.78rem;
    }

    .formation-head,
    .bonus-box {
        flex-direction: column;
        align-items: stretch;
    }

    .boss-chip,
    .preset-button {
        min-width: 0;
        width: 100%;
    }

    .formation-board,
    .report-columns {
        grid-template-columns: 1fr;
    }

    .duel-button {
        justify-self: center;
    }

    .report-tabs button {
        min-width: 118px;
    }

    .view-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .summon-header-tools {
        align-items: stretch;
        width: 100%;
    }

    .view-stat-row {
        width: 100%;
    }

    .collection-panel {
        padding: 10px;
    }

    .collection-stats {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .hero-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-filter {
        justify-content: space-between;
        width: 100%;
    }

    .focus-target {
        grid-template-columns: 96px 1fr;
    }

    .focus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .focus-choice {
        grid-template-columns: 56px 1fr auto;
        grid-template-rows: auto;
        align-items: center;
        min-height: 64px;
        text-align: left;
    }

    .focus-choice img {
        width: 68px;
        height: 54px;
    }

    .focus-choice span {
        white-space: normal;
    }

    .view-stat-row .score-chip {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .hero-roster {
        grid-template-columns: 1fr;
    }

    .hero-card {
        grid-template-columns: 92px 1fr;
        min-height: 176px;
    }

    .hero-card-art {
        min-height: 176px;
    }

    .hero-card-body {
        padding: 10px;
    }

    .hero-detail-title {
        flex-direction: column;
    }

    .hero-detail-title b {
        width: 100%;
        text-align: center;
    }

    .hero-detail-stats,
    .hero-detail-actions {
        grid-template-columns: 1fr;
    }

    .hero-meta span {
        font-size: 0.68rem;
    }

    .card-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .card-actions div {
        width: 100%;
    }

    .card-actions button {
        width: 100%;
    }

    .idle-chest {
        left: 8px;
        right: auto;
        top: 8px;
        min-width: min(238px, 62vw);
        padding: 6px;
    }

    .idle-chest button {
        min-height: 30px;
        padding: 0 9px;
    }

    .campaign-map-entry {
        left: auto;
        right: 8px;
        top: 8px;
        min-width: min(190px, 36vw);
        max-width: 190px;
        padding: 6px 8px;
    }

    .campaign-map-entry strong {
        font-size: 0.72rem;
    }

    .campaign-map-entry small {
        display: none;
    }

    .boss-health {
        top: 64px;
        width: min(360px, calc(100% - 20px));
        padding: 7px 9px 8px;
    }

    .boss-health-head {
        gap: 8px;
    }

    .boss-health-head span {
        font-size: 0.78rem;
    }

    .boss-health-head strong {
        font-size: 0.66rem;
    }

    .boss-health-bar {
        height: 15px;
    }

    .campaign-path,
    .reveal-grid {
        grid-template-columns: 1fr;
    }

    .map-actions {
        flex-direction: column;
    }

    .summon-stage {
        min-height: 260px;
    }

    .summon-stage strong {
        margin-top: 154px;
    }

    .event-grid,
    .daily-mission-card,
    .quest-card,
    .opponent-card {
        grid-template-columns: 1fr;
    }

    .daily-mission-card button,
    .quest-card button,
    .opponent-card button {
        width: 100%;
    }
}

@media (max-height: 580px) {
    .game-shell {
        min-height: 360px;
    }

    .center-badge {
        display: none;
    }

    .fighter {
        width: clamp(56px, 8.1vw, 110px);
        height: clamp(80px, 13vw, 156px);
    }

    .fighter.boss-unit {
        width: clamp(118px, 19vw, 182px);
        height: clamp(168px, 29vw, 268px);
    }

    .boss-health {
        top: 58px;
    }

    .status-card {
        top: -32px;
    }

    .idle-chest {
        top: 6px;
    }

    .campaign-map-entry {
        top: 6px;
    }
}
