.resolve-stage { position: relative; height: 100%; min-height: 0; }
.resolve-view {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
  padding: 18px;
}
.resolve-view h2 { margin: 0; font: 800 24px/1.2 var(--display); }
.resolve-view p { margin: 0; font: 13px/1.5 var(--body); }
.resolve-view .resolve-help { color: var(--muted); font-size: 12px; }
.resolve-intent-form {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr);
  gap: 14px;
  min-height: 0;
  flex: 1;
}
.resolve-prompt-fields { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.resolve-prompt-fields label { font: 700 16px var(--display); }
.resolve-prompt-fields textarea {
  width: 100%;
  min-height: 100px;
  flex: 1;
  resize: none;
  padding: 12px;
  font: 14px/1.5 var(--body);
}
.resolve-targets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 0; }
.resolve-target {
  min-width: 0;
  min-height: 145px;
  overflow: auto;
  padding: 12px;
  border: 2px dashed #82afb1;
  border-radius: 12px;
  background: #102b3977;
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
}
.resolve-target[data-selected=true] { border-color: #b1ddc5; background: #25464c88; }
.resolve-target[aria-disabled=true] { border-color: #607a87; background: #0e203166; }
.resolve-target.drag-over { border-color: #b1ead2; background: #2c575d99; box-shadow: 0 0 0 3px #a7e3ca66; }
.resolve-target-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.resolve-target-heading img { width: 42px; height: 42px; flex: none; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.resolve-target-heading strong { font: 700 18px var(--display); }
.resolve-target-heading small { display: block; margin-top: 3px; color: var(--muted); font: 10px var(--body); }
.resolve-target-cards { display: grid; gap: 9px; }
.resolve-target .prep-card { grid-template-columns: minmax(0, 1fr) 86px; min-height: 86px; }
.resolve-target .prep-card > img { width: 86px; height: 86px; }
.resolve-target .prep-card-copy { padding: 9px; }
.resolve-target .prep-card h3 { font-size: 14px; }
.resolve-target .prep-card p { font-size: 10px; }
.resolve-card-actions { display: flex; grid-column: 1/-1; background: #0c1d2faa; }
.game-shell .resolve-card-actions button { flex: 1; min-height: 29px; padding: 6px; font-size: 10px; border-radius: 0; }
.resolve-feedback { color: #bdd8ce; font: 11px/1.4 var(--body); }
.resolve-fixed-actions { display: flex; align-items: center; gap: 8px; }
.resolve-fixed-actions button { white-space: nowrap; }
.resolve-calculation-layout { display: grid; grid-template-columns: minmax(250px, .9fr) minmax(0, 1.2fr); gap: 16px; min-height: 0; flex: 1; }
.resolve-calculation { min-height: 0; overflow: auto; scrollbar-width: thin; }
.resolve-calculation h3 { margin: 12px 0 6px; font: 700 16px var(--display); }
.resolve-calculation dl { margin: 6px 0; }
.resolve-calculation dl > div { align-items: baseline; gap: 12px; padding: 6px 0; }
.resolve-calculation dt { min-width: 0; overflow-wrap: anywhere; }
.resolve-calculation dt small { color: var(--muted); font: 10px/1.4 var(--body); }
.resolve-calculation dd { flex: none; white-space: nowrap; }
.resolve-calculation .resolve-ignored { color: var(--muted); }
.resolve-calculation .resolve-benefit { color: #b3dec4; }
.resolve-calculation .resolve-hindrance { color: #e9adb2; }
.resolve-dice-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow: auto; scrollbar-width: thin; }
.resolve-dice-definitions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; flex: none; }
.resolve-die-definition { min-width: 0; padding: 10px; border: 1px solid #82a0aa77; border-radius: 10px; background: #102237aa; }
.resolve-die-header { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; }
.resolve-die-art { width: 42px; height: 42px; aspect-ratio: 1; object-fit: cover; flex: none; border-radius: 6px; }
.resolve-die-definition strong { display: block; margin-bottom: 6px; font: 700 18px var(--display); }
.resolve-die-header strong { margin-bottom: 0; }
.resolve-die-definition[data-slot=dawn] strong { color: #f2d388; }
.resolve-die-definition[data-slot=dusk] strong { color: #a8c9ec; }
.resolve-die-faces { display: flex; flex-wrap: wrap; gap: 4px; }
.resolve-die-faces span { min-width: 19px; padding: 3px; border-radius: 4px; text-align: center; background: #284158; font: 10px var(--mono); }
.resolve-roll-result { flex: none; padding: 14px; border: 1px solid #91bdaa; border-radius: 12px; background: #15372bc9; }
.resolve-roll-result[data-success=false] { border-color: #c88089; background: #3a202cc9; }
.resolve-roll-result h3 { margin: 0 0 7px; font: 800 25px var(--display); }
.resolve-roll-result .resolve-comparison { font: 700 22px var(--display); margin-bottom: 8px; }
.resolve-roll-result .resolve-dominance { margin: 8px 0; }
.resolve-followup { padding-top: 9px; border-top: 1px solid #a4b4ab55; color: #ced3c9; font-size: 11px!important; }
.resolve-locked { flex: none; max-height: 105px; overflow: auto; font: 12px/1.5 var(--body); }
.resolve-locked summary { cursor: pointer; color: var(--muted); }
.resolve-calculation .resolve-locked { margin-bottom: 10px; }
.resolve-roll-overlay { position: absolute; inset: 0; z-index: 5; overflow: hidden; border-radius: 12px; background: #0d2429; }
.resolve-roll-overlay .dice-tray { width: 100%; height: 100%; min-height: 0; margin: 0; }
.resolve-roll-overlay .resolve-roll-label { position: absolute; z-index: 3; top: 12px; left: 16px; color: #dce8d6; font: 700 19px var(--display); text-shadow: 0 2px 6px #000; pointer-events: none; }
.resolve-waiting { flex: 1; display: grid; align-content: center; justify-items: center; gap: 12px; text-align: center; padding: 20px; }
.resolve-waiting .waiting-sigil { animation: resolve-wait-pulse 2.5s ease-in-out infinite; }
@keyframes resolve-wait-pulse { 50% { opacity: .45; transform: translateY(-3px); } }
@media (max-height: 800px) {
  .resolve-view { gap: 8px; padding: 12px; }
  .resolve-view h2 { font-size: 21px; }
  .resolve-view .resolve-help { font-size: 10px; }
  .resolve-intent-form { gap: 10px; }
  .resolve-prompt-fields { gap: 5px; }
  .resolve-prompt-fields label { font-size: 14px; }
  .resolve-prompt-fields textarea { min-height: 76px; padding: 8px; font-size: 12px; }
  .resolve-target { padding: 9px; min-height: 105px; }
  .resolve-target-heading { gap: 6px; margin-bottom: 9px; }
  .resolve-target-heading img { width: 32px; height: 32px; }
  .resolve-target-heading strong { font-size: 16px; }
  .resolve-calculation-layout { gap: 10px; grid-template-columns: minmax(220px, .9fr) minmax(0, 1.2fr); }
  .resolve-calculation { padding: 11px; }
  .resolve-calculation dl > div { padding: 4px 0; font-size: 12px; }
  .resolve-calculation h3 { font-size: 14px; margin-top: 9px; }
  .resolve-dice-panel { gap: 8px; }
  .resolve-die-definition { padding: 7px; }
  .resolve-die-definition strong { font-size: 15px; }
  .resolve-roll-result { padding: 10px; }
  .resolve-roll-result h3 { font-size: 20px; }
  .resolve-roll-result .resolve-comparison { font-size: 18px; }
  .resolve-fixed-actions button { min-height: 32px; font-size: 11px; padding: 6px 9px; }
}
@media (max-width: 1100px) {
  .resolve-view { height: auto; min-height: 100%; }
  .resolve-intent-form, .resolve-calculation-layout { grid-template-columns: minmax(0, 1fr); }
  .resolve-prompt-fields textarea { min-height: 105px; }
  .resolve-target { max-height: 260px; }
  .resolve-calculation, .resolve-dice-panel { overflow: visible; }
}
/* Calculation and results use the whole fixed stage; only their own columns scroll. */
.resolve-view:is([data-stage=calculation], [data-stage=result]) { height: 100%; min-height: 0; overflow: hidden; }
.resolve-view:is([data-stage=calculation], [data-stage=result]) .resolve-calculation-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); }
.resolve-view:is([data-stage=calculation], [data-stage=result]) :is(.resolve-calculation, .resolve-dice-panel) { overflow: auto; }
@media (prefers-reduced-motion: reduce) { .resolve-waiting .waiting-sigil { animation: none; } }
