/* ─── Prior AI Features ───────────────────────────────────────────────────
   Covers: response length toggle, prompt templates, search, pin messages,
   follow-up suggestions, save-to-vault button, bulk select (vault)
   ─────────────────────────────────────────────────────────────────────── */

/* ══ Response Length Toggle ══════════════════════════════════════════════ */
.length-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-dark, #151516);
    border: 1px solid var(--border-color, #333);
    border-radius: 6px;
    padding: 2px;
}
.length-btn {
    background: none;
    border: none;
    color: var(--text-color, #ccc);
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 3px 7px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.55;
    transition: all 0.15s;
    letter-spacing: 0.03em;
}
.length-btn:hover  { opacity: 0.85; }
.length-btn.active {
    background: var(--theme-color, #00ffcc);
    color: #000;
    opacity: 1;
    font-weight: 700;
}

/* ══ Prompt Templates ════════════════════════════════════════════════════ */
.templates-dropdown {
    position: absolute;
    bottom: 3.2rem;
    left: 0;
    background: var(--bg-secondary, #1a1a1c);
    border: 1px solid var(--border-color, #333);
    border-radius: 10px;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 500;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    animation: tmpl-pop 0.18s ease;
    padding: 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.templates-dropdown::-webkit-scrollbar       { width: 4px; }
.templates-dropdown::-webkit-scrollbar-track { background: transparent; }
.templates-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.templates-dropdown::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
/* Template SVG icons inherit text color */
.template-item-icon svg { display: block; opacity: 0.7; }
@keyframes tmpl-pop {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.templates-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0.5rem 0.4rem;
    font-size: 0.72rem;
    color: var(--text-color);
    opacity: 0.5;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.template-item {
    padding: 0.5rem 0.7rem;
    font-size: 0.83rem;
    color: var(--text-color, #ccc);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.12s;
}
.template-item:hover { background: rgba(255,255,255,0.06); }
.template-item-icon  { font-size: 0.9rem; flex-shrink: 0; }
.template-item-text  { flex: 1; line-height: 1.3; }
.template-item-delete {
    opacity: 0;
    font-size: 0.8rem;
    color: #ff4444;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    transition: opacity 0.15s;
}
.template-item:hover .template-item-delete { opacity: 0.7; }
.template-save-row {
    padding: 0.4rem 0.3rem 0.2rem;
    border-top: 1px solid var(--border-color, #333);
    margin-top: 0.3rem;
}
.template-save-btn {
    width: 100%;
    background: rgba(var(--rgb-theme-color, 0,255,204), 0.08);
    border: 1px dashed rgba(var(--rgb-theme-color, 0,255,204), 0.3);
    color: var(--theme-color, #00ffcc);
    border-radius: 6px;
    padding: 0.4rem;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s;
}
.template-save-btn:hover { background: rgba(var(--rgb-theme-color, 0,255,204), 0.14); }

/* ══ Chat Search ═════════════════════════════════════════════════════════ */
.chat-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary, #1a1a1c);
    border-bottom: 1px solid var(--border-color, #333);
    animation: search-slide 0.2s ease;
}
@keyframes search-slide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.chat-search-input {
    flex: 1;
    background: var(--bg-dark, #151516);
    border: 1px solid var(--border-color, #333);
    border-radius: 6px;
    padding: 0.38rem 0.7rem;
    color: var(--text-color, #ccc);
    font-size: 0.85rem;
    outline: none;
}
.chat-search-input:focus { border-color: var(--theme-color, #00ffcc); }
.chat-search-count {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.5;
    white-space: nowrap;
    min-width: 55px;
    text-align: right;
}
.chat-search-close {
    background: none;
    border: none;
    color: var(--text-color);
    opacity: 0.5;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 4px;
}
.chat-search-close:hover { opacity: 1; }
.search-highlight {
    background: rgba(var(--rgb-theme-color, 0,255,204), 0.25);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}
.search-highlight.active {
    background: rgba(var(--rgb-theme-color, 0,255,204), 0.5);
    outline: 1px solid rgba(var(--rgb-theme-color, 0,255,204), 0.7);
}
.msg-search-hidden { display: none !important; }

/* ══ Pin Messages ════════════════════════════════════════════════════════ */
.pin-indicator {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    font-size: 0.75rem;
    opacity: 0.6;
    pointer-events: none;
}
.pinned-section {
    background: rgba(var(--rgb-theme-color, 0,255,204), 0.04);
    border: 1px solid rgba(var(--rgb-theme-color, 0,255,204), 0.15);
    border-radius: 10px;
    margin: 0.5rem 1rem 0;
    overflow: hidden;
}
.pinned-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--theme-color, #00ffcc);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    user-select: none;
}
.pinned-section-header:hover { background: rgba(255,255,255,0.03); }
.pinned-items { padding: 0 0.5rem 0.5rem; }
.pinned-item {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
    color: var(--text-color, #ccc);
    opacity: 0.75;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.12s;
}
.pinned-item:hover { background: rgba(255,255,255,0.05); opacity: 1; }
.pinned-item-unpin {
    float: right;
    font-size: 0.7rem;
    opacity: 0.4;
    margin-left: 0.4rem;
}
.pinned-item-unpin:hover { opacity: 1; color: #ff4444; }

/* ══ Follow-up Suggestions ═══════════════════════════════════════════════ */
.followup-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color, #333);
    animation: chips-fade 0.3s ease;
}
@keyframes chips-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.followup-chip {
    background: rgba(141,224,252,0.07);
    border: 1px solid rgba(141,224,252,0.2);
    color: #8de0fc;
    font-size: 0.78rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
}
.followup-chip:hover {
    background: rgba(141,224,252,0.15);
    border-color: rgba(141,224,252,0.4);
}

/* ══ Load Older Messages Button ═════════════════════════════════════════ */
.load-older-btn {
    display: block;
    width: fit-content;
    margin: 0.6rem auto 1rem;
    background: rgba(141,224,252,0.07);
    border: 1px solid rgba(141,224,252,0.2);
    color: #8de0fc;
    font-size: 0.78rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s;
}
.load-older-btn:hover {
    background: rgba(141,224,252,0.15);
    border-color: rgba(141,224,252,0.4);
}

/* ══ Save to Vault Button ════════════════════════════════════════════════ */
.save-vault-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid rgba(var(--rgb-theme-color, 0,255,204), 0.25);
    color: rgba(var(--rgb-theme-color, 0,255,204), 0.7);
    font-size: 0.73rem;
    padding: 0.28rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.15s;
    font-family: inherit;
}
.save-vault-btn:hover {
    background: rgba(var(--rgb-theme-color, 0,255,204), 0.08);
    border-color: rgba(var(--rgb-theme-color, 0,255,204), 0.5);
    color: var(--theme-color, #00ffcc);
}
.save-vault-btn svg { flex-shrink: 0; }

/* ══ Vault Bulk Select ═══════════════════════════════════════════════════ */
.bulk-action-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--bg-secondary, #1a1a1c);
    border: 1px solid var(--border-color, #333);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    transition: transform 0.25s ease;
    min-width: 280px;
}
.bulk-action-bar.visible {
    transform: translateX(-50%) translateY(0);
}
.bulk-count {
    font-size: 0.82rem;
    color: var(--text-color);
    flex: 1;
    white-space: nowrap;
}
.bulk-count strong { color: var(--theme-color, #00ffcc); }
.bulk-btn {
    background: none;
    border: 1px solid var(--border-color, #333);
    color: var(--text-color, #ccc);
    border-radius: 7px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.bulk-btn:hover { background: rgba(255,255,255,0.06); }
.bulk-btn.danger { color: #ff4444; border-color: rgba(255,68,68,0.3); }
.bulk-btn.danger:hover { background: rgba(255,68,68,0.1); }
.bulk-deselect {
    background: none;
    border: none;
    color: var(--text-color);
    opacity: 0.5;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 4px;
}
.bulk-deselect:hover { opacity: 1; }
/* Show checkbox on hover over file/folder cards */
.file-item:hover .file-checkbox,
.file-item.bulk-selected .file-checkbox {
    opacity: 1 !important;
}
.file-item.bulk-selected {
    outline: 2px solid var(--theme-color, #00ffcc);
    outline-offset: -2px;
    background: rgba(var(--rgb-theme-color, 0,255,204), 0.05);
}

/* ══ Prior AI Audio Player (Prior Ripper) ════════════════════════════════════ */
.prior-ai-player {
    background: linear-gradient(160deg, rgba(0,0,0,0.85) 0%, rgba(var(--rgb-theme-color,0,255,204),0.04) 100%);
    border: 1px solid rgba(var(--rgb-theme-color,0,255,204), 0.18);
    border-radius: 18px;
    padding: 28px 28px 22px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 0 40px rgba(var(--rgb-theme-color,0,255,204), 0.05),
                inset 0 1px 0 rgba(var(--rgb-theme-color,0,255,204), 0.08);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 0.8rem;
    transition: box-shadow 0.4s;
}
.prior-ai-player.pap-active {
    box-shadow: 0 0 50px rgba(var(--rgb-theme-color,0,255,204), 0.12),
                inset 0 1px 0 rgba(var(--rgb-theme-color,0,255,204), 0.12);
}
/* Disc */
.pap-disc {
    width: 140px; height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%,
        rgba(var(--rgb-theme-color,0,255,204), 0.12) 0%,
        rgba(0,0,0,0.9) 60%,
        rgba(var(--rgb-theme-color,0,255,204), 0.06) 100%);
    border: 1.5px solid rgba(var(--rgb-theme-color,0,255,204), 0.25);
    box-shadow: 0 0 0 8px rgba(var(--rgb-theme-color,0,255,204), 0.04),
                0 0 0 16px rgba(var(--rgb-theme-color,0,255,204), 0.02);
    display: flex; align-items: center; justify-content: center;
    position: relative; flex-shrink: 0;
    overflow: hidden;
    transition: border-color 0.4s, box-shadow 0.4s;
}
.pap-disc.pap-playing {
    border-color: rgba(var(--rgb-theme-color,0,255,204), 0.5);
    box-shadow: 0 0 0 8px rgba(var(--rgb-theme-color,0,255,204), 0.06),
                0 0 0 16px rgba(var(--rgb-theme-color,0,255,204), 0.03),
                0 0 28px rgba(var(--rgb-theme-color,0,255,204), 0.15);
    animation: pap-spin 12s linear infinite;
}
@keyframes pap-spin { to { transform: rotate(360deg); } }
.pap-disc-thumb {
    position: absolute; inset: 0;
    border-radius: 50%;
    background-size: cover; background-position: center;
    opacity: 0.35;
}
.pap-disc::before {
    content: ''; position: absolute;
    width: 56px; height: 56px; border-radius: 50%;
    border: 1px solid rgba(var(--rgb-theme-color,0,255,204), 0.15);
    z-index: 2;
}
.pap-disc::after {
    content: ''; position: absolute;
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(var(--rgb-theme-color,0,255,204), 0.45);
    box-shadow: 0 0 10px rgba(var(--rgb-theme-color,0,255,204), 0.5);
    z-index: 3;
}
.pap-disc-note {
    color: var(--theme-color,#00ffcc); opacity: 0.5;
    width: 36px; height: 36px; z-index: 4; position: relative;
}
.pap-disc.pap-playing .pap-disc-note { opacity: 0.8; }
/* EQ bars inside disc */
.pap-disc-eq {
    position: absolute; bottom: 14px;
    display: flex; align-items: flex-end; gap: 3px; height: 16px; z-index: 4;
}
.pap-disc-eq span {
    display: block; width: 3px; border-radius: 2px;
    background: var(--theme-color,#00ffcc); opacity: 0.7; height: 3px;
}
.pap-disc.pap-playing .pap-disc-eq span:nth-child(1) { animation: pap-eq 0.8s ease-in-out infinite alternate; }
.pap-disc.pap-playing .pap-disc-eq span:nth-child(2) { animation: pap-eq 0.6s ease-in-out 0.1s infinite alternate; }
.pap-disc.pap-playing .pap-disc-eq span:nth-child(3) { animation: pap-eq 1.0s ease-in-out 0.2s infinite alternate; }
.pap-disc.pap-playing .pap-disc-eq span:nth-child(4) { animation: pap-eq 0.7s ease-in-out 0.05s infinite alternate; }
.pap-disc.pap-playing .pap-disc-eq span:nth-child(5) { animation: pap-eq 0.9s ease-in-out 0.15s infinite alternate; }
@keyframes pap-eq {
    from { height: 3px; opacity: 0.5; }
    to   { height: 13px; opacity: 1; }
}
/* Track info */
.pap-info { text-align: center; width: 100%; min-width: 0; }
.pap-track-name {
    font-size: 0.88rem; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%; margin-bottom: 3px;
}
.pap-format-tag {
    font-size: 0.6rem; letter-spacing: 2px;
    color: var(--theme-color,#00ffcc); opacity: 0.6; text-transform: uppercase;
}
/* Seek */
.pap-seek-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.pap-time {
    font-size: 0.68rem; color: rgba(255,255,255,0.4);
    min-width: 30px; font-variant-numeric: tabular-nums;
}
.pap-time.pap-dur { text-align: right; }
.pap-seekbar {
    flex: 1; height: 4px;
    background: rgba(var(--rgb-theme-color,0,255,204), 0.12);
    border-radius: 4px; cursor: pointer; position: relative; overflow: visible;
}
.pap-seekfill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--theme-color,#00ffcc), rgba(var(--rgb-theme-color,0,255,204),0.6));
    border-radius: 4px; pointer-events: none; transition: width 0.1s linear;
    position: relative;
}
.pap-seekfill::after {
    content: ''; position: absolute; right: -5px; top: 50%;
    transform: translateY(-50%);
    width: 11px; height: 11px; background: var(--theme-color,#00ffcc);
    border-radius: 50%; box-shadow: 0 0 8px rgba(var(--rgb-theme-color,0,255,204),0.7);
    opacity: 0; transition: opacity 0.2s;
}
.pap-seekbar:hover .pap-seekfill::after { opacity: 1; }
/* Controls */
.pap-btns {
    display: flex; align-items: center; justify-content: center;
    gap: 14px; position: relative; width: 100%;
}
.pap-play {
    width: 48px; height: 48px; border-radius: 50%;
    border: 1.5px solid rgba(var(--rgb-theme-color,0,255,204), 0.4);
    background: rgba(var(--rgb-theme-color,0,255,204), 0.1);
    color: var(--theme-color,#00ffcc); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.pap-play:hover {
    background: rgba(var(--rgb-theme-color,0,255,204), 0.2);
    box-shadow: 0 0 18px rgba(var(--rgb-theme-color,0,255,204), 0.25);
    transform: scale(1.05);
}
.pap-play:active { transform: scale(0.97); }
.pap-loop {
    background: none; border: none;
    color: rgba(255,255,255,0.35); cursor: pointer;
    padding: 8px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.2s, background 0.2s;
    position: absolute; right: 0;
}
.pap-loop:hover { color: var(--theme-color,#00ffcc); background: rgba(var(--rgb-theme-color,0,255,204),0.08); }
.pap-loop.pap-loop-on { color: var(--theme-color,#00ffcc); background: rgba(var(--rgb-theme-color,0,255,204),0.12); }
/* Volume */
.pap-vol-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 2px; }
.pap-vol-icon { color: rgba(255,255,255,0.35); flex-shrink: 0; }
.pap-vol {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 3px; background: rgba(var(--rgb-theme-color,0,255,204),0.15);
    border-radius: 3px; outline: none; cursor: pointer;
}
.pap-vol::-webkit-slider-thumb {
    -webkit-appearance: none; width: 11px; height: 11px;
    background: var(--theme-color,#00ffcc); border-radius: 50%;
    cursor: pointer; box-shadow: 0 0 6px rgba(var(--rgb-theme-color,0,255,204),0.5);
}
.pap-vol::-moz-range-thumb {
    width: 11px; height: 11px; background: var(--theme-color,#00ffcc);
    border-radius: 50%; border: none; cursor: pointer;
}
/* Download */
.pap-download {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.7rem; color: rgba(var(--rgb-theme-color,0,255,204),0.6);
    border: 1px solid rgba(var(--rgb-theme-color,0,255,204),0.2);
    border-radius: 6px; padding: 0.25rem 0.6rem;
    text-decoration: none; transition: all 0.15s; background: none;
    cursor: pointer;
}
.pap-download:hover {
    background: rgba(var(--rgb-theme-color,0,255,204),0.08);
    color: var(--theme-color,#00ffcc);
    border-color: rgba(var(--rgb-theme-color,0,255,204),0.4);
}

/* ══ Prior Ripper Usage Counter ══════════════════════════════════════════ */
.ripper-counter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(var(--rgb-theme-color,0,255,204),0.05);
    border: 1px solid rgba(var(--rgb-theme-color,0,255,204),0.12);
    font-size: 0.68rem;
    font-family: 'JetBrains Mono', monospace;
    color: rgba(255,255,255,0.45);
    margin-top: 6px;
}
.ripper-counter svg { flex-shrink: 0; color: var(--theme-color,#00ffcc); opacity: 0.6; }
.ripper-counter-bar {
    width: 60px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.ripper-counter-fill {
    height: 100%;
    background: var(--theme-color,#00ffcc);
    border-radius: 2px;
    transition: width 0.4s ease;
}
.ripper-counter-note {
    color: rgba(var(--rgb-theme-color,0,255,204),0.7);
}
.ripper-counter-warn {
    border-color: rgba(255,160,0,0.3);
    background: rgba(255,160,0,0.04);
}
.ripper-counter-warn svg { color: #ffa000; }
.ripper-counter-warn .ripper-counter-fill { background: #ffa000; }
.ripper-counter-warn .ripper-counter-note { color: #ffa000; }

/* ══ Prior Ripper Format Picker ══════════════════════════════════════════ */
.prior-format-picker {
    background: linear-gradient(160deg, rgba(0,0,0,0.85) 0%, rgba(var(--rgb-theme-color,0,255,204),0.04) 100%);
    border: 1px solid rgba(var(--rgb-theme-color,0,255,204),0.18);
    border-radius: 16px;
    padding: 16px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}
.pfp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', monospace;
    color: rgba(var(--rgb-theme-color,0,255,204),0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pfp-header svg { flex-shrink: 0; color: var(--theme-color,#00ffcc); }
.pfp-title {
    font-size: 0.83rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pfp-platform {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.4);
    font-family: 'JetBrains Mono', monospace;
}
.pfp-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.pfp-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    background: rgba(var(--rgb-theme-color,0,255,204),0.07);
    border: 1px solid rgba(var(--rgb-theme-color,0,255,204),0.25);
    border-radius: 10px;
    color: var(--text-color);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.15s;
    flex: 1;
    min-width: 100px;
}
.pfp-btn:hover {
    background: rgba(var(--rgb-theme-color,0,255,204),0.15);
    border-color: var(--theme-color,#00ffcc);
    color: var(--theme-color,#00ffcc);
    transform: translateY(-1px);
}
.pfp-btn-label {
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}
.pfp-btn-sub {
    font-size: 0.65rem;
    opacity: 0.6;
}
.pfp-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}
.pfp-btn-info {
    border-color: rgba(141, 224, 252, 0.3);
    color: #8DE0FC;
}
.pfp-btn-info:hover {
    background: rgba(141, 224, 252, 0.1);
    border-color: rgba(141, 224, 252, 0.6);
}
.pfp-dismiss {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 0.68rem;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    padding: 2px 0;
    transition: color 0.15s;
    align-self: flex-start;
}
.pfp-dismiss:hover { color: rgba(255,255,255,0.6); }
.pfp-dismiss:disabled { opacity: 0.3; cursor: not-allowed; }

/* ══ Prior AI Video Player (Prior Ripper MP4) ════════════════════════════ */
.prior-ai-video-player {
    background: linear-gradient(160deg, rgba(0,0,0,0.85) 0%, rgba(var(--rgb-theme-color,0,255,204),0.04) 100%);
    border: 1px solid rgba(var(--rgb-theme-color,0,255,204),0.18);
    border-radius: 16px;
    padding: 14px;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.pvp-header {
    display: flex;
    align-items: center;
    gap: 7px;
}
.pvp-icon {
    flex-shrink: 0;
    color: var(--theme-color, #00ffcc);
}
.pvp-title {
    font-size: 0.82rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.pvp-format-tag {
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--theme-color, #00ffcc);
    background: rgba(var(--rgb-theme-color,0,255,204),0.1);
    border: 1px solid rgba(var(--rgb-theme-color,0,255,204),0.2);
    border-radius: 4px;
    padding: 2px 6px;
    white-space: nowrap;
    flex-shrink: 0;
}
.pvp-video {
    width: 100%;
    border-radius: 10px;
    outline: none;
    background: #000;
    max-height: 270px;
}
.pvp-download {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.7rem; color: rgba(var(--rgb-theme-color,0,255,204),0.6);
    border: 1px solid rgba(var(--rgb-theme-color,0,255,204),0.2);
    border-radius: 6px; padding: 0.25rem 0.6rem;
    text-decoration: none; transition: all 0.15s; background: none;
    cursor: pointer; align-self: flex-start;
    font-family: 'JetBrains Mono', monospace;
}
.pvp-download:hover {
    background: rgba(var(--rgb-theme-color,0,255,204),0.08);
    color: var(--theme-color,#00ffcc);
    border-color: rgba(var(--rgb-theme-color,0,255,204),0.4);
}

/* ══ Mobile responsiveness ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .prior-ai-player {
        max-width: 100%;
        padding: 20px 18px 16px;
        border-radius: 14px;
    }
    .pap-disc { width: 110px; height: 110px; }
    .pap-disc::before { width: 44px; height: 44px; }
    .pap-disc::after  { width: 11px; height: 11px; }
    .pap-title { font-size: 0.85rem; }
    .pap-seek  { height: 3px; }
    .pap-seek-thumb { width: 12px; height: 12px; }

    .followup-chips { gap: 0.35rem; }
    .followup-chip  { font-size: 0.75rem; padding: 0.28rem 0.6rem; }
}

@media (max-width: 480px) {
    .prior-ai-player { padding: 14px 12px 12px; }
    .pap-disc { width: 88px; height: 88px; }
    .pap-disc::before { width: 35px; height: 35px; }
    .pap-disc::after  { width: 9px;  height: 9px; }
    .pap-controls button { width: 36px; height: 36px; }
    .pap-play-btn { width: 44px !important; height: 44px !important; }
    .pap-title  { font-size: 0.8rem; }
    .pap-volume { display: none; } /* hide volume slider on tiny screens */

    .followup-chip { font-size: 0.7rem; padding: 0.22rem 0.5rem; }
}


/* ══════════════════════════════════════════════════════════════════════════
   TOOL CARDS — URL Reader, YouTube Transcript, Wikipedia, Weather,
                Code Output, Calculator, Prior Activity
   ══════════════════════════════════════════════════════════════════════════ */

.tool-card {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.8rem;
    background: #0d0f14;
    border: 1px solid rgba(141, 224, 252, 0.18);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    animation: pt-slide-in 0.22s ease;
}

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 0.75rem;
    background: #13161e;
    border-bottom: 1px solid rgba(141, 224, 252, 0.1);
}

.tool-card-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.tool-card-title {
    flex: 1;
    color: rgba(255,255,255,0.7);
    font-size: 0.73rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card-link {
    color: rgba(141, 224, 252, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: color 0.15s;
}
.tool-card-link:hover { color: #8de0fc; }

.tool-card-meta {
    margin: 0;
    padding: 0.45rem 0.75rem;
    color: rgba(255,255,255,0.42);
    font-size: 0.72rem;
    line-height: 1.5;
}

/* ── URL Reader browser preview ─────────────────────────────────────────── */

.url-preview-wrap {
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(141, 224, 252, 0.1);
    width: 100%;
    max-width: 480px;
}

.url-browser-chrome {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: #1c1f2a;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.url-bc-dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}
.url-bc-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.url-bc-dots span:nth-child(1) { background: #ff5f57; }
.url-bc-dots span:nth-child(2) { background: #febc2e; }
.url-bc-dots span:nth-child(3) { background: #28c840; }

.url-bc-bar {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    padding: 0.18rem 0.55rem;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-screenshot {
    width: 480px;
    max-width: 100%;
    height: 260px;
    display: block;
    object-fit: cover;
    object-position: top;
    animation: url-fade-in 0.4s ease;
}

@keyframes url-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* OG image fallback (e.g. Netflix) */
.url-og-image {
    object-fit: cover;
    object-position: center;
    background: #111;
}

.url-fallback-note {
    font-size: 0.65rem !important;
    color: rgba(254, 188, 46, 0.6) !important;
    padding-top: 0 !important;
    margin-top: -0.2rem;
}

/* ── Wikipedia ─────────────────────────────────────────────────────────── */

.tool-wiki-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ── Weather card v2 ───────────────────────────────────────────────────── */

.wc-card {
    font-family: 'Inter', sans-serif;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
    animation: pt-slide-in 0.28s ease;
    backdrop-filter: blur(8px);
    position: relative;
}

/* top section */
.wc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.1rem 1.2rem 0.7rem;
    gap: 1rem;
}

.wc-left { flex: 1; }

.wc-location {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.wc-temp {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.wc-temp-unit { font-size: 1.5rem; font-weight: 400; opacity: 0.7; }

.wc-feels {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
}

/* animated icon */
.wc-icon-wrap {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wc-big-icon { font-size: 3.2rem; display: block; line-height: 1; }

/* sun animation */
.wc-anim-sun .wc-big-icon {
    animation: wc-sun-pulse 3s ease-in-out infinite;
    transform-origin: center;
}
@keyframes wc-sun-pulse {
    0%,100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 6px rgba(255,200,50,.5)); }
    50%      { transform: scale(1.12) rotate(15deg); filter: drop-shadow(0 0 14px rgba(255,200,50,.8)); }
}

/* cloud animation */
.wc-anim-cloud .wc-big-icon {
    animation: wc-cloud-float 4s ease-in-out infinite;
}
@keyframes wc-cloud-float {
    0%,100% { transform: translateX(0); }
    50%      { transform: translateX(5px); }
}

/* rain animation */
.wc-anim-rain .wc-big-icon {
    animation: wc-rain-bob 1.5s ease-in-out infinite;
}
@keyframes wc-rain-bob {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

/* snow animation */
.wc-anim-snow .wc-big-icon {
    animation: wc-snow-spin 6s linear infinite;
}
@keyframes wc-snow-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* thunder animation */
.wc-anim-thunder .wc-big-icon {
    animation: wc-thunder-flash 2.5s ease-in-out infinite;
}
@keyframes wc-thunder-flash {
    0%,90%,100% { filter: none; }
    92%,96%     { filter: drop-shadow(0 0 12px rgba(255,240,80,0.9)) brightness(1.4); }
}

/* details row */
.wc-details-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 0 0.4rem;
    padding: 0.6rem 0.5rem;
    row-gap: 0.5rem;
}

.wc-detail-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0.4rem;
}

.wc-detail-icon {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.wc-detail-body { flex: 1; }

.wc-detail-label {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wc-detail-val {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}

/* UV bar */
.wc-uv-bar {
    height: 3px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 3px;
    width: 60px;
}
.wc-uv-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* forecast strip */
.wc-forecast {
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 0.3rem;
}

.wc-fc-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.55rem 0.3rem;
    gap: 3px;
    border-right: 1px solid rgba(255,255,255,0.06);
    animation: pt-row-in 0.2s ease both;
}
.wc-fc-day:last-child { border-right: none; }
.wc-fc-day:nth-child(2) { animation-delay: 0.06s; }
.wc-fc-day:nth-child(3) { animation-delay: 0.12s; }

.wc-fc-label { font-size: 0.65rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.05em; }
.wc-fc-icon  { font-size: 1.3rem; line-height: 1; }
.wc-fc-range { font-size: 0.72rem; font-weight: 600; color: rgba(255,255,255,0.8); }
.wc-fc-low   { color: rgba(255,255,255,0.4); font-weight: 400; }

/* badge */
.wc-badge {
    text-align: center;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.2);
    padding: 0.35rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Code output ───────────────────────────────────────────────────────── */

.tool-code-pre {
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.75rem;
    color: rgba(141, 224, 252, 0.85);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
    background: transparent;
}

.tool-code-error { color: #ff6b6b; }

/* ── Calculator ────────────────────────────────────────────────────────── */

.calc-result {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

.calc-expr  { color: rgba(255,255,255,0.45); font-size: 0.85rem; }
.calc-equals { color: rgba(255,255,255,0.25); }
.calc-value { color: #8de0fc; font-weight: 700; font-size: 1.1rem; }
.calc-error { color: #ff6b6b; font-size: 0.8rem; font-weight: 400; }

/* ── Prior Network Activity ────────────────────────────────────────────── */

.activity-messages-badge {
    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
    color: #febc2e;
    background: rgba(254, 188, 46, 0.06);
    border-bottom: 1px solid rgba(254, 188, 46, 0.12);
}

.activity-list {
    padding: 0.35rem 0.75rem 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
}

.activity-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(141, 224, 252, 0.4);
    flex-shrink: 0;
    margin-top: 4px;
}

.activity-empty { color: rgba(255,255,255,0.25); font-style: italic; }


/* ── Image Generation Card ──────────────────────────────────────────────── */
.tool-image-gen {
    padding: 0;
    overflow: hidden;
    max-width: 520px;
}

.img-gen-multi-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: nowrap;
    margin-bottom: 0.75rem;
}
.img-gen-multi-row .tool-image-gen {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin-bottom: 0;
}
.img-gen-multi-row .img-gen-result {
    max-width: 100%;
    max-height: 300px;
}
.img-gen-multi-row .img-gen-watermark {
    right: 4%;
    bottom: 8px;
}

.prior-imgcount-picker {
    margin-bottom: 1rem;
}

.img-gen-output {
    width: 100%;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    position: relative;
}

.img-gen-inner {
    display: inline-block;
    position: relative;
    line-height: 0;
}

.img-gen-watermark {
    position: absolute;
    bottom: 3%;
    right: 4%;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    user-select: none;
}

.img-gen-watermark img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    opacity: 0.7;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.9));
}

.img-gen-watermark span {
    font-family: 'Audiowide', sans-serif;
    font-size: 10px;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 4px rgba(0,0,0,0.95), 0 0 10px rgba(0,255,204,0.25);
}

.img-gen-result {
    width: 100%;
    max-width: 480px;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    display: block;
}

.tool-image-gen .tool-card-header {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 0.5rem 0.75rem;
}

.img-gen-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.15s;
}
.img-gen-download:hover { color: var(--primary-color); }

.img-gen-meta {
    padding: 0 0.75rem 0.5rem;
    font-size: 0.67rem;
    color: rgba(255,255,255,0.3);
    margin: 0;
}

.tool-image-gen-error .tool-card-header {
    border-top: none;
}

/* ── NSFW confirmation card ─────────────────────────────────────── */
.nsfw-confirm-card {
    background: rgba(255, 60, 60, 0.07);
    border: 1px solid rgba(255, 60, 60, 0.3);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: 0.75rem;
    animation: varBannerIn 0.3s ease both;
}

.nsfw-confirm-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ff6060;
    margin-bottom: 0.4rem;
}

.nsfw-confirm-body {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.85rem;
    line-height: 1.5;
}

.nsfw-confirm-body strong {
    color: rgba(255,255,255,0.8);
}

.nsfw-confirm-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nsfw-confirm-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    border: none;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nsfw-confirm-btn:hover { opacity: 0.8; }

.nsfw-confirm-btn.continue {
    background: rgba(255, 60, 60, 0.2);
    border: 1px solid rgba(255, 60, 60, 0.4);
    color: #ff8080;
}

.nsfw-confirm-btn.suggest {
    background: rgba(var(--rgb-theme-color), 0.1);
    border: 1px solid rgba(var(--rgb-theme-color), 0.3);
    color: var(--theme-color);
}

/* ── Lyrics card ────────────────────────────────────────────────── */
.tool-lyrics {
    padding: 0;
    overflow: hidden;
}
.lyrics-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(141,224,252,0.08);
    background: rgba(141,224,252,0.03);
}
.lyrics-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(var(--rgb-theme-color), 0.1);
    border: 1px solid rgba(var(--rgb-theme-color), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}
.lyrics-title-block { min-width: 0; }
.lyrics-track {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lyrics-artist {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.15rem;
}
.lyrics-body {
    padding: 0.9rem 1rem;
    max-height: 600px;
    overflow-y: auto;
    font-size: 0.84rem;
    line-height: 1.85;
    color: rgba(255,255,255,0.78);
    white-space: pre-wrap;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--rgb-theme-color), 0.15) transparent;
}
.lyrics-body::-webkit-scrollbar { width: 3px; }
.lyrics-body::-webkit-scrollbar-thumb { background: rgba(var(--rgb-theme-color), 0.2); border-radius: 2px; }
.lyrics-body br { display: block; content: ''; margin: 0.35rem 0; }
.lyrics-source {
    padding: 0.45rem 1rem;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: right;
}

/* ── Prior Maps card ────────────────────────────────────────────── */
.tool-maps {
    padding: 0;
    overflow: hidden;
}

.maps-map-wrap {
    position: relative;
}

.maps-tile-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 500;
    background: rgba(13,15,20,0.82);
    border: 1px solid rgba(141,224,252,0.2);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.68rem;
    color: rgba(141,224,252,0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    backdrop-filter: blur(4px);
    transition: background 0.15s, color 0.15s;
    letter-spacing: 0.03em;
}
.maps-tile-toggle:hover {
    background: rgba(0,255,204,0.12);
    color: #00ffcc;
    border-color: rgba(0,255,204,0.35);
}
.maps-tile-toggle.light-tiles {
    background: rgba(255,255,255,0.88);
    color: #444;
    border-color: rgba(0,0,0,0.15);
}
.maps-tile-toggle.light-tiles:hover {
    background: rgba(255,255,255,0.98);
    color: #111;
}

.maps-leaflet-container {
    width: 100%;
    height: 320px;
    background: #0d0f14;
    border-top: 1px solid rgba(141, 224, 252, 0.08);
    border-bottom: 1px solid rgba(141, 224, 252, 0.08);
}

/* Override Leaflet chrome for Prior dark theme */
.maps-leaflet-container .leaflet-control-zoom a {
    background: #13161e;
    color: rgba(141, 224, 252, 0.7);
    border-color: rgba(141, 224, 252, 0.18);
}
.maps-leaflet-container .leaflet-control-zoom a:hover {
    background: #1a1e2a;
    color: #00ffcc;
}
.maps-leaflet-container .leaflet-bar {
    border: 1px solid rgba(141, 224, 252, 0.18);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.maps-route-header {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1rem 0;
}

.maps-route-spine {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    margin-right: 0.65rem;
    padding-top: 3px;
}

.maps-pin {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.maps-pin.origin { background: rgba(var(--rgb-theme-color), 0.9); box-shadow: 0 0 6px rgba(var(--rgb-theme-color), 0.5); }
.maps-pin.dest   { background: #ff5566; box-shadow: 0 0 6px rgba(255,85,102,0.5); }

.maps-route-line {
    width: 2px;
    flex-grow: 1;
    background: linear-gradient(to bottom, rgba(var(--rgb-theme-color), 0.4), rgba(255,85,102,0.4));
    margin: 4px 0;
    min-height: 28px;
    border-radius: 1px;
}

.maps-route-labels {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0;
}

.maps-location-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0;
}

.maps-location-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

.maps-location-label.origin { color: rgba(var(--rgb-theme-color), 0.6); }
.maps-location-label.dest   { color: rgba(255,85,102, 0.7); }

.maps-location-name {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    line-height: 1.3;
}

.maps-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    margin: 0.6rem 1rem;
    background: rgba(var(--rgb-theme-color), 0.06);
    border: 1px solid rgba(var(--rgb-theme-color), 0.12);
    border-radius: 8px;
    font-size: 0.82rem;
}

.maps-summary-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255,255,255,0.8);
}

.maps-summary-item svg { flex-shrink: 0; opacity: 0.7; }
.maps-summary-dot { color: rgba(255,255,255,0.2); }

.maps-steps {
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--rgb-theme-color), 0.15) transparent;
}

.maps-steps::-webkit-scrollbar { width: 3px; }
.maps-steps::-webkit-scrollbar-thumb { background: rgba(var(--rgb-theme-color), 0.2); border-radius: 2px; }

.maps-step {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.78rem;
}

.maps-step:last-child { border-bottom: none; }

.maps-step-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: rgba(var(--rgb-theme-color), 0.08);
    border: 1px solid rgba(var(--rgb-theme-color), 0.15);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--rgb-theme-color), 0.8);
    margin-top: 1px;
}

.maps-step-icon svg { width: 12px; height: 12px; }

.maps-step-text {
    flex-grow: 1;
    color: rgba(255,255,255,0.72);
    line-height: 1.4;
}

.maps-step-dist {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
    padding-top: 2px;
}

.maps-actions {
    padding: 0.75rem 1rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.maps-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: rgba(var(--rgb-theme-color), 0.1);
    border: 1px solid rgba(var(--rgb-theme-color), 0.25);
    border-radius: 7px;
    color: var(--theme-color);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.maps-open-btn:hover {
    background: rgba(var(--rgb-theme-color), 0.18);
    border-color: rgba(var(--rgb-theme-color), 0.45);
}

/* ── Maps — arrival time ────────────────────────────────────────── */
.maps-arrival {
    margin-left: auto;
    font-size: 0.75rem;
    color: rgba(var(--rgb-theme-color), 0.75);
    font-weight: 600;
    white-space: nowrap;
}

/* ── Maps — collapsible steps toggle ───────────────────────────── */
.maps-steps-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0 0.2rem;
    font-size: 0.75rem;
    color: rgba(var(--rgb-theme-color), 0.65);
    cursor: pointer;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.04);
    background: none;
    font-family: inherit;
    width: 100%;
    text-align: left;
    transition: color 0.15s;
}
.maps-steps-toggle:hover { color: var(--theme-color); }
.maps-steps-toggle svg { transition: transform 0.2s; flex-shrink: 0; }
.maps-steps-toggle.expanded svg { transform: rotate(180deg); }

/* ── Maps — pulsing destination marker ─────────────────────────── */
@keyframes maps-dest-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,85,102,0.55), 0 0 6px rgba(255,85,102,0.5); }
    70%  { box-shadow: 0 0 0 7px rgba(255,85,102,0),  0 0 6px rgba(255,85,102,0.5); }
    100% { box-shadow: 0 0 0 0 rgba(255,85,102,0),    0 0 6px rgba(255,85,102,0.5); }
}
.maps-dest-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff5566;
    border: 2px solid #0d0f14;
    animation: maps-dest-pulse 1.8s ease-out infinite;
}

/* ── Image variation banner ─────────────────────────────────────── */
.img-variation-banner {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    padding: 0.35rem 0.6rem 0.5rem;
    animation: varBannerIn 0.4s ease both;
}
.img-variation-banner svg {
    flex-shrink: 0;
    color: var(--primary-color);
    opacity: 0.7;
}
.img-variation-prompt {
    color: rgba(255,255,255,0.5);
    font-style: italic;
}
@keyframes varBannerIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

