/* ============================================
   GraceGuide — css/games.css
   Play & Learn (Bible games). Every class is prefixed "pl-" so nothing
   here can touch the rest of the app. Colours come from the tokens in
   base.css, so dark mode follows automatically.
   ============================================ */

.pl-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px 32px;
    --pl-right: #2e8b57;
    --pl-wrong: #c8553d;
    --pl-line: rgba(0, 0, 0, 0.08);
    --pl-soft: rgba(48, 72, 58, 0.07);
}
[data-theme="dark"] .pl-page {
    --pl-right: #4fb37c;
    --pl-wrong: #e07a62;
    --pl-line: var(--dark-border);
    --pl-soft: rgba(255, 255, 255, 0.05);
}
.pl-page button { font-family: inherit; }

.pl-title { font-family: var(--font-display); font-size: 24px; margin-bottom: 12px; }
.pl-section {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-slate); margin: 24px 0 10px;
}
.pl-section span { font-weight: 600; letter-spacing: 0; }
.pl-foot { font-size: 13px; color: var(--text-slate); text-align: center; margin: 16px 0 10px; line-height: 1.5; }
.pl-waiting { font-size: 14px; color: var(--text-slate); text-align: center; margin: 14px 0; }
.pl-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 46vh; gap: 12px; }
.pl-big-icon { font-size: 44px; opacity: 0.35; }

.pl-spinner {
    width: 34px; height: 34px; border-radius: 50%; margin: 8px auto;
    border: 3px solid var(--pl-soft, rgba(48, 72, 58, 0.12)); border-top-color: var(--accent-muted-gold);
    animation: pl-spin 0.8s linear infinite;
}
.pl-spinner-sm { width: 16px; height: 16px; border-width: 2px; margin: 0; display: inline-block; vertical-align: -3px; }
@keyframes pl-spin { to { transform: rotate(360deg); } }

/* ---------- hub ---------- */

.pl-level {
    display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-deep-olive), #1f3327); color: #f8f6f0; box-shadow: var(--shadow-md);
}
.pl-level-guest { justify-content: space-between; }
.pl-level-guest h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 2px; }
.pl-level-guest p { font-size: 13px; opacity: 0.85; line-height: 1.4; }
.pl-level-badge {
    width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--accent-muted-gold); color: #202522; font-weight: 800; font-size: 20px;
}
.pl-level-main { flex: 1; min-width: 0; }
.pl-level-title { font-weight: 700; font-size: 16px; }
.pl-level-title span { font-weight: 500; font-size: 12px; opacity: 0.8; margin-left: 6px; }
.pl-level-sub { font-size: 12px; opacity: 0.8; margin-top: 6px; }
.pl-xpbar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); overflow: hidden; margin-top: 8px; }
.pl-xpbar-fill { height: 100%; border-radius: 99px; background: var(--accent-muted-gold); transition: width 0.6s ease; }
.pl-streak { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--gold-light); }
.pl-streak i { font-size: 20px; }
.pl-streak strong { font-size: 16px; color: #fff; }

.pl-word-first {
    display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-md);
    background: rgba(199, 166, 90, 0.14); border: 1px solid rgba(199, 166, 90, 0.35); font-size: 13px; color: var(--text-charcoal);
}
.pl-word-first i { color: var(--gold-dark); }
.pl-word-first a { color: var(--primary-deep-olive); font-weight: 700; text-decoration: underline; }
[data-theme="dark"] .pl-word-first a { color: var(--gold-light); }

.pl-daily {
    display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 16px; border-radius: var(--radius-lg); cursor: pointer;
    background: linear-gradient(135deg, var(--accent-terracotta), var(--terracotta-dark)); color: #fff; box-shadow: var(--shadow-sm);
}
.pl-daily:active { transform: scale(0.99); }
.pl-daily-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.pl-daily-main { flex: 1; }
.pl-daily-main h3 { font-size: 16px; font-weight: 700; }
.pl-daily-main p { font-size: 13px; opacity: 0.92; line-height: 1.4; }
.pl-daily-done { background: linear-gradient(135deg, var(--secondary-sage), var(--primary-light)); }

.pl-games { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pl-game {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; min-height: 132px;
    border: none; border-radius: var(--radius-lg); color: #fff; cursor: pointer; box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.pl-game:hover { box-shadow: var(--shadow-md); }
.pl-game:active { transform: scale(0.97); }
.pl-games .pl-game:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 104px; }
.pl-game-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.pl-game-name { font-weight: 800; font-size: 16px; }
.pl-game-tag { font-size: 12px; opacity: 0.9; line-height: 1.35; }
.pl-game-card-emoji { background: linear-gradient(135deg, #c7a65a, #a8883d); }
.pl-game-card-wordle { background: linear-gradient(135deg, #4a6855, #30483a); }
.pl-game-card-whoami { background: linear-gradient(135deg, #7b6a94, #564870); }
.pl-game-card-bibleornot { background: linear-gradient(135deg, #5b8a9a, #3d6676); }
.pl-game-card-battle { background: linear-gradient(135deg, #c87552, #a55a3e); }

.pl-join { display: flex; gap: 8px; margin-top: 16px; }
.pl-join input {
    flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.3em; font-weight: 700; text-align: center;
    padding: 12px; border-radius: var(--radius-md); border: 2px solid var(--pl-line); background: var(--card-white); color: var(--text-charcoal); font-size: 16px;
}
.pl-join input::placeholder { letter-spacing: 0; font-weight: 500; text-transform: none; }
.pl-join input:focus { outline: none; border-color: var(--accent-muted-gold); }
.pl-row-links { display: flex; gap: 8px; margin-top: 12px; }
.pl-row-links .btn { flex: 1; }
[data-theme="dark"] .pl-page .btn-outline, [data-theme="dark"] .pl-invite-card .btn-outline { color: var(--dark-text); border-color: var(--dark-text-secondary); }

/* ---------- game page / lobby ---------- */

.pl-hero { border-radius: var(--radius-lg); padding: 24px 20px; color: #fff; text-align: center; box-shadow: var(--shadow-md); margin-bottom: 16px; }
.pl-hero .pl-game-icon { margin: 0 auto 10px; width: 54px; height: 54px; font-size: 24px; }
.pl-hero h2 { font-family: var(--font-display); font-size: 24px; margin-bottom: 4px; }
.pl-hero p { font-size: 14px; opacity: 0.94; line-height: 1.45; }
.pl-hero small { display: block; margin-top: 8px; font-size: 12px; opacity: 0.85; }
.pl-daily-hero { background: linear-gradient(135deg, var(--accent-terracotta), var(--terracotta-dark)); }
.pl-final-score { font-size: 44px; font-weight: 800; line-height: 1.1; margin: 6px 0; }
.pl-final-score small { display: inline; font-size: 14px; font-weight: 600; opacity: 0.85; }

.pl-modes { display: grid; gap: 10px; }
.pl-mode {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; cursor: pointer;
    background: var(--card-white); color: var(--text-charcoal); border: 1px solid var(--pl-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.pl-mode:active { transform: scale(0.99); }
.pl-mode > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.pl-mode strong { font-size: 15px; }
.pl-mode small { font-size: 12px; color: var(--text-slate); margin-top: 2px; }
.pl-mode > i { color: var(--text-slate); }
.pl-mode-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--pl-soft); color: var(--primary-deep-olive); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
[data-theme="dark"] .pl-mode-icon { color: var(--gold-light); }

.pl-code-card { background: var(--card-white); border: 2px dashed var(--accent-muted-gold); border-radius: var(--radius-lg); padding: 16px; text-align: center; margin-bottom: 12px; }
.pl-code-card small { font-size: 12px; color: var(--text-slate); text-transform: uppercase; letter-spacing: 0.08em; }
.pl-code { font-size: 38px; font-weight: 800; letter-spacing: 0.22em; margin: 4px 0 12px 0.22em; color: var(--text-charcoal); font-variant-numeric: tabular-nums; }
.pl-code-actions { display: flex; gap: 8px; justify-content: center; }
.pl-searching { text-align: center; padding: 18px; background: var(--card-white); border-radius: var(--radius-lg); border: 1px solid var(--pl-line); margin-bottom: 12px; }
.pl-searching p { font-weight: 700; margin-top: 6px; }
.pl-searching small { font-size: 12px; color: var(--text-slate); }

.pl-players { padding: 6px 12px; }
.pl-players.card:hover, .pl-board.card:hover, .pl-verses.card:hover { transform: none; box-shadow: var(--shadow-sm); }
.pl-player { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--pl-line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; color: var(--text-charcoal); text-align: left; }
.pl-player:last-child { border-bottom: 0; }
.pl-player-btn { cursor: pointer; }
.pl-player-away { opacity: 0.55; }
.pl-player-name { flex: 1; font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-player-name small { color: var(--text-slate); font-weight: 500; }
.pl-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--primary-deep-olive); color: #f8f6f0; font-weight: 700; font-size: 15px; }
.pl-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(199, 166, 90, 0.22); color: var(--gold-dark); white-space: nowrap; }
[data-theme="dark"] .pl-tag { color: var(--gold-light); }
.pl-tag-away { background: var(--pl-soft); color: var(--text-slate); }
.pl-start { margin-top: 16px; padding: 16px; font-size: 16px; }
.pl-leave { margin-top: 12px; }
#pl-room > .pl-leave { display: flex; margin: 18px auto 0; border-width: 1px; opacity: 0.8; }
.pl-btn-whatsapp { background: #25d366; color: #fff; }
.pl-btn-whatsapp:hover { background: #1eb955; }

/* ---------- the stage (a question on screen) ---------- */

.pl-stage { background: var(--card-white); border-radius: var(--radius-lg); border: 1px solid var(--pl-line); box-shadow: var(--shadow-sm); overflow: hidden; }
.pl-stage.pl-center { padding: 24px; }
.pl-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 8px; font-size: 13px; font-weight: 700; color: var(--text-slate); }
.pl-head-game i { color: var(--accent-muted-gold); margin-right: 4px; }
.pl-timer { height: 6px; background: var(--pl-soft); }
.pl-timer-fill { height: 100%; width: 100%; background: var(--secondary-sage); transition: width 0.25s linear, background 0.3s; }
.pl-timer-low { background: var(--pl-wrong); }
.pl-timer-reveal { background: var(--accent-muted-gold); }
.pl-body { padding: 18px 16px 20px; }
.pl-count { font-size: 84px; font-weight: 800; color: var(--accent-muted-gold); line-height: 1; animation: pl-pop 1s ease infinite; }
@keyframes pl-pop { 0% { transform: scale(0.7); opacity: 0.4; } 30% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

.pl-prompt { text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-slate); margin-bottom: 12px; }
.pl-emoji { text-align: center; font-size: 52px; line-height: 1.25; letter-spacing: 0.08em; margin: 6px 0 12px; word-break: break-word; }
.pl-question { font-size: 19px; font-weight: 700; line-height: 1.4; text-align: center; margin: 4px 0 16px; color: var(--text-charcoal); }
.pl-cat { display: block; width: fit-content; margin: 0 auto 10px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--pl-soft); color: var(--text-slate); text-transform: uppercase; letter-spacing: 0.05em; }
.pl-quote { font-family: var(--font-display); font-style: italic; font-size: 21px; line-height: 1.45; text-align: center; margin: 4px 0 18px; padding: 16px; border-radius: var(--radius-md); background: var(--pl-soft); color: var(--text-charcoal); }

.pl-clues { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.pl-clue { position: relative; padding: 12px 14px; border-radius: var(--radius-md); background: var(--pl-soft); font-size: 15px; line-height: 1.4; color: var(--text-charcoal); min-height: 46px; }
.pl-clue-lock { display: none; color: var(--text-slate); font-size: 13px; font-weight: 600; }
.pl-clue-hidden .pl-clue-text { display: none; }
.pl-clue-hidden .pl-clue-lock { display: inline; }
.pl-clue-hidden { border: 1px dashed var(--pl-line); background: transparent; }

.pl-options { display: grid; gap: 10px; }
.pl-options-two { grid-template-columns: 1fr 1fr; }
.pl-option {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: left; cursor: pointer; font-size: 15px; font-weight: 600;
    background: var(--card-white); color: var(--text-charcoal); border: 2px solid var(--pl-line); border-radius: var(--radius-md);
    transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.pl-options-two .pl-option { justify-content: center; padding: 18px 10px; font-size: 16px; }
.pl-option:active { transform: scale(0.98); }
.pl-option[disabled] { cursor: default; }
.pl-option-key { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--pl-soft); font-size: 13px; font-weight: 800; color: var(--text-slate); }
.pl-option-text { flex: 1; line-height: 1.35; }
.pl-options-two .pl-option-text { flex: 0 1 auto; }
.pl-option-picked { border-color: var(--accent-muted-gold); background: rgba(199, 166, 90, 0.14); }
.pl-option-right { border-color: var(--pl-right); background: rgba(46, 139, 87, 0.14); }
.pl-option-wrong { border-color: var(--pl-wrong); background: rgba(200, 85, 61, 0.12); }
.pl-option-dim { opacity: 0.5; }

.pl-verdict { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 17px; margin: 18px 0 10px; }
.pl-verdict strong { font-weight: 800; }
.pl-verdict-right { color: var(--pl-right); }
.pl-verdict-wrong { color: var(--pl-wrong); }
.pl-verdict-miss { color: var(--text-slate); }
.pl-learn { padding: 14px; border-radius: var(--radius-md); background: rgba(199, 166, 90, 0.13); border-left: 4px solid var(--accent-muted-gold); }
.pl-learn-answer { font-size: 14px; margin-bottom: 6px; color: var(--text-charcoal); }
.pl-learn-answer strong { letter-spacing: 0.12em; }
.pl-learn-text { font-size: 14px; line-height: 1.5; color: var(--text-charcoal); margin-bottom: 10px; }
.pl-ref { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: var(--primary-deep-olive); color: #f8f6f0; cursor: pointer; }
.pl-next { margin-top: 16px; }

.pl-scores { display: grid; gap: 4px; padding: 10px 16px 14px; border-top: 1px solid var(--pl-line); }
.pl-score { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--text-charcoal); }
.pl-score-me { background: rgba(199, 166, 90, 0.16); font-weight: 700; }
.pl-score-left, .pl-score-away { opacity: 0.5; }
.pl-score-left .pl-score-name { text-decoration: line-through; }
.pl-score-rank { width: 20px; text-align: center; color: var(--text-slate); font-weight: 700; }
.pl-score-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-score-tick { color: var(--pl-right); font-size: 12px; font-weight: 700; }
.pl-score-pts { font-weight: 800; font-variant-numeric: tabular-nums; }
.pl-duel { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; font-size: 12px; font-weight: 700; color: var(--text-slate); }
.pl-duel span { max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-duel-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--accent-terracotta); overflow: hidden; }
.pl-duel-fill { height: 100%; background: var(--secondary-sage); transition: width 0.5s ease; }

/* ---------- Bible Wordle ---------- */

.pl-w-grid { display: grid; gap: 6px; justify-content: center; margin-bottom: 12px; }
.pl-w-row { display: grid; grid-template-columns: repeat(5, 48px); gap: 6px; }
.pl-w-cell { height: 48px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; text-transform: uppercase; border: 2px solid var(--pl-line); border-radius: 8px; color: var(--text-charcoal); background: var(--card-white); }
.pl-w-typed { border-color: var(--text-slate); }
.pl-w-cell.pl-w-g, .pl-w-key.pl-w-g { background: var(--pl-right); border-color: var(--pl-right); color: #fff; }
.pl-w-cell.pl-w-y, .pl-w-key.pl-w-y { background: var(--accent-muted-gold); border-color: var(--accent-muted-gold); color: #fff; }
.pl-w-cell.pl-w-x, .pl-w-key.pl-w-x { background: #7b837e; border-color: #7b837e; color: #fff; }
.pl-w-hint { text-align: center; font-size: 13px; color: var(--text-charcoal); margin-bottom: 12px; line-height: 1.4; }
.pl-w-hint i { color: var(--accent-muted-gold); }
.pl-w-hint-off { color: var(--text-slate); }
.pl-w-keys { display: grid; gap: 6px; }
.pl-w-keyrow { display: flex; gap: 4px; justify-content: center; }
.pl-w-key { flex: 1; max-width: 40px; height: 46px; padding: 0; border: none; border-radius: 6px; font-size: 14px; font-weight: 700; cursor: pointer; background: var(--pl-soft); color: var(--text-charcoal); touch-action: manipulation; }
[data-theme="dark"] .pl-w-key { background: rgba(255, 255, 255, 0.12); }
.pl-w-key-wide { max-width: 56px; flex: 1.5; font-size: 18px; }
.pl-w-key[disabled] { opacity: 0.6; cursor: default; }
.pl-shake { animation: pl-shake 0.35s; }
@keyframes pl-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 360px) { .pl-w-row { grid-template-columns: repeat(5, 42px); } .pl-w-cell { height: 42px; font-size: 19px; } .pl-emoji { font-size: 42px; } }

/* ---------- results, leaderboard, badges ---------- */

.pl-xp-earned { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--card-white); border: 1px solid var(--pl-line); color: var(--text-charcoal); font-size: 14px; }
.pl-xp-earned strong { font-size: 22px; color: var(--gold-dark); }
[data-theme="dark"] .pl-xp-earned strong { color: var(--gold-light); }
.pl-xp-earned .pl-xpbar { background: var(--pl-soft); }
.pl-xp-earned small { color: var(--text-slate); margin-top: 4px; }
.pl-xp-earned a { color: var(--primary-deep-olive); font-weight: 700; text-decoration: underline; }
[data-theme="dark"] .pl-xp-earned a { color: var(--gold-light); }
.pl-xp-guest { display: block; }
.pl-new-badge { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-lg); background: rgba(199, 166, 90, 0.18); border: 1px solid rgba(199, 166, 90, 0.5); color: var(--text-charcoal); animation: pl-pop 0.6s ease 1; }
.pl-new-badge > i { font-size: 24px; color: var(--gold-dark); }
.pl-new-badge strong { display: block; font-size: 14px; }
.pl-new-badge small { font-size: 12px; color: var(--text-slate); }

.pl-board { padding: 6px 12px; }
.pl-board-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--pl-line); cursor: pointer; color: var(--text-charcoal); }
.pl-board-row:last-child { border-bottom: 0; }
.pl-board-me { background: rgba(199, 166, 90, 0.14); border-radius: 8px; }
.pl-board-rank { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: var(--text-slate); background: var(--pl-soft); flex-shrink: 0; }
.pl-board-top1 { background: #d4af37; color: #fff; }
.pl-board-top2 { background: #a8adb3; color: #fff; }
.pl-board-top3 { background: #b9773d; color: #fff; }
.pl-board-name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-board-name small { color: var(--text-slate); font-weight: 500; margin-left: 4px; }
.pl-board-value { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }

.pl-verses { padding: 6px 12px; }
.pl-verse { display: flex; align-items: flex-start; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--pl-line); flex-wrap: wrap; }
.pl-verse:last-child { border-bottom: 0; }
.pl-verse > i { margin-top: 3px; color: var(--pl-right); }
.pl-verse-missed > i { color: var(--pl-wrong); }
.pl-verse-main { flex: 1 1 60%; min-width: 0; }
.pl-verse-main strong { display: block; font-size: 14px; color: var(--text-charcoal); }
.pl-verse-main small { display: block; font-size: 13px; line-height: 1.45; color: var(--text-slate); margin-top: 2px; }
.pl-verse .btn { margin-left: 24px; white-space: nowrap; border-width: 1px; }
.pl-result-actions { display: grid; gap: 8px; margin-top: 20px; }
.pl-pulse { animation: pl-pulse 1.2s ease infinite; }
@keyframes pl-pulse { 50% { box-shadow: 0 0 0 8px rgba(199, 166, 90, 0.28); } }

.pl-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.pl-tab { flex: 1; white-space: nowrap; padding: 9px 12px; border-radius: 99px; border: 1px solid var(--pl-line); background: var(--card-white); color: var(--text-slate); font-size: 13px; font-weight: 700; cursor: pointer; }
.pl-tab-on { background: var(--primary-deep-olive); color: #f8f6f0; border-color: var(--primary-deep-olive); }

.pl-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pl-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: var(--radius-lg); border: 1px solid rgba(0, 0, 0, 0.08); opacity: 0.5; filter: grayscale(1); color: var(--text-charcoal); }
[data-theme="dark"] .pl-badge { border-color: var(--dark-border); }
.pl-badge-on { opacity: 1; filter: none; background: rgba(199, 166, 90, 0.14); border-color: rgba(199, 166, 90, 0.5); }
.pl-badge-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-muted-gold); color: #fff; font-size: 18px; }
.pl-badge strong { font-size: 13px; }
.pl-badge small { font-size: 12px; color: var(--text-slate); line-height: 1.35; }
.pl-badge em { font-size: 11px; color: var(--gold-dark); font-style: normal; font-weight: 700; }

.pl-share-preview { padding: 12px 14px; border-radius: var(--radius-md); background: rgba(48, 72, 58, 0.07); font-size: 14px; line-height: 1.5; word-break: break-word; color: var(--text-charcoal); }
[data-theme="dark"] .pl-share-preview { background: rgba(255, 255, 255, 0.06); }

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

.pl-home-card { display: flex; align-items: center; gap: 16px; cursor: pointer; }
.pl-home-card h3 { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.pl-home-card p { font-size: 13px; color: var(--text-slate); line-height: 1.4; }
.pl-home-icon { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: var(--accent-terracotta); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 21px; }

/* ---------- floating: invitation card + "return to game" pill ---------- */

.pl-invite-card {
    position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; z-index: 4000;
    width: min(440px, calc(100vw - 20px)); display: flex; gap: 12px; padding: 14px;
    background: var(--card-white); color: var(--text-charcoal); border-radius: 18px; box-shadow: var(--shadow-xl);
    border: 1px solid rgba(199, 166, 90, 0.55);
    transform: translate(-50%, -140%); opacity: 0; transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.25s;
}
.pl-invite-in { transform: translate(-50%, 0); opacity: 1; }
.pl-invite-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--accent-terracotta); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.pl-invite-main { flex: 1; min-width: 0; }
.pl-invite-main strong { display: block; font-size: 15px; line-height: 1.35; }
.pl-invite-main small { font-size: 12px; color: var(--text-slate); }
.pl-invite-timer { height: 4px; border-radius: 99px; background: rgba(0, 0, 0, 0.08); margin: 8px 0 10px; overflow: hidden; }
.pl-invite-timer div { height: 100%; width: 100%; background: var(--accent-muted-gold); }
.pl-invite-actions { display: flex; gap: 8px; }
.pl-invite-actions .btn { flex: 1; }

.pl-return-pill {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 12px); z-index: 900;
    padding: 10px 18px; border: none; border-radius: 99px; cursor: pointer; white-space: nowrap; font-family: inherit;
    background: var(--accent-terracotta); color: #fff; font-size: 13px; font-weight: 700; box-shadow: var(--shadow-lg);
    animation: pl-pulse 1.6s ease infinite;
}

/* ---------- v1.2: pinned Next, levels, rematch, live boards, tour ---------- */

/* Solo: "Next" is always on screen — pinned above the bottom bar, never below the fold. */
.pl-next {
    position: fixed; left: 16px; right: 16px; z-index: 60; width: auto; max-width: 608px; margin: 0 auto;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 12px); box-shadow: var(--shadow-lg);
}
.pl-revealed .pl-body { padding-bottom: 88px; }

.pl-levels { margin-bottom: 14px; }
.pl-levels-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.pl-levels-head small { font-size: 12px; color: var(--text-slate); }
.pl-levels-head small i { color: var(--accent-muted-gold); }
.pl-level-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pl-level-pick button { display: flex; flex-direction: column; gap: 2px; padding: 10px 8px; text-align: center; cursor: pointer; border-radius: var(--radius-md); border: 2px solid var(--pl-line); background: var(--card-white); color: var(--text-charcoal); }
.pl-level-pick button strong { font-size: 14px; }
.pl-level-pick button small { font-size: 11px; color: var(--text-slate); line-height: 1.3; }
.pl-level-pick button.on { border-color: var(--accent-muted-gold); background: rgba(199, 166, 90, 0.16); }
.pl-ai-note { font-size: 13px; color: var(--text-slate); margin: 14px 0 0; line-height: 1.45; }
.pl-ai-note i { color: var(--accent-muted-gold); margin-right: 4px; }

.pl-rematch-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: rgba(199, 166, 90, 0.2); border: 1px solid rgba(199, 166, 90, 0.55); font-size: 14px; font-weight: 700; color: var(--text-charcoal); }

.pl-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--pl-right); letter-spacing: 0; text-transform: none; margin-bottom: 8px; }
.pl-section .pl-live { margin-bottom: 0; }
.pl-live span { width: 8px; height: 8px; border-radius: 50%; background: var(--pl-right); animation: pl-blink 1.6s ease infinite; }
@keyframes pl-blink { 50% { opacity: 0.25; } }
.pl-board-gap { text-align: center; color: var(--text-slate); line-height: 1; padding: 2px 0 6px; }
.pl-board-more { margin: 10px 0 6px; }

.pl-tour { text-align: center; }
.pl-tour-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-terracotta); color: #fff; font-size: 26px; }
.pl-tour h3 { font-family: var(--font-display); font-size: 21px; margin-bottom: 8px; }
.pl-tour p { font-size: 14px; line-height: 1.55; color: var(--text-slate); min-height: 88px; }
.pl-tour-dots { display: flex; justify-content: center; gap: 6px; margin: 14px 0; }
.pl-tour-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, 0.15); }
[data-theme="dark"] .pl-tour-dots span { background: rgba(255, 255, 255, 0.2); }
.pl-tour-dots span.on { background: var(--accent-muted-gold); width: 20px; border-radius: 99px; }
.pl-tour-actions { display: flex; gap: 8px; }
.pl-tour-actions .btn { flex: 1; }
.pl-row-links { flex-wrap: wrap; }

/* ---------- v1.3: gameplay motion, Shepherd progress, badge celebration, hub tweaks ---------- */

@keyframes pl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pl-zoom { 0% { opacity: 0; transform: scale(0.6); } 70% { transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes pl-correct { 0% { transform: scale(1); } 40% { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(46, 139, 87, 0.25); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(46, 139, 87, 0); } }
@keyframes pl-press { 0% { transform: scale(1); } 50% { transform: scale(0.96); } 100% { transform: scale(1); } }
.pl-fx-question .pl-head, .pl-fx-question .pl-prompt, .pl-fx-question .pl-question, .pl-fx-question .pl-cat, .pl-fx-question .pl-quote, .pl-fx-question .pl-clue, .pl-fx-question .pl-w-grid { animation: pl-rise 0.35s ease both; }
.pl-fx-question .pl-emoji { animation: pl-zoom 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.pl-fx-question .pl-option { animation: pl-rise 0.35s ease both; }
.pl-fx-question .pl-option:nth-child(1) { animation-delay: 0.08s; }
.pl-fx-question .pl-option:nth-child(2) { animation-delay: 0.14s; }
.pl-fx-question .pl-option:nth-child(3) { animation-delay: 0.20s; }
.pl-fx-question .pl-option:nth-child(4) { animation-delay: 0.26s; }
.pl-fx-question .pl-w-keyrow { animation: pl-rise 0.35s ease 0.15s both; }
.pl-fx-pick .pl-option-picked { animation: pl-press 0.25s ease; }
.pl-fx-reveal .pl-option-right { animation: pl-correct 0.6s ease; }
.pl-fx-reveal .pl-option-wrong { animation: pl-shake 0.4s ease; }
.pl-fx-reveal .pl-verdict { animation: pl-zoom 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.pl-fx-reveal .pl-learn { animation: pl-rise 0.4s ease 0.15s both; }
.pl-fx-reveal .pl-next { animation: pl-rise 0.35s ease 0.3s both; }
.pl-fx-reveal .pl-score, .pl-fx-question .pl-score { transition: background 0.3s; }
.pl-option { will-change: transform; }
.pl-duel-fill, .pl-xpbar-fill { transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
@media (prefers-reduced-motion: reduce) {
    .pl-stage *, .pl-pop * { animation: none !important; transition: none !important; }
}

/* "Shepherd is still generating questions" */
.pl-prep { text-align: center; }
.pl-prep-icon { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--primary-deep-olive); color: #f8f6f0; font-size: 24px; animation: pl-pulse 1.6s ease infinite; }
.pl-prep h3 { font-size: 18px; margin-bottom: 2px; }
.pl-prep-sub { font-size: 13px; color: var(--text-slate); margin-bottom: 14px; }
.pl-prep-step { display: flex; align-items: center; gap: 10px; padding: 8px 4px; text-align: left; font-size: 14px; color: var(--text-slate); }
.pl-prep-dot { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid rgba(0, 0, 0, 0.12); font-size: 11px; }
[data-theme="dark"] .pl-prep-dot { border-color: rgba(255, 255, 255, 0.2); }
.pl-prep-done { color: var(--text-charcoal); }
.pl-prep-done .pl-prep-dot { background: #2e8b57; border-color: #2e8b57; color: #fff; }
.pl-prep-now { color: var(--text-charcoal); font-weight: 700; }
.pl-prep-now .pl-prep-dot { border-color: transparent; }
.pl-prep-note { font-size: 12px; line-height: 1.5; color: var(--text-slate); margin: 10px 0 14px; text-align: left; }

/* Badge celebration */
.pl-pop { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 16, 13, 0); transition: background 0.25s; overflow: hidden; }
.pl-pop-in { background: rgba(10, 16, 13, 0.72); }
.pl-pop-card { position: relative; width: min(340px, 100%); padding: 28px 22px 18px; border-radius: 24px; text-align: center; overflow: hidden; background: var(--card-white); color: var(--text-charcoal); box-shadow: var(--shadow-xl); border: 1px solid rgba(199, 166, 90, 0.6); transform: scale(0.7) translateY(30px); opacity: 0; transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.25), opacity 0.25s; }
.pl-pop-in .pl-pop-card { transform: none; opacity: 1; }
.pl-pop-rays { position: absolute; left: 50%; top: 62px; width: 320px; height: 320px; margin: -160px 0 0 -160px; border-radius: 50%; background: repeating-conic-gradient(rgba(199, 166, 90, 0.22) 0 12deg, transparent 12deg 24deg); animation: pl-spin 14s linear infinite; pointer-events: none; }
.pl-pop-badge { position: relative; width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 38px; color: #fff; background: radial-gradient(circle at 30% 25%, #e8d39a, #c7a65a 55%, #a8883d); box-shadow: 0 8px 24px rgba(199, 166, 90, 0.55), inset 0 -4px 8px rgba(0, 0, 0, 0.15); }
.pl-pop-in .pl-pop-badge { animation: pl-zoom 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.15s both; }
.pl-pop-eyebrow { position: relative; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); }
[data-theme="dark"] .pl-pop-eyebrow { color: var(--gold-light); }
.pl-pop-card h3 { position: relative; font-family: var(--font-display); font-size: 23px; margin: 4px 0 6px; }
.pl-pop-card p { position: relative; font-size: 14px; color: var(--text-slate); line-height: 1.45; }
.pl-pop-card em { position: relative; display: block; margin: 6px 0 16px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold-dark); }
.pl-pop-claim { position: relative; padding: 14px; font-size: 15px; }
.pl-pop-claimed .pl-pop-badge { animation: pl-correct 0.6s ease; }
.pl-pop-later { position: relative; margin-top: 8px; padding: 8px; width: 100%; border: none; background: none; color: var(--text-slate); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pl-pop-confetti { position: absolute; inset: 0; pointer-events: none; }
.pl-pop-confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; }
.pl-pop-in .pl-pop-confetti i { animation: pl-confetti 2.4s ease-in forwards; }
@keyframes pl-confetti { 0% { opacity: 1; transform: translateY(0) rotate(0deg); } 100% { opacity: 0; transform: translateY(105vh) rotate(540deg); } }
.pl-badge-claim { margin-top: 6px; padding: 6px 10px; }
.pl-badge-xp { margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--text-slate); }
.pl-badge-on .pl-badge-xp { color: var(--gold-dark); }

/* Small screens: anything that would squeeze its words side by side is stacked instead. */
@media (max-width: 480px) {
    .pl-level-pick { grid-template-columns: 1fr; }
    .pl-level-pick button { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; padding: 12px 14px; }
    .pl-row-links { flex-direction: column; }
    .pl-rematch-note { flex-direction: column; align-items: stretch; text-align: center; }
    .pl-tour-actions, .pl-invite-actions { flex-direction: column-reverse; }
    .pl-levels-head { flex-direction: column; gap: 2px; }
}

/* ============================================
   v1.4 - pause (for everyone in the game), start-together
   ============================================ */
.pl-head { gap: 8px; }
.pl-pause-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-full); border: 1px solid rgba(0,0,0,0.14); background: transparent; color: var(--text-slate); font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.pl-pause-btn:hover { background: rgba(0,0,0,0.05); }
.pl-pause-btn:disabled { opacity: 0.5; cursor: default; }
[data-theme="dark"] .pl-pause-btn { border-color: var(--dark-border); }
.pl-head .pl-pause-btn + .pl-head-round { margin-left: 0; }
.pl-paused { gap: 6px; padding: 28px 20px; animation: pl-zoom 0.3s ease both; }
.pl-paused-icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; background: var(--accent-muted-gold); box-shadow: 0 0 0 10px rgba(199,166,90,0.18); animation: pl-paused-pulse 1.8s ease-in-out infinite; margin-bottom: 10px; }
.pl-paused-title { font-family: var(--font-display, inherit); font-size: 22px; margin: 0; }
.pl-paused-count { font-size: 14px; color: var(--text-slate); margin: 6px 0 14px; }
.pl-paused-count strong { color: var(--text-charcoal); font-variant-numeric: tabular-nums; }
.pl-paused .btn { max-width: 320px; }
.pl-paused-note { font-size: 12px; color: var(--text-slate); margin-top: 12px; }
@keyframes pl-paused-pulse { 0%, 100% { box-shadow: 0 0 0 8px rgba(199,166,90,0.18); } 50% { box-shadow: 0 0 0 16px rgba(199,166,90,0.06); } }
@media (prefers-reduced-motion: reduce) { .pl-paused-icon, .pl-paused { animation: none; } }

/* v1.4.1 — "How to play" is a help icon in the top corner of the hub */
.pl-help-btn {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 17px;
    transition: background var(--transition-fast);
}
.pl-help-btn:hover, .pl-help-btn:focus-visible { background: rgba(255, 255, 255, 0.28); }
.pl-level-guest .pl-help-btn { margin-left: 8px; }

/* ---- v1.7.0: Quick Match offer, rematch difficulty, questions on the results ---- */
.pl-qm-offer { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pl-qm-offer .pl-game-icon { width: 64px; height: 64px; border-radius: 20px; font-size: 26px; color: #fff; margin-bottom: 4px; }
.pl-qm-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; font-weight: 700; color: var(--accent-muted-gold); }
.pl-qm-offer h3 { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.pl-qm-game { font-size: 24px; font-weight: 700; color: var(--text-charcoal); line-height: 1.2; }
.pl-qm-offer p { margin: 0; font-size: 14px; }
.pl-qm-offer .pl-qm-facts { font-weight: 600; color: var(--text-charcoal); }
.pl-qm-actions { display: flex; gap: 8px; width: 100%; margin: 10px 0 4px; }
.pl-qm-actions .btn { flex: 1; }
.pl-level-pick.pl-level-pick-stack { grid-template-columns: 1fr; }
.pl-level-pick.pl-level-pick-stack button { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; padding: 12px 14px; }
.pl-verse-q { font-size: 14px; line-height: 1.45; color: var(--text-charcoal); margin-bottom: 6px; overflow-wrap: anywhere; }
.pl-verse-q > span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-slate); margin-bottom: 2px; }
.pl-verse-q em { display: block; font-style: normal; padding-left: 10px; border-left: 2px solid var(--pl-line); margin-top: 4px; }
.pl-verse-q-emoji { font-size: 22px; letter-spacing: 2px; }
.pl-verse-q-emoji > span { letter-spacing: 0.06em; }
.pl-verse-main strong .pl-verse-a { font-weight: 600; color: var(--text-slate); }

/* ---- v1.8.0: connection care (my own connection, waiting for a player) and forfeits ---- */
.pl-net { display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin-bottom: 10px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; line-height: 1.35;
    color: #7a4a12; background: rgba(199, 166, 90, 0.2); border: 1px solid rgba(199, 166, 90, 0.55); animation: pl-net-pulse 1.6s ease-in-out infinite; }
.pl-net.hidden { display: none; }
[data-theme="dark"] .pl-net { color: var(--gold-light); }
@keyframes pl-net-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
.pl-paused-net .pl-paused-icon { background: var(--secondary-sage); box-shadow: 0 0 0 10px rgba(113, 133, 117, 0.18); }
.pl-score-name small { font-size: 11px; font-weight: 500; color: var(--text-slate); margin-left: 4px; white-space: nowrap; }
.pl-forfeit-note { margin-top: 8px; font-size: 13px; font-weight: 600; opacity: 0.95; }
@media (prefers-reduced-motion: reduce) { .pl-net { animation: none; } }

/* ---------- 1.9: Today (chest, streak, grace days, quests), bonus XP, win-streak flame, near miss ---------- */
.pl-habit { padding: 14px 16px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.pl-habit-top { display: flex; align-items: stretch; gap: 10px; }
.pl-chest { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-md); background: rgba(199, 166, 90, 0.18); border: 1px solid rgba(199, 166, 90, 0.5); color: var(--text-charcoal); }
.pl-chest-icon { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--accent-muted-gold); color: #fff; animation: pl-pop 0.6s ease 1; }
.pl-chest strong { display: block; font-size: 14px; line-height: 1.3; }
.pl-chest small { display: block; font-size: 12px; color: var(--text-slate); line-height: 1.35; }
.pl-chest-open { background: var(--pl-soft); border-color: var(--pl-line); }
.pl-chest-open .pl-chest-icon { background: var(--secondary-sage); animation: none; }
.pl-habit-streak, .pl-habit-grace { flex-shrink: 0; min-width: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 8px; border-radius: var(--radius-md); background: var(--pl-soft); border: 1px solid var(--pl-line); color: var(--text-charcoal); font: inherit; }
.pl-habit-grace { cursor: pointer; }
.pl-habit-streak i { color: var(--accent-terracotta); font-size: 15px; }
.pl-habit-grace i { color: #4A90C2; font-size: 15px; }
.pl-habit-streak strong, .pl-habit-grace strong { font-size: 16px; line-height: 1.1; }
.pl-habit-streak small, .pl-habit-grace small { font-size: 10px; color: var(--text-slate); }
.pl-habit-note { font-size: 13px; line-height: 1.45; color: var(--text-charcoal); }
.pl-habit-note i { color: var(--accent-terracotta); margin-right: 4px; }
.pl-habit-note .fa-snowflake { color: #4A90C2; }
.pl-habit-welcome { padding: 10px 12px; border-radius: var(--radius-md); background: rgba(199, 166, 90, 0.18); border: 1px solid rgba(199, 166, 90, 0.5); }
.pl-habit-welcome i { color: var(--gold-dark); }
.pl-habit-title { font-size: 14px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: var(--text-charcoal); }
.pl-habit-title span { font-size: 12px; font-weight: 500; color: var(--text-slate); }
.pl-quest { display: flex; align-items: center; gap: 10px; }
.pl-quest > i { font-size: 16px; color: var(--text-slate); opacity: 0.45; flex-shrink: 0; }
.pl-quest-done > i { opacity: 1; }
.pl-quest-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-charcoal); }
.pl-quest .pl-xpbar { background: var(--pl-soft); height: 6px; }
.pl-quest > small { font-size: 12px; font-weight: 700; color: var(--text-slate); white-space: nowrap; }
.pl-quest-done > i { color: var(--secondary-sage); }
.pl-quest-done .pl-quest-main span { text-decoration: line-through; opacity: 0.7; }
.pl-quest-done > small { color: var(--gold-dark); }
[data-theme="dark"] .pl-quest-done > small, [data-theme="dark"] .pl-habit-welcome i { color: var(--gold-light); }

.pl-bonus { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--pl-line); display: flex; flex-direction: column; gap: 6px; }
.pl-bonus li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-charcoal); }
.pl-bonus li i { width: 16px; text-align: center; color: var(--gold-dark); flex-shrink: 0; }
.pl-bonus li .fa-snowflake { color: #4A90C2; }
.pl-bonus li span { flex: 1; min-width: 0; }
.pl-bonus li b { font-weight: 700; color: var(--gold-dark); white-space: nowrap; }
[data-theme="dark"] .pl-bonus li i, [data-theme="dark"] .pl-bonus li b { color: var(--gold-light); }

.pl-flame { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--accent-terracotta); white-space: nowrap; }
.pl-flame i { font-size: 11px; }
.pl-near-miss { margin-top: 8px; font-size: 13px; font-weight: 600; opacity: 0.95; }