/* ============================================================
   Confession Wall — cw.css
   All classes prefixed with .cw-
   Colours driven by var(--theme-*) set by the active theme.
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--theme-font, 'Segoe UI', system-ui, sans-serif);
    min-height: 100vh;
}

/* ---------- Layout shell ---------- */
/* Scoped page vars — same pattern as .ld-page in lie.css.
   Overriding --theme-border and --theme-bg here cascades to every
   descendant automatically, fixing all 50+ border uses in one place. */
.cw-page {
    --cw-bg:      var(--theme-body-bg, #f5f0ff);
    --cw-surface: var(--theme-card-bg, #ffffff);
    --cw-primary: var(--theme-primary, #7c3aed);
    --cw-text:    var(--theme-card-text, #1a1a2e);
    --cw-muted:   var(--theme-muted, #6b7280);
    --cw-border:  rgba(124,58,237,.15);
    /* Override globals that would otherwise bleed in from the active theme */
    --theme-border:  rgba(124,58,237,.15);
    --theme-bg:      var(--theme-body-bg, #f5f0ff);
    --theme-heading: var(--theme-card-text, #1a1a2e);
    --theme-font:    'Segoe UI', system-ui, sans-serif;

    background: var(--cw-bg);
    color: var(--cw-text);
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem 4rem;
}

.cw-home-wrap,
.cw-submit-wrap,
.cw-submitted-wrap,
.cw-manage-wrap,
.cw-reveal-wrap,
.cw-results-wrap,
.cw-noquiz-wrap {
    background: var(--cw-surface);
    border: 1px solid rgba(124,58,237,.2);
    border-radius: 14px;
    box-shadow: 0 4px 6px rgba(0,0,0,.06), 0 20px 50px rgba(124,58,237,.12);
    margin: 2rem auto;
    padding: clamp(1.25rem, 3vw, 2rem);
    width: calc(100% - 2rem);
    max-width: 760px;
}

/* ---------- Buttons ---------- */
.cw-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .875rem 1.5rem;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    line-height: 1.2;
    letter-spacing: .01em;
}
.cw-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.cw-btn:active { transform: translateY(0); box-shadow: none; }

.cw-btn-primary {
    background: var(--theme-primary, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 14px rgba(124,58,237,.35);
}
.cw-btn-primary:hover { background: var(--theme-primary-hover, #6d28d9); color: #fff; }

.cw-btn-secondary {
    background: var(--theme-secondary, #f59e0b);
    color: #1a1a2e;
    box-shadow: 0 4px 14px rgba(245,158,11,.3);
}
.cw-btn-secondary:hover { background: var(--theme-secondary-hover, #d97706); color: #1a1a2e; }

.cw-btn-ghost {
    background: var(--theme-card-bg, #fff);
    color: var(--theme-primary, #7c3aed);
    border: 2px solid var(--theme-primary, #7c3aed);
    box-shadow: none;
}
.cw-btn-ghost:hover { background: var(--theme-primary, #7c3aed); color: #fff; }

.cw-btn-danger {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 4px 14px rgba(239,68,68,.3);
}
.cw-btn-danger:hover { background: #dc2626; color: #fff; }

.cw-btn[disabled], .cw-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ---------- Card ---------- */
.cw-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
}

/* ---------- Alert / info box ---------- */
.cw-alert {
    background: var(--theme-card-bg, #fff);
    border-left: 4px solid var(--theme-primary, #7c3aed);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: .95rem;
    color: var(--theme-text, #1a1a2e);
}

/* ---------- Typography ---------- */
.cw-page h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--theme-heading, #1a1a2e);
    margin: 0 0 1.25rem;
}
.cw-page h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 .75rem;
    color: var(--theme-heading, #1a1a2e);
}

/* ---------- Form elements ---------- */
.cw-input {
    width: 100%;
    padding: .875rem 1rem;
    border: 2px solid var(--theme-border, rgba(124,58,237,.25));
    border-radius: 12px;
    font-size: 1rem;
    background: var(--theme-input-bg, #f9f7ff);
    color: var(--theme-text, #1a1a2e);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.cw-input:focus {
    border-color: var(--theme-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.cw-textarea {
    resize: vertical;
    min-height: 90px;
}

.cw-label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .4rem;
    color: var(--theme-heading, #1a1a2e);
}

.cw-form-group { margin-bottom: 1.25rem; }

/* ---------- Char counter ---------- */
.cw-char-counter {
    text-align: right;
    font-size: .78rem;
    color: var(--theme-muted, #888);
    margin-top: .25rem;
}
.cw-char-counter.cw-near { color: #f59e0b; }
.cw-char-counter.cw-over { color: #ef4444; }

/* ============================================================
   HOME PAGE
   ============================================================ */
.cw-hero {
    text-align: center;
    margin-bottom: 2rem;
}
.cw-hero-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: .75rem;
    display: block;
}
.cw-hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--theme-heading, #1a1a2e);
    margin: 0 0 .5rem;
}
.cw-hero-sub {
    font-size: 1.05rem;
    color: var(--theme-muted, #666);
    margin: 0;
    max-width: 480px;
    margin: 0 auto;
}

/* Steps */
.cw-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.cw-step {
    background: var(--theme-card-bg, #fff);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.cw-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--theme-primary, #7c3aed);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto .75rem;
}
.cw-step p {
    margin: 0;
    font-size: .875rem;
    color: var(--theme-text, #1a1a2e);
    line-height: 1.5;
}

/* Theme selector */
.cw-theme-section { margin-bottom: 2rem; }
.cw-theme-section h3 { margin-bottom: 1rem; }

.cw-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .75rem;
}
.cw-theme-card {
    position: relative;
    cursor: pointer;
}
.cw-theme-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.cw-theme-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1rem .75rem;
    border-radius: 14px;
    border: 2px solid var(--theme-border, rgba(124,58,237,.15));
    background: var(--theme-card-bg, #fff);
    transition: border-color .2s, box-shadow .2s, transform .15s;
    text-align: center;
}
.cw-theme-inner:hover {
    border-color: var(--theme-primary, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.cw-theme-card input:checked + .cw-theme-inner {
    border-color: var(--theme-primary, #7c3aed);
    background: linear-gradient(135deg, rgba(124,58,237,.06), rgba(245,158,11,.06));
    box-shadow: 0 0 0 3px rgba(124,58,237,.12), 0 4px 16px rgba(0,0,0,.08);
}
.cw-theme-emoji { font-size: 2rem; line-height: 1; }
.cw-theme-name {
    font-size: .8rem;
    font-weight: 600;
    color: var(--theme-text, #1a1a2e);
    line-height: 1.3;
}

/* Host name form */
.cw-create-section { margin-bottom: 1.5rem; }

/* ============================================================
   SUBMIT PAGE
   ============================================================ */
.cw-submit-wrap h2 { margin-bottom: .25rem; }
.cw-submit-host {
    font-size: .95rem;
    color: var(--theme-muted, #666);
    margin-bottom: 1.5rem;
}

/* Progress bar */
.cw-progress-wrap {
    margin-bottom: 1.75rem;
}
.cw-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: .82rem;
    color: var(--theme-muted, #888);
    margin-bottom: .4rem;
}
.cw-progress-bar {
    height: 8px;
    background: var(--theme-border, rgba(124,58,237,.15));
    border-radius: 99px;
    overflow: hidden;
}
.cw-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #f59e0b));
    border-radius: 99px;
    transition: width .4s ease;
}

/* Accordion */
.cw-accordion { border-radius: 16px; overflow: hidden; border: 1.5px solid var(--theme-border, rgba(124,58,237,.15)); margin-bottom: 1.5rem; }
.cw-accordion-item + .cw-accordion-item { border-top: 1px solid var(--theme-border, rgba(124,58,237,.12)); }

.cw-accordion-btn {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--theme-card-bg, #fff);
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: .95rem;
    font-weight: 500;
    color: var(--theme-text, #1a1a2e);
    transition: background .15s;
}
.cw-accordion-btn:hover { background: rgba(124,58,237,.04); }
.cw-accordion-btn.cw-acc-open { background: rgba(124,58,237,.07); font-weight: 600; }

.cw-acc-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--theme-primary, #7c3aed);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cw-acc-check {
    margin-left: auto;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity .2s;
}
.cw-accordion-btn.cw-acc-done .cw-acc-check { opacity: 1; }
.cw-acc-chevron {
    margin-left: .5rem;
    font-size: .75rem;
    transition: transform .25s;
    opacity: .6;
}
.cw-accordion-btn.cw-acc-open .cw-acc-chevron { transform: rotate(180deg); }

.cw-accordion-body {
    display: none;
    padding: 1rem 1.25rem 1.25rem;
    background: var(--theme-card-bg, #fff);
}
.cw-accordion-body.cw-acc-active { display: block; }

/* Optional toggle */
.cw-optional-toggle {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .85rem;
    color: var(--theme-muted, #888);
    margin-bottom: .75rem;
    cursor: pointer;
    user-select: none;
}
.cw-optional-toggle input { cursor: pointer; }

/* Skip notice */
.cw-skip-notice {
    font-size: .8rem;
    color: var(--theme-muted, #888);
    text-align: center;
    margin-top: .75rem;
}

/* ============================================================
   SUBMITTED / WAITING ROOM
   ============================================================ */
.cw-submitted-wrap {
    text-align: center;
    padding-top: 3rem;
}
.cw-wait-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}
.cw-wait-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--theme-heading, #1a1a2e);
    margin-bottom: .5rem;
}
.cw-wait-msg {
    font-size: 1rem;
    color: var(--theme-muted, #666);
    margin-bottom: 2rem;
}

/* Spinner */
.cw-spinner-wrap { margin: 1.5rem 0 2rem; }
.cw-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid var(--theme-border, rgba(124,58,237,.2));
    border-top-color: var(--theme-primary, #7c3aed);
    border-radius: 50%;
    animation: cw-spin .9s linear infinite;
    margin: 0 auto;
}
@keyframes cw-spin { to { transform: rotate(360deg); } }

.cw-participant-count {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--theme-card-bg, #fff);
    border-radius: 99px;
    padding: .5rem 1.25rem;
    font-size: .95rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.15));
    margin-bottom: 1.5rem;
}
.cw-participant-count span { color: var(--theme-primary, #7c3aed); font-size: 1.1rem; }

.cw-poll-note {
    font-size: .8rem;
    color: var(--theme-muted, #aaa);
    margin-top: .5rem;
}

/* ============================================================
   MANAGE PAGE
   ============================================================ */
.cw-manage-wrap { max-width: 660px; }
.cw-manage-wrap h2 { margin-bottom: .25rem; }

/* Status badge */
.cw-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .9rem;
    border-radius: 99px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.cw-status-open   { background: rgba(16,185,129,.12); color: #059669; }
.cw-status-locked { background: rgba(245,158,11,.15); color: #b45309; }
.cw-status-reveal { background: rgba(124,58,237,.12); color: #6d28d9; }

/* Stat chips */
.cw-stat-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.cw-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--theme-card-bg, #fff);
    border-radius: 14px;
    padding: .75rem 1.25rem;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    min-width: 100px;
    flex: 1;
}
.cw-stat-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--theme-primary, #7c3aed);
    line-height: 1;
}
.cw-stat-lbl {
    font-size: .75rem;
    color: var(--theme-muted, #888);
    margin-top: .25rem;
    text-align: center;
}

/* Copy link rows */
.cw-copy-row {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
    align-items: stretch;
}
.cw-copy-input {
    flex: 1;
    padding: .7rem 1rem;
    border: 2px solid var(--theme-border, rgba(124,58,237,.2));
    border-radius: 12px;
    font-size: .85rem;
    background: var(--theme-input-bg, #f9f7ff);
    color: var(--theme-muted, #555);
    outline: none;
    min-width: 0;
}
.cw-copy-btn {
    padding: .7rem 1rem;
    border: none;
    border-radius: 12px;
    background: var(--theme-primary, #7c3aed);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
}
.cw-copy-btn:hover { background: var(--theme-primary-hover, #6d28d9); }
.cw-copy-btn.cw-copied { background: #10b981; }

/* Participant list */
.cw-participant-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.cw-participant-chip {
    background: rgba(124,58,237,.08);
    color: var(--theme-primary, #7c3aed);
    border-radius: 99px;
    padding: .3rem .85rem;
    font-size: .82rem;
    font-weight: 500;
}

/* Open wall form */
.cw-open-wall-form { margin-top: 1.5rem; }
.cw-open-wall-confirm {
    font-size: .85rem;
    color: var(--theme-muted, #888);
    margin-bottom: 1rem;
}

/* ============================================================
   REVEAL PAGE (guessing game)
   ============================================================ */
.cw-reveal-wrap { max-width: 800px; }
.cw-reveal-wrap h2 { margin-bottom: .25rem; }
.cw-reveal-sub {
    font-size: .95rem;
    color: var(--theme-muted, #666);
    margin-bottom: 1.5rem;
}

/* Tabs */
.cw-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    padding-bottom: 2px;
}
.cw-tabs {
    display: flex;
    gap: .5rem;
    min-width: max-content;
    border-bottom: 2px solid var(--theme-border, rgba(124,58,237,.15));
    padding-bottom: 0;
}
.cw-tab {
    padding: .6rem 1.1rem;
    border-radius: 10px 10px 0 0;
    border: none;
    background: transparent;
    font-size: .875rem;
    font-weight: 500;
    color: var(--theme-muted, #888);
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, background .15s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    position: relative;
}
.cw-tab:hover { color: var(--theme-primary, #7c3aed); background: rgba(124,58,237,.04); }
.cw-tab.cw-tab-active {
    color: var(--theme-primary, #7c3aed);
    font-weight: 700;
    border-bottom-color: var(--theme-primary, #7c3aed);
    background: rgba(124,58,237,.05);
}

.cw-tab-panel { display: none; }
.cw-tab-panel.cw-panel-active { display: block; }

/* Confession cards / sticky notes */
.cw-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.cw-sticky {
    border-radius: 4px 4px 4px 20px;
    padding: 1.25rem 1rem 1rem;
    position: relative;
    box-shadow: 3px 5px 16px rgba(0,0,0,.13), 0 1px 3px rgba(0,0,0,.08);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
    cursor: default;
}
.cw-sticky::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,.06);
    border-radius: 0 8px 0 20px;
}
.cw-sticky:hover { transform: rotate(-1deg) translateY(-3px); box-shadow: 5px 8px 22px rgba(0,0,0,.18); }

.cw-sticky-amber  { background: #fef3c7; }
.cw-sticky-pink   { background: #fce7f3; }
.cw-sticky-mint   { background: #d1fae5; }
.cw-sticky-sky    { background: #dbeafe; }
.cw-sticky-lavender { background: #ede9fe; }
.cw-sticky-peach  { background: #fed7aa; }
.cw-sticky-rose   { background: #ffe4e6; }
.cw-sticky-lime   { background: #ecfccb; }

.cw-sticky-text {
    font-size: .9rem;
    line-height: 1.5;
    color: #1a1a2e;
    flex: 1;
    word-break: break-word;
}

.cw-sticky-footer {
    margin-top: .75rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(0,0,0,.08);
    font-size: .75rem;
    color: rgba(0,0,0,.4);
}

/* Correct guess indicator */
.cw-sticky.cw-guessed-correct { outline: 3px solid #10b981; }
.cw-sticky.cw-guessed-wrong   { outline: 3px solid #f87171; opacity: .8; }

/* Guess chips (name buttons) */
.cw-guess-section {
    margin-top: .75rem;
}
.cw-guess-label {
    font-size: .72rem;
    font-weight: 600;
    color: rgba(0,0,0,.5);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .4rem;
}
.cw-name-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.cw-name-chip {
    padding: .25rem .65rem;
    border-radius: 99px;
    border: 1.5px solid rgba(0,0,0,.18);
    background: rgba(255,255,255,.7);
    font-size: .75rem;
    font-weight: 500;
    cursor: pointer;
    color: #1a1a2e;
    transition: background .15s, border-color .15s, transform .1s;
    line-height: 1.4;
}
.cw-name-chip:hover { background: rgba(0,0,0,.1); transform: scale(1.05); }
.cw-name-chip.cw-chip-selected {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}
.cw-name-chip.cw-chip-correct {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}
.cw-name-chip.cw-chip-wrong {
    background: #f87171;
    color: #fff;
    border-color: #f87171;
}

/* Saving indicator on chip */
.cw-chip-saving { opacity: .6; pointer-events: none; }

/* Score mini tracker (sticky footer on reveal) */
.cw-score-tracker {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    background: var(--theme-primary, #7c3aed);
    color: #fff;
    border-radius: 99px;
    padding: .6rem 1.25rem;
    font-size: .9rem;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(124,58,237,.4);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: transform .2s;
}
.cw-score-tracker:hover { transform: scale(1.05); }
.cw-score-tracker a { color: #fff; text-decoration: none; }

/* ============================================================
   RESULTS PAGE
   ============================================================ */
.cw-results-wrap { text-align: center; }

/* Score ring */
.cw-score-hero { margin-bottom: 2.5rem; }
.cw-score-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(var(--theme-primary, #7c3aed) var(--pct, 0%), var(--theme-border, rgba(124,58,237,.15)) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}
.cw-score-ring::after {
    content: '';
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: var(--theme-bg, #f5f0ff);
}
.cw-score-num {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--theme-heading, #1a1a2e);
    position: relative;
    z-index: 1;
    line-height: 1;
}
.cw-score-total {
    font-size: 1rem;
    color: var(--theme-muted, #888);
    position: relative;
    z-index: 1;
    align-self: flex-end;
    padding-bottom: .35rem;
    margin-left: .2rem;
}

/* Tier badge */
.cw-tier-badge {
    display: inline-block;
    padding: .35rem 1.25rem;
    border-radius: 99px;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}
.cw-tier-master  { background: rgba(245,158,11,.15); color: #92400e; border: 1.5px solid rgba(245,158,11,.4); }
.cw-tier-sharp   { background: rgba(124,58,237,.12); color: #5b21b6; border: 1.5px solid rgba(124,58,237,.3); }
.cw-tier-average { background: rgba(59,130,246,.12); color: #1e40af; border: 1.5px solid rgba(59,130,246,.3); }
.cw-tier-fooled  { background: rgba(239,68,68,.1);   color: #991b1b; border: 1.5px solid rgba(239,68,68,.25); }

.cw-score-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--theme-heading, #1a1a2e);
    margin: 0 0 .4rem;
}
.cw-score-sub {
    font-size: .95rem;
    color: var(--theme-muted, #666);
    margin: 0;
}

/* Breakdown box */
.cw-breakdown-box {
    background: var(--theme-card-bg, #fff);
    border-radius: 20px;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    overflow: hidden;
    text-align: left;
    margin-bottom: 1.75rem;
}
.cw-bd-header {
    background: linear-gradient(90deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #f59e0b));
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    padding: .75rem 1.25rem;
    letter-spacing: .03em;
}
.cw-bd-prompt-group { padding: 1rem 1.25rem; border-top: 1px solid var(--theme-border, rgba(124,58,237,.1)); }
.cw-bd-prompt-group:first-of-type { border-top: none; }
.cw-bd-prompt-label {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--theme-primary, #7c3aed);
    margin-bottom: .6rem;
}
.cw-bd-row {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .6rem .75rem;
    border-radius: 10px;
    margin-bottom: .5rem;
    border-left: 4px solid transparent;
}
.cw-bd-correct { background: rgba(16,185,129,.07); border-left-color: #10b981; }
.cw-bd-wrong   { background: rgba(239,68,68,.07);  border-left-color: #f87171; }
.cw-bd-confession { font-size: .9rem; color: var(--theme-text, #1a1a2e); font-style: italic; }
.cw-bd-meta { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8rem; }
.cw-bd-you  { color: var(--theme-muted, #666); }
.cw-bd-actual { font-weight: 500; }
.cw-bd-ok  { color: #059669; }
.cw-bd-bad { color: #dc2626; }

/* Leaderboard */
.cw-lb {
    background: var(--theme-card-bg, #fff);
    border-radius: 20px;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    overflow: hidden;
    margin-bottom: 1.75rem;
    text-align: left;
}
.cw-lb-heading {
    background: linear-gradient(90deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #f59e0b));
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    padding: .75rem 1.25rem;
    letter-spacing: .03em;
}
.cw-lb-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .8rem 1.25rem;
    border-top: 1px solid var(--theme-border, rgba(124,58,237,.08));
    transition: background .15s;
}
.cw-lb-row:first-of-type { border-top: none; }
.cw-lb-row:hover { background: rgba(124,58,237,.03); }
.cw-lb-me { background: rgba(124,58,237,.07) !important; font-weight: 600; }
.cw-lb-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--theme-border, rgba(124,58,237,.12));
    color: var(--theme-primary, #7c3aed);
    font-weight: 700;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cw-lb-row:nth-child(2) .cw-lb-rank { background: #fef3c7; color: #92400e; }
.cw-lb-row:nth-child(3) .cw-lb-rank { background: #e2e8f0; color: #475569; }
.cw-lb-row:nth-child(4) .cw-lb-rank { background: #fed7aa; color: #92400e; }
.cw-lb-name { flex: 1; font-size: .95rem; color: var(--theme-text, #1a1a2e); }
.cw-lb-score { font-size: .85rem; font-weight: 600; color: var(--theme-primary, #7c3aed); }

/* ============================================================
   NO-QUIZ PAGE
   ============================================================ */
.cw-noquiz-wrap {
    text-align: center;
    padding-top: 4rem;
    max-width: 440px;
    margin: 0 auto;
}
.cw-noquiz-icon {
    font-size: 5rem;
    line-height: 1;
    display: block;
    margin-bottom: 1rem;
    animation: cw-bounce .8s ease infinite alternate;
}
@keyframes cw-bounce { to { transform: translateY(-10px); } }
.cw-noquiz-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--theme-heading, #1a1a2e);
    margin: 0 0 .6rem;
}
.cw-noquiz-msg {
    font-size: 1rem;
    color: var(--theme-muted, #666);
    margin-bottom: 2rem;
}

/* ============================================================
   STATIC PAGES (about, contact, privacy)
   ============================================================ */
.cw-static-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--theme-text, #1a1a2e);
}
.cw-static-content p { margin: 0 0 1rem; }
.cw-static-content h3 { color: var(--theme-primary, #7c3aed); }

/* ============================================================
   SHARED UTILITIES
   ============================================================ */
.cw-divider {
    border: none;
    border-top: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    margin: 1.5rem 0;
}

.cw-muted { color: var(--theme-muted, #888); font-size: .875rem; }

.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1.5rem; }
.ad { margin-top: 1.5rem; text-align: center; }

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.cw-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: #1a1a2e;
    color: #fff;
    border-radius: 99px;
    padding: .65rem 1.5rem;
    font-size: .875rem;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
    white-space: nowrap;
    pointer-events: none;
}
.cw-toast.cw-toast-show { transform: translateX(-50%) translateY(0); }
.cw-toast.cw-toast-success { background: #059669; }
.cw-toast.cw-toast-error   { background: #dc2626; }

/* ============================================================
   NAVBAR overrides (match lie detector pattern)
   ============================================================ */
.cw-navbar {
    background: var(--theme-card-bg, #fff);
    border-bottom: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.cw-navbar-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cw-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--theme-primary, #7c3aed);
}
.cw-brand-icon { font-size: 1.4rem; }
.cw-nav-links {
    display: flex;
    gap: .25rem;
    flex-wrap: wrap;
}
.cw-nav-link {
    padding: .4rem .85rem;
    border-radius: 99px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--theme-text, #1a1a2e);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.cw-nav-link:hover {
    background: rgba(124,58,237,.08);
    color: var(--theme-primary, #7c3aed);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .cw-page { padding: 1.25rem .75rem 3rem; }
    .cw-cards-grid { grid-template-columns: 1fr 1fr; }
    .cw-score-ring { width: 110px; height: 110px; }
    .cw-score-num { font-size: 2rem; }
    .cw-stat-row { gap: .5rem; }
    .cw-copy-row { flex-direction: column; }
    .cw-copy-input { width: 100%; }
    .cw-score-tracker { right: .75rem; bottom: .75rem; font-size: .8rem; padding: .5rem 1rem; }
}
@media (max-width: 400px) {
    .cw-cards-grid { grid-template-columns: 1fr; }
    .cw-theme-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   STEP-BY-STEP SUBMIT WIZARD
   ============================================================ */

/* Progress bar at top of wizard */
.cw-sq-prog-wrap {
    margin-bottom: 1.5rem;
}
.cw-sq-prog-bar {
    height: 6px;
    background: var(--theme-border, rgba(124,58,237,.15));
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: .4rem;
}
.cw-sq-prog-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #f59e0b));
    border-radius: 99px;
    transition: width .4s ease;
    min-width: 0;
}
.cw-sq-prog-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--theme-muted, #888);
    text-align: center;
    letter-spacing: .02em;
}

/* Step container — only the active step is shown */
.cw-sq-step { display: none; }
.cw-sq-step.cw-sq-active {
    display: block;
    animation: cwSqFade .25s ease forwards;
}
@keyframes cwSqFade {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Card shell */
.cw-sq-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 20px;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    box-shadow: 0 8px 32px rgba(0,0,0,.09);
    padding: 2rem 1.75rem 1.75rem;
    text-align: center;
}

/* Large icon / emoji at top of card */
.cw-sq-icon {
    font-size: 3rem;
    line-height: 1;
    display: block;
    margin-bottom: .85rem;
}

/* Title and subtitle */
.cw-sq-title {
    font-size: clamp(1.3rem, 4vw, 1.65rem);
    font-weight: 800;
    color: var(--theme-heading, #1a1a2e);
    margin: 0 0 .5rem;
    line-height: 1.25;
}
.cw-sq-sub {
    font-size: .95rem;
    color: var(--theme-muted, #666);
    margin: 0 0 1.5rem;
    line-height: 1.55;
}

/* Question counter badge */
.cw-sq-q-badge {
    display: inline-flex;
    align-items: baseline;
    gap: .2rem;
    background: rgba(124,58,237,.08);
    border-radius: 99px;
    padding: .3rem .9rem;
    margin-bottom: 1.1rem;
}
.cw-sq-q-num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--theme-primary, #7c3aed);
}
.cw-sq-q-of {
    font-size: .8rem;
    font-weight: 600;
    color: var(--theme-muted, #888);
}

/* Question text */
.cw-sq-q-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--theme-heading, #1a1a2e);
    line-height: 1.5;
    margin: 0 0 1.25rem;
    text-align: left;
}

/* Validation note (hidden by default) */
.cw-sq-min-note {
    display: none;
    font-size: .82rem;
    color: #ef4444;
    text-align: left;
    margin-top: .3rem;
    margin-bottom: .25rem;
}

/* Input error state */
.cw-name-field.cw-input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

/* Action buttons row (Back / Skip / Next) */
.cw-sq-actions {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: .65rem;
    margin-top: 1.25rem;
    align-items: stretch;
}
.cw-sq-actions .cw-btn { width: auto; }
.cw-sq-actions .cw-sq-next-btn { width: 100%; }

/* Left-align textarea + char row inside card */
.cw-sq-card .cw-confession-area { text-align: left; }
.cw-sq-card .cw-char-row { text-align: left; }
.cw-sq-card .cw-form-group { text-align: left; }

/* Review summary list */
.cw-sq-review-list {
    margin: 1rem 0 1.5rem;
    text-align: left;
}
.cw-sq-rev-row {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .65rem .75rem;
    border-radius: 10px;
    margin-bottom: .5rem;
    border-left: 3px solid transparent;
}
.cw-sq-rev-done {
    background: rgba(16,185,129,.06);
    border-left-color: #10b981;
}
.cw-sq-rev-skip {
    background: rgba(100,116,139,.06);
    border-left-color: #94a3b8;
}
.cw-sq-rev-icon {
    font-size: .9rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: .1rem;
    width: 18px;
    text-align: center;
}
.cw-sq-rev-done .cw-sq-rev-icon { color: #10b981; }
.cw-sq-rev-skip .cw-sq-rev-icon { color: #94a3b8; }
.cw-sq-rev-body { flex: 1; min-width: 0; }
.cw-sq-rev-q {
    font-size: .8rem;
    font-weight: 600;
    color: var(--theme-muted, #666);
    margin-bottom: .2rem;
    line-height: 1.3;
}
.cw-sq-rev-ans {
    font-size: .88rem;
    color: var(--theme-text, #1a1a2e);
    line-height: 1.4;
    font-style: italic;
    word-break: break-word;
}
.cw-sq-rev-answer-btn,
.cw-sq-rev-edit-btn {
    display: inline;
    background: none;
    border: none;
    padding: 0 .1rem;
    font-size: .8rem;
    font-style: normal;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cw-sq-rev-answer-btn { color: var(--cw-primary, #7c3aed); }
.cw-sq-rev-edit-btn   { color: var(--cw-muted, #6b7280); }

@media (max-width: 480px) {
    .cw-sq-card { padding: 1.5rem 1.1rem 1.35rem; }
    .cw-sq-actions { grid-template-columns: 1fr 1fr; }
    .cw-sq-actions .cw-sq-next-btn { grid-column: 1 / -1; }
}

/* ============================================================
   MISSING / ALIAS CLASSES — view HTML uses these names
   ============================================================ */

/* ---------- Hero icon / title aliases ---------- */
.cw-hero-emoji {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: .75rem;
    display: block;
}
.cw-hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--theme-heading, #1a1a2e);
    margin: 0 0 .5rem;
}

/* ---------- How-to instructions box (home page) ---------- */
.cw-how-box {
    background: var(--theme-card-bg, #fff);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.15));
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.cw-how-label {
    color: var(--theme-primary, #7c3aed);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    margin-bottom: .85rem;
    text-transform: uppercase;
}
.cw-how-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.cw-how-list li {
    align-items: flex-start;
    color: var(--theme-text, #1a1a2e);
    display: flex;
    font-size: .9rem;
    gap: .7rem;
    line-height: 1.5;
}
.cw-how-num {
    align-items: center;
    background: rgba(124,58,237,.08);
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.25));
    border-radius: 50%;
    color: var(--theme-primary, #7c3aed);
    display: flex;
    flex-shrink: 0;
    font-size: .72rem;
    font-weight: 800;
    height: 24px;
    justify-content: center;
    margin-top: 2px;
    min-width: 24px;
}

/* ---------- Field label & name input aliases ---------- */
.cw-field-label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .4rem;
    color: var(--theme-heading, #1a1a2e);
}
.cw-name-field {
    width: 100%;
    padding: .875rem 1rem;
    border: 2px solid var(--theme-border, rgba(124,58,237,.25));
    border-radius: 12px;
    font-size: 1rem;
    background: var(--theme-input-bg, #f9f7ff);
    color: var(--theme-text, #1a1a2e);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    min-height: 48px;
    font-family: inherit;
}
.cw-name-field:focus {
    border-color: var(--theme-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.cw-name-field::placeholder { color: #8b98aa; }

/* ---------- Theme card — flat layout (no .cw-theme-inner wrapper) ---------- */
.cw-theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    padding: 1rem .75rem;
    border-radius: 14px;
    border: 2px solid var(--theme-border, rgba(124,58,237,.15));
    background: var(--theme-card-bg, #fff);
    transition: border-color .2s, box-shadow .2s, transform .15s;
    text-align: center;
    cursor: pointer;
    position: relative;
}
.cw-theme-card:hover {
    border-color: var(--theme-primary, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.cw-theme-card.selected {
    border-color: var(--theme-primary, #7c3aed);
    background: linear-gradient(135deg, rgba(124,58,237,.06), rgba(245,158,11,.06));
    box-shadow: 0 0 0 3px rgba(124,58,237,.12), 0 4px 16px rgba(0,0,0,.08);
}
.cw-theme-check {
    position: absolute;
    top: .4rem;
    right: .5rem;
    font-size: .8rem;
    color: var(--theme-primary, #7c3aed);
    font-weight: 700;
    opacity: 0;
    transition: opacity .2s;
}
.cw-theme-card.selected .cw-theme-check { opacity: 1; }
.cw-theme-desc {
    font-size: .72rem;
    color: var(--theme-muted, #888);
    line-height: 1.3;
}

/* ============================================================
   SUBMIT PAGE — missing classes
   ============================================================ */
.cw-anon-note {
    background: rgba(124,58,237,.07);
    border-radius: 10px;
    padding: .65rem 1rem;
    font-size: .85rem;
    color: var(--theme-muted, #666);
    margin-bottom: 1.25rem;
}

/* Progress bar aliases */
.cw-prog-bar-wrap { margin-bottom: 1.75rem; }
.cw-prog-bar {
    height: 8px;
    background: var(--theme-border, rgba(124,58,237,.15));
    border-radius: 99px;
    overflow: hidden;
}
.cw-prog-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--theme-primary, #7c3aed), var(--theme-secondary, #f59e0b));
    border-radius: 99px;
    transition: width .4s ease;
    min-width: 0;
}
.cw-prog-label {
    font-size: .82rem;
    color: var(--theme-muted, #888);
    margin-top: .4rem;
    text-align: center;
}

/* Accordion aliases */
.cw-acc-list {
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.15));
    margin-bottom: 1.5rem;
}
.cw-acc-item {
    border-top: 1px solid var(--theme-border, rgba(124,58,237,.12));
}
.cw-acc-item:first-child { border-top: none; }
.cw-acc-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--theme-card-bg, #fff);
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: .95rem;
    font-weight: 500;
    color: var(--theme-text, #1a1a2e);
    transition: background .15s;
}
.cw-acc-head:hover { background: rgba(124,58,237,.04); }
.cw-acc-item.open > .cw-acc-head {
    background: rgba(124,58,237,.07);
    font-weight: 600;
}
.cw-acc-q { flex: 1; min-width: 0; line-height: 1.4; }
.cw-acc-status {
    font-size: 1rem;
    opacity: 0;
    transition: opacity .2s;
    flex-shrink: 0;
    color: #10b981;
}
.cw-acc-item.open > .cw-acc-head .cw-acc-status,
.cw-acc-item .cw-acc-head.done .cw-acc-status { opacity: 1; }
.cw-acc-arrow {
    font-size: .75rem;
    opacity: .6;
    transition: transform .25s;
    margin-left: .25rem;
    flex-shrink: 0;
}
.cw-acc-item.open .cw-acc-arrow { transform: rotate(180deg); }
.cw-acc-body {
    padding: 1rem 1.25rem 1.25rem;
    background: var(--theme-card-bg, #fff);
    border-top: 1px solid var(--theme-border, rgba(124,58,237,.08));
}
.cw-confession-area {
    width: 100%;
    padding: .875rem 1rem;
    border: 2px solid var(--theme-border, rgba(124,58,237,.25));
    border-radius: 12px;
    font-size: 1rem;
    background: var(--theme-input-bg, #f9f7ff);
    color: var(--theme-text, #1a1a2e);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
    display: block;
}
.cw-confession-area:focus {
    border-color: var(--theme-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.cw-char-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: .3rem;
    font-size: .78rem;
}
.cw-char-hint { color: var(--theme-muted, #aaa); }
.cw-char-count { color: var(--theme-muted, #888); }
.cw-char-warn { color: #ef4444 !important; }

/* ============================================================
   SUBMITTED / WAITING PAGE — missing classes
   ============================================================ */
.cw-wait-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    padding: 2rem 1.75rem;
    margin-bottom: 1.5rem;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    text-align: center;
}
.cw-wait-spinner { margin: 1rem 0 1.5rem; }
.cw-spinner-ring {
    width: 48px;
    height: 48px;
    border: 5px solid var(--theme-border, rgba(124,58,237,.2));
    border-top-color: var(--theme-primary, #7c3aed);
    border-radius: 50%;
    animation: cw-spin .9s linear infinite;
    margin: 0 auto;
}
.cw-wait-count {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--theme-card-bg, #fff);
    border-radius: 99px;
    padding: .5rem 1.25rem;
    font-size: .95rem;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.15));
    margin-bottom: 1rem;
}
.cw-wall-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    font-size: .875rem;
}
.cw-wall-host {
    font-weight: 600;
    color: var(--theme-heading, #1a1a2e);
}
.cw-wall-theme-badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .7rem;
    border-radius: 99px;
    background: rgba(124,58,237,.1);
    color: var(--theme-primary, #7c3aed);
    font-size: .78rem;
    font-weight: 600;
}

/* ============================================================
   MANAGE PAGE — missing classes
   ============================================================ */
.cw-status-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
}
.cw-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .55rem 0;
    border-bottom: 1px solid var(--theme-border, rgba(124,58,237,.08));
    font-size: .9rem;
    gap: .5rem;
}
.cw-status-row:last-child { border-bottom: none; }
.cw-status-label { color: var(--theme-muted, #888); font-size: .85rem; flex-shrink: 0; }
.cw-status-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .85rem;
    border-radius: 99px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.cw-status-value { color: var(--theme-text, #1a1a2e); font-weight: 500; }
.cw-status-count { color: var(--theme-primary, #7c3aed); font-weight: 600; }

.cw-manage-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
}
.cw-manage-card-label {
    font-weight: 600;
    font-size: .85rem;
    color: var(--theme-heading, #1a1a2e);
    margin-bottom: .65rem;
    display: block;
}
.cw-link-row {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
    align-items: stretch;
}
.cw-link-input {
    flex: 1;
    padding: .7rem 1rem;
    border: 2px solid var(--theme-border, rgba(124,58,237,.2));
    border-radius: 12px;
    font-size: .85rem;
    background: var(--theme-input-bg, #f9f7ff);
    color: var(--theme-muted, #555);
    outline: none;
    min-width: 0;
    font-family: inherit;
}
.cw-share-actions {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.cw-wp-btn {
    display: block;
    background: #1fb45c;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    padding: .78rem 1rem;
    text-align: center;
    text-decoration: none;
    transition: background .15s, transform .15s;
}
.cw-wp-btn:hover { background: #188f49; color: #fff; transform: translateY(-1px); text-decoration: none; }
.cw-host-link-card { border-color: rgba(245,158,11,.3); }
.cw-host-note {
    font-size: .8rem;
    color: var(--theme-muted, #888);
    margin-top: .5rem;
    margin-bottom: 0;
}
.cw-open-wall-box {
    background: var(--theme-card-bg, #fff);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.cw-open-desc {
    font-size: .9rem;
    color: var(--theme-muted, #666);
    margin-bottom: 1rem;
    line-height: 1.6;
}
.cw-alert.cw-alert-success {
    background: rgba(16,185,129,.08);
    border-left-color: #10b981;
    color: #065f46;
    margin-bottom: 1rem;
}

/* ============================================================
   REVEAL PAGE — missing classes
   ============================================================ */
.cw-reveal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.cw-reveal-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--theme-heading, #1a1a2e);
    margin: .25rem 0 .5rem;
}
.cw-guess-prog-wrap { margin-bottom: 1.25rem; }
.cw-see-score { margin-bottom: 1.25rem; }
.cw-link {
    color: var(--theme-primary, #7c3aed);
    text-decoration: underline;
    font-weight: 500;
}

/* ── Reveal page — numbered bubble tabs ───────────────────── */
.cw-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.25rem;
    padding-bottom: .5rem;
    scrollbar-width: thin;
}
.cw-tabs {
    display: flex;
    gap: .6rem;
    min-width: max-content;
    padding: .35rem .25rem;
    border-bottom: none;
}
.cw-prompt-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: .2rem .25rem;
    transition: transform .15s;
}
.cw-prompt-tab:hover { transform: translateY(-2px); }
.cw-tab-bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(124,58,237,.08);
    color: var(--cw-text, #1a1a2e);
    font-size: .9rem;
    font-weight: 700;
    border: 2px solid rgba(124,58,237,.18);
    transition: background .2s, color .2s, box-shadow .2s, border-color .2s;
}
.cw-tab-q {
    font-size: .6rem;
    font-weight: 600;
    color: var(--cw-muted, #6b7280);
    letter-spacing: .03em;
    text-transform: uppercase;
}
.cw-prompt-tab:hover .cw-tab-bubble {
    background: rgba(124,58,237,.15);
    border-color: rgba(124,58,237,.35);
}
.cw-prompt-tab.active .cw-tab-bubble {
    background: var(--cw-primary, #7c3aed);
    color: #fff;
    border-color: var(--cw-primary, #7c3aed);
    box-shadow: 0 4px 14px rgba(124,58,237,.38);
}
.cw-prompt-tab.active .cw-tab-q {
    color: var(--cw-primary, #7c3aed);
}

/* Panel aliases */
.cw-prompt-panel { display: none; padding-top: 1.25rem; }
.cw-prompt-panel.active { display: block; }

/* Prompt text display */
.cw-prompt-text {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-heading, #1a1a2e);
    background: var(--theme-card-bg, #fff);
    border: 1.5px solid var(--theme-border, rgba(124,58,237,.12));
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.cw-prompt-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--theme-primary, #7c3aed);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.cw-no-confessions {
    text-align: center;
    color: var(--theme-muted, #888);
    font-size: .9rem;
    padding: 2rem;
    background: var(--theme-card-bg, #fff);
    border-radius: 12px;
    border: 1.5px dashed var(--theme-border, rgba(124,58,237,.2));
}

/* Confession grid alias */
.cw-conf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

/* Confession card (sticky-note card without .cw-sticky base class) */
.cw-conf-card {
    border-radius: 4px 4px 4px 20px;
    padding: 1.25rem 1rem 1rem;
    position: relative;
    box-shadow: 3px 5px 16px rgba(0,0,0,.13), 0 1px 3px rgba(0,0,0,.08);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
    cursor: default;
}
.cw-conf-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,.06);
    border-radius: 0 8px 0 20px;
}
.cw-conf-card:hover {
    transform: rotate(-1deg) translateY(-3px);
    box-shadow: 5px 8px 22px rgba(0,0,0,.18);
}
.cw-conf-card.guessed { outline: 2px solid rgba(124,58,237,.5); }
.cw-conf-text {
    font-size: .9rem;
    line-height: 1.5;
    color: #1a1a2e;
    flex: 1;
    word-break: break-word;
}
.cw-who-wrote {
    margin-top: .75rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(0,0,0,.08);
}
.cw-who-label {
    font-size: .72rem;
    font-weight: 600;
    color: rgba(0,0,0,.5);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .4rem;
}
.cw-me-tag {
    display: inline-block;
    font-size: .6rem;
    font-weight: 700;
    background: var(--theme-primary, #7c3aed);
    color: #fff;
    border-radius: 99px;
    padding: .1rem .4rem;
    margin-left: .25rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cw-reveal-footer {
    margin-top: 1.5rem;
    text-align: center;
}

/* ============================================================
   RESULTS PAGE — bd-row animation + pulse
   ============================================================ */
.cw-bd-row {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease;
}
.cw-bd-row.vis {
    opacity: 1;
    transform: translateY(0);
}

@keyframes cw-pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(124,58,237,.35); }
    50% { box-shadow: 0 4px 28px rgba(124,58,237,.65); }
}
.pulse { animation: cw-pulse 1.2s ease infinite; }

/* ============================================================
   RESPONSIVE — new classes
   ============================================================ */
@media (max-width: 600px) {
    .cw-conf-grid { grid-template-columns: 1fr 1fr; }
    .cw-link-row { flex-direction: column; }
    .cw-link-input { width: 100%; }
    .cw-status-row { flex-wrap: wrap; }
}
@media (max-width: 400px) {
    .cw-conf-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ADVANCED — multi-category, configure wizard, private mode
   (merged from cw-advanced.css)
   ============================================================ */

.cw-field-hint {
    font-size: .85rem;
    color: var(--theme-muted, #6b7280);
    margin: .15rem 0 .55rem 0;
    line-height: 1.45;
}
.cw-num-pill {
    display: inline-block;
    min-width: 2.2em;
    text-align: center;
    background: var(--theme-primary, #7c3aed);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    padding: .12rem .55rem;
    font-size: .85rem;
    margin-left: .3rem;
    vertical-align: middle;
}

/* ─── 2-step wizard bar ────────────────────────────────────────────── */
.cw-wizard-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
    max-width: 160px;
}
.cw-wiz-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cw-wiz-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--theme-card-bg, #fff);
    border: 2px solid rgba(124,58,237,.25);
    color: var(--theme-muted, #bbb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    transition: background .25s, border-color .25s, color .25s;
}
.cw-wiz-connector {
    flex: 1;
    height: 2px;
    background: rgba(124,58,237,.2);
    margin: 0 .5rem;
}
.cw-wiz-step.cw-wiz-active .cw-wiz-dot {
    background: var(--theme-primary, #7c3aed);
    border-color: var(--theme-primary, #7c3aed);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(124,58,237,.14);
}
.cw-wiz-step.cw-wiz-done .cw-wiz-dot {
    background: rgba(124,58,237,.1);
    border-color: var(--theme-primary, #7c3aed);
    color: var(--theme-primary, #7c3aed);
}

/* ─── Step 2 header (back button) ──────────────────────────────────── */
.cw-step2-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cw-border, rgba(124,58,237,.15));
}
.cw-back-btn {
    background: none;
    border: none;
    padding: .4rem .7rem;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--theme-primary, #7c3aed);
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}
.cw-back-btn:hover { background: rgba(124,58,237,.08); }

/* ─── Name error message (step 1) ──────────────────────────────────── */
.cw-name-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: .45rem .75rem;
    font-size: .85rem;
    margin-top: .4rem;
}

/* ---- Category multi-select grid (home) ---- */
.cw-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .65rem;
}
.cw-cat-card {
    position: relative;
    cursor: pointer;
    background: var(--theme-card-bg, #fff);
    border: 2px solid rgba(124,58,237,.18);
    border-radius: 14px;
    padding: 1rem .85rem .85rem;
    text-align: center;
    transition: border-color .15s, transform .15s, box-shadow .15s;
    user-select: none;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.cw-cat-card input[type=checkbox] { position:absolute; opacity:0; pointer-events:none; }
.cw-cat-card:hover { transform: translateY(-1px); border-color: rgba(124,58,237,.4); }
.cw-cat-card.selected {
    border-color: var(--theme-primary, #7c3aed);
    box-shadow: 0 4px 18px rgba(124,58,237,.18);
    background: rgba(124,58,237,.05);
}
.cw-cat-emoji { font-size: 1.7rem; line-height: 1; }
.cw-cat-name { font-weight: 700; font-size: .95rem; color: var(--theme-card-text, #1a1a2e); }
.cw-cat-desc { font-size: .76rem; color: var(--theme-muted, #6b7280); line-height: 1.3; }
.cw-cat-check {
    position: absolute;
    top: .4rem; right: .55rem;
    color: var(--theme-primary, #7c3aed);
    font-weight: 800;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .15s, transform .15s;
}
.cw-cat-card.selected .cw-cat-check { opacity: 1; transform: scale(1); }
.cw-cat-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: .5rem .7rem;
    margin-top: .4rem;
    font-size: .85rem;
    display: none;
}
.cw-cat-error.show { display: block; }

/* Range sliders */
.cw-range {
    width: 100%;
    accent-color: var(--theme-primary, #7c3aed);
    margin: .25rem 0;
}
.cw-range-row {
    display: flex; justify-content: space-between;
    font-size: .72rem; color: var(--theme-muted, #6b7280);
    margin-top: -.1rem; margin-bottom: .25rem;
}

/* Privacy radio cards */
.cw-privacy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
}
.cw-privacy-card {
    cursor: pointer;
    background: var(--theme-card-bg, #fff);
    border: 2px solid rgba(124,58,237,.18);
    border-radius: 14px;
    padding: .85rem .8rem;
    user-select: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    display: flex; flex-direction: column; gap: .25rem;
}
.cw-privacy-card input[type=radio] { display:none; }
.cw-privacy-card.selected {
    border-color: var(--theme-primary, #7c3aed);
    background: rgba(124,58,237,.05);
    box-shadow: 0 4px 14px rgba(124,58,237,.16);
}
.cw-priv-emoji { font-size: 1.4rem; line-height: 1; }
.cw-priv-title { font-weight: 700; color: var(--theme-card-text, #1a1a2e); font-size: .95rem; }
.cw-priv-desc  { font-size: .78rem; color: var(--theme-muted, #6b7280); line-height: 1.4; }
@media (max-width: 480px) {
    .cw-privacy-grid { grid-template-columns: 1fr; }
}

/* Category pills */
.cw-cat-pills { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.cw-cat-pill {
    display: inline-block;
    background: rgba(124,58,237,.08);
    color: var(--theme-primary, #7c3aed);
    border: 1px solid rgba(124,58,237,.2);
    border-radius: 999px;
    padding: .1rem .55rem;
    font-size: .75rem;
    font-weight: 600;
}

/* ---- Configure (pool builder) ---- */
.cw-configure-wrap { max-width: 720px; margin: 0 auto; }
.cw-cfg-section {
    background: var(--theme-card-bg, #fff);
    border-radius: 16px;
    padding: 1rem 1rem .9rem;
    box-shadow: 0 2px 10px rgba(60,30,80,.06);
    margin-bottom: 1rem;
}
.cw-cfg-section-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5rem;
}
.cw-cfg-section-title {
    font-weight: 700; font-size: 1rem; color: var(--theme-card-text, #1a1a2e);
}

/* Pool list (selected) */
.cw-pool-list {
    list-style: none; padding: 0; margin: .5rem 0 0;
}
.cw-pool-item {
    display: flex; align-items: center; gap: .55rem;
    background: rgba(124,58,237,.04);
    border: 1px solid rgba(124,58,237,.15);
    border-radius: 10px;
    padding: .55rem .6rem;
    margin-bottom: .45rem;
    font-size: .92rem;
    line-height: 1.35;
    transition: background .15s, transform .1s;
}
.cw-pool-item.cw-drag { opacity: .5; }
.cw-pool-item.cw-drag-over { background: rgba(124,58,237,.12); }
.cw-pool-handle {
    cursor: grab; color: var(--theme-muted, #6b7280); font-weight: 700;
    user-select: none; line-height: 1;
}
.cw-pool-text { flex: 1; word-break: break-word; }
.cw-pool-tag {
    display: inline-block; font-size: .65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
    border-radius: 99px; padding: .1rem .4rem;
    background: rgba(0,0,0,.06); color: #444;
    flex-shrink: 0;
}
.cw-tag-custom  { background: #fef3c7; color: #92400e; }
.cw-tag-library { background: #ede9fe; color: #5b21b6; }
.cw-pool-remove {
    background: transparent; border: none; cursor: pointer;
    color: #b91c1c; font-size: 1.3rem; line-height: 1;
    padding: 0 .25rem; flex-shrink: 0;
}
.cw-pool-remove:hover { color: #7f1d1d; }
.cw-pool-empty {
    text-align: center; color: var(--theme-muted, #6b7280);
    padding: 1rem; font-size: .9rem;
    border: 2px dashed rgba(124,58,237,.2); border-radius: 12px;
    margin-top: .5rem;
}

/* Library suggestions list */
.cw-lib-list { list-style:none; padding:0; margin:.5rem 0 0; max-height:300px; overflow-y:auto; }
.cw-lib-item {
    display: flex; align-items: center; gap: .55rem;
    padding: .5rem .6rem;
    border-bottom: 1px dashed rgba(0,0,0,.06);
    font-size: .9rem;
}
.cw-lib-item:last-child { border-bottom: none; }
.cw-lib-text { flex: 1; line-height: 1.35; }
.cw-lib-add {
    background: var(--theme-primary, #7c3aed);
    color: #fff; border: none; border-radius: 99px;
    padding: .3rem .7rem; font-weight: 700; font-size: .78rem;
    cursor: pointer; flex-shrink: 0;
}
.cw-lib-add:hover { opacity: .9; }
.cw-lib-empty {
    text-align: center; color: var(--theme-muted, #6b7280);
    padding: 1rem; font-size: .9rem;
}

.cw-btn-tiny {
    width: auto; padding: .35rem .75rem; font-size: .78rem;
    border-radius: 99px;
}

/* Custom prompt input */
.cw-custom-row {
    display: flex; flex-direction: column; gap: .5rem;
    margin-top: .4rem;
}
.cw-custom-input {
    width: 100%;
    border: 2px solid rgba(124,58,237,.2);
    border-radius: 12px;
    padding: .65rem .75rem;
    font: inherit;
    resize: vertical;
}
.cw-custom-input:focus {
    border-color: var(--theme-primary, #7c3aed);
    outline: none;
}
.cw-custom-error {
    color: #b91c1c; font-size: .8rem;
    background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 8px; padding: .4rem .6rem;
}

/* Manage page additions */
.cw-manage-edit { text-align: center; }
.cw-pool-preview { padding: .75rem 1rem; }
.cw-pool-preview summary {
    cursor: pointer; font-weight: 700; padding: .3rem 0;
}
.cw-pool-preview-list {
    margin: .5rem 0 0; padding-left: 1.2rem;
}
.cw-pool-preview-list li {
    padding: .35rem 0; font-size: .92rem;
}
.cw-pool-preview-list li .cw-pool-tag { margin-right: .4rem; }
.cw-status-draft { background: #f3f4f6; color: #4b5563; }
.cw-alert-error {
    background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
    border-radius: 10px; padding: .65rem .85rem;
    margin-bottom: 1rem;
}
.cw-open-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Submit page extras */
.cw-rules-box {
    background: rgba(124,58,237,.05);
    border-left: 3px solid var(--theme-primary, #7c3aed);
    padding: .65rem .8rem;
    border-radius: 8px;
    margin: .65rem 0 1rem;
    text-align: left;
}
.cw-rules-row {
    display: flex; align-items: flex-start; gap: .5rem;
    font-size: .88rem; line-height: 1.45;
    color: var(--theme-card-text, #1a1a2e);
    margin-bottom: .25rem;
}
.cw-rules-row:last-child { margin-bottom: 0; }
.cw-rules-emoji { font-size: 1.05rem; line-height: 1.4; flex-shrink: 0; }
.cw-sq-q-min {
    background: rgba(245,158,11,.15);
    color: #92400e;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 99px;
    padding: .1rem .4rem;
    margin-left: .4rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cw-sq-submit-warning {
    color: #b91c1c;
    font-size: .82rem;
    margin-top: .55rem;
    text-align: center;
}

/* Reveal extras */
.cw-conf-card.is-mine {
    opacity: .85;
    border: 1px dashed rgba(124,58,237,.4);
}
.cw-mine-tag {
    margin-top: .5rem;
    font-size: .75rem;
    color: var(--theme-muted, #6b7280);
    font-style: italic;
    text-align: center;
}

/* Private reveal page */
.cw-priv-prompt {
    background: var(--theme-card-bg, #fff);
    border-radius: 14px;
    padding: 1rem;
    margin-bottom: .85rem;
    box-shadow: 0 2px 10px rgba(60,30,80,.06);
}
.cw-priv-prompt-head {
    display: flex; align-items: flex-start; gap: .5rem;
    margin-bottom: .55rem;
}
.cw-priv-prompt-text {
    flex: 1; font-weight: 600; line-height: 1.4;
    color: var(--theme-card-text, #1a1a2e);
}
.cw-priv-prompt-count {
    font-size: .72rem; font-weight: 700;
    background: rgba(124,58,237,.1);
    color: var(--theme-primary, #7c3aed);
    border-radius: 99px;
    padding: .15rem .5rem;
    flex-shrink: 0;
    white-space: nowrap;
}
.cw-priv-list {
    list-style: none; padding: 0; margin: .5rem 0 0;
    border-top: 1px dashed rgba(0,0,0,.08);
}
.cw-priv-row {
    padding: .65rem 0;
    border-bottom: 1px dashed rgba(0,0,0,.06);
}
.cw-priv-row:last-child { border-bottom: none; }
.cw-priv-name {
    display: inline-block;
    font-weight: 700; color: var(--theme-primary, #7c3aed);
    margin-right: .5rem;
    font-size: .85rem;
}
.cw-priv-text { color: var(--theme-card-text, #1a1a2e); line-height: 1.5; font-size: .92rem; }
.cw-priv-summary { display: flex; flex-direction: column; gap: .5rem; }
.cw-priv-prompt-mini {
    display: flex; align-items: center; gap: .55rem;
    background: var(--theme-card-bg, #fff);
    padding: .65rem .75rem;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(60,30,80,.05);
    font-size: .9rem;
}

/* Skipped row in results */
.cw-bd-skipped {
    background: rgba(0,0,0,.03);
    border-left: 3px solid #9ca3af;
}

/* ============================================================
   CONFIGURE WIZARD (step-by-step pool builder)
   ============================================================ */
.cw-wiz-wrap { max-width: 720px; margin: 0 auto; }

.cw-wiz-progress {
    background: var(--theme-card-bg, #fff);
    border-radius: 14px;
    padding: .75rem .9rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(60,30,80,.06);
}
.cw-wiz-prog-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: .4rem;
}
.cw-wiz-prog-label {
    font-weight: 700; font-size: .92rem;
    color: var(--theme-card-text, #1a1a2e);
}
.cw-wiz-prog-count {
    font-weight: 700; font-size: .85rem;
    background: rgba(124,58,237,.1);
    color: var(--theme-primary, #7c3aed);
    border-radius: 999px;
    padding: .12rem .55rem;
}
.cw-wiz-prog-bar {
    width: 100%; height: 8px;
    background: rgba(124,58,237,.15);
    border-radius: 99px;
    overflow: hidden;
}
.cw-wiz-prog-fill {
    height: 100%;
    background: var(--theme-primary, #7c3aed);
    transition: width .3s ease;
}
.cw-wiz-dots {
    display: flex; flex-wrap: wrap; gap: .3rem;
    margin-top: .55rem;
    justify-content: center;
}
.cw-wiz-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(124,58,237,.18);
    background: #fff;
    color: var(--theme-muted, #6b7280);
    font-size: .72rem; font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    padding: 0;
    line-height: 1;
}
.cw-wiz-dot:hover {
    transform: scale(1.05);
    border-color: rgba(124,58,237,.4);
}
.cw-wiz-dot.done {
    background: var(--theme-primary, #7c3aed);
    border-color: var(--theme-primary, #7c3aed);
    color: #fff;
}
.cw-wiz-dot.active {
    background: #fff;
    border-color: var(--theme-primary, #7c3aed);
    color: var(--theme-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124,58,237,.18);
    transform: scale(1.08);
}
.cw-wiz-dot.done.active {
    background: var(--theme-primary, #7c3aed);
    color: #fff;
}

.cw-wiz-card {
    background: var(--theme-card-bg, #fff);
    border-radius: 16px;
    padding: 1.1rem 1rem 1rem;
    box-shadow: 0 4px 18px rgba(60,30,80,.08);
    margin-bottom: 1rem;
}
.cw-wiz-current-label {
    font-weight: 700; font-size: 1rem;
    color: var(--theme-card-text, #1a1a2e);
    margin-bottom: .55rem;
    display: flex; align-items: center;
}
.cw-wiz-textarea {
    width: 100%;
    border: 2px solid rgba(124,58,237,.22);
    border-radius: 12px;
    padding: .75rem .85rem;
    font: inherit;
    line-height: 1.5;
    resize: vertical;
    min-height: 86px;
    background: rgba(124,58,237,.03);
}
.cw-wiz-textarea:focus {
    border-color: var(--theme-primary, #7c3aed);
    outline: none;
    background: #fff;
}
.cw-wiz-meta-row {
    display: flex; justify-content: space-between; align-items: center;
    margin: .35rem 0 .5rem;
    font-size: .75rem;
    color: var(--theme-muted, #6b7280);
}
.cw-wiz-source {
    background: rgba(124,58,237,.08);
    color: var(--theme-primary, #7c3aed);
    border-radius: 99px;
    padding: .1rem .5rem;
    font-weight: 700;
    font-size: .72rem;
}
.cw-wiz-source:empty { display: none; }
.cw-wiz-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 8px;
    padding: .45rem .65rem;
    margin-bottom: .55rem;
    font-size: .82rem;
}
.cw-wiz-actions {
    display: flex; gap: .4rem;
    flex-wrap: wrap;
}
.cw-wiz-actions .cw-btn {
    flex: 1;
    min-width: 90px;
    padding: .65rem .8rem;
    font-size: .9rem;
}
.cw-wiz-actions .cw-btn-primary { flex: 1.4; }
@media (max-width: 480px) {
    .cw-wiz-actions { flex-direction: row; }
    .cw-wiz-actions .cw-btn { font-size: .82rem; padding: .55rem .5rem; }
}

/* Suggestions list inside wizard */
.cw-wiz-section {
    background: var(--theme-card-bg, #fff);
    border-radius: 14px;
    padding: .85rem .9rem;
    box-shadow: 0 2px 10px rgba(60,30,80,.06);
    margin-bottom: 1rem;
}
.cw-wiz-section-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: .5rem;
    margin-bottom: .4rem;
}
.cw-wiz-section-title {
    font-weight: 700; font-size: .92rem;
    color: var(--theme-card-text, #1a1a2e);
}
.cw-wiz-suggest-list {
    list-style: none; padding: 0; margin: 0;
}
.cw-wiz-suggest-item {
    display: flex; align-items: center; gap: .45rem;
    padding: .55rem .55rem;
    border-radius: 10px;
    background: rgba(124,58,237,.04);
    border: 1px solid rgba(124,58,237,.12);
    margin-bottom: .4rem;
    font-size: .9rem;
    line-height: 1.4;
    flex-wrap: wrap;
}
.cw-wiz-suggest-text { flex: 1 1 100%; word-break: break-word; }
.cw-wiz-suggest-item .cw-pool-tag { flex-shrink: 0; }
.cw-wiz-edit, .cw-wiz-use {
    border: none; border-radius: 99px;
    font-weight: 700; font-size: .76rem;
    padding: .3rem .65rem;
    cursor: pointer;
    flex-shrink: 0;
}
.cw-wiz-edit {
    background: transparent;
    color: var(--theme-primary, #7c3aed);
    border: 1px solid rgba(124,58,237,.3);
}
.cw-wiz-edit:hover { background: rgba(124,58,237,.06); }
.cw-wiz-use {
    background: var(--theme-primary, #7c3aed);
    color: #fff;
}
.cw-wiz-use:hover { opacity: .9; }
.cw-wiz-suggest-empty {
    text-align: center;
    color: var(--theme-muted, #6b7280);
    padding: .85rem;
    font-size: .9rem;
}

/* Review (post-wizard) screen */
.cw-wiz-review .cw-wiz-card { padding: 1rem; }
.cw-wiz-review-title {
    font-size: 1.1rem; font-weight: 800;
    color: var(--theme-card-text, #1a1a2e);
    margin: 0 0 .35rem 0;
}
.cw-wiz-review-sub {
    color: var(--theme-muted, #6b7280);
    margin: 0 0 .8rem 0;
    font-size: .9rem;
}
.cw-pool-edit {
    background: transparent;
    border: 1px solid rgba(124,58,237,.3);
    border-radius: 99px;
    color: var(--theme-primary, #7c3aed);
    cursor: pointer;
    font-size: .85rem;
    padding: .2rem .5rem;
    flex-shrink: 0;
    margin-right: .25rem;
}
.cw-pool-edit:hover { background: rgba(124,58,237,.08); }

/* ============================================================
   REVEAL — mystery flip cards
   ============================================================ */
.cw-conf-flip {
    position: relative;
    cursor: pointer;
}
/* Back face: actual confession — always in DOM, provides natural height */
.cw-conf-flip-back {
    filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    user-select: none;
    transition: filter .45s ease, opacity .45s ease;
}
.cw-conf-flip.flipped .cw-conf-flip-back {
    filter: none;
    opacity: 1;
    pointer-events: auto;
}
/* Front face: mystery overlay — absolutely positioned over back */
.cw-conf-flip-front {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    background: linear-gradient(145deg, #6d28d9 0%, #a21caf 100%);
    color: #fff;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    transition: opacity .35s ease, transform .35s ease;
    transform-origin: center top;
    min-height: 120px;
}
.cw-conf-flip.flipped .cw-conf-flip-front {
    opacity: 0;
    transform: scale(.92) translateY(-4px);
    pointer-events: none;
}
/* Mystery front elements */
.cw-mystery-icon {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
    animation: cw-mystery-float 3s ease-in-out infinite;
}
@keyframes cw-mystery-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
.cw-mystery-text {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .85;
}
.cw-mystery-hint {
    font-size: .72rem;
    opacity: .7;
    background: rgba(255,255,255,.18);
    border-radius: 20px;
    padding: .2rem .7rem;
    animation: cw-pulse-hint 2.5s ease-in-out infinite;
}
@keyframes cw-pulse-hint {
    0%, 100% { opacity: .6; }
    50% { opacity: 1; }
}
.cw-mystery-badge {
    font-size: .7rem;
    font-weight: 700;
    background: rgba(255,255,255,.28);
    border-radius: 20px;
    padding: .15rem .65rem;
    margin-top: .15rem;
}
/* Info / notice boxes on reveal page */
.cw-reveal-host-note {
    background: rgba(124,58,237,.08);
    border: 1px solid rgba(124,58,237,.2);
    border-radius: 10px;
    color: var(--cw-text, #1a1a2e);
    padding: .75rem 1rem;
    font-size: .9rem;
}
.cw-reveal-notice {
    background: rgba(251,191,36,.1);
    border: 1px solid rgba(251,191,36,.4);
    border-radius: 10px;
    color: var(--cw-text, #1a1a2e);
    padding: .75rem 1rem;
    font-size: .9rem;
}

/* Reveal polish: sealed cards, locked voting, and crowd percentages */
.cw-reveal-wrap {
    max-width: 960px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(255,251,235,.92) 48%, rgba(236,254,255,.9) 100%);
    border-color: rgba(15,23,42,.08);
    box-shadow: 0 18px 60px rgba(15,23,42,.12), 0 6px 22px rgba(20,184,166,.1);
}
.cw-reveal-header {
    padding: .45rem 0 .25rem;
}
.cw-reveal-title {
    letter-spacing: 0;
}
.cw-reveal-sub {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}
.cw-guess-prog-wrap {
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 12px;
    padding: .8rem .9rem;
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.cw-conf-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.cw-prompt-text {
    border-radius: 8px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
}
.cw-conf-flip {
    perspective: 900px;
}
.cw-conf-flip-back {
    transform: translateY(8px) scale(.98);
    transition: filter .45s ease, opacity .45s ease, transform .45s ease;
}
.cw-conf-flip.flipped .cw-conf-flip-back {
    transform: translateY(0) scale(1);
}
.cw-conf-card {
    border-radius: 8px;
    min-height: 190px;
    border: 1px solid rgba(15,23,42,.08);
}
.cw-conf-card.guessed,
.cw-conf-card.cw-vote-locked {
    outline: none;
    border-color: rgba(20,184,166,.45);
    box-shadow: 0 10px 28px rgba(15,23,42,.12), 0 0 0 3px rgba(20,184,166,.14);
}
.cw-conf-card:hover {
    transform: translateY(-3px);
}
.cw-conf-flip-front {
    overflow: hidden;
    min-height: 190px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.34);
    background:
        linear-gradient(135deg, rgba(15,23,42,.96) 0%, rgba(88,28,135,.94) 42%, rgba(13,148,136,.95) 100%);
    box-shadow: 0 16px 36px rgba(15,23,42,.22), inset 0 0 0 1px rgba(255,255,255,.12);
    transform: translateZ(0);
}
.cw-conf-flip-front::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 6px;
    pointer-events: none;
}
.cw-conf-flip-front::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -65%;
    width: 55%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
    transform: rotate(22deg);
    animation: cw-seal-shine 3.6s ease-in-out infinite;
    pointer-events: none;
}
.cw-conf-flip:not(.flipped):hover .cw-conf-flip-front {
    transform: translateY(-4px) rotateX(3deg);
    box-shadow: 0 22px 42px rgba(15,23,42,.28), inset 0 0 0 1px rgba(255,255,255,.16);
}
.cw-conf-flip.cw-revealing .cw-conf-flip-front {
    animation: cw-seal-open .34s ease forwards;
}
.cw-mystery-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    position: relative;
    font-size: 0;
    background: rgba(255,255,255,.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 10px 22px rgba(0,0,0,.18);
    animation: cw-mystery-float 3s ease-in-out infinite;
}
.cw-mystery-icon::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 12px;
    width: 22px;
    height: 18px;
    border: 3px solid #fff;
    border-bottom: 0;
    border-radius: 13px 13px 0 0;
}
.cw-mystery-icon::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 26px;
    width: 30px;
    height: 22px;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 7px 14px rgba(0,0,0,.18);
}
.cw-mystery-text {
    font-size: .82rem;
    color: rgba(255,255,255,.86);
}
.cw-mystery-hint {
    color: #111827;
    background: #fbbf24;
    opacity: 1;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(251,191,36,.28);
}
.cw-mystery-sub {
    font-size: .72rem;
    color: rgba(255,255,255,.72);
}
.cw-mystery-badge {
    font-size: 0;
}
.cw-mystery-badge::after {
    content: "Voted";
    font-size: .7rem;
}
.cw-name-chip {
    border-radius: 8px;
    border: 1px solid rgba(15,23,42,.14);
    background: rgba(255,255,255,.82);
    box-shadow: 0 3px 10px rgba(15,23,42,.06);
    font-weight: 700;
}
.cw-name-chip:hover:not(:disabled) {
    background: #fff;
    border-color: rgba(20,184,166,.62);
    transform: translateY(-1px);
}
.cw-name-chip.cw-chip-selected {
    background: #111827;
    border-color: #111827;
    color: #fff;
    box-shadow: 0 7px 16px rgba(17,24,39,.24);
}
.cw-name-chip.cw-chip-pending {
    opacity: .7;
    animation: cw-chip-wait .9s ease-in-out infinite;
}
.cw-name-chip:disabled {
    cursor: not-allowed;
    transform: none;
}
.cw-name-chip:disabled:not(.cw-chip-selected) {
    opacity: .52;
}
.cw-who-wrote.is-locked .cw-who-label::after {
    content: " - locked";
    color: #0f766e;
}
.cw-vote-feedback {
    display: none;
    margin-top: .55rem;
    font-size: .78rem;
    color: #0f766e;
    font-weight: 700;
}
.cw-vote-feedback.is-visible {
    display: block;
}
.cw-vote-feedback.is-error {
    color: #b91c1c;
}
.cw-vote-detail {
    display: none;
    margin-top: .7rem;
    padding: .75rem;
    border-radius: 8px;
    background: rgba(255,255,255,.74);
    border: 1px solid rgba(15,23,42,.08);
}
.cw-vote-detail.is-visible {
    display: block;
    animation: cw-vote-detail-in .28s ease both;
}
.cw-vote-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .7rem;
    margin-bottom: .45rem;
}
.cw-vote-kicker {
    display: block;
    font-size: .62rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
}
.cw-vote-detail-head strong {
    display: block;
    color: #111827;
    font-size: .94rem;
    line-height: 1.25;
}
.cw-vote-total {
    white-space: nowrap;
    border-radius: 999px;
    background: rgba(20,184,166,.12);
    color: #0f766e;
    font-size: .68rem;
    font-weight: 800;
    padding: .16rem .5rem;
}
.cw-vote-note {
    font-size: .72rem;
    color: #64748b;
    margin-bottom: .55rem;
}
.cw-vote-stats-summary {
    font-size: .75rem;
    color: #334155;
    margin-bottom: .45rem;
}
.cw-vote-stat-row {
    padding: .4rem 0;
    border-top: 1px dashed rgba(15,23,42,.09);
}
.cw-vote-stat-row.is-selected {
    color: #0f766e;
}
.cw-vote-stat-top {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    font-size: .78rem;
    font-weight: 800;
}
.cw-vote-stat-top span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.cw-vote-stat-track {
    height: 7px;
    border-radius: 999px;
    background: rgba(15,23,42,.08);
    overflow: hidden;
    margin-top: .25rem;
}
.cw-vote-stat-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6, #f59e0b);
    transition: width .38s ease;
}
.cw-vote-stat-count {
    font-size: .68rem;
    color: #64748b;
    margin-top: .16rem;
}
@keyframes cw-seal-shine {
    0%, 35% { transform: translateX(0) rotate(22deg); opacity: 0; }
    48% { opacity: 1; }
    72%, 100% { transform: translateX(330%) rotate(22deg); opacity: 0; }
}
@keyframes cw-seal-open {
    0% { transform: scale(1); opacity: 1; filter: blur(0); }
    70% { transform: scale(1.04) rotateX(8deg); opacity: .72; filter: blur(1px); }
    100% { transform: scale(.94) translateY(-8px); opacity: 0; filter: blur(3px); }
}
@keyframes cw-chip-wait {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
@keyframes cw-vote-detail-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 720px) {
    .cw-conf-grid { grid-template-columns: 1fr; }
    .cw-vote-detail-head { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .cw-conf-flip-front::after,
    .cw-mystery-icon,
    .cw-mystery-hint,
    .cw-name-chip.cw-chip-pending,
    .cw-vote-detail.is-visible,
    .cw-conf-flip.cw-revealing .cw-conf-flip-front {
        animation: none;
    }
}

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