/* ===== ダブル検知 (double-detect) ===== */

#double-detect .dd-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 360px;
  gap: 14px;
  margin: 4px auto;
}

/* Progress row */
.dd-progress-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dd-progress {
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.05em;
}
.dd-timer-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
#dd-timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b 60%, #ef4444);
  border-radius: 3px;
}

/* Card */
.dd-card {
  width: 170px;
  height: 240px;
  background: #fff;
  border-radius: 16px;
  border: 2px solid #e5e7eb;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, 'Times New Roman', serif;
  animation: ddPop 0.18s ease-out;
}

@keyframes ddPop {
  0%   { opacity: 0; transform: translateY(-14px) scale(0.82); }
  65%  { transform: translateY(2px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.dd-red   { color: #dc2626; }
.dd-black { color: #1e293b; }

.dd-corner {
  position: absolute;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
.dd-tl { top: 7px; left: 9px; }
.dd-br { bottom: 7px; right: 9px; transform: rotate(180deg); }

/* Pip area (numeric cards) */
.dd-pip-area {
  position: relative;
  width: 130px;
  height: 180px;
  flex-shrink: 0;
}
.dd-pip {
  position: absolute;
  transform: translate(-50%, -50%);
  line-height: 1;
  user-select: none;
}
.dd-rot {
  transform: translate(-50%, -50%) rotate(180deg);
}

/* Face cards (J, Q, K) */
.dd-face-letter {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
  font-family: Georgia, 'Times New Roman', serif;
}

/* Stats row */
.dd-stats-row {
  display: flex;
  gap: 36px;
}
.dd-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}
.dd-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color, #f1f5f9);
}

/* Double button */
.dd-btn-double {
  width: 170px;
  height: 64px;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.45);
  transition: transform 0.08s, box-shadow 0.08s;
  letter-spacing: 0.04em;
}
.dd-btn-double:active:not(:disabled) {
  transform: scale(0.93);
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.3);
}
.dd-btn-double:disabled {
  opacity: 0.42;
  cursor: default;
}

/* Position input area */
.dd-input-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.dd-pos-question {
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  text-align: center;
  line-height: 1.4;
}
.dd-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dd-pos-input {
  width: 76px;
  height: 44px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color, #f1f5f9);
  outline: none;
  transition: border-color 0.15s;
}
.dd-pos-input:focus {
  border-color: #8b5cf6;
}
.dd-btn-submit {
  height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.1s;
}
.dd-btn-submit:active { opacity: 0.82; }

/* Feedback */
.dd-feedback {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 7px 14px;
  border-radius: 10px;
  width: 100%;
}
.dd-fb-ok { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.dd-fb-ng { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
