/* Retention UI (RETENTION agent): streak pill, daily banner, post-game panel, share buttons, prompts,
   daily page, hall of fame, share page, calendar, league. Uses the design tokens from style.css. */

/* ---------- header streak pill ---------- */
.np-streak-pill { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.8); font: 800 14px var(--font-display); text-decoration: none; flex: none; }
.np-streak-pill:hover { background: rgba(255,255,255,.12); color: #fff; }
.np-streak-pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.np-streak-pill.is-lit { color: #fff; }
.np-streak-pill.is-lit svg { fill: var(--hot); stroke: var(--hot); }
.np-streak-pill .np-sp-fr { display: inline-flex; align-items: center; gap: 1px; font-style: normal; font-size: 11px; color: #9fd4ff; }
.np-streak-pill .np-sp-fr svg { width: 12px; height: 12px; stroke: #9fd4ff; }
.np-streak-pill .np-sp-d { font: 700 11px var(--font-body); color: rgba(255,255,255,.55); padding-left: 6px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.15); }
@media (max-width: 760px) { .np-streak-pill { height: 36px; padding: 0 9px 0 8px; } .np-streak-pill .np-sp-d, .np-streak-pill .np-sp-fr { display: none; } }

/* ---------- daily banner on game pages ---------- */
.np-daily-banner { margin-top: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--ink); color: #fff; display: grid; gap: 6px; }
.np-db-main { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.np-db-kicker { font: 800 12px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--volt); }
.np-db-txt { font-size: 15px; color: rgba(255,255,255,.85); }
.np-db-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.np-db-links a { color: rgba(255,255,255,.7); text-decoration: underline; text-underline-offset: 2px; }
.np-db-ch { font-size: 16px; color: #fff; }
.np-db-ch b { color: var(--volt); }
.np-db-note { font-size: 13.5px; color: rgba(255,255,255,.7); }
body.np-daily .toolbar-mode { display: none !important; }

/* ---------- post-game panel (inside the game's .win-box) ---------- */
.np-ret-panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); text-align: center; display: grid; gap: 10px; }
.np-ret-panel .np-rp-mini { display: grid; gap: 8px; }
.np-rp-head { font: 800 18px var(--font-display); }
.np-rp-rank { font-size: 16px; }
.np-rp-rank b { color: var(--accent); }
.np-rp-rank small { color: var(--text-muted); margin-left: 4px; }
.np-rp-streak { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 800 17px var(--font-display); color: var(--text); }
.np-rp-streak svg { width: 22px; height: 22px; fill: var(--hot); stroke: var(--hot); stroke-width: 2; }
.np-rp-note { font-size: 13.5px; color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.np-rp-note svg { width: 15px; height: 15px; fill: none; stroke: var(--sky); stroke-width: 2; }
.np-rp-league { font-size: 15px; color: var(--text-dim); }
.np-rp-league b { color: var(--text); }
.np-rp-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.np-badge-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font: 700 13px var(--font-body); text-decoration: none; }
.np-rp-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.np-rp-vs > div { background: var(--bg-panel); border-radius: 12px; padding: 10px 6px; }
.np-rp-vs small { display: block; color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-rp-vs b { font: 800 18px var(--font-display); }
.np-rp-sharelbl { font: 700 13px var(--font-body); color: var(--text-dim); }
.np-rp-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; font-size: 14px; color: var(--text-dim); }
.np-rp-foot b { color: var(--text); font-variant-numeric: tabular-nums; }
.np-rp-mind { font-size: 12.5px; color: var(--text-muted); }

/* ---------- share buttons ---------- */
.np-share { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.np-sh { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font: 700 15px var(--font-body); text-decoration: none; cursor: pointer; flex: 1 1 auto; }
.np-sh-wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.np-sh-fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.np-sh:hover { filter: brightness(1.05); }

/* ---------- toast + reminder prompt ---------- */
.np-ret-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 6500; background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
  box-shadow: var(--shadow-3); border-radius: 16px; padding: 12px 16px; max-width: min(92vw, 420px); display: grid; gap: 6px; text-align: center; animation: fadeUp .25s ease both; }
.np-ret-toast.out { opacity: 0; transition: opacity .35s; }
.np-ask { position: fixed; right: 16px; bottom: 16px; z-index: 6400; width: min(360px, calc(100vw - 32px)); background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-3); padding: 18px 18px 14px; animation: fadeUp .25s ease both; }
.np-ask-t { font: 800 18px var(--font-display); padding-right: 24px; margin-bottom: 6px; }
.np-ask p { font-size: 15px; color: var(--text-dim); margin-bottom: 10px; }
.np-ask-h { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.np-ask select, [data-np-push] select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 15px; }
.np-ask-b { display: flex; gap: 8px; flex-wrap: wrap; }
.np-ask-x { position: absolute; right: 10px; top: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--bg-panel); color: var(--text-dim); font-size: 20px; cursor: pointer; }
@media (max-width: 520px) { .np-ask { right: 12px; left: 12px; bottom: 12px; width: auto; } }

/* ---------- shared page bits ---------- */
.np-wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px 56px; }
.np-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px; }
.np-card h2 { font-size: 22px; margin-bottom: 10px; }
.np-muted { color: var(--text-dim); }
.np-kicker { font: 800 12px var(--font-body); letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }

/* ---------- /daily/ ---------- */
.np-dhero { background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: clamp(20px, 4vw, 34px); margin-bottom: 16px; position: relative; overflow: hidden; isolation: isolate; }
.np-dhero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 120% at 100% 0%, rgba(212,255,58,.2), transparent 60%), radial-gradient(40% 100% at 0% 100%, rgba(15,107,71,.55), transparent 60%); }
.np-dhero .np-kicker { color: var(--volt); }
.np-dhero h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.05; margin: 6px 0 8px; letter-spacing: -.03em; }
.np-dhero p { color: rgba(255,255,255,.78); font-size: 17px; max-width: 640px; }
.np-dstats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.np-dstat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 10px 14px; min-width: 120px; }
.np-dstat b { display: block; font: 800 24px var(--font-display); }
.np-dstat span { font-size: 13px; color: rgba(255,255,255,.65); }
.np-dlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin-bottom: 16px; }
.np-dg { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; color: var(--text); text-decoration: none; transition: .15s; }
.np-dg:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.np-dg img { width: 96px; aspect-ratio: 16/10; border-radius: 10px; object-fit: cover; background: var(--bg-panel); }
.np-dg h3 { font-size: 19px; margin-bottom: 2px; }
.np-dg p { font-size: 14px; color: var(--text-dim); }
.np-dg .np-dg-st { margin-top: 6px; font: 700 14px var(--font-body); display: inline-flex; align-items: center; gap: 6px; }
.np-dg .np-dg-st.todo { color: var(--accent); }
.np-dg .np-dg-st.done { color: var(--green); }
.np-dg.is-done { background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)), var(--bg-card); }
.np-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .np-two { grid-template-columns: 1fr; } .np-dg { grid-template-columns: 80px 1fr; } .np-dg img { width: 80px; } }
.np-email { display: grid; gap: 10px; }
.np-email .np-em-row { display: flex; gap: 8px; flex-wrap: wrap; }
.np-email input[type=email] { flex: 1 1 220px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font-size: 17px; }
.np-email label.np-em-c { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text-dim); }
.np-email label.np-em-c input { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.np-em-msg { font-size: 14px; color: var(--red); min-height: 18px; }
.np-em-ok { font-size: 16px; color: var(--green); font-weight: 700; }
.np-small { font-size: 13px; color: var(--text-muted); }

/* ---------- tables (hall of fame, league) ---------- */
.np-t { width: 100%; border-collapse: collapse; font-size: 15px; }
.np-t th { text-align: left; font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px; }
.np-t td { padding: 9px 8px; border-top: 1px solid var(--border); }
.np-t td.n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.np-t td.r { width: 34px; color: var(--text-muted); font-weight: 800; }
.np-t tr.me td { background: var(--accent-soft); }
.np-t tr.up td.r { color: var(--green); }
.np-t tr.down td.r { color: var(--red); }
.np-t a { color: inherit; font-weight: 650; }
.np-hof { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.np-scroll { overflow-x: auto; }

/* ---------- calendar + badges (profile) ---------- */
.np-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 420px; }
.np-cal span { aspect-ratio: 1; border-radius: 6px; background: var(--bg-panel); display: grid; place-items: center; font-size: 11px; color: var(--text-muted); }
.np-cal span.p { background: #9fd36a; color: #10300a; }
.np-cal span.d { background: var(--green); color: #fff; font-weight: 800; }
.np-cal span.f { background: #cfe8ff; color: #0b4a85; }
.np-cal span.t { outline: 2px solid var(--text); outline-offset: 1px; }
.np-cal span.h { visibility: hidden; }
.np-cal-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-dim); margin-top: 8px; }
.np-cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.np-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.np-badge { border: 1px solid var(--border); border-radius: 14px; padding: 12px; text-align: center; background: var(--bg); }
.np-badge.off { opacity: .45; filter: grayscale(1); }
.np-badge .ic { font-size: 28px; }
.np-badge b { display: block; font-size: 14px; margin-top: 4px; }
.np-badge small { display: block; font-size: 12px; color: var(--text-dim); }
.np-badge a { font-size: 12px; font-weight: 700; color: var(--accent); }
.np-league-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.np-tier { font: 800 13px var(--font-body); padding: 3px 10px; border-radius: 999px; background: var(--bg-panel); }
.np-tier.t1 { background: #f0d2b4; color: #5a3212; } .np-tier.t2 { background: #e3e8ef; color: #2b3546; } .np-tier.t3 { background: #ffe39a; color: #5a4300; }
.np-tier.t4 { background: #d6f3f0; color: #0d4d47; } .np-tier.t5 { background: #dcd6ff; color: #2c1f86; }

/* ---------- share page ---------- */
.np-share-page { max-width: 760px; margin: 0 auto; padding: 24px 16px 56px; text-align: center; }
.np-share-page img.np-cert { width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-2); margin: 16px 0; background: var(--ink); }
.np-share-page h1 { font-size: clamp(26px, 5vw, 38px); letter-spacing: -.02em; }
.np-share-page .np-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0 22px; }

/* Narrow phones: the streak pill takes the theme toggle's place in the header; the toggle moves into the mobile menu */
.np-mnav-theme { display: none !important; }
@media (max-width: 430px) {
  .hdr-right:has(> .np-streak-pill) > .theme-toggle { display: none; }
  .mobile-nav .np-mnav-theme { display: flex !important; }
  .np-streak-pill { padding: 0 8px 0 7px; gap: 3px; }
}
