@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Share+Tech+Mono&family=Oswald:wght@400;600;700&display=swap');

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

:root {
  --bg:           #110e0b;
  --bg2:          #18130f;
  --panel:        #231b15;
  --panel2:       #2e241c;
  --booth-bg:     #101612;
  --desk:         #472f17;
  --desk-dark:    #2d1c0b;
  --desk-grain:   rgba(255,220,150,0.05);
  --line:         #574632;
  --line2:        #382b1d;
  --text:         #ebdbc2;
  --text-muted:   #9e8f75;
  --text-dim:     #695b47;
  --lime:         #9cd270;
  --lime-dark:    #5b843e;
  --red:          #c63d3d;
  --red-light:    #eb6666;
  --yellow:       #e0b246;
  --green:        #439958;
  --green-light:  #70c584;
  --stamp-approve:#175f2c;
  --stamp-deny:   #8a1a1a;
  --paper:        #ebd9ba;
  --paper-dark:   #cfbe9b;
  --paper-line:   #b09e7c;
  --ink:          #16120e;
  --military:     #344125;
  --military2:    #495b33;
  --rust:         #78361d;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 13px;
  user-select: none;
}

/* CRT Scanlines Filter */
body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.08) 2px, rgba(0,0,0,0.08) 4px);
  pointer-events: none;
  z-index: 9999;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   HEADER HUD (COMPACT MILITARY STATUS)
══════════════════════════════════════════════ */
#hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px;
  background: var(--bg2);
  border-bottom: 2px solid var(--line2);
  height: 38px;
  flex-shrink: 0;
  gap: 10px;
  z-index: 100;
}
.hud-brand { display: flex; flex-direction: column; }
.hud-title {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.1;
}
.hud-sub {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 1px;
}
.hud-stats {
  display: flex;
  gap: 10px;
  align-items: center;
}
.hud-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.3);
  padding: 2px 7px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.06);
}
.hud-stat .s-label {
  font-size: 8px;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hud-stat .s-val {
  font-size: 12px;
  font-weight: bold;
  color: var(--text);
}
.hud-stat .s-val.good { color: var(--green-light); }
.hud-stat .s-val.bad  { color: var(--red-light); }

.hud-audio-btn {
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--line);
  color: var(--yellow);
  padding: 3px 8px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}
.hud-audio-btn:hover { background: var(--line2); }


.hud-stat.warnbox .s-val { color: var(--yellow); }
.hud-btn, .hud-audio-btn { white-space: nowrap; }
.hud-audio-btn:focus-visible { outline: 2px solid var(--yellow); }
kbd { background:#1c1610; border:1px solid var(--line); padding:0 4px; border-radius:2px; font-size:10px; color:var(--yellow); font-family:inherit; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
/* MAIN GAME VIEWPORT */
#game-viewport {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   ZONA 1: CHECKPOINT OUTSIDE VIEW (TAMPILAN LUAR)
══════════════════════════════════════════════ */
#checkpoint-view {
  height: 12%;
  min-height: 88px;
  max-height: 104px;
  background: linear-gradient(180deg, #182226 0%, #111a1d 55%, #0b1113 100%);
  border-bottom: 3px solid #2d261e;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 10px 4px;
  flex-shrink: 0;
}

/* Cold misty snowfall animation */
.checkpoint-snow {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1.5px 1.5px at 20px 30px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 70px 60px, #e0f0f5, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 150px 20px, #d0e8ef, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 230px 80px, #ffffff, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 320px 40px, #e8f4f8, rgba(0,0,0,0));
  background-size: 350px 150px;
  animation: snowDrift 14s linear infinite;
  opacity: 0.35;
  pointer-events: none;
}
@keyframes snowDrift {
  from { background-position: 0 0; }
  to   { background-position: 100px 300px; }
}

/* Antrean Siluet Warga di Kiri */
.checkpoint-queue-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 5;
  width: 250px;
}
.queue-signboard {
  font-size: 7.5px;
  letter-spacing: 2px;
  color: #728a86;
  text-transform: uppercase;
  background: rgba(0,0,0,0.5);
  padding: 1px 6px;
  border-left: 2px solid #52756e;
  display: inline-block;
  width: fit-content;
}
.outside-queue-silhouettes {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 46px;
}
.queue-sil-person {
  width: 14px;
  height: 44px;
  position: relative;
  opacity: 0.8;
  transition: transform 0.4s ease;
}
.queue-sil-person.waiting { animation: silIdleBob 3s ease-in-out infinite alternate; }
@keyframes silIdleBob { 0%{ transform:translateY(0); } 100%{ transform:translateY(-2px); } }

/* Pixel Silhouette Figure */
.sil-head {
  width: 10px; height: 11px; background: #1c2524; border-radius: 50% 50% 30% 30%;
  margin: 0 auto; position: relative;
}
.sil-torso {
  width: 14px; height: 24px; background: #131a19; border-radius: 3px 3px 0 0;
  margin-top: 1px;
}
.sil-legs {
  width: 10px; height: 9px; display: flex; justify-content: space-between; margin: 0 auto;
}
.sil-legs span { width: 4px; height: 100%; background: #0c1211; }

/* Active Silhouette (Maju ke Loket / Lewat Gerbang) */
.active-silhouette {
  position: absolute;
  bottom: 4px;
  left: 260px;
  width: 18px;
  height: 50px;
  z-index: 10;
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.active-silhouette.idle-hidden { opacity: 0; transform: translateX(-40px); }
.active-silhouette.at-booth {
  opacity: 1;
  transform: translateX(0);
}
.active-silhouette.crossing-gate {
  animation: walkThroughGate 2.2s ease-in-out forwards;
}
@keyframes walkThroughGate {
  0%   { left: 260px; opacity: 1; transform: scaleX(1); }
  35%  { left: 440px; opacity: 1; }
  75%  { left: 620px; opacity: 0.9; }
  100% { left: 820px; opacity: 0; transform: scaleX(1); }
}

.active-silhouette.rejected-turn {
  animation: walkRejectedBack 2s ease-in-out forwards;
}
@keyframes walkRejectedBack {
  0%   { left: 260px; opacity: 1; transform: scaleX(1); }
  20%  { transform: scaleX(-1); }
  60%  { left: 100px; opacity: 0.8; transform: scaleX(-1); }
  100% { left: -60px; opacity: 0; transform: scaleX(-1); }
}

.active-silhouette .silhouette-body {
  width: 16px;
  height: 48px;
  background: #0f1615;
  border-radius: 4px 4px 1px 1px;
  position: relative;
  box-shadow: 0 0 10px rgba(0,0,0,0.6);
}
.active-silhouette .silhouette-body::before {
  content: ''; position: absolute; top: -11px; left: 2px; width: 12px; height: 12px;
  background: #192422; border-radius: 50%;
}

/* Gerbang Perbatasan & Menara di Kanan */
.checkpoint-gate-structure {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  position: relative;
  z-index: 5;
}
.guard-tower {
  width: 44px;
  height: 80px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tower-cabin {
  width: 38px; height: 24px; background: #1e2622; border: 2px solid #33403a;
  position: relative; border-radius: 2px;
}
.tower-window {
  display: block; width: 18px; height: 8px; background: #e5b342;
  margin: 5px auto 0; box-shadow: 0 0 8px rgba(229,179,66,0.6);
}
.tower-legs {
  width: 28px; height: 56px; border-left: 3px solid #232c28; border-right: 3px solid #232c28;
  position: relative;
}
.tower-legs::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, #232c28 8px, #232c28 10px);
}

.spotlight-beam {
  position: absolute;
  top: 10px;
  left: -90px;
  width: 140px;
  height: 70px;
  background: linear-gradient(135deg, rgba(255,230,150,0.2) 0%, rgba(255,230,150,0) 80%);
  transform-origin: top right;
  animation: beamSweep 6s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes beamSweep {
  0%   { transform: rotate(-15deg); opacity: 0.15; }
  100% { transform: rotate(18deg); opacity: 0.35; }
}

.wire-fence {
  width: 60px;
  height: 48px;
  background: repeating-linear-gradient(90deg, #1a221f 0 2px, transparent 2px 8px),
              repeating-linear-gradient(0deg,  #1a221f 0 2px, transparent 2px 8px);
  border-top: 2px solid #303d38;
}

.barrier-gate {
  width: 80px;
  height: 48px;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.gate-post {
  width: 14px;
  height: 40px;
  background: #2b332b;
  border: 2px solid #414d41;
  position: relative;
}
.gate-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c63d3d;
  box-shadow: 0 0 6px #c63d3d;
  margin: 4px auto 0;
  transition: all 0.3s;
}
.gate-light.green {
  background: #439958;
  box-shadow: 0 0 10px #70c584;
}

.gate-boom {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 70px;
  height: 6px;
  background: repeating-linear-gradient(90deg, #c63d3d 0 10px, #ffffff 10px 20px);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.gate-boom.open {
  transform: rotate(-65deg);
}

.border-sign {
  background: #1c221e;
  border: 2px solid #4a5c53;
  padding: 3px 8px;
  text-align: center;
  font-family: 'Oswald', sans-serif;
  color: var(--yellow);
  font-size: 10px;
  letter-spacing: 1px;
}
.border-sign small { font-size: 7px; color: #8ea89c; display: block; }

/* ══════════════════════════════════════════════
   ZONA 2: LOKET — KARAKTER DI TENGAH
           PANEL KIRI / PANEL KANAN
══════════════════════════════════════════════ */
#booth-section {
  /* Jendela karakter sekarang di TENGAH layar */
  --win-w: clamp(280px, 30%, 380px);
  --win-left: calc(50% - var(--win-w) / 2);
  --counter-h: 28px;
  height: 38%;
  min-height: 236px;
  max-height: 280px;
  background: var(--booth-bg);
  border-bottom: 4px solid var(--line2);
  display: flex;
  position: relative;
  flex-shrink: 0;
}

#booth-window {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #0f1612;
  min-width: 0;
}

#booth-bg-wall {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(0deg,  rgba(0,0,0,0.12) 0 1px, transparent 1px 20px),
    linear-gradient(180deg, #1b271e 0%, #0c120e 100%);
  pointer-events: none;
}

/* ── MIC (sisi kiri loket) ── */
.booth-intercom-speaker {
  position: absolute;
  top: 14px;
  left: 16px;
  width: 62px;
  background: #28221c;
  border: 2px solid #5b4c38;
  padding: 6px 5px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  z-index: 14;
  border-radius: 2px;
  transition: all 0.2s;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}
.booth-intercom-speaker:hover:not(.mic-disabled) { border-color: var(--yellow); transform: scale(1.05); }
.booth-intercom-speaker.mic-active { border-color: var(--lime); box-shadow: 0 0 12px rgba(156,210,112,0.45), 3px 3px 0 rgba(0,0,0,0.5); }
.booth-intercom-speaker.mic-disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.7); }
.speaker-grille-metal { display: grid; grid-template-columns: repeat(4, 5px); gap: 3px; background: #13100d; padding: 4px; }
.speaker-grille-metal span { width: 5px; height: 5px; background: #4a4034; border-radius: 1px; }
.speaker-tag { font-family: 'Oswald', sans-serif; font-size: 11px; font-weight: 700; color: var(--yellow); letter-spacing: 2px; }
.mic-led { width: 8px; height: 8px; border-radius: 50%; background: #4a1a1a; border: 1px solid rgba(0,0,0,0.6); }
.mic-active .mic-led, .mic-ready .mic-led { background: #44e05b; box-shadow: 0 0 8px #44e05b; }

/* ── JENDELA LOKET (kiri-bawah) ── */
#window-frame {
  position: absolute;
  left: var(--win-left);
  top: 12px;
  bottom: var(--counter-h);
  width: var(--win-w);
  border: 6px solid #4d4333;
  border-bottom: none;
  box-shadow: inset 0 0 0 2px #1a1510, inset 0 0 24px rgba(0,0,0,0.75), 0 0 0 2px #1a1510, 6px 0 14px rgba(0,0,0,0.5);
  overflow: hidden;
  z-index: 5;
  background: #0b1214;
}
.window-outside {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(10,14,12,0.55) 0 2px, transparent 2px 14px) bottom / 100% 34% no-repeat,
    radial-gradient(ellipse at 70% 100%, rgba(120,150,140,0.35), transparent 60%),
    linear-gradient(180deg, #25353a 0%, #15222a 55%, #0d1417 100%);
}
#npc-area {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 4;
}
#npc-sprite-wrap {
  position: relative; height: 100%;
  display: flex; align-items: flex-end; justify-content: center;
  cursor: pointer;
}
#npc-sprite-wrap.entering { animation: npcEnter 0.65s cubic-bezier(.22,1,.36,1) both; }
@keyframes npcEnter {
  from { transform: translateX(-90px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
#npc-sprite-wrap.exit-approve { animation: npcExitOk 0.75s ease-in forwards; }
#npc-sprite-wrap.exit-deny    { animation: npcExitNo 0.75s ease-in forwards; }
@keyframes npcExitOk { to { transform: translateX(160px); opacity: 0; } }
@keyframes npcExitNo { 0% { transform: translateX(0); filter: none; } 25% { transform: translateX(8px); filter: sepia(1) saturate(4) hue-rotate(-30deg); } 100% { transform: translateX(-130px); opacity: 0; filter: sepia(1) saturate(4) hue-rotate(-30deg); } }
#npc-sprite-wrap.hidden-npc { visibility: hidden; }

.npc-halfbody {
  height: 96%;
  aspect-ratio: 140 / 180;
  display: flex; align-items: flex-end; justify-content: center;
  filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.7));
  image-rendering: pixelated;
}
.npc-halfbody svg { width: 100%; height: 100%; image-rendering: pixelated; shape-rendering: crispEdges; }
.npc-idle { animation: npcBreath 3.5s ease-in-out infinite alternate; }
@keyframes npcBreath { 0% { transform: translateY(0); } 100% { transform: translateY(-3px); } }

/* Shutter jendela: menutup antar pemohon */
#booth-shutter {
  position: absolute; left: 0; right: 0; top: 0; height: 100%;
  z-index: 8;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.35)),
    repeating-linear-gradient(180deg, #54503f 0 7px, #302d24 7px 9px);
  border-bottom: 5px solid #1c1a16;
  box-shadow: 0 6px 12px rgba(0,0,0,0.6);
  transform: translateY(-100%);
  transition: transform 0.55s cubic-bezier(0.3, 0.8, 0.3, 1);
}
#booth-shutter.closed { transform: translateY(0); }
#booth-shutter::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 38px; height: 6px; margin-left: -19px; background: #7a6d52; border-radius: 3px; }

.window-glass {
  position: absolute; inset: 0; z-index: 9; pointer-events: none;
  background:
    linear-gradient(115deg, rgba(190,235,210,0.12) 0%, rgba(190,235,210,0) 28%, rgba(190,235,210,0.06) 52%, rgba(190,235,210,0) 70%),
    linear-gradient(135deg, rgba(140,210,160,0.05) 0%, rgba(80,140,100,0.1) 100%);
  border-top: 1px solid rgba(170,230,190,0.18);
}

/* ── BALON DIALOG (di sisi kanan jendela) ── */
.dialog-bubble {
  position: absolute;
  top: 16px;
  left: calc(var(--win-left) + var(--win-w) + 20px);
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  font-family: 'Special Elite', cursive;
  font-size: 11.5px;
  line-height: 1.45;
  max-width: 270px;
  min-width: 160px;
  border: 2px solid var(--paper-line);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
  border-radius: 0 6px 6px 6px;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.dialog-bubble.visible { opacity: 1; pointer-events: auto; transform: translateX(0); }
.dialog-bubble::after {
  content: ''; position: absolute; top: 14px; left: -11px;
  border: 5px solid transparent; border-right-color: var(--paper-line);
}
.dialog-bubble.insp { background: #cfd8c0; }
.bubble-speaker {
  font-size: 8px; font-family: 'Share Tech Mono', monospace; color: #72624d;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px;
  border-bottom: 1px dashed #c0b396; padding-bottom: 2px;
}
.bubble-q { font-size: 9.5px; color: #5f5240; font-style: italic; margin-bottom: 4px; }

/* ── PANEL KIRI: PENGUMUMAN + INSPECT ── */
.wall-left-panel {
  position: absolute;
  left: 10px;
  top: 12px;
  width: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 6;
}

/* ── PANEL KANAN: JAM/TANGGAL, SHUTTER PERBATASAN ── */
.wall-fixtures {
  position: absolute;
  right: 16px; top: 12px;
  display: flex; gap: 12px; align-items: flex-start;
  z-index: 6;
}
.wall-notice {
  width: 134px; background: #d6c7a1; color: var(--ink);
  padding: 5px 7px 7px; transform: rotate(-1.2deg);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5); border-top: 4px solid #8a1a1a;
  font-family: 'Special Elite', cursive;
}
.notice-title { font-family: 'Oswald', sans-serif; font-size: 9px; letter-spacing: 2px; color: #8a1a1a; border-bottom: 1px dashed #a69470; margin-bottom: 3px; }
.notice-text { font-size: 8.5px; line-height: 1.35; }

/* ── PANEL INSPECT MODE ── */
.inspect-panel {
  background: #1a1e14;
  border: 1px solid #3f8f3a;
  padding: 6px 7px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  width: 134px;
  animation: inspectPop 0.2s ease-out;
}
@keyframes inspectPop { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.inspect-title {
  font-family: 'Oswald', sans-serif;
  font-size: 9px; letter-spacing: 1px; color: #9cd270;
  border-bottom: 1px solid #3a5028; margin-bottom: 4px; padding-bottom: 2px;
}
.inspect-hint { font-size: 8px; color: #7aab58; line-height: 1.3; margin-bottom: 4px; }
.inspect-selections { display: flex; flex-direction: column; gap: 3px; }
.inspect-sel-item {
  font-size: 8px; font-family: 'Share Tech Mono', monospace; padding: 3px 5px;
  background: rgba(0,0,0,0.4); border: 1px solid #3a5028; color: #c0e490;
  line-height: 1.3; border-radius: 1px;
}
.inspect-sel-item.slot-empty { color: #4a6838; border-style: dashed; }
.inspect-clear-btn {
  margin-top: 5px; width: 100%; background: #2a1515; border: 1px solid #7a2a2a;
  color: #e07070; font: 8px 'Share Tech Mono', monospace; padding: 2px 4px;
  cursor: pointer; letter-spacing: 0.5px;
}
.inspect-clear-btn:hover { background: #3d1f1f; color: #ff9999; }

/* Tombol PERIKSA di HUD saat aktif */
.inspect-btn-hud { transition: all 0.2s; }
.inspect-btn-hud.active { background: rgba(60,140,40,0.4) !important; border-color: var(--lime) !important; color: var(--lime) !important; box-shadow: 0 0 10px rgba(156,210,112,0.4); }

/* Highlight pada data yang diklik saat mode periksa */
.inspect-selected { outline: 2px solid #9cd270 !important; outline-offset: 1px; background: rgba(156,210,112,0.12) !important; cursor: crosshair !important; }
.inspect-mismatch { outline: 2px solid #e0b246 !important; background: rgba(224,178,70,0.18) !important; animation: inspectFlash 0.5s 2; }
.inspect-match   { outline: 2px solid var(--green-light) !important; background: rgba(67,153,88,0.15) !important; }
@keyframes inspectFlash { 0%,100%{ opacity:1; } 50%{ opacity:0.4; } }
/* Klik pada f-val saat mode periksa */
.inspect-mode-on .f-val { cursor: crosshair; transition: background 0.15s; }
.inspect-mode-on .f-val:hover { background: rgba(156,210,112,0.1); outline: 1px dashed #5a8a40; }

.booth-clock-box {
  position: static;
  background: #241f19; border: 2px solid #5b4c38; padding: 5px 10px;
  display: flex; flex-direction: column; align-items: center; border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}
.clock-label { font-size: 6.5px; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; }
.clock-display {
  font-family: 'Share Tech Mono', monospace; font-size: 14px; font-weight: bold; color: #e5a73b;
  letter-spacing: 1px; text-shadow: 0 0 6px rgba(229,167,59,0.4);
}
.clock-time { font-family: 'Share Tech Mono', monospace; font-size: 11px; color: #9cd270; letter-spacing: 3px; text-shadow: 0 0 6px rgba(156,210,112,0.4); }

.border-shutter {
  width: 100px; background: #1d241f; border: 2px solid #4a5c53; padding: 4px 5px 5px;
  display: flex; flex-direction: column; gap: 3px; position: relative;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}
.bs-label { font-size: 6.5px; letter-spacing: 1px; color: #8ea89c; text-align: center; }
.bs-door { height: 62px; background: linear-gradient(180deg, #0d1210, #1a2420); overflow: hidden; border: 1px solid #0a0f0d; position: relative; }
.bs-slats {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, #5a5d52 0 6px, #34362e 6px 8px);
  border-bottom: 3px solid #1c1a16;
  transition: transform 0.8s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.border-shutter.open .bs-slats { transform: translateY(-86%); }
.bs-lamp { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #c63d3d; box-shadow: 0 0 6px #c63d3d; transition: all 0.3s; }
.border-shutter.open .bs-lamp { background: #439958; box-shadow: 0 0 10px #70c584; }

/* ── MENU MIC ── */
.mic-menu {
  position: absolute;
  left: calc(var(--win-left) + var(--win-w) + 14px);
  top: 8px;
  right: 12px;
  bottom: calc(var(--counter-h) + 6px);
  max-width: 440px;
  background: #251e18;
  border: 2px solid var(--yellow);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.65);
  display: flex; flex-direction: column;
  z-index: 40;
  animation: micPop 0.18s ease-out;
}
@keyframes micPop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.mic-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Oswald', sans-serif; font-size: 12px; color: var(--yellow); letter-spacing: 1px;
  padding: 4px 8px; border-bottom: 1px solid var(--line);
}
.mic-tabs { display: flex; border-bottom: 1px solid var(--line2); }
.mic-tabs button {
  flex: 1; background: #1b1510; color: var(--text-muted); border: none; border-right: 1px solid var(--line2);
  font-family: 'Share Tech Mono', monospace; font-size: 9.5px; padding: 4px 2px; cursor: pointer; letter-spacing: 0.5px;
}
.mic-tabs button:hover { color: var(--yellow); }
.mic-tabs button.active { background: #3a2f21; color: var(--yellow); box-shadow: inset 0 -2px 0 var(--yellow); }
.mic-list { flex: 1; overflow-y: auto; padding: 5px; display: flex; flex-direction: column; gap: 4px; }
.mic-opt {
  background: #322820; border: 1px solid var(--line); color: var(--text); padding: 5px 8px;
  font-family: 'Share Tech Mono', monospace; font-size: 10.5px; text-align: left; cursor: pointer; border-radius: 2px; line-height: 1.3;
}
.mic-opt:hover:not(:disabled) { background: #47392d; border-color: var(--yellow); color: var(--yellow); }
.mic-opt .mic-num { color: var(--yellow); margin-right: 5px; }
.mic-opt.asked { opacity: 0.6; border-style: dashed; }
.mic-opt.asked::after { content: ' ✓'; color: var(--green-light); }
.mic-opt:disabled { opacity: 0.35; cursor: not-allowed; }
.mic-opt.moral { border-color: #6a5a3a; background: #2d2618; }
.mic-foot { font-size: 9px; color: var(--text-muted); padding: 3px 8px; border-top: 1px solid var(--line2); min-height: 18px; }
.mic-foot.good { color: var(--green-light); }

/* ── MEJA LOKET (counter) ── */
.counter-shelf {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--counter-h);
  background: linear-gradient(180deg, #382413 0%, #201309 100%);
  border-top: 3px solid #634324;
  border-bottom: 2px solid #110b05;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 0 calc(var(--win-left) + (var(--win-w) - 190px) / 2);
  z-index: 20;
}
.counter-call-btn {
  background: #2a2015;
  border: 1.5px solid #856133;
  color: #ffda85;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 2px 10px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  transition: all 0.15s;
}
.counter-call-btn:hover:not(:disabled) {
  background: #3d2f1f;
  border-color: var(--yellow);
  color: #fff;
  box-shadow: 0 0 8px rgba(255,200,90,0.4);
}
.counter-call-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.8);
}
.doc-tray-slot {
  font-size: 7px; letter-spacing: 2px; color: rgba(255,200,120,0.35);
  text-transform: uppercase; background: #130d06; padding: 2px 16px;
  border-radius: 2px; border: 1px dashed rgba(255,200,120,0.18); white-space: nowrap;
}
.right-section-title {
  font-size: 8.5px; letter-spacing: 2px; color: var(--yellow);
  text-transform: uppercase; border-bottom: 1px solid var(--line2); padding-bottom: 3px;
  display: flex; justify-content: space-between;
}
#rule-shift-tag { color: var(--lime); }
#rule-box {
  background: rgba(0,0,0,0.35); border-left: 3px solid var(--yellow);
  padding: 4px 7px; font-size: 9.5px; line-height: 1.4; color: var(--text-muted);
  flex: 1; min-height: 38px; overflow-y: auto;
}
#rule-list { padding-left: 12px; }
#rule-list li { margin-bottom: 2px; color: var(--text); }
#rule-list li.new { color: var(--yellow); }
#rule-list li.new::marker { content: '★ '; }

.interro-status {
  font-size: 8.5px; padding: 3px 6px; border-left: 3px solid var(--line); background: rgba(0,0,0,0.3);
  color: var(--text-muted); letter-spacing: 0.3px; line-height: 1.3;
}
.interro-status.partial { border-color: var(--yellow); color: var(--yellow); }
.interro-status.valid   { border-color: var(--green); color: var(--green-light); background: rgba(67,153,88,0.12); }

.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.action-btn {
  border: 2px solid; padding: 6px 4px; font-family: 'Share Tech Mono', monospace;
  font-size: 10.5px; font-weight: bold; cursor: pointer; letter-spacing: 0.4px;
  text-transform: uppercase; transition: all 0.15s; display: flex; align-items: center;
  justify-content: center; gap: 4px; border-radius: 2px; white-space: nowrap;
}
.action-btn:disabled { opacity: 0.38; cursor: not-allowed; filter: grayscale(0.8); }
.action-btn:active:not(:disabled) { transform: translate(1px,1px); }

.btn-call { background: var(--military); border-color: var(--military2); color: var(--lime); }
.btn-call:hover:not(:disabled) { background: var(--military2); box-shadow: 0 0 10px rgba(158,212,114,0.25); }
.btn-intercom { background: #352c16; border-color: #7a652d; color: #f0c85a; }
.btn-intercom:hover:not(:disabled) { background: #4a3e1f; box-shadow: 0 0 10px rgba(224,178,70,0.25); }
.btn-submit { background: var(--rust); border-color: #b25230; color: #ffe6dc; }
.btn-submit:hover:not(:disabled) { background: #943e1d; box-shadow: 0 0 10px rgba(230,100,70,0.3); }
.btn-submit.pulse { animation: pulseSubmit 1.2s infinite; }
@keyframes pulseSubmit { 0%,100% { box-shadow: 0 0 0 0 rgba(235,102,102,0.6); } 50% { box-shadow: 0 0 0 5px rgba(235,102,102,0); } }
.btn-approve { background: #1c3a22; border-color: #4aa860; color: #9ff0b0; }
.btn-approve:hover:not(:disabled) { background: #28532f; box-shadow: 0 0 10px rgba(112,197,132,0.3); }
.btn-deny { background: #451919; border-color: #c24d4d; color: #ffb3b3; }
.btn-deny:hover:not(:disabled) { background: #5e2222; box-shadow: 0 0 10px rgba(235,102,102,0.3); }
.btn-inspect { background: #17323a; border-color: #3f8fa3; color: #9fe3f5; font-size: 9.5px; }
.btn-inspect:hover:not(:disabled) { background: #1f4551; box-shadow: 0 0 10px rgba(100,200,230,0.3); }
.btn-inspect.on { background: #246b80; color: #fff; box-shadow: 0 0 12px rgba(100,220,255,0.5); }

#feedback-banner {
  padding: 5px 7px; font-size: 9.5px; line-height: 1.35; border: 1px solid var(--line2);
  background: rgba(0,0,0,0.5); min-height: 40px; transition: all 0.3s; color: var(--text-muted); border-radius: 2px;
  overflow: hidden;
}
#feedback-banner.ok   { border-color: var(--green); background: rgba(67,153,88,0.15); color: var(--green-light); }
#feedback-banner.err  { border-color: var(--red);   background: rgba(198,61,61,0.18); color: var(--red-light); }
#feedback-banner.warn { border-color: var(--yellow);background: rgba(224,178,70,0.14);color: var(--yellow); }

/* ══════════════════════════════════════════════
   ZONA 3: DESK SURFACE (MEJA KERJA LUAS)
══════════════════════════════════════════════ */
#desk-section {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  background: 
    repeating-linear-gradient(90deg, var(--desk-grain) 0 1px, transparent 1px 70px),
    repeating-linear-gradient(0deg,  var(--desk-grain) 0 1px, transparent 1px 70px),
    linear-gradient(160deg, var(--desk) 0%, var(--desk-dark) 100%);
  box-shadow: inset 0 10px 18px rgba(0,0,0,0.6);
}
#desk-section::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(92deg, transparent 0 3px, rgba(0,0,0,0.06) 3px 5px);
  pointer-events: none;
}

#desk-surface {
  flex: 1;
  position: relative;
  overflow: hidden;
}
#desk-wood-mat {
  position: absolute; top: 8px; bottom: 8px; left: 12px; right: 12px;
  border: 1px solid rgba(255,200,120,0.06); border-radius: 4px; pointer-events: none;
}
#desk-label {
  position: absolute; bottom: 6px; left: 14px; font-size: 7.5px;
  color: rgba(255,200,100,0.18); letter-spacing: 2px; text-transform: uppercase; pointer-events: none;
}

/* ══════════════════════════════════════════════
   SLIDE-OUT MECHANICAL STAMP DRAWER
══════════════════════════════════════════════ */
#stamp-drawer-dock {
  position: absolute;
  top: 10px;
  right: 0;
  display: flex;
  align-items: flex-start;
  z-index: 180;
  transform: translateX(340px);
  transition: transform 0.32s cubic-bezier(0.18, 0.89, 0.32, 1.15);
  pointer-events: auto;
  filter: drop-shadow(-6px 8px 16px rgba(0,0,0,0.7));
}
#stamp-drawer-dock:hover,
#stamp-drawer-dock.drawer-open {
  transform: translateX(0);
}

.stamp-drawer-handle {
  width: 36px;
  background: linear-gradient(180deg, #2a221b 0%, #1c1510 100%);
  border: 2px solid #5a4734;
  border-right: none;
  border-radius: 4px 0 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  gap: 8px;
  cursor: pointer;
  box-shadow: -4px 0 10px rgba(0,0,0,0.5);
  transition: all 0.2s;
}
.stamp-drawer-handle:hover { background: #382d22; border-color: var(--yellow); }
.handle-arrow { color: var(--yellow); font-size: 13px; animation: pulseArrow 1.5s infinite; }
@keyframes pulseArrow { 0%,100%{ transform:translateX(0); } 50%{ transform:translateX(-3px); } }

.handle-text-vert {
  writing-mode: vertical-rl; text-orientation: upright; font-family: 'Oswald', sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; color: var(--text-muted);
}
.stamp-drawer-handle:hover .handle-text-vert { color: var(--yellow); }

.handle-indicators { display: flex; flex-direction: column; gap: 4px; }
.ind-led { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.5); }
.ind-led.red   { background: #7a1515; }
.ind-led.green { background: #1a5c24; }
.ind-led.red.lit   { background: #ff3b3b; box-shadow: 0 0 6px #ff3b3b; }
.ind-led.green.lit { background: #44e05b; box-shadow: 0 0 6px #44e05b; }

.stamp-pin-btn {
  background: rgba(0,0,0,0.4); border: 1px solid var(--line); color: var(--text-muted);
  font-size: 10px; padding: 2px; border-radius: 2px; cursor: pointer;
}
.stamp-pin-btn:hover { color: var(--yellow); border-color: var(--yellow); }
.stamp-pin-btn.pinned { background: var(--yellow); color: #1a1410; box-shadow: 0 0 8px rgba(224,178,70,0.6); }

.stamp-drawer-content {
  width: 340px; height: 145px; background: #1e1c1a; border: 2px solid #5a4b3a;
  border-radius: 0 0 0 4px; box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
  position: relative;
}
#stamp-machine-body { width: 100%; height: 100%; position: relative; }

.plunger-anim-pressed { transform: translateY(14px) !important; transition: transform 0.08s ease !important; }
.block-anim-pressed   { transform: translateY(4px) scale(0.98) !important; transition: transform 0.08s ease !important; }

#stamp-drawer-dock.drawer-peek { transform: translateX(0); }
#desk-surface.uv-on::before {
  content: ''; position: absolute; inset: 0; z-index: 15; pointer-events: none;
  background: radial-gradient(ellipse at 40% 50%, rgba(90,40,170,0.25), rgba(30,10,80,0.55));
}
#desk-surface.uv-on .doc-card:not(.doc-rulebook) { filter: brightness(0.8) saturate(0.75); }

/* Indikator area stempel */
.stamp-aim-ring { fill: none; stroke: transparent; stroke-width: 3; stroke-dasharray: 7 4; pointer-events: none; }
.stamp-interactive-unit.aim-ok   .stamp-aim-ring { stroke: #b6f58a; animation: aimPulse 0.9s infinite alternate; }
.stamp-interactive-unit.aim-warn .stamp-aim-ring { stroke: #e0b246; }
@keyframes aimPulse { from { opacity: 0.35; } to { opacity: 1; } }
#stamp-drawer-dock.has-doc-under .stamp-backplate { opacity: 0.45; }
#stamp-drawer-dock.has-doc-under .stamp-block { opacity: 0.8; }
.stamp-backplate { transition: opacity 0.2s; }
#stamp-aim-label { transition: fill 0.2s; }
.stamp-drawer-handle .ind-led.lit { transition: all 0.2s; }

/* ══════════════════════════════════════════════
   DOKUMEN DI MEJA (DRAGGABLE CARDS)
   z-index dokumen: 20–150 (dikelola JS). Laci/mekanisme stempel = 180,
   sehingga dokumen selalu di atas meja namun di bawah plunger stempel.
══════════════════════════════════════════════ */
.doc-card {
  --rot: 0deg;
  position: absolute;
  border: 2px solid var(--paper-line);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5), 8px 8px 18px rgba(0,0,0,0.35);
  cursor: grab;
  transition: box-shadow 0.12s, border-color 0.15s;
  border-radius: 2px;
  touch-action: none;
  transform: rotate(var(--rot));
  animation: docSlideIn 0.5s cubic-bezier(.2,.8,.3,1);
  z-index: 20;
}
@keyframes docSlideIn {
  from { transform: translate(-60px, -70px) rotate(var(--rot)) scale(0.92); opacity: 0; }
  to   { transform: rotate(var(--rot)); opacity: 1; }
}
.doc-card:hover { box-shadow: 6px 6px 0 rgba(0,0,0,0.6), 10px 10px 22px rgba(0,0,0,0.45); border-color: #d8c49e; }
.doc-card:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.doc-card.dragging {
  cursor: grabbing;
  box-shadow: 12px 12px 0 rgba(0,0,0,0.7), 16px 16px 28px rgba(0,0,0,0.55);
}
.doc-card.dragging.ghost { opacity: 0.55; }
.doc-card.locked { cursor: default; pointer-events: none; filter: saturate(0.85) brightness(0.95); }
.doc-card.doc-exit { animation: docExit 0.55s ease-in forwards; pointer-events: none; }
@keyframes docExit { to { transform: translate(-120px, -90px) rotate(var(--rot)) scale(0.85); opacity: 0; } }

/* Tooltip interaksi dokumen */
.doc-card::after {
  content: attr(data-tip);
  position: absolute; left: 0; top: -20px; z-index: 5;
  background: #14100b; color: var(--yellow); border: 1px solid #5d4d23;
  font: 9px 'Share Tech Mono', monospace; padding: 2px 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.doc-card:hover::after { opacity: 1; }
.doc-card.dragging::after, .doc-card.locked::after { opacity: 0; }

/* ─── 2. PASPOR BUKU TERBUKA (UNFOLDED 2-PAGE SPREAD) ─── */
.doc-passport {
  width: 380px;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Special Elite', cursive;
  border: 2px solid #8d7a5e;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.55), 10px 10px 22px rgba(0,0,0,0.4);
}
.passport-book-spread {
  display: flex;
  position: relative;
  background: #ede1c8;
}
/* Center crease shadow dividing 2 pages */
.passport-crease {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 14px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.02) 40%, rgba(255,255,255,0.08) 50%, rgba(0,0,0,0.02) 60%, rgba(0,0,0,0.12) 100%);
  pointer-events: none;
  z-index: 15;
}

/* Page 1 (Identity Left) */
.passport-page-left {
  width: 50%;
  padding: 8px 10px 6px;
  border-right: 1px solid #c8b99c;
  display: flex;
  flex-direction: column;
}
.pass-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #a8987b;
  padding-bottom: 3px;
  margin-bottom: 6px;
}
.pass-hdr-title { font-family: 'Oswald', sans-serif; font-size: 8.5px; font-weight: 700; letter-spacing: 1px; color: #1c2e3d; }
.pass-hdr-eagle { font-size: 14px; }

.pass-id-grid {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.pass-photo-box {
  width: 62px;
  height: 78px;
  background: #bcb096;
  border: 1.5px solid #9e8e73;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
}
.pass-photo-box svg {
  width: 100%; height: 100%; image-rendering: pixelated; filter: sepia(0.35) contrast(1.05);
}
.pass-fields-col {
  font-size: 8px;
  line-height: 1.6;
  flex: 1;
}
.f-label { font-size: 6.5px; color: #7f7460; letter-spacing: 0.8px; text-transform: uppercase; display: block; }
.f-val   { font-size: 9px; color: #150f0a; display: block; font-family: 'Share Tech Mono', monospace; font-weight: 700; }

.pass-mrz-box {
  margin-top: auto;
  padding: 3px 5px;
  background: #dbcead;
  border: 1px solid #c2b494;
  font-family: 'Share Tech Mono', monospace;
  font-size: 6.5px;
  color: #554a3a;
  letter-spacing: 1.2px;
  line-height: 1.3;
}

/* Page 2 (Visa & Stamping Right Page) */
.passport-page-right {
  width: 50%;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: 
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(140,110,60,0.03) 8px 9px),
    #e9dcbf;
}
.pass-visa-hdr {
  display: flex;
  justify-content: space-between;
  border-bottom: 1.5px dashed #a8987b;
  padding-bottom: 3px;
  margin-bottom: 6px;
  font-family: 'Oswald', sans-serif;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #574632;
}

/* Generous Stamping Area on the Right Page */
.passport-visa-stamping-zone {
  flex: 1;
  border: 2px dashed #a49275;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 140px;
  padding: 4px;
}
.stamp-target-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 7.5px;
  color: #94856e;
  letter-spacing: 1.5px;
  text-align: center;
  line-height: 1.4;
  pointer-events: none;
}

/* ─── 3. SURAT IZIN MASUK (ENTRY PERMIT) ─── */
.doc-permit {
  width: 230px;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Special Elite', cursive;
}
.permit-header {
  background: linear-gradient(135deg, #2b3d28, #182816);
  color: #d2e4b4;
  padding: 6px 10px;
  text-align: center;
  border-bottom: 2px solid #435e3d;
}
.permit-header-title { font-family: 'Oswald', sans-serif; font-size: 9.5px; letter-spacing: 2px; font-weight: 600; }
.permit-header-sub   { font-size: 6.5px; opacity: 0.75; margin-top: 2px; }
.permit-body { padding: 8px 11px; font-size: 8.5px; line-height: 1.8; }
.permit-body .f-label { font-size: 6.5px; color: #8c806c; letter-spacing: 1px; text-transform: uppercase; display: block; margin-top: 2px; }
.permit-body .f-val   { font-size: 9.5px; display: block; border-bottom: 1px dotted #b8a888; padding-bottom: 1px; font-family: 'Share Tech Mono', monospace; font-weight: 600; }
.permit-seal {
  display: flex; justify-content: space-between; align-items: flex-end; padding: 5px 10px 6px;
  border-top: 1px dashed var(--paper-line); font-size: 7.5px; color: #8c806c;
}
.permit-seal-stamp {
  border: 2px solid #8d4838; color: #8d4838; padding: 2px 5px; transform: rotate(-8deg);
  font-family: 'Share Tech Mono', monospace; font-size: 7.5px; line-height: 1.3; text-align: center; font-weight: bold;
}

/* ─── Meterai / cap resmi & nomor registrasi ─── */
.seal {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid #7a3a2c; color: #7a3a2c;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1; position: relative; background: rgba(255,255,255,0.14);
  transform: rotate(-8deg); flex-shrink: 0; box-shadow: inset 0 0 0 2px rgba(122,58,44,0.25);
}
.seal .seal-glyph { font-size: 15px; font-family: 'Share Tech Mono', monospace; }
.seal .seal-code { font-family: 'Share Tech Mono', monospace; font-size: 6.5px; letter-spacing: 0.5px; margin-top: 1px; }
.seal.smudged { opacity: 0.5; filter: blur(0.8px); transform: rotate(-17deg) translate(2px, 1px); }
.seal-wm {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #3be8ff; font-size: 24px; opacity: 0; text-shadow: 0 0 8px #3be8ff, 0 0 3px #fff;
  pointer-events: none; transition: opacity 0.3s;
}
#desk-surface.uv-on .seal-wm { opacity: 0.95; }
.reg-no { font-family: 'Share Tech Mono', monospace; font-size: 7.5px; color: #554a3a; letter-spacing: 0.6px; line-height: 1.3; }
.reg-no b { display: block; font-size: 6px; color: #8c806c; font-weight: normal; letter-spacing: 1px; text-transform: uppercase; }
.seal-row { display: flex; align-items: center; gap: 7px; }

.f-val.blank { color: #a0917a; letter-spacing: 3px; }
.f-val s { opacity: 0.5; text-decoration: line-through; margin-right: 4px; }
.corr-mark { display: inline-block; font-size: 6px; color: #8d4838; border: 1px solid #8d4838; padding: 0 3px; transform: rotate(-5deg); margin-left: 3px; letter-spacing: 0.5px; }
.doc-passport.worn::before {
  content: ''; position: absolute; z-index: 16; width: 70px; height: 70px; right: 40px; bottom: 26px; pointer-events: none;
  border-radius: 50%; background: radial-gradient(circle, rgba(110,70,30,0) 38%, rgba(110,70,30,0.28) 52%, rgba(110,70,30,0) 66%);
}

/* Paspor: baris cap di halaman kanan */
.passport-page-right .seal-row { margin-bottom: 5px; }

/* ─── KARTU IDENTITAS PENDUDUK (KIP) ─── */
.doc-kip {
  width: 272px; background: linear-gradient(135deg, #dcd6ba, #c6bd9b); color: var(--ink);
  font-family: 'Special Elite', cursive; border-color: #7b7156;
}
.kip-head { background: linear-gradient(90deg, #23415a, #162b3d); color: #cfe3f0; padding: 4px 8px; display: flex; justify-content: space-between; align-items: center; }
.kip-head b { font-family: 'Oswald', sans-serif; font-size: 9px; letter-spacing: 1.5px; font-weight: 600; }
.kip-head small { font-size: 6.5px; opacity: 0.8; }
.kip-body { display: flex; gap: 8px; padding: 6px 8px 4px; }
.kip-photo { width: 58px; height: 74px; background: #bcb096; border: 1.5px solid #8e8467; flex-shrink: 0; overflow: hidden; box-shadow: inset 0 0 5px rgba(0,0,0,0.3); }
.kip-photo svg { width: 100%; height: 100%; filter: sepia(0.3) contrast(1.05); }
.kip-fields { flex: 1; min-width: 0; line-height: 1.5; }
.kip-foot { display: flex; justify-content: space-between; align-items: center; padding: 3px 8px 5px; border-top: 1px dashed #9d9272; }

/* ─── SURAT-SURAT FORMULIR (izin, kerja, perjalanan, kesehatan) ─── */
.doc-permit, .doc-work, .doc-travel, .doc-health {
  width: 236px; background: var(--paper); color: var(--ink); font-family: 'Special Elite', cursive;
}
.doc-travel { width: 292px; }
.doc-work .permit-header   { background: linear-gradient(135deg, #43301c, #24170a); color: #ecd5ac; border-bottom-color: #6b5230; }
.doc-travel .permit-header { background: linear-gradient(135deg, #25364a, #131f2d); color: #c9dcef; border-bottom-color: #3d5875; }
.doc-health .permit-header { background: linear-gradient(135deg, #4a2530, #2a1219); color: #f0cdd6; border-bottom-color: #7a4150; }
.permit-body.grid2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.permit-body .span2 { grid-column: 1 / -1; }
.permit-body.compact { padding: 6px 11px; line-height: 1.55; }
.permit-seal .seal-row { align-items: flex-end; }

/* ─── BUKU REGULASI INTERAKTIF (BISA DIBUKA / DITUTUP, ADA NAVIGASI) ─── */
.doc-rulebook { cursor: pointer; position: absolute; }
.doc-rulebook.rulebook-closed {
  width: 145px;
  background: linear-gradient(145deg, #382414, #24160a);
  color: #d6caa8; border: 2.5px solid #664724;
  box-shadow: 5px 5px 0 rgba(0,0,0,0.6), 8px 8px 18px rgba(0,0,0,0.45);
  padding: 12px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; border-radius: 2px;
}
.rb-crest { font-size: 24px; margin-bottom: 6px; }
.rb-closed-title { font-family: 'Oswald', sans-serif; font-size: 11px; font-weight: 700; color: var(--yellow); letter-spacing: 1px; line-height: 1.3; }
.rb-closed-sub   { font-size: 7.5px; color: #a49479; margin-top: 4px; letter-spacing: 1px; }
.rb-click-hint   {
  margin-top: 12px; font-size: 8px; color: #deb860; background: rgba(0,0,0,0.4);
  padding: 3px 8px; border-radius: 2px; border: 1px solid #72562b; animation: pulseHint 2s infinite;
}
@keyframes pulseHint { 0%,100% { opacity: 0.8; } 50% { opacity: 1; color: #fff; } }

.doc-rulebook.rulebook-open {
  width: 470px; background: #2b1f14; border: 2px solid #664724; cursor: grab;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.65), 12px 12px 24px rgba(0,0,0,0.5); border-radius: 2px;
}
.rb-open-wrap { display: flex; flex-direction: column; padding: 6px 8px 7px; gap: 5px; background: #251a10; user-select: none; }
.rb-bar { display: flex; align-items: center; gap: 4px; }
.rb-bar-title { font-family: 'Oswald', sans-serif; font-size: 10px; letter-spacing: 1.5px; color: var(--yellow); margin-right: auto; }
.rb-tab, .rb-nav, .rb-close-tab {
  background: #3e2b1b; border: 1px solid #664724; color: #d4a840; font: 9px 'Share Tech Mono', monospace;
  padding: 2px 6px; cursor: pointer; border-radius: 1px;
}
.rb-tab:hover, .rb-nav:hover:not(:disabled), .rb-close-tab:hover { background: #5a3f26; color: #fff; }
.rb-tab.active { background: #d4a840; color: #1a1208; border-color: #d4a840; }
.rb-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.rb-spread { display: flex; gap: 8px; }
.rb-page {
  flex: 1; background: #1c140d; padding: 7px 9px; border: 1px solid #4a3522;
  font-size: 8.5px; line-height: 1.5; min-height: 188px; min-width: 0; color: #d0c2a5;
}
.rb-page-title {
  font-family: 'Oswald', sans-serif; font-size: 9.5px; color: var(--yellow); letter-spacing: 1px;
  border-bottom: 1px solid #5a4228; padding-bottom: 3px; margin-bottom: 5px;
}
.rb-rule { margin-bottom: 5px; padding-left: 6px; border-left: 2px solid #4a3522; }
.rb-rule.new { border-left-color: var(--yellow); }
.rb-rule b { color: #f0d9a0; font-family: 'Share Tech Mono', monospace; display: block; }
.rb-rule.new b::before { content: '★ BARU · '; color: var(--yellow); }
.rb-rule span { color: #b9ab8f; }
.rb-table { width: 100%; border-collapse: collapse; font-size: 8px; }
.rb-table td, .rb-table th { border: 1px solid #4a3522; padding: 2px 4px; text-align: left; }
.rb-table th { color: var(--yellow); font-weight: normal; background: #2a1d11; }
.rb-glyph { font-size: 13px; color: #e5cb9b; text-align: center !important; }
.rb-foot { display: flex; align-items: center; justify-content: space-between; font-size: 8.5px; color: #9b8c76; }
.rb-zone-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.rb-zone-tag { background: #2f2113; border: 1px solid #593f25; padding: 2px 5px; font-size: 7.5px; color: #e5cb9b; }
.rb-note { margin-top: 6px; padding-top: 4px; border-top: 1px dashed #4a3522; color: #9b8c76; font-size: 8px; }

/* ══════════════════════════════════════════════
   STEMPEL DINAMIS / REALISTIK
══════════════════════════════════════════════ */
.stamp-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 45;
  animation: stampImpact 0.32s cubic-bezier(.2,.8,.3,1.3) forwards;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 2px;
  padding: 3px 10px;
  border: 3.5px solid;
  border-radius: 2px;
  opacity: 0;
  white-space: nowrap;
}
.stamp-overlay.approve {
  color: rgba(23,95,44,0.92); border-color: rgba(23,95,44,0.92); background: rgba(112,197,132,0.15);
}
.stamp-overlay.deny {
  color: rgba(186,28,28,0.92); border-color: rgba(186,28,28,0.92); background: rgba(235,102,102,0.15);
}
@keyframes stampImpact {
  0%   { opacity:0; transform: translate(-50%,-50%) scale(2.8); }
  45%  { opacity:1; transform: translate(-50%,-50%) scale(0.9); }
  70%  { transform: translate(-50%,-50%) scale(1.05); }
  100% { opacity:0.92; transform: translate(-50%,-50%) scale(1); }
}

.stamp-splat {
  position: absolute; pointer-events: none; z-index: 44; border-radius: 50%;
  animation: splatFade 0.5s ease forwards; opacity: 0;
}
@keyframes splatFade { 0%{ opacity:0.6; transform:scale(0); } 50%{ opacity:0.3; transform:scale(1); } 100%{ opacity:0; transform:scale(1.4); } }

.desk-stamp-mark {
  position: absolute; pointer-events: none; z-index: 5; font-family: 'Oswald', sans-serif;
  font-weight: 700; font-size: 21px; letter-spacing: 2px; padding: 3px 10px; border: 3px dashed;
  border-radius: 2px; transform: translate(-50%, -50%); opacity: 0.45; filter: blur(0.5px);
}
.desk-stamp-mark.approve { color: #175f2c; border-color: #175f2c; }
.desk-stamp-mark.deny    { color: #8a1a1a; border-color: #8a1a1a; }
.stamp-overlay.misplaced { border-style: dashed; filter: blur(0.6px); }
.stamp-overlay.misplaced::after {
  content: 'BUKAN DI KOLOM VISA'; position: absolute; left: 0; right: 0; bottom: -11px; text-align: center;
  font: 7px 'Share Tech Mono', monospace; letter-spacing: 1px; color: #7a3a2c;
}

/* ══════════════════════════════════════════════
   SLIP KEPUTUSAN, MEMO, EVALUASI, MODAL
══════════════════════════════════════════════ */
.decision-slip {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: min(440px, 68%); z-index: 190; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 2px solid var(--paper-line);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.6); padding: 8px 12px 9px;
  font-family: 'Special Elite', cursive; font-size: 11px; line-height: 1.4;
  animation: slipIn 0.3s cubic-bezier(.2,.8,.3,1.2);
}
@keyframes slipIn { from { opacity: 0; transform: translateX(-50%) translateY(-14px) rotate(-2deg); } to { opacity: 1; transform: translateX(-50%) translateY(0) rotate(0); } }
.decision-slip .slip-head { font-family: 'Oswald', sans-serif; font-size: 15px; letter-spacing: 1px; display: flex; justify-content: space-between; }
.decision-slip.ok  .slip-head { color: #175f2c; }
.decision-slip.err .slip-head { color: #8a1a1a; }
.decision-slip .slip-head small { font: 8px 'Share Tech Mono', monospace; color: #7f7460; align-self: center; }
.decision-slip ul { margin: 5px 0 0 16px; }
.decision-slip li { margin-bottom: 2px; }
.decision-slip .slip-sub { font: 8.5px 'Share Tech Mono', monospace; color: #6b5f4b; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; border-top: 1px dashed #b09e7c; padding-top: 3px; }
.decision-slip .money-up { color: #175f2c; }
.decision-slip .money-down { color: #8a1a1a; }

.modal kbd { color: var(--yellow); }
.modal-btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-btn-col { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.modal-btn-col .modal-btn { margin-top: 0; }
.modal-btn.alt { background: #2e2a22; border-color: var(--line); color: var(--text); }
.modal-btn.alt:hover { background: var(--line); color: #fff; }
.modal-btn.danger { background: #5a1f1f; border-color: var(--red); color: #ffd8d8; }
.modal-btn.danger:hover { background: var(--red); color: #fff; }

#start-overlay .modal, .memo-modal, .end-modal { max-height: 94vh; overflow-y: auto; }
.modal.memo-modal { max-width: 600px; background: #d9c9a3; color: #1b1610; border: 3px solid #8d7a5e; padding: 18px 24px 16px; }
.modal.memo-modal h2 { color: #1b1610; font-size: 19px; margin: 4px 0 6px; }
.modal.memo-modal .modal-eyebrow { color: #6b3a1c; }
.modal.memo-modal p, .modal.memo-modal li { color: #2b2218; font-family: 'Special Elite', cursive; font-size: 11px; line-height: 1.45; margin-bottom: 4px; }
.memo-head { display: flex; justify-content: space-between; align-items: flex-start; }
.memo-stamp { border: 2px solid #8a1a1a; color: #8a1a1a; transform: rotate(-5deg); font: 700 11px 'Oswald', sans-serif; letter-spacing: 2px; padding: 1px 8px; }
.memo-meta { font: 10px 'Share Tech Mono', monospace; color: #6b5f4b; margin-bottom: 6px; border-bottom: 1px solid #a69470; padding-bottom: 4px; }
.memo-rule { margin: 4px 0; padding: 3px 8px; background: rgba(255,255,255,0.28); border-left: 4px solid #8a1a1a; font: 10.5px/1.4 'Special Elite', cursive; color: #2b2218; }
.memo-rule b { font-family: 'Share Tech Mono', monospace; display: block; color: #1b1610; font-size: 10.5px; }
.modal.memo-modal .memo-news { font-style: italic; color: #4a3f2f; margin: 6px 0; }
.modal.memo-modal .modal-btn { background: #3c2f1d; border-color: #8a6a3b; color: #f0dfb8; margin-top: 8px; }
.modal.memo-modal .modal-btn:hover { background: #8a1a1a; color: #fff; }

.end-modal { max-width: 640px; }
.end-detail table { width: 100%; border-collapse: collapse; font-size: 10.5px; margin-top: 6px; }
.end-detail td { padding: 3px 6px; border-bottom: 1px dashed var(--line2); color: var(--text-muted); }
.end-detail td:last-child { text-align: right; color: var(--text); white-space: nowrap; }
.end-detail td.plus { color: var(--green-light); }
.end-detail td.minus { color: var(--red-light); }
.end-detail tr.total td { border-top: 2px solid var(--line); font-weight: bold; color: var(--text); }
.end-detail h4 { font: 700 11px 'Oswald', sans-serif; letter-spacing: 1.5px; color: var(--yellow); margin: 8px 0 2px; text-transform: uppercase; }
.end-detail ul { margin: 3px 0 0 16px; font-size: 10px; color: var(--text-muted); line-height: 1.5; }
.end-detail .supervisor { border-left: 3px solid var(--yellow); background: rgba(0,0,0,0.3); padding: 5px 8px; font-size: 10.5px; color: var(--text); margin-top: 6px; }
.end-detail .supervisor.bad { border-color: var(--red); }

.menu-modal, .confirm-modal { max-width: 420px; }

.overlay {
  position: fixed; inset: 0; background: rgba(8,10,8,0.92);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.overlay.hidden { display: none !important; }

.modal {
  max-width: 520px; width: 100%; background: var(--panel); border: 2px solid var(--line);
  box-shadow: 10px 10px 0 rgba(0,0,0,0.85); padding: 26px; border-radius: 2px;
}
.modal-eyebrow { font-size: 9px; letter-spacing: 3px; color: var(--lime); text-transform: uppercase; margin-bottom: 8px; }
.modal h2 { font-family: 'Oswald', sans-serif; font-size: 24px; font-weight: 700; line-height: 1.2; margin-bottom: 12px; color: var(--text); }
.modal p { font-size: 11px; line-height: 1.8; color: var(--text-muted); margin-bottom: 8px; }
.modal ul { margin: 8px 0 8px 18px; font-size: 11px; line-height: 1.8; color: var(--text-muted); }
.modal ul li { margin-bottom: 4px; }
.modal-divider { height: 1px; background: var(--line2); margin: 14px 0; }
.modal-btn {
  display: inline-block; padding: 12px 28px; background: var(--lime-dark); border: 2px solid var(--lime);
  color: #e2f5c7; font-family: 'Share Tech Mono', monospace; font-size: 13px; font-weight: bold;
  cursor: pointer; letter-spacing: 2px; text-transform: uppercase; transition: all 0.15s; margin-top: 10px; border-radius: 2px;
}
.modal-btn:hover { background: var(--lime); color: var(--ink); box-shadow: 4px 4px 0 rgba(0,0,0,0.6); }

.end-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.end-result-item { padding: 10px; background: var(--panel2); border: 1px solid var(--line2); text-align: center; }
.end-result-item .er-label { font-size: 8px; color: var(--text-dim); letter-spacing: 1px; display: block; }
.end-result-item .er-val { font-size: 20px; font-weight: bold; color: var(--text); margin-top: 4px; display: block; }
.end-result-item.good .er-val { color: var(--green-light); }
.end-result-item.bad  .er-val { color: var(--red-light); }

@keyframes shakeScreen { 0%,100%{ transform:translateX(0); } 20%{ transform:translateX(-5px); } 40%{ transform:translateX(5px); } 60%{ transform:translateX(-3px); } 80%{ transform:translateX(3px); } }
.shake { animation: shakeScreen 0.4s ease; }

/* ══════════════════════════════════════════════
   RESPONSIF DESKTOP / LAPTOP
══════════════════════════════════════════════ */
@media (max-width: 1440px) {
  .dialog-bubble { max-width: 212px; }
  .wall-notice { width: 108px; }
}
@media (max-width: 1280px) {
  .wall-notice { display: none; }
}
@media (max-width: 1100px) {
  .hud-title { font-size: 12px; white-space: nowrap; }
  .hud-stat .s-val { white-space: nowrap; font-size: 12px; }
  .hud-sub { display: none; }
  .hud-stat .s-label { font-size: 7px; }
  #booth-section { --win-w: clamp(280px, 38%, 380px); }
  .bs-label { display: none; }
}
@media (max-height: 740px) {
  #booth-section { min-height: 214px; }
  .dialog-bubble { font-size: 10.5px; max-width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Pengaman: semua kartu dokumen harus absolut agar left/top dari JS selalu bermakna */
.doc-card, .doc-card.doc-passport, .doc-card.doc-permit, .doc-card.doc-kip, .doc-card.doc-travel, .doc-card.doc-work, .doc-card.doc-health, .doc-card.doc-rulebook { position: absolute; }


/* ══════════════════════════════════════════════════════════════
   DROP TARGET: PEMOHON (jendela loket) + chip penyeret
══════════════════════════════════════════════════════════════ */
#window-frame.drop-armed { outline: 2px dashed rgba(224,178,70,0.85); outline-offset: 3px; }
#window-frame.drop-ready {
  border-color: #9cd270; outline: none;
  box-shadow: inset 0 0 0 2px #1a1510, inset 0 0 32px rgba(156,210,112,0.45), 0 0 0 3px rgba(156,210,112,0.7), 0 0 30px rgba(156,210,112,0.6);
}
.drop-label {
  position: absolute; left: 0; right: 0; bottom: 6px; z-index: 12; text-align: center; pointer-events: none;
  font: 700 11px/1 var(--font-ui, monospace); letter-spacing: 0.12em; opacity: 0; transition: opacity 0.15s;
}
.drop-label span { display: none; padding: 4px 8px; background: rgba(12,10,6,0.82); border: 1px solid currentColor; }
#window-frame.drop-armed .drop-label { opacity: 1; }
#window-frame.drop-armed .dl-armed { display: inline-block; color: var(--yellow); }
#window-frame.drop-ready .dl-armed { display: none; }
#window-frame.drop-ready .dl-ready { display: inline-block; color: var(--lime); }
#window-frame.drop-ready .drop-label { opacity: 1; }
#npc-sprite-wrap.npc-shake { animation: npcShake 0.4s; }
@keyframes npcShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
#drag-chip {
  position: fixed; z-index: 500; pointer-events: none; display: none; white-space: nowrap;
  font: 700 12px var(--font-ui, monospace); letter-spacing: 0.06em; color: #14100a; background: #f2e8cb;
  border: 2px solid #8d7a5e; padding: 3px 8px; box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
}

/* ══════════════════════════════════════════════════════════════
   TYPOGRAPHY v2 — keterbacaan dokumen & UI
   Font: Courier Prime (isi dokumen), Share Tech Mono (label/UI), VT323 (angka HUD/jam), Oswald (judul)
══════════════════════════════════════════════════════════════ */
:root {
  --font-doc:  'Courier Prime', 'Courier New', monospace;
  --font-ui:   'Share Tech Mono', Consolas, 'Courier New', monospace;
  --font-num:  'VT323', 'Share Tech Mono', monospace;
  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --paper: #f2e8cb;  --paper-line: #a8946b;
  --ink: #16100a;    --ink-soft: #4b3d29;           /* kontras kertas/teks ≈ 14:1 (WCAG AAA) */
  --fs-label: 10px;  --fs-value: 12.5px;  --lh-value: 1.3;
}
.doc-card { font-family: var(--font-doc); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.doc-card .f-label {
  display: block; font: 700 var(--fs-label)/1.2 var(--font-ui); letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1px;
}
.doc-card .f-val {
  display: block; font: 700 var(--fs-value)/var(--lh-value) var(--font-doc); letter-spacing: 0.02em;
  word-spacing: 0.05em; color: var(--ink); overflow-wrap: anywhere;
}
.doc-card .f-val.blank { color: #7d6f57; letter-spacing: 0.3em; }
.doc-card .f-val s { opacity: 0.55; font-weight: 400; }
.corr-mark { font-size: 8.5px; }
.doc-passport { width: 476px; }
.doc-kip { width: 312px; }
.doc-permit, .doc-work, .doc-health, .doc-diplo { width: 268px; }
.doc-travel { width: 338px; }
.doc-diplo { background: var(--paper); color: var(--ink); font-family: var(--font-doc); }
.doc-diplo .permit-header { background: linear-gradient(135deg, #3a2a52, #1d1429); color: #e2d4f3; border-bottom-color: #6a4f93; }
.pass-hdr-title { font: 600 11.5px var(--font-head); letter-spacing: 0.1em; }
.pass-fields-col { font-size: var(--fs-value); line-height: 1.3; }
.pass-fields-col > div, .passport-page-left > div { margin-bottom: 3px; }
.pass-mrz-box { font: 400 10.5px/1.25 var(--font-ui); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; color: #2b2113; }
.pass-visa-hdr { font: 600 11px var(--font-head); letter-spacing: 0.1em; }
.stamp-target-label { font: 700 10.5px/1.4 var(--font-ui); letter-spacing: 0.08em; color: #6b5a3d; }
.permit-header-title, .kip-head b { font: 600 13px var(--font-head); letter-spacing: 0.08em; }
.permit-header-sub, .kip-head small { font: 400 9px var(--font-ui); letter-spacing: 0.06em; }
.permit-body.compact { padding: 8px 12px; line-height: 1.4; }
.permit-body.compact > div { margin-bottom: 4px; }
.permit-seal-stamp { font: 700 9px/1.2 var(--font-ui); }
.reg-no { font: 700 10.5px/1.3 var(--font-ui); color: #3b2f1e; letter-spacing: 0.05em; }
.reg-no b { font-size: 8.5px; color: #6b5d45; }
.seal .seal-code { font-size: 8px; }
.kip-fields { line-height: 1.35; }

/* Buku regulasi */
.doc-rulebook.rulebook-open { width: 540px; }
.rb-page { font: 400 11px/1.5 var(--font-doc); color: #e6dac0; min-height: 214px; }
.rb-page-title { font-size: 12px; letter-spacing: 0.08em; }
.rb-rule b { font: 700 11px var(--font-ui); color: #ffe9b0; letter-spacing: 0.03em; }
.rb-rule span { color: #d3c5a8; }
.rb-table { font-size: 10.5px; }
.rb-tab, .rb-nav, .rb-close-tab { font: 700 10.5px var(--font-ui); padding: 3px 8px; letter-spacing: 0.04em; }
.rb-foot, .rb-note { font-size: 10.5px; }
.rb-zone-tag { font-size: 10px; }
.rb-closed-title { font-size: 13px; } .rb-closed-sub { font-size: 9.5px; } .rb-click-hint { font-size: 9.5px; }

/* Panel & HUD */
body { font-family: var(--font-ui); }
.hud-stat .s-label { font-size: 9px; letter-spacing: 0.1em; }
.hud-stat .s-val { font: 400 20px/1 var(--font-num); letter-spacing: 0.04em; }
.hud-sub { font-size: 9px; } .hud-audio-btn { font-size: 11px; }
.clock-label { font-size: 8px; } .clock-display { font: 400 23px/1 var(--font-num); letter-spacing: 0.06em; } .clock-time { font: 400 20px/1 var(--font-num); }
.notice-title { font-size: 10px; } .notice-text { font: 700 11px/1.35 var(--font-doc); }
.bs-label { font-size: 8px; } .doc-tray-slot { font-size: 9px; }
.right-section-title { font-size: 10px; }
#rule-box { font-size: 11px; line-height: 1.4; min-height: 44px; } #rule-list li { margin-bottom: 1px; }
.interro-status { font-size: 10px; line-height: 1.3; }
.action-btn { font-size: 11.5px; letter-spacing: 0.03em; padding: 6px 3px; } .btn-inspect { font-size: 10.5px; }
#feedback-banner { font-size: 11px; line-height: 1.35; min-height: 46px; }
.dialog-bubble { font: 400 13px/1.45 var(--font-doc); color: var(--ink); }
.bubble-speaker { font-size: 10px; letter-spacing: 0.08em; } .bubble-q { font: 400 11px var(--font-doc); }
.mic-opt { font-size: 11.5px; line-height: 1.35; } .mic-tabs button { font-size: 10.5px; } .mic-foot { font-size: 10px; } .mic-head { font-size: 13px; }
.decision-slip { font: 400 12px/1.45 var(--font-doc); } .decision-slip .slip-sub { font-size: 10px; }
.modal p, .modal li { font-size: 13px; line-height: 1.55; }
.modal.memo-modal p, .modal.memo-modal li, .memo-rule { font: 400 12px/1.5 var(--font-doc); } .memo-rule b { font-size: 11.5px; }
.end-detail td { font-size: 12px; } .end-detail ul, .end-detail .supervisor { font-size: 11.5px; }

.doc-card, .doc-card.doc-diplo { position: absolute; }

/* Baris tanggal paspor tidak boleh terpotong */
.passport-page-left .date-row { display: flex; gap: 12px; margin-bottom: 5px; }
.passport-page-left .date-row .f-val, .passport-page-left .date-row .f-label { white-space: nowrap; }
@media (max-width: 1580px) { .wall-notice { font-size: 8px; width: 110px; } }
@media (max-width: 1280px) { .wall-left-panel { width: 110px; } }

/* ══════════════════════════════════════════════════════════════
   MEJA KERJA: lebih luas, mendukung banyak dokumen
══════════════════════════════════════════════════════════════ */
#desk-section {
  flex: 1;
  min-height: 220px; /* lebih tinggi dari sebelumnya */
}

/* ══════════════════════════════════════════════════════════════
   DISCREPANCY BANNER (muncul saat mode periksa menemukan ketidaksesuaian)
══════════════════════════════════════════════════════════════ */
.discrepancy-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 195;
  background: #2a1a08;
  border: 2px solid #e0b246;
  color: var(--yellow);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  padding: 6px 14px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.6);
  max-width: 500px;
  text-align: center;
  line-height: 1.4;
  animation: discrepIn 0.3s cubic-bezier(.2,.8,.3,1.2);
  pointer-events: none;
}
.discrepancy-banner.match {
  border-color: var(--green);
  color: var(--green-light);
  background: #0d2a16;
}
.discrepancy-banner.mismatch {
  border-color: var(--red-light);
  color: var(--red-light);
  background: #2a0d0d;
  animation: discrepIn 0.3s cubic-bezier(.2,.8,.3,1.2), discrepShake 0.4s ease 0.3s;
}
@keyframes discrepIn { from { opacity:0; transform:translateX(-50%) scale(0.9) translateY(-6px); } to { opacity:1; transform:translateX(-50%) scale(1) translateY(0); } }
@keyframes discrepShake { 0%,100%{ transform:translateX(-50%); } 20%{ transform:translateX(calc(-50% - 5px)); } 40%{ transform:translateX(calc(-50% + 5px)); } 60%{ transform:translateX(calc(-50% - 3px)); } 80%{ transform:translateX(calc(-50% + 3px)); } }

/* ══════════════════════════════════════════════════════════════
   DOKUMEN BARU: SERTIFIKAT VAKSIN / KESEHATAN
   (warna: hijau medis dengan pita merah palang)
══════════════════════════════════════════════════════════════ */
.doc-vaksin {
  width: 250px;
  background: linear-gradient(170deg, #f0f8f2, #dff0e4);
  color: #0d2a18;
  font-family: var(--font-doc);
  border-color: #2d7a50;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5), 8px 8px 18px rgba(0,0,0,0.3);
}
.vaksin-header {
  background: linear-gradient(135deg, #1a5c30, #0d3b1e);
  color: #c8f0d8;
  padding: 7px 10px;
  text-align: center;
  border-bottom: 3px solid #4aa870;
  position: relative;
  overflow: hidden;
}
.vaksin-header::before {
  content: '✚';
  position: absolute; top: 3px; left: 8px;
  font-size: 14px; color: rgba(255,80,80,0.7);
}
.vaksin-header::after {
  content: '✚';
  position: absolute; top: 3px; right: 8px;
  font-size: 14px; color: rgba(255,80,80,0.7);
}
.vaksin-title { font-family: var(--font-head); font-size: 10px; letter-spacing: 2px; font-weight: 600; }
.vaksin-sub   { font-size: 7px; opacity: 0.75; margin-top: 2px; }
.vaksin-body { padding: 8px 12px; font-size: 8.5px; line-height: 1.7; }
.vaksin-body .f-label { font-size: 6.5px; color: #3a7a54; letter-spacing: 1px; text-transform: uppercase; display: block; margin-top: 3px; }
.vaksin-body .f-val   { font-size: 10px; color: #0d2a18; font-family: var(--font-ui); font-weight: 700; display: block; border-bottom: 1px dotted #8ab89a; }
.vaksin-status-badge {
  display: inline-block; margin: 4px 0; padding: 2px 10px;
  background: #1a5c30; color: #c8f0d8; font-family: var(--font-head);
  font-size: 9px; letter-spacing: 2px; border: 1.5px solid #4aa870;
}
.vaksin-footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 4px 10px 6px; border-top: 1px dashed #8ab89a; font-size: 7px; color: #4a7a5a;
}

/* ══════════════════════════════════════════════════════════════
   DOKUMEN BARU: SUPLEMEN IDENTITAS (IDENTITY SUPPLEMENT)
   (warna: biru tua kedinasan, ada sidik jari)
══════════════════════════════════════════════════════════════ */
.doc-suplemen {
  width: 240px;
  background: linear-gradient(160deg, #e8edf8, #d4daf0);
  color: #0d1a3a;
  font-family: var(--font-doc);
  border-color: #3455a8;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5), 8px 8px 18px rgba(0,0,0,0.3);
}
.suplemen-header {
  background: linear-gradient(135deg, #1a2e70, #0d1e50);
  color: #c8d4f8;
  padding: 6px 10px;
  text-align: center;
  border-bottom: 2px solid #4a68c8;
}
.suplemen-title { font-family: var(--font-head); font-size: 10px; letter-spacing: 2px; font-weight: 600; }
.suplemen-sub   { font-size: 7px; opacity: 0.7; margin-top: 1px; }
.suplemen-body  { padding: 8px 11px; }
.suplemen-body .f-label { font-size: 6.5px; color: #3a5090; letter-spacing: 1px; text-transform: uppercase; display: block; margin-top: 3px; }
.suplemen-body .f-val   { font-size: 10px; color: #0d1a3a; font-family: var(--font-ui); font-weight: 700; display: block; border-bottom: 1px dotted #8a98d8; }
.suplemen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.fingerprint-box {
  width: 60px; height: 60px; margin: 6px auto;
  display: flex; align-items: center; justify-content: center;
  background: #c8d4f8; border: 1.5px solid #6a80c8;
  font-size: 36px; color: #1a2e70; opacity: 0.7;
  border-radius: 2px;
}
.suplemen-footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 4px 10px 6px; border-top: 1px dashed #8a98d8; font-size: 7px; color: #4a5a90;
}

/* ══════════════════════════════════════════════════════════════
   DOKUMEN BARU: LEMBAR BURONAN (WANTED POSTER)
   (warna: kuning lusuh ala poster buronan)
══════════════════════════════════════════════════════════════ */
.doc-buronan {
  width: 220px;
  background: linear-gradient(160deg, #f2e8c0, #e4d8a8);
  color: #1a100a;
  font-family: var(--font-doc);
  border-color: #8a6a20;
  border-width: 3px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.55), 8px 8px 18px rgba(0,0,0,0.35);
  image-rendering: pixelated;
}
.buronan-header {
  background: linear-gradient(135deg, #8a1a1a, #5a0a0a);
  color: #ffd8a0;
  padding: 6px 10px;
  text-align: center;
  border-bottom: 3px double #c83030;
}
.buronan-title { font-family: var(--font-head); font-size: 14px; letter-spacing: 4px; font-weight: 700; text-shadow: 1px 1px 0 rgba(0,0,0,0.5); }
.buronan-sub   { font-size: 7px; opacity: 0.8; letter-spacing: 2px; }
.buronan-body  { padding: 8px 10px; text-align: center; }
.buronan-photo-box {
  width: 80px; height: 90px; margin: 0 auto 6px;
  background: #c8b890; border: 2px solid #8a6a20;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.4);
}
.buronan-photo-box::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px);
  pointer-events: none;
}
.buronan-name {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  letter-spacing: 1px; color: #1a100a; margin: 4px 0 2px;
  border-top: 1px solid #8a6a20; border-bottom: 1px solid #8a6a20;
  padding: 2px 0;
}
.buronan-desc { font-size: 8px; line-height: 1.4; color: #4a380a; }
.buronan-reward {
  margin-top: 6px; padding: 4px 8px;
  background: #8a1a1a; color: #ffd8a0;
  font-family: var(--font-head); font-size: 11px; letter-spacing: 1px;
  font-weight: 700; border: 1px solid #c83030;
}
.buronan-footer {
  font-size: 6.5px; color: #6a5210; padding: 3px 8px 5px;
  border-top: 1px dashed #8a6a20; text-align: center; letter-spacing: 1px;
}

/* ══════════════════════════════════════════════════════════════
   PASPOR ASING (tampilan berbeda dari paspor Republik Arunika)
══════════════════════════════════════════════════════════════ */
.doc-passport.passport-foreign {
  background: linear-gradient(145deg, #e8e0d0, #d4c8b0);
}
.doc-passport.passport-foreign .passport-book-spread { background: #ddd5bc; }
.doc-passport.passport-foreign .passport-page-right { background: #e0d8c0; }
.doc-passport.passport-foreign .pass-hdr-title { color: #3d2a1c; }

/* Label "ASING" pada paspor luar negeri */
.foreign-badge {
  display: inline-block; background: #8a3a10; color: #ffd8b8;
  font: 700 7px var(--font-head); padding: 1px 5px;
  letter-spacing: 1.5px; border: 1px solid #c05020;
  margin-left: 4px; vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE: pastikan dokumen baru juga absolute
══════════════════════════════════════════════════════════════ */
.doc-card.doc-vaksin,
.doc-card.doc-suplemen,
.doc-card.doc-buronan { position: absolute; }

/* Buronan: efek "poster lusuh" */
.doc-buronan::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 15%, rgba(120,80,20,0.14), transparent 45%),
    radial-gradient(ellipse at 90% 80%, rgba(100,60,10,0.10), transparent 40%);
}

/* ══════════════════════════════════════════════════════════════
   DISCREPANCY HIGHLIGHT pada field-value yang dipilih saat inspect
══════════════════════════════════════════════════════════════ */
.doc-card .f-val[data-inspect-key] { position: relative; }

/* Glow pada dokumen yang berisi data yang sedang diperiksa */
.doc-card.doc-inspect-active {
  box-shadow: 0 0 0 2px #9cd270, 6px 6px 0 rgba(0,0,0,0.6), 10px 10px 22px rgba(0,0,0,0.45) !important;
}

