/* ════════════════════════════════════════════════════════════════
   루에랑 유니버스 — 화면 스타일
   · 색은 ★여기 :root 한 곳★ 에만 둔다. 화면은 검은 우주(louetlang.com 첫 화면)라 다크다 — 사장님 지정 브랜딩 화면.
   · 홈페이지 어휘: 순수한 검정 · 흰 굵은 말풍선 테두리 · 로고 갈고리 노랑(#fab93c) · 네모 도트 · 레트로 게임 단추.
   · 글은 한 줄 유지(word-break: keep-all). 포커스는 노란 테두리로 늘 보이게.
   ════════════════════════════════════════════════════════════════ */
:root {
  --space: #000;
  --ink: #fff;
  --ink-2: rgba(255, 255, 255, 0.76);
  --ink-3: rgba(255, 255, 255, 0.5);
  --lel: #fab93c;              /* 로고 갈고리 노랑 — 나 · 거점 · 강조 */
  --lel-ink: #1b1200;          /* 노랑 위 글자 */
  --sky: #8fb4ff;              /* 별 · 도트 하늘색 */
  --line: rgba(255, 255, 255, 0.92);
  --line-soft: rgba(255, 255, 255, 0.24);
  --panel: rgba(3, 7, 18, 0.86);
  --panel-solid: #04081a;
  --danger: #ff8080;
  --ok: #8be3b9;
  /* 2차 — 공습 경보 · 외계 점령 · 배 */
  --alarm: #ff4d5e;            /* 경보 빨강 — 경보 띠 · 화면 가장자리 빛 */
  --alarm-bg: rgba(40, 0, 8, 0.9);
  --alarm-soft: rgba(255, 77, 94, 0.35);
  --alien: #7dff9a;            /* 외계 초록 — 점령 · 정복됨 */
  --alien-2: #b98cff;          /* 외계 보라 */
  --alien-bg: rgba(14, 4, 30, 0.9);
  --sea: #5fd0ff;              /* 배 · 항로 */
  --work-bg: #0c3a7a;          /* 10-22 회사 업무 단추(배) 바탕 — 놀이 단추(검정)와 갈라 보이게 */
  --work-bg-h: #114a9a;
  /* 5차 — 아이템 등급(gamedata.js GRADES 의 col 과 같게) */
  --g0: #c9ced8; --g1: #6fe08a; --g2: #5fb4ff; --g3: #c18cff; --g4: #ffb43c;
  --r-bubble: 16px;
  --r-key: 10px;
  --font: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-disp: "Bahnschrift", "Oswald", "Arial Narrow", Impact, sans-serif;
  --emoji: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--space); color: var(--ink); overflow: hidden; }
body { font: 14px/1.5 var(--font); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--lel); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { display: inline-block; min-width: 18px; padding: 0 4px; border: 1.5px solid currentColor; border-radius: 4px; font: 700 10px/15px var(--font-disp); text-align: center; opacity: 0.7; }
[hidden] { display: none !important; }

/* ── 3D 캔버스 · 겹치는 글자 층 ── */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; cursor: grab; }
#gl:focus-visible { box-shadow: inset 0 0 0 3px var(--lel); }
.layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }

/* 핀 이모지 칩 — 지구 위 빛 구슬 바로 위 */
.pchip { position: absolute; left: 0; top: 0; visibility: hidden; will-change: transform, opacity; margin-top: -4px; }
.pchip span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, 0.62);
  border: 1.5px solid rgba(255, 255, 255, 0.82); font: 14px/1 var(--emoji); transition: transform 0.15s, border-color 0.15s; }
.pchip.mine span { border-color: var(--lel); }
.pchip.hot span { transform: scale(1.18); border-color: var(--lel); box-shadow: 0 0 0 3px rgba(250, 185, 60, 0.25); }
.pchip.fresh span { animation: chipPop 0.9s cubic-bezier(0.2, 1.7, 0.4, 1); }
@keyframes chipPop { 0% { transform: translateY(14px) scale(0.2); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; } }

/* 우주인 이름표 — 가리킬 때 · 나 · 안 읽은 글 · 선물 고르기 중 */
.alabel { position: absolute; left: 0; top: 0; visibility: hidden; white-space: nowrap; will-change: transform; }
.alabel span { display: inline-block; padding: 2px 9px 3px; border-radius: 10px; background: rgba(0, 0, 0, 0.75); font-size: 12px; font-weight: 700;
  border: 1.5px solid hsl(var(--h, 200), 70%, 64%); }
.alabel.me span { border-color: var(--lel); color: var(--lel); }
.alabel.on span { background: #000; border-width: 2px; }
.alabel.unread span::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--danger); vertical-align: 1px; }
.alabel.pick span::before { content: "🎁 "; }
/* 3차 — 곁에 붙은 둘 사이 말풍선(우주인 머리 위 · 누르지 않는다) */
.nearbub { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; will-change: transform; font-size: 13px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)); }

/* 거점 이름 */
.hubtag { position: absolute; left: 0; top: 0; visibility: hidden; text-align: center; white-space: nowrap; margin-top: -2px; }
.hubtag b { display: block; font-size: 12px; line-height: 1.2; text-shadow: 0 1px 3px #000; }
.hubtag small { display: block; font-size: 10px; color: var(--ink-3); text-shadow: 0 1px 3px #000; }
.hubtag.main b { color: var(--lel); }
.hubtag.side-left { text-align: right; margin-top: 0; }
.hubtag.side-right { text-align: left; margin-top: 0; }
/* 은하수 판 — 빛기둥 · 대기 번짐 위에서도 글이 묻히지 않게 옅은 어두운 받침(대비 4.5 이상) */
.hubtag { padding: 1px 6px 2px; border-radius: 6px; background: rgba(0, 0, 0, 0.78); }
.hubtag small { color: var(--ink-2); }

.hover-tag { position: fixed; left: 0; top: 0; pointer-events: none; padding: 3px 9px; font-size: 12px; white-space: nowrap; border-radius: 8px;
  background: rgba(0, 0, 0, 0.72); border: 1.5px solid var(--line-soft); opacity: 0; transition: opacity 0.15s; z-index: 5; }
.hover-tag.on { opacity: 1; }
.hover-tag em { font-style: normal; color: var(--lel); }

/* ── 위 막대 ── */
.top { position: fixed; top: 0; left: 0; right: 0; height: 62px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; pointer-events: none; z-index: 10; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; display: block; }
.brand-t { display: flex; flex-direction: column; line-height: 1.15; }
.brand-t b { font-size: 16px; letter-spacing: -0.01em; }
.brand-t small { font: 600 11px var(--font-disp); color: var(--ink-3); letter-spacing: 0.06em; }
.top-r { display: flex; align-items: center; gap: 8px; }
.net { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-right: 4px; white-space: nowrap; }
.net::before { content: ""; width: 8px; height: 8px; background: var(--ink-3); }
.net.ok { color: var(--ink-2); } .net.ok::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.net.warn::before { background: var(--lel); }
.net.bad { color: var(--danger); } .net.bad::before { background: var(--danger); }
.pill, .ib { height: 34px; border-radius: 10px; background: rgba(0, 0, 0, 0.55); border: 2px solid var(--line-soft); transition: border-color 0.15s, background 0.15s; }
.pill { padding: 0 12px; font-size: 13px; white-space: nowrap; }
.pill b { font-family: var(--font-disp); font-size: 15px; }
.ib { width: 34px; padding: 0; font: 15px/1 var(--emoji); }
.ib:hover, .pill:hover { border-color: var(--line); }
.ib[aria-pressed="false"] { opacity: 0.45; }
#btnHelp { font: 700 15px/1 var(--font-disp); }
#btnNotify.granted { border-color: rgba(139, 227, 185, 0.6); }
#btnNotify.denied { opacity: 0.35; }

/* ── 오른쪽 목록 ── */
.crew { position: fixed; top: 70px; right: 16px; width: 236px; max-height: calc(100vh - 170px); overflow: auto; z-index: 8;
  background: var(--panel); border: 2px solid var(--line-soft); border-radius: 14px; padding: 10px 10px 12px; scrollbar-width: thin; }
.crew.closed { display: none; }
.crew section + section { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.crew h2 { margin: 0 0 6px; font-size: 13px; }
.crew h2 small { font-weight: 400; color: var(--ink-3); font-size: 11px; margin-left: 4px; }
.crew h2 b { color: var(--lel); }
.crew ul, .crew ol { list-style: none; margin: 0; padding: 0; }
.crew-list button, .pin-list button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 5px 6px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.crew-list button:hover, .pin-list button:hover { background: rgba(255, 255, 255, 0.08); }
.crew-list img { width: 22px; height: 24px; image-rendering: pixelated; flex: none; }
.crew-list .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.crew-list .me .nm { color: var(--lel); font-weight: 700; }
.crew-list .badge { flex: none; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #000; font: 700 11px/18px var(--font-disp); text-align: center; }
.crew-list .empty, .pin-list .empty, .top-list .empty { color: var(--ink-3); font-size: 12px; padding: 4px 6px; }
.pin-list .em { font: 14px/1 var(--emoji); flex: none; }
.pin-list .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
/* 점수판 — 홈페이지 TOP SCORES 처럼 굵은 흰 선 표 */
.top-list { border: 2px solid var(--line); border-radius: 6px; overflow: hidden; }
.top-list li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 6px; padding: 4px 8px; font-size: 12px; }
.top-list li + li { border-top: 1.5px solid var(--line-soft); }
.top-list li.empty { display: block; }        /* 빈 안내 줄은 순위 칸(26px) 격자가 아니다 — 격자면 「첫 요리사를 기다려요」 가 한 글자씩 세로로 꺾였다(10-22) */
.top-list .rk { font: 700 15px var(--font-disp); }
.top-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-list .pt { font: 700 15px var(--font-disp); letter-spacing: 0.03em; }
.top-list .me .nm { color: var(--lel); }

/* ── 소식 띠(왼쪽 아래) ── */
.feed { position: fixed; left: 16px; bottom: 18px; width: 300px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; z-index: 6; }
.feed p { margin: 0; align-self: flex-start; max-width: 100%; padding: 3px 9px; border-radius: 8px; background: rgba(0, 0, 0, 0.5);
  font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: feedIn 0.4s ease; transition: opacity 0.6s; }
.feed p.old { opacity: 0.45; }
@keyframes feedIn { from { opacity: 0; transform: translateX(-12px); } }

/* ── 아래 조작판(레트로 게임 단추) ── */
.dock { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 10px; z-index: 9; }
.key { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: var(--r-key); background: #000;
  border: 2.5px solid var(--line); box-shadow: 0 4px 0 rgba(255, 255, 255, 0.28); font-weight: 700; font-size: 14px; white-space: nowrap;
  transition: transform 0.06s, box-shadow 0.06s, background 0.15s; }
.key:hover { background: #0b0f1d; }
.key.work { background: var(--work-bg); border-color: var(--sea); margin-left: 12px; }     /* 회사 업무 — 맨 오른쪽 · 파란 바탕 · 살짝 떨어뜨림 */
.key.work:hover { background: var(--work-bg-h); }
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28); }
.key .em { font: 18px/1 var(--emoji); }
.key b { font-family: var(--font-disp); font-size: 15px; }
.key[aria-expanded="true"], .key.on { background: var(--lel); color: var(--lel-ink); border-color: var(--lel); box-shadow: 0 4px 0 rgba(250, 185, 60, 0.4); }
.key.bump b { animation: bump 0.6s ease; display: inline-block; }
@keyframes bump { 30% { transform: scale(1.6); color: var(--lel); } }
.hint { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); margin: 0; font-size: 13px; color: var(--ink-2);
  pointer-events: none; white-space: nowrap; text-shadow: 0 1px 4px #000; transition: opacity 0.8s; z-index: 6; }
/* 내 우주인 움직이기 — 처음 한 번 안내(안내 줄 바로 위 · 닫으면 다시 안 뜬다) */
.movetip { position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 6px;
  padding: 5px 6px 5px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.82); border: 2px solid var(--lel); font-size: 13px; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6); animation: toastIn 0.35s cubic-bezier(0.2, 1.5, 0.4, 1); }
.movetip[hidden] { display: none; }
.movetip .x { width: 26px; height: 26px; font-size: 17px; }
body.chat-on .movetip, body.raid-on .movetip, body.big-on .movetip, body.solar-on .movetip, body.ship-on .movetip { display: none; }   /* 다른 창 · 공습 단추를 가리지 않게 */
.hint.gone, body.chat-on .hint { opacity: 0; }       /* 대화창(오른쪽 아래)이 뜨면 안내 줄 끝이 그 밑에 깔린다(1100 폭 실측) — 접는다 */

/* ── 말풍선(홈페이지의 굵은 흰 테두리 말풍선) ── */
.bubble { position: fixed; left: 0; top: 0; z-index: 20; background: #000; border: 2.5px solid var(--line); border-radius: var(--r-bubble);
  padding: 12px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65); animation: bubbleIn 0.22s cubic-bezier(0.2, 1.4, 0.4, 1); }
.bubble::after { content: ""; position: absolute; left: var(--tail, 50%); bottom: -9px; width: 14px; height: 14px; background: #000;
  border-right: 2.5px solid var(--line); border-bottom: 2.5px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.bubble.below::after { bottom: auto; top: -9px; transform: translateX(-50%) rotate(225deg); }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(0.96); } }
.row { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.row .left { margin-right: auto; font: 600 12px var(--font-disp); color: var(--ink-3); }
.go, .ghost { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.go { background: var(--lel); color: var(--lel-ink); border: 2px solid var(--lel); }
.go:disabled { opacity: 0.35; cursor: default; }
.go kbd { margin-left: 4px; }
.ghost { background: transparent; border: 2px solid var(--line-soft); }
.ghost:hover { border-color: var(--line); }
.ghost.danger { color: var(--danger); }
.x { width: 30px; height: 30px; flex: none; border-radius: 8px; border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--ink-2); }
.x:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }

.composer { width: 312px; }
.cmp-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cmp-h b { font-size: 13px; }
.where { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emoji-pick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-bottom: 8px; }
.emoji-pick button { height: 30px; border-radius: 8px; border: 1.5px solid transparent; background: rgba(255, 255, 255, 0.06); font: 16px/1 var(--emoji); padding: 0; }
.emoji-pick button[aria-checked="true"] { border-color: var(--lel); background: rgba(250, 185, 60, 0.16); }
textarea { width: 100%; resize: none; background: #05070f; border: 1.5px solid var(--line-soft); border-radius: 10px; padding: 8px 10px; line-height: 1.45; }
textarea:focus { border-color: var(--line); outline: none; }
textarea:focus-visible { outline: 3px solid var(--lel); outline-offset: 1px; }

.tip { width: 290px; }
.tip-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.tip-h .em { font: 20px/1 var(--emoji); }
.tip-h .who { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip-h time { margin-left: auto; white-space: nowrap; }
.tip .txt { margin: 8px 0 0; font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
.tip .row { margin-top: 10px; }
.tip .exp { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }
.tip .exp[hidden] { display: none; }

/* ── 창(대화 · 만들기 · 가방 · 조작법) ── */
.win { position: fixed; z-index: 15; display: flex; flex-direction: column; background: var(--panel-solid); border: 2.5px solid var(--line);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); animation: winIn 0.25s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes winIn { from { opacity: 0; transform: translateY(14px); } }
.win-h { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px; border-bottom: 2px solid var(--line-soft); flex: none; }
.win-h > b { font-size: 15px; white-space: nowrap; }
.win-h > small { color: var(--ink-3); font-size: 12px; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-h .x { margin-left: auto; }
.win-h > small + .x { margin-left: 0; }

.chat { right: 16px; bottom: 112px; width: 336px; height: min(418px, calc(100vh - 198px));   /* 10-22 음악 판에 크기 줄이 붙어 올림 — 판 위 끝(테두리 포함)이 아래에서 105px · 7px 띄움 · 위 끝은 그대로(접속자 판과 안 겹치게 높이를 줄임) */ }
body.chat-on .crew { max-height: calc(100vh - 600px); min-height: 120px; }
.chat .face { width: 28px; height: 30px; image-rendering: pixelated; flex: none; }
.chat .who { display: flex; flex-direction: column; min-width: 0; margin-right: auto; line-height: 1.2; }
.chat .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.chat .who small { font-size: 11px; color: var(--ink-3); }
.chat .who small.on { color: var(--ok); }
.msgs { list-style: none; margin: 0; padding: 12px; flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.msgs li { max-width: 82%; padding: 7px 11px; border-radius: 13px; border: 2px solid var(--line-soft); align-self: flex-start; white-space: pre-wrap; font-size: 14px; }
.msgs li.mine { align-self: flex-end; border-color: var(--lel); }
.msgs li time { display: block; margin-top: 2px; font-size: 10px; color: var(--ink-3); }
.msgs li.sys { align-self: center; border: 0; color: var(--ink-3); font-size: 12px; padding: 2px; }
.msgs li.fail { border-style: dashed; opacity: 0.6; }
.send { display: flex; gap: 8px; padding: 10px; border-top: 2px solid var(--line-soft); flex: none; }
.send textarea { flex: 1; max-height: 96px; }
.send .go { height: auto; align-self: stretch; }

/* ── 4차 — 탭 대화창(광장 · 여럿 대화방 · 1:1) ── */
.ctabs-row { display: flex; align-items: flex-end; gap: 4px; padding: 6px 8px 0; border-bottom: 2px solid var(--line-soft); flex: none; }
.ctabs { flex: 1; min-width: 0; display: flex; gap: 3px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.ctabs::-webkit-scrollbar { display: none; }
.ctabw { flex: none; display: flex; align-items: center; border: 2px solid var(--line-soft); border-bottom: 0; border-radius: 9px 9px 0 0; background: rgba(255, 255, 255, 0.03); }
.ctabw:first-child { flex-shrink: 0; }                  /* 「광장」 은 늘 다 보이게 — 나머지 탭이 줄어들고, 그래도 넘치면 옆으로 민다 */
.ctabw.on { border-color: var(--line); background: rgba(250, 185, 60, 0.12); }
.ctab { display: flex; align-items: center; gap: 4px; min-width: 0; height: 28px; padding: 0 8px; border: 0; background: transparent; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ctabw.dm .ctab { padding-right: 2px; }
.ctab .ic { font: 13px/1 var(--emoji); }
.ctab img { width: 14px; height: 16px; image-rendering: pixelated; flex: none; }
.ctab .nm { max-width: 6em; overflow: hidden; text-overflow: ellipsis; }   /* 탭은 줄지 않고 옆으로 넘긴다 — 이름은 6글자까지(최소 4글자는 늘 보인다) */
.ctabw.on .ctab .nm { color: var(--lel); }
.ctab .mu { font: 10px/1 var(--emoji); opacity: 0.7; }
.ctab .bd, #btnChat .cnt { flex: none; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #000; font: 700 10px/16px var(--font-disp); text-align: center; }
#btnChat .cnt { display: inline-block; margin-left: 6px; vertical-align: 1px; }
#btnChat[aria-expanded="true"] { border-color: var(--lel); }
.cx { width: 18px; height: 18px; margin-right: 3px; border: 0; border-radius: 5px; background: transparent; color: var(--ink-3); font-size: 13px; line-height: 1; padding: 0; flex: none; }
.cx:hover { color: var(--ink); background: rgba(255, 255, 255, 0.1); }
.cnew { flex: none; width: 28px; height: 28px; margin-bottom: 2px; border-radius: 8px; border: 2px solid var(--line-soft); background: transparent; font-size: 15px; font-weight: 700; line-height: 1; padding: 0; }
.cnew:hover { border-color: var(--lel); color: var(--lel); }
.chat .gface { flex: none; width: 28px; font: 22px/1 var(--emoji); text-align: center; }
/* 탭이 많아도 목록으로 — 「목록」 은 탭 줄 밖 맨 왼쪽에 고정 · 넘치면 ‹ › · 목록 보기 */
.clistb { flex: none; display: flex; align-items: center; gap: 3px; height: 30px; padding: 0 7px; border: 2px solid var(--line-soft); border-bottom: 0; border-radius: 9px 9px 0 0; background: rgba(255, 255, 255, 0.06); font-size: 12px; font-weight: 700; white-space: nowrap; }
.clistb .ic { font-size: 13px; line-height: 1; }
.clistb:hover { border-color: var(--line); }
.clistb.on { border-color: var(--line); background: rgba(250, 185, 60, 0.12); color: var(--lel); }
.clistb .bd { flex: none; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #000; font: 700 10px/16px var(--font-disp); text-align: center; }
.cnav { flex: none; width: 16px; height: 28px; margin-bottom: 1px; border: 0; padding: 0; background: transparent; color: var(--ink-2); font-size: 17px; font-weight: 700; line-height: 1; }
.cnav:hover:not(:disabled) { color: var(--lel); }
.cnav:disabled { opacity: 0.25; cursor: default; }
.ctabs-row .cnew { margin-left: 2px; }
.clist { list-style: none; margin: 0; padding: 8px; flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; }
.clist .csec { margin: 8px 4px 0; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.clist .cempty { padding: 2px 6px; font-size: 12px; color: var(--ink-3); }
.crow { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid var(--line-soft); border-radius: 10px; background: rgba(255, 255, 255, 0.03); text-align: left; }
.crow:hover, .crow:focus-visible { border-color: var(--line); }
.crow.un { border-color: rgba(255, 128, 128, 0.55); }
.crow img { width: 22px; height: 24px; image-rendering: pixelated; object-fit: contain; flex: none; }
.crow .ic { flex: none; width: 22px; font: 18px/1 var(--emoji); text-align: center; }
.crow .ct { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.crow .ct b, .crow .ct small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .ct b { font-size: 13px; }
.crow .ct small { font-size: 11px; color: var(--ink-3); }
.crow .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.crow .mu { font: 11px/1 var(--emoji); opacity: 0.7; }
.crow .bd { flex: none; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #000; font: 700 11px/18px var(--font-disp); text-align: center; }
/* 머리줄 — 이름 한 줄(말줄임) · 상태도 한 줄 작은 글씨 · 좁으면 단추는 아이콘만 */
.chat { container-type: inline-size; }
.chat .win-h { gap: 3px; padding-left: 10px; padding-right: 6px; }
.chat .who { flex: 1 1 auto; margin-left: 2px; }
.chat .who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .win-h .cb { width: 26px; height: 26px; font-size: 13px; }
.chat .win-h [data-act="gift"] { flex: none; height: 26px; padding: 0 5px; }
.chat .win-h .x { width: 26px; }
@container (max-width: 420px) { .chat .win-h [data-act="gift"] .lb { display: none; } }
.cb { width: 30px; height: 30px; flex: none; border-radius: 8px; border: 2px solid var(--line-soft); background: transparent; font: 14px/1 var(--emoji); padding: 0; }
.cb:hover { border-color: var(--line); }
.cb[aria-pressed="true"] { opacity: 0.6; }
.cb.arm { border-color: var(--danger); background: rgba(255, 128, 128, 0.2); }
.msgs li { position: relative; }
.msgs li .by { display: block; margin-bottom: 1px; font-size: 11px; font-weight: 700; color: hsl(var(--h, 200), 80%, 74%); }
.msgs li.sys.keep { max-width: 92%; text-align: center; }
/* 이모지 반응 — 단 것은 수와 함께 늘 · 안 단 것은 글에 마우스를 올리면(키보드 포커스도) 보인다 */
.msgs li .rx { display: flex; gap: 3px; margin-top: 3px; white-space: nowrap; }
.msgs li .rx button { height: 20px; padding: 0 6px; border-radius: 10px; border: 1.5px solid var(--line-soft); background: rgba(0, 0, 0, 0.55); font-size: 11px; line-height: 1; }
.msgs li .rx button:hover { border-color: var(--line); }
.msgs li .rx button[aria-pressed="true"] { border-color: var(--lel); background: rgba(250, 185, 60, 0.2); }
.msgs li .rx button.z { display: none; }
.msgs li:hover .rx button.z, .msgs li:focus-within .rx button.z { display: inline-block; }
.msgs li .rx.none { position: absolute; right: 8px; bottom: -11px; margin: 0; z-index: 1; visibility: hidden; }
.msgs li.mine .rx.none { right: auto; left: 8px; }
.msgs li:hover .rx.none, .msgs li:focus-within .rx.none { visibility: visible; }
.msgs li .rx.none button.z { display: inline-block; }
.typing { flex: none; height: 18px; padding: 0 14px; font-size: 11px; line-height: 18px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 사람 고르기(방 만들기 · 초대) — 대화 자리를 잠깐 덮는다 */
.roompick { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.rp-name { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rp-name input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 9px; background: #05070f; border: 1.5px solid var(--line-soft); font-weight: 400; }
.rp-name input:focus { border-color: var(--line); outline: none; }
.rp-name input:focus-visible { outline: 3px solid var(--lel); outline-offset: 1px; }
.rp-h { margin: 0; font-size: 12px; }
.rp-h small { display: block; color: var(--ink-3); font-size: 11px; font-weight: 400; }
.roompick .pick { max-height: none; flex: 1; align-content: start; }
.roompick .pick button:disabled { opacity: 0.55; cursor: default; }
.roompick .row { margin-top: 0; }
.roompick .row .left { font: 12px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-note.bad { color: var(--danger); }
/* 말한 사람 머리 위 말풍선(3초) · Shift+누르기로 고른 우주인 */
.saybub { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; will-change: transform; padding: 3px 9px 4px; border-radius: 10px;
  background: #fff; color: #000; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); }
.saybub::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.saybub.pop { animation: sayPop 0.25s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes sayPop { from { opacity: 0; scale: 0.7; } }
.alabel.sel span { border-color: var(--lel); background: rgba(250, 185, 60, 0.28); }
.alabel.sel span::before { content: "✓ "; color: var(--lel); }

.sheet { left: 50%; bottom: 84px; transform: translateX(-50%); width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 160px); }
.sheet.win { animation-name: sheetIn; }
@keyframes sheetIn { from { opacity: 0; transform: translate(-50%, 14px); } }
.sheet > :not(.win-h) { overflow: auto; }
.slots { display: flex; justify-content: center; gap: 12px; padding: 14px 14px 4px; flex: none; }
.slots span { width: 58px; height: 58px; border: 2.5px dashed var(--line-soft); border-radius: 12px; display: grid; place-items: center; }
.slots span.on { border-style: solid; border-color: var(--lel); background: rgba(250, 185, 60, 0.08); animation: slotIn 0.3s cubic-bezier(0.2, 1.7, 0.4, 1); }
.slots img { width: 40px; height: 40px; image-rendering: pixelated; }
/* 10-24 — 세 번째 칸은 「선택」(2개만 넣어도 요리가 된다) · 비어 있을 때 옅은 점선 + 「선택」 글자 */
.slots span.opt:not(.on) { border-width: 1.5px; opacity: 0.7; }
.slots span.opt:not(.on)::after { content: attr(data-opt); font-size: 12px; color: var(--ink-3); }
@keyframes slotIn { from { transform: scale(0.6); } }
.ing-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 12px 14px; }
.ing-grid button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 6px; border-radius: 12px;
  border: 2px solid var(--line-soft); background: rgba(255, 255, 255, 0.03); font-size: 12px; white-space: nowrap; }
.ing-grid button:hover { border-color: var(--line); }
.ing-grid button[aria-pressed="true"] { border-color: var(--lel); background: rgba(250, 185, 60, 0.12); color: var(--lel); font-weight: 700; }
.ing-grid img { width: 40px; height: 40px; image-rendering: pixelated; }
.craft .row { padding: 0 14px; margin-top: 0; flex: none; }
.book { margin: 10px 14px 14px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.book summary { cursor: pointer; font-size: 13px; font-weight: 700; padding: 4px 0; }
.book summary b { font-family: var(--font-disp); color: var(--lel); margin-left: 4px; }
.book summary small { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.book-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.book-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1.5px solid var(--line-soft); font-size: 12px; min-width: 0; }
.book-list li.found { border-color: rgba(250, 185, 60, 0.55); }
.book-list .em { font: 18px/1 var(--emoji); flex: none; }
.book-list .t { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.book-list .t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-list .t small { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-list li.unknown b { color: var(--ink-3); letter-spacing: 0.15em; }

.brandtag { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--lel); color: var(--lel-ink); font: 700 11px/16px var(--font-disp); letter-spacing: 0.02em; white-space: nowrap; }
.brandtag.lab { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line-soft); }

.items { list-style: none; margin: 0; padding: 12px 14px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.items li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 8px 8px; border-radius: 12px; border: 2px solid var(--line-soft); text-align: center; min-width: 0; }
.items li.got { border-color: rgba(250, 185, 60, 0.6); }
.items .em { font: 30px/1.1 var(--emoji); }
.items .nm { font-weight: 700; font-size: 13px; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items .from { font-size: 11px; color: var(--ink-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items .ghost { height: 28px; margin-top: 4px; font-size: 12px; }
.items .empty { grid-column: 1 / -1; border: 0; color: var(--ink-3); padding: 18px; }
.gift-to { padding: 4px 14px 14px; border-top: 2px solid var(--line-soft); }
.gift-to p { margin: 10px 0 8px; font-size: 13px; }
.gift-to p small { display: block; color: var(--ink-3); font-size: 11px; }
.to-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.to-list button { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 6px; border-radius: 10px; border: 2px solid var(--line-soft); background: transparent; font-size: 13px; white-space: nowrap; }
.to-list button:hover { border-color: var(--lel); }
.to-list img { width: 20px; height: 22px; image-rendering: pixelated; }
.to-list .empty { color: var(--ink-3); font-size: 12px; }

.help { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); animation-name: helpIn;
  max-height: calc(100vh - 32px); }   /* 10-22 — 항목이 늘어 화면보다 길어지면 머리(×)가 화면 밖으로 밀렸다 → 창은 화면 안, 목록만 스크롤 */
.help > .win-h, .help .note { flex-shrink: 0; }
.help > dl { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
@keyframes helpIn { from { opacity: 0; transform: translate(-50%, -46%); } }
.help dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 16px 6px; font-size: 13px; }
.help dt { font-weight: 700; white-space: nowrap; }
.help dd { margin: 0; color: var(--ink-2); }
.help .note { margin: 8px 16px 16px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-3); }

/* ── 완성품 · 받은 선물 카드(가운데) ── */
.result, .giftbox { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; pointer-events: none; }
.result .card, .giftbox .card { pointer-events: auto; min-width: 280px; max-width: min(380px, calc(100vw - 40px)); padding: 18px 22px 16px; text-align: center;
  background: #000; border: 3px solid var(--lel); border-radius: 18px; box-shadow: 0 0 0 6px rgba(250, 185, 60, 0.12), 0 30px 80px rgba(0, 0, 0, 0.8); }
.result .card { margin-top: -6vh; animation: cardPop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes cardPop { from { opacity: 0; transform: scale(0.4) rotate(-6deg); } }
.card .big { font: 64px/1.1 var(--emoji); margin: 2px 0 6px; animation: floaty 2.4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-5px); } }
.card .nm { font-size: 22px; font-weight: 800; line-height: 1.25; }
.card .en { font: 600 13px var(--font-disp); color: var(--ink-3); letter-spacing: 0.03em; margin-top: 2px; }
.card .brand { margin-top: 8px; }
.card .pts { margin-top: 8px; font: 700 14px var(--font-disp); color: var(--lel); letter-spacing: 0.05em; }
.card .from { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.card .row { justify-content: center; margin-top: 14px; }
.first { display: inline-block; margin-bottom: 6px; padding: 2px 10px; border-radius: 8px; background: var(--lel); color: var(--lel-ink); font-weight: 800; font-size: 13px;
  animation: shine 1.2s ease-in-out infinite alternate; }
@keyframes shine { to { box-shadow: 0 0 18px rgba(250, 185, 60, 0.9); } }
.giftbox .box { position: absolute; width: 120px; height: 120px; display: grid; place-items: center; animation: boxShake 0.9s ease both; }
.giftbox .box img { position: absolute; width: 120px; image-rendering: pixelated; }
.giftbox .lid { top: 0; animation: lidOff 0.5s 0.9s cubic-bezier(0.3, 1.4, 0.5, 1) forwards; }
.giftbox .base { bottom: 0; animation: baseOut 0.4s 1.1s ease forwards; }
/* 카드는 처음에 숨어 있다가(opacity 0) 상자가 열린 뒤 떠오른다 — to 에 opacity 1 을 적어야 forwards 로 남는다 */
.giftbox .card { opacity: 0; animation: giftCard 0.5s 1.05s cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
@keyframes giftCard { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes boxShake { 0% { transform: scale(0.3); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 45% { transform: rotate(-8deg); } 60% { transform: rotate(8deg); } 75% { transform: rotate(-5deg); } 100% { transform: none; } }
@keyframes lidOff { to { transform: translateY(-90px) rotate(-24deg); opacity: 0; } }
@keyframes baseOut { to { transform: scale(0.6); opacity: 0; } }

/* ── 알림(위 가운데) ── */
.toasts { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(470px, calc(100vw - 40px)); padding: 8px 14px 8px 10px; border-radius: 14px;
  background: #000; border: 2.5px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); animation: toastIn 0.35s cubic-bezier(0.2, 1.5, 0.4, 1); cursor: default; }
.toast.click { cursor: pointer; }
.toast.msg, .toast.gift { border-color: var(--lel); }
.toast.err { border-color: var(--danger); }
.toast .ti { font: 20px/1 var(--emoji); flex: none; }
.toast .tx { min-width: 0; font-size: 13px; line-height: 1.4; }
.toast .tx b { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.toast .tx span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.toast.out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(0.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ── 여는 연출 — YOUR FIRST K-FOOD ── */
.intro { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; align-content: center; pointer-events: none; opacity: 0; }
.intro.on { animation: introText 3.3s ease forwards; }
.intro h1 { margin: 0; text-align: center; font-family: var(--font-disp); font-weight: 700; font-stretch: condensed; font-size: clamp(64px, 11vw, 152px); line-height: 0.9; letter-spacing: -0.01em; }
.intro h1 span { display: block; }
.intro p { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--ink-2); }
@keyframes introText {
  0% { opacity: 0; transform: scale(1.3); letter-spacing: 0.24em; filter: blur(10px); }
  20% { opacity: 1; transform: none; letter-spacing: -0.01em; filter: none; }
  68% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: scale(0.9); }
}

.fatal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; text-align: center; padding: 30px; background: #000; font-size: 15px; line-height: 1.7; }
.fatal b { display: block; font-size: 20px; margin-bottom: 8px; }
.fatal a { color: var(--lel); }

/* ════════ 2차 — 곡 고르기 · 점수판 탭 · 공습 · 배 · 미션 · 룰렛 · 사다리 ════════ */
/* 🎵 곡 차림표 — 단추 바로 아래 */
.songwrap { position: relative; display: inline-flex; }
.menu { position: absolute; top: 42px; right: 0; z-index: 30; min-width: 230px; padding: 6px; background: var(--panel-solid);
  border: 2.5px solid var(--line); border-radius: 14px; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.7); animation: winIn 0.18s ease; }
.menu button { width: 100%; display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 2px 8px; padding: 6px 8px; border: 0; border-radius: 9px; background: transparent; text-align: left; }
.menu button:hover { background: rgba(255, 255, 255, 0.08); }
.menu button .em { grid-row: span 2; font: 18px/1 var(--emoji); }
.menu button b { font-size: 13px; white-space: nowrap; }
.menu button small { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu button[aria-checked="true"] b { color: var(--lel); }
.menu button[aria-checked="true"] b::after { content: " ♪"; }
.menu .off { margin-top: 4px; border-top: 1px solid var(--line-soft); border-radius: 0 0 9px 9px; padding-top: 8px; }

/* 점수판 탭 — TOP CHEFS | 지구 방위대 */
.tabs { display: flex; gap: 12px; }
.tabs button { padding: 0 0 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 13px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--lel); }
.tabs button:hover { color: var(--ink); }
.top-list.def .pt { color: var(--alien); }

/* ── 왼쪽 공습 경보 띠 — 눈에 띄되 깜빡이지 않는다(3.2초에 한 번 천천히 숨 쉰다) ── */
.raid { position: fixed; top: 70px; left: 16px; width: 228px; z-index: 8; padding: 10px 12px 12px; border-radius: 14px;
  background: var(--alarm-bg); border: 2.5px solid var(--alarm); box-shadow: 0 0 0 4px rgba(255, 77, 94, 0.14), 0 14px 40px rgba(0, 0, 0, 0.6); }
.raid.live { animation: raidGlow 1.6s ease-in-out infinite alternate; }
@keyframes raidGlow { to { box-shadow: 0 0 0 7px rgba(255, 77, 94, 0.22), 0 0 30px rgba(255, 77, 94, 0.45); } }
.raid .rh { display: flex; align-items: center; gap: 8px; }
.raid .ic { font: 20px/1 var(--emoji); }
.raid .rt { font-size: 15px; color: var(--alarm); white-space: nowrap; }
.raid .clock { margin: 2px 0 0; font: 700 44px/1.05 var(--font-disp); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.raid .where { font-size: 12px; color: var(--ink-2); white-space: normal; overflow: visible; line-height: 1.4; }
/* 공습 경보 음성 자막 — 시작 순간 3초만(같은 문장) · 한 번 스며들고 깜빡이지 않는다 */
.raid .say { width: auto; margin: 6px 0 0; padding: 6px 8px; border-left: 3px solid var(--alarm); border-radius: 6px;
  background: rgba(0, 0, 0, 0.42); font-size: 12.5px; font-weight: 700; line-height: 1.45; color: var(--ink); white-space: normal;
  animation: sayIn 0.25s ease-out; }
@keyframes sayIn { from { opacity: 0; transform: translateY(-3px); } }
.raid .bar { height: 10px; margin: 8px 0 4px; border: 1.5px solid var(--line-soft); border-radius: 5px; overflow: hidden; background: rgba(0, 0, 0, 0.5); }
.raid .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lel), var(--ok)); transition: width 0.3s ease; }
.raid .cnt { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.raid .cnt .blk { font: 700 19px var(--font-disp); color: var(--lel); }
.raid .cnt .need { font: 700 15px var(--font-disp); color: var(--ink); }
.raid .cnt .lnd { color: var(--alarm); font-size: 12px; }
.raid .tip { width: auto; margin: 6px 0 0; font-size: 11px; color: var(--ink-3); }
.raid .go-call { width: 100%; margin-top: 10px; border-color: var(--alien-2); color: var(--ink); }
.raid.occupied { background: var(--alien-bg); border-color: var(--alien-2); box-shadow: 0 0 0 4px rgba(185, 140, 255, 0.16), 0 14px 40px rgba(0, 0, 0, 0.6); }
.raid.occupied .rt { color: var(--alien); }
.raid.occupied .clock { font-size: 30px; color: var(--alien); }
.raid.occupied .bar, .raid.occupied .cnt { display: none; }

/* 화면 가장자리 빛 — 공습 중 붉게 · 점령 중 보랏빛 */
.vignette { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 1.2s ease;
  box-shadow: inset 0 0 140px 20px var(--alarm-soft); }
body.raid-on .vignette { opacity: 1; animation: vigBreath 3.2s ease-in-out infinite alternate; }
body.occupied .vignette { opacity: 0.7; box-shadow: inset 0 0 160px 30px rgba(125, 255, 154, 0.16); }
@keyframes vigBreath { from { opacity: 0.55; } to { opacity: 1; } }
body.raid-on .hint { opacity: 0; }

/* 조준 원 — 가장 가까운 외계인에 붙으면 노랗게 */
.reticle { position: fixed; left: 0; top: 0; z-index: 7; width: 56px; height: 56px; pointer-events: none; opacity: 0; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75); transition: opacity 0.15s, width 0.12s, height 0.12s, border-color 0.12s; will-change: transform; }
.reticle::before, .reticle::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; transform: translate(-50%, -50%); color: rgba(255, 255, 255, 0.8); }
.reticle::before { width: 2px; height: 12px; }
.reticle::after { width: 12px; height: 2px; }
.reticle.on { opacity: 1; }
.reticle.rt-big { width: 72px; height: 72px; border-style: dashed; }   /* 10-25 — 'big' 이면 큰 창 규칙(.big · left/right 16px · margin auto)이 같이 걸려 원이 마우스에서 수백 px 밀렸다 */
.reticle.lock { border-color: var(--lel); box-shadow: 0 0 0 3px rgba(250, 185, 60, 0.25), 0 0 16px rgba(250, 185, 60, 0.5); }
.reticle.lock::before, .reticle.lock::after { color: var(--lel); }

/* 큰 알림 — 지켰다 / 정복됨 */
.banner { position: fixed; left: 50%; top: 27%; z-index: 32; transform: translate(-50%, -50%); text-align: center; pointer-events: none; white-space: nowrap;
  animation: bannerIn 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }
.banner b { display: block; font: 700 clamp(40px, 6vw, 68px)/1.05 var(--font-disp); letter-spacing: 0.01em; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.9); }
.banner small { display: block; margin-top: 8px; font-size: 15px; color: var(--ink-2); text-shadow: 0 1px 6px #000; }
.banner.good b { color: var(--lel); }
.banner.bad b { color: var(--alien); text-shadow: 0 0 28px rgba(125, 255, 154, 0.45), 0 4px 24px #000; }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -50%) scale(1.4); filter: blur(6px); } }

/* 던질 음식 — 공습 동안 조작판 자리 */
.arms { position: fixed; left: 50%; bottom: 18px; z-index: 9; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px;
  border-radius: 14px; background: rgba(0, 0, 0, 0.6); border: 2px solid var(--alarm); }
.arm { position: relative; width: 62px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; padding: 0 2px 5px;
  border-radius: 10px; background: #000; border: 2px solid var(--line-soft); transition: transform 0.06s, border-color 0.12s, background 0.12s; }
.arm:hover { border-color: var(--line); }
.arm:active { transform: translateY(2px); }
.arm kbd { position: absolute; left: 3px; top: 3px; min-width: 14px; padding: 0 2px; font-size: 9px; line-height: 12px; }
.arm .n { position: absolute; right: 4px; top: 2px; font: 700 12px var(--font-disp); color: var(--ink-2); }
.arm .em { font: 22px/1 var(--emoji); }
.arm .em img { width: 26px; height: 26px; image-rendering: pixelated; display: block; }
.arm .t { font-size: 11px; font-weight: 700; white-space: nowrap; }
.arm.on { background: var(--lel); color: var(--lel-ink); border-color: var(--lel); }
.arm.on .n { color: var(--lel-ink); }
.arm.none { opacity: 0.38; }

/* 조작판 단추 5개 — 배 · 미션이 늘었다 */
.key .t b { font-family: var(--font-disp); }

/* 공습 중 대화창이 열려 있으면 던질 음식 칸 위로 비켜 선다(1100 × 760 에서 아래 끝이 무기판에 닿는다) */
body.raid-on .chat { bottom: 112px; height: min(400px, calc(100vh - 200px)); }

/* ── 바다 위 배 ── */
.shiptag { position: absolute; left: 0; top: 0; visibility: hidden; padding: 2px 9px 3px; border-radius: 9px; white-space: nowrap; will-change: transform;
  background: rgba(0, 0, 0, 0.78); border: 1.5px solid var(--sea); font-size: 12px; font-weight: 700; color: var(--ink); }
.ships .win-h > small.off { color: var(--danger); }
.ship-list { list-style: none; margin: 0; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.ship-list .sl { width: 100%; display: grid; grid-template-columns: 24px minmax(0, 1fr) 96px; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px;
  border: 2px solid var(--line-soft); background: transparent; text-align: left; }
.ship-list .sl:hover, .ship-list .sl.on { border-color: var(--sea); }
.ship-list .sl .em { font: 18px/1 var(--emoji); }
.ship-list .sl .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ship-list .sl .t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-list .sl .t small { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-list .sl .p { display: flex; flex-direction: column; gap: 3px; align-items: stretch; font: 700 12px var(--font-disp); text-align: right; color: var(--ink-2); }
.ship-list .sl .p i { display: block; height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--sea) var(--p, 0%), rgba(255, 255, 255, 0.14) var(--p, 0%)); }
.ship-list .demo, .shipcard .demo { display: inline-block; padding: 0 6px; border-radius: 6px; border: 1.5px solid var(--lel); color: var(--lel); font: 700 11px/16px var(--font); white-space: nowrap; }
.ship-list .empty { padding: 18px 8px; color: var(--ink-3); font-size: 13px; text-align: center; white-space: normal; }

.shipcard { width: 304px; }
.shipcard .sc-h { display: flex; align-items: center; gap: 8px; }
.shipcard .sc-h .em { font: 20px/1 var(--emoji); }
.shipcard .sc-h .nm { min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shipcard .route { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.shipcard .route b { color: var(--ink); }
.shipcard .pbar { position: relative; height: 8px; margin: 14px 0 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); }
.shipcard .pbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--sea); }
.shipcard .pbar .boat { position: absolute; top: -13px; left: 0; transform: translateX(-50%); font: 16px/1 var(--emoji); }
.shipcard .dates { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-2); }
.shipcard .dates b { color: var(--sea); font-family: var(--font-disp); font-size: 14px; }
.shipcard .dates span { white-space: nowrap; }
.shipcard .dates { flex-wrap: wrap; row-gap: 2px; }
.shipcard .dates .left { flex-basis: 100%; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink); }
.shipcard .cargo { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.shipcard .cargo > b { font-size: 12px; }
.shipcard .cargo .meta { margin-left: 6px; font-size: 11px; color: var(--ink-3); }
.shipcard .cargo ul { list-style: none; margin: 4px 0 0; padding: 0; }
.shipcard .cargo li { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 1.6; }
.shipcard .cargo li span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shipcard .cargo li b { font-family: var(--font-disp); font-size: 13px; white-space: nowrap; }
.shipcard .cargo li.more { color: var(--ink-3); }
/* 10-22 「그 외 N건」 → 전체 품목(판 안에서만 스크롤 — 왼쪽 아래 고정 판이 화면 밖으로 밀리지 않게) */
.shipcard .cargo ul.all { max-height: min(38vh, 300px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.shipcard .cargo li small { color: var(--ink-3); font-size: 11px; }
.shipcard .cargo li.sum { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line-soft); }
.shipcard .cargo li.sum span { color: var(--ink-2); }
.shipcard .cargo li.q input { width: 100%; height: 28px; margin: 2px 0 4px; padding: 0 8px; border-radius: 8px; border: 1.5px solid var(--line-soft); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: inherit; }
.shipcard .itemsmore { padding: 0; border: 0; background: none; color: var(--sea); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.shipcard .itemsmore:hover { color: var(--ink); }
.shipcard .guess { margin: 8px 0 0; font-size: 11px; color: var(--ink-3); }
.shipcard .mis { margin: 8px 0 0; font-size: 12px; color: var(--lel); }       /* 세계 일주 배달 안내 — 알림(위 가운데)이 카드를 덮지 않게 카드 안에 */

/* ── 스토리 미션 ── */
.mission-list { list-style: none; margin: 0; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.mission-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; border: 2px solid var(--line-soft); }
.mission-list li.done { border-color: rgba(250, 185, 60, 0.6); }
.mission-list .em { font: 26px/1 var(--emoji); text-align: center; }
.mission-list .t { min-width: 0; line-height: 1.35; }
.mission-list .t b { font-size: 14px; }
.mission-list .t b small { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--lel); }
.mission-list .t p { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); }
.mission-list .t .step { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-3); }
.mission-list .t .step.on { color: var(--sea); }
.mission-list .ok { font: 700 12px var(--font-disp); color: var(--lel); white-space: nowrap; }
.mission-list .act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mission-list .act .ghost:disabled { opacity: 0.35; cursor: default; }

/* ── 점심 룰렛 · 사다리 창 ── */
.chips { list-style: none; margin: 0; padding: 12px 14px 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 4px 0 11px; border-radius: 15px; font-size: 13px; white-space: nowrap;
  border: 2px solid hsl(var(--h, 40), 80%, 64%); background: hsla(var(--h, 40), 80%, 50%, 0.12); }
.chips li.base { padding-right: 11px; }
.chips li button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); font-size: 15px; line-height: 1; padding: 0; }
.chips li button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.1); }
.chips .empty { color: var(--ink-3); font-size: 12px; border: 0; background: none; }
.addrow { display: flex; gap: 8px; padding: 0 14px; flex: none; }
.addrow input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: 10px; background: #05070f; border: 1.5px solid var(--line-soft); }
.addrow input:focus { border-color: var(--line); outline: none; }
.addrow input:focus-visible { outline: 3px solid var(--lel); outline-offset: 1px; }
.addrow .ghost { height: 34px; }
.lunch .row, .ladderwin .row { padding: 0 14px 14px; margin-top: 10px; flex: none; }
.lunch .row .left, .ladderwin .row .left { font: 12px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lad-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; padding: 12px 14px 0; }
.lad-cols h3 { margin: 0 0 6px; font-size: 13px; }
.lad-cols h3 small { margin-left: 4px; font-weight: 400; font-size: 11px; color: var(--ink-3); }
.lad-cols .addrow { padding: 8px 0 0; }
.pick { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; max-height: 196px; overflow: auto; scrollbar-width: thin; }
.pick button { width: 100%; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 5px; border-radius: 9px; border: 2px solid var(--line-soft); background: transparent; font-size: 12px; text-align: left; }
.pick button img { width: 18px; height: 20px; image-rendering: pixelated; flex: none; }
.pick button span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick button[aria-pressed="true"] { border-color: var(--lel); background: rgba(250, 185, 60, 0.14); color: var(--lel); font-weight: 700; }
.pick .empty { grid-column: 1 / -1; color: var(--ink-3); font-size: 12px; }
.prizes { margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 5px; font: 700 12px var(--font-disp); color: var(--ink-3); }
.prizes input { width: 100%; height: 30px; padding: 0 8px; border-radius: 9px; background: #05070f; border: 1.5px solid var(--line-soft); font: 13px var(--font); color: var(--ink); }
.prizes input:focus { border-color: var(--line); outline: none; }
.prizes .empty { list-style: none; margin-left: -22px; font: 12px var(--font); }

/* ── 앞 무대(룰렛 · 사다리) 글자 · 결과 카드 ── */
.stage-tags { z-index: 12; }
.stag { position: absolute; left: 0; top: 0; padding: 2px 9px 3px; border-radius: 9px; white-space: nowrap; will-change: transform; transition: opacity 0.2s;
  background: rgba(0, 0, 0, 0.8); border: 1.5px solid var(--line); font-size: 12px; font-weight: 700; }
.stag.prize { border-color: var(--lel); color: var(--lel); }
.stag.hit { background: var(--lel); color: var(--lel-ink); }
.stagecard { place-items: end center; padding-bottom: 92px; }
.stagecard .card { margin-top: 0; min-width: 300px; cursor: pointer; }
.stagecard .ttl { font: 600 13px var(--font-disp); letter-spacing: 0.06em; color: var(--ink-3); }
.stagecard .big { font: 800 30px/1.25 var(--font); margin: 4px 0 2px; animation: none; }
.stagecard .lines { list-style: none; margin: 8px 0 0; padding: 0; text-align: left; font-size: 13px; }
.stagecard .lines li { display: flex; justify-content: space-between; gap: 14px; padding: 2px 0; }
.stagecard .lines li + li { border-top: 1px solid var(--line-soft); }
.stagecard .lines b { color: var(--lel); white-space: nowrap; }
.stagecard .lines span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ════════ 5차 — 레벨 알약 · 큰 창(내 우주 · 거래 · 우주인 정보) · 아이템 · 단축칸 · 별자리 ════════ */
/* 아바타 그림은 16 × 20 — 예전 칸(우주인 16 × 18 비율)에 늘어나지 않게 담는다 */
.crew-list img, .to-list img, .pick button img, .ctab img, .chat .face { object-fit: contain; }
.crew-list .lv { flex: none; font: 700 10px var(--font-disp); color: var(--ink-3); }
.alabel span small { margin-left: 6px; font: 700 10px var(--font-disp); color: var(--ink-3); letter-spacing: 0.03em; }
.alabel.me span small { color: var(--lel); opacity: 0.8; }
.alabel.trade span small::after { content: " 🤝"; font-family: var(--emoji); }
/* 레벨 알약 */
.mepill { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 5px; }
.mepill img { width: 20px; height: 25px; image-rendering: pixelated; object-fit: contain; }
.mepill b { font-size: 13px; }
.mepill .xp { width: 34px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.mepill .xp i { display: block; height: 100%; width: 0; background: var(--lel); transition: width 0.4s ease; }
.mepill[aria-expanded="true"], #btnInv[aria-expanded="true"], #btnShop[aria-expanded="true"], #btnDex[aria-expanded="true"] { border-color: var(--lel); }
.mepill .gain { position: absolute; right: -4px; top: -6px; font: 700 12px var(--font-disp); color: var(--lel); pointer-events: none; animation: gainUp 1.3s ease forwards; }
@keyframes gainUp { from { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-14px); } }
/* 큰 창 — 한 번에 하나 · 대화창이 열려 있으면 그 왼쪽에만 · 열리면 오른쪽 목록 · 소식 띠 · 안내 줄은 접는다 */
.big { top: 70px; bottom: 84px; left: 16px; right: 16px; max-width: 900px; margin: 0 auto; }
body.chat-on .big { right: 368px; }
body.big-on .crew, body.big-on .crew.force { display: none !important; }
body.big-on .feed, body.big-on .hint { opacity: 0; }
/* 큰 창(내 우주 · 거래)이 열려 있으면 알림(토스트)을 머리줄(탭 · 닫기) 아래로 — top 68 그대로면 탭 줄(81~113)을 덮어 6초간 탭 · × 를 못 눌렀다
   (실측: 「가게」 탭 한가운데가 토스트). 가운데 카드(우주인 정보)는 머리가 더 아래라 예전 자리 그대로 둔다 — bigwin-on 은 game-ui.js bigOn() */
body.bigwin-on .toasts { top: 128px; }
.htabs { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.htabs button { height: 32px; padding: 0 11px; border-radius: 9px; border: 2px solid transparent; background: transparent; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--ink-2); }
.htabs button kbd { margin-left: 5px; }
.htabs button:hover { border-color: var(--line-soft); }
.htabs button[aria-selected="true"] { border-color: var(--lel); background: rgba(250, 185, 60, 0.14); color: var(--lel); }
.hbody { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.split > div { min-height: 0; overflow: auto; scrollbar-width: thin; padding: 12px 14px; }
.split .sr { border-left: 2px solid var(--line-soft); }
/* 오른쪽 칸(.sr)이 44줄 화면 읽기 전용 .sr(1px 잘라 숨김)과 이름이 겹쳐 카드가 안 보였다 — 이 칸에서만 숨김을 푼다 */
.split > .sr { position: static; width: auto; height: auto; overflow: auto; clip: auto; white-space: normal; }
.hbody .empty, .dempty { color: var(--ink-3); font-size: 13px; padding: 14px 4px; }
.muted { color: var(--ink-3); font-size: 12px; }
.bad, .menote.bad { color: var(--danger); }
/* 아이템 아이콘 — 등급 테두리 */
.ii { display: inline-grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 9px; border: 2px solid var(--g0); background: rgba(255, 255, 255, 0.04); }
.ii img { width: 42px; height: 42px; image-rendering: pixelated; display: block; }
.ii.g1 { border-color: var(--g1); } .ii.g2 { border-color: var(--g2); } .ii.g3 { border-color: var(--g3); box-shadow: 0 0 8px rgba(193, 140, 255, 0.45); }
.ii.g4 { border-color: var(--g4); box-shadow: 0 0 12px rgba(255, 180, 60, 0.6); }
.ii.big { width: 76px; height: 76px; border-radius: 13px; } .ii.big img { width: 70px; height: 70px; }
.toff .ii, .tpr .ii, .qreward .ii { width: 28px; height: 28px; border-radius: 6px; } .toff .ii img, .tpr .ii img, .qreward .ii img { width: 24px; height: 24px; }
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.itile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 5px; border-radius: 11px; border: 2px solid var(--line-soft); background: transparent; min-width: 0; }
.itile:hover { border-color: var(--line); }
.itile.on { border-color: var(--lel); background: rgba(250, 185, 60, 0.12); }
.itile .nm { max-width: 100%; font-size: 11px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.itile .nt { position: absolute; right: 4px; top: 3px; font: 700 11px var(--font-disp); color: var(--ink-2); }
.itile.got::after { content: ""; position: absolute; left: 6px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.grade { display: inline-block; padding: 0 7px; border-radius: 6px; font: 700 11px/18px var(--font); color: #000; background: var(--g0); white-space: nowrap; }
.grade.g1 { background: var(--g1); } .grade.g2 { background: var(--g2); } .grade.g3 { background: var(--g3); } .grade.g4 { background: var(--g4); }
.idetail .dtop { display: flex; gap: 12px; align-items: center; }
.idetail .dtop .em.big { font: 52px/1 var(--emoji); }
.dtt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dtt b { font-size: 15px; line-height: 1.3; }
.dtt small { color: var(--ink-3); font-size: 12px; }
.ddesc { margin: 10px 0 6px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.dstats { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 6px 0 10px; font-size: 12px; }
.dstats dt { color: var(--ink-3); white-space: nowrap; } .dstats dd { margin: 0; }
/* 아이템을 쉽게 — 「공습 때: …」 한 줄이 맨 위 · 숫자 능력치는 작게 · 처음 한 번 안내 */
.deasy { margin: 10px 0 0; padding: 7px 10px; border-radius: 9px; background: rgba(250, 185, 60, 0.12); color: var(--lel); font-size: 14px; font-weight: 700; line-height: 1.45; }
.dstats.sm { font-size: 11px; gap: 2px 10px; color: var(--ink-2); }
.iguide { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--lel); background: rgba(250, 185, 60, 0.1); }
.iguide .em { font: 20px/1 var(--emoji); flex: none; }
.iguide p { flex: 1; min-width: 0; margin: 0; font-size: 13px; line-height: 1.45; }
.iguide .ghost.sm { flex: none; }
.dact, .dgift, .dbuy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.dact .al, .dgift .al { flex-basis: 100%; font-size: 12px; font-weight: 700; }
.ghost.sm { height: 28px; min-width: 28px; padding: 0 8px; font-size: 12px; }
.ghost.sm.on { border-color: var(--lel); color: var(--lel); }
.dgift .to { display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 8px 0 4px; border-radius: 9px; border: 2px solid var(--line-soft); background: transparent; font-size: 12px; max-width: 100%; }
.dgift .to:hover { border-color: var(--lel); }
.dgift .to img { width: 16px; height: 20px; image-rendering: pixelated; object-fit: contain; }
.dgift .to span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dbuy small { flex-basis: 100%; }
/* 단축칸 줄(아이템 창 위) */
.hotrow { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.hotrow .hl { font-size: 12px; font-weight: 700; margin-right: 4px; white-space: nowrap; }
.hslot { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 9px; border: 2px dashed var(--line-soft); background: transparent; padding: 0; }
.hslot img { width: 34px; height: 34px; image-rendering: pixelated; }
.hslot kbd { position: absolute; left: 2px; top: 2px; font-size: 9px; line-height: 11px; min-width: 12px; }
.hslot.g0, .hslot.g1, .hslot.g2, .hslot.g3, .hslot.g4 { border-style: solid; }
.hslot.g1 { border-color: var(--g1); } .hslot.g2 { border-color: var(--g2); } .hslot.g3 { border-color: var(--g3); } .hslot.g4 { border-color: var(--g4); }
.hslot.none { opacity: 0.4; }
/* 가게 */
.wallet { margin-bottom: 10px; font-size: 13px; } .wallet b { font: 700 18px var(--font-disp); color: var(--lel); } .wallet small { color: var(--ink-3); }
.boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.box { display: grid; grid-template-columns: 40px 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 0 8px; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line-soft); background: transparent; text-align: left; }
.box:hover, .box.on { border-color: var(--lel); }
.box .em { grid-row: span 2; font: 30px/1 var(--emoji); }
.box b { font-size: 13px; } .box small { grid-column: 2; font-size: 10px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box .pr { grid-row: 1 / span 2; grid-column: 3; font: 700 13px var(--font-disp); font-style: normal; color: var(--lel); white-space: nowrap; }
.sh { margin: 4px 0 8px; font-size: 13px; } .sh small { font-weight: 400; color: var(--ink-3); margin-left: 4px; }
/* 도감 거르개 */
.dexf { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dexf input { height: 34px; padding: 0 10px; border-radius: 10px; background: #05070f; border: 1.5px solid var(--line-soft); }
.dexf input:focus { border-color: var(--line); outline: none; }
.chips2 { display: flex; flex-wrap: wrap; gap: 4px; }
.ch { height: 26px; padding: 0 9px; border-radius: 13px; border: 1.5px solid var(--line-soft); background: transparent; font-size: 12px; white-space: nowrap; }
.ch:hover { border-color: var(--line); }
.ch.on { border-color: var(--lel); background: rgba(250, 185, 60, 0.16); color: var(--lel); font-weight: 700; }
.dexn { margin: 2px 0 8px; font: 600 12px var(--font); color: var(--ink-3); }
/* 내 정보 */
.mepane { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; padding: 12px 14px; scrollbar-width: thin; }
.mecard { display: flex; flex-direction: column; gap: 6px; }
.mepre { width: 128px; height: 160px; align-self: center; image-rendering: pixelated; border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(143, 180, 255, 0.18), transparent 70%); }
.mewho { display: flex; align-items: baseline; justify-content: center; gap: 8px; } .mewho b { font-size: 16px; } .mewho .lv, .ptt .lv { font: 700 14px var(--font-disp); color: var(--lel); }
.xpbar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); overflow: hidden; } .xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--lel), var(--ok)); }
.xpt { text-align: center; font-size: 11px; color: var(--ink-3); }
.mehow { margin: 2px 0 6px; font-size: 11px; color: var(--ink-3); line-height: 1.45; }
.meform { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.mrow { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.mrow input, .mrow select { height: 32px; min-width: 0; padding: 0 9px; border-radius: 9px; background: #05070f; border: 1.5px solid var(--line-soft); color: var(--ink); font: 13px var(--font); }
.mrow input:focus, .mrow select:focus { border-color: var(--line); outline: none; }
.menote { font-size: 11px; color: var(--lel); line-height: 1.4; }
.meform .row { margin-top: 4px; }
.looks h3 { margin: 0 0 6px; font-size: 13px; } .looks h3 small { font-weight: 400; color: var(--ink-3); font-size: 11px; }
.avgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin-bottom: 12px; }
.av { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 2px 3px; border-radius: 10px; border: 2px solid var(--line-soft); background: transparent; min-width: 0; }
.av:hover { border-color: var(--line); }
.av.on { border-color: var(--lel); background: rgba(250, 185, 60, 0.14); }
.av img { width: 32px; height: 40px; image-rendering: pixelated; }
.av span { max-width: 100%; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.outfits { display: flex; flex-direction: column; gap: 6px; }
.orow { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: start; } .orow .on { font-size: 12px; font-weight: 700; padding-top: 4px; }
.ochips { display: flex; flex-wrap: wrap; gap: 4px; }
.oc { height: 26px; padding: 0 9px; border-radius: 13px; border: 1.5px solid var(--line-soft); background: transparent; font-size: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.oc[style]::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--oc); }
.oc:hover { border-color: var(--line); }
.oc.on { border-color: var(--lel); color: var(--lel); font-weight: 700; background: rgba(250, 185, 60, 0.14); }
.oc.lock { opacity: 0.45; cursor: default; }
.looks .row { margin-top: 12px; }
/* 개인 거래 */
.tradewin .tbody { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.task { margin: auto; text-align: center; font-size: 15px; } .task .row { justify-content: center; }
.tcols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tside { border: 2px solid var(--line-soft); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.tside.ok { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(139, 227, 185, 0.18); }
.tside h3 { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: 13px; }
.tside .tok { font-size: 12px; color: var(--ink-3); } .tside.ok .tok { color: var(--ok); }
.toff { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; min-height: 40px; }
.toff li { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 0; } .toff li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toff li.empty { color: var(--ink-3); }
.tpick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 0; }
.tpick h4 { margin: 0 0 6px; font-size: 12px; }
.tpi, .tpf { border-top: 1px solid var(--line-soft); padding-top: 8px; min-width: 0; }
.tpr { display: grid; grid-template-columns: 28px 1fr auto auto auto; align-items: center; gap: 5px; padding: 2px 0; font-size: 12px; }
.tpr .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tpr b { font: 700 12px var(--font-disp); min-width: 34px; text-align: center; }
.tpr.on .nm { color: var(--lel); }
.tpf { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; } .tpf h4, .tpf small { flex-basis: 100%; }
.fchip { height: 26px; padding: 0 8px; border-radius: 13px; border: 1.5px solid var(--line-soft); background: transparent; font-size: 12px; white-space: nowrap; }
.fchip.on { border-color: var(--lel); background: rgba(250, 185, 60, 0.16); color: var(--lel); }
.trow { margin-top: auto; } .go.on { background: var(--ok); border-color: var(--ok); }
/* 우주인 정보 카드 — 가운데 */
.pcard { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 32px)); animation-name: helpIn; }
.pbody { padding: 12px 16px 14px; }
.ptop { display: flex; align-items: center; gap: 12px; }
.pface { width: 64px; height: 80px; image-rendering: pixelated; object-fit: contain; }
.ptt { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ptt b { font-size: 17px; } .ptt small { font-size: 11px; color: var(--ink-3); } .ptt small.on { color: var(--ok); }
.pbio { margin: 10px 0 4px; font-size: 14px; white-space: pre-wrap; }
/* 공습 단축칸 — 던질 음식 줄 바로 위 */
.hotbar { position: fixed; left: 50%; bottom: 104px; z-index: 9; transform: translateX(-50%); display: flex; gap: 6px; padding: 5px; border-radius: 13px;
  background: rgba(0, 0, 0, 0.6); border: 2px solid var(--line-soft); }
.hotbar.on { border-color: var(--lel); }
.hot { position: relative; width: 52px; height: 52px; display: grid; place-items: center; padding: 0; border-radius: 10px; background: #000; border: 2px solid var(--line-soft); }
.hot img { width: 38px; height: 38px; image-rendering: pixelated; }
.hot kbd { position: absolute; left: 3px; top: 3px; min-width: 13px; padding: 0 2px; font-size: 9px; line-height: 12px; }
.hot .n { position: absolute; right: 4px; bottom: 2px; font: 700 11px var(--font-disp); }
.hot.g1 { border-color: var(--g1); } .hot.g2 { border-color: var(--g2); } .hot.g3 { border-color: var(--g3); } .hot.g4 { border-color: var(--g4); }
.hot.on { border-color: var(--lel); background: rgba(250, 185, 60, 0.25); box-shadow: 0 0 0 3px rgba(250, 185, 60, 0.3); }
.hot.none { opacity: 0.38; }
.hot .cd { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 8px; font: 700 15px var(--font-disp); font-style: normal;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) calc(var(--k, 1) * 100%), rgba(0, 0, 0, 0.25) calc(var(--k, 1) * 100%)); }
/* 별자리 */
.starsheet { width: min(520px, calc(100vw - 32px)); }
.qask { margin: 12px 14px 4px; font-size: 14px; font-weight: 700; }
.qmsg { margin: 14px; color: var(--ink-2); }
.qchoices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 14px 4px; }
.qc { height: 40px; font-size: 14px; }
.qc.ok { border-color: var(--lel); color: var(--lel); background: rgba(250, 185, 60, 0.14); }
.qc.bad { border-color: var(--danger); color: var(--danger); }
.starsheet .row { padding: 0 14px 14px; }
.qreward { display: inline-flex; align-items: center; gap: 6px; font: 12px var(--font) !important; color: var(--ink-2) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.startag { position: absolute; left: 0; top: 0; padding: 3px 11px; border-radius: 10px; background: rgba(0, 0, 0, 0.78); border: 1.5px solid var(--sky); color: var(--sky);
  font-size: 13px; font-weight: 700; white-space: nowrap; will-change: transform; }
.startag.ok { border-color: var(--lel); color: var(--lel); }
/* 별자리 그림 한 줄 이야기 — 그림과 같이 천천히(선 1.4초 뒤 1.5초) */
.qstory { margin: 2px 14px 4px; font-size: 12.5px; color: var(--ink-2); animation: qstoryIn 1.5s ease 1.4s both; }
@keyframes qstoryIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qstory { animation: none; } }
/* 남이 맞힌 별자리 이름표 — 먼 하늘이라 옅게 · 누를 수 없다(창 · 글 아래) */
.startag.skytag { opacity: 0.8; font-size: 12px; pointer-events: none; background: rgba(0, 0, 0, 0.5); }
@media (max-width: 1180px) {
  body.chat-on .big { right: 342px; }
  .split { grid-template-columns: minmax(0, 1fr) 236px; }
  .mepane { grid-template-columns: 250px minmax(0, 1fr); gap: 12px; }
  .avgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .htabs button kbd { display: none; }
  .mepill .xp { display: none; }
}
/* 10-25 휴대폰 — 큰 창(내 정보 · 아이템 · 가게 · 도감)의 좌우 두 칸이 88~112px 로 찌그러져 글이 세로로 쌓였다 → 위아래로 쌓는다
   목록이 위(늘어남) · 자세히 보기가 아래(내용만큼 · 창의 45% 까지) */
@media (max-width: 640px) {
  .split { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .split .sr { border-left: 0; border-top: 2px solid var(--line-soft); max-height: 45%; }
  .split > .sr:empty, .split > .sr:has(> .empty:only-child) { max-height: 64px; }
  .mepane { grid-template-columns: minmax(0, 1fr); }
  .htabs { gap: 2px; }
  .htabs button { flex: 1 1 auto; padding: 0 6px; font-size: 12.5px; }      /* 네 탭이 한 줄에 다 들어오게(「도감」 이 잘렸다) */
}
@media (max-width: 400px) { .htabs button { padding: 0 3px; font-size: 12px; letter-spacing: -0.03em; } }

/* ── 좁은 화면(셸 안 1100 × 760 등) ── */
@media (max-width: 1180px) {
  .crew { width: 214px; }
  .key { height: 42px; padding: 0 11px; font-size: 13px; }
  .feed { width: min(250px, calc(50vw - 226px)); }       /* 가운데 조작판(약 400px)의 왼쪽 끝에 닿지 않게 */
  .chat { width: 310px; }
  .ing-grid { grid-template-columns: repeat(6, 1fr); gap: 6px; }
  /* 대화창(오른쪽 아래)이 열린 채 만들기 · 가방을 열면 1100 폭에서 86px 겹친다 — 남은 왼쪽 자리 한가운데로 옮긴다 */
  body.chat-on .sheet { left: calc(50% - 161px); width: min(620px, calc(100vw - 354px)); }
}
/* 2차 — 조작판 단추가 5개(배 · 미션)로 늘었다. 1180 폭 아래에서는 단축키 글자를 접어 소식 띠에 닿지 않게 한다
   (단축키는 단추 title · 조작법 창(?)에 그대로 있다) */
@media (max-width: 1180px) {
  .key kbd { display: none; }
  /* 4차 — 대화창이 310 폭이 된다(탭은 줄이지 않고 옆으로 넘긴다 — 이름 6글자 그대로) */
}
@media (max-height: 800px) {
  .crew { max-height: calc(100vh - 150px); }
  .hint { bottom: 70px; }
}
@media (max-width: 820px) {
  .crew { display: none; }
  .crew.force { display: block; }
  .key .t, .key kbd { display: none; }
  .brand-t small, .net { display: none; }
  .ing-grid { grid-template-columns: repeat(4, 1fr); }
  .hint { white-space: normal; width: calc(100vw - 40px); text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .giftbox .box { display: none; }
  .giftbox .card { opacity: 1; }
}

/* ════════ 6차 — 태양계 둘러보기 · 여행 중 표시 · 달 ════════
   · 태양계를 보는 동안(body.solar-on) 지구 장면의 글자층 · 조작판 · 오른쪽 목록 · 지구 창은 접는다.
     머리막대(대화 · 알림) · 소식 띠 · 알림 · 공습 경보 띠는 그대로 — 여행 중에도 메시지와 공습을 받는다. */
body.solar-on #layer, body.solar-on .dock, body.solar-on #hint, body.solar-on #crew, body.solar-on #composer, body.solar-on #tip,
body.solar-on #shipCard, body.solar-on #ships, body.solar-on #missions, body.solar-on #lunch, body.solar-on #ladder, body.solar-on #craft,
body.solar-on #bag, body.solar-on #stageTags, body.solar-on #stageCard, body.solar-on #arms, body.solar-on #hotbar, body.solar-on #reticle,
body.solar-on #hoverTag, body.solar-on #stars, body.solar-on .startag { display: none !important; }
#btnSolar[aria-pressed="true"] { border-color: var(--lel); color: var(--lel); }
.solar-layer { z-index: 7; display: none; }
body.solar-on .solar-layer { display: block; }
.ptag { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: auto; padding: 2px 9px 3px; border-radius: 10px; white-space: nowrap;
  background: rgba(0, 0, 0, 0.62); border: 1.5px solid var(--line-soft); color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 1.35;
  will-change: transform; transition: border-color 0.15s, color 0.15s; }
.ptag:hover, .ptag.on { border-color: var(--line); color: var(--ink); background: #000; }
.ptag.home { border-color: rgba(143, 180, 255, 0.7); color: var(--sky); }
.ptag.sun { border-color: rgba(250, 185, 60, 0.6); color: var(--lel); }
.solarbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: none; gap: 10px; z-index: 9; }
body.solar-on .solarbar { display: flex; }
.solarbar .home .em { font: 18px/1 var(--emoji); }
/* 공습이 오면 「지구로 돌아가기」 를 크게 · 빨갛게 */
.solarbar.alert .home { height: 62px; padding: 0 22px; font-size: 19px; background: var(--alarm-bg); color: var(--ink); border-color: var(--alarm);
  box-shadow: 0 4px 0 rgba(255, 77, 94, 0.45), 0 0 0 5px rgba(255, 77, 94, 0.18); animation: raidGlow 1.6s ease-in-out infinite alternate; }
.solarbar.alert .home .em { font-size: 24px; }
.solar-hint { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); margin: 0; font-size: 13px; color: var(--ink-2); pointer-events: none;
  white-space: nowrap; text-shadow: 0 1px 4px #000; z-index: 6; display: none; }
body.solar-on .solar-hint:not([hidden]) { display: block; }
body.chat-on .solar-hint { opacity: 0; }
body:has(#hub:not([hidden])) .solar-hint { opacity: 0; }   /* 큰 창(내 정보 · 도장판)을 열면 안내는 비킨다 — 1100 × 760 에서 겹쳤다 */
/* 행성 카드 — 아래 단추 바로 위 가운데(오른쪽 대화창 · 왼쪽 소식 띠 · 왼쪽 위 경보 띠와 떨어진 자리) */
.solarcard { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); width: min(440px, calc(100vw - 680px)); min-width: 300px; z-index: 9;
  padding: 10px 14px 10px; border-radius: var(--r-bubble); background: rgba(0, 0, 0, 0.82); border: 2.5px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }
body:not(.solar-on) .solarcard { display: none; }
.solarcard .sc-h { display: flex; align-items: baseline; gap: 8px; }
.solarcard .sc-h .em { font: 20px/1 var(--emoji); align-self: center; }
.solarcard .sc-h .nm { font-size: 17px; }
.solarcard .sc-h .en { font: 600 12px var(--font-disp); color: var(--ink-3); letter-spacing: 0.06em; }
.solarcard .line { margin: 6px 0 2px; font-size: 14px; font-weight: 700; color: var(--lel); }
.solarcard .fact { margin: 0; font-size: 12px; color: var(--ink-2); }
.solarcard .row { margin-top: 8px; }
.solar-fade { position: fixed; inset: 0; z-index: 24; background: #000; opacity: 0; pointer-events: none; }
/* 다른 사람 화면 — 그 우주인 이름표 옆 「태양계 여행 중」 */
.alabel .trv { display: inline-block; margin-left: 6px; padding: 2px 8px 3px; border-radius: 10px; background: rgba(0, 0, 0, 0.78); border: 1.5px solid var(--sky);
  color: var(--sky); font: 700 11px/1.35 var(--font); font-style: normal; vertical-align: top; }
@media (max-width: 1180px) {
  .solarbar.alert .home { height: 56px; font-size: 17px; }
}

/* ════════ 7차 — 배 판 왼쪽 아래 고정 · 지금 흐르는 곡 판 ════════
   · 배 판은 지구를 따라다니지 않는다(지구 · 핀 이름표를 가리던 말풍선 → 왼쪽 아래 판). 소식 띠는 판 위로 올라간다(--ship-h · world-ui.js).
   · 공습 경보 띠 · 아래 창 · 큰 창 · 우주인 정보가 떠 있으면 머리줄만 남긴다(접힘) — 선택자는 world-ui.js SHIP_MINI 와 같게. */
#shipCard { left: 16px; top: auto; bottom: 18px; z-index: 12; max-height: calc(100vh - 230px); overflow: auto; animation-name: shipIn; }
#shipCard::after { display: none; }
@keyframes shipIn { from { opacity: 0; transform: translateX(-14px); } }
.shipcard .sc-h .pc { display: none; margin-left: auto; font: 700 14px var(--font-disp); color: var(--sea); white-space: nowrap; }
.shipcard .sc-h .sc-x { display: none; width: 24px; height: 24px; font-size: 17px; }
.shipcard .sc-live { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 8px; padding: 6px 9px; border: 1.5px solid rgba(95, 208, 255, 0.45); border-radius: 9px;
  background: rgba(95, 208, 255, 0.08); font-size: 13px; font-weight: 700; color: var(--sea); text-align: left; cursor: pointer; }
.shipcard .sc-live[aria-expanded="true"] { background: rgba(95, 208, 255, 0.2); border-color: var(--sea); }
.shipcard .sc-live[hidden] { display: none; }
.shipcard .sc-live small { font-weight: 400; color: var(--ink-3); }
.shipcard .sc-live:hover { border-color: var(--sea); }
.shipcard .sc-live:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 4px; }
.shipcard .sc-nav { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; }
.shipcard .sc-nav[hidden] { display: none; }
.shipcard .sc-nav button { min-width: 34px; padding: 0 8px; }
.shipcard .sc-pos { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
body:is(.bigwin-on, :has(#raid:not([hidden])), :has(.win.sheet:not([hidden])), :has(#pcard:not([hidden]))) #shipCard {
  width: min(250px, calc(50vw - 226px)); padding: 5px 6px 5px 10px; cursor: pointer; overflow: hidden; }
body:is(.bigwin-on, :has(#raid:not([hidden])), :has(.win.sheet:not([hidden])), :has(#pcard:not([hidden]))) #shipCard > :not(.sc-h) { display: none; }
body:is(.bigwin-on, :has(#raid:not([hidden])), :has(.win.sheet:not([hidden])), :has(#pcard:not([hidden]))) #shipCard .sc-h :is(.pc, .sc-x) { display: inline-block; }
body:is(.bigwin-on, :has(#raid:not([hidden])), :has(.win.sheet:not([hidden])), :has(#pcard:not([hidden]))) #shipCard .sc-h .nm { font-size: 13px; }
body.ship-on .feed { bottom: calc(28px + var(--ship-h, 0px)); }
.vlive { position: fixed; z-index: 12; left: calc(var(--ship-r, 320px) + 12px); bottom: 84px;
  width: min(600px, calc(100vw - var(--ship-w, 304px) - 312px)); height: min(450px, calc(100vh - 190px));   /* 오른쪽 접속자 · 음악 판(236 + 여백) 앞까지 */
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: #000; border: 2.5px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65); animation: vliveIn 0.22s ease-out; }
@keyframes vliveIn { from { opacity: 0; transform: translateY(10px); } }   /* 옆으로 미끄러지면 배 판 밑에서 나오는 것처럼 보인다 — 위로 살짝 */
.vlive[hidden] { display: none; }
.vlive .vl-h { display: flex; align-items: center; gap: 8px; flex: none; height: 40px; padding: 0 6px 0 12px; border-bottom: 1.5px solid var(--line-soft); }
.vlive .vl-h .nm { font: 700 14px var(--font-disp); white-space: nowrap; }
.vlive .vl-h .sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-size: 12px; }
.vlive .vl-big { margin-left: auto; flex: none; color: var(--sea); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.vlive .vl-big:hover { text-decoration: underline; }
.vlive .vl-big:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; border-radius: 3px; }
.vlive .x { flex: none; width: 28px; height: 28px; font-size: 18px; }
.vlive .vl-map { position: relative; flex: 1; min-height: 0; --vm-bg: #dfe9f2; --vm-ink: #14263a; --vm-accent: #0b62b8; }
body:is(.bigwin-on, :has(#raid:not([hidden])), :has(.win.sheet:not([hidden])), :has(#pcard:not([hidden]))) .vlive { display: none; }
@media (max-width: 900px) {
  .vlive { left: 10px; right: 10px; width: auto; top: 64px; bottom: auto; height: min(46vh, 360px); }
}
body.ship-on .hint { opacity: 0; }                   /* 안내 줄 왼쪽 끝이 1100 폭에서 판에 닿는다 — 판이 열려 있으면 접는다 */
@media (max-width: 1180px) {
  #shipCard { width: min(250px, calc(50vw - 226px)); }  /* 1100 폭 실측 — 304 면 조작판 왼쪽 끝에 닿는다(소식 띠와 같은 폭) */
}

/* 지금 흐르는 곡 — 오른쪽 아래(대화창 아래 끝 100px 밑 · 조작판 · 무기판 오른쪽). 곡 목록은 판 위로 펼친다 */
.music { position: fixed; right: 16px; bottom: 14px; z-index: 16; width: 236px; padding: 6px 8px 7px 10px; border-radius: 13px;
  background: rgba(0, 0, 0, 0.72); border: 2px solid var(--line-soft); }
.music.fold { width: auto; padding: 0; border: 0; background: none; }
.music .mu-open { display: none; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.6);
  border: 2px solid var(--line-soft); font-size: 13px; font-weight: 700; white-space: nowrap; }
.music .mu-open:hover { border-color: var(--line); }
.music .mu-open .em { font: 15px/1 var(--emoji); }
.music.fold .mu-open { display: inline-flex; }
.music.fold .mu-body { display: none; }
.mu-h { display: flex; align-items: center; gap: 6px; height: 20px; }
.mu-h .em { font: 13px/1 var(--emoji); flex: none; }
.mu-nm { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-nm.off { color: var(--ink-3); font-weight: 400; }
.mu-nm.flash { animation: muFlash 1.4s ease-out; }
@keyframes muFlash { 0%, 35% { color: var(--lel); text-shadow: 0 0 10px rgba(250, 185, 60, 0.9); } }
.mu-x { flex: none; width: 22px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); font-size: 15px; line-height: 1; }
.mu-x:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.mu-row { display: flex; gap: 5px; margin-top: 4px; }
.mu-row button { height: 26px; min-width: 28px; padding: 0 6px; border-radius: 8px; border: 1.5px solid var(--line-soft); background: #000; font-size: 11px; line-height: 1; }
.mu-row button:hover { border-color: var(--line); }
.mu-row [data-act="play"] { min-width: 34px; background: var(--lel); color: var(--lel-ink); border-color: var(--lel); font-size: 12px; }
.mu-row [data-act="pick"] { flex: 1; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mu-row [data-act="pick"][aria-expanded="true"] { border-color: var(--lel); color: var(--lel); }
.mu-vol { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; }
.mu-vol input { flex: 1; min-width: 0; height: 4px; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 4px; cursor: pointer;
  background: linear-gradient(to right, var(--lel) var(--p, 80%), var(--line-soft) var(--p, 80%)); }
.mu-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--lel); border: 2px solid #000; }
.mu-vol input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--lel); border: 2px solid #000; }
.mu-vol input:focus-visible { outline: 2px solid var(--lel); outline-offset: 3px; }
.mu-vol output { width: 24px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-dim, #aaa); font-size: 11px; }
.mu-list { top: auto; bottom: calc(100% + 6px); right: 0; width: 280px; }

/* ════ 같이 하기 — 미션 창 탭 · 왼쪽 위 「참여하기」 · 놀이 창(퀴즈 쇼 · 별 잇기 · 같이 요리) ════ */
.mtabs { display: flex; gap: 4px; flex: none; }
.mtabs button { height: 30px; padding: 0 10px; border-radius: 9px; border: 2px solid transparent; background: transparent; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--ink-2); }
.mtabs button:hover { border-color: var(--line-soft); }
.mtabs button[aria-selected="true"] { border-color: var(--lel); background: rgba(250, 185, 60, 0.14); color: var(--lel); }
.mtabs .cnt { display: inline-block; min-width: 16px; margin-left: 5px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #000; font: 700 10px/16px var(--font-disp); text-align: center; vertical-align: 1px; }
.missions .win-h > small#titleLine { margin-right: auto; }
.missions .win-h > small#titleLine[hidden] + .x { margin-left: auto; }
.coop-list { overflow: auto; }
.coop-rows .act { flex-wrap: wrap; justify-content: flex-end; max-width: 210px; flex-direction: row; }
.coop-rows .act .ghost, .coop-rows .act .go { height: 28px; font-size: 12px; padding: 0 9px; }
.coop-rows .act .ghost:disabled { opacity: 0.35; cursor: default; }

/* 왼쪽 위 작은 알림 — 공습 경보 띠와 같은 자리라 공습 · 큰 창 · 태양계 · 별자리 판이 뜨면 숨는다 */
.coopnote { position: fixed; top: 70px; left: 16px; width: 236px; z-index: 8; padding: 7px 8px 8px 10px; border-radius: 13px;
  background: rgba(0, 0, 0, 0.72); border: 2px solid var(--line-soft); display: flex; flex-direction: column; gap: 5px; }
.coopnote .nh { font-size: 12px; color: var(--lel); }
.coopnote .nr { display: flex; align-items: center; gap: 6px; min-width: 0; }
.coopnote .ne { flex: none; font: 15px/1 var(--emoji); }
.coopnote .nt { flex: 1; min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.coopnote .nb { flex: none; height: 24px; padding: 0 8px; font-size: 11px; border-radius: 7px; }
body.raid-on .coopnote, body.big-on .coopnote, body.solar-on .coopnote, body:has(#stars:not([hidden])) .coopnote { display: none; }
body:has(#coop:not([hidden])) .hint { opacity: 0; }        /* 놀이 창 아래 끝에 안내 줄이 비친다 — 창이 열려 있으면 접는다 */

/* 놀이 창 — 아래 가운데(다른 아래 창과 한 번에 하나) */
.coopwin { width: min(640px, calc(100vw - 32px)); }
.coopwin .cbody { padding: 10px 14px 14px; }
.coopwin .cmsg { margin: 6px 0; color: var(--ink-2); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.coopwin .cmsg p { margin: 0; }
.coopwin .nk { display: inline-block; max-width: 150px; padding: 0 7px; border-radius: 8px; border: 1.5px solid hsl(var(--h, 200), 70%, 64%); font-size: 12px; line-height: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.csky { display: block; width: 100%; height: 100%; border-radius: 12px; border: 1.5px solid var(--line-soft); }
/* 퀴즈 쇼 */
.qz { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }
.qz .csky { width: 230px; height: 230px; }
.qside { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qside .qq { margin: 0; font-size: 15px; font-weight: 700; }
.qside .qstory { margin: 0; }
.qtime { display: flex; align-items: center; gap: 8px; }
.qbar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.qbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--lel), var(--ok)); }
.qtime .qt { min-width: 34px; text-align: right; font: 700 15px var(--font-disp); font-variant-numeric: tabular-nums; }
.qside .qchoices { padding: 2px 0; }
.qc.picked { border-color: var(--sky); color: var(--sky); background: rgba(143, 180, 255, 0.12); }
.qc .qn { font-weight: 400; color: var(--ink-3); font-size: 11px; }
.qme { margin: 0; font-size: 13px; color: var(--ink-2); }
.qme b { color: var(--ink-3); } .qme b.up { color: var(--lel); }
.qtop { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.qtop li { display: flex; justify-content: space-between; gap: 8px; } .qtop li.me .nk { border-color: var(--lel); }
.qsoon { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 10px; text-align: center; }
.qsoon p { margin: 0; color: var(--ink-2); }
.qsoon .qt { font: 700 46px/1.05 var(--font-disp); color: var(--lel); font-variant-numeric: tabular-nums; }
.qsoon small { color: var(--ink-3); }
.qrank .qrh { margin: 0 0 8px; font-size: 12px; color: var(--ink-3); }
.qrank ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.qrank li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 76px 30px; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 9px; border: 1.5px solid var(--line-soft); font-size: 13px; }
.qrank li.m1 { border-color: rgba(250, 185, 60, 0.8); background: rgba(250, 185, 60, 0.1); }
.qrank li.m2, .qrank li.m3 { border-color: rgba(255, 255, 255, 0.45); }
.qrank li.me { box-shadow: inset 0 0 0 1.5px var(--sky); }
.qrank .pl { font: 700 18px/1 var(--emoji); text-align: center; }
.qrank .ok { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.qrank .pt { text-align: right; font-family: var(--font-disp); font-variant-numeric: tabular-nums; }
.qrank .rw .ii { width: 26px; height: 26px; border-radius: 6px; } .qrank .rw .ii img { width: 22px; height: 22px; }
/* 별 잇기 */
.lk { display: flex; flex-direction: column; gap: 6px; }
.lk .lsky { height: min(300px, calc(100vh - 430px)); min-height: 200px; touch-action: none; }
.lrow { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }
.lrow .lstep { color: var(--lel); } .lrow .lstep.bad { color: var(--ink-3); }
.lrow .ltime { font: 700 16px var(--font-disp); font-variant-numeric: tabular-nums; }
.lnote { margin: 0; font-size: 12px; color: var(--ink-3); min-height: 18px; }
.lnote.flash { animation: lnFlash 1.2s ease-out; }
@keyframes lnFlash { 0%, 40% { color: var(--lel); } }
.lparts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.lparts .none { font-size: 12px; color: var(--ink-3); }
.lk > .go { align-self: flex-start; }
/* 같이 요리 */
.pt { display: flex; flex-direction: column; gap: 8px; }
.phead { display: flex; align-items: center; gap: 10px; }
.phead .pem { font: 30px/1 var(--emoji); }
.phead .ptx { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.phead .ptx small { color: var(--ink-3); font-size: 12px; }
.phead .pleft { flex: none; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.pmid { display: flex; align-items: center; gap: 12px; padding-top: 18px; }
.kettle { position: relative; flex: none; width: 64px; height: 56px; border-radius: 0 0 28px 28px; background: radial-gradient(circle at 50% 80%, rgba(250, 185, 60, 0.18), rgba(250, 185, 60, 0) 70%);
  border: 2px solid var(--line-soft); border-top-width: 3px; display: grid; place-items: center; }
.kettle .kem { font: 26px/1 var(--emoji); }
.kettle .steam { position: absolute; bottom: 100%; width: 8px; height: 22px; border-radius: 4px; background: rgba(255, 255, 255, 0.5); filter: blur(3px); opacity: 0; }
.kettle .s1 { left: 14px; } .kettle .s2 { left: 28px; } .kettle .s3 { left: 42px; }
.kettle.pulse { animation: potPulse 0.8s ease-out; }
@keyframes potPulse { 30% { box-shadow: 0 0 0 4px rgba(250, 185, 60, 0.35); border-color: var(--lel); } }
.kettle.on { border-color: var(--lel); box-shadow: 0 0 22px rgba(250, 185, 60, 0.55), inset 0 0 14px rgba(250, 185, 60, 0.35); animation: potGlow 2.4s ease-in-out infinite; }
.kettle.on .steam { animation: steam 2.2s ease-out infinite; } .kettle.on .s2 { animation-delay: 0.7s; } .kettle.on .s3 { animation-delay: 1.4s; }
@keyframes potGlow { 50% { box-shadow: 0 0 34px rgba(250, 185, 60, 0.75), inset 0 0 18px rgba(250, 185, 60, 0.45); } }
@keyframes steam { 0% { transform: translateY(6px) scaleY(0.6); opacity: 0; } 30% { opacity: 0.7; } 100% { transform: translateY(-14px) scaleY(1.3); opacity: 0; } }
.pbarw { position: relative; flex: 1; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.pbarw i { display: block; height: 100%; background: linear-gradient(90deg, var(--lel), var(--ok)); transition: width 0.4s ease; }
.pbarw span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 12px var(--font-disp); color: #fff; text-shadow: 0 1px 2px #000; }
.pslots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pslots li { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 5px 8px; border-radius: 9px; border: 1.5px dashed var(--line-soft); }
.pslots li.full { border-style: solid; border-color: rgba(250, 185, 60, 0.55); }
.pslots .pw { font-size: 11px; color: var(--ink-3); }
.pslots .pf { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12px; }
.pslots .fe, .pfood .fe { font: 15px/1 var(--emoji); flex: none; }
.pslots .fn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pslots .pf .nk { max-width: 96px; flex: none; }
.pslots .padd { height: 26px; font-size: 12px; align-self: flex-start; }
.pslots .padd:disabled { opacity: 0.4; cursor: default; }
.ppick { padding: 8px; border-radius: 10px; border: 1.5px solid var(--lel); background: rgba(250, 185, 60, 0.06); }
.ppick p { margin: 0 0 6px; font-size: 12px; color: var(--ink-2); }
.pfoods { display: flex; flex-wrap: wrap; gap: 5px; }
.pfood { height: 30px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.pdone { margin: 0; font-weight: 700; color: var(--lel); }
.pdone.bad { color: var(--ink-3); }
@media (max-width: 1180px) {
  /* 1100 폭 — 소식 줄(왼쪽 아래 250px) 오른쪽 · 오른쪽 목록(236px) 왼쪽 사이에 선다. 대화창이 열리면 그 왼쪽까지 */
  .coopwin { left: 278px; transform: none; width: calc(100vw - 278px - 264px); }
  .sheet.win.coopwin { animation-name: winIn; }          /* 가운데 맞춤(translate -50%)이 없는 자리라 등장도 제자리에서 */
  body.chat-on .coopwin { left: 278px; width: calc(100vw - 278px - 364px); }
  .qz { grid-template-columns: 160px minmax(0, 1fr); gap: 12px; } .qz .csky { width: 160px; height: 160px; }
  .coopnote { width: 216px; }
}
.qz .qc { white-space: normal; height: auto; min-height: 38px; line-height: 1.2; padding: 4px 6px; }
@media (prefers-reduced-motion: reduce) { .kettle.on, .kettle.on .steam, .kettle.pulse, .lnote.flash { animation: none; } .kettle.on .steam { opacity: 0.4; } }

/* ── 레벨 업 「요술 램프 아우라」(lvfx.js) — 겉 판은 누름을 막지 않는다(누르면 연출만 닫히고 누름은 아래 창으로) ── */
.lvfx { position: fixed; inset: 0; z-index: 31; pointer-events: none; overflow: hidden; opacity: 0;
  background: radial-gradient(ellipse 58% 55% at 50% 44%, rgba(10, 4, 26, 0.74), rgba(10, 4, 26, 0.36) 55%, transparent 82%); }
.lvfx > * { position: absolute; }
.lvfx .halo { border-radius: 50%; mix-blend-mode: screen; filter: blur(4px);
  background: radial-gradient(circle, rgba(236, 220, 255, 0.55) 0, rgba(178, 130, 255, 0.42) 18%, rgba(128, 80, 230, 0.22) 38%, rgba(90, 50, 190, 0.08) 56%, transparent 70%); }
.lvfx .rays { border-radius: 50%; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, rgba(225, 205, 255, 0.24) 0deg 3deg, transparent 3deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 8%, rgba(0, 0, 0, 0.45) 34%, transparent 66%); mask-image: radial-gradient(circle, #000 8%, rgba(0, 0, 0, 0.45) 34%, transparent 66%); }
.lvfx canvas.pts { left: 0; top: 0; width: 100%; height: 100%; }
.lvfx canvas.lamp { filter: drop-shadow(0 0 14px rgba(255, 200, 90, 0.6)); }
.lvfx .num { left: 50%; transform: translate(-50%, -50%); font: 700 var(--fs, 160px)/1 var(--font-disp); color: #f6eeff; white-space: nowrap; opacity: 0;
  text-shadow: 0 0 18px rgba(196, 150, 255, 0.95), 0 0 46px rgba(150, 100, 255, 0.7); }
.lvfx .cap { left: 50%; transform: translateX(-50%); padding: 5px 14px 6px; border-radius: 14px; background: rgba(14, 6, 34, 0.72); border: 1.5px solid rgba(200, 170, 255, 0.55);
  color: #efe6ff; font-size: 14px; font-weight: 700; white-space: nowrap; text-shadow: 0 0 10px rgba(180, 130, 255, 0.8); opacity: 0;
  max-width: min(90vw, 760px); overflow: hidden; text-overflow: ellipsis; }

/* ── 8차 — 태양도 돌아가게: 머리막대 옆 「☀️ 서울 낮 / 🌙 서울 밤」(누르면 빠르게 ↔ 실제 시각) ── */
.suntag { height: 26px; padding: 0 10px; border-radius: 13px; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  color: #ffe9c4; background: rgba(60, 36, 8, 0.55); border: 1.5px solid rgba(255, 196, 110, 0.45); }
.suntag.night { color: #d6e2ff; background: rgba(10, 18, 44, 0.6); border-color: rgba(150, 175, 255, 0.4); }
.suntag:hover { filter: brightness(1.15); }
.suntag:focus-visible { outline: 2px solid #ffd27a; outline-offset: 2px; }
@media (max-width: 1180px) { .brand { gap: 9px; } .suntag { padding: 0 8px; } }

/* ── 접속할 때 「오늘의 추천 미션」 카드(reco.js) — 위 가운데 · 6초 뒤 접힌다 · 떠 있는 동안 알림은 그 아래로 ── */
.reco { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 41; width: min(400px, calc(100vw - 540px)); min-width: 300px;
  padding: 8px 10px 10px 12px; border-radius: 14px; background: var(--panel); border: 2px solid rgba(250, 185, 60, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); animation: recoIn 0.32s cubic-bezier(0.2, 1.4, 0.4, 1); }
.reco.fold { animation: recoOut 0.3s ease-in forwards; pointer-events: none; }
.reco .rh { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--lel); }
.reco .rh .rx { margin-left: auto; height: 24px; padding: 0 8px; font-size: 11px; }
.reco .rr { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-width: 0; }
.reco .re { flex: none; font: 20px/1 var(--emoji); }
.reco .rt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reco .rt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reco .rt small { font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reco .rr .go { flex: none; height: 28px; padding: 0 10px; font-size: 12px; }
body.reco-on .toasts { top: 196px; }
body.raid-on .reco, body.big-on .reco, body.solar-on .reco { display: none; }
@keyframes recoIn { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes recoOut { to { opacity: 0; transform: translate(-50%, -14px) scale(0.96); } }
@media (prefers-reduced-motion: reduce) { .reco, .reco.fold { animation-duration: 0.01s; } }

/* ── 지구 핀 — 묶음(📍5) · 날이 하루 남은 핀은 옅게(scene.js) ── */
.pclus { position: absolute; left: 0; top: 0; visibility: hidden; will-change: transform; cursor: pointer; }
.pclus span { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 8px 0 6px; border-radius: 12px; background: rgba(0, 0, 0, 0.7);
  border: 1.5px solid rgba(255, 220, 150, 0.75); font: 700 12px/1 var(--font-disp); color: #ffe7b8; white-space: nowrap; box-shadow: 0 0 10px rgba(250, 185, 60, 0.28); }
.pclus span i { font: 13px/1 var(--emoji); font-style: normal; }
.pclus.hot span { border-color: var(--lel); transform: scale(1.12); }

/* ── 내 정보 — 내 글 핀(남은 날 · 보기 · 지우기) ── */
.mypins { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.mypins h3 { margin: 0 0 6px; font-size: 13px; }
.mypins h3 small { font-weight: 400; color: var(--ink-3); font-size: 11px; margin-left: 4px; }
.mypins ul { list-style: none; margin: 0; padding: 0; max-height: 156px; overflow: auto; scrollbar-width: thin; }
.mypins li { display: flex; align-items: center; gap: 6px; padding: 3px 2px; font-size: 12px; min-width: 0; }
.mypins li .em { flex: none; font: 15px/1 var(--emoji); }
.mypins li .tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mypins li .dl { flex: none; color: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.mypins li.soon .dl { color: var(--lel); }
.mypins li button { flex: none; height: 22px; padding: 0 7px; font-size: 11px; }
.mypins .empty { color: var(--ink-3); font-size: 12px; }

/* ════════ 태양계 놀이(2026-10-22) — 태양계 핀 · 핀 말풍선 · 글쓰기 · 탐험 도장 · 도장판 · 특산 재료 · 태양계 레시피 · 같이 여행 ════════
   · 색은 위 :root 그대로 + 행성 색(--sc)만 그 자리에서(server solar.js PLANETS col 과 같다). 태양계를 볼 때(body.solar-on)만 보이는 것이 대부분 */
.solar-pins { z-index: 6; display: none; }
body.solar-on .solar-pins { display: block; }
/* 핀 — 가까이서는 이모지 핀(받침 점 + 줄기 + 동그란 머리) · 멀리서는 작은 점(.far) */
.spin { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: auto; padding: 0; border: 0; background: none; will-change: transform; }
.spin .em { position: absolute; left: -13px; top: -38px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.7); border: 1.5px solid hsl(var(--hue, 200), 70%, 72%); font: 14px/1 var(--emoji); }
.spin::before { content: ""; position: absolute; left: -1px; top: -13px; width: 2px; height: 12px; background: rgba(255, 255, 255, 0.75); }
.spin::after { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--hue, 200), 80%, 70%); box-shadow: 0 0 6px hsl(var(--hue, 200), 80%, 60%); }
.spin:hover .em, .spin:focus-visible .em { border-color: var(--lel); transform: scale(1.12); }
.spin.far .em, .spin.far::before { display: none; }
.spin.far::after { left: -4px; top: -4px; width: 8px; height: 8px; border: 1.5px solid rgba(255, 255, 255, 0.85); }
.sclus { position: absolute; left: 0; top: 0; pointer-events: auto; padding: 0; border: 0; background: none; will-change: transform; }
.sclus span { position: absolute; left: 0; top: -30px; transform: translateX(-50%); display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.72); border: 1.5px solid rgba(255, 220, 150, 0.75); font: 700 12px/1 var(--font-disp); color: #ffe7b8; white-space: nowrap; box-shadow: 0 0 10px rgba(250, 185, 60, 0.28); }
.sclus.far span { top: -12px; }
.sclus:hover span { border-color: var(--lel); }
.stip { z-index: 21; }
body:not(.solar-on) .stip, body:not(.solar-on) .scompose, body:not(.solar-on) .solar-place, body:not(.solar-on) .sdraft { display: none !important; }
.stip .where { margin: 6px 0 0; font-size: 11px; color: var(--sky); }
.stip .keep { margin: 6px 0 0; font-size: 11px; color: var(--ink-3); }
/* 글쓰기 — 아래 단추 바로 위 가운데(카드 자리 · 쓰는 동안 카드는 접는다) */
.scompose { left: 50%; top: auto; bottom: 80px; transform: translateX(-50%); width: 340px; z-index: 22; }
.scompose::after { display: none; }
.scompose .cmp-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.scompose .where { font-size: 11px; color: var(--sky); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scompose textarea { width: 100%; resize: none; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--line-soft); background: rgba(255, 255, 255, 0.05); }
.scompose .keepn { color: var(--ink-3); font-size: 11px; margin-right: auto; }
body.scomp-on .solarcard, body.scomp-on .solar-hint { display: none !important; }
.sdraft { position: fixed; left: 0; top: 0; z-index: 6; width: 0; height: 0; pointer-events: none; }
.sdraft::before { content: ""; position: absolute; left: -11px; top: -11px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--lel); animation: sdraft 1.2s ease-out infinite; }
@keyframes sdraft { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.solar-place { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); margin: 0; z-index: 9; padding: 6px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.82);
  border: 2px solid var(--lel); color: var(--ink); font-size: 13px; white-space: nowrap; pointer-events: none; }
body:has(.solar-place:not([hidden])) .solarcard, body:has(.solar-place:not([hidden])) .solar-hint { display: none !important; }
.solarbar [data-act="pin"][aria-pressed="true"] { border-color: var(--lel); color: var(--lel); }
/* 행성 카드 — 도장 · 특산 재료 줄 */
.solarcard .spec { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 12px; }
.solarcard .spec .stp { flex: none; padding: 1px 7px; border-radius: 9px; border: 1.5px solid var(--line-soft); color: var(--ink-3); font-size: 11px; white-space: nowrap; }
.solarcard .spec .stp.on { border-color: var(--lel); color: var(--lel); }
.solarcard .spec small { color: var(--ink-2); }
.solarcard .spec .spb { height: 28px; font-size: 12px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.solarcard .spec .spb:disabled { opacity: 0.6; cursor: default; }
/* 탐험 도장 연출 — 화면 가운데에 그 행성 색 도장이 「쿵」 */
.sstamp { position: fixed; left: 50%; top: 42%; z-index: 23; transform: translate(-50%, -50%) rotate(-12deg); pointer-events: none; text-align: center; }
.sstamp .ring { display: grid; place-items: center; align-content: center; gap: 2px; width: 168px; height: 168px; border-radius: 50%;
  border: 6px double var(--sc, var(--lel)); background: radial-gradient(circle, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.2));
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.4), 0 0 38px var(--sc, var(--lel)); color: var(--sc, var(--lel)); }
.sstamp .ring .em { font: 46px/1 var(--emoji); }
.sstamp .ring b { font-size: 22px; letter-spacing: 0.08em; }
.sstamp .ring small { font: 700 12px var(--font-disp); letter-spacing: 0.3em; }
.sstamp .cnt { margin: 8px 0 0; font: 700 14px var(--font-disp); color: var(--ink); text-shadow: 0 1px 4px #000; transform: rotate(12deg); }
/* 도장판(내 정보) — 8칸 */
.stampboard { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.stampboard h3 { margin: 0 0 6px; font-size: 13px; }
.stampboard h3 small { font-weight: 400; color: var(--ink-3); font-size: 11px; margin-left: 4px; }
.sgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.scell { display: grid; justify-items: center; gap: 0; padding: 4px 2px; border-radius: 10px; border: 1.5px dashed var(--line-soft); min-width: 0; }
.scell .em { font: 17px/1.2 var(--emoji); filter: grayscale(1); opacity: 0.35; }
.scell b { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.scell small { font: 600 10px var(--font-disp); color: var(--ink-3); }
.scell.on { border: 2px solid var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent); }
.scell.on .em { filter: none; opacity: 1; }
.scell.on b { color: var(--ink); }
.scell.on small { color: var(--sc); }
.snote { margin: 6px 0 0; font-size: 11px; color: var(--ink-3); }
/* 태양계 레시피(만들기 창) */
.sbook { margin-top: 0; }
.sbook-list li.srec { gap: 6px; }
.sbook-list li.srec.can { border-color: rgba(143, 180, 255, 0.6); }
.sbook-list li.srec .t { flex: 1; }
.sbook-list li.srec button { flex: none; height: 26px; padding: 0 8px; font-size: 11px; }
.go.sm { height: 26px; padding: 0 8px; font-size: 11px; }
/* 같이 가기 — 행성 고르기 차림표(대화창 🚀 아래) · 받은 초대 카드(위 가운데 · 30초 막대) */
.tripmenu { position: fixed; top: 0; left: 0; right: auto; z-index: 31; min-width: 210px; }
.tripmenu .mh { margin: 2px 6px 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tripmenu button { grid-template-columns: 26px 1fr auto; }
.tripmenu button .em { grid-row: auto; }
.tripmenu button small { color: var(--lel); }
.tripask { position: fixed; top: 116px; left: 50%; transform: translateX(-50%); z-index: 39; width: 380px; display: grid; grid-template-columns: 48px 1fr; gap: 6px 10px; align-items: center;
  padding: 12px 14px; border-radius: var(--r-bubble); background: #000; border: 2.5px solid var(--sc, var(--lel));
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.6), 0 0 22px color-mix(in srgb, var(--sc, var(--lel)) 40%, transparent); }
.tripask img { width: 48px; height: 60px; image-rendering: pixelated; }
.tripask .tx { display: flex; flex-direction: column; min-width: 0; }
.tripask .tx b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tripask .tx span { font-size: 12px; color: var(--ink-2); }
.tripask .tbar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.tripask .tbar i { display: block; height: 100%; background: var(--sc, var(--lel)); transform-origin: left center; }
.tripask .row { grid-column: 1 / -1; margin-top: 2px; }
/* 같이 간 우주인 — 행성 곁에 둥글게 */
.scomp { position: absolute; left: 0; top: 0; width: 0; height: 0; visibility: hidden; will-change: transform; pointer-events: none; }
.scomp img { position: absolute; left: -16px; top: -24px; width: 32px; height: 40px; image-rendering: pixelated; filter: drop-shadow(0 0 6px rgba(143, 180, 255, 0.6)); }
.scomp .nm { position: absolute; left: 0; top: 18px; transform: translateX(-50%); padding: 1px 7px 2px; border-radius: 9px; background: rgba(0, 0, 0, 0.75);
  border: 1.5px solid var(--sky); font-size: 11px; font-weight: 700; white-space: nowrap; }

/* ════════ 10-22 좁은 화면 머리막대 ════════
   · 제목 「루에랑 유니버스」 가 칸이 모자라면 한 글자씩 세로로 꺾였다(390 폭 7줄) — 늘 한 줄 · 520 폭 아래에서는 로고만.
   · 단추 줄이 820 폭 아래에서 화면 오른쪽 밖으로 나가 태양계 · 대화 · 조작법을 못 눌렀다(390 폭 8개) —
     남은 폭 안에서 옆으로 밀어 보게 한다(끝 단추가 반쯤 보여 더 있음을 알린다).
     음악 고르기 판(.menu)은 그 줄에 잘리지 않게 화면 기준(fixed)으로 띄운다. */
.brand-t b { white-space: nowrap; }
@media (max-width: 820px) {
  .top { gap: 10px; }
  .brand { flex: none; }
  .top-r { flex: 1 1 auto; min-width: 0; justify-content: flex-start; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; overscroll-behavior-x: contain; padding: 4px 0; }
  .top-r::-webkit-scrollbar { display: none; }
  .top-r > * { flex: none; }
  .top-r .menu { position: fixed; top: 60px; right: 10px; max-width: calc(100vw - 20px); }
}
/* 음악 판이 열린 동안은 머리막대를 처음 안내 카드(.reco · z 41)보다 위로 — 좁은 화면에서 판 윗줄이 카드에 가려졌다 */
.top:has(.menu:not([hidden])) { z-index: 42; }
@media (max-width: 520px) {
  .brand-t { display: none; }
  .brand img { height: 34px; }
}

/* ════════ 10-22 표현 모드 3단계(업무 · 약간의 오락 · 전부) ════════
   · 관리자에게만 머리막대 「🌌 전부」 단추 — 누르면 세 칸 고르기 판(.menu 를 그대로 · 좁은 화면에서는 위 절의 fixed 를 따른다)
   · 관리자 아닌 사람에게는 「전부」 가 아닐 때만 작은 표시(.modechip — 누르는 것이 아니다)
   · 꺼진 기능을 숨기는 규칙은 여기 없다 — main.js 가 modes.js 표로 <style id="modeCss"> 에 넣는다(기능 표 한 곳) */
.modewrap { position: relative; display: inline-flex; }
.modepill { display: inline-flex; align-items: center; gap: 5px; }
.modepill .em { font: 14px/1 var(--emoji); }
.modepill[data-mode="work"] { background: var(--work-bg); border-color: var(--sea); }
.modepill[data-mode="work"]:hover { background: var(--work-bg-h); }
.modepill[data-mode="light"] { border-color: var(--lel); }
.modemenu { left: 0; right: auto; width: 320px; max-width: calc(100vw - 20px); }
.modemenu .mm-h { margin: 2px 8px 6px; font-size: 11px; color: var(--ink-3); }
.modemenu button { align-items: start; }
.modemenu button small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
.modemenu button[aria-checked="true"] { box-shadow: inset 0 0 0 1px var(--lel); }
.modemenu button[aria-checked="true"] b::after { content: " ✓"; }
.modechip { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--panel);
  border: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.modechip[data-mode="work"] { border-color: var(--sea); }
.modechip[data-mode="light"] { border-color: var(--lel); }
.help .modenote { margin: 10px 16px 0; padding: 0 0 10px; border-top: 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.mission-list .act .modeoff { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 820px) {
  .top-r .modemenu { left: 10px; right: auto; }
}

/* ════════ 10-22 폰 폭(520 이하) 아래쪽 ════════
   · 음악 판이 아래 단추 줄(.dock) · 안내 줄을 덮었고, 소식 줄은 폭 계산이 음수라 0 이었다(390 폭 실측).
   · 아래 단추 줄 위로 한 층 쌓는다 — 왼쪽 소식 줄 · 오른쪽 음악(처음엔 접힌 단추 — world-ui.js) · 안내 줄은 그 위.
   · 공습 판(왼쪽 위)이 떠 있으면 처음 추천 카드는 그 아래로. */
@media (max-width: 520px) {
  .music { right: 10px; bottom: 70px; width: min(236px, calc(100vw - 20px)); }
  .feed { left: 10px; bottom: 70px; width: calc(100vw - 112px); }
  .hint { bottom: 118px; width: calc(100vw - 20px); }
  body:has(#raid:not([hidden])) .reco { top: 186px; }
  /* 10-25 — 소식 줄이 위로 쌓이면 안내 줄과 겹친다(390 폭 실측 · 둘 다 못 읽음) — 소식이 있으면 안내 줄을 접는다(첫 안내 말풍선이 같은 말을 한다) */
  body:has(.feed p) .hint { opacity: 0; }
  /* 처음 한 번 뜨는 이동 안내(#moveTip)가 소식 줄 위에 겹친다 — 안내가 떠 있는 동안만 소식 줄을 접는다(닫거나 한 번 움직이면 돌아온다) */
  body:has(#moveTip:not([hidden])) .feed { opacity: 0; }
  /* 10-25 — 배 카드 폭이 min(250px, 50vw − 226px) 라 휴대폰에서 음수 → 글이 한 글자씩 세로로 꺾였다(390 실측) — 화면 폭으로.
     위치 판(.vlive · 위)이 열려 있으면 둘이 겹치지 않게 카드는 남은 높이 안에서 스크롤 */
  #shipCard { width: auto; left: 10px; right: 10px; bottom: 78px; max-height: calc(100dvh - 78px - 64px - 10px); overflow-y: auto; }   /* 아래 단추 줄(.dock) 위로 */
  body.vlive-on #shipCard { max-height: calc(100dvh - 78px - 64px - min(46vh, 360px) - 20px); }
  /* 10-26 — 위치 판이 열려 있으면 카드 아래 단추 줄(◀ ▶ · 배 목록 · 닫기)이 높이 밖으로 밀렸다 — 품목 · 미션 칸은 접는다(판을 닫으면 다시 보인다) */
  body.vlive-on #shipCard :is(.cargo, .guess, .mis) { display: none; }
  /* 배 판이 열려 있으면 오른쪽 아래 「음악」 단추가 카드 아래 끝을 가린다 — 그동안만 숨긴다 */
  body.ship-on .music { display: none; }
}
/* 10-25 — 휴대폰 위 단추 줄은 옆으로 미는 줄이다 — 오른쪽 끝에 어두운 띠를 덮어 더 있다는 걸 보이고, 끝까지 밀면 마지막 단추가 띠 밖으로 나오게 여백을 둔다
   (줄에 mask 를 걸면 줄 안에서 화면 위로 뜨는 음악 · 모드 메뉴까지 잘린다 — 그래서 덮는 띠로) */
@media (max-width: 820px) {
  .top-r { padding-right: 30px; }
  .top::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 30px; pointer-events: none;
    background: linear-gradient(to right, rgba(2, 6, 16, 0), rgba(2, 6, 16, 0.92)); }
}
