/* Labirin Pintar: labirin, hantu, buah berhuruf; jawaban tampil di barisan chip */
.lb-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: clamp(6px, 1.2vw, 14px); background: linear-gradient(180deg, var(--sky-100), #fff); }
.lb-q { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--sky); border-radius: 16px; padding: 6px 12px; min-height: 2.6em; }
.lb-qtext { flex: 1; min-width: 0; font-weight: 800; color: var(--ink); font-size: clamp(15px, 2.4vw, 32px); line-height: 1.2; }
.lb-hud { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: clamp(13px, 1.6vw, 22px); }
#lives { color: var(--rose); letter-spacing: 2px; white-space: nowrap; }
.lb-score, .lb-prog { background: var(--sky-50); border: 2px solid var(--line); border-radius: 999px; padding: 1px 10px; font-variant-numeric: tabular-nums; }
.lb-score { border-color: var(--amber); }
.lb-ans { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lb-chip { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 3px 10px; border-radius: 14px; background: #fff; border: 3px solid var(--c, var(--sky)); font-weight: 800; color: var(--ink); font-size: clamp(13px, 2vw, 26px); line-height: 1.1; min-width: 0; }
.lb-chip i { flex: 0 0 auto; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--c); color: #fff; font-style: normal; display: flex; align-items: center; justify-content: center; font-size: .85em; }
.lb-chip span { min-width: 0; word-break: break-word; }
.lb-chip.gone { opacity: .35; text-decoration: line-through; }
.lb-chip.ok { background: #bbf7d0; }
.lb-stage { position: relative; flex: 1; min-height: 0; border-radius: 18px; overflow: hidden; border: 3px solid var(--sky-d); touch-action: none; user-select: none; -webkit-user-select: none; background: #0f172a; }
.lb-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lb-fb { position: absolute; left: 50%; bottom: 10px; transform: translate(-50%, 16px); max-width: 94%; background: var(--ink); color: #fff; border: 2px solid rgba(255,255,255,.4); padding: 8px 16px; border-radius: 16px; font-weight: 700; font-size: clamp(13px, 1.7vw, 22px); line-height: 1.3; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; text-align: center; z-index: 2; }
.lb-fb.show { opacity: 1; transform: translate(-50%, 0); }
.lb-fb.ok { background: var(--ok); }
.lb-fb.bad { background: var(--bad); }
.lb-dpad { display: grid; position: absolute; right: 8px; bottom: 8px; width: 132px; height: 132px; z-index: 3; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 4px; }
.lb-dpad button { border: 0; border-radius: 12px; background: rgba(255,255,255,.28); color: #fff; font-size: 18px; padding: 0; cursor: pointer; }
.lb-dpad button:active { background: rgba(251,191,36,.8); }
.lb-dpad [data-d="u"] { grid-area: 1 / 2; } .lb-dpad [data-d="l"] { grid-area: 2 / 1; } .lb-dpad [data-d="r"] { grid-area: 2 / 3; } .lb-dpad [data-d="d"] { grid-area: 3 / 2; }
@media (max-height: 520px) {
  .lb-wrap { gap: 4px; padding: 4px 8px; }
  .lb-q { border-width: 2px; padding: 2px 10px; min-height: 2.2em; }
  .lb-qtext { font-size: clamp(13px, 2.6vw, 20px); }
  .lb-chip { min-height: 32px; border-width: 2px; padding: 1px 8px; font-size: clamp(12px, 2vw, 18px); }
  .lb-stage { border-width: 2px; }
  .lb-dpad { width: 100px; height: 100px; }
}
@media (prefers-reduced-motion: reduce) { .lb-fb { transition: none; } }

.ge-coin { display: inline-flex; align-items: center; gap: 5px; background: #fef3c7; border: 2px solid #f59e0b; border-radius: 999px; padding: 1px 10px 1px 6px; font-variant-numeric: tabular-nums; }
.ge-coin::before { content: ''; width: .95em; height: .95em; border-radius: 50%; box-sizing: border-box; background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b); border: 2px solid #b45309; }
.lb-dpad button { display: flex; align-items: center; justify-content: center; }
.lb-dpad button svg { width: 56%; height: 56%; fill: currentColor; display: block; pointer-events: none; }

/* mode 2 pemain: papan arah kiri (pemain 1, kuning) dan kanan (pemain 2, biru) */
.lb-dpad-l { display: none; right: auto; left: 8px; }
.lb-2p .lb-dpad-l { display: grid; }
.lb-2p .lb-dpad-l button { background: rgba(250,204,21,.35); }
.lb-2p #dpad button { background: rgba(56,189,248,.35); }
.lb-2p .lb-dpad button:active { background: rgba(255,255,255,.8); }
#lives { font-size: .85em; }
