.tariff-details {
  width: min(500px, calc(100% - 24px));
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  margin: auto;
  padding: clamp(20px, 5vw, 30px);
  overflow-y: auto;
  box-sizing: border-box;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 20px 64px #0005;
  font: 500 15px/1.5 var(--font-ui);
  scrollbar-color: var(--muted) var(--card);
}
.tariff-details::backdrop { background: #080a097a; }
.tariff-details [hidden] { display: none !important; }
.tariff-details::selection { color: var(--on-primary); background: var(--primary); }
.tariff-details-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.tariff-details-header h2 { margin: 0; font-size: clamp(22px, 5vw, 28px); line-height: 1.2; font-weight: 650; letter-spacing: -.025em; }
.tariff-details button { min-height: 44px; font: 650 14px/1.3 var(--font-ui); color: var(--ink); background: var(--surface-2); border: 0; border-radius: var(--control-radius, 6px); padding: 10px 12px; }
.tariff-details button:hover { background: var(--surface-3); }
.tariff-details button:active { transform: translateY(1px); }
.tariff-details button:focus-visible,
#booking-tariffs:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tariff-details .tariff-details-close { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; min-width: 44px; padding: 0; border-radius: 50%; }
.tariff-details-close svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tariff-catalogue { border-collapse: collapse; width: 100%; table-layout: fixed; }
.tariff-catalogue caption { text-align: start; color: var(--muted); font-size: 14px; padding-bottom: 12px; }
.tariff-catalogue :is(th, td) { text-align: end; padding: 10px 0 10px 8px; font-weight: 520; font-variant-numeric: tabular-nums; }
.tariff-catalogue th:first-child { width: 45%; text-align: start; padding-left: 0; }
.tariff-catalogue thead th { font-size: 13px; font-weight: 650; color: var(--muted); border-bottom: 1px solid var(--line); }
.tariff-catalogue tbody tr + tr { border-top: 1px solid var(--line); }
.tariff-catalogue tbody th { color: var(--ink); font-size: 14px; }
.tariff-catalogue tbody td { white-space: nowrap; }
.tariff-catalogue tbody tr:first-child td { padding-block: 16px; font-weight: 660; font-size: clamp(19px,5.6vw,25px); letter-spacing: -.04em; }
.tariff-booking-fee { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 10px 0 0; padding-top: 15px; border-top: 1px solid var(--line); }
.tariff-booking-fee dt { font-size: 14px; }
.tariff-booking-fee dd { margin: 0; white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; }
.tariff-meter-note { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
#booking-tariffs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 8px 4px;
  color: var(--booking-muted, var(--muted));
  background: none;
  border: 0;
  font: 600 13px/1.4 var(--font-ui);
  text-decoration:none;
}
#booking-tariffs:hover { color: var(--ink); }
#booking-tariffs[hidden] { display: none; }
@media (max-width: 380px) {
  .tariff-details-header { align-items: start; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tariff-details, .tariff-details button { animation: none; transition: none; }
  .tariff-details button:active { transform: none; }
}
