.bpmcalc-shell {
  background: #f8f6f6;
  padding: 72px 18px;
  font-family: inherit;
  color: #111827;
}

.bpmcalc-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.bpmcalc-head {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.bpmcalc-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 12px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.18);
  color: #6d28d9;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.bpmcalc-title {
  margin: 0;
  color: #111827;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.bpmcalc-intro {
  margin: 16px auto 0;
  color: #4b5563;
  font-size: 17px;
  line-height: 1.72;
}

.bpmcalc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 0.97fr);
  gap: 18px;
  align-items: stretch;
}

.bpmcalc-panel,
.bpmcalc-table-panel {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.bpmcalc-panel-head,
.bpmcalc-table-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.bpmcalc-label {
  margin: 0 0 5px;
  color: #111827;
  font-size: 17px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.bpmcalc-muted,
.bpmcalc-help {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.bpmcalc-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.14);
  font-size: 12px;
  font-weight: 900;
}

.bpmcalc-pill.is-stable {
  background: #ecfdf5;
  color: #047857;
  border-color: rgba(16, 185, 129, 0.22);
}

.bpmcalc-pill.is-warning {
  background: #fff7ed;
  color: #c2410c;
  border-color: rgba(249, 115, 22, 0.22);
}

.bpmcalc-tap-button {
  width: 100%;
  min-height: 168px;
  border: 0;
  border-radius: 28px;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.25), transparent 34%), #7c3aed;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(124, 58, 237, 0.24);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  touch-action: manipulation;
}

.bpmcalc-tap-button:hover,
.bpmcalc-tap-button:focus {
  background: #6d28d9;
  box-shadow: 0 22px 50px rgba(124, 58, 237, 0.3);
}

.bpmcalc-tap-button:active,
.bpmcalc-tap-button.is-active {
  transform: scale(0.985);
}

.bpmcalc-tap-button span {
  display: block;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.06em;
}

.bpmcalc-tap-button small {
  display: block;
  margin-top: 10px;
  color: #ddd6fe;
  font-size: 14px;
  font-weight: 850;
}

.bpmcalc-help {
  margin-top: 12px;
  text-align: center;
}

.bpmcalc-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
  background: #111827;
  color: #ffffff;
}

.bpmcalc-result-label {
  display: block;
  margin-bottom: 6px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bpmcalc-bpm {
  display: block;
  color: #ffffff;
  font-size: 52px;
  line-height: 0.95;
  letter-spacing: -0.065em;
  font-weight: 950;
}

.bpmcalc-tap-count {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.bpmcalc-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.bpmcalc-mini {
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.bpmcalc-mini span {
  display: block;
  margin-bottom: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bpmcalc-mini strong {
  display: block;
  color: #111827;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.bpmcalc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.bpmcalc-primary,
.bpmcalc-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 15px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.bpmcalc-primary {
  border: 0;
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.21);
}

.bpmcalc-primary:hover,
.bpmcalc-primary:focus {
  background: #6d28d9;
  transform: translateY(-1px);
}

.bpmcalc-secondary {
  border: 1px solid rgba(124, 58, 237, 0.18);
  background: #f5f3ff;
  color: #5b21b6;
}

.bpmcalc-secondary:hover,
.bpmcalc-secondary:focus {
  background: #ede9fe;
  transform: translateY(-1px);
}

.bpmcalc-danger {
  border-color: rgba(239, 68, 68, 0.18);
  background: #fef2f2;
  color: #b91c1c;
}

.bpmcalc-primary:focus-visible,
.bpmcalc-secondary:focus-visible,
.bpmcalc-tap-button:focus-visible,
.bpmcalc-field input:focus-visible,
.bpmcalc-field select:focus-visible,
.bpmcalc-related a:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.24);
  outline-offset: 3px;
}

.bpmcalc-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bpmcalc-form .bpmcalc-primary {
  grid-column: 1 / -1;
}

.bpmcalc-field {
  display: grid;
  gap: 7px;
}

.bpmcalc-field span {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.bpmcalc-field input,
.bpmcalc-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  padding: 10px 12px;
}

.bpmcalc-output-box {
  margin-top: 14px;
  padding: 21px;
  border-radius: 22px;
  background: #111827;
  color: #ffffff;
}

.bpmcalc-output-box span {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bpmcalc-output-box strong {
  display: block;
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -0.055em;
  font-weight: 950;
}

.bpmcalc-output-box small {
  display: block;
  margin-top: 9px;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.5;
}

.bpmcalc-table-panel {
  margin-top: 18px;
}

.bpmcalc-table-scroll {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.bpmcalc-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #ffffff;
}

.bpmcalc-table th,
.bpmcalc-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  color: #374151;
  font-size: 14.5px;
  line-height: 1.45;
}

.bpmcalc-table th {
  background: #f5f3ff;
  color: #4c1d95;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.bpmcalc-table tr:last-child td {
  border-bottom: 0;
}

.bpmcalc-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-top: 18px;
}

.bpmcalc-privacy,
.bpmcalc-related {
  padding: 20px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
}

.bpmcalc-privacy strong {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}

.bpmcalc-privacy p {
  margin: 0;
  color: #4b5563;
  font-size: 14.5px;
  line-height: 1.65;
}

.bpmcalc-related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.bpmcalc-related a {
  display: inline-flex;
  padding: 9px 11px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.14);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.bpmcalc-related a:hover,
.bpmcalc-related a:focus {
  background: #ede9fe;
  color: #5b21b6;
  text-decoration: none;
}

.bpmcalc-live-message {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: #4b5563;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 900px) {
  .bpmcalc-shell {
    padding: 54px 14px;
  }

  .bpmcalc-grid,
  .bpmcalc-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .bpmcalc-head {
    text-align: left;
  }

  .bpmcalc-panel,
  .bpmcalc-table-panel,
  .bpmcalc-privacy,
  .bpmcalc-related {
    border-radius: 22px;
    padding: 18px;
  }

  .bpmcalc-panel-head,
  .bpmcalc-table-head,
  .bpmcalc-result-card {
    align-items: stretch;
    flex-direction: column;
  }

  .bpmcalc-form,
  .bpmcalc-mini-grid {
    grid-template-columns: 1fr;
  }

  .bpmcalc-actions {
    flex-direction: column;
  }

  .bpmcalc-primary,
  .bpmcalc-secondary {
    width: 100%;
  }

  .bpmcalc-bpm {
    font-size: 44px;
  }

  .bpmcalc-output-box strong {
    font-size: 34px;
  }
}
