:root {
  --ink: #1f2636;
  --ink2: #4a5468;
  --paper: #fffdf8;
  --line: #e3dccd;
  --navy: #26324a;
  --accent: #ff6b4a;
  --gold: #ffd23f;
  --ok: #2f9e63;
  --okbg: #e6f6ec;
  --warn: #c2410c;
  --warnbg: #fff1e6;
  --blue: #3f6fd1;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1f2636; font-family: var(--font); color: var(--ink); }
body { overscroll-behavior: none; touch-action: none; }
#game { position: fixed; inset: 0; }
#game canvas { display: block; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 공통 버튼 ---------- */
.btn { border: 0; border-radius: 12px; padding: 12px 18px; font-size: 16px; font-weight: 700; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 0 #c94a2e; }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #c94a2e; }
.btn.primary:disabled { background: #b9b2a5; box-shadow: 0 4px 0 #8f887c; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink2); border: 2px solid var(--line); }
.btn.navy { background: var(--navy); color: #fff; box-shadow: 0 4px 0 #111827; }
.btn.big { font-size: 19px; padding: 15px 34px; }
.btn.small { font-size: 14px; padding: 8px 12px; border-radius: 10px; }

/* ---------- 화면(시작/선택/결과) ---------- */
.screen { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; touch-action: pan-y;
  background: radial-gradient(circle at 50% 0%, #3a4766 0%, #1f2636 60%); }
.title-card, .select-card, .result-card { background: var(--paper); border-radius: 22px; padding: 28px 24px; width: min(640px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.4); margin: auto; }
.title-card { text-align: center; position: relative; }
.kicker { margin: 4px 0; color: var(--ink2); font-size: 14px; font-weight: 600; }
.title-card h1 { margin: 6px 0; font-size: clamp(28px, 7vw, 42px); line-height: 1.15; letter-spacing: -0.02em; }
.subtitle { color: var(--accent); font-weight: 800; font-size: 19px; margin: 6px 0 14px; }
.stage-chip { display: inline-block; background: #fff1e6; color: var(--warn); border: 1.5px solid #f6c7a8; padding: 6px 14px; border-radius: 99px; font-size: 14px; }
.notice-box { background: #f3f5fa; border-radius: 12px; padding: 10px 14px; margin: 18px 0; text-align: left; font-size: 13.5px; color: var(--ink2); line-height: 1.55; }
.notice-box p { margin: 4px 0; }
.title-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.siren { width: 56px; height: 30px; margin: 0 auto 8px; background: #3a4155; border-radius: 30px 30px 6px 6px; position: relative; overflow: hidden; }
.siren span { position: absolute; inset: 4px 8px 0; background: var(--accent); border-radius: 22px 22px 0 0; animation: siren 0.9s infinite alternate; }
@keyframes siren { from { background: #ff6b4a; box-shadow: 0 0 6px #ff6b4a; } to { background: #ffb199; box-shadow: 0 0 24px #ff6b4a; } }

.select-card h2 { font-size: 18px; margin: 4px 0 10px; }
.avatar-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.avatar { background: #f3efe6; border: 3px solid transparent; border-radius: 14px; padding: 8px 4px; text-align: center; font-weight: 700; font-size: 14px; color: var(--ink2); }
.avatar canvas { width: 64px; height: 80px; image-rendering: pixelated; display: block; margin: 0 auto 4px; }
.avatar.on { border-color: var(--accent); background: #fff; color: var(--ink); }
.role-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.role { background: #f3efe6; border: 2.5px solid transparent; border-radius: 12px; padding: 10px 4px; font-weight: 700; font-size: 14.5px; color: var(--ink); word-break: keep-all; }
.role small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink2); margin-top: 2px; }
.role.on { border-color: var(--accent); background: #fff; }
.role-desc { margin: 14px 0; background: #f3f5fa; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; line-height: 1.55; min-height: 50px; color: var(--ink2); }
.role-desc b { color: var(--ink); }
.select-actions { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 560px) {
  .role-list { grid-template-columns: repeat(2, 1fr); }
  .avatar canvas { width: 48px; height: 60px; }
  .title-card, .select-card, .result-card { padding: 22px 16px; }
}

/* ---------- HUD ---------- */
#hud { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: linear-gradient(#1f2636ee, #1f263600); pointer-events: none; }
#hud > * { pointer-events: auto; }
.hud-left { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 15px; min-width: 0; }
.case-tag { background: var(--accent); color: #fff; padding: 3px 9px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
#hud-loc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.hud-stats { margin-left: auto; color: #ffe0d6; background: #00000055; padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.hud-stats small { font-weight: 500; opacity: .8; }
.hud-right { display: flex; gap: 6px; }
.hud-btn { position: relative; display: flex; align-items: center; gap: 4px; background: #fffdf8; border: 0; border-radius: 10px; padding: 7px 10px; font-weight: 700; font-size: 14px; color: var(--ink); box-shadow: 0 3px 0 #0005; }
.hud-btn .badge { position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff; font-style: normal; font-size: 11px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.hud-btn.pulse { animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 #ffd23fcc, 0 3px 0 #0005; } 50% { box-shadow: 0 0 0 7px #ffd23f00, 0 3px 0 #0005; } }
@media (max-width: 760px) {
  .hud-btn .lbl { display: none; }
  .hud-btn { padding: 7px 9px; font-size: 16px; }
  .hud-stats { display: none; }
  .hud-right { margin-left: auto; }
}

/* ---------- 임무 패널 ---------- */
#quest { position: fixed; z-index: 19; left: 10px; top: calc(54px + env(safe-area-inset-top)); width: min(300px, calc(100vw - 20px)); background: #fffdf8f2; border-radius: 14px; box-shadow: 0 6px 18px #0004; overflow: hidden; }
#quest-head { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: var(--navy); color: #fff; font-weight: 800; padding: 9px 12px; font-size: 14px; }
#quest-role { margin-left: auto; font-weight: 600; font-size: 12px; background: #ffffff22; padding: 2px 8px; border-radius: 99px; }
#quest.collapsed #quest-body { display: none; }
#quest.collapsed .chev { transform: rotate(-90deg); }
#quest-body { padding: 8px 12px 4px; font-size: 13.5px; }
.q-item { display: flex; gap: 7px; padding: 4px 0; align-items: flex-start; color: #9aa1ae; line-height: 1.4; }
.q-item .dot { flex: none; width: 17px; height: 17px; border-radius: 50%; border: 2px solid #c8ccd4; margin-top: 1px; font-size: 10px; display: grid; place-items: center; }
.q-item.done { color: #6a7282; text-decoration: line-through; text-decoration-color: #6a728277; }
.q-item.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.q-item.now { color: var(--ink); font-weight: 700; }
.q-item.now .dot { border-color: var(--accent); background: #fff1e6; }
.q-sub { margin: 0 0 4px 24px; font-size: 12.5px; }
.q-sub div { padding: 1px 0; color: #8a909c; }
.q-sub div.ok { color: var(--ok); }
#quest-target { background: #fff6d6; color: #6b4f00; font-size: 12.5px; padding: 7px 12px; font-weight: 700; border-top: 1px solid #f0e2a8; }
#quest-target:empty { display: none; }

/* ---------- 긴급 알림 ---------- */
#alert { position: fixed; z-index: 40; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: calc(70px + env(safe-area-inset-top)); background: #1f263666; }
.alert-card { width: min(520px, calc(100vw - 24px)); background: var(--paper); border-radius: 18px; overflow: hidden; box-shadow: 0 16px 50px #0008; animation: drop .5s cubic-bezier(.2,1.4,.4,1); }
.alert-head { background: repeating-linear-gradient(45deg, #ff6b4a, #ff6b4a 14px, #f2553a 14px, #f2553a 28px); color: #fff; font-weight: 900; font-size: 20px; padding: 12px 18px; display: flex; align-items: center; gap: 10px; animation: flash 1s infinite; }
.alert-body { padding: 16px 18px; font-size: 16px; line-height: 1.65; }
.alert-body .stat { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.alert-body .stat span { background: #fff1e6; color: var(--warn); border-radius: 8px; padding: 4px 9px; font-size: 13.5px; font-weight: 700; }
.alert-foot { padding: 0 18px 18px; text-align: right; }
@keyframes drop { from { transform: translateY(-40px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flash { 50% { filter: brightness(1.15); } }

/* ---------- 상단 공지 / 토스트 ---------- */
#notice { position: fixed; z-index: 35; left: 50%; top: calc(62px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(560px, calc(100vw - 20px)); background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: 0 10px 30px #0007; display: flex; gap: 12px; align-items: center; animation: drop .45s cubic-bezier(.2,1.4,.4,1); }
#notice .n-ico { font-size: 26px; }
#notice .n-title { font-weight: 900; color: var(--gold); font-size: 15px; }
#notice .n-text { font-size: 14px; line-height: 1.5; }
#notice button { margin-left: auto; flex: none; }
#toast { position: fixed; z-index: 36; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #1f2636e6; color: #fff; padding: 9px 16px; border-radius: 99px; font-size: 14px; font-weight: 700; white-space: nowrap; max-width: calc(100vw - 20px); overflow: hidden; text-overflow: ellipsis; }
.mission-pop { position: fixed; z-index: 37; left: 50%; top: 40%; transform: translate(-50%,-50%); background: var(--gold); color: #3a2a00; font-weight: 900; font-size: clamp(20px, 5vw, 30px); padding: 16px 28px; border-radius: 16px; border: 4px solid #3a2a00; box-shadow: 0 10px 0 #0005; text-align: center; animation: pop 2.4s ease forwards; pointer-events: none; white-space: nowrap; }
.mission-pop small { display: block; font-size: 14px; font-weight: 700; }
@keyframes pop { 0% { transform: translate(-50%,-50%) scale(.3); opacity: 0; } 12% { transform: translate(-50%,-50%) scale(1.08); opacity: 1; } 20%,80% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 100% { transform: translate(-50%,-60%) scale(.95); opacity: 0; } }

/* ---------- 대화창 ---------- */
#dialog { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(760px, calc(100vw - 16px)); background: var(--paper); border: 3px solid var(--navy); border-radius: 16px; box-shadow: 0 8px 0 #0004; display: flex; gap: 12px; padding: 12px; align-items: stretch; }
.dlg-face { flex: none; width: 64px; height: 80px; background: #e9eef7; border-radius: 10px; display: grid; place-items: center; }
.dlg-face canvas { width: 64px; height: 80px; image-rendering: pixelated; }
.dlg-main { flex: 1; min-width: 0; }
.dlg-name { display: inline-block; background: var(--navy); color: #fff; font-weight: 800; font-size: 14px; padding: 3px 10px; border-radius: 8px; margin-bottom: 6px; }
.dlg-text { font-size: 17px; line-height: 1.6; min-height: 54px; word-break: keep-all; }
.dlg-next { align-self: flex-end; border: 0; background: var(--accent); color: #fff; font-weight: 800; padding: 10px 14px; border-radius: 10px; font-size: 15px; white-space: nowrap; }
@media (max-width: 560px) { .dlg-face { width: 48px; height: 60px; } .dlg-face canvas { width: 48px; height: 60px; } .dlg-text { font-size: 15.5px; } }

/* ---------- 모바일 조작 ---------- */
#touch { position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); pointer-events: none; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px; }
.dpad { pointer-events: auto; position: relative; width: 150px; height: 150px; }
.dpad button { position: absolute; width: 52px; height: 52px; border: 0; border-radius: 14px; background: #fffdf8d9; color: var(--navy); font-size: 20px; box-shadow: 0 4px 0 #0005; touch-action: none; user-select: none; -webkit-user-select: none; }
.dpad button.on { background: var(--gold); transform: translateY(2px); box-shadow: 0 2px 0 #0005; }
.dpad [data-dir=up] { left: 49px; top: 0; } .dpad [data-dir=down] { left: 49px; bottom: 0; }
.dpad [data-dir=left] { left: 0; top: 49px; } .dpad [data-dir=right] { right: 0; top: 49px; }
.act { pointer-events: auto; width: 86px; height: 86px; border-radius: 50%; border: 0; background: #fffdf8d9; color: var(--ink2); font-size: 17px; font-weight: 900; box-shadow: 0 5px 0 #0005; touch-action: none; user-select: none; -webkit-user-select: none; }
.act.ready { background: var(--accent); color: #fff; animation: pulse 1s infinite; }

/* ---------- 모달 ---------- */
#modal { position: fixed; z-index: 45; inset: 0; background: #1f2636aa; display: flex; align-items: center; justify-content: center; padding: 12px; }
.modal-card { width: min(720px, 100%); max-height: calc(100% - 10px); background: var(--paper); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px #0008; animation: drop .35s ease; }
.modal-head { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 12px 16px; }
.modal-head h2 { font-size: 17px; margin: 0; flex: 1; }
#modal-close { border: 0; background: #ffffff22; color: #fff; width: 32px; height: 32px; border-radius: 8px; font-size: 16px; }
.modal-body { padding: 16px; overflow-y: auto; font-size: 15px; line-height: 1.6; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.modal-body p { margin: 8px 0; }
.kv { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 14.5px; }
.kv th { text-align: left; white-space: nowrap; background: #f3efe6; color: var(--ink2); padding: 7px 10px; border-bottom: 1px solid var(--line); width: 1%; }
.kv td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.facts { padding-left: 20px; margin: 6px 0; } .facts li { margin: 4px 0; }
.virtual { font-size: 12.5px; color: #8a909c; }
.hint { background: #eef3ff; color: #2a4a8f; border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.warn { background: var(--warnbg); color: var(--warn); border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 600; }
.notice { background: #fff6d6; color: #6b4f00; border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.okbox { background: var(--okbg); color: #1d6b43; border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 600; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.stamp { display: inline-block; color: var(--ok); border: 2.5px solid var(--ok); border-radius: 8px; padding: 2px 10px; font-weight: 900; transform: rotate(-4deg); }

/* 버스 좌석 */
.bus-seats { background: #fff7d6; border: 3px solid #e4b92d; border-radius: 24px 12px 12px 24px; padding: 12px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 8px 0; }
.seat { background: #fff; border: 1.5px solid #e6d9a8; border-radius: 8px; font-size: 11.5px; text-align: center; padding: 6px 2px; color: #7a6a2c; word-break: keep-all; }
.seat.pos { background: #ffe1d4; border-color: #f2a07f; color: #a0391a; font-weight: 800; }
.seat.chk { background: #fff1b8; border-color: #e3c34a; color: #6b5300; }
.seat.staff { background: #e8f1ff; border-color: #a9c2ee; color: #2a4a8f; font-weight: 700; }
.seat.empty { background: transparent; border-style: dashed; color: #c9bb86; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 3px; }

/* 상황판 */
.board-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 12px; }
.board-cell { background: #f3efe6; border-radius: 12px; padding: 10px; text-align: center; }
.board-cell b { display: block; font-size: 24px; color: var(--warn); }
.board-cell span { font-size: 12.5px; color: var(--ink2); }
.board-cell.rec { outline: 2px dashed #cfc6b4; }
.board-cell.rec.on { outline: 2px solid var(--ok); background: var(--okbg); }
@media (max-width: 560px) { .board-grid { grid-template-columns: repeat(2, 1fr); } }
.list-clean { list-style: none; padding: 0; margin: 6px 0; }
.list-clean li { padding: 7px 10px; border-radius: 10px; background: #f6f3ec; margin: 5px 0; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.list-clean li.ok { background: var(--okbg); }
.list-clean li.miss { color: #9aa1ae; }
.list-clean li button { margin-left: auto; }
.mission-cta { background: linear-gradient(135deg, #fff1e6, #ffe6da); border: 2px solid #f6b89c; border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.mission-cta .t { font-weight: 800; }
.mission-cta .s { font-size: 13px; color: var(--ink2); }
.mission-cta button { margin-left: auto; flex: none; }

/* C03 */
.steps { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.steps span { font-size: 12.5px; padding: 4px 10px; border-radius: 99px; background: #eceae4; color: #8a909c; font-weight: 700; }
.steps span.on { background: var(--navy); color: #fff; }
.steps span.done { background: var(--okbg); color: var(--ok); }
.reports { display: grid; gap: 8px; }
.rep { text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; position: relative; }
.rep .rt { font-weight: 800; font-size: 15px; display: flex; gap: 6px; align-items: center; }
.rep .rs { color: var(--ink2); font-size: 13px; margin-top: 3px; }
.rep.sel { border-color: var(--accent); box-shadow: 0 0 0 3px #ff6b4a33; }
.rep.done { background: var(--okbg); border-color: #9dd7b5; }
.rep .to { margin-left: auto; font-size: 12px; color: var(--ok); font-weight: 800; }
.teams { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.team { border: 0; background: var(--navy); color: #fff; border-radius: 12px; padding: 12px 6px; font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 #111827; }
.team small { display: block; font-weight: 500; font-size: 11.5px; opacity: .8; margin-top: 3px; }
.team .ti { font-size: 22px; display: block; }
.team:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) { .teams { grid-template-columns: repeat(2, 1fr); } }
.fb { margin-top: 12px; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; line-height: 1.6; animation: drop .3s ease; }
.fb.ok { background: var(--okbg); color: #1d5e3d; }
.fb.no { background: var(--warnbg); color: #8a3410; }
.fb .fbt { font-weight: 900; margin-bottom: 3px; }
.opt { display: block; width: 100%; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.opt:hover { border-color: #c9bfae; }

/* C04 체크리스트 */
.check-item { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.check-item .ct { font-weight: 700; font-size: 15px; }
.check-item .cbtns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tog { border: 2px solid var(--line); background: #faf8f3; border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 13.5px; color: var(--ink2); }
.tog.on.y { background: var(--okbg); border-color: var(--ok); color: var(--ok); }
.tog.on.n { background: #f1f1f4; border-color: #8a909c; color: #4a5468; }
.tog.on.q { background: #eef3ff; border-color: var(--blue); color: var(--blue); }
.check-item .cfb { margin-top: 8px; font-size: 13.5px; border-radius: 8px; padding: 7px 10px; }
.check-item .cfb.ok { background: var(--okbg); color: #1d5e3d; }
.check-item .cfb.no { background: var(--warnbg); color: #8a3410; }
.check-item.good { border-color: #9dd7b5; } .check-item.bad { border-color: #f2b38f; }
select.target { font-family: inherit; font-size: 14px; padding: 6px 8px; border-radius: 8px; border: 2px solid var(--blue); background: #fff; max-width: 100%; }
.brief { background: #f3f5fa; border-left: 5px solid var(--navy); border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.brief .bt { font-weight: 900; color: var(--navy); margin-bottom: 4px; }

/* 결과 */
.result-card h1 { font-size: clamp(24px, 6vw, 34px); margin: 4px 0 4px; text-align: center; }
.result-card .rsub { text-align: center; color: var(--ink2); margin: 0 0 14px; }
.result-card h3 { font-size: 16px; margin: 18px 0 6px; border-left: 5px solid var(--accent); padding-left: 8px; }
.result-card ul { margin: 4px 0; padding-left: 20px; font-size: 14.5px; line-height: 1.6; }
.medal { width: 84px; height: 84px; margin: 0 auto 4px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #ffd23f 55%, #e0a800); border: 4px solid #8a5a00; display: grid; place-items: center; font-size: 38px; box-shadow: 0 6px 0 #0003; animation: pop2 .8s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop2 { from { transform: scale(.2) rotate(-30deg); } to { transform: none; } }
.r-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.r-table td, .r-table th { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.r-table th { background: #f3efe6; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.pill.ok { background: var(--okbg); color: var(--ok); } .pill.re { background: #fff6d6; color: #8a6a00; }
.result-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.help-keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14.5px; }
.help-keys kbd { background: #f3efe6; border: 1px solid #d8cfbd; border-bottom-width: 3px; border-radius: 6px; padding: 1px 7px; font-family: inherit; font-weight: 700; font-size: 13px; white-space: nowrap; }

.field { margin: 0 0 10px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; color: var(--ink2); }
.field input { width: 100%; font-family: inherit; font-size: 16px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.field input:focus { outline: none; border-color: var(--accent); }
label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink2); margin: 0 0 12px; }
.select-card h2 { margin-top: 14px; }
.rpt { border-radius: 14px; border: 2px solid var(--line); background: #fff; overflow: hidden; }
.rpt-head { display: flex; gap: 8px; align-items: center; background: #f3efe6; padding: 8px 12px; font-size: 13.5px; color: var(--ink2); flex-wrap: wrap; }
.rpt-head .ch { font-size: 18px; }
.rpt-head b { color: var(--ink); }
.rpt-head .tm { margin-left: auto; font-family: monospace; }
.rpt-body { padding: 12px 14px; font-size: 15.5px; line-height: 1.7; }
.rpt.sms .rpt-body { background: #eef6ff; }
.rpt.call .rpt-body { background: #f2fbf5; }
.rpt.memo .rpt-body { background: #fffbea; }
.task-q { background: #26324a; color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.6; margin: 10px 0; }
.task-q .tq-t { color: var(--gold); font-weight: 900; font-size: 13px; margin-bottom: 3px; }
.actc { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.actc:hover:not(:disabled) { border-color: var(--accent); }
.actc .num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #26324a; color: #fff; display: grid; place-items: center; font-size: 13px; }
.actc:disabled { opacity: .55; cursor: not-allowed; background: #f4f2ee; }
.actc.ok { border-color: var(--ok); background: var(--okbg); opacity: 1; }
.actc .why { display: block; font-weight: 500; font-size: 13.5px; color: #8a3410; margin-top: 4px; }
.res4 { display: grid; gap: 8px; margin-top: 10px; }
.res4 > div { background: #f6f3ec; border-radius: 10px; padding: 10px 12px; font-size: 14.5px; line-height: 1.6; }
.res4 .rn { font-weight: 900; color: var(--navy); font-size: 13px; display: block; margin-bottom: 2px; }
.tag-review { display: inline-block; background: #fff1e6; color: var(--warn); border: 1.5px solid #f6c7a8; border-radius: 99px; font-size: 12px; padding: 1px 8px; font-weight: 800; vertical-align: 2px; }
.basis { font-size: 12.5px; color: #8a909c; margin-top: 8px; }
.board-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 8px 0; }
.area { border-radius: 10px; padding: 9px 10px; background: #f3efe6; font-size: 13.5px; font-weight: 700; color: #8a909c; }
.area small { display: block; font-weight: 600; font-size: 12px; }
.area.ok { background: var(--okbg); color: var(--ok); }
.area.re { background: #fff6d6; color: #8a6a00; }
.area.now { outline: 2px dashed var(--accent); color: var(--warn); background: #fff1e6; }
.travel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.travel-grid button { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 14px 10px; font-weight: 800; font-size: 15px; text-align: left; }
.travel-grid button small { display: block; font-weight: 500; color: var(--ink2); font-size: 12px; margin-top: 2px; }
.travel-grid button.here { border-color: var(--ok); background: var(--okbg); }
.travel-grid button.goal { border-color: var(--accent); box-shadow: 0 0 0 3px #ff6b4a33; }

.r-table td:last-child, .r-table th:last-child { white-space: nowrap; }

.principles td:last-child { white-space: normal; width: 38%; }
.owner { display: inline-block; background: #eef3ff; color: #2a4a8f; border-radius: 8px; padding: 3px 8px; font-size: 12.5px; font-weight: 700; line-height: 1.45; }
details.ref { margin-top: 16px; background: #f6f3ec; border-radius: 12px; padding: 10px 14px; }
details.ref summary { cursor: pointer; font-weight: 800; font-size: 14.5px; color: var(--ink2); }
details.ref ul { margin: 4px 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }

/* ===== 모의훈련 안내 화면 ===== */
.guide-card { background: var(--paper); border-radius: 22px; padding: 26px 24px; width: min(720px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.4); margin: auto; }
.guide-card h3 { font-size: 16px; margin: 18px 0 6px; border-left: 5px solid var(--accent); padding-left: 8px; }
.g-title { font-size: clamp(19px, 4.6vw, 24px); margin: 4px 0 10px; line-height: 1.35; }
.purpose { background: #fff6d6; color: #5a4300; border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.6; margin: 8px 0 12px; }
.g-list { padding-left: 20px; margin: 4px 0; line-height: 1.8; font-size: 15px; }
.kind { display: inline-block; font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 1px 8px; margin-left: 4px; vertical-align: 1px; }
.kind.C { background: #eef3ff; color: #2a4a8f; } .kind.R { background: #fff1e6; color: var(--warn); }
.flow5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0; }
.flow5 > div { background: #f3f5fa; border-radius: 12px; padding: 10px 8px; text-align: center; position: relative; }
.flow5 b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; }
.flow5 span { display: block; font-weight: 800; font-size: 14px; margin: 4px 0 2px; }
.flow5 small { display: block; font-size: 12px; color: var(--ink2); line-height: 1.45; word-break: keep-all; }
@media (max-width: 620px) { .flow5 { grid-template-columns: 1fr; } .flow5 > div { display: grid; grid-template-columns: 28px 74px 1fr; align-items: center; text-align: left; gap: 6px; } .flow5 span { margin: 0; } }
.eval { background: #f6f3ec; border-radius: 12px; padding: 10px 14px; margin-top: 14px; font-size: 14px; }
.eval ul { margin: 4px 0 0; padding-left: 18px; line-height: 1.6; }
.g-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; margin-top: 16px; }
.small-note { font-size: 12.5px; color: #8a909c; margin: 6px 0; }
.small-note.center { text-align: center; }

/* ===== 지금 할 일 패널 ===== */
#guide { position: fixed; z-index: 19; left: 10px; top: calc(54px + env(safe-area-inset-top)); width: min(340px, calc(100vw - 20px)); max-height: calc(100vh - 70px); overflow-y: auto; background: #fffdf8f5; border-radius: 14px; box-shadow: 0 6px 18px #0004; padding: 10px 12px 12px; font-size: 13.5px; line-height: 1.5; }
.g-role { background: var(--navy); color: #fff; margin: -10px -12px 8px; padding: 8px 12px; border-radius: 14px 14px 0 0; }
.g-role b { display: block; font-size: 14px; }
.g-role span { font-size: 12px; color: #ffd9cc; }
.g-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-bottom: 6px; }
.g-steps:empty { display: none; }
.g-steps span { text-align: center; font-size: 11px; font-weight: 800; color: #9aa1ae; background: #eceae4; border-radius: 6px; padding: 3px 0; }
.g-steps span em { display: block; font-style: normal; font-weight: 700; font-size: 10.5px; }
.g-steps span.on { background: var(--accent); color: #fff; }
.g-steps span.done { background: var(--okbg); color: var(--ok); }
.g-mission { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 6px; }
.g-mission small { display: block; font-weight: 600; font-size: 11.5px; color: var(--ink2); }
.g-sec { border-radius: 10px; padding: 7px 10px; margin-bottom: 5px; }
.g-sec.now { background: #fff1e6; border: 2px solid #f6b89c; font-weight: 700; color: #6b2a10; }
.g-sec.why { background: #f3f5fa; color: var(--ink2); }
.g-sec.next { background: #f6f3ec; color: var(--ink2); }
.g-lbl { display: block; font-size: 11px; font-weight: 900; letter-spacing: .02em; color: var(--ink2); margin-bottom: 1px; }
.g-sec.now .g-lbl { color: var(--warn); }
.g-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
#g-btn { flex: 1; padding: 10px 12px; font-size: 15px; }
.g-toggle { border: 0; background: transparent; color: #8a909c; font-size: 12px; font-weight: 700; }
#guide.mini .why, #guide.mini .next, #guide.mini .g-steps, #guide.mini .g-mission small { display: none; }
@media (max-width: 760px) {
  #guide { left: 8px; right: 8px; width: auto; top: calc(52px + env(safe-area-inset-top)); max-height: 46vh; font-size: 12.5px; padding: 8px 10px 10px; }
  .g-role { margin: -8px -10px 6px; padding: 6px 10px; }
  .g-sec { padding: 5px 8px; margin-bottom: 4px; }
  #g-btn { font-size: 14px; padding: 8px 10px; }
}

/* ===== 업무 처리 창 ===== */
.steps5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 10px; }
.steps5 span { text-align: center; font-size: 12px; font-weight: 800; padding: 6px 2px; border-radius: 8px; background: #eceae4; color: #9aa1ae; word-break: keep-all; }
.steps5 span.on { background: var(--navy); color: #fff; }
.steps5 span.done { background: var(--okbg); color: var(--ok); }
.ptag { display: inline-block; font-size: 12.5px; font-weight: 800; border-radius: 8px; padding: 3px 10px; margin-bottom: 8px; }
.ptag.C { background: #eef3ff; color: #2a4a8f; } .ptag.R { background: #fff1e6; color: var(--warn); }
.doc { border: 2px solid var(--line); border-radius: 12px; margin: 8px 0; overflow: hidden; background: #fff; }
.doc.open { border-color: #9dd7b5; }
.doc-h { display: flex; width: 100%; gap: 8px; align-items: center; border: 0; background: #f6f3ec; padding: 10px 12px; font-weight: 800; font-size: 14.5px; text-align: left; color: var(--ink); }
.doc.open .doc-h { background: var(--okbg); }
.doc-h span { margin-left: auto; font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.doc.open .doc-h span { color: var(--ok); }
.doc-b { padding: 0 12px; }
.doc.open .doc-b { padding: 10px 12px; }
.doc.collapsed .doc-b { display: none; }
details.ref.small { margin: 8px 0; padding: 8px 12px; }
details.ref.small summary { font-size: 13.5px; }
.teams .team { position: relative; }
.teams .team em { display: block; font-style: normal; margin-top: 6px; background: #ffffff26; border-radius: 8px; padding: 3px 0; font-size: 12.5px; }
.decided { background: #f3f5fa; border-left: 5px solid var(--navy); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; font-weight: 600; margin-bottom: 8px; }
.decided span { display: block; font-size: 12px; font-weight: 900; color: var(--navy); margin-bottom: 2px; }
.xrow { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; background: #fff; }
.xrow.ok { border-color: #9dd7b5; background: #f4fbf7; }
.xt { font-weight: 700; font-size: 14.5px; display: flex; gap: 8px; align-items: flex-start; }
.xt .num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; }
.xc { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.xc select { flex: 1; min-width: 180px; }
.xres { margin-top: 6px; font-size: 13.5px; color: #1d5e3d; }
.xwarn { margin-top: 6px; font-size: 13.5px; color: #8a3410; background: var(--warnbg); border-radius: 8px; padding: 6px 10px; }
.res5 { display: grid; gap: 8px; margin-top: 10px; }
.res5 > div { background: #f6f3ec; border-radius: 10px; padding: 10px 12px; font-size: 14.5px; line-height: 1.6; }
.res5 ul { margin: 2px 0; padding-left: 18px; }
.res5 .rn { font-weight: 900; color: var(--navy); font-size: 13px; display: block; margin-bottom: 2px; }
.res5 .rn em { font-style: normal; font-weight: 700; font-size: 11.5px; background: #fff; color: var(--ink2); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.res5 .small { font-size: 13px; margin-top: 4px; color: #6b5300; }
.miss { margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--ok); background: var(--okbg); border-radius: 10px; padding: 8px 12px; }
.rcard { border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.rc-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.rc-h .pill { margin-left: auto; }
.rc-l { display: grid; grid-template-columns: 40px 1fr; gap: 6px; margin: 3px 0; line-height: 1.55; }
.rc-l > span { font-size: 12px; font-weight: 900; color: var(--navy); background: #eef3ff; border-radius: 6px; text-align: center; align-self: start; padding: 1px 0; }
.rc-l ul { margin: 0; padding-left: 16px; }
.rc-r { font-size: 13px; color: var(--ok); margin-top: 4px; }

.g-role b i { font-style: normal; font-weight: 600; }
.g-acts { position: sticky; bottom: -12px; background: #fffdf8; padding: 6px 0 2px; margin-bottom: -2px; }
@media (max-width: 760px) {
  #guide { max-height: 40vh; font-size: 12px; line-height: 1.42; }
  .g-role b { font-size: 13px; } .g-role b i { display: none; } .g-role span { font-size: 11.5px; }
  .g-steps { gap: 2px; margin-bottom: 4px; }
  .g-steps span { font-size: 10.5px; padding: 2px 0; }
  .g-steps span em { display: none; } .g-steps span.on em { display: inline; margin-left: 2px; }
  .g-steps span.on { grid-column: span 1; }
  .g-mission { font-size: 12.5px; margin-bottom: 4px; } .g-mission small { font-size: 10.5px; }
  .g-sec { padding: 4px 8px; margin-bottom: 3px; } .g-lbl { font-size: 10px; }
  .g-acts { bottom: -10px; }
  #g-btn { padding: 7px 10px; font-size: 13.5px; }
}

/* =====================================================
   v5 가독성·간소화 (이 아래 규칙이 위 규칙보다 우선)
   ===================================================== */
body { touch-action: manipulation; }
#game canvas { touch-action: none; }
.modal-body { font-size: 16px; line-height: 1.65; touch-action: pan-x pan-y pinch-zoom; }
.screen { touch-action: pan-x pan-y pinch-zoom; }
.modal-head h2 { font-size: 18px; }
.lead { font-size: 16px; color: var(--ink); margin: 10px 0 6px; }
.note, .small-note { font-size: 14px; color: #4a5468; margin: 8px 0; }
.note.center { text-align: center; }
.keyline { background: #f3f5fa; border-radius: 10px; padding: 10px 12px; font-size: 15px; color: var(--ink); margin: 8px 0; }
.purpose { background: #fff6d6; color: #4a3800; border-radius: 12px; padding: 12px 14px; font-size: 16px; line-height: 1.6; margin: 8px 0 12px; }
.kv { font-size: 15px; } .kv th { font-size: 14px; color: var(--ink2); }
.virtual { font-size: 14px; color: #4a5468; }

/* 상단 메뉴 3개 */
.hud-btn { font-size: 15px; padding: 8px 12px; }
@media (max-width: 760px) {
  #hud-loc { display: none; }
  .hud-btn .lbl { display: inline; font-size: 14px; }
  .hud-btn { padding: 7px 9px; font-size: 14px; }
}

/* 지금 할 일 패널 (v5) */
#guide { width: min(330px, calc(100vw - 20px)); padding: 12px 14px 12px; font-size: 16px; line-height: 1.5; background: #fffdf8; max-height: calc(100vh - 80px); }
.g-head { display: flex; gap: 8px; align-items: baseline; font-size: 14px; color: var(--ink2); margin-bottom: 2px; }
#g-count { font-weight: 800; color: var(--accent); }
.g-mission { font-weight: 800; font-size: 17px; margin: 0 0 8px; color: var(--ink); }
.g-now { font-size: 16px; font-weight: 600; color: var(--ink); background: #fff4ec; border-left: 4px solid var(--accent); border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; }
#g-btn { width: 100%; font-size: 16px; padding: 11px 12px; }
.g-toggle { display: block; margin: 8px auto 0; border: 0; background: none; color: var(--ink2); font-size: 14px; font-weight: 700; }
.g-more { font-size: 14.5px; color: #3b4456; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.g-more p { margin: 6px 0; }
.g-steps { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.g-steps span { font-size: 13.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #f0eee8; color: #6b7385; }
.g-steps span.on { background: var(--navy); color: #fff; }
.g-steps span.done { color: var(--ok); background: var(--okbg); }
#g-skip { margin-top: 4px; }
@media (max-width: 760px) {
  #guide { left: 8px; right: 8px; width: auto; top: calc(54px + env(safe-area-inset-top)); max-height: 50vh; padding: 10px 12px; font-size: 15px; }
  #guide.compact { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; cursor: pointer; }
  #guide.compact .g-head, #guide.compact .g-mission, #guide.compact .g-toggle, #guide.compact .g-more { display: none; }
  #guide.compact .g-now { margin: 0; padding: 6px 8px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #guide.compact #g-btn { width: auto; padding: 8px 12px; font-size: 15px; white-space: nowrap; }
}

/* 업무 창 3단계 */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.steps3 span { text-align: center; font-size: 14px; font-weight: 700; padding: 7px 4px; border-radius: 8px; background: #f0eee8; color: #6b7385; word-break: keep-all; }
.steps3 span.on { background: var(--navy); color: #fff; }
.steps3 span.done { background: var(--okbg); color: var(--ok); }
.ptag { font-size: 14px; font-weight: 700; padding: 3px 10px; margin-bottom: 10px; }
.rpt { border: 1px solid var(--line); margin-bottom: 4px; }
.rpt-head { font-size: 15px; color: var(--ink); gap: 6px; }
.rpt-head .tm { margin-left: auto; font-family: inherit; font-size: 14px; color: var(--ink2); }
.rpt-body { font-size: 16.5px; }
.task-q { background: #f3f5fa; color: var(--ink); border-left: 5px solid var(--navy); font-size: 17px; font-weight: 600; }
.doc { border: 1px solid var(--line); }
.doc.open { border-color: var(--line); }
.doc-h { font-size: 16px; background: #fff; }
.doc.open .doc-h { background: #f6f3ec; }
.doc-h span { font-size: 14px; color: var(--blue); }
.doc.open .doc-h span { color: var(--ok); }
.doc-b { font-size: 15.5px; }
details.ref { margin: 12px 0 4px; padding: 10px 14px; background: #f6f3ec; border-radius: 10px; }
details.ref summary { font-size: 15px; font-weight: 700; color: var(--ink2); cursor: pointer; }
details.ref h5 { font-size: 15px; margin: 12px 0 4px; }
details.ref p, details.ref li { font-size: 15px; }
.actc { border: 1px solid #d9d2c3; font-size: 16px; font-weight: 500; padding: 12px 14px; }
.actc .num { background: #eef0f5; color: var(--navy); font-weight: 800; }
.actc.on { border-color: var(--navy); background: #f3f5fa; }
.actc.on .num { background: var(--navy); color: #fff; }
.actc .why { font-size: 14.5px; color: #8a3410; }
.teams .team { background: #fff; color: var(--ink); border: 1px solid #d9d2c3; box-shadow: none; text-align: left; padding: 12px; font-size: 16px; }
.teams .team b { display: block; font-size: 17px; }
.teams .team small { font-size: 14px; color: var(--ink2); opacity: 1; }
.teams .team em { display: block; font-style: normal; font-size: 14px; color: #8a3410; margin-top: 4px; background: none; padding: 0; }
.teams .team:hover:not(:disabled) { border-color: var(--navy); }
.teams .team:disabled { opacity: .6; }
.fb { font-size: 15.5px; } .fb .fbt { font-size: 16px; }
.decided { font-size: 16px; border-left-width: 4px; }
.decided span { font-size: 14px; }
.xrow { border: 1px solid var(--line); padding: 10px 12px; }
.xrow.ok { border-color: #bfe3cd; background: #f6fbf8; }
.xt { font-size: 16px; font-weight: 600; }
.xc select { font-size: 16px; padding: 8px 10px; border: 1px solid #b9c3d6; min-width: 0; width: 100%; }
.xres { font-size: 15px; }
.xwarn { font-size: 15px; }
.res3 { display: grid; gap: 10px; margin-top: 10px; }
.res3 section { background: #f6f3ec; border-radius: 10px; padding: 10px 14px; }
.res3 h4 { margin: 0 0 4px; font-size: 16px; color: var(--navy); }
.res3 p { margin: 4px 0; font-size: 16px; }
.res3 ul { margin: 2px 0; padding-left: 20px; font-size: 15.5px; }
.res3 .lbl { display: inline-block; font-size: 13.5px; font-weight: 800; color: var(--navy); background: #e6ebf5; border-radius: 6px; padding: 1px 7px; margin-right: 6px; }
.pill { font-size: 13px; }
.modal-actions .btn { font-size: 16px; }
.more-list { display: grid; gap: 8px; }
.more-list button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 14px; font-size: 16px; font-weight: 600; color: var(--ink); }
.more-list button.sub { font-size: 15px; color: var(--ink2); font-weight: 500; }
.travel-grid button { font-size: 16px; border-width: 1px; }
.travel-grid button small { font-size: 13.5px; }
.list-clean li { font-size: 15px; justify-content: space-between; }

/* 안내 화면·결과 화면 */
.guide-card { font-size: 16px; }
.guide-card h3 { font-size: 17px; border-left-width: 4px; }
.g-list { font-size: 16px; }
.kind { font-size: 13px; }
.flow3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 10px; }
.flow3 > div { background: #f3f5fa; border-radius: 12px; padding: 10px; text-align: center; }
.flow3 b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 14px; }
.flow3 span { display: block; font-weight: 800; font-size: 16px; margin: 4px 0 2px; }
.flow3 small { display: block; font-size: 14px; color: #4a5468; line-height: 1.45; word-break: keep-all; }
@media (max-width: 620px) { .flow3 { grid-template-columns: 1fr; } .flow3 > div { display: grid; grid-template-columns: 30px 1fr; text-align: left; column-gap: 8px; } .flow3 small { grid-column: 2; } .flow3 span { margin: 0; } }
.result-card { font-size: 16px; }
.result-card h1 { font-size: clamp(24px, 6vw, 30px); }
.result-card .rsub { font-size: 15px; }
.result-card h3 { font-size: 17px; border-left-width: 4px; }
.result-card ul { font-size: 15.5px; }
.rcard { border: 1px solid var(--line); font-size: 15.5px; }
.rcard p { margin: 4px 0; }
.rcard ul { margin: 4px 0; padding-left: 20px; }
ul.principles { padding-left: 20px; }
ul.principles li { margin: 6px 0; }
ul.principles .owner { display: block; background: none; padding: 0; font-size: 14px; color: #2a4a8f; font-weight: 600; }
.result-actions .btn { font-size: 16px; }
#alert .alert-body { font-size: 16.5px; }
#alert .note { font-size: 14px; color: #4a5468; margin: 6px 0 0; }
.alert-head { animation: none; background: #d9482b; font-size: 18px; }

.rpt.brief { background: #fff; }
.rpt-src { font-size: 14px; color: #4a5468; padding: 8px 14px 0; }
.fb .sim { font-size: 14px; font-weight: 600; color: #3b6b50; }

.g-mission { font-size: 18px; }
.more-h { margin: 10px 0 0; font-size: 14px; color: var(--ink2); }

.bg-card { font-size: 16.5px; line-height: 1.7; }
.bg-step { font-size: 14px; font-weight: 800; color: var(--accent); }
.bg-h { font-size: 20px; margin: 4px 0 10px; color: var(--ink); }
.bg-list { padding-left: 20px; margin: 8px 0; }
.bg-list li { margin: 6px 0; }
.bg-list li b { display: inline-block; min-width: 42px; color: var(--navy); margin-right: 4px; }
.bg-key { background: #fff4ec; border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 12px; font-weight: 700; }
.bg-card h4 { font-size: 17px; margin: 14px 0 4px; }
.bg-card hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.xbtn { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid #b9c3d6; border-radius: 12px; padding: 13px 14px; margin: 8px 0; font-size: 16px; font-weight: 600; color: var(--navy); }
.xbtn:hover { border-color: var(--navy); background: #f3f5fa; }
.xbtn::before { content: '▶ '; color: var(--navy); }

.sv-q { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.sv-t { font-size: 16.5px; font-weight: 700; margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; }
.sv-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-size: 14px; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.likert button, .seg button { border: 1px solid #c9c1b1; background: #fff; border-radius: 10px; padding: 9px 4px; font-size: 14.5px; color: var(--ink); line-height: 1.35; }
.likert button b { display: block; font-size: 18px; }
.likert button.on, .seg button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sv-q textarea { width: 100%; font-family: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #b9c3d6; border-radius: 10px; }
@media (max-width: 480px) { .likert button { font-size: 12.5px; padding: 8px 2px; } .seg { grid-template-columns: 1fr; } }
/* v5.4 제출 완료 화면 */
.done-kv{margin:14px 0}
.done-kv th{width:30%;white-space:nowrap}
.done-list{margin:6px 0 0;padding-left:18px}
.done-list li{margin:4px 0}
.sub-ok{color:#1d7a3a}.sub-fail{color:#b3261e}.sub-sending{color:#6b5b00}
.privacy{margin:18px 0 6px;padding:12px 14px;border-radius:12px;background:#f3f1ea;color:#4a4a4a;font-size:14px;line-height:1.6}
.privacy b{display:block;color:#1f2636;margin-bottom:2px}
