/* fonts are self-hosted (no request to Google = no IP transfer, DSGVO) */
@font-face { font-family: 'Russo One'; src: url(fonts/russo-one-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url(fonts/inter-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --bg: #061018;
  --ink: #eaf6ff;
  --muted: #8aa3b4;
  --faint: #5d7688;
  --panel: rgba(8, 18, 30, .78);
  --line: rgba(140, 220, 255, .12);
  --accent: #ff6a1f;
  --gold: #ffd23f;
  --ok: #7dffb0;
  --ui: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --display: 'Russo One', var(--ui);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--ui); }
body { overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
canvas { position: fixed; inset: 0; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

/* ---------- overlay: the level keeps running behind it ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at center, rgba(4, 10, 18, .3), rgba(4, 10, 18, .78));
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.panel {
  padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
.main { width: min(360px, 100%); display: flex; flex-direction: column; gap: 10px; }
.board { width: min(300px, 100%); align-self: center; min-height: 280px; max-height: 420px; display: flex; flex-direction: column; }

/* ---------- header ---------- */
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.logo { font-family: var(--display); font-size: 26px; line-height: 1; }
.logo span { color: var(--accent); text-shadow: 0 0 16px rgba(255, 106, 31, .5); }
.chip { display: flex; align-items: center; gap: 6px; max-width: 150px; padding: 3px 10px 3px 3px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.chip #profileName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip #profileName:empty { display: none; }
.chip:has(#profileName:empty) { padding-right: 3px; }
.avatar { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 12px; color: #fff; background: linear-gradient(135deg, var(--accent), #ff2e63); }

/* ---------- level list ---------- */
.levels { display: flex; flex-direction: column; gap: 5px; }
.lvl {
  --h: 200;
  position: relative; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; column-gap: 10px;
  padding: 7px 10px; border-radius: 10px; text-align: left; overflow: hidden;
  background: rgba(255, 255, 255, .03); border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.lvl:hover { background: rgba(255, 255, 255, .06); }
.lvl.on { background: hsla(var(--h), 70%, 40%, .22); border-color: hsla(var(--h), 95%, 65%, .6); }
.lvl .big { grid-row: span 2; font-family: var(--display); font-size: 15px; color: hsl(var(--h), 95%, 70%); text-align: center; }
.lvl .num { display: none; }
.lvl .lname { font-family: var(--display); font-size: 14px; line-height: 1.2; }
.lvl .meta { grid-column: 2; font-size: 11px; color: var(--muted); }
.lvl .row { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 10.5px; font-weight: 600; }
.lvl .stat { color: #cfeaff; }
.lvl .king { color: var(--gold); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lvl .king:empty { display: none; }
.lvl .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: transparent; }
.lvl .bar i { display: block; height: 100%; background: hsl(var(--h), 95%, 62%); }
.lvl.done .stat { color: var(--ok); }
.lvl.locked { opacity: .4; cursor: not-allowed; }
.testmode { font-size: 10.5px; font-weight: 600; color: var(--gold); opacity: .75; }

/* ---------- name + play ---------- */
.dock { display: flex; gap: 8px; }
.dock input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; font: inherit; font-size: 15px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-radius: 10px; outline: none; user-select: text; -webkit-user-select: text;
}
.dock input:focus { border-color: rgba(255, 140, 60, .7); }
.dock.named input { display: none; }
.play {
  flex: 1; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border-radius: 10px;
  font-family: var(--display); font-size: 16px; letter-spacing: 1px; color: #1b0700; background: var(--accent);
  box-shadow: 0 0 18px rgba(255, 106, 31, .4); transition: transform .08s, box-shadow .15s;
}
.play svg { width: 16px; height: 16px; }
.play:hover { box-shadow: 0 0 28px rgba(255, 106, 31, .65); }
.play:active { transform: scale(.97); }
.dock:not(.named) .play { flex: 0 0 auto; }
.err { min-height: 0; color: #ff7676; font-size: 12px; font-weight: 600; }
.err:empty { display: none; }

/* ---------- leaderboard ---------- */
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
#boardTitle { font-family: var(--display); font-size: 14px; }
.live { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.live.on { color: var(--ok); }
.board-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { position: sticky; top: 0; background: #0a1522; color: var(--faint); font-weight: 700; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 4px; text-align: left; }
td { padding: 6px 4px; border-top: 1px solid var(--line); text-align: left; }
td:first-child, th:first-child { width: 24px; color: var(--faint); font-weight: 700; }
td:nth-child(3), td:nth-child(4), th:nth-child(3), th:nth-child(4) { text-align: right; }
tbody tr:nth-child(1) td:first-child { color: var(--gold); }
tbody tr:nth-child(2) td:first-child { color: #d7e3ea; }
tbody tr:nth-child(3) td:first-child { color: #e39a5f; }
tr.me td { color: #ff9d6b; font-weight: 600; }
td.done { color: var(--ok); font-weight: 600; }
.empty { color: var(--faint); text-align: center !important; padding: 18px; font-size: 12px; }

/* ---------- win ---------- */
.win-card { width: min(360px, 100%); padding: 22px 18px 16px; text-align: center; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.win-badge { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #1b0700; background: linear-gradient(135deg, var(--gold), var(--accent)); }
.win-card h1 { font-family: var(--display); font-size: 30px; }
.win-card h1 span { color: var(--accent); }
.tag { margin: 8px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.win-card .play { width: 100%; }
.win-row { display: flex; gap: 8px; margin-top: 8px; }
.ghost { flex: 1; height: 40px; border-radius: 10px; font-weight: 700; font-size: 13px; letter-spacing: 1px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.ghost:hover { background: rgba(255, 255, 255, .09); }

/* ---------- pause ---------- */
.pausebtn {
  position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 12;
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px;
  background: var(--panel); color: #eaf6ff; border: 1px solid var(--line);
}
.pausebtn svg { width: 20px; height: 20px; }
.pausebtn:active { transform: scale(.94); }

/* ---------- misc ---------- */
.mute {
  position: fixed; right: calc(max(12px, env(safe-area-inset-right)) + 56px); bottom: calc(max(12px, env(safe-area-inset-bottom)) + 4px); z-index: 12;
  width: 38px; height: 38px; font-size: 16px; border-radius: 50%; background: var(--panel); color: #cfe6ff; border: 1px solid var(--line);
}
.mute.off { color: var(--faint); text-decoration: line-through; }
.rotate { position: fixed; inset: 0; z-index: 30; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); text-align: center; padding: 24px; }
.rotate p { font-family: var(--display); font-size: 20px; }
.rotate p b { color: var(--accent); font-weight: 400; }
.rotate span { color: var(--muted); font-size: 13px; }
.phone { width: 50px; height: 86px; border: 4px solid #cfe6ff; border-radius: 12px; position: relative; animation: turn 1.8s ease-in-out infinite; }
.phone::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 10px; height: 3px; margin-left: -5px; background: #cfe6ff; border-radius: 2px; }
@keyframes turn { 0%, 20% { transform: rotate(0); } 55%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (orientation: portrait) and (pointer: coarse) { .rotate { display: flex; } }

/* phones in landscape */
@media (max-height: 480px) {
  .overlay { gap: 10px; }
  .panel { padding: 10px 12px; }
  .main { gap: 6px; width: min(330px, 56%); }
  .board { width: min(260px, 42%); min-height: 0; max-height: calc(100dvh - 24px); align-self: stretch; }
  .logo { font-size: 20px; }
  .lvl { padding: 4px 8px; }
  .lvl .meta { display: none; }
  .dock input, .play { height: 38px; }
  td { padding: 4px; }
}
@media (max-width: 640px) and (min-height: 481px) {
  .overlay { flex-direction: column; justify-content: flex-start; overflow-y: auto; }
  .board { max-height: 300px; min-height: 200px; width: min(360px, 100%); flex: none; }
}
#pauseBtn.hidden ~ .mute { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }

.soundhint {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 11;
  padding: 7px 14px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  background: var(--panel); border: 1px solid var(--line); pointer-events: none; animation: hintPulse 1.6s ease-in-out infinite;
}
@keyframes hintPulse { 50% { opacity: .45; } }

/* leaderboard list: always scrollable, also with touch */
.board-scroll::-webkit-scrollbar { width: 5px; }
.board-scroll::-webkit-scrollbar-thumb { background: rgba(140, 220, 255, .25); border-radius: 9px; }

/* ---------- skins & achievements ---------- */
.head .skinbtn { padding: 3px 9px; font-size: 14px; }
.skins-panel { width: min(560px, 100%); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
#boardTitle2 { font-family: var(--display); font-size: 16px; }
.ghost.small { flex: none; width: 34px; height: 30px; font-size: 14px; letter-spacing: 0; }
.statline { font-size: 12px; color: var(--muted); }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.skin { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid transparent; }
.skin.on { border-color: var(--accent); background: rgba(255,106,31,.1); }
.skin.locked { opacity: .45; cursor: not-allowed; }
.skin .cube { width: 28px; height: 28px; border-radius: 4px; }
.skin.locked .cube { filter: grayscale(1) brightness(.5); }
.skin .sname { font-family: var(--display); font-size: 12px; }
.skin .sreq { font-size: 9.5px; color: var(--muted); text-align: center; line-height: 1.2; }
.ach-list { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; min-height: 0; flex: 1; touch-action: pan-y; overscroll-behavior: contain; }
.ach { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.03); font-size: 12px; }
.ach .aname { font-weight: 700; }
.ach .adesc { grid-column: 1; color: var(--muted); font-size: 11px; }
.ach .aval { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; color: var(--muted); }
.ach.done .aval { color: var(--ok); }
.ach .abar { grid-column: 1 / span 2; height: 3px; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; }
.ach .abar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.toast {
  position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); z-index: 40; transform: translate(-50%, -160%);
  padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 700; background: rgba(20,14,4,.92); color: var(--gold);
  border: 1px solid rgba(255,210,63,.4); transition: transform .35s cubic-bezier(.3,1.3,.5,1); pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }
@media (max-height: 480px) { .skin-grid { grid-template-columns: repeat(6, 1fr); } .skin { padding: 6px 4px; } .skin .sreq { display: none; } }

/* skin previews: the cube as a little stone */
.cube { display: inline-block; flex: none; border-radius: 4px; outline: 1.5px solid; outline-offset: -5px; }
.skinbtn { gap: 6px; padding: 3px 10px 3px 4px; }
.skinbtn .cube { width: 22px; height: 22px; }
.skinbtn #skinName { font-size: 11px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin .cube { width: 30px; height: 30px; }
.pskin-title { margin: 14px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.pause-skins { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pcube { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid transparent; }
.pcube.on { border-color: var(--accent); background: rgba(255,106,31,.12); }
.pcube .cube { width: 24px; height: 24px; }
.pmore { flex-basis: 100%; margin-top: 2px; font-size: 12px; font-weight: 700; color: #9fe6ff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-height: 480px) { .skinbtn #skinName { display: none; } .pskin-title { margin-top: 8px; } .pcube { width: 36px; height: 36px; } }

/* design pass 2 */
.logo { display: inline-block; transform-origin: left center; transition: transform .05s linear; will-change: transform; }
.lvl .mech { font-style: normal; margin-left: 4px; padding: 1px 6px; border-radius: 99px; font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
  color: hsl(var(--h), 95%, 80%); background: hsla(var(--h), 90%, 55%, .16); }
.win-stats { display: flex; justify-content: center; gap: 10px; margin: -4px 0 16px; }
.win-stats span { flex: 1; padding: 8px 4px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 10.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.win-stats b { font-family: var(--display); font-size: 18px; color: #fff; font-weight: 400; }

/* coming soon cards */
.lvl.locked .stat { color: var(--gold); letter-spacing: .5px; }

/* ---------- splash: NAMSOLO presents ---------- */
.splash { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(ellipse at center, #10213a 0%, #03060c 70%); transition: opacity .5s ease; }
.splash.out { opacity: 0; pointer-events: none; }
.sp-studio { font-family: var(--display); font-size: 15px; letter-spacing: 8px; color: #9fb4c8; opacity: 0; animation: spIn .6s .1s forwards; }
.sp-presents { font-size: 11px; letter-spacing: 3px; color: #5d7688; text-transform: uppercase; opacity: 0; animation: spIn .6s .45s forwards; }
.sp-logo { margin-top: 10px; font-family: var(--display); font-size: clamp(38px, 9vw, 72px); opacity: 0; transform: scale(1.35); animation: spLogo .7s .8s cubic-bezier(.2,1.4,.4,1) forwards; }
.sp-logo span { color: var(--accent); text-shadow: 0 0 26px rgba(255,106,31,.7); }
.sp-bar { width: min(220px, 50vw); height: 3px; margin-top: 18px; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; }
.sp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); animation: spBar 2.2s .2s ease-in-out forwards; }
@keyframes spIn { to { opacity: 1; } }
@keyframes spLogo { to { opacity: 1; transform: scale(1); } }
@keyframes spBar { to { width: 100%; } }

/* ---------- legal links under the menu ---------- */
.legal { display: flex; flex-wrap: wrap; gap: 2px 12px; justify-content: center; margin-top: 8px; font-size: 11px; color: var(--faint); }
.legal a { color: var(--muted); text-decoration: none; }
.legal a:hover { color: var(--ink); text-decoration: underline; }
.legal span { width: 100%; text-align: center; }
@media (max-height: 480px) { .legal { position: fixed; left: 12px; bottom: 4px; margin: 0; font-size: 10px; z-index: 2; } .legal span { display: none; } }

/* ---------- compact header: the name chip shrinks, the skin button never leaves the panel ---------- */
.head { min-width: 0; }
.head .logo { flex: none; }
.head #profile { min-width: 0; flex: 0 1 auto; }
.head .skinbtn { flex: none; min-width: 0; }
.skinbtn #skinName { max-width: 72px; }
@media (max-height: 480px) { .head { gap: 6px; } .head #profile { max-width: 120px; } }
@media (max-width: 380px) { .skinbtn #skinName { display: none; } }

/* ---------- share ---------- */
.iconbtn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--ink); }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:hover { background: rgba(255, 255, 255, .12); }
.ghost.hot { color: var(--accent); border-color: rgba(255, 106, 31, .45); }
.challenge { padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; line-height: 1.35; color: #ffe2b8; background: linear-gradient(90deg, rgba(255, 106, 31, .22), rgba(255, 210, 63, .12)); border: 1px solid rgba(255, 106, 31, .4); }
.share { z-index: 20; background: rgba(3, 7, 12, .82); }
.toast { z-index: 26; }
.share-box { display: flex; gap: 18px; align-items: center; padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); max-width: min(760px, 100%); }
.share-box img { width: min(380px, 44vw); aspect-ratio: 1; border-radius: 12px; background: #050b14; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.share-side { display: flex; flex-direction: column; gap: 10px; width: 260px; }
.share-side h2 { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.15; }
.share-side h2 span { color: var(--accent); }
.share-side .play { width: 100%; flex: none; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-grid .ghost { font-size: 11px; letter-spacing: .5px; padding: 0 6px; }
@media (max-height: 480px) {
  .share-box { padding: 10px; gap: 12px; }
  .share-box img { width: auto; height: calc(100dvh - 44px); max-height: 330px; }
  .share-side { width: 220px; gap: 8px; }
  .share-side h2 { font-size: 17px; }
  .dock .iconbtn { width: 38px; height: 38px; }
  .challenge { padding: 5px 8px; font-size: 11px; }
}
@media (max-width: 640px) and (min-height: 481px) {
  .share-box { flex-direction: column; }
  .share-box img { width: min(320px, 80vw); }
}

/* ---------- install as app: a card at the bottom of the leaderboard panel ---------- */
.install-card { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 10px; border-radius: 12px; position: relative;
  background: linear-gradient(135deg, rgba(255, 106, 31, .2), rgba(255, 210, 63, .08)); border: 1px solid rgba(255, 106, 31, .5);
  box-shadow: 0 0 22px rgba(255, 106, 31, .18); animation: icPulse 2.4s ease-in-out infinite; }
.install-card img { width: 40px; height: 40px; flex: none; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.ic-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ic-txt b { font-size: 13px; }
.ic-txt span { font-size: 11px; color: #ffd9bd; }
.ic-btn { flex: none; height: 32px; padding: 0 14px; border-radius: 9px; font-family: var(--display); font-size: 13px; letter-spacing: 1px; color: #1b0700; background: var(--accent); box-shadow: 0 0 14px rgba(255, 106, 31, .5); }
.ic-x { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; font-size: 10px; color: var(--muted); background: #0b1624; border: 1px solid var(--line); }
@keyframes icPulse { 50% { box-shadow: 0 0 30px rgba(255, 106, 31, .35); } }
.ios-card ol { text-align: left; margin: 10px 0 14px 20px; display: grid; gap: 8px; font-size: 14px; color: #c9dbe7; }
.ios-card ol svg { width: 16px; height: 16px; vertical-align: -3px; color: #4fa3ff; }
@media (max-height: 480px) {
  .install-card { margin-top: 6px; padding: 6px 8px; gap: 8px; }
  .install-card img { width: 32px; height: 32px; border-radius: 8px; }
  .ic-txt b { font-size: 12px; } .ic-txt span { font-size: 10px; }
  .ic-btn { height: 28px; padding: 0 10px; font-size: 12px; }
  .ios-card ol { margin: 6px 0 10px 18px; gap: 4px; font-size: 13px; }
}

/* ---------- name protection ---------- */
.linkbtn { display: inline; padding: 0; font: inherit; font-weight: 700; color: var(--accent); text-decoration: underline; background: none; border: 0; }
.codeline { font-size: 12px; color: var(--muted); }
.codeline:empty { display: none; }
.codeline b { color: var(--ink); letter-spacing: 1px; font-family: ui-monospace, Consolas, monospace; }
.err .linkbtn { font-size: 12px; }
.ic-txt b, .ic-txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 480px) { .ic-txt span { display: none; } .ic-txt b { font-size: 13px; } }

/* ---------- calm mode toggle (pause menu) ---------- */
.calm-toggle { display: block; width: 100%; margin-top: 8px; padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.calm-toggle b { margin-left: 6px; color: var(--ink); }
.calm-toggle.on { color: #bfe3ff; border-color: rgba(120, 190, 255, .5); background: rgba(120, 190, 255, .1); }
@media (max-height: 480px) { .calm-toggle { margin-top: 5px; padding: 5px 8px; } }

/* ---------- skin rarity ---------- */
.skin { position: relative; }
.srare { font-size: 8.5px; font-weight: 800; letter-spacing: .6px; padding: 1px 6px; border-radius: 99px; }
.srare.epic { color: #e6d2ff; background: rgba(150, 80, 255, .25); border: 1px solid rgba(170, 110, 255, .5); }
.srare.legend { color: #3a2600; background: linear-gradient(90deg, #ffd23f, #ff8a45); box-shadow: 0 0 10px rgba(255, 190, 60, .45); }
.skin.locked .srare { filter: grayscale(.6); opacity: .7; }

/* ---------- credits + shop ---------- */
.coin-tag { font-size: 11px; font-weight: 800; color: #ffd23f; white-space: nowrap; }
.coin-tag::before { content: ''; display: inline-block; width: .95em; height: .95em; margin-right: .3em; vertical-align: -.14em; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c2, #ffd23f 45%, #c98a00 100%); box-shadow: inset 0 0 0 .12em rgba(150,95,0,.55), 0 0 6px rgba(255,200,60,.5); }
.skinbtn #skinName { display: none; }
.coins-big { margin-left: auto; margin-right: 8px; font-family: var(--display); font-size: 15px; color: #ffd23f; }
.stabs { display: flex; gap: 6px; }
.stab { flex: 1; height: 32px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.stab.on { color: var(--ink); border-color: var(--accent); background: rgba(255,106,31,.12); }
.tpane { overflow-y: auto; min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; touch-action: pan-y; overscroll-behavior: contain; }
.sslot { font-family: var(--display); font-weight: 400; font-size: 13px; letter-spacing: 1px; margin: 6px 0 0; color: #cfe6f5; }
.sslot em { font-style: normal; font-family: var(--ui); font-size: 10px; font-weight: 700; color: #ffd23f; margin-left: 6px; padding: 1px 6px; border-radius: 99px; background: rgba(255,210,63,.12); }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.sitem { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid transparent; }
.sitem.on { border-color: var(--accent); background: rgba(255,106,31,.1); }
.sitem img { width: 48px; height: 48px; }
.sitem .sicon { font-size: 30px; line-height: 48px; height: 48px; }
.sitem > b { height: 48px; line-height: 48px; font-family: var(--display); font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitem .sname { font-size: 11px; font-weight: 700; }
.sbtn { width: 100%; height: 28px; border-radius: 8px; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--ink); }
.sbtn.buy { color: #3a2600; background: linear-gradient(90deg, #ffd23f, #ff9d45); border: 0; }
.sbtn.buy.poor { color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.sbtn.confirm { background: #7dffb0; color: #06301a; }
.sbtn.on { color: #7dffb0; border-color: rgba(125,255,176,.5); }
.nc-rainbow { background: linear-gradient(90deg, #ff5f6d, #ffc371, #7dffb0, #6ff3ff, #c79bff, #ff5f6d); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: ncRain 3s linear infinite; }
@keyframes ncRain { to { background-position: 300% 0; } }
.win-coins b { color: #ffd23f; }
@media (max-height: 480px) {
  .sgrid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
  .sitem { padding: 6px 4px; } .sitem img { width: 38px; height: 38px; } .sitem .sicon { font-size: 24px; line-height: 38px; height: 38px; } .sitem > b { height: 38px; line-height: 38px; }
  .stab { height: 28px; }
}

/* our own coin (no emoji) */
.coin { display: inline-block; position: relative; width: .95em; height: .95em; margin-right: .3em; vertical-align: -.14em; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6c2, #ffd23f 45%, #c98a00 100%); box-shadow: inset 0 0 0 .12em rgba(150,95,0,.55), 0 0 6px rgba(255,200,60,.5); }
.coin::after { content: ''; position: absolute; left: 50%; top: 50%; width: .3em; height: .3em; background: #a86b00; transform: translate(-50%, -50%) rotate(45deg); border-radius: 1px; }

/* your own row sticks to the top or bottom edge when it scrolls out of the list */
tr.me td { position: sticky; top: 21px; bottom: 0; z-index: 1; background: #221710; box-shadow: inset 0 1px 0 rgba(255,106,31,.45), inset 0 -1px 0 rgba(255,106,31,.45); }
th { z-index: 2; }
