/* 부재증명 - phone feed UI, 320px ~ desktop (centered 480px) */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  min-height: 100%;
  background: #101418;
  color: #e8edf2;
  font-family: -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
#app { max-width: 480px; margin: 0 auto; padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom); display: flex; flex-direction: column; min-height: 100dvh; }

#hud { display: flex; gap: 6px; padding: 10px 0 6px; position: sticky; top: 0; background: #101418; z-index: 3; }
.hud-chip { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 5px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; }
.hud-label { font-size: 11px; color: #93a1b0; }
.hud-value { font-size: 16px; font-weight: 800; }
.hearts { color: #ff5d73; letter-spacing: 1px; }
.icon-btn { flex: 0 0 46px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: inherit; font-size: 17px; cursor: pointer; }

#hint-bar { font-size: 12px; color: #93a1b0; text-align: center; padding: 2px 0 8px; }

#feed { flex: 1; padding-bottom: 30px; }
.feed-section { font-size: 14px; color: #aeb9c6; margin: 14px 2px 8px; }

.card {
  background: #1a2129;
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 13px 14px;
  margin-bottom: 9px;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.15s, transform 0.1s;
}
.card:active { transform: scale(0.985); }
.card .card-person { font-size: 12px; font-weight: 800; color: #6cb8ff; margin-bottom: 4px; }
.card .card-text { font-size: 14.5px; line-height: 1.55; }
.card.selected { border-color: #ffd166; background: #232a24; }
.card.matched { border-color: #3ddc84; opacity: 0.65; pointer-events: none; }
.card.matched::after { content: ' ✔ 모순 확정'; color: #3ddc84; font-size: 12px; font-weight: 700; }
.card.wrongflash { border-color: #ff5d73; animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

#toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(20,26,33,0.95);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
  z-index: 20;
  max-width: 88vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.overlay { position: fixed; inset: 0; background: rgba(8,11,14,0.82); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 10; padding: 20px; }
.overlay.open { display: flex; }
.overlay-card { background: #1a2129; border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; padding: 26px 22px; width: 100%; max-width: 340px; text-align: center; }
.overlay-card h1 { font-size: 28px; margin-bottom: 12px; }
.overlay-card h2 { font-size: 23px; margin-bottom: 10px; }
.tagline { font-size: 13.5px; line-height: 1.65; color: #aeb9c6; margin-bottom: 16px; }
.best-record { display: flex; justify-content: center; gap: 10px; align-items: baseline; margin-bottom: 18px; }
.record-label { font-size: 12px; color: #93a1b0; }
.record-value { font-size: 20px; font-weight: 800; color: #ffd166; }
.stamp { display: inline-block; border: 3px solid #ff5d73; color: #ff5d73; font-weight: 900; font-size: 15px; letter-spacing: 2px; border-radius: 8px; padding: 4px 12px; transform: rotate(-6deg); margin-bottom: 12px; }
.result-msg { font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.result-meta { font-size: 13px; color: #93a1b0; margin-bottom: 18px; }
.overlay-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-primary { min-height: 50px; border: none; border-radius: 14px; background: #2f6bff; color: white; font-size: 16px; font-weight: 800; cursor: pointer; }
.btn-secondary { min-height: 46px; border: 1px solid rgba(255,255,255,0.2); border-radius: 14px; background: transparent; color: #e8edf2; font-size: 15px; font-weight: 700; cursor: pointer; }
.btn-primary:active, .btn-secondary:active { transform: scale(0.97); }

@media (max-width: 340px) {
  .hud-value { font-size: 14px; }
  .card .card-text { font-size: 13.5px; }
}
