/* 지도 게임 화면: 걸어다니는 탐험대원, 레벨 HUD, 스탬프, 이야기 카드, 축하 연출, 튜토리얼 */
:root {
  --g-brand: #104b3a;
  --g-brand-2: #1b6a52;
  --g-soft: #e2efe9;
  --g-accent: #ff6334;
  --g-accent-soft: #ffe8e0;
  --g-sky: #f3f5f6;
  --g-ink: #17302a;
  --g-font: 'A2Z', sans-serif;
}

/* 에듀사파리 버스 */
.walkers { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.walkers .w-bus { position: absolute; width: 210px; height: auto; transform: translate(-50%, -82%); filter: drop-shadow(0 6px 5px rgba(0, 0, 0, .35)); }
.walkers.right .w-bus { transform: translate(50%, -82%) scaleX(-1); }
.walkers.walking .w-bus { animation: drive .22s ease-in-out infinite alternate; }
.walkers.right.walking .w-bus { animation-name: drive-r; }
@keyframes drive { from { transform: translate(-50%, -82%) rotate(-1.5deg); } to { transform: translate(-50%, -86%) rotate(1.5deg); } }
@keyframes drive-r { from { transform: translate(50%, -82%) scaleX(-1) rotate(-1.5deg); } to { transform: translate(50%, -86%) scaleX(-1) rotate(1.5deg); } }
.walkers:not(.walking) .w-bus { animation: idle-bus 2.6s ease-in-out infinite; }
.walkers.right:not(.walking) .w-bus { animation-name: idle-bus-r; }
@keyframes idle-bus { 50% { transform: translate(-50%, -84%); } }
@keyframes idle-bus-r { 50% { transform: translate(50%, -84%) scaleX(-1); } }

/* 탭 힌트, 숨은 장소 핀 */
.tap-hint { font-family: var(--g-font); background: var(--g-accent); color: #fff; font-weight: 700; font-size: 15px; padding: 6px 12px; border-radius: 14px; margin: 0 auto 6px; width: max-content; animation: bob 1.1s ease-in-out infinite; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.landmark-pin { width: 34px; height: 34px; background: var(--g-accent); border: 3px solid #fff; animation: twinkle 2s ease-in-out infinite; }
@media (hover: hover) { .landmark-pin:hover { background: #ff7a50; } }
.landmark-pin.found { background: var(--g-brand); animation: none; }
.landmark-pin span { font-family: var(--g-font); font-size: 12px; }
@keyframes twinkle { 50% { transform: translate(-50%, -50%) scale(1.15); } }

/* 레벨 HUD */
.safari-root .hud-score { top: 14px; left: 14px; align-items: flex-start; gap: 14px; background: rgba(16, 75, 58, .95); padding: 14px 18px 14px 14px; border-radius: 24px; color: #fff; width: min(440px, calc(100vw - 170px)); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.safari-root .hud-score img { width: 72px; height: 72px; border-radius: 20px; background: #fff; object-fit: contain; padding: 4px; }
.lv { display: grid; gap: 6px; min-width: 0; flex: 1; }
.lv-top { display: flex; align-items: baseline; gap: 6px; font-family: var(--g-font); }
.lv-no { background: var(--g-accent); color: #fff; font-weight: 700; font-size: 16px; padding: 3px 10px; border-radius: 999px; }
.lv-name { font-weight: 700; font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-bar { height: 12px; background: rgba(255, 255, 255, .2); border-radius: 99px; overflow: hidden; }
.lv-bar i { display: block; height: 100%; background: var(--g-accent); border-radius: 99px; transition: width .6s ease; }
.lv-bar.big { height: 14px; background: var(--g-sky); margin: 6px 0; }
.lv-score { display: flex; align-items: baseline; gap: 3px; }
.lv-score .v { font-family: var(--g-font); font-size: 36px; font-weight: 700; line-height: 1; transition: transform .2s, color .2s; display: inline-block; }
.lv-score .v.bump { animation: bump .5s ease; color: #ffb59c; }
@keyframes bump { 40% { transform: scale(1.35); } }
.lv-score .u { font-size: 17px; opacity: .85; }
.lv-score .nx { font-size: 14px; opacity: .75; margin-left: 8px; white-space: nowrap; }
.lv-stamps { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }

/* 스탬프 */
.stamp-c { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px dashed rgba(127, 140, 136, .7); color: rgba(127, 140, 136, .9); font-family: var(--g-font); font-size: 11px; font-weight: 700; flex: none; }
.hud .stamp-c { border-color: rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .5); }
.stamp-c.sm { width: 40px; height: 40px; font-size: 13px; }
.stamp-c.lg { width: 64px; height: 64px; font-size: 16px; }
.stamp-c.map { width: 104px; height: 104px; font-size: 28px; border-width: 5px; }
.map-stamp { position: absolute; transform: translate(-50%, -50%); pointer-events: none; z-index: 3; animation: stamp-drop .6s cubic-bezier(.2, 1.6, .4, 1); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
.map-stamp .stamp-c.on { background: rgba(255, 255, 255, .92); border-width: 6px; box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 9px rgba(255, 99, 52, .4); }
@keyframes stamp-drop { 0% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } 60% { opacity: 1; } }
.stamp-c.xl { width: 150px; height: 150px; font-size: 38px; border-width: 6px; }
.stamp-c.on { border: 3px solid var(--g-accent); background: #fff; color: var(--g-accent); transform: rotate(-10deg); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px rgba(255, 99, 52, .35); }
.hud .stamp-c.on { border-width: 2px; }
.stamp-c.xl.on { border-width: 7px; box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 10px rgba(255, 99, 52, .35); }

/* 이야기 카드 모달 */
.story-back { position: fixed; inset: 0; z-index: 600; background: rgba(8, 30, 23, .55); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.story { width: min(860px, 100%); height: min(860px, calc(100dvh - 32px)); background: #fbfcf8; border-radius: 30px; overflow: hidden; display: grid; grid-template-rows: auto auto 1fr auto; position: relative; box-shadow: 0 30px 70px rgba(0, 0, 0, .3); }
.story-head { display: flex; align-items: center; gap: 14px; background: var(--g-brand); color: #fff; padding: 16px 20px; }
.story-head img { width: 44px; }
.story-head .k { font-size: 13px; opacity: .8; font-weight: 600; }
.story-head h2 { margin: 0; font-family: var(--g-font); font-size: 28px; font-weight: 700; line-height: 1.2; }
.story-head .t { flex: 1; }
.story-x { width: 48px; height: 48px; border: 0; border-radius: 16px; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
.story-x .icon { width: 24px; height: 24px; }
.story-prog { display: flex; gap: 5px; padding: 12px 20px 0; }
.story-prog i { flex: 1; height: 8px; border-radius: 99px; background: #e3e9e6; transition: background .2s; }
.story-prog i.q { background: #ffd9cc; }
.story-prog i.done { background: var(--g-brand-2); }
.story-prog i.on { background: var(--g-accent); }
.story-body { overflow: auto; padding: 18px 26px 24px; }
.story-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px 18px; background: #fff; border-top: 1px solid #edf0ee; }
.story-foot .k-btn { min-width: 150px; }
.story-foot .k-btn.wait { background: #f3c3b3; }
.story-count { font-family: var(--g-font); color: #7d8a87; font-weight: 700; }
.slide { animation: slidein .25s ease; display: grid; gap: 16px; }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } }
.s-label { font-family: var(--g-font); font-weight: 700; color: var(--g-accent); font-size: 16px; }
.s-arrive { display: grid; justify-items: center; gap: 14px; text-align: center; position: relative; }
.s-badge { position: absolute; top: 4px; left: 4px; font-family: var(--g-font); background: var(--g-accent); color: #fff; font-weight: 700; font-size: 22px; padding: 8px 18px; border-radius: 16px; transform: rotate(-8deg); z-index: 1; animation: pop-in .5s ease; }
@keyframes pop-in { 0% { transform: rotate(-8deg) scale(.3); opacity: 0; } 70% { transform: rotate(-8deg) scale(1.15); } }
.s-building { width: min(520px, 90%); max-height: 330px; object-fit: contain; animation: rise .6s ease; }
@keyframes rise { from { transform: translateY(30px) scale(.9); opacity: 0; } }
.s-chip { font-family: var(--g-font); background: var(--g-soft); color: var(--g-brand); font-weight: 700; padding: 8px 16px; border-radius: 999px; font-size: 16px; }
.s-talk { display: flex; align-items: flex-end; gap: 12px; text-align: left; width: 100%; }
.s-talk img { width: 92px; flex: none; }
.s-talk .bubble { position: relative; background: #fff; border-radius: 24px 24px 24px 6px; padding: 18px 20px; font-size: 20px; line-height: 1.6; color: var(--g-ink); flex: 1; }
.s-talk.big .bubble { font-size: 21px; }
.s-talk.big img { width: 110px; }
.s-talk mark { background: linear-gradient(transparent 55%, #ffd4c4 55%); color: inherit; font-weight: 700; }
.s-fit { display: flex; gap: 8px; align-items: center; background: var(--g-soft); color: var(--g-brand); border-radius: 18px; padding: 14px 16px; font-size: 18px; font-weight: 600; }
.s-fit .icon { color: var(--g-accent); width: 24px; height: 24px; flex: none; }
.s-photo { margin: 0; border-radius: 22px; overflow: hidden; background: #e8ece9; }
.s-photo img { display: block; width: 100%; max-height: 420px; object-fit: cover; cursor: zoom-in; }
.s-photo figcaption { padding: 12px 16px; font-size: 17px; background: #fff; }
.s-photo figcaption a { color: #7d8a87; font-size: 13px; }
.g-nav { display: flex; align-items: center; justify-content: center; gap: 14px; }
.g-dots { display: flex; gap: 6px; }
.g-dots i { width: 10px; height: 10px; border-radius: 50%; background: #d5ddda; }
.g-dots i.on { background: var(--g-accent); }
.s-names, .s-majors { display: flex; flex-wrap: wrap; gap: 8px; }
.s-names span, .s-majors span { background: #fff; border-radius: 14px; padding: 8px 14px; font-size: 17px; font-weight: 600; color: var(--g-brand); }
.s-person { display: grid; justify-items: center; text-align: center; gap: 8px; }
.s-person .ph { width: 170px; height: 170px; border-radius: 50%; object-fit: cover; border: 6px solid #fff; }
.s-person h3 { margin: 4px 0 0; font-family: var(--g-font); font-size: 30px; color: var(--g-brand); }
.s-person .role { font-size: 17px; color: #5f706a; }
.s-quote { background: var(--g-accent-soft); color: #9c3510; font-weight: 700; border-radius: 18px; padding: 12px 18px; font-size: 18px; max-width: 560px; }
.s-person ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; text-align: left; }
.s-person li { display: flex; gap: 8px; align-items: center; font-size: 18px; background: #fff; padding: 10px 14px; border-radius: 14px; }
.s-person li .icon { color: var(--g-accent); flex: none; }
.s-observe h3, .s-quiz h3, .s-finish h3 { margin: 0; font-family: var(--g-font); font-size: 25px; line-height: 1.4; color: var(--g-brand); }
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.q-grid.nudge, .ln-board.nudge { animation: shake .45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.q-opt { display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: #fff; border-radius: 20px; padding: 18px 16px; font-size: 19px; font-weight: 600; color: var(--g-ink); cursor: pointer; transition: transform .1s, background .15s; min-height: 76px; }
@media (hover: hover) { .q-opt:hover:not(:disabled) { background: #fff7f3; transform: translateY(-2px); } }
.q-opt:active:not(:disabled) { transform: translateY(3px); }
.q-opt .l { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--g-soft); color: var(--g-brand); display: grid; place-items: center; font-family: var(--g-font); font-weight: 700; }
.q-opt.right { background: #e3f4ea; }
.q-opt.right .l { background: var(--g-brand); color: #fff; }
.q-opt.wrong { background: #ffe9e1; }
.q-opt.wrong .l { background: var(--g-accent); color: #fff; }
.q-opt:disabled { cursor: default; }
.q-result { display: flex; gap: 14px; align-items: flex-start; border-radius: 22px; padding: 16px; animation: slidein .25s ease; }
.q-result img { width: 84px; flex: none; }
.q-result b { font-family: var(--g-font); font-size: 22px; display: block; }
.q-result .sub { display: block; font-size: 14px; opacity: .8; margin-top: 2px; }
.q-result p { margin: 6px 0 0; font-size: 18px; line-height: 1.6; }
.q-result.ok { background: #e3f4ea; color: #1b5a3c; }
.q-result.bad { background: #ffe9e1; color: #a2380f; }
.s-finish { display: grid; justify-items: center; text-align: center; gap: 12px; padding-top: 10px; }
.s-finish .drop { animation: drop .7s cubic-bezier(.2, 1.6, .4, 1); margin: 10px 0; }
@keyframes drop { 0% { transform: translateY(-120px) scale(1.6); opacity: 0; } 60% { opacity: 1; } }
.s-finish p { margin: 0; font-size: 19px; color: #5f706a; }
.s-next { background: var(--g-soft); color: var(--g-brand); border-radius: 18px; padding: 14px 18px; font-size: 19px; }
.streak-pop { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); background: var(--g-accent); color: #fff; font-family: var(--g-font); font-weight: 700; font-size: 26px; padding: 12px 22px; border-radius: 20px; animation: streak 1.6s ease forwards; z-index: 5; }
@keyframes streak { 0% { transform: translateX(-50%) scale(.3); opacity: 0; } 20% { transform: translateX(-50%) scale(1.15); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateX(-50%) translateY(-30px); opacity: 0; } }

/* 축하 연출 */
.celebrate { position: fixed; inset: 0; z-index: 1100; background: rgba(8, 30, 23, .6); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.cele-card { position: relative; width: min(420px, 100%); background: #fff; border-radius: 32px; padding: 34px 26px 26px; display: grid; justify-items: center; gap: 10px; text-align: center; overflow: hidden; animation: pop-card .45s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes pop-card { from { transform: scale(.6); opacity: 0; } }
.cele-ray { position: absolute; inset: -50%; background: repeating-conic-gradient(rgba(255, 99, 52, .08) 0 12deg, transparent 12deg 24deg); animation: spin 14s linear infinite; z-index: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.cele-card > *:not(.cele-ray) { position: relative; z-index: 1; }
.cele-img { height: 150px; animation: rise .6s ease; }
.cele-kicker { font-family: var(--g-font); background: var(--g-accent); color: #fff; font-weight: 700; padding: 6px 14px; border-radius: 999px; font-size: 15px; }
.cele-card h2 { margin: 0; font-family: var(--g-font); font-size: 30px; color: var(--g-brand); }
.cele-card p { margin: 0 0 8px; font-size: 18px; color: #5f706a; }

/* 튜토리얼 */
.tuto { position: absolute; inset: 0; z-index: 700; background: rgba(8, 30, 23, .5); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.tuto-card { position: relative; width: min(560px, 100%); background: #fbfcf8; border-radius: 32px; padding: 26px 24px 22px; display: grid; gap: 14px; animation: pop-card .4s cubic-bezier(.2, 1.4, .4, 1); }
.tuto-skip { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; color: #7d8a87; font-weight: 600; font-size: 15px; padding: 8px; }
.tuto-art { display: flex; justify-content: center; align-items: flex-end; gap: 4px; height: 190px; }
.tuto-art img { max-height: 190px; animation: rise .5s ease; }
.tuto-stamps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-self: center; max-width: 340px; }
.tuto-stamps .stamp-c { width: 62px; height: 62px; font-size: 15px; }
.tuto-bubble { background: #fff; border-radius: 26px; padding: 18px 20px; text-align: center; }
.tuto-bubble h2 { margin: 0 0 8px; font-family: var(--g-font); font-size: 26px; color: var(--g-brand); }
.tuto-bubble p { margin: 0; font-size: 19px; line-height: 1.6; color: var(--g-ink); }
.tuto-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tuto-foot .dots { display: flex; gap: 6px; }
.tuto-foot .dots i { width: 10px; height: 10px; border-radius: 50%; background: #d5ddda; }
.tuto-foot .dots i.on { background: var(--g-accent); width: 26px; border-radius: 99px; }

/* 탐험 수첩 */
.dialog.note { width: min(820px, 100%); border-radius: 26px; }
.dialog.note .dialog-head h2 { font-family: var(--g-font); font-size: 22px; color: var(--g-brand); }
.note-lv { display: flex; gap: 16px; align-items: center; background: var(--g-soft); border-radius: 22px; padding: 16px 18px; }
.note-lv img { height: 110px; }
.note-lv > div { flex: 1; }
.note-lv .k { font-family: var(--g-font); color: var(--g-accent); font-weight: 700; }
.note-lv .n { font-family: var(--g-font); font-size: 26px; font-weight: 700; color: var(--g-brand); }
.note-sec h3 { margin: 4px 0 10px; font-family: var(--g-font); font-size: 18px; color: var(--g-brand); }
.note-stamps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.note-stamps > div { display: grid; justify-items: center; gap: 6px; font-size: 13px; text-align: center; color: #5f706a; }
.note-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bdg { display: grid; justify-items: center; text-align: center; gap: 4px; background: #f1f3f2; border-radius: 18px; padding: 12px 10px; filter: grayscale(1); opacity: .5; }
.bdg.on { filter: none; opacity: 1; background: #fff4ee; }
.bdg img { height: 64px; }
.bdg b { font-family: var(--g-font); font-size: 15px; color: var(--g-brand); }
.bdg span { font-size: 12px; color: #5f706a; }
.note-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.note-stats span { background: #f1f3f2; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.note-acts { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 640px) {
  .story-back { padding: 0; }
  .story { height: 100dvh; border-radius: 0; }
  .story-head h2 { font-size: 23px; }
  .story-body { padding: 14px 16px 20px; }
  .story-foot .k-btn { min-width: 0; flex: 1; }
  .story-count { display: none; }
  .q-grid { grid-template-columns: 1fr; }
  .s-talk .bubble, .s-talk.big .bubble { font-size: 18px; }
  .s-talk img, .s-talk.big img { width: 70px; }
  .note-stamps { grid-template-columns: repeat(4, 1fr); }
  .safari-root .hud-score img { display: none; }
  .lv-score .nx { display: none; }
  .walkers .w-bus { width: 170px; }
}

/* 배지 모음 버튼과 날아가는 배지 */
.hud-badge b { font-family: var(--g-font); color: var(--g-accent); }
.hud-badge .icon { color: var(--g-accent); }
.hud-badge.got { animation: bump .6s ease; background: #fff1ea; }
.fly-badge { position: fixed; z-index: 1200; width: 100px; height: 100px; object-fit: contain; pointer-events: none; transition: all .7s cubic-bezier(.5, -0.2, .7, 1); }
.cele-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.bdg.new { outline: 4px solid var(--g-accent); animation: bump .8s ease 2; }
.bdg b, .bdg span { line-height: 1.35; }
@media (max-width: 640px) {
  .safari-root .hud-top-right { flex-direction: column; align-items: flex-end; }
  .safari-root .hud-score { width: calc(100vw - 150px); padding: 10px; gap: 8px; }
  .lv-name { font-size: 16px; }
  .lv-score .v { font-size: 28px; }
  .stamp-c.sm { width: 30px; height: 30px; font-size: 10px; }
}

/* 한 줄 설명 */
.s-oneline { font-family: var(--g-font); font-size: 26px; line-height: 1.45; color: var(--g-ink); max-width: 640px; }
.s-oneline b { display: block; color: var(--g-accent); font-size: 18px; margin-bottom: 4px; }

/* 두 탐험대원 채팅 */
.s-chat { display: grid; gap: 12px; }
.chat-list { display: grid; gap: 14px; }
.msg { display: flex; align-items: flex-end; gap: 10px; max-width: 88%; }
.msg img { width: 62px; height: 62px; object-fit: contain; flex: none; background: #fff; border-radius: 50%; padding: 2px; }
.msg .who { font-family: var(--g-font); font-size: 14px; font-weight: 700; color: #6b7a76; margin: 0 6px 4px; }
.msg .bubble { font-size: 21px; line-height: 1.6; padding: 14px 18px; border-radius: 22px; }
.msg.g { justify-self: start; }
.msg.g .bubble { background: #fff; border-bottom-left-radius: 6px; }
.msg.b { justify-self: end; flex-direction: row-reverse; text-align: right; }
.msg.b .bubble { background: var(--g-brand); color: #fff; border-bottom-right-radius: 6px; text-align: left; }
.msg.b .who { text-align: right; }
.msg .bubble mark { background: linear-gradient(transparent 55%, #ffd4c4 55%); color: inherit; font-weight: 700; }
.msg.b .bubble mark { background: linear-gradient(transparent 55%, rgba(255, 99, 52, .6) 55%); }
.msg.new { animation: msg-in .35s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.msg.typing .bubble { display: flex; gap: 6px; padding: 18px 20px; }
.msg.typing .bubble i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .5; animation: typing 1s infinite; }
.msg.typing .bubble i:nth-child(2) { animation-delay: .15s; }
.msg.typing .bubble i:nth-child(3) { animation-delay: .3s; }
.msg.g.typing .bubble { color: #8a9693; }
@keyframes typing { 50% { transform: translateY(-5px); opacity: 1; } }
.chat-tap { justify-self: center; border: 0; background: var(--g-accent-soft); color: #c63b14; font-family: var(--g-font); font-weight: 700; font-size: 17px; padding: 12px 22px; border-radius: 999px; cursor: pointer; animation: bob 1.2s ease-in-out infinite; }

/* 퀴즈 더 큼직하게 */
.s-quiz { gap: 20px; }
.s-quiz h3 { font-size: 30px; line-height: 1.4; }
.s-quiz .s-label { font-size: 18px; }
.q-grid { gap: 16px; }
.q-opt { min-height: 110px; font-size: 23px; padding: 20px; border-radius: 24px; gap: 16px; }
.q-opt .l { width: 54px; height: 54px; border-radius: 16px; font-size: 24px; }
.q-result img { width: 100px; }
.q-result b { font-size: 26px; }
.q-result p { font-size: 20px; }
@media (max-width: 640px) {
  .s-oneline { font-size: 21px; }
  .msg { max-width: 96%; }
  .msg img { width: 46px; height: 46px; }
  .msg .bubble { font-size: 18px; }
  .s-quiz h3 { font-size: 23px; }
  .q-opt { min-height: 72px; font-size: 19px; }
  .q-opt .l { width: 42px; height: 42px; font-size: 19px; }
}

/* 관찰 미션 + 학과 카드 뒤집기 */
.s-observe { display: grid; gap: 14px; }
.obs-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: var(--g-accent-soft); border-radius: 26px; padding: 18px 20px; }
.obs-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--g-accent); color: #fff; display: grid; place-items: center; }
.obs-icon .icon { width: 34px; height: 34px; }
.obs-card p { margin: 4px 0 10px; font-size: 21px; line-height: 1.55; color: var(--g-ink); }
.obs-card > img { width: 96px; animation: idle 2.4s ease-in-out infinite; }
.obs-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #fff; color: #c63b14; font-family: var(--g-font); font-weight: 700; font-size: 17px; padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.obs-btn.on { background: var(--g-brand); color: #fff; }
.maj-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }
.maj-head h3 { margin: 0; font-family: var(--g-font); font-size: 26px; color: var(--g-brand); }
.maj-count { font-family: var(--g-font); font-weight: 700; color: var(--g-accent); font-size: 17px; white-space: nowrap; }
.maj-sub { margin: -6px 0 0; color: #5f706a; font-size: 17px; }
.maj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.maj-grid.many { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.maj { border: 0; padding: 0; background: transparent; perspective: 900px; cursor: pointer; aspect-ratio: 4 / 5; }
.maj-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.3, 1.3, .5, 1); transform-style: preserve-3d; }
.maj.on .maj-in { transform: rotateY(180deg); }
.maj-front, .maj-back { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; display: grid; justify-items: center; align-content: center; gap: 10px; padding: 14px; text-align: center; }
.maj-front { background: #fff; }
.maj-front img { width: 72%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; }
.maj-q { width: 72%; aspect-ratio: 1; border-radius: 18px; background: var(--g-soft); color: var(--g-brand); display: grid; place-items: center; font-family: var(--g-font); font-size: 56px; font-weight: 700; }
.maj-front b { font-family: var(--g-font); font-size: 18px; color: var(--g-brand); line-height: 1.3; }
.maj-back { background: var(--g-brand); color: #fff; transform: rotateY(180deg); }
.maj-back b { font-family: var(--g-font); font-size: 18px; color: #ffb59c; }
.maj-back span { font-size: 17px; line-height: 1.5; }
@media (hover: hover) { .maj:hover .maj-front { background: #fffaf7; } }
@media (max-width: 640px) {
  .obs-card { grid-template-columns: auto 1fr; }
  .obs-card > img { display: none; }
  .obs-card p { font-size: 18px; }
  .maj-grid, .maj-grid.many { grid-template-columns: repeat(2, 1fr); }
  .maj-back span { font-size: 15px; }
}

/* 겹침 없는 세로 배치(평평한 모양) */
.s-quiz, .s-chat, .s-observe, .s-gallery, .s-person, .s-finish, .s-arrive { display: grid; }
.s-quiz { gap: 22px; }
.s-quiz h3 { margin: 0; }
.q-grid { align-items: stretch; }
.q-opt { background: #fff; }
.q-opt:active:not(:disabled) { transform: scale(.98); }
.q-result { margin-top: 4px; }
.story-foot .k-btn.wait { background: #f6c9b9; color: #fff; }
.msg img { background: #fff; }
.s-person .ph { border: 0; }
.cele-card, .tuto-card { box-shadow: none; }
.walkers .w-bus { filter: none; }
.map-stamp { filter: none; }
.story { background: #eef2f0; }
.story-foot { border-top: 0; }
.s-oneline, .s-chip { }
.s-fit, .s-next { background: #fff; }
.q-result.ok { background: #dcefe4; }
.maj-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.maj-grid.many { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.maj { aspect-ratio: 1 / 1.08; }
.maj-front img, .maj-q { width: 62%; }
.maj-q { font-size: 44px; }

/* 배경음악 버튼 */
.safari-root .hud-music.off { color: rgba(22, 25, 42, .55); }
@media (max-width: 640px) { .safari-root .hud-music .t { display: none; } .safari-root .hud-music { width: 44px; padding: 0; justify-content: center; } }

/* 실사 3D 지도(v2): 잠긴 건물은 살짝 어둡게만, 자물쇠 배지로 표시 */
.safari-root .bld-lock { fill: #16192a; fill-opacity: .42; stroke: none; }
@media (hover: hover) { .safari-root .bld-lock:hover { fill-opacity: .3; } }
.lock-badge { position: absolute; transform: translate(-50%, -50%); transform-origin: 0 0; scale: var(--ms, 1); pointer-events: none; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(22, 25, 42, .82); color: #fff; display: grid; place-items: center; }
.lock-badge .icon { width: 20px; height: 20px; }
.lock-badge span { position: absolute; right: -6px; top: -6px; min-width: 20px; height: 20px; border-radius: 10px; background: #fff; color: #16192a; font-family: var(--g-font); font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.map-marker, .map-stamp, .landmark-pin, .walkers .w-bus { transform-origin: 0 0; scale: var(--ms, 1); }
.safari-root .bld-open.next { fill: rgba(255, 244, 196, .22); stroke: #ffe58a; stroke-width: 5; }

.walkers .w-bus { scale: calc(var(--ms, 1) * .78); }
.safari-root .landmark-pin { z-index: 5; }
.safari-root .bld-label { font-size: 15px; padding: 4px 10px; border-radius: 8px; }
.safari-root { background: #2f4a2c; }
.stamp-c.map { width: 84px; height: 84px; font-size: 23px; }

/* 모바일: 오른쪽 버튼은 아이콘만, 현황판은 한 줄 스탬프로 낮게 */
@media (max-width: 640px) {
  .safari-root .hud-top-right { top: 12px; right: 10px; gap: 6px; }
  .safari-root .hud-top-right .hud-btn { width: 46px; height: 46px; padding: 0; justify-content: center; font-size: 0; gap: 0; position: relative; }
  .safari-root .hud-top-right .hud-btn .icon { width: 22px; height: 22px; }
  .safari-root .hud-top-right .hud-btn .t { display: none; }
  .safari-root .hud-badge b { position: absolute; right: -4px; top: -6px; font-size: 11px; line-height: 1; background: var(--g-accent); color: #fff; padding: 3px 5px; border-radius: 9px; }
  .safari-root .hud-score { left: 10px; top: 12px; width: calc(100vw - 80px); padding: 10px 12px; }
  .lv-stamps { flex-wrap: nowrap; gap: 4px; }
  .safari-root .lv-stamps .stamp-c.sm { width: 29px; height: 29px; font-size: 10px; flex: none; }
}
/* 안내 토스트는 화면 아래쪽 가운데에 띄워 현황판과 겹치지 않게 */
.safari-root .hud-toast { top: auto; bottom: 28px; font-size: 15px; padding: 10px 18px; z-index: 30; }
@media (max-width: 640px) { .safari-root .hud-toast { bottom: 110px; } }

/* 관악 밖 캠퍼스 카드(의과대학, 연건캠퍼스) */
.inset-campus { position: absolute; border-radius: 26px; background: #fffaf0; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; z-index: 1; }
.inset-campus img { flex: 1; min-height: 0; width: 100%; object-fit: contain; padding: 12px 12px 0; pointer-events: none; }
.inset-campus .ic-t { padding: 8px 14px 14px; text-align: center; font-family: var(--g-font); color: #16192a; pointer-events: none; }
.inset-campus .ic-t b { display: block; font-size: 22px; font-weight: 700; }
.inset-campus .ic-t span { display: block; font-size: 14px; color: rgba(22, 25, 42, .6); margin-top: 2px; }
.inset-campus.locked img { filter: grayscale(1) brightness(.75); opacity: .7; }
.inset-campus.next { outline: 6px solid #ffe58a; }
@media (hover: hover) { .inset-campus:hover { background: #fff; } }
.ferry-line { fill: none; stroke: #fffaf0; stroke-width: 7; stroke-dasharray: 2 16; stroke-linecap: round; pointer-events: none; }

/* 사진 둘러보기: 겹침 없이 위에서 아래로 한 줄씩 */
.s-gallery { gap: 14px; align-content: start; }
.s-gallery .g-head { display: flex; align-items: center; justify-content: space-between; }
.s-gallery .g-head .s-label { margin: 0; }
.s-gallery .g-count { font-family: var(--g-font); font-size: 16px; font-weight: 700; color: var(--g-brand); background: #fff; border-radius: 999px; padding: 4px 12px; }
.s-gallery .s-photo img { aspect-ratio: 16 / 9; max-height: none; height: auto; }
.s-gallery .s-photo figcaption { display: grid; gap: 4px; line-height: 1.45; }
.s-gallery .s-photo figcaption b { font-size: 18px; }
.s-gallery .g-dots { justify-content: center; margin: 2px 0; }
.s-gallery .s-names { align-items: center; padding-top: 4px; }
.s-gallery .s-names .nm-k { background: transparent; padding: 0 4px 0 0; color: rgba(22, 25, 42, .55); font-size: 15px; font-weight: 600; }

/* 선배 만나기: 사진 크게, 회사 로고 함께 */
.s-person .ph { width: min(300px, 70vw); height: auto; aspect-ratio: 1 / 1; border-radius: 32px; object-fit: cover; }
.s-person .p-logo { background: #fff; border-radius: 16px; padding: 12px 22px; display: inline-flex; align-items: center; justify-content: center; }
.s-person .p-logo img { height: 34px; width: auto; display: block; }

/* 학과 카드 이름이 길어도 카드 밖으로 넘치지 않게 */
.maj-front { min-width: 0; padding-left: 8px; padding-right: 8px; }
.maj-front b { font-size: clamp(14px, 1.6vw, 18px); word-break: keep-all; overflow-wrap: anywhere; text-align: center; max-width: 100%; }

/* 안내 토스트: 아이콘 + 문구, 길 안내는 브랜드 초록 */
.safari-root .hud-toast { display: inline-flex; align-items: center; gap: 8px; white-space: normal; max-width: calc(100vw - 40px); width: max-content; text-align: left; line-height: 1.35; animation: toast-in .35s cubic-bezier(.2, 1.4, .4, 1); }
.safari-root .hud-toast .icon { width: 20px; height: 20px; flex: none; }
.safari-root .hud-toast.guide { background: var(--g-brand); font-size: 17px; padding: 14px 22px; border-radius: 18px; }
.safari-root .hud-toast.guide b { color: #ffe58a; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
/* 다음 목적지 화살표는 버스보다 위에 */
.map-marker { z-index: 6; }
.s-gallery .s-photo img { max-height: 44vh; width: 100%; object-fit: cover; }
.s-person .p-wrap { display: grid; gap: 14px; justify-items: center; width: 100%; }
.s-person .p-info { display: grid; gap: 10px; justify-items: center; width: 100%; max-width: 520px; }
.s-person .p-info h3 { margin: 0; }
@media (min-width: 760px) {
  .s-person .p-wrap { grid-template-columns: minmax(240px, 320px) 1fr; align-items: center; justify-items: stretch; gap: 28px; text-align: left; }
  .s-person .ph { width: 100%; }
  .s-person .p-info { justify-items: start; max-width: none; }
  .s-person .s-quote { text-align: left; }
  .s-person ul { width: 100%; }
}
.inset-campus .ic-t em { display: inline-block; margin-top: 6px; font-style: normal; font-size: 13px; font-weight: 600; color: #fff; background: var(--g-brand); border-radius: 999px; padding: 3px 10px; }
/* 미리보기, 읽기 전용 안내는 현황판과 겹치지 않게 아래 왼쪽으로 */
.safari-root .hud-stage { top: auto; left: 14px; bottom: 16px; transform: none; z-index: 8; }
/* 진짜 배지 그림: 크게, 잠긴 배지는 흐리게 */
.bdg img { height: 84px; width: 84px; object-fit: contain; }
.cele-img[src*="badges/"] { height: 170px; }

/* 핵심 랜드마크: 샤 정문 3D 모형 + 늘 보이는 이름표 */
.landmark-model { position: absolute; transform: translate(-50%, -88%); transform-origin: 0 0; scale: var(--ms, 1); z-index: 3; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; justify-items: center; }
.landmark-model img { width: 120px; height: auto; display: block; pointer-events: none; }
.landmark-model .lm-name { margin-top: -6px; display: inline-flex; align-items: center; gap: 4px; background: #16192a; color: #fff; font-family: var(--g-font); font-size: 15px; font-weight: 700; padding: 5px 12px 5px 9px; border-radius: 999px; white-space: nowrap; }
.landmark-model .lm-name .icon { width: 15px; height: 15px; color: #ffd84d; }
.landmark-model.found .lm-name .icon { color: #8ee0a8; }
@media (hover: hover) { .landmark-model:hover img { transform: translateY(-3px); transition: transform .2s; } }

/* ===== 학과 도감: 3D 책 버튼 (잠기면 사슬, 흔들흔들) ===== */
.safari-root .codex-book { width: 116px; height: auto; padding: 0; background: transparent; box-shadow: none; border-radius: 0; display: grid; justify-items: center; gap: 2px; overflow: visible; }
.safari-root .codex-book::after { display: none; }
.codex-book .cb-art { position: relative; width: 112px; height: 112px; display: block; }
.codex-book .cb-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .3s; }
.codex-book .cb-locked { opacity: 0; }
.codex-book.locked .cb-locked { opacity: 1; }
.codex-book.locked .cb-open { opacity: 0; }
.codex-book .t { background: #16192a; color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.codex-book.locked .t { background: rgba(22, 25, 42, .78); }
/* 잠긴 책은 몇 초마다 덜컹덜컹: 사슬을 풀고 싶어지게 */
.codex-book.locked .cb-art { animation: chain-wobble 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes chain-wobble { 0%, 62%, 100% { transform: rotate(0) translateY(0); } 66% { transform: rotate(-9deg) translateY(-4px); } 71% { transform: rotate(8deg) translateY(-6px); } 76% { transform: rotate(-6deg) translateY(-3px); } 81% { transform: rotate(4deg); } 86% { transform: rotate(-2deg); } 90% { transform: rotate(0); } }
.codex-book.rattle .cb-art { animation: chain-rattle .55s ease both; }
@keyframes chain-rattle { 15% { transform: rotate(-14deg) scale(1.08); } 35% { transform: rotate(12deg) scale(1.08); } 55% { transform: rotate(-9deg); } 75% { transform: rotate(5deg); } 100% { transform: rotate(0); } }
/* 열린 책은 은은하게 빛나요 */
.codex-book:not(.locked) .cb-art::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 216, 77, .65), rgba(255, 216, 77, 0) 70%); animation: book-glow 2.4s ease-in-out infinite; }
@keyframes book-glow { 50% { transform: scale(1.18); opacity: .55; } }
.codex-book.just-open .cb-art { animation: book-pop .7s cubic-bezier(.2, 1.6, .4, 1) 2; }
@keyframes book-pop { 40% { transform: scale(1.25) rotate(-4deg); } }
@media (max-width: 640px) {
  .safari-root .codex-book { width: 88px; right: 8px; bottom: 8px; }
  .codex-book .cb-art { width: 84px; height: 84px; }
  .codex-book .t { font-size: 12px; padding: 3px 9px; }
}

/* ===== 학과 도감 오픈 연출 (화면 가운데) ===== */
.codex-unlock { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; align-content: center; gap: 8px; background: rgba(12, 22, 18, .82); overflow: hidden; animation: cu-fade .3s ease; }
@keyframes cu-fade { from { opacity: 0; } }
.cu-rays { position: absolute; left: 50%; top: 42%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; background: repeating-conic-gradient(rgba(255, 216, 77, .16) 0 9deg, transparent 9deg 18deg); opacity: 0; transition: opacity .5s; animation: cu-spin 18s linear infinite; pointer-events: none; }
@keyframes cu-spin { to { transform: rotate(360deg); } }
.cu-stage { position: relative; width: min(62vmin, 420px); height: min(62vmin, 420px); }
.cu-book { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cu-locked { animation: cu-in .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes cu-in { from { transform: scale(.3) translateY(40px); opacity: 0; } }
.cu-closed, .cu-open { opacity: 0; }
.cu-piece { position: absolute; left: 50%; top: 50%; width: 22%; margin: -11% 0 0 -11%; opacity: 0; pointer-events: none; }
.cu-piece.cu-lock { width: 30%; margin: -4% 0 0 -15%; }
.cu-flash { position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, #fff 0, rgba(255, 244, 196, .85) 25%, rgba(255, 216, 77, 0) 62%); opacity: 0; pointer-events: none; }
.cu-text { position: relative; text-align: center; color: #fff; opacity: 0; transform: translateY(16px); transition: opacity .4s, transform .4s; padding: 0 20px; }
.cu-text h2 { margin: 6px 0 4px; font-family: var(--g-font); font-size: clamp(30px, 6vw, 44px); font-weight: 700; color: #ffe58a; }
.cu-text p { margin: 0 0 14px; font-size: 17px; color: rgba(255, 255, 255, .85); }
.cu-text .cele-acts { justify-content: center; }
/* 1) 덜컹덜컹 점점 세게 */
.codex-unlock.s-shake .cu-locked { animation: cu-shake 1.2s ease-in both; }
@keyframes cu-shake { 0% { transform: rotate(0); } 10% { transform: rotate(-3deg); } 20% { transform: rotate(3deg); } 30% { transform: rotate(-5deg); } 40% { transform: rotate(5deg); } 50% { transform: rotate(-7deg) scale(1.03); } 60% { transform: rotate(7deg) scale(1.04); } 70% { transform: rotate(-9deg) scale(1.05); } 80% { transform: rotate(9deg) scale(1.06); } 90% { transform: rotate(-11deg) scale(1.08); } 100% { transform: rotate(0) scale(1.1); } }
/* 2) 번쩍! 사슬과 자물쇠가 사방으로 튕겨 나가요 */
.codex-unlock.s-break .cu-flash { animation: cu-flash .6s ease-out both; }
@keyframes cu-flash { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.3); } }
.codex-unlock.s-break .cu-locked { opacity: 0; transition: opacity .12s .1s; }
.codex-unlock.s-break .cu-closed { opacity: 1; animation: cu-dudung .7s cubic-bezier(.2, 1.7, .4, 1) .1s both; }
.codex-unlock.s-break .cu-piece { animation: cu-fly 1s cubic-bezier(.15, .7, .3, 1) var(--d) both; }
@keyframes cu-fly { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) rotate(0) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--r))) rotate(var(--rot)) scale(.85); } }
.codex-unlock.s-break .cu-piece.cu-lock { animation: cu-drop 1.1s cubic-bezier(.4, 0, .8, .4) both; }
@keyframes cu-drop { 0% { opacity: 1; transform: translateY(0) rotate(0); } 20% { transform: translateY(-40px) rotate(-20deg); } 100% { opacity: 0; transform: translateY(70vh) rotate(160deg); } }
/* 3) 두둥! */
@keyframes cu-dudung { 0% { transform: scale(1.1); } 35% { transform: scale(.86, 1.12); } 60% { transform: scale(1.18, .9); } 100% { transform: scale(1); } }
.codex-unlock.s-boom .cu-rays { opacity: 1; }
/* 4) 책이 펼쳐지며 빛나요 */
.codex-unlock.s-open .cu-closed { opacity: 0; transition: opacity .2s; animation: none; }
.codex-unlock.s-open .cu-open { opacity: 1; animation: cu-open .8s cubic-bezier(.2, 1.5, .4, 1) both; filter: drop-shadow(0 0 40px rgba(255, 216, 77, .75)); }
@keyframes cu-open { 0% { transform: scale(.7) rotateX(50deg); } 100% { transform: scale(1.06) rotateX(0); } }
.codex-unlock.s-text .cu-text { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .codex-unlock *, .codex-book .cb-art { animation-duration: .01s !important; } }
.landmark-model { transform: translate(-50%, -96%); }
.landmark-model .lm-name { margin: 0 0 4px; }
.safari-root .hud-zoom { bottom: 172px; }
.codex-unlock { background: rgba(10, 18, 15, .9); }
.cu-rays { background: repeating-conic-gradient(rgba(255, 216, 77, .1) 0 9deg, transparent 9deg 18deg); }
.cu-text .cele-kicker { display: inline-block; width: auto; }
.cu-text { justify-items: center; }
@media (max-width: 640px) { .safari-root .hud-toast { bottom: 128px; } }

/* ===== 학과 짝 맞추기 ===== */
.s-match { display: grid; gap: 12px; }
.mt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.mt-head h3 { margin: 2px 0 0; font-family: var(--g-font); font-size: 24px; color: var(--g-brand); }
.mt-count { flex: none; font-family: var(--g-font); font-size: 18px; font-weight: 700; color: var(--g-accent); background: #fff; border-radius: 999px; padding: 5px 14px; }
.mt-board { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 12px; align-items: start; }
.mt-col { display: grid; gap: 10px; }
.mt-card { position: relative; border: 0; background: #fff; border-radius: 18px; padding: 12px 14px; min-height: 76px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; font-family: inherit; color: #16192a; transition: transform .15s, background .2s; }
@media (hover: hover) { .mt-card:hover:not(:disabled) { transform: translateY(-2px); } }
.mt-l img { width: 52px; height: 52px; object-fit: contain; flex: none; }
.mt-l .mt-ini { width: 46px; height: 46px; flex: none; border-radius: 14px; background: #e3efe9; color: var(--g-brand); display: grid; place-items: center; font-family: var(--g-font); font-size: 22px; font-weight: 700; }
.mt-l b { font-family: var(--g-font); font-size: 18px; color: var(--g-brand); word-break: keep-all; line-height: 1.3; }
.mt-r span { font-size: 16px; line-height: 1.45; word-break: keep-all; }
.mt-r em { position: absolute; right: 10px; top: -10px; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: var(--g-brand); border-radius: 999px; padding: 2px 9px; }
.mt-card.sel { background: #fff4dc; outline: 3px solid var(--g-accent); transform: scale(1.02); }
.mt-card.ok { background: #e2f5e9; cursor: default; animation: mt-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.mt-card.ok .mt-ok { width: 20px; height: 20px; color: #1f9a55; margin-left: auto; flex: none; }
.mt-card.no { background: #ffe3dc; animation: shake .45s ease; }
@keyframes mt-pop { 50% { transform: scale(1.06); } }
.mt-more { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mt-more span { background: #fff; border-radius: 12px; padding: 6px 12px; font-size: 15px; font-weight: 600; color: var(--g-brand); }
.mt-more .nm-k { background: transparent; padding: 0 4px 0 0; color: rgba(22, 25, 42, .55); }
@media (max-width: 640px) {
  .mt-board { gap: 8px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .mt-card { padding: 10px; min-height: 84px; border-radius: 14px; gap: 6px; }
  .mt-l { flex-direction: column; justify-content: center; text-align: center; }
  .mt-l img { width: 40px; height: 40px; }
  .mt-l b { font-size: 15px; }
  .mt-r span { font-size: 14px; }
  .mt-head h3 { font-size: 20px; }
}
.mt-card.sel { outline: 0; background: #ffe7c7; }
.mt-r em { display: none; }
.mt-card.mt-r.ok { animation: mt-slide .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes mt-slide { from { transform: translateX(-14px); opacity: .4; } }
.landmark-model img { width: var(--lw, 110px); }
/* 이름이 늘 보이는 장소 핀 */
.landmark-pin.named span { opacity: 1; top: 36px; background: rgba(22, 25, 42, .86); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.landmark-pin.named.found span { background: var(--g-brand); }
.landmark-pin.named.up span { top: auto; bottom: 36px; }
/* 이름표를 모형 아래에 다는 랜드마크(위쪽 장소 이름과 겹치지 않게) */
.landmark-model.below { transform: translate(-50%, -62%); }
.landmark-model.below .lm-name { order: 2; margin: 4px 0 0; }

/* ===== 계열 탐험: 줄 잇기 ===== */
.safari-root .hud-zoom { bottom: 24px; }
.ln-board { position: relative; display: grid; grid-template-columns: minmax(0, .85fr) 64px minmax(0, 1.15fr); align-items: start; user-select: none; -webkit-user-select: none; }
.ln-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.ln-svg path { fill: none; stroke-linecap: round; }
.ln-svg .ln-ok { stroke: #1f9a55; stroke-width: 5; }
.ln-svg .ln-temp { stroke: var(--g-accent); stroke-width: 5; stroke-dasharray: 2 10; }
.ln-svg .ln-temp.bad { stroke: #e5484d; stroke-dasharray: none; }
.ln-col { display: grid; gap: 10px; }
.ln-card { position: relative; border: 0; background: #fff; border-radius: 18px; padding: 12px 14px; min-height: 78px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: grab; font-family: inherit; color: #16192a; touch-action: none; transition: background .2s, transform .15s; }
.ln-card:disabled { cursor: default; }
.ln-l img { width: 50px; height: 50px; object-fit: contain; flex: none; }
.ln-l .mt-ini { width: 44px; height: 44px; flex: none; border-radius: 14px; background: #e3efe9; color: var(--g-brand); display: grid; place-items: center; font-family: var(--g-font); font-size: 21px; font-weight: 700; }
.ln-l b { font-family: var(--g-font); font-size: 18px; color: var(--g-brand); word-break: keep-all; line-height: 1.3; }
.ln-r span { font-size: 15px; line-height: 1.45; word-break: keep-all; }
/* 줄이 붙는 동그라미: 학과는 오른쪽 끝, 설명은 왼쪽 끝 */
.ln-dot { position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--g-accent); box-shadow: 0 0 0 4px #fff; }
.ln-l .ln-dot { right: -9px; }
.ln-r .ln-dot { left: -9px; }
.ln-card.ok { background: #e2f5e9; }
.ln-card.ok .ln-dot { background: #1f9a55; }
.ln-card.sel { background: #ffe7c7; transform: scale(1.02); }
.ln-card.no { background: #ffe3dc; animation: shake .45s ease; }
.ln-pop { position: fixed; z-index: 90; transform: translate(-50%, 0); font-family: var(--g-font); font-size: 26px; font-weight: 700; color: var(--g-accent); pointer-events: none; animation: ln-pop .9s ease-out forwards; }
@keyframes ln-pop { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.7); } 25% { opacity: 1; transform: translate(-50%, -14px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -46px); } }
@media (max-width: 640px) {
  .ln-board { grid-template-columns: minmax(0, .82fr) 40px minmax(0, 1.18fr); }
  .ln-card { padding: 10px; min-height: 86px; border-radius: 14px; gap: 6px; }
  .ln-l { flex-direction: column; justify-content: center; text-align: center; }
  .ln-l img { width: 38px; height: 38px; }
  .ln-l b { font-size: 14px; }
  .ln-r span { font-size: 13px; }
  .ln-dot { width: 16px; height: 16px; margin-top: -8px; }
  .ln-l .ln-dot { right: -8px; }
  .ln-r .ln-dot { left: -8px; }
}
@media (max-width: 640px) { .s-match .mt-head h3 { font-size: 18px; } }

/* 왼쪽 위 스탬프: 누르면 그 건물로 이동 */
.lv-st { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; transition: transform .15s; }
@media (hover: hover) { .lv-st:hover { transform: scale(1.08); } }
.lv-st.next .stamp-c { border: 2px solid #ffd43b; color: #ffd43b; animation: bump 1.4s ease-in-out infinite; }
.lv-st:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.safari-root .hud-score .lv-no { font-size: 14px; }
.lv-goal { font-size: 13px; opacity: .85; margin-top: 2px; }
.note-acts { display: grid; grid-template-columns: repeat(3, 1fr); }
.note-acts .btn { justify-content: center; }
.note-acts .btn-primary { grid-column: 1 / -1; }
@media (max-width: 520px) { .note-acts { grid-template-columns: 1fr; } }

/* 지도 끌어서 둘러보기 안내 */
.drag-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 22px; border-radius: 22px; background: rgba(16, 75, 58, .9); color: #fff; text-align: center; max-width: min(340px, calc(100vw - 40px)); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); transition: opacity .4s; }
.drag-hint.gone { opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.dh-hand { width: 54px; height: 54px; animation: dhSwipe 1.8s ease-in-out infinite; }
.dh-t b { display: block; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.dh-t span { font-size: 14px; opacity: .85; line-height: 1.4; }
@keyframes dhSwipe { 0%, 100% { transform: translate(-26px, 0) rotate(-8deg); } 50% { transform: translate(26px, 4px) rotate(6deg); } }
@media (pointer: coarse) { .dh-t span { display: none; } }

/* 왼쪽 위: Pre-Log로 나가기 / 오른쪽 위: 버튼 줄 아래에 장학금 도전 현황 */
.safari-root .hud-top-left { top: 14px; left: 14px; }
.safari-root .hud-score { top: 70px; right: 14px; left: auto; }
@media (max-width: 640px) {
  .safari-root .hud-top-left { top: 12px; left: 10px; }
  .safari-root .hud-top-left .hud-btn { height: 46px; }
  .safari-root .hud-top-right { flex-direction: row; }
  .safari-root .hud-score { top: 66px; right: 10px; left: auto; width: calc(100vw - 20px); }
}

/* 비밀 장소 보물상자 */
.landmark-model.scenery { cursor: default; pointer-events: none; }
.lm-chest { position: absolute; transform: translate(-50%, -80%); transform-origin: 0 0; scale: var(--ms, 1); z-index: 4; border: 0; padding: 0; background: none; cursor: pointer; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .35)); }
.lm-chest img { width: 58px; height: auto; display: block; pointer-events: none; animation: chestHop 2.4s ease-in-out infinite; }
@media (hover: hover) { .lm-chest:hover img { transform: scale(1.12); } }
.lm-chest.found img { width: 50px; animation: none; }
@keyframes chestHop { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-8px) rotate(-4deg); } 90% { transform: translateY(0) rotate(3deg); } }

/* 현황판: 계열탐험을 앞에, 스탬프를 같은 크기로 */
.lv-score .v.v2 { margin-left: 14px; }

/* 데모용 초기화 버튼(왼쪽 아래) */
.safari-root .hud-reset { left: 14px; bottom: 16px; top: auto; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; border-radius: 14px;
  background: rgba(22, 25, 42, .82); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
@media (hover: hover) { .safari-root .hud-reset:hover { background: #16192a; } }
.safari-root .hud-reset .icon { width: 17px; height: 17px; }
@media (max-width: 640px) { .safari-root .hud-reset { font-size: 12px; padding: 8px 10px; bottom: 14px; left: 10px; } }

/* 탐험 수첩: 진짜 수첩처럼(가죽 표지, 스프링, 줄 노트) */
.dialog.note { position: relative; background: #fffbf1; border: 10px solid #104B3A; border-radius: 22px 28px 28px 22px; padding-left: 34px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(16, 75, 58, .09) 31px 32px);
  box-shadow: 0 2px 0 6px #0c3a2d, 0 22px 50px rgba(0, 0, 0, .4); }
.dialog.note::before { content: ''; position: absolute; left: 4px; top: 18px; bottom: 18px; width: 22px; pointer-events: none;
  background: radial-gradient(circle at 11px 11px, #e9e4d6 0 5px, #8d8a80 5.5px 7px, transparent 7.5px) 0 0 / 22px 34px repeat-y; }
.dialog.note::after { content: ''; position: absolute; left: 30px; top: 0; bottom: 0; width: 2px; background: rgba(255, 99, 52, .35); pointer-events: none; }
.dialog.note .dialog-head { background: transparent; border-bottom: 2px dashed rgba(16, 75, 58, .2); }
.dialog.note .dialog-head h2 { display: inline-flex; align-items: center; gap: 8px; background: #fff; padding: 6px 16px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.dialog.note .dialog-body { background: transparent; }
.dialog.note .note-lv { background: #fff4c8; border-radius: 4px; box-shadow: 0 3px 8px rgba(0, 0, 0, .1); position: relative; }
.dialog.note .note-sec h3 { display: inline-block; border-bottom: 3px solid rgba(255, 99, 52, .45); padding-bottom: 2px; }
.dialog.note .note-stamps > div { background: #fff; border-radius: 10px; padding: 8px 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.dialog.note .bdg { background: #fff; }
.dialog.note .note-stats span { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
@media (max-width: 640px) { .dialog.note { border-width: 6px; padding-left: 26px; } .dialog.note::before { left: 2px; } .dialog.note::after { left: 22px; } }

/* 현황판 장학카드 버튼, 완주 빵파레 */
.lv-top { flex-wrap: wrap; }
.lv-card { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; padding: 4px 10px; background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
@media (hover: hover) { .lv-card:hover { background: rgba(255, 255, 255, .28); } }
.lv-card .icon { width: 15px; height: 15px; }
.celebrate.big .cele-card { width: min(460px, 100%); }
.cele-claps { display: flex; gap: 6px; justify-content: center; margin-bottom: -6px; }
.cele-claps .clap { width: 150px; height: auto; display: block; }
@keyframes clapBeat { from { transform: scale(.9) rotate(-8deg); } to { transform: scale(1.08) rotate(6deg); } }

/* 스탬프: 주황 고무도장 느낌(겹테두리, 잉크 번짐, 굵은 글씨) */
.stamp-c.on { border: 3px solid var(--g-accent); background: radial-gradient(circle, rgba(255, 99, 52, .1) 0 55%, rgba(255, 99, 52, .18) 100%); color: var(--g-accent);
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--g-accent); font-weight: 700; letter-spacing: .02em;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.4 2.25'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='90' height='90'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.4 2.25'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  -webkit-mask-size: 90px 90px; mask-size: 90px 90px; }
.stamp-c { position: relative; }
.stamp-c.on.lg::before, .stamp-c.on.map::before, .stamp-c.on.xl::before { content: '★ SNU ★'; position: absolute; top: 13%; left: 0; right: 0; text-align: center; font-size: .32em; letter-spacing: .14em; }
.stamp-c.on.lg::after, .stamp-c.on.map::after, .stamp-c.on.xl::after { content: 'CLEAR'; position: absolute; bottom: 13%; left: 0; right: 0; text-align: center; font-size: .32em; letter-spacing: .2em; }
.stamp-c.on.lg span, .stamp-c.on.map span, .stamp-c.on.xl span { font-size: 1.1em; }
.hud .stamp-c.on { background: #fff; box-shadow: inset 0 0 0 1.5px #fff, inset 0 0 0 3px var(--g-accent); }

/* 확대, 축소 버튼: 아이들 눈에 잘 띄게 크게 */
.safari-root .hud-zoom { gap: 10px; }
.safari-root .hud-zoom button { width: 60px; height: 60px; border-radius: 18px; font-size: 34px; font-weight: 700; color: var(--g-brand); background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .28); cursor: pointer; }
.safari-root .hud-zoom button:active { transform: scale(.94); }

/* 다음 건물: 테두리가 은은하게 빛나고, 화살표는 주황으로 반짝 */
.safari-root .bld-open.next { fill: rgba(255, 240, 220, .06); stroke: #ffc9ad; stroke-width: 4; filter: drop-shadow(0 0 4px rgba(255, 99, 52, .75)); animation: bldGlow 1.6s ease-in-out infinite; }
@keyframes bldGlow { 50% { stroke: #FF8a5c; filter: drop-shadow(0 0 7px rgba(255, 99, 52, .9)); } }
.next-arrow { filter: drop-shadow(0 0 8px rgba(255, 99, 52, .95)) drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.map-marker.below { transform: translate(-50%, 0); display: grid; justify-items: center; }
.map-marker.below .next-arrow { transform: rotate(180deg); animation: bobUp 1.1s ease-in-out infinite; }
.map-marker.below .bld-label { margin: 4px 0 0; }
@keyframes bobUp { 50% { translate: 0 -8px; } }

/* 수첩: 장학금 칸은 흰 바탕, 버튼은 주황 바탕 흰 글씨 */
.dialog.note .note-lv { background: #fff; }
.note-acts .note-btn { background: var(--g-accent); color: #fff; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; }
@media (hover: hover) { .note-acts .note-btn:hover { background: #e9542a; } }
.note-acts .note-btn .icon { width: 18px; height: 18px; }

/* 버스가 달릴 때 뒤로 바람이 슝슝 */
.w-wind { position: absolute; width: 90px; height: 70px; pointer-events: none; transform: translate(70px, -66px); opacity: 0; transition: opacity .2s; transform-origin: 0 0; scale: var(--ms, 1); }
.walkers.walking .w-wind { opacity: 1; }
.walkers.right .w-wind { transform: translate(-70px, -66px) scaleX(-1); }
.w-wind i { position: absolute; left: 0; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .95); box-shadow: 0 0 6px rgba(255, 255, 255, .8); animation: windLine .5s linear infinite; }
.w-wind i:nth-child(1) { top: 14px; width: 56px; }
.w-wind i:nth-child(2) { top: 32px; width: 74px; animation-delay: .17s; }
.w-wind i:nth-child(3) { top: 50px; width: 48px; animation-delay: .33s; }
.w-wind b { position: absolute; left: 4px; bottom: 0; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .85); animation: windPuff .6s ease-out infinite; }
.w-wind b:nth-of-type(2) { left: 18px; bottom: 6px; width: 16px; height: 16px; animation-delay: .3s; }
@keyframes windLine { 0% { transform: translateX(-10px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateX(60px); opacity: 0; } }
@keyframes windPuff { 0% { transform: translate(0, 0) scale(.4); opacity: .9; } 100% { transform: translate(46px, -6px) scale(1.4); opacity: 0; } }

/* 데모 버튼 묶음(왼쪽 아래) */
.safari-root .hud-demo { left: 14px; bottom: 16px; display: grid; gap: 8px; justify-items: start; }
.safari-root .hud-demo .hud-reset { position: static; }
@media (max-width: 640px) { .safari-root .hud-demo { left: 10px; bottom: 14px; gap: 6px; } }

/* 탐험 완료 연출: 스탬프가 꽝꽝 찍히고, 금화가 카드로 날아가 2,000원 */
.dd-back { position: fixed; inset: 0; z-index: 1150; background: rgba(8, 30, 23, .72); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.dd { position: relative; width: min(560px, 100%); background: #fff; border-radius: 32px; padding: 30px 24px 24px; display: grid; justify-items: center; gap: 14px; text-align: center; overflow: hidden; animation: pop-card .45s cubic-bezier(.2, 1.5, .4, 1); }
.dd::before { content: ''; position: absolute; inset: -50%; background: repeating-conic-gradient(rgba(255, 99, 52, .07) 0 12deg, transparent 12deg 24deg); animation: spin 16s linear infinite; }
.dd > * { position: relative; }
.dd-kicker { font-size: 13px; letter-spacing: .14em; font-weight: 700; color: var(--g-accent); }
.dd h2 { margin: 0; font-family: var(--g-font); font-size: 30px; color: var(--g-brand); }
.dd-stamps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dd-st { display: inline-block; opacity: 0; transform: scale(2.6) rotate(-20deg); }
.dd-st.on { animation: ddSlam .38s cubic-bezier(.5, 0, .75, 1.4) forwards; }
@keyframes ddSlam { 0% { opacity: 0; transform: scale(2.6) rotate(-20deg); } 70% { opacity: 1; transform: scale(.9) rotate(calc(-10deg + var(--i) * 3deg)); } 100% { opacity: 1; transform: scale(1) rotate(calc(-10deg + var(--i) * 3deg)); } }
.dd-st .stamp-c.lg { width: 62px; height: 62px; font-size: 15px; }
.dd-card { position: relative; width: min(300px, 80%); opacity: 0; transform: translateY(30px) scale(.9); transition: opacity .4s, transform .5s cubic-bezier(.2, 1.4, .4, 1); }
.dd.card-in, .card-in .dd-card { }
.card-in .dd-card { opacity: 1; transform: none; }
.dd-card img { width: 100%; display: block; filter: drop-shadow(0 12px 20px rgba(16, 75, 58, .3)); }
.dd-amt { position: absolute; right: 12%; bottom: 20%; font-family: var(--g-font); font-size: 30px; font-weight: 700; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.won .dd-amt { color: #ffd84d; animation: bump .6s ease; }
.dd-msg { margin: 0; font-size: 17px; color: #4b5a54; opacity: 0; transition: opacity .4s; }
.won .dd-msg { opacity: 1; }
.dd-msg b { color: var(--g-accent); }
.dd-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; opacity: 0; transition: opacity .4s .2s; pointer-events: none; }
.won .dd-acts { opacity: 1; pointer-events: auto; }
.dd-acts .k-btn { display: inline-flex; align-items: center; gap: 6px; }
.dd-acts .icon { width: 18px; height: 18px; }
.dd-coin { position: fixed; z-index: 1200; width: 44px; height: 44px; pointer-events: none; transition: left .6s cubic-bezier(.4, -0.3, .6, 1), top .6s cubic-bezier(.4, -0.3, .6, 1), opacity .6s, transform .6s; }

/* 나의 적성 나침반: 지도 슬라이드, 밸런스 게임, 결과, 학부모 비교 */
.s-apt { display: grid; gap: 14px; }
.s-apt h3 { margin: 0; font-family: var(--g-font); font-size: 25px; line-height: 1.4; color: var(--g-brand); }
.apt-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 10px; }
.apt-vs { align-self: center; font-family: var(--g-font); font-size: 20px; font-weight: 700; color: var(--g-accent); }
.apt-opt { position: relative; display: grid; align-content: start; gap: 10px; text-align: left; border: 0; background: #fff; border-radius: 22px; padding: 18px 16px 20px; min-height: 150px; cursor: pointer; color: var(--g-ink); font-size: 19px; font-weight: 600; line-height: 1.45; box-shadow: 0 4px 0 #dfe6e3; transition: transform .12s, background .15s, box-shadow .12s; }
@media (hover: hover) { .apt-opt:hover:not(:disabled) { transform: translateY(-3px); background: #fffaf7; } }
.apt-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #dfe6e3; }
.apt-opt:disabled { cursor: default; }
.apt-opt.on { background: var(--g-accent-soft); box-shadow: 0 4px 0 #ffc7b4; }
.apt-opt.pop { animation: apt-pop .35s ease; }
@keyframes apt-pop { 40% { transform: scale(1.05); } }
.apt-ab { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--g-soft); color: var(--g-brand); font-family: var(--g-font); font-weight: 700; }
.apt-opt.on .apt-ab { background: var(--g-accent); color: #fff; }
.apt-ck { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--g-accent); color: #fff; display: grid; place-items: center; }
.apt-ck svg { width: 18px; height: 18px; }
.apt-hearts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.apt-heart { display: grid; justify-items: center; gap: 8px; border: 0; background: #fff; border-radius: 20px; padding: 18px 8px; cursor: pointer; font-size: 17px; color: var(--g-ink); box-shadow: 0 4px 0 #dfe6e3; transition: transform .12s, background .15s; }
@media (hover: hover) { .apt-heart:hover:not(:disabled) { transform: translateY(-3px); } }
.apt-heart.on { background: var(--g-accent-soft); box-shadow: 0 4px 0 #ffc7b4; }
.apt-heart .hs { display: flex; gap: 2px; }
.apt-heart svg { width: 26px; height: 26px; fill: #e2e8e5; }
.apt-heart svg.f { fill: var(--g-accent); }
.apt-heart b { font-weight: 700; }

.apt-game { position: fixed; inset: 0; z-index: 900; background: rgba(8, 30, 23, .6); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.apt-card { position: relative; width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--g-sky); border-radius: 28px; padding: 22px 22px 26px; display: grid; gap: 14px; }
.apt-card h2 { margin: 0; font-family: var(--g-font); font-size: 26px; line-height: 1.35; color: var(--g-brand); }
.apt-card.intro { justify-items: center; text-align: center; padding-top: 30px; }
.apt-card.intro p { margin: 0; font-size: 17px; line-height: 1.6; }
.apt-mascot { width: 130px; height: auto; }
.apt-k { font-size: 14px; font-weight: 700; color: var(--g-accent); letter-spacing: .02em; }
.apt-top { display: flex; align-items: center; gap: 10px; }
.apt-steps { flex: 1; display: flex; gap: 4px; }
.apt-steps i { flex: 1; height: 8px; border-radius: 4px; background: #dfe6e3; }
.apt-steps i.done { background: var(--g-brand-2); }
.apt-steps i.on { background: var(--g-accent); }
.apt-n { font-size: 14px; font-weight: 700; color: var(--g-brand); min-width: 46px; text-align: right; }
.apt-back, .apt-x { width: 40px; height: 40px; border: 0; border-radius: 12px; background: #fff; color: var(--g-brand); display: grid; place-items: center; cursor: pointer; }
.apt-back:disabled { opacity: .35; cursor: default; }
.apt-card.intro .apt-x { position: absolute; top: 16px; right: 16px; }
.apt-timer { position: relative; height: 30px; border-radius: 15px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.apt-timer i { position: absolute; inset: 0 auto 0 0; width: 100%; background: #ffd9cc; transform-origin: left; animation: apt-time 5s linear forwards; }
.apt-timer span { position: relative; font-size: 14px; font-weight: 700; color: var(--g-accent); }
.apt-timer.over i { background: var(--g-soft); }
.apt-timer.over span { color: var(--g-brand); }
@keyframes apt-time { to { transform: scaleX(0); } }
.apt-hint { margin: 0; font-size: 14px; color: #5f706a; text-align: center; }
.apt-card.needle { justify-items: center; text-align: center; padding: 30px 22px; }
.apt-compass svg { width: 230px; height: 230px; }
.apt-ndl { transform-origin: 110px 110px; }

.apt-result { display: grid; gap: 16px; }
.apt-hero { background: var(--g-brand); color: #fff; border-radius: 22px; padding: 20px 22px; display: grid; gap: 6px; }
.apt-hero .apt-k { color: #ffb59c; }
.apt-hero h3 { margin: 0; font-family: var(--g-font); font-size: 28px; line-height: 1.3; }
.apt-hero p { margin: 0; font-size: 17px; line-height: 1.5; opacity: .92; }
.apt-sub { font-size: 14px; opacity: .8; }
.apt-chart { display: grid; justify-items: center; gap: 6px; }
.apt-radar { width: min(300px, 100%); height: auto; overflow: visible; }
.apt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 14px; font-weight: 600; color: var(--g-ink); }
.apt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.apt-legend i { width: 14px; height: 14px; border-radius: 4px; }
.apt-change { display: flex; align-items: center; gap: 10px; background: var(--g-accent-soft); border-radius: 16px; padding: 12px 14px; font-size: 16px; }
.apt-change svg { flex: none; width: 22px; height: 22px; color: var(--g-accent); }
.apt-fields { display: grid; gap: 8px; }
.apt-fields.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.apt-fields.two > div { display: grid; gap: 8px; align-content: start; }
.apt-fk { font-size: 14px; font-weight: 700; color: #5f706a; }
.apt-field { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px 14px; }
.apt-field > div { display: grid; gap: 2px; min-width: 0; }
.apt-field b { font-size: 18px; color: var(--g-brand); }
.apt-field span:not(.apt-rank) { font-size: 14px; color: #5f706a; line-height: 1.45; }
.apt-field .stamp, .apt-field svg { flex: none; }
.apt-rank { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--g-accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.apt-rank.p { background: var(--g-brand); }
.apt-field.sm { padding: 8px 12px; }
.apt-field.sm b { font-size: 16px; }
.apt-note { margin: 0; font-size: 13px; color: #5f706a; line-height: 1.5; }
.apt-dialog .dialog-body { background: var(--g-sky); }

/* 포스트로그 재검사 카드 */
.apt-start { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: center; background: var(--g-sky); border-radius: 20px; padding: 16px; }
.apt-start > div:last-child { display: grid; gap: 8px; justify-items: start; }
.apt-start b { font-size: 18px; color: var(--g-brand); }
.apt-start span { font-size: 15px; color: #5f706a; line-height: 1.5; }
.apt-mini .apt-radar { width: 200px; }
.apt-inline { margin-bottom: 12px; }
.apt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.apt-chip { display: inline-grid; gap: 1px; justify-items: start; border: 0; border-radius: 14px; padding: 9px 14px; background: var(--g-sky); color: var(--g-ink); font-size: 16px; font-weight: 600; cursor: pointer; text-align: left; }
.apt-chip small { font-size: 12px; font-weight: 500; color: #5f706a; }
.apt-chip.on { background: var(--g-brand); color: #fff; }
.apt-chip.on small { color: #cfe3da; }
.apt-chip:disabled { cursor: default; }

/* 학부모 비교 */
.pa-box.apt-pa-intro { display: flex; gap: 18px; align-items: center; }
.apt-pa-intro img { width: 92px; height: auto; flex: none; }
.apt-pa-intro > div { display: grid; gap: 8px; justify-items: start; }
.apt-pa-intro b { font-size: 18px; color: var(--g-brand); }
.apt-pa-intro span { font-size: 15px; line-height: 1.6; color: #5f706a; }
.apt-pa { display: grid; gap: 18px; }
.apt-agree { display: flex; gap: 16px; align-items: center; background: var(--g-soft); border-radius: 18px; padding: 14px 18px; }
.apt-agree .n { font-family: var(--g-font); font-size: 44px; font-weight: 700; color: var(--g-brand); line-height: 1; }
.apt-agree .n small { font-size: 22px; }
.apt-agree > div:last-child { display: grid; gap: 4px; }
.apt-agree b { font-size: 17px; color: var(--g-brand); }
.apt-agree span { font-size: 14px; color: #3f544d; line-height: 1.5; }
.apt-cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.apt-cmp-side { display: grid; gap: 10px; }
.apt-who { display: grid; gap: 4px; background: var(--g-accent-soft); border-radius: 16px; padding: 14px 16px; }
.apt-who.p { background: var(--g-soft); }
.apt-who .k { font-size: 13px; font-weight: 700; color: var(--g-accent); }
.apt-who.p .k { color: var(--g-brand); }
.apt-who b { font-size: 18px; color: var(--g-ink); }
.apt-who span:last-child { font-size: 14px; color: #5f706a; line-height: 1.5; }
.apt-diff { display: grid; gap: 8px; }
.apt-drow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.apt-drow span { background: var(--g-sky); border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.5; display: grid; gap: 2px; }
.apt-drow em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--g-accent); }
.apt-drow span:last-child em { color: var(--g-brand); }
.apt-picks { font-size: 14px; color: #3f544d; padding: 4px 2px; }
@media (max-width: 640px) {
  .apt-pair { grid-template-columns: 1fr; }
  .apt-vs { justify-self: center; }
  .apt-opt { min-height: 0; }
  .apt-start, .apt-cmp { grid-template-columns: 1fr; }
  .apt-start .apt-mini { justify-self: center; }
  .apt-drow { grid-template-columns: 1fr; }
  .apt-card h2 { font-size: 22px; }
}
/* 포스트로그 밸런스 게임: 진한 무대 + 색 카드 + 직감 콤보 */
.apt-card.fun { background: var(--g-brand); color: #fff; }
.apt-card.fun h2 { color: #fff; font-size: 30px; }
.apt-card.fun .apt-k { color: #ffb59c; }
.apt-card.fun .apt-n { color: #fff; }
.apt-card.fun .apt-steps i { background: rgba(255, 255, 255, .18); }
.apt-card.fun .apt-steps i.done { background: #7fd1ae; }
.apt-card.fun .apt-back, .apt-card.fun .apt-x { background: rgba(255, 255, 255, .12); color: #fff; }
.apt-card.fun .apt-hint { color: rgba(255, 255, 255, .7); }
.apt-card.fun .apt-timer { background: rgba(255, 255, 255, .12); }
.apt-card.fun .apt-timer i { background: #ff8a65; }
.apt-card.fun .apt-timer span { color: #fff; }
.apt-card.fun .apt-opt { min-height: 190px; font-size: 21px; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
.apt-card.fun .apt-opt[data-apt="a"] { background: #ffe8e0; }
.apt-card.fun .apt-opt[data-apt="b"] { background: #e2efe9; }
.apt-card.fun .apt-opt.on { background: var(--g-accent); color: #fff; }
.apt-card.fun .apt-opt.on .apt-ab { background: #fff; color: var(--g-accent); }
.apt-card.fun .apt-opt.on .apt-ck { background: #fff; color: var(--g-accent); }
.apt-card.fun .apt-vs { width: 54px; height: 54px; border-radius: 50%; background: var(--g-accent); color: #fff; display: grid; place-items: center; font-size: 18px; box-shadow: 0 0 0 6px rgba(255, 99, 52, .25); animation: apt-vs 1.2s ease-in-out infinite; }
@keyframes apt-vs { 50% { transform: scale(1.12); } }
.apt-combo { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); background: #ffd84d; color: var(--g-brand); font-family: var(--g-font); font-size: 30px; font-weight: 700; padding: 10px 24px; border-radius: 18px; pointer-events: none; animation: apt-combo .65s ease forwards; }
@keyframes apt-combo { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 35% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }
.apt-inline .apt-field, .pa-box .apt-field { background: var(--g-sky); }
@media (max-width: 640px) { .pa-box.apt-pa-intro { flex-direction: column; align-items: flex-start; } }
/* 결과: 캠프 전 | 캠프 후 나란히 */
.apt-ba { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.apt-col { display: grid; gap: 12px; align-content: start; border-radius: 22px; padding: 16px; }
.apt-col.before { background: #eef1f0; }
.apt-col.before .apt-k { color: #6b7a75; }
.apt-col.after { background: var(--g-accent-soft); }
.apt-col .apt-k { font-size: 16px; }
.apt-col .apt-radar { width: min(240px, 100%); }
.apt-ttl { display: grid; gap: 2px; }
.apt-ttl span { font-size: 13px; font-weight: 600; color: #5f706a; }
.apt-ttl b { font-size: 20px; color: var(--g-ink); }
.apt-col .apt-field { background: #fff; padding: 8px 12px; }
.apt-col .apt-field b { font-size: 16px; }
.apt-col.before .apt-rank { background: #9aa7a2; }
.apt-explain { background: var(--g-soft); border-radius: 18px; padding: 14px 18px; display: grid; gap: 6px; }
.apt-explain ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.apt-explain li { font-size: 16px; line-height: 1.55; color: var(--g-ink); }
.apt-explain b { color: var(--g-brand); }
.apt-how { margin: -2px 0 2px; font-size: 14px; color: #5f706a; }
.apt-ok { display: flex; justify-content: center; padding-top: 6px; }
.apt-ok .k-btn { min-width: 200px; }
@media (max-width: 640px) { .apt-ba { grid-template-columns: 1fr; } }
.apt-majors { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.apt-majors i { font-style: normal; font-size: 12.5px; font-weight: 500; color: #3f544d; background: #fff; border-radius: 8px; padding: 3px 8px; }
.apt-field .apt-majors i { background: var(--g-soft); }
/* 적성 유형 아이콘 */
.apt-ic { display: block; flex: none; object-fit: contain; }
.apt-ic.hero { width: 132px; height: 132px; background: #fff; border-radius: 50%; padding: 10px; }
.apt-ic.md { width: 64px; height: 64px; }
.apt-ic.xs { display: inline-block; width: 26px; height: 26px; vertical-align: middle; margin: 0 4px 0 2px; background: #fff; border-radius: 50%; padding: 2px; }
.apt-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.apt-hero-t { display: grid; gap: 6px; min-width: 0; }
.apt-ttl { display: flex !important; align-items: center; gap: 12px; }
.apt-ttl > div { display: grid; gap: 2px; }
.apt-who { display: flex !important; align-items: center; gap: 14px; }
.apt-who > div { display: grid; gap: 4px; }
@media (max-width: 640px) { .apt-ic.hero { width: 96px; height: 96px; } }
/* 계열 목록: 스탬프 없이 계열명을 크게 */
.apt-field b { font-size: 23px; letter-spacing: -.01em; }
.apt-field.sm b, .apt-col .apt-field b { font-size: 21px; }
.apt-field .apt-rank { width: 34px; height: 34px; font-size: 17px; }
/* 포스트로그: 적성 나침반 재검사 완료(결과는 리포트에서) */
.apt-done { display: flex; align-items: center; gap: 16px; background: var(--g-soft); border-radius: 20px; padding: 18px 20px; }
.apt-done img { width: 72px; height: auto; flex: none; }
.apt-done > div { display: grid; gap: 4px; }
.apt-done b { font-size: 19px; color: var(--g-brand); }
.apt-done span { font-size: 15px; color: #3f544d; line-height: 1.55; }
.apt-start.one { grid-template-columns: 1fr; }
/* 원 안의 유형 아이콘이 가장자리에서 잘려 보이지 않게(원 안쪽 정사각형에 들어가도록 여백) */
.apt-ic.hero { width: 140px; height: 140px; padding: 24px; box-sizing: border-box; }
.apt-ic.xs { width: 30px; height: 30px; padding: 5px; box-sizing: border-box; }
@media (max-width: 640px) { .apt-ic.hero { width: 104px; height: 104px; padding: 18px; } }
