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

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

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

/* Wrapper Utama Game */
.dus-sn-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-sn-wrap * { box-sizing: border-box; }

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

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

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

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

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

/* Metrik */
.dus-sn-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.dus-sn-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-sn-metric-pill strong { font-size: 0.88rem; font-weight: 800; color: #262e24; font-variant-numeric: tabular-nums; }

/* Status */
.dus-sn-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-sn-status.is-warn { background: #fef2f2; color: #991b1b; font-weight: 700; }
.dus-sn-status.is-solved { background: #fef3c7; color: #78350f; font-weight: 700; cursor: pointer; }

/* Papan Sequence Number — Latar Kronometer Sonar & Gelombang Sinapsis Olive-Gold */
.dus-sn-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: #f0f3e2;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Ccircle cx='36' cy='36' r='30' fill='none' stroke='%236b7a14' stroke-opacity='0.1' stroke-width='0.9' stroke-dasharray='4 3'/%3E%3Ccircle cx='36' cy='36' r='18' fill='none' stroke='%23b48318' stroke-opacity='0.13' stroke-width='0.8'/%3E%3Cpath d='M0 36Q18 28 36 36T72 36' fill='none' stroke='%236b7a14' stroke-opacity='0.09' stroke-width='0.8'/%3E%3C/svg%3E"),
    radial-gradient(circle at 50% 42%, #fcfdf8 0%, #e1e7ca 100%);
  background-repeat: repeat, no-repeat;
  background-size: 72px 72px, 100% 100%;
  box-shadow: 0 8px 20px -5px rgba(85, 97, 15, 0.16);
  padding: 11px 12px;
}

.dus-sn-stage {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 7px;
}

.dus-sn-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dus-sn-phase-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: #e5e9ce;
  color: #4d590c;
  border: 1px solid #cdd4ad;
}

.dus-sn-phase-badge.is-showing {
  background: #fef3c7;
  color: #b45309;
  border-color: #f59e0b;
}

.dus-sn-phase-badge.is-input {
  background: #6b7a14;
  color: #ffffff;
  border-color: #6b7a14;
}

.dus-sn-phase-badge.is-good {
  background: #d1fae5;
  color: #065f46;
  border-color: #10b981;
}

.dus-sn-phase-badge.is-bad {
  background: #fee2e2;
  color: #991b1b;
  border-color: #ef4444;
}

.dus-sn-lives {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: #b91c1c;
  font-weight: 800;
}

.dus-sn-lives.is-low {
  animation: dus-sn-heartbeat 1.1s infinite ease-in-out;
}

@keyframes dus-sn-heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

/* Layar Fokus Angka Utama */
.dus-sn-vault {
  position: relative;
  flex: 1;
  min-height: 78px;
  border-radius: 12px;
  border: 1.5px solid #c6ce9f;
  background: linear-gradient(160deg, #ffffff 0%, #f5f7ea 100%);
  box-shadow: inset 0 2px 6px rgba(77, 89, 12, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
}

.dus-sn-vault.is-showing {
  border-color: #d97706;
  background: radial-gradient(circle at 50% 45%, #fffbeb 0%, #fef3c7 100%);
}

.dus-sn-vault.is-input-ready {
  border-color: #6b7a14;
}

.dus-sn-vault.is-good {
  border-color: #059669;
  background: radial-gradient(circle at 50% 45%, #ecfdf5 0%, #d1fae5 100%);
}

.dus-sn-vault.is-bad {
  border-color: #dc2626;
  background: radial-gradient(circle at 50% 45%, #fef2f2 0%, #fee2e2 100%);
}

.dus-sn-digit-view {
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1;
  color: #262e24;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.dus-sn-vault.is-showing .dus-sn-digit-view {
  color: #92400e;
}

.dus-sn-vault.is-good .dus-sn-digit-view {
  color: #047857;
}

.dus-sn-vault.is-bad .dus-sn-digit-view {
  color: #b91c1c;
}

@keyframes dus-sn-pop {
  0% { transform: scale(0.76); opacity: 0.4; }
  65% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.dus-sn-digit-view.is-pop {
  animation: dus-sn-pop 0.2s ease-out;
}

.dus-sn-step-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
}

.dus-sn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(107, 122, 20, 0.24);
  transition: all 0.15s ease;
}

.dus-sn-dot.is-done {
  background: #6b7a14;
}

.dus-sn-dot.is-active {
  width: 14px;
  border-radius: 99px;
  background: #d97706;
}

.dus-sn-pulse-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(128, 128, 0, 0.12);
}

.dus-sn-pulse-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6b7a14 0%, #d97706 100%);
}

/* Deretan Slot Jawaban */
.dus-sn-slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
}

.dus-sn-slot {
  flex: 1;
  max-width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1.5px solid #bfc898;
  background: rgba(255, 255, 255, 0.78);
  color: #262e24;
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}

.dus-sn-slots[data-len="10"] .dus-sn-slot,
.dus-sn-slots[data-len="11"] .dus-sn-slot {
  font-size: 0.78rem;
  height: 29px;
  border-radius: 6px;
}

.dus-sn-slot.is-locked {
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.45);
}

.dus-sn-slot.is-cursor {
  border-color: #d97706;
  background: #fffbeb;
  color: #d97706;
}

.dus-sn-slot.is-filled {
  border-color: #6b7a14;
  background: #ffffff;
  color: #262e24;
}

.dus-sn-slot.is-hinted {
  border-color: #d97706;
  background: #fef3c7;
  color: #92400e;
}

.dus-sn-slot.is-match {
  border-color: #059669;
  background: #d1fae5;
  color: #065f46;
}

.dus-sn-slot.is-mismatch {
  border-color: #dc2626;
  background: #fee2e2;
  color: #991b1b;
}

/* Keypad Taktil 3x4 */
.dus-sn-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.dus-sn-key {
  height: 34px;
  border-radius: 8px;
  border: 1px solid #bcc496;
  background: linear-gradient(180deg, #ffffff 0%, #eef1de 100%);
  box-shadow: 0 1px 2px rgba(77, 89, 12, 0.12);
  color: #262e24;
  font-size: 0.92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.12s ease, transform 0.08s ease;
}

.dus-sn-key:hover:not(:disabled) {
  background: #e4e9ce;
  border-color: #808000;
}

.dus-sn-key:active:not(:disabled) {
  transform: scale(0.95);
}

.dus-sn-key:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.dus-sn-key.is-fn {
  font-size: 0.74rem;
  color: #535b32;
  background: #e9ecd7;
}

.dus-sn-key.is-submit {
  font-size: 0.76rem;
  background: #6b7a14;
  border-color: #6b7a14;
  color: #ffffff;
}

.dus-sn-key.is-submit:hover:not(:disabled) {
  background: #58650f;
}

/* Tombol Bantuan & Aksi Bawah */
.dus-sn-tools-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.dus-sn-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.75rem; font-weight: 700; color: #3f4628; cursor: pointer; transition: all 0.15s ease; touch-action: manipulation; }
.dus-sn-tool-btn:hover:not(:disabled) { background: #ebeed9; }
.dus-sn-tool-btn:disabled { opacity: 0.48; cursor: not-allowed; }

.dus-sn-footer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 2px; }
.dus-sn-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-sn-btn-olive:hover { background: #58650f; }
.dus-sn-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-sn-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-sn-btn-ghost:hover { background: #f4f5ea; color: #262e24; }

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

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

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