/* ============================================================
   Pharmacy Simulator — UI 2026 "Neo-Glass" theme
   Restyle only: semua selector/ID/class identik dengan versi lama.
   Backup: style.css.bak-uipolish-20260719
   ============================================================ */

:root {
  --green: #10b981;
  --green-d: #059669;
  --green-glow: rgba(16,185,129,0.35);
  --blue: #6366f1;
  --red: #ef4444;
  --ink: #0f1c24;
  --muted: #64748b;
  --card: #ffffff;
  --bg1: #eef7f2;
  --bg2: #e3eef7;
  --line: #e2e8f0;
  --radius: 18px;
  --hud-h: 58px;
  --glass: rgba(255,255,255,0.72);
  --shadow-sm: 0 2px 10px rgba(15,40,45,0.08);
  --shadow-md: 0 12px 32px rgba(15,40,45,0.14);
  --shadow-lg: 0 32px 80px rgba(8,25,30,0.38);
  --glow-green: 0 6px 24px var(--green-glow);
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(90% 80% at 15% 10%, rgba(16,185,129,0.16), transparent 60%),
    radial-gradient(80% 70% at 85% 90%, rgba(99,102,241,0.14), transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  font-family: var(--font);
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ---- custom scrollbar (2026 slim) ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,0.35); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,0.55); }

/* ---- focus ring ---- */
:focus-visible { outline: 3px solid rgba(16,185,129,0.45); outline-offset: 2px; border-radius: 8px; }

/* ============ buttons (gradient + shine sweep) ============ */
button {
  font-family: var(--font);
  font-weight: 700;
  border: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 12px 24px;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(140deg, #34d399, var(--green) 55%, var(--green-d));
  box-shadow: var(--shadow-sm), var(--glow-green);
  transition: transform 0.15s cubic-bezier(.2,.9,.3,1.4), box-shadow 0.15s ease, filter 0.15s ease;
  position: relative;
  overflow: hidden;
}
button::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
  pointer-events: none;
}
button:hover { transform: translateY(-2px) scale(1.015); box-shadow: var(--shadow-md), 0 10px 32px var(--green-glow); filter: brightness(1.04); }
button:hover::after { transform: translateX(120%); }
button:active { transform: translateY(0) scale(0.99); box-shadow: var(--shadow-sm); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }
button:disabled::after { display: none; }

.btn-secondary { background: rgba(255,255,255,0.85); color: #334155; box-shadow: var(--shadow-sm); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.btn-secondary:hover { background: #fff; box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--green-d); box-shadow: none; padding: 8px 14px; font-size: 14px; }
.btn-ghost:hover { background: rgba(16,185,129,0.1); box-shadow: none; transform: none; }
.btn-ghost.small { font-size: 12.5px; color: var(--muted); }

/* ============ HUD (dark glass bar) ============ */
#hud {
  position: fixed; top: 0; left: 0; right: 0; height: var(--hud-h);
  display: flex; align-items: center; gap: 18px; padding: 0 16px;
  background: linear-gradient(180deg, rgba(10,20,26,0.88), rgba(10,20,26,0.78));
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #f1f5f9; font-weight: 700; font-size: 15.5px; z-index: 30;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.hud-block {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.09);
  padding: 6px 13px; border-radius: 999px;
}
.hud-icon { font-size: 17px; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4)); }
.hud-reputation { flex: 0 0 auto; }
.meter { width: 130px; height: 10px; background: rgba(255,255,255,0.12); border-radius: 8px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.35); }
.meter-fill {
  height: 100%; width: 50%;
  /* solid color (bukan gradient) — JS override warnanya via style.backgroundColor */
  background-color: var(--green);
  border-radius: 8px;
  box-shadow: 0 0 10px var(--green-glow);
  transition: width 0.4s cubic-bezier(.2,.8,.3,1), background-color 0.3s ease;
}
#hudDay { margin-right: 8px; }
#hudTimer { font-variant-numeric: tabular-nums; color: #cbd5e1; letter-spacing: 0.5px; }
.hud-btn {
  padding: 0; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: #e2e8f0; font-size: 16px;
  box-shadow: none; border: 1px solid rgba(255,255,255,0.12);
}
.hud-btn:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); box-shadow: none; }
#muteBtn { margin-left: auto; }

.hud-badge {
  background: linear-gradient(140deg, #34d399, var(--green-d));
  color: #fff; font-weight: 800; padding: 6px 14px; border-radius: 999px; font-size: 13.5px;
  box-shadow: 0 2px 12px var(--green-glow);
  letter-spacing: 0.3px;
}
.hud-unit { color: #94a3b8; font-size: 11.5px; font-weight: 600; }
.hud-money { margin-left: 4px; }

/* ============ store scene ============ */
#storeView { position: fixed; top: var(--hud-h); left: 0; right: 0; bottom: 0; background: #cfe0e2; overflow: hidden; }
#storeView svg { display: block; width: 100%; height: 100%; }
#customerLayer { position: fixed; top: var(--hud-h); left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 5; }
/* Salinan lapisan depan dari latar menutup bagian bawah pasien. Ini membuat
   pasien tampak berdiri di belakang meja pada setiap ukuran layar, bukan
   melayang dengan paha/ kaki terlihat di depannya. */
#customerLayer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: url('assets/pharmacy-service-scene-animated-background.png') center -80px / 100% auto no-repeat;
  clip-path: inset(50% 0 0 0);
}

/* Ilustrasi meja kerja diberikan user menjadi set utama permainan. SVG toko
   tetap berada di bawahnya untuk hotzone/rak interaktif tanpa tampil ganda. */
#storeView {
  background-color: #cfc3a8;
  background-image: url('assets/pharmacy-service-scene-animated-background.png');
  background-repeat: no-repeat;
  background-position: center -80px;
  background-size: 100% auto;
}
#storeView svg { opacity: 0; }
@media (max-width: 620px) {
  #storeView { background-position: center top; background-size: auto 100%; }
  #customerLayer::before { background-position: center top; background-size: auto 100%; }
}

/* Apoteker bergaya ilustrasi editorial: idle lembut, lalu menyapa sekali saat
   pasien tiba di konter. transform-box menjaga putaran bertumpu di bahu/wajah. */
.pharmacist-arm, .pharmacist-face { transform-box: fill-box; }
.pharmacist-arm { transform-origin: 50% 8%; }
.pharmacist-arm-left { animation: pharmacistArmLeft 4.2s ease-in-out infinite; }
.pharmacist-arm-right { animation: pharmacistArmRight 4.8s ease-in-out -1.1s infinite; }
.pharmacist-face { transform-origin: 50% 85%; }
.pharmacist-figure.serving .pharmacist-arm-right { animation: pharmacistWelcome 1.25s cubic-bezier(.2,.8,.3,1) both; }
.pharmacist-figure.serving .pharmacist-face { animation: pharmacistNod 1.25s ease-out both; }
@keyframes pharmacistArmLeft {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(-1.35deg); }
}
@keyframes pharmacistArmRight {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(0.9deg); }
}
@keyframes pharmacistWelcome {
  0% { transform: rotate(0); }
  32% { transform: rotate(-8deg); }
  58% { transform: rotate(2.5deg); }
  80% { transform: rotate(-3deg); }
  100% { transform: rotate(0); }
}
@keyframes pharmacistNod {
  0%, 100% { transform: rotate(0) translateY(0); }
  38% { transform: rotate(2deg) translateY(0.6px); }
  68% { transform: rotate(-0.8deg) translateY(0); }
}

.customer {
  /* Wadah dipotong setinggi konter: pasien tampak dari kepala sampai badan
     atas saja, seperti sedang berdiri dan berjalan di belakang meja. */
  position: absolute; width: 260px; height: 260px; overflow: hidden;
  transform: translate(-50%, -100%);
  transition: left 0.8s cubic-bezier(.22,.8,.25,1), top 0.8s cubic-bezier(.22,.8,.25,1);
  cursor: pointer; pointer-events: auto;
  filter: drop-shadow(0 6px 5px rgba(0,0,0,0.3));
}
.customer:not(.at-counter) { cursor: default; }
.customer.queue-hidden { visibility: hidden; pointer-events: none; }
.customer svg { width: 100%; height: 100%; }
.customer-motion { position: absolute; inset: 0; overflow: hidden; transform-origin: 50% 100%; animation: customerArrive 0.72s cubic-bezier(.2,.9,.25,1.2) both; }
.customer-painted {
  display: block;
  position: absolute;
  /* Garis pandang kepala mengikuti apoteker; bagian bawah tubuh dipotong
     oleh garis konter agar pasien benar-benar berada di belakang meja. */
  top: 28px;
  left: 50%;
  width: 320px;
  height: auto;
  margin-left: -160px;
  transform-origin: 50% 100%;
  animation: paintedCustomerBreathe 3.4s ease-in-out infinite;
}
@keyframes customerArrive { from { opacity: 0; transform: translateY(32px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes paintedCustomerBreathe { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-4px) rotate(-0.35deg); } }
.customer.at-counter:hover { filter: drop-shadow(0 6px 5px rgba(0,0,0,0.3)) drop-shadow(0 0 12px rgba(16,185,129,0.55)); }
.patience-bar { position: absolute; z-index: 2; top: -8px; left: 8px; right: 8px; height: 5px; background: rgba(0,0,0,0.32); border-radius: 3px; overflow: hidden; }

@media (max-width: 1000px) {
  /* Pertahankan kepala tepat di bawah HUD, lalu potong di garis konter supaya
     pasien hanya tampak setengah badan dan tidak menutup meja kerja. */
  .customer { height: 230px; margin-top: -30px; }
}
/* solid color — JS override via style.backgroundColor (hijau→kuning→merah) */
.patience-fill { height: 100%; width: 100%; background-color: var(--green); transition: background-color 0.3s ease; }

/* ============ floating actions (glass dock) ============ */
#actionButtons {
  position: fixed; bottom: 18px; right: 18px; display: flex; gap: 8px; z-index: 20;
  background: rgba(10,20,26,0.55);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px; border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
#actionButtons button {
  background: rgba(255,255,255,0.09); color: #f1f5f9;
  box-shadow: none; border: 1px solid rgba(255,255,255,0.1);
  padding: 11px 18px; font-size: 14px; border-radius: 13px;
}
#actionButtons button:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.25); }

/* ============ overlays (aurora backdrop) ============ */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(16,185,129,0.28), transparent 55%),
    radial-gradient(110% 100% at 85% 100%, rgba(99,102,241,0.30), transparent 55%),
    linear-gradient(165deg, #0b1f1c, #0c1524 60%, #101927);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}
.overlay::before, .overlay::after {
  content: '';
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: 0.5; pointer-events: none;
  animation: blobFloat 14s ease-in-out infinite alternate;
}
.overlay::before {
  width: 46vw; height: 46vw; left: -10vw; top: -14vw;
  background: radial-gradient(circle, rgba(52,211,153,0.55), transparent 70%);
}
.overlay::after {
  width: 40vw; height: 40vw; right: -8vw; bottom: -12vw;
  background: radial-gradient(circle, rgba(99,102,241,0.5), transparent 70%);
  animation-delay: -7s;
}

/* Halaman pembuka memiliki cerita visual sendiri: pelayanan resep nyata di
   apotek, dengan area terang di kiri untuk memilih mode bermain. */
#landingScreen {
  justify-content: flex-start;
  padding-left: clamp(28px, 8vw, 150px);
  background:
    linear-gradient(90deg, rgba(8, 37, 34, 0.22) 0%, rgba(8, 37, 34, 0.08) 44%, rgba(8, 37, 34, 0.34) 100%),
    url('assets/digi-pharma-landing-hero-coral.png') center / cover no-repeat;
}
#landingScreen::before,
#landingScreen::after { display: none; }
#landingScreen .landing {
  width: min(610px, 88vw);
  color: #173f3b;
  text-shadow: 0 1px 0 rgba(255,255,255,0.65);
}
#landingScreen .brand { filter: drop-shadow(0 5px 16px rgba(255,255,255,0.65)); }
#landingScreen .brand span {
  background: linear-gradient(95deg, #0f514a 6%, #137c6e 52%, #285f9e 95%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
}
#landingScreen .subtitle { color: #244a46; opacity: 0.94; }
#landingScreen .menu-card {
  background: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.8);
  box-shadow: 0 16px 38px rgba(17,66,58,0.2);
}

/* ---- landing / menu ---- */
.landing { text-align: center; color: #fff; max-width: 720px; animation: pop 0.5s cubic-bezier(.2,.9,.3,1.2); position: relative; z-index: 1; }
.brand {
  font-size: 46px; font-weight: 800; letter-spacing: -1px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  filter: drop-shadow(0 6px 24px rgba(16,185,129,0.35));
}
.brand span {
  background: linear-gradient(92deg, #ecfdf5 10%, #6ee7b7 45%, #a5b4fc 90%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradientShift 6s ease-in-out infinite alternate;
}
.brand.small { font-size: 30px; }
.subtitle { font-size: 16px; opacity: 0.85; margin-top: 12px; line-height: 1.55; font-weight: 500; }
.subtitle.small { font-size: 13px; opacity: 0.72; margin-top: 4px; }

.menu-cards { display: flex; gap: 22px; margin-top: 36px; flex-wrap: wrap; justify-content: center; perspective: 900px; }
.menu-card {
  flex: 1 1 260px; max-width: 300px;
  background: rgba(255,255,255,0.96); color: var(--ink);
  border-radius: 26px; padding: 30px 22px; text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  border: 1px solid rgba(255,255,255,0.6);
  border-top: 4px solid var(--green);
  transition: transform 0.22s cubic-bezier(.2,.9,.3,1.4), box-shadow 0.22s ease;
}
.menu-card.teacher { border-top-color: var(--blue); }
.menu-card:hover {
  transform: translateY(-8px) rotateX(3deg) scale(1.02);
  box-shadow: 0 40px 90px rgba(8,25,30,0.5), 0 0 0 1px rgba(16,185,129,0.25);
}
.menu-card.teacher:hover { box-shadow: 0 40px 90px rgba(8,25,30,0.5), 0 0 0 1px rgba(99,102,241,0.3); }
.menu-card-icon { font-size: 48px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15)); animation: iconBob 3.5s ease-in-out infinite; }
.menu-card.teacher .menu-card-icon { animation-delay: -1.7s; }
.menu-card-title { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; }
.menu-card-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.rules-hint {
  margin: 24px auto 0; max-width: 470px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px; padding: 18px 24px;
  font-size: 14px; line-height: 2.1; text-align: left;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.start-row { display: flex; gap: 12px; justify-content: center; margin-top: 26px; }
#startBtn { padding: 15px 48px; font-size: 18px; letter-spacing: 1.5px; animation: pulseGlow 2.4s ease-in-out infinite; }

/* ---- modal cards (day end / game over) ---- */
.modal-card {
  background: rgba(255,255,255,0.97); color: var(--ink);
  border-radius: 28px; padding: 32px 36px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.6);
  text-align: center; max-width: 420px;
  animation: pop 0.45s cubic-bezier(.2,.9,.3,1.35);
  position: relative; z-index: 1;
}
.modal-card h1 { font-size: 30px; margin-bottom: 6px; letter-spacing: -0.5px; }
.modal-card p { color: var(--muted); margin-bottom: 8px; }
.stats-box {
  background: linear-gradient(180deg, #f8fafc, #f1f7f4);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 20px; font-size: 15px; line-height: 1.9; margin: 14px 0 22px; min-width: 280px;
}
.stat-row { display: flex; justify-content: space-between; gap: 30px; }
.stat-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; font-weight: 800; }

/* ---- formative feedback after each prescription ---- */
.serve-feedback-card { width: min(520px, 92vw); max-height: min(78vh, 680px); overflow-y: auto; }
.feedback-icon {
  width: 52px; height: 52px; margin: -4px auto 8px; border-radius: 50%; display: grid; place-items: center;
  background: #dcfce7; color: #15803d; font-size: 30px; font-weight: 900; border: 2px solid #86efac;
}
.feedback-icon.needs-review { background: #fff7ed; color: #c2410c; border-color: #fdba74; }
.feedback-details { display: grid; gap: 10px; margin: 16px 0 22px; text-align: left; }
.feedback-item { border: 1px solid var(--line); border-left: 4px solid #94a3b8; border-radius: 14px; padding: 11px 13px; background: #f8fafc; }
.feedback-item.correct { border-left-color: #22c55e; background: #f0fdf4; }
.feedback-item.incorrect { border-left-color: #f59e0b; background: #fffbeb; }
.feedback-item-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-size: 13px; }
.feedback-item-head span { flex-shrink: 0; font-size: 11px; font-weight: 800; color: var(--muted); }
.feedback-check { margin-top: 6px; font-size: 12px; font-weight: 700; }
.feedback-check.ok { color: #15803d; }
.feedback-check.warn { color: #b45309; }
.feedback-key { display: grid; gap: 3px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed #f0b75d; color: #5f4a1f; font-size: 12px; line-height: 1.4; }
.feedback-key b { color: #8a4b08; }

/* ============ teacher screen ============ */
.teacher-wrap {
  width: min(1000px, 96vw); height: min(88vh, 760px);
  background: rgba(255,255,255,0.97); color: var(--ink);
  border-radius: 28px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.6);
  padding: 22px 24px; display: flex; flex-direction: column;
  animation: pop 0.4s cubic-bezier(.2,.9,.3,1.3);
  position: relative; z-index: 1;
}
.teacher-head { display: flex; justify-content: space-between; align-items: flex-start; }
.teacher-head h1 { font-size: 24px; letter-spacing: -0.4px; }
.teacher-tabs { display: flex; gap: 8px; margin-top: 10px; }
.teacher-tab { padding: 7px 11px; font-size: 12px; background: #edf3f0; color: var(--muted); box-shadow: none; }
.teacher-tab.active { background: var(--green); color: #fff; }
.teacher-tab:hover { transform: none; box-shadow: none; }
.teacher-body { flex: 1; display: grid; grid-template-columns: 300px 1fr; gap: 18px; margin-top: 14px; min-height: 0; }
.teacher-list-col { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); padding-right: 16px; }
.teacher-list-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 15px; margin-bottom: 8px; }
.teacher-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }
.teacher-item {
  display: flex; align-items: center; gap: 8px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 14px; cursor: pointer;
  background: #fbfdfc; transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.teacher-item:hover { background: #f2f8f5; transform: translateX(3px); }
.teacher-item.active { border-color: var(--green); background: #ecfdf3; box-shadow: 0 0 0 3px rgba(16,185,129,0.12); }
.ti-main { flex: 1; min-width: 0; }
.ti-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-sub { font-size: 12px; color: var(--muted); }
.ti-del { background: transparent; color: #dc2626; box-shadow: none; padding: 4px 8px; font-size: 14px; }
.ti-del:hover { background: #fee2e2; transform: none; box-shadow: none; }

.teacher-editor-col { overflow-y: auto; padding-right: 4px; }
.teacher-editor { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: 14px; padding: 10px 13px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: #fbfdfc; color: var(--ink); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.14);
}
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt-row { grid-template-columns: auto 1fr; align-items: center; }
.opt-row input[type=radio] { width: 18px; height: 18px; accent-color: var(--green); }
.empty { color: var(--muted); font-size: 13.5px; padding: 20px 8px; text-align: center; }

.teacher-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.teacher-status { color: var(--muted); font-size: 13px; margin-right: auto; }
.teacher-import { cursor: pointer; }
.l2-editor-hint { margin: 0; color: var(--muted); font-size: 13px; }
.l2-question-editor { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.l2-question-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
#teacherStartBtn { padding: 12px 28px; }

/* ============ panels (glass modal) ============ */
.panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(720px, 94vw); max-height: 88vh; overflow-y: auto;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(15,40,45,0.04);
  padding: 22px 24px; z-index: 50;
  display: flex; flex-direction: column; gap: 14px;
  color: var(--ink); animation: panelPop 0.32s cubic-bezier(.2,.9,.3,1.3);
}
.panel h2 { font-size: 21px; letter-spacing: -0.3px; }

.request-info {
  background: linear-gradient(140deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a; border-radius: 16px;
  padding: 13px 16px; display: flex; align-items: center; gap: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.req-avatar { width: 44px; height: 62px; flex-shrink: 0; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.18)); }
.req-badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.3px; }
.req-badge.otc { background: #d1fae5; color: #047857; }
.req-badge.rx { background: #fee2e2; color: #b91c1c; }
.req-title { margin-left: 8px; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.req-need { margin-top: 6px; font-weight: 700; font-size: 15px; }

/* compounding block */
.compound-box { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 16px; padding: 14px 16px; }
.compound-head { margin-bottom: 6px; }
.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.3px; }
.tag.rx { background: #fee2e2; color: #b91c1c; }
.tag.otc2 { background: #d1fae5; color: #047857; }
.compound-input-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.compound-input-row label { font-size: 13.5px; font-weight: 700; }
.compound-input-row input { width: 110px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 11px; font-size: 15px; font-family: var(--font); }
.compound-input-row .unit { font-size: 13.5px; color: var(--muted); }

/* Q&A block */
.question-box { background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 16px; padding: 14px 16px; }
.question-head { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; }
.question-options { display: flex; flex-direction: column; gap: 8px; }
.q-opt {
  text-align: left; background: #fff; color: var(--ink);
  border: 1.5px solid var(--line); box-shadow: none;
  font-weight: 600; font-size: 13.5px; padding: 12px 15px; border-radius: 13px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.q-opt::after { display: none; }
.q-opt:hover { border-color: #a78bfa; background: #faf8ff; transform: translateX(3px); box-shadow: none; }
.q-opt.selected { border-color: #7c3aed; background: #ede9fe; box-shadow: 0 0 0 3px rgba(124,58,237,0.12); }

/* medicine grid */
.sku-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; overflow-y: auto; max-height: 26vh; padding: 4px; }
.sku-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 11px 8px; border-radius: 16px;
  border: 2px solid var(--line); background: #fff; cursor: pointer;
  font-size: 12px; color: var(--ink); text-align: center; position: relative;
  box-shadow: none;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.sku-btn::after { display: none; }
.sku-btn:hover { border-color: #6ee7b7; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(15,40,45,0.1); }
.sku-btn .sku-icon { width: 44px; height: 44px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1)); }
.sku-btn .sku-name { font-weight: 700; font-size: 12.5px; }
.sku-btn .sku-stock { font-size: 11px; color: var(--muted); }
.sku-btn.selected { border-color: var(--green); background: #ecfdf3; box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.sku-btn:disabled, .sku-btn.disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.sku-btn .expired-badge { position: absolute; top: 5px; right: 5px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 999px; box-shadow: 0 2px 6px rgba(239,68,68,0.4); }
#serveSearch {
  padding: 11px 15px; border-radius: 13px; border: 1.5px solid var(--line);
  font-size: 14px; font-family: var(--font); outline: none; background: #fbfdfc;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#serveSearch:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.14); }

.panel-actions {
  position: sticky; bottom: -22px; background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  margin: 0 -24px -22px; padding: 12px 24px;
  display: flex; justify-content: flex-end; gap: 12px;
  border-top: 1px solid var(--line);
}

/* ============ calculator ============ */
.calc-panel { width: min(340px, 92vw); }
.calc-display {
  width: 100%; text-align: right; font-size: 28px; font-weight: 700;
  padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc, #f0f7f4);
  font-variant-numeric: tabular-nums; letter-spacing: 0.5px;
  box-shadow: inset 0 2px 6px rgba(15,40,45,0.06);
}
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-key { padding: 16px 0; font-size: 18px; border-radius: 14px; box-shadow: none; }
.calc-key.num { background: #f1f5f9; color: #334155; }
.calc-key.num:hover { background: #e2e8f0; box-shadow: 0 4px 12px rgba(15,40,45,0.1); }
.calc-key.op { background: #d1fae5; color: var(--green-d); }
.calc-key.op:hover { background: #a7f3d0; box-shadow: 0 4px 12px rgba(16,185,129,0.2); }
.calc-key.eq { background: linear-gradient(140deg, #34d399, var(--green-d)); color: #fff; box-shadow: var(--glow-green); }

/* ============ restock / upgrades ============ */
.restock-list, .upgrades-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 56vh; padding: 2px; }
.restock-row, .upgrade-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 16px; background: #fbfdfc;
  transition: box-shadow 0.15s, transform 0.15s;
}
.restock-row:hover, .upgrade-row:hover { box-shadow: 0 6px 16px rgba(15,40,45,0.08); transform: translateY(-1px); }
.restock-row .sku-icon, .upgrade-row .upgrade-icon { width: 40px; height: 40px; flex-shrink: 0; }
.restock-row .row-info, .upgrade-row .row-info { flex: 1; font-size: 13.5px; }
.restock-row .row-info .name, .upgrade-row .row-info .name { font-weight: 700; }
.restock-row .stock-bar-outer { width: 90px; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.restock-row .stock-bar-inner { height: 100%; background: linear-gradient(90deg, #34d399, var(--green)); }
.restock-row .qty-stepper { display: flex; align-items: center; gap: 6px; }
.restock-row .qty-stepper button { padding: 6px 11px; font-size: 14px; box-shadow: none; background: #f1f5f9; color: #334155; border-radius: 10px; }
.restock-row .qty-stepper button:hover { background: #e2e8f0; }
.restock-row .order-btn, .upgrade-row .buy-btn { padding: 9px 16px; font-size: 13px; }

/* ============ multi-item serve ============ */
.serve-items { display: flex; flex-direction: column; gap: 10px; max-height: 34vh; overflow-y: auto; padding: 2px; flex-shrink: 0; }
.serve-item {
  border: 1.5px solid var(--line); border-radius: 16px; padding: 11px 13px;
  background: #fbfdfc; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.serve-item:hover { background: #f4f9f6; }
.serve-item.active { border-color: var(--green); background: #ecfdf3; box-shadow: 0 0 0 3px rgba(16,185,129,0.14); }
.si-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.si-num { font-weight: 800; font-size: 13.5px; }
.si-drug-name { color: var(--green-d); font-weight: 700; font-size: 13px; }
.si-drug-empty { color: #b45309; font-size: 12.5px; font-style: italic; }
.dose-row, .label-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dose-row label, .label-row label { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 78px; }
.dose-row input { width: 100px; }
.label-row input { flex: 1; min-width: 180px; }
.serve-item input {
  padding: 8px 11px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 13.5px; font-family: var(--font); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.serve-item input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.12); }

/* kolom nama obat / R/ yang lebih besar (edukator kunci jawaban + mahasiswa isian) */
.drug-name-field {
  width: 100%; font-family: var(--font); font-size: 15px; line-height: 1.55;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 13px;
  background: #fbfdfc; color: var(--ink); outline: none; resize: vertical;
  min-height: 58px; transition: border-color 0.15s, box-shadow 0.15s;
}
.drug-name-field:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.14); }
.cust-name-block { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.cust-name-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }

/* resep dokter di kotak info pasien (dibaca mahasiswa) */
.req-body { flex: 1; min-width: 0; }
.resep-box { margin-top: 8px; background: #fffdf5; border: 1px dashed #d6c48a; border-radius: 12px; padding: 10px 14px; }
.resep-head { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; color: #9a7b1f; margin-bottom: 5px; }
.resep-line { font-family: 'Courier New', ui-monospace, monospace; font-size: 13.5px; font-weight: 600; color: #3a2f12; white-space: pre-line; line-height: 1.5; }
.si-drug-label { font-weight: 700; font-size: 12.5px; color: var(--green-d); }

/* kartu kotak obat (kotak dummy yang diklik mahasiswa) */
.drug-box {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 12px 8px 10px; border-radius: 14px;
  border: 2px solid var(--line); border-left: 5px solid var(--gol, #64748b);
  background: #fff; color: var(--ink); cursor: pointer; text-align: center;
  box-shadow: none; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.drug-box::after { display: none; }
.drug-box:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(15,40,45,0.1); }
.drug-box.taken { border-color: var(--green); background: #ecfdf3; box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.db-golongan { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.db-count { position: absolute; top: 6px; right: 6px; background: var(--green); color: #fff; font-size: 12px; font-weight: 800; padding: 1px 8px; border-radius: 999px; box-shadow: 0 2px 6px rgba(16,185,129,0.4); }
.db-dec { position: absolute; bottom: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: #fee2e2; color: #b91c1c; font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.db-dec:hover { background: #fecaca; }
.db-icon { width: 44px; height: 44px; margin-top: 2px; }
.db-icon svg { width: 100%; height: 100%; }
.db-name { font-weight: 800; font-size: 12.5px; line-height: 1.2; margin-top: 3px; }
.db-strength { font-weight: 700; font-size: 12px; color: var(--green-d); }
.db-form { font-size: 10.5px; color: var(--muted); line-height: 1.15; margin-top: 1px; }

/* kunci jawaban kotak obat (editor edukator) */
.box-add { margin-bottom: 8px; }
.box-key-list { display: flex; flex-direction: column; gap: 6px; }
.box-key-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfa; }
.bk-name { flex: 1; font-size: 13px; font-weight: 700; min-width: 0; }
.bk-qty { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.bk-qty b { min-width: 14px; text-align: center; }
.bk-unit { font-size: 11.5px; color: var(--muted); }
.bk-inc, .bk-dec { width: 24px; height: 24px; padding: 0; border-radius: 7px; font-size: 15px; background: #eef2f4; color: #334155; box-shadow: none; display: inline-flex; align-items: center; justify-content: center; }
.bk-inc::after, .bk-dec::after, .bk-del::after { display: none; }
.bk-inc:hover, .bk-dec:hover { background: #e2e8f0; transform: none; box-shadow: none; }
.bk-del { background: transparent; color: #dc2626; box-shadow: none; padding: 3px 7px; font-size: 13px; }
.bk-del:hover { background: #fee2e2; transform: none; box-shadow: none; }
.box-key-empty { font-size: 12.5px; color: var(--muted); font-style: italic; padding: 4px 2px; }
.label-warn { font-size: 12px; font-weight: 700; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 6px 10px; line-height: 1.35; margin-top: 6px; }
.label-warn[hidden] { display: none; }
.box-key-warn { font-size: 12px; font-weight: 700; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 6px 10px; line-height: 1.35; }
.bk-tag { font-size: 10.5px; font-weight: 800; color: #0369a1; background: #e0f2fe; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }

/* form "obat baru" di editor dosen — kotak dummy dibuat otomatis dari isian ini */
.box-new { margin-top: 8px; padding: 11px 13px; border: 1px dashed #7dd3b0; border-radius: 12px; background: #f0fdf7; display: flex; flex-direction: column; gap: 9px; }
/* WAJIB: aturan .box-new di atas memakai display:flex, yang mengalahkan `display:none`
   bawaan atribut [hidden] — tanpa baris ini form obat baru selalu terbuka. */
.box-new[hidden] { display: none; }
.box-new-head { font-weight: 800; font-size: 13px; color: var(--green-d); }
.box-new-head .muted { font-weight: 500; font-size: 11.5px; }
.box-new-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.box-new-msg { font-size: 12px; color: var(--muted); }
.box-new-msg.err { color: #dc2626; font-weight: 700; }

/* daftar kotak buatan edukator (kelola / hapus) */
.ti-custom-boxes { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.cb-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfa; }
.cb-name { flex: 1; font-size: 13px; font-weight: 700; min-width: 0; }
.cb-used { font-size: 11.5px; color: var(--muted); font-style: italic; }
.cb-del { background: transparent; color: #dc2626; box-shadow: none; padding: 3px 7px; font-size: 13px; }
.cb-del:hover { background: #fee2e2; transform: none; box-shadow: none; }
.cb-del::after { display: none; }
.cb-del[disabled] { color: #94a3b8; cursor: not-allowed; }
.cb-del[disabled]:hover { background: transparent; }

/* petunjuk "apa yang masih kurang" di samping tombol Serahkan Obat */
.dispense-hint { margin-right: auto; align-self: center; font-size: 12.5px; font-weight: 700; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; padding: 6px 12px; border-radius: 10px; line-height: 1.35; text-align: left; }

/* aturan pakai per obat yang dipilih (bergantian) */
.etiket-head { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.etiket-empty { font-size: 13px; color: var(--muted); font-style: italic; padding: 10px 12px; background: #f8fafc; border: 1px dashed var(--line); border-radius: 12px; }
.etiket-item { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 13px; background: #fbfdfc; cursor: pointer; margin-bottom: 8px; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.etiket-item:hover { background: #f4f9f6; }
.etiket-item.active { border-color: var(--green); background: #ecfdf3; box-shadow: 0 0 0 3px rgba(16,185,129,0.14); }
.etiket-item.filled .ei-num { background: var(--green); }
.ei-head { display: flex; align-items: center; gap: 8px; }
.ei-num { width: 22px; height: 22px; border-radius: 50%; background: #94a3b8; color: #fff; font-weight: 800; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ei-name { font-weight: 800; font-size: 13.5px; }
.ei-qty { font-weight: 800; font-size: 12px; color: var(--green-d); }
.ei-active-tag { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--green-d); background: #d1fae5; padding: 3px 9px; border-radius: 999px; }
.ei-label { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; min-height: 20px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ei-empty { color: #b45309; font-style: italic; font-weight: 500; }
.ei-chip { display: inline-flex; align-items: center; gap: 5px; background: #ecfdf3; border: 1px solid #a7f3d0; color: var(--green-d); font-weight: 700; font-size: 13px; padding: 4px 8px 4px 11px; border-radius: 999px; cursor: pointer; transition: background 0.12s, border-color 0.12s, color 0.12s; }
.ei-chip:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.ei-chip-x { font-size: 10px; font-weight: 800; opacity: 0.6; }
.ei-chip:hover .ei-chip-x { opacity: 1; }
.tok-undo { background: #fef3c7; color: #92400e; }
.tok-undo:hover { background: #fde68a; }
.compound-prompt { white-space: pre-line; font-size: 13px; line-height: 1.55; margin-top: 8px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 12px; padding: 9px 11px; }

.serve-picker { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.picker-hint { font-size: 13px; color: var(--muted); }
.picker-hint b { color: var(--ink); }
.label-toolbar-head { font-size: 12px; color: var(--muted); margin-top: 2px; }
.label-toolbar { display: flex; flex-wrap: wrap; gap: 6px; }
.label-toolbar-state { width: 100%; margin: 0 0 1px; color: #9a641f; font-size: 11px; font-weight: 700; line-height: 1.35; }
.label-toolbar-state.ready { color: #14734d; }
.tok { background: #f1f5f9; color: #334155; box-shadow: none; padding: 7px 11px; font-size: 12.5px; font-weight: 600; border-radius: 10px; }
.tok:hover { background: #e2e8f0; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(15,40,45,0.08); }
.tok-clear { background: #fee2e2; color: #b91c1c; }
.tok-clear:hover { background: #fecaca; }

/* ============ meja kerja pelayanan: empat tahap, seperti game time-management ============ */
#servePanel.service-flow {
  top: auto; bottom: 14px; transform: translateX(-50%);
  width: min(1480px, 97vw); max-height: min(74vh, 760px);
  padding: 14px; gap: 10px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,242,230,0.98)),
    #fff;
  border: 1px solid rgba(144,111,61,0.25);
  box-shadow: 0 24px 70px rgba(25,46,45,0.32), 0 0 0 5px rgba(255,255,255,0.34);
  animation: stationPanelIn 0.34s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes stationPanelIn {
  from { opacity: 0; transform: translateX(-50%) translateY(24px) scale(0.985); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.service-flow-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding: 0 5px 2px; }
.service-flow-head h2 { color: #173f46; font-size: 20px; line-height: 1.1; }
.service-flow-eyebrow { color: #a76d2d; font-size: 10px; font-weight: 900; letter-spacing: 1.7px; margin-bottom: 3px; }
.service-flow-help { color: #68766a; font-size: 12px; font-weight: 700; text-align: right; }
.service-flow-stages { display: grid; grid-template-columns: 1.12fr 1.3fr 1.12fr 0.76fr; gap: 10px; min-height: 0; }
.service-stage {
  min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 9px;
  padding: 11px; border: 1px solid rgba(105,82,46,0.22); border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(247,244,234,0.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 3px 10px rgba(82,61,27,0.07);
  position: relative;
}
.service-stage::after {
  content: ''; position: absolute; right: -7px; top: 42px; z-index: 2; width: 13px; height: 13px;
  background: #d99c50; transform: rotate(45deg); border-top: 1px solid rgba(105,82,46,0.22); border-right: 1px solid rgba(105,82,46,0.22);
}
.stage-dispense::after { display: none; }
.service-stage-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px dashed rgba(129,102,59,0.35); }
.service-stage-head > span {
  display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border-radius: 50%;
  background: linear-gradient(145deg, #e9b462, #b76b30); color: #fff; font-size: 13px; font-weight: 900;
  box-shadow: 0 2px 5px rgba(116,67,25,0.24);
}
.service-stage-head b { display: block; color: #24454a; font-size: 13px; line-height: 1.1; }
.service-stage-head small { display: block; margin-top: 2px; color: #78837a; font-size: 10px; font-weight: 650; }
#servePanel.service-flow .request-info { padding: 9px; gap: 8px; align-items: flex-start; overflow: auto; }
#servePanel.service-flow .req-avatar { width: 34px; height: 50px; }
#servePanel.service-flow .req-title { margin-left: 4px; font-size: 11px; }
#servePanel.service-flow .req-need { font-size: 12px; }
#servePanel.service-flow .resep-paper { margin-top: 5px; padding: 8px 10px 7px; }
#servePanel.service-flow .resep-paper .resep-line { font-size: 15px; }
#servePanel.service-flow .rp-klinik { font-size: 10px; }
#servePanel.service-flow .rp-rx { font-size: 43px; top: 37px; }
#servePanel.service-flow .question-box { padding: 9px; overflow: auto; }
#servePanel.service-flow .question-head { font-size: 12px; margin-bottom: 6px; }
#servePanel.service-flow .question-options { gap: 5px; }
#servePanel.service-flow .q-opt { padding: 7px 8px; font-size: 11px; border-radius: 9px; }
#servePanel.service-flow .serve-picker { padding-top: 0; border-top: 0; min-height: 0; }
#servePanel.service-flow #serveSearch { padding: 8px 10px; font-size: 12px; }
#servePanel.service-flow .picker-hint { font-size: 11px; line-height: 1.35; }
#servePanel.service-flow #serveSkuGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; max-height: none; flex: 1; min-height: 0; overflow-y: auto; padding: 9px 7px; border-radius: 12px; }
#servePanel.service-flow .drug-box { min-height: 100px; padding: 14px 4px 6px; border-left-width: 3px; border-radius: 9px; }
#servePanel.service-flow .db-icon { width: 31px; height: 31px; }
#servePanel.service-flow .db-name { font-size: 9px; }
#servePanel.service-flow .db-strength { font-size: 9px; }
#servePanel.service-flow .db-form, #servePanel.service-flow .db-pack, #servePanel.service-flow .db-barcode { display: none; }
#servePanel.service-flow .db-golongan { top: 3px; left: 3px; width: 15px; height: 15px; font-size: 8px; }
#servePanel.service-flow .db-count { top: 3px; right: 3px; padding: 1px 5px; font-size: 9px; }
#servePanel.service-flow .db-dec { bottom: 3px; right: 3px; width: 17px; height: 17px; font-size: 13px; }
#servePanel.service-flow .serve-items { max-height: none; flex: 1; min-height: 0; gap: 6px; padding: 1px; }
#servePanel.service-flow .etiket-item { padding: 7px 8px; margin-bottom: 5px; border-radius: 10px; }
#servePanel.service-flow .ei-name { font-size: 11px; }
#servePanel.service-flow .ei-label { padding: 4px 5px; font-size: 11px; min-height: 18px; }
#servePanel.service-flow .ep-kop { padding: 3px 5px; }
#servePanel.service-flow .ep-kop b { font-size: 9px; }
#servePanel.service-flow .ep-no, #servePanel.service-flow .ep-foot { font-size: 8px; }
#servePanel.service-flow .ep-chips { gap: 3px; padding: 5px; min-height: 25px; }
#servePanel.service-flow .ei-chip { font-size: 10px; padding: 3px 5px 3px 7px; }
#servePanel.service-flow .label-toolbar-head { font-size: 10px; }
/* Papan token: 96px hanya memuat ±1/3 token (isi ±300px), sehingga kata rute pemakaian
   di bagian bawah praktis tak terjangkau mahasiswa. Tinggi ikut layar, tetap menyisakan
   ruang untuk daftar etiket di atasnya. */
#servePanel.service-flow .label-toolbar { max-height: clamp(120px, 32vh, 300px); overflow-y: auto; align-content: flex-start; padding-right: 2px; }
/* penanda "masih ada token di bawah" — kelas has-more dipasang renderLabelToolbar() saat isi melebihi tinggi */
.label-toolbar-head.has-more::after { content: ' · gulir untuk kata lainnya'; color: #b45309; font-weight: 700; }
#servePanel.service-flow .tok { padding: 5px 7px; font-size: 10px; border-radius: 8px; }
.dispense-tray {
  min-height: 108px; border: 2px dashed #c9a66a; border-radius: 14px; padding: 14px 9px; display: flex; align-items: end; justify-content: center; gap: 5px;
  background: linear-gradient(135deg, #fffdf5, #f4ead0); box-shadow: inset 0 2px 8px rgba(106,74,30,0.12);
}
.dispense-tray span { position: absolute; align-self: flex-start; color: #b77b32; font-family: Georgia, serif; font-size: 25px; font-weight: 700; }
.dispense-tray i { width: 31%; height: 48px; display: block; border: 2px solid #b3cddd; border-radius: 4px 8px 5px 5px; background: linear-gradient(180deg, #fefefe 0 20%, #6ca8c6 20% 31%, #fff 31%); box-shadow: 0 3px 5px rgba(74,79,77,0.16); transform: rotate(-4deg); }
.dispense-tray i:nth-child(3) { height: 60px; transform: rotate(3deg); background: linear-gradient(180deg, #fefefe 0 20%, #db8f72 20% 31%, #fff 31%); }
.dispense-tray i:nth-child(4) { height: 41px; transform: rotate(-1deg); background: linear-gradient(180deg, #fefefe 0 20%, #8dbf8a 20% 31%, #fff 31%); }
.dispense-copy { color: #69776c; font-size: 11px; line-height: 1.45; text-align: center; }
#servePanel.service-flow .panel-actions { position: static; margin: auto 0 0; padding: 0; background: none; border-top: 0; display: grid; gap: 7px; }
#servePanel.service-flow .panel-actions button { width: 100%; padding: 9px 8px; font-size: 11px; }
#servePanel.service-flow .dispense-hint { margin: 0; font-size: 10px; padding: 6px 7px; }

@media (max-width: 1080px) {
  #servePanel.service-flow { max-height: min(78vh, 800px); overflow-y: auto; }
  .service-flow-stages { grid-template-columns: 1fr 1.25fr; }
  .service-stage { min-height: 260px; }
  .service-stage::after { display: none; }
  #servePanel.service-flow .serve-picker, #servePanel.service-flow .serve-items { min-height: 170px; }
}

@media (max-width: 620px) {
  #servePanel.service-flow { bottom: 6px; width: 98vw; max-height: calc(100vh - var(--hud-h) - 12px); padding: 10px; }
  .service-flow-head { align-items: start; }
  .service-flow-help { display: none; }
  .service-flow-stages { grid-template-columns: 1fr; }
  .service-stage { min-height: 0; overflow: visible; }
  #servePanel.service-flow .serve-picker, #servePanel.service-flow .serve-items { min-height: 190px; }
}

/* ============ teacher item cards ============ */
.ti-items-head { font-weight: 800; font-size: 14px; margin-top: 4px; }
.ti-items-head .muted { font-weight: 500; color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.ti-item { border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; background: #f8fbfa; display: flex; flex-direction: column; gap: 10px; }
.ti-item-head { display: flex; justify-content: space-between; align-items: center; }
.ti-item-num { font-weight: 800; font-size: 13px; color: var(--green-d); }
.ti-item-del { background: transparent; color: #dc2626; box-shadow: none; padding: 3px 8px; font-size: 12px; }
.ti-item-del:hover { background: #fee2e2; transform: none; box-shadow: none; }

/* ============ animations ============ */
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes panelPop { from { opacity: 0; transform: translate(-50%, -46%) scale(0.97); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(6vw, 4vh) scale(1.15); }
}
@keyframes gradientShift {
  from { background-position: 0% center; }
  to { background-position: 100% center; }
}
@keyframes iconBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: var(--shadow-sm), 0 0 24px var(--green-glow); }
  50% { box-shadow: var(--shadow-md), 0 0 44px rgba(16,185,129,0.55); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 620px) {
  #landingScreen { justify-content: center; padding-left: 20px; padding-right: 20px; background-position: 67% center; }
  #landingScreen .landing { width: min(100%, 520px); }
  .brand { font-size: 32px; }
  #hud { font-size: 13px; gap: 8px; padding: 0 8px; }
  .hud-block { padding: 4px 9px; gap: 5px; }
  .hud-reputation { flex: 0 0 auto; }
  .meter { width: 70px; }
  .teacher-body { grid-template-columns: 1fr; }
  .teacher-list-col { border-right: none; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
  .teacher-list { max-height: 26vh; }
  .serve-feedback-card { padding: 24px 18px; }
  .feedback-item-head { align-items: flex-start; flex-direction: column; gap: 3px; }
}

/* ============================================================
   VISUAL PASS 2026-07-19 — Fase 1–4 (murni presentasi)
   Referensi: Two Point Hospital (karakter/palet), Papa's series
   (tiket resep & build station), Good Pizza (rak), Overcooked
   (emote kesabaran), Project Hospital (dokumen medis).
   ============================================================ */

/* ---- Fase 1: karakter hidup ---- */
.customer { animation: custIn 0.35s ease; }
@keyframes custIn { from { opacity: 0; } to { opacity: 1; } }
.customer svg { animation: custBob 2.8s ease-in-out infinite; }
@keyframes custBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }

/* ---- Fase 2a: lembar resep dokter (ala tiket pesanan Papa's) ---- */
.resep-paper {
  position: relative; background: #fffef8;
  border: 1px solid #e3dcc4; border-radius: 6px 6px 12px 12px;
  padding: 10px 16px 8px; margin-top: 8px;
  box-shadow: 0 8px 20px rgba(60,45,10,0.14), 0 1px 0 #fff inset;
  transform: rotate(-0.5deg); overflow: hidden;
}
.rp-kop { text-align: center; border-bottom: 3px double #2e7d5b; padding-bottom: 6px; margin-bottom: 7px; }
.rp-klinik { font-weight: 800; font-size: 13px; letter-spacing: 1.5px; color: #1d5c44; }
.rp-dokter { font-size: 10px; color: #5f7078; margin-top: 2px; }
.rp-alamat { font-size: 9px; color: #8a97a0; }
.rp-rx { position: absolute; left: 10px; top: 44px; font-size: 64px; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; color: #2e7d5b; opacity: 0.09; pointer-events: none; }
.rp-body { position: relative; padding-left: 20px; }
.resep-paper .resep-line { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 20px; font-weight: 600; color: #26221a; line-height: 1.3; white-space: pre-line; }
.rp-foot { display: flex; justify-content: space-between; align-items: flex-end; border-top: 1px dashed #d8d2ba; margin-top: 8px; padding-top: 6px; }
.rp-pro { font-size: 11.5px; font-weight: 700; color: #3a4a52; }
.rp-stamp {
  width: 42px; height: 42px; border: 2px solid #4f46e5; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 8.5px; font-weight: 800; line-height: 1.15; color: #4f46e5;
  opacity: 0.55; transform: rotate(12deg); flex-shrink: 0;
}

/* ---- Fase 2b: etiket apotek asli (putih = oral, biru = obat luar) ---- */
.ei-label.etiket-paper { display: block; padding: 0; background: #fff; border: 1.6px solid #7a90a8; border-radius: 9px; overflow: hidden; }
.ep-kop { text-align: center; padding: 5px 8px 4px; border-bottom: 1.4px solid #7a90a8; }
.ep-kop b { font-size: 11px; letter-spacing: 1.2px; color: #1e3a5f; }
.ep-kop span { display: block; font-size: 8.5px; color: #64748b; margin-top: 1px; }
.ep-no { display: flex; justify-content: space-between; font-size: 10px; font-weight: 600; color: #475569; padding: 3px 10px; border-bottom: 1px dashed #cbd5e1; }
.ep-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; padding: 9px 10px; min-height: 36px; }
.ep-foot { text-align: center; font-size: 9.5px; font-style: italic; color: #64748b; border-top: 1px dashed #cbd5e1; padding: 3px 8px 5px; }
.ei-label.etiket-paper.biru { background: #eaf3ff; border-color: #2563eb; }
.etiket-paper.biru .ep-kop { border-color: #2563eb; }
.etiket-paper.biru .ep-foot { color: #1d4ed8; font-weight: 800; font-style: normal; letter-spacing: 1.5px; }

/* ---- Fase 3: kemasan obat + rak etalase ---- */
#serveSkuGrid {
  background:
    repeating-linear-gradient(180deg, transparent 0 118px, rgba(0,0,0,0.12) 118px 122px),
    linear-gradient(180deg, #cda672, #b98d55);
  border: 1px solid #a97e4b; border-radius: 16px;
  padding: 14px 12px;
  box-shadow: inset 0 2px 10px rgba(60,35,5,0.28), inset 0 -2px 6px rgba(255,235,200,0.25);
}
.drug-box { padding-top: 17px; box-shadow: 0 4px 10px rgba(45,30,5,0.28); }
.db-band { position: absolute; top: 0; left: 0; right: 0; height: 9px; background: linear-gradient(90deg, var(--brand), var(--brand) 60%, rgba(255,255,255,0.35)); border-radius: 12px 12px 0 0; }
.db-strength { color: var(--brand); }
.db-pack { font-size: 9.5px; color: var(--muted); margin-top: 1px; line-height: 1.1; }
.db-barcode { width: 58%; height: 9px; margin-top: 4px; border-radius: 1px; opacity: 0.45; background: repeating-linear-gradient(90deg, #1e293b 0 1.5px, transparent 1.5px 4px); }
.drug-box:hover { transform: perspective(620px) rotateX(7deg) translateY(-4px); box-shadow: 0 12px 24px rgba(45,30,5,0.35); }
.drug-box.taken { box-shadow: 0 0 0 3px rgba(16,185,129,0.2), 0 6px 14px rgba(45,30,5,0.3); }

/* ---- Fase 4: ambience & juice ---- */
/* tint waktu-hari per level (overlay di atas scene + pasien, tak bisa diklik) */
#customerLayer::after { content: ''; position: absolute; inset: 0; pointer-events: none; transition: background 0.8s ease; }
#customerLayer[data-tod="0"]::after { background: linear-gradient(180deg, rgba(180,220,255,0.10), rgba(255,255,255,0)); }
#customerLayer[data-tod="1"]::after { background: rgba(255,245,200,0.05); }
#customerLayer[data-tod="2"]::after { background: linear-gradient(200deg, rgba(255,150,60,0.13), rgba(90,60,120,0.10)); }

.score-float {
  position: fixed; left: 50%; top: 42%; transform: translateX(-50%);
  font-size: 30px; font-weight: 800; color: var(--green-d);
  text-shadow: 0 2px 10px rgba(255,255,255,0.9), 0 2px 4px rgba(0,0,0,0.15);
  z-index: 80; pointer-events: none;
  animation: scoreFloatUp 1.35s ease-out forwards;
}
@keyframes scoreFloatUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.85); }
  18% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.08); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-64px) scale(1); }
}
.serve-stamp {
  position: fixed; left: 50%; top: 22%; transform: translateX(-50%) rotate(-8deg);
  padding: 10px 22px; border: 4px solid; border-radius: 12px;
  font-size: 24px; font-weight: 800; letter-spacing: 2px;
  background: rgba(255,255,255,0.92); z-index: 80; pointer-events: none;
  animation: stampIn 1.5s ease forwards;
}
.serve-stamp.ok { color: #15803d; border-color: #15803d; }
.serve-stamp.warn { color: #b45309; border-color: #b45309; }
@keyframes stampIn {
  0% { opacity: 0; transform: translateX(-50%) rotate(-8deg) scale(2.2); }
  16% { opacity: 1; transform: translateX(-50%) rotate(-8deg) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) rotate(-8deg) scale(0.96) translateY(-10px); }
}
.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confetti span {
  position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px;
  animation-name: confettiFall; animation-timing-function: ease-in; animation-fill-mode: forwards;
}
@keyframes confettiFall { to { transform: translateY(106vh) rotate(560deg); } }

/* ---- layar "waktu habis" (sesi evaluasi 15 menit) ---- */
.timeup-icon { font-size: 46px; line-height: 1; margin-bottom: 4px; }
#timeUpScreen h1 { color: #b45309; letter-spacing: 1px; }
.timeup-score { font-size: 19px; font-weight: 800; color: var(--green-d); margin: 2px 0 10px; }

/* ---- rincian penilaian di layar umpan balik ---- */
.feedback-score { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; background: #f8fbfa; margin-bottom: 10px; display: flex; flex-direction: column; gap: 3px; }
.feedback-score .fs-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.feedback-score .fs-row.minus { color: #b91c1c; }
.feedback-score .fs-row.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 5px; font-weight: 800; }
.feedback-score .fs-row.session { color: var(--muted); font-size: 12px; }

/* ============================================================
   LEVEL 2 — analisis hitungan dosis (2026-09-13)
   ============================================================ */

/* Layar transisi: pakai ulang ilustrasi apoteker+rak yang sama seperti landing,
   dengan teknik overlay yang sama (gradien terang di kiri untuk keterbacaan teks). */
#level2IntroScreen {
  justify-content: flex-start;
  padding-left: clamp(28px, 8vw, 150px);
  background:
    linear-gradient(90deg, rgba(8, 37, 34, 0.22) 0%, rgba(8, 37, 34, 0.08) 44%, rgba(8, 37, 34, 0.34) 100%),
    url('assets/digi-pharma-landing-hero-coral.png') center / cover no-repeat;
}
#level2IntroScreen::before, #level2IntroScreen::after { display: none; }
#level2IntroScreen .landing {
  width: min(610px, 88vw);
  color: #173f3b;
  text-align: left;
  text-shadow: 0 1px 0 rgba(255,255,255,0.65);
}
.l2-eyebrow { font-size: 13px; font-weight: 900; letter-spacing: 3px; color: #b45309; margin-bottom: 6px; }
.l2-intro-heading { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
#level2IntroScreen .subtitle { color: #244a46; max-width: 480px; }
#level2IntroScreen .start-row { justify-content: flex-start; }

/* Layar worksheet Level 2 */
.l2-screen { align-items: flex-start; padding: 26px; overflow-y: auto; }
.l2-wrap {
  width: min(1100px, 100%);
  margin: 0 auto;
  background: rgba(255,255,255,0.97);
  border-radius: 28px;
  padding: 26px 30px 30px;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
.l2-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.l2-progress { font-weight: 800; color: var(--blue); font-size: 14px; }
.l2-score { font-weight: 800; color: var(--green-d); font-size: 14px; }
.l2-case-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.3px; }

.l2-columns { display: grid; grid-template-columns: 0.85fr 1.5fr 0.7fr; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .l2-columns { grid-template-columns: 1fr 1.4fr; } .l2-mascot { display: none; } }
@media (max-width: 700px) { .l2-columns { grid-template-columns: 1fr; } }

.l2-block-head { font-size: 11px; font-weight: 900; letter-spacing: 1.5px; color: var(--muted); margin: 14px 0 6px; text-transform: uppercase; }
.l2-block-head:first-child { margin-top: 0; }
.l2-resep, .l2-catatan {
  background: #fbfaf5; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px;
}
.l2-resep-line { font-family: 'Caveat', 'Segoe Script', cursive; font-size: 21px; font-weight: 600; color: #26221a; white-space: pre; line-height: 1.35; }
.l2-catatan-line { font-size: 13.5px; color: #3a4a52; line-height: 1.7; }

.l2-questions { display: flex; flex-direction: column; gap: 18px; }
.l2-question { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #fcfdfd; }
.l2-qtext { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; }

/* Dua panel per pertanyaan (sesuai sketsa): Perhitungan (ketik manual, kiri) |
   Jawaban (tombol dosis / isian angka, kanan). */
.l2-qbody { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 640px) { .l2-qbody { grid-template-columns: 1fr; } }
.l2-pane-label { display: block; font-size: 11px; font-weight: 900; letter-spacing: 0.6px; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.l2-pane-label .muted { text-transform: none; font-weight: 600; letter-spacing: 0; color: #94a3b8; }
.l2-calc-pane, .l2-answer-pane { background: #f8fafc; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; }
.l2-calc-hint { font-size: 11.5px; color: #94a3b8; margin-top: 4px; font-style: italic; }

.l2-verdict-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.l2-prefix { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.l2-verdict-btns { display: flex; flex-direction: column; gap: 8px; }
.l2v {
  background: #fff; color: var(--ink); border: 2px solid var(--line);
  box-shadow: none; padding: 8px 16px; font-size: 13.5px; border-radius: 10px;
}
.l2v:hover { background: #f0fdf9; border-color: var(--green); box-shadow: none; }
.l2v.selected { border-color: var(--blue); background: #eef0ff; color: #3730a3; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.l2v.correct-answer { font-weight: 900; }
.l2v.chosen-correct { border-color: #15803d; background: #dcfce7; color: #15803d; }
.l2v.chosen-wrong { border-color: #b91c1c; background: #fee2e2; color: #b91c1c; }
.l2v.correct-answer:not(.chosen-correct):not(.chosen-wrong) { border-color: #15803d; box-shadow: 0 0 0 2px rgba(21,128,61,0.25); }

.l2-expl-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.l2-expl {
  width: 100%; min-height: 64px; resize: vertical; font-family: var(--font); font-size: 13.5px;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; color: var(--ink);
}
.l2-expl:disabled { background: #f8fafc; color: #64748b; }

.l2-numeric-row { display: flex; align-items: center; gap: 8px; }
.l2-num-input {
  width: 110px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
  font-family: var(--font);
}
.l2-num-input.chosen-correct { border-color: #15803d; background: #dcfce7; }
.l2-num-input.chosen-wrong { border-color: #b91c1c; background: #fee2e2; }
.l2-unit { font-size: 13px; color: var(--muted); font-weight: 600; }

.l2-feedback { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.l2-fb-verdict { font-weight: 800; font-size: 13.5px; margin-bottom: 5px; }
.l2-fb-verdict.ok { color: #15803d; }
.l2-fb-verdict.warn { color: #b45309; }
.l2-fb-model { font-size: 13px; line-height: 1.6; color: #3a4a52; }

.l2-actions { justify-content: flex-end; margin-top: 22px; }

/* Tombol ini baru muncul sesudah jawaban diperiksa. Denyut warna dan panah
   bergerak memberi isyarat jelas bahwa pemain sudah bisa berganti kasus. */
#level2NextBtn:not(.hidden) {
  position: relative;
  min-width: 270px;
  padding: 13px 24px;
  border: 2px solid rgba(255,255,255,0.92);
  background: linear-gradient(105deg, #0f9f78, #2563eb);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.35px;
  box-shadow: 0 0 0 0 rgba(37,99,235,0.42), 0 12px 26px rgba(15,159,120,0.30);
  animation: l2NextAttention 1.15s ease-in-out infinite;
}
#level2NextBtn:not(.hidden):hover {
  background: linear-gradient(105deg, #0b8565, #1d4ed8);
  animation-play-state: paused;
  transform: translateY(-2px) scale(1.02);
}
@keyframes l2NextAttention {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 0 0 0 rgba(37,99,235,0.42), 0 12px 26px rgba(15,159,120,0.30); }
  50% { transform: translateY(-3px) scale(1.035); box-shadow: 0 0 0 9px rgba(37,99,235,0), 0 16px 34px rgba(37,99,235,0.38); }
}

/* Panel apoteker pendamping: menatap pemain sambil mengangkat pensil dan
   memegang buku catatan agar terasa aktif membimbing analisis dosis. */
.l2-mascot { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; }
.l2-mascot-art {
  width: 100%; aspect-ratio: 3 / 4; border-radius: 18px;
  background-image: url('assets/level2-pharmacist-guide.png');
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}
.l2-mascot-note { font-size: 12px; color: var(--muted); text-align: center; font-style: italic; }
