/* Daily check-in production styles, adapted from the approved Claude concept. */
.cib{position:relative;width:64px;height:64px;border-radius:18px;border:3px solid #D9A441;background:#fff;box-shadow:0 4px 0 #A97B24;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;color:#B8322E}
.cib svg{width:34px;height:34px}
.cib .bd{position:absolute;right:-9px;top:-11px;min-width:34px;padding:3px 6px;border-radius:999px;background:#B8322E;color:#fff;font:700 12px/1 Fredoka,sans-serif;box-shadow:0 2px 0 #7E1F1B;border:2px solid #fff}
.cib.we{background:linear-gradient(180deg,#FFF3C4,#FFD36B);border-color:#D9A441;box-shadow:0 4px 0 #A97B24,0 0 18px rgba(255,211,107,.9);color:#7E1F1B}
.cib.we .bd{background:#2A211B;color:#FFE08A;box-shadow:0 2px 0 #000}
.cib.done{background:#E8F3EC;border-color:#2F7A4F;box-shadow:0 4px 0 #1F4D3A;color:#1F6B45}
.cib.done .bd{background:#1F6B45;box-shadow:0 2px 0 #123b28}
.cib.lock{background:#EFE6D6;border-color:#C9B9A0;box-shadow:0 4px 0 #A89880;color:#6B5F55}
.cib.lock .bd{background:#6B5F55;box-shadow:none}
.cib.ready:not(.done):not(.lock){animation:ci-nudge 2.4s ease-in-out infinite}
@keyframes ci-nudge{0%,80%,100%{transform:none}86%{transform:rotate(-7deg)}92%{transform:rotate(7deg)}96%{transform:rotate(-3deg)}}

/* ---------- B. sheet / C. card ---------- */
.ci-sheet{background:#0F3A28;border-radius:24px 24px 0 0;padding:10px 16px 20px;box-shadow:0 0 0 3px #D9A441;color:#fff;position:relative;overflow:hidden}
.ci-sheet::before{content:"";display:block;width:44px;height:5px;border-radius:3px;background:rgba(255,255,255,.35);margin:0 auto 10px}
.ci-card{background:#F6EFE2;color:#2A211B;border-radius:18px;padding:16px 14px 16px;box-shadow:0 0 0 4px #1F4D3A,0 0 0 6px #D9A441,0 8px 0 6px rgba(0,0,0,.25)}
.ci-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.ci-head h3{font:700 20px/1.1 Fredoka,sans-serif;letter-spacing:.02em}
.ci-sheet .ci-head h3{color:#FFE08A}.ci-card .ci-head h3{color:#1F4D3A}
.ci-x{width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.14);color:#fff;font-size:22px;cursor:pointer;margin:-6px -6px -6px 0}
.ci-rule{font-size:12.5px;line-height:1.45;margin:4px 0 12px}
.ci-sheet .ci-rule{color:#D9EBDD}.ci-card .ci-rule{color:#5A4A3F}
.ci-rule b{white-space:nowrap}

.ci-strip{list-style:none;margin:0 0 12px;padding:0;display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.ci-day{position:relative;display:grid;grid-template-rows:auto 1fr auto;justify-items:center;align-items:center;gap:2px;min-height:78px;padding:6px 0 6px;border-radius:11px;background:#E9DCC4;color:#2A211B;box-shadow:inset 0 -3px 0 rgba(0,0,0,.14);text-align:center}
.ci-day .d{font:700 9.5px/1 'DM Sans',sans-serif;letter-spacing:.08em;color:#5A4A3F}
.ci-day b{font:700 15px/1 Fredoka,sans-serif;color:#1F4D3A}
.ci-day .st{font:700 8.5px/1 'DM Sans',sans-serif;letter-spacing:.04em;min-height:20px;display:flex;align-items:center;color:#5A4A3F}
.ci-day.we{background:linear-gradient(180deg,#FFF1BE,#F2C85F);box-shadow:inset 0 -3px 0 rgba(120,80,0,.25)}
.ci-day.we b{color:#7E1F1B}
.ci-day.we::after{content:"×2";position:absolute;top:-6px;right:-3px;padding:2px 4px;border-radius:999px;background:#B8322E;color:#fff;font:700 9px/1 Fredoka,sans-serif;box-shadow:0 1px 0 #7E1F1B}
.ci-day.done{background:#2F7A4F;color:#fff}.ci-day.done .d,.ci-day.done b,.ci-day.done .st{color:#fff}
.ci-day.done.we{background:#C79A2B}
.ci-day.miss{opacity:.55;background:#D8CDBA}.ci-day.miss b{text-decoration:line-through;text-decoration-thickness:2px}
.ci-day.today{outline:3px solid #B8322E;outline-offset:1px;z-index:1;transform:translateY(-3px)}
.ci-sheet .ci-day.today{outline-color:#fff}
.ci-day.today.open{animation:ci-pulse 1.6s ease-in-out infinite}
@keyframes ci-pulse{0%,100%{box-shadow:inset 0 -3px 0 rgba(0,0,0,.14),0 0 0 0 rgba(255,255,255,.7)}50%{box-shadow:inset 0 -3px 0 rgba(0,0,0,.14),0 0 0 7px rgba(255,255,255,0)}}
.ci-stamp-mark{width:22px;height:22px;border-radius:50%;border:2px solid #fff;display:flex;align-items:center;justify-content:center;transform:rotate(-12deg);background:rgba(255,255,255,.12)}
.ci-stamp-mark svg{width:12px;height:12px}
.ci-day.just .ci-stamp-mark{animation:ci-stamp .6s cubic-bezier(.2,1.5,.4,1)}
@keyframes ci-stamp{0%{opacity:0;transform:scale(3.4) rotate(-40deg)}55%{opacity:1}100%{transform:scale(1) rotate(-12deg)}}

.ci-status{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12.5px;margin:0 0 10px}
.ci-sheet .ci-status{color:#D9EBDD}.ci-card .ci-status{color:#5A4A3F}
.ci-status strong{font-family:Fredoka,sans-serif;font-size:14px}
.ci-sheet .ci-status strong{color:#FFE08A}.ci-card .ci-status strong{color:#1F4D3A}
.ci-btn{width:100%;min-height:58px;border:0;border-radius:16px;display:flex;align-items:center;justify-content:center;gap:10px;font:700 18px Fredoka,sans-serif;letter-spacing:.03em;cursor:pointer;background:#B8322E;color:#fff;box-shadow:0 4px 0 #7E1F1B}
.ci-btn:active:not(:disabled){transform:translateY(2px);box-shadow:0 2px 0 #7E1F1B}
.ci-btn .pts{padding:3px 10px;border-radius:999px;background:rgba(0,0,0,.25);font-size:15px}
.ci-btn.we{background:linear-gradient(180deg,#FFE08A,#E8A92B);color:#4A2A05;box-shadow:0 4px 0 #A97B24,0 0 22px rgba(255,211,107,.7)}
.ci-btn.we .pts{background:rgba(74,42,5,.18)}
.ci-btn.done{background:#1F6B45;box-shadow:0 4px 0 #123b28;cursor:default}
.ci-btn.login{background:#2F7A4F;box-shadow:0 4px 0 #1F4D3A}
.ci-btn[aria-busy="true"]{opacity:.7;cursor:progress}
.ci-err{margin-top:8px;font-size:13px;font-weight:700;color:#FFB4AE}.ci-card .ci-err{color:#9E2420}
.ci-week{margin-top:12px}
.ci-week .row{display:flex;justify-content:space-between;font-size:12px;margin-bottom:5px}
.ci-sheet .ci-week .row{color:#D9EBDD}.ci-card .ci-week .row{color:#5A4A3F}
.ci-bar{height:12px;border-radius:7px;background:rgba(0,0,0,.25);overflow:hidden}
.ci-card .ci-bar{background:#E9DCC4}
.ci-bar i{display:block;height:100%;border-radius:7px;background:linear-gradient(90deg,#7CFF5A,#FFD36B);transition:width .6s ease}
.ci-fine{margin-top:10px;font-size:11.5px;line-height:1.45;color:#B9D3C1}.ci-card .ci-fine{color:#6B5F55}

.ci-fly{position:absolute;left:50%;top:44%;translate:-50% -50%;font:700 54px/1 Fredoka,sans-serif;color:#FFE46B;-webkit-text-stroke:2px #6B3A07;paint-order:stroke fill;text-shadow:0 4px 0 #6B3A07,0 0 24px rgba(255,211,107,.9);pointer-events:none;animation:ci-fly 1.15s ease-out forwards;z-index:5}
.ci-card{position:relative;overflow:hidden}
@keyframes ci-fly{0%{opacity:0;transform:scale(.3)}22%{opacity:1;transform:scale(1.3)}60%{opacity:1;transform:scale(1) translateY(-10px)}100%{opacity:0;transform:scale(.9) translateY(-70px)}}
.ci-conf{position:absolute;left:50%;top:44%;width:8px;height:12px;border-radius:2px;pointer-events:none;z-index:4;animation:ci-conf .9s ease-out forwards}
@keyframes ci-conf{from{opacity:1;transform:translate(0,0) rotate(0)}to{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(var(--r))}}

@media (prefers-reduced-motion:reduce){.ci-surface *,.cib{animation:none!important;transition:none!important}}
@media (max-width:360px){.ci-day{min-height:72px}.ci-day b{font-size:13.5px}}

/* score + rank (check-in points count in the leaderboard score) */
.ci-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 10px}
.ci-stats div{border-radius:12px;padding:8px 12px;background:rgba(0,0,0,.28)}
.ci-card .ci-stats div{background:#E9DCC4}
.ci-stats dt{font:700 10px/1 'DM Sans',sans-serif;letter-spacing:.1em;color:#B9D3C1}.ci-card .ci-stats dt{color:#5A4A3F}
.ci-stats dd{margin:4px 0 0;font:700 22px/1 Fredoka,sans-serif;color:#FFE46B;display:flex;align-items:center;gap:8px}.ci-card .ci-stats dd{color:#1F4D3A}
.ci-stats .up{padding:3px 7px;border-radius:999px;background:#7CFF5A;color:#0B3A12;font:700 11px/1 'DM Sans',sans-serif;animation:ci-up .7s cubic-bezier(.2,1.5,.4,1)}
@keyframes ci-up{from{opacity:0;transform:translateY(8px) scale(.6)}}

/* Real-site wrapper: isolated from existing player sheets and rank cards. */
.cib[hidden],.ci-card[hidden]{display:none!important}
.cib:focus-visible,.ci-surface button:focus-visible{outline:3px solid #fff;outline-offset:3px}
.ci-card button:focus-visible{outline-color:#1F4D3A}
.ci-card{margin:0 0 12px;font-family:'DM Sans',sans-serif}
.ci-surface *{box-sizing:border-box}.ci-head h3{margin:0}
.ci-dialog{padding:0;border:0;background:transparent;width:min(94vw,500px);max-width:500px;max-height:calc(100dvh - 24px);overflow:auto;color:#fff;border-radius:24px}
.ci-dialog::backdrop{background:rgba(3,10,7,.8)}
.ci-dialog:not([open]){display:none}
.ci-dialog .ci-sheet{border:3px solid #D9A441;box-shadow:none;border-radius:24px;overflow:hidden;padding:14px 16px 24px}
.ci-x{flex-shrink:0}
.ci-stats dd{overflow-wrap:anywhere;line-height:1.2;flex-wrap:wrap}
.ci-day.unavailable{opacity:.6}.ci-day.unavailable b{text-decoration:line-through}
.ci-day.miss{opacity:1;background:#D8CDBA}
.ci-card .ci-day.done.we{background:#7B5915}
.ci-status{flex-wrap:wrap}.ci-err{overflow-wrap:anywhere}
@media(max-width:360px){.ci-card{padding:14px 9px}.ci-dialog .ci-sheet{padding:12px 10px 22px}.ci-day .d{font-size:9px}.ci-day .st{font-size:7px;letter-spacing:0}.ci-btn{font-size:16px;gap:5px}}
@media(max-width:600px){.ci-dialog{margin:auto auto 8px;border-radius:24px 24px 0 0}}
@media(prefers-reduced-motion:reduce){.ci-surface *,.cib{animation:none!important;transition:none!important}.ci-fly,.ci-conf{display:none!important}}
