.exporter-sheet-trigger {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.exporter-sheet-trigger:active {
  transform: scale(0.97);
}

.exporter-sheet-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.exporter-sheet-trigger[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow);
}

.exporter-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  align-items: end;
  justify-items: center;
  visibility: hidden;
  pointer-events: none;
}

.exporter-sheet-overlay.is-open {
  visibility: visible;
  pointer-events: auto;
}

.exporter-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(2, 8, 18, 0.7);
  opacity: 0;
  transition: opacity 180ms ease;
  backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: transparent;
}

.exporter-sheet-overlay.is-open .exporter-sheet-backdrop {
  opacity: 1;
}

.exporter-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  max-height: min(72dvh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
  background: rgba(10, 18, 33, 0.98);
  box-shadow: 0 -22px 60px rgba(0, 0, 0, 0.42);
  transform: translateY(105%);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  touch-action: pan-y;
  will-change: transform;
}

.exporter-sheet-overlay.is-open .exporter-sheet-panel {
  transform: translateY(0);
}

.exporter-sheet-panel.is-dragging {
  transition: none;
  user-select: none;
}

.exporter-sheet-handle-zone {
  position: relative;
  display: grid;
  place-items: center;
  width: min(180px, 48vw);
  height: 4px;
  min-height: 4px;
  margin: 0 auto 12px;
  cursor: grab;
  touch-action: none;
}

.exporter-sheet-handle-zone::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(180px, 48vw);
  height: 32px;
  transform: translate(-50%, -50%);
}

.exporter-sheet-handle-zone:active {
  cursor: grabbing;
}

.exporter-sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.46);
}

.exporter-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.exporter-sheet-heading {
  min-width: 0;
}

.exporter-sheet-heading .eyebrow {
  margin: 0 0 4px;
  color: var(--muted, #96a4ba);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.exporter-sheet-heading h2 {
  margin: 0;
}

.exporter-sheet-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0;
  color: var(--text);
  background: var(--panel-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.exporter-sheet-close svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exporter-sheet-close:active {
  transform: scale(0.96);
}

.exporter-sheet-close:focus-visible,
.exporter-sheet-action:focus-visible {
  outline: 2px solid var(--accent, #57d1a1);
  outline-offset: 2px;
}

.exporter-sheet-actions {
  display: grid;
  gap: 10px;
}

.exporter-sheet-action {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 12px;
  color: inherit;
  background: rgba(17, 28, 48, 0.72);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.exporter-sheet-action-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--accent, #57d1a1);
  background: rgba(87, 209, 161, 0.1);
}

.exporter-sheet-action-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exporter-sheet-action-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.exporter-sheet-action-copy strong {
  font-size: 0.98rem;
}

.exporter-sheet-action-copy small {
  color: var(--muted, #96a4ba);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.3;
}

.exporter-sheet-action-arrow {
  color: var(--muted, #96a4ba);
  font-size: 1.55rem;
  line-height: 1;
}

@media (hover: hover) {
  .exporter-sheet-action:hover {
    border-color: rgba(87, 209, 161, 0.48);
    background: rgba(87, 209, 161, 0.1);
  }
}

.exporter-sheet-action:active {
  transform: scale(0.985);
  border-color: rgba(87, 209, 161, 0.48);
  background: rgba(87, 209, 161, 0.1);
}

.exporter-sheet-note {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted, #96a4ba);
  font-size: 0.78rem;
  line-height: 1.35;
}

.exporter-sheet-note:empty {
  display: none;
}

.exporter-sheet-target-highlight {
  animation: exporter-sheet-target-pulse 1.8s ease-out;
  scroll-margin-top: 14px;
}

@keyframes exporter-sheet-target-pulse {
  0%,
  34% {
    outline: 2px solid color-mix(in srgb, var(--accent) 85%, white 15%);
    outline-offset: 4px;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent), var(--shadow);
  }

  100% {
    outline-color: transparent;
    box-shadow: var(--shadow);
  }
}

body.exporter-sheet-lock {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 520px) {
  .exporter-sheet-panel {
    padding-inline: 12px;
  }

  .exporter-sheet-action {
    min-height: 68px;
    padding: 10px;
  }

  .exporter-sheet-action-icon {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .exporter-sheet-trigger,
  .exporter-sheet-backdrop,
  .exporter-sheet-panel,
  .exporter-sheet-action {
    transition: none;
  }

  .exporter-sheet-target-highlight {
    animation: none;
    outline: 2px solid var(--accent);
    outline-offset: 4px;
  }
}
