/* Lie Detector: light, theme-aware game UI. */
.ld-page {
    --ld-bg: var(--theme-body-bg, #f6f9ff);
    --ld-surface: var(--theme-card-bg, #ffffff);
    --ld-surface-soft: var(--theme-quiz-box-bg, #f8fbff);
    --ld-surface-strong: var(--theme-quiz-card-body-bg, #ffffff);
    --ld-text: var(--theme-card-text, #172033);
    --ld-text-strong: var(--theme-input-text, #172033);
    --ld-muted: var(--theme-table-row-text, #64748b);
    --ld-muted-soft: #7b8798;
    --ld-border: var(--theme-input-border, #dbe4ef);
    --ld-border-soft: #e8eef7;
    --ld-primary: var(--theme-primary, #2563eb);
    --ld-primary-hover: var(--theme-primary-hover, #1d4ed8);
    --ld-secondary: var(--theme-primary-2, #14b8a6);
    --ld-button-text: var(--theme-cust-btn-text, #ffffff);
    --ld-input-bg: var(--theme-card-bg, #ffffff);
    --ld-table-head: var(--theme-primary, #2563eb);
    --ld-table-head-text: var(--theme-cust-btn-text, #ffffff);
    --ld-row-odd: var(--theme-card-bg, #ffffff);
    --ld-row-even: var(--theme-quiz-box-bg, #f8fbff);
    --ld-truth: #0f9f6e;
    --ld-truth-soft: #e8f8f0;
    --ld-lie: #df3f48;
    --ld-lie-soft: #fff0f2;
    --ld-warning: #b7791f;
    --ld-warning-soft: #fff8e6;
    --ld-gold: #b45309;
    background:
        linear-gradient(180deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.48) 44%, rgba(255,255,255,0) 100%),
        var(--ld-bg);
    color: var(--ld-text);
    min-height: calc(100vh - 60px);
    padding-bottom: 3rem;
}

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

.ld-page input,
.ld-page textarea,
.ld-page select,
.ld-page button { font-family: inherit; }

.ld-page button,
.ld-page a,
.ld-page input,
.ld-page textarea { -webkit-tap-highlight-color: transparent; }

.ld-game-label {
    color: var(--ld-primary);
    display: block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.ld-muted { color: var(--ld-muted); font-size: .9rem; }
.ld-performer-name { color: var(--ld-text); }

.ld-card,
.ld-how-box,
.ld-prompt-card,
.ld-share-card,
.ld-challenge-card,
.ld-play-card,
.ld-result-hero,
.ld-breakdown-box,
.ld-lb,
.ld-save-flash {
    background: var(--ld-surface-soft);
    border: 1px solid var(--ld-border-soft);
    border-radius: 8px;
    box-shadow: none;
}

.ld-card { padding: 1.5rem; }

.ld-btn {
    align-items: center;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font-size: .95rem;
    font-weight: 800;
    gap: .45rem;
    justify-content: center;
    line-height: 1.2;
    min-height: 46px;
    padding: .78rem 1.25rem;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

.ld-btn-primary {
    background: linear-gradient(135deg, var(--ld-primary), var(--ld-secondary));
    box-shadow: 0 10px 22px rgba(37,99,235,.2);
    color: var(--ld-button-text);
    width: 100%;
}
.ld-btn-primary:hover,
.ld-btn-primary:focus {
    box-shadow: 0 13px 28px rgba(37,99,235,.26);
    color: var(--ld-button-text);
    text-decoration: none;
    transform: translateY(-1px);
}
.ld-btn-primary:disabled {
    box-shadow: none;
    cursor: not-allowed;
    opacity: .55;
    transform: none;
}

.ld-btn-ghost {
    background: var(--ld-surface);
    border: 1px solid var(--ld-border);
    color: var(--ld-text);
    width: 100%;
}
.ld-btn-ghost:hover,
.ld-btn-ghost:focus {
    border-color: var(--ld-primary);
    color: var(--ld-primary);
    text-decoration: none;
}

.ld-alert {
    background: var(--ld-warning-soft);
    border: 1px solid rgba(183,121,31,.34);
    border-radius: 8px;
    color: var(--ld-warning);
    font-size: .88rem;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
}

.ld-step { display: none; }
.ld-step.ld-active {
    animation: ldFadeUp .25s ease forwards;
    display: block;
}

@keyframes ldFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ld-dots {
    display: flex;
    gap: .42rem;
    justify-content: center;
    margin-bottom: 1.6rem;
}
.ld-dot {
    background: #cbd5e1;
    border-radius: 999px;
    height: 8px;
    transition: all .22s ease;
    width: 8px;
}
.ld-dot.active {
    background: var(--ld-primary);
    width: 26px;
}

.ld-home-wrap,
.ld-challenge-wrap,
.ld-share-wrap,
.ld-play-wrap,
.ld-write-wrap,
.ld-result-wrap,
.ld-noquiz-wrap {
    background: var(--ld-surface);
    border: 1px solid var(--ld-border-soft);
    border-radius: 10px;
    box-shadow: 0 18px 46px rgba(31,41,55,.11);
    margin: 2rem auto;
    padding: clamp(1.25rem, 3vw, 2rem);
    width: calc(100% - 2rem);
}
.ld-home-wrap,
.ld-challenge-wrap { max-width: 540px; }
.ld-share-wrap,
.ld-play-wrap { max-width: 580px; }
.ld-write-wrap,
.ld-result-wrap { max-width: 620px; }
.ld-noquiz-wrap { max-width: 460px; }

.ld-hero {
    margin-bottom: 1.7rem;
    text-align: center;
}
.ld-hero-emoji {
    background: #ffffff;
    border: 1px solid var(--ld-border-soft);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(37,99,235,.12);
    display: inline-flex;
    font-size: 2.7rem;
    height: 82px;
    align-items: center;
    justify-content: center;
    margin-bottom: .85rem;
    width: 82px;
}
.ld-hero-title {
    color: var(--ld-text);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.16;
    margin-bottom: .45rem;
}
.ld-hero-title::after {
    background: linear-gradient(90deg, var(--ld-primary), var(--ld-secondary));
    border-radius: 999px;
    content: "";
    display: block;
    height: 4px;
    margin: .75rem auto 0;
    width: 76px;
}
.ld-hero-sub {
    color: var(--ld-muted);
    font-size: .98rem;
    line-height: 1.55;
    margin: 0 auto;
    max-width: 36rem;
}

.ld-how-box {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
}
.ld-how-label {
    color: var(--ld-primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: .85rem;
    text-transform: uppercase;
}
.ld-how-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.ld-how-list li {
    align-items: flex-start;
    color: var(--ld-text);
    display: flex;
    font-size: .9rem;
    gap: .7rem;
    line-height: 1.5;
}
.ld-how-num {
    align-items: center;
    background: var(--ld-surface-soft);
    border: 1px solid var(--ld-border);
    border-radius: 999px;
    color: var(--ld-primary);
    display: flex;
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 900;
    height: 24px;
    justify-content: center;
    margin-top: 1px;
    min-width: 24px;
}

.ld-name-field,
.ld-inline-textarea,
.ld-add-more-input,
.ld-exp-field,
.ld-link-input {
    background: var(--ld-input-bg);
    border: 1px solid var(--ld-border);
    border-radius: 8px;
    color: var(--ld-text-strong);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
    width: 100%;
}
.ld-name-field {
    font-size: 1rem;
    margin-bottom: .75rem;
    min-height: 48px;
    padding: .84rem 1rem;
}
.ld-name-field::placeholder,
.ld-inline-textarea::placeholder,
.ld-add-more-input::placeholder,
.ld-link-input::placeholder { color: #8b98aa; }
.ld-name-field:focus,
.ld-inline-textarea:focus,
.ld-add-more-input:focus,
.ld-exp-field:focus,
.ld-link-input:focus {
    border-color: var(--ld-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.ld-step-title {
    color: var(--ld-text);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: .35rem;
    text-align: center;
}
.ld-step-sub {
    color: var(--ld-muted);
    font-size: .9rem;
    line-height: 1.5;
    margin-bottom: 1.45rem;
    text-align: center;
}

.ld-cat-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.15rem;
}
.ld-cat-card {
    background: var(--ld-surface);
    border: 1px solid var(--ld-border-soft);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(31,41,55,.06);
    cursor: pointer;
    min-height: 116px;
    padding: 1rem;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
    user-select: none;
}
.ld-cat-card:hover {
    border-color: var(--ld-primary);
    box-shadow: 0 10px 24px rgba(37,99,235,.12);
    transform: translateY(-1px);
}
.ld-cat-card.selected {
    background: linear-gradient(180deg, #ffffff, var(--ld-surface-soft));
    border-color: var(--ld-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.ld-cat-emoji {
    display: block;
    font-size: 1.45rem;
    margin-bottom: .36rem;
}
.ld-cat-name {
    color: var(--ld-text);
    display: block;
    font-size: .9rem;
    font-weight: 850;
    line-height: 1.25;
    margin-bottom: .2rem;
}
.ld-cat-cnt {
    color: var(--ld-muted);
    font-size: .76rem;
}
.ld-select-all {
    margin-bottom: .85rem;
    text-align: center;
}
.ld-select-all-btn,
.ld-write-own-btn {
    background: transparent;
    border: 0;
    color: var(--ld-primary);
    cursor: pointer;
    font-size: .84rem;
    font-weight: 800;
    padding: .2rem;
}
.ld-select-all-btn:hover,
.ld-write-own-btn:hover { text-decoration: underline; }
.ld-step1-footer {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.ld-feed-top { margin-bottom: 1.1rem; }
.ld-prog-bar {
    background: #dbe6f4;
    border-radius: 999px;
    height: 7px;
    margin-bottom: .5rem;
    overflow: hidden;
}
.ld-prog-fill {
    background: linear-gradient(90deg, var(--ld-primary), var(--ld-secondary));
    border-radius: inherit;
    height: 100%;
    min-width: 7px;
    transition: width .32s ease;
}
.ld-feed-label {
    color: var(--ld-muted);
    font-size: .82rem;
    text-align: center;
}
.ld-feed-label strong { color: var(--ld-primary); }

.ld-prompt-card {
    margin-bottom: .9rem;
    padding: 1.55rem 1.3rem 1.25rem;
    position: relative;
    transition: opacity .25s ease, transform .25s ease;
}
.ld-prompt-card.exit-left { opacity: 0; transform: translateX(-105%); }
.ld-prompt-card.exit-right { opacity: 0; transform: translateX(105%); }
.ld-card-cat {
    background: #eef6ff;
    border: 1px solid #d8e7ff;
    border-radius: 999px;
    color: var(--ld-primary);
    display: inline-block;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .06em;
    margin-bottom: 1.1rem;
    padding: .24rem .7rem;
    text-transform: uppercase;
}
.ld-card-text {
    align-items: center;
    color: var(--ld-text);
    display: flex;
    font-size: 1.12rem;
    font-weight: 650;
    justify-content: center;
    line-height: 1.65;
    margin-bottom: 1.35rem;
    min-height: 62px;
    text-align: center;
}
.ld-tl-row {
    display: grid;
    gap: .65rem;
    grid-template-columns: 1fr 1fr;
    margin-bottom: .9rem;
}
.ld-tl-btn,
.ld-rtl-btn,
.ld-arow-tl-btn {
    background: var(--ld-surface);
    border: 1px solid;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 850;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.ld-tl-btn {
    align-items: center;
    display: flex;
    font-size: .88rem;
    gap: .3rem;
    justify-content: center;
    min-height: 44px;
    padding: .62rem .5rem;
}
.ld-tl-truth,
.ld-rtl-truth,
.ld-arow-truth {
    border-color: rgba(15,159,110,.34);
    color: var(--ld-truth);
}
.ld-tl-truth.chosen,
.ld-tl-truth:hover,
.ld-rtl-truth.active,
.ld-arow-truth.active {
    background: var(--ld-truth-soft);
    border-color: var(--ld-truth);
}
.ld-tl-lie,
.ld-rtl-lie,
.ld-arow-lie {
    border-color: rgba(223,63,72,.34);
    color: var(--ld-lie);
}
.ld-tl-lie.chosen,
.ld-tl-lie:hover,
.ld-rtl-lie.active,
.ld-arow-lie.active {
    background: var(--ld-lie-soft);
    border-color: var(--ld-lie);
}

.ld-card-actions {
    display: grid;
    gap: .65rem;
    grid-template-columns: 1fr auto;
}
.ld-add-btn,
.ld-inline-add-btn,
.ld-arow-submit,
.ld-lock-btn,
.ld-copy-btn {
    background: linear-gradient(135deg, var(--ld-primary), var(--ld-secondary));
    border: 0;
    border-radius: 8px;
    color: var(--ld-button-text);
    cursor: pointer;
    font-weight: 850;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.ld-add-btn {
    font-size: .9rem;
    opacity: .48;
    padding: .68rem;
    pointer-events: none;
}
.ld-add-btn.ready {
    box-shadow: 0 9px 20px rgba(37,99,235,.18);
    opacity: 1;
    pointer-events: all;
}
.ld-add-btn.ready:hover,
.ld-inline-add-btn:hover,
.ld-arow-submit:hover,
.ld-lock-btn:hover:not(:disabled),
.ld-copy-btn:hover {
    box-shadow: 0 11px 22px rgba(37,99,235,.22);
    transform: translateY(-1px);
}
.ld-skip-btn,
.ld-done-btn,
.ld-inline-cancel-btn,
.ld-native-share {
    background: var(--ld-surface);
    border: 1px solid var(--ld-border);
    border-radius: 8px;
    color: var(--ld-muted);
    cursor: pointer;
    font-weight: 750;
    transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.ld-skip-btn {
    font-size: .84rem;
    padding: .68rem 1rem;
    white-space: nowrap;
}
.ld-skip-btn:hover,
.ld-done-btn:hover,
.ld-inline-cancel-btn:hover,
.ld-native-share:hover {
    border-color: var(--ld-primary);
    color: var(--ld-primary);
}
.ld-no-more {
    background: var(--ld-surface);
    border: 1px dashed var(--ld-border);
    border-radius: 8px;
    color: var(--ld-muted);
    display: none;
    font-size: .92rem;
    padding: 2rem 1.25rem;
    text-align: center;
}
.ld-no-more .ld-no-more-icon {
    display: block;
    font-size: 2.2rem;
    margin-bottom: .55rem;
}
.ld-feed-footer {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    margin-top: .25rem;
}
.ld-done-btn {
    font-size: .8rem;
    padding: .42rem .9rem;
}

.ld-inline-custom {
    background: var(--ld-surface);
    border: 1px solid var(--ld-border-soft);
    border-radius: 8px;
    display: none;
    margin-top: .75rem;
    padding: 1rem;
}
.ld-inline-custom.open {
    animation: ldFadeUp .22s ease;
    display: block;
}
.ld-inline-textarea,
.ld-add-more-input {
    display: block;
    font-size: .93rem;
    min-height: 82px;
    padding: .75rem .9rem;
    resize: vertical;
}
.ld-inline-actions {
    align-items: center;
    display: flex;
    gap: .55rem;
}
.ld-inline-add-btn {
    flex: 1;
    font-size: .85rem;
    padding: .62rem;
}
.ld-inline-cancel-btn {
    font-size: .82rem;
    padding: .62rem .9rem;
}

.ld-review-hdr {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.ld-review-title {
    color: var(--ld-text);
    font-size: 1rem;
    font-weight: 850;
}
.ld-balance {
    align-items: center;
    display: flex;
    gap: .42rem;
}
.ld-truth-pill,
.ld-lie-pill {
    border: 1px solid;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 850;
    padding: .22rem .6rem;
}
.ld-truth-pill {
    background: var(--ld-truth-soft);
    border-color: rgba(15,159,110,.34);
    color: var(--ld-truth);
}
.ld-lie-pill {
    background: var(--ld-lie-soft);
    border-color: rgba(223,63,72,.34);
    color: var(--ld-lie);
}
.ld-review-item {
    align-items: flex-start;
    background: var(--ld-surface);
    border: 1px solid var(--ld-border-soft);
    border-radius: 8px;
    display: flex;
    gap: .75rem;
    margin-bottom: .62rem;
    padding: .9rem 1rem;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.ld-review-item:focus-within {
    border-color: var(--ld-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.ld-review-main { flex: 1; min-width: 0; }
.ld-review-text {
    border-bottom: 1px dashed transparent;
    color: var(--ld-text);
    font-size: .9rem;
    line-height: 1.55;
    margin-bottom: .55rem;
    outline: none;
    transition: border-color .16s ease;
}
.ld-review-text:focus { border-bottom-color: var(--ld-primary); }
.ld-review-tl {
    display: flex;
    gap: .4rem;
    margin-bottom: .45rem;
}
.ld-rtl-btn {
    font-size: .75rem;
    padding: .24rem .62rem;
}
.ld-exp-link {
    background: transparent;
    border: 0;
    color: var(--ld-muted);
    cursor: pointer;
    font-size: .74rem;
    padding: 0;
    text-decoration: underline;
}
.ld-exp-link:hover { color: var(--ld-primary); }
.ld-exp-field {
    font-size: .8rem;
    margin-top: .4rem;
    padding: .42rem .62rem;
}
.ld-review-del {
    background: transparent;
    border: 0;
    color: rgba(223,63,72,.45);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1.35rem;
    line-height: 1;
    padding: .08rem .2rem;
    transition: color .16s ease;
}
.ld-review-del:hover { color: var(--ld-lie); }
.ld-add-more-box {
    background: var(--ld-surface-soft);
    border: 1px dashed var(--ld-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem;
}
.ld-add-more-label {
    color: var(--ld-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .08em;
    margin-bottom: .65rem;
    text-transform: uppercase;
}
.ld-add-more-footer {
    align-items: center;
    display: flex;
    gap: .55rem;
    margin-top: .6rem;
}
.ld-add-more-tl {
    display: flex;
    flex: 1;
    gap: .45rem;
}
.ld-arow-tl-btn {
    flex: 1;
    font-size: .8rem;
    padding: .46rem .4rem;
    text-align: center;
}
.ld-arow-submit {
    font-size: .82rem;
    padding: .48rem 1rem;
    white-space: nowrap;
}
.ld-lock-area {
    padding-top: .25rem;
    text-align: center;
}
.ld-min-note {
    color: var(--ld-warning);
    display: none;
    font-size: .84rem;
    margin-bottom: .75rem;
}
.ld-lock-btn {
    font-size: 1rem;
    min-height: 50px;
    padding: .9rem;
    width: 100%;
}
.ld-lock-btn:disabled {
    box-shadow: none;
    cursor: not-allowed;
    opacity: .5;
}

.ld-share-card,
.ld-challenge-card {
    margin-bottom: 1.5rem;
    padding: 2rem 1.4rem;
    text-align: center;
}
.ld-lock-icon,
.ld-challenge-icon {
    background: #eef6ff;
    border: 1px solid #d8e7ff;
    border-radius: 999px;
    color: var(--ld-primary);
    display: inline-flex;
    font-size: 2.1rem;
    height: 68px;
    align-items: center;
    justify-content: center;
    margin-bottom: .9rem;
    width: 68px;
}
.ld-share-title,
.ld-challenge-title,
.ld-score-heading {
    color: var(--ld-text);
    font-weight: 900;
    line-height: 1.28;
}
.ld-share-title,
.ld-challenge-title {
    font-size: 1.42rem;
    margin-bottom: .42rem;
}
.ld-share-sub,
.ld-challenge-sub,
.ld-tier-msg {
    color: var(--ld-muted);
    font-size: .92rem;
    line-height: 1.55;
    margin-bottom: 1.35rem;
}
.ld-link-row {
    display: flex;
    gap: .55rem;
    margin-bottom: .75rem;
}
.ld-link-input {
    flex: 1;
    font-size: .82rem;
    min-height: 42px;
    min-width: 0;
    padding: .62rem .8rem;
}
.ld-copy-btn {
    font-size: .82rem;
    padding: .62rem 1rem;
    white-space: nowrap;
}
.ld-share-actions {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.ld-wp-btn {
    background: #1fb45c;
    border-radius: 8px;
    color: #ffffff;
    display: block;
    font-size: .92rem;
    font-weight: 850;
    padding: .74rem;
    text-align: center;
    text-decoration: none;
    transition: background .16s ease, transform .16s ease;
}
.ld-wp-btn:hover,
.ld-wp-btn:focus {
    background: #188f49;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}
.ld-native-share {
    font-size: .88rem;
    padding: .72rem;
}
.ld-del-link {
    color: var(--ld-lie);
    display: block;
    font-size: .76rem;
    font-weight: 750;
    margin-top: 1rem;
    text-decoration: none;
}
.ld-del-link:hover { color: #b91c1c; }

.ld-lb {
    overflow: hidden;
    padding: 0;
}
.ld-lb-heading {
    background: var(--ld-table-head);
    color: var(--ld-table-head-text);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .1em;
    padding: .9rem 1rem;
    text-transform: uppercase;
}
.ld-lb-row {
    align-items: center;
    border-bottom: 1px solid var(--ld-border-soft);
    display: flex;
    gap: .75rem;
    padding: .72rem 1rem;
}
.ld-lb-row:nth-child(odd) { background: var(--ld-row-odd); }
.ld-lb-row:nth-child(even) { background: var(--ld-row-even); }
.ld-lb-row:last-child { border-bottom: 0; }
.ld-lb-rank {
    align-items: center;
    background: #e7effb;
    border-radius: 999px;
    color: var(--ld-primary);
    display: flex;
    flex-shrink: 0;
    font-size: .76rem;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}
.ld-lb-row:nth-child(2) .ld-lb-rank {
    background: #fff4cc;
    color: var(--ld-gold);
}
.ld-lb-row:nth-child(3) .ld-lb-rank {
    background: #eef2f7;
    color: #64748b;
}
.ld-lb-row:nth-child(4) .ld-lb-rank {
    background: #ffe8d2;
    color: #a16207;
}
.ld-lb-name {
    color: var(--ld-text);
    flex: 1;
    font-size: .9rem;
    min-width: 0;
    overflow-wrap: anywhere;
}
.ld-lb-score {
    color: var(--ld-primary);
    font-size: .86rem;
    font-weight: 900;
}

.ld-preview-row {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: center;
    margin-bottom: 1.4rem;
}
.ld-p-truth,
.ld-p-lie {
    border: 1px solid;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 850;
    padding: .55rem .9rem;
}
.ld-p-truth {
    background: var(--ld-truth-soft);
    border-color: rgba(15,159,110,.4);
    color: var(--ld-truth);
}
.ld-p-lie {
    background: var(--ld-lie-soft);
    border-color: rgba(223,63,72,.4);
    color: var(--ld-lie);
}
.ld-p-or {
    color: var(--ld-muted);
    font-size: .84rem;
    font-style: italic;
}
.ld-name-form {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.ld-play-wrap { padding-top: 1.5rem; }
.ld-play-header {
    margin-bottom: 1.35rem;
    text-align: center;
}
.ld-play-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-bottom: .48rem;
}
.ld-pd {
    background: #cbd5e1;
    border-radius: 999px;
    height: 8px;
    transition: all .18s ease;
    width: 8px;
}
.ld-pd.done { background: var(--ld-truth); }
.ld-pd.active {
    background: var(--ld-primary);
    transform: scale(1.25);
}
.ld-play-counter {
    color: var(--ld-muted);
    font-size: .82rem;
}
.ld-play-courtroom {
    background: var(--ld-surface-soft);
    border: 1px solid var(--ld-border-soft);
    border-radius: 8px;
    color: var(--ld-muted);
    font-size: .86rem;
    margin-bottom: 1.2rem;
    padding: .62rem 1rem;
    text-align: center;
}
.ld-play-courtroom strong { color: var(--ld-text); }
.ld-play-card {
    margin-bottom: 1.2rem;
    padding: 2rem 1.35rem 1.35rem;
    transition: opacity .28s ease, transform .28s ease;
}
.ld-play-card.exit {
    opacity: 0;
    transform: scale(.98) translateY(-10px);
}
.ld-play-stmt {
    align-items: center;
    color: var(--ld-text);
    display: flex;
    font-size: 1.16rem;
    font-weight: 680;
    justify-content: center;
    line-height: 1.65;
    min-height: 78px;
    padding: 0 .35rem 1.45rem;
    text-align: center;
}
.ld-play-choices {
    display: grid;
    gap: .75rem;
    grid-template-columns: 1fr 1fr;
}
.ld-choice-btn {
    background: var(--ld-surface);
    border: 1px solid;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    min-height: 112px;
    padding: 1.15rem .72rem;
    text-align: center;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    user-select: none;
    width: 100%;
}
.ld-choice-truth {
    background: var(--ld-truth-soft);
    border-color: rgba(15,159,110,.36);
}
.ld-choice-lie {
    background: var(--ld-lie-soft);
    border-color: rgba(223,63,72,.36);
}
.ld-choice-truth:hover:not(.answered),
.ld-choice-truth.selected {
    border-color: var(--ld-truth);
    box-shadow: 0 10px 22px rgba(15,159,110,.16);
    transform: translateY(-1px);
}
.ld-choice-lie:hover:not(.answered),
.ld-choice-lie.selected {
    border-color: var(--ld-lie);
    box-shadow: 0 10px 22px rgba(223,63,72,.16);
    transform: translateY(-1px);
}
.ld-choice-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: .4rem;
}
.ld-choice-label {
    display: block;
    font-size: .9rem;
    font-weight: 900;
    text-transform: uppercase;
}
.ld-choice-truth .ld-choice-label { color: var(--ld-truth); }
.ld-choice-lie .ld-choice-label { color: var(--ld-lie); }

.ld-processing {
    display: none;
    padding: 3rem 1rem;
    text-align: center;
}
.ld-spinner {
    animation: ldSpin .85s linear infinite;
    border: 3px solid #dce6f2;
    border-radius: 999px;
    border-top-color: var(--ld-primary);
    height: 56px;
    margin: 0 auto 1.2rem;
    width: 56px;
}
@keyframes ldSpin { to { transform: rotate(360deg); } }
.ld-processing h3 {
    color: var(--ld-text);
    font-size: 1.1rem;
    font-weight: 850;
    margin-bottom: .32rem;
}
.ld-processing p {
    color: var(--ld-muted);
    font-size: .86rem;
}

.ld-result-hero {
    margin-bottom: 1.25rem;
    padding: 1.85rem 1.35rem;
    text-align: center;
}
.ld-score-circle { margin: 0 auto .9rem; }
.ld-tier-badge {
    border: 1px solid;
    border-radius: 999px;
    display: inline-block;
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: .72rem;
    padding: .48rem 1.1rem;
}
.ld-tier-detector {
    background: #fff7db;
    border-color: rgba(180,83,9,.38);
    color: var(--ld-gold);
}
.ld-tier-sharp {
    background: #eaf4ff;
    border-color: rgba(37,99,235,.34);
    color: var(--ld-primary);
}
.ld-tier-coinflip {
    background: #f0fdfa;
    border-color: rgba(20,184,166,.36);
    color: #0f766e;
}
.ld-tier-fooled {
    background: var(--ld-lie-soft);
    border-color: rgba(223,63,72,.36);
    color: var(--ld-lie);
}
.ld-score-heading {
    font-size: 1.48rem;
    margin: .4rem 0 .35rem;
}
.ld-tier-msg { margin: 0; }
.ld-breakdown-box {
    margin-bottom: 1.25rem;
    padding: 1.15rem;
}
.ld-bd-header {
    color: var(--ld-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .1em;
    margin-bottom: .95rem;
    text-transform: uppercase;
}
.ld-bd-row {
    border-left: 4px solid transparent;
    border-radius: 8px;
    margin-bottom: .62rem;
    opacity: 0;
    padding: .88rem 1rem;
    transition: opacity .25s ease, transform .25s ease;
}
.ld-bd-row.vis { opacity: 1; }
.ld-bd-correct {
    background: var(--ld-truth-soft);
    border-left-color: var(--ld-truth);
}
.ld-bd-wrong {
    background: var(--ld-lie-soft);
    border-left-color: var(--ld-lie);
}
.ld-bd-text {
    color: var(--ld-text);
    font-size: .9rem;
    font-weight: 650;
    line-height: 1.5;
    margin-bottom: .48rem;
}
.ld-bd-answers {
    display: flex;
    flex-wrap: wrap;
    font-size: .81rem;
    gap: .9rem 1.25rem;
}
.ld-bd-you { color: var(--ld-muted); }
.ld-bd-actual { font-weight: 850; }
.ld-bd-ok { color: var(--ld-truth); }
.ld-bd-bad { color: var(--ld-lie); }
.ld-bd-explain {
    border-top: 1px solid rgba(100,116,139,.2);
    color: var(--ld-muted);
    font-size: .79rem;
    font-style: italic;
    margin-top: .48rem;
    padding-top: .42rem;
}

.ld-noquiz-wrap {
    text-align: center;
}
.ld-noquiz-icon {
    display: block;
    font-size: 3.2rem;
    margin-bottom: .85rem;
}
.ld-noquiz-msg {
    color: var(--ld-muted);
    font-size: .95rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}
.ld-save-flash {
    color: var(--ld-text);
    padding: 2rem;
    text-align: center;
}

/* Keep ads and shared promo modules inside clear boxes on Lie Detector pages. */
.adbanner {
    background: var(--theme-card-bg, #ffffff);
    border: 1px solid var(--theme-input-border, #dbe4ef);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(31,41,55,.08);
    margin: 1rem auto 0;
    max-width: 620px;
    overflow: hidden;
    padding: .75rem;
    text-align: center;
    width: calc(100% - 2rem);
}
.adbanner:empty { display: none; }

.ld-page .ad {
    background: var(--ld-surface-soft);
    border: 1px solid var(--ld-border-soft);
    border-radius: 8px;
    margin: 1.25rem 0 0;
    overflow: hidden;
    padding: .8rem;
    text-align: center;
    width: 100%;
}
.ld-page .ad:empty { display: none; }

.ld-page .promo-block {
    background: var(--ld-surface-soft);
    border: 1px solid var(--ld-border-soft);
    border-radius: 8px;
    margin: 1.25rem 0;
    padding: 1rem;
}
.ld-page .promo-sep {
    border: 0;
    border-top: 1px solid var(--ld-border-soft);
    margin: 1.25rem 0;
}
.ld-page .promo-block-heading {
    color: var(--ld-text);
    font-size: .98rem;
    font-weight: 850;
    margin: 0 0 1rem;
    text-align: center;
}
.ld-page .promo-external-block {
    align-items: center;
    display: flex;
    justify-content: center;
}
.ld-page .promo-external-card {
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(31,41,55,.12);
    max-width: 440px;
    width: min(440px, 100%);
}
.ld-page .promo-games-row {
    gap: .75rem;
}
.ld-page .promo-game-item .box {
    background: var(--ld-surface);
    border: 1px solid var(--ld-border-soft);
    border-radius: 8px;
    box-shadow: none;
    height: 100%;
    margin: 0;
    overflow: hidden;
}
.ld-page .promo-game-item .box h3 {
    color: var(--ld-text);
    font-size: .88rem;
    line-height: 1.35;
    margin: .55rem .45rem .7rem;
}

@media (max-width: 480px) {
    .ld-home-wrap,
    .ld-challenge-wrap,
    .ld-share-wrap,
    .ld-play-wrap,
    .ld-write-wrap,
    .ld-result-wrap,
    .ld-noquiz-wrap {
        width: calc(100% - 1rem);
        padding-left: .85rem;
        padding-right: .85rem;
    }
    .adbanner { width: calc(100% - 1rem); }
    .ld-cat-grid { gap: .55rem; }
    .ld-cat-card {
        min-height: 108px;
        padding: .82rem;
    }
    .ld-hero-title { font-size: 1.72rem; }
    .ld-card-text,
    .ld-play-stmt { font-size: 1.02rem; }
    .ld-play-choices,
    .ld-tl-row { gap: .55rem; }
    .ld-choice-btn {
        min-height: 102px;
        padding: 1rem .55rem;
    }
    .ld-link-row {
        flex-direction: column;
    }
    .ld-copy-btn { width: 100%; }
    .ld-add-more-footer {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 360px) {
    .ld-cat-grid { grid-template-columns: 1fr; }
    .ld-preview-row {
        align-items: stretch;
        flex-direction: column;
    }
    .ld-p-or { line-height: 1; }
}

/* SEO content section */
.ld-seo-section {
    max-width: 680px;
    margin: 2.5rem auto 1rem;
    padding: 0 1rem;
}
.ld-seo-block {
    margin-bottom: 2rem;
}
.ld-seo-block h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: .6rem;
}
.ld-seo-block p {
    font-size: .97rem;
    line-height: 1.75;
    color: #444;
    text-align: start;
}
