/* Appently Social lobby. Classes use the sc- prefix. Colors come from the kit's dark screen tokens. */
.sc-stage { --sc-side: #0f1116; --sc-gold: var(--you); --sc-coin-a: #ffd56b; --sc-coin-b: #d9920f; }
.sc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- app frame ---------- */
.sc-app { position: relative; display: flex; flex-direction: column; height: clamp(620px, calc(100vh - 96px), 860px); background: var(--s-bg); overflow: hidden; }
body.dk-embed .sc-stage, .sc-stage:fullscreen { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; }
body.dk-embed .sc-app, .sc-stage:fullscreen .sc-app { flex: 1; height: auto; min-height: 0; }

/* header */
.sc-top { flex: none; display: flex; align-items: center; gap: 18px; height: 66px; padding: 0 18px 0 16px; background: var(--sc-side); border-bottom: 1px solid var(--s-line); }
.sc-brand { appearance: none; border: 0; background: none; color: var(--s-text); display: inline-flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px 4px 2px; border-radius: 10px; width: 220px; flex: none; }
.sc-brand img { width: 30px; height: 30px; display: block; }
.sc-brand span { font-size: 18px; font-weight: 500; letter-spacing: -.02em; color: var(--s-dim); white-space: nowrap; }
.sc-brand b { font-weight: 800; color: var(--s-text); }
.sc-search { position: relative; flex: 1; max-width: 400px; display: block; }
.sc-search svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: var(--s-faint); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.sc-search input { width: 100%; height: 40px; padding: 0 14px 0 38px; font: 500 14px Inter, sans-serif; color: var(--s-text); background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 11px; }
.sc-search input::placeholder { color: var(--s-faint); }
.sc-search input:focus { outline: none; border-color: color-mix(in srgb, var(--you) 55%, var(--s-line)); }
.sc-wallet { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.sc-coin { display: inline-block; flex: none; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, var(--sc-coin-a), var(--sc-coin-b) 68%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), inset 0 -2px 0 rgba(0,0,0,.18); position: relative; }
.sc-coin::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px solid rgba(90,55,0,.45); }
.sc-coin.sm { width: 14px; height: 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.sc-coin.sm::after { inset: 3px; border-width: 1px; }
.sc-bal { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px 0 10px; background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 12px; transition: border-color .4s; }
.sc-bal-t { display: flex; flex-direction: column; line-height: 1.1; }
.sc-bal small { font: 600 9.5px 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--s-faint); }
.sc-bal b { font: 700 17px 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; color: var(--s-text); min-width: 9ch; }
.sc-bal.up { animation: scUp 1.1s ease-out; }
.sc-bal.down { animation: scDown 1.1s ease-out; }
@keyframes scUp { 0% { border-color: var(--up); } 100% { border-color: var(--s-line); } }
@keyframes scDown { 0% { border-color: color-mix(in srgb, var(--down) 70%, var(--s-line)); } 100% { border-color: var(--s-line); } }
.sc-bonus { appearance: none; border: 0; cursor: pointer; height: 46px; padding: 0 16px; border-radius: 12px; background: var(--you); color: var(--you-ink); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; line-height: 1.15; text-align: left; transition: filter .15s, transform .1s; }
.sc-bonus:hover { filter: brightness(1.07); }
.sc-bonus:active { transform: translateY(1px); }
.sc-bonus-k { font: 700 9.5px 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.sc-bonus b { font-size: 15px; font-weight: 800; white-space: nowrap; }
.sc-bonus.done { background: var(--s-panel); color: var(--s-dim); border: 1px solid var(--s-line); }
.sc-bonus.done b { font: 600 13px 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; color: var(--s-text); }

/* body: side nav + main */
.sc-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sc-nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; background: var(--sc-side); border-right: 1px solid var(--s-line); overflow-y: auto; scrollbar-width: none; }
.sc-nav::-webkit-scrollbar { display: none; }
.sc-nav button { appearance: none; border: 0; background: none; cursor: pointer; position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--s-dim); font: 600 14px Inter, sans-serif; text-align: left; white-space: nowrap; transition: background .15s, color .15s; }
.sc-nav button:hover { color: var(--s-text); background: rgba(255,255,255,.03); }
.sc-nav button.on { color: var(--s-text); background: var(--s-panel2); }
.sc-nav button.on::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--you); }
.sc-nav svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.sc-nav button.on svg { stroke: var(--you); }
.sc-nav span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.sc-nav em { font: 600 11px 'IBM Plex Mono', monospace; font-style: normal; color: var(--s-faint); }
.sc-nav em.hot { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--you); border: 1px solid color-mix(in srgb, var(--you) 45%, transparent); border-radius: 5px; padding: 2px 5px; }
.sc-nav-note { margin-top: auto; padding: 14px 12px 4px; font-size: 11.5px; line-height: 1.45; color: var(--s-faint); border-top: 1px solid var(--s-line); }
.sc-main { min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 22px 30px; container-type: inline-size; scrollbar-width: thin; scrollbar-color: #2a2f3b transparent; }
.sc-main:focus { outline: none; }

/* ---------- tiles ---------- */
.sc-tile { appearance: none; border: 0; background: none; color: inherit; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 9px; min-width: 0; font: inherit; }
.sc-art { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, #1c2029, #12141a); border: 1px solid var(--s-line); transition: border-color .2s, transform .2s; }
.sc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(var(--z, 1)); transform-origin: var(--pos, 50% 50%); transition: transform .4s ease; z-index: 1; }
.sc-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; text-align: center; font-weight: 800; font-size: 15px; color: rgba(255,255,255,.55); }
.sc-tile:hover .sc-art, .sc-tile:focus-visible .sc-art { border-color: color-mix(in srgb, var(--you) 65%, var(--s-line)); transform: translateY(-2px); }
.sc-tile:hover .sc-art img { transform: scale(calc(var(--z, 1) * 1.05)); }
.sc-tile:focus-visible { outline: none; }
.sc-play { position: absolute; right: 9px; bottom: 9px; z-index: 3; padding: 5px 11px; border-radius: 8px; background: var(--you); color: var(--you-ink); font-size: 12px; font-weight: 800; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.sc-tile:hover .sc-play, .sc-tile:focus-visible .sc-play { opacity: 1; transform: none; }
.sc-new, .sc-livetag { position: absolute; top: 8px; left: 8px; z-index: 3; display: inline-flex; align-items: center; gap: 5px; font: 700 9.5px 'IBM Plex Mono', monospace; font-style: normal; letter-spacing: .12em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: rgba(12,13,17,.82); color: var(--you); border: 1px solid color-mix(in srgb, var(--you) 40%, transparent); }
.sc-livetag { left: auto; right: 8px; color: #ff6b7c; border-color: rgba(255,90,110,.4); }
.sc-livetag b { width: 6px; height: 6px; border-radius: 50%; background: #ff3d50; animation: scPing 1.6s infinite; }
@keyframes scPing { 0% { box-shadow: 0 0 0 0 rgba(255,61,80,.6); } 80%, 100% { box-shadow: 0 0 0 7px rgba(255,61,80,0); } }
.sc-tag { position: absolute; left: 8px; bottom: 8px; z-index: 3; font: 700 10.5px 'IBM Plex Mono', monospace; font-style: normal; letter-spacing: .04em; padding: 4px 8px; border-radius: 6px; background: rgba(12,13,17,.86); color: var(--s-text); border: 1px solid var(--s-line); }
.sc-tm { display: flex; flex-direction: column; gap: 1px; padding: 0 2px; min-width: 0; }
.sc-tm b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-tm > span { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--s-dim); white-space: nowrap; overflow: hidden; }
.sc-tm em { font: 600 11px 'IBM Plex Mono', monospace; font-style: normal; color: var(--up); }

/* scratch ticket face, drawn with type and simple shapes */
.sc-art.tk { background: #101217; }
.sc-tk { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 10% 9% 8%; background: linear-gradient(155deg, var(--acc), color-mix(in srgb, var(--acc) 52%, #000)); color: var(--ink, #fff); }
.sc-tk::before { content: ''; position: absolute; inset: 5px; border: 1px dashed color-mix(in srgb, var(--ink, #fff) 30%, transparent); border-radius: 8px; pointer-events: none; }
.sc-tk-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.sc-tk-top b { font-size: 15px; font-weight: 900; letter-spacing: -.01em; line-height: 1.05; text-transform: uppercase; }
.sc-tk-top i { flex: none; font: 700 11px 'IBM Plex Mono', monospace; font-style: normal; padding: 2px 6px; border-radius: 5px; background: rgba(0,0,0,.35); color: #fff; }
.sc-tk-foil { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.sc-tk-foil span { aspect-ratio: 1; border-radius: 4px; background: linear-gradient(135deg, #e9ebef, #a9afba 55%, #d6d9df); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.sc-tk-bot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sc-tk-bot small { font: 600 9.5px 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.sc-tk-bot b { font: 700 15px 'IBM Plex Mono', monospace; }

/* ---------- home ---------- */
.sc-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sc-fc { appearance: none; border: 1px solid var(--s-line); padding: 0; cursor: pointer; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--s-panel); color: var(--s-text); text-align: left; font: inherit; transition: border-color .2s, transform .2s; }
.sc-fc-art { position: relative; display: block; aspect-ratio: 2 / 1; overflow: hidden; background: #0a0b0e; border-bottom: 1px solid var(--s-line); }
.sc-fc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(var(--z, 1)); transform-origin: var(--pos, 50% 50%); transition: transform .5s ease; }
.sc-fc:hover, .sc-fc:focus-visible { border-color: color-mix(in srgb, var(--you) 65%, var(--s-line)); outline: none; transform: translateY(-2px); }
.sc-fc:hover .sc-fc-art img { transform: scale(calc(var(--z, 1) * 1.04)); }
.sc-fc-txt { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 15px; }
.sc-fc-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sc-fc-h > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.sc-fc-k { font: 700 10px 'IBM Plex Mono', monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--you); }
.sc-fc-h b { font-size: 22px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-fc-l { font-size: 12.5px; color: var(--s-dim); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.sc-fc-cta { flex: none; padding: 7px 13px; border-radius: 9px; background: var(--you); color: var(--you-ink); font-size: 12.5px; font-weight: 800; white-space: nowrap; }

.sc-home { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; margin-top: 8px; }
.sc-rows { min-width: 0; }
.sc-row { margin-top: 18px; }
.sc-row > header, .sc-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sc-row h3, .sc-sub h3 { display: flex; align-items: baseline; gap: 9px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.sc-row h3 span { font: 500 11.5px 'IBM Plex Mono', monospace; color: var(--s-faint); }
.sc-row-r { display: flex; align-items: center; gap: 6px; }
.sc-more { appearance: none; border: 0; background: none; cursor: pointer; color: var(--you); font: 700 12.5px Inter, sans-serif; padding: 4px 6px; margin-right: 4px; }
.sc-more:hover { text-decoration: underline; }
.sc-arr { appearance: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--s-line); background: var(--s-panel); color: var(--s-dim); cursor: pointer; }
.sc-arr:hover { color: var(--s-text); border-color: #3d4352; }
.sc-arr svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sc-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 188px; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 2px 2px 6px; scrollbar-width: none; }
.sc-strip::-webkit-scrollbar { display: none; }
.sc-strip > * { scroll-snap-align: start; }

.sc-rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; margin-top: 18px; }
.sc-card { background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 14px; padding: 14px 14px 10px; }
.sc-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sc-card h3 { font-size: 15px; font-weight: 800; }
.sc-sim { font: 600 9.5px 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--s-dim); border: 1px solid var(--s-line); border-radius: 5px; padding: 2px 6px; }
.sc-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 11px Inter, sans-serif; color: #fff; background: hsl(var(--h) 32% 32%); }
.sc-wins { list-style: none; }
.sc-wins li { border-top: 1px solid var(--s-line); }
.sc-wins li:first-child { border-top: 0; }
.sc-wins li.fresh { animation: scIn .5s cubic-bezier(.2,.9,.3,1); }
@keyframes scIn { from { opacity: 0; transform: translateY(-8px); } }
.sc-wins button { appearance: none; border: 0; background: none; color: inherit; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 2px; text-align: left; font: inherit; border-radius: 8px; }
.sc-wins button:hover .sc-wt span { color: var(--s-text); }
.sc-wt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sc-wt b { font-size: 13px; font-weight: 700; }
.sc-wt span { font-size: 12px; color: var(--s-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-wamt { display: inline-flex; align-items: center; gap: 5px; font: 700 13px 'IBM Plex Mono', monospace; color: var(--up); font-variant-numeric: tabular-nums; }
.sc-lb-k { font-size: 12px; color: var(--s-dim); margin: -4px 0 6px; }
.sc-lb { list-style: none; }
.sc-lb li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--s-line); }
.sc-lb li:first-child { border-top: 0; }
.sc-lb .sc-av { width: 24px; height: 24px; font-size: 9.5px; }
.sc-rk { width: 16px; font: 700 12px 'IBM Plex Mono', monospace; color: var(--s-faint); text-align: center; }
.sc-lb li:nth-child(-n+3) .sc-rk { color: var(--you); }
.sc-lb b { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-lbv { font: 600 12.5px 'IBM Plex Mono', monospace; color: var(--s-text); font-variant-numeric: tabular-nums; }
.sc-rail-note { font-size: 11.5px; color: var(--s-faint); padding: 0 4px; }

/* ---------- category views ---------- */
.sc-vh { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.sc-vh h2 { display: flex; align-items: baseline; gap: 10px; font-size: 26px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.sc-vh h2 span { font: 600 13px 'IBM Plex Mono', monospace; color: var(--s-faint); }
.sc-vh p { margin-top: 4px; font-size: 14px; color: var(--s-dim); max-width: 640px; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px 14px; }
.sc-grid.big { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sc-fam { margin-bottom: 24px; }
.sc-fam h3 { display: flex; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.sc-fam h3 span { font: 500 11.5px 'IBM Plex Mono', monospace; color: var(--s-faint); }
.sc-lines { margin-top: 24px; border-top: 1px solid var(--s-line); }
.sc-lines div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--s-line); font-size: 13.5px; }
.sc-lines b { font-weight: 700; }
.sc-lines span { color: var(--s-dim); }
.sc-empty { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 28px; border: 1px dashed var(--s-line); border-radius: 14px; color: var(--s-dim); font-size: 14px; }
.sc-empty b { color: var(--s-text); font-size: 15px; }

/* scratch list */
.sc-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.sc-tcard { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; padding: 12px; background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 14px; }
.sc-tcard .sc-art { aspect-ratio: 3 / 4; }
.sc-tcard .sc-tk { padding: 14% 10% 10%; }
.sc-tcard .sc-tk-foil { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 6%; }
.sc-tcard .sc-tk-bot { flex-direction: column; align-items: flex-start; gap: 0; }
.sc-tinfo { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 2px; }
.sc-tinfo > b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.sc-tinfo p { font-size: 13px; color: var(--s-dim); line-height: 1.45; }
.sc-tinfo dl { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.sc-tinfo dt { font: 600 9.5px 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--s-faint); }
.sc-tinfo dd { font: 700 14px 'IBM Plex Mono', monospace; }
.sc-tinfo .s-btn { align-self: flex-start; margin-top: 2px; }

/* PrizeBox */
.sc-pbx { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; align-items: center; padding: 16px; background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 18px; }
.sc-pbx-art { appearance: none; border: 1px solid var(--s-line); padding: 0; cursor: pointer; position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #0a0b0e; }
.sc-pbx-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(var(--z, 1)); transform-origin: var(--pos, 50% 50%); transition: transform .5s; }
.sc-pbx-art:hover img { transform: scale(calc(var(--z, 1) * 1.04)); }
.sc-pbx-art .sc-play { opacity: 1; transform: none; font-size: 13px; padding: 8px 14px; }
.sc-pbx-txt { display: flex; flex-direction: column; gap: 10px; padding-right: 10px; }
.sc-k { font: 700 10.5px 'IBM Plex Mono', monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--you); }
.sc-pbx-txt h2 { font-size: 34px; font-weight: 900; letter-spacing: -.035em; line-height: 1; }
.sc-pbx-head { font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--s-text); }
.sc-pbx-txt p:not(.sc-pbx-head) { font-size: 14px; color: var(--s-dim); line-height: 1.55; max-width: 520px; }
.sc-pbx-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.sc-opens-wrap { margin-top: 22px; }
.sc-opens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sc-open { appearance: none; cursor: pointer; text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--s-panel); border: 1px solid var(--s-line); border-radius: 14px; transition: border-color .2s; }
.sc-open:hover { border-color: color-mix(in srgb, var(--you) 60%, var(--s-line)); }
.sc-open-top { display: flex; align-items: center; gap: 10px; }
.sc-open-top > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sc-open-top b { font-size: 13.5px; }
.sc-open-top > span > span { font-size: 12px; color: var(--s-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-open-top em { font: 700 18px 'IBM Plex Mono', monospace; font-style: normal; color: var(--s-text); font-variant-numeric: tabular-nums; }
.sc-open-top em.hot { color: var(--down); }
.sc-open-bar { height: 4px; border-radius: 3px; background: var(--s-panel2); overflow: hidden; }
.sc-open-bar i { display: block; height: 100%; background: var(--you); transition: width 1s linear; }
.sc-open-calls { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-open-calls span { flex: 1; text-align: center; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--s-line); background: var(--s-panel2); font-size: 11.5px; font-weight: 700; color: var(--s-dim); }
.sc-open:hover .sc-open-calls span { color: var(--s-text); }
.sc-open-n { font-size: 11.5px; color: var(--s-faint); }
.sc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.sc-steps div { border-top: 2px solid var(--s-line); padding-top: 12px; }
.sc-steps span { font: 600 11px 'IBM Plex Mono', monospace; color: var(--you); }
.sc-steps b { display: block; font-size: 14.5px; margin: 4px 0 4px; }
.sc-steps p { font-size: 13px; color: var(--s-dim); }

/* Live */
.sc-livecard { appearance: none; border: 1px solid var(--s-line); background: var(--s-panel); color: inherit; text-align: left; cursor: pointer; width: 100%; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 26px; align-items: center; padding: 14px; border-radius: 18px; font: inherit; transition: border-color .2s; }
.sc-livecard:hover { border-color: color-mix(in srgb, var(--you) 60%, var(--s-line)); }
.sc-livecard .sc-art { border-radius: 12px; }
.sc-livecard:hover .sc-art img { transform: scale(calc(var(--z, 1) * 1.03)); }
.sc-live-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-right: 10px; }
.sc-live-txt > b { font-size: 32px; font-weight: 900; letter-spacing: -.035em; line-height: 1; }
.sc-live-txt > span:not([class]) { color: var(--s-dim); font-size: 15px; max-width: 420px; }
.sc-onair { display: inline-flex; align-items: center; gap: 8px; font: 700 11px 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: #ff6b7c; }
.sc-onair i { width: 9px; height: 9px; border-radius: 50%; background: #ff3d50; animation: scPing 1.6s infinite; }
.sc-clock { font: 600 13px 'IBM Plex Mono', monospace; color: var(--you); }

/* ---------- game view ---------- */
.sc-game { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--s-bg); animation: scOpen .28s cubic-bezier(.2,.9,.3,1); }
.sc-game[hidden] { display: none; }
@keyframes scOpen { from { opacity: 0; transform: translateY(10px); } }
.sc-gbar { flex: none; display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 7px 14px; background: var(--sc-side); border-bottom: 1px solid var(--s-line); }
.sc-back { appearance: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 9px; border-radius: 10px; border: 1px solid var(--s-line); background: var(--s-panel); color: var(--s-text); font: 700 13.5px Inter, sans-serif; cursor: pointer; }
.sc-back:hover { border-color: #3d4352; }
.sc-back:focus { outline: none; }
.sc-back:focus-visible { outline: 2px solid var(--you); outline-offset: 2px; }
.sc-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sc-gname { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sc-gname b { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-gname span { font-size: 12px; color: var(--s-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-gnote { display: inline-flex; align-items: center; gap: 7px; font: 600 11.5px 'IBM Plex Mono', monospace; color: var(--s-dim); padding: 5px 10px; border: 1px solid var(--s-line); border-radius: 8px; background: var(--s-panel); white-space: nowrap; }
.sc-gnote::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--s-faint); flex: none; }
.sc-gnote.shared, .sc-gnote.scratch { color: var(--s-text); }
.sc-gnote.shared::before, .sc-gnote.scratch::before { background: var(--up); }
.sc-gnote.slot::before, .sc-gnote.own::before { background: var(--you); }
.sc-gbar .sc-gnote { margin-left: auto; }
.sc-gbal { display: none; align-items: center; gap: 7px; font: 700 14px 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.sc-gbal .sc-coin { width: 18px; height: 18px; }
.sc-gbal .sc-coin::after { inset: 4px; }
.sc-gwrap { position: relative; flex: 1; min-height: 0; background: #08090c; }
.sc-gwrap iframe { display: block; width: 100%; height: 100%; border: 0; background: #08090c; }
.sc-gload { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font: 600 12px 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--s-dim); background: #08090c; pointer-events: none; }
.sc-gload[hidden] { display: none; }
.sc-gload span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--s-line); border-top-color: var(--you); animation: scSpin .8s linear infinite; }
@keyframes scSpin { to { transform: rotate(360deg); } }

/* the kit's banner, shown under the daily bonus button */
.sc-app > .s-banner { top: 76px; left: auto; right: 18px; transform: none; z-index: 30; min-width: 280px; animation: scBan .45s cubic-bezier(.2,.9,.3,1.2); }
@keyframes scBan { from { opacity: 0; transform: translateY(-10px); } }

/* keep the demo bar on one line so the app below keeps its height */
.sc-stage > .dk-bar { flex-wrap: nowrap; }
.sc-stage > .dk-bar .dk-bar-l { min-width: 0; }
.sc-stage > .dk-bar .dk-bar-r { flex-wrap: nowrap; flex: none; }

/* ---------- container sizes (the main area) ---------- */
@container (max-width: 1020px) {
  .sc-home { grid-template-columns: minmax(0, 1fr); }
  .sc-rail { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .sc-rail-note { grid-column: 1 / -1; }
}
@container (max-width: 760px) {
  .sc-feat { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .sc-feat::-webkit-scrollbar { display: none; }
  .sc-fc { scroll-snap-align: start; }
  .sc-fc-h b { font-size: 20px; }
  .sc-pbx, .sc-livecard { grid-template-columns: 1fr; }
  .sc-opens, .sc-steps { grid-template-columns: 1fr; }
  .sc-rail { grid-template-columns: 1fr; }
}

/* ---------- tablet and phone ---------- */
@media (max-width: 900px) {
  .sc-body { display: flex; flex-direction: column; }
  .sc-nav { flex: none; flex-direction: row; gap: 6px; padding: 9px 12px; border-right: 0; border-bottom: 1px solid var(--s-line); overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
  .sc-nav button { flex: none; gap: 7px; padding: 7px 12px 7px 10px; border-radius: 999px; background: var(--s-panel); border: 1px solid var(--s-line); font-size: 13px; }
  .sc-nav button.on { background: var(--s-text); color: var(--s-bg); border-color: var(--s-text); }
  .sc-nav button.on::before { display: none; }
  .sc-nav button.on svg { stroke: var(--s-bg); }
  .sc-nav svg { width: 16px; height: 16px; }
  .sc-nav em, .sc-nav-note { display: none; }
  .sc-main { flex: 1; min-height: 0; }
  .sc-brand { width: auto; }
}
@media (max-width: 760px) {
  .sc-app { height: calc(100svh - 56px); min-height: 540px; }
  .sc-tv { display: none; }
  .sc-top { gap: 10px; height: 58px; padding: 0 12px; }
  .sc-brand span, .sc-search { display: none; }
  .sc-brand img { width: 28px; height: 28px; }
  .sc-bal { height: 40px; padding: 0 12px 0 8px; gap: 8px; }
  .sc-bal small { display: none; }
  .sc-bal b { font-size: 15px; min-width: 0; }
  .sc-coin { width: 22px; height: 22px; }
  .sc-coin::after { inset: 5px; }
  .sc-bonus { height: 40px; padding: 0 12px; }
  .sc-bonus-k { display: none; }
  .sc-bonus b { font-size: 13.5px; }
  .sc-bonus.done b { font-size: 12px; }
  .sc-main { padding: 14px 12px 24px; }
  .sc-strip { grid-auto-columns: 152px; gap: 10px; }
  .sc-arr { display: none; }
  .sc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .sc-grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-tickets { grid-template-columns: 1fr; }
  .sc-tcard { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
  .sc-vh h2 { font-size: 22px; }
  .sc-vh p { font-size: 13px; }
  .sc-lines div { grid-template-columns: 1fr; gap: 2px; }
  .sc-fc-h b { font-size: 20px; }
  .sc-pbx { padding: 12px; gap: 16px; }
  .sc-pbx-txt h2 { font-size: 28px; }
  .sc-live-txt > b { font-size: 26px; }
  .sc-app > .s-banner { top: 66px; right: 12px; min-width: 0; width: calc(100% - 24px); }

  /* the game takes the whole screen */
  .sc-game { position: fixed; inset: 0; z-index: 1000; height: 100vh; height: 100dvh; }
  html.sc-playing, html.sc-playing body { overflow: hidden; }
  .sc-gbar { flex-wrap: wrap; gap: 8px 10px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .sc-gname { flex: 1; }
  .sc-gname span { display: none; }
  .sc-gbal { display: inline-flex; }
  .sc-gbar .sc-gnote { order: 5; flex-basis: 100%; margin: 0; justify-content: center; font-size: 11px; padding: 4px 8px; }
  .sc-back { height: 34px; padding: 0 12px 0 7px; }
}
