*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    repeating-linear-gradient(135deg, rgba(243, 189, 202, 0.52) 0 72px, rgba(189, 232, 207, 0.52) 72px 144px, rgba(200, 188, 229, 0.52) 144px 216px, rgba(255, 247, 199, 0.54) 216px 288px),
    linear-gradient(160deg, #fff6df 0%, #f8dce5 42%, #dff4ea 100%);
  color: var(--text-primary);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  overscroll-behavior: none;
}

#app {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100dvh;
  position: relative;
  background: rgba(255, 250, 240, 0.88);
  box-shadow: 0 0 42px rgba(111, 73, 93, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.screen {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  animation: fadeIn 0.3s var(--ease-smooth);
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s var(--ease-bounce), box-shadow 0.15s, border-color 0.15s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.96);
}

.btn.is-touching {
  transform: scale(0.94);
}

.btn-primary {
  background: linear-gradient(135deg, var(--sakura-pink), var(--accent) 48%, #ff8fab);
  color: #fffaf5;
  box-shadow: 0 4px 16px var(--accent-glow), 0 0 18px rgba(255, 215, 107, 0.18);
}

.btn-secondary {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.95), rgba(243, 227, 198, 0.92));
  color: var(--paper-ink);
  border: 2px solid rgba(154, 100, 61, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-icon {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(243, 227, 198, 0.12);
  color: var(--text-primary);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--ease-bounce);
  touch-action: manipulation;
}

.btn-icon:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.2);
}

.btn-icon.is-touching {
  transform: scale(0.88);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(243, 227, 198, 0.14);
  border: 1px solid rgba(243, 227, 198, 0.12);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-glow), var(--violet-spark) 48%, var(--golden-aura));
  border-radius: 4px;
  transition: width 0.2s var(--ease-smooth);
  width: 0%;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
