@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  /* ── Core palette ── */
  --ink:              #1C1917;
  --paper:            #FEFAE8;
  --paper-alt:        #F9F3D1;
  --card:             #FFFFFF;
  --navy:             #2D3748;
  --navy-hover:       #1A2535;
  --navy-pale:        #EEF0F4;

  /* ── Semantic colors (feedback only, not UI actions) ── */
  --primary:          #52b788;
  --primary-hover:    #3a9d6e;
  --primary-light:    #b7e4c7;
  --primary-pale:     #EBF7F0;
  --danger:           #E05252;
  --danger-pale:      #FEF0F0;
  --muted:            #9C9790;

  /* ── Legacy aliases ── */
  --color-bg:            var(--paper);
  --color-bg-alt:        var(--paper-alt);
  --color-primary:       var(--navy);
  --color-primary-hover: var(--navy-hover);
  --color-primary-light: #CBD2E0;
  --color-primary-pale:  var(--navy-pale);
  --color-secondary:     #74c69d;
  --color-text:          var(--ink);
  --color-text-secondary:#6B6762;
  --color-text-muted:    var(--muted);
  --color-white:         var(--card);
  --color-border:        #E8E4DC;
  --color-danger:        var(--danger);
  --color-success:       var(--primary);

  /* ── Typography ── */
  --font-hand: 'Noto Sans SC', sans-serif;
  --font-cn:   'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;
  --font-en:   Georgia, 'Times New Roman', serif;

  /* ── Spacing ── */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* ── Borders & shadows ── */
  --border-w:      1px;
  --shadow-ink-sm: 0 1px 4px rgba(0,0,0,0.04);
  --shadow-ink:    0 2px 16px rgba(0,0,0,0.06);
  --shadow-ink-lg: 0 4px 32px rgba(0,0,0,0.08);

  /* legacy tokens */
  --shadow-sm: var(--shadow-ink-sm);
  --shadow-md: var(--shadow-ink);
  --shadow-lg: var(--shadow-ink-lg);

  /* ── Border radii ── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* ── Transitions ── */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.2s ease;
  --transition-slow:   0.35s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  color: var(--navy-hover);
}

button, a {
  cursor: pointer;
  font-family: var(--font-body);
  touch-action: manipulation; /* prevent double-tap zoom on mobile */
}

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

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(-6px); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
  0%   { transform: scale(0.9); opacity: 0; }
  60%  { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes wiggle {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
