/* My Skyblock · extras on top of /my-nexus/nx.css (which gives the width, sidebar, number strip, lists, tables and buttons).
   Keep this file to Skyblock-only pieces: pixel art, charts, switches, the popup and phone table layout. */
.sbx { --g: 0, 255, 157; --gold: #fbbf24; --red: #f87171; }
.sbx [hidden] { display: none !important; }
.sbx p { margin: 0; }
.nx svg.px, .sbx-dialog svg.px { width: auto; height: auto; stroke: none; fill: initial; image-rendering: pixelated; }
.nx svg.art { width: 100%; height: auto; stroke: none; }

/* Header */
.sbx-av { border-radius: 18px !important; background: #0d0e14 !important; box-shadow: 0 0 0 3px rgba(255,255,255,.06), 0 12px 30px -10px rgba(0,255,157,.55) !important; }
.sbx-av svg.px { width: 100%; height: 100%; }
.sbx-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 6px !important; font-size: 13.5px !important; font-weight: 500; }
.sbx-live { display: inline-flex; align-items: center; gap: 7px; color: rgb(var(--g)); font-weight: 600; }
.sbx-live i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--g)); box-shadow: 0 0 10px rgb(var(--g)); }
.sbx-live i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgb(var(--g)); opacity: 0; animation: sbxPing 2s ease-out infinite; }
.sbx-live.off { color: var(--mut); } .sbx-live.off i { background: var(--dim); box-shadow: none; } .sbx-live.off i::after { display: none; }
@keyframes sbxPing { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
.sbx-note { display: flex; align-items: center; gap: 10px; margin: -6px 0 26px !important; color: var(--dim); font-size: 13px; }
.sbx-note b { flex: none; padding: 2px 9px; border-radius: 99px; background: rgba(34,211,238,.12); color: #67e8f9; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* Number strip: coloured icons and a little "+n" flash when a value changes live */
.sbx .nx-glance button { cursor: default; }
.sbx .nx-glance button[data-go] { cursor: pointer; }
.sbx .nx-glance i { color: var(--ic, #fff) !important; }
.sbx .nx-glance b { transition: color .6s; }
.sbx .nx-glance b.bump { color: rgb(var(--g)); }
.sbx .nx-glance b em { color: var(--dim); font-size: .62em; font-style: normal; }
.sbx .nx-glance .px { width: 22px; height: 33px; }
.sbx .nx-glance b { white-space: nowrap; }
@media (max-width: 640px) { .sbx .nx-glance .px { width: 16px; height: 24px; } .sbx .nx-glance i { width: 28px; } }

/* Two columns that collapse on smaller screens, no boxes */
.sbx-two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px 48px; }
.sbx-two.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sbx-two > div { min-width: 0; }
.sbx-two .nx-sec-h:first-child { margin-top: 34px; }

/* Island row */
.sbx-isle { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: center; }
.sbx-isle .art { animation: sbxFloat 6s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(0,255,157,.12)); }
@keyframes sbxFloat { 50% { transform: translateY(-6px); } }
.sbx-isle h3 { margin: 0; color: #fff; font: 800 clamp(24px, 2.4vw, 32px)/1.1 Outfit, Inter, sans-serif; letter-spacing: -.02em; }
.sbx-isle .facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; color: var(--mut); font-size: 13.5px; }
.sbx-isle .facts b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.sbx-lvl { display: flex; align-items: center; gap: 12px; max-width: 560px; margin-top: 16px; color: var(--dim); font-size: 12.5px; font-weight: 600; }
.sbx-bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.sbx-bar span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, rgba(var(--mc, var(--g)), .55), rgb(var(--mc, var(--g)))); box-shadow: 0 0 14px rgba(var(--mc, var(--g)), .45); animation: barGrow 1.1s var(--ease) both; }
.sbx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.sbx .nx-btn svg { width: 15px; height: 15px; }
.sbx .nx-btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.sbx .nx-btn.go { background: linear-gradient(135deg, #00ff9d, #22d3ee); box-shadow: 0 8px 24px -12px rgba(0,255,157,.8); color: #04140d; }
.sbx .nx-btn.go:hover { filter: brightness(1.08); }
.sbx .nx-btn.danger:hover { background: rgba(239,68,68,.12); }
.sbx .nx-btn.ic { width: 32px; height: 32px; padding: 0; }

/* Meter rows: allow a pixel figure in the icon slot */
.sbx .nx-meter > i .px { width: 20px; height: 30px; }
.sbx .nx-meter > i { overflow: hidden; }

/* Charts */
.sbx-trend { padding: 6px 0 0; }
.sbx-trend .plot { position: relative; height: 170px; margin: 0 38px 0 0; }
.sbx-trend svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sbx-trend .l { stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: sbxDraw 1.1s var(--ease) .1s forwards; }
.sbx-trend .a { stroke: none !important; opacity: 0; animation: sbxFade .8s ease .5s forwards; }
@keyframes sbxDraw { to { stroke-dashoffset: 0; } }
@keyframes sbxFade { to { opacity: 1; } }
.sbx-trend .g { position: absolute; left: 0; right: 0; top: var(--y); border-top: 1px dashed rgba(255,255,255,.07); }
.sbx-trend .g em { position: absolute; right: -38px; top: -8px; width: 32px; color: var(--dim); font: 600 10.5px Inter, sans-serif; font-style: normal; text-align: left; }
.sbx-trend .c { position: absolute; top: 0; bottom: 0; left: var(--x); width: 14%; transform: translateX(-50%); padding: 0; border: 0; background: none; cursor: default; }
.sbx-trend .c::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid rgba(255,255,255,.12); opacity: 0; transition: opacity .15s; }
.sbx-trend .c i { position: absolute; left: 50%; top: var(--y); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #0d0e14; border: 2px solid #00ff9d; opacity: 0; transition: opacity .15s, transform .15s; }
.sbx-trend .c.now i { opacity: 1; border-color: #fbbf24; box-shadow: 0 0 0 4px rgba(251,191,36,.15); }
.sbx-trend .c b { position: absolute; left: 50%; top: var(--y); transform: translate(-50%, calc(-100% - 12px)); padding: 5px 9px; border-radius: 8px; background: #1b1c25; border: 1px solid rgba(255,255,255,.08); color: #fff; font: 700 12px Inter, sans-serif; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 2; }
.sbx-trend .c b small { display: block; color: var(--dim); font-size: 10.5px; font-weight: 600; }
.sbx-trend .c:hover::before, .sbx-trend .c:focus-visible::before, .sbx-trend .c:hover i, .sbx-trend .c:focus-visible i, .sbx-trend .c:hover b, .sbx-trend .c:focus-visible b { opacity: 1; }
.sbx-trend .c:focus { outline: none; }
.sbx-trend .days { display: flex; justify-content: space-between; margin: 10px 38px 0 0; }
.sbx-trend .days span { width: 0; display: flex; justify-content: center; white-space: nowrap; color: var(--dim); font-size: 11.5px; font-weight: 600; }
.sbx-trend .days span.now { color: #fbbf24; }
.sbx-trend .none { position: absolute; left: 0; right: 0; top: 38%; margin: 0; text-align: center; color: var(--dim); font-size: 13px; }
.sbx-trend.empty .c { display: none; }
@keyframes sbxGrow { from { transform: scaleY(0); } }
.sbx-donut { display: flex; align-items: center; gap: 26px; padding-top: 10px; }
.sbx-donut svg { flex: none; width: 150px !important; height: 150px !important; transform: rotate(-90deg); stroke-linecap: butt !important; }
.sbx-donut ul { display: grid; gap: 12px; flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--mut); }
.sbx-donut li { display: flex; align-items: center; gap: 9px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sbx-donut li:last-child { border-bottom: 0; padding-bottom: 0; }
.sbx-donut li i { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--d); }
.sbx-donut li b { margin-left: auto; color: #fff; font-variant-numeric: tabular-nums; }

/* Plain divider lists (activity, rules, members, danger) */
.sbx-list > div { display: flex; align-items: center; gap: 14px; padding: 13px 2px; border-top: 1px solid var(--line); }
.sbx-list > div:first-child { border-top: 0; }
.sbx-list .ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--f, #a78bfa) 14%, transparent); color: var(--f, #a78bfa); }
.sbx-list .ic svg { width: 17px; height: 17px; }
.sbx-list .tx { flex: 1; min-width: 0; color: #e4e4e7; font-size: 14px; }
.sbx-list .tx b { color: #fff; font-weight: 600; }
.sbx-list .tx small { display: block; margin-top: 2px; color: var(--dim); font-size: 12.5px; line-height: 1.45; }
.sbx-list .when { flex: none; color: var(--dim); font-size: 12px; }
.sbx-list .new { animation: sbxFlash 1.8s var(--ease); }
@keyframes sbxFlash { from { background: rgba(0,255,157,.07); } to { background: transparent; } }
.sbx-danger .nx-sec-h h3 { color: #fca5a5; }
.sbx-danger { margin-top: 34px; }

/* Switch */
.sbx-switch { position: relative; display: inline-block; flex: none; width: 42px; height: 24px; vertical-align: middle; }
.sbx-switch input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.sbx-switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.12); transition: background .25s; }
.sbx-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .3s var(--ease); }
.sbx-switch input:checked + i { background: rgb(var(--g)); }
.sbx-switch input:checked + i::after { transform: translateX(18px); }
.sbx-switch input:focus-visible + i { outline: 2px solid #22d3ee; outline-offset: 2px; }

/* Tables (built on .nx-table) */
.sbx .nx-table td { white-space: normal; }
.sbx .nx-table .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sbx .nx-table .who .fig { display: grid; place-items: end center; flex: none; width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--k, #a78bfa) 16%, transparent); overflow: hidden; }
.sbx .nx-table .who .fig .px { width: 20px; height: 30px; }
.sbx .nx-table .who .fig .art { width: 26px; margin-bottom: 6px; }
.sbx .nx-table .who b { display: block; color: #fff; font-weight: 700; }
.sbx .nx-table .who small { display: block; color: var(--dim); font-size: 12px; font-weight: 500; }
.sbx .nx-table td.num, .sbx .nx-table th.num { text-align: right; }
.sbx .nx-table td.coins { color: var(--gold); font-weight: 800; }
.sbx .nx-table td.plus { color: #4ade80; font-weight: 700; }
.sbx .nx-table td.minus { color: var(--red); font-weight: 700; }
.sbx .nx-table td.acts { text-align: right; white-space: nowrap; }
.sbx .nx-table td.acts .nx-btn + .nx-btn { margin-left: 4px; }
.sbx .nx-table .xp { display: flex; align-items: center; gap: 8px; min-width: 110px; color: var(--dim); font-size: 12px; }
.sbx .nx-table .xp .sbx-bar { height: 6px; }
.sbx .nx-table tr.off { opacity: .5; }
.sbx .nx-table tr.new { animation: sbxFlash 1.8s var(--ease); }
.sbx-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.sbx-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.sbx-st.working { color: #4ade80; } .sbx-st.idle { color: #fbbf24; } .sbx-st.unloaded { color: var(--dim); } .sbx-st.unloaded::before { box-shadow: none; }
.sbx-tag { display: inline-flex; padding: 2px 9px; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--mut); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.sbx-tag.g { background: rgba(74,222,128,.12); color: #4ade80; } .sbx-tag.y { background: rgba(251,191,36,.12); color: #fbbf24; }

/* Skin cards (built on .nx-card) */
.sbx .nx-card .stage { position: relative; display: grid; place-items: end center; height: 160px; background: radial-gradient(circle at 50% 92%, color-mix(in srgb, var(--k) 34%, transparent), transparent 68%); }
.sbx .nx-card .stage .px { width: 60px; height: 90px; margin-bottom: 16px; transition: transform .4s var(--ease); }
.sbx .nx-card:hover .stage .px { transform: translateY(-4px) scale(1.05); }
.sbx .nx-card .stage .sbx-tag { position: absolute; top: 12px; left: 12px; background: color-mix(in srgb, var(--k) 18%, transparent); color: var(--k); }
.sbx .nx-card .price { color: #fff; font: 800 18px Outfit, Inter, sans-serif; }
.sbx .nx-card .bot { justify-content: space-between; color: var(--mut); padding-top: 8px; }
.r-common { --k: #a1a1aa; } .r-rare { --k: #22d3ee; } .r-epic { --k: #c084fc; } .r-legendary { --k: #fbbf24; }

/* Link code */
.sbx-steps { display: grid; gap: 14px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: s; }
.sbx-steps li { display: flex; gap: 12px; color: #d4d4d8; font-size: 14px; line-height: 1.5; }
.sbx-steps li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: rgba(0,255,157,.1); color: rgb(var(--g)); font-size: 12.5px; font-weight: 800; }
.sbx .nx-add input#sbxCode { max-width: 220px; font-family: ui-monospace, Consolas, monospace; letter-spacing: .3em; text-transform: uppercase; }

/* Popup */
.sbx-dialog { width: min(460px, calc(100% - 28px)); max-height: calc(100dvh - 40px); padding: 0; border: 0; border-radius: 20px; background: #101017; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 40px 100px -30px #000; color: #e4e4e7; font-family: Inter, sans-serif; }
.sbx-dialog, .sbx-dialog *, .sbx-dialog *::before, .sbx-dialog *::after { box-sizing: border-box; }
.sbx-dialog[open] { animation: sbxPop .35s cubic-bezier(.22,1,.36,1); }
@keyframes sbxPop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.sbx-dialog::backdrop { background: rgba(3,3,8,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sbx-dialog svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sbx-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.sbx-dlg-head h2 { margin: 0; color: #fff; font: 800 20px Outfit, Inter, sans-serif; }
.sbx-x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255,255,255,.06); color: #a1a1aa; cursor: pointer; }
.sbx-dlg-body { display: grid; gap: 12px; padding: 14px 22px 4px; color: #b4b4bd; font-size: 14px; line-height: 1.55; }
.sbx-dlg-body p { margin: 0; }
.sbx-dlg-body label { display: grid; gap: 7px; color: #a1a1aa; font-size: 12.5px; font-weight: 600; }
.sbx-dlg-body input, .sbx-dlg-body select { width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); color: #fff; font: 500 15px Inter, sans-serif; outline: none; }
.sbx-dlg-body input:focus, .sbx-dlg-body select:focus { box-shadow: inset 0 0 0 1px rgba(167,139,250,.7); }
.sbx-dlg-body .warn { padding: 11px 13px; border-radius: 12px; background: rgba(239,68,68,.08); box-shadow: inset 0 0 0 1px rgba(239,68,68,.28); color: #fecaca; font-size: 13px; }
.sbx-dlg-body .skinprev { display: grid; place-items: center; height: 140px; border-radius: 14px; background: radial-gradient(circle at 50% 88%, color-mix(in srgb, var(--k) 34%, transparent), transparent 70%), rgba(255,255,255,.03); }
.sbx-dlg-body .skinprev .px { width: 60px; height: 90px; }
.sbx-dlg-body .line { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.07); color: #fff; font-weight: 700; }
.sbx-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px 22px; }
.sbx-dlg-foot button { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 18px; border: 0; border-radius: 11px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); color: #e4e4e7; font: 600 13.5px Inter, sans-serif; cursor: pointer; }
.sbx-dlg-foot .ok { background: #e7e7ea; box-shadow: none; color: #0b0b10; }
.sbx-dlg-foot .bad { background: rgba(239,68,68,.12); box-shadow: inset 0 0 0 1px rgba(239,68,68,.45); color: #fca5a5; }
.sbx-dlg-foot button[disabled] { opacity: .45; cursor: default; }
.sbx-hold { position: relative; overflow: hidden; }
.sbx-hold::before { content: ""; position: absolute; inset: 0; background: rgba(239,68,68,.4); transform: scaleX(0); transform-origin: left; }
.sbx-hold.holding::before { transform: scaleX(1); transition: transform 1.6s linear; }
.sbx-hold span { position: relative; }
.sbx-link { padding: 0; border: 0; background: none; color: #c4b5fd; font: 600 13px Inter, sans-serif; cursor: pointer; }

.sbx-toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 3000; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: #15151d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 20px 50px -20px #000; color: #f4f4f5; font: 600 13.5px Inter, sans-serif; transform: translateX(-50%); animation: sbxToast .4s cubic-bezier(.22,1,.36,1); }
.sbx-toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #00ff9d; box-shadow: 0 0 10px #00ff9d; }
@keyframes sbxToast { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Smaller screens ---------- */
@media (max-width: 1280px) {
  .sbx-two, .sbx-two.even { gap: 0 32px; }
}
@media (max-width: 1080px) {
  .sbx-two, .sbx-two.even { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .sbx-isle { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sbx-isle .art { max-width: 210px; margin: -10px auto 0; }
  .sbx-donut svg { width: 116px !important; height: 116px !important; }
  .sbx-donut { gap: 18px; }
  /* Tables become stacked rows: name on the left, the headline number on the right, the rest underneath */
  .sbx .nx-table thead { display: none; }
  .sbx .nx-table, .sbx .nx-table tbody { display: block; }
  .sbx .nx-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 2px; border-bottom: 1px solid rgba(255,255,255,.05); background: none !important; }
  .sbx .nx-table td { display: block; padding: 0; border: 0; text-align: left !important; }
  .sbx .nx-table td:first-child { grid-column: 1; grid-row: 1; }
  .sbx .nx-table td.head { grid-column: 2; grid-row: 1; align-self: center; text-align: right !important; }
  .sbx .nx-table td[data-l] { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; color: #d6d8e0; font-size: 13px; }
  .sbx .nx-table td[data-l]::before { content: attr(data-l); color: var(--dim); font-weight: 500; }
  .sbx .nx-table td.acts { grid-column: 1 / -1; display: flex; gap: 6px; padding-top: 8px; }
  .sbx .nx-table td.acts .nx-btn { flex: 1; width: auto; margin: 0 !important; padding: 0 10px; }
  .sbx .nx-table td.acts .nx-btn.ic { flex: none; width: 42px; }
  .sbx .nx-table .xp { min-width: 0; width: 60%; }
  .sbx .nx-table td[data-l], .sbx .nx-table td[data-l] * { font-family: Inter, sans-serif; }
  .sbx .nx-head .nx-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .sbx .nx-head .nx-seg::-webkit-scrollbar { display: none; }
  .sbx .nx-head .nx-seg button { flex: none; }
}
@media (max-width: 640px) {
  .sbx-note { margin: -4px 0 18px !important; align-items: flex-start; font-size: 12.5px; }
  .nx-hero .nx-links { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nx-hero .nx-links::-webkit-scrollbar { display: none; }
  .nx-hero .nx-chip { flex: none; }
  .sbx-trend .plot { height: 140px; }
  .sbx-acts .nx-btn { flex: 1 1 auto; }
  .sbx .nx-grid.skins { grid-template-columns: 1fr 1fr; }
  .sbx .nx-card .stage { height: 124px; }
  .sbx .nx-card .stage .px { width: 46px; height: 69px; }
  .sbx .nx-add { flex-direction: row; }
  .sbx-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .sbx-dialog[open] { animation: sbxSheet .4s cubic-bezier(.22,1,.36,1); }
  .sbx-dlg-foot { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .sbx-dlg-foot button { flex: 1; }
}
@keyframes sbxSheet { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  .sbx *, .sbx-dialog, .sbx-toast { animation: none !important; transition: none !important; }
}

/* Link code (Game account) */
.sbx-code { display: grid; gap: 8px; margin: 0 0 14px; padding: 18px 20px; border-radius: 16px; background: rgba(0,255,157,.06); box-shadow: inset 0 0 0 1px rgba(0,255,157,.22); }
.sbx-code b { color: #fff; font: 800 34px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .28em; }
.sbx-code small { color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.sbx-note a { color: #67e8f9; }

/* Premium + mobile polish */
.sbx-today { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lab spark" "num spark" "sub spark"; align-items: end; gap: 4px 18px; width: 100%; margin: 0 0 12px; padding: 20px 22px; border: 0; border-radius: 20px; overflow: hidden; text-align: left; cursor: pointer;
  background: radial-gradient(120% 140% at 0% 0%, rgba(0,255,157,.16), rgba(34,211,238,.06) 45%, rgba(255,255,255,.02) 75%), #07080d; box-shadow: inset 0 0 0 1px rgba(0,255,157,.18), 0 20px 50px -30px rgba(0,255,157,.45); animation: nxIn .6s var(--ease) both; }
.sbx-today .lab { grid-area: lab; display: flex; align-items: center; gap: 8px; color: #a7f3d0; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sbx-today .lab svg { width: 16px; height: 16px; color: #fbbf24; }
.sbx-today b { grid-area: num; color: #fff; font: 800 clamp(34px, 5vw, 46px)/1 Outfit, Inter, sans-serif; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sbx-today b small { color: var(--mut); font: 600 14px Inter, sans-serif; letter-spacing: 0; }
.sbx-today .sub { grid-area: sub; color: var(--mut); font-size: 13px; }
.sbx-today .spark { grid-area: spark; display: flex; align-items: flex-end; gap: 5px; height: 64px; }
.sbx-today .spark i { width: 9px; height: var(--h); border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #00ff9d, rgba(34,211,238,.25)); transform-origin: bottom; animation: sbxGrow .8s var(--ease) both; }
.sbx-today .spark i:last-child { background: linear-gradient(180deg, #fbbf24, rgba(251,146,60,.3)); }
.sbx-today:hover { box-shadow: inset 0 0 0 1px rgba(0,255,157,.35), 0 20px 50px -26px rgba(0,255,157,.6); }
.sbx .nx-glance:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) {
  .sbx .nx-nav { margin: 0 -16px; padding: 10px 16px; background: rgba(5,6,12,.88); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
}
@media (max-width: 640px) {
  .sbx .nx-hero h1 { font-size: 26px; }
  .sbx .sbx-sub { font-size: 13px; }
  .sbx .nx-glance, .sbx .nx-glance:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 26px; }
  .sbx .nx-glance:has(> :nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sbx .nx-glance button { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 12px; border-radius: 14px; }
  .sbx .nx-glance button > i { grid-row: 1 / span 2; }
  .sbx .nx-glance button > b, .sbx .nx-glance button > small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mb .mb-main.nx.sbx { padding-top: 78px; }
  .sbx .nx-glance b { font-size: 18px; line-height: 1.1; }
  .sbx .nx-glance small { font-size: 11.5px; line-height: 1.25; }
  .sbx .nx-glance i { width: 28px; height: 28px; border-radius: 9px; }
  .sbx .nx-glance i svg { width: 15px; height: 15px; }
  .sbx .nx-sec-h { align-items: flex-end; gap: 12px; margin: 28px 0 12px; }
  .sbx .nx-sec-h h3 { display: block; font-size: 16px; line-height: 1.25; }
  .sbx .nx-sec-h h3 small { display: block; margin-top: 3px; }
  .sbx-today { padding: 18px; gap: 4px 12px; border-radius: 18px; }
  .sbx-today .spark { height: 52px; gap: 4px; }
  .sbx-today .spark i { width: 7px; }
  .sbx-code b { font-size: 30px; letter-spacing: .22em; }
  .sbx .nx-empty { padding: 30px 18px; }
}

/* Footer always at the bottom, even on short tabs */
html:has(.sbx) body { display: flex; flex-direction: column; min-height: 100dvh; }
html:has(.sbx) body > .mb-main { flex: 1 0 auto; width: 100%; }
html:has(.sbx) .gx-footer { margin-top: auto; }

/* Real outfit cards (3D renders) and the 3D viewer */
.sbx .sbx-outfit .stage { place-items: center; }
.sbx .sbx-outfit .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; transition: transform .4s var(--ease); }
.sbx .sbx-outfit .stage img.flat { width: 64px; height: 64px; inset: 0; margin: auto; border-radius: 12px; opacity: .85; }
.sbx .sbx-outfit:hover .stage img:not(.flat) { transform: translateY(-4px) scale(1.04); }
.sbx .sbx-outfit .stage .nx-btn.ic { position: absolute; top: 10px; right: 10px; z-index: 2; backdrop-filter: blur(8px); }
.sbx .sbx-outfit .bot a.nx-btn { text-decoration: none; }
.sbx-dlg-body .sbx-3d { display: block; width: 100%; height: min(360px, 55vh); border-radius: 14px; cursor: grab; background: radial-gradient(90% 70% at 50% 85%, rgba(34,211,238,.22), transparent 65%); }
.sbx-dlg-body .sbx-3d-hint { margin: 6px 0 0; color: #71717a; font-size: 12px; text-align: center; }
.sbx-dialog a.nx-btn { text-decoration: none; }

/* Helper roster (8 Oct 2026): red tag, tool wear bar, stale sync label */
.sbx-tag.r { background: rgba(248,113,113,.12); color: #f87171; }
.sbx-wear { display: inline-block; width: 44px; height: 5px; margin: 0 2px; border-radius: 99px; background: rgba(255,255,255,.1); vertical-align: middle; overflow: hidden; }
.sbx-wear i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: #4ade80; }
.sbx-wear.low i { background: #f87171; }
#sbxSync.stale { color: #fbbf24; }

/* My islands (8 Oct 2026): three sleek cards, picture 70% / details 30% */
.sbx-isl-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .sbx-isl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sbx-isl { display: grid; grid-template-rows: 7fr 3fr; aspect-ratio: 4 / 4.4; min-height: 0; border-radius: 22px; overflow: hidden; background: #0c0c10;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 24px 50px -30px rgba(0,0,0,.9); transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .3s; animation: sbxIslIn .6s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--i) * 70ms); }
.sbx-isl:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 30px 60px -30px rgba(0,0,0,.95); }
@media (max-width: 899px) { .sbx-isl { aspect-ratio: 4 / 3.6; } }
@keyframes sbxIslIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.sbx-isl-pic { position: relative; min-height: 0; overflow: hidden; }
.sbx-isl-pic svg, .sbx-isl-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.22,1,.36,1); }
.sbx-isl:hover .sbx-isl-pic svg, .sbx-isl:hover .sbx-isl-pic img { transform: scale(1.04); }
.sbx-isl-badge { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(5,5,8,.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #4ade80; font-size: 12px; font-weight: 700; }
.sbx-isl-badge.y { color: #fbbf24; }
.sbx-isl-pic .sbx-isl-badge svg { position: static; inset: auto; width: 14px; height: 14px; transform: none; }
.sbx-isl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; min-width: 0; border-top: 1px solid rgba(255,255,255,.06); }
.sbx-isl-foot .tx { min-width: 0; }
.sbx-isl-foot b { display: block; color: #fff; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbx-isl-foot small { display: block; margin-top: 3px; color: var(--mut); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sbx-isl-acts { display: flex; flex: none; gap: 6px; }
.sbx-isl-acts .nx-btn.ic { width: 38px; height: 38px; padding: 0; border-radius: 12px; }
.sbx-isl-acts [data-act="islreset"]:hover { color: #f87171; }
.sbx-isl.empty { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.1); }
.sbx-isl.empty .sbx-isl-pic { display: grid; place-items: center; background: repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 12px, transparent 12px 24px); }
.sbx-isl-plus { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.05); color: var(--mut); }
.sbx-isl-pic .sbx-isl-plus svg { position: static; inset: auto; width: 28px; height: 28px; transform: none; }
.sbx-isl-panel { display: grid; gap: 22px; align-items: start; }
@media (min-width: 900px) { .sbx-isl-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; } }
.sbx-isl-hero { position: relative; aspect-ratio: 16 / 11; border-radius: 22px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.sbx-isl-hero svg, .sbx-isl-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sbx-isl-form { display: grid; gap: 14px; }
.sbx-isl-form label { display: grid; gap: 6px; color: #d4d4d8; font-size: 13px; font-weight: 600; }
.sbx-isl-form label small { color: var(--mut); font-weight: 500; }
.sbx-isl-form input, .sbx-isl-form textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.03); color: #fff; font: 500 15px/1.4 inherit; }
.sbx-isl-form input[type=file] { padding: 10px; font-size: 13px; }
.sbx-isl-form input:focus, .sbx-isl-form textarea:focus { outline: none; border-color: rgba(0,255,157,.5); }
.sbx-isl-form .nx-btn.go { justify-self: start; }
.sbx-isl-err { margin: 0; color: #f87171; font-size: 13.5px; min-height: 1px; }
.sbx-isl-desc { color: #d4d4d8; font-size: 14.5px; line-height: 1.6; }

/* Background refreshes redraw without replaying entrance animations */
.sbx-quiet, .sbx-quiet * { animation: none !important; }

/* Helper cards (8 Oct 2026): one neat card per placed helper; resting ones sit down until their island loads */
.hc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.hc { display: grid; gap: 14px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); animation: hcIn .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes hcIn { from { opacity: 0; transform: translateY(6px); } }
.hc-top { display: flex; align-items: center; gap: 14px; }
.hc-fig { position: relative; display: grid; place-items: end center; flex: none; width: 54px; height: 64px; padding-bottom: 4px; border-radius: 12px; background: radial-gradient(circle at 50% 80%, color-mix(in srgb, var(--k) 22%, transparent), transparent 70%); }
.sbx .hc-fig svg.px { width: 32px; height: auto; }
.hc.idle .hc-fig svg.px { filter: saturate(.55) brightness(.8); }
.hc-z { position: absolute; top: 4px; right: 6px; color: var(--mut); font: 700 12px Inter, sans-serif; font-style: normal; animation: hcZ 2.6s ease-in-out infinite; }
@keyframes hcZ { 0% { opacity: 0; transform: translate(0, 4px) scale(.8); } 40% { opacity: .9; } 100% { opacity: 0; transform: translate(6px, -8px) scale(1.1); } }
.hc-id { display: grid; gap: 3px; min-width: 0; justify-items: start; }
.hc-id b { max-width: 100%; overflow: hidden; color: #fff; font-size: 15.5px; text-overflow: ellipsis; white-space: nowrap; }
.hc-id small { color: var(--mut); font-size: 12.5px; }
.hc-id .sbx-tag { margin-top: 3px; }
.hc-tools { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.hc-tool { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; color: #e4e4e7; font-size: 13px; }
.hc-tool small { color: var(--mut); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.hc-bar { width: 70px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.hc-bar i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--k); }
.hc-bar.low i { background: #f87171; }
.hc-rest { margin: 0; color: var(--mut); font-size: 12.5px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .hc, .hc-z { animation: none; } }

/* Helper skins: the shop's outfit cards (9 Oct 2026) */
.sbx .oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.sbx .oc { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 16px; background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .3s, background .3s; animation: hcIn .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms); }
.sbx .oc:hover { transform: translateY(-3px); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 18px 40px -22px rgba(0,0,0,.9); }
.sbx .oc-stage { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; cursor: zoom-in; overflow: hidden; background: radial-gradient(90% 75% at 50% 22%, rgba(255,255,255,.075), transparent 68%), linear-gradient(180deg, #18181d, #0f0f12); }
.sbx .oc-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.sbx .oc-stage img.flat { object-fit: contain; padding: 22%; }
.sbx .oc:hover .oc-stage img { transform: scale(1.035); }
.sbx .oc-3d { position: absolute; z-index: 2; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(10,10,14,.72); backdrop-filter: blur(8px); color: #fff; font-size: 11.5px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.sbx .oc-3d svg { width: 14px; height: 14px; }
.sbx .oc:hover .oc-3d, .sbx .oc-stage:focus-visible .oc-3d { opacity: 1; transform: none; }
.sbx .oc-tag { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(10,10,14,.72); backdrop-filter: blur(8px); color: #4ade80; font-size: 11px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.sbx .oc-tag.shop { color: #fbbf24; }
.sbx .oc-body { display: flex; flex-direction: column; gap: 2px; flex: 1; padding: 13px 14px 14px; }
.sbx .oc-body h3 { margin: 0; color: #fff; font: 600 15px/1.35 Inter, sans-serif; }
.sbx .oc-body > p { margin: 0; color: var(--dim); font-size: 12.5px; }
.sbx .oc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.sbx .oc-body h3 + p { margin-bottom: 12px; }
.sbx .oc-foot b { color: #fff; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sbx .oc-how { margin: 10px 0 0; color: var(--mut); font-size: 12.5px; line-height: 1.5; }
.sbx .oc-how b { color: #fff; }
