/* Ringball sub-pages (fork 2): explore, network, leaderboard, lookup, opt-out, register.
   Loads after rb.css. A red sky band with a snowy hill line, then a light snow field; white cards, red signs. No 3D world here. */
body.pg { background: #f4f7fb; min-height: 100vh; }
body.pg .sky { position: absolute; inset: 0 0 auto 0; height: 430px; background: linear-gradient(180deg, #E84125 0%, #EC5336 55%, #F06E50 100%); z-index: 0; }
.hill { position: absolute; left: 0; right: 0; top: 330px; height: 120px; z-index: 1; pointer-events: none; }
.hill svg { width: 100%; height: 100%; display: block; }
#flakes { position: absolute; inset: 0 0 auto 0; height: 430px; width: 100%; z-index: 1; pointer-events: none; }
body.pg .top { position: absolute; }
body.pg .top.scrolled { position: fixed; }
.pgmain { position: relative; z-index: 2; max-width: 1160px; margin: 0 auto; padding: 108px clamp(16px, 4vw, 40px) 40px; }
.pghead { display: flex; align-items: end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; min-height: 196px; }
.pghead .sign h1 { margin: 0; color: #fff; font-weight: 700; font-size: clamp(34px, 4.6vw, 58px); line-height: 1; letter-spacing: -.04em; }
.pghead .sign p { font-size: 17px; line-height: 1.45; font-weight: 500; max-width: 560px; }
.pghead .side { display: flex; gap: 10px; flex-wrap: wrap; }
.top nav a.on { background: rgba(255,255,255,.2); }
.top.scrolled nav a.on { background: var(--frost); }

/* stat strip */
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: 16px; box-shadow: var(--sh); padding: 16px 18px; }
.stat small { display: block; color: var(--mute); font-size: 13.5px; font-weight: 500; }
.stat b { display: block; margin-top: 4px; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat i { font-style: normal; color: var(--mute); font-size: 13px; }

/* tool bar (filters, sort, search) */
.bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: inline-flex; background: #fff; border-radius: 13px; box-shadow: var(--sh); padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 10px; padding: 9px 13px; font-weight: 500; font-size: 15px; color: var(--ink2); cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.srch { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 13px; box-shadow: var(--sh); padding: 0 14px; }
.srch input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 12px 0; background: transparent; color: var(--ink); }
.sel { position: relative; }
.sel select { appearance: none; -webkit-appearance: none; border: 0; background: #fff; box-shadow: var(--sh); border-radius: 13px; padding: 12px 38px 12px 14px; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
.sel::after { content: ''; position: absolute; right: 15px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ink2); border-bottom: 2px solid var(--ink2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }

/* coin cards (explore) */
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cc { display: grid; gap: 12px; background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 16px; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.cc:hover { transform: translateY(-2px); }
.cc .tp { display: flex; gap: 12px; align-items: center; }
.cc .im, .lb .im, .feed .im, .reg .im { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; flex: none; background: radial-gradient(circle at 34% 28%, #fff 0 34%, #e9f0f8 66%, #b9cde6 100%); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #eef3f9; }
.cc .im img, .lb .im img, .feed .im img, .reg .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc .nm { font-weight: 700; font-size: 17px; line-height: 1.15; }
.cc .tk { color: var(--mute); font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink2); background: var(--frost); border-radius: 9px; padding: 5px 9px; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--shade); }
.chip.rolling i { background: var(--ok); } .chip.iceberg i { background: #5b8fd6; } .chip.frozen i { background: #9ac0ea; }
.kv4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.kv4 div { background: var(--frost); border-radius: 10px; padding: 8px 10px; }
.kv4 small { display: block; color: var(--mute); font-size: 12px; }
.kv4 b { font-size: 16px; font-variant-numeric: tabular-nums; }
.grow { color: var(--ok); font-weight: 700; font-size: 14px; }
.empty { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 34px 24px; text-align: center; }
.empty .ballico { width: 54px; height: 54px; margin: 0 auto 14px; }
.empty h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.empty p { margin: 0 auto 16px; color: var(--ink2); max-width: 440px; line-height: 1.5; }

/* leaderboard */
.lbwrap { background: #fff; border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.lb { display: grid; grid-template-columns: 64px minmax(200px, 1.6fr) repeat(5, minmax(84px, 1fr)); align-items: center; gap: 10px; padding: 12px 16px; text-decoration: none; color: var(--ink); }
.lb + .lb { border-top: 1px solid #eef2f7; }
.lb.h { background: var(--frost); font-size: 13px; color: var(--mute); font-weight: 500; padding: 10px 16px; }
.lb:not(.h):hover { background: #fbfcfe; }
.lb .rk { font-weight: 700; font-size: 15px; color: var(--ink2); }
.lb .rk.m { color: #fff; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: radial-gradient(circle at 34% 30%, #ff7a5c, #E84125 70%); box-shadow: 0 6px 14px -6px rgba(200,40,10,.7); }
.lb .cn { display: flex; gap: 12px; align-items: center; min-width: 0; }
.lb .cn b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb .cn span { color: var(--mute); font-size: 13.5px; }
.lb .n { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15.5px; text-align: right; }
.lb.h .n { font-weight: 500; font-size: 13px; }

/* network */
.net { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ballbox { background: radial-gradient(120% 90% at 50% 0%, #fff 0%, #eef3f9 70%, #e4ecf6 100%); border-radius: var(--r); box-shadow: var(--sh); position: relative; overflow: hidden; aspect-ratio: 1 / .86; }
.ballbox canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.ballbox .legend { position: absolute; left: 16px; bottom: 14px; display: flex; gap: 14px; font-size: 13.5px; color: var(--ink2); font-weight: 500; flex-wrap: wrap; }
.ballbox .legend span { display: inline-flex; align-items: center; gap: 6px; }
.ballbox .legend i { width: 10px; height: 10px; border-radius: 50%; }
.ballbox .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; padding: 7px 10px; border-radius: 9px; transform: translate(-50%, -130%); white-space: nowrap; opacity: 0; transition: opacity .12s; font-family: var(--mono); }
.ballbox .tip.on { opacity: 1; }
.ballbox .cap { position: absolute; left: 16px; top: 14px; font-weight: 700; font-size: 16px; }
.ballbox .cap small { display: block; color: var(--mute); font-weight: 500; font-size: 13px; }
.feedbox { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 16px; }
.feedbox h3 { margin: 0 0 10px; font-size: 18px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ok); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.feed { display: grid; gap: 6px; max-height: 560px; overflow: auto; }
.feed .r { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--frost); border-radius: 11px; padding: 8px 10px; animation: drop .45s ease both; }
.feed .im { width: 32px; height: 32px; box-shadow: none; }
.feed .w { font-family: var(--mono); font-size: 14px; }
.feed .s { color: var(--mute); font-size: 13px; }
.feed .t { color: var(--mute); font-size: 12.5px; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.note2 { margin-top: 14px; color: var(--mute); font-size: 13.5px; line-height: 1.5; }

/* forms (lookup, register, opt-out) */
.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 16px; align-items: start; }
.box { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 22px; }
.box h2 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.03em; }
.box p { margin: 0; color: var(--ink2); line-height: 1.5; }
.row2 { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.row2 input { flex: 1; min-width: 220px; font: inherit; font-size: 16px; font-family: var(--mono); color: var(--ink); background: var(--frost); border: 2px solid transparent; border-radius: 12px; padding: 13px 14px; outline: none; }
.row2 input:focus { border-color: #f2a38e; background: #fff; }
.row2 input.err { border-color: var(--bad); }
.res { margin-top: 18px; display: grid; gap: 10px; }
.verdict { display: flex; gap: 12px; align-items: center; border-radius: 14px; padding: 14px; background: var(--frost); }
.verdict .dot { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; }
.verdict.yes .dot { background: var(--ok); } .verdict.no .dot { background: var(--mute); } .verdict.out .dot { background: var(--ink); }
.verdict b { display: block; font-size: 17px; }
.verdict span { color: var(--ink2); font-size: 14.5px; }
.list { display: grid; gap: 6px; }
.list .r { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--frost); border-radius: 11px; padding: 9px 11px; }
.list .r .im { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #fff; }
.list .r .im img { width: 100%; height: 100%; object-fit: cover; }
.side h4 { margin: 0 0 8px; font-size: 17px; }
.side ul { margin: 0; padding-left: 18px; color: var(--ink2); line-height: 1.6; font-size: 15px; }
.steps2 { counter-reset: s; display: grid; gap: 10px; margin-top: 14px; }
.steps2 .s { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.steps2 .s::before { counter-increment: s; content: counter(s); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: radial-gradient(circle at 34% 30%, #ff7a5c, #E84125 70%); }
.steps2 .s p { margin: 6px 0 0; }
.reg { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: var(--frost); border-radius: 14px; padding: 14px; }
.reg .nm { font-weight: 700; font-size: 18px; } .reg .tk { color: var(--mute); font-size: 14px; }
.fw2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.fw2 code { font-family: var(--mono); font-size: 13.5px; background: #fff; border-radius: 9px; padding: 8px 10px; word-break: break-all; }
.okline { color: var(--ok); font-weight: 700; }
.errline { color: var(--bad); font-weight: 500; }

@media (max-width: 900px) {
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .net, .tool { grid-template-columns: 1fr; }
  .lb { grid-template-columns: 44px minmax(0, 1fr) repeat(2, minmax(70px, auto)); }
  .lb .x { display: none; }
}
@media (max-width: 520px) {
  .pgmain { padding-top: 92px; }
  .pghead { min-height: 0; margin-bottom: 18px; }
  .seg { width: 100%; overflow-x: auto; }
  .seg button { flex: 1; white-space: nowrap; }
  .lb { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .lb .n2 { display: none; }
}
