:root {
  --navy: #0a1170;
  --blue: #1f5bff;
  --blue-2: #3b7bff;
  --violet: #6b3cf0;
  --cyan: #2fd3f0;
  --ink: #ffffff;
  --muted: rgba(225, 232, 255, 0.72);
  --line: rgba(160, 185, 255, 0.28);
  --card: rgba(16, 28, 120, 0.55);
  --card-2: rgba(30, 50, 170, 0.45);
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: #0b1460;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
.bg {
  position: fixed; inset: 0; z-index: -1;
  background: url("/deto-2026/assets/bg.jpg") center / cover no-repeat, linear-gradient(160deg, #1a0f6e, #0a2fb8 60%, #3a6dff);
}
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.screen { padding: 28px 22px calc(32px + env(safe-area-inset-bottom)); }
.screen.loading { display: grid; place-items: center; min-height: 60vh; }
[hidden] { display: none !important; }

.logo { display: block; width: 72%; max-width: 300px; margin: 8px auto 0; mix-blend-mode: screen; }
.logo.small { width: 46%; max-width: 190px; }
.hero { font-size: clamp(56px, 18vw, 82px); line-height: .92; letter-spacing: -2px; margin: 44px 0 14px; font-weight: 900; }
.hero-sub { font-size: 21px; font-weight: 800; margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }
.lead.small { font-size: 13.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.day-badge { display: inline-block; margin: 14px 0 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }

.auth { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.auth h2 { font-size: 19px; margin: 0 0 14px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 8px; margin-bottom: 10px; }
input[type=tel], input[type=text] {
  width: 100%; height: 50px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(10, 20, 90, .55); color: var(--ink); font-size: 16px;
}
input::placeholder { color: rgba(220, 228, 255, .5); }
input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
input:disabled { opacity: .5; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
.btn-outline { height: 50px; min-width: 104px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.75); background: transparent; color: var(--ink); font-weight: 700; font-size: 14px; }
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px;
  border: 0; border-radius: 12px; color: #fff; font-weight: 800; font-size: 16px;
  background: linear-gradient(90deg, var(--blue), var(--blue-2)); box-shadow: 0 8px 24px rgba(20, 70, 255, .35);
}
.btn-ghost { width: 100%; height: 48px; margin-top: 18px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 14px; }
.check { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.check span { flex: 1; }
.link { background: none; border: 0; color: #9fc0ff; text-decoration: underline; padding: 4px; }
.timer { margin: -2px 0 4px; font-size: 13px; color: var(--cyan); }
.msg { min-height: 20px; margin: 8px 0 12px; font-size: 13.5px; color: #ffd36b; }
.msg.ok { color: #7ff0c0; }
.hint { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; text-align: center; }

.eyebrow { margin: 22px 0 4px; font-size: 14px; color: var(--muted); }
.title { font-size: 34px; line-height: 1.18; margin: 0 0 10px; font-weight: 900; letter-spacing: -.5px; }
.meter { position: sticky; top: 8px; z-index: 5; margin: 18px 0 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(12, 22, 110, .88); backdrop-filter: blur(8px); }
.meter-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.meter-row b { color: #fff; font-size: 16px; margin: 0 2px; }
#leftPts { color: var(--cyan); }
.bar { height: 6px; margin-top: 9px; border-radius: 6px; background: rgba(255,255,255,.14); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-2), var(--cyan)); transition: width .2s; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; }
.list-head h2 { font-size: 19px; margin: 0 0 10px; }
.companies { list-style: none; margin: 0; padding: 0 0 150px; display: grid; gap: 12px; }
.co { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.co.active { border-color: rgba(95, 160, 255, .9); background: var(--card-2); }
.co-top { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; }
.co-badge { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--navy); font-weight: 900; font-size: 15px; }
.co-name { font-weight: 800; font-size: 15.5px; }
.co-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stepper-wrap { display: grid; justify-items: center; gap: 3px; }
.stepper-label { font-size: 10.5px; color: var(--muted); }
.stepper { display: grid; grid-template-columns: 38px 60px 38px; align-items: center; gap: 4px; }
.stepper button { height: 38px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: #fff; font-size: 20px; line-height: 1; }
.stepper output { text-align: center; font-weight: 800; font-size: 15px; }
.co-values { margin-top: 12px; }
.co-values p { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.vals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vals button { height: 38px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #e7ecff; font-size: 13.5px; }
.vals button[aria-pressed=true] { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 800; }
.vals button[aria-pressed=true]::before { content: "✓ "; }
.co:not(.active) .co-values { opacity: .5; }
.co.need .co-values p { color: #ffd36b; }
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 10px max(22px, calc(50% - 218px)) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(8, 14, 70, 0), rgba(8, 14, 70, .97) 10px, rgba(8, 14, 70, .97));
  padding-top: 16px;
}
.dock-msg { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-align: left; }
.dock-msg b { color: #fff; }

.type-name { text-align: center; font-size: 38px; margin: 4px 0 6px; font-weight: 900; letter-spacing: -1px; }
.character { display: block; width: 78%; max-width: 330px; aspect-ratio: 1; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.type-copy { text-align: center; font-size: 19px; margin: 6px 0 8px; }
.result .type-name { margin-bottom: 18px; } /* 10/27 상단 경품 안내 삭제 뒤 포트폴리오와 간격 유지 */
.type-desc { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0 6px 18px; }
.scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 18px; }
.score { padding: 9px 4px; border: 1px solid var(--line); border-radius: 10px; text-align: center; background: rgba(10, 20, 90, .4); }
.score.top { border-color: var(--cyan); background: rgba(47, 211, 240, .15); }
.score span { display: block; font-size: 11.5px; color: var(--muted); }
.score b { font-size: 17px; }
.portfolio { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(12, 22, 110, .6); }
.portfolio h2 { font-size: 18px; margin: 0 0 2px; }
.portfolio ul { list-style: none; padding: 0; margin: 12px 0 0; }
.portfolio li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.portfolio li b { font-size: 19px; }
.pf-total { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; color: var(--muted); }
.pf-total b { color: var(--cyan); font-size: 24px; }
.staff { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.08); }
.staff p { margin: 2px 0; }
.history { margin-top: 14px; color: var(--muted); font-size: 13.5px; }
.history ul { padding-left: 18px; }

/* QR 스탬프 투어 */
.notice { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(47, 211, 240, .16); border: 1px solid rgba(47, 211, 240, .5); font-size: 14px; line-height: 1.5; }
.toast { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; background: rgba(255,255,255,.1); }
.toast.ok { background: rgba(80, 230, 170, .16); border: 1px solid rgba(80, 230, 170, .55); }
.toast.warn { background: rgba(255, 211, 107, .14); border: 1px solid rgba(255, 211, 107, .55); }
.stamp-meter { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; margin: 18px 0 20px; }
.stamp-meter > div { padding: 12px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(12, 22, 110, .7); text-align: center; }
.stamp-meter > div > span { display: block; font-size: 12px; color: var(--muted); }
.stamp-meter b { font-size: 20px; }
.stamp-meter > div:first-child b { color: var(--cyan); font-size: 26px; }
.empty { padding: 26px 10px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); font-size: 14px; }
.stamps { list-style: none; margin: 0; padding: 0 0 150px; display: grid; gap: 10px; }
.stamp { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.stamp .kind, .co-badge.company, .co-badge.session { font-size: 12px; font-weight: 800; }
.stamp .kind { display: grid; place-items: center; height: 52px; border-radius: 50%; background: #fff; color: var(--navy); }
.stamp.session .kind, .co-badge.session { background: var(--cyan); color: #06204a; }
.co-name { word-break: keep-all; overflow-wrap: anywhere; }

/* 페이지 안 QR 스캔 */
.scan-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 18px 0 4px; }
.btn-scan { height: 58px; font-size: 18px; }
.scan-icon { width: 22px; height: 22px; border: 3px solid #fff; border-radius: 5px; position: relative; }
.scan-icon::after { content: ""; position: absolute; left: 4px; right: 4px; top: 7px; height: 2px; background: #fff; }
.btn-img { width: 100%; }
body.scanning { overflow: hidden; }
.scanner { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); background: #050a3a; }
.scanner-top { display: flex; align-items: center; justify-content: space-between; }
.scanner-top h2 { margin: 0; font-size: 20px; }
.scanner-close { height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.6); background: transparent; color: #fff; font-weight: 700; }
.scanner-view { position: relative; flex: 1; min-height: 240px; border-radius: 16px; overflow: hidden; background: #000; }
.scanner-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-frame { position: absolute; left: 50%; top: 50%; width: min(64vw, 280px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid var(--cyan); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); }
.scanner-msg { margin: 0; min-height: 40px; font-size: 14.5px; line-height: 1.45; text-align: center; color: #e7ecff; }
.scanner .btn-img { height: 50px; }
.list-head .link { font-size: 13px; }

.dlg { width: min(92vw, 420px); padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #101a7a; color: #fff; }
.dlg::backdrop { background: rgba(2, 6, 40, .7); }
.dlg h2 { font-size: 19px; margin: 0 0 8px; }
.dlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.dlg-actions .btn-ghost { margin: 0; height: 54px; }
#privacyDlg .dlg-actions, #policyDlg .dlg-actions { grid-template-columns: 1fr; }
.confirm-list { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.confirm-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.tag { font-size: 11px; vertical-align: middle; padding: 2px 6px; border-radius: 6px; background: #ffd36b; color: #222; }
.privacy { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.privacy th, .privacy td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.privacy th { width: 30%; color: var(--muted); font-weight: 600; }

@media (max-width: 359px) {
  .screen { padding-left: 16px; padding-right: 16px; }
  .co-top { grid-template-columns: 36px 1fr auto; gap: 8px; }
  .co-badge { width: 36px; height: 36px; font-size: 13px; }
  .stepper { grid-template-columns: 34px 48px 34px; }
  .stepper button { height: 34px; }
  .row { grid-template-columns: minmax(0, 1fr) 96px; }
  .btn-outline { min-width: 0; padding: 0 8px; font-size: 13px; }
  .title { font-size: 30px; }
  .type-name { font-size: 32px; }
}

/* 관리자가 올린 종목 로고 */
img.logo { object-fit: contain; background: #fff; padding: 4px; }
.stamp img.kind.logo { width: 52px; height: 52px; border-radius: 50%; }

/* 빠른 연속 탭은 즉시 동작하고 세로 스크롤·핀치 확대는 유지한다. */
html, body { touch-action: manipulation; }

/* 방문할 전체 목록: 미수집 항목은 유지하고 완료된 스탬프만 강조한다. */
.tour-note { line-height: 1.65; margin: 0 0 20px; }
.tour-section { margin-bottom: 24px; }
.collect { padding-bottom: 180px; }
.tour-list { padding-bottom: 0; }
.tour-list .stamp { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; }
.tour-list .stamp .kind, .tour-list .stamp img.kind.logo { width: 42px; height: 42px; }
.tour-list .stamp.uncollected { border-style: dashed; background: rgba(12, 22, 110, .32); }
.tour-list .stamp.uncollected .kind { opacity: .45; }
.tour-list .stamp.collected { border-color: #62e1d3; background: rgba(25, 100, 150, .35); }
.stamp-status { font-size: 11px; color: var(--muted); white-space: nowrap; }
.collected .stamp-status { color: #82f2cf; font-weight: 800; }
.result .character { margin-top: 12px; }

/* 경품 수령 */
.prize-box { margin: 16px 0 6px; }
.prize-box .btn-primary:disabled { background: #2a3a7a; box-shadow: none; opacity: 1; color: #cfd6ff; }
.prize-dlg { text-align: center; }
.prize-dlg img { display: block; width: min(64vw, 240px); height: auto; aspect-ratio: 1; margin: 10px auto; background: #fff; border-radius: 10px; padding: 8px; }
.dlg-actions.single { grid-template-columns: 1fr; }

/* 개인정보 동의 팝업: 작은 화면에서도 본문만 세로 스크롤, 닫기 버튼은 항상 보이게 */
.privacy-dlg { max-height: min(88vh, 88dvh); flex-direction: column; padding: 18px 18px calc(14px + env(safe-area-inset-bottom)); }
.privacy-dlg[open] { display: flex; }
.privacy-dlg .privacy-body { overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; flex: 1 1 auto; }
.privacy-dlg .dlg-actions { flex: 0 0 auto; margin-top: 12px; }
.privacy td { word-break: keep-all; overflow-wrap: anywhere; }

#prizeBtn { -webkit-tap-highlight-color: transparent; }
