* {
  box-sizing: border-box;
}

:root {
  --main: #8b1e2d;
  --main-dark: #5a121d;
  --main-soft: #f1e3e5;
  --bg: #f7f1f2;
  --text: #222;
  --muted: #777;
  --card: #fffafa;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.hero,
.header {
  background: linear-gradient(160deg, var(--main), var(--main-dark));
  color: white;
  padding: 34px 22px 28px;
  text-align: center;
}

.logo {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.header h1 {
  margin: 0;
  font-size: 28px;
}

.subtitle,
.level {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.95;
  line-height: 1.6;
}

.main {
  padding: 24px 18px;
}

.catch {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 14px;
  color: var(--main);
}

.description {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 24px;
}

.card {
  background: var(--card);
  border: 1px solid #ead3d6;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
}

.card-title {
  font-weight: 800;
  color: var(--main);
  margin-bottom: 10px;
}

.list {
  padding-left: 18px;
  margin: 0;
  line-height: 1.8;
  font-size: 14px;
}

.big-button,
.start-button,
.level-button,
.set-button {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--main);
  color: white;
  text-decoration: none;
  padding: 16px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  margin-top: 12px;
  box-shadow: 0 6px 0 var(--main-dark);
}

.big-button:active,
.start-button:active,
.level-button:active,
.set-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--main-dark);
}

.sub-button {
  display: block;
  width: 100%;
  text-align: center;
  background: #eee;
  color: #333;
  text-decoration: none;
  padding: 14px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  margin-top: 12px;
}

.level-grid,
.set-list {
  display: grid;
  gap: 12px;
}

.level-button.disabled,
.set-button.disabled {
  background: #ddd;
  color: #888;
  box-shadow: 0 6px 0 #bbb;
  pointer-events: none;
}

.badge {
  display: inline-block;
  background: var(--main-soft);
  color: var(--main);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  margin-left: 6px;
}

.status {
  display: flex;
  justify-content: space-between;
  background: var(--main-soft);
  padding: 12px 16px;
  font-weight: bold;
}

.question {
  padding: 22px 18px 12px;
  font-size: 20px;
  line-height: 1.6;
}

.answer {
  margin: 0 16px;
  min-height: 80px;
  border: 2px dashed var(--main);
  border-radius: 16px;
  padding: 16px;
  font-size: 22px;
  background: var(--card);
  line-height: 1.5;
}

.words {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 24px 12px;
}

.word {
  background: white;
  border: 2px solid var(--main);
  color: var(--main);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.word:active {
  transform: scale(0.95);
  background: #f6dadd;
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

button {
  border: none;
  border-radius: 14px;
  padding: 14px 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.check {
  background: var(--main);
  color: white;
}

.reset {
  background: #ddd;
}

.sound {
  background: #222;
  color: white;
}

.result {
  text-align: center;
  min-height: 40px;
  font-size: 24px;
  font-weight: bold;
  padding: 10px;
}

.complete-box {
  padding: 24px 18px;
  text-align: center;
}

.complete-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--main);
  margin-bottom: 10px;
}

.footer {
  margin-top: auto;
  padding: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.top-bar{
  display:flex;
  align-items:center;
  margin-bottom:12px;
}

.back-button{
  background:rgba(255,255,255,0.2);
  color:white;
  border:none;
  padding:10px 14px;
  border-radius:12px;
  font-size:14px;
  font-weight:bold;
  cursor:pointer;
}
