* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  font-family: -apple-system, system-ui;
  overflow: hidden;
}

/* App */
.app {
  height: 100svh;
}

/* Card */
.card {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Video */
video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Swipe layer */
.swipe-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  touch-action: pan-y;
}

/* Progress */
.progress {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 10;
}

.progress-track {
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 6px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: #00d1ff;
}

.progress-text {
  margin-top: 6px;
  text-align: center;
  color: #fff;
  font-size: 13px;
}

/* Content */
.content {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 22px 20px 96px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
  text-align: center;
}

.card-id {
  font-size: 12px;
  opacity: 0.7;
  text-align: right;
}

.spanish {
  font-size: 2.4rem;
  font-weight: 700;
}

.divider {
  width: 48px;
  height: 4px;
  background: rgba(255,255,255,0.6);
  margin: 14px auto;
}

/* Chinese */
.chinese-row {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.char-block {
  display: flex;
}

.char {
  font-size: 3.2rem;
  font-weight: 600;
}

.zhuyin {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 1.4rem;
  margin-left: 6px;
}

/* Audio button — bottom center */
.audio {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(0,122,255,0.95);
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-size: 1.8rem;
  color: #fff;
}

/* home button center */

.floating-btn {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: gray;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: all 0.2s ease;
  z-index: 1000;
}

.floating-btn:hover {
  transform: scale(1.08);
  background: #000;
}

.home-btn {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* Tablet+ */
@media (min-width: 768px) {
  .char { font-size: 4rem; }
  .zhuyin { font-size: 1.8rem; }
}