/* DryFairy — Brauerei-Styles */
/* Ausgelagert aus universe-views.css */

/* ── Braustube button in building detail ── */
.sf-detail-brewery { margin: 12px 0; text-align: center; }
.sf-btn-brewery {
    background: var(--sf-accent);
    border: 1px solid var(--sf-accent); color: #fff;
    font-weight: 700; font-size: 15px; cursor: pointer;
    border-radius: 8px; padding: 12px 24px;
    transition: background 0.2s, transform 0.1s;
}
.sf-btn-brewery:hover { background: #c89020; transform: scale(1.02); }
.sf-brewery-hint { font-size: 12px; color: var(--sf-text-dim); margin-top: 6px; }

/* ═══════════════════════════════════════════════
   Braustube — Tile-Kombinations-System
   ═══════════════════════════════════════════════ */

/* Layout: Sidebar links, grosser Workspace rechts */
.sf-brew-layout {
    height: 100%; display: flex; overflow: hidden;
}

/* ── Sidebar (Inventar + Rezepte) ── */
.sf-brew-sidebar {
    width: 340px; min-width: 300px;
    display: flex; flex-direction: column;
    border-right: 1px solid var(--sf-border);
    background: #2a2218;
    color: #d8c8a8;
}
.sf-brew-sidebar-header {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid #3a3020;
    flex-shrink: 0;
}
.sf-brew-sidebar-header .sf-brew-back {
    color: #b8a880; font-size: 16px; padding: 2px 6px;
}
.sf-brew-sidebar-title {
    font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700;
    color: #d8c8a0; letter-spacing: 1px;
}
.sf-brew-sidebar-scroll {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 6px;
}

/* Inventar-Sektionen */
.sf-brew-inv-section { margin-bottom: 10px; }
.sf-brew-inv-label {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; color: #8a7850;
    padding: 6px 4px 8px; border-bottom: 1px solid #3a3020;
    margin-bottom: 8px;
}
.sf-brew-inv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* ── Rezeptbuch (in Sidebar) ── */
.sf-brew-panel-section { margin-bottom: 8px; }
.sf-brew-panel-section h3 {
    font-size: 11px; font-weight: 700; color: #b8a880;
    margin: 0 0 6px; padding-bottom: 4px;
    border-bottom: 1px solid #3a3020;
}
.sf-brew-recipe-card {
    background: #342a1e; border: 1px solid #4a3c28;
    border-radius: 8px; padding: 8px 10px; margin-bottom: 6px;
    transition: border-color 0.2s;
}
.sf-brew-recipe-card:hover { border-color: #8a6848; }
.sf-brew-recipe-card.sf-brew-recipe-unavail {
    opacity: 0.55;
    border-color: #3a3020;
}
.sf-brew-recipe-card.sf-brew-recipe-unavail:hover { border-color: #5a4838; }
.sf-brew-recipe-card.sf-brew-recipe-unavail .sf-btn-produce {
    background: #3a3020;
    color: #888;
    cursor: not-allowed;
}
.sf-brew-recipe-card.sf-brew-recipe-unavail .sf-btn-produce:hover {
    background: #3a3020;
}
.sf-brew-recipe-header { display: flex; align-items: center; gap: 6px; }
.sf-brew-recipe-icon { font-size: 20px; line-height: 1; }
.sf-brew-recipe-title { flex: 1; min-width: 0; }
.sf-brew-recipe-title strong { font-size: 13px; color: #d8c8a0; display: block; }
.sf-brew-recipe-meta { font-size: 11px; color: #8a7850; display: block; margin-top: 2px; }
.sf-brew-recipe-actions { display: flex; gap: 4px; margin-top: 4px; align-items: center; }
.sf-brew-recipe-actions .sf-brew-vial-select {
    flex: 1; font-size: 9px; padding: 2px 3px;
    border: 1px solid #4a3c28; border-radius: 4px; background: #2a2218; color: #d8c8a0;
}
.sf-brew-recipe-chain { padding: 3px 0 2px 4px; margin-top: 3px; border-top: 1px solid #3a3020; }
.sf-brew-chain-step { font-size: 11px; color: #8a7850; line-height: 1.5; }
.sf-brew-chain-step b { color: #d8c8a0; }
.sf-brew-recipe-hint {
    font-style: italic; color: #a89060; font-size: 9px; line-height: 1.3;
    background: #3a3020; border-left: 2px solid #8a6830;
    padding: 3px 6px; margin-top: 4px; border-radius: 0 4px 4px 0;
}
.sf-brew-recipe-locked { background: #2e2618; border: 1px dashed #4a3c28; opacity: 0.7; }
.sf-brew-recipe-locked-icon { font-size: 14px; }
.sf-hint-cryptic { font-style: italic; opacity: 0.6; font-size: 9px; }
.sf-brew-recipes-empty { font-size: 10px; color: #6a5838; text-align: center; padding: 10px 4px; }
.sf-btn-produce {
    background: #4a3828; border: 1px solid #6a4c30; color: #DEA726;
    cursor: pointer; border-radius: 4px; padding: 4px 8px;
    font-size: 11px; font-weight: 700; white-space: nowrap; transition: all 0.2s;
}
.sf-btn-produce:hover { background: #5a4838; }

/* Brau-Fortschrittsbalken im Button */
.sf-btn-produce-brewing {
    position: relative;
    padding: 0 !important;
    min-width: 100px;
    overflow: hidden;
    cursor: wait !important;
    border-color: #8a6a30;
}
.sf-brew-progress-bar {
    position: relative;
    width: 100%;
    height: 24px;
    background: #2a2018;
    border-radius: 3px;
    overflow: hidden;
}
.sf-brew-progress-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #6a4c20, #DEA726);
    border-radius: 3px;
    transition: width 0.08s linear;
}
.sf-brew-progress-label {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    line-height: 24px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ── Workspace ── */
.sf-brew-workspace {
    flex: 1; display: flex; flex-direction: column;
    background: #1e1a14;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(138,32,144,0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(222,167,38,0.04) 0%, transparent 50%);
    user-select: none; -webkit-user-select: none;
    touch-action: none;
    overflow-y: auto; overflow-x: hidden;
}

/* ── Crafting Table ── */

/* Gesamte Brauwerk-Fläche */
.sf-craft-area {
    padding: 28px 24px;
    display: flex; flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Titel mit dekorativem Unterstrich */
.sf-craft-title {
    font-family: 'Cinzel', serif;
    font-size: 20px; font-weight: 700;
    color: #DEA726;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 0 0 12px rgba(222,167,38,0.3), 0 2px 4px rgba(0,0,0,0.5);
    position: relative;
    padding-bottom: 10px;
}
.sf-craft-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 2px;
    background: linear-gradient(90deg, transparent, #DEA726, transparent);
}

/* ── Crafting-Tisch ── */
.sf-craft-table {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 32px 28px;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(222,167,38,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 80%, rgba(120,80,30,0.06) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 80%, rgba(120,80,30,0.06) 0%, transparent 40%),
        linear-gradient(180deg, rgba(55,44,28,0.95) 0%, rgba(30,24,14,0.98) 100%);
    border: 2px solid rgba(138,112,80,0.35);
    border-top-color: rgba(222,167,38,0.25);
    border-radius: 22px;
    box-shadow:
        inset 0 2px 0 rgba(222,167,38,0.08),
        inset 0 -3px 12px rgba(0,0,0,0.4),
        inset 0 0 40px rgba(0,0,0,0.15),
        0 10px 40px rgba(0,0,0,0.5),
        0 2px 0 rgba(222,167,38,0.06);
    position: relative;
}
/* Eckdeko */
.sf-craft-table::before,
.sf-craft-table::after {
    content: '✦';
    position: absolute;
    font-size: 12px;
    color: rgba(222,167,38,0.3);
    text-shadow: 0 0 6px rgba(222,167,38,0.2);
}
.sf-craft-table::before { top: 10px; left: 14px; }
.sf-craft-table::after { top: 10px; right: 14px; }

/* Input-Bereich: Slot + "+" + Slot */
.sf-craft-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Einzelner Craft-Slot ── */
.sf-craft-slot {
    width: 130px; min-height: 140px;
    border: 3px solid rgba(138,112,80,0.3);
    border-radius: 18px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 50% 40%, rgba(80,64,40,0.3) 0%, rgba(20,16,10,0.8) 100%);
    transition: all 0.3s ease;
    position: relative;
    gap: 4px;
    padding: 12px 8px;
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.4),
        inset 0 -1px 0 rgba(222,167,38,0.05),
        0 4px 12px rgba(0,0,0,0.3);
}
/* Innerer Rahmen */
.sf-craft-slot::before {
    content: '';
    position: absolute; inset: 4px;
    border-radius: 14px;
    border: 1px solid rgba(222,167,38,0.06);
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(222,167,38,0.02) 0%, transparent 70%);
}
/* Eckverzierungen */
.sf-craft-slot::after {
    content: '';
    position: absolute; inset: -1px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(222,167,38,0.12) 0%, transparent 25%),
        radial-gradient(circle at 100% 0%, rgba(222,167,38,0.12) 0%, transparent 25%),
        radial-gradient(circle at 0% 100%, rgba(222,167,38,0.08) 0%, transparent 25%),
        radial-gradient(circle at 100% 100%, rgba(222,167,38,0.08) 0%, transparent 25%);
    pointer-events: none;
}

.sf-craft-slot-label {
    font-family: 'Cinzel', serif;
    font-size: 9px; font-weight: 700;
    color: rgba(222,167,38,0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: absolute; top: 8px; left: 0; right: 0;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.sf-craft-slot-content {
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    min-height: 70px;
    gap: 4px;
}
.sf-craft-slot-tile {
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
}
.sf-craft-slot-tile:hover {
    opacity: 0.7;
    transform: scale(0.95);
}

/* Slot befüllt */
.sf-craft-slot-filled {
    border-style: solid;
    border-color: rgba(222,167,38,0.5);
    background:
        radial-gradient(circle at 50% 40%, rgba(222,167,38,0.1) 0%, rgba(42,34,24,0.6) 100%);
    box-shadow:
        inset 0 1px 0 rgba(222,167,38,0.15),
        inset 0 -2px 8px rgba(0,0,0,0.2),
        0 0 20px rgba(222,167,38,0.12),
        0 4px 12px rgba(0,0,0,0.3);
}

/* Slot leer — Platzhalter-Icon */
.sf-craft-slot-empty {
    font-size: 40px;
    color: rgba(222,167,38,0.15);
    font-weight: 700;
    user-select: none;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
    animation: sf-slot-breathe 4s ease-in-out infinite;
}
@keyframes sf-slot-breathe {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.08); }
}

/* "+" Zeichen */
.sf-craft-plus {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    font-weight: 700;
    color: #DEA726;
    user-select: none;
    line-height: 1;
    text-shadow: 0 0 12px rgba(222,167,38,0.4), 0 2px 4px rgba(0,0,0,0.5);
    opacity: 0.6;
}

/* "➡" Pfeil */
.sf-craft-arrow {
    font-size: 40px;
    color: #DEA726;
    user-select: none;
    line-height: 1;
    transition: all 0.4s;
    padding: 0 8px;
    opacity: 0.5;
    filter: drop-shadow(0 0 8px rgba(222,167,38,0.3));
    animation: sf-arrow-pulse 3s ease-in-out infinite;
}
@keyframes sf-arrow-pulse {
    0%, 100% { opacity: 0.4; filter: drop-shadow(0 0 4px rgba(222,167,38,0.2)); }
    50% { opacity: 0.7; filter: drop-shadow(0 0 12px rgba(222,167,38,0.5)); }
}

/* Output-Bereich */
.sf-craft-output {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sf-craft-vial-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Phiolen-Slot — lila Akzent */
.sf-craft-slot-vial {
    width: 100px; min-height: 110px;
    border-color: rgba(138,80,200,0.3);
    background:
        radial-gradient(circle at 50% 50%, rgba(100,60,160,0.1) 0%, rgba(30,20,40,0.4) 100%);
}
.sf-craft-slot-vial::before {
    border-color: rgba(138,80,200,0.08);
}
.sf-craft-slot-vial.sf-craft-slot-filled {
    border-color: rgba(138,80,200,0.5);
    background:
        radial-gradient(circle at 50% 50%, rgba(138,80,200,0.1) 0%, rgba(40,24,60,0.5) 100%);
    box-shadow:
        inset 0 1px 0 rgba(138,80,200,0.1),
        0 0 14px rgba(138,80,200,0.1);
}

/* "=" Zeichen */
.sf-craft-equals {
    font-family: 'Cinzel', serif;
    font-size: 34px;
    font-weight: 700;
    color: #DEA726;
    user-select: none;
    line-height: 1;
    opacity: 0.5;
    text-shadow: 0 0 10px rgba(222,167,38,0.3), 0 2px 4px rgba(0,0,0,0.5);
}

/* ── Ergebnis-Slot ── */
.sf-craft-result {
    width: 130px; min-height: 140px;
    border: 3px solid rgba(80,64,40,0.35);
    border-radius: 18px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 50% 40%, rgba(60,48,30,0.35) 0%, rgba(16,14,10,0.8) 100%);
    transition: all 0.4s ease;
    padding: 12px 8px;
    position: relative;
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.4),
        inset 0 -1px 0 rgba(222,167,38,0.05),
        0 4px 12px rgba(0,0,0,0.3);
}
.sf-craft-result::before {
    content: '';
    position: absolute; inset: 4px;
    border-radius: 14px;
    border: 1px solid rgba(222,167,38,0.04);
    pointer-events: none;
}
.sf-craft-result::after {
    content: '';
    position: absolute; inset: -1px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 0% 0%, rgba(222,167,38,0.1) 0%, transparent 25%),
        radial-gradient(circle at 100% 0%, rgba(222,167,38,0.1) 0%, transparent 25%),
        radial-gradient(circle at 0% 100%, rgba(222,167,38,0.06) 0%, transparent 25%),
        radial-gradient(circle at 100% 100%, rgba(222,167,38,0.06) 0%, transparent 25%);
    pointer-events: none;
}

/* Ergebnis bereit — intensiver Gold-Glow */
.sf-craft-result-ready {
    border-color: #DEA726 !important;
    background:
        radial-gradient(circle at 50% 35%, rgba(222,167,38,0.18) 0%, rgba(42,34,24,0.7) 100%) !important;
    box-shadow:
        0 0 30px rgba(222,167,38,0.25),
        0 0 60px rgba(222,167,38,0.1),
        inset 0 1px 0 rgba(222,167,38,0.2),
        0 4px 16px rgba(0,0,0,0.3) !important;
    animation: sf-result-glow 2s ease-in-out infinite;
}
@keyframes sf-result-glow {
    0%, 100% {
        box-shadow: 0 0 25px rgba(222,167,38,0.2), 0 0 50px rgba(222,167,38,0.06), inset 0 1px 0 rgba(222,167,38,0.15), 0 4px 16px rgba(0,0,0,0.3);
        border-color: #DEA726;
    }
    50% {
        box-shadow: 0 0 40px rgba(222,167,38,0.35), 0 0 80px rgba(222,167,38,0.12), inset 0 1px 0 rgba(222,167,38,0.25), 0 4px 16px rgba(0,0,0,0.3);
        border-color: #f0c040;
    }
}

/* Qualitäts-Anzeige */
.sf-craft-quality {
    font-size: 10px;
    color: #a89870;
    text-align: center;
    margin-top: 2px;
    background: rgba(0,0,0,0.2);
    padding: 2px 8px;
    border-radius: 4px;
}
.sf-craft-quality-bonus {
    color: #4caf50;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(76,175,80,0.3);
    background: rgba(76,175,80,0.08);
}

/* "Keine Kombination" */
.sf-craft-no-match {
    font-size: 11px; color: #8a5a40; font-style: italic;
    padding: 6px 12px;
    background: rgba(192,48,32,0.06);
    border-radius: 8px;
    border: 1px solid rgba(192,48,32,0.12);
    text-align: center;
}

/* ── Aktions-Buttons ── */
.sf-craft-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.sf-craft-btn {
    background: linear-gradient(135deg, #DEA726 0%, #c89020 50%, #b07818 100%) !important;
    color: #1a1610 !important;
    border: none !important;
    border-radius: 12px;
    padding: 12px 32px !important;
    font-family: 'Cinzel', serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow:
        0 4px 16px rgba(222,167,38,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    letter-spacing: 1px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.15);
}
.sf-craft-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow:
        0 8px 28px rgba(222,167,38,0.4),
        inset 0 1px 0 rgba(255,255,255,0.25);
}
.sf-craft-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Trank-Button — lila */
.sf-craft-btn-potion {
    background: linear-gradient(135deg, #9a5cd0 0%, #7a3cb0 50%, #6030a0 100%) !important;
    color: #f0e8ff !important;
    box-shadow:
        0 4px 16px rgba(138,80,200,0.3),
        inset 0 1px 0 rgba(255,255,255,0.15);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.sf-craft-btn-potion:hover {
    box-shadow:
        0 8px 28px rgba(138,80,200,0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Verarbeiten-Button — Gold */
.sf-craft-btn-process {
    background: linear-gradient(135deg, #DEA726 0%, #c89020 50%, #b07818 100%) !important;
}

/* Reset-Button */
.sf-craft-reset {
    font-size: 12px !important;
    padding: 6px 16px !important;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.sf-craft-reset:hover { opacity: 1; }
.sf-craft-repeat {
    font-size: 12px !important;
    padding: 6px 16px !important;
    background: rgba(222,167,38,0.15) !important;
    border-color: #DEA726 !important;
    color: #DEA726 !important;
    transition: opacity 0.2s, background 0.2s;
}
.sf-craft-repeat:hover {
    background: rgba(222,167,38,0.3) !important;
}

/* ── Kombinationshilfe ── */
.sf-craft-hints {
    width: 100%;
    max-width: 520px;
    margin-top: 12px;
    background: rgba(26,22,16,0.4);
    border: 1px solid rgba(138,112,80,0.12);
    border-radius: 14px;
    padding: 14px 16px;
}
.sf-craft-hints-title {
    font-family: 'Cinzel', serif;
    font-size: 12px; font-weight: 700;
    color: rgba(222,167,38,0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.sf-craft-hints-list {
    display: flex; flex-direction: column;
    gap: 3px;
}

/* Einzelner Hint */
.sf-craft-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(42,34,24,0.4);
    border: 1px solid transparent;
    transition: all 0.2s;
    font-size: 12px;
}
.sf-craft-hint-available {
    border-color: rgba(222,167,38,0.1);
    background: rgba(222,167,38,0.04);
    cursor: pointer;
}
.sf-craft-hint-available:hover {
    border-color: rgba(222,167,38,0.35);
    background: rgba(222,167,38,0.08);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(222,167,38,0.1);
}
.sf-craft-hint-partial {
    opacity: 0.4;
}
.sf-craft-hint-icon {
    font-size: 15px;
    flex-shrink: 0;
    width: 22px; text-align: center;
}
.sf-craft-hint-name {
    color: #c8b890;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}
.sf-craft-hint-missing {
    color: #6a4a30 !important;
    text-decoration: line-through;
    opacity: 0.7;
}
.sf-craft-hint-plus {
    color: rgba(138,112,80,0.4);
    font-weight: 700;
    flex-shrink: 0;
}
.sf-craft-hint-arrow {
    color: #DEA726;
    font-weight: 700;
    flex-shrink: 0;
    filter: drop-shadow(0 0 3px rgba(222,167,38,0.3));
}
.sf-craft-hint-result {
    color: #DEA726;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
    text-shadow: 0 0 6px rgba(222,167,38,0.2);
}

/* Slot Drag-Highlight */
.sf-brew-slot-highlight {
    border-color: #DEA726;
    background: rgba(222,167,38,0.08);
    box-shadow: 0 0 20px rgba(222,167,38,0.15);
    animation: sf-slot-pulse 1.2s ease-in-out infinite;
}
@keyframes sf-slot-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(222,167,38,0.1); }
    50% { box-shadow: 0 0 24px rgba(222,167,38,0.25); }
}
.sf-brew-slot-hover {
    border-color: #DEA726 !important;
    background: rgba(222,167,38,0.15) !important;
    transform: scale(1.05);
    box-shadow: 0 0 24px rgba(222,167,38,0.3) !important;
}

/* Ergebnis-Tiles */
.sf-brew-result-tile {
    pointer-events: none;
    filter: drop-shadow(0 0 12px rgba(222,167,38,0.3));
}
.sf-brew-no-match {
    font-size: 12px; color: #6a4030; font-style: italic;
    padding: 4px 10px; background: rgba(192,48,32,0.08);
    border-radius: 6px; border: 1px solid rgba(192,48,32,0.15);
    text-align: center;
}

/* Hint leer */
.sf-craft-hints-empty {
    font-size: 12px; color: #5a4a30;
    padding: 10px; text-align: center;
    font-style: italic; opacity: 0.7;
}

/* Flash-Effekt */
.sf-brew-flash { animation: sf-brew-flash-anim 0.5s ease; }
@keyframes sf-brew-flash-anim {
    0% { background-color: transparent; }
    50% { background-color: rgba(222,167,38,0.1); }
    100% { background-color: transparent; }
}

/* ── Sidebar: Produced Items ── */
.sf-brew-shelf-empty {
    color: #3a3020; font-size: 13px; padding: 14px;
    text-align: center; width: 100%; opacity: 0.6;
    font-style: italic;
}

/* ── Footer ── */
.sf-brew-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid #2a2418;
}
.sf-brew-reset-btn {
    font-size: 12px !important; padding: 4px 12px !important;
    color: #6a5a40 !important; opacity: 0.6;
}
.sf-brew-reset-btn:hover { opacity: 1; }

/* ═══════════════════════════════════════════════
   Tiles (Bildkarten statt Hex-Münzen)
   ═══════════════════════════════════════════════ */

.sf-brew-tile {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px;
    cursor: grab;
    transition: transform 0.15s, filter 0.15s;
    position: relative;
    user-select: none; -webkit-user-select: none;
    touch-action: none;
    width: 80px;
}
.sf-brew-tile:hover { transform: scale(1.08); }
.sf-brew-tile:active { cursor: grabbing; }
.sf-brew-tile * { pointer-events: none; -webkit-user-drag: none; }

/* Quest Item Reveal Animation */
.sf-brew-tile-quest-reveal {
    opacity: 0;
    transform: scale(0.3) translateY(10px);
    pointer-events: none;
}
.sf-brew-tile-quest-reveal.sf-brew-tile-revealed {
    animation: sf-item-reveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: auto;
}
@keyframes sf-item-reveal {
    0%   { opacity: 0; transform: scale(0.3) translateY(10px); filter: brightness(2); }
    50%  { opacity: 1; transform: scale(1.15); filter: brightness(1.5); }
    70%  { transform: scale(0.95); filter: brightness(1.1); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: brightness(1); }
}

/* Bild-Karte */
.sf-brew-tile-img {
    width: 64px; height: 64px;
    border-radius: 10px;
    border: 2px solid #8a7050;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: #1a1610;
    transition: transform 0.15s, box-shadow 0.2s;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}
.sf-brew-tile-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.sf-brew-tile:hover .sf-brew-tile-img {
    box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 0 12px rgba(138,112,80,0.3);
}

/* Typ-Badge (⚙ für Utensilien) */
.sf-brew-tile-badge {
    position: absolute; top: -2px; left: -2px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #2a2018;
    border: 1px solid #705a30;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Emoji-Fallback */
.sf-brew-tile-emoji {
    font-size: 28px; line-height: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

/* Eigenschafts-Punkte (Konnektor-Elemente) */
.sf-brew-tile-props {
    display: flex; gap: 2px; justify-content: center;
    margin-top: -1px;
}
.sf-brew-tile-prop {
    width: 14px; height: 14px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 8px;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* Name */
.sf-brew-tile-name {
    font-size: 10px; font-weight: 600;
    color: #a89870;
    text-align: center;
    max-width: 80px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mengen-Badge */
.sf-brew-tile-qty {
    position: absolute; top: -4px; right: -6px;
    color: #fff; font-size: 12px; font-weight: 700;
    min-width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 11px; padding: 0 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

/* Phiole selected */
.sf-brew-tile-selected { outline: 2px solid #DEA726; outline-offset: 2px; border-radius: 10px; }
.sf-brew-tile-bonus {
    font-size: 9px; color: #4caf50; text-align: center; margin-top: -2px;
    font-weight: 700; text-shadow: 0 0 4px rgba(76,175,80,0.4);
}

/* Leer */
.sf-brew-tile-empty { opacity: 0.2; cursor: not-allowed; filter: grayscale(0.8); }

/* ── Drag & Drop ── */
.sf-dragging { opacity: 0.3; transform: none !important; }
.sf-brew-tile-floating {
    opacity: 0.95;
    transform: scale(1.2) !important;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.4));
}
/* Glow auf Bild-Karte */
.sf-combo-valid {
    animation: sf-combo-glow 1s ease-in-out infinite;
}
.sf-combo-valid .sf-brew-tile-img {
    filter: drop-shadow(0 0 8px rgba(26,200,64,0.6));
}
@keyframes sf-combo-glow {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(26,200,64,0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(26,200,64,0.8)); }
}
.sf-brew-tile-hover {
    transform: scale(1.15) !important;
    filter: drop-shadow(0 0 14px rgba(26,200,64,0.8)) !important;
}

/* ── Kombinations-Log ── */
.sf-brew-comb-log { display: flex; flex-direction: column; gap: 2px; }
.sf-brew-log-entry {
    display: flex; align-items: center; gap: 4px;
    font-size: 9px; color: #8a7850;
    padding: 2px 4px; border-radius: 3px; background: #2a2218;
}
.sf-brew-log-formula { flex: 1; }
.sf-brew-log-arrow { color: #DEA726; font-weight: 700; }
.sf-brew-log-result { font-weight: 600; color: #d8c8a0; }

/* ── Brauerei Info-Panel (rechte Sidebar, konsistent mit Unterschlupf) ── */
.sf-brew-info-panel {
    width: 260px; flex-shrink: 0;
    background: var(--sf-bg-card, #161210);
    border-left: 1px solid var(--sf-border, #3a3020);
    overflow-y: auto; padding: 0;
    display: flex; flex-direction: column;
}
.sf-brew-info-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.sf-brew-info-active .sf-brew-info-empty { display: none; }

/* Header */
.sf-brew-ip-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 14px;
    border-bottom: 1px solid var(--sf-border, #3a3020);
    position: sticky; top: 0;
    background: var(--sf-bg-card, #161210);
    z-index: 2;
}
.sf-brew-ip-img {
    width: 56px; height: 56px;
    border-radius: 10px; object-fit: cover;
    border: 2px solid rgba(138,112,80,0.3);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.sf-brew-ip-emoji {
    width: 56px; height: 56px;
    border-radius: 10px;
    border: 2px solid rgba(138,112,80,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0;
}
.sf-brew-ip-meta { flex: 1; min-width: 0; }
.sf-brew-ip-name {
    font-size: 15px; font-weight: 700;
    color: #e8dcc0; line-height: 1.2;
    margin-bottom: 3px;
}
.sf-brew-ip-type {
    font-size: 11px; font-weight: 600;
    opacity: 0.8;
}

/* Sections */
.sf-brew-ip-section {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(58,48,32,0.12);
}
.sf-brew-ip-desc {
    font-size: 12px; color: #a89870;
    line-height: 1.5;
    padding: 8px 10px;
    border-left: 3px solid rgba(138,112,80,0.25);
    background: rgba(255,255,255,0.02);
    border-radius: 0 6px 6px 0;
}
.sf-brew-ip-label {
    font-size: 9px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6a5a40;
    margin-bottom: 6px;
}

/* Pills */
.sf-brew-ip-pills {
    display: flex; flex-wrap: wrap; gap: 4px;
}
.sf-brew-ip-pill {
    font-size: 10px; font-weight: 600;
    padding: 3px 8px; border-radius: 5px;
}
.sf-brew-ip-pill-effect {
    background: rgba(222,167,38,0.15);
    color: #DEA726;
}
.sf-brew-ip-pill-value {
    background: rgba(222,167,38,0.15);
    color: #DEA726; font-size: 13px;
}

/* Values */
.sf-brew-ip-values {
    display: flex; flex-direction: column; gap: 4px;
}
.sf-brew-ip-value {
    font-size: 11px; color: #c8b890;
    padding: 5px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 5px;
}
.sf-brew-ip-value b { color: #e8dcc0; }

/* ── Overlay ── */
.sf-brew-overlay {
    position: fixed; inset: 0; z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
}
.sf-brew-overlay-backdrop { position: absolute; inset: 0; }
.sf-brew-overlay-content {
    position: relative; z-index: 1;
    background: #2a2218; border: 2px solid #DEA726;
    border-radius: 16px; padding: 24px 32px; text-align: center;
    max-width: 340px; box-shadow: 0 12px 48px rgba(0,0,0,0.4), 0 0 30px rgba(222,167,38,0.1);
    animation: sf-overlay-appear 0.4s ease;
}
@keyframes sf-overlay-appear {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
.sf-brew-overlay-new {
    font-family: 'Cinzel', serif; font-size: 13px; color: #DEA726;
    margin-bottom: 10px; letter-spacing: 1px;
}
.sf-brew-overlay-repeat { font-size: 12px; color: #8a7850; margin-bottom: 10px; }
.sf-brew-overlay-potion-icon { font-size: 44px; margin-bottom: 6px; }
.sf-brew-overlay-icon-glow { display: inline-block; animation: sf-potion-glow 2s ease-in-out infinite; }
@keyframes sf-potion-glow {
    0%, 100% { filter: drop-shadow(0 0 4px currentColor); }
    50% { filter: drop-shadow(0 0 14px currentColor); transform: scale(1.1); }
}
.sf-brew-overlay-potion-name { font-family: 'Cinzel', serif; font-size: 18px; font-weight: 700; color: #d8c8a0; margin-bottom: 3px; }
.sf-brew-overlay-tier { font-size: 10px; color: #6a5838; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 1px; }
.sf-brew-overlay-price { font-size: 13px; color: #DEA726; font-weight: 600; margin-bottom: 14px; }
.sf-brew-overlay-close {
    background: #DEA726; color: #1a1610; border: none; border-radius: 8px;
    padding: 7px 22px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.sf-brew-overlay-close:hover { background: #c89020; transform: scale(1.03); }

/* ── Tutorial ── */
.sf-brew-tutorial {
    position: relative; z-index: 1;
    background: #2a2218; border: 2px solid #4a3c28;
    border-radius: 16px; padding: 22px 28px; text-align: center;
    max-width: 400px; box-shadow: 0 12px 48px rgba(0,0,0,0.4);
    color: #d8c8a0;
}
.sf-brew-tutorial-icon { font-size: 36px; margin-bottom: 6px; }
.sf-brew-tutorial-title { font-family: 'Cinzel', serif; font-size: 16px; color: #d8c8a0; margin: 0 0 10px; }
.sf-brew-tutorial-text { font-size: 12px; color: #b8a880; line-height: 1.6; margin-bottom: 14px; }
.sf-brew-tutorial-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.sf-dot { width: 7px; height: 7px; border-radius: 50%; background: #4a3c28; transition: background 0.2s; }
.sf-dot.active { background: #DEA726; }
.sf-brew-tutorial-btns { display: flex; justify-content: center; gap: 8px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .sf-brew-layout { flex-direction: column; }
    .sf-brew-sidebar {
        width: 100%; min-width: 0;
        border-right: none; border-bottom: 1px solid #3a3020;
        max-height: 200px; flex-shrink: 0;
    }
    .sf-brew-inv-grid { grid-template-columns: repeat(4, 1fr); }
    .sf-brew-tile-img { width: 48px; height: 48px; }
    .sf-brew-tile { width: 64px; }
    .sf-brew-tile-name { max-width: 64px; font-size: 9px; }
    .sf-brew-info-panel {
        width: 100%; border-left: none;
        border-top: 1px solid var(--sf-border, #3a3020);
        max-height: 260px;
    }
    .sf-craft-area { padding: 16px 10px; gap: 12px; }
    .sf-craft-table { padding: 16px 12px; gap: 10px; }
    .sf-craft-slot { width: 90px; min-height: 100px; border-width: 2px; }
    .sf-craft-result { width: 90px; min-height: 100px; border-width: 2px; }
    .sf-craft-slot-vial { width: 80px; min-height: 90px; }
    .sf-craft-plus, .sf-craft-equals { font-size: 24px; }
    .sf-craft-arrow { font-size: 26px; padding: 0 4px; }
    .sf-craft-hint-name { max-width: 70px; }
    .sf-craft-hint-result { max-width: 80px; }
    .sf-craft-hints { padding: 10px 12px; }
}


/* ═══════════════════════════════════════════════
   Brau-Tutorial Overlay
   ═══════════════════════════════════════════════ */

.sf-brew-tutorial {
    background: var(--sf-bg, #12100a);
    border: 2px solid #DEA726;
    border-radius: 16px;
    padding: 32px 28px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    animation: tutFadeIn 0.3s ease;
}
@keyframes tutFadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.sf-brew-tutorial-icon { font-size: 48px; margin-bottom: 12px; }
.sf-brew-tutorial-title { font-size: 20px; color: #DEA726; margin: 0 0 12px 0; }
.sf-brew-tutorial-text { font-size: 14px; color: var(--sf-text, #d0c0a0); line-height: 1.6; margin: 0 0 20px 0; }

.sf-brew-tutorial-dots {
    display: flex; justify-content: center; gap: 8px; margin-bottom: 16px;
}
.sf-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--sf-border, #3a3020); transition: background 0.2s;
}
.sf-dot.active { background: #DEA726; }

.sf-brew-tutorial-btns { display: flex; justify-content: center; gap: 12px; }

/* (alte Hint-Styles entfernt — jetzt inline in Rezeptbuch-Karten) */

/* ═══════════════════════════════════════════════
   Karten-Brau-System
   ═══════════════════════════════════════════════ */

.sf-brew-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 12px;
    gap: 4px;
}

.sf-brew-section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--sf-text-dim, #8a7a60);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf-brew-card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}

.sf-brew-card-row-ingredients {
    max-height: 280px;
    overflow-y: auto;
    align-content: flex-start;
}

.sf-brew-table {
    min-height: 120px;
    background: rgba(30, 25, 20, 0.4);
    border: 2px dashed rgba(222, 167, 38, 0.25);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, border-color 0.3s;
}

.sf-brew-table-flash {
    background: rgba(222, 167, 38, 0.15) !important;
    border-color: rgba(222, 167, 38, 0.6) !important;
}

.sf-brew-table-empty {
    color: var(--sf-text-dim, #8a7a60);
    font-size: 13px;
    text-align: center;
    padding: 30px 20px;
    font-style: italic;
}

/* ── Karten ── */

.sf-brew-card {
    width: 88px;
    height: 116px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: rgba(30, 25, 20, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    user-select: none;
    touch-action: none;
    flex-shrink: 0;
    -webkit-user-drag: none;
}

.sf-brew-card * {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.sf-brew-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(222, 167, 38, 0.2);
}

.sf-brew-card:active {
    cursor: grabbing;
}

.sf-brew-card.sf-dragging {
    opacity: 0.25;
    transform: scale(0.95);
}

.sf-brew-card.sf-combo-valid {
    border-color: #4caf50 !important;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.4);
    animation: sf-pulse-green 1s ease-in-out infinite;
}

.sf-brew-card.sf-brew-card-hover-target {
    border-color: #66bb6a !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    transform: translateY(-3px) scale(1.05);
}

.sf-brew-card.sf-brew-card-empty {
    opacity: 0.25;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

.sf-brew-card-floating {
    border-color: #DEA726 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(222, 167, 38, 0.3);
    transform: scale(1.1) rotate(-2deg);
    opacity: 0.9;
}

.sf-brew-card-img {
    font-size: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
}

.sf-brew-card-name {
    font-size: 9px;
    color: var(--sf-text, #d0c0a0);
    text-align: center;
    margin-top: 2px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.sf-brew-card-qty {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

.sf-brew-card-type {
    position: absolute;
    bottom: 3px;
    font-size: 8px;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

@keyframes sf-pulse-green {
    0%, 100% { box-shadow: 0 0 8px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 0 16px rgba(76, 175, 80, 0.6); }
}

/* ── Kombinations-Log ── */

.sf-brew-comb-log {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.sf-brew-log-entry {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 3px 6px;
    background: rgba(30, 25, 20, 0.5);
    border-radius: 4px;
}

.sf-brew-log-formula { color: var(--sf-text-dim, #8a7a60); }
.sf-brew-log-arrow { color: #DEA726; font-weight: 700; }
.sf-brew-log-result { color: var(--sf-text, #d0c0a0); font-weight: 600; }

/* ── Rezept-Kombinations-Kette ── */

.sf-brew-recipe-chain {
    margin: 4px 0;
    padding: 4px 8px;
    background: rgba(30, 25, 20, 0.4);
    border-radius: 4px;
    border-left: 2px solid var(--sf-accent, #DEA726);
}

.sf-brew-chain-step {
    font-size: 10px;
    color: var(--sf-text-dim, #8a7a60);
    line-height: 1.5;
}

.sf-brew-chain-step b {
    color: var(--sf-text, #d0c0a0);
}

/* ── Overlay Tier ── */
.sf-brew-overlay-tier {
    font-size: 13px;
    color: var(--sf-text-dim, #8a7a60);
    margin: 4px 0 12px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sf-brew-card {
        width: 72px;
        height: 96px;
    }
    .sf-brew-card-img { font-size: 26px; height: 40px; }
    .sf-brew-card-name { font-size: 8px; }
    .sf-brew-workspace { padding: 8px; }
}


/* ═══════════════════════════════════════════════
   Quality Mini-Game (Timing-Bar)
   ═══════════════════════════════════════════════ */

.sf-quality-game {
    background: rgba(30,26,20,0.98);
    border: 2px solid #DEA726;
    border-radius: 20px;
    padding: 32px 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 0 60px rgba(222,167,38,0.3);
    animation: sf-qg-appear 0.3s ease;
    z-index: 10;
}
@keyframes sf-qg-appear {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.sf-qg-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    color: #DEA726;
    margin-bottom: 8px;
    letter-spacing: 2px;
}
.sf-qg-desc {
    font-size: 13px;
    color: #a89870;
    margin-bottom: 24px;
}
.sf-qg-bar-wrap { padding: 16px 0; }
.sf-qg-bar {
    position: relative;
    height: 36px;
    background: #2a2218;
    border: 2px solid #4a3c28;
    border-radius: 18px;
    overflow: hidden;
}
.sf-qg-sweetspot {
    position: absolute;
    top: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(222,167,38,0.35), rgba(222,167,38,0.15));
    border-left: 2px solid rgba(222,167,38,0.6);
    border-right: 2px solid rgba(222,167,38,0.6);
    border-radius: 4px;
}
.sf-qg-sweetspot-inner {
    position: absolute;
    top: 0; bottom: 0;
    background: rgba(76,175,80,0.2);
    border-left: 1px solid rgba(76,175,80,0.4);
    border-right: 1px solid rgba(76,175,80,0.4);
    border-radius: 2px;
}
.sf-qg-cursor {
    position: absolute;
    top: -2px; bottom: -2px;
    width: 6px;
    left: 0%;
    background: #DEA726;
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(222,167,38,0.8), 0 0 24px rgba(222,167,38,0.4);
    transform: translateX(-50%);
    will-change: left;
}
@keyframes sf-qg-sweep {
    0% { left: 2%; }
    100% { left: 98%; }
}
.sf-qg-cursor.sf-qg-stopped {
    width: 8px;
    box-shadow: 0 0 20px rgba(222,167,38,1), 0 0 40px rgba(222,167,38,0.6);
}
.sf-qg-hint {
    font-size: 14px;
    color: #DEA726;
    margin-top: 16px;
    animation: sf-qg-blink 1s ease-in-out infinite;
}
@keyframes sf-qg-blink {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.sf-qg-result { margin-top: 16px; }
.sf-qg-label {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.sf-qg-perfect { color: #ffd600; text-shadow: 0 0 16px rgba(255,214,0,0.5); animation: sf-qg-pop 0.4s ease; }
.sf-qg-good { color: #4caf50; text-shadow: 0 0 12px rgba(76,175,80,0.4); animation: sf-qg-pop 0.3s ease; }
.sf-qg-normal { color: #a89870; }
.sf-qg-miss { color: #c03020; animation: sf-qg-pop 0.3s ease; }
.sf-qg-fail { color: #ff1744; text-shadow: 0 0 20px rgba(255,23,68,0.6); animation: sf-qg-shake 0.5s ease; font-size: 26px !important; }
@keyframes sf-qg-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}
.sf-brew-shake { animation: sf-brew-shake-anim 0.6s ease; }
@keyframes sf-brew-shake-anim {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px) rotate(-1deg); }
    30% { transform: translateX(6px) rotate(1deg); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}
@keyframes sf-qg-pop {
    0% { transform: scale(0.5); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.sf-qg-quality {
    font-size: 14px;
    color: #a89870;
}

/* ═══════════════════════════════════════════════
   Discovery Celebration Overlay
   ═══════════════════════════════════════════════ */

.sf-discovery-celebration {
    background: rgba(30,26,20,0.98);
    border: 2px solid #DEA726;
    border-radius: 20px;
    padding: 32px 40px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 80px rgba(222,167,38,0.4);
    animation: sf-disc-appear 0.4s ease;
    z-index: 10;
}
@keyframes sf-disc-appear {
    from { transform: scale(0.7) rotate(-5deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}
.sf-disc-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.sf-disc-particle {
    position: absolute;
    bottom: -20px;
    animation: sf-disc-float linear forwards;
    opacity: 0.8;
}
@keyframes sf-disc-float {
    0% { transform: translateY(0) rotate(0); opacity: 0.8; }
    100% { transform: translateY(-500px) rotate(360deg); opacity: 0; }
}
.sf-disc-badge {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    color: #DEA726;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 16px;
    animation: sf-disc-badge-glow 2s ease-in-out infinite;
}
@keyframes sf-disc-badge-glow {
    0%, 100% { text-shadow: 0 0 8px rgba(222,167,38,0.3); }
    50% { text-shadow: 0 0 24px rgba(222,167,38,0.7); }
}
.sf-disc-icon {
    font-size: 52px;
    margin-bottom: 8px;
    animation: sf-disc-icon-bounce 0.6s ease;
}
@keyframes sf-disc-icon-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.sf-disc-name {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}
.sf-disc-desc {
    font-size: 12px;
    color: #a89870;
    line-height: 1.5;
    margin-bottom: 12px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}
.sf-disc-quality {
    font-size: 14px;
    font-weight: 600;
    color: #4caf50;
    margin-bottom: 8px;
}
.sf-disc-journal-hint {
    font-size: 11px;
    color: #8a7050;
    margin-bottom: 4px;
}
.sf-disc-count {
    font-size: 11px;
    color: #6a5a40;
    margin-bottom: 16px;
}
.sf-disc-close {
    background: linear-gradient(135deg, #DEA726, #b07818) !important;
    color: #1a1610 !important;
    border: none !important;
    border-radius: 10px;
    padding: 10px 28px !important;
    font-family: 'Cinzel', serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: transform 0.2s;
}
.sf-disc-close:hover { transform: scale(1.05); }

/* ═══════════════════════════════════════════════
   Discovery Journal (Sidebar)
   ═══════════════════════════════════════════════ */

.sf-disc-journal-header {
    font-size: 12px;
    color: #8a7850;
    padding: 4px 0 8px;
}
.sf-disc-journal-count {
    font-weight: 700;
    color: #DEA726;
    font-size: 13px;
}
.sf-disc-journal-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sf-disc-journal-entry {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 4px;
    background: #2a2218;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s;
}
.sf-disc-journal-entry:hover {
    background: #342a1e;
}
.sf-disc-journal-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.sf-disc-journal-name {
    color: #c8b890;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sf-disc-journal-new {
    font-size: 9px;
    color: #DEA726;
    font-weight: 700;
    animation: sf-disc-new-pulse 2s ease-in-out infinite;
}
@keyframes sf-disc-new-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════
   Recipe Chain Visualization (Info Panel)
   ═══════════════════════════════════════════════ */

.sf-rc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #3a3020;
}
.sf-rc-icon { font-size: 28px; }
.sf-rc-title {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 700;
    color: #d8c8a0;
}
.sf-rc-subtitle {
    font-size: 10px;
    color: #8a7850;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}
.sf-rc-chain {
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.sf-rc-step {
    display: flex;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: #2a2218;
    border: 1px solid #3a3020;
    border-radius: 10px;
}
.sf-rc-step-final {
    border-color: rgba(222,167,38,0.4);
    background: rgba(222,167,38,0.06);
    box-shadow: 0 0 12px rgba(222,167,38,0.1);
}
.sf-rc-step-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #3a3020;
    color: #8a7850;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}
.sf-rc-step-body { flex: 1; min-width: 0; }
.sf-rc-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.sf-rc-item {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #342a1e;
    color: #8a7850;
    border: 1px solid #4a3c28;
    white-space: nowrap;
}
.sf-rc-has {
    color: #4caf50 !important;
    border-color: rgba(76,175,80,0.3) !important;
    background: rgba(76,175,80,0.08) !important;
}
.sf-rc-missing { color: #8a5a40; opacity: 0.7; }
.sf-rc-plus {
    color: #6a5a40;
    font-weight: 700;
    font-size: 12px;
}
.sf-rc-arrow {
    text-align: center;
    color: #DEA726;
    font-size: 12px;
    padding: 2px 0;
    opacity: 0.6;
}
.sf-rc-result {
    font-size: 12px;
    font-weight: 600;
    color: #c8b890;
    padding: 2px 6px;
    background: rgba(222,167,38,0.05);
    border-radius: 4px;
    display: inline-block;
}
.sf-rc-result-potion {
    font-size: 14px;
    font-weight: 700;
    padding: 4px 10px;
    background: rgba(222,167,38,0.1);
    border: 1px solid rgba(222,167,38,0.3);
    border-radius: 6px;
}
.sf-rc-connector {
    color: #4a3c28;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    padding: 2px 0;
}

/* Recipe card clickable header */
.sf-brew-recipe-chain-trigger {
    cursor: pointer;
    transition: opacity 0.15s;
}
.sf-brew-recipe-chain-trigger:hover { opacity: 0.8; }

/* ── Brew vial row (in Cellar/Brewery) ── */
.sf-brew-vial-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px;
}
.sf-brew-vial-label {
    font-size: 11px;
    color: var(--sf-text-dim, #7a6a48);
    text-transform: none;
    margin: 0;
}
.sf-brew-vial-select {
    flex: 1;
    padding: 4px 6px;
    font-size: 11px;
    background: var(--sf-bg, #12100a);
    border: 1px solid var(--sf-border, #3a3020);
    border-radius: 4px;
    color: var(--sf-text, #d0c0a0);
}

