/* Horadric Cube — Recipe-Liste (Card-Grid mit Filter) */

.hcube-recipes {
    margin: 3rem 0 2rem;
    padding: 2rem 0 0;
    border-top: 1px solid var(--border-color, #2a2a35);
}

.hcube-recipes__header h2 {
    margin: 0 0 0.5rem;
    color: #c4a24e;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}

.hcube-recipes__intro {
    color: var(--text-dimmed, #7a7870);
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}

.hcube-recipes__toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.hcube-input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    background: #0d0e13;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    color: var(--text-primary, #e0ddd5);
    font-size: 0.9rem;
}
.hcube-input:focus {
    outline: none;
    border-color: #c4a24e;
    box-shadow: 0 0 0 2px rgba(196, 162, 78, 0.2);
}

/* Season-Auswahl oben rechts im Hero — steuert nur die Datenquelle, nicht die URL */
.loh-page__hero { position: relative; }
.hcube-season-switch {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}
.hcube-season-switch__label {
    color: var(--text-dimmed, #7a7870);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.hcube-season-switch__select {
    flex: 0 0 auto;
    min-width: 96px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
}
@media (max-width: 768px) {
    .hcube-season-switch {
        position: static;
        justify-content: center;
        margin: 0 auto 1rem;
    }
}

.hcube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.hcube-loading,
.hcube-empty,
.hcube-error {
    grid-column: 1 / -1;
    padding: 2rem;
    text-align: center;
    color: var(--text-dimmed, #7a7870);
    background: #13151a;
    border: 1px solid #2a2a35;
    border-radius: 6px;
}
.hcube-error { color: #ff6b6b; border-color: #5a2020; }

/* === Card === */
.hcube-card {
    background: linear-gradient(180deg, #16181f 0%, #0f1116 100%);
    border: 1px solid #2a2a35;
    border-radius: 6px;
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: border-color 0.15s, transform 0.15s;
}
.hcube-card:hover {
    border-color: #c4a24e;
    transform: translateY(-1px);
}

.hcube-card__head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.hcube-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    background: #0d0e13;
    overflow: hidden;
}
.hcube-card__icon img { width: 100%; height: 100%; object-fit: contain; }

.hcube-card__head-text { flex: 1; min-width: 0; }
.hcube-card__cat {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c4a24e;
    margin-bottom: 0.25rem;
}
.hcube-card__title {
    margin: 0;
    color: var(--text-primary, #e0ddd5);
    font-size: 1.05rem;
    line-height: 1.25;
}

.hcube-card__desc,
.hcube-card__effect {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-primary, #e0ddd5);
}
.hcube-card__effect-wrap {
    padding: 0.6rem 0.75rem;
    background: rgba(196, 162, 78, 0.06);
    border-left: 2px solid #c4a24e;
    border-radius: 2px;
}
.hcube-card__effect { color: #f0e8d4; }

.hcube-card__sections {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.hcube-card__group-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dimmed, #7a7870);
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.hcube-card__no-cost {
    font-size: 0.85rem;
    color: var(--text-dimmed, #7a7870);
    font-style: italic;
}

/* === Ingredient list === */
.hcube-ing-list,
.hcube-cost-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.hcube-ing,
.hcube-cost__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    background: #0d0e13;
    border: 1px solid #1f2028;
    border-radius: 3px;
    font-size: 0.85rem;
}
.hcube-ing__icon,
.hcube-cost__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: #15161c;
    border: 1px solid #2a2a35;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hcube-ing__icon img,
.hcube-cost__icon img { width: 100%; height: 100%; object-fit: contain; }
.hcube-ing__icon--placeholder { background: #13151a; }
.hcube-ing__name { flex: 1; min-width: 0; }
.hcube-ing__qty { color: #c4a24e; font-weight: 600; }

.hcube-cost__label { flex: 1; min-width: 0; }
.hcube-cost__value { color: #c4a24e; font-weight: 600; }
.hcube-cost__gold .hcube-cost__value { color: #ffd700; }

/* Rarity tinting on ingredients */
.hcube-rarity--common,
.hcube-rarity--normal { border-left: 2px solid #b0b0b0; }
.hcube-rarity--magic { border-left: 2px solid #4a90d9; }
.hcube-rarity--rare { border-left: 2px solid #ffd700; }
.hcube-rarity--legendary { border-left: 2px solid #a37e2c; }
.hcube-rarity--unique { border-left: 2px solid #8b5cf6; }
.hcube-rarity--mythic_unique,
.hcube-rarity--mythic-unique { border-left: 2px solid #ff6b6b; }

/* === Meta chips === */
.hcube-card__meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding-top: 0.3rem;
    border-top: 1px dashed #1f2028;
}
.hcube-meta__chip {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    background: #1a1c24;
    border: 1px solid #2a2a35;
    border-radius: 99px;
    color: var(--text-dimmed, #7a7870);
}
.hcube-meta__chip--warn {
    color: #ff9b6b;
    border-color: #5a3020;
    background: rgba(255, 107, 107, 0.08);
}
.hcube-meta__chip--season {
    color: #c4a24e;
    border-color: #5a4a20;
    background: rgba(196, 162, 78, 0.08);
}

/* === Materials section === */
.hcube-materials {
    margin: 3rem 0 2rem;
    padding: 2rem 0 0;
    border-top: 1px solid var(--border-color, #2a2a35);
}
.hcube-materials__header h2 {
    margin: 0 0 0.5rem;
    color: #c4a24e;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}
.hcube-materials__intro {
    color: var(--text-dimmed, #7a7870);
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
}
.hcube-materials__toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.hcube-mat-group { margin-bottom: 1.75rem; }
.hcube-mat-group__title {
    margin: 0 0 0.6rem;
    color: var(--text-primary, #e0ddd5);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hcube-mat-group__count {
    font-size: 0.7rem;
    color: var(--text-dimmed, #7a7870);
    background: #1a1c24;
    border: 1px solid #2a2a35;
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
    font-weight: 500;
}

.hcube-mat-table-wrap {
    overflow-x: auto;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    background: #0d0e13;
}
.hcube-mat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    color: var(--text-primary, #e0ddd5);
}
.hcube-mat-table th {
    text-align: left;
    padding: 0.55rem 0.75rem;
    background: #16181f;
    color: var(--text-dimmed, #7a7870);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    border-bottom: 1px solid #2a2a35;
    white-space: nowrap;
}
.hcube-mat-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #1a1c24;
    vertical-align: middle;
}
.hcube-mat-table tr:last-child td { border-bottom: 0; }
.hcube-mat-table tr:hover td { background: #14161c; }
.hcube-mat-table__icon-col { width: 48px; }
.hcube-mat-table__icon-col img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    background: #15161c;
    border: 1px solid #2a2a35;
    border-radius: 3px;
    display: block;
}
.hcube-mat-name { font-weight: 600; }
.hcube-mat-desc {
    color: var(--text-dimmed, #b0a8a0);
    max-width: 400px;
    line-height: 1.4;
}
.hcube-mat-source { color: var(--text-dimmed, #7a7870); font-size: 0.85rem; }

.hcube-mat-rarity--common .hcube-mat-name    { color: #d8d8d8; }
.hcube-mat-rarity--magic .hcube-mat-name     { color: #4a90d9; }
.hcube-mat-rarity--rare .hcube-mat-name      { color: #ffd700; }
.hcube-mat-rarity--legendary .hcube-mat-name { color: #c4a24e; }
.hcube-mat-rarity--unique .hcube-mat-name    { color: #a37e2c; }
.hcube-mat-rarity--mythic_unique .hcube-mat-name { color: #ff6b6b; }

.hcube-mat-rarity-chip {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    border: 1px solid;
    white-space: nowrap;
}
.hcube-mat-rarity-chip--common    { color: #d8d8d8; border-color: #404040; background: rgba(216,216,216,0.05); }
.hcube-mat-rarity-chip--magic     { color: #4a90d9; border-color: #2a4d70; background: rgba(74,144,217,0.08); }
.hcube-mat-rarity-chip--rare      { color: #ffd700; border-color: #5a4a20; background: rgba(255,215,0,0.08); }
.hcube-mat-rarity-chip--legendary { color: #c4a24e; border-color: #5a4a20; background: rgba(196,162,78,0.08); }
.hcube-mat-rarity-chip--unique    { color: #a37e2c; border-color: #5a4a20; background: rgba(163,126,44,0.08); }
.hcube-mat-rarity-chip--mythic_unique { color: #ff6b6b; border-color: #5a2020; background: rgba(255,107,107,0.08); }

/* === Mobile === */
@media (max-width: 640px) {
    .hcube-grid { grid-template-columns: 1fr; }
    .hcube-recipes__toolbar,
    .hcube-materials__toolbar { flex-direction: column; }
    .hcube-input { width: 100%; }
    .hcube-mat-table { font-size: 0.82rem; }
    .hcube-mat-table th, .hcube-mat-table td { padding: 0.4rem 0.5rem; }
    .hcube-mat-desc { max-width: 200px; font-size: 0.78rem; }
}

/* ====================================================================== */
/*  Guide-Erweiterung: TOC, Prosa-Bloecke, Simulator                       */
/* ====================================================================== */

/* Shared rarity hues (used by simulator chips/slots/result) */
.hcube-rarity--common, .hcube-rarity--normal { --hc-rar: #b0b0b0; }
.hcube-rarity--magic   { --hc-rar: #4a90d9; }
.hcube-rarity--rare    { --hc-rar: #ffd700; }
.hcube-rarity--legendary { --hc-rar: #c4a24e; }
.hcube-rarity--unique  { --hc-rar: #8b5cf6; }
.hcube-rarity--mythic_unique, .hcube-rarity--mythic-unique { --hc-rar: #ff6b6b; }

/* === Inhaltsverzeichnis === */
.hcube-toc {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin: 1.5rem 0 0.5rem;
    padding: 0.75rem 1rem;
    background: #13151a;
    border: 1px solid #2a2a35;
    border-radius: 6px;
}
.hcube-toc__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dimmed, #7a7870);
    font-weight: 700;
    margin-right: 0.25rem;
}
.hcube-toc a {
    font-size: 0.85rem;
    color: var(--text-secondary, #a09d94);
    text-decoration: none;
    padding: 0.2rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 99px;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.hcube-toc a:hover {
    color: #c4a24e;
    border-color: rgba(196, 162, 78, 0.35);
    background: rgba(196, 162, 78, 0.06);
}
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 90px; }

/* === Facts list (Freischaltung) === */
.hcube-facts {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem;
}
.hcube-facts li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.7rem 0.9rem;
    background: #13151a;
    border: 1px solid #2a2a35;
    border-left: 2px solid #c4a24e;
    border-radius: 4px;
}
.hcube-facts__key {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dimmed, #7a7870);
}
.hcube-facts__val { color: var(--text-primary, #e0ddd5); font-weight: 600; }

/* === Steps (Anwendung) === */
.hcube-steps {
    list-style: none;
    margin: 1.25rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}
.hcube-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, #16181f 0%, #0f1116 100%);
    border: 1px solid #2a2a35;
    border-radius: 6px;
}
.hcube-step__num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(196, 162, 78, 0.12);
    border: 1px solid rgba(196, 162, 78, 0.4);
    color: #c4a24e;
    font-weight: 700;
}
.hcube-step h3 { margin: 0 0 0.25rem; font-size: 1rem; color: var(--text-primary, #e0ddd5); }
.hcube-step p { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--text-secondary, #a09d94); }

/* === Guide cards (Kategorien / Materialien / Affixe) === */
.hcube-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}
.hcube-guide-card {
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, #16181f 0%, #0f1116 100%);
    border: 1px solid #2a2a35;
    border-top: 2px solid #c4a24e;
    border-radius: 6px;
}
.hcube-guide-card--warn { border-top-color: #ff6b6b; }
.hcube-guide-card h3 { margin: 0 0 0.5rem; font-size: 1.02rem; color: #c4a24e; }
.hcube-guide-card--warn h3 { color: #ff9b6b; }
.hcube-guide-card p { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--text-secondary, #a09d94); }

/* === Tips === */
.hcube-tips {
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}
.hcube-tips li {
    position: relative;
    padding: 0.6rem 0.9rem 0.6rem 2.1rem;
    background: #13151a;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary, #e0ddd5);
}
.hcube-tips li::before {
    content: '◆';
    position: absolute;
    left: 0.8rem;
    top: 0.6rem;
    color: #c4a24e;
    font-size: 0.7rem;
}

/* ====================================================================== */
/*  Simulator                                                              */
/* ====================================================================== */
.hcube-sim {
    margin: 3rem 0 2rem;
    padding: 2rem 0 0;
    border-top: 1px solid var(--border-color, #2a2a35);
}
.hcube-sim__head h2 { margin: 0 0 0.5rem; color: #c4a24e; font-size: 1.5rem; letter-spacing: 0.02em; }
.hcube-sim__intro { color: var(--text-dimmed, #7a7870); margin: 0 0 1.25rem; font-size: 0.95rem; }
.hcube-sim__app { min-height: 320px; }
.hcube-sim__disclaimer { margin: 1rem 0 0; font-size: 0.75rem; color: var(--text-dimmed, #7a7870); font-style: italic; }

.hcube-sim__bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.hcube-sim__picker-label { font-size: 0.85rem; color: var(--text-secondary, #a09d94); font-weight: 600; }
.hcube-sim__picker { flex: 1 1 280px; max-width: 460px; }

/* Zeile 1: Wuerfel (2/3) + Rezept-Panel (1/3, gleiche Hoehe, scrollbar).
   Zeile 2: Item-Auswahl (links) + Consumables (rechts). */
.hcube-sim__row1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
}
/* Zeile 2: Consumables-Tasche in voller Breite */
.hcube-sim__row2 { margin-top: 1.25rem; }

/* --- Klassen-Auswahl ueber dem Wuerfel --- */
.hcube-sim__cube-col { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.hcube-classbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.hcube-classbar__btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.55rem;
    background: #14151b;
    border: 1px solid #2a2a35;
    border-radius: 5px;
    color: var(--text-secondary, #a09d94);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.hcube-classbar__btn img { width: 18px; height: 18px; object-fit: contain; }
.hcube-classbar__btn:hover { border-color: #c4a24e; color: #e0ddd5; }
.hcube-classbar__btn.is-active {
    border-color: #c4a24e;
    color: #c4a24e;
    background: rgba(196, 162, 78, 0.10);
    box-shadow: 0 0 8px -2px rgba(196, 162, 78, 0.7);
}

/* --- Cube --- */
/* Hintergrundbild bringt Rahmen + 4x3-Raster mit (Original 1288x1648). */
.hcube-sim__cube {
    position: relative;
    width: 100%;
    aspect-ratio: 1288 / 1648;
    background: url('/assets/img/horadric/cube-bg2.webp') center / 100% 100% no-repeat;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.25s, filter 0.25s;
}
.hcube-sim__cube.is-dragover { filter: brightness(1.18); box-shadow: 0 0 18px rgba(196, 162, 78, 0.5); }

/* Titelzeile im freien Feld oberhalb des Rasters ("Items hinzufuegen oder Rezept waehlen") */
.hcube-sim__title {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 5.4%;
    height: 6.3%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #c9a85c;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: clamp(0.6rem, 1.45vw, 0.95rem);
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
    pointer-events: none;
}

/* --- Buttons im Wuerfel (Frames aus dem Spiel) --- */
.hcube-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: none;
    background: url('/assets/img/horadric/btn-frame-active.webp') center / 100% 100% no-repeat;
    color: #f0d8b8;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    cursor: pointer;
    transition: filter 0.15s;
    padding: 0;
}
.hcube-btn:hover:not(:disabled) { filter: brightness(1.25); }
.hcube-btn:disabled {
    background-image: url('/assets/img/horadric/btn-frame-inactive.webp');
    color: #7a7870;
    cursor: not-allowed;
}
/* "Zuruecksetzen": klein, zentriert, unterhalb des Rasters */
.hcube-sim__reset {
    top: 67.5%;
    width: 24%;
    aspect-ratio: 669 / 187;
    font-size: clamp(0.6rem, 1.1vw, 0.8rem);
}
/* "Transmutieren": groesser, weiter unten */
.hcube-sim__transmute {
    top: 81%;
    width: 46%;
    aspect-ratio: 669 / 187;
    font-size: clamp(0.75rem, 1.6vw, 1.1rem);
    text-transform: uppercase;
}

/* --- Rezept-Panel (rechts neben dem Wuerfel) --- */
.hcube-sim__recipes-col { position: relative; min-height: 0; }
.hcube-recipes-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #4a3f26;
    border-radius: 6px;
    background: linear-gradient(165deg, #15141a 0%, #0a090d 55%, #0f0e13 100%);
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(196, 162, 78, 0.12);
    overflow: hidden;
}
.hcube-recipes-panel__head {
    padding: 0.7rem 0.9rem;
    color: #c4a24e;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    background: linear-gradient(90deg, transparent 0%, rgba(196, 162, 78, 0.5) 50%, transparent 100%) bottom / 100% 1px no-repeat;
}
.hcube-recipes-panel__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.6rem;
    scrollbar-width: thin;                       /* Firefox */
    scrollbar-color: #4a3f26 transparent;
}
/* Schmaler, dunkler Scrollbalken im Gold-Look (Chrome/Edge/Safari) */
.hcube-recipes-panel__scroll::-webkit-scrollbar,
.hcube-picker__list::-webkit-scrollbar { width: 6px; }
.hcube-recipes-panel__scroll::-webkit-scrollbar-track,
.hcube-picker__list::-webkit-scrollbar-track { background: transparent; }
.hcube-recipes-panel__scroll::-webkit-scrollbar-thumb,
.hcube-picker__list::-webkit-scrollbar-thumb {
    background: #3a3325;
    border-radius: 3px;
}
.hcube-recipes-panel__scroll::-webkit-scrollbar-thumb:hover,
.hcube-picker__list::-webkit-scrollbar-thumb:hover { background: #c4a24e; }
.hcube-recat { margin-bottom: 0.4rem; }
.hcube-recat__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.6rem;
    background: #14151b;
    border: 1px solid #2a2a35;
    border-radius: 5px;
    color: var(--text-primary, #e0ddd5);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}
.hcube-recat__toggle:hover { border-color: #c4a24e; }
.hcube-recat__name { flex: 1; min-width: 0; }
.hcube-recat__count {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-dimmed, #7a7870);
    background: #0d0e13;
    border-radius: 99px;
    padding: 0.05rem 0.45rem;
}
.hcube-recat__chev { color: #c4a24e; font-size: 0.75rem; transition: transform 0.2s; }
.hcube-recat:not(.is-open) .hcube-recat__chev { transform: rotate(-90deg); }
.hcube-recat__list { display: none; padding: 0.35rem 0 0.15rem; }
.hcube-recat.is-open .hcube-recat__list { display: flex; flex-direction: column; gap: 0.3rem; }
.hcube-recipe-card {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
    background: linear-gradient(160deg, #121318 0%, #0b0c10 100%);
    border: 1px solid #26262e;
    border-radius: 5px;
    color: var(--text-primary, #e0ddd5);
    font-size: 0.82rem;
    line-height: 1.3;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}
.hcube-recipe-card:hover { border-color: #c4a24e; background: #1b1e27; }
.hcube-recipe-card.is-active {
    border-color: #c4a24e;
    background: rgba(196, 162, 78, 0.10);
    box-shadow: 0 0 8px -2px rgba(196, 162, 78, 0.8);
}
/* Beim Material-Filter nicht passende Rezepte: ausgegraut (bleiben klickbar) */
.hcube-recipe-card.is-dimmed { opacity: 0.3; filter: grayscale(0.6); }
.hcube-recipe-card img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.hcube-recipe-card__name { flex: 1; min-width: 0; }

/* --- Rezept-Info-Zeile (volle Breite, unter dem Wuerfel vor den Taschen) --- */
.hcube-recipeinfo {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem 1rem;
    border: 1px solid #4a3f26;
    border-radius: 6px;
    background: linear-gradient(165deg, #15141a 0%, #0a090d 100%);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(196, 162, 78, 0.12);
}
.hcube-recipeinfo__head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.hcube-recipeinfo__icon { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.hcube-recipeinfo__headtext { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; min-width: 0; }
.hcube-recipeinfo__name {
    color: #c4a24e;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
}
.hcube-recipeinfo__chips { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }
.hcube-recipeinfo__chip {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary, #a09d94);
    background: #14151b;
    border: 1px solid #2a2a35;
    border-radius: 99px;
    padding: 0.12rem 0.55rem;
}
.hcube-recipeinfo__chip--warn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }
.hcube-recipeinfo__desc { margin: 0 0 0.3rem; font-size: 0.87rem; line-height: 1.55; color: var(--text-primary, #e0ddd5); }
.hcube-recipeinfo__effect { margin: 0 0 0.6rem; font-size: 0.83rem; line-height: 1.5; color: var(--text-secondary, #a09d94); font-style: italic; }
.hcube-recipeinfo__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(196, 162, 78, 0.18);
}
.hcube-recipeinfo__label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dimmed, #7a7870);
    margin-bottom: 0.4rem;
}
.hcube-recipeinfo__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.hcube-recipeinfo__item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.83rem;
    color: var(--text-primary, #e0ddd5);
    line-height: 1.35;
}
.hcube-recipeinfo__item img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.hcube-recipeinfo__dot { color: rgba(196, 162, 78, 0.6); width: 24px; text-align: center; flex-shrink: 0; }
.hcube-recipeinfo__qty { color: #c4a24e; font-weight: 600; }
.hcube-recipeinfo__item--muted { color: var(--text-dimmed, #7a7870); font-style: italic; }
/* Tuning-Prismen-Erklaerung */
.hcube-recipeinfo__prisms { margin-top: 0.7rem; padding-top: 0.6rem; border-top: 1px solid rgba(196, 162, 78, 0.18); }
.hcube-recipeinfo__prismhint { margin: 0 0 0.5rem; font-size: 0.78rem; color: var(--text-dimmed, #7a7870); font-style: italic; }
/* Ausklappbare Prisma-Zeilen */
.hcube-prismrow { border: 1px solid #26262e; border-radius: 5px; margin-bottom: 0.3rem; background: linear-gradient(160deg, #121318 0%, #0b0c10 100%); }
.hcube-prismrow__head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    background: none;
    border: none;
    color: var(--text-primary, #e0ddd5);
    font-size: 0.82rem;
    cursor: pointer;
    text-align: left;
}
.hcube-prismrow__head:hover { color: #e0ddd5; }
.hcube-prismrow:hover { border-color: #c4a24e; }
/* Prisma-Icons sind Hochkant-Karten (120x180) — proportionsrichtig klein rendern */
.hcube-prismrow__head img { width: auto; height: 26px; flex-shrink: 0; border-radius: 2px; }
/* Die globale .hcube-rarity--* Regel setzt border-left (farbiger Strich) — hier nicht erwuenscht */
.hcube-prismrow__name { flex: 1; min-width: 0; font-weight: 600; border-left: none !important; padding-left: 0; }
.hcube-prismrow__name.hcube-rarity--magic { color: #4a90d9; }
.hcube-prismrow__name.hcube-rarity--rare { color: #ffd700; }
.hcube-prismrow__name.hcube-rarity--legendary { color: #ff8000; }
.hcube-prismrow__name.hcube-rarity--unique { color: #c4a24e; }
.hcube-prismrow__chev { color: #c4a24e; font-size: 0.75rem; transition: transform 0.2s; }
.hcube-prismrow:not(.is-open) .hcube-prismrow__chev { transform: rotate(-90deg); }
.hcube-prismrow__body { padding: 0 0.6rem 0.6rem; }
.hcube-prismrow__desc { margin: 0 0 0.45rem; font-size: 0.78rem; line-height: 1.5; color: var(--text-secondary, #a09d94); }
.hcube-prismrow__affixlabel {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dimmed, #7a7870);
    margin-bottom: 0.35rem;
}
.hcube-prismrow__chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.hcube-prismrow__chip {
    font-size: 0.7rem;
    color: var(--text-primary, #e0ddd5);
    background: #14151b;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    line-height: 1.35;
}
.hcube-prismrow__chip em { color: #c4a24e; font-style: normal; }
.hcube-prismrow__chip--more { color: var(--text-dimmed, #7a7870); }
@media (max-width: 760px) {
    .hcube-recipeinfo__cols { grid-template-columns: 1fr; }
}

/* Optionale Zutaten-Slots (z.B. Tuning-Prisma): gedaempfter Rahmen */
.hcube-sim__slot.is-optional { border-style: dotted; border-color: rgba(196, 162, 78, 0.35); }
.hcube-sim__slot.is-optional .hcube-sim__slot-ghost { opacity: 0.18; }

/* Statistik-Button (klein, unter dem Transmutieren-Button) */
.hcube-sim__statsbtn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 92.5%;
    background: none;
    border: none;
    color: var(--text-dimmed, #7a7870);
    font-size: clamp(0.58rem, 1vw, 0.74rem);
    letter-spacing: 0.05em;
    cursor: pointer;
    text-shadow: 0 1px 3px #000;
    padding: 0.2rem 0.5rem;
}
.hcube-sim__statsbtn:hover:not(:disabled) { color: #c4a24e; }
.hcube-sim__statsbtn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Statistik-Verteilung in der Summary-Box */
.hcube-statgrid { margin-top: 0.5rem; text-align: left; }
.hcube-statrow { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; margin-bottom: 0.25rem; }
.hcube-statrow__name { flex: 0 0 40%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcube-statrow__pct { flex: 0 0 3.2rem; text-align: right; color: #c4a24e; font-weight: 600; }
.hcube-statrow--more { color: var(--text-dimmed, #7a7870); }
.hcube-statbar { flex: 1; height: 8px; background: #14151b; border: 1px solid #2a2a35; border-radius: 4px; overflow: hidden; }
.hcube-statbar span { display: block; height: 100%; background: linear-gradient(90deg, #8a6a26, #c4a24e); }
.hcube-statgrid__sep { margin: 0.55rem 0 0.3rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dimmed, #7a7870); }
.hcube-statgrid__sep strong { color: #ffd700; }

/* Kosten-Tracker-Zeile */
.hcube-sim__costs {
    margin: 0.6rem auto 0;
    max-width: 860px;
    font-size: 0.78rem;
    color: var(--text-secondary, #a09d94);
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.hcube-sim__costchip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #14151b;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    padding: 0.12rem 0.45rem;
    color: var(--text-primary, #e0ddd5);
}
.hcube-sim__costchip img { width: 16px; height: 16px; object-fit: contain; }
.hcube-sim__costruns { color: var(--text-dimmed, #7a7870); }
.hcube-sim__costreset {
    background: none;
    border: none;
    color: var(--text-dimmed, #7a7870);
    font-size: 0.72rem;
    text-decoration: underline;
    cursor: pointer;
}
.hcube-sim__costreset:hover { color: #c4a24e; }

/* "Aus meinem Build" im Ausruestungs-Tab */
.hcube-mybuilds { margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px solid rgba(196, 162, 78, 0.18); }
.hcube-mybuilds__select { width: 100%; margin-bottom: 0.5rem; }
.hcube-mybuilds__items { max-height: 160px; }

/* --- Hergestellte Items (Leiste zwischen Wuerfel und Zeile 2) --- */
.hcube-crafted {
    margin-top: 1.25rem;
    padding: 0.7rem 0.9rem 0.85rem;
    border: 1px solid #4a3f26;
    border-radius: 6px;
    background: linear-gradient(165deg, #15141a 0%, #0a090d 100%);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(196, 162, 78, 0.12);
}
.hcube-crafted__tab {
    color: #c4a24e;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.55rem;
}
.hcube-crafted__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 4px;
}
.hcube-crafted__cell {
    position: relative;
    aspect-ratio: 3 / 4;
    background: linear-gradient(180deg, #121318 0%, #0a0b0f 100%);
    border: 1px solid #26262e;
    border-radius: 2px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s, filter 0.15s;
}
.hcube-crafted__cell:hover { border-color: #c4a24e; filter: brightness(1.25); }
.hcube-crafted__cell img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

/* Slot-Raster exakt auf das 4x3-Raster des Hintergrundbilds gelegt
   (Innenraster: x 347-936 / y 315-1007 bei 1288x1648 px Original). */
.hcube-sim__slots {
    position: absolute;
    left: 26.94%;
    top: 19.11%;
    width: 45.73%;
    height: 41.99%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.hcube-sim__cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7%;
}
.hcube-sim__slot {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    border: 1px dashed rgba(196, 162, 78, 0.45);
    background: rgba(13, 14, 19, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.hcube-sim__slot img { width: 100%; height: 100%; object-fit: contain; }
.hcube-sim__slot-ghost { opacity: 0.28; }
.hcube-sim__slot-plus { color: rgba(196, 162, 78, 0.6); font-size: 1.6rem; line-height: 1; }
.hcube-sim__slot-mark { color: #c4a24e; font-size: 1.3rem; }
.hcube-sim__slot.is-filled {
    border-style: solid;
    border-color: var(--hc-rar, #c4a24e);
    box-shadow: 0 0 10px -2px var(--hc-rar, #c4a24e);
    background: rgba(13, 14, 19, 0.9);
    cursor: pointer;
}
.hcube-sim__slot.just-filled { animation: hcube-pop 0.28s ease; }
.hcube-sim__slot--result { cursor: default; animation: hcube-reveal 0.5s ease both; }

/* Mengen-Badge (×N) an Slot- und Taschen-Zellen — gross wie im Spiel */
.hcube-sim__qty {
    position: absolute;
    right: 4px;
    bottom: 2px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f5f3ee;
    text-shadow: 0 1px 3px #000, 0 0 6px #000, 1px 1px 2px #000;
    pointer-events: none;
    line-height: 1;
}

/* --- Loot beam + transmute animation --- */
.hcube-sim__beam {
    position: absolute;
    left: 50%;
    top: -10%;
    width: 60%;
    height: 120%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(196,162,78,0) 0%, rgba(196,162,78,0.45) 45%, rgba(255,235,180,0.7) 50%, rgba(196,162,78,0.45) 55%, rgba(196,162,78,0) 100%);
    filter: blur(6px);
    opacity: 0;
    pointer-events: none;
}
.hcube-sim__cube.has-result .hcube-sim__beam { animation: hcube-beam 0.7s ease forwards; }
.hcube-sim__cube.is-transmuting { animation: hcube-shake 0.95s ease; border-color: #c4a24e; box-shadow: inset 0 0 50px rgba(0,0,0,0.6), 0 0 26px rgba(196, 162, 78, 0.65); }

@keyframes hcube-shake {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    10% { transform: translate(-3px, 1px) rotate(-0.6deg); }
    25% { transform: translate(3px, -2px) rotate(0.6deg); }
    40% { transform: translate(-4px, 2px) rotate(-0.8deg); }
    55% { transform: translate(4px, -1px) rotate(0.8deg); }
    70% { transform: translate(-2px, 1px) rotate(-0.4deg); }
    85% { transform: translate(2px, -1px) rotate(0.3deg); }
}
/* Beam blitzt einmal auf und verschwindet vollstaendig (verdeckt das Ergebnis nicht) */
@keyframes hcube-beam {
    0% { opacity: 0; transform: translateX(-50%) scaleY(0.2); }
    40% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) scaleY(1); }
}
@keyframes hcube-pop {
    0% { transform: scale(0.6); }
    60% { transform: scale(1.12); }
    100% { transform: scale(1); }
}
@keyframes hcube-reveal {
    0% { opacity: 0; transform: scale(0.5) translateY(8px); }
    60% { transform: scale(1.1) translateY(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Hint (unter den Zeilen, volle Breite) --- */
.hcube-sim__hint { text-align: center; font-size: 0.85rem; color: var(--text-dimmed, #7a7870); min-height: 1.2em; margin-top: 1rem; }
.hcube-sim__hint.is-ready { color: #4ade80; font-weight: 600; }

/* --- "Was ist passiert"-Zusammenfassung nach der Transmutation --- */
.hcube-sim__summary {
    margin: 0.75rem auto 0;
    max-width: 720px;
    padding: 0.6rem 0.9rem;
    border: 1px solid rgba(196, 162, 78, 0.35);
    border-radius: 6px;
    background: rgba(196, 162, 78, 0.06);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-primary, #e0ddd5);
    text-align: center;
}
.hcube-sim__summary-label {
    color: #c4a24e;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    margin-right: 0.3rem;
}

/* --- Waehlbare Item-Slots (Picker) --- */
.hcube-sim__slot.is-pickable { cursor: pointer; border-style: dashed; border-color: rgba(196, 162, 78, 0.7); }
.hcube-sim__slot.is-pickable:hover { background: rgba(196, 162, 78, 0.12); box-shadow: 0 0 10px -2px rgba(196, 162, 78, 0.8); }
.hcube-bag__cell.is-pickable .hcube-bag__ph { font-size: 1.1rem; font-weight: 700; }

/* --- Item-Picker: Modal-Overlay ueber dem Wuerfel (Klick auf "+"-Slot) --- */
.hcube-picker {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5%;
    background: rgba(5, 5, 8, 0.82);
}
.hcube-picker[hidden] { display: none !important; }
.hcube-picker__panel {
    width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.9rem;
    border: 1px solid #4a3f26;
    border-radius: 6px;
    background: linear-gradient(165deg, #16151b 0%, #0a090d 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(196, 162, 78, 0.12);
    overflow: hidden;
}
.hcube-picker__head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.hcube-picker__title {
    color: #c4a24e;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.hcube-picker__close {
    background: none;
    border: 1px solid #2a2a35;
    border-radius: 4px;
    color: var(--text-dimmed, #7a7870);
    font-size: 1.1rem;
    line-height: 1;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}
.hcube-picker__close:hover { color: #e0ddd5; border-color: #c4a24e; }
.hcube-picker__chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.hcube-picker__chip {
    padding: 0.3rem 0.7rem;
    border: 1px solid #2a2a35;
    border-radius: 99px;
    background: #14151b;
    color: var(--hc-chip, #e0ddd5);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.hcube-picker__chip.is-active { border-color: var(--hc-chip, #c4a24e); box-shadow: 0 0 8px -2px var(--hc-chip, #c4a24e); }
.hcube-picker__slot-label { font-size: 0.75rem; color: var(--text-dimmed, #7a7870); text-transform: uppercase; letter-spacing: 0.08em; }
.hcube-picker__list {
    flex: 1;
    min-height: 90px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.45rem;
    align-content: start;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: #4a3f26 transparent;
}
.hcube-picker__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.3rem;
    background: linear-gradient(160deg, #14151b 0%, #0b0c10 100%);
    border: 1px solid #26262e;
    border-radius: 5px;
    color: var(--text-primary, #e0ddd5);
    font-size: 0.68rem;
    line-height: 1.25;
    cursor: pointer;
    text-align: center;
}
.hcube-picker__cell:hover { border-color: #c4a24e; background: #1b1e27; }
.hcube-picker__cell img { width: 42px; height: 42px; object-fit: contain; }
.hcube-picker__cell-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hcube-picker__cell.hcube-rarity--unique { border-color: rgba(163, 126, 44, 0.5); }
.hcube-picker__cell.hcube-rarity--mythic_unique { border-color: rgba(255, 107, 107, 0.5); }
.hcube-picker__cell.hcube-rarity--set { border-color: rgba(74, 222, 128, 0.4); }
.hcube-picker__empty { grid-column: 1 / -1; text-align: center; color: var(--text-dimmed, #7a7870); padding: 1.5rem 0; }
.hcube-sim__transmute:disabled { opacity: 0.45; cursor: not-allowed; }

/* --- Consumables-Tasche (11x3-Raster, hochkant-Zellen wie das Inventar im Spiel) --- */
.hcube-bag {
    width: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #4a3f26;
    border-radius: 6px;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(196, 162, 78, 0.10) 0%, rgba(13, 14, 19, 0) 55%),
        linear-gradient(165deg, #15141a 0%, #0a090d 55%, #0f0e13 100%);
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.75),
        inset 0 0 0 1px rgba(196, 162, 78, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.6);
    padding: 0.85rem 0.9rem 1rem;
}
/* Taschen-Tabs (Ausruestung / Talisman / Sockelbares / Verbrauchsgegenstaende / Schluessel) */
.hcube-bag__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-bottom: 0.6rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(90deg, transparent 0%, rgba(196, 162, 78, 0.55) 50%, transparent 100%) bottom / 100% 1px no-repeat;
}
.hcube-bag__tabbtn {
    padding: 0.4rem 0.75rem;
    background: #14151b;
    border: 1px solid #2a2a35;
    border-radius: 5px;
    color: var(--text-secondary, #a09d94);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.hcube-bag__tabbtn:hover { border-color: #c4a24e; color: #e0ddd5; }
.hcube-bag__tabbtn.is-active {
    border-color: #c4a24e;
    color: #c4a24e;
    background: rgba(196, 162, 78, 0.10);
    box-shadow: 0 0 8px -2px rgba(196, 162, 78, 0.7);
}
/* Tabs ohne fuer das Rezept nutzbare Teile: ausgegraut (bleiben klickbar) */
.hcube-bag__tabbtn.is-empty { opacity: 0.45; }
.hcube-bag__tabcount { color: #c4a24e; font-weight: 700; }
.hcube-bag__tabbtn.is-empty .hcube-bag__tabcount { color: inherit; }
/* Inventar-Zellen, die fuer das Rezept nicht nutzbar sind (bleiben klickbar) */
.hcube-invcell.is-inactive { opacity: 0.32; filter: grayscale(0.7); }
.hcube-bag__content { min-height: 140px; }

/* Listen in den Item-Tabs (Ausruestung / Talisman / Sockelbares) — Inventar-Raster
   wie im Spiel: 11 Spalten, hochkant-Zellen, Raritaets-Hintergruende. */
.hcube-bagtab__search { width: 100%; margin-bottom: 0.55rem; }
.hcube-bagtab__list {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 3px;
    align-content: start;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: #4a3f26 transparent;
}
.hcube-invcell {
    position: relative;
    aspect-ratio: 3 / 4;
    background: linear-gradient(180deg, #121318 0%, #0a0b0f 100%);
    border: 1px solid #26262e;
    border-radius: 2px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.15s, filter 0.15s;
}
.hcube-invcell:hover { border-color: #c4a24e; filter: brightness(1.25); }
.hcube-invcell img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.hcube-bagtab__list::-webkit-scrollbar { width: 6px; }
.hcube-bagtab__list::-webkit-scrollbar-track { background: transparent; }
.hcube-bagtab__list::-webkit-scrollbar-thumb { background: #3a3325; border-radius: 3px; }
.hcube-bagtab__list::-webkit-scrollbar-thumb:hover { background: #c4a24e; }
.hcube-bagtab__list--wide { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.hcube-bag__content .hcube-picker__slot-label { margin: 0 0 0.45rem; }
.hcube-picker__cell--row { flex-direction: row; justify-content: flex-start; padding: 0.55rem 0.7rem; }
.hcube-bag__tabs + .hcube-bag__content .hcube-picker__chips { margin-bottom: 0.55rem; }
.hcube-bag__grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 3px;
}
.hcube-bag__cell {
    position: relative;
    aspect-ratio: 3 / 4; /* hochkant wie die Inventar-Zellen im Spiel */
    background: linear-gradient(180deg, #121318 0%, #0a0b0f 100%);
    border: 1px solid #26262e;
    border-radius: 2px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.hcube-bag__cell img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.hcube-bag__cell--empty { opacity: 0.65; }
.hcube-bag__cell:not(.hcube-bag__cell--empty) { cursor: pointer; }
/* Vom aktuellen Rezept nicht nutzbare Materialien: ausgegraut */
.hcube-bag__cell.is-inactive { opacity: 0.32; filter: grayscale(0.7); }
/* Als Rezept-Filter gewaehltes Material */
.hcube-bag__cell.is-selected {
    opacity: 1;
    filter: none;
    border-color: #c4a24e;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 12px 0 rgba(196, 162, 78, 0.9);
}

/* Raritaets-Hintergruende wie im Spiel (dunkler Verlauf zur Raritaetsfarbe) */
.hcube-bag__cell.hcube-rarity--common, .hcube-crafted__cell.hcube-rarity--common, .hcube-invcell.hcube-rarity--common { border-color: #3c3c44; background: linear-gradient(180deg, #101116 10%, rgba(160, 160, 168, 0.18) 100%); }
.hcube-bag__cell.hcube-rarity--magic, .hcube-crafted__cell.hcube-rarity--magic, .hcube-invcell.hcube-rarity--magic { border-color: #33558c; background: linear-gradient(180deg, #0d1016 10%, rgba(74, 144, 217, 0.32) 100%); }
.hcube-bag__cell.hcube-rarity--rare, .hcube-crafted__cell.hcube-rarity--rare, .hcube-invcell.hcube-rarity--rare { border-color: #93802f; background: linear-gradient(180deg, #12100b 10%, rgba(255, 215, 0, 0.28) 100%); }
.hcube-bag__cell.hcube-rarity--legendary, .hcube-crafted__cell.hcube-rarity--legendary, .hcube-invcell.hcube-rarity--legendary { border-color: #8a5420; background: linear-gradient(180deg, #120d08 10%, rgba(255, 128, 0, 0.30) 100%); }
.hcube-bag__cell.hcube-rarity--unique, .hcube-crafted__cell.hcube-rarity--unique, .hcube-invcell.hcube-rarity--unique { border-color: #8a6a26; background: linear-gradient(180deg, #13100a 10%, rgba(196, 162, 78, 0.33) 100%); }
.hcube-bag__cell.hcube-rarity--mythic_unique, .hcube-crafted__cell.hcube-rarity--mythic_unique, .hcube-invcell.hcube-rarity--mythic_unique { border-color: #7a4aa0; background: linear-gradient(180deg, #110c15 10%, rgba(139, 92, 246, 0.38) 100%); }
.hcube-bag__cell.hcube-rarity--set, .hcube-crafted__cell.hcube-rarity--set, .hcube-invcell.hcube-rarity--set { border-color: #3f7a4a; background: linear-gradient(180deg, #0c130e 10%, rgba(74, 222, 128, 0.26) 100%); }
.hcube-bag__ph { color: rgba(196, 162, 78, 0.55); font-size: 0.95rem; line-height: 1; }
.hcube-bag__cell.is-needed {
    border-color: var(--hc-rar, #c4a24e);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 9px -1px var(--hc-rar, #c4a24e);
    cursor: grab;
    animation: hcube-bag-pulse 1.6s ease-in-out infinite;
}
.hcube-bag__cell.is-needed:hover { filter: brightness(1.25); }
.hcube-bag__cell.is-needed:focus-visible { outline: 2px solid #c4a24e; outline-offset: 1px; }
.hcube-bag__cell.is-needed:active { cursor: grabbing; }
.hcube-bag__cell.is-used { animation: none; }
@keyframes hcube-bag-pulse {
    0%, 100% { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 6px -1px var(--hc-rar, #c4a24e); }
    50% { box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 12px 0 var(--hc-rar, #c4a24e); }
}
.hcube-sim__recipe-effect {
    margin: auto 0 0;
    padding-top: 0.85rem;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-secondary, #a09d94);
    font-style: italic;
}

@media (max-width: 760px) {
    .hcube-sim__row1 { grid-template-columns: 1fr; }
    .hcube-sim__row2 { grid-template-columns: 1fr; }
    .hcube-sim__recipes-col { height: 320px; }
    .hcube-sim__recipe-effect { margin-top: 0.5rem; padding-top: 0.5rem; }
    /* Taschen-Tabs: horizontal scrollen statt umbrechen (wie im Spiel) */
    .hcube-bag__tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: #4a3f26 transparent;
        padding-bottom: 0.5rem;
    }
    .hcube-bag__tabbtn { white-space: nowrap; flex-shrink: 0; font-size: 0.7rem; padding: 0.35rem 0.55rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hcube-sim__cube.is-transmuting { animation: none; }
    .hcube-sim__cube.has-result .hcube-sim__beam { animation: none; opacity: 0.5; }
    .hcube-sim__out { animation: none; }
    .hcube-sim__slot.just-filled { animation: none; }
    .hcube-bag__cell.is-needed { animation: none; }
}
