@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;700&family=Source+Serif+4:wght@700&display=swap');

html[lang="en"] {
  --font-body: "Source Sans 3", "Noto Sans SC", system-ui, sans-serif;
  --font-display: "Source Serif 4", "Noto Serif SC", serif;
}

html,
body {
  margin: 0;
}

body.md-ui {
  min-height: 100dvh;
}

.md-sheet,
.md-dialog,
.shell-bella-qr {
  box-sizing: border-box;
}

.md-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: calc(var(--space-2) + env(safe-area-inset-top));
}

.shell-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  animation: shell-scrim-enter var(--duration-slow) var(--easing-standard) both;
}

.md-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 41;
  max-height: 90dvh;
  overflow-y: auto;
  padding-bottom: calc(var(--space-5) + env(safe-area-inset-bottom));
  animation: shell-sheet-enter var(--duration-slow) var(--easing-standard) both;
}

.md-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 41;
  width: min(340px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  max-height: 90dvh;
  overflow-y: auto;
}

.md-sheet__handle,
.md-sheet__head {
  touch-action: none;
}

.shell-bella-qr {
  width: 180px;
  height: 180px;
  align-self: center;
  flex: none;
  object-fit: contain;
}

.shell-bella-qr--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: thin dashed var(--border-input);
  border-radius: var(--radius-md);
}

.shell-scrim[hidden],
.md-sheet[hidden],
.md-dialog[hidden] {
  display: none;
}

@keyframes shell-sheet-enter {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes shell-scrim-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (min-width: 700px) {
  .md-sheet {
    right: auto;
    left: 50%;
    width: 100%;
    max-width: 640px;
    transform: translateX(-50%);
  }

  @keyframes shell-sheet-enter {
    from {
      transform: translate(-50%, 100%);
    }

    to {
      transform: translate(-50%, 0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .md-sheet,
  .shell-scrim {
    animation: none;
  }
}

.shell-skeleton {
  display: block;
  background: var(--border-decorative);
  border-radius: var(--radius-md);
  animation: shell-skeleton-pulse calc(var(--duration-slow) * 4) var(--easing-standard) infinite;
}

.shell-dayhead {
  margin: var(--space-4) 0 var(--space-2);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

@keyframes shell-skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .shell-skeleton {
    animation: none;
  }
}
