/* Base Reset and Layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f9fc;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.app-header {
    background-color: #1a1e29;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    height: 60px;
}

.header-left h1 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.subtitle {
    font-size: 0.75rem;
    color: #8c90a3;
    font-style: italic;
}

.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-btn, .header-pill {
    background-color: transparent;
    border: 1px solid #454d66;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.header-btn:hover { background-color: #2a2f40; }
.header-pill { background-color: #2a2f40; border-color: transparent; }
.header-right .icon-btn { font-size: 1.2rem; padding: 2px 10px; border: none; }

/* Main Application Grid */
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    .app-container { flex-direction: column; overflow-y: auto; }
}

/* Sidebar Controls */
.sidebar {
    width: 270px;
    background-color: white;
    border-right: 1px solid #e1e4e8;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
    overflow-y: auto; /* Allows scrolling when Generator is open */
}

@media (max-width: 768px) {
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e1e4e8; padding: 16px; overflow-y: visible; }
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-group label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #4a5568;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.control-group input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 400; /* Lighter font for typed text */
    color: #4a5568;
    transition: all 0.2s;
}

.control-group input[type="text"]::placeholder {
    color: #a0aec0; /* Significantly lighter font state for placeholder */
    font-weight: 300;
}

.control-group input[type="text"]:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.subtext { font-size: 0.75rem; color: #a0aec0; }

/* ══════════════════════════════════════════════════════════
   AUTOCOMPLETE — Google-style custom dropdown
   [2026-04-27] Pawan: native datalist looked sick. Custom 6-item
   dropdown — prefix matches first, then substring; keyboard nav.
   Why: browser-default datalist styling can't be themed and was
   showing unrelated items. Custom gives ranking + visual control.
══════════════════════════════════════════════════════════ */
.ac-wrap {
    position: relative;
    width: 100%;
}

.ac-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
    display: none;
}

.ac-dropdown.open { display: block; }

.ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 0.85rem;
    color: #2d3748;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.3;
}

.ac-item:last-child { border-bottom: none; }

.ac-item:hover,
.ac-item.active {
    background-color: #f7fafc;
    color: #1a202c;
}

.ac-item .ac-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.4;
    color: #718096;
}

.ac-item .ac-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ac-item .ac-text mark {
    background: transparent;
    color: #1a202c;
    font-weight: 700;
    padding: 0;
}

/* ══════════════════════════════════════════════════════════
   GENERATED BANNER — DB-miss fallback
   [2026-04-27] When a typed keyword has no DB chunk, we generate
   5 slogans on the fly (expert-slogan style). Banner makes the
   provenance obvious so the user knows this isn't from the corpus.
══════════════════════════════════════════════════════════ */
.gen-banner {
    background: linear-gradient(90deg, #fef3c7 0%, #fffbeb 100%);
    border: 1px solid #f6ad55;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    color: #744210;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gen-banner-icon {
    font-size: 1rem;
}

.gen-banner-text strong { color: #5a3a0a; }

/* ══════════════════════════════════════════════════════════
   SKELETON LOADER — never empty during a search/compose
   [2026-04-27] Pawan: static "loading" text + frozen progress bar
   read as broken. Skeleton + spinner + animated shimmer makes
   "in flight" obvious. Per project rule: skeleton always, never empty.
══════════════════════════════════════════════════════════ */
.loader-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #4a5568;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.loader-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #e2e8f0;
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skel-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    height: 88px;
    position: relative;
    overflow: hidden;
}

.skel-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.08) 50%, transparent 100%);
    animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* [2026-04-30] Live progress affordances during fresh generation.
   Counter ticks every second; dots pulse so the user sees activity.
   After 15s/30s/60s the elapsed text auto-changes to flag unusual latency. */
.loader-label  { flex: 1; }
.loader-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.loader-elapsed {
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
}
.loader-dots { display: inline-flex; gap: 4px; }
.loader-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    display: inline-block;
    animation: dot-pulse 1.2s infinite ease-in-out both;
}
.loader-dots span:nth-child(1) { animation-delay: -0.30s; }
.loader-dots span:nth-child(2) { animation-delay: -0.15s; }
.loader-dots span:nth-child(3) { animation-delay:  0s;    }
@keyframes dot-pulse {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.35; }
    40%           { transform: scale(1.0); opacity: 1;    }
}

/* Stronger shimmer on skeleton cards so the placeholders read as "in progress",
   not "broken empty card". Speeds up the gradient sweep + raises peak opacity. */
.skel-card::before {
    background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.18) 50%, transparent 100%);
    animation: shimmer 1.0s ease-in-out infinite;
}

/* Header badge flash — fires when the live count changes after a generation,
   so user sees "I just made 5 more, total ticked up". */
.flash-pulse {
    animation: flashPulse 1.2s ease-out;
}
@keyframes flashPulse {
    0%   { background-color: #2a2f40; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); }
    30%  { background-color: #f59e0b; color: #1a202c; box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.18); }
    100% { background-color: #2a2f40; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* ══════════════════════════════════════════════════════════
   COMPOSE MORE button — appears under search results
   [2026-04-27] Pawan: even when corpus has matches, allow
   the user to ask for fresh ones too. Button below results,
   subtle (not competing with cards) but discoverable.
══════════════════════════════════════════════════════════ */
.compose-more-wrap {
    margin-top: 16px;
    padding: 18px;
    background: #fffbeb;
    border: 1px dashed #f6ad55;
    border-radius: 10px;
    text-align: center;
}

.compose-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #f6ad55;
    color: #744210;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.15s;
}

.compose-more-btn:hover:not(:disabled) {
    background: #fef3c7;
    border-color: #ed8936;
    color: #5a3a0a;
}

.compose-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.compose-more-icon { font-size: 1rem; }

.compose-more-hint {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 8px;
}

/* ══════════════════════════════════════════════════════════
   MATCHED-ON TAG — shows the searched phrase on every result
   [2026-04-27] Pawan: makes "why this matched" obvious at a glance.
   Distinct color so it doesn't blend with corpus metadata pills.
══════════════════════════════════════════════════════════ */
.meta-tag.meta-matched {
    background-color: #ecfdf5;
    color: #065f46;
    border-color: #6ee7b7;
    font-weight: 600;
    text-transform: none;   /* keep the phrase as-typed */
}

/* [2026-04-30] Reusable spacing utility — replaces inline style="margin-top:24px"
   on the new QUALITY filter group. Matches the spacing the other filter groups use. */
.control-group--spaced { margin-top: 24px; }

/* [2026-04-30] Clickable metadata pills — clicking any tag re-searches by that term
   to show ~10 slogans sharing it. Cursor + hover state signal interactivity.
   Excludes Quality / Source / Matched badges (non-searchable, defined further below). */
.slogan-meta .meta-tag {
    cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s, transform 0.08s;
}
.slogan-meta .meta-tag:hover {
    background-color: #1a202c;
    color: #ffffff;
    border-color: #1a202c;
}
.slogan-meta .meta-tag:active { transform: scale(0.96); }
/* Badges that are NOT searchable — keep default cursor, no hover state shift */
.slogan-meta .meta-tag.meta-quality,
.slogan-meta .meta-tag.meta-source-tax,
.slogan-meta .meta-tag.meta-source-leg,
.slogan-meta .meta-tag.meta-matched {
    cursor: default;
}
.slogan-meta .meta-tag.meta-quality:hover,
.slogan-meta .meta-tag.meta-source-tax:hover,
.slogan-meta .meta-tag.meta-source-leg:hover,
.slogan-meta .meta-tag.meta-matched:hover {
    /* Restore the per-class background so they don't go dark on hover */
    transform: none;
}
.slogan-meta .meta-tag.meta-quality-rare_rich:hover     { background-color: #f0fdf4; color: #166534; border-color: #86efac; }
.slogan-meta .meta-tag.meta-quality-rare_balanced:hover { background-color: #fefce8; color: #854d0e; border-color: #fde68a; }
.slogan-meta .meta-tag.meta-quality-common_heavy:hover  { background-color: #f8fafc; color: #64748b; border-color: #cbd5e1; }
.slogan-meta .meta-tag.meta-source-tax:hover            { background-color: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.slogan-meta .meta-tag.meta-source-leg:hover            { background-color: #fdf4ff; color: #6b21a8; border-color: #e9d5ff; }
.slogan-meta .meta-tag.meta-matched:hover               { background-color: #ecfdf5; color: #065f46; border-color: #6ee7b7; }

/* [2026-04-30] Quality and source badges — surface rare-word density per slogan
   so user can see WHICH ones earned the per-slot variety + 50/50 metadata. */
.meta-tag.meta-quality {
    font-weight: 700;
    text-transform: none;
    border-width: 1.5px;
}
.meta-tag.meta-quality-rare_rich {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #86efac;
}
.meta-tag.meta-quality-rare_balanced {
    background-color: #fefce8;
    color: #854d0e;
    border-color: #fde68a;
}
.meta-tag.meta-quality-common_heavy {
    background-color: #f8fafc;
    color: #64748b;
    border-color: #cbd5e1;
}
.meta-tag.meta-source-tax {
    background-color: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
    font-weight: 600;
    text-transform: none;
}
.meta-tag.meta-source-leg {
    background-color: #fdf4ff;
    color: #6b21a8;
    border-color: #e9d5ff;
    font-weight: 600;
    text-transform: none;
}

/* ══════════════════════════════════════════════════════════
   SCROLL FAB — fixed bottom-right, toggles down/up
   [2026-04-27] Pawan: when slogans overflow viewport, give a quick
   way to jump down or back to top. SVG only (no Unicode glyphs per
   project rule). Hidden when content fits in viewport.
══════════════════════════════════════════════════════════ */
.scroll-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a202c;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
}

.scroll-fab:hover {
    background: #2d3748;
    transform: translateY(-2px);
}

.scroll-fab:active { transform: translateY(0); }

.scroll-fab-icon {
    width: 20px;
    height: 20px;
}

/* ══════════════════════════════════════════════════════════
   CONTENT-SIZED PILL BUTTONS — no train-size
   [2026-04-27] Pawan: project rule — buttons are content-sized,
   never width:100%. Action rows are horizontal flex-wrap, not
   stacked vertical bars. Used in Inspired-By tab.
══════════════════════════════════════════════════════════ */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.btn-row-mt { margin-top: 12px; }

.btn-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s, transform 0.08s;
    border: 1px solid transparent;
}

.btn-pill:active { transform: scale(0.97); }

.btn-pill.btn-primary {
    background: #1a202c;
    color: white;
    border-color: #1a202c;
}

.btn-pill.btn-primary:hover { background: #2d3748; }

.btn-pill.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-pill.btn-secondary {
    background: white;
    color: #2d3748;
    border-color: #cbd5e0;
}

.btn-pill.btn-secondary:hover { background: #f7fafc; border-color: #1a202c; }

/* Vibe input grows; quantity stays compact */
.inspire-vibe-group { flex: 1; min-width: 0; }

/* Pills */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    background-color: white;
    border: 1px solid #cbd5e0;
    color: #2d3748;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pill:hover { background-color: #f1f5f9; border-color: #1a202c; color: #1a202c; }
.pill.active { background-color: #1a202c; color: white; border-color: #1a202c; }
.toggleable.active { border-color: #1a202c; background-color: #1a202c; color: white; }

/* Action Button */
.action-btn {
    background-color: #1a202c;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin-top: auto;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s, background-color 0.2s;
}

.action-btn:hover { background-color: #2d3748; }
.action-btn:active { transform: scale(0.98); }

.keyboard-hint {
    text-align: center;
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 8px;
}

/* Main Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background-color: #fafbfc;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .content-area { padding: 16px; min-height: 500px; }
}

.result-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
}

.progress-bar {
    height: 4px;
    background-color: #edf2f7;
    border-radius: 2px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #f59e0b;
    width: 0%;
    transition: width 0.3s ease;
}

/* Cards */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.slogan-card {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.slogan-card:hover { border-color: #cbd5e0; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }

/* [2026-05-01] Pawan: "hard to tell new vs old" — orange left-border accent on is-fresh cards
   matches meta-new badge color; signals freshly composed without cluttering layout */
.slogan-card.is-fresh {
    border-left: 3px solid #ed8936;
    background-color: #fffaf5;
}

/* [2026-05-01] Pawan: "why not on face" — composing placeholder card sits at top of results,
   shows spinner + ticking elapsed time, replaced by real card the moment it arrives */
.slogan-card.composing-placeholder {
    border-left: 3px solid #ed8936;
    background-color: #fffaf5;
    min-height: 72px;
    justify-content: flex-start;
}
.placeholder-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #4a5568;
    font-size: 1rem;
    width: 100%;
}
.placeholder-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: #ed8936;
    border-radius: 50%;
    animation: placeholder-spin 0.8s linear infinite;
    flex-shrink: 0;
}
.placeholder-timer {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    color: #a0aec0;
    font-size: 0.9rem;
    min-width: 28px;
    text-align: right;
}
@keyframes placeholder-spin {
    to { transform: rotate(360deg); }
}

.slogan-card.empty {
    border: 1px dashed #cbd5e0;
    color: #718096;
    justify-content: center;
    background-color: transparent;
    font-size: 0.95rem;
    padding: 32px 20px;
    box-shadow: none;
}

.slogan-card.empty:hover { border-color: #a0aec0; box-shadow: none; }

.slogan-main-text {
    font-size: 1.15rem;
    font-weight: 500;
    color: #1a202c;
    line-height: 1.4;
}

.slogan-meta {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.meta-tag {
    font-size: 0.75rem;
    background-color: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    text-transform: capitalize;
}

.meta-sector {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e0;
}

/* ══════════════════════════════════════════════════════════
   TAB BAR
   [2026-03-31] Sits between header and app-container.
   Two tabs: Variable (existing) and Inspired By (new).
══════════════════════════════════════════════════════════ */
.tab-bar {
    display: flex;
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    gap: 4px;
    height: 40px;
    align-items: flex-end;
    flex-shrink: 0;
}

.tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #718096;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 16px 6px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.tab:hover { color: #1a202c; }

.tab.active {
    color: #1a202c;
    border-bottom-color: #f59e0b;
    background: white;
    border-radius: 4px 4px 0 0;
    border-top: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    margin-bottom: -1px;
}


/* ══════════════════════════════════════════════════════════
   INSPIRED BY — sidebar compact result list
   [2026-03-31] Compact clickable list for picking source slogans.
   Keeps sidebar at fixed 270px width — no overflow.
══════════════════════════════════════════════════════════ */
.inspired-result-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
}

.inspired-empty-msg {
    font-size: 0.78rem;
    color: #a0aec0;
    text-align: center;
    padding: 24px 8px;
    line-height: 1.5;
}

.inspired-result-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #718096;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 6px 8px;
}

.inspired-result-item {
    font-size: 0.82rem;
    color: #2d3748;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.35;
    transition: all 0.12s;
}

.inspired-result-item:hover {
    background-color: #ebf4ff;
    border-color: #bee3f8;
    color: #2b6cb0;
}

.inspired-result-item.selected {
    background-color: #fef3c7;
    border-color: #f6ad55;
    color: #744210;
    font-weight: 600;
}


/* ══════════════════════════════════════════════════════════
   INSPIRED BY — main content: placeholder state
══════════════════════════════════════════════════════════ */
.inspire-placeholder-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 320px;
    padding: 40px 24px;
    color: #a0aec0;
}

.inspire-hint-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.inspire-hint-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #718096;
    margin-bottom: 10px;
}

.inspire-hint-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 380px;
}


/* ══════════════════════════════════════════════════════════
   INSPIRED BY — workshop header (selected slogan display)
══════════════════════════════════════════════════════════ */
.workshop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.workshop-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a0aec0;
    margin-bottom: 4px;
}

.workshop-slogan-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.4;
}

.btn-ghost-sm {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #718096;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 16px;
    flex-shrink: 0;
    transition: all 0.12s;
}

.btn-ghost-sm:hover { border-color: #e53e3e; color: #e53e3e; }


/* ══════════════════════════════════════════════════════════
   INSPIRED BY — POS workshop card
══════════════════════════════════════════════════════════ */
.pos-workshop-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.pos-workshop-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pos-workshop-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #718096;
}

.pos-workshop-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* [2026-03-31] "Try Precise" — small on-demand button to call Gemini for better POS.
   Deliberately small to signal it's optional, not the primary action. */
.btn-precise {
    background: transparent;
    border: 1px solid #b794f4;
    color: #6b46c1;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}

.btn-precise:hover:not(:disabled) {
    background: #faf5ff;
    border-color: #9f7aea;
}

.btn-precise:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.precise-status-text {
    font-size: 0.72rem;
    color: #718096;
}

.pos-hint {
    font-size: 0.72rem;
    color: #a0aec0;
    margin-top: 14px;
    font-style: italic;
}

/* [2026-05-01] Mode-B template div hidden by default; JS swaps class to show it. */
#mode-template { display: none; }
/* [2026-05-01] Tag-refine row inside pin-words card needs a small top gap. */
#mode-pin-words .pos-workshop-actions { margin-top: 8px; }


/* ══════════════════════════════════════════════════════════
   POS EQUATION BLOCKS
   [2026-03-31] Two visual states:
   - variable (blue): word will be replaced by Gemini-chosen word of that POS
   - locked (amber): word is a constant, passed verbatim into the prompt
   Clicking a block opens an inline input to set/clear the constant.
══════════════════════════════════════════════════════════ */
.pos-equation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    padding: 4px 0;
    min-height: 72px;
}

.pos-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    min-width: 60px;
    text-align: center;
    transition: background 0.12s, border-color 0.12s, transform 0.08s;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
}

.pos-block:active { transform: scale(0.96); }

/* Variable state: blue — word will be substituted by Gemini */
.pos-block.variable {
    background-color: #ebf4ff;
    border: 2px solid #bee3f8;
}

.pos-block.variable:hover {
    background-color: #bee3f8;
    border-color: #90cdf4;
}

/* Locked state: amber — word is fixed as a constant */
.pos-block.locked {
    background-color: #fffbeb;
    border: 2px solid #f6ad55;
    cursor: pointer;
}

.pos-block.locked:hover {
    background-color: #fef3c7;
    border-color: #ed8936;
}

.pos-word {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 4px;
}

.pos-block.variable .pos-word { color: #2b6cb0; }
.pos-block.locked .pos-word   { color: #744210; }

.pos-tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pos-block.variable .pos-tag { color: #4299e1; }
.pos-block.locked .pos-tag   { color: #c05621; }

/* Inline constant input — shown when user clicks a block */
.pos-const-input {
    width: 72px;
    max-width: 100%;
    border: none;
    border-bottom: 2px solid #f6ad55;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a202c;
    text-align: center;
    outline: none;
    padding: 2px 0;
    margin-bottom: 4px;
}


/* ══════════════════════════════════════════════════════════
   INSPIRED BY — generate controls row
══════════════════════════════════════════════════════════ */
.inspire-gen-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.inspire-gen-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.inspire-results-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0 20px;
}


/* ══════════════════════════════════════════════════════════
   INSPIRED BY — mode tabs (Pin Words / Write Template) [2026-05-01]
   Why this exists: Pawan flagged that "FIND A SLOGAN TO REMIX" panel had
   only ONE workflow (pin words on a found slogan) and it was unclear and
   not working. The two-mode tab below the workshop header gives the user
   an explicit choice — Pin Words (start from a found slogan, click to blank
   words) vs Write Template (free-text "X of [BLANK]" templates).
   Pawan: "to have template fixes and 1-2 variables and then play with them
   get a variety - the second is even more powerful".
   If removed: workshop reverts to single-mode pin-words only.
══════════════════════════════════════════════════════════ */
.inspire-mode-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.inspire-mode-tab {
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    background: transparent;
    color: #718096;
    cursor: pointer;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.inspire-mode-tab:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}

.inspire-mode-tab.active {
    background: #ebf4ff;
    border-color: #90cdf4;
    color: #2b6cb0;
}

/* Template mode */
.template-build-hint {
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 10px;
    line-height: 1.5;
}

.template-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f7fafc;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    line-height: 1.5;
}

.template-input:focus {
    outline: none;
    border-color: #90cdf4;
    background: #fff;
}

.template-preview {
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 18px;
}

/* Footer */
.app-footer {
    height: 36px;
    background-color: white;
    border-top: 1px solid #e1e4e8;
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 0.75rem;
    color: #718096;
}

.footer-stats { display: flex; gap: 12px; align-items: center; }
.divider { color: #cbd5e0; }

/* [2026-04-30] Divider between freshly composed and previously found results */
.gen-divider {
    position: relative;
    text-align: center;
    margin: 20px 0 16px;
    color: #a0aec0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.gen-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}
.gen-divider span {
    position: relative;
    background: #f7f9fc;
    padding: 0 14px;
}

/* [2026-04-30] Pawan: freshly composed cards get a distinct New chip so they're
   visually separate from existing search results — both in compose-more and generator flows. */
.meta-tag.meta-new {
    background: #276749;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* [2026-04-30] Streaming card reveal — 0.9s fade-up build, class removed after animation */
@keyframes cardBuild {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.slogan-card.card-building { animation: cardBuild 0.9s ease forwards; }
