/* Boss selection overlay: keyboard & touch, no modifications to existing RPG menus. */
#bossChoiceOverlay[hidden]{display:none!important}
#bossChoiceOverlay{position:fixed;inset:0;z-index:80;background:rgba(5,9,18,.87);backdrop-filter:blur(9px);display:flex;align-items:center;justify-content:center;padding:16px;color:#f8f0db;overflow:auto}
.bossChoiceWindow{width:min(790px,96vw);max-height:94dvh;overflow:auto;background:radial-gradient(ellipse at 48% 0%,#25313f,#0d1923 70%);border:1px solid #b99a65;border-radius:20px;box-shadow:0 20px 80px #000c,0 0 0 4px #182229b0;padding:clamp(14px,2vw,28px);text-align:center}
.bossChoiceWindow>small{font:700 11px system-ui;letter-spacing:3px;color:#ddc390}
.bossChoiceWindow h2{font:750 clamp(24px,3.3vw,40px) Georgia,serif;letter-spacing:1.6px;margin:5px 0}
.bossChoiceWindow>p{font:12px/1.55 system-ui;color:#b6c5c7;margin:4px 0 16px}
.bossChoiceGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.bossChoiceGrid button{color:#efe9dc;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center;padding:20px 15px;min-height:198px;border-radius:14px;border:1px solid #788c92;background:linear-gradient(150deg,#263941,#14232c);font-family:system-ui;cursor:pointer;transition:transform .13s,border-color .13s,box-shadow .13s;touch-action:manipulation}
.bossChoiceGrid button:nth-child(2){border-color:#9d6684;background:linear-gradient(150deg,#3c273f,#20152d)}
.bossChoiceGrid button:hover,.bossChoiceGrid button:focus-visible{transform:translateY(-2px);border-color:#ffd48a;box-shadow:0 0 0 2px #eac48b44,0 8px 24px #0008}
.bossChoiceIcon{display:grid;place-items:center;width:58px;height:58px;border:1px solid #d2af80;border-radius:50%;font-size:38px;color:#ecca92;background:#241e28}
.bossChoiceGrid button:nth-child(2) .bossChoiceIcon{color:#ffb17a;border-color:#ef906f;background:#392137;box-shadow:0 0 25px #9d48c254}
.bossChoiceGrid b{font-size:clamp(15px,1.7vw,22px);letter-spacing:.6px}
.bossChoiceGrid em{font:700 10px/1.3 system-ui;letter-spacing:1px;font-style:normal;color:#dec28c}
.bossChoiceGrid span:last-child{font:12px/1.45 system-ui;color:#aebcbe}
.bossChoiceFooter{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:15px;font:11px/1.4 system-ui;color:#aab6bb}
.bossChoiceFooter button{padding:10px 18px;background:#26353b;color:#f5e8cf;border:1px solid #809195;border-radius:9px;cursor:pointer;font-weight:800;touch-action:manipulation}
@media(max-width:600px){.bossChoiceGrid{gap:9px}.bossChoiceGrid button{padding:12px 8px;min-height:165px}.bossChoiceIcon{width:43px;height:43px;font-size:28px}.bossChoiceGrid span:last-child{font-size:10px}.bossChoiceWindow>p{margin-bottom:9px}.bossChoiceFooter{font-size:9px}.bossChoiceFooter button{padding:8px}}
@media(max-width:400px){.bossChoiceGrid{grid-template-columns:1fr}.bossChoiceGrid button{min-height:130px}.bossChoiceWindow{max-height:92dvh}}

/* v1.7.2 · three boss cards fit tablet landscape without requiring vertical scrolling */
.bossChoiceGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.bossChoiceGrid button{min-height:158px;padding:11px 8px;gap:5px}
.bossChoiceGrid button:nth-child(2){border-color:#999d81;background:linear-gradient(150deg,#353b36,#1a2b2b)}
.bossChoiceGrid button:nth-child(3){border-color:#9d6684;background:linear-gradient(150deg,#3c273f,#20152d)}
.bossChoiceGrid button:nth-child(3) .bossChoiceIcon{color:#ffb17a;border-color:#ef906f;background:#392137;box-shadow:0 0 25px #9d48c254}
.bossChoiceGrid button:disabled{opacity:.53;filter:grayscale(.65);cursor:not-allowed}
.bossChoiceGrid button:disabled:hover{transform:none;box-shadow:none}
@media(pointer:coarse) and (orientation:landscape) and (max-height:440px){
 #bossChoiceOverlay{padding:5px}
 .bossChoiceWindow{padding:7px 9px;border-radius:12px;max-height:98dvh}
 .bossChoiceWindow>small{font-size:8px;letter-spacing:1.2px}
 .bossChoiceWindow h2{font-size:19px;margin:2px 0}
 .bossChoiceWindow>p{font-size:9px;line-height:1.25;margin:2px 0 6px}
 .bossChoiceGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .bossChoiceGrid button{min-height:112px;padding:5px;gap:2px}
 .bossChoiceGrid b{font-size:11px}
 .bossChoiceGrid .bossChoiceIcon{width:30px;height:30px;font-size:21px}
 .bossChoiceGrid em{font-size:8px;letter-spacing:0}
 .bossChoiceGrid span:last-child{font-size:8px;line-height:1.1}
 .bossChoiceFooter{margin-top:6px;font-size:8px}
 .bossChoiceFooter button{padding:6px 11px}
}
@media(max-width:480px) and (orientation:portrait){.bossChoiceGrid{grid-template-columns:1fr}.bossChoiceGrid button{min-height:120px}}

/* Chapter 5 Boss Floor temporary playtest card */
.kharvexTestBoss{border-color:#ad76ed!important;background:linear-gradient(145deg,#38224b,#181425)!important;box-shadow:inset 0 0 19px #9d57d227}
.kharvexTestBoss .bossChoiceIcon{color:#e2a9ff!important;border-color:#ac78ff!important;background:#322042!important}
#questBoardBosses .kharvexTestBoss{border-color:#aa79f0;box-shadow:inset 0 0 20px #8e48c624}
