:root { --ink: #fffaf3; --soft: rgba(255, 250, 243, .75); --card: rgba(24, 14, 52, .72); --pink: #ff8fc4; --gold: #ffd84d; --mint: #7cf0c8; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #140d2e; color: var(--ink); font-family: 'Gowun Dodum', sans-serif; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
/* 휴대폰: 길게 누르거나 여러 손가락으로 눌러도 화면이 파랗게 선택되지 않게 (글 쓰는 칸만 선택 가능) */
input, textarea { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; transition: filter 1.2s; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; font-size: 16px; padding: 10px 14px; border-radius: 999px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: var(--ink); outline: none; min-width: 0; }
input:focus { border-color: var(--pink); }
input::placeholder { color: rgba(255,255,255,.5); }

#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .6s; z-index: 5; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(10, 4, 30, .45) 100%); z-index: 1; }

/* ---------- 화면 카드 ---------- */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; background: radial-gradient(ellipse at center, rgba(20,8,50,.15), rgba(20,8,50,.55)); overflow-y: auto; }
.card { width: min(460px, 100%); background: var(--card); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.18); border-radius: 28px; padding: 26px 24px; box-shadow: 0 24px 60px rgba(0,0,0,.4); text-align: center; max-height: calc(100vh - 32px); overflow-y: auto; }
.card.wide { width: min(1040px, 100%); }
/* 게임 패널(처음 · 방 찾기 · 방 · 순위표 · 결과)은 모두 같은 넓이: 큰 화면은 넓게, 작은 화면은 화면 폭에 맞게 */
#title > .card { width: min(1040px, 100%); }
/* 처음 화면: 로그인 · 캐릭터 고르기는 메인 화면에서 하니 여기선 숨긴다 (메인 화면의 대표 캐릭터로 한다) */
#title #login-box, #title #who-row, #title #acct-nick, #title #chars-label, #title #chars { display: none !important; }
.t-cols, .t-left, .t-right { display: contents; }
@media (min-width: 860px) {
  #title > .card { padding: 30px 44px; }
  #title .picks, #title #title-opts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 14px; margin-top: 16px; }
  #title .picks .seg, #title #title-opts > * { margin: 0; }
  #title #play-btns { margin-top: 24px; gap: 14px; }
  #title .code-row { width: min(640px, 100%); margin: 14px auto 0; }
  #title .row2 { margin-top: 18px; }
}
.logo { font-family: 'Jua', sans-serif; font-size: clamp(40px, 9vw, 58px); text-shadow: 0 0 24px rgba(255,170,230,.7), 0 4px 0 rgba(0,0,0,.25); }
h2 { font-family: 'Jua', sans-serif; font-size: 30px; margin: 0 0 6px; }
h3 { font-family: 'Jua', sans-serif; font-size: 20px; margin: 18px 0 8px; }
.sub { color: var(--soft); margin: 6px 0 16px; line-height: 1.5; }
/* 난이도 변경 공지 (1주일만): 빨간 칸 */
.note { color: var(--soft); font-size: 13px; margin-top: 10px; }
.btn { font-family: 'Jua', sans-serif; font-size: 17px; padding: 11px 20px; border-radius: 999px; border: 0; background: #fff; color: #2b1d5c; box-shadow: 0 4px 0 rgba(0,0,0,.2); transition: transform .12s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.btn.big { font-size: 20px; padding: 14px 22px; }
.btn.alt { background: linear-gradient(135deg, #ff8fc4, #b388ff); color: #fff; }
.btn.ghost { background: rgba(255,255,255,.14); color: var(--ink); box-shadow: none; border: 1px solid rgba(255,255,255,.25); }
.btn small { display: block; font-family: 'Gowun Dodum'; font-size: 12px; opacity: .8; }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.mini { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: var(--soft); }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.row { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.row input { flex: 1 1 140px; }
.row2 { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.link { color: var(--soft); text-decoration: none; font-size: 15px; }
.keys { margin-top: 14px; font-size: 12px; color: rgba(255,255,255,.55); line-height: 1.6; }
#err { color: #ff8a80; margin-top: 10px; min-height: 18px; font-size: 14px; }
#login-box { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; }
#g-btn { min-height: 44px; }
#dev-box { display: flex; gap: 6px; }
.who { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 14px 0 6px; color: var(--soft); }
.label { font-family: 'Jua', sans-serif; margin: 8px 0; }
#chars { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 2px solid transparent; color: var(--ink); font-size: 15px; }
.chip.on { border-color: var(--gold); background: rgba(255,216,77,.16); }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); flex: none; }
#nick-row { margin-top: 10px; }
#nick-row input { width: 100%; text-align: center; }

/* ---------- 방 ---------- */
#rooms { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; min-height: 80px; }
.room { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.08); text-align: left; }
.room .nm { flex: 1; font-family: 'Jua', sans-serif; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .meta { color: var(--soft); font-size: 13px; }
.room .tag { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(124,240,200,.2); color: var(--mint); }
.room .tag.run { background: rgba(255,143,196,.2); color: var(--pink); }
.empty { color: var(--soft); padding: 18px; }
#members { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 14px 0; }
.mem { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.1); font-size: 15px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mem.me { outline: 2px solid var(--gold); }
.mem.slot { background: rgba(255,255,255,.04); color: rgba(255,255,255,.3); justify-content: center; }

/* ---------- 순위표 ---------- */
#my-stats { margin: 8px 0 10px; text-align: left; } #my-stats small { display: block; font-size: 11px; opacity: .72; font-weight: normal; }
.ms-top { display: flex; gap: 8px; margin-bottom: 6px; } .ms-top div { flex: 1; padding: 7px 12px; border-radius: 12px; background: rgba(255,255,255,.1); } .ms-top b { font-size: 20px; }
.ms-row { display: grid; grid-template-columns: 1fr 1.1fr 1.5fr 1.5fr; gap: 6px; align-items: center; padding: 4px 10px; font-size: 14px; border-radius: 8px; } .ms-row:nth-child(odd) { background: rgba(255,255,255,.06); } .ms-head { font-size: 12px; opacity: .75; background: none !important; }
.ms-row > span:first-child { white-space: nowrap; }
@media (max-width: 480px) { .ms-row { grid-template-columns: 1.25fr 1fr 1.4fr 1.4fr; font-size: 12px; padding: 4px 6px; gap: 4px; } }
.ms-die { margin-top: 10px; } .ms-die-h { font-size: 13px; font-weight: 700; margin: 0 0 6px 4px; opacity: .9; } .ms-die-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .ms-die-col > small { display: block; opacity: .7; margin: 0 0 4px 4px; }
.ms-die-row { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 3px 8px; margin-bottom: 3px; font-size: 13px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; } .ms-die-row > i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,140,170,.22); z-index: 0; } .ms-die-row > span, .ms-die-row > b { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ms-die-row > b { font-size: 12px; }
.board { display: flex; flex-direction: column; gap: 4px; text-align: left; max-height: 340px; overflow-y: auto; }
.brow { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.06); font-size: 15px; }
.brow .rk { font-family: 'Jua', sans-serif; text-align: center; }
.brow .nm { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brow .nm-t { display: flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap; } /* 이름은 제자리(세로 가운데) */
.brow .md { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } /* 메달은 이름 오른쪽에서만, 넘치면 다음 줄로 */
.brow .md:empty { display: none; }
.brow .md > * { white-space: nowrap; }
.brow .md > .fire { margin: 0 9px; } /* 불꽃(🔥)이 옆 메달 · 점수 위로 넘치지 않게 */
@media (max-width: 560px) { .brow .nm { flex-wrap: wrap; gap: 6px; } .brow .md { flex-basis: 100%; } .brow .md > * { font-size: 11px; } } /* 좁은 화면: 이름 줄은 비워 두고 메달은 그 아래 줄부터 */
.brow .sc { font-family: 'Jua', sans-serif; font-size: 17px; position: relative; z-index: 1; } /* 특이점 1위 불길보다 앞에 */
.brow .sc small { font-family: 'Gowun Dodum'; color: var(--soft); font-size: 12px; margin-left: 6px; }
.brow.me { background: rgba(255,216,77,.22); outline: 1px solid var(--gold); }
.brow.gap { background: transparent; justify-content: center; display: block; text-align: center; color: var(--soft); padding: 2px; }
.guest { font-size: 11px; color: var(--soft); }

/* ---------- 탈락 ---------- */
#ov-why { font-family: 'Jua', sans-serif; font-size: 22px; color: #ffb4d0; }
#ov-score { font-family: 'Jua', sans-serif; font-size: 64px; line-height: 1.1; margin: 4px 0; text-shadow: 0 0 22px rgba(255,216,77,.6); }
#ov-best { font-family: 'Jua', sans-serif; color: var(--gold); min-height: 24px; }
#ov-detail { color: var(--soft); margin-top: 4px; }
#ov-room { margin-top: 14px; }

/* ---------- 달리는 화면 ---------- */
#hud { position: fixed; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 16px; z-index: 3; pointer-events: none; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
#h-score { font-family: 'Jua', sans-serif; font-size: 42px; line-height: 1; }
#h-sub { font-size: 15px; color: var(--soft); margin-top: 4px; }
.hud-c { text-align: center; position: absolute; left: 50%; transform: translateX(-50%); top: 14px; }
#h-dream { font-family: 'Jua', sans-serif; font-size: 18px; background: rgba(20,8,50,.4); padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
#h-next { width: 140px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.2); margin: 6px auto 0; overflow: hidden; }
#h-next i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff8fc4, #ffd84d); }
.hud-r { display: flex; gap: 8px; align-items: center; pointer-events: auto; }
.hud-r button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(20,8,50,.45); color: #fff; font-size: 18px; }
#h-alive { font-family: 'Jua', sans-serif; background: rgba(20,8,50,.45); padding: 8px 12px; border-radius: 999px; }
#dream-card { position: fixed; left: 50%; top: 26%; transform: translate(-50%, -50%); text-align: center; z-index: 4; pointer-events: none; animation: card 3.2s ease forwards; text-shadow: 0 4px 18px rgba(0,0,0,.5); }
#dream-card .dc-n { font-family: 'Jua', sans-serif; font-size: 18px; letter-spacing: 4px; color: var(--soft); }
#dream-card .dc-e { font-size: 64px; line-height: 1.1; }
#dream-card .dc-name { font-family: 'Jua', sans-serif; font-size: clamp(34px, 7vw, 54px); }
#dream-card .dc-tip { font-family: 'Jua', sans-serif; font-size: clamp(16px, 3.4vw, 22px); color: #fff59d; margin-top: 4px; } #dream-card .dc-tip:empty { display: none; }
@keyframes card { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.9); filter: blur(8px); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -58%); filter: blur(6px); } }
#countdown { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Jua', sans-serif; font-size: 140px; z-index: 6; pointer-events: none; text-shadow: 0 0 40px rgba(255,170,230,.9), 0 6px 0 rgba(0,0,0,.25); }
#countdown.pop { animation: pop .9s ease; }
@keyframes pop { 0% { transform: scale(1.6); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 100% { transform: scale(.85); opacity: .2; } }
#toast { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); font-family: 'Jua', sans-serif; font-size: 22px; padding: 10px 18px; border-radius: 999px; background: rgba(20,8,50,.85); z-index: 20; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
#spectate { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: rgba(20,8,50,.6); z-index: 6; font-family: 'Jua', sans-serif; }

/* 휴대폰 버튼 */
#touch { position: fixed; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 16px; z-index: 4; pointer-events: none; }
#touch > div { display: flex; gap: 12px; align-items: flex-end; pointer-events: auto; touch-action: none; }
#touch button { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); background: rgba(20,8,50,.4); color: #fff; font-size: 26px; touch-action: none; }
#touch button.big { width: 80px; height: 80px; }
#touch button svg { display: block; margin: auto; pointer-events: none; }
/* 점프(위) · 숙이기(아래): 가로로 넓은 알약 두 개를 같은 폭 · 같은 좌우 끝으로 쌓는다 (엄지로 위아래만 오가면 되게). 화면이 좁으면 조이스틱을 피해 줄인다 */
#touch .t-r { flex-direction: column; align-items: flex-end; gap: 12px; }
#touch .t-x { display: flex; gap: 12px; }
#touch .t-js { display: flex; flex-direction: column; gap: 14px; }
#touch .t-js button.big { width: min(200px, calc(100vw - 32px - 168px - 16px)); height: 150px; border-radius: 75px; }
/* 조이스틱: 점프 · 숙이기 두 버튼을 합친 높이(150 × 2 + 14)의 가운데에 */
#touch .t-l { padding-bottom: calc((150px * 2 + 14px - 168px) / 2); }
/* 조이스틱: 큰 원 안에서 작은 원이 사방으로 움직이지만, 게임에는 좌우만 들어간다 */
#joy { position: relative; width: 168px; height: 168px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); background: radial-gradient(circle, rgba(255,255,255,.08) 0 30%, rgba(20,8,50,.45) 31%); touch-action: none; display: flex; align-items: center; justify-content: center; }
#joy::before, #joy::after { content: '◀'; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,.5); font-size: 15px; pointer-events: none; }
#joy::after { content: '▶'; left: auto; right: 10px; }
#joy-knob { width: 74px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: 0 3px 10px rgba(0,0,0,.35); transition: transform .08s; pointer-events: none; }
#joy.on #joy-knob { background: #fff; transition: none; }
@media (max-width: 520px) { .btns { grid-template-columns: 1fr; } #h-score { font-size: 32px; } #h-dream { font-size: 14px; } .hud-c { top: 84px; } }

/* 초대 코드 */
.code-row { margin-top: 12px; }
.code-row input, #code-in2 { text-transform: uppercase; letter-spacing: 4px; text-align: center; font-family: 'Jua', sans-serif; }
.btns.one { grid-template-columns: 1fr; }
#room-code { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
#room-code span { color: var(--soft); }
#code-txt { font-family: 'Jua', sans-serif; font-size: 30px; letter-spacing: 6px; color: var(--gold); }
#ov-save { margin-top: 14px; padding: 12px; border-radius: 18px; background: rgba(255,216,77,.12); }
#ov-save .sub { margin: 0 0 8px; }
.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,143,196,.35); } }

/* 가속 */
#h-speed { transition: color .2s; }
#h-speed.on { color: #ffd84d; font-weight: bold; }
#speedlines { position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .15s;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,0) 0deg 5deg, rgba(255,255,255,.22) 5deg 5.5deg);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 38%, #000 80%); mask-image: radial-gradient(ellipse at center, transparent 38%, #000 80%); }
/* 시작할 때 조작법 (가운데 흐리게 떴다가 사라짐) */
#howto { position: fixed; left: 50%; bottom: 5%; transform: translateX(-50%); z-index: 5; pointer-events: none; opacity: 0;
  display: grid; gap: 6px; padding: 14px 20px; border-radius: 20px; background: rgba(20,8,50,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  font-family: 'Jua', sans-serif; font-size: 17px; text-shadow: 0 2px 6px rgba(0,0,0,.4); white-space: nowrap; }
#howto.show { animation: howto 1s ease forwards; }
@keyframes howto { 0% { opacity: 0; } 100% { opacity: .85; } }
/* 몇 초 뒤엔 왼쪽 아래 구석에 작고 흐리게 계속 남는다 */
#howto.dock { left: 16px; bottom: 16px; transform: none; font-size: 13px; gap: 3px; padding: 8px 12px; opacity: .55 !important; animation: none; transition: all .8s ease; }
#howto.dock kbd { font-size: 11px; min-width: 20px; padding: 1px 5px; }
#howto.dock kbd.wide { min-width: 44px; }
kbd { display: inline-block; min-width: 26px; padding: 2px 7px; margin-right: 2px; border-radius: 7px; border: 1px solid rgba(255,255,255,.5); border-bottom-width: 3px; background: rgba(255,255,255,.12); font-family: 'Jua', sans-serif; font-size: 14px; text-align: center; }
kbd.wide { min-width: 64px; }
@media (pointer: coarse) { #howto { display: none; } }

/* 모드 고르기 (스피드전 · 아이템전) */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.1); margin: 12px auto 0; }
.seg button { border: 0; border-radius: 999px; padding: 8px 16px; font-family: 'Jua', sans-serif; font-size: 15px; background: transparent; color: var(--soft); }
.seg button.on { background: #fff; color: #2b1d5c; }
.seg button:disabled { cursor: default; }
/* 모드 고르기: 이름 아래 하드 기준 몇 배속 */
.seg button .vs-hard { display: block; font-family: 'Gowun Dodum', sans-serif; font-size: 10.5px; line-height: 1.15; opacity: .72; margin-top: 1px; white-space: nowrap; }
.seg button.on .vs-hard { opacity: .85; }
#mode-pick, #diff-pick, #map-pick { display: flex; width: fit-content; max-width: 100%; }
#diff-pick, #room-diff, #board-diff { flex-wrap: wrap; justify-content: center; border-radius: 22px; }
#diff-pick button, #room-diff button, #board-diff button { padding: 7px 11px; font-size: 14px; }
/* 맵 버튼이 5개라 글자가 끊기지 않게: 첫 화면은 늘, 순위표 · 방 · 내 기록은 좁은 화면에서 줄을 넘겨 감싼다 */
#map-pick { flex-wrap: wrap; justify-content: center; border-radius: 18px; } #map-pick button { white-space: nowrap; }
@media (max-width: 520px) { #board-map, #room-map, #stats-map { display: flex; flex-wrap: wrap; justify-content: center; border-radius: 18px; max-width: 100%; } #board-map button, #room-map button, #stats-map button { white-space: nowrap; } }
@media (max-width: 520px) { #diff-pick button, #room-diff button, #board-diff button, #map-pick button, #room-map button, #board-map button, #stats-map button { padding: 6px 8px; font-size: 13px; } }
/* 아이템 칸 */
#itembar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; z-index: 4; pointer-events: none; }
#itembar .slot { width: 62px; height: 62px; border-radius: 18px; background: rgba(20,8,50,.55); border: 2px solid rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center; font-size: 34px; }
#itembar .slot:first-child { width: 74px; height: 74px; font-size: 42px; border-color: var(--gold); box-shadow: 0 0 18px rgba(255,216,77,.45); }
#itembar .slot.spin { animation: spin .08s linear infinite; }
@keyframes spin { 50% { transform: translateY(-3px) scale(1.05); } }
#itembar .key { font-family: 'Jua', sans-serif; padding: 4px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.5); border-bottom-width: 3px; background: rgba(20,8,50,.5); }
#effects { position: fixed; left: 16px; top: 112px; display: flex; flex-direction: column; gap: 4px; z-index: 3; pointer-events: none; font-family: 'Jua', sans-serif; font-size: 17px; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
#effects span { background: rgba(20,8,50,.45); padding: 3px 10px; border-radius: 999px; width: fit-content; }
@media (pointer: coarse) { #itembar { bottom: 110px; } }

/* 메인으로 */
.card { position: relative; }
.home-btn { position: absolute; left: 16px; top: 16px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 20px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); }
.home-btn:hover { background: rgba(255,255,255,.22); }
a.btn { text-decoration: none; display: inline-block; }
/* 팀전 */
#room-team small { font-family: 'Gowun Dodum'; font-size: 11px; opacity: .8; }
#members.teams, .teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.team-col { border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.team-col h4 { margin: 0 0 4px; font-family: 'Jua', sans-serif; font-size: 17px; }
.team-col.red { background: rgba(255,90,122,.18); border: 2px solid rgba(255,90,122,.6); }
.team-col.blue { background: rgba(76,195,255,.16); border: 2px solid rgba(76,195,255,.6); }
#team-row { margin-top: 4px; }
#teambar { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 3; pointer-events: none; display: flex; gap: 8px; align-items: center; font-family: 'Jua', sans-serif; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
#tb-time { font-size: 22px; padding: 4px 12px; border-radius: 999px; background: rgba(20,8,50,.55); }
#tb-time.hurry { color: #ff8a80; }
#teambar .tb { display: flex; gap: 6px; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 15px; }
#teambar .tb.red { background: rgba(255,90,122,.55); }
#teambar .tb.blue { background: rgba(76,195,255,.5); }
#teambar .tb.lead { outline: 2px solid #ffd84d; }
#ov-team { font-family: 'Jua', sans-serif; font-size: 20px; margin-top: 6px; }

/* 처음 화면 · 방에서도 소리 켜기 · 끄기 (오른쪽 위) */
.snd-btn { left: auto; right: 16px; cursor: pointer; color: inherit; padding: 0; font-family: inherit; z-index: 2; }

/* 채팅이 조작법 안내를 가리지 않게 */
body #chat { bottom: 150px; }
#spectate { cursor: pointer; }
#spectate .key { font-size: 13px; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.2); margin-left: 6px; }

/* 명예의 전당 (처음 화면 왼쪽) */
#fame { display: none; }
@media (min-width: 860px) {
  #title .t-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0 32px; align-items: center; margin-top: 10px; }
  #title .t-left, #title .t-right { display: flex; flex-direction: column; min-width: 0; }
  #title .t-left { padding-right: 32px; border-right: 1px solid rgba(255,255,255,.14); }
  #title .t-right .picks { margin-top: 0; }
  #fame { display: flex; flex-direction: column; gap: 5px; text-align: left; max-height: min(52vh, 460px); overflow-y: auto; padding-right: 4px; }
  .fame-h { font-family: 'Jua', sans-serif; font-size: 20px; text-align: center; margin-bottom: 6px; color: var(--gold); }
  .fame-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 4px 8px; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.07); font-size: 14px; }
  .fame-md { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px; } /* 메달 모두, 넘치면 다음 줄로 */
  .fame-md > * { white-space: nowrap; font-size: 12px; }
  .fame-nm { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: bold; }
  .fame-nm .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
}

/* 토스 미니앱: 혼자 달리기만 · 메인 화면 · 같이 달리기 · 패치노트 없이. 계정 칸은 닉네임만 보여 준다 */
body.toss #multi-btn, body.toss .code-row, body.toss #pn-btn, body.toss a[href="/"], body.toss #logout { display: none !important; }
body.toss #title #who-row:not(.hidden) { display: flex !important; justify-content: center; }
body.toss #title #acct-nick:not(.hidden) { display: block !important; }
body.toss #play-btns { grid-template-columns: 1fr; }
#ad-btn { display: block; width: min(420px, 100%); margin: 14px auto 0; }
#ad-btn.hidden { display: none; }
body.toss #toss-login { display: block; width: 100%; margin: 12px 0 4px; background: #3182f6; color: #fff; } body.toss #toss-login.hidden, #toss-login { display: none; }
body.touch #howto { display: none; } /* 휴대폰 조작 화면: 키보드 안내 대신 버튼 */
body.toss .keys { display: none; } /* 토스 미니앱(휴대폰): 키보드 안내 줄 없이 */
.brow.adm { grid-template-columns: minmax(0, 1fr) auto; } .brow.adm .adm-t { font-size: 14px; } .brow.adm .adm-b { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; } /* 운영자 칸: 한 줄 글 + 오른쪽 단추 */

/* 🌉 한강 러닝 */
.btn.hg-go { grid-column: 1 / -1; background: linear-gradient(135deg, #7fd1ff, #8ef0c0 55%, #ffd89a); color: #12324a; }
#hg-hud { position: fixed; inset: 0; pointer-events: none; z-index: 3; font-family: 'Jua', sans-serif; }
#hg-hud > * { pointer-events: auto; }
.hg-stat { position: absolute; left: 14px; top: 12px; padding: 10px 16px; border-radius: 18px; background: rgba(10, 20, 40, .42); backdrop-filter: blur(6px); text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.hg-stat b { font-size: 34px; } .hg-stat span { margin-left: 4px; opacity: .85; } #hg-sub { font-family: 'Gowun Dodum'; font-size: 13px; opacity: .9; }
.hg-top { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.hg-where { padding: 8px 16px; border-radius: 999px; background: rgba(10, 20, 40, .42); backdrop-filter: blur(6px); font-size: 15px; }
.hg-chip { padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(10, 20, 40, .42); backdrop-filter: blur(6px); color: var(--ink); font-family: 'Jua', sans-serif; font-size: 14px; cursor: pointer; }
.hg-chip:hover { background: rgba(255,255,255,.2); }
#hg-region { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); padding: 10px 26px; border-radius: 16px; background: linear-gradient(90deg, transparent, rgba(10,20,40,.55) 20%, rgba(10,20,40,.55) 80%, transparent); font-size: 26px; text-shadow: 0 2px 10px rgba(0,0,0,.5); letter-spacing: .04em; pointer-events: none; transition: opacity .8s; }
#hg-region.hidden { display: block; opacity: 0; }
#hg-labels { position: absolute; inset: 0; pointer-events: none !important; overflow: hidden; }
.hg-lab { position: absolute; left: 0; top: 0; pointer-events: none; }
.hg-lab i { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 3px solid #ff2d55; border-radius: 50%; box-shadow: 0 0 10px rgba(255,45,85,.7); }
.hg-lab svg { position: absolute; left: 0; top: 0; overflow: visible; }
.hg-lab b { position: absolute; padding: 5px 12px; border-radius: 10px; background: rgba(255,255,255,.92); color: #1a1a2a; font-size: 15px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.hg-lab b small { display: block; margin-top: 1px; font-size: 11px; font-weight: 600; color: #5a6072; }
#hg-mini { position: absolute; left: 14px; bottom: 14px; width: 180px; height: 180px; border-radius: 50%; border: 3px solid rgba(255,255,255,.8); box-shadow: 0 6px 20px rgba(0,0,0,.35); background: #e9e5dc; pointer-events: none !important; }
body.touch #hg-mini { width: 118px; height: 118px; left: 10px; top: 120px; bottom: auto; }
body.touch .hg-top { top: 64px; flex-wrap: wrap; justify-content: center; max-width: 96vw; }
body.touch .hg-where { font-size: 13px; padding: 6px 12px; } body.touch .hg-chip { font-size: 12px; padding: 5px 8px; }
body.touch #hg-region { top: 140px; font-size: 20px; }
.hg-r { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; align-items: center; }

.btn.mini { padding: 7px 11px; font-size: 15px; }
.hg-speed { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 999px; background: rgba(10, 20, 40, .42); backdrop-filter: blur(6px); text-align: center; }
.hg-speed .btn { width: 48px; height: 48px; padding: 0; font-size: 24px; }
.hg-speed b { font-size: 16px; } .hg-bar { width: 130px; height: 6px; border-radius: 9px; background: rgba(255,255,255,.2); margin-top: 5px; overflow: hidden; } .hg-bar i { display: block; height: 100%; width: 30%; border-radius: 9px; background: linear-gradient(90deg, #8ef0c0, #ffd89a, #ff8f8f); }
.hg-keys { position: absolute; right: 14px; bottom: 16px; font-family: 'Gowun Dodum'; font-size: 12px; opacity: .7; }
body.touch .hg-keys { display: none; }
body.touch .hg-speed { bottom: auto; top: 12px; left: auto; right: 150px; transform: none; padding: 4px 6px; } body.touch .hg-speed .btn { width: 38px; height: 38px; font-size: 20px; } body.touch .hg-bar { width: 70px; }
body.touch .hg-stat b { font-size: 26px; }

body.hg #touch #t-item { display: none !important; }
body.hg #touch #t-shove { display: block !important; }
body.hg #touch #t-shove::after { content: ''; }
#hg-set { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(5, 10, 25, .45); padding: 16px; }
#hg-set.hidden, #hg-hud.hidden { display: none; }
.hg-card { width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 18px 20px; border-radius: 22px; background: rgba(18, 28, 52, .92); }
.hg-card h3 { margin: 0 0 12px; font-family: 'Jua'; font-size: 22px; }
.hg-row { display: flex; gap: 10px; align-items: center; margin: 8px 0; flex-wrap: wrap; } .hg-row > span { width: 72px; font-size: 14px; opacity: .85; }
.hg-row .seg { display: flex; flex-wrap: wrap; gap: 4px; }
.hg-row .seg button { padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: var(--ink); font-family: 'Gowun Dodum'; font-size: 13px; }
.hg-row .seg button.on { background: #fff; color: #12324a; font-weight: 700; }
.hg-tip { font-size: 13px; opacity: .85; line-height: 1.5; } .hg-tip.small { font-size: 11px; opacity: .6; }
#hg-set .btn.big { width: 100%; margin-top: 6px; }
body #title #play-btns:has(> .hg-go) { grid-template-columns: repeat(2, 1fr); }
body.toss #title #play-btns:has(> .hg-go) { grid-template-columns: 1fr; }

#hg-start, #hg-map { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: rgba(5, 10, 25, .55); padding: 16px; }
#hg-start.hidden, #hg-map.hidden { display: none; }
#hg-start .btn { display: block; width: 100%; margin: 8px 0; }
.hg-card.wide { width: min(720px, 100%); text-align: center; }
.hg-card h3 small { font-family: 'Gowun Dodum'; font-size: 13px; opacity: .7; margin-left: 6px; }
#hg-map-c { width: min(640px, 100%, 70vh); aspect-ratio: 1; border-radius: 16px; cursor: crosshair; background: #e9e5dc; touch-action: none; }
.hg-map-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
#hg-mini { pointer-events: auto !important; cursor: pointer; }

/* 지하철 출입구 앞: 실시간 도착 안내 (역 전광판 느낌) */
#hg-subway { position: absolute; right: 14px; top: 64px; width: min(320px, 80vw); padding: 12px 14px; border-radius: 16px; background: rgba(12, 16, 28, .82); backdrop-filter: blur(6px); font-family: 'Gowun Dodum'; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
#hg-subway.hidden { display: none; }
#hg-subway h4 { margin: 0 0 8px; font-family: 'Jua'; font-size: 17px; display: flex; gap: 6px; align-items: center; }
#hg-subway .ln { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; }
#hg-subway .row { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid rgba(255,255,255,.08); }
#hg-subway .row b { margin-left: auto; color: #ffd84d; font-family: 'Jua'; white-space: nowrap; }
#hg-subway .note { opacity: .6; font-size: 11px; margin-top: 6px; }
body.touch #hg-subway { top: 200px; }

/* 한강 가게 메뉴 */
#hg-shop { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); width: min(380px, 92vw); padding: 14px 16px; border-radius: 18px; background: rgba(28, 22, 18, .88); backdrop-filter: blur(6px); color: #fff; font-family: 'Gowun Dodum'; box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 20; }
#hg-shop.hidden { display: none; }
#hg-shop h4 { margin: 0 0 10px; font-family: 'Jua'; font-size: 18px; display: flex; gap: 8px; align-items: baseline; }
#hg-shop h4 small { font-size: 12px; opacity: .7; }
#hg-shop .menu { display: grid; gap: 6px; }
#hg-shop .menu button { display: grid; grid-template-columns: 1fr auto 22px; gap: 8px; align-items: center; padding: 9px 12px; border: 0; border-radius: 12px; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
#hg-shop .menu button:hover { background: rgba(255, 210, 140, .25); }
#hg-shop .menu button b { color: #ffd98a; font-weight: 700; }
#hg-shop .menu button i { font-style: normal; font-size: 11px; opacity: .55; text-align: center; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; }
#hg-shop .mode { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; }
#hg-shop .mode label { display: flex; gap: 5px; align-items: center; cursor: pointer; }

/* 한강 산책 지역 고르기 */
#hg-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin: 4px 0 8px; max-height: 38vh; overflow-y: auto; }
#hg-regions button { padding: 8px 10px; border-radius: 999px; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: inherit; font-family: 'Jua'; font-size: 15px; cursor: pointer; }
#hg-regions button.on { border-color: #ffd98a; background: rgba(255, 217, 138, .22); }

#hg-regions button.last { grid-column: 1 / -1; border-color: #8fd18a; background: rgba(143, 209, 138, .18); display: flex; flex-direction: column; align-items: center; gap: 2px; }
#hg-regions button.last small { font-family: 'Gowun Dodum'; font-size: 11px; opacity: .8; }
/* 젤리 서울 산책(/seoul-walk/): 러너 타이틀 화면은 숨기고 서울 산책 시작 화면만 */
body.sw #title { visibility: hidden; }
/* 서울 산책 시작 화면: 이렇게 만들었어요 */
#hg-how { margin-top: 12px; text-align: left; border-radius: 14px; background: rgba(255,255,255,.06); }
#hg-how summary { cursor: pointer; padding: 10px 14px; font-family: 'Jua', sans-serif; font-size: 15px; list-style: none; }
#hg-how summary::-webkit-details-marker { display: none; }
#hg-how summary::after { content: ' ▾'; opacity: .6; }
#hg-how[open] summary::after { content: ' ▴'; }
#hg-how .how { padding: 0 14px 12px; max-height: 38vh; overflow-y: auto; }
#hg-how h4 { margin: 10px 0 4px; font-size: 14px; } #hg-how h4 small { font-weight: normal; opacity: .6; font-size: 11px; margin-left: 4px; }
#hg-how ul { margin: 0; padding-left: 18px; } #hg-how li { font-size: 12.5px; line-height: 1.55; opacity: .88; }
#hg-how li b { color: #ffd98a; font-weight: 600; }
#hg-how .src { margin: 10px 0 0; font-size: 10.5px; opacity: .5; }
/* 서울 산책 계정 줄: 로그인 없이 바로 · 로그인하면 계정에 저장 */
.hg-acct { margin: 10px 0 2px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.06); font-size: 12.5px; line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.hg-acct b { color: #ffd98a; } .hg-acct .sub { opacity: .65; font-size: 11.5px; } .hg-acct #hg-g-btn { margin-top: 4px; min-height: 0; }
/* 따로 된 주소로 바로 온 사람(solo): 젤리게임즈 · 드림 러너 이야기는 숨긴다 */
body.solo .hub-only, body:not(.solo) .solo-only { display: none; }
body.solo #title { display: none; }

/* ===== 젤리 서울 산책 랜딩 (/seoul-walk/) — 따로 된 게임처럼 ===== */
#sw-bg, .sw-hero { display: none; }
body.sw #hg-start { background: #0a1020; flex-direction: column; justify-content: flex-start; overflow-y: auto; padding: clamp(28px, 7vh, 72px) 20px 40px; }
body.sw #sw-bg { display: block; position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #0a1020; }
#sw-bg .sl { position: absolute; inset: -2%; background-size: cover; background-position: center; opacity: 0; transition: opacity 2.4s ease; will-change: transform, opacity; }
#sw-bg .sl.on { opacity: 1; animation: sw-kb 14s linear forwards; }
@keyframes sw-kb { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-1.6%, -1.2%); } }
#sw-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(10, 16, 32, .05), rgba(10, 16, 32, .5) 80%), linear-gradient(180deg, rgba(10, 16, 32, .45), rgba(10, 16, 32, 0) 30%, rgba(10, 16, 32, .7)); }
#sw-bg .cap { position: absolute; left: 26px; bottom: 26px; z-index: 1; display: flex; flex-direction: column; gap: 2px; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); transition: opacity .8s; }
#sw-bg .cap b { font-family: 'Jua', sans-serif; font-size: 20px; font-weight: normal; } #sw-bg .cap small { font-size: 12px; opacity: .75; }
#sw-bg .dots { position: absolute; right: 26px; bottom: 32px; z-index: 1; display: flex; gap: 7px; }
#sw-bg .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: all .5s; } #sw-bg .dots i.on { width: 22px; border-radius: 4px; background: #ffd98a; }
body.sw .sw-hero { display: block; text-align: center; color: #fff; margin: 0 auto 26px; max-width: 760px; }
.sw-pill { display: inline-block; padding: 5px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); font-size: 11px; letter-spacing: .22em; backdrop-filter: blur(6px); }
.sw-hero h1 { margin: 14px 0 8px; font-family: 'Jua', sans-serif; font-weight: normal; font-size: clamp(42px, 8vw, 78px); line-height: 1.05; background: linear-gradient(100deg, #fff 10%, #ffd9a8 45%, #ff9ec4 80%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 22px rgba(0, 0, 0, .45)); }
.sw-hero p { margin: 0; font-size: clamp(14px, 2vw, 17px); opacity: .88; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
body.sw .hg-card { width: min(1080px, 100%); max-height: none; overflow: visible; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; padding: 26px 28px; border-radius: 26px; background: rgba(14, 22, 44, .66); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
body.sw .hg-card h3 { font-size: 18px; opacity: .9; }
body.sw #hg-how { margin: 0; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); }
body.sw #hg-how summary { pointer-events: none; padding: 14px 16px 4px; font-size: 18px; } body.sw #hg-how summary::after { content: ''; }
body.sw #hg-how .how { max-height: 560px; padding: 0 16px 14px; }
body.sw #hg-regions button { transition: transform .15s, background .2s; } body.sw #hg-regions button:hover { transform: translateY(-2px); }
@media (max-width: 860px) { body.sw .hg-card { grid-template-columns: 1fr; padding: 20px 18px; gap: 18px; } body.sw #hg-how .how { max-height: none; } #sw-bg .cap { left: 16px; bottom: 16px; } #sw-bg .dots { right: 16px; bottom: 22px; } }
@media (max-width: 860px) { #sw-bg .cap, #sw-bg .dots { display: none; } }
/* 서울 산책은 따로 된 게임(카드 · /seoul-walk/)으로 — 드림 러너 타이틀의 서울 산책 단추는 숨김 (#hangang 주소는 그대로 열린다) */
#hg-btn { display: none !important; }
/* 서울 산책 게임(/seoul-walk/play/): 불러오는 동안 덮개 (러너 타이틀 장면이 보이지 않게) */
#sw-load { display: none; }
body.swplay:not(.swready) #hg-hud { visibility: hidden; }
body.swplay:not(.swready) #sw-load { display: flex; position: fixed; inset: 0; z-index: 60; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 40%, #1b2440, #0c1222 70%); color: #fff; }
#sw-load .in { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: 'Gowun Dodum', sans-serif; }
#sw-load svg { width: 54px; height: 54px; fill: #f2c27b; animation: sw-breathe 1.6s ease-in-out infinite; } #sw-load b { font-family: 'Jua', sans-serif; font-weight: normal; font-size: 26px; letter-spacing: .02em; } #sw-load span { font-size: 13px; opacity: .7; }
@keyframes sw-breathe { 50% { transform: scale(1.12); opacity: .8; } }

/* 서울 러너 게임 불러오기 덮개: 파스텔 빛 번짐 · 도는 고리 (랜딩과 같게) */
body.swplay:not(.swready) #sw-load { color: #1c2133; background: radial-gradient(42vw 34vw at 18% 20%, rgba(255, 196, 170, .7), transparent 70%), radial-gradient(40vw 32vw at 84% 26%, rgba(199, 184, 255, .65), transparent 70%), radial-gradient(46vw 36vw at 28% 84%, rgba(170, 232, 214, .55), transparent 70%), radial-gradient(44vw 34vw at 82% 80%, rgba(255, 186, 214, .6), transparent 70%), #fbf6f1; }
#sw-load .in { gap: 16px; } #sw-load b { color: #1c2133; } #sw-load span:not(.sw-spin) { color: rgba(28, 33, 51, .6); opacity: 1; }
.sw-spin { width: 50px; height: 50px; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255, 184, 158, 0), #ffb89e 30%, #f59cc2 60%, #b9a6ff 95%); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); animation: sw-spin 1s linear infinite; }
@keyframes sw-spin { to { transform: rotate(360deg); } }

/* 게임 불러오기 덮개: 밤하늘 · 노란 별자리 스카이라인 (랜딩과 같게, 파스텔 취소) */
body.swplay:not(.swready) #sw-load { color: #f3eee6; background: radial-gradient(1.2px 1.2px at 15% 25%, rgba(255, 255, 255, .8), transparent 60%), radial-gradient(1px 1px at 65% 15%, rgba(255, 255, 255, .6), transparent 60%), radial-gradient(1.3px 1.3px at 40% 70%, rgba(255, 236, 190, .7), transparent 60%), radial-gradient(ellipse at 50% 110%, rgba(80, 60, 140, .4), transparent 60%), linear-gradient(180deg, #05070c, #0d1434 70%, #111a40); background-size: 300px 300px, 360px 360px, 420px 420px, 100% 100%, 100% 100%; }
#sw-load b { color: #f3eee6; } #sw-load .in > span { color: rgba(243, 238, 230, .6); }
.sw-sky { width: 220px; height: 84px; overflow: visible; }
.sw-sky .ln { fill: none; stroke: #ffd98a; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 3px rgba(255, 217, 138, .9)); animation: sw-draw 2.6s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes sw-draw { 0% { stroke-dashoffset: 1; } 55% { stroke-dashoffset: 0; } 75% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.sw-sky .st circle { fill: #fff3c8; filter: drop-shadow(0 0 4px #ffd98a); transform-box: fill-box; transform-origin: center; animation: sw-tw 1.8s ease-in-out infinite; } .sw-sky .st circle:nth-child(2n) { animation-delay: .7s; } .sw-sky .st circle:nth-child(3n) { animation-delay: 1.2s; }
@keyframes sw-tw { 0%, 100% { opacity: .35; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
#sw-load svg.sw-sky { width: 220px; height: 84px; fill: none; animation: none; }
/* 휴대폰: 난이도 다섯 개가 한 줄에 들어가게 여백을 줄인다 (위의 #diff-pick 줄바꿈 규칙보다 뒤에 둔다) */
@media (max-width: 480px) { #diff-pick, #room-diff { flex-wrap: nowrap; gap: 2px; padding: 3px; } #diff-pick button, #room-diff button { flex: 1 1 0; min-width: 0; padding: 6px 3px; font-size: 13px; } #diff-pick .vs-hard, #room-diff .vs-hard { font-size: 9px; } }
/* ⏳ 시간 여행: 장 띠 · 연도 · 한 줄 이야기 (카드가 조금 더 오래 머문다) */
#dream-card .dc-ch { display: inline-block; font-family: 'Jua', sans-serif; font-size: 16px; letter-spacing: 3px; padding: 3px 14px; margin-bottom: 6px; border-radius: 999px; color: #2b1d00; background: linear-gradient(90deg, #ffd54f, #fff3c4, #ffd54f); box-shadow: 0 0 16px rgba(255, 213, 79, .7); }
#dream-card .dc-ch:empty { display: none; }
#dream-card.time { animation-duration: 4.2s; }
#dream-card.time .dc-n { letter-spacing: 1px; font-size: 20px; color: #ffe082; }
#dream-card.time .dc-tip { max-width: min(640px, 88vw); margin: 6px auto 0; color: #fff8e1; font-size: clamp(14px, 2.8vw, 19px); line-height: 1.4; }
/* 첫 화면: 어느 시대부터 출발하는지 */
.time-resume { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 2px auto 8px; padding: 7px 12px; border-radius: 14px; background: linear-gradient(90deg, rgba(255, 213, 79, .16), rgba(124, 77, 255, .18)); border: 1.5px solid rgba(255, 213, 79, .55); font-size: 13px; color: #fff3c4; }
.time-resume b { color: #fff; }
.time-resume small { color: #d7c9ff; }
.time-resume button { border: 0; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; background: rgba(255, 255, 255, .16); color: #fff; }
.time-resume.hidden { display: none; }
/* 결과 화면: 다시하면 다음 역사를 이어서 (금빛 → 보라, 반짝) */
.time-next { margin: 4px auto 10px; padding: 8px 14px; border-radius: 14px; text-align: center; font-family: 'Jua', sans-serif; font-size: 16px; color: #fff8e1; background: linear-gradient(90deg, rgba(255, 193, 7, .22), rgba(124, 77, 255, .28)); border: 1.5px solid #ffd54f; box-shadow: 0 0 18px rgba(255, 213, 79, .35); animation: timeGlow 1.6s ease-in-out infinite alternate; }
.time-next b { color: #ffd54f; }
.time-next span { display: block; font-size: 13px; color: #e1d5ff; margin-top: 2px; }
.time-next.hidden { display: none; }
#again-btn.time-again { color: #2b1400; background: linear-gradient(100deg, #ffd54f, #ffb300 35%, #ff7ac6 70%, #b388ff); animation: timeBtnGlow 1.8s ease-in-out infinite alternate; box-shadow: 0 0 14px rgba(255, 193, 7, .45), 0 4px 0 #8a5a00; font-weight: bold; }
#again-btn.time-again small { display: block; font-size: 12px; opacity: .85; }
/* 결과 화면 버튼의 Enter 키 모양 (PC만) */
#again-btn .enter-k { display: inline-flex; align-items: center; gap: 3px; margin-left: 10px; padding: 2px 8px 3px; border-radius: 7px; border: 1px solid rgba(0,0,0,.25); border-bottom-width: 3px; background: rgba(255,255,255,.75); color: #3a2a5a; font: 700 12px/1.2 'Gowun Dodum', sans-serif; vertical-align: 2px; white-space: nowrap; }
#again-btn.time-again .enter-k { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin: 0; }
body:not(.touch) #again-btn.time-again { position: relative; padding-right: 92px; }
body.touch #again-btn .enter-k { display: none; }

@keyframes timeBtnGlow { to { box-shadow: 0 0 26px rgba(255, 193, 7, .75), 0 4px 0 #8a5a00; } }
@keyframes timeGlow { from { box-shadow: 0 0 10px rgba(255, 213, 79, .3); } to { box-shadow: 0 0 24px rgba(255, 213, 79, .7); } }
/* ⏳ 시대 넘어갈 때: 빛 소용돌이 + 연도 */
#time-warp { position: fixed; inset: 0; z-index: 3; pointer-events: none; display: flex; align-items: center; justify-content: center; }
#time-warp.hidden { display: none; }
#time-warp .tw-swirl { position: absolute; inset: -30%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .0) 0deg 9deg, rgba(255, 236, 179, .55) 10deg 13deg, rgba(179, 136, 255, .35) 14deg 18deg); -webkit-mask: radial-gradient(circle, transparent 8%, #000 30%, #000 55%, transparent 75%); mask: radial-gradient(circle, transparent 8%, #000 30%, #000 55%, transparent 75%); animation: twSpin 1.5s cubic-bezier(.2, .7, .3, 1) forwards; }
#time-warp .tw-year { position: relative; font-family: 'Jua', sans-serif; font-size: clamp(30px, 7vw, 64px); color: #fff; letter-spacing: 2px; text-shadow: 0 0 12px #ffd54f, 0 0 32px #b388ff, 0 3px 0 #5a3a00; animation: twYear 1.5s ease forwards; font-variant-numeric: tabular-nums; }
#time-warp .tw-year.land { color: #fff3c4; transform: scale(1.12); }
@keyframes twSpin { 0% { transform: rotate(0deg) scale(.4); opacity: 0; } 15% { opacity: 1; } 70% { opacity: .9; } 100% { transform: rotate(540deg) scale(1.6); opacity: 0; } }
@keyframes twYear { 0% { opacity: 0; transform: scale(.6); } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px) scale(1); } }
/* 새 맵 소개 공지 (시간 여행): 금빛 → 보라 */
/* 드림 러너 소식: 새 맵(금빛) + 난이도 변경(빨강) 한 칸 */
.dr-news { display: flex; flex-direction: column; gap: 4px; margin: -6px auto 14px; max-width: 560px; width: 100%; padding: 9px 14px; border-radius: 14px; border: 2px solid #ffd54f; background: linear-gradient(100deg, rgba(255, 193, 7, .18), rgba(124, 77, 255, .22)); color: #fff3c4; font: inherit; font-size: 13px; line-height: 1.45; text-align: center; cursor: pointer; box-shadow: 0 0 18px rgba(255, 213, 79, .3); animation: timeGlow 1.8s ease-in-out infinite alternate; }
.dr-news b { color: #ffd54f; font-size: 15px; }
.dr-news em { font-style: normal; font-weight: 700; color: #fff; }
.dr-news .n-diff { color: #ffc4ca; }
.dr-news .n-diff em { color: #ff8a95; }
.dr-news small { color: #d7c9ff; font-size: 12px; }
.dr-news:hover { filter: brightness(1.12); }
.dr-news.hidden { display: none; }

/* 게임 등급 표시: 토스 미니앱 첫 화면에서만 (웹은 숨김) */
.rating { display: none; align-items: center; justify-content: center; gap: 6px; margin: 2px auto 6px; font-size: 12px; color: var(--soft); }
body.toss .rating { display: flex; }
.rating i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1fa54a; border: 2px solid #fff; color: #fff; font: 700 9.5px/1 'Gowun Dodum', sans-serif; font-style: normal; letter-spacing: -.04em; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.rating span { font-weight: 700; color: #e8ffe9; }
.rating small { opacity: .75; }
.rating small:empty { display: none; }

/* ===================== 드림 러너 랜딩 (웹만 · 토스 미니앱은 예전 카드) =====================
   콘셉트 "젤리처럼 말랑한 꿈 일기": 밝은 라벤더 종이 + 짙은 남색 잉크, 세계마다 젤리 색. 첫 화면만 실시간 3D 가 비치고 아래는 종이 위 편집 */
.dl { display: none; }
body:not(.toss) #title { display: block; padding: 0; background: none; scroll-behavior: smooth; user-select: text; -webkit-user-select: text; }
body:not(.toss) #title > .card { display: none; }
body:not(.toss) .dl { display: block;
  --paper: #f6f2ff; --paper2: #ece6ff; --ink: #1d1747; --ink2: #4a4378; --mute: #7a73a3; --line: rgba(29, 23, 71, .12);
  --straw: #ff5f8f; --orange: #ff8a3d; --grape: #8b6bff; --soda: #2fb8ff; --honey: #ffb800;
  color: var(--ink); font-family: 'Gowun Dodum', sans-serif; }
.dl h1, .dl h2, .dl h3 { font-family: 'Jua', sans-serif; font-weight: 400; letter-spacing: -.01em; word-break: keep-all; margin: 0; }
.dl p, .dl li, .dl dd, .dl dt { word-break: keep-all; }
.dl-lab { margin: 0 0 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--grape); }
.dl-lab::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.dl section { position: relative; }
/* 위 막대 */
.dl-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: rgba(246, 242, 255, .0); transition: background .3s, box-shadow .3s; }
.dl-bar.solid { background: rgba(246, 242, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.dl-mark { font-family: 'Jua', sans-serif; font-size: 22px; color: #fff; text-decoration: none; text-shadow: 0 2px 12px rgba(0,0,0,.35); transition: color .3s, text-shadow .3s; }
.dl-bar nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 26px); font-size: 14px; }
.dl-bar nav a { color: rgba(255,255,255,.9); text-decoration: none; text-shadow: 0 1px 8px rgba(0,0,0,.4); transition: color .3s; }
.dl-bar.solid .dl-mark, .dl-bar.solid nav a { color: var(--ink); text-shadow: none; }
.dl-bar nav a:hover { color: var(--straw) !important; }
.dl-bar .dl-home { padding: 7px 14px; border-radius: 999px; border: 1.5px solid currentColor; }
.dl-bar .snd-btn { position: static; width: 36px; height: 36px; font-size: 16px; }
/* 첫 화면 */
/* ---- 첫 화면: 다섯 세계 판 (3차) ---- */
.dl-hero { --ih: 300px; position: relative; min-height: 100vh; min-height: 100svh; margin-top: -64px; display: flex; flex-direction: column; overflow: hidden; }
.dl-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(16, 9, 42, .78), rgba(16, 9, 42, .42) calc(var(--ih) * .85), rgba(16, 9, 42, 0) calc(var(--ih) + 60px)); }
.dl-intro { position: absolute; z-index: 2; left: 0; right: 0; top: 0; padding: 96px clamp(16px, 4vw, 48px) 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; color: #fff; pointer-events: none; }
.dl-intro a, .dl-intro button { pointer-events: auto; }
.dl-intro .dl-lab { color: #ffd1e3; }
.dl-hero h1 { font-size: clamp(40px, 5.2vw, 84px); line-height: 1.04; text-shadow: 0 8px 40px rgba(20, 10, 60, .45); }
.dl-lead { margin: 14px 0 0; max-width: 560px; font-size: clamp(14.5px, 1.25vw, 17px); line-height: 1.7; color: rgba(255,255,255,.92); text-shadow: 0 2px 14px rgba(20, 10, 60, .6); }
.dl-intro-r { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; max-width: 520px; }
.dl-meta { margin: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.dl-intro [data-slot="news"] .dr-news { margin: 0 !important; }
/* 4차 U-1: 판 폭은 늘 같다 (레이아웃이 움직이지 않는다). 마우스를 올리면 덮개가 걷히고 사진이 살짝 다가오며 설명 · 플레이가 떠오른다 — opacity · transform 만 */
.dl-panes { position: relative; flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: calc(var(--ih) + 420px); transition: opacity .3s; }
.dl-pane { position: relative; min-width: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; padding: calc(var(--ih) + clamp(36px, 14vh, 170px)) clamp(12px, 1.4vw, 22px) 56px; border-left: 1px solid rgba(255, 255, 255, .14); isolation: isolate; }
.dl-pane:first-child { border-left: 0; }
.dl-pane::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--img) center top / auto max(120%, 100vw * .5) no-repeat; transform: scale(1.001); transition: transform .7s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.dl-pane::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(16, 9, 42, .3), rgba(16, 9, 42, .12) 40%, rgba(16, 9, 42, .82)), linear-gradient(0deg, color-mix(in srgb, var(--wc) 30%, transparent), transparent 55%), rgba(14, 8, 36, .28); transition: opacity .4s; }
.dl-pane:hover::before, .dl-pane:focus-within::before { transform: scale(1.06); }
.dl-pane:hover::after, .dl-pane:focus-within::after { opacity: .72; }
.dl-pane-hd { position: relative; display: grid; justify-items: start; gap: 4px; width: 100%; padding: 0; border: 0; background: transparent; color: #fff; font: inherit; text-align: left; cursor: pointer; text-shadow: 0 2px 12px rgba(10, 5, 30, .7); transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.dl-pane-hd i { font-style: normal; font-size: 13px; letter-spacing: .12em; color: var(--wc); }
.dl-pane-hd b { font-family: 'Jua', sans-serif; font-weight: 400; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.12; word-break: keep-all; }
.dl-pane-hd em { font-style: normal; font-size: 13px; color: rgba(255, 255, 255, .85); }
.dl-pane-hd small { font-size: 12.5px; line-height: 1.45; color: rgba(255, 255, 255, .75); word-break: keep-all; }
.dl-pane.on .dl-pane-hd i::after { content: ' · 지난번'; color: rgba(255, 255, 255, .7); letter-spacing: 0; }
/* 설명 · 플레이: 늘 자리를 차지한 채 숨어 있다가 떠오른다 (높이가 바뀌지 않게) */
.dl-pane-more { margin-top: 14px; opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .4s cubic-bezier(.2, .7, .2, 1); }
.dl-pane-more p { margin: 0; font-size: 13.5px; line-height: 1.65; color: rgba(255, 255, 255, .92); text-shadow: 0 2px 10px rgba(10, 5, 30, .8); word-break: keep-all; }
.dl-play { margin-top: 14px; padding: 10px 18px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--wc) 80%, #fff); color: #1d1747; font-family: 'Jua', sans-serif; font-size: 15.5px; cursor: pointer; box-shadow: 0 10px 26px rgba(10, 5, 30, .35); transition: transform .2s, background .2s; }
.dl-play:hover { transform: translateY(-2px); background: #fff; }
.dl-pane:hover .dl-pane-more, .dl-pane:focus-within .dl-pane-more { opacity: 1; transform: none; }
.dl-pane:hover .dl-pane-hd, .dl-pane:focus-within .dl-pane-hd { transform: translateY(-4px); }
/* 출발 카드 팝업 (U-2): 뒤는 어둡게만 (흐림은 매 프레임 비싸다), 판 사진이 걷히며 그 세계 3D 가 보인다 */
.dl-modal { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; padding: 76px 16px 24px; }
.dl-modal.show { display: flex; }
.dl-modal-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(14, 8, 36, .25), rgba(14, 8, 36, .62)); opacity: 0; transition: opacity .25s; }
.dl-modal-box { position: relative; width: min(880px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; container: pane / inline-size; border-radius: 26px; background: #fff; color: var(--ink); box-shadow: 0 40px 100px rgba(10, 5, 30, .5), 0 0 0 1px rgba(29, 23, 71, .06); opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .22s, transform .3s cubic-bezier(.2, .8, .2, 1); }
.dl-modal.open .dl-modal-bg, .dl-modal.open .dl-modal-box { opacity: 1; }
.dl-modal.open .dl-modal-box { transform: none; }
.dl-modal-h { display: flex; align-items: baseline; gap: 10px; padding: 18px 20px 4px; }
.dl-modal-h i { font-style: normal; font-size: 13px; letter-spacing: .12em; color: color-mix(in srgb, var(--wc) 70%, #1d1747); font-weight: 700; }
.dl-modal-h b { font-family: 'Jua', sans-serif; font-weight: 400; font-size: clamp(24px, 2.4vw, 32px); }
.dl-modal-h small { flex: 1; min-width: 0; font-size: 13px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-x { flex: none; align-self: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 15px; cursor: pointer; }
.dl-x:hover { background: #ebe4ff; }
.dl-modal .dl-start { max-width: none; box-shadow: none; border-radius: 0; background: transparent; padding: 10px 20px 16px; }
body.dl-open .dl-panes { opacity: 0; pointer-events: none; }
body.dl-open .dl-cue { opacity: 0; }
body.dl-open .dl-intro { opacity: .3; transition: opacity .25s; }
.dl-start { position: relative; max-width: 540px; padding: 18px 20px 14px; border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(29, 23, 71, .35), 0 0 0 1px rgba(29, 23, 71, .06); }
.dl-board { margin: 0 0 12px; padding: 0 0 10px; border-bottom: 2px dashed rgba(29, 23, 71, .12); }
.dl-board-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.dl-board-h b { font-family: 'Jua', sans-serif; font-weight: 400; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-board-more { flex: none; border: 0; background: transparent; color: var(--mute); font: inherit; font-size: 12.5px; cursor: pointer; padding: 4px 2px; }
.dl-board-more:hover { color: var(--ink); }
.dl-board ol { list-style: none; margin: 0; padding: 0 4px 0 0; display: grid; align-content: start; gap: 1px; transition: opacity .2s; min-height: 140px; max-height: 330px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.dl-board ol.loading { opacity: .4; }
.dl-board li { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 9px; font-size: 13.5px; }
.dl-board li:nth-child(odd) { background: var(--paper); }
.dl-board li.me { outline: 2px solid var(--wc, #ffd84d); }
.dl-board li .rk { width: 24px; flex: none; text-align: center; font-size: 13px; color: var(--mute); }
.dl-board li:not(.empty) { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 8px; row-gap: 4px; }
.dl-board li .nm { display: contents; }
.dl-board li .rk, .dl-board li .nm-t, .dl-board li b { grid-row: 1; }
.dl-board li b { grid-column: 3; }
.dl-board li .nm-t { min-width: 0; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 훈장 · 칭호: 이름 오른쪽, 넘치면 다음 줄로 (명예의 전당 · 순위표와 같은 모양) */
.dl-board li .md { grid-column: 2 / 4; grid-row: 2; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.dl-board li .md:empty { display: none; }
.dl-board li .md > * { white-space: nowrap; font-size: 10.5px; padding: 1px 7px; line-height: 1.5; }
.dl-board li .md > .fire { margin: 0 9px; }
.dl-board li b { flex: none; }
.dl-board li .nm i { width: 9px; height: 9px; flex: none; border-radius: 50%; }
.dl-board li b { font-family: 'Jua', sans-serif; font-weight: 400; font-size: 14px; }
.dl-board li.empty { justify-content: center; color: var(--mute); background: transparent; padding: 22px 8px; }
.dl-board-me { margin: 6px 0 0; font-size: 12.5px; color: var(--ink2); }
.dl-board-me:empty { display: none; }
.dl-cue { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 13px; color: rgba(255, 255, 255, .85); text-decoration: none; animation: dlBob 2s ease-in-out infinite; }
@container pane (min-width: 660px) {
  .dl-start { max-width: 860px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 20px; align-items: start; }
  .dl-start > * { grid-column: 2; }
  .dl-start > .dl-board { grid-column: 1; grid-row: 1 / span 8; margin: 0; padding: 0 18px 0 0; border-bottom: 0; border-right: 2px dashed rgba(29, 23, 71, .12); align-self: stretch; }
  .dl-start #play-btns { margin-top: 8px; }
}.dl-intro .dl-lab { color: #ffd1e3; }
.dl-meta div { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 14px; background: rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.25); }
.dl-meta dt { order: 2; font-size: 13px; color: rgba(255,255,255,.85); } .dl-meta dd { margin: 0; font-family: 'Jua', sans-serif; font-size: 22px; color: #fff; }
.dl-intro [data-slot="news"] .dr-news { margin: 22px 0 0; max-width: 560px; text-align: left; align-items: flex-start; border-width: 1.5px; animation: none; background: rgba(255, 255, 255, .14); border-color: rgba(255, 216, 77, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
/* 출발 판 (흰 탑승권) */
.dl-start .time-resume { margin: 0 0 12px; padding: 9px 12px; border-radius: 12px; background: #fff6dc; border: 0; color: #6a4a00; font-size: 13px; text-align: left; }
.dl-start .time-resume b { color: #3d2a00; }
.dl-row { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.dl-row > span { width: 46px; flex: none; font-size: 12.5px; color: var(--mute); }
.dl-row > div { flex: 1; min-width: 0; }
.dl-start .seg { display: flex; width: 100%; max-width: none; margin: 0; padding: 3px; gap: 2px; border-radius: 12px; background: var(--paper); flex-wrap: nowrap; }
.dl-start .seg button { flex: 1; min-width: 0; padding: 7px 4px; border-radius: 9px; font-size: 13px; color: var(--ink2); white-space: nowrap; }
.dl-start .seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(29, 23, 71, .14); }
.dl-start .seg button .vs-hard { font-size: 9.5px; color: var(--mute); opacity: 1; }
.dl-start #play-btns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin: 16px 0 10px; }
.dl-start #play-btns .btn { margin: 0; min-height: 56px; border-radius: 16px; font-size: 18px; }
.dl-start #solo-btn { background: var(--ink); color: #fff; box-shadow: 0 10px 24px rgba(29, 23, 71, .3); }
.dl-start #solo-btn:hover { background: #2c2468; }
.dl-start #multi-btn { background: var(--paper2); color: var(--ink); box-shadow: none; font-size: 16px; } .dl-start #multi-btn small { color: var(--mute); }
.dl-start #hg-btn { display: none; }
.dl-start .code-row { display: flex; gap: 8px; margin: 0 0 12px; }
.dl-start .code-row input { flex: 1; min-width: 0; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; letter-spacing: .1em; text-align: center; }
.dl-start .code-row .btn { margin: 0; height: 42px; padding: 0 14px; border-radius: 12px; font-size: 14px; background: var(--paper2); color: var(--ink); box-shadow: none; }
.dl-start #err { color: var(--straw); font-size: 13px; }
.dl-start .code-row input::placeholder { color: var(--mute); letter-spacing: .04em; }
.dl-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.dl-tools .btn { margin: 0; padding: 8px 2px; min-height: 0; border-radius: 12px; font-size: 12.5px; background: transparent; color: var(--ink2); border: 0; box-shadow: none; white-space: nowrap; }
.dl-tools .btn:hover { background: var(--paper); color: var(--ink); }
.dl-tools a.btn { display: none; }
@keyframes dlBob { 50% { transform: translate(-50%, 5px); } }
/* 종이 위 섹션 공통 */
.dl-worlds, .dl-story, .dl-fame, .dl-road, .dl-end, .dl-foot { background: var(--paper); }
.dl-head { padding: 0 0 36px; }
.dl-head h2, .dl-side h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.1; color: var(--ink); }
/* 다섯 세계: 벤토 */
.dl-worlds { padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(250px, auto); gap: 16px; }
.dl-worlds > .dl-head { grid-column: 1 / -1; }
.dl-world { position: relative; overflow: hidden; border-radius: 28px; background: var(--ink); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; isolation: isolate; box-shadow: 0 18px 40px rgba(29, 23, 71, .18); }
.dl-world:nth-of-type(1) { grid-column: span 2; min-height: 400px; }
.dl-world:nth-of-type(2) { grid-column: span 2; min-height: 400px; }
.dl-world:nth-of-type(3) { grid-column: span 2; min-height: 400px; }
.dl-world:nth-of-type(4) { grid-column: span 3; min-height: 340px; }
.dl-world:nth-of-type(5) { grid-column: span 3; min-height: 340px; }
.dl-pic { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.dl-world::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 25%, color-mix(in srgb, var(--wc) 25%, rgba(18, 12, 44, .55)) 55%, rgba(18, 12, 44, .92)); }
.dl-world:hover .dl-pic { transform: scale(1.05); }
.dl-txt { padding: 26px 26px 24px; }
.dl-no { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .06em; color: var(--wc); font-weight: 700; }
.dl-world h3 { font-size: clamp(26px, 2.6vw, 40px); }
.dl-txt > p:not(.dl-no) { margin: 10px 0 0; max-width: 560px; font-size: 14.5px; line-height: 1.7; color: rgba(255,255,255,.88); }
.dl-world .dl-txt > p:not(.dl-no) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dl-txt dl { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.dl-txt dl div { display: flex; flex-direction: column; } .dl-txt dt { order: 2; font-size: 11.5px; color: rgba(255,255,255,.65); } .dl-txt dd { margin: 0; font-family: 'Jua', sans-serif; font-size: 20px; color: #fff; }
.dl-link { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font-family: 'Jua', sans-serif; font-size: 15px; cursor: pointer; transition: transform .2s, background .2s; }
.dl-link::after { content: '→'; transition: transform .2s; }
.dl-link:hover { transform: translateY(-2px); background: var(--wc, var(--honey)); } .dl-link:hover::after { transform: translateX(3px); }
/* 기획 · 만든 방식: 옆 제목 + 큰 번호 */
.dl-story { padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(28px, 6vw, 96px); border-top: 1px solid var(--line); }
.dl-side { align-self: start; position: sticky; top: 90px; }
.dl-side > p:not(.dl-lab) { margin: 18px 0 0; color: var(--ink2); line-height: 1.7; }
.dl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 36px; counter-reset: s; }
.dl-steps li { counter-increment: s; font-size: 15px; line-height: 1.75; color: var(--ink2); }
.dl-steps li::before { content: '0' counter(s); display: block; margin-bottom: 10px; font-family: 'Jua', sans-serif; font-size: 56px; line-height: 1; background: linear-gradient(120deg, var(--straw), var(--grape) 60%, var(--soda)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dl-steps b { display: block; margin-bottom: 6px; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 22px; color: var(--ink); }
.dl-how .dl-steps li::before { background: linear-gradient(120deg, var(--orange), var(--honey)); -webkit-background-clip: text; background-clip: text; }
/* 숫자 띠 (짙은 남색) */
.dl-num { padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); background: var(--ink); color: #fff; overflow: hidden; }
.dl-num::before { content: ''; position: absolute; width: 60vw; height: 60vw; right: -20vw; top: -30vw; border-radius: 50%; background: radial-gradient(circle, rgba(139, 107, 255, .45), transparent 65%); pointer-events: none; }
.dl-num .dl-lab { color: #ffd1e3; } .dl-num .dl-head h2 { color: #fff; }
.dl-asof { margin: 14px 0 0; font-size: 13.5px; color: rgba(255,255,255,.6); }
.dl-big { margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.dl-big div { padding: 28px 24px 28px 0; border-top: 1px solid rgba(255,255,255,.14); }
.dl-big dd { margin: 0; font-family: 'Jua', sans-serif; font-size: clamp(48px, 6.4vw, 92px); line-height: 1; background: linear-gradient(120deg, #fff, #ffd1e3 50%, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dl-big dt { margin-top: 10px; font-size: 14.5px; color: rgba(255,255,255,.72); }
/* 명예의 전당 */
.dl-fame { padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(28px, 6vw, 96px); }
.dl-fame .dl-link { background: var(--ink); color: #fff; } .dl-fame .dl-link:hover { background: var(--grape); }
.dl-fame-list #fame { margin: 0; padding: 8px 0; max-width: none; background: none; border: 0; }
.dl-fame-list .fame-h { display: none; }
.dl-fame-list .fame-row { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 16px; }
.dl-fame-list .fame-rk { font-size: 24px; } .dl-fame-list .fame-nm { font-family: 'Jua', sans-serif; font-size: 19px; display: flex; align-items: center; gap: 8px; min-width: 110px; }
.dl-fame-list .fame-md { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-fame-list .empty { color: var(--mute); padding: 20px 0; }
/* 걸어온 길 */
.dl-road { padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); }
.dl-line { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); position: relative; }
.dl-line::before { content: ''; position: absolute; left: 0; right: 0; top: 9px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--straw), var(--orange), var(--grape), var(--soda), var(--honey)); }
.dl-line li { position: relative; padding: 36px 16px 0 0; display: flex; flex-direction: column; gap: 6px; }
.dl-line li::before { content: ''; position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); }
.dl-line time { font-family: 'Jua', sans-serif; font-size: 22px; color: var(--ink); }
.dl-line b { font-size: 15px; color: var(--ink); } .dl-line span { font-size: 13px; color: var(--mute); line-height: 1.55; }
/* 마지막 */
.dl-end { padding: clamp(90px, 13vw, 170px) 16px; text-align: center; overflow: hidden; }
.dl-end::before, .dl-end::after { content: ''; position: absolute; border-radius: 50%; filter: blur(10px); opacity: .55; pointer-events: none; animation: dlBlob 9s ease-in-out infinite alternate; }
.dl-end::before { width: 380px; height: 380px; left: 6%; top: 10%; background: radial-gradient(circle at 35% 35%, #ffc2d8, var(--straw) 70%); }
.dl-end::after { width: 320px; height: 320px; right: 8%; bottom: 6%; background: radial-gradient(circle at 35% 35%, #c8f0ff, var(--soda) 70%); animation-delay: -4s; }
@keyframes dlBlob { to { transform: translate(30px, -20px) scale(1.08); border-radius: 46% 54% 50% 50%; } }
.dl-end h2 { position: relative; z-index: 1; font-size: clamp(44px, 7vw, 100px); line-height: 1.08; color: var(--ink); }
.dl-btn { position: relative; z-index: 1; margin-top: 36px; padding: 18px 40px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-family: 'Jua', sans-serif; font-size: 22px; cursor: pointer; box-shadow: 0 16px 40px rgba(29, 23, 71, .35); transition: transform .2s, background .2s; }
.dl-btn::after { content: ' →'; } .dl-btn:hover { transform: translateY(-3px); background: var(--straw); }
.dl-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 26px clamp(16px, 4vw, 48px) 34px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--mute); }
/* 휴대폰 */
@media (max-width: 860px) {
  .dl-bar nav a:not(.dl-home) { display: none; }
  .dl-intro [data-slot="news"] { display: none; }
  /* 첫 화면 다섯 판: 위아래로 쌓은 띠, 누른 띠가 펼쳐진다 */
  .dl-hero { min-height: 0; }
  .dl-shade { display: none; }
  .dl-intro { order: -1; position: relative; padding: 88px 16px 16px; flex-direction: column; align-items: stretch; gap: 14px; pointer-events: auto; background: linear-gradient(180deg, rgba(16, 9, 42, .7), rgba(16, 9, 42, .25)); }
  .dl-hero h1 { font-size: clamp(34px, 10vw, 52px); }
  .dl-lead { font-size: 14.5px; margin-top: 10px; }
  .dl-intro-r { align-items: flex-start; } .dl-meta { justify-content: flex-start; } .dl-meta div { padding: 6px 11px; } .dl-meta dd { font-size: 19px; }
  /* 다섯 판 → 한 줄 사진 타일 다섯 개, 누르면 같은 팝업 */
  .dl-panes { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; min-height: 0; padding: 6px 12px 28px; }
  .dl-pane { min-height: 104px; padding: 8px 7px; border: 0; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
  .dl-pane.on { box-shadow: inset 0 0 0 2.5px var(--wc); }
  .dl-pane::before { background-size: cover; background-position: center 42%; }
  .dl-pane-hd i { font-size: 11px; } .dl-pane.on .dl-pane-hd i::after { content: none; }
  .dl-pane-hd b { font-size: 14px; line-height: 1.2; }
  .dl-pane-hd em, .dl-pane-hd small, .dl-pane-more { display: none; }
  .dl-modal { padding: 64px 8px 12px; align-items: flex-end; }
  .dl-modal-h { padding: 14px 14px 2px; } .dl-modal-h small { display: none; }
  .dl-modal .dl-start { padding: 8px 14px 14px; }
  .dl-start { max-width: none; padding: 16px 14px 12px; border-radius: 20px; }
  .dl-cue { display: none; }
  .dl-worlds { grid-template-columns: 1fr; }
  .dl-world, .dl-world:nth-of-type(n) { grid-column: auto; grid-row: auto; min-height: 380px; }
  .dl-story, .dl-fame { grid-template-columns: 1fr; }
  .dl-side { position: static; }
  .dl-steps { grid-template-columns: 1fr; gap: 30px; }
  .dl-big { grid-template-columns: 1fr 1fr; }
  .dl-line { grid-template-columns: 1fr; gap: 22px; padding-left: 30px; }
  .dl-line::before { left: 7px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; background: linear-gradient(180deg, var(--straw), var(--orange), var(--grape), var(--soda), var(--honey)); }
  .dl-line li { padding: 0; } .dl-line li::before { left: -30px; top: 3px; }
  .dl-end::before { width: 220px; height: 220px; } .dl-end::after { width: 200px; height: 200px; }
}
@media (prefers-reduced-motion: reduce) { .dl-cue, .dl-end::before, .dl-end::after { animation: none; } body:not(.toss) #title { scroll-behavior: auto; } }
.dl #map-pick { display: none !important; }

.dl-line li.now::before { border-color: var(--straw); background: var(--straw); box-shadow: 0 0 0 6px rgba(255, 95, 143, .2); }
.dl-line li.now time { color: var(--straw); }
