.brand-clergy {
    --faith-gold:    #C9A84C;
    --faith-gold-dk: #A88030;
    --faith-gold-soft: rgba(201, 168, 76, 0.16);
    --faith-bg:      #0f0e0a;
    --faith-panel:   rgba(20, 18, 12, 0.97);
    --faith-ink:     #f5f0e8;
    --faith-muted:   #a09880;

    /* Override the global accent with sacred gold */
    --accent:      var(--faith-gold);
    --accent-dark: var(--faith-gold-dk);
    --accent-soft: var(--faith-gold-soft);
    --ink:         var(--faith-ink);
    --muted:       var(--faith-muted);
    --panel:       var(--faith-panel);
    --bg:          var(--faith-bg);

    background:
        radial-gradient(circle at top left,  rgba(201, 168, 76, 0.07), transparent 24%),
        radial-gradient(circle at top right, rgba(120, 80,  30, 0.07), transparent 20%),
        linear-gradient(180deg, #0f0e0a 0%, #080707 100%);
}

/* FaithTools login page */
.faith-auth-shell {
    background:
        radial-gradient(circle at top, rgba(201, 168, 76, 0.10), transparent 50%),
        linear-gradient(180deg, #0e0c08 0%, #060504 100%);
}
.faith-auth-card {
    border-color: rgba(201, 168, 76, 0.2);
}
.faith-cross-mark {
    font-size: 2rem;
    color: var(--faith-gold, #C9A84C);
    line-height: 1;
}
.faith-brand-word {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faith-gold, #C9A84C);
}
.faith-brand-tagline {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, 0.6);
}
.faith-submit-btn {
    background: var(--faith-gold, #C9A84C) !important;
    color: #0a0800 !important;
}
.faith-submit-btn:hover {
    background: var(--faith-gold-dk, #A88030) !important;
}

/* Clergy body: warm gold eyebrow/accent text */
.brand-clergy .eyebrow { color: var(--faith-gold); }
.brand-clergy .primary-btn {
    background: var(--faith-gold);
    color: #0a0800;
}
.brand-clergy .primary-btn:hover {
    background: var(--faith-gold-dk);
}
.brand-clergy a { color: var(--faith-gold); }

/* Brand bar / logo area — swap orange accent chip to gold */
.brand-clergy .brandbar-logo-mark,
.brand-clergy .auth-brand-mark { background: var(--faith-gold); color: #0a0800; }

/* Carousel card accent underline */
.brand-clergy .demo-card-title { color: var(--faith-ink); }
.brand-clergy .demo-card:hover .demo-card-title { color: var(--faith-gold); }

/* Tool tier badge — gold instead of orange */
.brand-clergy .wf-tool-tier { background: rgba(201, 168, 76, 0.85); }

/* Admin brand badge */
.brand-clergy .admin-badge { background: var(--faith-gold); color: #0a0800; }

/* Faith cross watermark — subtle background element on auth pages */
.brand-clergy .auth-shell::before {
    content: "✦";
    position: fixed;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6rem;
    color: rgba(201, 168, 76, 0.04);
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

/* ── END FAITHTOOLS CLERGY THEME ── */

/* ══════════════════════════════════════════════════════════════════
   HYMN LIBRARY PICKER — Workflow-level component for hymn-aifi-it
   ════════════════════════════════════════════════════════════════ */

.wf-hymn-lib {
    margin-bottom: 18px;
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(201, 168, 76, 0.04);
}

.wf-hymn-lib-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: none;
    border: none;
    color: #c9a84c;
    cursor: pointer;
    font-size: .83rem;
    font-weight: 500;
    text-align: left;
    transition: background .15s;
}
.wf-hymn-lib-toggle:hover { background: rgba(201, 168, 76, 0.07); }

.wf-hymn-icon { font-size: .9rem; flex-shrink: 0; }
.wf-hymn-toggle-label { flex: 1; }
.wf-hymn-count {
    background: rgba(201, 168, 76, 0.18);
    color: #c9a84c;
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
}
.wf-hymn-chevron { font-size: .75rem; opacity: .7; flex-shrink: 0; transition: transform .2s; }

.wf-hymn-panel { padding: 0 14px 14px; }

.wf-hymn-themes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.wf-hymn-theme-btn {
    padding: 4px 11px;
    border-radius: 20px;
    border: 1px solid rgba(201, 168, 76, 0.3);
    background: none;
    color: rgba(255,255,255,.6);
    font-size: .75rem;
    cursor: pointer;
    transition: all .15s;
}
.wf-hymn-theme-btn:hover { border-color: #c9a84c; color: #c9a84c; }
.wf-hymn-theme-btn.is-active {
    background: rgba(201, 168, 76, 0.2);
    border-color: #c9a84c;
    color: #c9a84c;
    font-weight: 600;
}

.wf-hymn-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(201,168,76,.3) transparent;
}

.wf-hymn-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 11px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
    cursor: pointer;
    text-align: left;
    transition: all .15s;
    gap: 2px;
}
.wf-hymn-item:hover {
    border-color: rgba(201,168,76,.4);
    background: rgba(201,168,76,.08);
}

.wf-hymn-item-title {
    font-size: .8rem;
    font-weight: 500;
    color: rgba(255,255,255,.88);
    line-height: 1.3;
}
.wf-hymn-item-author {
    font-size: .68rem;
    color: rgba(255,255,255,.38);
    line-height: 1.2;
}

/* ── END HYMN LIBRARY PICKER ── */

/* ══════════════════════════════════════════════════════════════
   MUSIC ARRANGEMENT TIMELINE EDITOR  (organ-aifi-it)
   ══════════════════════════════════════════════════════════════ */

.wf-music-timeline {
    margin-bottom: 18px;
    border: 1px solid rgba(201,168,76,.22);
    border-radius: 11px;
    overflow: hidden;
    background: rgba(201,168,76,.03);
}

/* ── Library strip ── */
.wf-mt-library {
    padding: 12px 14px 11px;
    border-bottom: 1px solid rgba(201,168,76,.12);
}
.wf-mt-library-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}
.wf-mt-library-title {
    color: #c9a84c;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
}
.wf-mt-library-hint {
    color: rgba(255,255,255,.3);
    font-size: .7rem;
}
.wf-mt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.wf-mt-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid currentColor;
    background: rgba(0,0,0,.25);
    cursor: grab;
    font-size: .76rem;
    font-weight: 500;
    transition: background .13s, transform .1s, box-shadow .1s;
    user-select: none;
    white-space: nowrap;
}
.wf-mt-chip:hover {
    background: rgba(255,255,255,.09);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.wf-mt-chip:active { cursor: grabbing; transform: translateY(0); }

/* ── Track area ── */
.wf-mt-track-area {
    padding: 11px 14px 13px;
}
.wf-mt-track-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: .76rem;
    color: rgba(255,255,255,.45);
}
.wf-mt-total-label {
    margin-left: auto;
    font-size: .73rem;
}
.wf-mt-total-label span { font-weight: 600; }
.wf-mt-clear {
    background: none;
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.35);
    padding: 2px 9px;
    border-radius: 4px;
    font-size: .7rem;
    cursor: pointer;
    transition: all .14s;
}
.wf-mt-clear:hover { border-color: rgba(201,68,68,.55); color: #c44444; }

.wf-mt-track {
    min-height: 88px;
    border: 2px dashed rgba(201,168,76,.2);
    border-radius: 8px;
    padding: 8px 8px 8px;
    background: rgba(0,0,0,.18);
    transition: border-color .15s;
    position: relative;
}
.wf-mt-track.drag-over { border-color: rgba(201,168,76,.55); }

.wf-mt-track-empty {
    color: rgba(255,255,255,.22);
    font-size: .78rem;
    text-align: center;
    padding: 22px 0;
    pointer-events: none;
    user-select: none;
}

.wf-mt-blocks {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 64px;
    align-items: flex-start;
}

/* ── Individual blocks ── */
.wf-mt-block {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 7px 7px 5px;
    border-radius: 8px;
    border: 1.5px solid;
    cursor: grab;
    user-select: none;
    min-width: 74px;
    transition: transform .1s, box-shadow .12s, opacity .1s;
    flex-shrink: 0;
}
.wf-mt-block:active { cursor: grabbing; }
.wf-mt-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(0,0,0,.35);
}
.wf-mt-block.is-dragging { opacity: .4; }
.wf-mt-block.drag-over-block {
    outline: 2px solid rgba(201,168,76,.65);
    outline-offset: 2px;
}

.wf-mt-block-top {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 6px;
    padding-right: 14px;
}
.wf-mt-block-icon { font-size: 1.05rem; line-height: 1; }
.wf-mt-block-name {
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
}

.wf-mt-block-dur {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}
.wf-mt-dur-btn {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.7);
    font-size: .9rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .1s;
    flex-shrink: 0;
}
.wf-mt-dur-btn:hover { background: rgba(255,255,255,.16); }
.wf-mt-dur-val {
    font-size: .67rem;
    color: rgba(255,255,255,.55);
    min-width: 22px;
    text-align: center;
}

.wf-mt-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: none;
    background: rgba(200,60,60,.55);
    color: #fff;
    font-size: .65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    opacity: 0;
    transition: opacity .13s, background .1s;
}
.wf-mt-block:hover .wf-mt-remove { opacity: 1; }
.wf-mt-remove:hover { background: rgba(200,60,60,.9); }

/* ── Preview row ── */
.wf-mt-preview {
    padding: 9px 14px 12px;
    border-top: 1px solid rgba(201,168,76,.1);
    font-size: .73rem;
    color: rgba(255,255,255,.38);
    font-style: italic;
    line-height: 1.5;
}
.wf-mt-preview strong { color: #c9a84c; font-style: normal; }

/* ── END MUSIC TIMELINE EDITOR ── */

/* ═══════════════════════════════════════════════════════════════════════════
   AI TOOL CHAT WIDGET
   Floating bubble (bottom-right) + slide-in drawer.
   Appears on all logged-in tool pages via base.html + tool_chat.js.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Floating UI portal root ───────────────────────────────────────────────
   Single position:fixed layer that owns the Ask AI bubble AND the bug badge.
   Children use position:absolute so they are immune to any transform, filter,
   or overflow-hidden on ancestor elements in the page. pointer-events:none on
   the root ensures the transparent area never blocks page clicks. ── */
#aifi-floating-root {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999999;
}

.tc-bubble {
    position: absolute;
    bottom: 84px;           /* above the bug-reporter badge */
    right: 20px;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #6c3aff 0%, #a259ff 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(108, 58, 255, 0.45);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
}
.tc-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(108, 58, 255, 0.55);
}
.tc-bubble--active {
    background: linear-gradient(135deg, #4a1fc7 0%, #7e3fff 100%);
}
.tc-bubble-label {
    letter-spacing: 0.01em;
}

/* Drawer */
.tc-drawer {
    position: absolute;
    bottom: 150px;
    right: 20px;
    pointer-events: auto;
    width: 320px;
    max-height: 480px;
    background: #1a1a2e;
    border: 1px solid rgba(162, 89, 255, 0.35);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.2s, transform 0.2s;
}
.tc-drawer--closed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px) scale(0.97);
}
.tc-drawer--open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.tc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(108, 58, 255, 0.18);
    border-bottom: 1px solid rgba(162, 89, 255, 0.2);
    flex-shrink: 0;
}
.tc-header-left {
    display: flex;
    align-items: center;
    gap: 7px;
}
.tc-header-icon {
    color: #a259ff;
    font-size: 16px;
}
.tc-tool-name {
    color: #e0d6ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.tc-close {
    background: none;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.15s;
}
.tc-close:hover { color: #e0d6ff; }

/* Messages */
.tc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #3a2a6a transparent;
}
.tc-msg {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tc-msg--user { align-items: flex-end; }
.tc-msg--assistant { align-items: flex-start; }

.tc-bubble-msg {
    max-width: 85%;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
}
.tc-msg--user .tc-bubble-msg {
    background: linear-gradient(135deg, #6c3aff 0%, #9a52f2 100%);
    color: #fff;
    border-bottom-right-radius: 3px;
}
.tc-msg--assistant .tc-bubble-msg {
    background: rgba(255,255,255,0.07);
    color: #ddd;
    border-bottom-left-radius: 3px;
}
.tc-msg--greeting .tc-bubble-msg {
    background: rgba(162,89,255,0.12);
    color: #c8b8ff;
    font-style: italic;
}

/* Thinking dots */
.tc-bubble-msg--thinking {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
}
.tc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a259ff;
    display: inline-block;
    animation: tc-bounce 1.2s infinite ease-in-out;
}
.tc-dot:nth-child(2) { animation-delay: 0.2s; }
.tc-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes tc-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40%           { transform: scale(1);   opacity: 1;   }
}

/* Navigation button */
.tc-nav-btn {
    align-self: flex-start;
    margin-top: 2px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #6c3aff 0%, #a259ff 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.tc-nav-btn:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 12px rgba(108,58,255,0.5);
}

/* Input row */
.tc-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.tc-input {
    flex: 1;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(162,89,255,0.3);
    border-radius: 8px;
    color: #e0d6ff;
    font-size: 13px;
    padding: 8px 10px;
    outline: none;
    transition: border-color 0.15s;
}
.tc-input:focus { border-color: rgba(162,89,255,0.7); }
.tc-input::placeholder { color: rgba(255,255,255,0.3); }
.tc-send {
    background: linear-gradient(135deg, #6c3aff, #a259ff);
    border: none;
    border-radius: 8px;
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.tc-send:disabled { opacity: 0.5; cursor: not-allowed; }
.tc-send:not(:disabled):hover { opacity: 0.88; }

/* Mobile: make drawer full-width on very small screens */
@media (max-width: 380px) {
    .tc-drawer { right: 8px; left: 8px; width: auto; }
    .tc-bubble { right: 8px; }
    #aifi-bug-badge { right: 8px; }
}

/* ── END AI TOOL CHAT WIDGET ── */


/* ═══════════════════════════════════════════════════════════════════════════
   SMART TIPS PANEL
   Rotating "Did you know?" card strip on the render/result page.
   Injected by direct_job_status.html, driven by tool_tips.js.
   ═══════════════════════════════════════════════════════════════════════════ */

.aifi-tips-panel {
    margin: 20px 24px 8px;
    background: linear-gradient(135deg, rgba(108,58,255,0.10) 0%, rgba(162,89,255,0.08) 100%);
    border: 1px solid rgba(162,89,255,0.25);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    transition: opacity 0.4s;
}
.tips-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    flex-wrap: wrap;
}
.tips-sparkle {
    font-size: 18px;
    color: #a259ff;
    flex-shrink: 0;
}
.tips-tip-text {
    flex: 1;
    margin: 0;
    font-size: 14px;
    color: #ccc;
    line-height: 1.45;
    min-width: 160px;
}
.tips-cta-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    background: linear-gradient(135deg, #6c3aff, #a259ff);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}
.tips-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(108,58,255,0.45);
}
.tips-controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 4px;
}
.tips-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}
.tips-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(162,89,255,0.3);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.tips-dot--active {
    background: #a259ff;
    transform: scale(1.25);
}
.tips-next-btn {
    background: none;
    border: none;
    color: rgba(162,89,255,0.7);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.15s;
}
.tips-next-btn:hover { color: #a259ff; }

/* ── END SMART TIPS PANEL ── */

/* ══════════════════════════════════════════════════════════════════
   3-PANEL LAYOUT — 3-column gallery workflow UI (CSS classes use .wf-triptych-* prefix)
   Used by: light-aifi-it, scene-aifi-it, print-aifi-it, portrait-aifi-it
   ══════════════════════════════════════════════════════════════════ */

