/* GameMediaX — Panel del desarrollador y estudios (requiere tokens.css + components.css) */

.pn-wrap { max-width: 1120px; margin: 0 auto; padding: 1.5rem var(--gap) 4rem; }
.pn-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pn-title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 900; text-transform: uppercase; color: var(--white); line-height: 1; }
.pn-sub { color: var(--text-muted); font-size: .9rem; margin-top: .35rem; }
.pn-crumbs { font-size: .8rem; color: var(--text-muted); margin-bottom: .6rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.pn-crumbs a { color: var(--text-dim); text-decoration: none; } .pn-crumbs a:hover { color: var(--orange); }
.pn-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.pn-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.75rem; }
.pn-kpi { background: var(--bg2); border: 1px solid var(--border-md); border-radius: var(--radius); padding: 1rem 1.1rem; }
.pn-kpi b { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--white); line-height: 1.1; }
.pn-kpi span { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.pn-kpi small { display: block; font-size: .75rem; color: var(--green); margin-top: .15rem; }

.pn-section { margin-bottom: 2rem; }
.pn-section > h2 { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim);
                   margin-bottom: .8rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Lista de proyectos */
.pn-games { display: flex; flex-direction: column; gap: .6rem; }
.pn-game { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 1rem; align-items: center;
           background: var(--bg2); border: 1px solid var(--border-md); border-radius: var(--radius); padding: .7rem; }
.pn-game:hover { border-color: var(--border-orange); }
.pn-thumb { width: 112px; aspect-ratio: 16/9; border-radius: var(--radius-sm); background: var(--bg4) center/cover no-repeat;
            display: flex; align-items: center; justify-content: center; color: var(--text-muted); overflow: hidden; }
.pn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pn-game h3 { font-size: 1rem; color: var(--white); margin-bottom: .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-game h3 a { color: inherit; text-decoration: none; }
.pn-meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .76rem; color: var(--text-muted); align-items: center; }
.pn-meta svg { width: 12px; height: 12px; }
.pn-progress { height: 4px; background: var(--bg4); border-radius: 4px; overflow: hidden; margin-top: .5rem; max-width: 220px; }
.pn-progress i { display: block; height: 100%; background: var(--orange); }
.pn-game-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }

.pn-studios { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.pn-studio { display: flex; gap: .8rem; align-items: center; background: var(--bg2); border: 1px solid var(--border-md);
             border-radius: var(--radius); padding: .8rem; text-decoration: none; color: inherit; }
.pn-studio:hover { border-color: var(--border-orange); }
.pn-logo { width: 46px; height: 46px; border-radius: var(--radius-sm); background: var(--bg4); flex-shrink: 0; overflow: hidden;
           display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--orange); }
.pn-logo img { width: 100%; height: 100%; object-fit: cover; }
.pn-studio strong { color: var(--white); display: block; font-size: .92rem; }
.pn-studio span { font-size: .75rem; color: var(--text-muted); }

/* Asistente */
.wz { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.wz-steps { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .25rem; list-style: none;
            background: var(--bg2); border: 1px solid var(--border-md); border-radius: var(--radius); padding: .6rem; }
.wz-steps a, .wz-steps span { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: var(--radius-sm);
                              font-size: .86rem; font-weight: 600; color: var(--text-dim); text-decoration: none; }
.wz-steps a:hover { background: var(--glass-md); color: var(--white); }
.wz-steps .n { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
               font-size: .75rem; font-weight: 800; border: 1px solid var(--border-md); flex-shrink: 0; }
.wz-steps .is-done .n { background: var(--success-bg); border-color: var(--success-border); color: var(--green); }
.wz-steps [aria-current="step"] { background: var(--orange-glow-sm); color: var(--white); }
.wz-steps [aria-current="step"] .n { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.wz-steps .is-locked { opacity: .45; cursor: not-allowed; }
.wz-card { background: var(--bg2); border: 1px solid var(--border-md); border-radius: var(--radius-lg); padding: clamp(1rem, 3vw, 1.75rem); }
.wz-card h2 { font-size: 1.25rem; color: var(--white); margin-bottom: .3rem; }
.wz-card > p.lead { color: var(--text-muted); font-size: .88rem; margin-bottom: 1.4rem; }
.wz-foot { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 1.4rem; padding-top: 1.1rem; }
.wz-foot .right { display: flex; gap: .5rem; flex-wrap: wrap; margin-left: auto; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .75rem; border-radius: var(--radius-pill);
             border: 1px solid var(--border-md); background: var(--glass); font-size: .8rem; color: var(--text); cursor: pointer; user-select: none; }
.chip span:hover { border-color: rgba(255,255,255,.25); }
.chip input:checked + span { border-color: var(--orange); background: var(--orange-glow-sm); color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.status-grid label { display: flex; flex-direction: column; gap: .2rem; padding: .7rem; border: 1px solid var(--border-md); border-radius: var(--radius);
                     background: var(--glass); cursor: pointer; font-size: .82rem; color: var(--text); }
.status-grid label svg { width: 18px; height: 18px; color: var(--orange); }
.status-grid input { position: absolute; opacity: 0; pointer-events: none; }
.status-grid label:has(input:checked) { border-color: var(--orange); background: var(--orange-glow-sm); color: var(--white); }
.status-grid label:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 2px; }

.media-list { display: flex; flex-direction: column; gap: .45rem; }
.media-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: .5rem; align-items: center; }
.media-row .pv { width: 72px; aspect-ratio: 16/9; border-radius: 6px; background: var(--bg4) center/cover no-repeat; border: 1px solid var(--border); }
.icon-btn { width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border-md); background: var(--glass);
            color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { color: var(--red); border-color: var(--danger-border); }
.icon-btn svg { width: 15px; height: 15px; }

.cover-field { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1rem; align-items: start; }
.cover-preview { aspect-ratio: 16/9; border-radius: var(--radius); background: var(--bg4) center/cover no-repeat; border: 1px dashed var(--border-md);
                 display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: .75rem; text-align: center; overflow: hidden; }
.upload-btn { position: relative; overflow: hidden; }
.upload-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.checklist { list-style: none; display: flex; flex-direction: column; gap: .4rem; margin: .5rem 0 1rem; }
.checklist li { display: flex; gap: .5rem; align-items: center; font-size: .86rem; }
.checklist li svg { width: 16px; height: 16px; }
.checklist .ok { color: var(--green); } .checklist .no { color: var(--yellow); }

.danger-zone { border: 1px solid var(--danger-border); border-radius: var(--radius); padding: 1rem; margin-top: 2rem; }
.danger-zone h3 { color: var(--red); font-size: .9rem; margin-bottom: .35rem; }

/* Novedades y estadísticas */
.upd-list { display: flex; flex-direction: column; gap: .6rem; }
.upd { background: var(--bg2); border: 1px solid var(--border-md); border-radius: var(--radius); padding: .9rem 1rem; }
.upd header { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.upd h3 { font-size: .95rem; color: var(--white); }
.upd p { font-size: .85rem; color: var(--text); margin-top: .4rem; white-space: pre-line; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: .75rem .5rem .25rem; background: var(--bg2);
         border: 1px solid var(--border-md); border-radius: var(--radius); }
.chart i { flex: 1; background: var(--orange); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; }
.chart i:hover { opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-muted); margin-top: .35rem; }

/* Integrantes */
.members { display: flex; flex-direction: column; gap: .5rem; }
.member { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .75rem; align-items: center;
          background: var(--bg2); border: 1px solid var(--border-md); border-radius: var(--radius); padding: .6rem .8rem; }
.member .av { width: 40px; height: 40px; border-radius: 50%; background: var(--bg4); overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--orange); }
.member .av img { width: 100%; height: 100%; object-fit: cover; }
.member strong { color: var(--white); font-size: .9rem; }
.member small { display: block; color: var(--text-muted); font-size: .75rem; }
.member form { display: inline-flex; gap: .35rem; align-items: center; }
.member select { padding: .35rem .5rem; background: var(--bg3); border: 1px solid var(--border-md); color: var(--text); border-radius: 6px; font: inherit; font-size: .8rem; }

@media (max-width: 860px) {
    .wz { grid-template-columns: 1fr; }
    .wz-steps { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
    .wz-steps a, .wz-steps span { white-space: nowrap; flex-shrink: 0; }
    .wz-steps .lbl { display: none; }
    .wz-steps [aria-current="step"] .lbl { display: inline; }
    .pn-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .pn-game { grid-template-columns: 80px minmax(0, 1fr); }
    .pn-thumb { width: 80px; }
    .pn-game-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .cover-field { grid-template-columns: 1fr; }
    .member { grid-template-columns: 40px minmax(0, 1fr); }
    .member form { grid-column: 1 / -1; flex-wrap: wrap; }
}

/* Página pública del estudio */
.st-hero { background: linear-gradient(180deg, var(--bg3), var(--bg)); background-size: cover; background-position: center; border-bottom: 1px solid var(--border); }
.st-hero-inner { display: flex; gap: 1.25rem; align-items: flex-end; padding-top: clamp(3rem, 12vw, 8rem); padding-bottom: 1.5rem; flex-wrap: wrap; }
.st-logo { width: 112px; height: 112px; border-radius: var(--radius-lg); background: var(--bg4); border: 3px solid var(--bg); overflow: hidden;
           display: flex; align-items: center; justify-content: center; font: 900 2.6rem var(--font-display); color: var(--orange); flex-shrink: 0; box-shadow: var(--shadow); }
.st-logo img { width: 100%; height: 100%; object-fit: cover; }
.st-id { flex: 1; min-width: 220px; }
.st-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; padding-top: 2rem; }
.st-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.st-game { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--border-md); border-radius: var(--radius);
           overflow: hidden; text-decoration: none; color: inherit; transition: border-color var(--dur-fast), transform var(--dur-fast); }
.st-game:hover { border-color: var(--border-orange); transform: translateY(-2px); }
.st-game-cover { aspect-ratio: 16/9; background: var(--bg4); }
.st-game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-game-body { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; gap: .4rem; }
.st-game-body strong { color: var(--white); font-size: .98rem; }
.st-game-body p { font-size: .82rem; color: var(--text-dim); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-links { display: flex; flex-direction: column; gap: .35rem; }
.st-links a { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border-radius: var(--radius-sm); background: var(--bg2);
              border: 1px solid var(--border-md); color: var(--text); font-size: .85rem; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-links a:hover { border-color: var(--orange); color: var(--orange); }
@media (max-width: 860px) { .st-layout { grid-template-columns: 1fr; } .st-logo { width: 84px; height: 84px; } }
