/* PlantPorium Guess the Plant. Tokens first, so a theme can restyle by redefining them. */
.pgp {
	--pgp-bg: #faf7f0;
	--pgp-card: #ffffff;
	--pgp-ink: #14372a;
	--pgp-text: #23302a;
	--pgp-muted: #5f7068;
	--pgp-line: #e3e9e4;
	--pgp-green: #1f7a4f;
	--pgp-green-dark: #165c3b;
	--pgp-pink: #e0307f;
	--pgp-soft: #eef6ee;
	--pgp-bad: #b3263e;
	--pgp-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	color: var(--pgp-text);
	line-height: 1.5;
}

/* Beat WordPress's constrained layout: give the game its own width and centre it. */
body.pgp-game-page .wp-block-post-content > .pgp,
body.pgp-game-page .entry-content > .pgp,
body.pgp-game-page .pgp {
	max-width: 1080px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	width: 100%;
	box-sizing: border-box;
	padding: 8px 0 48px;
}

/* The game carries its own heading, so hide the theme's page title. */
body.pgp-game-page .wp-block-post-title,
body.pgp-game-page .entry-title { display: none; }

.pgp-head { text-align: center; margin: 12px 0 26px; }
.pgp-kicker { margin: 0 0 4px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; color: var(--pgp-pink); }
.pgp-title { margin: 0; font-family: var(--pgp-display); font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; color: var(--pgp-ink); }
.pgp-sub { margin: 8px 0 0; color: var(--pgp-muted); font-size: 1.05rem; }

.pgp-board { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; align-items: start; }

.pgp-photo { position: relative; background: var(--pgp-soft); border-radius: 22px; overflow: hidden; box-shadow: 0 6px 24px rgba(20, 55, 42, .14); border: 1px solid var(--pgp-line); aspect-ratio: 5 / 4; }
.pgp-photo img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; }
.pgp-level { position: absolute; top: 14px; left: 14px; padding: 5px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #fff; color: var(--pgp-ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .16); }
.pgp-level--easy { background: #d8f2b2; color: #1b5e3f; }
.pgp-level--medium { background: #ffe9a8; color: #6b4a00; }
.pgp-level--hard { background: #ffd0dd; color: #8b1e47; }

.pgp-panel { background: var(--pgp-card); border: 1px solid var(--pgp-line); border-radius: 22px; padding: 26px; box-shadow: 0 6px 24px rgba(20, 55, 42, .08); }
.pgp-h { margin: 0 0 4px; font-family: var(--pgp-display); font-size: 1.7rem; color: var(--pgp-ink); line-height: 1.15; }
.pgp-lead { margin: 0 0 16px; color: var(--pgp-muted); }

.pgp-pips { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.pgp-pip { width: 16px; height: 16px; border-radius: 50%; background: var(--pgp-soft); border: 2px solid #b9d3c1; }
.pgp-pip.is-miss { background: #f4c7cf; border-color: #d98c9c; }
.pgp-pip.is-hit { background: #7ccf8f; border-color: #3f9457; }
.pgp-pips-text { margin-left: 6px; font-size: .88rem; color: var(--pgp-muted); }

.pgp-label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; color: var(--pgp-ink); }
.pgp-form { display: block; }
.pgp-combo { position: relative; margin-bottom: 12px; }
.pgp-input { width: 100%; box-sizing: border-box; padding: 13px 16px; font: inherit; font-size: 1rem; border: 2px solid #cfe0d4; border-radius: 14px; background: #fff; color: var(--pgp-text); }
.pgp-input:focus { outline: none; border-color: var(--pgp-green); box-shadow: 0 0 0 4px rgba(31, 122, 79, .15); }
.pgp-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none; max-height: 260px; overflow: auto; background: #fff; border: 1px solid var(--pgp-line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 55, 42, .2); }
.pgp-list li { padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.pgp-list li:hover, .pgp-list li.is-active { background: var(--pgp-soft); }
.pgp-list li.is-empty { color: var(--pgp-muted); cursor: default; }

.pgp-btn { display: inline-block; padding: 12px 26px; font: inherit; font-weight: 700; border: 0; border-radius: 999px; background: var(--pgp-green); color: #fff !important; cursor: pointer; text-decoration: none; box-shadow: 0 3px 0 rgba(0, 0, 0, .14); }
.pgp-btn:hover { background: var(--pgp-green-dark); }
.pgp-btn:disabled { opacity: .55; cursor: not-allowed; }
.pgp-btn--ghost { background: #fff; color: var(--pgp-green-dark) !important; border: 2px solid var(--pgp-green); box-shadow: none; }
.pgp-btn--ghost:hover { background: var(--pgp-soft); }
.pgp-btn--hint { background: var(--pgp-pink); }
.pgp-btn--hint:hover { background: #bf2069; }
.pgp-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.pgp-msg { min-height: 1.4em; margin: 10px 0 0; font-weight: 600; }
.pgp-msg.is-bad { color: var(--pgp-bad); }
.pgp-wrong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: .88rem; color: var(--pgp-muted); }
.pgp-wrong em { font-style: normal; padding: 3px 10px; border-radius: 999px; background: #fbe6ea; color: #8b1e47; text-decoration: line-through; }

.pgp-hint { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--pgp-line); }
.pgp-hint.is-open { background: #fff7d6; border: 1px solid #f0dc8a; border-radius: 16px; padding: 14px 18px; }
.pgp-hint.is-open p { margin: 4px 0 0; font-family: var(--pgp-display); font-size: 1.1rem; }
.pgp-small { margin: 8px 0 0; font-size: .86rem; color: var(--pgp-muted); }

.pgp-result { text-align: center; padding: 8px 0; }
.pgp-result-kicker { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
.pgp-result.is-won .pgp-result-kicker { color: var(--pgp-green); }
.pgp-result.is-lost .pgp-result-kicker { color: var(--pgp-pink); }
.pgp-result-name { margin: 4px 0 10px; font-family: var(--pgp-display); font-size: 2rem; color: var(--pgp-ink); line-height: 1.15; }

.pgp-streak { margin: 18px 0 0; text-align: center; font-weight: 700; color: var(--pgp-green-dark); }
.pgp-yesterday { margin: 22px 0 0; text-align: center; color: var(--pgp-muted); }
.pgp-note { margin: 0; color: var(--pgp-muted); }

@media (max-width: 820px) {
	.pgp-board { grid-template-columns: 1fr; }
	.pgp-panel { padding: 20px; }
}

@media (prefers-reduced-motion: no-preference) {
	.pgp-result { animation: pgp-pop .35s ease-out; }
	@keyframes pgp-pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
}
