/* PiggyMeter, intentionally scoped to avoid other phpBB styles/extensions. */
.sp-pm { --pm-border: #d7deea; --pm-muted: #5c6475; --pm-ink: #28334a; color: var(--pm-ink); font-size: 14px; margin: 16px 0 24px; }
.sp-pm *, .sp-pm *::before, .sp-pm *::after { box-sizing: border-box; }
.sp-pm-hero { display: block; padding: 13px 18px; border-radius: 12px; background: linear-gradient(112deg, #ef6fa2, #925bce 70%, #5e7fcc); color: #fff; margin-bottom: 14px; box-shadow: 0 5px 16px rgba(49, 29, 85, .12); }
.sp-pm-hero h2 { color: #fff; margin: 0 0 3px; font-size: clamp(21px, 2.8vw, 27px); line-height: 1.2; letter-spacing: -.025em; }
.sp-pm-subtitle { font-weight: 700; font-size: 14px; line-height: 1.35; margin: 0 0 3px; color: #fff; }
.sp-pm-info { color: rgba(255,255,255,.95); font-size: 13px; line-height: 1.4; margin: 0; }
.sp-pm-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(270px, .9fr); gap: 18px; }
.sp-pm-grid-single { grid-template-columns: minmax(0, 1fr); }
.sp-pm-main, .sp-pm-sidebar { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sp-pm-panel { border: 1px solid var(--pm-border); border-radius: 14px; padding: 18px; background: #fff; box-shadow: 0 3px 12px rgba(35, 38, 66, .035); min-width: 0; color: var(--pm-ink); }
.sp-pm-panel p { margin: 8px 0 12px; }
.sp-pm-panel-heading { font-size: 17px; font-weight: 800; margin-bottom: 16px; color: #484079; }
.sp-pm-game { text-align: center; }
.sp-pm-game .sp-pm-panel-heading { text-align: left; }
.sp-pm-meter { position: relative; padding: 12px 0 6px; }
.sp-pm-meter-track { height: 52px; position: relative; border-radius: 12px; background: linear-gradient(90deg,#f9b7c7 0%,#ffe7a0 43%,#b8e3b2 76%,#4cbf8c 100%); border: 2px solid #e0e6ed; overflow: hidden; }
.sp-pm-meter-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 10px 0 0 10px; background: rgba(255,255,255,.22); border-right: 3px solid rgba(20,50,45,.38); transition: none; }
.sp-pm-meter-marker { position: absolute; top: -7px; left: 0; width: 11px; height: 65px; margin-left: -5px; background: #fff; border: 3px solid #313852; border-radius: 7px; box-shadow: 0 1px 5px #4b566b66; }
.sp-pm-meter-ticks { position: absolute; left: 0; right: 0; top: 58px; display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--pm-muted); }
.sp-pm-meter-value { display: flex; justify-content: center; align-items: baseline; gap: 6px; padding: 30px 0 7px; }
.sp-pm-meter-value output { font-weight: 900; font-variant-numeric: tabular-nums; font-size: clamp(50px, 8vw, 66px); letter-spacing: -.06em; color: #3c8f75; line-height: 1; }
.sp-pm-meter-value small { font-weight: 700; font-size: 16px; color: var(--pm-muted); }
.sp-pm-status { font-weight: 650; color: #3b5365; }
.sp-pm-countdown { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; color: #8d57b6; }
.sp-pm-form { display: flex; justify-content: center; margin: 16px 0 8px; }
.sp-pm-btn { appearance: none; border: none; cursor: pointer; border-radius: 9px; padding: 11px 18px; font: inherit; font-weight: 800; line-height: 1.3; color: #fff; min-height: 39px; max-width: 100%; }
.sp-pm-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.sp-pm-btn:focus-visible { outline: 3px solid #f0b540; outline-offset: 3px; }
.sp-pm-btn:disabled { cursor: wait; opacity: .65; transform: none; }
.sp-pm-btn-start { background: linear-gradient(115deg, #9d49af, #e44d90); }
.sp-pm-btn-buy { background: #725eb7; }
.sp-pm-alert { border-left: 4px solid #229c74; padding: 13px 15px; color: #205b47; background: #e8f8f0; border-radius: 9px; margin-bottom: 16px; }
.sp-pm-alert-error { border-color: #ce5e59; background: #fff0ed; color: #842f35; }
.sp-pm-result { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; border: 1px solid #a5d9be; background: #eaf8ef; color: #20533d; border-radius: 12px; padding: 12px 18px; }
.sp-pm-bonus { background: #f7f3ff; }
.sp-pm-bonus strong { color: #6e43a0; }
.sp-pm-panel small { display: block; margin-top: 8px; font-size: 12px; color: var(--pm-muted); }
.sp-pm-table-scroll { overflow-x: auto; }
.sp-pm-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.sp-pm-table thead { background: #eef0f8; color: #505c79; }
.sp-pm-table th, .sp-pm-table td { padding: 9px 10px; border-bottom: 1px solid #ececf3; vertical-align: middle; white-space: normal; }
.sp-pm-table tbody tr:last-child td { border-bottom: 0; }
.sp-pm-table td a { color: #60499f; font-weight: 700; }
.sp-pm-disclaimer { margin: 18px 0 0; color: #6c7380; font-size: 12px; }
.sp-pm-index-teaser { margin: 10px 0; border: 1px solid #e7bad6; border-radius: 11px; background: #fff4fb; color: #603a64; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sp-pm-index-teaser strong { font-size: 14px; }.sp-pm-index-teaser span { flex: 1; min-width: 150px; }.sp-pm-index-teaser a { display: inline-block; border-radius: 7px; background: #874ca0; color: #fff; font-weight: 700; padding: 6px 10px; }
@media (max-width: 800px) { .sp-pm-grid { grid-template-columns: 1fr; }.sp-pm-hero { padding: 12px 14px; }.sp-pm-panel { padding: 14px; } }
@media (max-width: 420px) { .sp-pm-hero { padding: 11px 13px; }.sp-pm-hero h2 { font-size: 21px; }.sp-pm-meter-value output { font-size: 50px; }.sp-pm-table { font-size: 12px; }.sp-pm-table th,.sp-pm-table td { padding: 8px 6px; } }
@media (prefers-reduced-motion: reduce) { .sp-pm-btn:hover { transform: none; } }


/* Spiderpiggy Holiday Themes palette on styles without a dedicated theme override.
   Scoped to PiggyMeter only. All regular styles stay untouched. */
html[data-sp-holiday="halloween"] body#phpbb .sp-pm,
html[data-sp-holiday="halloween"] body#phpbb .sp-pm-index-teaser {
    --pm-ink: #f3e9e0;
    --pm-muted: #c9b9b3;
    --pm-panel: #231c28;
    --pm-border: rgba(255, 172, 87, .55);
    --pm-head: #ffd091;
    --pm-bright: #ffd091;
    --pm-accent: #ffac57;
    --pm-soft: rgba(255, 172, 87, .13);
    --pm-button-text: #241b1e;
}
html[data-sp-holiday="halloween"] body#phpbb .sp-pm .sp-pm-hero {
    background: linear-gradient(112deg, #73361f, #402331 55%, #1b202b);
    border-color: var(--pm-border);
    color: var(--pm-ink);
}
html[data-sp-holiday="halloween"] body#phpbb .sp-pm .sp-pm-panel {
    background: linear-gradient(145deg, var(--pm-panel), #1b202b);
    color: var(--pm-ink);
    border-color: var(--pm-border);
}
html[data-sp-holiday="halloween"] body#phpbb .sp-pm .sp-pm-panel-heading {
    color: var(--pm-head);
    border-bottom: 1px solid var(--pm-border);
}
html[data-sp-holiday="halloween"] body#phpbb .sp-pm .sp-pm-table { color: var(--pm-ink); }
html[data-sp-holiday="halloween"] body#phpbb .sp-pm .sp-pm-table thead {
    background: #402331; color: var(--pm-head);
}
html[data-sp-holiday="halloween"] body#phpbb .sp-pm .sp-pm-btn {
    background: #ffac57; color: #241b1e;
}
html[data-sp-holiday="halloween"] body#phpbb .sp-pm-index-teaser {
    background: #231c28; color: var(--pm-ink); border-color: var(--pm-border);
}
html[data-sp-holiday="halloween"] body#phpbb .sp-pm-index-teaser a {
    background: #ffac57; color: #241b1e;
}
