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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #ffe7f0, #ffe5c7);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  max-height: 900px;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 16px 20px 8px;
  background: linear-gradient(135deg, #ff7ac7, #ffb86b);
  color: #ffffff;
}

.app-header h1 {
  font-size: 1.35rem;
  margin: 0 0 4px;
}

.subtitle {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 16px;
  gap: 10px;
  background: linear-gradient(180deg, #fff8ff, #fff4e3);
}

.mode-switcher {
  display: flex;
  gap: 8px;
}

.mode-button {
  flex: 1;
  border-radius: 999px;
  border: none;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
  color: #555;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease,
    color 0.1s ease;
}

.mode-button.active {
  background: #32d399;
  color: #fff;
  box-shadow: 0 6px 14px rgba(50, 211, 153, 0.45);
  transform: translateY(-1px);
}

.screen {
  flex: 1;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.screen.active {
  display: flex;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.screen-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.screen-header p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

.letter-select {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.letter-select select {
  border-radius: 999px;
  border: 1px solid #ddd;
  padding: 4px 10px;
  font-size: 0.9rem;
}

.canvas-wrapper {
  flex: 1;
  border-radius: 22px;
  background: #fdfdff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03),
    0 12px 30px rgba(0, 0, 0, 0.06);
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  background: linear-gradient(180deg, #fdfcff, #f7fbff);
}

.feedback-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.progress-bar {
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #32d399, #9ef8c5);
  transition: width 0.15s ease-out;
}

.bubble-progress-wrap {
  padding: 6px 0;
}

.bubble-progress-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.bubble-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #10b981);
  transition: width 0.25s ease-out;
}

.message-label {
  flex: 1.4;
  min-height: 30px;
  font-size: 0.8rem;
  color: #555;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

button.primary {
  border-radius: 999px;
  border: none;
  padding: 10px 14px;
  background: #ffb86b;
  color: #583200;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(255, 184, 107, 0.6);
  cursor: pointer;
  white-space: nowrap;
}

button.primary:active,
.mode-button:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.app-main.launcher {
  gap: 14px;
  justify-content: center;
}

.experience-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.experience-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.experience-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.experience-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.experience-desc {
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}

@media (max-width: 600px) {
  .app-shell {
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
}

