:root {
  --bg-paper: #fffbf2;
  --bg-cream: #fff5e1;
  --bg-card: #ffffff;
  --bg-muted: #f4efe6;

  --ink-primary: #1e293b;
  --ink-secondary: #334155;
  --ink-muted: #475569;

  --orange: #ff7a2f;
  --orange-deep: #d95b16;
  --orange-soft: #fff0e5;

  --sky: #209cee;
  --sky-deep: #0e74b8;
  --sky-soft: #e6f5ff;

  --mint: #22c55e;
  --mint-deep: #15803d;
  --mint-soft: #e8fbef;

  --berry: #f43f5e;
  --berry-deep: #be123c;
  --berry-soft: #ffe8ed;

  --gold: #f59e0b;
  --gold-soft: #fef6d8;

  --purple: #8b5cf6;
  --purple-soft: #f2ecff;

  /* Phonics 色块 */
  --chunk-c-bg: #e0f2fe;
  --chunk-c-border: #7dd3fc;
  --chunk-c-text: #0369a1;

  --chunk-v-bg: #ffedd5;
  --chunk-v-border: #fdba74;
  --chunk-v-text: #c2410c;

  --chunk-s-bg: #f1f5f9;
  --chunk-s-border: #cbd5e1;
  --chunk-s-text: #64748b;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-card: 0 10px 26px rgba(154, 114, 65, 0.09), 0 2px 6px rgba(154, 114, 65, 0.05);
  --shadow-float: 0 18px 36px rgba(154, 114, 65, 0.14);

  --font-display: ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', ui-sans-serif, system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-primary);
  background-color: var(--bg-paper);
  background-image:
    radial-gradient(#ebd9bd 1.15px, transparent 1.15px),
    radial-gradient(circle at 12% 10%, rgba(255, 198, 125, 0.22), transparent 36%),
    radial-gradient(circle at 88% 85%, rgba(125, 211, 252, 0.2), transparent 38%);
  background-size: 24px 24px, 100% 100%, 100% 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  font-family: inherit;
  font-size: 16px;
}

input {
  user-select: text;
  -webkit-user-select: text;
}

button,
[role="button"],
.paper-answer-card {
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

.word-face {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* 3D 触感积木按钮 */
.btn-tactile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 15px;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.14s ease, filter 0.14s ease;
  user-select: none;
}

.btn-tactile:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn-tactile:active {
  transform: translateY(3px);
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 0 var(--orange-deep);
}

.btn-primary:hover {
  filter: brightness(1.04);
}

.btn-primary:active {
  box-shadow: 0 1px 0 var(--orange-deep);
}

.btn-sky {
  background: var(--sky);
  color: #fff;
  box-shadow: 0 4px 0 var(--sky-deep);
}

.btn-sky:active {
  box-shadow: 0 1px 0 var(--sky-deep);
}

.btn-mint {
  background: var(--mint);
  color: #fff;
  box-shadow: 0 4px 0 var(--mint-deep);
}

.btn-mint:active {
  box-shadow: 0 1px 0 var(--mint-deep);
}

.btn-berry {
  background: var(--berry);
  color: #fff;
  box-shadow: 0 4px 0 var(--berry-deep);
}

.btn-berry:active {
  box-shadow: 0 1px 0 var(--berry-deep);
}

.btn-soft {
  background: #ffffff;
  color: var(--ink-primary);
  border: 2px solid #e6dccb;
  box-shadow: 0 3px 0 #e6dccb;
}

.btn-soft:hover {
  background: var(--bg-cream);
}

.btn-soft:active {
  box-shadow: 0 1px 0 #e6dccb;
}

.btn-sm {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  min-height: 54px;
  padding: 14px 26px;
  font-size: 17px;
  border-radius: 20px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
