/* ── NINJA FORM ───────────────────────────────────────────────────────────── */
.ryou-ninja-wrap { font-family: 'Amaranth', sans-serif; font-size: 16px; }
.ryou-ninja-page-title { font-family:'Cinzel',serif; color:var(--ryou-text-dark); margin-bottom:1.2rem; }
.ryou-ninja-toolbar { display:flex; gap:.6rem; margin-bottom:1.2rem; flex-wrap:wrap; }

.ryou-ninja-section {
    display: block !important;
    width: 100% !important;
    background: var(--ryou-scroll-bg);
    border: 1px solid var(--ryou-border);
    border-radius: var(--ryou-radius);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
    box-sizing: border-box !important;
    overflow: hidden;
}
.ryou-ninja-section-title {
    font-family:'Cinzel',serif; font-size:1rem; color:#4a3820;
    border-bottom:1px solid var(--ryou-parch-dk); padding-bottom:.4rem; margin-bottom:1rem;
}
.ryou-ninja-subsection { font-family:'Amaranth',sans-serif; font-size:14px; font-weight:700; color:#4a3820; margin:.8rem 0 .4rem; border-top:1px dashed var(--ryou-parch-dk); padding-top:.6rem; }
.ryou-ninja-subsection-title { font-family:'Amaranth',sans-serif; font-size:14px; font-weight:700; color:#4a3820; margin:1rem 0 .5rem; }
.ryou-ninja-notice--warn { background:rgba(201,168,76,.1); border:1px solid var(--ryou-gold); color:#4a3820; padding:.7rem 1rem; border-radius:4px; margin-bottom:1rem; font-size:.88rem; }

/* Form fields */
.ryou-nf-field { margin-bottom:.9rem; }
.ryou-nf-label { display:block; font-weight:700; color:#3a2e1a; font-size:.88rem; margin-bottom:.25rem; }
.ryou-req { color:var(--ryou-red-lt); margin-left:.2rem; }
.ryou-field-note { display:block; font-size:.78rem; color:#7a6040; margin-bottom:.25rem; }
.ryou-nf-input input[type=text],
.ryou-nf-input input[type=number],
.ryou-nf-input input[type=date],
.ryou-nf-input select,
.ryou-nf-input textarea,
.ryou-ninja-form input[type=text],
.ryou-ninja-form input[type=number],
.ryou-ninja-form input[type=date],
.ryou-ninja-form select,
.ryou-ninja-form textarea {
    width:100%; max-width:100%; box-sizing:border-box;
    background:var(--ryou-parch-lt); border:1px solid var(--ryou-parch-dk);
    border-radius:4px; padding:.4rem .7rem; font-family:'Lato',sans-serif; font-size:.88rem;
    color:var(--ryou-text-dark); outline:none; transition:border-color .2s;
}
/* Nivel input — keep narrow */
input[name="nivel"] { width:120px !important; max-width:120px !important; }
.ryou-ninja-form input:focus,.ryou-ninja-form select:focus,.ryou-ninja-form textarea:focus { border-color:var(--ryou-gold); }
.ryou-nf-long { min-height:120px; resize:vertical; max-height:400px; overflow-y:auto; }
.ryou-nf-readonly { color:#5a4830; font-style:italic; }
.ryou-nf-or { display:inline-block; margin:.3rem; color:#7a6040; font-size:.8rem; }
.ryou-nf-calc { font-family:'Cinzel',serif; font-size:1.1rem; font-weight:700; }

/* Stats grid */
.ryou-nf-stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:.6rem; }
.ryou-nf-pd-calc { display:flex; gap:1rem; flex-wrap:wrap; margin-top:.6rem; background:rgba(0,0,0,.05); padding:.6rem; border-radius:4px; }

/* Checks */
.ryou-nf-checks { display:flex; flex-wrap:wrap; gap:.4rem; }
.ryou-nf-checks--2 .ryou-nf-check { width:calc(50% - .2rem); }
.ryou-nf-check { display:flex; align-items:center; gap:.3rem; font-size:.84rem; cursor:pointer; }
.ryou-nf-check input { flex-shrink:0; }

/* Professions */
.ryou-prof-grid { display:flex; gap:1rem; flex-wrap:wrap; }
.ryou-prof-group { background:rgba(0,0,0,.05); border-radius:4px; padding:.6rem .8rem; min-width:160px; }
.ryou-prof-gremio { display:block; font-weight:700; font-size:.8rem; color:var(--ryou-purple); margin-bottom:.4rem; }

/* Locked field */
.ryou-nf-locked { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.ryou-nf-locked-val { font-style:italic; color:#5a4830; }
.ryou-badge--lock { background:rgba(138,112,64,.15); border:1px solid var(--ryou-border); color:#5a4830; border-radius:20px; padding:.15rem .6rem; font-size:.78rem; }
.ryou-badge--warn { background:rgba(201,168,76,.15); border:1px solid var(--ryou-gold); color:#6a5020; border-radius:20px; padding:.15rem .6rem; font-size:.78rem; }
.ryou-badge--info { background:rgba(76,175,80,.15); border:1px solid var(--ryou-green-lt); color:#2a5a30; border-radius:20px; padding:.15rem .6rem; font-size:.78rem; }
.ryou-btn--request { background:none; border:1px solid var(--ryou-gold); color:var(--ryou-gold); border-radius:4px; padding:.2rem .6rem; cursor:pointer; font-size:.78rem; }

/* Form actions */
.ryou-ninja-form-actions { display:flex; gap:.8rem; margin-top:1.2rem; flex-wrap:wrap; }
.ryou-ninja-msg { padding:.7rem 1rem; border-radius:4px; margin-top:.8rem; font-size:.9rem; }
.ryou-ninja-msg--success { background:rgba(76,175,80,.1); border:1px solid var(--ryou-green-lt); color:var(--ryou-green); }
.ryou-ninja-msg--error   { background:rgba(201,76,76,.1); border:1px solid var(--ryou-red-lt); color:var(--ryou-red-lt); }

/* Ficha list */
.ryou-ninja-fichas-list { display:flex; flex-direction:column; gap:.6rem; }
.ryou-ninja-ficha-row { display:flex; align-items:center; gap:.8rem; background:var(--ryou-parch-lt); border:1px solid var(--ryou-parch-dk); border-radius:var(--ryou-radius); padding:.7rem 1rem; }
.ryou-ninja-ficha-thumb { width:50px; height:50px; object-fit:cover; border-radius:50%; border:2px solid var(--ryou-gold); flex-shrink:0; }
.ryou-ninja-ficha-info { flex:1; }
.ryou-ninja-ficha-info strong { display:block; }
.ryou-ninja-ficha-info span { font-size:.82rem; color:#5a4830; }
.ryou-ninja-ficha-actions { display:flex; gap:.4rem; }

/* ── NINJA CARD (public view) ─────────────────────────────────────────────── */
.ryou-ninja-card {
    font-family:'Lato',sans-serif;
    background:var(--ryou-scroll-bg);
    border:2px solid var(--ryou-border);
    border-radius:var(--ryou-radius);
    overflow:hidden;
    box-shadow:var(--ryou-shadow);
    position:relative;
    background-size:cover;
    background-position:center;
}

/* When a background image is set, overlay all content panels with semi-transparent backdrop */
.ryou-ninja-card[style*="background-image"] .ryou-ninja-card-header {
    background: rgba(20,14,6,.82) !important;
    backdrop-filter: blur(2px);
}
.ryou-ninja-card[style*="background-image"] .ryou-ninja-tabs {
    background: rgba(20,14,6,.85) !important;
    backdrop-filter: blur(2px);
}
.ryou-ninja-card[style*="background-image"] .ryou-ninja-tab-content {
    background: rgba(20,14,6,.88) !important;
    backdrop-filter: blur(3px);
}
.ryou-ninja-card[style*="background-image"] .ryou-ninja-tab-content * {
    color: #e8d9b0 !important;
}
.ryou-ninja-card[style*="background-image"] .ryou-ninja-tab-content strong,
.ryou-ninja-card[style*="background-image"] .ryou-ninja-tab-content h3,
.ryou-ninja-card[style*="background-image"] .ryou-ninja-tab-content h4 {
    color: #c8a94a !important;
}
.ryou-ninja-card[style*="background-image"] .ryou-ninja-tab-content a {
    color: #c8a94a !important;
}
.ryou-ninja-card[style*="background-image"] .ryou-nd span:first-child {
    color: #c8a94a !important;
}
.ryou-ninja-card[style*="background-image"] .ryou-ninja-inv-item {
    background: rgba(255,255,255,.08) !important;
    border-color: rgba(200,169,74,.3) !important;
}
.ryou-ninja-card[style*="background-image"] .ryou-ninja-stat-box {
    background: rgba(255,255,255,.06) !important;
    border-color: rgba(200,169,74,.2) !important;
}
.ryou-ninja-card-header {
    display:flex; align-items:flex-start; gap:1.2rem;
    background:var(--ryou-header-bg); padding:1.2rem 1.4rem;
    border-bottom:2px solid var(--ryou-border);
}
.ryou-ninja-avatar { flex-shrink:0; }
.ryou-ninja-avatar img { width:100px; height:100px; object-fit:cover; border-radius:50%; border:3px solid var(--ryou-gold); box-shadow:0 0 20px rgba(201,168,76,.3); }
.ryou-ninja-card-title h2 { font-family:'Amaranth',sans-serif; color:var(--ryou-gold-lt); font-size:14px; font-weight:700; margin:0 0 .4rem; }
.ryou-ninja-titulo { font-family:'Amaranth',sans-serif; font-style:italic; color:#aaa; font-size:14px; margin:.3rem 0 0; }
.ryou-ninja-badges { display:flex; flex-wrap:wrap; gap:.3rem; }
.ryou-ninja-badge { display:inline-block; border-radius:20px; padding:.15rem .6rem; font-size:14px; font-weight:700; word-break:break-word; white-space:normal; }
.ryou-ninja-badge--aldea { background:rgba(201,168,76,.2); border:1px solid var(--ryou-gold); color:var(--ryou-gold-lt); }
.ryou-ninja-badge--clan  { background:rgba(107,76,138,.2); border:1px solid var(--ryou-purple-lt); color:var(--ryou-purple-lt); }
.ryou-ninja-badge--rango { background:rgba(255,255,255,.85); border:1px solid #888; color:#222; font-size:12px; }
.ryou-ninja-badge--rank  { background:rgba(76,175,80,.15); border:1px solid var(--ryou-green-lt); color:var(--ryou-green-lt); }

/* Ninja tabs */
.ryou-ninja-tabs { display:flex; flex-wrap:wrap; background:var(--ryou-bg); border-bottom:2px solid var(--ryou-border); }
.ryou-ninja-tab { background:none; border:none; cursor:pointer; font-family:'Amaranth',sans-serif; font-weight:700; color:#aaa; font-size:14px; padding:.6rem 1rem; border-bottom:3px solid transparent; transition:color .2s,border-color .2s; }
.ryou-ninja-tab:hover { color:var(--ryou-parchment); }
.ryou-ninja-tab.active { color:var(--ryou-gold-lt); border-bottom-color:var(--ryou-gold); }
.ryou-ninja-tab-content { display:none; padding:1.2rem; }
.ryou-ninja-tab-content.active { display:block; max-height:500px; overflow-y:auto; }

/* Data grid */
.ryou-ninja-data-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:.6rem; }
.ryou-nd { background:rgba(0,0,0,.05); border-radius:4px; padding:.5rem .8rem; font-size:14px; font-family:'Amaranth',sans-serif; }
.ryou-nd--full { grid-column:1/-1; }
.ryou-nd span { display:block; font-weight:700; color:#4a3820; font-size:14px; margin-bottom:.2rem; }
.ryou-ninja-tags { display:flex; flex-wrap:wrap; gap:.3rem; margin-top:.3rem; }
.ryou-ninja-tag { background:rgba(107,76,138,.15); border:1px solid var(--ryou-purple-lt); border-radius:3px; padding:.1rem .4rem; font-size:.78rem; color:#3a2050; }
.ryou-ninja-tag--adv { background:rgba(201,168,76,.15); border-color:var(--ryou-gold); color:#5a4020; }

/* Stats */
.ryou-ninja-stat-hero { text-align:center; font-family:'Amaranth',sans-serif; font-size:14px; color:#fff; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; background:rgba(0,0,0,.15); border-radius:4px; padding:.3rem; margin-bottom:1rem; }
.ryou-ninja-stat-hero strong { font-size:22px; color:var(--ryou-gold); text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
.ryou-ninja-stat-grid { display:flex; flex-direction:column; gap:.5rem; margin-bottom:1rem; }
.ryou-ninja-stat-item { display:flex; align-items:center; gap:.6rem; }
.ryou-ninja-stat-bar { flex:1; height:12px; background:rgba(0,0,0,.1); border-radius:6px; overflow:hidden; position:relative; }
.ryou-ninja-stat-bar::after { content:''; position:absolute; left:0;top:0;bottom:0; width:var(--pct,0%); background:linear-gradient(90deg,var(--ryou-gold),var(--ryou-gold-lt)); border-radius:6px; transition:width .4s; }
.ryou-ninja-stat-label { width:30px; font-weight:700; font-size:14px; font-family:'Amaranth',sans-serif; color:#4a3820; }
.ryou-ninja-stat-val { width:35px; text-align:right; font-weight:700; font-size:14px; color:#222; text-shadow: 0 0 4px rgba(255,255,255,0.9); }
.ryou-ninja-pd-summary { display:flex; gap:1.5rem; flex-wrap:wrap; background:rgba(0,0,0,.06); padding:.6rem; border-radius:4px; font-size:14px; font-family:'Amaranth',sans-serif; }
.ryou-ninja-misiones { margin-top:1rem; }
.ryou-ninja-misiones h4 { font-family:'Amaranth',sans-serif; font-size:14px; font-weight:700; color:#4a3820; margin-bottom:.5rem; }
.ryou-ninja-mis-grid { display:flex; gap:.5rem; flex-wrap:wrap; }
.ryou-ninja-mis { background:rgba(0,0,0,.07); border-radius:4px; padding:.4rem .7rem; display:flex; align-items:center; gap:.4rem; font-size:14px; font-family:'Amaranth',sans-serif; }
.ryou-ninja-mis-rank { font-family:'Cinzel',serif; font-weight:700; color:var(--ryou-gold); text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }

/* Inventory in equipo tab */
.ryou-ninja-inv-list { display:flex; flex-direction:column; gap:.4rem; }
.ryou-ninja-inv-item { display:flex; align-items:center; gap:.6rem; background:rgba(0,0,0,.05); border-radius:4px; padding:.4rem .7rem; font-size:14px; font-family:'Amaranth',sans-serif; }
.ryou-ninja-inv-item img { width:30px; height:30px; object-fit:contain; }
.ryou-ninja-inv-qty { margin-left:auto; font-weight:700; color:var(--ryou-gold); }

/* Economy tab */
.ryou-ninja-economy { display:flex; flex-wrap:wrap; gap:.8rem; }
.ryou-ninja-balance-item { display:flex; align-items:center; gap:.4rem; background:rgba(255,250,230,.9); border:1px solid var(--ryou-gold); border-radius:8px; padding:.5rem 1rem; }
.ryou-ninja-balance-name { color:#4a3820; font-size:14px; font-family:'Amaranth',sans-serif; font-weight:700; }
.ryou-ninja-balance-amount { font-family:'Amaranth',sans-serif; font-weight:700; color:#8a6000; font-size:14px; }

/* Lore */
.ryou-ninja-lore { margin-bottom:1rem; }
.ryou-ninja-lore h4 { font-family:'Amaranth',sans-serif; font-size:14px; font-weight:700; color:#4a3820; margin-bottom:.4rem; }
.ryou-ninja-lore-text { background:rgba(0,0,0,.05); border-radius:4px; padding:.7rem; font-family:'Amaranth',sans-serif; font-size:14px; line-height:1.6; max-height:300px; overflow-y:auto; }

/* Logros */
.ryou-ninja-logros { background:rgba(0,0,0,.05); border-radius:4px; padding:.6rem .8rem; font-size:.88rem; white-space:pre-line; max-height:200px; overflow-y:auto; }

/* ── DIRECTORY ────────────────────────────────────────────────────────────── */
.ryou-ninja-dir-filters { display:flex; gap:.6rem; flex-wrap:wrap; margin-bottom:1.2rem; align-items:center; }
.ryou-ninja-dir-filters select { background:var(--ryou-parch-lt); border:1px solid var(--ryou-border); border-radius:4px; padding:.4rem .7rem; font-size:.88rem; color:var(--ryou-text-dark); }
.ryou-ninja-dir-aldea-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 1.2rem;
    justify-content: center;
}
.ryou-ninja-dir-aldea-title > span.ryou-scroll-ornament {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c8a94a);
}
.ryou-ninja-dir-aldea-title > span.ryou-scroll-ornament.right {
    background: linear-gradient(90deg, #c8a94a, transparent);
}
/* Aldea name text */
.ryou-aldea-brush-text {
    background-image: url('https://narutohabborpg.com/wp-content/uploads/2025/05/brush_transp.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%;
    padding: .6rem 3.5rem;
    white-space: nowrap;
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .1em;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
    display: inline-block;
    min-width: 160px;
    text-align: center;
}
.ryou-ninja-dir-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:.8rem; }
.ryou-ninja-dir-card {
    background: var(--ryou-parch-lt);
    border: 1px solid var(--ryou-parch-dk);
    border-top: 3px solid transparent;
    border-radius: var(--ryou-radius);
    overflow: hidden;
    text-align: center;
    transition: transform .18s, box-shadow .18s, border-top-color .18s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.ryou-ninja-dir-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,.2);
    border-top-color: #c8a94a;
}
.ryou-ninja-dir-card-img { height:140px; background:var(--ryou-bg2); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.ryou-ninja-dir-card-img img { width:100%; height:100%; object-fit:cover; }
.ryou-ninja-dir-card-placeholder { font-size:3rem; }
.ryou-ninja-dir-card-body { padding:.7rem; font-family:'Amaranth',sans-serif; font-size:14px; word-break:break-word; }
.ryou-ninja-dir-card-body h4 { font-family:'Amaranth',sans-serif; font-size:14px; font-weight:700; color:var(--ryou-text-dark); margin:0 0 .3rem; word-break:break-word; white-space:normal; overflow-wrap:break-word; }
.ryou-ninja-dir-card-body .ryou-btn { margin-top:.5rem; width:100%; }

/* Modal */
.ryou-modal { position:fixed; inset:0; background:rgba(0,0,0,.7); z-index:10000; display:flex; align-items:center; justify-content:center; overflow-y:auto; padding:1rem; }
.ryou-modal-inner { background:var(--ryou-scroll-bg); border:2px solid var(--ryou-border); border-radius:var(--ryou-radius); padding:1.4rem; max-width:500px; width:100%; position:relative; box-shadow:var(--ryou-shadow); }
.ryou-modal-inner--large { max-width:900px; max-height:90vh; overflow-y:auto; }
.ryou-modal-close { position:sticky; top:0; float:right; background:var(--ryou-red); color:#fff; border:none; border-radius:50%; width:28px; height:28px; cursor:pointer; font-size:1rem; line-height:1; z-index:1; }

@media (max-width:640px) {
    .ryou-ninja-card-header { flex-direction:column; }
    .ryou-ninja-data-grid { grid-template-columns:1fr; }
    .ryou-nf-stats-grid { grid-template-columns:1fr 1fr; }
    .ryou-ninja-dir-cards { grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); }
}

/* ── NINJA SAVE BUTTON ───────────────────────────────────────────────────── */
.ryou-btn--ninja-save {
    background: var(--ryou-gold) !important;
    color: var(--ryou-bg2) !important;
    font-family: 'Amaranth', sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    padding: .7rem 2rem !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    width: 100% !important;
    text-align: center !important;
    margin-top: .5rem !important;
}
.ryou-btn--ninja-save:hover { filter: brightness(1.1) !important; }

/* Force Amaranth 16px on all ninja form text */
.ryou-ninja-form *,
.ryou-ninja-section *,
.ryou-ninja-form label,
.ryou-ninja-form input,
.ryou-ninja-form select,
.ryou-ninja-form textarea,
.ryou-ninja-form p,
.ryou-ninja-form span {
    font-family: 'Amaranth', sans-serif !important;
    font-size: 16px !important;
}
.ryou-ninja-section-title,
.ryou-ninja-page-title {
    font-family: 'Cinzel', serif !important;
}
/* Keep notice text smaller */
.ryou-ninja-notice--warn,
.ryou-field-note,
small { font-size: 13px !important; }

/* ── Hexagon stat chart ─────────────────────────────────────────────────────── */
.ryou-ninja-hexagon-wrap {
    display: flex;
    justify-content: center;
    padding: .5rem 0;
}

/* ── API SELECTOR (Jutsus / Entrenamientos) ──────────────────────────────── */
.ryou-api-selector { font-family: 'Amaranth', sans-serif; }
.ryou-api-search-wrap { position: relative; margin-bottom: .6rem; }
.ryou-api-search-input {
    width: 100%; padding: .45rem .8rem;
    border: 1.5px solid var(--ryou-border, #c8a96e);
    border-radius: 6px; font-family: 'Amaranth', sans-serif; font-size: 14px;
    background: rgba(255,255,255,.8); box-sizing: border-box;
}
.ryou-api-search-input:focus { outline: none; border-color: var(--ryou-gold, #c9a84c); }
.ryou-api-results {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
    background: #fff; border: 1px solid #ddd; border-top: none;
    border-radius: 0 0 6px 6px; max-height: 240px; overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.ryou-api-result-item {
    padding: .4rem .8rem; cursor: pointer; display: flex; align-items: center;
    gap: .5rem; font-size: 13px; border-bottom: 1px solid #f0f0f0;
    transition: background .1s;
}
.ryou-api-result-item:hover { background: #f9f0e0; }
.ryou-api-result-item:last-child { border-bottom: none; }
.ryou-api-result-id   { font-weight: 700; color: #8b1a1a; font-size: 12px; min-width: 45px; }
.ryou-api-result-name { flex: 1; color: #1a1208; }
.ryou-api-result-meta { font-size: 11px; color: #999; }
.ryou-api-loading     { padding: .5rem .8rem; font-size: 13px; color: #888; }

.ryou-api-selected-list {
    display: flex; flex-direction: column; gap: 2px;
    max-height: 300px; overflow-y: auto;
    border: 1px solid rgba(0,0,0,.08); border-radius: 6px;
    padding: .3rem; background: rgba(255,255,255,.5);
}
.ryou-api-item {
    display: flex; align-items: center; gap: .5rem;
    background: #fff; border: 1px solid rgba(0,0,0,.07);
    border-radius: 4px; padding: .3rem .6rem;
    border-left: 3px solid var(--ryou-gold, #c9a84c);
}
.ryou-api-item-id   { font-weight: 700; color: #8b1a1a; font-size: 12px; min-width: 50px; }
.ryou-api-item-name { flex: 1; font-size: 13px; color: #1a1208; }
.ryou-api-item-remove {
    background: none; border: none; cursor: pointer; color: #ccc;
    font-size: 14px; padding: 0 .2rem; line-height: 1;
    transition: color .15s;
}
.ryou-api-item-remove:hover { color: #c00; }
.ryou-api-empty { font-size: 13px; color: #aaa; padding: .4rem .6rem; margin: 0; }

/* ── PUBLIC JUTSU LIST ───────────────────────────────────────────────────── */
.ryou-jutsu-list { display: flex; flex-direction: column; gap: 2px; }
.ryou-jutsu-row {
    display: flex; align-items: center; gap: .6rem;
    padding: .3rem .6rem; border-radius: 4px;
    border-left: 3px solid var(--ryou-gold, #c9a84c);
    background: rgba(255,255,255,.5); font-size: 13px;
}
.ryou-jutsu-id   { font-weight: 700; color: #8b1a1a; min-width: 55px; }
.ryou-jutsu-nombre { color: #1a1208; }

/* ── Inventory item with mejoras ────────────────────────────────────────── */
.ryou-ninja-inv-mejorado {
    border-color: rgba(200,169,74,.4) !important;
    background: rgba(200,169,74,.05) !important;
}
.ryou-ninja-mejora-badge {
    display: inline-block;
    background: #c8a94a; color: #1a0a0a;
    font-size: 11px; font-weight: 700;
    padding: 1px 5px; border-radius: 3px;
    margin-left: .4rem; vertical-align: middle;
}
.ryou-ninja-mejoras-list {
    display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem;
}
.ryou-ninja-mejora-efecto {
    font-size: 11px;
    background: rgba(200,169,74,.1);
    border: 1px solid rgba(200,169,74,.3);
    color: #c8a94a;
    padding: 1px 6px; border-radius: 3px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   EQUIPAMIENTO NINJA — RPG Panel
   ══════════════════════════════════════════════════════════════════════════════ */
.ryou-equip-panel, .ryou-equip-public {
    display: flex; flex-direction: column; gap: .8rem;
}
.ryou-equip-loading { color: var(--ryou-muted); font-style: italic; padding: 1rem 0; }
.ryou-equip-slot {
    display: flex; align-items: flex-start; gap: 1rem;
    background: rgba(0,0,0,.15); border: 1px solid var(--ryou-border);
    border-radius: 8px; padding: .7rem; transition: border-color .2s;
}
.ryou-equip-slot:hover { border-color: rgba(200,169,74,.3); }
.ryou-equip-slot-img {
    width: 64px; height: 64px; object-fit: contain; flex-shrink: 0;
    border-radius: 6px; border: 1px solid var(--ryou-border);
    background: rgba(0,0,0,.2);
}
.ryou-equip-slot-body { flex: 1; min-width: 0; }
.ryou-equip-slot-title {
    font-family: 'Cinzel', serif; font-size: 12px; color: var(--ryou-gold);
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem;
    text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 8px rgba(0,0,0,.7);
}
.ryou-equip-ranura-badge {
    display: inline-block; font-size: 11px; padding: 1px 6px;
    border-radius: 10px; margin-left: .4rem;
    background: rgba(200,169,74,.15); color: var(--ryou-gold);
    border: 1px solid rgba(200,169,74,.3);
    text-shadow: 0 1px 3px rgba(0,0,0,.9);
}
.ryou-equip-items { display: flex; flex-wrap: wrap; gap: .4rem; }
.ryou-equip-item {
    display: flex; align-items: center; gap: .35rem;
    background: rgba(255,255,255,.05); border: 1px solid var(--ryou-border);
    border-radius: 6px; padding: .25rem .5rem; font-size: 13px;
}
.ryou-equip-item img { width: 24px; height: 24px; object-fit: contain; border-radius: 3px; }
.ryou-equip-item--ranura { border-color: rgba(200,169,74,.4); background: rgba(200,169,74,.06); }
.ryou-equip-item-name { color: var(--ryou-text); }
.ryou-equip-btn-rm {
    background: none; border: none; color: #c05050; cursor: pointer;
    font-size: 14px; padding: 0 2px; line-height: 1;
}
.ryou-equip-btn-rm:hover { color: #ff6060; }
.ryou-equip-empty { color: var(--ryou-muted); font-size: 13px; font-style: italic; }
.ryou-equip-add-row { display: flex; gap: .4rem; align-items: center; margin-top: .4rem; flex-wrap: wrap; }
.ryou-equip-select {
    background: rgba(0,0,0,.3); border: 1px solid var(--ryou-border);
    color: var(--ryou-text); padding: .25rem .5rem; border-radius: 5px;
    font-size: 13px; flex: 1; min-width: 120px;
}
.ryou-equip-btn-add {
    background: rgba(200,169,74,.85); border: 1px solid rgba(160,130,40,.8);
    color: #2a1f05; font-weight: 700; padding: .25rem .7rem; border-radius: 5px;
    font-size: 13px; cursor: pointer; transition: background .15s;
}
.ryou-equip-btn-add:hover { background: rgba(200,169,74,1); }
/* Inventory item equipped badge */
.ryou-inv-equipped-badge {
    display: inline-block; font-size: 10px; background: rgba(200,169,74,.2);
    color: var(--ryou-gold); border: 1px solid rgba(200,169,74,.3);
    border-radius: 3px; padding: 1px 4px; margin-left: 3px;
}

/* ── Text shadow — only on gold text that appears over dark/image backgrounds ─ */
.ryou-equip-slot-title,
.ryou-equip-ranura-badge,
.ryou-badge--warn,
.ryou-btn--request {
    text-shadow: 0 1px 2px rgba(0,0,0,.9);
}

.ryou-equip-ranura-badge--libre {
    background: rgba(50,180,80,.15) !important;
    color: #4caf50 !important;
    border-color: rgba(50,180,80,.4) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.9);
}
.ryou-equip-ranura-badge--ocupada {
    background: rgba(200,50,50,.15) !important;
    color: #e05050 !important;
    border-color: rgba(200,50,50,.4) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.9);
}

.ryou-bitacora-link {
    color: var(--ryou-gold) !important;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px dashed rgba(200,169,74,.4);
    transition: border-color .15s;
}
.ryou-bitacora-link:hover { border-color: var(--ryou-gold); }

/* ── Puntos de Esfuerzo y Victoria ──────────────────────────────────────── */
.ryou-puntos-card {
    display: flex; align-items: center; gap: .8rem;
    background: rgba(0,0,0,.15); border: 1px solid var(--ryou-border);
    border-radius: 8px; padding: .7rem 1rem; min-width: 180px;
}
.ryou-puntos-icon { width: 40px; height: 40px; object-fit: contain; }
.ryou-puntos-label { font-size: 12px; color: var(--ryou-muted); margin-bottom: .15rem; }
.ryou-puntos-value {
    font-family: 'Cinzel', serif; font-size: 22px;
    color: var(--ryou-gold); font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,.9);
}

/* ══════════════════════════════════════════════════════════════════════════════
   PANEL PUNTOS DE DESTREZA
   ══════════════════════════════════════════════════════════════════════════════ */
/* Field that must always occupy full width (e.g. Nivel before PD panel) */
.ryou-nf-field--fullwidth { display:block; width:100%; clear:both; }

.ryou-pd-panel { display:flex; flex-direction:column; gap:.8rem; }
.ryou-pd-block-title {
    font-family:'Cinzel',serif; font-size:12px; color:var(--ryou-gold);
    text-transform:uppercase; letter-spacing:.06em;
    margin-bottom:.6rem; text-shadow:0 1px 2px rgba(0,0,0,.9);
}
.ryou-pd-info-block, .ryou-pd-dist-block, .ryou-pd-registro-block, .ryou-pd-hist-block {
    background:rgba(0,0,0,.12); border:1px solid var(--ryou-border);
    border-radius:8px; padding:.7rem;
}
.ryou-pd-info-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.ryou-pd-info-card {
    background:rgba(0,0,0,.15); border-radius:6px; padding:.5rem .4rem; text-align:center;
}
.ryou-pd-info-label { font-size:11px; color:var(--ryou-muted); margin-bottom:3px; }
.ryou-pd-info-value { font-family:'Cinzel',serif; font-size:18px; font-weight:700; color:var(--ryou-text); text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
.ryou-pd-info-sub { font-size:10px; color:var(--ryou-muted); margin-top:2px; }
.ryou-pd-positive { color:#4caf50 !important; text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important; }
.ryou-pd-negative { color:#e05050 !important; text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important; }
.ryou-pd-available { color:var(--ryou-gold) !important; text-shadow:-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 !important; }

.ryou-pd-restantes-bar {
    display:flex; justify-content:space-between; align-items:center;
    background:rgba(0,0,0,.15); border-radius:6px; padding:.4rem .7rem;
    margin-bottom:.5rem; font-size:13px; color:var(--ryou-muted);
}
.ryou-pd-restantes-val { font-family:'Cinzel',serif; font-size:16px; font-weight:700; color:var(--ryou-gold); }
.ryou-pd-restantes-val.ryou-pd-negative { color:#e05050 !important; }

.ryou-pd-warning {
    background:rgba(255,255,255,.92); border:1px solid rgba(200,50,50,.4);
    border-radius:6px; padding:.4rem .6rem; font-size:12px;
    color:#c0392b; margin-bottom:.5rem;
}

.ryou-pd-stat-row {
    display:grid; grid-template-columns:90px 80px 50px 60px;
    align-items:center; gap:8px; padding:4px 0;
    border-bottom:1px solid rgba(255,255,255,.05);
}
.ryou-pd-stat-row:last-of-type { border-bottom:none; }
.ryou-pd-stat-label { font-size:13px; color:var(--ryou-text); }
.ryou-pd-stat-input {
    background:rgba(0,0,0,.2); border:1px solid var(--ryou-border);
    color:var(--ryou-text); padding:.2rem .4rem; border-radius:4px;
    font-size:13px; text-align:center; width:100%;
}
.ryou-pd-stat-hint { font-size:11px; color:var(--ryou-muted); text-align:right; }
.ryou-pd-stat-total { font-size:13px; font-weight:700; text-align:right; color:var(--ryou-text); }
.ryou-pd-over { color:#e05050 !important; }
.ryou-pd-reset-btn { margin-top:.6rem; }

.ryou-pd-registro-form { display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; }
.ryou-pd-registro-form select,
.ryou-pd-registro-form input {
    background:rgba(0,0,0,.2); border:1px solid var(--ryou-border);
    color:var(--ryou-text); padding:.25rem .5rem; border-radius:5px; font-size:13px;
}
.ryou-pd-registro-form input[type=text] { flex:1; min-width:150px; }
.ryou-pd-registro-form input[type=number] { width:70px; text-align:center; }

.ryou-pd-hist-row {
    display:flex; justify-content:space-between; align-items:center;
    padding:4px 0; border-bottom:1px solid rgba(255,255,255,.05); font-size:12px;
    color:var(--ryou-text);
}
.ryou-pd-hist-row:last-child { border-bottom:none; }
.ryou-pd-hist-date { color:var(--ryou-muted); font-size:11px; flex-shrink:0; margin-left:.5rem; }

/* ── PD public summary ─────────────────────────────────────────────────────── */
.ryou-pd-pub-summary {
    display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-bottom:.5rem;
}
.ryou-pd-pub-card {
    background:rgba(0,0,0,.12); border:1px solid var(--ryou-border);
    border-radius:6px; padding:.5rem .4rem; text-align:center;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CONTENEDORES — Panel de mochila RPG
   ══════════════════════════════════════════════════════════════════════════════ */
.ryou-cont-panel { margin-top: 1.4rem; }

.ryou-cont-header, .ryou-cont-subheader {
    font-family: 'Cinzel', serif; font-size: .95rem; font-weight: 700;
    color: var(--ryou-gold); text-transform: uppercase; letter-spacing: .06em;
    margin: 0 0 .8rem; padding-bottom: .4rem;
    border-bottom: 1px solid var(--ryou-border);
    text-shadow: -1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000;
}
.ryou-cont-subheader { font-size: .8rem; margin-top: 1.2rem; color: var(--ryou-muted); }

/* Card de contenedor */
.ryou-cont-card {
    background: var(--ryou-parch-dk);
    border: 1px solid var(--ryou-border);
    border-radius: var(--ryou-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}
.ryou-cont-card-header {
    display: flex; align-items: center; gap: .8rem;
    padding: .7rem 1rem;
    background: rgba(0,0,0,.15);
    border-bottom: 1px solid var(--ryou-border);
}
.ryou-cont-img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; }
.ryou-cont-card-info { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ryou-cont-name { font-family: 'Cinzel', serif; font-size: .9rem; color: var(--ryou-gold); }
.ryou-cont-slot-badge {
    font-size: .7rem; background: var(--ryou-gold); color: #1a0a00;
    padding: .1rem .4rem; border-radius: 3px; font-weight: 700; text-transform: capitalize;
}
.ryou-cont-mejora-tag {
    font-size: .68rem; background: rgba(255,255,255,.1); color: var(--ryou-muted);
    padding: .1rem .35rem; border-radius: 3px; border: 1px solid var(--ryou-border);
}
.ryou-cont-mejora-tag--slot { color: #7cf; border-color: #7cf; }

.ryou-cont-btn-desequipar {
    margin-left: auto; font-size: .75rem;
    background: transparent; border: 1px solid var(--ryou-border);
    color: var(--ryou-muted); border-radius: 4px; padding: .25rem .6rem;
    cursor: pointer; transition: all .2s; flex-shrink: 0;
}
.ryou-cont-btn-desequipar:hover { background: rgba(220,60,60,.2); border-color: #c55; color: #faa; }

/* Slots internos */
.ryou-cont-slots { padding: .7rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.ryou-cont-slot {
    border: 1px solid var(--ryou-border); border-radius: 5px;
    background: rgba(0,0,0,.12); overflow: hidden;
}
.ryou-cont-slot--extra { border-style: dashed; border-color: #7cf; }
.ryou-cont-slot-header {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .35rem .7rem; background: rgba(0,0,0,.1);
    font-size: .72rem; border-bottom: 1px solid var(--ryou-border);
}
.ryou-cont-slot-num  { font-weight: 700; color: var(--ryou-gold); }
.ryou-cont-slot-num em { font-style: normal; color: #7cf; font-size: .65rem; }
.ryou-cont-slot-tam  { color: var(--ryou-muted); }
.ryou-cont-slot-cap  { margin-left: auto; color: var(--ryou-muted); }

.ryou-cont-slot-items {
    padding: .4rem .7rem; display: flex; flex-wrap: wrap; gap: .4rem; min-height: 34px;
}
.ryou-cont-item {
    display: flex; align-items: center; gap: .35rem;
    background: rgba(255,255,255,.06); border: 1px solid var(--ryou-border);
    border-radius: 4px; padding: .2rem .5rem; font-size: .8rem;
}
.ryou-cont-item img { width: 22px; height: 22px; object-fit: contain; border-radius: 3px; }
.ryou-cont-item-name { color: var(--ryou-text-dark); }
.ryou-cont-item-tam  { color: var(--ryou-muted); font-size: .7rem; }
.ryou-cont-rm-item {
    background: transparent; border: none; color: var(--ryou-muted);
    cursor: pointer; font-size: .8rem; padding: 0 .2rem; line-height: 1;
}
.ryou-cont-rm-item:hover { color: #f77; }

/* Add item row */
.ryou-cont-add-row {
    display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
    padding: .4rem .7rem; background: rgba(0,0,0,.08);
    border-top: 1px solid var(--ryou-border);
}
.ryou-cont-add-row select { flex: 2; min-width: 160px; }
.ryou-cont-add-row input  { width: 55px; }
.ryou-cont-add-item {
    font-size: .75rem; padding: .25rem .6rem;
    background: var(--ryou-gold); color: #1a0a00;
    border: none; border-radius: 4px; cursor: pointer; font-weight: 700;
    transition: opacity .2s;
}
.ryou-cont-add-item:hover { opacity: .85; }

/* Equip new container row */
.ryou-cont-equip-new { margin-top: .8rem; }
.ryou-cont-equip-new-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ryou-cont-equip-new-row select { flex: 2; min-width: 180px; }
.ryou-cont-equip-btn {
    padding: .3rem .8rem; background: var(--ryou-gold); color: #1a0a00;
    border: none; border-radius: 4px; cursor: pointer; font-weight: 700;
    font-size: .8rem; transition: opacity .2s;
}
.ryou-cont-equip-btn:hover { opacity: .85; }

/* Slot type locked (already has an item type assigned) */
.ryou-cont-slot-type-locked {
    font-size: .78rem; color: var(--ryou-gold);
    font-weight: 700; padding: .2rem .4rem;
    background: rgba(0,0,0,.15); border-radius: 4px;
    flex: 2;
}

/* ── Custom container dropdown selector ──────────────────────────────────── */
.ryou-cont-new-sel-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}
.ryou-cont-new-sel-btn {
    display: flex; align-items: center; gap: .5rem;
    padding: .4rem .7rem;
    background: var(--ryou-input-bg, #f5f0e8);
    border: 1px solid var(--ryou-border, #c8b87a);
    border-radius: 4px;
    cursor: pointer; user-select: none;
    font-family: 'Amaranth', sans-serif; font-size: 13px;
    color: var(--ryou-text, #3a2a10);
    min-height: 34px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ryou-cont-new-sel-btn:hover {
    border-color: var(--ryou-gold, #c8a94a);
    background: #ede8d8;
}
.ryou-cont-new-sel-dropdown {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 999;
    background: #f5f0e8;
    border: 1px solid var(--ryou-gold, #c8a94a);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 220px; overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    scrollbar-width: thin;
}
.ryou-cont-new-sel-dropdown.open { display: block; }
.ryou-cont-dd-item {
    display: flex; align-items: center; gap: .5rem;
    padding: .45rem .7rem; cursor: pointer;
    border-bottom: 1px solid rgba(200,169,74,.15);
    transition: background .1s;
}
.ryou-cont-dd-item:last-child { border-bottom: none; }
.ryou-cont-dd-item:hover { background: rgba(200,169,74,.15); }
.ryou-cont-dd-img {
    width: 28px; height: 28px; object-fit: contain; flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}
.ryou-cont-dd-noimg {
    width: 28px; height: 28px; display: flex; align-items: center;
    justify-content: center; font-size: 1.1rem; flex-shrink: 0;
}
.ryou-cont-dd-info {
    display: flex; flex-direction: column; gap: .1rem; min-width: 0;
}
.ryou-cont-dd-name {
    font-family: 'Amaranth', sans-serif; font-size: 13px;
    color: #3a2a10; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ryou-cont-dd-mej {
    font-family: 'Amaranth', sans-serif; font-size: 11px;
    color: #8a6a1a; font-weight: 700;
}
.ryou-cont-dd-empty {
    padding: .6rem .7rem;
    font-family: 'Amaranth', sans-serif; font-size: 12px; color: #888;
    font-style: italic;
}
