/* Tombol Pemicu Modal Universal — Selaras dengan DUS Arena */
.dus-lo-trigger-card { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 14px !important; background: linear-gradient(135deg, #fcfcf8 0%, #f4f5ea 100%) !important; border: 1px solid #d5d8be !important; border-radius: 14px !important; padding: 16px 20px !important; margin: 20px 0 !important; box-shadow: 0 4px 15px -3px rgba(85, 97, 15, 0.08) !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important; box-sizing: border-box !important; }
.dus-lo-trigger-info { display: flex !important; flex-direction: column !important; gap: 3px !important; min-width: 0 !important; }
.dus-lo-trigger-tag { font-size: 0.65rem !important; font-weight: 800 !important; letter-spacing: 0.08em !important; color: #808000 !important; text-transform: uppercase !important; line-height: 1.3 !important; }
.dus-lo-trigger-title { font-size: 1.1rem !important; font-weight: 800 !important; color: #262e24 !important; margin: 0 !important; padding: 0 !important; line-height: 1.2 !important; }
.dus-lo-trigger-desc { font-size: 0.82rem !important; color: #525740 !important; margin: 0 !important; padding: 0 !important; line-height: 1.4 !important; }
.dus-lo-trigger-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important; padding: 10px 18px !important; background: #6b7a14 !important; color: #ffffff !important; border: none !important; border-radius: 9px !important; font-size: 0.85rem !important; font-weight: 700 !important; line-height: 1.2 !important; cursor: pointer !important; transition: background 0.15s ease, transform 0.1s ease !important; white-space: nowrap !important; flex-shrink: 0 !important; text-decoration: none !important; touch-action: manipulation !important; }
.dus-lo-trigger-btn:hover { background: #58650f !important; color: #ffffff !important; transform: translateY(-1px) !important; }
.dus-lo-trigger-btn svg { flex-shrink: 0 !important; }

@media (max-width: 480px) {
  .dus-lo-trigger-card { flex-direction: column !important; align-items: flex-start !important; }
  .dus-lo-trigger-btn { width: 100% !important; }
}

/* Kanvas Fullscreen Menutupi Seluruh Halaman & Mobile Dock */
.dus-lo-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: linear-gradient(180deg, #fcfcf8 0%, #f4f5ea 100%) !important;
  z-index: 2147483647 !important;
  display: none !important;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  margin: 0 !important;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.dus-lo-modal-overlay[hidden],
.dus-lo-modal-overlay:not(.is-active) {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.dus-lo-modal-overlay:not(.is-active) * {
  pointer-events: none !important;
  visibility: hidden !important;
}

.dus-lo-modal-overlay.is-active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Wrapper Utama Game */
.dus-lo-wrap { width: 100%; max-width: 440px; min-height: 100%; padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px)); background: transparent; border: none; border-radius: 0; box-shadow: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #26291b; box-sizing: border-box; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; display: flex; flex-direction: column; justify-content: space-between; }
.dus-lo-wrap * { box-sizing: border-box; }

.dus-lo-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.dus-lo-brand { min-width: 0; }
.dus-lo-tagline { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.07em; color: #808000; text-transform: uppercase; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dus-lo-heading { font-size: 1.25rem; font-weight: 800; color: #262e24; line-height: 1.15; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dus-lo-top-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }

.dus-lo-timer-box { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 10px; background: #ebeed9; color: #4d590c; border: 1px solid #d7dcc0; border-radius: 10px; font-size: 0.86rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.dus-lo-timer-box svg { flex-shrink: 0; }

.dus-lo-action-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: #ebeed9; color: #4d590c; border: 1px solid #d7dcc0; border-radius: 10px; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; touch-action: manipulation; flex-shrink: 0; }
.dus-lo-action-icon-btn:hover { background: #dfe4c9; color: #26291b; }
.dus-lo-action-icon-btn.dus-lo-close-modal { background: #6b7a14; color: #ffffff; border-color: #6b7a14; }
.dus-lo-action-icon-btn.dus-lo-close-modal:hover { background: #58650f; }

.dus-lo-main { display: flex; flex-direction: column; gap: 12px; }
.dus-lo-right { display: flex; flex-direction: column; gap: 9px; }

/* Tab Tingkat Kesulitan */
.dus-lo-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #e8ebd5; padding: 4px; border-radius: 10px; }
.dus-lo-tab { padding: 7px 4px; border: none; border-radius: 7px; background: transparent; color: #535b32; font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: all 0.16s ease; touch-action: manipulation; }
.dus-lo-tab:hover { color: #26291b; }
.dus-lo-tab.is-active { background: #6b7a14; color: #ffffff; box-shadow: 0 2px 6px rgba(85, 97, 15, 0.25); }

/* Metrik */
.dus-lo-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.dus-lo-metric-pill { display: flex; align-items: center; justify-content: space-between; background: #ffffff; border: 1px solid #d7dcc0; border-radius: 9px; padding: 7px 11px; font-size: 0.78rem; color: #535b32; font-weight: 600; }
.dus-lo-metric-pill strong { font-size: 0.9rem; font-weight: 800; color: #262e24; font-variant-numeric: tabular-nums; }

/* Status */
.dus-lo-status { font-size: 0.8rem; text-align: center; color: #595e47; min-height: 31px; line-height: 1.35; background: #eff1e2; padding: 6px 10px; border-radius: 8px; transition: all 0.2s ease; }
.dus-lo-status.is-warn { background: #fef2f2; color: #991b1b; font-weight: 700; }
.dus-lo-status.is-solved { background: #fef3c7; color: #78350f; font-weight: 700; cursor: pointer; }

/* Papan Lights Out — Latar Kisi Astral & Cahaya Lentera Olive-Gold */
.dus-lo-board-shell {
  position: relative;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  border: 2.5px solid #4d590c;
  background-color: #ecefda;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='18' fill='none' stroke='%236b7a14' stroke-opacity='0.11' stroke-width='0.8'/%3E%3Cpath d='M24 2L28 20L46 24L28 28L24 46L20 28L2 24L20 20Z' fill='none' stroke='%23b48318' stroke-opacity='0.14' stroke-width='0.8'/%3E%3Ccircle cx='24' cy='24' r='2' fill='%2355610f' fill-opacity='0.18'/%3E%3C/svg%3E"),
    radial-gradient(circle at 50% 50%, #fcfdf6 0%, #dfe5c5 100%);
  background-repeat: repeat, no-repeat;
  background-size: 48px 48px, 100% 100%;
  box-shadow: 0 8px 20px -5px rgba(85, 97, 15, 0.16);
  padding: 10px;
}

.dus-lo-board {
  --lo-size: 5;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--lo-size), minmax(0, 1fr));
  grid-template-rows: repeat(var(--lo-size), minmax(0, 1fr));
  gap: 8px;
}

.dus-lo-board[data-size="6"] {
  gap: 6px;
}

.dus-lo-cell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 11px;
  border: 1.5px solid #353e0c;
  background: linear-gradient(155deg, #4b5713 0%, #333b0a 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(255, 255, 255, 0.45);
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  outline: none;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease, transform 0.09s ease;
}

.dus-lo-board[data-size="6"] .dus-lo-cell {
  border-radius: 9px;
}

.dus-lo-cell:hover {
  border-color: #808000;
}

.dus-lo-cell:active {
  transform: scale(0.94);
}

.dus-lo-core {
  width: 34%;
  height: 34%;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
  pointer-events: none;
}

/* Lampu Menyala (Warm Luminous Gold Lantern) */
.dus-lo-cell.is-on {
  border-color: #d97706;
  background: radial-gradient(circle at 35% 30%, #fef9c3 0%, #fbbf24 52%, #d97706 100%);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.48), inset 0 1px 2px rgba(255, 255, 255, 0.85);
}

.dus-lo-cell.is-on:hover {
  border-color: #b45309;
}

.dus-lo-cell.is-on .dus-lo-core {
  width: 44%;
  height: 44%;
  border-color: #ffffff;
  background: radial-gradient(circle, #ffffff 0%, #fef3c7 100%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

.dus-lo-cell.is-hint-pulse {
  box-shadow: 0 0 0 3px #10b981, 0 0 14px rgba(16, 185, 129, 0.55) !important;
}

.dus-lo-cell.is-solved {
  border-color: #059669 !important;
  background: linear-gradient(155deg, #ecfdf5 0%, #a7f3d0 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 6px rgba(5, 150, 105, 0.2) !important;
}

.dus-lo-cell.is-solved .dus-lo-core {
  width: 28%;
  height: 28%;
  border-color: #059669;
  background: #10b981;
  box-shadow: none;
}

/* Tirai Penutup Anti-Curang (Frosted Glass & Marquetry) */
.dus-lo-curtain {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 35%, rgba(252, 252, 248, 0.92) 0%, rgba(232, 237, 208, 0.94) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M0 22L22 0L44 22L22 44Z' fill='none' stroke='%236b7a14' stroke-opacity='0.16' stroke-width='1'/%3E%3C/svg%3E");
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
  visibility: inherit;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.dus-lo-curtain.is-hidden,
.dus-lo-curtain[hidden] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(1.03);
  pointer-events: none !important;
}

.dus-lo-curtain-card {
  width: 100%;
  max-width: 280px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 248, 234, 0.92) 100%);
  border: 1.5px solid rgba(180, 131, 24, 0.42);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 12px 28px -6px rgba(77, 89, 12, 0.22);
}

.dus-lo-emblem {
  width: 76px;
  height: 50px;
  margin: 0 auto 8px;
  border-radius: 11px;
  background: linear-gradient(180deg, #f3f5e4 0%, #e4e9cb 100%);
  border: 1px solid #cfd6b3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 #ffffff;
}

.dus-lo-curtain-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #262e24;
  margin-bottom: 5px;
}

.dus-lo-curtain-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  background: #eef1dc;
  border: 1px solid #cfd6b3;
  color: #4d590c;
  font-size: 0.71rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.dus-lo-curtain-note {
  font-size: 0.76rem;
  color: #595e47;
  line-height: 1.4;
  margin: 0 0 13px;
}

.dus-lo-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid #4d590c;
  background: linear-gradient(180deg, #7c8d19 0%, #5b690f 100%);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 5px 14px rgba(77, 89, 12, 0.3);
  transition: transform 0.12s ease, filter 0.15s ease;
  touch-action: manipulation;
}

.dus-lo-start-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.dus-lo-start-btn:active {
  transform: scale(0.97);
}

/* Tombol Bantuan & Aksi Bawah */
.dus-lo-tools-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.dus-lo-tool-btn { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; padding: 8px 6px; background: #ffffff; border: 1px solid #cbd0b2; border-radius: 9px; font-size: 0.76rem; font-weight: 700; color: #3f4628; cursor: pointer; transition: all 0.15s ease; touch-action: manipulation; }
.dus-lo-tool-btn:hover:not(:disabled) { background: #ebeed9; }
.dus-lo-tool-btn:disabled { opacity: 0.48; cursor: not-allowed; }

.dus-lo-footer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 2px; }
.dus-lo-btn-olive { padding: 10px 12px; background: #6b7a14; color: #ffffff; border: none; border-radius: 9px; font-size: 0.84rem; font-weight: 700; cursor: pointer; width: 100%; touch-action: manipulation; }
.dus-lo-btn-olive:hover { background: #58650f; }
.dus-lo-btn-outline { padding: 10px 12px; background: #ffffff; color: #4d590c; border: 1px solid #b5bc96; border-radius: 9px; font-size: 0.84rem; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.dus-lo-btn-ghost { margin-top: 7px; padding: 7px 10px; background: transparent; color: #595e47; border: 1px solid #d5d8be; border-radius: 8px; font-size: 0.78rem; font-weight: 700; cursor: pointer; width: 100%; touch-action: manipulation; }
.dus-lo-btn-ghost:hover { background: #f4f5ea; color: #262e24; }

@media (min-width: 720px) {
  .dus-lo-modal-overlay { align-items: center; }
  .dus-lo-wrap { max-width: 720px; min-height: auto; padding: 24px; justify-content: center; }
  .dus-lo-top { margin-bottom: 18px; }
  .dus-lo-heading { font-size: 1.4rem; }
  .dus-lo-main { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: stretch; }
  .dus-lo-board-shell { max-width: 360px; }
  .dus-lo-right { justify-content: space-between; }
}

/* Modal Dalam Papan (Menang & Cara Bermain) */
.dus-lo-modal-inner { position: absolute; inset: 0; background: rgba(31, 34, 22, 0.84); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 14px; z-index: 12; }
.dus-lo-modal-inner[hidden] { display: none; }
.dus-lo-modal-card { background: #ffffff; border-radius: 12px; padding: 18px; width: 100%; max-width: 300px; text-align: center; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25); }
.dus-lo-trophy { width: 36px; height: 36px; margin: 0 auto 6px; border-radius: 50%; background: #fef3c7; color: #d97706; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }
.dus-lo-modal-title { font-size: 1.05rem; font-weight: 800; color: #4d590c; margin-bottom: 6px; }
.dus-lo-modal-desc { font-size: 0.8rem; color: #525740; margin: 0 0 12px; line-height: 1.45; text-align: left; }
.dus-lo-save-box { background: #f7f8ee; padding: 9px; border-radius: 8px; margin-bottom: 10px; border: 1px solid #dce0c5; text-align: left; }
.dus-lo-label { display: block; font-size: 0.73rem; font-weight: 700; color: #4d590c; margin-bottom: 5px; }
.dus-lo-input-row { display: flex; gap: 6px; justify-content: center; }
.dus-lo-input-row input { width: 112px; text-align: center; font-size: 0.92rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 6px; border: 1.5px solid #6b7a14; border-radius: 6px; outline: none; }
.dus-lo-btn-gold { padding: 5px 12px; background: #d97706; color: #ffffff; border: none; border-radius: 6px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.dus-lo-filter-msg { font-size: 0.72rem; color: #b91c1c; margin-top: 4px; min-height: 13px; }

/* Panel Rekor Lokal */
.dus-lo-lb-panel { margin-top: 14px; background: #ffffff; border: 1px solid #d5d8be; border-radius: 10px; padding: 10px 12px; text-align: left; }
.dus-lo-lb-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; font-weight: 700; color: #4d590c; padding-bottom: 6px; border-bottom: 1px solid #eceee0; margin-bottom: 6px; }
.dus-lo-link-btn { background: none; border: none; color: #9ca3af; font-size: 0.72rem; cursor: pointer; text-decoration: underline; }
.dus-lo-lb-list { font-size: 0.8rem; color: #374151; max-height: 120px; overflow-y: auto; }
.dus-lo-lb-item { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed #eceee0; }
.dus-lo-lb-item:last-child { border-bottom: none; }
.dus-lo-lb-tag { font-size: 0.7rem; background: #eef0df; color: #4d590c; padding: 1px 6px; border-radius: 4px; margin-left: 6px; text-transform: capitalize; }
