/* Weekly Raid — isolated Lobby card, party room, result and combat HUD. */

.raid-entry-card,
.raid-screen,
.raid-screen * { box-sizing: border-box; }

.raid-kicker {
    color: #ffb351;
    font: 900 10px/1.2 var(--rr-font-mono, monospace);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.raid-entry-card {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 18px;
    width: 100%;
    min-height: 270px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 163, 65, .62);
    border-radius: 4px;
    background: #090b0f;
    box-shadow: inset 0 0 0 1px rgba(255, 195, 100, .08), 0 14px 36px rgba(0, 0, 0, .34);
    color: #f5f7fa;
}

.raid-entry-card::before,
.raid-briefing::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: repeating-linear-gradient(90deg, rgba(255, 177, 80, .045) 0 1px, transparent 1px 58px);
}

.raid-entry-art {
    position: absolute;
    inset: 0;
    z-index: -3;
    background: url('../icons/raid/marrow-press-skybreaker.webp') center 34% / cover no-repeat;
    filter: saturate(.78) contrast(1.08);
    transform: scale(1.015);
}

.raid-entry-shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(3, 5, 8, .98) 0%, rgba(3, 5, 8, .86) 50%, rgba(3, 5, 8, .3) 100%),
        linear-gradient(0deg, rgba(3, 5, 8, .98), transparent 62%);
}

.raid-entry-card > header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.raid-entry-state,
.raid-page-state {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 188, 82, .55);
    background: rgba(31, 20, 9, .84);
    color: #ffd08a;
    font: 900 9px/1.2 var(--rr-font-mono, monospace);
    letter-spacing: .08em;
}

.raid-entry-state[data-state='available'],
.raid-page-state[data-state='available'] { border-color: rgba(89, 255, 173, .62); color: #74ffc0; background: rgba(7, 32, 24, .84); }
.raid-entry-state[data-state='cleared'],
.raid-page-state[data-state='cleared'] { border-color: rgba(137, 174, 255, .62); color: #a8c4ff; background: rgba(12, 23, 48, .84); }

.raid-entry-copy { align-self: end; min-width: 0; }
.raid-entry-copy > small { display: block; color: #ffb34e; font: 900 12px/1 var(--rr-font-mono, monospace); letter-spacing: .18em; }
.raid-entry-copy h2 { margin: 2px 0 5px; color: #fff; font-size: clamp(34px, 4vw, 54px); line-height: .9; letter-spacing: -.025em; text-shadow: 0 2px 18px #000; }
.raid-entry-copy p { max-width: 620px; margin: 0; color: #c5c9d0; font-size: 12px; line-height: 1.45; }

.raid-entry-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: end;
    gap: 8px;
    min-width: min(100%, 330px);
}
.raid-entry-meta > span,
.raid-entry-rewards > span {
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    border-left: 2px solid #ff9e3d;
    background: rgba(5, 8, 12, .78);
}
.raid-entry-meta small,
.raid-entry-rewards small { color: #8d939c; font: 800 8px/1 var(--rr-font-mono, monospace); letter-spacing: .13em; }
.raid-entry-meta strong,
.raid-entry-rewards strong { overflow-wrap: anywhere; color: #eef2f7; font: 900 10px/1.25 var(--rr-font-mono, monospace); }

.raid-entry-rewards {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.raid-entry-rewards > span { flex: 1 1 auto; }
.raid-rare-indicators { display: flex; gap: 5px; }
.raid-rare-indicators i {
    display: grid;
    place-items: center;
    min-width: 54px;
    min-height: 34px;
    padding: 5px;
    border: 1px solid rgba(206, 118, 255, .72);
    background: rgba(34, 13, 48, .86);
    color: #e7b1ff;
    font: 900 8px/1 var(--rr-font-mono, monospace);
    font-style: normal;
    letter-spacing: .08em;
}
.raid-rare-chance {
    color: #d9a8f5;
    font: 900 8px/1.3 var(--rr-font-mono, monospace);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.raid-entry-rewards > .raid-rare-chance { flex: 0 0 auto; max-width: 120px; text-align: right; }
.raid-reward-panel > .raid-rare-chance { display: block; margin: 8px 0 12px; }
.raid-entry-action { grid-column: 1 / -1; width: 100%; min-height: 48px; }

/* Full planning screen */
.raid-screen {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(circle at 78% 10%, rgba(255, 126, 43, .12), transparent 38%),
        linear-gradient(rgba(61, 110, 136, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61, 110, 136, .04) 1px, transparent 1px),
        #05080c;
    background-size: auto, 42px 42px, 42px 42px, auto;
    color: #eef3f7;
}

.raid-topbar {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 76px;
    padding: calc(10px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
    border-bottom: 1px solid rgba(255, 166, 70, .38);
    background: rgba(7, 10, 14, .97);
}
.raid-topbar > div { display: grid; min-width: 0; }
.raid-topbar > div span { color: #9ba2ac; font: 800 9px/1.2 var(--rr-font-mono, monospace); letter-spacing: .13em; }
.raid-topbar > div strong { overflow: hidden; color: #fff; font-size: clamp(16px, 2vw, 24px); letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.raid-reset-chip { display: grid; gap: 2px; min-width: 152px; text-align: right; }
.raid-reset-chip small { color: #858d97; font: 800 8px var(--rr-font-mono, monospace); letter-spacing: .13em; }
.raid-reset-chip b { color: #ffc070; font: 900 13px var(--rr-font-mono, monospace); }

.raid-page {
    height: calc(100vh - 76px);
    height: calc(100dvh - 76px - env(safe-area-inset-top));
    padding: 18px max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.raid-briefing {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(280px, 40%) minmax(0, 1fr) auto;
    align-items: end;
    gap: 22px;
    width: min(100%, 1440px);
    min-height: 220px;
    margin: 0 auto 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 167, 66, .38);
    background: #080b0f;
}
.raid-briefing-art {
    align-self: stretch;
    min-height: 220px;
    background:
        linear-gradient(90deg, transparent 68%, #080b0f),
        url('../icons/raid/marrow-press-skybreaker.webp') center 33% / cover no-repeat;
}
.raid-briefing-copy { min-width: 0; padding: 24px 0; }
.raid-briefing-copy h1 { margin: 4px 0 8px; color: #fff; font-size: clamp(38px, 5vw, 70px); line-height: .88; letter-spacing: -.035em; }
.raid-briefing-copy p { max-width: 720px; margin: 0; color: #bdc3cb; font-size: 13px; line-height: 1.5; }
.raid-briefing-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.raid-briefing-tags span { padding: 6px 8px; border: 1px solid rgba(255, 169, 67, .36); background: rgba(24, 15, 7, .72); color: #ffc379; font: 900 8px var(--rr-font-mono, monospace); letter-spacing: .1em; }
.raid-page-state { align-self: start; margin: 18px 18px 0 0; }

.raid-reconnect-state {
    position: sticky;
    top: 0;
    z-index: 5;
    width: min(100%, 1440px);
    margin: 0 auto 12px;
    padding: 10px 14px;
    border: 1px solid #ffb35c;
    background: rgba(47, 28, 8, .96);
    color: #ffd299;
    text-align: center;
    font: 900 10px var(--rr-font-mono, monospace);
    letter-spacing: .12em;
}

.raid-planning {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
    gap: 16px;
    width: min(100%, 1440px);
    margin: 0 auto;
}
.raid-planning-main { min-width: 0; }
.raid-planning .rr-panel,
.raid-result-panel {
    border-color: rgba(255, 164, 64, .35);
    background: linear-gradient(135deg, rgba(17, 20, 25, .98), rgba(8, 11, 15, .98));
}

.raid-lock-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 16px;
    min-height: 170px;
    padding: 22px;
}
.raid-lock-panel > span { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #ffae52; color: #ffbc68; font-size: 28px; }
.raid-lock-panel > div { display: grid; align-content: center; gap: 6px; }
.raid-lock-panel small { color: #939ba5; font: 800 9px var(--rr-font-mono, monospace); letter-spacing: .12em; }
.raid-lock-panel strong { color: #ffd49e; font: 900 clamp(16px, 2.4vw, 25px)/1.2 var(--rr-font-mono, monospace); }
.raid-lock-panel p { grid-column: 1 / -1; margin: 0; color: #b9bec6; font-size: 12px; line-height: 1.5; }

.raid-form-panel,
.raid-party-panel,
.raid-reward-panel { padding: 20px; }
.raid-form-panel > header,
.raid-party-head { display: flex; justify-content: space-between; align-items: start; gap: 14px; margin-bottom: 18px; }
.raid-form-panel h2,
.raid-party-panel h2,
.raid-reward-panel h2 { margin: 2px 0 0; color: #f6f8fb; font-size: clamp(22px, 3vw, 34px); line-height: 1; }
.raid-form-panel > header > span { color: #73ffc0; font: 900 9px var(--rr-font-mono, monospace); }
.raid-form-panel > .rr-btn { width: 100%; min-height: 48px; }
.raid-form-divider { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0; color: #7d858e; font: 900 9px var(--rr-font-mono, monospace); }
.raid-form-divider i { height: 1px; background: rgba(141, 150, 160, .25); }
.raid-code-field { display: grid; gap: 6px; margin-bottom: 10px; color: #a5abb4; font: 900 9px var(--rr-font-mono, monospace); letter-spacing: .12em; }
.raid-code-field input { width: 100%; min-height: 54px; padding: 10px 14px; border: 1px solid rgba(255, 174, 79, .52); border-radius: 0; outline: none; background: #05080c; color: #fff; text-transform: uppercase; font: 900 24px/1 var(--rr-font-mono, monospace); letter-spacing: .2em; }
.raid-code-field input:focus { border-color: #ffc06e; box-shadow: 0 0 0 2px rgba(255, 174, 79, .16); }
.raid-form-panel > small { display: block; margin-top: 10px; color: #808894; font-size: 10px; line-height: 1.45; }

.raid-party-code { display: grid; justify-items: end; gap: 2px; }
.raid-party-code small { color: #8c949e; font: 800 8px var(--rr-font-mono, monospace); letter-spacing: .12em; }
.raid-party-code strong { color: #ffd08a; font: 900 25px var(--rr-font-mono, monospace); letter-spacing: .16em; }
.raid-party-code span { color: #8e96a0; font: 900 9px var(--rr-font-mono, monospace); }
.raid-party-roster { display: grid; gap: 7px; }
.raid-roster-member {
    display: grid;
    grid-template-columns: 36px minmax(130px, .8fr) minmax(140px, 1fr) minmax(104px, auto);
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 60px;
    padding: 8px 10px;
    border: 1px solid rgba(105, 128, 146, .25);
    background: rgba(7, 10, 14, .72);
}
.raid-roster-member.is-empty { border-style: dashed; color: #6c737c; }
.raid-roster-member.is-disconnected { opacity: .62; }
.raid-roster-slot { color: #ffb151; font: 900 11px var(--rr-font-mono, monospace); }
.raid-roster-identity { display: grid; min-width: 0; }
.raid-roster-identity strong { overflow: hidden; color: #fff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.raid-roster-identity small { overflow: hidden; color: #818a95; font: 800 9px var(--rr-font-mono, monospace); text-overflow: ellipsis; white-space: nowrap; }
.raid-roster-build { overflow: hidden; color: #aeb5bf; font: 800 9px var(--rr-font-mono, monospace); text-overflow: ellipsis; white-space: nowrap; }
.raid-roster-state { position: relative; justify-self: end; min-width: 98px; padding: 6px; border: 1px solid rgba(255, 179, 84, .4); color: #e4b979; text-align: center; font: 900 8px var(--rr-font-mono, monospace); }
.raid-roster-state.is-ready { border-color: rgba(80, 255, 170, .55); color: #6dffb6; }
.raid-roster-state.is-offline { border-color: rgba(255, 94, 103, .5); color: #ff9299; }
.raid-roster-state[data-leader]::before { content: attr(data-leader); position: absolute; right: 0; bottom: calc(100% + 3px); color: #ffb65c; font-size: 7px; }
.raid-party-message { margin: 10px 0 0; padding: 9px 11px; border-left: 2px solid #5cebb1; background: rgba(12, 38, 30, .64); color: #9dffd4; font: 800 10px var(--rr-font-mono, monospace); }
.raid-party-message.is-error { border-color: #ff5f68; background: rgba(47, 10, 15, .65); color: #ffabb0; }
.raid-party-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.raid-party-actions .rr-btn { flex: 1 1 145px; min-height: 48px; }

.raid-reward-panel { align-self: start; }
.raid-guaranteed { display: grid; gap: 5px; margin: 16px 0; padding: 12px; border-left: 2px solid #ffab48; background: rgba(37, 23, 8, .64); }
.raid-guaranteed small { color: #9c8c79; font: 800 8px var(--rr-font-mono, monospace); letter-spacing: .12em; }
.raid-guaranteed strong { color: #ffd295; font: 900 12px/1.35 var(--rr-font-mono, monospace); }
.raid-reward-panel > p { color: #aeb4bd; font-size: 11px; line-height: 1.5; }
.raid-reward-panel > small { display: block; color: #777f89; font-size: 9px; line-height: 1.45; }
.raid-rare-list { display: grid; gap: 7px; margin: 15px 0; }
.raid-rare-list article { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px; border: 1px solid rgba(189, 101, 255, .32); background: rgba(27, 11, 39, .48); }
.raid-rare-list i { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border: 1px solid #c36eff; color: #e3b3ff; font: 900 14px var(--rr-font-mono, monospace); font-style: normal; }
.raid-rare-list article > div { display: grid; min-width: 0; }
.raid-rare-list strong { color: #f0dcff; font-size: 11px; }
.raid-rare-list small { color: #987ca9; font: 800 8px var(--rr-font-mono, monospace); }

.raid-result-panel { width: min(100%, 1120px); margin: 0 auto; padding: clamp(20px, 4vw, 44px); text-align: center; }
.raid-result-panel h1 { margin: 6px 0 10px; color: #fff; font-size: clamp(34px, 6vw, 68px); line-height: .95; }
.raid-result-panel > p { color: #adb5bf; }
.raid-result-currency { display: block; margin: 18px auto; color: #74ffc0; font: 900 clamp(13px, 2vw, 18px) var(--rr-font-mono, monospace); }
.raid-result-rolls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.raid-result-rolls[hidden] { display: none; }
.raid-roll { display: grid; align-content: center; gap: 6px; min-height: 130px; padding: 15px; border: 1px solid rgba(119, 135, 151, .34); background: rgba(6, 9, 13, .75); }
.raid-roll.is-rare { border-color: rgba(206, 109, 255, .68); background: radial-gradient(circle at top, rgba(148, 46, 202, .2), rgba(10, 7, 14, .82)); }
.raid-roll small { color: #ffb45a; font: 900 8px var(--rr-font-mono, monospace); letter-spacing: .13em; }
.raid-roll strong { color: #fff; font-size: 15px; }
.raid-roll span { color: #8d96a1; font: 800 8px var(--rr-font-mono, monospace); }
.raid-result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.raid-result-actions .rr-btn { min-width: 190px; min-height: 48px; }

/* Existing Profile claim surface extension. */
.profile-raid { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255, 168, 70, .28); }
.profile-raid > header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.profile-raid h4 { margin: 2px 0 0; color: #f5f7fa; font-size: 17px; }
.profile-raid header small { color: #ffaf50; font: 900 8px var(--rr-font-mono, monospace); letter-spacing: .12em; }
.profile-raid header > strong { padding: 6px 8px; border: 1px solid rgba(255, 174, 76, .45); color: #ffc477; font: 900 8px var(--rr-font-mono, monospace); }
.profile-raid > p { color: #8f98a3; font-size: 10px; }
.profile-raid-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.profile-raid-meta span { display: grid; gap: 4px; min-width: 0; padding: 9px; background: rgba(4, 7, 11, .6); color: #777f88; font: 800 8px var(--rr-font-mono, monospace); }
.profile-raid-meta strong { overflow-wrap: anywhere; color: #e7ebef; font-size: 10px; }
.profile-raid-drops { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.profile-raid-drop { padding: 5px 7px; border: 1px solid rgba(196, 105, 255, .42); color: #dca7ff; font: 800 8px var(--rr-font-mono, monospace); }

/* Raid combat HUD: one bounded DOM tree, updated at the game HUD cadence. */
.raid-hud { position: fixed; inset: 0; z-index: 42; pointer-events: none; color: #fff; font-family: var(--rr-font, sans-serif); }
.raid-hud[hidden] { display: none !important; }
.raid-hud-boss { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 50%; width: min(620px, calc(100vw - 30px)); transform: translateX(-50%); }
.raid-hud-boss-head { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin-bottom: 5px; text-shadow: 0 2px 4px #000; }
.raid-hud-boss-head div { display: grid; }
.raid-hud-boss-head small { color: #ffb24f; font: 900 8px var(--rr-font-mono, monospace); letter-spacing: .15em; }
.raid-hud-boss-head strong { font-size: clamp(15px, 2vw, 21px); letter-spacing: .06em; }
.raid-hud-boss-head > span { color: #ffd190; font: 900 11px var(--rr-font-mono, monospace); }
.raid-hud-boss-track { height: 18px; padding: 3px; border: 1px solid rgba(255, 183, 84, .8); background: rgba(3, 5, 8, .88); box-shadow: 0 2px 14px #000; }
.raid-hud-boss-track i { display: block; width: var(--raid-boss-hp, 100%); height: 100%; background: linear-gradient(90deg, #ff5e3e, #ffb146); transition: width 120ms linear; }
.raid-hud-party { position: absolute; top: max(72px, calc(env(safe-area-inset-top) + 70px)); left: max(10px, env(safe-area-inset-left)); display: grid; gap: 4px; width: min(230px, 32vw); }
.raid-hud-member { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 6px 7px; border-left: 2px solid #63eeb3; background: rgba(4, 8, 12, .82); box-shadow: 0 2px 7px rgba(0,0,0,.35); }
.raid-hud-member.is-lost { border-color: #ff5963; opacity: .68; }
.raid-hud-member.is-disconnected { border-color: #ffb34f; }
.raid-hud-member strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.raid-hud-member span { color: #aeb7c0; font: 900 8px var(--rr-font-mono, monospace); }
.raid-hud-member-meter { grid-column: 1 / -1; height: 3px; background: #252b32; }
.raid-hud-member-meter i { display: block; width: var(--raid-member-hp,100%); height: 100%; background: #55e8a8; }
.raid-hud-warning { position: absolute; top: 25%; left: 50%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; min-width: min(460px, calc(100vw - 30px)); padding: 12px 16px; border: 2px solid #ffbd61; background: rgba(33, 15, 5, .9); transform: translateX(-50%); text-align: left; box-shadow: 0 0 24px rgba(255, 116, 36, .35); }
.raid-hud-warning[hidden] { display: none; }
.raid-hud-warning-shape { display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid currentColor; color: #ffd07d; font-size: 22px; transform: rotate(45deg); }
.raid-hud-warning-shape b { transform: rotate(-45deg); }
.raid-hud-warning div { display: grid; }
.raid-hud-warning strong { color: #fff0d4; font-size: 16px; letter-spacing: .06em; }
.raid-hud-warning small { color: #ffc978; font: 900 9px var(--rr-font-mono, monospace); }
.raid-hud-objective { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); display: grid; gap: 3px; max-width: 290px; padding: 8px 10px; border-right: 2px solid #ffad47; background: rgba(3, 7, 11, .78); text-align: right; }
.raid-hud-objective small { color: #ffb65e; font: 900 8px var(--rr-font-mono, monospace); letter-spacing: .12em; }
.raid-hud-objective strong { font-size: 11px; }
.raid-hud-stagger { position: absolute; top: 20%; left: 50%; display: grid; justify-items: center; transform: translateX(-50%); text-shadow: 0 2px 4px #000; }
.raid-hud-stagger[hidden] { display: none; }
.raid-hud-stagger small { color: #74ffc0; font: 900 9px var(--rr-font-mono, monospace); letter-spacing: .12em; }
.raid-hud-stagger strong { color: #fff; font: 900 30px var(--rr-font-mono, monospace); }
.raid-hud-reconnect { position: absolute; top: 50%; left: 50%; padding: 12px 16px; border: 1px solid #ffb45a; background: rgba(27, 15, 4, .94); color: #ffd095; transform: translate(-50%,-50%); font: 900 10px var(--rr-font-mono, monospace); }
.raid-hud-reconnect[hidden] { display: none; }
.raid-hud-spectator { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 7px; transform: translateX(-50%); pointer-events: auto; }
.raid-hud-spectator[hidden] { display: none; }
.raid-hud-spectator > span { padding: 5px 8px; background: rgba(3, 6, 9, .82); color: #fff; font: 900 9px var(--rr-font-mono, monospace); }
.raid-hud-spectator div { display: flex; gap: 8px; }
.raid-hud-spectator button { min-width: 116px; min-height: 48px; }
.raid-hud-result { position: absolute; inset: 0; display: grid; place-content: center; background: rgba(1, 3, 5, .42); text-align: center; }
.raid-hud-result[hidden] { display: none; }
.raid-hud-result small { color: #ffb55a; font: 900 10px var(--rr-font-mono, monospace); letter-spacing: .15em; }
.raid-hud-result strong { color: #fff; font-size: clamp(44px, 10vw, 100px); line-height: .9; text-shadow: 0 4px 20px #000; }

@media (max-width: 768px) {
    .raid-entry-card { grid-template-columns: 1fr; min-height: 330px; padding: 14px; }
    .raid-entry-card > header,
    .raid-entry-rewards { grid-column: 1; }
    .raid-entry-card > header { align-items: start; }
    .raid-entry-shade { background: linear-gradient(0deg, rgba(3,5,8,.99) 0%, rgba(3,5,8,.9) 66%, rgba(3,5,8,.35)); }
    .raid-entry-copy { margin-top: 46px; }
    .raid-entry-meta { width: 100%; }
    .raid-entry-rewards { align-items: stretch; flex-direction: column; }
    .raid-entry-rewards > .raid-rare-chance { max-width: none; text-align: left; }
    .raid-rare-indicators i { flex: 1 1 0; min-width: 0; }
    .raid-topbar { grid-template-columns: auto minmax(0, 1fr); gap: 10px; min-height: 72px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
    .raid-topbar > div span { display: none; }
    .raid-reset-chip { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: space-between; min-width: 0; padding-top: 5px; border-top: 1px solid rgba(255,169,68,.18); text-align: left; }
    .raid-page { height: calc(100dvh - 98px - env(safe-area-inset-top)); padding: 10px max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
    .raid-briefing { grid-template-columns: 1fr; min-height: 0; }
    .raid-briefing-art { min-height: 170px; background: linear-gradient(0deg,#080b0f,transparent 48%), url('../icons/raid/marrow-press-skybreaker.webp') center 31% / cover no-repeat; }
    .raid-briefing-copy { padding: 0 14px 14px; }
    .raid-briefing-copy h1 { font-size: 42px; }
    .raid-page-state { position: absolute; top: 10px; right: 10px; margin: 0; }
    .raid-planning { grid-template-columns: 1fr; }
    .raid-reward-panel { order: 2; }
    .raid-roster-member { grid-template-columns: 28px minmax(0, 1fr) auto; }
    .raid-roster-build { grid-column: 2 / -1; grid-row: 2; }
    .raid-roster-state { grid-column: 3; grid-row: 1; min-width: 88px; }
    .raid-result-rolls { grid-template-columns: 1fr; }
    .raid-roll { min-height: 90px; }
    .profile-raid-meta { grid-template-columns: 1fr; }
    .raid-hud-boss { top: max(8px, env(safe-area-inset-top)); width: calc(100vw - 16px); }
    .raid-hud-party { top: max(65px, calc(env(safe-area-inset-top) + 62px)); width: min(190px, 51vw); }
    .raid-hud-member { padding: 4px 6px; }
    .raid-hud-warning { top: 29%; min-width: calc(100vw - 20px); padding: 9px 12px; }
    .raid-hud-warning strong { font-size: 13px; }
    .raid-hud-objective { bottom: max(176px, calc(env(safe-area-inset-bottom) + 170px)); max-width: 48vw; }
    .raid-hud-spectator { bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (max-width: 430px) {
    .raid-entry-copy h2 { font-size: 38px; }
    .raid-entry-meta { grid-template-columns: 1fr; }
    .raid-entry-state { max-width: 55%; text-align: right; }
    .raid-form-panel,
    .raid-party-panel,
    .raid-reward-panel { padding: 14px; }
    .raid-party-head { align-items: start; }
    .raid-party-code strong { font-size: 19px; }
    .raid-party-actions { display: grid; grid-template-columns: 1fr; }
    .raid-result-actions { display: grid; }
    .raid-result-actions .rr-btn { min-width: 0; width: 100%; }
}

@media (max-height: 520px) and (orientation: landscape) {
    .raid-topbar { min-height: 54px; grid-template-columns: auto minmax(0,1fr) auto; padding-top: max(5px, env(safe-area-inset-top)); padding-bottom: 5px; }
    .raid-topbar > div span { display: none; }
    .raid-reset-chip { grid-column: auto; grid-row: auto; display: grid; min-width: 130px; padding: 0; border: 0; text-align: right; }
    .raid-page { height: calc(100dvh - 54px - env(safe-area-inset-top)); padding-top: 8px; }
    .raid-briefing { grid-template-columns: 220px minmax(0,1fr) auto; min-height: 124px; margin-bottom: 8px; }
    .raid-briefing-art { min-height: 124px; }
    .raid-briefing-copy { padding: 10px 0; }
    .raid-briefing-copy h1 { margin: 2px 0 4px; font-size: 36px; }
    .raid-briefing-copy p { display: none; }
    .raid-briefing-tags { margin-top: 7px; }
    .raid-planning { grid-template-columns: minmax(0,1.5fr) minmax(250px,.75fr); gap: 8px; }
    .raid-form-panel,
    .raid-party-panel,
    .raid-reward-panel { padding: 12px; }
    .raid-party-head { margin-bottom: 7px; }
    .raid-roster-member { min-height: 42px; padding: 4px 7px; }
    .raid-party-actions { margin-top: 7px; }
    .raid-party-actions .rr-btn { min-height: 44px; }
    .raid-hud-boss { top: max(5px, env(safe-area-inset-top)); width: min(530px, calc(100vw - 170px)); }
    .raid-hud-boss-head strong { font-size: 13px; }
    .raid-hud-boss-track { height: 12px; }
    .raid-hud-party { top: max(47px, calc(env(safe-area-inset-top) + 42px)); width: 170px; gap: 2px; }
    .raid-hud-member { min-height: 0; padding: 3px 5px; }
    .raid-hud-member-meter { display: none; }
    .raid-hud-warning { top: 22%; min-width: min(390px, 52vw); padding: 7px 10px; }
    .raid-hud-warning-shape { width: 28px; height: 28px; font-size: 16px; }
    .raid-hud-objective { right: max(6px, env(safe-area-inset-right)); bottom: auto; top: max(48px, calc(env(safe-area-inset-top) + 44px)); max-width: 190px; padding: 5px 7px; }
    .raid-hud-spectator { bottom: max(5px, env(safe-area-inset-bottom)); }
    .raid-hud-spectator button { min-width: 100px; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .raid-entry-art { transform: none; }
    .raid-hud-boss-track i { transition: none; }
}
