/* Fill the available screen; typography has readable floors, never scaled down. */
.album-vault {
    --vault-gold: #e5c47a;
    --vault-text: clamp(14px, .85vw, 22px);
    --vault-gap: clamp(10px, 1.2vh, 20px);
    --vault-tile: clamp(58px, min(6vw, 11vh), 152px);
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: max(640px, calc(100svh - 124px));
    margin: 18px 0 26px;
    overflow: hidden;
    border: 1px solid #b494507a;
    border-radius: 4px;
    background: #0e1019;
    box-shadow: 0 20px 60px #0006;
    color: #f5ebd3;
    font-size: var(--vault-text);
    scroll-margin-top: 90px;
}
.vault-header { display: flex; align-items: center; gap: clamp(14px, 1.2vw, 32px); padding: clamp(16px, 1.3vh, 26px) clamp(20px, 2vw, 48px); border-bottom: 1px solid #d4b36850; background: linear-gradient(100deg, #31241e, #17151e 60%, #11151d); }
.vault-header > img { width: clamp(76px, 5vw, 130px); height: clamp(58px, 4vw, 100px); object-fit: contain; }
.vault-header > div { flex: 1; min-width: 0; }
.vault-header > div > span { color: var(--vault-gold); font: 700 var(--vault-text)/1.5 Montserrat, sans-serif; letter-spacing: .1em; }
.vault-header h2 { margin: 4px 0 0; color: #fae8b8; font: 700 clamp(28px, 2vw, 56px)/1.2 SpectralAlbum, Georgia, serif; }
.vault-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; max-width: 36%; }
.vault-state { display: flex; align-items: center; gap: 8px; color: #e2d8c4; font-size: var(--vault-text); }
.vault-state i { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #d3ba84; }
.is-claimed .vault-state, .vault-state.is-ready { color: #b3efd1; }
.is-claimed .vault-state i, .vault-state.is-ready i { background: #94dfba; }
.vault-fullscreen { min-height: 44px; padding: 10px 14px; border: 1px solid #dcc28170; border-radius: 3px; background: #f0cd6a0c; color: #fae8bc; font: 600 var(--vault-text)/1.4 Montserrat, sans-serif; cursor: pointer; }
.vault-fullscreen:hover { background: #f0cd6a20; }
.vault-body { display: grid; flex: 1; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.vault-stage { position: relative; display: grid; min-width: 0; grid-template-rows: minmax(0, 1fr); gap: var(--vault-gap); padding: clamp(18px, 2vh, 32px) clamp(20px, 2vw, 48px); background: radial-gradient(ellipse at 50% 60%, #df9dce30, transparent 65%); }
.vault-stage::before { position: absolute; z-index: -1; inset: 0; content: ''; background: linear-gradient(90deg, #0e10192b, #0e10194d), linear-gradient(0deg, #0e1019, transparent 35%, #0e101940), var(--family-vip-bg) center/cover; opacity: .7; }
.vault-heroes { display: flex; align-items: stretch; justify-content: center; gap: clamp(12px, 1vw, 28px); min-width: 0; }
.vault-hero { display: flex; flex: 1; min-width: 0; flex-direction: column; margin: 0; }
.vault-hero-art { position: relative; flex: 1; min-height: clamp(270px, calc(100svh - 610px), 1050px); }
.vault-preview { display: block; min-width: 0; padding: 0; overflow: hidden; border: 1px solid #dcbd6e9c; border-radius: 2px; background: #090b15; cursor: zoom-in; transition: border-color .2s, box-shadow .2s, transform .2s; }
.vault-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.vault-preview:hover { z-index: 3; border-color: #ffe4a0; box-shadow: 0 0 20px #d7b66030; transform: translateY(-2px); }
.vault-preview:focus-visible, .vault-fullscreen:focus-visible, .vault-lightbox button:focus-visible { outline: 2px solid #fff0bd; outline-offset: 4px; }
.vault-hero-frame { position: absolute; inset: 4% 0 0; height: 92%; width: fit-content; max-width: 90%; margin: auto; aspect-ratio: 2/3; box-shadow: 0 12px 32px #0009; }
.has-character .vault-hero-frame { inset: 8% auto 0 3%; height: 84%; max-width: 55%; margin: 0; transform: rotate(-5deg); }
.vault-hero-character { position: absolute; inset: 0 -2% 0 auto; width: 75%; height: 100%; border: 0; background: transparent; overflow: visible; filter: drop-shadow(0 8px 18px #0008); }
.vault-hero-character:hover { box-shadow: none; }
.vault-hero figcaption { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; padding: 10px 20px; border-bottom: 1px solid #d6b66c7a; background: linear-gradient(90deg, transparent, #12111fdb 20% 80%, transparent); text-align: center; }
.vault-hero figcaption span { display: block; color: #e0c78d; font-size: var(--vault-text); letter-spacing: .06em; }
.vault-hero figcaption strong { display: block; margin-top: 4px; font: 700 clamp(24px, 1.6vw, 44px)/1.2 SpectralAlbum, Georgia, serif; color: #ffe9b9; }
.vault-collection { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: var(--vault-gap); padding: clamp(18px, 2vh, 32px) clamp(20px, 2vw, 48px); border-left: 1px solid #e2bc6840; background: linear-gradient(135deg, #181621e8, #0d1018f7); }
.vault-collection h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 var(--vault-gap); color: #f8ebd0; font: 700 clamp(22px, 1.35vw, 36px)/1.2 SpectralAlbum, Georgia, serif; }
.vault-collection h3 small { color: #d3c39e; font: 500 var(--vault-text)/1.4 Montserrat, sans-serif; }
.vault-avatar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--vault-gap); width: 100%; max-width: calc(5 * var(--vault-tile) + 4 * var(--vault-gap)); }
.vault-avatar-grid:not(.is-large):has(> :nth-child(6)) { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: calc(6 * var(--vault-tile) + 5 * var(--vault-gap)); }
.vault-avatar, .vault-ability { width: 100%; aspect-ratio: 1; padding: 3px; background: linear-gradient(135deg, #bfa15a, #4b3324); box-shadow: 0 5px 12px #0005; }
.vault-avatar img, .vault-ability img { object-fit: cover; }
.vault-ability-group + .vault-ability-group { margin-top: var(--vault-gap); }
.vault-ability-group h4 { margin: 0 0 8px; font-size: var(--vault-text); font-weight: 500; line-height: 1.3; color: #dcd2e9; }
.vault-ability-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--vault-gap); width: 100%; max-width: calc(4 * var(--vault-tile) + 3 * var(--vault-gap)); }
.has-two-heroes, .has-many-avatars { --vault-tile: clamp(52px, min(5vw, 7.2vh), 120px); }
.vault-exclusive-note { margin: 0; color: #d4c6b5; font-size: var(--vault-text); line-height: 1.5; }
.vault-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(16px, 1.7vh, 28px) clamp(20px, 2vw, 48px); border-top: 1px solid #d4b36850; background: linear-gradient(110deg, #201b21, #11141d); }
.vault-bonuses { display: flex; flex: 1; flex-wrap: wrap; gap: 14px clamp(18px, 2vw, 48px); }
.vault-bonus { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vault-bonus > img { width: clamp(48px, 3.5vw, 90px); height: clamp(56px, 4vw, 100px); object-fit: contain; }
.vault-bonus > span { display: grid; gap: 6px; }
.vault-bonus small { color: #ddc38b; font-size: var(--vault-text); line-height: 1.3; }
.vault-bonus strong { color: #f5e8cf; font-size: clamp(16px, 1vw, 26px); font-weight: 600; line-height: 1.4; }
.vault-bonus--cards { flex: 1 0 100%; padding: 14px 18px; border: 1px solid #dbc18466; background: radial-gradient(ellipse at left, #977ce72b, transparent 75%), linear-gradient(110deg, #211b2f, #10151f); }
.vault-bonus--cards > span { min-width: 0; }
.vault-gift-image { flex: 0 0 auto; width: clamp(68px, 5vw, 128px); height: clamp(90px, 7vw, 172px); border: 0; background: transparent; filter: drop-shadow(0 5px 14px #0008); }
.vault-gift-detail { color: #d3cee0; font-size: var(--vault-text); line-height: 1.5; }
.vault-bonus--cards a { width: fit-content; padding: 5px 0; color: #eed39b; font-size: var(--vault-text); line-height: 1.5; text-underline-offset: 4px; }
.vault-bonus--cards a:hover { color: #fff0c6; }
.vault-bonus--cards a:focus-visible { outline: 2px solid #fff0bd; outline-offset: 4px; }
.vault-action { flex: 0 1 30%; min-width: 260px; }
.vault-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; font-size: var(--vault-text); color: #e0d2b2; line-height: 1.4; }
.vault-progress > div { flex: 1; min-width: 60px; height: 4px; overflow: hidden; background: #ffffff1c; }
.vault-progress i { display: block; height: 100%; background: var(--vault-gold); }
.vault-action .album-claim-button { width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 14px; font-size: clamp(15px, .95vw, 24px); letter-spacing: .04em; animation: none; }
.vault-action .album-claim-button:disabled { color: #dcd1ba; border-color: #b59e6370; background: #a68b4a12; }
.vault-claim-note { margin: 0; padding: 10px 20px; border-top: 1px solid #d4b36830; color: #d3c5ae; font-size: var(--vault-text); line-height: 1.5; text-align: center; }
.has-two-heroes .has-character .vault-hero-frame { left: 0; max-width: 65%; height: 76%; top: 16%; }
.has-two-heroes .vault-hero-character { width: 85%; right: -4%; }
.vault-preview-open, .vault-expanded-open { overflow: hidden; }
.album-vault:fullscreen, .album-vault.is-expanded { width: 100%; height: 100dvh; min-height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; overflow-y: auto; }
.album-vault.is-expanded { position: fixed; z-index: 10000; inset: 0; }
.album-vault:fullscreen .vault-hero-art, .album-vault.is-expanded .vault-hero-art { min-height: clamp(270px, calc(100svh - 500px), 1150px); }
.vault-lightbox { width: min(1500px, 96vw); max-width: 96vw; max-height: 96dvh; margin: auto; padding: 20px; border: 1px solid #c6a56c; border-radius: 5px; background: radial-gradient(ellipse at center, #282135, #0b101b); color: #f4e3bc; box-shadow: 0 24px 100px #000b; }
.vault-lightbox::backdrop { background: #02050ce8; backdrop-filter: blur(8px); }
.vault-lightbox header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.vault-lightbox h2 { margin: 0; font: 700 clamp(20px, 1.4vw, 36px)/1.3 SpectralAlbum, Georgia, serif; }
.vault-lightbox button { flex-shrink: 0; width: 48px; height: 48px; border: 1px solid #c6a56c90; background: #ffffff08; color: #f4e3bc; font-size: 22px; cursor: pointer; }
.vault-lightbox > img { display: block; width: 100%; height: min(72dvh, 1200px); object-fit: contain; }
.vault-lightbox > p { margin: 12px 0 0; color: #ded4c4; font: 14px/1.5 Montserrat, sans-serif; text-align: center; }
.album-claim-popup-card { width: min(560px, 100%); }
.album-claim-popup-row strong { font-size: clamp(16px, 1vw, 22px); line-height: 1.4; }
.album-claim-popup-row small { display: block; margin-top: 4px; color: #d5cddc; font-size: clamp(14px, .85vw, 18px); line-height: 1.5; }
.album-claim-popup-wish { display: block; padding: 14px 8px; margin: -8px 0 14px; border-bottom: 1px solid #dbc18466; color: #f2d58f; font: 600 clamp(14px, .9vw, 20px)/1.5 Montserrat, sans-serif; text-align: center; text-underline-offset: 4px; }
.album-claim-popup-wish:focus-visible { outline: 2px solid #fff0bd; outline-offset: 3px; }
@media (max-width: 1100px) {
    .vault-header { flex-wrap: wrap; }
    .vault-header-actions { max-width: none; }
    .vault-body { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
    .vault-footer { flex-wrap: wrap; }
    .vault-action { flex: 1 0 260px; }
    .vault-bonuses { flex: 2 1 420px; }
}
@media (max-width: 700px) {
    .album-vault { --vault-text: 14px; --vault-gap: 10px; min-height: 0; margin-top: 14px; }
    .vault-header { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 16px; }
    .vault-header > img { width: 52px; height: 48px; }
    .vault-header h2 { font-size: 26px; }
    .vault-header > div > span { letter-spacing: .03em; }
    .vault-header-actions { grid-column: 1/-1; justify-content: space-between; }
    .vault-body { grid-template-columns: 1fr; }
    .vault-stage { padding: 18px 14px; }
    .vault-hero-art { min-height: clamp(270px, 76vw, 460px); }
    .vault-hero figcaption { padding: 10px 6px; }
    .vault-hero figcaption strong { font-size: 26px; }
    .vault-collection { padding: 20px 16px; border-left: 0; border-top: 1px solid #e2bc6840; }
    .vault-collection h3 { font-size: 24px; }
    .vault-ability-grid { max-width: none; }
    .vault-footer { display: flex; flex-direction: column; align-items: stretch; padding: 18px 16px; gap: 18px; }
    .vault-bonuses { flex: none; flex-direction: column; gap: 14px; }
    .vault-bonus strong { font-size: 16px; }
    .vault-bonus--cards { flex: none; padding: 12px; }
    .vault-action { flex: none; min-width: 0; }
    .has-two-heroes .vault-heroes { flex-direction: column; }
    .has-two-heroes .vault-hero-character { right: 0; width: 82%; }
    .has-two-heroes .vault-hero { min-height: 360px; }
    .has-two-heroes .vault-hero-art { min-height: 280px; }
    .vault-lightbox { padding: 12px; }
    .album-vault:fullscreen .vault-hero-art, .album-vault.is-expanded .vault-hero-art { min-height: clamp(270px, 76vw, 460px); }
}
@media (max-height: 550px) and (min-width: 701px) {
    .album-vault { min-height: 650px; }
}
@media (prefers-reduced-motion: reduce) {
    .vault-preview { transition: none; }
}
