:root {
  --panel: rgba(9, 20, 38, 0.74);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f2f6fb;
  --dim: #a9b8cc;
  --accent: #ffcf3f;
  --ice: #7fdcff;
  --bad: #ff6b6b;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1626; color: var(--text); }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.hidden { display: none !important; }
kbd {
  font: 600 11px/1 ui-monospace, "SF Mono", Menlo, monospace; padding: 4px 6px; border-radius: 5px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.1); color: var(--text);
}
#loading { position: fixed; inset: 0; display: grid; place-items: center; font-size: 18px; color: var(--dim); letter-spacing: 0.08em; }
#fade { position: fixed; inset: 0; background: #050a14; opacity: 0; pointer-events: none; transition: opacity 0.4s; z-index: 5; }
#fade.on { opacity: 1; }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: 0.28em; color: var(--ice); font-weight: 700; }

/* ---- title ---- */
#title {
  position: fixed; left: 0; top: 0; bottom: 0; width: min(460px, 100%); padding: 40px 34px 28px;
  background: linear-gradient(90deg, rgba(7, 16, 31, 0.9), rgba(7, 16, 31, 0.7));
  border-right: 1px solid var(--line); backdrop-filter: blur(10px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
#title h1 { margin: 6px 0 4px; font-size: 48px; line-height: 1.05; letter-spacing: -0.02em; font-weight: 900; }
.lede { margin: 0 0 8px; color: var(--dim); font-size: 14.5px; line-height: 1.65; }
.row { display: flex; gap: 10px; }
.row button { flex: 1; }
button { font: inherit; }
button.primary, .card > button {
  appearance: none; cursor: pointer; font-weight: 800; font-size: 16px; padding: 14px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.07); color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
button.primary { background: var(--accent); color: #1a1300; border-color: transparent; }
button.primary kbd { background: rgba(0, 0, 0, 0.12); border-color: rgba(0, 0, 0, 0.2); color: #1a1300; }
#continue + #newgame:not(:only-child) { background: rgba(255, 255, 255, 0.1); color: var(--text); border-color: var(--line); }
#continue.hidden + #newgame { background: var(--accent); color: #1a1300; border-color: transparent; }
button:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
.keys { margin: 14px 0 0; display: grid; gap: 8px; font-size: 12.5px; color: var(--dim); }
.keys div { display: grid; grid-template-columns: 118px 1fr; align-items: center; }
.keys dt { display: flex; gap: 4px; flex-wrap: wrap; }
.keys dd { margin: 0; }

/* ---- HUD ---- */
#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 1px 6px rgba(0, 20, 50, 0.6); }
.pill {
  display: inline-block; padding: 7px 13px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; text-shadow: none;
}
.hud-left { position: absolute; top: 18px; left: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#hud-alt { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; padding-left: 6px; font-variant-numeric: tabular-nums; }
#hud-trial { border-color: var(--accent); color: var(--accent); font-variant-numeric: tabular-nums; }
.hud-right { position: absolute; top: 16px; right: 22px; width: 190px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; text-align: right; }
.clock b { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; display: block; }
.clock span { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
#hud-snow { align-self: flex-end; font-size: 12px; padding: 5px 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#hud-snow.snow-good { border-color: rgba(127, 220, 255, 0.6); color: var(--ice); }
#hud-snow.snow-warn { border-color: rgba(255, 207, 63, 0.6); color: var(--accent); }
#hud-snow.snow-bad { border-color: rgba(255, 107, 107, 0.7); color: var(--bad); }
#map-snow { margin: -4px 0 8px; font-size: 13px; font-weight: 700; color: var(--ice); }
#hud-speed em.ice { color: var(--bad); }
#hud-money { font-size: 22px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.bar { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; }
.bar span { text-align: left; }
.bar i { display: block; height: 8px; border-radius: 4px; background: rgba(9, 20, 38, 0.55); border: 1px solid var(--line); overflow: hidden; }
.bar u { display: block; height: 100%; background: var(--ice); }
#bar-hunger { background: #ffb24a; }
.bar u.low { background: var(--bad); }
#hud-speed { position: absolute; left: 24px; bottom: 30px; display: flex; align-items: baseline; gap: 6px; }
#hud-speed b { font-size: 60px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
#hud-speed span { font-size: 14px; font-weight: 700; letter-spacing: 0.1em; }
#hud-speed em { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; color: var(--ice); margin-left: 10px; }
#minimap { position: absolute; right: 20px; bottom: 20px; width: 170px; height: 170px; filter: drop-shadow(0 4px 14px rgba(0, 10, 30, 0.5)); }
#prompt {
  position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); font-size: 15px; font-weight: 700; text-shadow: none; white-space: nowrap;
}
#prompt kbd { font-size: 12px; margin-right: 4px; }
#popups { position: absolute; left: 0; right: 0; top: 17%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.popup { font-size: 25px; font-weight: 900; color: var(--accent); animation: pop 2.4s ease-out forwards; white-space: nowrap; }
.popup.small { font-size: 16px; color: var(--ice); }
.popup.bad { color: var(--bad); }
.popup.speech { color: #fff; background: var(--panel); border: 1px solid var(--line); padding: 8px 14px; border-radius: 14px; text-shadow: none; white-space: normal; max-width: 80vw; }
@keyframes pop {
  0% { opacity: 0; transform: translateY(14px) scale(0.9); }
  8% { opacity: 1; transform: translateY(0) scale(1.04); }
  80% { opacity: 1; transform: translateY(-6px) scale(1); }
  100% { opacity: 0; transform: translateY(-20px) scale(1); }
}

/* ---- overlays ---- */
.overlay { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(4, 10, 22, 0.5); backdrop-filter: blur(4px); padding: 16px; z-index: 3; }
.card {
  width: min(430px, 100%); max-height: 92vh; overflow-y: auto; padding: 26px; border-radius: 18px; background: var(--panel);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px;
}
.card.wide { width: min(calc(92vh - 100px), 100%); }
.card h2 { margin: 0; font-size: 28px; font-weight: 900; }
.card p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.5; }
#dlg-options { display: grid; gap: 8px; margin: 6px 0; }
.option .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 3px; border: 1px solid rgba(255, 255, 255, 0.45); vertical-align: -1px; }
.option {
  appearance: none; cursor: pointer; color: var(--text); text-align: left; padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
}
.option:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); border-color: var(--accent); }
.option:disabled { opacity: 0.55; cursor: default; }
.option b { display: block; font-size: 15px; }
.option small { color: var(--dim); font-size: 12px; }
.option em { font-style: normal; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
/* A switch over the rows of a page (goals.js): which table of a board is shown. */
.tabs { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tabs button { appearance: none; flex: 1; cursor: pointer; padding: 9px 6px; border: 0; border-left: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--dim); font: inherit; font-size: 14px; font-weight: 800; }
.tabs button:first-child { border-left: 0; }
.tabs button:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.tabs button.on { background: var(--accent); color: #10151d; }
#bigmap { width: 100%; height: auto; max-height: calc(92vh - 150px); object-fit: contain; border-radius: 10px; display: block; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text) !important; flex-wrap: wrap; }
.legend i { width: 18px; height: 6px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.legend i.g { background: #22c55e; margin-left: 0; } .legend i.r { background: #ef4444; } .legend i.k { background: #111827; border: 1px solid #667; }
.legend i.l { background: repeating-linear-gradient(90deg, #dfe7f1 0 5px, transparent 5px 8px); }
.legend span { margin-left: auto; }

@media (max-width: 720px) {
  #title h1 { font-size: 36px; }
  #hud-speed b { font-size: 42px; }
  #minimap { width: 120px; height: 120px; }
}
@media (prefers-reduced-motion: reduce) { .popup { animation-duration: 0.01s; animation-delay: 2.2s; } #fade { transition: none; } }

/* Resort picker on the title screen. */
.resorts { display: flex; gap: 6px; margin: 2px 0 12px; }
/* Six resorts do not fit in a row without their names breaking: three to a row. */
#resorts { display: grid; grid-template-columns: repeat(3, 1fr); }
#resorts button { white-space: nowrap; }
.resorts button {
  flex: 1; padding: 8px 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06); color: inherit; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.resorts button small { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; opacity: 0.7; }
.resorts button.on { background: rgba(255, 255, 255, 0.92); color: #0b1626; border-color: transparent; cursor: default; }
.credit { margin: 10px 0 0; font-size: 10.5px; opacity: 0.6; }
.ads-link { margin-top: 4px; font-size: 12px; opacity: 0.85; }
.ads-link a { color: var(--accent); text-underline-offset: 3px; }
.ads-link button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* Saying what went wrong: over whatever else is open (the pause menu, the first page). */
#about { z-index: 8; }
#about .card { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
#about h2 small { font-size: 14px; font-weight: 600; opacity: 0.6; margin-left: 6px; }
.about-body { overflow-y: auto; display: grid; gap: 10px; margin: 4px 0; padding-right: 6px; }
.about-body dl { display: grid; gap: 4px; margin: 0; }
.about-body dt { margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--ice); }
.about-body dd { margin: 0; font-size: 13px; line-height: 1.5; color: var(--dim); }
.about-body a { color: inherit; text-decoration: underline; }
.about-body code { font-size: 12px; }
.map-credit { font-size: 10.5px !important; opacity: 0.65; }
#bug { z-index: 8; }
#bug .card { width: min(520px, 100%); }
#bug-text, #bug-contact { padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.1); color: var(--text); font: inherit; font-size: 15px; }
#bug-text { min-height: 120px; resize: vertical; line-height: 1.5; }
#bug-text:focus, #bug-contact:focus { outline: 2px solid var(--ice); outline-offset: 1px; }
#bug-note { min-height: 1.5em; color: var(--accent) !important; font-size: 13px !important; }
#bug-send:disabled { opacity: 0.5; }

/* ---- friends: nickname, chat, who is online ---- */
.nick { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--dim); }
.nick input, #chat-input {
  font: inherit; font-size: 16px; font-weight: 700; color: var(--text); padding: 11px 13px; border-radius: 10px; min-width: 0;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); outline: none;
}
.nick input:focus, #chat-input:focus { border-color: var(--ice); }
.together { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--dim); }
#hud-online { color: #7ee2a8; font-size: 12px; }
#hud-online.off { color: var(--dim); }
#chat { position: fixed; left: 20px; bottom: 112px; width: min(380px, calc(100vw - 40px)); z-index: 2; pointer-events: none; display: flex; flex-direction: column; gap: 6px; }
#chat-log { max-height: 150px; overflow: hidden; display: flex; flex-direction: column; gap: 3px; }
#chat-log p {
  margin: 0; align-self: flex-start; max-width: 100%; padding: 4px 10px; border-radius: 10px; background: rgba(9, 20, 38, 0.6);
  font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; transition: opacity 0.8s;
}
#chat-log p b { color: var(--ice); margin-right: 7px; }
#chat-log p.mine b { color: var(--accent); }
#chat-log p.note { color: var(--dim); font-size: 12px; }
#chat-log p.old { opacity: 0; }
#chat.open #chat-log { overflow-y: auto; pointer-events: auto; }
#chat.open #chat-log p.old { opacity: 1; }
#chat-form { display: none; gap: 6px; pointer-events: auto; }
#chat.open #chat-form { display: flex; }
#chat-input { flex: 1; background: var(--panel); }
#chat-form button { font-weight: 800; padding: 0 14px; border-radius: 10px; border: 0; background: var(--accent); color: #1a1300; cursor: pointer; }
#map-peers { display: flex; flex-wrap: wrap; gap: 6px; }
#map-peers:empty { display: none; }
#map-peers button {
  cursor: pointer; padding: 8px 12px; border-radius: 999px; border: 1px solid #ff5fa2; background: rgba(255, 95, 162, 0.16);
  color: var(--text); font-size: 13px; font-weight: 700;
}
.card.wide > button[data-act="closemap"] { display: none; }

/* ---- touch controls (phones, tablets) ---- */
#touch { display: none; }
body.touch { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body.touch input, body.touch textarea { -webkit-user-select: text; user-select: text; }
body.touch[data-mode="play"] #touch { display: block; position: fixed; inset: 0; z-index: 2; pointer-events: none; }
#touch button, #stick { pointer-events: auto; touch-action: none; }
#touch button {
  appearance: none; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(9, 20, 38, 0.42); color: #fff; font: inherit; font-weight: 800;
  border-radius: 50%; display: grid; place-items: center; align-content: center; padding: 0;
}
#touch button.on { background: rgba(255, 207, 63, 0.85); color: #1a1300; border-color: transparent; }
#touch button.lit { background: rgba(125, 211, 252, 0.9); color: #06202e; border-color: transparent; }      /* (switched on, and staying on) */
#touch button small { font-size: 9px; font-weight: 700; opacity: 0.75; }
#stick {
  position: absolute; left: calc(18px + env(safe-area-inset-left)); bottom: calc(18px + env(safe-area-inset-bottom)); width: 132px; height: 132px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(9, 20, 38, 0.32); display: grid; place-items: center;
}
#stick i { width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); box-shadow: 0 2px 10px rgba(0, 10, 30, 0.4); pointer-events: none; }
.t-pad {
  position: absolute; right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); width: 200px; height: 204px;
}
/* Jump in the corner under the thumb; brake, carve and E in an arc round it; the two small ones outside that. */
.t-pad button { position: absolute; width: 48px; height: 48px; font-size: 13px; white-space: nowrap; }
.t-pad .jump { right: 0; bottom: 0; width: 84px; height: 84px; font-size: 17px; }
.t-pad .brake { right: 100px; bottom: 6px; width: 72px; height: 72px; font-size: 13px; border: 2px solid #f87171; }
.t-pad .shift { right: 84px; bottom: 84px; width: 60px; height: 60px; }
.t-pad .e { right: 10px; bottom: 106px; width: 62px; height: 62px; font-size: 20px; border-color: var(--accent); }
.t-pad .s { font-size: 11px; }
.t-pad [data-key="KeyF"] { right: 150px; bottom: 84px; }
.t-pad [data-key="KeyZ"] { right: 86px; bottom: 148px; width: 54px; height: 54px; }
.t-pad [data-key="KeyX"] { right: 16px; bottom: 174px; width: 50px; height: 50px; }
.t-top { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.t-top button { border-radius: 999px !important; width: auto !important; height: 34px; padding: 0 14px !important; font-size: 13px; white-space: nowrap; }

body.touch #view { cursor: default; }
body.touch #minimap { right: auto; bottom: auto; left: calc(16px + env(safe-area-inset-left)); top: 104px; width: 104px; height: 104px; }
body.touch .hud-left { top: 10px; left: calc(14px + env(safe-area-inset-left)); gap: 4px; }
body.touch .hud-left .pill { font-size: 11.5px; padding: 5px 10px; }
body.touch #hud-alt { display: none; }
body.touch .hud-right { top: 8px; right: calc(14px + env(safe-area-inset-right)); width: 150px; gap: 3px; }
body.touch .clock b { font-size: 24px; }
body.touch #hud-snow { font-size: 10.5px; padding: 3px 8px; }
body.touch #hud-money { font-size: 17px; }
body.touch #hud-speed { left: 50%; bottom: calc(64px + env(safe-area-inset-bottom)); transform: translateX(-50%); }
body.touch #hud-speed b { font-size: 38px; }
body.touch #prompt { bottom: calc(16px + env(safe-area-inset-bottom)); font-size: 13px; padding: 8px 12px; }
body.touch #popups { top: 54px; }
body.touch .popup { font-size: 19px; }
body.touch .popup.small { font-size: 13.5px; }
body.touch #chat { left: calc(130px + env(safe-area-inset-left)); bottom: auto; top: 100px; width: min(300px, calc(100vw - 150px)); }
body.touch #chat-log { max-height: 84px; }
body.touch #chat.open { left: 12px; right: 12px; top: 50px; width: auto; z-index: 4; }
body.touch #chat.open #chat-log { max-height: 30vh; background: rgba(9, 20, 38, 0.5); border-radius: 10px; }
body.touch .card.wide > button[data-act="closemap"] { display: flex; }
body.touch .legend span, body.touch .keys { display: none; }
body.touch #title { padding: 22px 20px; gap: 10px; }
body.touch .card { padding: 18px; max-height: 94dvh; }
body.touch #bigmap { max-height: calc(94dvh - 190px); }
@media (orientation: portrait) {
  body.touch #chat { left: 14px; top: 216px; width: min(300px, calc(100vw - 28px)); }
  body.touch #chat-log { max-height: 130px; }
}
@media (orientation: portrait) {
  body.touch #prompt { bottom: calc(228px + env(safe-area-inset-bottom)); }
  body.touch #hud-speed { bottom: calc(272px + env(safe-area-inset-bottom)); }
  .t-top { left: calc(132px + env(safe-area-inset-left)); top: calc(112px + env(safe-area-inset-top)); transform: none; }
}

/* Signing in, and the choices once in. */
#signin, #lobby { display: grid; gap: 12px; }
#look { display: grid; gap: 12px; }
#look.hidden { display: none; }
#look-new:empty, #look-guest:empty { display: none; }
#signin.hidden, #lobby.hidden { display: none; }
#signin .hint { margin: 0; font-size: 12px; line-height: 1.5; color: var(--dim); }
.note { margin: 0; min-height: 0; font-size: 13px; font-weight: 700; color: var(--ice); }
.note:empty { display: none; }
.note.bad { color: #fca5a5; }
#signin .row button:not(.primary), #acc-logout {
  appearance: none; cursor: pointer; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); color: var(--text); font: inherit; font-weight: 700; padding: 10px 14px;
}
.who { margin: 0; display: flex; align-items: center; gap: 4px; font-size: 15px; }
.who b { font-size: 17px; color: #ffe38a; }
.who span { flex: 1; color: var(--dim); font-weight: 700; }
#acc-logout { padding: 6px 12px; font-size: 12px; }
#lobby #resorts { margin: 0; }
/* The way in stays in reach however long the choices above it are. */
#lobby .row { position: sticky; bottom: -28px; padding: 10px 0 14px; margin-bottom: -14px; background: linear-gradient(rgba(12, 22, 38, 0), rgba(12, 22, 38, 0.96) 38%); z-index: 2; }
/* Ski wear picker on the title screen. */
.outfit-pick { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: var(--dim); }
#kinds { margin: 0; }
#kinds button.on { cursor: default; }
#outfits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#outfits button {
  cursor: pointer; padding: 8px 4px 6px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06);
  color: var(--dim); font: inherit; font-size: 10.5px; font-weight: 700; display: grid; justify-items: center; gap: 5px; line-height: 1.2;
}
#outfits button.on { border-color: var(--accent); background: rgba(255, 207, 63, 0.14); color: var(--text); box-shadow: 0 0 0 1px var(--accent) inset; }
#outfits i { display: grid; justify-items: center; }
#outfits u { display: block; border: 1px solid rgba(255, 255, 255, 0.35); }
#outfits u:nth-child(1) { width: 15px; height: 15px; border-radius: 50%; margin-bottom: -2px; z-index: 1; }
#outfits u:nth-child(2) { width: 26px; height: 20px; border-radius: 7px 7px 3px 3px; }
#outfits u:nth-child(3) { width: 18px; height: 15px; border-radius: 0 0 4px 4px; border-top: 0; }
/* …and the woman's figure: narrower in the shoulder, wider in the hip. */
#outfits[data-body="f"] u:nth-child(1) { width: 14px; height: 14px; }
#outfits[data-body="f"] u:nth-child(2) { width: 22px; height: 18px; border-radius: 7px 7px 6px 6px; }
#outfits[data-body="f"] u:nth-child(3) { width: 20px; height: 14px; border-radius: 3px 3px 5px 5px; }
#bodies { margin: 0; }
#bodies button.on { cursor: default; }

/* Map shortcuts and the bag. */
.map-go { font-size: 12px !important; font-weight: 700; margin-top: 2px !important; }
#map-places { display: flex; flex-wrap: wrap; gap: 6px; }
#map-places button {
  cursor: pointer; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(127, 220, 255, 0.12);
  color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700;
}
#map-places button:hover, #map-places button:focus-visible { border-color: var(--accent); background: rgba(255, 207, 63, 0.16); }
/* The map looked at closer: dragged about once it is, and its buttons at the end of the legend. */
#bigmap { touch-action: none; user-select: none; -webkit-user-select: none; }
#bigmap.near { cursor: grab; }
#bigmap.near.held { cursor: grabbing; }
#map-zoom { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-style: normal; }
#map-zoom button { cursor: pointer; min-width: 28px; height: 26px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(127, 220, 255, 0.12); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; line-height: 1; }
#map-zoom button:hover { border-color: var(--ice); }
#map-zoom b { min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ice); }
.legend #map-zoom + span { margin-left: 10px; }
body.touch #map-zoom button { min-width: 36px; height: 32px; }
.optrow { display: flex; gap: 6px; }
.optrow .option { flex: 1; min-width: 0; }
.pack {
  cursor: pointer; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(127, 220, 255, 0.12);
  color: var(--text); font: inherit; font-size: 13px; font-weight: 800;
}
.pack:hover { border-color: var(--ice); }
.t-top { gap: 6px; }
.map-side { display: grid; gap: 8px; flex: none; }
#bigmap { flex: 0 1 auto; min-height: 180px; max-height: calc(92vh - 150px); }
/* Phone held sideways: map on the left, shortcuts beside it. */
@media (orientation: landscape) {
  body.touch .card.wide {
    width: min(100%, 800px); display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto;
    column-gap: 14px; overflow: hidden;
  }
  body.touch .card.wide > * { grid-column: 2; }
  body.touch #bigmap { grid-column: 1; grid-row: 1 / -1; width: auto; height: calc(94dvh - 40px); max-height: none; min-height: 0; aspect-ratio: 1; }
  body.touch .map-side { overflow-y: auto; align-content: start; }
  body.touch .card.wide h2 { font-size: 20px; }
  body.touch .legend i.l, body.touch .legend { font-size: 11px; }
}

/* Shortcut list on the right edge (H toggles). */
#hud-keys {
  position: absolute; right: 20px; top: 168px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(9, 20, 38, 0.86);
  border: 1px solid var(--line); display: grid; gap: 5px; font-size: 11.5px; text-shadow: none; color: var(--dim);
}
#hud-keys div { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 8px; }
#hud-keys dt { display: flex; gap: 3px; }
#hud-keys dd { margin: 0; white-space: nowrap; }
#hud-keys kbd { font-size: 10px; padding: 3px 5px; }
#hud-keys.off, body.touch #hud-keys { display: none; }
@media (max-height: 640px) { #hud-keys { display: none; } }
.t-top button { padding: 0 11px !important; font-size: 12.5px; }

/* Phones: nothing that makes the browser re-read the 3D canvas every frame (blurs behind panels). */
body.touch #title, body.touch .overlay { backdrop-filter: none; }
body.touch .overlay { background: rgba(4, 10, 22, 0.72); }
body.touch #hud { text-shadow: 0 1px 2px rgba(0, 20, 50, 0.7); }
body.touch #minimap { filter: none; }

/* Held upright, the row of small buttons has only the width beside the minimap: it goes under the bars there, in
   two rows, so that none of it is off the side or over the money. */
@media (orientation: portrait) {
  .t-top { gap: 4px; row-gap: 5px; flex-wrap: wrap; top: calc(164px + env(safe-area-inset-top)); width: calc(100vw - 140px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
  #touch .t-top button { padding: 0 8px !important; font-size: 12px; }
  body.touch #chat { top: 250px; }
}

/* ---- visitors' book ---- */
#book .card { width: min(560px, 100%); }
#book-form { display: flex; gap: 8px; }
#book-input { flex: 1; min-width: 0; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.1); color: var(--text); font: inherit; font-size: 15px; }
#book-input:focus { outline: 2px solid var(--ice); outline-offset: 1px; }
#book-send { padding: 0 18px; border-radius: 10px; font-weight: 800; background: var(--accent); color: #1a1300; border-color: transparent; cursor: pointer; }
#book-send:disabled { opacity: 0.5; }
#book-note { min-height: 1.5em; color: var(--accent) !important; font-size: 13px !important; }
#book-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: min(42vh, 360px); overflow-y: auto; overscroll-behavior: contain; }
#book-list li { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
#book-list b { color: var(--ice); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9em; }
#book-list span { overflow-wrap: anywhere; }
#book-list time { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Snowball, snowman and kick buttons: with the other actions under the right thumb, so the left one is free to steer. */
.t-pad [data-key="KeyQ"] { right: 146px; bottom: 138px; width: 46px; height: 46px; }
.t-pad [data-key="KeyR"] { right: 204px; bottom: 96px; }
.t-pad [data-key="KeyK"] { right: 204px; bottom: 150px; width: 46px; height: 46px; }
.t-pad [data-key="KeyJ"] { right: 258px; bottom: 126px; width: 46px; height: 46px; }
@media (orientation: portrait) {
  .t-pad [data-key="KeyR"] { right: 208px; bottom: 150px; }     /* clear of the stick on a narrow screen */
  .t-pad [data-key="KeyK"] { right: 208px; bottom: 204px; }
  .t-pad [data-key="KeyJ"] { right: 208px; bottom: 258px; }
}

/* Snow in the face: a snowball has landed on you. */
#splat {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background:
    radial-gradient(circle at 48% 46%, rgba(255, 255, 255, 0.95) 0 9%, rgba(255, 255, 255, 0.6) 15%, transparent 27%),
    radial-gradient(circle at 34% 60%, rgba(255, 255, 255, 0.85) 0 4%, transparent 9%),
    radial-gradient(circle at 63% 35%, rgba(255, 255, 255, 0.85) 0 5%, transparent 10%),
    radial-gradient(circle at 58% 66%, rgba(255, 255, 255, 0.8) 0 3%, transparent 7%),
    radial-gradient(circle at 39% 31%, rgba(255, 255, 255, 0.8) 0 3%, transparent 6%);
}
#splat.on { animation: splat 1.3s ease-out; }
@keyframes splat { 0% { opacity: 0; transform: scale(0.6); } 8% { opacity: 1; transform: scale(1); } 55% { opacity: 0.8; } 100% { opacity: 0; transform: scale(1.06) translateY(5%); } }
@media (prefers-reduced-motion: reduce) { #splat.on { animation-duration: 0.6s; } }

/* What came out of a treasure chest, by how rare it is. */
.popup.rare { color: #93c5fd; }
.popup.epic { color: #d8b4fe; }
.popup.legend { color: #fcd34d; text-shadow: 0 0 14px rgba(252, 211, 77, 0.55); }

/* ---- the inventory: the figure to the left, then what is on (laid out as on a body), then what is carried ---- */
#bag { position: fixed; inset: 0; z-index: 3; display: flex; align-items: stretch; gap: 16px; padding: 16px; pointer-events: none; }
#bag-view { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: flex-start; }
#bag-view span { padding: 6px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; font-weight: 800; letter-spacing: 0.12em; color: var(--dim); }
.bag-side {
  pointer-events: auto; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px);
}
#bag-worn { width: min(330px, 34vw); }
#bag-have { width: min(440px, 42vw); }
.bag-side h2 { margin: 0; font-size: 32px; font-weight: 900; line-height: 1.1; letter-spacing: -0.01em; }
.bag-side .hint, .bag-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--dim); }
.bag-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bag-head button { appearance: none; cursor: pointer; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; }

/* A thing: its picture, its name, and what is to be said of it. */
.tile {
  appearance: none; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; color: var(--text); font: inherit;
  display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 6px 8px; min-height: 96px; min-width: 0; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.07); text-align: center;
}
.tile b { font-size: 11.5px; line-height: 1.25; font-weight: 800; word-break: keep-all; overflow-wrap: anywhere; }
.tile small { font-size: 10px; color: var(--dim); font-weight: 700; }
.tile small:empty { display: none; }
.tile svg { width: 38px; height: 38px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.tile.rare { border-color: rgba(96, 165, 250, 0.8); }
.tile.epic { border-color: rgba(192, 132, 252, 0.9); background: rgba(192, 132, 252, 0.1); }
.tile.legend { border-color: rgba(251, 191, 36, 0.95); background: rgba(251, 191, 36, 0.12); }
.tile.rare small { color: #93c5fd; } .tile.epic small { color: #d8b4fe; } .tile.legend small { color: #fcd34d; }
.tile.dim { opacity: 0.6; }
.tile.lifted { opacity: 0.25; }
.tile.ghost { position: fixed; left: 0; top: 0; z-index: 9; pointer-events: none; opacity: 0.95; background: rgba(30, 45, 70, 0.95); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); cursor: grabbing; }

/* What is on, each thing at its place on a body: the head, the chest, a hand, the legs, the feet; accessories beside. */
#bag-slots {
  position: relative; flex: none; display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: ". head accs" "gloves top accs" "skin bottom accs" ". boots accs";
  grid-auto-rows: minmax(116px, auto); align-items: center; margin: 4px 0;        /* (tall rows: room for the body between what it wears) */
}
#bag-slots > .body { position: absolute; top: 0; left: 50%; height: 100%; transform: translateX(-50%); color: #cfe0f5; opacity: 0.3; pointer-events: none; }
/* (Not quite opaque: the body shows through what it is wearing.) */
.tile.slot { position: relative; min-height: 0; padding: 5px 4px 7px; gap: 2px; cursor: grab; background: rgba(12, 22, 40, 0.66); }
.tile.slot.rare { background: rgba(16, 32, 62, 0.7); } .tile.slot.epic { background: rgba(40, 24, 62, 0.7); } .tile.slot.legend { background: rgba(52, 40, 12, 0.7); }
.tile.slot b, .tile.slot em { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.tile.slot em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; color: var(--dim); }
.tile.slot svg { width: 34px; height: 34px; }
.tile.slot b { font-size: 10.5px; line-height: 1.2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tile.slot small { display: none; }
.tile.fixed { cursor: pointer; }
.tile.empty { border-style: dashed; }
.tile.empty b { color: var(--dim); font-weight: 700; }
.tile.slot.want { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 207, 63, 0.45); }
.accs { grid-area: accs; align-self: center; display: grid; gap: 6px; padding: 6px 6px 7px; border-radius: 14px; border: 1px dashed rgba(255, 255, 255, 0.28); background: rgba(0, 0, 0, 0.22); }
.accs > span { text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; color: var(--dim); }
.accs .tile.slot em { display: none; }

/* What is carried: a tab for each kind of thing. */
#bag-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
#bag-tabs button { appearance: none; cursor: pointer; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--dim); font: inherit; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
#bag-tabs button.on { background: var(--text); color: #0b1424; border-color: transparent; }
#bag-tabs i { font-style: normal; margin-left: 5px; font-size: 11px; opacity: 0.65; }
#bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; align-content: start; }
/* Within a tab: which kind of it (sets by kind, what goes on the head, accessories by where they go). */
#bag-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: -3px; }
#bag-chips[hidden] { display: none; }
#bag-chips button { appearance: none; cursor: pointer; padding: 3px 9px; border-radius: 8px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.05); color: var(--dim); font: inherit; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
#bag-chips button.on { border-color: var(--text); color: var(--text); background: rgba(255, 255, 255, 0.12); }
#bag-chips i { font-style: normal; margin-left: 4px; font-size: 10.5px; opacity: 0.6; }
/* The grades (inventory.js RANKS): the same chips, a rarity's own colour on its name. */
#bag-ranks { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: -3px; }
#bag-ranks[hidden] { display: none; }
#bag-ranks .label { flex: none; white-space: nowrap; font-size: 11px; font-weight: 800; color: var(--dim); margin-right: 2px; }
#bag-ranks button { appearance: none; cursor: pointer; padding: 3px 9px; border-radius: 8px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.05); color: var(--rank, var(--dim)); font: inherit; font-size: 12px; font-weight: 700; }
#bag-ranks button.on { border-color: var(--rank, var(--text)); color: var(--rank, var(--text)); background: rgba(255, 255, 255, 0.12); }
#bag-ranks i { font-style: normal; margin-left: 4px; font-size: 10.5px; opacity: 0.6; color: var(--dim); }
#bag-grid .hint { grid-column: 1 / -1; }

/* While it is open the game's own readouts are out of the way; what the game has to say comes up at the bottom, over it. */
body[data-mode="bag"] #hud { z-index: 4; }
body[data-mode="bag"] #hud > :not(#popups), body[data-mode="bag"] #chat { display: none; }
body[data-mode="bag"] #popups { top: auto; bottom: 22px; }

/* Where what is being dragged can be put down. */
#bag[data-drag="worn"] #bag-worn, #bag[data-drag="have"] #bag-have { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 207, 63, 0.35) inset; }
.bag-side.over { background: rgba(60, 52, 18, 0.82); }
body.touch .bag-side { backdrop-filter: none; }
/* A phone held sideways: little height. */
@media (max-height: 480px) {
  #bag { padding: 8px; gap: 8px; }
  .bag-side { padding: 12px; gap: 7px; }
  .bag-side h2 { font-size: 22px; }
  #bag-worn .hint, #bag-kind { display: none; }
  /* (The heading goes in the corner the body leaves empty, above the hand.) */
  #bag-worn { position: relative; padding: 10px; }
  #bag-worn h2 { position: absolute; left: 14px; top: 12px; z-index: 1; }
  #bag-slots { gap: 4px; grid-auto-rows: auto; align-items: stretch; margin: 0; }
  .tile.slot { padding: 4px 3px 5px; }
  .tile.slot svg { width: 26px; height: 26px; }
  .tile.slot b { -webkit-line-clamp: 1; }
  #bag-tabs button { padding: 5px 9px; font-size: 12px; }
  #bag-chips button, #bag-ranks button { padding: 2px 7px; font-size: 11px; }
  /* (The tabs and the kinds within one each a single row, swiped sideways: what is carried needs the height.) */
  #bag-tabs, #bag-chips, #bag-ranks { flex: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #bag-tabs::-webkit-scrollbar, #bag-chips::-webkit-scrollbar, #bag-ranks::-webkit-scrollbar { display: none; }
  #bag-tabs button, #bag-chips button, #bag-ranks button { flex: none; }
  #bag-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
  .tile { min-height: 84px; padding: 8px 4px 6px; }
}
/* A phone held upright: the body above, what is carried below, and no room for the figure. */
@media (orientation: portrait) and (max-width: 640px) {
  #bag { flex-direction: column; padding: 8px; gap: 8px; }
  #bag-view { display: none; }
  #bag-worn, #bag-have { width: auto; }
  #bag-worn { flex: none; max-height: 50%; padding: 12px; }
  #bag-worn .hint, #bag-kind { display: none; }
  #bag-slots { grid-auto-rows: auto; align-items: stretch; margin: 0; }
  #bag-have { flex: 1; min-height: 0; padding: 12px; }
  .bag-side h2 { font-size: 24px; }
  #bag-slots { width: min(100%, 330px); align-self: center; }
}

/* What there is to ride for (goals.js): a combination as it builds, what has been bought for a while, the count of a race. */
#hud-combo { border-color: #93c5fd; color: #dbeafe; display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; }
#hud-combo i { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
#hud-combo u { display: block; height: 100%; width: 100%; background: #93c5fd; text-decoration: none; }
#hud-flow { border-color: #6ee7b7; color: #d1fae5; display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; }
#hud-flow i { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
#hud-flow u { display: block; height: 100%; width: 100%; background: #6ee7b7; text-decoration: none; }
#hud-buffs { border-color: rgba(134, 239, 172, 0.7); color: #bbf7d0; }
/* The score of a park run as it builds (in the park gate's colours), where the clock of a time attack would be. */
#hud-park { border-color: #a78bfa; color: #ede9fe; font-variant-numeric: tabular-nums; }
body:not(.touch) #hud-park { order: 2; }
/* Work in hand (jobs.js): the grooming job or the patrol's mission, in one line like the clock of a course. */
#hud-job { border-color: #7dd3fc; color: #e0f2fe; font-variant-numeric: tabular-nums; max-width: min(430px, 62vw); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* At a desk, down the left edge under what is always there: the day's missions, the boards of the run one is on, and
   under those what comes and goes (the clock of a course, a combination, a flow), so that nothing above them moves. */
.side {
  order: 1; width: 272px; box-sizing: border-box; padding: 9px 12px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
  font-size: 12px; line-height: 1.35; text-shadow: none;
}
body:not(.touch) #hud-trial, body:not(.touch) #hud-combo, body:not(.touch) #hud-flow { order: 2; }
body:not(.touch) #hud-job { order: 2; }
.side h4 { margin: 0 0 7px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--ice); }
.side h4 kbd { font-size: 10px; padding: 2px 5px; letter-spacing: 0; }
#hud-quests ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
#hud-quests li { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 3px; align-items: baseline; font-weight: 700; }
#hud-quests li b { font-weight: 700; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
#hud-quests li i { grid-column: 1 / -1; display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
#hud-quests li u { display: block; height: 100%; background: var(--accent); text-decoration: none; }
#hud-quests li em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--ice); border: 1px solid rgba(127, 220, 255, 0.5); border-radius: 4px; padding: 0 4px; margin-right: 6px; }
#hud-quests li.done { color: var(--dim); font-weight: 600; }
#hud-quests li.done b { color: #7ee2a8; }
#hud-rank dl { margin: 0; display: grid; gap: 7px; }
#hud-rank dl div { display: grid; grid-template-columns: 56px 1fr auto; column-gap: 8px; row-gap: 1px; align-items: baseline; }
#hud-rank dt { font-size: 11.5px; font-weight: 700; color: var(--dim); }
#hud-rank dd { margin: 0; font-weight: 800; }
#hud-rank dd.top { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hud-rank dd.top.none { font-weight: 600; color: var(--dim); }
#hud-rank dd.fig { color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
#hud-rank dd.own { grid-column: 2 / -1; font-size: 11px; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
#hud-rank .lead dd.top { color: var(--accent); }
/* Under who leads the week: who leads of all time, and one's own line, each with a small word before it. */
#hud-rank dt.sub { font-size: 10.5px; font-weight: 600; }
#hud-rank dd.ever, #hud-rank dd.efig { font-size: 11px; font-weight: 600; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
#hud-rank dd.ever { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.touch .side { display: none; }
/* A low window: the figures without their bars and without one's own line; a lower or a narrow one: neither panel. */
@media (max-height: 700px) { #hud-quests li i, #hud-rank dd.own, #hud-rank dt.own { display: none; } #hud-quests ol, #hud-rank dl { gap: 4px; } .side h4 { margin-bottom: 5px; } }
@media (max-width: 720px), (max-height: 520px) { .side { display: none; } }
.popup.count { font-size: 84px; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55); animation-duration: 1s; }
body.touch .popup.count { font-size: 60px; }
#touch .ask { display: none; border-color: #93c5fd; color: #dbeafe; }
body.asked #touch .ask { display: inline-block; }

/* First tracks (firsttracks.js): on the map, what the white line down a run means and how many there are; and where
   there is no panel at the left edge for it (a phone, a small window), a word while riding such a run. */
.legend u { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; text-decoration: none; }
.legend u i.f { margin-left: 0; background: #fff; box-shadow: 0 0 0 1.5px #0284c7; }
#hud-first { border-color: rgba(255, 255, 255, 0.8); color: #fff; }
body:not(.touch) #hud-first { display: none; }
@media (max-width: 720px), (max-height: 520px) { body:not(.touch) #hud-first { display: inline-block; } }
