:root {
  --bg: #080b12;
  --panel: #111723;
  --panel2: #18202f;
  --line: #263145;
  --text: #dfe6f2;
  --dim: #8793a8;
  --player: #3d8bff;
  --ally: #5fd0e8;
  --empire: #e0263c;
  --empire2: #e8b93a;
  --pirate: #d5d9df;
  --pirate2: #7b828c;
  --swarm: #a25cff;
  --swarm2: #58d66a;
  --ok: #58d66a;
  --warn: #e8b93a;
  --bad: #ff5d6c;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; }
a { color: var(--player); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { white-space: nowrap; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 12px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--player); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.pri { background: var(--player); border-color: var(--player); color: #fff; }
button.danger { border-color: var(--bad); color: var(--bad); }
button.sm { padding: 2px 8px; font-size: 12px; }
input, select { background: #0b101a; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; min-width: 0; }
input[type=number] { width: 90px; }
.loading { padding: 40px; text-align: center; color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.f-empire { color: var(--empire); } .f-pirate { color: var(--pirate); } .f-swarm { color: var(--swarm); } .f-player { color: var(--player); } .f-ally { color: var(--ally); } .f-none { color: var(--dim); }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; }
header.top { position: sticky; top: 0; z-index: 5; background: rgba(8, 11, 18, .96); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1100px; margin: 0 auto; padding: 8px 16px 0; }
.brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand h1 { font-size: 18px; margin: 0; letter-spacing: 1px; }
.brand h1 span { color: var(--player); }
.brand .sp { flex: 1; }
.resbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.res { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; min-width: 120px; flex: 1; }
.res b { display: block; font-size: 11px; color: var(--dim); font-weight: normal; }
.res .full { color: var(--warn); }
nav.tabs { display: flex; gap: 2px; overflow-x: auto; }
nav.tabs a { padding: 7px 12px; color: var(--dim); border-bottom: 2px solid transparent; white-space: nowrap; }
nav.tabs a.on { color: var(--text); border-color: var(--player); }
nav.tabs .badge { background: var(--bad); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 4px; }

.alert { margin: 12px 0 0; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--bad); background: rgba(255, 93, 108, .1); }
.alert.gold { border-color: var(--warn); background: rgba(232, 185, 58, .1); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-top: 14px; }
.panel h2 { margin: 0 0 10px; font-size: 15px; }
.panel h3 { margin: 12px 0 6px; font-size: 13px; color: var(--dim); font-weight: normal; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.card { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.card .art { width: 100%; height: 190px; object-fit: contain; background: #05070c; border-radius: 6px; cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .88); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 8px; }
.devbox { margin-top: 22px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; text-align: center; }
.devbox .row { justify-content: center; }
.card .hd { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card .hd b { font-size: 14px; }
.card p { margin: 0; color: var(--dim); font-size: 12.5px; }
.card .ft { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.cost span { margin-right: 8px; white-space: nowrap; font-size: 12.5px; }
.cost .lack { color: var(--bad); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--dim); font-weight: normal; font-size: 12px; }
td.r, th.r { text-align: right; }
.scroll { overflow-x: auto; }
.scroll table { min-width: 560px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.kv dt { color: var(--dim); } .kv dd { margin: 0; }
.bar { height: 6px; background: #0b101a; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--player); }
.pill { display: inline-block; border: 1px solid currentColor; border-radius: 10px; padding: 0 8px; font-size: 11.5px; }

.auth { max-width: 360px; margin: 9vh auto; padding: 0 16px; }
.auth h1 { text-align: center; letter-spacing: 3px; margin-bottom: 4px; }
.auth h1 span { color: var(--player); }
.auth .sub { text-align: center; color: var(--dim); margin: 0 0 20px; }
.auth form { display: flex; flex-direction: column; gap: 10px; }
.auth input { width: 100%; padding: 9px 10px; }
.auth.wide { max-width: 520px; }
.races { display: flex; flex-direction: column; gap: 8px; }
.race { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; background: var(--panel); }
.race input { width: auto; margin-top: 4px; }
.race span { color: var(--dim); font-size: 12.5px; }
.race b { color: var(--text); font-size: 14px; }
.race.human:has(input:checked) { border-color: var(--player); }
.race.xeno:has(input:checked) { border-color: var(--swarm); box-shadow: inset 0 0 0 1px var(--swarm2); }
.garbled { color: var(--swarm); letter-spacing: 1px; }
.auth .sw { text-align: center; margin-top: 12px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #000; border: 1px solid var(--line); border-radius: 8px; padding: 9px 16px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; z-index: 20; }
#toast.on { opacity: 1; }
#toast.err { border-color: var(--bad); }

.mapbox { position: relative; }
#map { width: 100%; height: 72vh; min-height: 420px; display: block; background: #04060b; border-radius: 8px; border: 1px solid var(--line); cursor: grab; touch-action: none; }
.mapbox.full { position: fixed; inset: 0; z-index: 30; background: #04060b; }
.mapbox.full #map { height: 100vh; border: 0; border-radius: 0; }
.mapctl { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; z-index: 3; }
.mapctl button { background: rgba(10, 14, 22, .85); }
.mapinfo { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; background: rgba(10, 14, 22, .88); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
#maptip { position: absolute; background: rgba(0, 0, 0, .9); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 12px; pointer-events: none; display: none; white-space: nowrap; z-index: 2; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--dim); margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }

.msg { border-bottom: 1px solid var(--line); }
.msg summary { padding: 8px 4px; cursor: pointer; display: flex; gap: 10px; }
.msg summary time { color: var(--dim); font-size: 12px; white-space: nowrap; }
.msg.unread summary b { color: var(--warn); }
.msg .body { padding: 4px 4px 14px; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ending { text-align: center; padding: 30px 14px; }
.ending h2 { font-size: 26px; letter-spacing: 4px; color: var(--warn); }
.ending .story { max-width: 620px; margin: 0 auto 20px; color: var(--text); line-height: 1.9; }
.ending .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; text-align: left; }
@media (max-width: 600px) {
  .vs { grid-template-columns: 1fr; }
  .res { min-width: 44%; }
}

.battle { border: 1px solid var(--bad); background: #05070c; border-radius: 8px; margin-top: 12px; overflow: hidden; }
.bt-h { padding: 6px 12px; display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
canvas.bcv { width: 100%; height: 170px; display: block; }
.wtable { margin: 8px 0 4px; font-size: 13px; }
.wtable td, .wtable th { padding: 4px 8px; }
select[data-wsel], #fweapon, #cload { max-width: 100%; }
.brief { padding: 8px 12px 10px; border-top: 1px solid var(--line); font-size: 13px; }
.brief:empty { display: none; }
.bf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bf-t { display: flex; gap: 6px; align-items: baseline; margin-bottom: 3px; }
.bf-t .num { margin-left: auto; }
.bf-side.mine .bf-t b { color: var(--player); } .bf-side.foe .bf-t b { color: var(--bad); }
.bf-side.mine .bar i { background: var(--player); } .bf-side.foe .bar i { background: var(--bad); }
.bf-side .bar i { transition: width .8s; }
.bf-u { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; color: var(--text); }
.bf-u.dead { color: var(--dim); text-decoration: line-through; }
.bf-u em { color: var(--bad); font-style: normal; }
.bf-sh { margin-top: 6px; color: var(--ally); }
.bf-log { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; max-height: 132px; overflow-y: auto; }
.bf-l { padding: 2px 0; }
@media (max-width: 720px) { .bf-cols { grid-template-columns: 1fr; gap: 8px; } }
.chatlog { height: 52vh; min-height: 260px; overflow-y: auto; background: #0b101a; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 10px 0; }
.chatlog .cl { padding: 2px 0; overflow-wrap: anywhere; }
.chatlog time { color: var(--dim); font-size: 12px; }
input[type=radio], input[type=checkbox] { padding: 0; border: 0; background: none; width: auto; accent-color: var(--player); }
.auth .race input { width: 16px; height: 16px; flex: none; padding: 0; margin-top: 3px; }
.race.xeno input { accent-color: var(--swarm); }


/* ---------- 아이콘, 시간 표시 ---------- */
.ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; margin-right: 4px; }
.tchip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 9px 2px 7px; border-radius: 12px; background: #0b101a; border: 1px solid var(--line); color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tchip .ic { width: 14px; height: 14px; margin-right: 3px; color: var(--dim); }
.tchip.live { border-color: var(--warn); color: var(--warn); font-weight: bold; font-size: 14px; }
.tchip.live .ic { color: var(--warn); }
.alert .tchip, .bt-h .tchip { margin-left: 4px; }

/* ---------- 상단 ---------- */
.res { display: flex; align-items: center; gap: 6px; }
.res .ic { width: 22px; height: 22px; margin: 0; }
.res > div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.res small { color: var(--dim); font-size: 11px; white-space: nowrap; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.who > span { display: flex; flex-direction: column; line-height: 1.2; }
.who small { font-size: 11px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); flex: none; }
.avatar.sm { width: 28px; height: 28px; }

/* ---------- 카드 ---------- */
.grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card { flex-direction: row; gap: 12px; position: relative; transition: border-color .2s; }
.card .thumb { position: relative; width: 116px; height: 116px; flex: none; border-radius: 8px; overflow: hidden; background: #05070c; }
.card .thumb .art, .card .art { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 0; cursor: zoom-in; }
.card .cbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.card .lv { color: var(--dim); white-space: nowrap; }
.card .stat { font-size: 12px; }
.card .ft { margin-top: auto; padding-top: 4px; }
.cost span { display: inline-flex; align-items: center; margin-right: 10px; }
.cost .ic { width: 14px; height: 14px; margin-right: 3px; }
.card.busy { border-color: var(--warn); box-shadow: 0 0 0 1px rgba(232, 185, 58, .35), 0 0 18px rgba(232, 185, 58, .12); }
.card.busy .lv { color: var(--warn); font-weight: bold; }
.card.busy .thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(232, 185, 58, 0) 40%, rgba(232, 185, 58, .28)); animation: busy 1.6s ease-in-out infinite; pointer-events: none; }
.card .tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; background: rgba(0, 0, 0, .72); color: var(--warn); font-size: 11.5px; text-align: center; font-weight: bold; z-index: 1; }
.prog { height: 6px; background: #0b101a; border-radius: 3px; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c98f1e, var(--warn)); transition: width 1s linear; }
@keyframes busy { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- 프로필 사진 고르기 ---------- */
.avagrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ava { position: relative; cursor: pointer; text-align: center; font-size: 11.5px; color: var(--dim); }
.ava input { position: absolute; opacity: 0; pointer-events: none; }
.ava img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); display: block; }
.ava span { display: block; margin-top: 2px; }
.ava input:checked + img { border-color: var(--player); box-shadow: 0 0 0 2px rgba(61, 139, 255, .35); }
.avagrid.xeno .ava input:checked + img { border-color: var(--swarm); box-shadow: 0 0 0 2px rgba(88, 214, 106, .4); }
.ava input:checked ~ span { color: var(--text); }

/* ---------- 채팅 ---------- */
#chatdock { position: fixed; top: 0; right: 0; bottom: 0; width: 340px; z-index: 25; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
#chatdock[hidden], #chatfab[hidden] { display: none !important; }
.dk-h { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.dk-h .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); margin-left: 5px; vertical-align: 2px; }
.dk-h .dot[hidden] { display: none; }
.dk-note { margin: 0; padding: 6px 12px; font-size: 12px; border-bottom: 1px solid var(--line); }
#chatdock .chatlog { flex: 1; height: auto; min-height: 0; margin: 0; border: 0; border-radius: 0; padding: 10px 12px; }
.chatlog .cl { display: flex; gap: 8px; padding: 5px 0; align-items: flex-start; }
.chatlog .cl > div { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.chatlog .cl.mine b { color: var(--text) !important; }
.dk-f { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.dk-f input { flex: 1; min-width: 0; }
.dk-close { display: none; }
#chatfab { position: fixed; right: 14px; bottom: 76px; z-index: 24; display: none; border-radius: 24px; padding: 10px 18px; background: var(--player); border-color: var(--player); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
#chatfab.new::after { content: ''; position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--bad); border: 2px solid var(--bg); }

@media (min-width: 1180px) {
  body.has-dock { padding-right: 340px; }
  body.has-dock .mapbox.full { right: 340px; }
}
@media (max-width: 1179px) {
  #chatdock { display: none; left: 0; width: auto; border-left: 0; z-index: 50; }
  #chatdock.open { display: flex; }
  .dk-close { display: inline-block; }
  #chatfab { display: block; }
}

/* ---------- 모바일 ---------- */
@media (max-width: 720px) {
  html, body { font-size: 14.5px; }
  .wrap { padding: 0 10px 96px; }
  .top-in { padding: 6px 10px 0; }
  .brand { gap: 8px; }
  .brand h1 { font-size: 16px; }
  .brand .uni { display: none; }
  .brand #colsel { flex: 1; min-width: 0; order: 5; }
  .who small { display: none; }
  .resbar { flex-wrap: nowrap; overflow-x: auto; margin: 6px -10px; padding: 0 10px 6px; scrollbar-width: none; }
  .resbar::-webkit-scrollbar { display: none; }
  .res { min-width: 132px; flex: none; }
  nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 22; background: rgba(8, 11, 18, .97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  nav.tabs a { flex: none; min-width: 68px; text-align: center; padding: 13px 8px; border-bottom: 0; border-top: 2px solid transparent; }
  nav.tabs a.on { border-top-color: var(--player); }
  button { min-height: 38px; padding: 6px 14px; }
  button.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
  input, select { min-height: 38px; font-size: 16px; }
  input[type=number] { width: 78px; }
  .panel { padding: 12px; margin-top: 10px; }
  .grid { grid-template-columns: 1fr; }
  .card .thumb { width: 92px; height: 92px; }
  #map { height: 62vh; }
  .mapctl button { min-height: 34px; padding: 4px 9px; }
  .mapinfo { position: static; margin-top: 8px; }
  .auth { margin: 4vh auto; }
  .avagrid { gap: 6px; }
  #chatfab { bottom: 68px; }
  #toast { bottom: 76px; }
  .bt-h { font-size: 13px; }
  canvas.bcv { height: 120px; }
}
nav.tabs { scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
@media (max-width: 720px) {
  .brand #colsel { order: 5; flex: 1 1 100%; }
}


/* 출격 화면의 함선 표: 모바일에서는 함선마다 세로로 쌓는다 */
@media (max-width: 720px) {
  .scroll table.ftable { min-width: 0; display: block; }
  .ftable tbody { display: block; }
  .ftable tr:first-child { display: none; }
  .ftable tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
  .ftable td { border: 0; padding: 0; }
  .ftable td:nth-child(1) { font-weight: bold; }
  .ftable td:nth-child(2)::before { content: '보유 '; color: var(--dim); }
  .ftable td:nth-child(3), .ftable td:nth-child(4) { grid-column: 1 / -1; }
  .ftable td:nth-child(3) input { flex: 1; width: auto; }
  .ftable select { width: 100%; }
  .wtable { font-size: 12.5px; }
  .scroll table.wtable { min-width: 0; }
  .wtable th:last-child, .wtable td:last-child { display: none; }
}


/* ---------- 레벨, 보유 수 상자 ---------- */
.card .hd { align-items: flex-start; }
.card .hd > b { font-size: 15px; padding-top: 3px; }
.lvbox { display: inline-flex; flex-direction: column; align-items: center; min-width: 54px; padding: 3px 10px 4px; border-radius: 8px; background: #0b101a; border: 1.5px solid var(--player); line-height: 1.15; flex: none; }
.lvbox small { font-size: 10.5px; color: var(--dim); }
.lvbox b { font-size: 18px; color: #fff; white-space: nowrap; }
.lvbox.zero { border-color: var(--line); }
.lvbox.zero b { color: var(--dim); }
.card.busy .lvbox { border-color: var(--warn); }
.card.busy .lvbox b { color: var(--warn); }

/* ---------- 종족별 화면: 개척자는 각진 금속 느낌 ---------- */
html.human .panel { border-radius: 4px; border-top: 2px solid rgba(61, 139, 255, .5); }
html.human .card, html.human .res, html.human .lvbox { border-radius: 4px; }
html.human .card .thumb { border-radius: 3px; }
html.human button { border-radius: 3px; }
html.human .brand h1 { letter-spacing: 2px; }

/* ---------- 종족별 화면: 제노는 보라와 초록의 둥근 생체 느낌 ---------- */
html.xeno { --bg: #0a0611; --panel: #150d1f; --panel2: #1e142b; --line: #3d2a55; --dim: #a394ba; }
html.xeno header.top { background: rgba(10, 6, 17, .96); border-bottom-color: #4a2f6a; }
html.xeno .panel { border-radius: 18px; box-shadow: inset 0 0 28px rgba(162, 92, 255, .07); }
html.xeno .card { border-radius: 16px; }
html.xeno .card .thumb { border-radius: 14px; }
html.xeno .res, html.xeno .lvbox, html.xeno input, html.xeno select { border-radius: 12px; }
html.xeno button { border-radius: 16px; }
html.xeno input, html.xeno select, html.xeno .tchip, html.xeno .lvbox, html.xeno .prog, html.xeno #chatdock .chatlog { background: #0d0816; }
html.xeno .brand h1 span { color: var(--swarm2); }
html.xeno nav.tabs a.on { border-color: var(--swarm2); }
html.xeno button.pri, html.xeno #chatfab { background: #7a3fe0; border-color: #9a63ff; }
html.xeno button:hover:not(:disabled) { border-color: var(--swarm2); }
html.xeno .lvbox { border-color: var(--swarm); }
html.xeno .card.busy { border-color: var(--swarm2); box-shadow: 0 0 0 1px rgba(88, 214, 106, .35), 0 0 20px rgba(88, 214, 106, .14); }
html.xeno .card.busy .lvbox { border-color: var(--swarm2); }
html.xeno .card.busy .lvbox b, html.xeno .card .tag { color: var(--swarm2); }
html.xeno .card.busy .thumb::after { background: linear-gradient(180deg, rgba(88, 214, 106, 0) 40%, rgba(88, 214, 106, .3)); }
html.xeno .prog i { background: linear-gradient(90deg, #2f8f45, var(--swarm2)); }
html.xeno .tchip.live { border-color: var(--swarm2); color: var(--swarm2); }
html.xeno .tchip.live .ic { color: var(--swarm2); }
html.xeno #chatdock { border-left-color: #4a2f6a; }
html.xeno .bar { background: #0d0816; }
@media (max-width: 720px) {
  html.xeno nav.tabs { background: rgba(10, 6, 17, .97); }
  html.xeno nav.tabs a.on { border-top-color: var(--swarm2); }
}

/* 상자 안 숫자는 카드 제목 규칙보다 크게 */
.card .hd .lvbox { min-width: 62px; padding: 4px 12px 5px; }
.card .hd .lvbox b { font-size: 21px; padding: 0; }
.card .hd .lvbox small { font-size: 11px; }

.mycols { margin-bottom: 8px; }
.mycols button { border-color: var(--player); }
html.xeno .mycols button { border-color: var(--swarm); }


/* ---------- 유닛 역할 구분 ---------- */
.role { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: bold; line-height: 17px; vertical-align: 1px; color: #0a0d14; white-space: nowrap; }
.r-combat { background: #ff7a7a; } .r-cargo { background: #ffd866; } .r-scout { background: #5fd0e8; } .r-conquer { background: #c59bff; }
.r-support { background: #7de08a; } .r-carrier { background: #7fb0ff; } .r-defense { background: #b9c3d3; } .r-shield { background: #8fe3ff; }
.shipcell { display: flex; align-items: center; gap: 10px; }
.shipcell img { width: 42px; height: 42px; border-radius: 6px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.shipcell small { font-weight: normal; }
.urow { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; }
.urow .role { flex: none; min-width: 44px; text-align: center; }
.urow b { color: #fff; }
.card .hd > b .role { font-weight: bold; }

/* 채팅의 프로필 사진은 조금 크게 */
.chatlog .cl .avatar.sm { width: 38px; height: 38px; border-radius: 10px; }
.chatlog .cl { gap: 10px; padding: 6px 0; }

.obs { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.obs:last-child { border-bottom: 0; }

img.ui { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; vertical-align: -5px; margin-right: 6px; border: 1px solid var(--line); }
