/* Tombol Pemicu Modal Universal — Selaras dengan DUS Arena */
.dus-ws-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-ws-trigger-info { display: flex !important; flex-direction: column !important; gap: 3px !important; min-width: 0 !important; }
.dus-ws-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-ws-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-ws-trigger-desc { font-size: 0.82rem !important; color: #525740 !important; margin: 0 !important; padding: 0 !important; line-height: 1.4 !important; }
.dus-ws-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-ws-trigger-btn:hover { background: #58650f !important; color: #ffffff !important; transform: translateY(-1px) !important; }
.dus-ws-trigger-btn svg { flex-shrink: 0 !important; }

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

/* Kanvas Fullscreen Menutupi Seluruh Halaman & Mobile Dock */
.dus-ws-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: flex; 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; transition: opacity 0.2s ease, visibility 0.2s ease; }
.dus-ws-modal-overlay.is-active { opacity: 1; visibility: visible; }

/* Wrapper Utama Game di Dalam Kanvas Fullscreen */
.dus-ws-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-ws-wrap * { box-sizing: border-box; }

.dus-ws-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.dus-ws-brand { min-width: 0; }
.dus-ws-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-ws-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-ws-top-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }

.dus-ws-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-ws-timer-box svg { flex-shrink: 0; }

.dus-ws-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-ws-action-icon-btn:hover { background: #dfe4c9; color: #26291b; }
.dus-ws-action-icon-btn.dus-ws-close-modal { background: #6b7a14; color: #ffffff; border-color: #6b7a14; }
.dus-ws-action-icon-btn.dus-ws-close-modal:hover { background: #58650f; }

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

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

/* Pemilih Kategori */
.dus-ws-cat-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #ffffff; border: 1px solid #cbd0b2; border-radius: 9px; padding: 5px 10px; }
.dus-ws-cat-label { font-size: 0.72rem; font-weight: 800; color: #4d590c; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.dus-ws-cat-select { flex: 1; min-width: 0; border: none; background: transparent; color: #26291b; font-size: 0.82rem; font-weight: 700; text-align: right; cursor: pointer; outline: none; padding: 2px 4px; }

/* Status & Pratinjau Tarikan Huruf */
.dus-ws-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.15s ease; }
.dus-ws-status.is-dragging { background: #6b7a14; color: #ffffff; font-weight: 800; letter-spacing: 0.12em; }
.dus-ws-status.is-solved { background: #fef3c7; color: #78350f; font-weight: 700; }

/* Papan Kertas Teka-Teki dengan Lapisan Kapsul Stabilo */
.dus-ws-board-shell {
  position: relative;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 2.5px solid #55610f;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #f8f9f0 68%, #eff1e2 100%);
  box-shadow: inset 0 0 0 3px rgba(107, 122, 20, 0.1), 0 8px 20px -4px rgba(85, 97, 15, 0.14);
}

.dus-ws-lines-svg {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 1 !important;
  mix-blend-mode: multiply;
}

.dus-ws-board {
  --dus-ws-cols: 12;
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  display: grid !important;
  grid-template-columns: repeat(var(--dus-ws-cols), minmax(0, 1fr)) !important;
  grid-template-rows: repeat(var(--dus-ws-cols), minmax(0, 1fr)) !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  touch-action: none;
}

.dus-ws-cell {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 100%;
  font-weight: 800;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent;
  color: #232817;
  border-right: 1px solid rgba(107, 122, 20, 0.11);
  border-bottom: 1px solid rgba(107, 122, 20, 0.11);
  cursor: pointer;
  transition: transform 0.12s ease, color 0.12s ease;
  overflow: hidden;
}

.dus-ws-board[data-size="10"] .dus-ws-cell { font-size: clamp(0.98rem, 3.9vw, 1.2rem); }
.dus-ws-board[data-size="12"] .dus-ws-cell { font-size: clamp(0.86rem, 3.3vw, 1.04rem); }
.dus-ws-board[data-size="14"] .dus-ws-cell { font-size: clamp(0.75rem, 2.7vw, 0.92rem); }

.dus-ws-cell:hover:not(.is-selecting) {
  color: #55610f;
}

.dus-ws-cell.is-found-any {
  color: #1c2211;
}

.dus-ws-cell.is-selecting {
  color: #1a1f0e !important;
  transform: scale(1.14);
  z-index: 3;
}

.dus-ws-cell.is-anchor::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 2px solid #d97706;
  pointer-events: none;
}

.dus-ws-cell.is-hint::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.45);
  border: 2px solid #d97706;
  animation: dusWsHintPulse 0.9s ease-in-out 3;
  pointer-events: none;
}

@keyframes dusWsHintPulse {
  0%, 100% { transform: scale(0.82); opacity: 0.35; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* Kotak Daftar Kata */
.dus-ws-word-box { background: #ffffff; border: 1px solid #cbd0b2; border-radius: 10px; padding: 9px 10px; display: flex; flex-direction: column; gap: 8px; }
.dus-ws-word-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 0.78rem; font-weight: 700; color: #4d590c; padding-bottom: 6px; border-bottom: 1px solid #eceee0; }
.dus-ws-tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 9px; background: #f7f8ee; border: 1px solid #cbd0b2; border-radius: 7px; font-size: 0.74rem; font-weight: 700; color: #3f4628; cursor: pointer; transition: all 0.15s ease; touch-action: manipulation; white-space: nowrap; }
.dus-ws-tool-btn:hover:not(:disabled) { background: #ebeed9; }
.dus-ws-tool-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.dus-ws-word-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.dus-ws-word-chip { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 5px 8px; background: #f7f8ee; border: 1px solid #dfe2cc; border-radius: 7px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; color: #26291b; transition: all 0.2s ease; min-width: 0; }
.dus-ws-word-chip-main { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.dus-ws-word-dot { width: 7px; height: 7px; border-radius: 50%; background: #c5cba8; flex-shrink: 0; transition: background-color 0.2s ease; }
.dus-ws-word-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dus-ws-word-chip.is-found .dus-ws-word-text { text-decoration: line-through; opacity: 0.78; }
.dus-ws-word-chip.is-found-0 { background: #edf3d4; border-color: #b7c96b; color: #36420b; }
.dus-ws-word-chip.is-found-0 .dus-ws-word-dot { background: #849918; }
.dus-ws-word-chip.is-found-1 { background: #fef3c7; border-color: #f3c96b; color: #78350f; }
.dus-ws-word-chip.is-found-1 .dus-ws-word-dot { background: #d97706; }
.dus-ws-word-chip.is-found-2 { background: #dcf2ee; border-color: #84c9be; color: #134e4a; }
.dus-ws-word-chip.is-found-2 .dus-ws-word-dot { background: #0d9488; }
.dus-ws-word-chip.is-found-3 { background: #fae4d7; border-color: #e6a985; color: #7c2d12; }
.dus-ws-word-chip.is-found-3 .dus-ws-word-dot { background: #c26d3a; }
.dus-ws-word-chip.is-found-4 { background: #e1eaf7; border-color: #9cb6de; color: #1e3a5f; }
.dus-ws-word-chip.is-found-4 .dus-ws-word-dot { background: #4f6d9a; }

.dus-ws-word-tag { font-size: 0.6rem; font-weight: 700; letter-spacing: 0; text-decoration: none !important; color: #6b7a14; background: rgba(255, 255, 255, 0.85); border: 1px solid #d7dcc0; border-radius: 4px; padding: 1px 4px; flex-shrink: 0; }

/* Tombol Aksi Bawah */
.dus-ws-footer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 2px; }
.dus-ws-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-ws-btn-olive:hover { background: #58650f; }
.dus-ws-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; }

@media (min-width: 720px) {
  .dus-ws-modal-overlay { align-items: center; }
  .dus-ws-wrap { max-width: 720px; min-height: auto; padding: 24px; justify-content: center; }
  .dus-ws-top { margin-bottom: 18px; }
  .dus-ws-heading { font-size: 1.4rem; }
  .dus-ws-main { display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: stretch; }
  .dus-ws-board-shell { max-width: 360px; }
  .dus-ws-right { justify-content: space-between; }
  .dus-ws-board[data-size="10"] .dus-ws-cell { font-size: 1.18rem; }
  .dus-ws-board[data-size="12"] .dus-ws-cell { font-size: 1.02rem; }
  .dus-ws-board[data-size="14"] .dus-ws-cell { font-size: 0.9rem; }
}

/* Modal Dalam Papan (Menang & Cara Bermain) */
.dus-ws-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: 10; }
.dus-ws-modal-inner[hidden] { display: none; }
.dus-ws-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-ws-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-ws-modal-title { font-size: 1.05rem; font-weight: 800; color: #4d590c; margin-bottom: 6px; }
.dus-ws-modal-desc { font-size: 0.8rem; color: #525740; margin: 0 0 12px; line-height: 1.45; text-align: left; }
.dus-ws-save-box { background: #f7f8ee; padding: 9px; border-radius: 8px; margin-bottom: 10px; border: 1px solid #dce0c5; text-align: left; }
.dus-ws-label { display: block; font-size: 0.73rem; font-weight: 700; color: #4d590c; margin-bottom: 5px; }
.dus-ws-input-row { display: flex; gap: 6px; justify-content: center; }
.dus-ws-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-ws-btn-gold { padding: 5px 12px; background: #d97706; color: #ffffff; border: none; border-radius: 6px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.dus-ws-filter-msg { font-size: 0.72rem; color: #b91c1c; margin-top: 4px; min-height: 13px; }

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