.ihk-exam-calc-launcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin: 0 0 1.35rem;
}

.ihk-exam-calc-open-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.ihk-exam-calc-open-link:hover {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
}

.ihk-exam-calc-open-icon {
  font-size: 1rem;
  line-height: 1;
}

.ihk-exam-calc-launcher-hint {
  font-size: 0.88rem;
  color: #64748b;
}

.ihk-exam-calc-modal[hidden] {
  display: none !important;
}

.ihk-exam-calc-modal {
  position: fixed;
  inset: 0;
  z-index: 8500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ihk-exam-calc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.ihk-exam-calc-modal-panel {
  position: relative;
  width: 100%;
  max-width: 56rem;
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
}

.ihk-exam-calc-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ihk-exam-calc-modal-close:hover {
  background: #e2e8f0;
}

body.ihk-exam-calc-modal-open {
  overflow: hidden;
}

.ihk-exam-calc {
  margin: 0;
  padding: 1.35rem 1.5rem 1.25rem;
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: none;
}

.ihk-exam-calc-header {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-right: 1.75rem;
}

.ihk-exam-calc-title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
}

.ihk-exam-calc-subtitle {
  margin: 0;
  font-size: 0.92rem;
  color: #64748b;
}

.ihk-exam-calc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 1.25rem;
}

.ihk-exam-calc-col {
  min-width: 0;
  padding: 0 0.5rem;
  border-right: 1px solid #e2e8f0;
}

.ihk-exam-calc-col:last-child {
  border-right: none;
}

.ihk-exam-calc-col-title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.ihk-exam-calc-field {
  margin-bottom: 0.85rem;
}

.ihk-exam-calc-field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #334155;
}

.ihk-exam-calc-input-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ihk-exam-calc-input,
.ihk-exam-calc-mep {
  width: 100%;
  max-width: 4.5rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.95rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
}

.ihk-exam-calc-mep {
  max-width: 3.5rem;
  font-size: 0.78rem;
  color: #475569;
  border-style: dashed;
}

.ihk-exam-calc-input:focus,
.ihk-exam-calc-mep:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
  border-color: #60a5fa;
}

.ihk-exam-calc-unit {
  font-size: 0.85rem;
  color: #64748b;
  flex-shrink: 0;
}

.ihk-exam-calc-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0 0.95rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ihk-exam-calc-divider::before,
.ihk-exam-calc-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.ihk-exam-calc-result-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.ihk-exam-calc-badge {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  border: none;
}

.ihk-exam-calc-badge-neutral {
  background: #f1f5f9;
  color: #475569;
}

.ihk-exam-calc-badge-pass {
  background: #dbeafe;
  color: #1e40af;
}

.ihk-exam-calc-badge-fail {
  background: #fee2e2;
  color: #991b1b;
}

.ihk-exam-calc-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
}

.ihk-exam-calc-btn:hover {
  background: #f8fafc;
}

.ihk-exam-calc-btn-icon {
  padding: 0.45rem 0.65rem;
  font-size: 1rem;
  line-height: 1;
}

.ihk-exam-calc-explain {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #475569;
}

.ihk-exam-calc-explain p {
  margin: 0 0 0.65rem;
}

.ihk-exam-calc-weights,
.ihk-exam-calc-rules {
  margin: 0 0 0.65rem;
  padding-left: 1.2rem;
}

.ihk-exam-calc-source {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
}

@media (max-width: 860px) {
  .ihk-exam-calc-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ihk-exam-calc-col {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.85rem;
  }

  .ihk-exam-calc-col:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .ihk-exam-calc-launcher-hint {
    flex-basis: 100%;
  }
}
