:root {
  --el: #34b6ff;
  --ink: #10121e;
  --panel: rgba(16, 18, 30, 0.78);
  --line: rgba(255, 255, 255, 0.16);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2f7fe0; color: #fff; font: 15px/1.45 "Pretendard Variable", Pretendard, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; touch-action: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; }
[hidden] { display: none !important; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
body:not([data-screen="hud"]) #game { visibility: hidden; }

/* ---------- 들어가기 ---------- */
#gate, #loading { position: fixed; inset: 0; display: grid; place-items: center; background: #1b4fae; padding: 20px; overflow: auto; touch-action: pan-y; }
.logo { margin: 0; font-size: 64px; font-weight: 900; letter-spacing: 0.08em; line-height: 1; color: #fff; text-shadow: 0 4px 0 var(--ink); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; }
.gateBox { width: min(380px, 100%); text-align: center; }
.lead { margin: 14px 0 26px; font-weight: 600; color: #dbe9ff; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); border-radius: 12px 12px 0 0; overflow: hidden; }
.tabs button { padding: 12px; background: #123a86; font-weight: 800; color: #a9c4f2; }
.tabs button.on { background: #fff; color: var(--ink); }
#authForm { background: #fff; color: var(--ink); border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 12px 12px; padding: 18px; display: grid; gap: 12px; text-align: left; }
#authForm label { display: grid; gap: 6px; font-weight: 800; font-size: 13px; }
#authForm input { user-select: text; -webkit-user-select: text; height: 46px; border: 2px solid var(--ink); border-radius: 8px; padding: 0 12px; background: #f3f6fb; font-size: 16px; font-weight: 600; outline: none; }
#authForm input:focus { background: #fff; border-color: #2f6fe0; }
.note { min-height: 20px; margin: 0; font-size: 13px; font-weight: 700; color: #d2343f; }
.go { height: 50px; border-radius: 10px; background: #ffd23e; color: var(--ink); font-weight: 900; font-size: 17px; border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.go:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.go:disabled { opacity: 0.6; }
.small { font-size: 12.5px; color: #c9dbfa; margin: 16px 0 0; }
#loading { align-content: center; gap: 22px; text-align: center; }
#loading .bar { width: min(320px, 70vw); height: 14px; border: 2px solid var(--ink); border-radius: 8px; background: #123a86; overflow: hidden; }
#loading .bar i { display: block; height: 100%; background: #ffd23e; transform-origin: left; transform: scaleX(0); transition: transform 0.3s; }
#loadText { margin: 0; font-weight: 700; color: #dbe9ff; min-height: 22px; }

/* ---------- 속성 고르기 ---------- */
#pick { position: fixed; inset: 0; background: color-mix(in srgb, var(--el) 62%, #14204a); transition: background 0.3s; display: grid; grid-template-columns: 300px 1fr 340px; grid-template-rows: 1fr; align-items: center; gap: 12px; padding: 24px calc(24px + var(--safe-r)) 24px calc(24px + var(--safe-l)); }
#pickView { grid-column: 2; width: 100%; height: 100%; min-height: 0; }
.pickSide { grid-column: 1; grid-row: 1; }
.pickSide h2 { margin: 0; font-size: 34px; font-weight: 900; text-shadow: 0 3px 0 var(--ink); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.warn { margin: 6px 0 16px; font-weight: 800; color: #fff2a8; }
.pickList { display: grid; gap: 8px; }
.pickList button { display: grid; grid-template-columns: 26px 54px 1fr; align-items: center; gap: 8px; text-align: left; height: 52px; padding: 0 12px; border-radius: 10px; background: var(--panel); border: 2px solid transparent; }
.pickList button i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 2px solid #fff; }
.pickList button b { font-size: 18px; font-weight: 900; }
.pickList button span { font-size: 13px; color: #d5dcf0; font-weight: 600; }
.pickList button.on { background: #fff; color: var(--ink); border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.pickList button.on span { color: #4a5068; }
.pickList button.on i { border-color: var(--ink); }
.pickInfo { grid-column: 3; grid-row: 1; background: var(--panel); border-radius: 14px; padding: 20px; display: grid; gap: 10px; }
.pickHead b { font-size: 30px; font-weight: 900; margin-right: 10px; }
.pickHead span { font-weight: 700; color: #d5dcf0; }
.pickSkill { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 10px; }
.pickSkill b { font-size: 19px; font-weight: 900; color: #fff2a8; }
.pickSkill span { font-size: 13px; font-weight: 700; color: #d5dcf0; }
#pickText { margin: 0 0 6px; font-weight: 600; min-height: 66px; }
@media (max-width: 900px), (orientation: portrait) {
  #pick { grid-template-columns: 1fr; grid-template-rows: auto minmax(120px, 1fr) auto; padding: calc(12px + var(--safe-t)) 14px calc(12px + var(--safe-b)); gap: 6px; overflow: auto; touch-action: pan-y; }
  .pickSide, #pickView, .pickInfo { grid-column: 1; grid-row: auto; }
  .pickSide h2 { font-size: 24px; display: inline-block; margin-right: 10px; }
  .warn { display: inline-block; margin: 0 0 8px; font-size: 13px; }
  .pickList { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .pickList button { grid-template-columns: 18px 1fr; height: 42px; padding: 0 8px; gap: 6px; }
  .pickList button i { width: 16px; height: 16px; }
  .pickList button b { font-size: 15px; }
  .pickList button span { display: none; }
  .pickInfo { padding: 12px 14px; gap: 6px; }
  .pickHead b { font-size: 22px; }
  #pickText { min-height: 44px; font-size: 14px; margin: 0; }
}
@media (max-height: 480px) and (orientation: landscape) {
  /* a phone held sideways: the name of the game on the left, the form on the right, nothing below the fold */
  #gate { padding: 10px 20px; }
  .gateBox { width: min(720px, 100%); display: grid; grid-template-columns: 1fr 340px; column-gap: 28px; align-items: center; }
  .gateBox .logo, .gateBox .lead { grid-column: 1; }
  .gateBox .logo { align-self: end; }
  .gateBox .lead { align-self: start; margin-bottom: 0; }
  .gateBox .tabs { grid-column: 2; grid-row: 1; align-self: end; }
  .gateBox #authForm { grid-column: 2; grid-row: 2; padding: 12px 14px; gap: 8px; }
  #authForm input { height: 40px; }
  .note { min-height: 16px; }
  .gateBox .small { grid-column: 1 / -1; margin: 8px 0 0; }
  .go { height: 44px; }
  #pick { grid-template-columns: 210px 1fr 280px; grid-template-rows: 1fr; padding: 10px calc(14px + var(--safe-r)) 10px calc(14px + var(--safe-l)); overflow: hidden; }
  .pickSide { grid-column: 1; grid-row: 1; }
  #pickView { grid-column: 2; grid-row: 1; }
  .pickInfo { grid-column: 3; grid-row: 1; }
  .pickList { grid-template-columns: 1fr 1fr; }
  .pickSide h2 { display: block; }
  .warn { font-size: 12px; }
}

/* ---------- 공통 창 ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(8, 10, 20, 0.6); padding: 16px; pointer-events: auto; }
.sheetBox { width: min(320px, 100%); max-height: 100%; overflow: auto; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; padding: 18px; display: grid; gap: 10px; touch-action: pan-y; }
.sheetBox.wide { width: min(560px, 100%); }
.sheetBox h3 { margin: 0 0 4px; font-size: 20px; font-weight: 900; }
.sheetBox p { margin: 0; font-weight: 600; }
.sheetBox .small { color: #4a5068; }
.sheetBox > button:not(.go), .rowBtns button:not(.go) { height: 46px; border-radius: 10px; background: #eef1f7; border: 2px solid var(--ink); font-weight: 800; color: var(--ink); }
.rowBtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.rrow { display: grid; grid-template-columns: 38px 1.5fr 0.8fr 0.9fr 1.1fr 1fr; gap: 6px; padding: 7px 4px; border-bottom: 1px solid #e1e5ee; font-weight: 700; font-size: 14px; -webkit-text-stroke: 0; }
.rrow span:nth-child(3), .rrow span:nth-child(5) { text-shadow: 0 0 0 var(--ink); filter: brightness(0.72) saturate(1.3); }
.rrow.head { font-size: 12px; color: #6a7088; border-bottom: 2px solid var(--ink); }
.rrow.head span { filter: none !important; }
.rrow.mine { background: #fff5c2; }
#rankRows { max-height: 52vh; overflow: auto; min-height: 60px; font-weight: 600; }
.keys { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.keys dt { font-weight: 900; }
.keys dd { margin: 0; font-weight: 600; color: #333a52; }
#hud.touch .pcOnly, #hud:not(.touch) .touchOnly { display: none; }

/* ---------- 게임 화면 ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55); }
#hud button, #hud .mapWrap, #hud #chatBox.open, #pad, #look { pointer-events: auto; }
#look { position: absolute; inset: 0 0 0 42%; display: none; }
#hud.touch #look { display: block; }
#hurt { position: absolute; inset: 0; box-shadow: inset 0 0 0 0 rgba(255, 40, 60, 0); opacity: 0; }
#hurt.on { animation: hurt 0.45s ease-out; }
@keyframes hurt { 0% { opacity: 1; box-shadow: inset 0 0 90px 30px rgba(255, 40, 60, 0.75); } 100% { opacity: 0; box-shadow: inset 0 0 90px 30px rgba(255, 40, 60, 0); } }
#hud.dead #game { filter: grayscale(1); }

#aim { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
#aim i { position: absolute; background: #fff; box-shadow: 0 0 0 1.5px rgba(16, 18, 30, 0.85); border-radius: 2px; transition: transform 0.08s; }
#aim i:nth-child(1) { width: 2px; height: 8px; left: -1px; top: -15px; }
#aim i:nth-child(2) { width: 2px; height: 8px; left: -1px; top: 7px; }
#aim i:nth-child(3) { width: 8px; height: 2px; left: -15px; top: -1px; }
#aim i:nth-child(4) { width: 8px; height: 2px; left: 7px; top: -1px; }
#aim b { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--el); box-shadow: 0 0 0 1.5px rgba(16, 18, 30, 0.85); }
#aim.hit i { background: #ff4a5a; }
#aim.hit i:nth-child(1) { transform: translateY(-4px); }
#aim.hit i:nth-child(2) { transform: translateY(4px); }
#aim.hit i:nth-child(3) { transform: translateX(-4px); }
#aim.hit i:nth-child(4) { transform: translateX(4px); }
#lock { position: absolute; left: 0; top: 0; width: 54px; height: 54px; border: 3px solid #fff; border-radius: 50%; outline: 2px solid var(--ink); outline-offset: -6px; box-shadow: 0 0 0 2px var(--ink); animation: lock 0.8s linear infinite; clip-path: polygon(0 0, 34% 0, 34% 100%, 66% 100%, 66% 0, 100% 0, 100% 34%, 0 34%, 0 66%, 100% 66%, 100% 100%, 0 100%); }
@keyframes lock { 50% { width: 46px; height: 46px; } }
#lock.on { border-color: var(--el); }
#lockTap { position: absolute; left: 0; top: 0; width: 72px; height: 72px; border-radius: 50%; pointer-events: auto; }

#pops { position: absolute; inset: 0; overflow: hidden; }
.pop { position: absolute; left: 0; top: 0; font-weight: 900; font-size: 20px; color: var(--c); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; white-space: nowrap; will-change: transform, opacity; text-shadow: none; }
.pop.mine { font-size: 30px; }
.pop.react { font-size: 34px; color: #fff; -webkit-text-stroke: 5px var(--c); }
.pop.dot { font-size: 17px; }
.pop.me { font-size: 26px; }

.me { position: absolute; left: calc(14px + var(--safe-l)); top: calc(12px + var(--safe-t)); width: min(300px, 46vw); }
.meTop { display: flex; align-items: baseline; gap: 8px; font-weight: 900; }
.meTop b { font-size: 20px; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.meTop span { font-size: 15px; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meTop em { margin-left: auto; font-style: normal; font-size: 14px; padding: 2px 9px; border-radius: 6px; background: var(--ink); color: var(--c, #fff); border: 2px solid var(--c, #fff); text-shadow: none; white-space: nowrap; }
.hp { position: relative; height: 20px; margin-top: 5px; background: var(--ink); border: 2px solid var(--ink); border-radius: 7px; overflow: hidden; }
.hp i { position: absolute; inset: 0; background: #57d657; transform-origin: left; transition: transform 0.18s; }
.hp span { position: absolute; inset: 0; text-align: center; font-size: 12px; font-weight: 800; line-height: 16px; }
.xp { height: 8px; margin-top: 3px; background: var(--ink); border: 2px solid var(--ink); border-radius: 5px; overflow: hidden; }
.xp i { display: block; height: 100%; background: #ffd23e; transform-origin: left; transition: transform 0.25s; }
.meSub { display: flex; gap: 10px; margin-top: 3px; font-size: 12.5px; font-weight: 800; -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; }
#gain { color: #ffe36a; opacity: 0; }
#gain.on { animation: gain 1.6s ease-out; }
@keyframes gain { 0% { opacity: 0; transform: translateY(6px); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

.corner { position: absolute; right: calc(12px + var(--safe-r)); top: calc(12px + var(--safe-t)); display: grid; justify-items: end; gap: 6px; }
.mapWrap { position: relative; width: 132px; height: 132px; border: 3px solid var(--ink); border-radius: 50%; overflow: hidden; background: #2f86d8; cursor: pointer; }
.mapWrap canvas { width: 100%; height: 100%; display: block; }
.mapWrap span { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 11.5px; line-height: 1.15; padding: 0 14px; font-weight: 900; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
#hud.bigmap .mapWrap { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(86vw, 120vh); height: auto; aspect-ratio: 1280 / 896; border-radius: 14px; z-index: 40; }
#hud.bigmap .mapWrap canvas { height: auto; aspect-ratio: 1; margin-top: calc((896 / 1280 - 1) * 50%); }
.cornerBtns { display: flex; align-items: center; gap: 6px; }
.cornerBtns span { font-size: 12.5px; font-weight: 900; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; margin-right: 2px; }
.cornerBtns button { height: 34px; padding: 0 12px; border-radius: 8px; background: var(--panel); font-weight: 800; font-size: 13.5px; }

#feed { position: absolute; left: 50%; top: calc(12px + var(--safe-t)); transform: translateX(-50%); width: min(480px, 44vw); display: grid; gap: 5px; justify-items: center; }
#feed .row { padding: 5px 14px; border-radius: 8px; background: var(--panel); font-weight: 800; font-size: 13.5px; text-align: center; animation: feedIn 0.25s ease-out; transition: opacity 0.5s; }
#feed .row.grade { color: var(--c); border: 2px solid var(--c); background: var(--ink); font-size: 15px; }
#feed .row.boss { color: #ffd23e; border: 2px solid #ffd23e; background: var(--ink); font-size: 15px; }
#feed .row.out { opacity: 0; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); } }
#zone { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); font-size: 34px; font-weight: 900; letter-spacing: 0.06em; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; opacity: 0; white-space: nowrap; text-shadow: none; }
#zone small { display: block; margin-top: 2px; font-size: 0.5em; letter-spacing: 0.02em; -webkit-text-stroke: 4px var(--ink); }
#zone.risky small { color: #ff8a8a; }
#zone.on { animation: zone 2.8s ease-out; }
@keyframes zone { 0% { opacity: 0; letter-spacing: 0.3em; } 15% { opacity: 1; letter-spacing: 0.06em; } 75% { opacity: 1; } 100% { opacity: 0; } }
#banner { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); text-align: center; opacity: 0; display: grid; gap: 0; text-shadow: none; }
#banner b { font-size: 76px; font-weight: 900; line-height: 1.05; color: var(--c); -webkit-text-stroke: 9px var(--ink); paint-order: stroke fill; }
#banner span { font-size: 20px; font-weight: 900; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
#banner.small b { font-size: 44px; -webkit-text-stroke: 7px var(--ink); }
#banner.small span { font-size: 15px; }
#banner.on { animation: banner 2.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; transform: translate(-50%, -50%) scale(1.03); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1.03); } }
#tip { position: absolute; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translateX(-50%); width: min(520px, 86vw); padding: 10px 16px; border-radius: 10px; background: var(--panel); font-weight: 700; font-size: 14px; text-align: center; opacity: 0; transition: opacity 0.25s; }
#tip.on { opacity: 1; }

#chatBox { position: absolute; left: calc(14px + var(--safe-l)); bottom: calc(18px + var(--safe-b)); width: min(340px, 44vw); display: grid; gap: 6px; }
#hud.touch #chatBox { bottom: auto; top: calc(96px + var(--safe-t)); width: min(300px, 40vw); }
#chatLog { max-height: 108px; overflow: hidden; font-size: 13.5px; font-weight: 700; display: grid; gap: 1px; opacity: 0; transition: opacity 0.6s; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: none; }
#chatBox.fresh #chatLog, #chatBox.open #chatLog { opacity: 1; }
#chatLog b { color: #ffe36a; }
#chatInput { user-select: text; -webkit-user-select: text; display: none; height: 40px; border-radius: 8px; border: 2px solid #fff; background: var(--panel); padding: 0 12px; outline: none; font-weight: 700; font-size: 16px; }
#chatBox.open #chatInput { display: block; }

/* 조작 버튼 */
#pad, #jump, #dash { display: none; }
#skill { position: absolute; right: calc(26px + var(--safe-r)); bottom: calc(24px + var(--safe-b)); width: 96px; height: 96px; border-radius: 50%; background: var(--ink); border: 4px solid var(--c); overflow: hidden; display: grid; place-content: center; text-align: center; touch-action: none; }
#skill b { position: relative; font-size: 12.5px; font-weight: 900; line-height: 1.15; width: 70px; word-break: keep-all; }
#skill span { position: relative; font-size: 22px; font-weight: 900; color: #fff; line-height: 1; }
#skillCd { position: absolute; inset: 0; background: conic-gradient(rgba(255, 255, 255, 0.34) calc(var(--p, 0) * 360deg), transparent 0); }
#skill.ready { background: var(--c); color: var(--ink); text-shadow: none; }
#skill.ready b { -webkit-text-stroke: 0; }
#skill.held { transform: scale(0.94); border-color: #fff; }
#hud:not(.touch) #skill { width: 78px; height: 78px; pointer-events: none; }
#hud:not(.touch) #skill b { font-size: 11px; width: 60px; }
.round { position: absolute; width: 62px; height: 62px; border-radius: 50%; background: var(--panel); border: 3px solid #fff; font-weight: 900; font-size: 14px; touch-action: none; overflow: hidden; }
.round:active { background: #fff; color: var(--ink); text-shadow: none; }
#hud.touch #pad { display: block; position: absolute; left: calc(26px + var(--safe-l)); bottom: calc(26px + var(--safe-b)); width: 132px; height: 132px; border-radius: 50%; background: rgba(16, 18, 30, 0.42); border: 3px solid rgba(255, 255, 255, 0.8); touch-action: none; }
#knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); pointer-events: none; }
#hud.touch #jump { display: block; right: calc(134px + var(--safe-r)); bottom: calc(22px + var(--safe-b)); }
#hud.touch #dash { display: block; right: calc(114px + var(--safe-r)); bottom: calc(81px + var(--safe-b)); }
/* skills opened by the aura level: icon buttons on an arc around the skill button, drawn like it
   (ink inside a ring of the element's colour, filled when ready); the name is told when a skill opens */
.art { position: absolute; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); border: 3px solid var(--c, #fff); color: var(--c, #fff); overflow: hidden; display: grid; place-items: center; touch-action: none; padding: 0; }
.art svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.art svg .f { fill: currentColor; stroke: none; }
.art::after { content: ""; position: absolute; inset: 0; background: conic-gradient(rgba(16, 18, 30, 0.72) calc(var(--p, 0) * 360deg), transparent 0); }
.art .sec { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-size: 17px; font-weight: 900; color: #fff; }
.art .sec:empty { display: none; }
.art .lv { display: none; }
.art .key { display: none; }
.art.ready { background: var(--c); color: var(--ink); }
.art.shut { border-color: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.35); }
.art.shut svg { width: 20px; height: 20px; margin-top: -10px; }
.art.shut .lv { display: block; position: absolute; bottom: 7px; left: 0; right: 0; font-size: 11px; font-weight: 900; color: rgba(255, 255, 255, 0.75); font-style: normal; text-align: center; }
.art:active { transform: scale(0.92); }
#art1 { right: calc(48px + var(--safe-r)); bottom: calc(186px + var(--safe-b)); }
#art2 { right: calc(103px + var(--safe-r)); bottom: calc(175px + var(--safe-b)); }
#art3 { right: calc(149px + var(--safe-r)); bottom: calc(143px + var(--safe-b)); }
#art4 { right: calc(180px + var(--safe-r)); bottom: calc(94px + var(--safe-b)); }
#hud:not(.touch) .art { pointer-events: none; width: 48px; height: 48px; }
#hud:not(.touch) .art .key { display: block; position: absolute; top: 3px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 900; font-style: normal; line-height: 1; }
#hud:not(.touch) .art svg { margin-top: 6px; }
#hud:not(.touch) .art.shut .key { display: none; }
#hud:not(.touch) .art.shut svg { margin-top: -10px; }
#hud:not(.touch) #art1 { right: calc(41px + var(--safe-r)); bottom: calc(151px + var(--safe-b)); }
#hud:not(.touch) #art2 { right: calc(83px + var(--safe-r)); bottom: calc(143px + var(--safe-b)); }
#hud:not(.touch) #art3 { right: calc(119px + var(--safe-r)); bottom: calc(120px + var(--safe-b)); }
#hud:not(.touch) #art4 { right: calc(143px + var(--safe-r)); bottom: calc(85px + var(--safe-b)); }
#skinRows { display: grid; gap: 8px; }
.skinRow { display: grid; grid-template-columns: 18px 18px 18px 1fr; align-items: center; gap: 6px; height: 46px; padding: 0 12px; border-radius: 10px; background: #f3f6fb; color: var(--ink); border: 2px solid transparent; font-weight: 900; text-align: left; }
.skinRow i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); }
.skinRow.on { background: #fff; border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
#dash::after, #jump::after { content: ""; position: absolute; inset: 0; background: conic-gradient(rgba(16, 18, 30, 0.7) calc(var(--p, 0) * 360deg), transparent 0); }

#deadBox { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); text-align: center; display: grid; gap: 4px; }
#deadBox b { font-size: 44px; font-weight: 900; color: #ff5a6a; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: none; }
#deadBox span { font-size: 16px; font-weight: 800; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: none; }
#hud.duel .mapWrap { border-color: #ff5a6a; }
#hud[data-view="tp"]:not(.touch) #aim i { opacity: 0.9; }

@media (max-height: 480px) {
  .me { width: min(240px, 38vw); }
  .mapWrap { width: 96px; height: 96px; }
  #zone { font-size: 26px; top: 20%; }
  #banner b { font-size: 52px; }
  #feed { width: 40vw; }
  #feed .row { font-size: 12px; padding: 4px 10px; }
  #tip { bottom: calc(18px + var(--safe-b)); width: 38vw; font-size: 12.5px; }
}
@media (orientation: portrait) {
  #feed { top: calc(104px + var(--safe-t)); width: 86vw; }
  .mapWrap { width: 104px; height: 104px; }
  #hud.touch #chatBox { top: calc(150px + var(--safe-t)); width: 70vw; }
  #banner b { font-size: 54px; }
  #zone { font-size: 28px; }
}
