/* 구장 한 바퀴: 지도 한 장과 카드 두 장. 흰 카드 위 짙은 남색 글씨, 종목마다 파스텔 색 하나. */
:root {
  --paper: #eef2f9;
  --card: #ffffff;
  --ink: #1a2138;
  --ink-2: #545e78;
  --ink-3: #8b93a8;
  --line: #e4e8f1;
  --soft: #f3f5fa;
  --soft-2: #e8ecf4;
  --lit: #8576f2;
  --peach: #ffb894;
  --radius: 24px;
  --shadow: 0 1px 2px rgb(26 33 56 / .06), 0 8px 24px rgb(26 33 56 / .08);
  /* 종목 색: 바탕 / 글씨 */
  --soccer: #d4f1e2; --soccer-ink: #16664a;
  --baseball: #ffe3d5; --baseball-ink: #9d441c;
  --basketball: #fff0c4; --basketball-ink: #7a5600;
  --volleyball: #d8eaff; --volleyball-ink: #1c5a9b;
  --hockey: #d8f2f5; --hockey-ink: #135f6c;
  --football: #ffdde6; --football-ink: #9e2550;
  --tennis: #e7f5c9; --tennis-ink: #46650b;
  --badminton: #fbe0f2; --badminton-ink: #932a74;
  --games: #e7e1ff; --games-ink: #5640b5;
  --rugby: #f4e0d6; --rugby-ink: #8a3d22;
  --cricket: #f4ead6; --cricket-ink: #765116;
  --handball: #e0e6ff; --handball-ink: #3246a0;
  --golf: #dfeedd; --golf-ink: #2f6638;
  --motorsport: #ffdcd6; --motorsport-ink: #ad2a1a;
  --aussie: #e2e8f4; --aussie-ink: #34507c;
  --p: var(--soft-2); --pi: var(--ink);
  color-scheme: light;
}
[data-sport=soccer] { --p: var(--soccer); --pi: var(--soccer-ink); }
[data-sport=baseball] { --p: var(--baseball); --pi: var(--baseball-ink); }
[data-sport=basketball] { --p: var(--basketball); --pi: var(--basketball-ink); }
[data-sport=volleyball] { --p: var(--volleyball); --pi: var(--volleyball-ink); }
[data-sport=hockey] { --p: var(--hockey); --pi: var(--hockey-ink); }
[data-sport=football] { --p: var(--football); --pi: var(--football-ink); }
[data-sport=tennis] { --p: var(--tennis); --pi: var(--tennis-ink); }
[data-sport=badminton] { --p: var(--badminton); --pi: var(--badminton-ink); }
[data-sport=games] { --p: var(--games); --pi: var(--games-ink); }
[data-sport=rugby] { --p: var(--rugby); --pi: var(--rugby-ink); }
[data-sport=cricket] { --p: var(--cricket); --pi: var(--cricket-ink); }
[data-sport=handball] { --p: var(--handball); --pi: var(--handball-ink); }
[data-sport=golf] { --p: var(--golf); --pi: var(--golf-ink); }
[data-sport=motorsport] { --p: var(--motorsport); --pi: var(--motorsport-ink); }
[data-sport=aussie] { --p: var(--aussie); --pi: var(--aussie-ink); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  display: grid; grid-template-columns: 336px minmax(0, 1fr); gap: 12px; padding: 12px;
  background: var(--paper); color: var(--ink);
  font: 400 15px/1.6 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
body.has-venue { grid-template-columns: 336px minmax(0, 1fr) 392px; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lit); outline-offset: 2px; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }

/* ---------- 왼쪽: 찾기 ---------- */
.finder { display: flex; flex-direction: column; gap: 12px; height: calc(100dvh - 24px); padding: 20px 0 0; min-width: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.finder > *:not(.clubs) { margin-inline: 18px; }
.finder h1 { font-size: 22px; font-weight: 800; letter-spacing: -.035em; }
.wordmark b { margin-left: .22em; font-weight: 500; }
.finder h1 a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.finder h1 img { flex: none; width: 36px; height: 36px; border-radius: 10px; }
.finder header p { color: var(--ink-3); font-size: 13px; margin-top: 2px; padding-left: 46px; }
.finder header { position: relative; }
.close-finder { display: none; position: absolute; top: -4px; right: 0; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink-2); place-items: center; }
.close-finder::before { content: '×'; font-size: 24px; line-height: 1; }
.finder input, .finder select { width: auto; min-height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--soft); appearance: none; }
.finder input::placeholder { color: var(--ink-3); }
.finder select { background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23545e78' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.sports { display: flex; gap: 6px; overflow-x: auto; margin-inline: 0 !important; padding: 0 18px 2px; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.sports::-webkit-scrollbar { display: none; }
.sports button, .chips button { flex: none; min-height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.sports button:hover, .chips button:hover { background: var(--soft-2); }
.sports button[aria-pressed=true], .chips button[aria-pressed=true] { background: var(--p); color: var(--pi); }
.sports button[data-sport=all][aria-pressed=true], .chips button[data-sport=all][aria-pressed=true] { background: var(--ink); color: #fff; }
.clubs { flex: 1; overflow-y: auto; padding: 0 10px 20px; scrollbar-width: thin; scrollbar-color: var(--soft-2) transparent; }
body.has-trip .clubs { padding-bottom: 150px; }
.clubs h2 { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 12px 8px 6px; background: var(--card); font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
.clubs .row { display: flex; align-items: center; gap: 4px; border-radius: 14px; }
.clubs .row:hover { background: var(--soft); }
.clubs .go { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 7px 8px; border: 0; border-radius: 14px; background: none; text-align: left; line-height: 1.3; }
.clubs .go b { display: block; font-weight: 700; }
.clubs .go small { display: block; font-size: 13px; color: var(--ink-3); }
.clubs .go[aria-current=true] { background: var(--ink); color: #fff; }
.clubs .go[aria-current=true] small { color: #c5cbe0; }
.clubs .add { margin-right: 4px; }
.clubs .empty { padding: 20px 8px; color: var(--ink-3); }

/* 엠블럼: 로고는 흰 바탕, 로고가 없으면 색 바탕에 머리글자 */
.emblem { flex: none; box-sizing: border-box; object-fit: contain; background: #fff; border-radius: 28%; box-shadow: inset 0 0 0 1px var(--line); }
.emblem.text { display: inline-grid; place-items: center; width: var(--s); height: var(--s); padding: 0; background: var(--c); color: var(--t, #fff); box-shadow: none; font-size: calc(var(--s) * .34); font-weight: 800; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.emblem.text.long { font-size: calc(var(--s) * .27); letter-spacing: -.05em; }
.crest.text { border-radius: 50%; }
.emblem.poster { object-fit: cover; object-position: center 20%; padding: 0; }
.emblem.track { background: #fff; }

/* 담기 버튼 */
.add { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink-2); }
.add::before { content: ''; width: 12px; height: 12px; background: currentColor; clip-path: polygon(42% 0, 58% 0, 58% 42%, 100% 42%, 100% 58%, 58% 58%, 58% 100%, 42% 100%, 42% 58%, 0 58%, 0 42%, 42% 42%); }
.add:hover { background: var(--soft-2); color: var(--ink); }
.add[aria-pressed=true] { background: var(--ink); color: #fff; }
.add[aria-pressed=true]::before { width: 13px; height: 10px; clip-path: polygon(0 52%, 14% 38%, 38% 62%, 86% 0, 100% 14%, 38% 92%); }

/* ---------- 가운데: 지도 ---------- */
.stage { position: relative; height: calc(100dvh - 24px); border-radius: var(--radius); background: #cfd8e6; overflow: hidden; box-shadow: var(--shadow); isolation: isolate; }
#map, #video { position: absolute; inset: 0; width: 100%; height: 100%; }
#video { z-index: 2; background: #000; object-fit: contain; }
.stage > button, .stage .flight button, .pano button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .92); color: var(--ink); font-weight: 600; box-shadow: 0 2px 10px rgb(26 33 56 / .12); backdrop-filter: blur(10px); }
.stage > button:hover, .stage .flight button:hover { background: #fff; }
.engine { position: absolute; z-index: 3; top: 14px; right: 14px; font-size: 14px; }
.engine:empty { display: none; }
.open-finder { display: none; position: absolute; z-index: 3; top: 14px; left: 14px; }
.maplibregl-ctrl-top-right { top: 60px; right: 6px; }
.status { position: absolute; z-index: 5; top: 14px; left: 14px; max-width: calc(100% - 200px); padding: 9px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 4px 14px rgb(26 33 56 / .2); }
.status:empty { display: none; }

/* 구장 사이를 옮겨 갈 때 화면 가운데를 나는 비행기. --a는 진행 방향, --h는 고도(0~1) */
.plane { --a: 0deg; --h: 0; position: absolute; z-index: 1; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; overflow: visible; pointer-events: none; transform: scale(calc(1 + var(--h) * .22)); transition: opacity .6s, transform .6s; }
.plane .shadow { fill: rgb(26 33 56 / .35); filter: blur(2px); transform: translate(calc(4px + var(--h) * 16px), calc(6px + var(--h) * 22px)) rotate(var(--a)); }
.plane .body { transform: rotate(var(--a)); fill: #fff; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.plane .tail { fill: var(--peach); }
.plane.landing { opacity: 0; transform: scale(.55); }

/* 로드뷰 */
.pano { position: absolute; inset: 0; z-index: 4; background: var(--ink); }
#panoView { position: absolute; inset: 0; }
.pano #panoClose { position: absolute; z-index: 1; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; }

/* 비행 조종: 지도 아래쪽에 떠 있는 카드 */
.flight { position: absolute; z-index: 3; left: 50%; bottom: 36px; /* 아래 줄의 Google 로고와 저작권 표시는 가리지 않습니다 */ transform: translateX(-50%); width: min(640px, calc(100% - 28px)); padding: 16px 18px; border-radius: 22px; background: rgb(255 255 255 / .9); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 10px 30px rgb(26 33 56 / .16); }
.caption { min-height: 3.1em; margin: 0 4px 12px; font-size: 16px; line-height: 1.55; font-weight: 500; text-wrap: pretty; }
.caption:empty { min-height: 0; margin: 0; }
.controls { display: flex; align-items: center; gap: 16px; }
#bowl { flex: none; width: 150px; touch-action: none; cursor: grab; }
#bowl .seat { fill: #d7dce8; }
#bowl .seat.lit { fill: var(--lit); }
#bowl .pitch { fill: #c4ecd6; stroke: #fff; stroke-width: 1.5; }
#bowl .drone { fill: var(--ink); stroke: #fff; stroke-width: 2.5; }
#bowl text { fill: var(--soccer-ink); font: 800 18px 'Pretendard Variable', Pretendard, sans-serif; text-anchor: middle; dominant-baseline: central; }
.buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.stage .flight button { min-height: 36px; padding: 0 13px; background: var(--soft); box-shadow: none; font-size: 14px; }
.stage .flight button:hover { background: var(--soft-2); }
.stage .flight #play { min-width: 88px; background: var(--ink); color: #fff; }
.alts { display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--soft); }
.stage .flight .alts button { min-height: 30px; padding: 0 11px; background: none; }
.stage .flight button[aria-pressed=true] { background: var(--ink); color: #fff; }
.stage .flight .alts button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgb(26 33 56 / .15); }
/* 목소리를 준비하는 동안 */
.stage .flight #voice.loading { animation: voiceWait 1s ease-in-out infinite; }
@keyframes voiceWait { 50% { opacity: .55; } }

/* ---------- 첫 화면 ---------- */
.lobby { position: absolute; inset: 0; z-index: 3; overflow-y: auto; padding: 44px clamp(20px, 4vw, 52px) 56px; background: rgb(244 247 252 / .9); backdrop-filter: blur(18px) saturate(1.3); scrollbar-width: thin; }
.lobby-intro h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.12; letter-spacing: -.045em; }
.lobby-intro > p { max-width: 34em; margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.chips button { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
/* 첫 화면: 종목 패널 + 리그 타일 */
.sports-grid { columns: 2 440px; column-gap: 14px; margin-top: 26px; }
.sport { break-inside: avoid; margin-bottom: 14px; padding: 16px 16px 14px; border-radius: 26px; background: var(--p); }
.sport header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 12px; }
.lobby .sport h3 { margin: 0; padding: 0; background: none; color: var(--pi); font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.sport header span { color: var(--pi); opacity: .72; font-size: 13px; font-weight: 600; white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.single .tiles { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.tile { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 14px 6px 11px; border: 0; border-radius: 18px; background: rgb(255 255 255 / .86); text-align: center; line-height: 1.25; transition: background .15s, box-shadow .15s; }
.tile:hover { background: #fff; box-shadow: 0 6px 18px rgb(26 33 56 / .1); }
.tile b { font-size: 13px; font-weight: 700; letter-spacing: -.02em; overflow-wrap: break-word; }
.tile small { margin-top: -3px; font-size: 11px; color: var(--ink-3); }
.tile .emblem { width: 48px; height: 48px; --s: 48px; border-radius: 14px; }
.single .tile .emblem { width: 60px; height: 60px; --s: 60px; }
.lobby h3 { display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; background: var(--p); color: var(--pi); font-size: 14px; font-weight: 700; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; }
.card { border: 0; border-radius: 20px; background: #fff; text-align: left; line-height: 1.3; box-shadow: 0 1px 2px rgb(26 33 56 / .05); transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 6px 20px rgb(26 33 56 / .1); }
.card.league { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.card b { display: block; font-size: 16px; font-weight: 700; overflow-wrap: normal; }
.card small { display: block; margin-top: 3px; font-size: 13px; color: var(--ink-3); }
.card.club { position: relative; display: flex; align-items: flex-start; }
.card.club .go { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; padding: 16px 48px 16px 16px; border: 0; border-radius: 20px; background: none; text-align: left; }
.card.club .go > span > span { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.card.club .add { position: absolute; top: 12px; right: 12px; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--p); color: var(--pi); font-size: 12px; font-style: normal; font-weight: 700; vertical-align: 2px; }
.tag.gone { background: var(--soft-2); color: var(--ink-2); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px 0 10px; border: 0; border-radius: 999px; background: #fff; color: var(--ink-2); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.back::before { content: ''; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 4px; }
.lobby-head { display: flex; align-items: center; gap: 20px; margin: 22px 0 28px; }
.lobby-head .emblem { border-radius: 24px; }
.kicker { display: inline-block; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px; background: var(--p); color: var(--pi); font-size: 13px; font-weight: 700; }
.lobby-head h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1.15; letter-spacing: -.04em; }
.lobby-head p:last-child { max-width: 40em; margin-top: 6px; color: var(--ink-2); }

/* ---------- 오른쪽: 경기장 정보 ---------- */
.info { height: calc(100dvh - 24px); overflow-y: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); scrollbar-width: thin; scrollbar-color: var(--soft-2) transparent; }
.info .photo { display: block; width: 100%; height: 220px; object-fit: cover; background: var(--soft); }
.info .body { padding: 22px 24px 40px; }
.info .photo.zoomable { cursor: zoom-in; }
/* 경기장 사진 띠 */
.strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 2px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.shot { flex: none; width: 76px; height: 54px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--soft); scroll-snap-align: start; cursor: zoom-in; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.shot:hover img { transform: scale(1.06); }
/* 사진 크게 보기 */
dialog.viewer { width: min(1280px, 96vw); max-width: none; height: min(860px, 92dvh); padding: 0; border-radius: 22px; background: #0e1220; overflow: hidden; }
dialog.viewer::backdrop { background: rgb(8 12 24 / .82); backdrop-filter: blur(6px); }
.viewer img { display: block; width: 100%; height: calc(100% - 44px); object-fit: contain; }
.viewer-credit { height: 44px; padding: 12px 18px; color: #aab3c8; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-credit a { color: #fff; }
.viewer button { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgb(255 255 255 / .14); color: #fff; backdrop-filter: blur(8px); }
.viewer button:hover { background: rgb(255 255 255 / .26); }
.viewer-close { top: 14px; right: 14px; }
.viewer-close::before { content: '×'; font-size: 26px; line-height: 1; }
.viewer-nav { top: calc(50% - 44px); }
.viewer-nav.prev { left: 14px; }
.viewer-nav.next { right: 14px; }
.viewer-nav::before { content: ''; width: 11px; height: 11px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin-left: 4px; }
.viewer-nav.next::before { transform: rotate(-135deg); margin: 0 4px 0 0; }
.info h2 { font-size: 30px; font-weight: 800; line-height: 1.18; letter-spacing: -.04em; text-wrap: balance; }
.info .original { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.info .tenants { display: grid; gap: 4px; margin: 16px 0 0; padding: 0; list-style: none; }
.info .tenants li { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 8px; border-radius: 16px; background: var(--soft); line-height: 1.3; }
.info .tenants li > span:not(.emblem) { flex: 1; min-width: 0; }
.info .tenants b { display: block; font-weight: 700; }
.info .tenants small { color: var(--ink-3); font-size: 13px; }
.info .tenants .add { background: #fff; }
.info .tenants .add[aria-pressed=true] { background: var(--ink); }
.more-clubs { margin-top: 8px; color: var(--ink-3); font-size: 13px; }
.info .note { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--basketball); color: #5c4300; font-size: 14px; }
.info .facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin-top: 22px; padding: 16px 18px; border-radius: 18px; background: var(--soft); font-size: 14px; }
.info .facts dt { color: var(--ink-3); }
.info .facts dd { font-weight: 600; }
.info h3 { margin: 30px 0 10px; font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.info p + p { margin-top: 10px; }
.info .body > div > p, .info details p { color: var(--ink-2); }
.tour button { display: block; width: calc(100% + 16px); margin: 0 -8px; padding: 9px 10px; border: 0; border-radius: 12px; background: none; text-align: left; color: var(--ink-2); }
.tour button b { color: var(--ink); }
.tour button:hover { background: var(--soft); }
.tour button[aria-current=true] { background: var(--games); color: var(--ink); }
.years { padding: 0; list-style: none; }
.years li { display: grid; grid-template-columns: 56px 1fr; padding: 5px 0; color: var(--ink-2); }
.years b { color: var(--ink); font-weight: 800; }
.info details { margin-top: 6px; border-bottom: 1px solid var(--line); }
.info summary { padding: 11px 0; font-weight: 700; cursor: pointer; }
.info details p { padding-bottom: 12px; white-space: pre-line; }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.links a, .near button { padding: 9px 14px; border: 0; border-radius: 999px; background: var(--soft); text-decoration: none; font-size: 14px; font-weight: 600; }
.links a:hover, .near button:hover { background: var(--soft-2); }
.near { display: grid; gap: 6px; }
.near button { display: flex; justify-content: space-between; gap: 12px; border-radius: 14px; text-align: left; }
.near span { color: var(--ink-3); white-space: nowrap; font-weight: 500; }
.source { margin-top: 30px; color: var(--ink-3); font-size: 12px; line-height: 1.6; }

/* ---------- 내 여행 ---------- */
.trip { position: fixed; z-index: 20; left: 24px; bottom: 24px; width: 312px; padding: 12px; border-radius: 22px; background: var(--ink); color: #fff; box-shadow: 0 14px 34px rgb(26 33 56 / .3); }
.trip.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.04); } }
.trip summary { display: flex; align-items: center; gap: 10px; padding: 4px 4px 10px; list-style: none; cursor: pointer; }
.trip summary::-webkit-details-marker { display: none; }
.trip-icon { flex: none; width: 34px; height: 34px; border-radius: 12px; background: var(--peach) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-40 -40 80 80'%3E%3Cpath d='M0-29c2.6 0 3.4 4 3.4 8v15L29 7v4.5L3.4 5.5 3.2 18l7.8 6.5V28L2 25.5 0 27l-2-1.5L-11 28v-3.5l7.8-6.5-.2-12.5L-29 11.5V7l25.6-13v-15c0-4 .8-8 3.4-8z' fill='%231a2138' transform='rotate(45)'/%3E%3C/svg%3E") no-repeat center / 22px; }
.trip-now { flex: 1; min-width: 0; font-size: 14px; color: #c5cbe0; line-height: 1.35; }
.trip-now b { color: #fff; font-weight: 700; }
.trip summary::after { content: ''; width: 7px; height: 7px; margin-right: 6px; border-right: 2px solid #8b93a8; border-bottom: 2px solid #8b93a8; transform: rotate(-135deg); transition: transform .2s; }
.trip details[open] summary::after { transform: rotate(45deg) translate(-2px, -2px); }
.stops { display: grid; gap: 2px; max-height: 40dvh; overflow-y: auto; margin: 0 0 10px; padding: 0; list-style: none; counter-reset: stop; scrollbar-width: thin; }
.stop { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 4px 6px 6px; border-radius: 14px; line-height: 1.25; }
.stop > span:not(.dot) { flex: 1; min-width: 0; }
.stop b { display: block; font-size: 14px; font-weight: 600; }
.stop small { display: block; font-size: 12px; color: #9aa2b8; }
.stop.now { background: rgb(255 255 255 / .1); }
.stop.done { opacity: .5; }
.stop .dot { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--peach); color: var(--ink); font-size: 10px; font-weight: 800; }
.stop .remove { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: #8b93a8; }
.stop .remove::before { content: '×'; font-size: 20px; line-height: 1; }
.stop .remove:hover { background: rgb(255 255 255 / .1); color: #fff; }
.trip-actions { display: flex; gap: 6px; }
.trip-actions button { min-height: 42px; padding: 0 14px; border: 0; border-radius: 14px; background: rgb(255 255 255 / .1); color: #fff; font-weight: 600; }
.trip-actions button:hover { background: rgb(255 255 255 / .18); }
.trip-actions .primary { flex: 1; background: var(--peach); color: var(--ink); font-weight: 700; }
.trip-actions .primary:hover { background: #ffc8ab; }

/* ---------- 키 창 ---------- */
dialog { width: min(500px, calc(100vw - 32px)); padding: 28px; border: 0; border-radius: 24px; color: var(--ink); box-shadow: 0 20px 60px rgb(26 33 56 / .25); }
dialog::backdrop { background: rgb(26 33 56 / .45); backdrop-filter: blur(4px); }
dialog h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 10px; }
dialog p, dialog ol { color: var(--ink-2); }
dialog ol { margin: 12px 0; padding-left: 20px; }
dialog label { display: block; margin-top: 14px; font-weight: 700; }
dialog input { width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--soft); }
dialog .error { color: #b3134d; margin-top: 8px; }
dialog .row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 16px; }
dialog button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--soft); font-weight: 600; }
dialog .primary { background: var(--ink); color: #fff; }

@media (max-width: 1240px) {
  body { grid-template-columns: 292px minmax(0, 1fr); }
  body.has-venue { grid-template-columns: 292px minmax(0, 1fr) 340px; }
  .trip { width: 268px; }
  .info .body { padding-inline: 20px; }
  #bowl { width: 120px; }
}
@media (max-width: 860px) {
  html, body { height: auto; }
  body, body.has-venue { display: block; padding: 0; }
  .stage { position: sticky; top: 0; z-index: 2; height: 62dvh; border-radius: 0 0 26px 26px; }
  body:not(.has-venue) .stage { height: 100dvh; border-radius: 0; }
  .info { height: auto; margin: 10px 10px 110px; overflow: visible; }
  .open-finder { display: block; }
  .status { top: 62px; max-width: calc(100% - 28px); }
  .finder { position: fixed; inset: 0; z-index: 30; height: 100dvh; border-radius: 0; visibility: hidden; transform: translateX(-100%); transition: transform .22s, visibility .22s; }
  .finder.open { visibility: visible; transform: none; }
  .close-finder { display: grid; }
  .plane { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .flight { bottom: 30px; width: calc(100% - 16px); padding: 12px; border-radius: 20px; }
  .caption { font-size: 14px; line-height: 1.5; min-height: 0; margin-bottom: 8px; }
  .controls { gap: 10px; }
  #bowl { width: 96px; }
  .buttons { gap: 4px; }
  .stage .flight button { min-height: 32px; padding: 0 10px; font-size: 13px; }
  .stage .flight .alts button { min-height: 26px; padding: 0 8px; }
  .stage .flight #play { min-width: 64px; }
  .lobby { padding: 112px 16px 130px; }
  .lobby-intro h2 { font-size: 30px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; }
  .card.league { gap: 10px; padding: 12px; }
  .card b { font-size: 15px; }
  .card.league .emblem { width: 40px; height: 40px; --s: 40px; padding: 4px !important; }
  .card.league .emblem.text { padding: 0 !important; }
  .card.club .go { gap: 10px; padding: 12px 42px 12px 12px; }
  .card.club .go .crest { width: 38px; height: 38px; --s: 38px; }
  .card.club .add { top: 8px; right: 8px; }
  .lobby-head { gap: 14px; }
  .lobby-head .emblem { width: 56px; height: 56px; --s: 56px; border-radius: 18px; }
  .trip { left: 10px; right: 10px; bottom: 10px; width: auto; }
  .sports-grid { columns: 1; margin-top: 20px; }
  .sport { padding: 14px 12px 12px; border-radius: 22px; }
  .tiles, .single .tiles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
  .tile { padding: 12px 4px 9px; }
  .tile .emblem, .single .tile .emblem { width: 44px; height: 44px; --s: 44px; }
  dialog.viewer { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  body.has-trip .lobby { padding-bottom: 170px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
