:root {
  color-scheme: light;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --bg: #fff8e6;
  --card: #fffdf7;
  --accent: #2e8b57;
  --accent-dark: #216b43;
  --text: #2f2a24;
  --muted: #7b6f63;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #fff1c8 0%, var(--bg) 100%);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.app {
  width: min(980px, 100%);
  display: grid;
  gap: 24px;
}

.top-bar {
  text-align: center;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.letter-title {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3rem);
  color: #2d1b0e;
}

.main-card {
  background: var(--card);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(64, 41, 10, 0.16);
  display: grid;
  gap: 20px;
}

.letter-canvas {
  position: relative;
  min-height: 330px;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff8e5, #ffeab3);
  border: 3px solid #f6d07b;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.letters-container {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.letter-display,
.lower-letter {
  font-size: clamp(5rem, 12vw, 8rem);
  font-weight: 700;
  color: #3b2a16;
  text-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  user-select: none;
}

.letter-display.vowel,
.lower-letter.vowel {
  color: #d32f2f;
}

.letter-display {
  font-size: clamp(9rem, 20vw, 14rem);
}

.lower-letter {
  font-size: clamp(8rem, 18vw, 12rem);
  opacity: 0.95;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  background: #fff;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(63, 42, 12, 0.11);
}

.nav-btn:hover {
  transform: translateY(-2px);
}

.word-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.word-card {
  background: var(--card);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(64, 41, 10, 0.12);
  display: grid;
  gap: 12px;
}

.emoji {
  font-size: 2rem;
  text-align: center;
}

.word-boxes {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.word-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  border: 2px solid #f1d58f;
  background: #fff9ea;
  color: #4b3a24;
}

.word-box.target {
  background: #ffe28f;
  border-color: #f0b83a;
  color: #6f3a0c;
}

#to-home {
  display: inline-block;
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 100;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  background: #FF6B6B;
  border: none;
  border-radius: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

#to-home:hover {
  background: #FF5252;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

@media (max-width: 700px) {
  body {
    padding: 14px;
  }

  .main-card {
    padding: 18px;
  }

  .word-row {
    grid-template-columns: 1fr;
  }
}

 #to-home {
   display: inline-block;
   position: fixed;
   bottom: 30px;
   left: 30px;
   z-index: 100;
   padding: 14px 28px;
   font-size: 18px;
   font-weight: bold;
   color: #fff;
   background: #FF6B6B;
   border: none;
   border-radius: 16px;
   text-decoration: none;
   cursor: pointer;
   transition: all 0.3s ease;
   box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

#to-home:hover {
   background: #FF5252;
   transform: translateY(-3px);
   box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

 .word-row {
   grid-template-columns: 1fr;
 }
}


#to-home {
  display: inline-block;
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 100;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  background: #FF6B6B;
  border: none;
  border-radius: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

#to-home:hover {
  background: #FF5252;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

@media (max-width: 700px) {
  body {
    padding: 14px;
    padding-bottom: 80px;
  }

  .main-card {
    padding: 18px;
  }

  .word-row {
    grid-template-columns: 1fr;
  }

  #to-home {
    bottom: 16px;
    left: 16px;
    padding: 10px 20px;
    font-size: 16px;
  }
}
