/* 오락실：车站大厅的摊位、弹窗游戏、排行榜、车厢入口、站点页面的“기록 보유자” */
:root { --arc: #6A3D87; --arc-d: #4B2A63; --ink: #3A2C35; --paper: #FBF4E6; --gold: #E2B23A; --silver: #AEB7C2; --bronze: #C98A55; }

/* ---------- 车站大厅的摊位 ---------- */
.booth.arcade .aw { background: repeating-linear-gradient(90deg, var(--arc) 0 22px, #F7EDDC 22px 44px); }
.booth.arcade .aw::after { background: radial-gradient(circle at 11px 0, var(--arc) 10px, transparent 11px) 0 0 / 44px 8px repeat-x, radial-gradient(circle at 33px 0, #F7EDDC 10px, transparent 11px) 0 0 / 44px 8px repeat-x; }
.gico { display: block; flex: none; border-radius: 12px; box-shadow: 0 4px 10px -6px rgba(0,0,0,.5); }
.arc-gm { display: flex; gap: 10px; align-items: center; margin: 2px 0 8px; }
.arc-gm b { display: block; font-size: 14.5px; } .arc-gm small { display: block; opacity: .6; font-size: 12px; }
.arc-cd { font-size: 12.5px; opacity: .8; margin: 0 0 6px; } .arc-cd b, [data-cd] { font-variant-numeric: tabular-nums; }
.arc-mini { list-style: none; padding: 0; margin: 4px 0 8px; min-height: 20px; }
.arc-mini li { display: flex; gap: 6px; align-items: center; font-size: 12.5px; padding: 2px 0; }
.arc-mini li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-mini li b { font-variant-numeric: tabular-nums; }
.arc-me { font-size: 12px; font-weight: 600; color: var(--arc); }
.booth.arcade .arc-go { border: 0; border-radius: 999px; padding: 10px 16px; background: linear-gradient(180deg, #7D4C9C, var(--arc)); color: #FFF6EC; font-weight: 700; width: 100%; box-shadow: 0 3px 0 var(--arc-d); }
.booth.arcade .arc-go:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--arc-d); }
.arc-also, .arc-lab { display: block; width: 100%; margin-top: 8px; border: 0; background: none; color: var(--arc); font-size: 12.5px; font-weight: 600; text-decoration: underline; }
.arc-lab { color: #2B4E86; }
.arc-empty { opacity: .6; font-size: 13px; } .arc-empty.sm { font-size: 12px; margin: 4px 0 8px; }
.crown { vertical-align: -3px; flex: none; }

/* ---------- 弹窗：像一台小游戏机 ---------- */
.arc-bg { position: fixed; inset: 0; z-index: 60; background: rgba(30,22,28,.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 10px; animation: arcFade .2s ease; }
html.arc-lock, html.arc-lock body { overscroll-behavior: none; }
@keyframes arcFade { from { opacity: 0; } }
.arc { width: min(540px, 100%); max-height: calc(100dvh - 20px); overflow: auto; background: var(--paper); color: var(--ink); border-radius: 22px; box-shadow: 0 0 0 4px var(--arc-d), 0 24px 60px -20px rgba(0,0,0,.7); overscroll-behavior: contain; animation: arcPop .25s cubic-bezier(.2,1.3,.4,1); }
@keyframes arcPop { from { transform: scale(.94) translateY(10px); opacity: 0; } }
.arc header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(180deg, #7D4C9C, var(--arc-d)); color: #FFF6EC; }
.arc header .hico { display: grid; place-items: center; font-size: 26px; }
.arc header .hico .gico { box-shadow: 0 0 0 2px rgba(255,255,255,.35); border-radius: 10px; }
.arc header .ht { flex: 1; min-width: 0; } .arc header small { display: block; font-size: 11.5px; opacity: .75; letter-spacing: .02em; } .arc header b { font-size: 18px; letter-spacing: -.01em; }
.arc header .x { border: 0; background: rgba(255,255,255,.16); color: inherit; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; flex: none; }
.arc .bulbs { position: sticky; top: 60px; z-index: 2; height: 8px; background: radial-gradient(circle, #FFE7A8 2.2px, transparent 2.8px) 4px 50% / 16px 8px repeat-x, var(--arc-d); animation: bulbs 1.2s steps(2) infinite; }
@keyframes bulbs { 50% { background-position: 12px 50%, 0 0; } }
.arc-body { padding: 16px 16px 20px; }

/* 玩法说明 */
.arc-hero { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 6px 16px -12px rgba(0,0,0,.4); }
.arc-hero .tag { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--arc); }
.arc-hero .steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.arc-hero .steps li { counter-increment: s; position: relative; padding-left: 26px; margin: 0 0 6px; font-size: 13.5px; line-height: 1.45; }
.arc-hero .steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #FFF6EC; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.arc-rule { margin: 10px 2px 12px; font-size: 12px; opacity: .65; line-height: 1.5; }
.arc-state { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0 10px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(106,61,135,.1); color: var(--arc); white-space: nowrap; }
.pill.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #E0603F; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.pill.final { background: var(--ink); color: #FFF6EC; } .pill.new { background: var(--gold); color: var(--ink); }

/* 排行榜：领奖台 + 列表 */
.arc-podium { display: grid; grid-template-columns: 1fr 1.1fr 1fr; align-items: end; gap: 8px; margin: 6px 0 10px; }
.arc-podium .pd { position: relative; text-align: center; padding: 10px 6px 30px; border-radius: 14px 14px 6px 6px; background: #fff; min-width: 0; box-shadow: 0 6px 14px -10px rgba(0,0,0,.45); }
.arc-podium .pd b { display: block; font-size: 13px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-podium .pd small { display: block; font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.arc-podium .pd i { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; line-height: 22px; font-style: normal; font-weight: 800; color: #fff; border-radius: 0 0 6px 6px; }
.arc-podium .r1 { padding-top: 16px; background: #FFF6DA; } .arc-podium .r1 i { background: var(--gold); height: 30px; line-height: 30px; }
.arc-podium .r2 i { background: var(--silver); } .arc-podium .r3 i { background: var(--bronze); }
.arc-podium .pd.me { box-shadow: 0 0 0 2.5px var(--arc), 0 6px 14px -10px rgba(0,0,0,.45); }
.arc-podium .pd.none { opacity: .35; min-height: 60px; }
.arc-lb { list-style: none; margin: 0; padding: 0; border-radius: 12px; overflow: hidden; background: #fff; }
.arc-lb li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 14px; border-top: 1px solid rgba(58,44,53,.07); }
.arc-lb li:first-child { border-top: 0; }
.arc-lb li.me { box-shadow: inset 4px 0 0 var(--arc); font-weight: 700; background: rgba(106,61,135,.05); }
.arc-lb li.gap { border-top: 2px dashed rgba(58,44,53,.15); }
.arc-lb .rk { width: 24px; text-align: center; font-variant-numeric: tabular-nums; opacity: .7; font-weight: 700; }
.arc-lb .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .arc-lb .nm i { font-style: normal; font-size: 11px; color: var(--arc); }
.arc-lb .sc { font-variant-numeric: tabular-nums; font-weight: 600; }
.arc-tot { font-size: 12px; opacity: .55; margin: 6px 2px 0; text-align: right; }
.arc-empty-box { text-align: center; padding: 18px 10px; background: #fff; border-radius: 14px; } .arc-empty-box .gico { margin: 0 auto 8px; } .arc-empty-box p { margin: 0; opacity: .7; font-size: 13.5px; }

.arc-acts { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.arc-acts .btn { flex: 1; }
.arc-need { width: 100%; margin: 0; font-size: 13px; opacity: .75; }
.arc .btn { border-radius: 14px; font-weight: 600; }
.arc .btn.primary { background: linear-gradient(180deg, #7D4C9C, var(--arc)); box-shadow: 0 3px 0 var(--arc-d); }
.arc .btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--arc-d); }
.arc .btn.big { flex: 2; font-size: 16px; font-weight: 800; padding: 15px; }
.arc .btn.sm { flex: none; padding: 9px 14px; font-size: 14px; }
.arc-load, .arc-err { text-align: center; padding: 30px 0; opacity: .7; }
.arc-fail { text-align: center; padding: 30px 10px 6px; } .arc-fail p { font-size: 16px; font-weight: 700; margin: 0; }

/* 成绩：车票样式（左右打孔） */
.arc-ticket { position: relative; text-align: center; padding: 18px 16px 16px; background: #fff; border-radius: 14px; box-shadow: 0 8px 20px -14px rgba(0,0,0,.5);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 10px, #000 10.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 10px, #000 10.5px) right / 51% 100% no-repeat;
          mask: radial-gradient(circle at 0 50%, transparent 10px, #000 10.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 10px, #000 10.5px) right / 51% 100% no-repeat; }
.arc-ticket::before { content: ''; position: absolute; left: 16px; right: 16px; top: 8px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--arc) 0 10px, transparent 10px 16px); opacity: .25; }
.arc-ticket.r1 { background: linear-gradient(180deg, #FFF6DA, #fff); } .arc-ticket.r2 { background: linear-gradient(180deg, #F2F5F8, #fff); } .arc-ticket.r3 { background: linear-gradient(180deg, #FBEFE3, #fff); }
.arc-ticket small { display: block; opacity: .55; font-size: 12px; letter-spacing: .04em; }
.arc-ticket .big { display: block; font-size: 42px; font-weight: 900; letter-spacing: -.03em; margin: 2px 0 8px; font-variant-numeric: tabular-nums; animation: bigIn .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes bigIn { from { transform: scale(.6); opacity: 0; } }
.arc-ticket .rk { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; margin: 10px 0 0; font-size: 14.5px; }
.arc-ticket > .crown { display: block; margin: 0 auto 4px; }
.arc-extra { display: grid; gap: 10px; margin: 12px 0; }
.arc-extra:empty { display: none; }
.arc-card { background: #fff; border-radius: 14px; padding: 12px; font-size: 13.5px; }
.arc-card p { margin: 0 0 8px; line-height: 1.5; }
.arc-card .row { display: flex; gap: 8px; align-items: center; }
.arc-card input, .arc-card textarea { flex: 1; min-width: 0; width: 100%; border: 1.5px solid rgba(58,44,53,.18); border-radius: 10px; padding: 10px; font: inherit; background: #FFFCF6; resize: none; }
.arc-card input:focus, .arc-card textarea:focus { outline: 0; border-color: var(--arc); }
.arc-card.note textarea { margin-bottom: 8px; }
.arc-card .msg { flex: 1; font-size: 12.5px; color: var(--arc); margin: 6px 0 0; }
.arc-card .row .msg { margin: 0; }
.arc-card .link { margin-top: 6px; }
.arc-card.note.r1 { box-shadow: inset 0 0 0 2px var(--gold); } .arc-card.note.r2 { box-shadow: inset 0 0 0 2px var(--silver); } .arc-card.note.r3 { box-shadow: inset 0 0 0 2px var(--bronze); }
.arc-card .hint { opacity: .7; font-size: 12.5px; }
.arc-play { position: relative; }
.arc-sending { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(251,244,230,.6); font-size: 24px; border-radius: 14px; }

/* 通关画面上的成绩浮层（半透明，下面还能看到铺好的铁轨）+ 分享图预览 */
.arc-ov { position: absolute; inset: -6px; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 12px; border-radius: 18px; background: rgba(251,244,230,.28); animation: arcFade .3s ease; }
.arc-play:has(.arc-ov) .sn-end, .arc-play:has(.arc-ov) .nm-win .tok { display: none; }   /* 成绩浮层出来后：꼬리 기차 的结束提示、窗外还在的字都收起来 */
.arc-ov.tall { align-items: flex-start; padding-top: 40px; } .arc-ov.tall .arc-ov-card { position: sticky; top: 84px; }
.arc-ov-card { width: min(100%, 360px); text-align: center; padding: 18px 16px 16px; border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: 0 14px 34px -16px rgba(0,0,0,.55); animation: arcPop .35s cubic-bezier(.2,1.3,.4,1); }
.arc-ov-card.r1 { background: linear-gradient(180deg, rgba(255,246,218,.94), rgba(255,255,255,.88)); }
.arc-ov-card.r2 { background: linear-gradient(180deg, rgba(242,245,248,.94), rgba(255,255,255,.88)); }
.arc-ov-card.r3 { background: linear-gradient(180deg, rgba(251,239,227,.94), rgba(255,255,255,.88)); }
.arc-ov-card small { display: block; opacity: .55; font-size: 12px; letter-spacing: .04em; }
.arc-ov-card .big { display: block; font-size: 44px; font-weight: 900; letter-spacing: -.03em; margin: 2px 0 8px; font-variant-numeric: tabular-nums; animation: bigIn .5s cubic-bezier(.2,1.4,.4,1); }
.arc-ov-card .rk { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; margin: 8px 0 0; font-size: 14px; }
.arc-ov-card .arc-acts { margin-top: 12px; }
.arc .btn.share { display: block; width: 100%; margin-top: 14px; padding: 13px; border: 0; font-size: 15.5px; font-weight: 800; color: var(--ink); background: linear-gradient(180deg, #F3C95A, var(--gold)); box-shadow: 0 3px 0 #B88A1E; }
.arc .btn.share:active { transform: translateY(2px); box-shadow: 0 1px 0 #B88A1E; }
.arc-ov-card.pre { padding: 12px; } .arc-ov-card.pre > .arc-acts { display: none; }
.arc-ov-pre img { display: block; width: 100%; max-height: 56dvh; object-fit: contain; border-radius: 10px; box-shadow: 0 6px 16px -10px rgba(0,0,0,.5); -webkit-touch-callout: default; }
.arc-ov-pre p { font-size: 12.5px; opacity: .7; margin: 8px 0 0; }
.arc-ov-pre .arc-acts { margin-top: 10px; } .arc-ov-pre [data-a=back] { flex: none; padding: 0 16px; }

/* 试玩列表 */
.arc-labgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.arc-labgrid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px 14px; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 6px 16px -12px rgba(0,0,0,.45); color: inherit; }
.arc-labgrid button:active { transform: scale(.97); }
.arc-labgrid b { font-size: 15px; } .arc-labgrid small { font-size: 11.5px; opacity: .6; }

/* ---------- 游戏共用 ---------- */
.g-hud { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.g-hud .pill { font-size: 14px; padding: 6px 12px; background: #fff; color: var(--ink); box-shadow: 0 3px 10px -7px rgba(0,0,0,.4); }
.g-hud .pill b { font-variant-numeric: tabular-nums; min-width: 2.2em; text-align: right; }
.g-hud .pill.pen { background: #FBE3DC; color: #B5383A; }

/* 선로 잇기 */
.rl-legend { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 6px; font-size: 12px; }
.rl-legend li { display: flex; align-items: center; gap: 4px; padding: 3px 8px 3px 3px; background: #fff; border-radius: 999px; transition: .2s; }
.rl-legend b { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #FFF6EC; font-size: 11px; display: grid; place-items: center; }
.rl-legend li:first-child b { background: #C4553F; } .rl-legend li:last-child b { background: #2B4E86; }
.rl-legend li.on { opacity: .45; } .rl-legend li.next { box-shadow: 0 0 0 2px var(--gold); font-weight: 700; }
.rl-board { width: min(100%, 440px); margin: 0 auto; aspect-ratio: 1; background: linear-gradient(135deg, #A47450, #7E5638); border-radius: 18px; padding: 8px; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 10px 22px -14px rgba(0,0,0,.6); }
.rl-svg { width: 100%; height: 100%; display: block; touch-action: none; background: #CFC2A6; border-radius: 12px; }
.rl-cell { fill: #EEF0D8; transition: fill .2s; } .rl-cell.alt { fill: #E6EACF; }
.rl-cell.empty { fill: #FBE3B2; animation: emptyPulse 1s ease-in-out infinite; }
@keyframes emptyPulse { 50% { fill: #F6C978; } }
.rl-track polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.rl-track .bed { stroke: #C9B79A; stroke-width: .5; }
.rl-track .ties { stroke: #7A5A43; stroke-width: .42; stroke-dasharray: .07 .12; stroke-linecap: butt; }
.rl-track .rail { stroke: #3B3238; stroke-width: .25; }
.rl-track .gap { stroke: #C9B79A; stroke-width: .13; }
.rl-walls line { stroke: #5A3C2A; stroke-width: .13; stroke-linecap: round; }
.rl-cp .halo { fill: none; stroke: transparent; stroke-width: .06; }
.rl-cp .disc { fill: var(--ink); stroke: #FFF6EC; stroke-width: .05; }
.rl-cp text { fill: #FFF6EC; font-size: .32px; font-weight: 800; font-family: system-ui, sans-serif; pointer-events: none; }
.rl-cp.first .disc { fill: #C4553F; } .rl-cp.last .disc { fill: #2B4E86; }
.rl-cp.on .halo { stroke: var(--gold); }
.rl-cp.next .halo { stroke: var(--gold); animation: halo 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 50% { transform: scale(1.18); opacity: .4; } }
.rl-cp.nope .disc { animation: nope .35s; } @keyframes nope { 30%, 70% { fill: #E0603F; } }
.rl-train { pointer-events: none; }
.rl-board.win .rl-svg { background: #E2B23A; }
.rl-board.win .rl-cell { fill: #FFF3CF; }
.rl-board.nudge { animation: rlNudge .3s; }
@keyframes rlNudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.rl-hint { min-height: 1.4em; text-align: center; font-size: 13.5px; margin: 10px 0 4px; font-weight: 600; }
.rl-hint.warn { color: #B5383A; }
.rl-bar { display: flex; justify-content: center; gap: 8px; }
.rl-bar button, .gp-bar button { border: 0; border-radius: 999px; padding: 9px 14px; background: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 3px 10px -7px rgba(0,0,0,.4); color: inherit; }

/* 높이 쌓기 */
.sk { position: relative; border-radius: 16px; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; box-shadow: 0 10px 22px -14px rgba(0,0,0,.6); }
.sk canvas { display: block; width: 100%; cursor: pointer; }
.sk-hud { position: absolute; left: 0; right: 0; top: 12px; text-align: center; pointer-events: none; }
.sk-n { display: block; font-size: 52px; line-height: 1; font-weight: 900; color: #fff; text-shadow: 0 3px 0 rgba(58,44,53,.35); font-variant-numeric: tabular-nums; }
.sk-n.bump { animation: bump .25s; } @keyframes bump { 40% { transform: scale(1.18); } }
.sk-hud small { display: block; font-size: 12px; font-weight: 700; color: #fff; opacity: .9; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.sk-pf { display: inline-block; margin-top: 6px; font-weight: 900; color: #fff; background: var(--arc); padding: 2px 10px; border-radius: 999px; min-height: 0; }
.sk-pf:empty { display: none; }
.sk-pf.pop { animation: skPop .5s ease; }
@keyframes skPop { 0% { transform: scale(.6); opacity: 0; } 40% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.sk-tap { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; font-size: 20px; font-weight: 800; color: #FFF6EC; background: rgba(58,44,53,.35); border: 0; }
.sk-tap span { font-size: 40px; animation: tapHint 1s ease-in-out infinite; } @keyframes tapHint { 50% { transform: translateY(6px); } }
.sk-tap[hidden] { display: none; }
.sk.over canvas { filter: saturate(.6); transition: filter .6s; }

/* 창밖 역 이름 */
.nm-target { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; margin-bottom: 10px; }
.nm-target .grp { text-align: center; } .nm-target .grp small { display: block; font-size: 11px; opacity: .6; margin-top: 2px; }
.nm-target .chars { display: flex; gap: 3px; }
.nm-target i { width: 32px; height: 36px; border-radius: 8px; background: #fff; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 18px; color: rgba(58,44,53,.22); box-shadow: inset 0 -3px 0 rgba(58,44,53,.08); transition: .2s; }
.nm-target i.cur { box-shadow: 0 0 0 2.5px var(--gold); color: rgba(58,44,53,.45); }
.nm-target i.ok { background: var(--arc); color: #fff; transform: translateY(-2px); }
.nm-target .arrow { opacity: .35; font-weight: 700; }
.nm-target.win i { background: var(--gold); color: var(--ink); }
.nm-win { position: relative; height: min(52vh, 320px); border-radius: 26px; overflow: hidden; background: linear-gradient(180deg, #9FC9DC, #F1E3CB 75%); box-shadow: inset 0 0 0 10px #3A2C35, inset 0 0 0 13px #8E7A70, 0 10px 22px -14px rgba(0,0,0,.6); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.nm-win .hills { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: radial-gradient(ellipse 30% 70% at 20% 100%, #7E9A55 98%, transparent) 0 0 / 50% 100% repeat-x, radial-gradient(ellipse 40% 60% at 70% 100%, #8FAE66 98%, transparent) 0 0 / 60% 100% repeat-x; }
.nm-win.t-coast .hills, .nm-win.t-harbor .hills { background: linear-gradient(180deg, #5E9BB3, #4A86A0); height: 26%; }
.nm-win.t-desert .hills { background: radial-gradient(ellipse 35% 60% at 30% 100%, #E0B07C 98%, transparent) 0 0 / 55% 100% repeat-x; }
.nm-win.t-mountain .hills, .nm-win.t-valley .hills { height: 46%; background: linear-gradient(135deg, transparent 49%, #8C98A4 50%) 0 100% / 90px 90px repeat-x, linear-gradient(225deg, transparent 49%, #8C98A4 50%) 0 100% / 90px 90px repeat-x; }
.nm-win.go .hills { animation: scroll 9s linear infinite; }
.nm-win .poles { position: absolute; left: 0; right: 0; bottom: 0; top: 0; background: linear-gradient(90deg, transparent 0 46%, #4A3A43 46% 48%, transparent 48%) 0 0 / 220px 100% repeat-x; opacity: .5; pointer-events: none; }
.nm-win.go .poles { animation: scroll 1.1s linear infinite; }
@keyframes scroll { to { background-position-x: -220px; } }
.nm-win .lanes { position: absolute; inset: 0; }
.nm-win .tok { position: absolute; left: 0; width: 54px; height: 54px; margin-left: -27px; border-radius: 50%; border: 0; background: #FFF6EC; color: var(--ink); font-size: 24px; font-weight: 800; box-shadow: 0 0 0 3px #fff, 0 6px 12px -6px rgba(0,0,0,.5); will-change: transform; touch-action: manipulation; }
.nm-win .tok.good { background: var(--arc); color: #fff; transition: opacity .25s, scale .25s; opacity: 0; scale: 1.4; }
.nm-win .tok.bad { background: #E0603F; color: #fff; animation: shake .35s; }
.nm-win .float { position: absolute; font-weight: 900; color: #B5383A; animation: floatUp .8s ease-out forwards; pointer-events: none; }
@keyframes floatUp { to { transform: translateY(-40px); opacity: 0; } }
.nm-start { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; border: 0; background: rgba(58,44,53,.35); color: #FFF6EC; font-size: 20px; font-weight: 800; }
.nm-start span { font-size: 40px; animation: tapHint 1s ease-in-out infinite; }
.nm-hint { text-align: center; font-size: 12.5px; opacity: .6; margin: 10px 0 0; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* 네 묶음 */
.gp-dots { display: inline-flex; gap: 4px; } .gp-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(58,44,53,.15); } .gp-dots i.on { background: var(--arc); }
.gp-solved { display: grid; gap: 6px; margin-bottom: 6px; }
.gp-solved .row { background: var(--c); border-radius: 12px; padding: 10px 12px; text-align: center; animation: arcPop .35s; }
.gp-solved .row b { display: block; font-size: 14px; } .gp-solved .row span { font-size: 12.5px; }
.gp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gp-grid button { aspect-ratio: 1 / .78; border: 0; border-radius: 12px; background: #EFE3CC; color: var(--ink); padding: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; min-width: 0; transition: transform .1s, background .15s; }
.gp-grid button b { font-size: clamp(11px, 3.3vw, 14px); word-break: keep-all; overflow-wrap: anywhere; }
.gp-grid button small { font-size: 10.5px; opacity: .55; margin-top: 2px; }
.gp-grid button.on { background: var(--ink); color: #FFF6EC; transform: scale(.96); }
.gp-grid button.shake { animation: shake .4s; }
.gp-msg { min-height: 1.3em; text-align: center; font-weight: 700; font-size: 13.5px; margin: 10px 0 4px; color: var(--arc); }
.gp-bar { display: flex; justify-content: center; gap: 8px; }
.gp-bar .go { background: var(--ink); color: #FFF6EC; }
.gp-bar .go:disabled { opacity: .35; }

/* 地图（숨은 역 찾기） */
.geo { display: block; width: 100%; height: auto; border-radius: 14px; background: #BFD6E0; touch-action: manipulation; }
.geo .sea { fill: #BFD6E0; }
.geo .grat { stroke: #fff; opacity: .45; fill: none; }
.geo .land path { fill: #EFE3CC; stroke: #B9A487; stroke-linejoin: round; }
.geo text { font: 700 10px system-ui, sans-serif; fill: var(--ink); paint-order: stroke; stroke: #FFF6EC; stroke-width: 3px; }
.geo .here circle { fill: #2B4E86; stroke: #fff; stroke-width: 2; }
.geo .truth circle { fill: #2B4E86; stroke: #fff; stroke-width: 2; }
.geo .gs circle { stroke: #fff; stroke-width: 1.6; }
.ms-ask { text-align: center; font-size: 13.5px; margin: 0 0 10px; font-weight: 600; }
.ms-map { border-radius: 16px; overflow: hidden; box-shadow: 0 10px 22px -14px rgba(0,0,0,.6); min-height: 160px; }
.ms-map .geo { cursor: pointer; }
.geo .cd circle { fill: #FFF6EC; stroke: #3A2C35; stroke-width: 1.3; }
.geo .sel circle { fill: none; stroke: var(--arc); stroke-width: 2.6; }
.geo .sel text { fill: var(--arc); }
.ms-last { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; margin: 8px 0 6px; padding: 6px 12px; border-radius: 12px; background: #fff; font-size: 13.5px; box-shadow: 0 4px 10px -8px rgba(0,0,0,.5); }
.ms-last > span:only-child { font-size: 12px; opacity: .6; background: none; }
.ms-last .km { font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--h) 30%, #fff); }
.ms-last .dir { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; transform: rotate(var(--d)); }
.ms-last .note { font-size: 11px; opacity: .55; }
.ms-last.in { animation: arcPop .3s; }
/* 50 个站名排成一行，左右滑着找 */
.ms-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.ms-chips button { flex: none; scroll-snap-align: center; border: 1.5px solid rgba(58,44,53,.18); background: #fff; color: inherit; border-radius: 999px; padding: 8px 13px; font: inherit; font-size: 13.5px; font-weight: 600; display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.ms-chips button.on { background: var(--arc); border-color: var(--arc); color: #fff; }
.ms-chips button.used { border-color: var(--h); background: color-mix(in srgb, var(--h) 22%, #fff); opacity: .9; }
.ms-chips button small { font-size: 11px; font-weight: 700; opacity: .75; font-variant-numeric: tabular-nums; }
.ms-go { display: block; width: 100%; margin: 10px 0 0; border: 0; border-radius: 14px; padding: 14px; background: var(--ink); color: #FFF6EC; font: inherit; font-size: 15px; font-weight: 800; box-shadow: 0 4px 0 #1E161C; }
.ms-go:disabled { opacity: .35; box-shadow: none; }
.ms-go:not(:disabled):active { transform: translateY(2px); box-shadow: 0 2px 0 #1E161C; }
.ms-msg { min-height: 1.2em; text-align: center; font-weight: 700; color: var(--arc); margin: 6px 0; }
.ms-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ms-list li { display: grid; grid-template-columns: 1fr auto 26px; grid-template-rows: auto 6px; gap: 4px 10px; align-items: center; background: #fff; border-radius: 12px; padding: 9px 12px; animation: arcPop .3s; }
.ms-list .km { font-weight: 700; font-variant-numeric: tabular-nums; }
.ms-list .dir { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 900; transform: rotate(var(--d)); }
.ms-list .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(58,44,53,.08); overflow: hidden; } .ms-list .bar i { display: block; height: 100%; border-radius: 3px; }
.ms-list li.hit { background: #FFF6DA; box-shadow: 0 0 0 2px var(--gold); grid-template-columns: 1fr auto; }

/* ---------- 车厢里的入口：已经开走、还没封盘的站 ---------- */
.arc-chip { position: absolute; left: 14px; bottom: 14px; z-index: 4; border: 0; border-radius: 999px; padding: 8px 14px; background: rgba(106,61,135,.92); color: #FFF6EC; font-size: 13px; font-weight: 600; box-shadow: 0 8px 18px -10px rgba(0,0,0,.6); }
.arc-chip[hidden] { display: none; }
body.fs .arc-chip { display: none; }

/* ---------- 내 승차권 ---------- */
.arc-nickline { font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.arc-nickline .link { margin: 0; display: inline; }
.arc-honors { list-style: none; padding: 0; margin: 6px 0 0; }
.arc-honors li { display: flex; gap: 8px; align-items: center; padding: 6px 0; font-size: 14px; }
.arc-honors li span { font-weight: 600; } .arc-honors li small { flex: 1; opacity: .6; }
.arc-honors .link { margin: 0; display: inline; }
.arc-wallet:empty { display: none; }
.arc-wallet .arc-card { margin-top: 8px; background: rgba(58,44,53,.04); }

/* ---------- 站点页面、车站大厅：기록 보유자（封盘后永久） ---------- */
.arc-crowns { margin: 0 0 14px; }
.arc-crowns h3 { font-size: 15px; margin: 0 0 8px; } .arc-crowns h3 small { font-weight: 400; opacity: .6; font-size: 12px; margin-left: 4px; }
.cc-wall .arc-crowns h3 { color: #FFF6EC; }
.arc-crowns .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.arc-crowns .cn { background: #FFFCF4; border-radius: 6px; padding: 12px 10px; text-align: center; box-shadow: 0 6px 14px -10px rgba(0,0,0,.5); border: 3px solid var(--gold); }
.arc-crowns .cn.r2 { border-color: var(--silver); } .arc-crowns .cn.r3 { border-color: var(--bronze); }
.arc-crowns .cn.r1 { transform: translateY(-4px); }
.arc-crowns .cn b { display: block; margin-top: 4px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-crowns .cn small { display: block; opacity: .6; font-size: 12px; }
.arc-crowns .cn p { margin: 8px 0 0; font-size: 13px; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 520px) { .arc-crowns .cards { grid-template-columns: 1fr; } .arc-crowns .cn.r1 { transform: none; } }
@media (max-width: 420px) { .arc-body { padding: 14px 12px 18px; } .arc-ticket .big { font-size: 36px; } .nm-target i { width: 28px; height: 32px; font-size: 16px; } }

/* 꼬리 기차 */
.sn-board { position: relative; width: min(100%, 400px); margin: 0 auto; aspect-ratio: 1; border-radius: 16px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 0 0 4px #3A2C35, 0 10px 22px -14px rgba(0,0,0,.6); }
.sn-board canvas { display: block; touch-action: none; }
.sn-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 0; background: rgba(30,22,28,.35); color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
.sn-start span { font-size: 40px; animation: arcPop 1s infinite alternate; }
.sn-board.crash { animation: shake .4s; }
.sn-end { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(30,22,28,.35); }
.sn-end b { background: #FFF6EC; color: var(--ink); border-radius: 14px; padding: 10px 18px; font-size: 18px; font-weight: 900; box-shadow: 0 6px 0 #3A2C35; animation: arcPop .3s; }
.sn-hint { text-align: center; font-size: 12px; opacity: .6; margin: 8px 0 6px; }
.sn-pad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(2, 46px); gap: 6px; justify-content: center; touch-action: none; }
.sn-pad button { border: 0; border-radius: 12px; background: var(--ink); color: #FFF6EC; font-size: 18px; box-shadow: 0 4px 0 #1E161C; touch-action: none; user-select: none; -webkit-user-select: none; }
.sn-pad button.hit { transform: translateY(3px); box-shadow: 0 1px 0 #1E161C; }
.sn-pad [data-d="3"] { grid-column: 2; } .sn-pad [data-d="2"] { grid-row: 2; grid-column: 1; } .sn-pad [data-d="1"] { grid-row: 2; grid-column: 2; } .sn-pad [data-d="0"] { grid-row: 2; grid-column: 3; }

/* 字数（和 notes.css 一样） */
.arc-card .ncount { display: block; text-align: right; font-size: 11px; opacity: .5; margin: 2px 2px 4px; font-variant-numeric: tabular-nums; }
.arc-card .ncount.bad { color: #C4553F; opacity: 1; }
.arc-card button:disabled { opacity: .45; }

/* ---------- 页面顶部通知条（public/js/arcbar.js，车站页和车厢共用） ---------- */
.arcbar { position: relative; z-index: 30; display: flex; align-items: center; gap: 10px; background: linear-gradient(180deg, #5A3478, #4B2A63); color: #FFF6EC; padding: max(9px, env(safe-area-inset-top)) 12px 15px 16px; font-size: 14px; line-height: 1.35; overflow: hidden; }
.arcbar button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; padding: 0; }
.arcbar.in { animation: arcbarIn .5s cubic-bezier(.2,1.2,.4,1); }
@keyframes arcbarIn { from { transform: translateY(-100%); } }
.arcbar-i { font-size: 22px; flex: none; animation: arcbarWiggle 3.2s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes arcbarWiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-14deg); } 84% { transform: rotate(12deg); } 92% { transform: rotate(-6deg); } }
.arcbar-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.arcbar-main { display: flex; flex-direction: column; }
.arcbar-main b { font-weight: 700; }
.arcbar-main small { font-size: 12.5px; opacity: .8; font-variant-numeric: tabular-nums; }
.arcbar .arcbar-also { color: #FFE7A8; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.arcbar .arcbar-also:hover { text-decoration: underline; }
.arcbar .arcbar-go { flex: none; background: #E2B23A; color: #3A2C35; font-weight: 700; padding: 7px 14px; border-radius: 999px; white-space: nowrap; box-shadow: 0 0 0 0 rgba(226,178,58,.7); animation: arcbarPulse 2.4s ease-out infinite; }
@keyframes arcbarPulse { 0% { box-shadow: 0 0 0 0 rgba(226,178,58,.65); } 70%, 100% { box-shadow: 0 0 0 10px rgba(226,178,58,0); } }
.arcbar .arcbar-x { flex: none; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,246,236,.12); font-size: 20px; line-height: 1; text-align: center; }
/* 底边一排像游戏厅招牌一样流动的灯泡 */
.arcbar-bulbs { position: absolute; left: 0; right: 0; bottom: 3px; height: 6px; background: radial-gradient(circle, #FFE7A8 2.2px, transparent 2.8px) 0 0 / 16px 6px repeat-x; animation: arcbarRun 1.2s linear infinite; opacity: .9; }
.arcbar-bulbs::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, #FFB347 2.2px, transparent 2.8px) 8px 0 / 16px 6px repeat-x; animation: arcbarBlink 1.2s steps(2) infinite; }
@keyframes arcbarRun { to { background-position: 16px 0; } }
@keyframes arcbarBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .arcbar, .arcbar *, .arcbar-bulbs::after { animation: none !important; } }
/* 车厢页面：车厢占满一屏，通知条出现时让出它的高度 */
.arcbar + .car { height: calc(100dvh - var(--arcbar-h, 0px)); }
body.at-station .arcbar + .car { height: auto; min-height: calc(100dvh - var(--arcbar-h, 0px)); }
.arcbar + .bar { padding-top: 14px; }
