/**
 * Prediktos 13: coupon game styles.
 *
 * Everything is scoped under .p13 (the page, the tip-page box and the home
 * card all carry it). Panels, text and borders take the theme's tokens
 * (--tp-card, --tp-border, …), so they match every other page in both themes;
 * the coupon paper and the jackpot stamp keep the approved game design.
 */

/* Tokens ------------------------------------------------------------------ */

.p13 {
	--p13-bg: var(--tp-background, #0b1016);
	--p13-panel: var(--tp-card, #141b24);
	--p13-panel-2: var(--tp-background, #0b1016);
	--p13-border: var(--tp-border, rgba(255, 255, 255, 0.1));
	--p13-border-2: var(--tp-border-strong, rgba(255, 255, 255, 0.2));
	--p13-text: var(--tp-foreground, #e8eaf0);
	--p13-soft: #cbd5e1;
	--p13-muted: var(--tp-muted, #94a3b8);
	--p13-accent: #10b981;
	--p13-on-accent: #04281b;
	--p13-accent-text: #34d399;
	--p13-accent-soft: #6ee7b7;
	--p13-red: #c2412d;
	--p13-on-red: #fff5f1;
	--p13-red-bg: #1a120f;
	--p13-red-avatar: #3a2018;
	--p13-red-text: #f08a75;
	--p13-red-soft: #ffe3db;
	--p13-red-muted: #f0b9ac;
	--p13-paper: #f4f0e6;
	--p13-paper-2: #eae4d4;
	--p13-paper-box: #fbf9f3;
	--p13-ink: #0b6b4f;
	--p13-ink-text: #1c2a23;
	--p13-ink-soft: #3c4b43;
	--p13-line: #d9d2c1;
	--p13-paper-muted: #5b6b62;
	--p13-box-line: #9db7a9;
	--p13-draw: #a8a08c;
	--p13-head: "Barlow Condensed", "Arial Narrow", sans-serif;
	--p13-mono: "IBM Plex Mono", ui-monospace, monospace;
	--p13-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

	font-family: var(--p13-body);
	color: var(--p13-text);
	background: var(--p13-bg);
	line-height: 1.5;
}

html.tipsterpro-light .p13 {
	--p13-soft: #334155;
	--p13-accent-text: #047857;
	--p13-accent-soft: #047857;
	--p13-red-bg: #fff1ec;
	--p13-red-avatar: #ffd9cc;
	--p13-red-text: #b23a27;
	--p13-red-soft: #7a2a1d;
	--p13-red-muted: #9a3b2a;
}

.p13 *,
.p13 *::before,
.p13 *::after {
	box-sizing: border-box;
}

.p13 p,
.p13 h1,
.p13 h2,
.p13 h3,
.p13 dl,
.p13 dd,
.p13 ol,
.p13 ul {
	margin: 0;
}

.p13 a {
	color: var(--p13-accent-text);
	text-decoration: none;
}

.p13 a:hover {
	color: var(--p13-accent-soft);
}

.p13 button {
	font-family: inherit;
	cursor: pointer;
}

.p13 button:disabled {
	cursor: default;
}

/* Busy while a request runs: still focusable, unlike disabled (p13-challenges.js). */
.p13 [aria-disabled="true"] {
	cursor: progress;
	opacity: 0.7;
}

.p13 :focus-visible {
	outline: 2px solid var(--p13-accent);
	outline-offset: 2px;
}

/* Page frame -------------------------------------------------------------- */

/* On its own page the game sits on the theme's background, inside the
   theme's page frame (.inside-article: the width and gutters of every page). */
.p13-page .p13,
.p13-tipbox-wrap.p13,
.p13-home-wrap.p13 {
	background: transparent;
}

.p13-page .p13 {
	min-height: 60vh;
}

.p13-page .p13-wrap {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

/* The page's own text (the page behind /13/), under the game. */
.p13-about {
	margin-top: 3rem;
}

.p13-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

/* Card label, as on the site's other cards. */
.p13 .p13-h2 {
	font-family: inherit;
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	line-height: 1.3;
	color: var(--p13-accent-text);
}

/* Section heading (the leaderboard, an empty state). */
.p13 .p13-h2--lg {
	font-size: 1.25rem;
	letter-spacing: normal;
	text-transform: none;
	color: var(--p13-text);
}

.p13-muted {
	font-size: 12px;
	color: var(--p13-muted);
}

.p13-note {
	font-size: 12px;
	color: var(--p13-muted);
}

.p13-empty {
	flex: 999 1 640px;
	background: var(--p13-panel);
	border: 1px solid var(--p13-border);
	border-radius: var(--tp-radius, 10px);
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: var(--p13-soft);
}

/* Buttons ----------------------------------------------------------------- */

.p13-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	border: 0;
	border-radius: 10px;
	padding: 10px 16px;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	text-align: center;
	background: var(--p13-accent);
	color: var(--p13-on-accent);
}

.p13 a.p13-btn,
.p13 a.p13-btn:hover {
	color: var(--p13-on-accent);
}

.p13 a.p13-btn--secondary,
.p13 a.p13-btn--secondary:hover {
	color: var(--p13-text);
}

.p13 a.p13-btn--outline,
.p13 a.p13-btn--outline:hover {
	color: var(--p13-accent-soft);
}

.p13 a.p13-btn--red,
.p13 a.p13-btn--red:hover {
	color: var(--p13-on-red);
}

.p13 a.p13-btn--ghost,
.p13 a.p13-btn--ghost:hover {
	color: var(--p13-red-muted);
}

.p13-btn--block {
	width: 100%;
	font-size: 15px;
	padding: 14px;
}

.p13-btn--muted,
.p13-btn:disabled {
	background: var(--p13-border);
	color: var(--p13-muted);
}

.p13-btn--secondary {
	background: var(--p13-border);
	color: var(--p13-text);
	font-weight: 600;
}

.p13-btn--outline {
	background: transparent;
	color: var(--p13-accent-soft);
	border: 1px solid var(--p13-border-2);
	font-weight: 600;
	font-size: 13px;
	min-height: 36px;
	padding: 6px 12px;
	border-radius: 8px;
}

.p13-btn--red {
	background: var(--p13-red);
	color: var(--p13-on-red);
}

.p13-btn--ghost {
	background: transparent;
	color: var(--p13-red-muted);
	font-weight: 500;
	padding: 10px 8px;
}

/* Banner (incoming challenge) --------------------------------------------- */

.p13-banner-slot:empty {
	display: none;
}

.p13-banner-slot {
	padding-top: 18px;
}

.p13-banner {
	background: var(--p13-red-bg);
	border: 1px solid var(--p13-red);
	border-radius: 14px;
	padding: 14px 18px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.p13-banner + .p13-banner {
	margin-top: 10px;
}

.p13-banner__text {
	flex: 1 1 320px;
	font-size: 15px;
}

/* Avatars ----------------------------------------------------------------- */

.p13-avatar {
	width: 34px;
	height: 34px;
	flex: none;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	background: var(--p13-red-avatar);
	color: var(--p13-red-soft);
}

.p13-avatar--lg {
	width: 40px;
	height: 40px;
	font-size: 14px;
}

.p13-avatar--tipster {
	background: var(--p13-ink);
	color: var(--p13-paper);
}

.p13-avatar--blue {
	background: #1e2a44;
	color: #93c5fd;
}

/* Hero -------------------------------------------------------------------- */

.p13-hero {
	padding-top: 28px;
	padding-bottom: 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-end;
	justify-content: space-between;
}

.p13-hero__text {
	min-width: 0;
	flex: 1 1 520px;
}

.p13-kicker {
	margin-top: 14px !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--p13-accent-text);
}

/* The page title, as every page has it (the theme's h1). */
.p13 .p13-hero__title {
	margin-bottom: 20px;
	font-family: inherit;
	font-weight: 400;
	font-size: 2.25rem;
	line-height: 1.2;
	color: var(--p13-text);
}

@media (max-width: 768px) {
	.p13 .p13-hero__title {
		font-size: 1.625rem;
		margin-bottom: 12px;
	}
}

.p13-hero__lead {
	font-size: 17px;
	line-height: 1.6;
	color: var(--p13-text);
	max-width: 640px;
}

.p13-hero__next {
	margin-top: 10px !important;
	font-size: 14px;
	color: var(--p13-accent-soft);
}

.p13-stamp {
	flex: 0 1 340px;
	min-width: 0;
	background: var(--p13-red-bg);
	border: 2px solid var(--p13-red);
	border-radius: 16px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	transform: rotate(-1.5deg);
}

.p13-stamp__label {
	font-family: var(--p13-mono);
	font-size: 12px;
	color: var(--p13-red-text);
	letter-spacing: 0.08em;
}

.p13-stamp__value {
	font-family: var(--p13-head);
	font-weight: 800;
	font-size: 54px;
	line-height: 1;
	color: var(--p13-red-soft);
}

.p13-stamp__note {
	font-size: 13px;
	color: var(--p13-red-muted);
}

.p13-page .p13-hero {
	padding-top: 0;
}

/* Section tabs ------------------------------------------------------------ */

.p13-tabs {
	padding-bottom: 20px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.p13 .p13-tab {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	background: var(--p13-panel);
	color: var(--p13-text);
	border: 1px solid var(--p13-border);
	border-radius: 999px;
	padding: 9px 16px;
	font-weight: 600;
	font-size: 14px;
}

.p13 .p13-tab.is-active {
	background: var(--p13-accent);
	border-color: var(--p13-accent);
	color: var(--p13-on-accent);
	font-weight: 700;
}

.p13-tab__count:not(:empty) {
	margin-left: 5px;
}

.p13-tab__count:not(:empty)::before {
	content: "· ";
	white-space: pre;
}

/* Main: coupon + sidebar --------------------------------------------------- */

.p13-main {
	padding-bottom: 40px;
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	align-items: flex-start;
}

/* Coupon paper ------------------------------------------------------------- */

.p13-paper {
	flex: 999 1 640px;
	min-width: 0;
	background: var(--p13-paper);
	color: var(--p13-ink-text);
	border-radius: 6px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
	overflow: hidden;
}

html.tipsterpro-light .p13-paper {
	box-shadow: 0 12px 30px rgba(15, 30, 22, 0.18);
}

.p13-paper__head {
	background: var(--p13-ink);
	color: var(--p13-paper);
	padding: 14px 22px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	align-items: baseline;
}

.p13-paper__title {
	font-family: var(--p13-head);
	font-weight: 800;
	font-size: 26px;
	letter-spacing: 0.04em;
}

.p13-paper__serial {
	font-family: var(--p13-mono);
	font-size: 13px;
}

.p13-paper__cols {
	display: flex;
	gap: 12px;
	padding: 10px 22px;
	border-bottom: 2px solid var(--p13-ink);
	font-family: var(--p13-mono);
	font-size: 11px;
	color: var(--p13-paper-muted);
	letter-spacing: 0.06em;
}

.p13-col-n { width: 28px; }
.p13-col-match { flex: 1 1 200px; }
.p13-col-signs { width: 156px; text-align: center; }
.p13-col-outcome { flex: 1 1 180px; }

.p13-rows {
	list-style: none;
	padding: 0;
}

.p13-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	padding: 10px 22px;
	border-bottom: 1px solid var(--p13-line);
	margin: 0;
}

.p13-row__n {
	width: 28px;
	font-family: var(--p13-mono);
	font-weight: 600;
	font-size: 15px;
	color: var(--p13-ink);
}

.p13-row__match {
	flex: 1 1 200px;
	min-width: 0;
}

.p13-row__teams {
	font-weight: 700;
	font-size: 15px;
	color: var(--p13-ink-text);
}

.p13 .p13-row__teams a {
	color: inherit;
	text-decoration: none;
}

.p13 .p13-bonus__page {
	color: var(--p13-ink);
	font-weight: 600;
}

.p13 .p13-row__teams a:hover,
.p13 .p13-row__teams a:focus-visible,
.p13 .p13-bonus__page:hover {
	color: var(--p13-ink);
	text-decoration: underline;
}

.p13-row__out {
	margin-left: 5px;
	font-size: 12px;
	color: var(--p13-paper-muted);
}

.p13-row__meta {
	margin-top: 2px !important;
	font-size: 12px;
	color: var(--p13-paper-muted);
}

.p13-signs,
.p13-goals {
	display: flex;
	gap: 8px;
}

.p13-signs {
	width: 156px;
	justify-content: center;
}

.p13-goals {
	gap: 6px;
}

.p13 .p13-sign,
.p13 .p13-goal {
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 6px;
	font-family: var(--p13-mono);
	font-weight: 600;
	font-size: 17px;
	line-height: 1;
	background: var(--p13-paper-box);
	color: var(--p13-ink);
	border: 2px solid var(--p13-box-line);
	transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.p13 .p13-sign[aria-pressed="true"] {
	background: var(--p13-ink);
	color: var(--p13-paper);
	border-color: var(--p13-ink);
}

.p13 .p13-goal {
	font-size: 15px;
	color: #7a2a1d;
	border-color: #d9b3a8;
}

.p13 .p13-goal[aria-pressed="true"] {
	background: var(--p13-red);
	color: var(--p13-on-red);
	border-color: var(--p13-red);
}

.p13 .p13-sign:disabled,
.p13 .p13-goal:disabled {
	opacity: 1;
}

.p13 .p13-sign:disabled:not([aria-pressed="true"]),
.p13 .p13-goal:disabled:not([aria-pressed="true"]) {
	color: #9aa69f;
	border-color: #cfd6cf;
}

/* After the lock: result, the tipster's pick, how players picked. */
.p13-row__outcome {
	flex: 1 1 180px;
	min-width: 0;
	font-size: 13px;
	color: var(--p13-ink-soft);
}

.p13-row__tipster {
	margin-top: 2px !important;
	font-size: 12px;
	color: var(--p13-paper-muted);
}

.p13-row__tipster b {
	font-family: var(--p13-mono);
	color: var(--p13-ink);
}

.p13-row__result {
	font-family: var(--p13-mono);
	font-weight: 600;
	color: var(--p13-ink-text);
}

.p13-row.is-hit .p13-row__n,
.p13-row.is-hit .p13-row__result {
	color: var(--p13-ink);
}

.p13-row.is-hit {
	background: rgba(11, 107, 79, 0.08);
}

.p13-row.is-miss .p13-row__result {
	color: var(--p13-red);
}

.p13-bar {
	display: flex;
	height: 6px;
	border-radius: 3px;
	overflow: hidden;
	gap: 2px;
	margin-top: 6px;
	max-width: 180px;
}

.p13-bar__1 { background: var(--p13-ink); }
.p13-bar__x { background: var(--p13-draw); }
.p13-bar__2 { background: var(--p13-red); }

.p13-row__split {
	margin-top: 3px !important;
	font-size: 11px;
	color: var(--p13-paper-muted);
}

/* Bonus match */

.p13-bonus {
	padding: 16px 22px 20px;
	background: var(--p13-paper-2);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.p13-bonus__head {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: baseline;
	justify-content: space-between;
}

.p13-bonus__title {
	font-family: var(--p13-head);
	font-weight: 800;
	font-size: 24px;
	color: var(--p13-ink);
	line-height: 1.1;
}

.p13-bonus__meta,
.p13-bonus__note {
	font-size: 13px;
	color: var(--p13-paper-muted);
}

.p13-bonus__note {
	font-size: 12px;
}

.p13-bonus.is-hit .p13-bonus__note {
	color: var(--p13-ink);
	font-weight: 600;
}

.p13-bonus__sides {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 24px;
}

.p13-bonus__side {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.p13-bonus__team {
	width: 110px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.p13-paper__foot {
	padding: 14px 22px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	font-family: var(--p13-mono);
	font-size: 11px;
	color: var(--p13-paper-muted);
}

/* Sidebar cards ------------------------------------------------------------ */

.p13-aside {
	flex: 1 1 320px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Beside the coupon, the sidebar follows it down the page and stops at its
   end (.p13-main is the sticky box). p13-coupon.js adds the class and sets
   `top`, which lets a sidebar taller than the window scroll along too. */
.p13-aside.is-sticky {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 16px);
}

/* The theme hides sideways overflow on .grid-container with overflow-x:hidden,
   which makes it a scroll box and keeps anything inside from sticking. clip
   hides the same overflow without that; browsers without clip keep hidden. */
body.p13-view.tipsterpro .site.grid-container {
	overflow-x: clip;
}

.p13-card {
	background: var(--p13-panel);
	border: 1px solid var(--p13-border);
	border-radius: var(--tp-radius, 10px);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.p13-card__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
}

.p13-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	text-align: center;
}

.p13-stat {
	background: var(--p13-panel-2);
	border-radius: 10px;
	padding: 10px 4px;
}

.p13-stat__v {
	font-weight: 700;
	font-size: 1.375rem;
	line-height: 1.3;
}

.p13-stat__l {
	font-size: 11px;
	color: var(--p13-muted);
}

.p13-status__bonus {
	font-size: 13px;
	color: var(--p13-soft);
}

.p13-status__msg {
	font-size: 13px;
	color: var(--p13-red-text);
}

.p13-status__msg:empty {
	display: none;
}

.p13-status__msg.is-ok {
	color: var(--p13-accent-soft);
}

/* Challenges list */

/* Buttons and the invite box keep clear of the text above them. */
[data-p13-challenge-list] > * + .p13-btn,
[data-p13-challenge-list] > * + .p13-invite:not([hidden]) {
	margin-top: 12px;
}

[data-p13-challenge-list] > .p13-btn + .p13-btn {
	margin-top: 8px;
}

.p13-ch {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid var(--p13-border);
}

.p13-ch__body {
	flex: 1;
	min-width: 0;
	font-size: 14px;
}

.p13 .p13-ch__name {
	font-weight: 700;
	color: var(--p13-text);
}

.p13 a.p13-ch__name:hover {
	color: var(--p13-accent-soft);
}

.p13-ch__open-title {
	margin-top: 14px !important;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--p13-muted);
}

.p13-ch__label {
	font-size: 11px;
	color: var(--p13-accent-soft);
	margin-left: 4px;
}

.p13-ch__state {
	display: block;
	font-size: 12px;
	color: var(--p13-accent-soft);
}

.p13-ch__state.is-waiting {
	color: var(--p13-red-text);
}

.p13-ch__state.is-muted {
	color: var(--p13-muted);
}

.p13-ch__rec {
	font-size: 12px;
	color: var(--p13-muted);
	white-space: nowrap;
}

.p13-ch__actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 6px;
}

.p13-invite {
	background: var(--p13-panel-2);
	border: 1px solid var(--p13-border);
	border-radius: 12px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.p13-invite[hidden] {
	display: none;
}

.p13-invite__text {
	font-size: 13px;
	color: var(--p13-soft);
}

.p13-invite__link {
	display: flex;
	gap: 8px;
}

.p13-invite__url {
	flex: 1;
	min-width: 0;
	background: var(--p13-panel);
	border: 1px solid var(--p13-border);
	border-radius: 8px;
	padding: 10px;
	font-family: var(--p13-mono);
	font-size: 13px;
	color: var(--p13-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.p13-invite__share {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.p13 .p13-invite__share a {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	color: var(--p13-text);
	border: 1px solid var(--p13-border-2);
	border-radius: 8px;
	padding: 9px;
	font-size: 13px;
}

.p13-check {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--p13-soft);
	min-height: 44px;
	cursor: pointer;
}

.p13-check input {
	accent-color: var(--p13-accent);
	width: 20px;
	height: 20px;
}

.p13-check[aria-busy="true"] {
	cursor: progress;
	color: var(--p13-muted);
}

.p13-check__busy {
	margin-left: 6px;
	font-style: italic;
}

/* Focus parks on these after a redraw removed the focused control. */
[data-p13-challenge-list]:focus,
[data-p13-banner]:focus,
[data-p13-board-body]:focus {
	outline: none;
}

/* Prize tiers */

.p13-prizes__list {
	display: flex;
	flex-direction: column;
}

.p13-prizes__row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-size: 14px;
	padding: 6px 0;
	border-bottom: 1px solid var(--p13-border);
}

.p13-prizes__row:last-child {
	border-bottom: 0;
}

.p13-prizes__row dd {
	font-weight: 700;
}

.p13-prizes__row dd.is-jackpot {
	color: var(--p13-red-text);
}

/* Leaderboard -------------------------------------------------------------- */

.p13-board-section {
	padding-bottom: 56px;
}

.p13-page .p13-board-section {
	padding-bottom: 0;
}

.p13-board {
	padding: 22px;
	gap: 16px;
}

.p13-board__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.p13-board__controls {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.p13-seg {
	display: flex;
	background: var(--p13-panel-2);
	border: 1px solid var(--p13-border);
	border-radius: 10px;
	padding: 3px;
}

.p13 .p13-seg button {
	border: 0;
	border-radius: 8px;
	padding: 7px 14px;
	min-height: 36px;
	font-size: 13px;
	background: transparent;
	color: var(--p13-muted);
	font-weight: 500;
}

.p13 .p13-seg button[aria-pressed="true"] {
	background: var(--p13-border);
	color: var(--p13-text);
	font-weight: 700;
}

.p13-select {
	background: var(--p13-panel-2);
	color: var(--p13-text);
	border: 1px solid var(--p13-border);
	border-radius: 10px;
	padding: 8px 12px;
	min-height: 40px;
	font-family: inherit;
	font-size: 14px;
}

.p13-table-wrap {
	/* relative: absolutely positioned bits (screen-reader labels) stay inside
	   the scroll box instead of widening the page on phones. */
	position: relative;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.p13-table {
	width: 100%;
	min-width: 680px;
	border-collapse: collapse;
	font-size: 14px;
	margin: 0;
	border: 0;
}

.p13-table--compact {
	min-width: 0;
}

.p13-table th {
	padding: 10px 8px;
	font-weight: 600;
	font-size: 12px;
	color: var(--p13-muted);
	text-align: left;
	background: transparent;
	border: 0;
}

.p13-table td {
	padding: 12px 8px;
	border: 0;
	border-top: 1px solid var(--p13-border);
	background: transparent;
	color: var(--p13-text);
}

.p13-table .is-num {
	text-align: right;
}

.p13 .p13-table td a {
	color: var(--p13-text);
}

.p13 .p13-table td a:hover {
	color: var(--p13-accent-soft);
}

.p13-table .p13-rank {
	font-family: var(--p13-mono);
	font-weight: 600;
	width: 48px;
}

.p13-table tr.is-me td {
	background: rgba(16, 185, 129, 0.1);
}

.p13-table .p13-pts {
	font-weight: 700;
}

.p13-table .p13-rec {
	color: var(--p13-soft);
}

.p13-player__note {
	font-size: 12px;
	color: var(--p13-muted);
	margin-left: 4px;
}

.p13-board__empty {
	padding: 18px 8px;
	color: var(--p13-muted);
	font-size: 14px;
}

/* Sticky save bar (phones) ---------------------------------------------------- */

.p13-savebar {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: calc(76px + env(safe-area-inset-bottom, 0px));
	z-index: 90;
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--p13-panel);
	border: 1px solid var(--p13-border-2);
	border-radius: 14px;
	padding: 10px 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.p13-savebar[hidden] {
	display: none;
}

.p13-savebar__count {
	font-weight: 700;
	font-size: 20px;
	line-height: 1;
	white-space: nowrap;
}

.p13-savebar .p13-btn {
	flex: 1;
}

@media (min-width: 901px) {
	.p13-savebar {
		display: none !important;
	}
}

/* Phones: the bar and the theme's back-to-top button share one row. The
   button sits at the right edge, centred on the bar (66px tall), and the
   bar stops short of it while it shows. */
@media (max-width: 900px) {
	.p13-savebar {
		transition: right 0.2s ease;
	}

	body.p13-savebar-on #tp-scroll-top {
		right: 12px;
		bottom: calc(87px + env(safe-area-inset-bottom, 0px));
	}

	body.p13-savebar-on:has(#tp-scroll-top.tp-visible) .p13-savebar {
		right: 66px;
	}
}

/* Toast -------------------------------------------------------------------- */

.p13-toast {
	position: fixed;
	left: 50%;
	bottom: 88px;
	transform: translateX(-50%);
	z-index: 9999;
	background: var(--p13-panel, #151d19);
	color: var(--p13-text, #e9eeea);
	border: 1px solid var(--p13-border-2, #2e4037);
	border-radius: 12px;
	padding: 12px 16px;
	font-size: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	max-width: calc(100vw - 32px);
}

/* Tip-page box -------------------------------------------------------------- */

.p13-tipbox {
	border-radius: 16px;
	border: 1px solid var(--p13-border);
	background: var(--p13-panel);
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 1.25rem;
}

.p13-tipbox__kicker {
	font-family: var(--p13-mono);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--p13-accent-soft);
}

.p13-tipbox--slim {
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

/* Home card ------------------------------------------------------------------ */

.p13-home {
	border-radius: 16px;
	border: 1px solid var(--p13-border);
	background: var(--p13-panel);
	padding: 22px;
	display: flex;
	flex-wrap: wrap;
	gap: 18px 28px;
	align-items: center;
	justify-content: space-between;
	margin: 24px auto;
	max-width: 1200px;
}

.p13-home__title {
	font-family: var(--p13-head);
	font-weight: 800;
	font-size: 40px;
	line-height: 0.95;
}

.p13-home__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.p13-home__fact {
	background: var(--p13-panel-2);
	border-radius: 10px;
	padding: 8px 14px;
	min-width: 104px;
	text-align: center;
}

.p13-home__fact.is-jackpot {
	background: var(--p13-red-bg);
	border: 1px solid var(--p13-red);
}

.p13-home__fact.is-jackpot .p13-stat__v {
	color: var(--p13-red-soft);
}

/* Member pages ---------------------------------------------------------------- */

.p13-home-wrap {
	margin: 0 0 1.5rem;
}

.p13-home-wrap .p13-home {
	margin: 0;
	max-width: none;
}

.p13-stats--6 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.p13-stats--6 .p13-stat__v {
	font-size: 26px;
}

.p13-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.p13-badge {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 700;
	background: rgba(16, 185, 129, 0.14);
	color: var(--p13-accent-soft);
	border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Levels (all-time points): tones rise from muted to gold. */
.p13-level {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	border: 1px solid var(--p13-border-2);
	font-family: var(--p13-mono);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.6;
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: 1px;
	color: var(--p13-muted);
}

.p13-level--2 {
	color: var(--p13-soft);
	background: var(--p13-panel-2);
}

.p13-level--3 {
	color: var(--p13-accent-soft);
	background: rgba(16, 185, 129, 0.12);
	border-color: rgba(16, 185, 129, 0.4);
}

.p13-level--4 {
	color: var(--p13-red-text);
	background: var(--p13-red-bg);
	border-color: var(--p13-red);
}

.p13-level--5 {
	color: #f5c451;
	background: rgba(245, 196, 81, 0.1);
	border-color: #b8902f;
}

html.tipsterpro-light .p13-level--5 {
	color: #7a5a0c;
	background: #fff6dc;
	border-color: #d9b45c;
}

.p13-level-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--p13-muted);
}

.p13-h2h {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 14px;
}

/* Phones ---------------------------------------------------------------------- */

@media (max-width: 640px) {
	.p13-wrap {
		padding-left: 16px;
		padding-right: 16px;
	}

	.p13-stamp {
		flex: 1 1 100%;
		transform: rotate(-1deg);
	}

	.p13-stamp__value {
		font-size: 44px;
	}

	.p13-paper__head,
	.p13-row,
	.p13-bonus,
	.p13-paper__foot {
		padding-left: 14px;
		padding-right: 14px;
	}

	.p13-paper__cols {
		display: none;
	}

	.p13-row {
		gap: 8px 12px;
	}

	.p13-row__match {
		flex: 1 1 calc(100% - 40px);
	}

	.p13-signs {
		width: auto;
		margin-left: 40px;
		justify-content: flex-start;
	}

	.p13-row__outcome {
		flex: 1 1 100%;
		margin-left: 40px;
	}

	.p13-bonus__team {
		width: 100%;
	}

	.p13-home__title {
		font-size: 32px;
	}
}

/* Banner on the page: clear of the title below it ------------------------- */

.p13-page .p13-banner-slot {
	padding-top: 0;
	margin-bottom: 28px;
}

.p13-banner .p13-btn {
	flex: none;
}

/* "You're in": a challenge taken on, not one waiting for an answer. */
.p13-banner.is-joined {
	background: rgba(16, 185, 129, 0.08);
	border-color: var(--p13-accent);
}

.p13-banner.is-joined .p13-avatar {
	background: var(--p13-ink);
	color: var(--p13-paper);
}

/* After the lock: the winning line ---------------------------------------- */

/* The strip under the coupon's head: each row's result, the Bonus score and
   how many of the decided rows the member has right. */
.p13-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	padding: 12px 22px;
	background: var(--p13-paper-2);
	border-bottom: 1px solid var(--p13-line);
	font-family: var(--p13-mono);
	color: var(--p13-ink-text);
}

.p13-line__label {
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--p13-paper-muted);
}

.p13 .p13-line__signs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 0;
	list-style: none;
}

.p13 .p13-line__signs li {
	width: 24px;
	height: 26px;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	background: var(--p13-ink);
	color: var(--p13-paper);
}

.p13 .p13-line__signs li.is-pending {
	background: transparent;
	color: var(--p13-paper-muted);
	border: 1px dashed var(--p13-box-line);
}

.p13 .p13-line__signs li.is-void {
	background: var(--p13-draw);
}

.p13-line__bonus {
	font-size: 13px;
	font-weight: 600;
	color: #7a2a1d;
}

.p13 .p13-line__you {
	margin-left: auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--p13-ink);
}

/* The result's box in every row: the winning sign, picked or not. */
.p13 .p13-sign.is-result:disabled:not([aria-pressed="true"]),
.p13 .p13-goal.is-result:disabled:not([aria-pressed="true"]) {
	background: #dcefe4;
	color: var(--p13-ink);
	border-color: var(--p13-ink);
	border-style: dashed;
}

.p13 .p13-goal.is-result:disabled:not([aria-pressed="true"]) {
	background: #f7ddd5;
	color: #7a2a1d;
	border-color: var(--p13-red);
}

/* A pick that missed. A double's other sign on a row it won stays, faded. */
.p13 .p13-row.is-miss .p13-sign[aria-pressed="true"],
.p13 .p13-bonus.is-miss .p13-goal[aria-pressed="true"]:not(.is-result) {
	background: var(--p13-red);
	border-color: var(--p13-red);
	color: var(--p13-on-red);
	text-decoration: line-through;
}

.p13 .p13-row.is-hit .p13-sign[aria-pressed="true"]:not(.is-result) {
	opacity: 0.45;
}

/* Next coupon (closed and not played) ------------------------------------- */

.p13-next {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.p13 .p13-next__when {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--p13-panel-2);
}

.p13-next__day {
	font-size: 1.125rem;
	font-weight: 700;
}

.p13-next__time {
	font-family: var(--p13-mono);
	font-size: 1rem;
	font-weight: 600;
	color: var(--p13-accent-text);
}

@media (max-width: 640px) {
	.p13-line {
		padding-left: 14px;
		padding-right: 14px;
	}

	.p13 .p13-line__signs li {
		width: 21px;
	}

	.p13 .p13-line__you {
		margin-left: 0;
		flex: 1 1 100%;
	}
}
