/* «Дроби»: пицца из равных кусочков поверх общего style.css. */

/* --- уровни --- */

.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.level-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  white-space: normal;
}

.level-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.hello {
  font-size: 20px;
  font-weight: 600;
}

/* --- пицца --- */

.pizza {
  width: min(340px, 100%);
  height: auto;
  align-self: center;
  touch-action: manipulation;
}

.pizza-board {
  fill: #2b2118;
  stroke: var(--border);
  stroke-width: 2;
}

.pizza-slice {
  fill: #f0c04a;
  stroke: #0f1115;
  stroke-width: 2.5;
  stroke-linejoin: round;
  transition: fill 0.12s ease;
}

.pizza-slice.on {
  fill: #e2564e;
}

.pizza-slice.pick {
  cursor: pointer;
}

.pizza-slice.pick:hover {
  fill: #f6d471;
}

.pizza-slice.pick.on:hover {
  fill: #ef6a5f;
}

.pizza-slice.locked {
  cursor: default;
}

/* --- дробь --- */

frac,
.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.frac-top,
.frac-bottom {
  display: block;
  padding: 0 4px;
}

.frac-bar {
  display: block;
  width: 100%;
  min-width: 1.4em;
  height: 2px;
  background: currentColor;
  margin: 2px 0;
}

.ask {
  font-size: 20px;
  text-align: center;
}

.ask frac,
.ask .frac {
  font-size: 24px;
  color: var(--accent);
  margin: 0 2px;
}

/* Ответ-числитель: окошко стоит прямо в дроби. */
.frac-answer {
  font-size: 30px;
  color: var(--text);
}

.frac-input {
  width: 3.2em;
  padding: 4px 6px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
}

.check-wide {
  flex: 1;
}

/* --- подсказка --- */

.hint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tiny {
  padding: 5px 10px;
  font-size: 12px;
}
