/* CharacterCore v1.0.0 — NEXTGEN Character Foundation */
.charactercore-page,
.charactercore-admin{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    gap:18px;
}

.charactercore-module-nav{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin:0 0 16px 0;
    padding:12px;
    border:1px solid rgba(198,124,55,.28);
    border-radius:16px;
    background:linear-gradient(180deg, rgba(34,25,19,.92), rgba(16,14,13,.94));
}

.charactercore-module-nav a,
.charactercore-page .button,
.charactercore-admin .button,
.charactercore-widget .button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-height:36px;
    padding:8px 12px;
    border-radius:12px;
    border:1px solid rgba(198,124,55,.38);
    background:linear-gradient(180deg, rgba(75,46,28,.96), rgba(34,23,18,.98));
    color:#f5d2a0 !important;
    text-decoration:none !important;
    font-weight:700;
    box-shadow:0 10px 24px rgba(0,0,0,.24);
}

.charactercore-module-nav a:hover,
.charactercore-page .button:hover,
.charactercore-admin .button:hover,
.charactercore-widget .button:hover{
    border-color:rgba(255,168,76,.72);
    color:#ffe0ad !important;
    transform:translateY(-1px);
}

.charactercore-hero{
    display:flex;
    align-items:center;
    gap:18px;
    padding:22px;
    overflow:hidden;
    border:1px solid rgba(198,124,55,.32);
    border-radius:20px;
    background:
        radial-gradient(circle at 12% 12%, rgba(255,143,42,.20), transparent 32%),
        linear-gradient(135deg, rgba(35,25,20,.98), rgba(14,14,15,.98));
}

.charactercore-hero-icon{
    width:72px;
    height:72px;
    border-radius:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:38px;
    background:rgba(255,143,42,.12);
    border:1px solid rgba(255,168,76,.35);
    box-shadow:inset 0 0 35px rgba(255,143,42,.08), 0 16px 35px rgba(0,0,0,.30);
}

.charactercore-hero-main{ flex:1; min-width:0; }
.charactercore-eyebrow{
    text-transform:uppercase;
    letter-spacing:.12em;
    color:#d99b55;
    font-size:12px;
    font-weight:800;
    margin-bottom:4px;
}
.charactercore-hero h1{ margin:0; color:#ffe0ad; font-size:30px; line-height:1.1; }
.charactercore-hero p{ margin:6px 0 0; color:#cdb9a0; }
.charactercore-hero-badges,
.charactercore-mini-stats,
.charactercore-status-grid,
.charactercore-admin-stats{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:14px;
}
.charactercore-hero-badges span,
.charactercore-mini-stats span,
.charactercore-status-grid span{
    padding:7px 10px;
    border-radius:999px;
    border:1px solid rgba(198,124,55,.25);
    background:rgba(0,0,0,.22);
    color:#f0d7b4;
}
.charactercore-hero-actions{ display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }

.charactercore-grid{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(260px, 360px);
    gap:18px;
    align-items:start;
    min-width:0;
}
.charactercore-side{ display:flex; flex-direction:column; gap:18px; min-width:0; }
.charactercore-card,
.charactercore-widget,
.charactercore-profile-card{
    border:1px solid rgba(198,124,55,.26);
    border-radius:18px;
    background:linear-gradient(180deg, rgba(27,24,22,.96), rgba(14,14,15,.96));
    box-shadow:0 16px 35px rgba(0,0,0,.28);
    padding:18px;
    color:#ead7bd;
}
.charactercore-card h2,
.charactercore-card h3,
.charactercore-widget h3,
.charactercore-profile-card h3{ color:#ffd99d; margin-top:0; }

.charactercore-form{ display:flex; flex-direction:column; gap:16px; }
.charactercore-form-grid,
.charactercore-stat-edit-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}
.charactercore-form label{ display:flex; flex-direction:column; gap:6px; color:#d9c2a5; font-weight:700; }
.charactercore-form input,
.charactercore-form textarea,
.charactercore-form select{
    width:100%;
    box-sizing:border-box;
    border-radius:12px;
    border:1px solid rgba(198,124,55,.28);
    background:rgba(8,8,9,.66);
    color:#f4dfc1;
    padding:10px 12px;
    outline:none;
}
.charactercore-form input:focus,
.charactercore-form textarea:focus{
    border-color:rgba(255,168,76,.70);
    box-shadow:0 0 0 3px rgba(255,143,42,.10);
}
.charactercore-save{ align-self:flex-start; }

.charactercore-equipment-list,
.charactercore-equipment-mini{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.charactercore-equipment-item,
.charactercore-equipment-mini span{
    display:flex;
    gap:10px;
    align-items:center;
    padding:10px;
    border-radius:14px;
    border:1px solid rgba(198,124,55,.22);
    background:rgba(0,0,0,.18);
}
.charactercore-equipment-item small{ display:block; color:#bda88d; margin-top:2px; }
.charactercore-muted{ color:#bda88d; }
.charactercore-success{ border-color:rgba(94,192,120,.35); color:#c8ffd2; }
.charactercore-error{ border-color:rgba(220,85,65,.40); color:#ffd0c8; }

.charactercore-card-head{ display:flex; gap:12px; align-items:center; margin-bottom:12px; }
.charactercore-card-icon{
    width:44px;
    height:44px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,143,42,.12);
    border:1px solid rgba(255,168,76,.28);
    font-size:22px;
}
.charactercore-card-head h3{ margin:0; }
.charactercore-card-head p{ margin:2px 0 0; color:#bea78c; }

.charactercore-admin-stats{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.charactercore-admin-stats .panel{ padding:16px; }
.charactercore-admin-stats span{ display:block; color:#bea78c; font-size:13px; }
.charactercore-admin-stats strong{ display:block; color:#ffe0ad; font-size:28px; margin-top:4px; }
.charactercore-table{ width:100%; border-collapse:separate; border-spacing:0 8px; }
.charactercore-table th{ text-align:left; color:#d99b55; font-size:13px; }
.charactercore-table td{ background:rgba(0,0,0,.20); padding:10px; border-top:1px solid rgba(198,124,55,.18); border-bottom:1px solid rgba(198,124,55,.18); }
.charactercore-checklist{ line-height:1.9; color:#ead7bd; }

@media (max-width: 980px){
    .charactercore-grid{ grid-template-columns:1fr; }
    .charactercore-hero{ align-items:flex-start; flex-direction:column; }
    .charactercore-hero-actions{ justify-content:flex-start; }
    .charactercore-admin-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px){
    .charactercore-form-grid,
    .charactercore-stat-edit-grid,
    .charactercore-admin-stats{ grid-template-columns:1fr; }
}


/* CharacterCore v1.0.1 — Live Stabilization containment/runtime pills */
.charactercore-page,
.charactercore-admin,
.charactercore-card,
.charactercore-widget,
.charactercore-profile-card{
    min-width:0;
    box-sizing:border-box;
}
.charactercore-page *,
.charactercore-admin *{
    box-sizing:border-box;
}
.charactercore-runtime-grid{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}
.charactercore-runtime-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 10px;
    border-radius:999px;
    border:1px solid rgba(198,124,55,.24);
    background:rgba(0,0,0,.22);
    color:#ecd3ad;
    font-weight:700;
}
.charactercore-runtime-pill.is-ok{
    border-color:rgba(83,190,118,.32);
}
.charactercore-runtime-pill.is-missing{
    border-color:rgba(220,160,65,.32);
    color:#ffdca8;
}
.charactercore-form textarea{
    resize:vertical;
}
.charactercore-table{
    display:block;
    overflow-x:auto;
}


/* CharacterCore v1.0.2 — Bronze Shell + Forum-style Hero Tabs */
.charactercore-page.charactercore-shell,
.charactercore-admin.charactercore-shell{
    position:relative;
    width:100%;
    max-width:100%;
    min-width:0;
    padding:28px;
    border:1px solid rgba(198,124,55,.34);
    border-radius:26px;
    background:
        radial-gradient(ellipse at 10% 8%, rgba(255,132,37,.16), transparent 34%),
        radial-gradient(ellipse at 80% 92%, rgba(159,83,28,.10), transparent 42%),
        linear-gradient(135deg, rgba(34,24,17,.86), rgba(8,8,8,.96) 48%, rgba(31,18,11,.78));
    box-shadow:0 26px 55px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,187,104,.06);
    overflow:visible;
}

.charactercore-hero-tabs{
    position:relative;
    z-index:4;
    display:flex;
    flex-wrap:wrap;
    align-items:flex-end;
    gap:8px;
    margin:0 0 -1px 26px;
    padding:0;
}

.charactercore-hero-tab{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-height:58px;
    padding:0 28px;
    border:1px solid rgba(198,124,55,.48);
    border-bottom-color:rgba(198,124,55,.40);
    border-radius:16px 16px 0 0;
    background:linear-gradient(180deg, rgba(35,25,17,.96), rgba(9,9,9,.98));
    color:#f5d2a0 !important;
    text-decoration:none !important;
    font-weight:900;
    font-size:16px;
    letter-spacing:.01em;
    box-shadow:0 -8px 22px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,189,96,.06);
    white-space:nowrap;
    transition:border-color .16s ease, color .16s ease, transform .16s ease;
}

.charactercore-hero-tab:hover{
    color:#ffe5b8 !important;
    border-color:rgba(255,168,76,.72);
    transform:translateY(-1px);
}

.charactercore-hero-tab.is-active{
    background:
        radial-gradient(circle at 18% 8%, rgba(255,143,42,.18), transparent 42%),
        linear-gradient(180deg, rgba(70,42,22,.95), rgba(24,17,13,.98));
    color:#ffe2ae !important;
    border-color:rgba(211,135,58,.70);
    border-bottom-color:rgba(31,22,16,.98);
    z-index:5;
}

.charactercore-hero-tab.is-active::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:-2px;
    height:3px;
    background:linear-gradient(90deg, rgba(42,28,18,.98), rgba(28,21,16,.98));
    pointer-events:none;
}

.charactercore-tab-icon{
    display:inline-flex;
    line-height:1;
    filter:drop-shadow(0 0 8px rgba(255,150,53,.14));
}

.charactercore-page .charactercore-hero,
.charactercore-admin .charactercore-hero{
    position:relative;
    z-index:2;
    padding:30px;
    margin:0;
    border-radius:22px;
    border-color:rgba(198,124,55,.46);
    background:
        radial-gradient(ellipse at 11% 18%, rgba(255,138,37,.22), transparent 34%),
        linear-gradient(135deg, rgba(54,34,21,.98), rgba(12,12,13,.98) 60%, rgba(18,13,10,.98));
    box-shadow:inset 0 1px 0 rgba(255,180,88,.07), 0 18px 42px rgba(0,0,0,.32);
}

.charactercore-page .charactercore-hero h1,
.charactercore-admin .charactercore-hero h1{
    font-size:clamp(32px, 3vw, 48px);
    line-height:1.05;
    margin:0;
    letter-spacing:-.02em;
}

.charactercore-page .charactercore-hero p,
.charactercore-admin .charactercore-hero p{
    max-width:780px;
    line-height:1.55;
}

.charactercore-page .charactercore-hero-icon,
.charactercore-admin .charactercore-hero-icon{
    flex:0 0 auto;
}

/* Alte generische Modulnavigation bleibt deaktiviert, falls alte Markups gecacht werden. */
.charactercore-module-nav.module-nav,
.module-navigation .charactercore-module-nav{
    display:none !important;
}

@media (max-width: 980px){
    .charactercore-page.charactercore-shell,
    .charactercore-admin.charactercore-shell{ padding:20px; }
    .charactercore-hero-tabs{ margin-left:14px; }
    .charactercore-hero-tab{ min-height:52px; padding:0 18px; font-size:15px; }
    .charactercore-page .charactercore-hero,
    .charactercore-admin .charactercore-hero{ padding:24px; }
}

@media (max-width: 640px){
    .charactercore-hero-tabs{ margin-left:0; gap:6px; }
    .charactercore-hero-tab{ width:100%; border-radius:14px; min-height:46px; justify-content:flex-start; }
    .charactercore-hero-tab.is-active::after{ display:none; }
}

/* CharacterCore v1.0.3 — True Hero Tab Docking
   Ziel: Reiter nicht schweben lassen, sondern wie ForumNext direkt an die Hero-Card andocken. */
.charactercore-page.charactercore-shell > .charactercore-hero-tabs,
.charactercore-admin.charactercore-shell > .charactercore-hero-tabs{
    position:relative;
    z-index:10;
    display:flex;
    flex-wrap:wrap;
    align-items:flex-end;
    gap:8px;
    padding:0 12px !important;
    /* Die Basis-Seite nutzt flex-gap. Dieser negative Wert hebt exakt den Abstand
       zwischen Reiterreihe und Hero-Box auf, ohne die übrigen Inhaltsabstände zu ändern. */
    margin:0 0 -18px 26px !important;
}

.charactercore-page.charactercore-shell > .charactercore-hero-tabs + .charactercore-hero,
.charactercore-admin.charactercore-shell > .charactercore-hero-tabs + .charactercore-hero{
    margin-top:0 !important;
}

.charactercore-page.charactercore-shell .charactercore-hero-tab,
.charactercore-admin.charactercore-shell .charactercore-hero-tab{
    min-height:52px;
    padding:0 22px;
    border-radius:16px 16px 0 0;
    border-bottom-color:rgba(198,124,55,.24);
    box-shadow:0 -8px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,189,96,.055);
}

.charactercore-page.charactercore-shell .charactercore-hero-tab.is-active,
.charactercore-admin.charactercore-shell .charactercore-hero-tab.is-active{
    border-bottom-color:rgba(54,34,21,.98);
    z-index:11;
}

.charactercore-page.charactercore-shell .charactercore-hero-tab.is-active::after,
.charactercore-admin.charactercore-shell .charactercore-hero-tab.is-active::after{
    left:-1px;
    right:-1px;
    bottom:-2px;
    height:3px;
    background:linear-gradient(90deg, rgba(54,34,21,.98), rgba(20,13,8,.98));
}

.charactercore-page.charactercore-shell > .charactercore-hero,
.charactercore-admin.charactercore-shell > .charactercore-hero{
    z-index:5;
    margin-top:0 !important;
}

@media (max-width: 980px){
    .charactercore-page.charactercore-shell > .charactercore-hero-tabs,
    .charactercore-admin.charactercore-shell > .charactercore-hero-tabs{
        margin-left:14px !important;
        margin-bottom:-18px !important;
    }
    .charactercore-page.charactercore-shell .charactercore-hero-tab,
    .charactercore-admin.charactercore-shell .charactercore-hero-tab{
        min-height:48px;
        padding:0 18px;
    }
}

@media (max-width: 640px){
    .charactercore-page.charactercore-shell > .charactercore-hero-tabs,
    .charactercore-admin.charactercore-shell > .charactercore-hero-tabs{
        margin:0 0 10px 0 !important;
        padding:0 !important;
    }
    .charactercore-page.charactercore-shell .charactercore-hero-tab,
    .charactercore-admin.charactercore-shell .charactercore-hero-tab{
        width:100%;
        border-radius:14px;
        min-height:46px;
        justify-content:flex-start;
    }
    .charactercore-page.charactercore-shell .charactercore-hero-tab.is-active::after,
    .charactercore-admin.charactercore-shell .charactercore-hero-tab.is-active::after{
        display:none;
    }
}



/* CharacterCore v1.0.4 — Profile/Inventory/UserPanel Bridge Polish */
.charactercore-bridge-actions{
    align-self:flex-start;
    min-width:180px;
}
.charactercore-action-grid{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:12px;
}
.charactercore-action-grid .button,
.charactercore-action-grid .dsc-btn{
    flex:1 1 auto;
    min-width:118px;
}
.charactercore-bridge-card .charactercore-action-grid .button,
.charactercore-profile-actions .button,
.charactercore-widget-actions .button{
    min-height:34px;
    padding:8px 10px;
    font-size:13px;
}
.charactercore-profile-line{
    margin:10px 0 0;
    line-height:1.45;
}
.charactercore-profile-actions,
.charactercore-widget-actions{
    margin-top:14px;
}
.charactercore-widget-actions{
    gap:8px;
}
.charactercore-widget-actions .button{
    min-width:auto;
}
@media (max-width: 980px){
    .charactercore-bridge-actions{
        min-width:0;
        width:100%;
    }
}
@media (max-width: 640px){
    .charactercore-action-grid{
        flex-direction:column;
    }
    .charactercore-action-grid .button,
    .charactercore-action-grid .dsc-btn{
        width:100%;
        justify-content:center;
    }
}

/* v1.0.6: Charname/Account hint polish */
.charactercore-account-hint{
    margin:.15rem 0 .35rem;
    color:rgba(220,205,180,.72);
    font-size:.82rem;
    letter-spacing:.02em;
}



/* CharacterCore v1.1.0 — Avatar Onboarding Foundation */
.charactercore-avatar-editor-page .charactercore-avatar-hero{
    background:
        radial-gradient(circle at 14% 20%, rgba(255,160,72,.18), transparent 34%),
        linear-gradient(135deg, rgba(45,30,20,.98), rgba(10,10,10,.98));
}
.charactercore-notice{
    border-color:rgba(94,192,120,.36);
    background:linear-gradient(180deg, rgba(18,47,27,.82), rgba(12,20,14,.88));
    color:#d9ffe0;
}
.charactercore-avatar-layout{
    display:grid;
    grid-template-columns:minmax(260px, 380px) minmax(0, 1fr);
    gap:18px;
    align-items:start;
}
.charactercore-avatar-preview-card{
    position:sticky;
    top:18px;
}
.charactercore-avatar-preview{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:10px;
}
.charactercore-avatar-silhouette{
    position:relative;
    width:230px;
    max-width:100%;
    aspect-ratio:1/1.18;
    border-radius:30px;
    border:1px solid rgba(198,124,55,.34);
    background:
        radial-gradient(circle at 50% 18%, rgba(255,188,105,.20), transparent 28%),
        linear-gradient(180deg, rgba(35,25,20,.96), rgba(8,8,9,.96));
    box-shadow:inset 0 0 50px rgba(255,143,42,.08), 0 20px 40px rgba(0,0,0,.34);
    overflow:hidden;
}
.avatar-bg-ruins{ background:linear-gradient(180deg, rgba(43,32,25,.96), rgba(9,9,10,.96)); }
.avatar-bg-workshop{ background:linear-gradient(180deg, rgba(38,31,22,.96), rgba(9,9,10,.96)); }
.avatar-bg-outpost{ background:linear-gradient(180deg, rgba(33,35,28,.96), rgba(9,9,10,.96)); }
.avatar-bg-market{ background:linear-gradient(180deg, rgba(42,29,29,.96), rgba(9,9,10,.96)); }
.avatar-head{
    position:absolute;
    left:50%;
    top:18%;
    width:78px;
    height:78px;
    transform:translateX(-50%);
    border-radius:50% 50% 45% 45%;
    background:linear-gradient(180deg, #d8a77c, #9f6a45);
    border:2px solid rgba(255,211,160,.30);
    box-shadow:0 0 0 9px rgba(0,0,0,.18);
}
.avatar-head::before{
    content:'';
    position:absolute;
    left:8px;
    right:8px;
    top:-12px;
    height:32px;
    border-radius:50% 50% 28% 28%;
    background:#4e2f1d;
    box-shadow:0 7px 0 rgba(0,0,0,.18);
}
.avatar-hair-black::before{ background:#171412; }
.avatar-hair-brown::before{ background:#4e2f1d; }
.avatar-hair-blonde::before{ background:#b7893d; }
.avatar-hair-red::before{ background:#8e321c; }
.avatar-hair-grey::before{ background:#73706b; }
.avatar-hair-white::before{ background:#ddd2bd; }
.avatar-body{
    position:absolute;
    left:50%;
    top:46%;
    width:118px;
    height:126px;
    transform:translateX(-50%);
    border-radius:42px 42px 18px 18px;
    background:linear-gradient(180deg, rgba(93,58,35,.95), rgba(40,27,21,.96));
    border:1px solid rgba(255,168,76,.24);
}
.avatar-build-athletic{ width:108px; }
.avatar-build-broad{ width:138px; }
.avatar-build-lean{ width:96px; }
.avatar-emblem{
    position:absolute;
    left:50%;
    bottom:18px;
    transform:translateX(-50%);
    width:48px;
    height:48px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,168,76,.34);
    background:rgba(0,0,0,.26);
    color:#ffd99d;
}
.charactercore-avatar-cost-box{
    display:flex;
    flex-direction:column;
    gap:4px;
    margin:4px 0 10px;
    padding:14px 16px;
    border-radius:16px;
    border:1px solid rgba(198,124,55,.28);
    background:rgba(0,0,0,.24);
    color:#f0d7b4;
}
.charactercore-avatar-cost-box strong{ color:#ffd99d; }
.charactercore-avatar-cost-box span{ color:#bda88d; }
.charactercore-avatar-form select{
    cursor:pointer;
}

@media (max-width: 980px){
    .charactercore-avatar-layout{ grid-template-columns:1fr; }
    .charactercore-avatar-preview-card{ position:relative; top:auto; }
}
