#spell-presentation {
  box-sizing:border-box; position:fixed; inset:0; margin:auto; width:min(820px,calc(100vw - 32px));
  max-height:calc(100dvh - 24px); padding:clamp(14px,2.5dvh,28px);
  border:1px solid var(--ui-border); border-radius:16px; background:var(--ui-solid);
  color:var(--ui-text); font:14px/1.45 var(--ui-font); box-shadow:0 16px 70px #0008;
  overflow:clip;
}
#spell-presentation[open] { display:grid; grid-template-columns:minmax(0, min(28%,29dvh)) minmax(0,1fr); align-items:center; gap:clamp(14px,2vw,28px); }
#spell-presentation::backdrop { background:#08090bc4; }
#spell-presentation .presented-art .card-art-frame { width:100%; height:auto; aspect-ratio:11/15; border-radius:10px; }
#spell-presentation .presented-art img { transform:none; }
#spell-presentation h2 { margin:0; font:600 clamp(20px,3dvh,30px)/1.15 var(--ui-font); }
#spell-presentation p { margin:.5em 0; }
#spell-presentation .presented-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(132px,100%),1fr)); align-content:start; gap:6px; }
#spell-presentation .presented-options > :is(p,strong,label,div) { grid-column:1/-1; margin:0; }
#spell-presentation .presented-options > button, #spell-presentation .presented-controls button, #return-spell {
  min-width:0; min-height:32px; padding:5px 9px; border:1px solid var(--ui-border); border-radius:7px;
  background:var(--ui-button); color:var(--ui-text); font:inherit; line-height:1.25; overflow-wrap:anywhere;
}
#spell-presentation .presented-options button { display:flex; align-items:center; justify-content:center; gap:5px; }
#spell-presentation button[aria-pressed=true] { outline:1px solid var(--ui-focus); }
#spell-presentation button:disabled { opacity:.55; }
#spell-presentation .presented-options .card-art-frame { width:clamp(27px,5.8dvh,46px); height:auto; flex:none; }
#spell-presentation .presented-options img { max-width:48px; max-height:65px; object-fit:contain; }
#spell-presentation .presented-options .card-art-frame img { max-width:100%; max-height:100%; }
#spell-presentation .presented-options label { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
#spell-presentation input, #spell-presentation select { max-width:100%; }
#spell-presentation .presented-controls { display:flex; align-items:center; gap:8px; margin-top:8px; }
#spell-presentation .presented-controls:has(:only-child), #spell-presentation .presented-controls:not(:has(button:not([hidden]))) { display:none; }
#spell-presentation [hidden][hidden], #return-spell[hidden] { display:none; }
#spell-presentation[data-phase=reveal] .presented-art { animation:spell-appearance .55s ease-out both; }
@keyframes spell-appearance { from { opacity:.15; transform:translateY(7px) scale(.96); } to { opacity:1; transform:none; } }
@media(prefers-reduced-motion:reduce){ #spell-presentation[data-phase=reveal] .presented-art { animation:none; } }
#return-spell { position:fixed; z-index:201; bottom:16px; left:50%; transform:translateX(-50%); background:var(--ui-solid); }
body:has(#spell-presentation[open]) :is(.death-search,.ability-choice-panel,#online-choices) { visibility:hidden; }
body:has(#spell-presentation[open]) .death-search::backdrop { background:transparent; backdrop-filter:none; }
