.probe-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  display: flex; align-items: center; justify-content: center;
  z-index: 400; padding: 1rem;
  backdrop-filter: blur(3px);
}
.probe-modal {
  background: linear-gradient(160deg, #1e1608 0%, #140f06 100%);
  border: 1px solid rgba(200,151,42,0.4);
  border-radius: 12px;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(200,151,42,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex; flex-direction: column;
}

/* ── Zweispalten-Layout für Zauber ───────────────────────────── */
#probe-modal-box.probe-wide {
  width: 80vw;
  max-width: 80vw;
  /* Modal selbst scrollt nicht mehr — die Spalten scrollen unabhängig */
  overflow-y: hidden;
}

#probe-modal-box.probe-wide .probe-header {
  flex-shrink: 0;
}

.probe-body-row {
  display: flex;
  flex: 1;
  min-height: 0;
}

.probe-main-col {
  flex: 0 0 490px;
  min-width: 490px;
  overflow-y: auto;
}

/* Rechte Spalte: Zauber-Template-Informationen */
.probe-zauber-col {
  flex: 1;
  min-width: 280px;
  border-left: 1px solid rgba(200,151,42,0.25);
  background: rgba(0,0,0,0.18);
  overflow-y: auto;
}

.probe-zauber-col-inner {
  padding: 1rem 1.1rem 1.2rem;
}

/* ── Felder-Raster im Zauber-Panel ───────────────────────────── */
.zd-title {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--gold, #c8972a);
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(200,151,42,0.25);
}

.zd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.9rem;
  margin-bottom: 0.4rem;
}

.zd-field { min-width: 0; }
.zd-field-full { grid-column: 1 / -1; }

.zd-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--stone, #9b9085);
  margin-bottom: 0.1rem;
}

.zd-value {
  font-family: 'Crimson Text', serif;
  font-size: 0.88rem;
  color: var(--parchment, #f4ead5);
  line-height: 1.4;
  word-break: break-word;
}

.zd-value code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--gold, #c8972a);
}

/* Abschnitte für längere Texte */
.zd-section {
  border-top: 1px solid rgba(200,151,42,0.15);
  padding-top: 0.6rem;
  margin-top: 0.6rem;
}

.zd-section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--stone, #9b9085);
  margin-bottom: 0.3rem;
}

.zd-section-text {
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: var(--parchment, #f4ead5);
  line-height: 1.55;
}
.probe-header {
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(200,151,42,0.2);
  position: relative;
}
.probe-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,0.06); border: none;
  color: var(--stone-light); font-size: 1.1rem;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.probe-close:hover { background: rgba(255,255,255,0.12); color: white; }
.probe-type-badge { font-family: 'Cinzel', serif; font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--stone-light); margin-bottom: 0.4rem; }
.probe-name { font-family: 'Cinzel', serif; font-size: 1.3rem; font-weight: 600; color: var(--gold); margin-bottom: 0.3rem; }
.probe-meta { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--stone-light); }
.probe-body { padding: 1.2rem 1.5rem; }

.probe-taw-row {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(200,151,42,0.07);
  border: 1px solid rgba(200,151,42,0.2);
  border-radius: 8px; padding: 0.8rem 1rem;
  margin-bottom: 1.2rem;
}
.probe-taw-label { font-family: 'Cinzel', serif; font-size: 0.65rem; color: var(--stone-light); text-transform: uppercase; letter-spacing: 0.1em; flex: 1; }
.probe-taw-value { font-family: 'JetBrains Mono', monospace; font-size: 2rem; font-weight: 600; color: var(--gold); line-height: 1; }
.probe-taw-rest { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--stone-light); text-align: right; }

.probe-eigen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1.2rem; }
.probe-eigen-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 0.7rem 0.6rem;
  text-align: center; position: relative;
}
.probe-eigen-kuerzel { font-family: 'Cinzel', serif; font-size: 0.65rem; color: var(--stone-light); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.2rem; }
.probe-eigen-wert { font-family: 'JetBrains Mono', monospace; font-size: 1.3rem; font-weight: 600; color: #f4ead5; margin-bottom: 0.5rem; line-height: 1; }
.probe-eigen-wert small { font-size: 0.65rem; color: var(--stone-light); font-weight: 400; display: block; }

.probe-wuerfel-input {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(200,151,42,0.3);
  border-radius: 6px;
  padding: 0.4rem 0.3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem; font-weight: 600;
  color: var(--gold); text-align: center;
  transition: all 0.2s;
  -moz-appearance: textfield;
}
.probe-wuerfel-input::-webkit-inner-spin-button,
.probe-wuerfel-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.probe-mod-field {
  text-align: center;
  padding: 0.2rem;
  border: 1px solid var(--bronze);
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--gold);
  -moz-appearance: textfield;
}
.probe-mod-field::-webkit-inner-spin-button,
.probe-mod-field::-webkit-outer-spin-button { -webkit-appearance: none; }
.probe-mod-field:focus { outline: none; border-color: var(--gold); }
.probe-wuerfel-input:focus { outline: none; border-color: var(--gold); background: rgba(200,151,42,0.12); box-shadow: 0 0 0 2px rgba(200,151,42,0.2); }
.probe-wuerfel-input.over   { border-color: #e05050; color: #e05050; background: rgba(220,80,80,0.1); }
.probe-wuerfel-input.under  { border-color: #50c070; color: #50c070; background: rgba(80,192,112,0.1); }
.probe-wuerfel-input.lucky  { border-color: #e8d040; color: #e8d040; background: rgba(232,208,64,0.15); box-shadow: 0 0 10px rgba(232,208,64,0.4); animation: lucky-pulse 0.8s ease-in-out; }
.probe-wuerfel-input.fumble { border-color: #cc3030; color: #cc3030; background: rgba(200,48,48,0.15); box-shadow: 0 0 10px rgba(200,48,48,0.5); animation: fumble-shake 0.5s ease-in-out; }

@keyframes lucky-pulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 rgba(232,208,64,0); }
  50%  { transform: scale(1.08); box-shadow: 0 0 16px rgba(232,208,64,0.6); }
  100% { transform: scale(1); }
}
@keyframes fumble-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-4px); }
  40%     { transform: translateX(4px); }
  60%     { transform: translateX(-3px); }
  80%     { transform: translateX(3px); }
}

.probe-diff-badge {
  position: absolute; top: -6px; right: -6px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
  font-weight: 600; padding: 1px 5px; border-radius: 3px;
  min-width: 20px; text-align: center;
}
.probe-diff-badge.over  { background: #c03030; color: white; }
.probe-diff-badge.under { background: #2a7a40; color: white; }
.probe-diff-badge.exact { background: var(--bronze); color: var(--ink); }

.probe-result {
  border-radius: 10px; padding: 1rem 1.2rem;
  margin-top: 0.8rem; text-align: center;
  transition: all 0.4s; border: 1px solid transparent;
}
.probe-result.success { background: rgba(42,122,64,0.15); border-color: rgba(80,192,112,0.4); }
.probe-result.failure { background: rgba(139,26,26,0.15); border-color: rgba(200,80,80,0.4); }
.probe-result.neutral { background: rgba(200,151,42,0.08); border-color: rgba(200,151,42,0.2); }
.probe-result-label { font-family: 'Cinzel', serif; font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--stone-light); margin-bottom: 0.3rem; }
.probe-result-value { font-family: 'JetBrains Mono', monospace; font-size: 2.2rem; font-weight: 600; line-height: 1; margin-bottom: 0.2rem; }
.probe-result-value.success { color: #50c070; }
.probe-result-value.failure { color: #e05050; }
.probe-result-value.neutral { color: var(--stone-light); }
.probe-result-text { font-family: 'Cinzel', serif; font-size: 0.75rem; color: var(--stone-light); letter-spacing: 0.05em; }

.probe-details { margin-top: 1rem; border-top: 1px solid rgba(200,151,42,0.15); padding-top: 1rem; }
.probe-details-title { font-family: 'Cinzel', serif; font-size: 0.65rem; color: var(--stone); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.probe-details-title:hover { color: var(--stone-light); }
.probe-details-body { font-family: 'Crimson Text', serif; font-size: 0.9rem; color: var(--stone-light); line-height: 1.6; font-style: italic; }
.probe-roll-btn {
  width: 100%; margin-top: 1rem; padding: 0.75rem;
  background: linear-gradient(135deg, rgba(200,151,42,0.2), rgba(200,151,42,0.1));
  border: 1px solid rgba(200,151,42,0.4); border-radius: 8px;
  font-family: 'Cinzel', serif; font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); cursor: pointer; transition: all 0.2s;
}
.probe-roll-btn:hover { background: linear-gradient(135deg, rgba(200,151,42,0.3), rgba(200,151,42,0.15)); border-color: var(--gold); }

@media (max-width: 480px) {
  .probe-eigen-grid { grid-template-columns: repeat(3,1fr); gap: 0.4rem; }
  .probe-wuerfel-input { font-size: 0.95rem; }
}
