/* QR 코드 스캔 전용 스타일 */

nav { max-width: 720px; }
main { max-width: 720px; }

.mode-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.mode-tab {
  flex: 1;
  padding: 0.55rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-sub);
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.mode-tab:hover { color: var(--text); }
.mode-tab.active {
  background: var(--primary);
  color: white;
}

.mode-section[hidden] { display: none; }

/* 카메라 프레임 */
.camera-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.85rem;
}
.camera-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  background: linear-gradient(135deg, #333, #1a1a1a);
}
.camera-placeholder[hidden] { display: none; }

/* 스캔 가이드 코너 */
.scan-overlay {
  position: absolute;
  inset: 12%;
  pointer-events: none;
}
.scan-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.85);
}
.scan-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; border-top-left-radius: 6px; }
.scan-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-top-right-radius: 6px; }
.scan-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-bottom-left-radius: 6px; }
.scan-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; border-bottom-right-radius: 6px; }

.mode-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 0.6rem 1.1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary[hidden] { display: none; }

.btn-secondary {
  padding: 0.55rem 1rem;
  background: none;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-secondary[hidden] { display: none; }

.hint-text {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 0.6rem;
}

/* 결과 카드 */
.result-card {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.result-card[hidden] { display: none; }
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.9rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.result-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-sub);
}
.btn-icon {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-sub);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover {
  background: var(--bg);
  color: var(--text);
}
.result-body {
  padding: 0.95rem;
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-all;
  line-height: 1.5;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.result-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 0.9rem 0.9rem;
}

/* 모바일 */
@media (max-width: 480px) {
  .scan-corner { width: 22px; height: 22px; border-width: 2.5px; }
  .result-body { font-size: 0.85rem; }
}
