/* Lompat Bareng 16.1. Palet openSUSE: hijau Geeko, pine, cyan.
   Sengaja ringan untuk HP peserta: font sistem, tanpa blur/backdrop-filter, tanpa gambar latar. */
:root {
  --green: #73ba25;
  --green-hi: #8fd13f;
  --cyan: #35b9ab;
  --blue: #21a4df;
  --pine: #173f4f;
  --bg: #0a1f28;
  --surface: #0f2c38;
  --surface-2: #143846;
  --card: var(--surface);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eef5ef;
  --muted: #9db6bd;
  --bad: #e5534b;
  --warn: #e3b341;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .55);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 16px/1.5 var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 420px at 85% -120px, rgba(115, 186, 37, .16), transparent 70%),
    radial-gradient(700px 380px at -10% 0, rgba(53, 185, 171, .10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-hi); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.kicker { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }

/* ---------- header */
header.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 58px; padding: 0 max(16px, calc((100% - 1440px) / 2));
  background: #0a1f28; border-bottom: 1px solid var(--line);
}
header.top h1 { font-size: 1.05rem; font-weight: 700; margin: 0; white-space: nowrap; }
header.top h1 small { font-weight: 500; color: var(--muted); margin-left: .1em; }
header.top h1, .brand { display: flex; align-items: center; gap: .55em; }
.logo { width: 36px; height: 36px; flex: 0 0 auto; }
header.top .score {
  display: flex; align-items: center; gap: .45em; min-width: 0;
  padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: .88rem; white-space: nowrap;
}
header.top .score:empty { display: none; }
header.top .score .av {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--green); color: #0b1f12; font-weight: 800; font-size: .8rem;
}
header.top .score .nm { overflow: hidden; text-overflow: ellipsis; max-width: 26vw; color: var(--muted); }
header.top .score b { color: var(--green-hi); }

main { max-width: 720px; margin: 0 auto; padding: 20px 16px 24px; position: relative; }
/* Tab lab disembunyikan dengan digeser keluar layar, bukan display:none, supaya iframe terminal tetap berukuran. */
.tab-off { position: absolute; left: -300vw; top: 0; width: calc(100% - 32px); visibility: hidden; }

/* ---------- kartu, tombol, input */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; }
.card h3 { font-size: 1.05rem; }
button, .btn {
  font: inherit; font-weight: 650; border: 0; border-radius: 12px; padding: 11px 18px; cursor: pointer;
  background: var(--green); color: #0b1f12; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: .45em; transition: transform .12s, background .2s;
  box-shadow: 0 6px 18px -8px rgba(115, 186, 37, .7);
}
button:hover:not(:disabled), .btn:hover { background: var(--green-hi); }
button:active:not(:disabled) { transform: scale(.98); }
button:focus-visible, .btn:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--green-hi); outline-offset: 2px; }
button.secondary, .btn.secondary {
  background: transparent; color: var(--text); border: 1px solid var(--line-2); box-shadow: none;
}
button.secondary:hover:not(:disabled), .btn.secondary:hover { background: rgba(255, 255, 255, .06); }
button.danger { background: transparent; color: #ff8a80; border: 1px solid rgba(229, 83, 75, .5); box-shadow: none; }
button.danger:hover:not(:disabled) { background: rgba(229, 83, 75, .12); }
button:disabled { opacity: .45; cursor: default; }
input, select {
  font: inherit; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: #0a222c; color: var(--text); width: 100%;
}
input::placeholder { color: #6f8e96; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1; min-width: 140px; width: auto; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: rgba(115, 186, 37, .1); color: #c6eb9b; padding: 1px 6px; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; }
.card:has(> table) { overflow-x: auto; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }

/* ---------- halaman gabung */
.hero { text-align: center; padding: 18px 0 6px; }
.hero .mark {
  width: 168px; height: 168px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle, rgba(115, 186, 37, .25), transparent 68%);
}
.hero .mark img { width: 128px; height: 128px; animation: float 5s ease-in-out infinite; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.hero h1 { margin: 12px 0 8px; font-size: clamp(2.1rem, 9vw, 2.8rem); font-weight: 800; letter-spacing: -.035em; }
.hero h1 span { color: var(--green); }
.hero p { margin: 0 auto; max-width: 30em; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 8px; text-align: center; }
.feature svg { width: 24px; height: 24px; color: var(--green); }
.feature b { display: block; font-size: .9rem; margin-top: 4px; }
.feature span { font-size: .76rem; color: var(--muted); }
.join-card h2 { font-size: 1.25rem; margin-bottom: 4px; }
.join-card .row { margin-top: 14px; }
details.recover summary { cursor: pointer; color: var(--muted); font-size: .92rem; list-style: none; text-align: center; padding: 6px; }
details.recover summary::-webkit-details-marker { display: none; }
details.recover summary b { color: var(--green-hi); font-weight: 600; }
details.recover .card { margin-top: 8px; }

/* ---------- navigasi tab: segmented di atas (laptop), tab bar di bawah (HP) */
nav.tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
nav.tabs button {
  flex: 1; background: transparent; color: var(--muted); box-shadow: none; border-radius: 10px; padding: 9px 10px;
  font-weight: 600;
}
nav.tabs button svg { width: 18px; height: 18px; }
nav.tabs button:hover:not(.active) { background: rgba(255, 255, 255, .04); color: var(--text); }
nav.tabs button.active { background: var(--green); color: #0b1f12; }
@media (max-width: 720px) {
  nav.tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0; border-radius: 0;
    border-width: 1px 0 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: #0a1f28;
  }
  nav.tabs button { flex-direction: column; gap: 2px; font-size: .72rem; padding: 6px 4px; }
  nav.tabs button svg { width: 22px; height: 22px; }
  nav.tabs button.active { background: transparent; color: var(--green-hi); }
  nav.tabs button.active svg { filter: drop-shadow(0 0 8px rgba(115, 186, 37, .6)); }
  body.joined { padding-bottom: 72px; }
}

/* HP sangat sempit (320-359 px, mis. iPhone SE lama) */
@media (max-width: 359px) {
  header.top .score .nm { display: none; }        /* nama tergencet jadi 1 huruf; avatar + poin cukup */
  .share-actions button { padding-left: 8px; padding-right: 8px; font-size: .9rem; }
  .code-box code { font-size: 1.05rem; }
}

/* ---------- quiz: satu soal per layar */
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.qhead b { color: var(--text); }
.streak { padding: 2px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.streak.hot { background: #4a2a12; border-color: #7a4718; color: #ffb366; animation: pulse 1.2s ease-in-out infinite; }
.qbar { height: 6px; background: var(--surface-2); border-radius: 99px; margin: 12px 0; overflow: hidden; }
.qbar div { height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); border-radius: 99px; transition: width .5s ease; }
.qdots { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.qdots::-webkit-scrollbar { display: none; }
.qdot {
  flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border-radius: 50%; font-size: .82rem; box-shadow: none;
  background: transparent; color: var(--muted); border: 1.5px solid var(--line-2);
}
.qdot:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.qdot.right { background: var(--green); border-color: var(--green); color: #0b1f12; }
.qdot.wrong { background: var(--bad); border-color: var(--bad); color: #fff; }
.qdot.cur { border-color: var(--text); transform: scale(1.12); }
.qcard { position: relative; overflow: hidden; }
.qcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--green), var(--cyan)); }
.qcard h2 { font-size: 1.2rem; font-weight: 700; margin: 6px 0 18px; overflow-wrap: anywhere; }
.qnum { font-size: .72rem; letter-spacing: .14em; color: var(--green); font-weight: 700; }
.opt {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; text-align: left;
  margin: 8px 0; padding: 12px 14px; background: #0b2530; color: var(--text); font-weight: 500;
  border: 1.5px solid var(--line-2); box-shadow: none; border-radius: 12px;
  transition: transform .12s, background .2s, border-color .2s, opacity .2s;
}
.opt:not(:disabled):hover, .opt:not(:disabled):focus-visible { transform: translateY(-1px); border-color: var(--accent); background: #0d2a36; }
.opt:not(:disabled):active { transform: scale(.99); }
.opt .letter {
  flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-weight: 800; font-size: .9rem;
}
.opt-0 { --accent: #73ba25; }
.opt-1 { --accent: #35b9ab; }
.opt-2 { --accent: #21a4df; }
.opt-3 { --accent: #e3b341; }
.opt:disabled { opacity: 1; cursor: default; }
.opt.picked { border-color: var(--accent); animation: pulse .8s ease-in-out infinite; }
.opt.right { background: rgba(115, 186, 37, .16); border-color: var(--green); animation: pop .35s ease; }
.opt.right .letter { background: var(--green); color: #0b1f12; }
.opt.wrong { background: rgba(229, 83, 75, .14); border-color: var(--bad); }
.opt.wrong .letter { background: var(--bad); color: #fff; }
.opt.dim { opacity: .45; }
.explain {
  margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--green); background: rgba(115, 186, 37, .07);
  border-radius: 10px; animation: rise .35s ease; overflow-wrap: anywhere; font-size: .95rem;
}
.explain.bad { border-left-color: var(--bad); background: rgba(229, 83, 75, .07); }
.learn {
  margin-top: 12px; padding: 14px; border-radius: 14px; animation: rise .45s ease;
  background: linear-gradient(160deg, rgba(53, 185, 171, .1), rgba(255, 255, 255, .02) 60%); border: 1px solid rgba(53, 185, 171, .3);
}
.learn-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; }
.learn-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(53, 185, 171, .2); }
.learn p { margin: 10px 0 0; font-size: .93rem; line-height: 1.6; color: #d5e4e2; overflow-wrap: anywhere; }
.illus { margin: 12px 0 0; padding: 10px; border-radius: 12px; background: rgba(4, 18, 24, .55); border: 1px solid var(--line); }
.illus svg { display: block; width: 100%; height: auto; max-height: 190px; }
.sources { margin-top: 12px; display: grid; gap: 6px; }
.sources .kicker { margin-bottom: 2px; }
.sources a {
  display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 10px; text-decoration: none;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text); font-size: .88rem; font-weight: 650;
  transition: border-color .15s, background .15s;
}
.sources a:hover, .sources a:focus-visible { border-color: var(--cyan); background: rgba(53, 185, 171, .1); }
/* ---------- timer */
.qtimer { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; }
.qtimer-bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
#qtimer-fill { height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), var(--green)); transition: width .2s linear; }
#qtimer-fill.hot { background: linear-gradient(90deg, var(--green), var(--green-hi)); }
#qtimer-fill.cold { background: var(--muted); }
#qtimer-txt { font: 700 .82rem var(--mono); color: var(--green-hi); min-width: 92px; text-align: right; }
.qcard.locked { text-align: center; }
.lock-ico { font-size: 2.6rem; margin: 6px 0 -6px; }
.big-btn { width: 100%; padding: 14px; font-size: 1.05rem; margin-top: 6px; }
.labclock { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: rgba(53, 185, 171, .1); border: 1px solid rgba(53, 185, 171, .3); font-size: .88rem; }
.labclock b { font-family: var(--mono); color: var(--cyan); }
.speed { margin-top: 8px; font-size: .82rem; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.speed.hot { border-color: rgba(115, 186, 37, .5); background: rgba(115, 186, 37, .1); }
.speed.cold { opacity: .7; }
.speed.done { color: var(--green-hi); }
/* ---------- wilayah */
.region-pick { display: grid; gap: 6px; margin: 4px 0 12px; }
.region-pick label { font-size: .9rem; color: var(--muted); }
.region-fixed { padding: 10px 12px; border-radius: 10px; background: rgba(115, 186, 37, .1); border: 1px solid rgba(115, 186, 37, .35); }
button.link { background: none; border: 0; padding: 10px 6px; margin: -10px 0; color: var(--green-hi); text-decoration: underline; font: inherit; cursor: pointer; box-shadow: none; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.board-head h3 { margin: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { padding: 9px 14px; min-height: 38px; border-radius: 99px; font-size: .82rem; background: none; color: var(--muted); border: 0; box-shadow: none; white-space: nowrap; }
.seg button.on { background: var(--green); color: #0b1f12; font-weight: 750; }
.lb small { font-weight: 500; font-size: .75rem; }
.small-left { font-size: .8rem; margin: -4px 0 6px; }
/* ---------- telegram */
.tg-card { display: flex; gap: 16px; align-items: center; }
.tg-card img { flex: 0 0 auto; width: 132px; height: 132px; border-radius: 12px; background: #fff; }
.tg-card h3 { margin: 2px 0 4px; font-size: 1.02rem; }
.tg-card p { margin: 0 0 10px; font-size: .88rem; }
.tg-btn { display: inline-block; padding: 8px 14px; border-radius: 10px; background: #229ed9; color: #fff; font-weight: 750; text-decoration: none; font-size: .9rem; }
@media (max-width: 420px) { .tg-card { flex-direction: column; text-align: center; } }
.summary .reading { text-align: left; margin-top: 16px; }
.sources small { color: var(--cyan); font-weight: 500; font-size: .75rem; }
.qnav { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }
.qnav button { flex: 1; white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.summary { text-align: center; }
.summary .big { font-size: 1.2rem; font-weight: 800; color: var(--green-hi); margin: 8px 0 0; }
.ring {
  --p: 0; width: 148px; height: 148px; margin: 10px auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--surface-2) 0);
}
.ring > div { width: 120px; height: 120px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; align-content: center; }
.ring b { font-size: 2.5rem; line-height: 1; }
.ring span { color: var(--muted); }

/* ---------- lab */
.machine-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ico-box {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(115, 186, 37, .14); color: var(--green);
}
.ico-box svg { width: 22px; height: 22px; }
.machine-head h3 { margin: 0; }
.machine-head p { margin: 2px 0 0; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; box-shadow: 0 0 0 4px rgba(115, 186, 37, .18); vertical-align: 1px; }
.tip { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px dashed var(--line-2); }
.progress-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.progress-card .bar { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress-card .bar div { height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); border-radius: 99px; transition: width .6s ease; }
.progress-card b { white-space: nowrap; }
.mission { display: flex; gap: 14px; align-items: flex-start; }
.mission .icon {
  font-size: 1.45rem; line-height: 1; width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
}
.mission h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.mission.done { border-color: rgba(115, 186, 37, .35); background: linear-gradient(180deg, rgba(115, 186, 37, .08), transparent 70%), var(--surface); }
.mission.done .icon { background: rgba(115, 186, 37, .16); border-color: rgba(115, 186, 37, .4); }
.badge { font-size: .74rem; font-weight: 650; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); }
.badge.ok { background: var(--green); border-color: var(--green); color: #0b1f12; }
.msg { padding: 11px 14px; border-radius: 12px; margin: 0 0 10px; background: var(--surface); border: 1px solid var(--line); }
.msg.ok { border-color: rgba(115, 186, 37, .5); background: rgba(115, 186, 37, .1); }
.msg.err { border-color: rgba(229, 83, 75, .5); background: rgba(229, 83, 75, .08); }
.msg.warn { border-color: rgba(227, 179, 65, .4); background: rgba(227, 179, 65, .07); }

/* terminal yang ditempel di tab Misi Lab */
.term-panel {
  background: #000; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px;
  display: flex; flex-direction: column; height: 70vh; min-height: 360px; box-shadow: var(--shadow);
}
.term-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px 7px 14px;
  background: #0c2732; border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--muted);
}
.term-bar b { color: var(--text); }
.term-bar .dots { display: inline-flex; gap: 6px; margin-right: 10px; vertical-align: -1px; }
.term-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #e5534b; }
.term-bar .dots i:nth-child(2) { background: #e3b341; }
.term-bar .dots i:nth-child(3) { background: var(--green); }
.term-bar button { padding: 6px 10px; font-size: .8rem; border-radius: 9px; }
.term-panel iframe { flex: 1; width: 100%; border: 0; background: #000; }
.term-panel.full { position: fixed; inset: 0; z-index: 40; height: auto; margin: 0; border-radius: 0; border: 0; }
@media (max-width: 599px) {
  .wide-only { display: none; }
  .term-bar .row { gap: 6px; }
  .term-bar .dots { display: none; }
}
@media (min-width: 1000px) {
  main.wide { max-width: 1440px; }
  main.wide nav.tabs, main.wide #tab-quiz, main.wide #tab-skor { max-width: 688px; margin-left: auto; margin-right: auto; }
  .lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0 18px; align-items: start; }
  .lab-grid > * { grid-column: 1; }
  .lab-grid > .term-panel { grid-column: 2; grid-row: 1 / span 20; position: sticky; top: 76px; height: calc(100vh - 96px); }
}

/* ---------- skor */
.score-hero { text-align: center; padding: 26px 20px 22px; }
.score-hero .num {
  font-size: 3.8rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; margin: 10px 0 6px;
  background: linear-gradient(135deg, var(--green-hi), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.score-hero .rank { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chip { padding: 4px 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.chip b { color: var(--text); }
.lb { list-style: none; margin: 0; padding: 0; }
.lb li { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.lb li:last-child { border-bottom: 0; }
.lb .pos {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--surface-2); font-size: .82rem; font-weight: 700; color: var(--muted);
}
.lb li:nth-child(1) .pos { background: #e3b341; color: #2b1d00; }
.lb li:nth-child(2) .pos { background: #c9d4d8; color: #1c2a30; }
.lb li:nth-child(3) .pos { background: #cd8a4f; color: #2b1300; }
.lb .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .ic { font-size: .85rem; letter-spacing: 1px; }
.lb .pts { font-weight: 800; color: var(--green-hi); }
.lb li.me { background: rgba(115, 186, 37, .09); border-radius: 10px; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: #0a222c; border: 1px dashed var(--line-2); }
.code-box { flex-wrap: wrap; }
.code-box code { white-space: nowrap; font-size: 1.2rem; background: none; color: var(--green-hi); letter-spacing: .06em; padding: 0; }

/* ---------- bagikan */
.share-card { scroll-margin-top: 72px; }
.share-card img { display: block; width: 100%; max-width: 360px; margin: 14px auto; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8); aspect-ratio: 4 / 5; background: var(--surface-2); }
.share-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-actions button:first-child { grid-column: 1 / -1; }
.share-actions button { white-space: nowrap; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 6px; }
.social a { padding: 6px 14px; border-radius: 99px; font-size: .85rem; font-weight: 650; text-decoration: none; color: #fff; border: 1px solid var(--line-2); }
.social .wa { background: #1fa855; }
.social .x { background: #000; }
.social .tg { background: #229ed9; }
.social .fb { background: #1877f2; }
.social .li { background: #0a66c2; }
.small { font-size: .8rem; text-align: center; margin-bottom: 0; }
.share-btn { width: 100%; margin-top: 10px; }
.all-done { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(115, 186, 37, .45); background: linear-gradient(90deg, rgba(115, 186, 37, .16), transparent); }
.all-done span { flex: 1 1 200px; }

/* ---------- empty state, footer, toast */
.empty-state { text-align: center; padding: 34px 20px; }
.empty-state > img { width: 80px; height: 80px; margin-bottom: 10px; animation: float 5s ease-in-out infinite; }
.empty-state h3 { margin-bottom: 4px; }
.foot { margin: 32px 16px 18px; color: var(--muted); font-size: .8rem; text-align: center; }
.foot img { width: 22px; height: 22px; vertical-align: -6px; margin-right: 6px; }
#toast {
  --tx: -50%;
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: var(--green); color: #0b1f12; padding: 11px 18px; border-radius: 12px; font-weight: 650;
  max-width: 90vw; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6); animation: rise .25s ease;
}
#toast.err { background: var(--bad); color: #fff; }
@media (max-width: 720px) { body.joined #toast { bottom: 88px; } }

/* ---------- animasi */
.anim-in { animation: slide-in .3s ease; }
.anim-back { animation: slide-back .3s ease; }
.shake { animation: shake .4s ease; }
.confetti {
  position: fixed; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; z-index: 60;
  animation: burst 1.1s cubic-bezier(.2, .7, .4, 1) forwards;
}
.floatpts {
  position: fixed; z-index: 60; pointer-events: none; font-weight: 800; font-size: 1.4rem; color: var(--green-hi);
  text-shadow: 0 2px 6px #0008; animation: float-up 1s ease forwards;
}
@keyframes slide-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes slide-back { from { opacity: 0; transform: translateX(-24px); } }
@keyframes rise { from { opacity: 0; transform: translate(var(--tx, 0), 8px); } }
@keyframes pop { 50% { transform: scale(1.03); } }
@keyframes pulse { 50% { transform: scale(1.05); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes burst { to { transform: translate(var(--dx), calc(var(--dy) + 160px)) rotate(var(--rot)); opacity: 0; } }
@keyframes float-up { to { transform: translateY(-50px); opacity: 0; } }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
