:root {
  --bk-sheet-max-h: min(90dvh, 820px);
  --bk-sheet-radius: 38px;
  --bk-sheet-blur: 38px;
  --bk-sheet-overlay-bg: rgba(0, 0, 0, 0.40);
  --bk-sheet-bg: rgba(245, 245, 247, 0.85);
  --bk-sheet-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  --bk-sheet-border: 1px solid rgba(255, 255, 255, 0.4);
  --bk-sheet-safe-bottom: env(safe-area-inset-bottom, 0px);

  --bk-z-sheet-overlay: 9200;
  --bk-z-sheet: 9300;
}

.bk-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--bk-z-sheet-overlay);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: var(--bk-sheet-overlay-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}

.bk-sheet-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bk-sheet-modal {
  position: relative;
  z-index: var(--bk-z-sheet);
  width: min(100%, 500px);
  max-width: 500px;
  max-height: var(--bk-sheet-max-h);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding-bottom: calc(20px + var(--bk-sheet-safe-bottom));
  border-top-left-radius: var(--bk-sheet-radius);
  border-top-right-radius: var(--bk-sheet-radius);
  background: var(--bk-sheet-bg);
  border-top: var(--bk-sheet-border);
  box-shadow: var(--bk-sheet-shadow);
  backdrop-filter: blur(var(--bk-sheet-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--bk-sheet-blur)) saturate(180%);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.bk-sheet-overlay.is-visible .bk-sheet-modal {
  transform: translateY(0);
}

.bk-sheet-header {
  flex: 0 0 auto;
  padding: 20px 0 10px;
  text-align: center;
  cursor: grab;
  touch-action: none;
}

.bk-sheet-handle {
  width: 40px;
  height: 5px;
  margin: 0 auto 15px;
  border-radius: 999px;
  background: rgba(60, 60, 67, 0.3);
}

.bk-sheet-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: #000;
}

.bk-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 24px 40px;
}

body.bk-sheet-open {
  overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  .bk-sheet-overlay,
  .bk-sheet-modal {
    transition: none !important;
  }
}
