/* ---------- Arena aktivitas ---------- */
.stage-card {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.stage-row { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: nowrap; }
.stage-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.75rem; width: 100%; }
.stage-row-models { align-items: flex-end; gap: 2.5rem; }
.stage-row-4 { gap: 1.5rem; }

.task { font-family: var(--font-display); font-size: 2rem; line-height: 1.2; color: var(--text); }
.feedback-host:empty { display: none; }
.feedback-note { background: #e6f1fb; color: #1c3d63; }
.check-host:empty { display: none; }
.check-host .btn { width: 100%; }

/* ---------- Kartu pilihan ---------- */
.option-card {
  position: relative;
  /* Semua kartu dalam satu baris sama tinggi; model di tengah, nama dan keterangan sejajar di bawah */
  display: grid; grid-template-rows: 1fr auto auto; justify-items: center; align-items: center; gap: 0.75rem;
  align-self: stretch;
  width: 21rem; padding: 1.5rem 1.25rem 1.25rem;
  border: 0.25rem solid var(--cream-200); border-radius: var(--r-card);
  background: var(--cream-50);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), opacity var(--t-base) var(--ease), transform var(--t-fast) var(--ease);
}
@media (hover: hover) { .option-card:hover { border-color: var(--cream-300); } }
.option-card:active { transform: translateY(0.125rem); }
.option-card .model { width: 17rem; height: 17rem; }
.option-card .model-bar { height: auto; }
.stage-row-4 .option-card { width: 16rem; }
.stage-row-4 .option-card .model { width: 12.5rem; height: 12.5rem; }
.stage-row-4 .option-card .model-bar { height: auto; margin: 3rem 0; }
.option-name { font-family: var(--font-display); font-size: 1.75rem; }
.option-caption { min-height: 1.75rem; font-size: 1.25rem; color: var(--text-2); text-align: center; }
.option-card[aria-pressed="true"] { border-color: var(--teal-500); background: #eaf7f5; }
.option-card.is-wrong { border-color: var(--coral-500); background: #fdf0ec; }
.option-card.is-right { border-color: var(--leaf-500); background: #ecf7ee; }
.option-card.is-out { opacity: 0.45; pointer-events: none; }
.option-flag {
  position: absolute; top: -1rem; right: -1rem;
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  color: #fff; background: var(--coral-500); box-shadow: var(--shadow-soft);
}
.option-flag .icon { width: 1.75rem; height: 1.75rem; stroke-width: 3; }
.option-card.is-right .option-flag { background: var(--leaf-500); }
.show-outline .part-shape { stroke: var(--navy-900); stroke-width: 7; }

/* ---------- Model ---------- */
.model-col { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.model-caption, .tray-caption { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-2); }
.model-slot { width: 26rem; height: 26rem; display: grid; place-items: center; }
.model-slot .model { width: 100%; height: 100%; overflow: visible; }
.stage-row-models .model-slot { width: 24rem; height: 24rem; }
.answer-col { align-self: center; gap: 1.25rem; }
.tray-plate {
  border-radius: 50%;
  outline: 0.25rem dashed var(--cream-300); outline-offset: 0.5rem;
  transition: outline-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.tray-plate.is-target { outline-color: var(--teal-500); }
.tray-plate.is-over { outline-style: solid; outline-color: var(--teal-700); background: #e3f5f2; }
.is-hinted { box-shadow: 0 0 0 0.375rem var(--gold-400); border-radius: 1rem; }
.tray-plate.is-hinted { box-shadow: 0 0 0 0.75rem var(--gold-400); border-radius: 50%; }

.bar-host { width: min(44rem, 100%); }
.bar-host .model { width: 100%; height: auto; }
.tokens { display: flex; gap: 0.75rem; padding: 0.5rem; }
.token {
  display: grid; place-items: center; width: 3.75rem; height: 3.75rem; border-radius: 50%;
  background: #dff1ef; color: var(--teal-700);
}
.token .icon { width: 2rem; height: 2rem; }
.stage-label { display: flex; align-items: center; gap: 1rem; font-size: 1.375rem; color: var(--text-2); }
.frac-host { min-height: 6rem; display: grid; place-items: center; }
.frac-line { display: flex; align-items: center; gap: 1rem; font-size: 1.75rem; color: var(--text-2); }

.frac-sm { font-size: 3rem; }
.frac-md { font-size: 4rem; }
.frac-lg { font-size: 5.5rem; }

/* ---------- Pesanan ---------- */
.order-card {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0.75rem 1.75rem; border-radius: var(--r-card);
  background: var(--navy-900); color: var(--cream-50);
}
.order-card .frac { color: var(--cream-50); font-size: 3.25rem; }
.order-label { font-family: var(--font-display); font-size: 1.5rem; }
.order-num { padding: 0 0.25em; border-radius: 0.2em; transition: background-color var(--t-base) var(--ease); }
.order-num.is-hinted { background: var(--gold-400); color: var(--navy-900); box-shadow: none; }

/* ---------- Isian pecahan dan papan angka ---------- */
.frac-input { font-size: 4.5rem; gap: 0; }
.frac-input .bar { width: 6rem; }
.frac-slot {
  width: 6rem; height: 6rem; border-radius: 1rem;
  border: 0.25rem solid var(--cream-300); background: var(--cream-50);
  font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--navy-900);
}
.frac-slot.is-empty { color: var(--cream-300); border-style: dashed; }
.frac-slot.is-active { border-color: var(--teal-500); border-style: solid; box-shadow: 0 0 0 0.375rem rgb(18 157 148 / 0.2); }
.keypad { display: grid; grid-template-columns: repeat(4, 4.5rem); gap: 0.5rem; }
.key {
  height: 4.5rem; border: 0; border-radius: var(--r-control);
  background: var(--cream-100); color: var(--navy-900);
  font-family: var(--font-display); font-size: 2rem;
  box-shadow: inset 0 -0.25rem 0 var(--cream-300);
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
@media (hover: hover) { .key:hover { background: #fff; } }
.key:active { transform: translateY(0.125rem); box-shadow: inset 0 -0.125rem 0 var(--cream-300); }
.key .icon { margin: auto; }

/* ---------- Mencocokkan ---------- */
.match { gap: 2.5rem; }
.match-pics { display: grid; grid-template-columns: repeat(4, 15rem); gap: 1.5rem; }
.match-pic {
  display: grid; justify-items: center; align-content: start; gap: 0.75rem;
  padding: 1.25rem; border-radius: var(--r-card);
  background: var(--cream-50); border: 0.25rem solid var(--cream-200);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.match-pic.is-target { border-color: var(--teal-500); }
.match-pic.is-over { background: #e3f5f2; border-color: var(--teal-700); }
.match-pic.is-done { border-color: var(--leaf-500); background: #ecf7ee; }
.match-model { width: 11rem; height: 11rem; display: grid; place-items: center; }
.match-model .model { width: 100%; height: 100%; }
.match-model .model-bar { height: auto; }
.match-hint { min-height: 1.75rem; font-size: 1.25rem; color: var(--text-2); text-align: center; }
.match-drop {
  width: 7rem; height: 9rem; border-radius: 1rem;
  border: 0.25rem dashed var(--cream-300);
}
.match-syms { display: flex; gap: 1.5rem; justify-content: center; min-height: 9rem; }
.sym-card {
  display: grid; place-items: center; width: 7rem; height: 9rem;
  border-radius: 1rem; background: var(--gold-400);
  box-shadow: inset 0 -0.375rem 0 var(--gold-600), var(--shadow-soft);
  touch-action: none; cursor: grab;
  transition: transform var(--t-fast) var(--ease);
}
.sym-card.is-selected { transform: translateY(-0.5rem); outline: 0.25rem solid var(--navy-900); outline-offset: 0.25rem; }
.sym-card[data-disabled] { cursor: default; background: var(--leaf-500); box-shadow: inset 0 -0.375rem 0 var(--leaf-700); }
.sym-card[data-disabled] .frac { color: #fff; }

/* ---------- Layar hasil ---------- */
.result-screen .scrim { position: absolute; inset: 0; background: rgb(28 43 75 / 0.6); }
.result-wrap {
  position: relative; z-index: 1;
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 40rem 40rem; gap: 2rem;
  align-content: center; justify-content: center; align-items: stretch;
  padding: var(--safe);
}
.result-card { align-items: center; text-align: center; }
.result-card h1 { font-size: var(--fs-title); }
.big-stars { display: flex; gap: 1rem; justify-content: center; align-items: flex-end; }
.big-star { color: var(--cream-200); animation: star-in 420ms var(--ease) both; }
.big-star .icon { width: 7rem; height: 7rem; }
.big-star.on { color: var(--gold-400); filter: drop-shadow(0 0.25rem 0 var(--gold-600)); }
.big-star:nth-child(2) .icon { width: 8.5rem; height: 8.5rem; }
@keyframes star-in { from { opacity: 0; transform: scale(0.4); } 70% { transform: scale(1.12); } to { opacity: 1; transform: none; } }
.star-meaning { font-family: var(--font-display); font-size: 1.75rem; color: var(--teal-700); }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; width: 100%; }
.result-stat { display: grid; gap: 0.25rem; padding: 1rem; border-radius: var(--r-card); background: var(--surface-2); }
.result-stat .label { font-size: var(--fs-meta); color: var(--text-3); }
.result-stat .num { font-family: var(--font-display); font-size: 2.5rem; }
.result-note { font-size: 1.375rem; color: var(--text-2); }
.result-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; width: 100%; margin-top: auto; }
/* Dua tombol harus muat di kartu 40rem, termasuk label terpanjang "Lihat hasil wilayah" */
.result-actions .btn { padding-inline: 1.5rem; font-size: 1.75rem; }
.result-actions-even { grid-template-columns: 1fr 1fr; }
.result-kiko {
  position: absolute; z-index: 2; left: 2%; bottom: 0; width: 13rem; /* berhenti sebelum kartu hasil (mulai 17rem) */
  filter: drop-shadow(0 1rem 1.25rem rgb(0 0 0 / 0.3));
}
.discovery { align-items: flex-start; }
.discovery h2 { font-size: 2.25rem; }
.discovery-visual { display: flex; align-items: center; gap: 1.5rem; align-self: center; }
.discovery-model { width: 13rem; height: 13rem; }
.discovery-model .model { width: 100%; height: 100%; }
.discovery-eq { font-family: var(--font-display); font-size: 4rem; color: var(--text-3); }

.region-wrap { grid-template-columns: 30rem 44rem; align-items: center; }
.badge-col { display: grid; justify-items: center; gap: 1rem; }
.badge-img { width: 18rem; height: auto; } /* shortcut: lencana 2–8 hanya ~215px dari lembar ikon; ekspor ulang resolusi tinggi untuk 4K */
.badge-name { font-family: var(--font-display); font-size: 2rem; color: var(--cream-50); text-align: center; }
.mastery { width: 100%; display: grid; gap: 0.5rem; text-align: left; }
.mastery-head { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 1.625rem; }
.meter-light { height: 1.25rem; background: var(--cream-200); }
.meter-light > span { background: var(--leaf-500); }
.result-card .challenge-list { width: 100%; text-align: left; }
.result-card .feedback { text-align: left; width: 100%; }

/* ---------- Kit wilayah 2–7 ---------- */
.bar-stack { width: min(46rem, 100%); display: grid; gap: 0.5rem; }
.bar-stack .bar-host { width: 100%; }
.bar-cap { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-2); }
.ref-row { display: flex; align-items: center; gap: 1.5rem; }
.bar-ref { width: 24rem; }
.option-card .model-bar { width: 100%; height: auto; margin: 3.5rem 0; }
.stage-row-4 .option-card .model-bar { margin: 2.5rem 0; }
.option-symbol { display: grid; place-items: center; width: 12.5rem; height: 12.5rem; font-family: var(--font-display); font-size: 7rem; color: var(--navy-900); }
.option-card > .frac-lg { margin: 2rem 0; }

/* Langkah lanjutan: menamai hasil */
.ask { display: grid; justify-items: center; gap: 1rem; }
.ask-q { font-family: var(--font-display); font-size: 1.75rem; text-align: center; }
.ask-row { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.ask-btn {
  min-width: 7rem; min-height: 7rem; padding: 0.75rem 1.25rem; border-radius: var(--r-card);
  border: 0.25rem solid var(--cream-300); background: var(--cream-50); color: var(--navy-900);
  font-family: var(--font-display); font-size: 2.5rem;
}
.ask-btn .frac { font-size: 2.75rem; }
.ask-btn.is-wrong { border-color: var(--coral-500); background: #fdf0ec; opacity: 0.7; }
.ask-btn.is-right { border-color: var(--leaf-500); background: #ecf7ee; }

/* Kalimat matematika berisian */
.fill { gap: 1.5rem; }
.fill-row { gap: 3rem; align-items: center; }
.fill-model { display: flex; justify-content: center; }
.fill-model:empty { display: none; }
.fill-model .model-area, .fill-model .model-circle { width: 18rem; height: 18rem; }
.expr { display: flex; align-items: center; gap: 1.25rem; font-family: var(--font-display); }
.expr .frac-md { font-size: 4rem; }
.expr-op, .expr-num { font-size: 4rem; color: var(--navy-900); }
.frac-fixed { display: grid; place-items: center; width: 6rem; height: 6rem; font-size: 4rem; color: var(--navy-900); }
.expr .frac-input { font-size: 4rem; }
.expr .frac-slot { width: 5.5rem; height: 5.5rem; font-size: 3.25rem; }
.expr > .frac-slot { width: 6.5rem; height: 6.5rem; }

/* Kartu pecahan dengan model kecil (petunjuk) */
.sym-model:empty { display: none; }
.sym-card.has-model { height: auto; padding: 0.5rem 0 0.75rem; gap: 0.25rem; }
.sym-model { width: 6rem; }
.sym-model .model { width: 100%; height: auto; }
.match-pic .frac-lg { font-size: 5rem; margin: 1rem 0; }

/* Garis bilangan */
.line-board { position: relative; width: min(62rem, 100%); padding-top: 11rem; }
.line-board .model-line { width: 100%; height: auto; display: block; }
.line-targets { position: absolute; inset: 0 0 auto 0; height: 10rem; }
.line-target {
  position: absolute; top: 0; transform: translateX(-50%);
  display: grid; place-items: center; width: 7.5rem; height: 10rem; border-radius: 1rem;
  border: 0.25rem solid transparent;
}
.line-target::after { content: ""; position: absolute; bottom: -1.25rem; left: 50%; width: 0.25rem; height: 1.25rem; background: var(--cream-300); }
.line-target.is-target { border-color: var(--teal-500); }
.line-target.is-over { background: #e3f5f2; }
.line-target .match-drop { width: 6.5rem; height: 8.5rem; }
.line-target .sym-card { width: 6.5rem; height: 8.5rem; }

/* Zona acuan */
.match-pics.zones { gap: 1.5rem; }
.match-pic.zone { width: 18rem; min-height: 22rem; align-content: start; }
.match-pic.zone .match-drop { display: none; }
.match-pic.zone .sym-card { width: 6rem; height: 8rem; }
.match-pic.zone { grid-template-columns: repeat(2, auto); justify-content: center; }
.zone-title { grid-column: 1 / -1; font-family: var(--font-display); font-size: 1.75rem; }

/* Urutan */
.order-board { display: flex; align-items: center; gap: 1.5rem; }
.order-end { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-2); }
.order-slots { display: flex; gap: 1.25rem; }
.order-slot {
  position: relative; display: grid; place-items: center; width: 9rem; height: 12rem; border-radius: var(--r-card);
  background: var(--cream-50); border: 0.25rem solid var(--cream-200);
}
.order-slot.is-target { border-color: var(--teal-500); }
.order-slot.is-over { background: #e3f5f2; }
.order-slot.is-done { border-color: var(--leaf-500); background: #ecf7ee; }
.order-no { position: absolute; top: 0.5rem; left: 0.75rem; font-size: 1.25rem; color: var(--text-3); }

/* Nampan jamak */
.trays-3 .model-slot { width: 21rem; height: 21rem; }
.trays-4 .model-slot { width: 16rem; height: 16rem; }
.trays-row { align-items: flex-end; }

/* Model luas */
.area-board { display: grid; grid-template-columns: auto 26rem; grid-template-rows: auto 26rem; gap: 0.75rem; }
.area-host .model-area { width: 26rem; height: 26rem; }
.area-cols { display: flex; }
.area-cols .area-btn { flex: 1; }
.area-rows { display: flex; flex-direction: column; }
.area-rows .area-btn { flex: 1; }
.area-cols, .area-rows { gap: 0.375rem; }
.area-btn {
  min-width: 4.5rem; min-height: 4.5rem; border: 0; border-radius: var(--r-control);
  background: var(--cream-100); color: var(--navy-900); font-family: var(--font-display); font-size: 1.75rem;
  box-shadow: inset 0 -0.25rem 0 var(--cream-300);
}
.area-btn[aria-pressed="true"] { background: #9fdcd4; box-shadow: inset 0 -0.25rem 0 var(--teal-700); }
.area-rows .area-btn[aria-pressed="true"] { background: #ffe3a3; box-shadow: inset 0 -0.25rem 0 #e0a019; }
.area-btn:disabled { opacity: 0.35; }
.area-legend { display: flex; gap: 1rem; font-size: 1.375rem; }
.lg { padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--surface-2); }
.lg-col { background: #d8f1ee; }
.lg-row { background: #fff0cc; }
.lg-both { background: var(--teal-700); color: #fff; }

/* Kartu penemuan: kalimat */
.discovery-sentence { font-family: var(--font-display); font-size: 2.25rem; text-align: center; align-self: center; }
.compare-top { gap: 3rem; align-items: center; }
.model-slot-sm { width: 14rem; height: 14rem; }
.compare-top .model-col { flex-direction: row; gap: 1.5rem; }
.compare-box { display: grid; place-items: center; width: 6rem; height: 6rem; border-radius: 1rem; border: 0.25rem dashed var(--cream-300); font-family: var(--font-display); font-size: 3rem; color: var(--text-3); }
.group-col { gap: 1rem; }
.plates { display: flex; gap: 1rem; min-height: 8rem; }
.plate-mini { width: 8rem; height: 8rem; }
.plate-mini .model { width: 100%; height: 100%; }
.plate-mini.is-empty { opacity: 0.5; }
