/* The People's List — uses the Listerpedia theme's tokens, with fallbacks for any other theme. */

.lppl {
	--lppl-ink: var(--ink, #1B1340);
	--lppl-ink-2: var(--ink-2, #4A4370);
	--lppl-paper: var(--paper, #fff);
	--lppl-bg: var(--bg, #F4F2FB);
	--lppl-accent: var(--violet, #6A3DFF);
	--lppl-sun: var(--sun, #FFD23F);
	--lppl-bw: var(--bw, 2px);
	--lppl-display: var(--f-display, "Arial Black", system-ui, sans-serif);

	margin: 3em 0 !important;
	padding: clamp(20px, 4vw, 36px);
	background: var(--lppl-paper);
	color: var(--lppl-ink);
	border: var(--lppl-bw) solid var(--lppl-ink);
	border-radius: var(--r-xl, 28px);
	box-shadow: 10px 10px 0 var(--lppl-accent);
	font-size: 1rem;
	line-height: 1.55;
	scroll-margin-top: calc(var(--header-h, 0px) + 20px);
}
.lppl *, .lppl *::before, .lppl *::after { box-sizing: border-box; }
.lppl p { margin: 0 0 .75em; }
.lppl strong { font-weight: 700; }
.lppl ol, .lppl ul { list-style: none; margin: 0; padding: 0; }
.lppl li { margin: 0; padding: 0; }
.lppl li::before, .lppl li::marker { content: none; }

.lppl-head { margin-bottom: 1.25em; max-width: 46em; }
.lppl-kicker {
	display: inline-block; margin: 0 0 .75em !important;
	padding: .3em .8em; border: var(--lppl-bw) solid var(--lppl-ink); border-radius: 999px;
	background: var(--lppl-sun); font-family: var(--lppl-display); font-weight: 800; font-size: .8rem;
	letter-spacing: .08em; text-transform: uppercase;
}
.lppl .lppl-title { margin: 0 0 .35em; font-family: var(--lppl-display); font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.05; }
.lppl-intro { font-size: 1.08rem; color: var(--lppl-ink-2); }

.lppl-app { min-height: 22rem; container-type: inline-size; }
.lppl-loading, .lppl-note { color: var(--lppl-ink-2); }

/* Tabs */
.lppl-tabs { display: flex; gap: .5em; flex-wrap: wrap; margin-bottom: 1.25em; }
.lppl-tab {
	min-height: 44px; padding: .55em 1.1em; cursor: pointer;
	border: var(--lppl-bw) solid var(--lppl-ink); border-radius: 999px;
	background: var(--lppl-paper); color: var(--lppl-ink);
	font-family: var(--lppl-display); font-weight: 700; font-size: .95rem;
}
.lppl-tab[aria-selected="true"] { background: var(--lppl-ink); color: #fff; }
.lppl-tab[aria-selected="true"]::before { content: "● "; }

.lppl .lppl-sub {
	display: flex; align-items: baseline; justify-content: space-between; gap: .5em; flex-wrap: wrap;
	margin: 0 0 .6em; font-family: var(--lppl-display); font-size: 1.15rem;
}
.lppl-count, .lppl-hint, .lppl-meta { font-family: inherit; font-size: .9rem; font-weight: 500; color: var(--lppl-ink-2); }
.lppl-hint { margin-top: .6em !important; }

/* Picker */
.lppl-pick { display: grid; gap: 1.5em; grid-template-columns: 1fr; }
@container (min-width: 600px) { .lppl-pick { grid-template-columns: 1fr 1fr; } }

.lppl-slots, .lppl-myrank { display: grid; gap: .5em; }
.lppl-slot {
	display: flex; align-items: center; gap: .75em; min-height: 54px; padding: .45em .5em .45em .45em;
	border: var(--lppl-bw) solid var(--lppl-ink); border-radius: var(--r-sm, 12px); background: var(--lppl-paper);
}
.lppl-slot.is-empty { border-style: dashed; background: var(--lppl-bg); color: var(--lppl-ink-2); }
.lppl-slot.is-filled { box-shadow: 3px 3px 0 var(--lppl-ink); }
.lppl-slots .lppl-slot.is-filled { cursor: grab; user-select: none; -webkit-user-select: none; }
.lppl-slots .lppl-slot.is-filled .lppl-rank { touch-action: none; }
.lppl-slot.is-dragging { position: relative; z-index: 2; cursor: grabbing; box-shadow: 6px 6px 0 var(--lppl-accent); }
.lppl-rank {
	flex: none; display: grid; place-items: center; width: 2.2em; height: 2.2em;
	border-radius: 10px; background: var(--lppl-ink); color: #fff;
	font-family: var(--lppl-display); font-weight: 800; font-size: 1rem;
}
.lppl-slot.is-empty .lppl-rank { background: transparent; color: var(--lppl-ink-2); border: var(--lppl-bw) dashed currentColor; }
.lppl-slot-label { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: break-word; min-width: 0; }
.lppl-tools { flex: none; display: flex; gap: .25em; }
.lppl-tool {
	display: grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer;
	border: var(--lppl-bw) solid var(--lppl-ink); border-radius: 10px; background: var(--lppl-paper); color: var(--lppl-ink);
}
.lppl-tool:hover:not([disabled]) { background: var(--lppl-sun); }
.lppl-tool[disabled] { opacity: .3; cursor: default; }

.lppl-choices { display: grid; gap: .5em; }
.lppl-choice {
	display: flex; align-items: center; gap: .75em; width: 100%; min-height: 50px; padding: .45em .8em .45em .45em;
	text-align: left; cursor: pointer; font-weight: 600;
	border: var(--lppl-bw) solid var(--lppl-ink); border-radius: var(--r-sm, 12px); background: var(--lppl-paper); color: var(--lppl-ink);
	transition: transform .15s, box-shadow .15s;
}
.lppl-choice:hover:not([aria-disabled="true"]) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--lppl-ink); }
.lppl-choice.is-picked { background: var(--lppl-sun); }
.lppl-choice[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.lppl-mark {
	flex: none; display: grid; place-items: center; min-width: 2.2em; height: 2.2em; padding: 0 .3em;
	border: var(--lppl-bw) solid var(--lppl-ink); border-radius: 10px;
	font-family: var(--lppl-display); font-weight: 800;
}
.lppl-choice.is-picked .lppl-mark { background: var(--lppl-ink); color: #fff; }
.lppl-choice-label { flex: 1; min-width: 0; overflow-wrap: break-word; min-width: 0; }

.lppl-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Actions */
.lppl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75em 1.25em; margin: 1.5em 0 0 !important; }
.lppl .lppl-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 2px 2px 0 var(--lppl-ink); }
.lppl-btn:not(.lp-btn) { /* Fallback when the theme has no .lp-btn */
	min-height: 46px; padding: .7em 1.25em; border: var(--lppl-bw) solid var(--lppl-ink); border-radius: 12px;
	background: var(--lppl-sun); color: var(--lppl-ink); font-weight: 700; cursor: pointer; box-shadow: 4px 4px 0 var(--lppl-ink);
}
.lppl-link {
	min-height: 44px; padding: 0 .1em; border: 0; background: none; cursor: pointer;
	color: var(--lppl-ink); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.lppl-link:hover { text-decoration-color: var(--lppl-accent); }
.lppl-confirm-withdraw { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25em 1em; font-weight: 600; }

/* Confirmation */
.lppl-confirm { font-size: 1.05rem; }
.lppl-compare {
	flex: none; padding: .2em .6em; border: var(--lppl-bw) solid var(--lppl-ink); border-radius: 999px;
	font-size: .8rem; font-weight: 700; white-space: nowrap;
}

/* Community ranking */
.lppl-empty { padding: 1.25em; border: var(--lppl-bw) dashed var(--lppl-ink); border-radius: var(--r-md, 16px); background: var(--lppl-bg); }
.lppl-empty p:last-child { margin-bottom: 0; }
.lppl-board { display: grid; gap: .5em; margin-top: .5em; }
.lppl-row {
	display: flex; align-items: center; gap: .75em; padding: .55em .75em .55em .55em;
	border: var(--lppl-bw) solid var(--lppl-ink); border-radius: var(--r-sm, 12px); background: var(--lppl-paper);
}
.lppl-row:first-child { background: var(--lppl-sun); box-shadow: 3px 3px 0 var(--lppl-ink); }
.lppl-row-main { flex: 1; min-width: 0; display: grid; gap: .35em; }
.lppl-row-label { font-weight: 700; overflow-wrap: break-word; min-width: 0; }
.lppl-bar { display: block; height: 8px; border-radius: 99px; background: var(--lppl-bg); border: 1px solid var(--lppl-ink); overflow: hidden; }
.lppl-bar > span { display: block; height: 100%; background: var(--lppl-accent); }
.lppl-pts { flex: none; width: 10.5em; text-align: right; font-family: var(--lppl-display); font-weight: 800; line-height: 1.2; }
.lppl-pts small { display: block; font-family: inherit; font-weight: 500; font-size: .75rem; color: var(--lppl-ink-2); }
@container (max-width: 440px) {
	.lppl-slot.is-filled { flex-wrap: wrap; row-gap: .4em; }
	.lppl-slot.is-filled .lppl-slot-label { flex-basis: calc(100% - 3em); }
	.lppl-slots .lppl-tools { width: 100%; justify-content: flex-end; }
	.lppl-compare { margin-left: 2.95em; }
	.lppl-row { flex-wrap: wrap; }
	.lppl-pts { width: 100%; text-align: left; padding-left: 2.95em; }
	.lppl-pts small { display: inline; margin-left: .4em; }
}

.lppl-how { margin-top: 1.25em; padding-top: 1em; border-top: var(--lppl-bw) solid var(--lppl-bg); }
.lppl-how summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.lppl-how p { color: var(--lppl-ink-2); font-size: .95rem; }

/* Sharing */
.lppl-share {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75em 1.25em;
	margin-top: 1.75em; padding-top: 1.25em; border-top: var(--lppl-bw) solid var(--lppl-ink);
}
.lppl-share p { margin: 0; }
.lppl-share-btns { display: flex; gap: .5em; flex-wrap: wrap; }
.lppl-chip {
	display: inline-flex; align-items: center; gap: .45em; min-height: 44px; padding: .5em 1em; cursor: pointer;
	border: var(--lppl-bw) solid var(--lppl-ink); border-radius: 999px; background: var(--lppl-paper); color: var(--lppl-ink); font-weight: 700;
}
.lppl-chip:hover { background: var(--lppl-sun); }

.lppl-status:not(:empty) {
	margin: 1em 0 0; padding: .6em .9em; border-radius: 10px; background: var(--lppl-bg); font-weight: 600;
}

.lppl :focus-visible { outline: 3px solid var(--lppl-accent); outline-offset: 3px; }
.lppl .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.lppl-choice, .lppl .lp-btn { transition: none; }
}
