:root {
  --bg: #5d5d85;
  --button: #5eb4ff;
  --button-text: #25224f;
  --card-width: min(100%, 390px, calc((100dvh - 104px) * 0.7204));
  color-scheme: dark;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
}

.page {
  display: grid;
  min-height: 100dvh;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 18px;
  perspective: 1100px;
}

.biocard {
  position: relative;
  width: var(--card-width);
  aspect-ratio: 791 / 1098;
  border-radius: 2px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transform:
    rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg))
    rotateZ(var(--rz, 0deg));
  transform-style: preserve-3d;
  transition: transform 180ms ease, filter 180ms ease;
}

.biocard.is-dragging {
  cursor: grabbing;
  filter: brightness(1.02);
  transition: none;
}

.card-face {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.38);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

body.is-card-dragging,
body.is-card-dragging * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--card-width);
  min-height: 50px;
  border-radius: 4px;
  color: var(--button-text);
  background: var(--button);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}
