/* PlayNimbo puzzle shell v3 — shared by all daily games */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");
:root {
	--bg: #ffffff;
	--panel: #f5f6fb;
	--card: #ffffff;
	--ink: #0f172a;
	--ink-2: #334155;
	--muted: #64748b;
	--line: #e5e8f1;
	--cell: #ffffff;
	--cell-line: #dfe3ee;
	--accent: #6366f1;
	--accent-ink: #4338ca;
	--accent-soft: #eef0ff;
	--brand: var(--accent);
	--ok: #10b981;
	--danger: #ef4444;
	--gold: #f59e0b;
	--grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #8b5cf6 100%);
	--radius: 16px;
	--shadow: 0 20px 50px rgba(15, 23, 42, .18);
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #141b30; --panel: #252f55; --card: #19213a; --ink: #e8ecf6; --ink-2: #c3cbe0; --muted: #8f9bb8;
		--line: #2a3352; --cell: #1f2844; --cell-line: #2f3a5c; --accent-soft: #232a5c; --accent-ink: #a5b4fc;
		--shadow: 0 20px 50px rgba(0, 0, 0, .55); color-scheme: dark;
	}
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
.pz { max-width: 660px; margin: 0 auto; padding: 16px 14px 22px; }

/* top bar */
.pz-top { display: flex; align-items: center; gap: 10px; }
.pz-title { flex: 1 1 auto; min-width: 0; }
.pz-title h1 { font-size: 1.2rem; margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.pz-title p { margin: 2px 0 0; font-size: .84rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
.pz--embedded .pz-title h1 { display: none; }
.pz--embedded .pz-title p { font-size: .9rem; color: var(--ink); font-weight: 700; margin: 0; }
.pz-level { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: .76rem; font-weight: 800; }
.pz-dots { display: inline-flex; gap: 3px; }
.pz-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .25; }
.pz-dots i.on { opacity: 1; }
.pz-timer { font-variant-numeric: tabular-nums; font-weight: 800; background: var(--panel); border-radius: 12px; padding: 8px 12px; font-size: .98rem; min-width: 64px; text-align: center; }
.pz-icons { display: flex; gap: 6px; }
.pz-icon { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--panel); display: grid; place-items: center; color: var(--ink-2); transition: background .15s, color .15s, transform .1s; }
.pz-icon:hover { background: var(--accent-soft); color: var(--accent-ink); }
.pz-icon:active { transform: scale(.94); }
.pz-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* mode tabs */
.pz-tabs { display: flex; gap: 4px; background: var(--panel); border-radius: 14px; padding: 4px; margin: 14px 0 12px; }
.pz-tab { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 9px 6px; font-weight: 700; font-size: .9rem; color: var(--muted); transition: background .15s, color .15s; }
.pz-tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.1); }
.pz-sub { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 0 0 14px; }
.pz-chip { border: 0; background: var(--panel); border-radius: 999px; padding: 7px 13px; font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.pz-chip[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* board */
.pz-board { display: flex; justify-content: center; user-select: none; -webkit-user-select: none; touch-action: none; padding: 4px 0; }
.pz-controls { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pz-btn { border: 0; border-radius: 14px; padding: 12px 20px; font-weight: 800; font-size: .95rem; background: var(--panel); color: var(--ink); transition: transform .1s, filter .15s; }
.pz-btn:active { transform: translateY(1px); }
.pz-btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.pz-btn--primary:hover { filter: brightness(1.07); }
.pz-btn--accent { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(99,102,241,.35); }
.pz-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.pz-note { text-align: center; color: var(--muted); font-size: .86rem; margin: 12px 0 0; }

.pz-solved { text-align: center; margin-top: 16px; }
.pz-solved strong { display: block; font-size: 1.1rem; }
.pz-win-pop { animation: pzpop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pzpop { 0% { transform: scale(1); } 40% { transform: scale(1.035); } 100% { transform: scale(1); } }

/* modal */
.pz-modal { position: fixed; inset: 0; background: rgba(10, 15, 30, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: pzfade .15s ease-out; }
.pz--embedded-modal { align-items: start; padding-top: 14px; }
.pz-modal[hidden] { display: none; }
.pz-dialog { background: var(--card); color: var(--ink); border-radius: 24px; box-shadow: var(--shadow); width: 100%; max-width: 430px; max-height: calc(100vh - 32px); overflow: auto; padding: 26px 22px 22px; position: relative; animation: pzrise .22s cubic-bezier(.2,.9,.3,1.1); }
.pz-dialog h2 { margin: 0 0 10px; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.pz-dialog p, .pz-dialog li { line-height: 1.55; color: var(--ink-2); }
.pz-dialog ul { padding-left: 20px; }
.pz-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--panel); font-size: 1.2rem; line-height: 1; color: var(--muted); }
@keyframes pzfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pzrise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.pz-result-head { text-align: center; }
.pz-result-head .big { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 20px; background: var(--grad); display: grid; place-items: center; font-size: 2rem; box-shadow: 0 12px 28px rgba(99,102,241,.4); }
.pz-result-head .stars { font-size: 1.5rem; letter-spacing: 4px; margin: 4px 0; }
.pz-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0; text-align: center; }
.pz-stats div { background: var(--panel); border-radius: 14px; padding: 11px 4px; }
.pz-stats b { display: block; font-size: 1.3rem; font-weight: 800; }
.pz-stats span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.pz-next { text-align: center; color: var(--muted); font-size: .9rem; margin: 6px 0 14px; }
.pz-next b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pz-actions { display: grid; gap: 8px; }
.pz-actions .pz-btn { width: 100%; }
.pz-set { list-style: none; padding: 0 !important; margin: 14px 0 0; display: grid; gap: 6px; }
.pz-set a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); background: var(--panel); padding: 10px 12px; border-radius: 14px; font-weight: 700; }
.pz-set a img { width: 32px; height: 32px; border-radius: 9px; }
.pz-set a span { flex: 1; }
.pz-set a:hover { background: var(--accent-soft); }
.pz-set small { color: var(--muted); font-weight: 700; }
.pz-set small.done { color: var(--ok); }

.pz-archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.pz-archive button { border: 0; background: var(--panel); border-radius: 12px; padding: 9px 4px; font-size: .82rem; font-weight: 800; color: var(--ink); }
.pz-archive button.done { background: color-mix(in srgb, var(--ok) 16%, var(--panel)); color: var(--ok); }
.pz-archive button small { display: block; color: var(--muted); font-weight: 600; }

.pz-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 700; font-size: .9rem; z-index: 60; box-shadow: var(--shadow); }

/* confetti */
.pz-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }

@media (max-width: 420px) {
	.pz { padding: 12px 10px 16px; }
	.pz-icon { width: 36px; height: 36px; border-radius: 11px; }
	.pz-icons { gap: 4px; }
	.pz-timer { padding: 7px 9px; min-width: 56px; font-size: .92rem; }
	.pz-title h1 { font-size: 1.05rem; }
}
