﻿/**
 * 초등 연산 문제집 — 민트 테마 + 수학 전용 그림 스타일
 * 공통 레이아웃은 ../shared/workbook.css 에 있습니다. (이 파일보다 먼저 로드)
 */

:root {
  --bg: #dff3ec;
  --bg-glow-1: #cdeee0;
  --bg-glow-2: #d8f0fa;
  --hero-grad: linear-gradient(135deg, #bdeadb 0%, #d8f2e9 60%, #e3f4fb 100%);

  --surface-soft: #eef9f4;

  --accent: #14b8a0;
  --accent-deep: #0c7f6f;
  --accent-light: #8fdcc8;
  --accent-glow: rgba(14, 143, 125, 0.35);

  --ink: #102b27;
  --heading: #0d3a33;
  --muted: #44615c;
  --line: #cde9df;
}

/* —— 낱개 세기 (덧셈·뺄셈) —— */
.vgroup {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  font-size: 26px;
  line-height: 1.2;
  max-width: min(300px, 100%);
}

.vop {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--accent-deep);
}

.vitem {
  display: inline-block;
}

.vitem.removed {
  position: relative;
  opacity: 0.45;
}

.vitem.removed::after {
  content: "✕";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0472f;
  font-weight: 900;
  font-size: 20px;
}

.vbox {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 150px;
  padding: 8px 10px;
  background: #fff;
  border: 2px solid var(--tip-border);
  border-radius: 10px;
  font-size: 20px;
}

.tenframe {
  display: grid;
  grid-template-columns: repeat(5, 34px);
  grid-template-rows: repeat(2, 34px);
  border: 2px solid var(--accent-deep);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.tenframe .cell {
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
}

.split-arrow {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--accent-deep);
}

/* —— 피자(분수) 그림 —— */
.pie-group {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pie {
  display: block;
}

.frac-label {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 1px 10px;
}

/* —— 테이프 모델 —— */
.tape-wrap {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 420px;
}

.tape-total {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--accent-deep);
  margin-bottom: 5px;
}

.tape {
  display: flex;
  height: 38px;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.tape-seg {
  flex: 1;
  border-right: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.tape-seg:last-child {
  border-right: none;
}

.tape-seg.on {
  background: #ffd66b;
}

.tape-seg.rest {
  background: #ffe9ec;
  color: #c2404f;
}

/* —— 퍼센트 막대 —— */
.pct-bar {
  height: 34px;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.pct-fill {
  height: 100%;
  background: #7cc7ff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 44px;
  font-size: 13px;
  font-weight: 900;
  color: #0d3559;
  border-right: 2px solid var(--ink);
}

/* —— 비율 막대 —— */
.ratio-bar {
  display: flex;
  height: 38px;
  min-width: 0;
  width: 100%;
  max-width: 420px;
  flex: 1;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.ratio-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  border-right: 2px solid var(--ink);
}

.ratio-seg:last-child {
  border-right: none;
}

.ratio-seg.ra {
  background: #8fdcc8;
  color: #0b4a3f;
}

.ratio-seg.rb {
  background: #ffb3a7;
  color: #7a2417;
}

.ratio-seg.ry {
  background: #ffd66b;
  color: #6b4e00;
}

/* —— 점 배열 (곱셈·나눗셈) —— */
.dot-array {
  display: grid;
  gap: 6px;
  padding: 4px 2px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent-deep);
}
