/* ═══════════════════════════════════════════════════════════════════════════
   RYOU CRAFTEO — RPG Videogame Style
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    --crf-gold:     #c8a94a;
    --crf-gold-lt:  #e8c96a;
    --crf-red:      #8b1a1a;
    --crf-red-lt:   #c03030;
    --crf-forge:    #7a2800;
    --crf-forge-lt: #ff6820;
    --crf-bench:    #3a2010;
    --crf-dark:     #0e0b08;
    --crf-panel:    #1a1208;
    --crf-border:   rgba(200,169,74,.25);
    --crf-text:     #e8d9b0;
    --crf-muted:    #8a7a5a;
    --crf-success:  #4a9a4a;
    --crf-danger:   #c03030;
    --crf-radius:   8px;
    --crf-shadow:   0 4px 24px rgba(0,0,0,.6);
}

/* ── Wrap ── */
.ryou-crafteo-wrap {
    position: relative;
    background: var(--crf-dark);
    border: 1px solid var(--crf-border);
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Cinzel', serif;
    color: var(--crf-text);
    box-shadow: var(--crf-shadow), inset 0 0 80px rgba(0,0,0,.4);
    min-height: 500px;
    font-size: 24px;
}

/* ── Ambient backgrounds ── */
.ryou-crafteo-ambient { position:absolute; inset:0; pointer-events:none; z-index:0; overflow:hidden; }

/* Forge fire particles */
.ryou-forge-fire { position:absolute; bottom:0; left:50%; transform:translateX(-50%); width:100%; }
.ryou-forge-fire span {
    position:absolute; bottom:0; width:3px; border-radius:50% 50% 20% 20%;
    animation: forge-flicker 2s ease-in infinite;
    opacity:0;
}
.ryou-forge-fire span:nth-child(1) { left:15%; height:120px; background:linear-gradient(#ff6820,#ff200020); animation-delay:0s;    width:4px; }
.ryou-forge-fire span:nth-child(2) { left:30%; height:80px;  background:linear-gradient(#ff9020,#ff200010); animation-delay:.4s;  width:3px; }
.ryou-forge-fire span:nth-child(3) { left:50%; height:140px; background:linear-gradient(#ffb040,#ff200020); animation-delay:.2s;  width:5px; }
.ryou-forge-fire span:nth-child(4) { left:65%; height:90px;  background:linear-gradient(#ff6820,#ff200010); animation-delay:.6s;  width:3px; }
.ryou-forge-fire span:nth-child(5) { left:80%; height:110px; background:linear-gradient(#ff9020,#ff200015); animation-delay:.9s;  width:4px; }
@keyframes forge-flicker {
    0%   { opacity:0;   transform:scaleX(1)   translateY(0); }
    20%  { opacity:.8; }
    80%  { opacity:.4;  transform:scaleX(1.3) translateY(-20px); }
    100% { opacity:0;   transform:scaleX(.8)  translateY(-40px); }
}

/* Bench dust particles */
.ryou-bench-dust span {
    position:absolute; width:4px; height:4px; border-radius:50%;
    background:rgba(200,169,74,.3);
    animation: dust-float 6s ease-in-out infinite;
}
.ryou-bench-dust span:nth-child(1) { left:20%; bottom:30%; animation-delay:0s; }
.ryou-bench-dust span:nth-child(2) { left:55%; bottom:20%; animation-delay:2s; }
.ryou-bench-dust span:nth-child(3) { left:75%; bottom:40%; animation-delay:4s; }
@keyframes dust-float {
    0%,100% { opacity:0; transform:translateY(0); }
    50%      { opacity:.6; transform:translateY(-30px); }
}

/* ── Forge color override ── */
.ryou-crafteo-fragua { --crf-accent:#ff6820; --crf-accent-glow:rgba(255,104,32,.2); }
.ryou-crafteo-banco  { --crf-accent:#c8a94a; --crf-accent-glow:rgba(200,169,74,.15); }
.ryou-crafteo-wrap { --crf-accent:#c8a94a; --crf-accent-glow:rgba(200,169,74,.15); }

/* ── Header ── */
.ryou-crafteo-header {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; flex-wrap: wrap; gap: .5rem;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(135deg, rgba(26,8,0,.9) 0%, rgba(10,6,2,.95) 100%);
    border-bottom: 2px solid var(--crf-border);
    box-shadow: 0 2px 12px rgba(0,0,0,.5);
    text-align: center;
}
.ryou-crafteo-title-wrap { display:flex; align-items:center; gap:.6rem; }
.ryou-crafteo-icon { font-size:1.8rem; filter:drop-shadow(0 0 8px var(--crf-accent)); }
.ryou-crafteo-title {
    margin:0; font-size:2rem; font-weight:700; letter-spacing:.05em;
    color: var(--crf-gold);
    text-shadow: 0 0 20px rgba(200,169,74,.5), 0 2px 4px rgba(0,0,0,.8);
}
.ryou-crafteo-meta { display:flex; align-items:center; gap:.8rem; flex-wrap:wrap; }
.ryou-crafteo-rango {
    font-size:16px; letter-spacing:.1em; text-transform:uppercase;
    color:var(--crf-gold); opacity:.8;
    border:1px solid var(--crf-border); border-radius:4px; padding:.15rem .5rem;
}
.ryou-crafteo-fichasel, .ryou-crafteo-fichanombre {
    background: rgba(255,255,255,.05); border: 1px solid var(--crf-border);
    color: var(--crf-text); padding: .3rem .6rem; border-radius:4px; font-size:18px;
    font-family: inherit;
}

/* ── Active queue ── */
.ryou-crafteo-cola {
    position:relative; z-index:1;
    padding: .8rem 1.5rem;
    background: rgba(200,169,74,.06);
    border-bottom: 1px solid var(--crf-border);
}
.ryou-crafteo-cola-title {
    margin: 0 0 .6rem; font-size:18px; letter-spacing:.1em; text-transform:uppercase;
    color:var(--crf-gold); opacity:.7;
}
.ryou-crafteo-cola-list { display:flex; flex-wrap:wrap; gap:.6rem; }
.ryou-crafteo-cola-card {
    display:flex; align-items:center; gap:.6rem;
    background: rgba(255,255,255,.05); border:1px solid var(--crf-border);
    border-radius:var(--crf-radius); padding:.5rem .8rem; min-width:240px;
    transition: border-color .2s;
}
.ryou-crafteo-cola-card.done  { border-color:var(--crf-success); background:rgba(74,154,74,.1); }
.ryou-crafteo-cola-card.failed{ border-color:var(--crf-danger);  background:rgba(192,48,48,.1); }
.ryou-cc-img { width:36px; height:36px; object-fit:contain; border-radius:4px; flex-shrink:0; }
.ryou-cc-noimg { width:36px; height:36px; display:flex; align-items:center; justify-content:center; font-size:1.4rem; }
.ryou-cc-info { display:flex; flex-direction:column; gap:1px; flex:1; min-width:0; }
.ryou-cc-nombre { font-size:20px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ryou-cc-receta { font-size:16px; color:var(--crf-muted); }
.ryou-cc-countdown { font-size:17px; color:var(--crf-gold); font-variant-numeric:tabular-nums; }
.ryou-cc-listo  { font-size:17px; color:var(--crf-success); font-weight:700; }
.ryou-cc-fallo  { font-size:17px; color:var(--crf-danger); }

/* ── Body ── */
.ryou-crafteo-body {
    position:relative; z-index:1;
    display:grid; grid-template-columns:280px 1fr; min-height:420px;
}
@media(max-width:700px) { .ryou-crafteo-body { grid-template-columns:1fr; } }

/* ── Inventory panel ── */
.ryou-crafteo-inv {
    border-right: 1px solid var(--crf-border);
    background: rgba(0,0,0,.3);
    display:flex; flex-direction:column;
}
.ryou-crafteo-inv-header {
    padding: .7rem 1rem; border-bottom:1px solid var(--crf-border);
    display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.3rem;
}
.ryou-crafteo-inv-header h3 { margin:0; font-size:22px; color:var(--crf-gold); }
.ryou-crafteo-inv-hint { font-size:16px; color:var(--crf-muted); font-family:'Amaranth',sans-serif; }
.ryou-crafteo-inv-empty {
    flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:.5rem; padding:2rem; color:var(--crf-muted); text-align:center;
}
.ryou-crafteo-inv-empty span { font-size:2.5rem; opacity:.3; }
.ryou-crafteo-inv-grid {
    flex:1; overflow-y:auto; padding:.3rem .4rem;
    display:flex; flex-direction:column; gap:0;
    scrollbar-width:thin; scrollbar-color:var(--crf-border) transparent;
    max-height:500px;
}

/* ── Category header ── */
.ryou-crafteo-cat-header {
    display: flex; align-items: center; gap: .5rem;
    padding: .4rem .6rem; cursor: pointer;
    background: rgba(200,169,74,.08);
    border-top: 1px solid var(--crf-border);
    border-bottom: 1px solid var(--crf-border);
    margin-top: .3rem; user-select: none;
    position: sticky; top: 0; z-index: 1;
}
.ryou-crafteo-cat-header:first-child { margin-top: 0; border-top: none; }
.ryou-crafteo-cat-arrow {
    font-size: 10px; color: var(--crf-gold);
    transition: transform .2s; line-height: 1;
}
.ryou-crafteo-cat-header.collapsed .ryou-crafteo-cat-arrow { transform: rotate(-90deg); }
.ryou-crafteo-cat-name {
    flex: 1; font-family: 'Cinzel', serif; font-size: 11px; font-weight: 700;
    color: var(--crf-gold); text-transform: uppercase; letter-spacing: .06em;
}
.ryou-crafteo-cat-count {
    font-size: 10px; color: var(--crf-muted);
    background: rgba(255,255,255,.08); border-radius: 10px;
    padding: 1px 6px; font-family: 'Amaranth', sans-serif;
}
.ryou-crafteo-cat-items { display: flex; flex-direction: column; }
.ryou-crafteo-cat-items.collapsed { display: none; }

/* ── Inventory item row (list layout) ── */
.ryou-crafteo-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,.04);
    border-radius: 0;
    padding: .45rem .6rem; cursor: pointer; transition: background .12s;
    display: grid;
    grid-template-columns: 32px 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: .55rem; row-gap: .1rem;
    position: relative;
}
.ryou-crafteo-item:hover:not(.en-crafteo):not(.sin-recetas) {
    background: rgba(200,169,74,.08);
}
.ryou-crafteo-item.active {
    background: rgba(200,169,74,.15);
    box-shadow: inset 3px 0 0 var(--crf-gold);
}
.ryou-crafteo-item.en-crafteo  { opacity:.6; }
.ryou-crafteo-item.sin-recetas { opacity:.4; cursor:default; }

/* Image: row 1-2, col 1 */
.ryou-crafteo-item-img {
    position:relative; width:32px; height:32px; flex-shrink:0;
    grid-row: 1 / 3; grid-column: 1;
}
.ryou-crafteo-item-img img {
    width:100%; height:100%; object-fit:contain; border-radius:3px;
    filter:drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
.ryou-item-noimg {
    width:100%; height:100%; display:flex; align-items:center; justify-content:center;
    font-size:1.4rem; background:rgba(255,255,255,.05); border-radius:3px;
}
.ryou-item-qty {
    position:absolute; bottom:-3px; right:-3px;
    background:var(--crf-red); color:#fff; font-size:9px; font-weight:700;
    padding:1px 3px; border-radius:2px; font-family:'Amaranth',sans-serif;
    border:1px solid rgba(255,255,255,.2); white-space:nowrap;
}
.ryou-item-mejoras {
    position:absolute; top:-3px; right:-3px;
    background:var(--crf-gold); color:var(--crf-dark); font-size:9px; font-weight:700;
    padding:1px 3px; border-radius:2px; font-family:'Amaranth',sans-serif;
}
.ryou-item-crafteo-overlay {
    position:absolute; inset:0; background:rgba(0,0,0,.6);
    display:flex; align-items:center; justify-content:center;
    font-size:1.1rem; border-radius:3px;
    animation: crafteo-pulse 1.5s ease-in-out infinite;
}
@keyframes crafteo-pulse { 0%,100%{opacity:.6} 50%{opacity:1} }

/* Name: row 1, col 2 */
.ryou-crafteo-item-name {
    grid-row: 1; grid-column: 2;
    font-size:13px; color:var(--crf-text); line-height:1.2;
    font-family:'Amaranth',sans-serif; overflow:hidden;
    text-overflow:ellipsis; white-space:nowrap;
}
.ryou-item-status {
    grid-row: 2; grid-column: 2;
    font-size:11px; color:var(--crf-muted); font-family:'Amaranth',sans-serif;
}

/* Buttons: row 1-2, col 3 */
.ryou-crafteo-item .ryou-crafteo-btn,
.ryou-crafteo-item .ryou-crafteo-btn-ghost {
    grid-column: 3;
}

/* ── Buttons ── */
.ryou-crafteo-btn {
    display:inline-flex; align-items:center; justify-content:center; gap:.2rem;
    padding:.25rem .6rem; border-radius:4px; font-size:11px; font-weight:700;
    letter-spacing:.03em; cursor:pointer; transition:all .12s;
    border:none; font-family:'Cinzel',serif;
    background:linear-gradient(135deg,#c8a94a,#8a6a1a);
    color:var(--crf-dark); text-shadow:none;
    white-space:nowrap;
}
.ryou-crafteo-btn:hover { filter:brightness(1.2); }
.ryou-crafteo-btn:active { filter:brightness(.9); }
.ryou-crafteo-btn-ghost {
    background:transparent; color:var(--crf-muted);
    border:1px solid var(--crf-border); margin-top:.15rem;
}
.ryou-crafteo-btn-ghost:hover { border-color:var(--crf-gold); color:var(--crf-gold); background:rgba(200,169,74,.05); }
.ryou-crafteo-btn-danger {
    background:linear-gradient(135deg,#c03030,#7a1010); color:#fff;
}
.ryou-crafteo-btn-success {
    background:linear-gradient(135deg,#3a8a3a,#1a5a1a); color:#fff;
}

/* ── Recipe panel ── */
.ryou-crafteo-panel {
    padding:1.5rem; display:flex; flex-direction:column; gap:1rem;
    background:rgba(0,0,0,.2);
}
.ryou-crafteo-panel-idle {
    flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:1rem; color:var(--crf-muted); text-align:center; padding:2rem;
}
.ryou-crafteo-panel-idle-icon { font-size:4rem; opacity:.2; }
.ryou-crafteo-panel-idle p { font-family:'Amaranth',sans-serif; font-size:20px; }

/* Recipe panel loaded */
.ryou-crafteo-panel-content { display:flex; flex-direction:column; gap:1rem; }
.ryou-crafteo-panel-product {
    display:flex; align-items:center; gap:1rem;
    padding:.8rem 1rem;
    background:rgba(255,255,255,.04); border:1px solid var(--crf-border); border-radius:var(--crf-radius);
}
.ryou-crafteo-panel-product img { width:56px; height:56px; object-fit:contain; }
.ryou-crafteo-panel-product-info h3 { margin:0 0 .2rem; font-size:24px; color:var(--crf-gold); }
.ryou-crafteo-panel-product-info p  { margin:0; font-size:18px; color:var(--crf-muted); font-family:'Amaranth',sans-serif; }
.ryou-crafteo-panel-product-mejoras { display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.4rem; }
.ryou-crafteo-mejora-tag {
    font-size:16px; background:rgba(200,169,74,.15); border:1px solid var(--crf-border);
    color:var(--crf-gold); padding:.1rem .4rem; border-radius:3px; font-family:'Amaranth',sans-serif;
}

/* Recipe list */
.ryou-crafteo-recetas-title {
    font-size:16px; letter-spacing:.12em; text-transform:uppercase;
    color:var(--crf-muted); margin:0 0 .5rem;
}
.ryou-crafteo-receta-card {
    background:rgba(255,255,255,.04); border:1px solid var(--crf-border);
    border-radius:var(--crf-radius); padding:.8rem 1rem;
    cursor:pointer; transition:all .15s;
}
.ryou-crafteo-receta-card:hover:not(.disabled) {
    border-color:var(--crf-gold); background:rgba(200,169,74,.07);
}
.ryou-crafteo-receta-card.selected {
    border-color:var(--crf-gold); background:rgba(200,169,74,.12);
    box-shadow:0 0 0 1px var(--crf-gold);
}
.ryou-crafteo-receta-card.disabled { opacity:.4; cursor:not-allowed; }

.ryou-crafteo-receta-header { display:flex; align-items:center; justify-content:space-between; gap:.5rem; flex-wrap:wrap; }
.ryou-crafteo-receta-nombre { font-size:22px; font-weight:700; color:var(--crf-gold); }
.ryou-crafteo-receta-badges { display:flex; gap:.3rem; flex-wrap:wrap; }
.ryou-crafteo-badge {
    font-size:14px; padding:.1rem .4rem; border-radius:3px;
    font-family:'Amaranth',sans-serif; font-weight:700; letter-spacing:.05em;
}
.ryou-badge-pct  { background:rgba(74,154,74,.2);  color:#6ec06e; border:1px solid rgba(74,154,74,.4); }
.ryou-badge-time { background:rgba(200,169,74,.15); color:var(--crf-gold); border:1px solid var(--crf-border); }
.ryou-badge-rango{ background:rgba(192,48,48,.2); color:#e07070; border:1px solid rgba(192,48,48,.4); }
.ryou-badge-incompat { background:rgba(192,48,48,.15); color:#e07070; border:1px solid rgba(192,48,48,.3); }

.ryou-crafteo-receta-desc { font-size:18px; color:var(--crf-muted); font-family:'Amaranth',sans-serif; margin-top:.3rem; }
.ryou-crafteo-receta-costes {
    display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.5rem;
    padding-top:.5rem; border-top:1px solid rgba(255,255,255,.05);
}
.ryou-crafteo-coste-tag {
    font-size:17px; font-family:'Amaranth',sans-serif;
    padding:.15rem .5rem; border-radius:4px;
    background:rgba(255,255,255,.06); border:1px solid var(--crf-border);
    display:flex; align-items:center; gap:.3rem;
}
.ryou-crafteo-coste-tag.insufficient { border-color:var(--crf-danger); color:var(--crf-danger); }

/* Slot / Ranuras */
.ryou-crafteo-ranuras { display:flex; flex-direction:column; gap:.5rem; margin-top:.5rem; }
.ryou-crafteo-ranura {
    background:rgba(255,255,255,.03); border:1px dashed rgba(200,169,74,.2);
    border-radius:var(--crf-radius); padding:.6rem .8rem;
}
.ryou-crafteo-ranura-title { font-size:18px; color:var(--crf-gold); margin:0 0 .4rem; }
.ryou-crafteo-ranura-title span.req { color:var(--crf-danger); margin-left:.2rem; }
.ryou-crafteo-ranura select {
    background:rgba(0,0,0,.4); border:1px solid var(--crf-border);
    color:var(--crf-text); padding:.3rem .5rem; border-radius:4px;
    font-family:'Amaranth',sans-serif; font-size:18px; width:100%;
}
.ryou-crafteo-ranura select:focus { outline:none; border-color:var(--crf-gold); }
.ryou-crafteo-ranura-efecto {
    font-size:17px; color:var(--crf-muted); font-family:'Amaranth',sans-serif; margin-top:.3rem;
}

/* Suerte */
.ryou-crafteo-suerte {
    background:rgba(200,169,74,.05); border:1px solid rgba(200,169,74,.2);
    border-radius:var(--crf-radius); padding:.7rem .9rem; display:flex; flex-direction:column; gap:.4rem;
}
.ryou-crafteo-suerte-title { font-size:20px; color:var(--crf-gold); }
.ryou-crafteo-suerte-row { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.ryou-crafteo-suerte-row label { font-size:18px; color:var(--crf-muted); font-family:'Amaranth',sans-serif; }
.ryou-crafteo-suerte-input {
    width:60px; background:rgba(0,0,0,.4); border:1px solid var(--crf-border);
    color:var(--crf-text); padding:.2rem .4rem; border-radius:4px; text-align:center;
    font-family:'Amaranth',sans-serif;
}
.ryou-crafteo-suerte-pct { font-size:20px; color:var(--crf-gold-lt); font-weight:700; }

/* Action button area */
.ryou-crafteo-actions { display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.5rem; }
.ryou-crafteo-actions .ryou-crafteo-btn { flex:1; min-width:120px; padding:.6rem; font-size:.8rem; }

/* ── MODAL ── */
.ryou-crafteo-modal {
    position:fixed; inset:0; z-index:9999;
    display:flex; align-items:center; justify-content:center; padding:1rem;
}
.ryou-crafteo-modal-backdrop {
    position:absolute; inset:0; background:rgba(0,0,0,.7);
    backdrop-filter:blur(3px);
}
.ryou-crafteo-modal-box {
    position:relative; z-index:1;
    background:linear-gradient(135deg, #1a1208, #0e0b08);
    border:1px solid var(--crf-gold); border-radius:12px;
    padding:1.5rem; max-width:460px; width:100%;
    box-shadow:0 0 40px rgba(200,169,74,.15), var(--crf-shadow);
    animation: modal-in .2s ease;
}
@keyframes modal-in { from{opacity:0;transform:scale(.95)translateY(10px)} to{opacity:1;transform:none} }
.ryou-crafteo-modal-title {
    font-size:26px; color:var(--crf-gold); margin:0 0 .8rem;
    display:flex; align-items:center; gap:.5rem;
}
.ryou-crafteo-modal-body { font-family:'Amaranth',sans-serif; font-size:20px; color:var(--crf-text); line-height:1.6; }
.ryou-crafteo-modal-body ul { margin:.5rem 0; padding-left:1.2rem; }
.ryou-crafteo-modal-body li { margin-bottom:.2rem; }
.ryou-crafteo-modal-footer { display:flex; gap:.6rem; margin-top:1.2rem; }
.ryou-crafteo-modal-footer .ryou-crafteo-btn { flex:1; padding:.6rem; }

/* ── Historial ── */
.ryou-crafteo-historial-wrap { font-family:'Amaranth',sans-serif; }
.ryou-crafteo-hist-top { display:flex; align-items:center; gap:1rem; margin-bottom:1rem; flex-wrap:wrap; }
.ryou-crafteo-hist-count { font-size:.8rem; color:var(--crf-muted); margin-left:auto; }
.ryou-crafteo-hist-table { width:100%; border-collapse:collapse; font-size:.8rem; }
.ryou-crafteo-hist-table th { font-family:'Cinzel',serif; font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; color:var(--crf-gold); border-bottom:1px solid var(--crf-border); padding:.5rem .7rem; }
.ryou-crafteo-hist-table td { padding:.5rem .7rem; border-bottom:1px solid rgba(255,255,255,.04); }
.ryou-crafteo-hist-table tr:hover td { background:rgba(255,255,255,.02); }
.ryou-res-exito  { color:#6ec06e; font-weight:700; }
.ryou-res-fallo  { color:#e07070; font-weight:700; }
.ryou-res-cancel { color:var(--crf-muted); }

/* ── Loading spinner ── */
.ryou-crafteo-loading {
    display:flex; align-items:center; justify-content:center; gap:.5rem;
    color:var(--crf-muted); font-family:'Amaranth',sans-serif; font-size:20px;
    padding:2rem;
}
.ryou-crafteo-spinner {
    width:20px; height:20px; border:2px solid rgba(200,169,74,.2);
    border-top-color:var(--crf-gold); border-radius:50%;
    animation:spin .7s linear infinite;
}
@keyframes spin { to{transform:rotate(360deg)} }

/* ── Crafteo animation overlay ── */
.ryou-crafteo-anim-overlay {
    position:fixed; inset:0; z-index:10000;
    background:rgba(0,0,0,.85);
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:1.5rem;
}
.ryou-crafteo-anim-icon {
    font-size:5rem;
    animation: crafteo-anim 1s ease-in-out infinite alternate;
    filter:drop-shadow(0 0 20px var(--crf-accent));
}
@keyframes crafteo-anim { from{transform:scale(.9)rotate(-5deg)} to{transform:scale(1.1)rotate(5deg)} }
.ryou-crafteo-anim-text {
    font-family:'Cinzel',serif; font-size:28px; color:var(--crf-gold);
    letter-spacing:.1em; text-align:center;
    text-shadow:0 0 20px rgba(200,169,74,.5);
}
.ryou-crafteo-anim-bar {
    width:200px; height:4px; background:rgba(255,255,255,.1); border-radius:2px; overflow:hidden;
}
.ryou-crafteo-anim-bar-inner {
    height:100%; background:var(--crf-gold); border-radius:2px;
    animation:bar-fill 1.5s ease-in-out forwards;
}
@keyframes bar-fill { from{width:0} to{width:100%} }

/* ── Inline recipe detail (injected after selected card) ── */
.ryou-receta-detail-inline {
    background: rgba(200,169,74,.07);
    border: 1px solid rgba(200,169,74,.3);
    border-radius: var(--crf-radius);
    padding: 1rem;
    margin: .3rem 0 .5rem;
    animation: detail-in .18s ease;
}
@keyframes detail-in {
    from { opacity:0; transform:translateY(-6px); }
    to   { opacity:1; transform:none; }
}
.ryou-receta-detail-inline .ryou-crafteo-ranura { background: rgba(0,0,0,.3); }
.ryou-receta-detail-inline .ryou-crafteo-actions { margin-top:.8rem; }
.ryou-receta-detail-inline .ryou-crafteo-btn { padding:.6rem 1.2rem; font-size:20px; }

/* ── Historial RPG style ── */
.ryou-crafteo-historial-wrap {
    background: linear-gradient(135deg, #1a1208, #0e0b08);
    border: 1px solid rgba(200,169,74,.25);
    border-radius: 12px;
    padding: 1.5rem;
    color: #e8d9b0;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,.6);
}
.ryou-crafteo-historial-wrap h2 {
    color: #c8a94a;
    font-size: 28px;
    text-shadow: 0 0 20px rgba(200,169,74,.4);
    margin-bottom: 1rem;
    text-align: center;
}
.ryou-crafteo-hist-top {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}
.ryou-crafteo-hist-top select {
    background: rgba(0,0,0,.4); border: 1px solid rgba(200,169,74,.25);
    color: #e8d9b0; padding: .4rem .7rem; border-radius: 5px;
    font-family: 'Cinzel', serif; font-size: 16px;
}
.ryou-crafteo-hist-count {
    font-size: 16px; color: #8a7a5a; margin-left: auto;
}
.ryou-crafteo-hist-table {
    width: 100%; border-collapse: collapse; font-size: 17px;
}
.ryou-crafteo-hist-table th {
    font-family: 'Cinzel', serif; font-size: 14px;
    text-transform: uppercase; letter-spacing: .1em;
    color: #c8a94a; border-bottom: 1px solid rgba(200,169,74,.25);
    padding: .6rem .8rem; text-align: left;
}
.ryou-crafteo-hist-table td {
    padding: .6rem .8rem; border-bottom: 1px solid rgba(255,255,255,.04);
    font-family: 'Amaranth', sans-serif;
}
.ryou-crafteo-hist-table tr:hover td {
    background: rgba(200,169,74,.05);
}
.ryou-res-exito  { color: #6ec06e; font-weight: 700; }
.ryou-res-fallo  { color: #e07070; font-weight: 700; }
.ryou-res-cancel { color: #8a7a5a; }
.ryou-hist-exito td   { border-left: 3px solid rgba(74,154,74,.4); }
.ryou-hist-fallo td   { border-left: 3px solid rgba(192,48,48,.4); }
.ryou-hist-cancelado td { border-left: 3px solid rgba(138,122,90,.3); }

.ryou-crafteo-historial-wrap .ryou-paginacion-wrap {
    display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem;
}
.ryou-crafteo-historial-wrap .ryou-pag-btn {
    background: rgba(255,255,255,.04); border: 1px solid rgba(200,169,74,.2);
    color: #c8a94a; padding: .3rem .8rem; border-radius: 4px;
    text-decoration: none; font-size: 16px; transition: all .15s;
}
.ryou-crafteo-historial-wrap .ryou-pag-btn:hover,
.ryou-crafteo-historial-wrap .ryou-pag-btn.active {
    background: rgba(200,169,74,.15); border-color: #c8a94a;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .ryou-crafteo-hist-table { font-size: 14px; }
    .ryou-crafteo-hist-table th, .ryou-crafteo-hist-table td { padding: .4rem; }
}

/* ── Mejorados category — gold accent ── */
.ryou-crafteo-cat-header--mejorados {
    background: rgba(200,169,74,.15);
    border-top: 1px solid rgba(200,169,74,.3);
    margin-top: .4rem;
}
.ryou-crafteo-cat-header--mejorados .ryou-crafteo-cat-name {
    color: var(--crf-gold);
}
