/* ===== Landing / join / profile ===== */
.landing {
  position: relative; max-width: 440px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 2px 10px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
}
.land-glow { position: absolute; left: 50%; top: 0; width: 140%; height: 520px; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(232, 67, 56, .22), rgba(233, 196, 106, .07) 55%, transparent); }
.land-king { width: 88px; height: 88px; object-fit: contain; display: block; filter: drop-shadow(0 8px 22px rgba(232, 67, 56, .35)); }
.land-title { font-size: 34px; letter-spacing: -.03em; margin: 0; }
.join .land-title { font-size: 26px; }
.land-sub { color: #d9d0c2; margin: 0 0 4px; font-size: 16px; max-width: 340px; }
.land-pack { position: relative; width: min(52vw, 220px); aspect-ratio: 528 / 900; margin: 6px 0 4px; }
.land-pack::before { content: ""; position: absolute; inset: 10% -40% 0; background: radial-gradient(closest-side, rgba(233, 196, 106, .22), transparent); }
.land-pack .pack-art, .land-pack .pack-fb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .6)); }
.pack-art.float { animation: packFloat 3.8s ease-in-out infinite; }
.land-status { display: grid; gap: 4px; justify-items: center; }
.countdown { font-size: 34px; font-weight: 500; letter-spacing: -.02em; color: var(--cream); }
.gate-note { background: rgba(233, 196, 106, .1); border: 1px solid rgba(233, 196, 106, .3); color: var(--gold); padding: 8px 12px; border-radius: 10px; font-size: 14px; margin: 0; }
.land-rules { text-align: left; margin: 6px 0 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 10px; width: 100%; }
.land-rules li { counter-increment: r; position: relative; padding: 12px 14px 12px 46px; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; color: #d6cdbf; }
.land-rules li::before { content: counter(r); position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--s3); color: var(--gold); font: 600 12px/22px var(--mono); text-align: center; }
.land-rules b { color: var(--cream); font-weight: 600; }
.land-links { display: flex; gap: 10px; justify-content: center; color: var(--muted); font-size: 14px; margin-top: 4px; }
.land-foot { margin-top: 2px; }

.profile { max-width: 640px; margin: 0 auto; display: grid; gap: 16px; }
.profile-top { display: flex; align-items: center; gap: 8px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head h1 { margin: 2px 0 0; font-size: 26px; }
.showcase { display: flex; justify-content: center; padding: 14px 0 6px; min-height: 200px; }
.show-slot { margin: 0 calc(var(--cw-o, -26px)); transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * 6deg)) translateY(calc(abs(var(--i) - (var(--n) - 1) / 2) * 8px)); transform-origin: 50% 120%; transition: transform .2s; }
.show-slot:hover { z-index: 2; }
@supports not (top: abs(-1px)) { .show-slot { transform: rotate(calc((var(--i) - (var(--n) - 1) / 2) * 6deg)); } }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; }
.stat-v { font-size: 20px; color: var(--cream); }
.stat-l { font-size: 12px; color: var(--muted); }
/* ===== shared bits ===== */
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.break { word-break: break-all; }
.ok { color: var(--mint); }
.bad { color: #ff8a80; }
.warn { color: var(--gold); }
.tag.ok-tag { background: rgba(94, 231, 178, .14); color: var(--mint); }
.tag.bad-tag { background: rgba(232, 67, 56, .16); color: #ff8a80; }
.big-stat { margin: 2px 0 10px; }
.big-stat .mono { font-size: 28px; font-weight: 500; color: var(--cream); letter-spacing: -.02em; }
.lead { color: #d9d0c2; font-size: 16px; max-width: 640px; }
section h1 { margin-top: 2px; }

/* ===== Binder ===== */
.binder-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.binder-head h1 { margin: 2px 0 0; font-size: 28px; }
.binder-tabs { margin-bottom: 12px; }
.set-progress { margin-bottom: 14px; }
.set-progress .row { margin-bottom: 7px; gap: 8px; }
.binder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 16px 10px; margin-bottom: 18px; }
@media (min-width: 820px) { .binder-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 22px 16px; } }
.bcell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bcell .card { width: 100%; }
.bcap { display: flex; align-items: center; gap: 5px; font-size: 12px; min-width: 0; }
.bname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d6cdbf; }
.bcell.miss .bname { color: #6f6a63; }
.bcount { font-size: 11px; color: var(--cream); background: var(--s3); padding: 1px 6px; border-radius: 99px; }
.bhalo { font-size: 10px; color: #1d0e04; background: linear-gradient(90deg, #E84338, #F5C04B); padding: 1px 6px; border-radius: 99px; font-weight: 600; }
.recycle-btn { margin-top: 4px; }
.goals-box { margin-bottom: 14px; }
.goals-box .goal-bar { margin: 10px 0 8px; }
.goal-labels { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.arrives { margin-bottom: 14px; border-color: rgba(233, 196, 106, .3); }
.golden-intro { margin-bottom: 14px; }
.golden-intro b { color: var(--gold2); }
.detail-info { width: 100%; text-align: left; }
.detail-info h2 { margin: 4px 0 6px; }
.detail-flavor { font-style: italic; color: #d6cdbf; }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 12px; }
.fact { background: var(--s2); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.fact b { font-size: 14px; color: var(--cream); font-weight: 600; }
.recycle-list li { font-size: 14px; }

/* ===== Live ===== */
.live-head { margin-bottom: 12px; }
.live-head h1 { margin: 2px 0 0; font-size: 28px; }
.live-grid { display: grid; gap: 14px; }
.live-col { display: grid; gap: 14px; align-content: start; }
.live-col > .box + .box { margin-top: 0; }
@media (min-width: 900px) { .live-grid { grid-template-columns: 1fr 1.1fr; } }
.gem-gold, .gem-red { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 3px; display: inline-block; }
.gem-gold { background: linear-gradient(135deg, #fff1b8, #c9962f); box-shadow: 0 0 10px rgba(245, 192, 75, .6); }
.gem-red { background: linear-gradient(135deg, #ffb3a8, #c8362d); box-shadow: 0 0 10px rgba(232, 67, 56, .6); }
.golden-box { border-color: rgba(233, 196, 106, .28); background: radial-gradient(90% 60% at 100% 0%, rgba(245, 192, 75, .1), transparent 70%), var(--s1); }
.today-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.golden-list .serial { color: var(--gold2); font-size: 13px; }
.golden-list b { min-width: 34px; }
.goal-bar { position: relative; margin: 6px 0 12px; }
.goal-mark { position: absolute; top: -3px; width: 3px; height: 14px; margin-left: -2px; border-radius: 2px; background: var(--muted); }
.goal-mark.hit { background: var(--mint); }
.goal-list li { font-size: 14px; }
.goal-ic { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--s3); flex: none; }
.goal-ic.hit { background: rgba(94, 231, 178, .2); color: var(--mint); }
.fair-box .hash { display: block; margin-top: 4px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(232, 67, 56, .7); animation: livePulse 1.8s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(232, 67, 56, .6); } 100% { box-shadow: 0 0 0 9px rgba(232, 67, 56, 0); } }
.feed { max-height: 560px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.feed li { align-items: center; }
.feed li.fresh { animation: feedIn .6s ease-out; }
@keyframes feedIn { from { background: rgba(233, 196, 106, .12); } }
.feed-text { font-size: 14px; line-height: 1.35; min-width: 0; }
.feed time { white-space: nowrap; }
.avatar.sys { display: inline-grid; place-items: center; background: var(--s3); }
.t-ur { color: var(--gold2); }
.t-gold { color: #FFE08A; }
.t-cp { color: #ff8a80; }
.t-god { background: linear-gradient(90deg, #ff8ad9, #ffd36a, #7affcb, #7ac0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feed-box .more { margin-top: 8px; }
.lb-box h2 { display: flex; align-items: center; }
.lb-me { font-size: 13px; color: var(--gold); font-weight: 500; }
.lb { list-style: none; margin: 0 0 8px; padding: 0; }
.lb li { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lb li:last-child { border-bottom: 0; }
.lb-rank { width: 26px; text-align: right; color: var(--muted); font-size: 13px; flex: none; }
.lb li.top1 .lb-rank { color: #FFE08A; } .lb li.top2 .lb-rank { color: #e6e6e6; } .lb li.top3 .lb-rank { color: #e0a36b; }
.lb-score { min-width: 44px; text-align: right; }
.tag.g60 { background: rgba(94, 231, 178, .14); color: var(--mint); font-size: 10px; padding: 1px 5px; }
@media (max-width: 380px) { .lb-uni { display: none; } }
.reveal-modal h2 { padding-right: 34px; }
.canonical { max-height: 240px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 11px/1.45 var(--mono); color: #cfc6b8; white-space: pre-wrap; word-break: break-all; }
.check-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; }

/* ===== Quests ===== */
.quests > .box, .quests > .grid2 { margin-top: 14px; }
.quests > .box + .box { margin-top: 14px; }
.streak-box h2 span, .share-box h2 span { display: inline-flex; }
.streak-cal { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px 6px; }
.sd { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.sd-dot {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--s2); border: 1px solid var(--line); font: 600 11px var(--mono); color: var(--muted);
}
.sd-day { font-size: 10px; color: var(--muted); }
.sd.opened .sd-dot, .sd.opened.today .sd-dot { background: rgba(232, 67, 56, .9); border-color: transparent; color: #fff; }
.sd.missed .sd-dot { background: transparent; border-style: dashed; color: #5d5953; }
.sd.today .sd-dot { border: 2px solid var(--gold); color: var(--gold); }
.sd.bonus .sd-dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(245, 192, 75, .7); }
.sd.future .sd-dot { opacity: .7; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--s3); }
.lg.opened { background: var(--red); } .lg.missed { border: 1px dashed #5d5953; background: none; } .lg.today { border: 2px solid var(--gold); background: none; }
.lg.bonus { box-shadow: 0 0 0 2px rgba(245, 192, 75, .7); }
.steps { list-style: none; margin: 10px 0; padding: 0; counter-reset: st; display: grid; gap: 14px; }
.steps li { counter-increment: st; position: relative; padding-left: 34px; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--s3); color: var(--gold); font: 600 12px/24px var(--mono); text-align: center; }
.step-t { font-weight: 600; margin-bottom: 8px; }
.share-status { margin-top: 8px; font-size: 14px; }
.share-done p { margin-bottom: 10px; }
.share-link { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; margin-bottom: 8px; }
.share-link .mono { flex: 1; font-size: 13px; color: var(--gold3); }
.code-box .row, .share-box .row { align-items: stretch; }
.code-box .btn, .share-box .row .btn { flex: none; }
.elig { list-style: none; margin: 8px 0 10px; padding: 0; display: grid; gap: 8px; }
.elig li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #d6cdbf; }
.elig .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); flex: none; }
.elig li.ok .ic { background: rgba(94, 231, 178, .16); color: var(--mint); }
.elig li.bad .ic { background: rgba(232, 67, 56, .18); color: #ff8a80; }
.elig-reasons { margin: 0 0 10px; padding-left: 18px; color: #ff8a80; font-size: 14px; }

/* ===== Rules ===== */
.rules > .box { margin-top: 14px; }
.rules-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: #d6cdbf; }
.rules-list b { color: var(--cream); }
.odds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.odds { background: var(--s2); border-radius: 12px; padding: 10px 12px; }
.odds-t { font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; letter-spacing: .02em; }
.odds-r { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 2px 0; }
.odds-r.r-C span { color: #d9d1c3; } .odds-r.r-U span { color: var(--mint); } .odds-r.r-R span { color: #ff7468; }
.odds-r.r-SR span { color: #ae92ff; } .odds-r.r-UR span { color: var(--gold2); }
.odds-h { margin: 16px 0 0; color: var(--gold2); }
.fair h2 span { display: inline-flex; color: var(--mint); }
.verify { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.verify .row { align-items: stretch; }
.verify-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.verify-recent .chip-mini { border: 0; cursor: pointer; }
.verify-out { margin-top: 12px; }
.verify-head { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.verify-head.ok { color: var(--mint); } .verify-head.bad { color: #ff8a80; }
.verify-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.verify-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.verify-list .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; background: var(--s3); }
.verify-list li.ok .ic { background: rgba(94, 231, 178, .16); color: var(--mint); }
.verify-list li.bad .ic { background: rgba(232, 67, 56, .18); color: #ff8a80; }
.verify-list li.info { color: var(--muted); }
.notice { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(232, 67, 56, .1); border: 1px solid rgba(232, 67, 56, .35); color: #ffd9d4; font-weight: 500; }
.rules-foot { margin-top: 18px; }

/* ===== Admin ===== */
.admin .box { margin-top: 12px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.kv-i { background: var(--s2); border-radius: 10px; padding: 10px; }
.kv-v { font-size: 18px; color: var(--cream); }
.kv-k { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; gap: 10px; margin: 8px 0 12px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid label, .admin label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.admin .list li.dim { opacity: .5; }
.admin .list li.flagged { background: rgba(232, 67, 56, .06); }
.admin .list li { flex-wrap: wrap; }
.btn.export { justify-content: space-between; margin-top: 8px; }

/* ===== My XP sheet (§5.11) ===== */
.xp-big { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 12px; }
.xp-big .mono { font-size: 40px; font-weight: 500; letter-spacing: -.03em; color: var(--gold2); }
.xp-unit { font-size: 16px; color: var(--muted); font-weight: 600; }
.xp-breakdown { display: grid; gap: 6px; background: var(--s2); border-radius: 12px; padding: 10px 12px; }
.xp-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: #d6cdbf; }
.xp-next { margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 14px; color: var(--gold); background: rgba(233, 196, 106, .08); border: 1px dashed rgba(233, 196, 106, .35); }
.xp-h { margin: 16px 0 2px; }
.ledger li { font-size: 14px; padding: 8px 0; }
.land-xp { margin: -4px 0 0; color: var(--gold3); }
.event-preview { padding: 8px 10px; border-radius: 10px; background: var(--s2); color: var(--gold3); }

/* ===== /packs login guide (§12b) ===== */
.packs-guide { width: 100%; display: grid; gap: 10px; text-align: left; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.guide-lead { margin: 0; font-size: 16px; color: var(--cream); }
.guide-lead .cmd, .guide-steps b.mono { color: var(--gold2); background: rgba(245, 192, 75, .1); border: 1px solid rgba(245, 192, 75, .3); border-radius: 6px; padding: 1px 6px; font-weight: 500; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.guide-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #d6cdbf; }
.gs-n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font: 600 12px var(--mono); }
.guide-note { margin: 0; }
.link-expired { margin: 0; width: 100%; text-align: center; }
.login .packs-guide { margin-top: 6px; }

.golden-box .box-line { margin: 4px 0 10px; }
.formula { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--s2); }
.formula-t { font-weight: 600; margin-bottom: 8px; }
.formula b.mono { color: var(--gold2); font-weight: 500; }
