/* ==========================================================
   Damned Crown · Estilos
   ========================================================== */

@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #101218;
  --bg-2: #161a23;
  --panel: #1c212c;
  --panel-2: #232937;
  --border: #2f3646;
  --text: #e7e3d8;
  --muted: #9aa3b2;
  --gold: #e0b030;
  --gold-2: #f2cb5a;
  --blue: #3b6fb6;
  --red: #c94a4a;
  --green: #4caf6a;
  --radius: 12px;
  --font-title: "Cinzel", Georgia, serif;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gbar-h: 60px;
  --side-w: 240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-body); }
img { max-width: 100%; height: auto; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; color: #f4ecd6; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 32px); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .6em 1.1em;
  border-radius: 10px; border: 1px solid transparent; font: 700 .95rem var(--font-body); cursor: pointer;
  text-decoration: none !important; transition: transform .1s, background .2s; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #241a04; border-color: #a07818; }
.btn-gold:hover { background: linear-gradient(180deg, #f8d877, var(--gold-2)); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-lg { padding: .85em 1.5em; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Cabecera pública ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(16,18,24,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 1.15rem var(--font-title); text-decoration: none !important; }
.brand img { border-radius: 8px; }
.pubnav { display: flex; align-items: center; gap: 18px; }
.pubnav a:not(.btn) { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; width: 42px; height: 42px; font-size: 1.1rem; cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .pubnav { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; display: none; }
  .pubnav.open { display: flex; }
  .pubnav a { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .pubnav .btn { margin-top: 12px; border-bottom: 0; }
}

/* ---------- Portada ---------- */
.hero { background:
    radial-gradient(1200px 500px at 80% 10%, rgba(59,111,182,.25), transparent 60%),
    radial-gradient(800px 400px at 10% 90%, rgba(224,176,48,.12), transparent 60%), var(--bg);
  border-bottom: 1px solid var(--border); }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 64px 0; }
.lead { font-size: 1.15rem; color: #d6d0c1; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); }
.hero-points i { color: var(--green); }
.hero-art { display: flex; justify-content: center; }
.hero-art .gimg { width: min(380px, 100%); aspect-ratio: 1; }
.hero-art .gimg-ph { font-size: 7rem; }

.section { padding: 56px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-intro { color: var(--muted); max-width: 720px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature-ico { font-size: 1.6rem; color: var(--gold); margin-bottom: 12px; }
.feature p { color: var(--muted); margin: 0; }

.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.steps span { flex: 0 0 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #241a04; font: 700 1.1rem var(--font-title); }
.steps p { margin: 0; color: var(--muted); }

.faq details { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; position: relative; padding-right: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 10px; font-size: 1.4rem; color: var(--gold); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }
.cta-final { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }

@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; padding: 40px 0; text-align: center; }
  .hero-cta, .hero-points { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art .gimg { width: min(240px, 70%); }
  .steps { grid-template-columns: 1fr; }
}

.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: .92rem; }
.footer p { margin: 0 0 4px; }

/* ---------- Formularios ---------- */
.auth { max-width: 440px; }
.auth.wide { max-width: 560px; }
.form h1 { font-size: 1.6rem; }
.form h2 { font-size: 1.1rem; margin-top: 1.4em; color: var(--gold-2); }
.form label { display: block; margin-bottom: 14px; font-weight: 700; font-size: .92rem; }
.form small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
.form input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: 1rem var(--font-body); }
.form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224,176,48,.2); }
.form .btn-block { margin-top: 8px; }
.alert { background: rgba(201,74,74,.12); border: 1px solid rgba(201,74,74,.5); color: #f3b8b8; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.req { list-style: none; padding: 0; }
.req li.ok i { color: var(--green); }
.req li.ko { color: #f3b8b8; }
.code { background: var(--bg); border: 1px solid var(--border); padding: 10px; border-radius: 8px; overflow-x: auto; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }

/* ---------- Mensajes flash ---------- */
.flash { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 10px;
  margin: 16px auto; width: min(1160px, 100% - 32px); border: 1px solid var(--border); background: var(--panel); }
.gmain .flash { width: 100%; margin: 0 0 16px; }
.flash-ok { border-color: rgba(76,175,106,.6); background: rgba(76,175,106,.12); }
.flash-warn { border-color: rgba(224,176,48,.6); background: rgba(224,176,48,.12); }
.flash-error { border-color: rgba(201,74,74,.6); background: rgba(201,74,74,.12); }
.flash-x { background: none; border: 0; color: var(--text); font-size: 1.4rem; cursor: pointer; line-height: 1; }

/* ---------- Imágenes del juego (con marcador) ---------- */
.gimg { display: block; object-fit: contain; }
.gimg-ph { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: var(--radius);
  background: radial-gradient(circle at 50% 40%, var(--panel-2), var(--bg-2)); border: 1px dashed var(--border);
  color: #4b5468; font-size: 3rem; }

/* ---------- Área de juego ---------- */
body.game { min-height: 100vh; }
.gbar { position: sticky; top: 0; z-index: 60; height: var(--gbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.gbar .brand img { width: 36px; height: 36px; }
.gstats { flex: 1; display: flex; align-items: center; gap: 18px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.gstats::-webkit-scrollbar { display: none; }
.gstat { display: flex; align-items: center; gap: 6px; font-size: .92rem; }
.gstat .fa-star { color: var(--gold); }
.gstat .fa-heart { color: var(--red); }
.gstat.gold { color: var(--gold-2); font-weight: 700; }
.gstat .bar { width: 70px; margin: 0; }
.gbar-user { color: var(--text); display: flex; align-items: center; gap: 8px; font-weight: 700; }
.gbar .nav-toggle { width: 38px; height: 38px; }

.glayout { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: calc(100vh - var(--gbar-h)); }
.gside { background: var(--bg-2); border-right: 1px solid var(--border); padding: 12px 10px 40px;
  position: sticky; top: var(--gbar-h); height: calc(100vh - var(--gbar-h)); overflow-y: auto; }
.gside-group { font: 700 .72rem var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 10px 6px; }
.gside-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none !important; }
.gside-link i:first-child { width: 18px; text-align: center; color: var(--gold); }
.gside-link:hover { background: var(--panel); }
.gside-link.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--gold); }
.gside-link.locked { opacity: .45; cursor: not-allowed; }
.gside-link .lock { margin-left: auto; font-size: .75rem; }
.gside-link .lock-lvl { white-space: nowrap; color: var(--muted, #9a8f7a); }
.gside-link .lock-lvl i { width: auto; color: inherit; }
.gside-backdrop { display: none; }
.gmain { padding: 24px; min-width: 0; }
.page-title { font-size: 1.6rem; display: flex; align-items: center; gap: 12px; }
.page-title i { color: var(--gold); font-size: 1.3rem; }

@media (max-width: 900px) {
  .gbar .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .gbar-user span { display: none; }
  .glayout { grid-template-columns: 1fr; }
  .gside { position: fixed; top: var(--gbar-h); left: 0; bottom: 0; width: min(280px, 85vw); height: auto; z-index: 55;
    transform: translateX(-100%); transition: transform .25s ease; }
  .gside.open { transform: none; }
  .gside-backdrop.open { display: block; position: fixed; inset: var(--gbar-h) 0 0 0; background: rgba(0,0,0,.55); z-index: 54; }
  .gmain { padding: 16px; }
}
@media (max-width: 520px) {
  .gstat .bar { display: none; }
  .gstats { gap: 12px; font-size: .88rem; }
}

/* ---------- Barras ---------- */
.bar { height: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; margin: 4px 0 14px; }
.bar span { display: block; height: 100%; border-radius: 99px; transition: width .4s; }
.bar-xp span { background: linear-gradient(90deg, #b8861c, var(--gold-2)); }
.bar-hp span { background: linear-gradient(90deg, #8f2e2e, var(--red)); }

/* ---------- Personaje ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.grid-2 > * { min-width: 0; }
.char-card { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; }
.char-art .gimg { width: 100%; aspect-ratio: 1; }
.char-info h2 { margin-bottom: 0; }
.stat-row { display: flex; justify-content: space-between; font-size: .92rem; }
.stat-row i { width: 18px; color: var(--gold); }
.stats { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats li { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; text-align: center; font-size: .85rem; color: var(--muted); }
.stats li i { display: block; color: var(--gold); font-size: 1.1rem; margin-bottom: 4px; }
.stats b { display: block; color: var(--text); font-size: 1.05rem; }
@media (max-width: 520px) {
  .char-card { grid-template-columns: 1fr; }
  .char-art { width: 100%; max-width: 200px; margin: 0 auto; }
}

/* ==========================================================
   Fase 2 · Oficios, inventario, equipo, admin
   ========================================================== */
.mt { margin-top: 16px; }
.btn-sm { padding: .4em .8em; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.bonus { color: var(--green); font-weight: 700; font-size: .8em; }
.ok { color: var(--green); }
.ko { color: var(--red); }

/* Rarezas */
.rar-comun      { --rar: #9aa3b2; }
.rar-pococomun  { --rar: #4caf6a; }
.rar-rara       { --rar: #3b8fe0; }
.rar-epica      { --rar: #a55ee0; }
.rar-legendaria { --rar: #f0a020; }
[class*="rar-"] { border-color: color-mix(in srgb, var(--rar) 55%, var(--border)); }
.rarity { font-size: .75rem; color: var(--rar); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* Pestañas */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 16px; scrollbar-width: none; }
.tab { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); color: var(--text); white-space: nowrap; font-size: .9rem; text-decoration: none !important; }
.tab.active { background: var(--gold); color: #241a04; border-color: var(--gold); font-weight: 700; }

/* Cabecera de oficio */
.skill-head { margin-bottom: 16px; }
.skill-head .bar { margin: 8px 0 2px; }
.act-card { margin-bottom: 16px; }

/* Tarea en curso */
.act-box { display: flex; gap: 20px; align-items: center; }
.act-idle { display: flex; gap: 16px; align-items: center; }
.act-idle > i { font-size: 2rem; color: var(--muted); }
.act-idle p { margin: 0; }
.ring { position: relative; flex: 0 0 120px; width: 120px; height: 120px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring-bg { stroke: var(--bg); }
.ring-fg { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 276.46; stroke-dashoffset: 276.46; transition: stroke-dashoffset .25s linear; }
.ring-img { position: absolute; inset: 16px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--bg-2); }
.ring-img .gimg { width: 100%; height: 100%; border: 0; font-size: 2rem; border-radius: 50%; }
.ring.pulse .ring-img { animation: pulse .5s ease; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.act-info { flex: 1; min-width: 0; }
.act-count { color: var(--muted); font-size: .9rem; }
.act-count [data-act-count] { color: var(--gold-2); font-weight: 700; font-size: 1.1rem; }
.act-info .bar { margin: 8px 0; }
.act-log { min-height: 1.4em; font-size: .85rem; margin-bottom: 8px; }
.act-log.flash-in { animation: fadein .4s ease; color: var(--green); }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } }

/* Indicador en la barra superior */
.gact { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--panel-2);
  border: 1px solid var(--gold); color: var(--gold-2); font-weight: 700; font-size: .85rem; white-space: nowrap; text-decoration: none !important; }

/* Recursos de un oficio */
.nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.node { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 16px; }
.node h3 { margin: 0; font-size: 1rem; }
.node-img { width: 96px; }
.node-img .gimg { width: 96px; height: 96px; font-size: 2.2rem; }
.node-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: .8rem; color: var(--muted); }
.node-meta i { color: var(--gold); }
.node form, .node .btn { width: 100%; margin-top: auto; }
.node.is-locked .node-img { filter: grayscale(1) brightness(.6); }
.node.is-current { box-shadow: 0 0 0 2px var(--gold); }

/* Lista de oficios en el personaje */
.skill-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.skill-item { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none !important; }
.skill-item:hover { border-color: var(--gold); }
.skill-item > i { font-size: 1.4rem; color: var(--gold); width: 28px; text-align: center; }
.skill-item > div { flex: 1; }
.skill-item .bar { margin: 6px 0 0; height: 6px; }

/* Inventario */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.inv-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px; }
.inv-img { position: relative; width: 80px; }
.inv-img .gimg { width: 80px; height: 80px; font-size: 1.8rem; }
.qty { position: absolute; right: -6px; bottom: -6px; background: var(--bg); border: 1px solid var(--border); border-radius: 99px; padding: 0 8px; font-size: .8rem; font-weight: 700; }
.inv-name { font-weight: 700; font-size: .92rem; line-height: 1.2; margin-top: 4px; }
.inv-stats { display: flex; gap: 8px; justify-content: center; font-size: .8rem; color: var(--green); }
.inv-item form { width: 100%; margin-top: auto; padding-top: 6px; }
.sell { display: flex; gap: 4px; }
.sell input { width: 56px; min-width: 0; flex: 1; padding: 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); }
.empty { text-align: center; color: var(--muted); padding: 40px; }
.empty i { font-size: 2.4rem; margin-bottom: 8px; }

/* Equipo */
.eq-total { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-bottom: 16px; }
.eq-total i { color: var(--gold); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.slot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px; }
.slot-head { align-self: stretch; font: 700 .75rem var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; }
.slot-head i { color: var(--gold); }
.slot-img { width: 88px; }
.slot-img .gimg { width: 88px; height: 88px; font-size: 2rem; }
.slot-empty { height: 88px; display: grid; place-items: center; border: 1px dashed var(--border); border-radius: 10px; color: #3a4152; font-size: 2rem; }
.slot form { width: 100%; }
.slot-more { width: 100%; text-align: left; }
.slot-more summary { cursor: pointer; color: var(--gold-2); font-size: .85rem; padding: 4px 0; }
.slot-opt { margin-top: 6px; }

/* Admin */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.admin-stats .card { display: flex; flex-direction: column; gap: 2px; }
.admin-stats i { color: var(--gold); font-size: 1.3rem; }
.admin-stats b { font-size: 1.6rem; font-family: var(--font-title); }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.check { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: .9rem; }
.img-list { display: grid; gap: 10px; }
.img-row { display: flex; gap: 16px; align-items: flex-start; padding: 14px; }
.img-thumb { flex: 0 0 72px; }
.img-thumb .gimg { width: 72px; height: 72px; font-size: 1.6rem; }
.img-data { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.img-file { font-size: .82rem; color: var(--gold-2); word-break: break-all; }
.badge { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.badge-falta { background: rgba(201,74,74,.2); color: #f3b8b8; }
.badge-png { background: rgba(224,176,48,.2); color: var(--gold-2); }
.badge-webp { background: rgba(76,175,106,.2); color: #9be0b0; }
.prompt { display: flex; gap: 8px; width: 100%; align-items: flex-start; }
.prompt textarea { flex: 1; min-width: 0; resize: vertical; background: var(--bg-2); color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: 8px; font: .8rem/1.4 var(--font-body); }

@media (max-width: 520px) {
  .act-box { flex-direction: column; text-align: center; }
  .act-info { width: 100%; }
  .nodes { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .node { padding: 12px 10px; }
  .node-img, .node-img .gimg { width: 72px; height: 72px; }
  .inv-grid, .slots { grid-template-columns: repeat(2, 1fr); }
  .prompt { flex-direction: column; }
  .prompt textarea { width: 100%; }
  .gact span { display: none; }
}

/* ==========================================================
   Clases y estadísticas
   ========================================================== */
.auth.wide2 { max-width: 920px; }
.small { font-size: .85rem; margin: 12px 0 0; }
.gold-txt { color: var(--gold-2); font-weight: 700; }
.class-bonus { color: var(--gold-2); font-size: .9rem; margin: 6px 0 10px; }

.picker { border: 0; padding: 0; margin: 0 0 18px; }
.picker legend { font-weight: 700; font-size: .92rem; margin-bottom: 8px; }
.gender-pick { display: flex; gap: 10px; }
.gender-pick label, .class-card { position: relative; margin: 0 !important; cursor: pointer; }
.gender-pick input, .class-card input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gender-pick span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-2); font-weight: 700; }
.gender-pick input:checked + span { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(224,176,48,.35); color: var(--gold-2); }
.gender-pick input:focus-visible + span, .class-card input:focus-visible + .class-in { outline: 2px solid var(--gold); }

.class-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.class-in { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; height: 100%;
  padding: 12px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); transition: border-color .15s, transform .15s; }
.class-card:hover .class-in { border-color: var(--border-2, #475066); }
.class-card input:checked + .class-in { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(224,176,48,.35); transform: translateY(-2px); }
.class-img { width: 100%; max-width: 120px; }
.class-img .gimg { width: 100%; aspect-ratio: 1; font-size: 2.2rem; }
form:has(input[name="gender"][value="f"]:checked) .class-img[data-g="m"],
form:not(:has(input[name="gender"][value="f"]:checked)) .class-img[data-g="f"] { display: none; }
.class-in b { font-family: var(--font-title); font-size: .95rem; }
.class-in b i { color: var(--gold); }
.class-in small { color: var(--muted); font-size: .78rem; line-height: 1.35; font-weight: 400; }
.class-stats { display: grid; grid-template-columns: repeat(2, auto); gap: 2px 10px; font-size: .78rem; font-weight: 700; }
.class-stats i { color: var(--gold); width: 14px; }
.class-in em { font-style: normal; font-size: .76rem; color: var(--green); font-weight: 700; }
@media (max-width: 860px) { .class-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.derived { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.derived-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.derived-item > i { color: var(--gold); font-size: 1.2rem; width: 24px; text-align: center; }
.derived-item > div { flex: 1; min-width: 0; }
.derived-item b { display: block; font-size: .92rem; }
.derived-item small { color: var(--muted); font-size: .78rem; line-height: 1.3; display: block; }
.derived-val { font: 700 1.15rem var(--font-body); color: var(--gold-2); white-space: nowrap; }
@media (max-width: 700px) { .derived { grid-template-columns: 1fr; } }

/* ==========================================================
   Admin · Jugadores
   ========================================================== */
.btn-danger { background: #8f2e2e; color: #fff; border-color: #b24040; }
.btn-danger:hover { background: #a83838; }
.in-sm, .form select, .inline-form select, .tbl input { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: .9rem var(--font-body); }
.in-sm { width: 110px; }
.form select { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; }
.admin-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.search { display: flex; gap: 6px; flex: 1; max-width: 460px; }
.search input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: 1rem var(--font-body); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--panel); }
.dot.inline { border: 0; vertical-align: middle; }
.dot-on { background: #3ddc6b; box-shadow: 0 0 6px #3ddc6b; }
.dot-off { background: #5a6274; }

.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; gap: 10px; padding: 14px; color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--gold); transform: translateY(-2px); }
.pcard.is-banned { border-color: rgba(201,74,74,.6); background: linear-gradient(180deg, rgba(201,74,74,.08), var(--panel)); }
.pcard.is-paused, .phead.is-paused { border-color: rgba(224,176,48,.6); }
.phead.is-banned { border-color: rgba(201,74,74,.6); }
.pcard-top { display: flex; gap: 12px; align-items: center; }
.pcard-img { position: relative; flex: 0 0 64px; width: 64px; }
.pcard-img .gimg { width: 64px; height: 64px; font-size: 1.6rem; border-radius: 12px; }
.pcard-img .dot { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; }
.pcard-img.big { flex-basis: 120px; width: 120px; }
.pcard-img.big .gimg { width: 120px; height: 120px; font-size: 3rem; }
.pcard-img.big .dot { width: 18px; height: 18px; }
.pcard-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.pcard-id b { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; }
.pcard-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.pcard-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .85rem; font-weight: 700; }
.pcard-stats i { color: var(--gold); }
.pcard-task { font-size: .85rem; color: var(--muted); padding: 8px 10px; background: var(--bg-2); border-radius: 8px; border: 1px solid var(--border); }
.pcard-task.busy { color: var(--gold-2); border-color: rgba(224,176,48,.4); }

.phead { display: flex; gap: 20px; align-items: flex-start; }
.phead h1 { margin: 0 0 4px; font-size: 1.6rem; }
.phead p { margin: 0 0 6px; }
.phead-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.phead-actions form { margin: 0; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.tbl { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: .9rem; }
.tbl th { text-align: left; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; padding: 4px 6px; }
.tbl td { padding: 4px 6px; border-top: 1px solid var(--border); }
.tbl td i { color: var(--gold); width: 18px; }
.tbl input { width: 100%; max-width: 110px; }
.mini-derived { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; font-size: .9rem; }
.mini-derived li { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding: 4px 0; color: var(--muted); }
.mini-derived b { color: var(--gold-2); }
.inv-add select { min-width: 220px; }
.adm-inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.adm-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); margin: 0; }
.adm-thumb .gimg { width: 40px; height: 40px; font-size: 1rem; border-radius: 8px; }
.adm-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.adm-name b { font-size: .9rem; }
.adm-row .in-sm { width: 80px; }
.adm-log { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.adm-log li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.danger-zone { border-color: rgba(201,74,74,.5); }
.danger-zone h2 { color: #f3b8b8; }
@media (max-width: 600px) {
  .phead { flex-direction: column; align-items: center; text-align: center; }
  .phead-actions { justify-content: center; }
  .fgrid, .mini-derived { grid-template-columns: 1fr; }
  .adm-inv { grid-template-columns: 1fr; }
}
.phead .in-sm { width: 220px; max-width: 100%; }
.idle-row { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--muted); margin-top: 8px; }
.idle-row b { color: var(--text); }
.idle-row i { color: #7f9cd6; }
.bar-idle span { background: linear-gradient(90deg, #2f4f8f, #5f8fe0); }
@media (max-width: 420px) { .gbar { gap: 8px; padding: 0 10px; } }

/* ==========================================================
   Menú inferior (móvil) y página de oficios
   ========================================================== */
.bnav, .toast { display: none; }
@media (max-width: 900px) {
  :root { --bnav-h: 64px; }
  body.game { padding-bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    height: calc(var(--bnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(22,26,35,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--border); }
  .bnav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--muted); font: 700 .7rem var(--font-body); background: none; border: 0; cursor: pointer; text-decoration: none !important;
    -webkit-tap-highlight-color: transparent; }
  .bnav-item > i:first-child { font-size: 1.25rem; }
  .bnav-item.active { color: var(--gold-2); }
  .bnav-item.active::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
  .bnav-item.locked { opacity: .45; }
  .bnav-lock { position: absolute; top: 9px; right: calc(50% - 20px); font-size: .6rem; }
  .bnav-lock-lvl { right: calc(50% - 30px); top: 6px; font-weight: 700; white-space: nowrap; }
  .gside { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
  .gside-backdrop.open { bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom)); }
  .toast { display: block; position: fixed; left: 50%; bottom: calc(var(--bnav-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    z-index: 80; background: var(--panel-2); border: 1px solid var(--gold); color: var(--text); padding: 10px 18px; border-radius: 99px;
    font-weight: 700; font-size: .9rem; box-shadow: 0 8px 24px rgba(0,0,0,.4); white-space: nowrap; }
  .toast[hidden] { display: none; }
}

.ofi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ofi-card { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none !important; }
.ofi-card:hover { border-color: var(--gold); }
.ofi-card.is-current { box-shadow: 0 0 0 2px var(--gold); }
.ofi-card.is-locked { opacity: .5; }
.ofi-ico { font-size: 1.8rem; color: var(--gold); width: 40px; text-align: center; }
.ofi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ofi-body .bar { margin: 6px 0 2px; height: 6px; }


/* ==========================================================
   Inventario en iconos + menú emergente
   ========================================================== */
.inv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.inv-tile { position: relative; aspect-ratio: 1; padding: 6px; border-radius: 12px; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, var(--panel-2), var(--panel)); border: 2px solid var(--rar, var(--border));
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--rar) 20%, transparent); transition: transform .12s; -webkit-tap-highlight-color: transparent; }
.inv-tile:hover { transform: translateY(-2px); }
.inv-tile:active { transform: scale(.96); }
.inv-tile .gimg { width: 100%; height: 100%; border: 0; background: none; font-size: 1.6rem; }
.bubble { position: absolute; top: -7px; right: -7px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px;
  display: grid; place-items: center; background: var(--gold); color: #241a04; font: 700 .75rem var(--font-body);
  border: 2px solid var(--bg); box-shadow: 0 2px 6px rgba(0,0,0,.4); }

.item-menu { width: min(420px, calc(100% - 24px)); padding: 0; border: 1px solid var(--border); border-radius: 16px;
  background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.item-menu::backdrop { background: rgba(0,0,0,.6); }
.item-menu[open] { animation: imIn .18s ease; }
@keyframes imIn { from { opacity: 0; transform: translateY(16px); } }
.im-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 1.8rem; cursor: pointer; line-height: 1; }
.im-body { padding: 20px; }
.im-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; padding-right: 24px; }
.im-head h2 { margin: 0 0 2px; font-size: 1.15rem; }
.im-head .inv-stats { justify-content: flex-start; margin-top: 4px; }
.im-img { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 12px; border: 2px solid var(--rar, var(--border)); padding: 4px; background: var(--bg-2); }
.im-img .gimg { width: 100%; height: 100%; border: 0; font-size: 2rem; }
.im-actions { display: flex; flex-direction: column; gap: 10px; }
.im-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.im-qty { display: flex; gap: 6px; }
.im-qty input { flex: 1; min-width: 0; text-align: center; padding: 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: 700 1rem var(--font-body); }
.im-qty .btn { padding: .5em .9em; }
.btn small { font-weight: 400; opacity: .8; }

@media (max-width: 600px) {
  .inv-tiles { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .item-menu { margin: auto auto 0; width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom); }
  .item-menu[open] { animation: imUp .22s ease; }
  @keyframes imUp { from { transform: translateY(100%); } }
}

/* Herramientas */
.slot-group { font-size: 1.1rem; margin: 22px 0 10px; display: flex; gap: 10px; align-items: center; }
.slot-group i { color: var(--gold); }
.tool-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 16px; color: var(--text); text-decoration: none !important; }
.tool-bar:hover { border-color: var(--gold); }
.tool-bar > span:nth-child(2) { flex: 1; }
.tool-img { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-2); border: 1px dashed var(--border); color: var(--muted); font-size: 1.2rem; }
.tool-img .gimg { width: 44px; height: 44px; font-size: 1.1rem; border: 0; }
.node-meta s { font-size: .9em; }
.inv-tile .worn { position: absolute; left: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; font-size: .7rem; border: 2px solid var(--bg); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.inv-stats { flex-wrap: wrap; }

/* Admin imágenes agrupadas */
.img-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.img-jump a { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--border); color: var(--text); font-size: .85rem; text-decoration: none !important; }
.img-jump a:hover { border-color: var(--gold); }
.img-jump small { color: var(--muted); margin-left: 4px; }
.img-group { margin-bottom: 18px; scroll-margin-top: calc(var(--gbar-h) + 10px); }
.img-group > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.img-group > summary::-webkit-details-marker { display: none; }
.img-group > summary::before { content: "▾"; color: var(--gold); }
.img-group:not([open]) > summary::before { content: "▸"; }
.img-group > summary b { font-family: var(--font-title); font-size: 1.1rem; }

/* Historia del personaje */
.bio { border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; }
.bio-title { color: var(--gold-2); font-size: 1.05rem; margin-bottom: .8em; }
.bio p { color: #d6d0c1; line-height: 1.75; }
.bio p:first-of-type::first-letter { float: left; font: 700 2.6em/0.9 var(--font-title); color: var(--gold); margin: 4px 8px 0 0; }
.bio p:last-child { margin-bottom: 0; font-style: italic; }

/* Cocina */
.node-inputs { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 4px; font-size: .8rem; }
.node-inputs li { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 8px; background: var(--bg-2); text-align: left; }
.node-inputs li span:nth-child(2) { flex: 1; }
.node-inputs li.ok { color: var(--text); }
.node-inputs li.ok small { color: var(--green); }
.node-inputs li.ko { color: #f3b8b8; }
.ni-img .gimg { width: 22px; height: 22px; font-size: .7rem; border: 0; border-radius: 4px; }
.im-alert { background: rgba(224,176,48,.12); border: 1px solid rgba(224,176,48,.6); color: var(--gold-2); border-radius: 10px; padding: 10px 12px; font-size: .9rem; font-weight: 700; }
.im-alert.shake { animation: shake .35s ease; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Móvil: menú hamburguesa arriba (sin logo); el menú inferior lleva Mercado */
@media (max-width: 900px) { .gbar .brand { display: none; } }

/* Inputs numéricos sin flechas arriba/abajo */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Caja de tarea: título, sonido y botones */
.act-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sfx-btn { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; flex: 0 0 32px; }
.sfx-btn:hover { color: var(--gold-2); border-color: var(--gold); }
.act-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.act-btns form { margin: 0; }
@media (max-width: 520px) { .act-btns { justify-content: center; } .act-title { justify-content: center; } }

/* Inventario y mercado */
.im-hint { display: block; font-size: .8rem; line-height: 1.35; }
.price-tag { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); white-space: nowrap; padding: 1px 8px; border-radius: 99px;
  background: var(--bg); border: 1px solid var(--gold); color: var(--gold-2); font: 700 .72rem var(--font-body); }
.market-tiles { row-gap: 18px; }
.market-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.btn-gold .gold-txt, .price-in-btn { color: inherit; }
.up-badge { position: absolute; left: -6px; top: -7px; padding: 0 6px; height: 20px; border-radius: 99px; display: grid; place-items: center;
  background: #a55ee0; color: #fff; font: 700 .7rem var(--font-body); border: 2px solid var(--bg); }
.d-block { display: block; margin-top: .35rem; }

/* Popup de lo conseguido (abajo a la derecha) */
.gain-pops { position: fixed; right: 16px; bottom: 16px; z-index: 75; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.gain-pop { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); color: var(--text); font-size: .95rem; animation: gainIn .25s ease-out; transition: opacity .45s, transform .45s; }
.gain-pop.out { opacity: 0; transform: translateY(8px); }
.gain-pop b { color: var(--gold-2); font-weight: 800; }
.gain-img { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; }
.gain-img .gimg { width: 40px; height: 40px; object-fit: contain; font-size: 1.2rem; }
@keyframes gainIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .gain-pops { right: 12px; left: 12px; align-items: flex-end; bottom: 84px; bottom: calc(var(--bnav-h, 64px) + 14px + env(safe-area-inset-bottom, 0px)); }
  .gain-pop { max-width: 100%; }
}

.orphan-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .35rem; }
.orphan-list label { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-weight: 400; }
.orphan-list code { word-break: break-all; }

/* Banner de la cabecera de cada oficio */
.oficio-banner { margin: 0 0 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--panel-2); height: clamp(150px, 20vw, 240px); }
.oficio-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Mercado: productos que aún no puedes conseguir por nivel */
.inv-tile.locked .gimg { filter: grayscale(1) brightness(.55); }
.inv-tile.locked { opacity: .75; }
.lock-tag { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(0,0,0,.65); color: var(--muted); font-size: .7rem; }

/* ---------- Misiones (tablón) ---------- */
.mis-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 4px 0 12px; font-size: .9rem; }
.mis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mis-card { display: flex; flex-direction: column; gap: 10px; padding: 16px;
  background: linear-gradient(180deg, rgba(232,196,104,.06), transparent 40%), var(--panel); border-color: rgba(232,196,104,.25); }
.mis-card.is-running { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.mis-card h2 { font-size: 1.05rem; margin: 0 0 2px; line-height: 1.25; }
.mis-top { display: flex; gap: 12px; align-items: center; }
.mis-ico { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--gold); font-size: 1.25rem; }
.mis-text { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; flex: 1; }
.mis-rew { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; }
.mis-rew li { display: inline-flex; align-items: center; gap: 6px; }
.mis-item { flex-basis: 100%; }
.mis-item .gimg { width: 26px; height: 26px; font-size: .8rem; object-fit: contain; }
.mis-current { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; border-color: var(--gold); }
.mis-cur-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mis-cur-body > b { font-size: 1.05rem; }
.mt-s { margin-top: 6px; }
.mis-note { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.mis-note > i { color: var(--gold); }
.gmis span { font-variant-numeric: tabular-nums; }

/* ---------- Combates ---------- */
.com-me { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 14px; font-weight: 600; }
.com-me i { color: var(--gold); margin-right: 4px; }
.bad-txt { color: #ef7b7b; font-weight: 700; }
.bad-txt i { color: #ef7b7b !important; }
.com-card .mis-top > div:nth-child(2) { flex: 1; min-width: 0; }
.com-risk { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; align-self: flex-start;
  border-radius: 50%; border: 1px solid currentColor; background: rgba(0,0,0,.25); font-size: .85rem; cursor: help; }
.com-ok { color: #5fcf8a; }
.com-warn { color: #e8c468; }
.com-bad { color: #ef7b7b; }
.com-stats { display: flex; gap: 16px; font-weight: 700; font-size: .92rem; }
.com-stats i { color: var(--muted); margin-right: 4px; }
.com-pic { overflow: hidden; }
.com-pic .gimg { width: 100%; height: 100%; object-fit: cover; }

/* Barra superior: recuadros de valores */
.gbox { display: flex; align-items: center; gap: 18px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.gbox-stats .gstat i { color: var(--gold); }
.gbox-stats .gstat-lbl { color: var(--muted); font-size: .85rem; }
.gbox-stats .gstat b { font-variant-numeric: tabular-nums; }
@media (max-width: 1200px) { .gbox-stats .gstat-lbl { display: none; } }
@media (max-width: 900px) {
  .gbox { padding: 0; border: 0; background: none; gap: 12px; }
  .gbox-stats { display: none; }
}

/* Oficios con receta: cantidad a hacer */
.craft-qty { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 6px; margin-bottom: 8px; }
.craft-qty input { width: 100%; min-width: 0; text-align: center; padding: 6px 2px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: 700 1rem var(--font-body); }
.craft-qty .btn { padding: .35em 0; justify-content: center; }
.craft-qty [data-qmax] { grid-column: 1 / -1; padding: .3em 0; font-size: .85rem; }
.com-legend i { margin: 0 3px 0 8px; }
.com-legend i:first-child { margin-left: 0; }

/* Menú lateral: nivel de cada oficio en una burbuja */
.gside-lvl { margin-left: auto; min-width: 26px; padding: 1px 7px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--gold-2); font-size: .75rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.gside-link.active .gside-lvl { border-color: var(--gold); }

/* ---------- Wiki ---------- */
.wiki { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding-top: 28px; padding-bottom: 48px; align-items: start; }
.wiki-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.wiki-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); margin-bottom: 10px; }
.wiki-search i { color: var(--muted); }
.wiki-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; }
.wiki-group-title { margin: 14px 8px 6px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wiki-link { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--text); text-decoration: none !important; font-size: .95rem; }
.wiki-link i { width: 18px; text-align: center; color: var(--gold); }
.wiki-link:hover { background: var(--panel-2); }
.wiki-link.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--gold); font-weight: 700; }
.wiki-soon { margin-left: auto; font-style: normal; font-size: .65rem; font-weight: 800; text-transform: uppercase; padding: 2px 6px; border-radius: 99px; border: 1px solid var(--gold); color: var(--gold-2); }
.wiki-menu-btn { display: none; }
.wiki-main { min-width: 0; }
.wiki-main h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 6px 0 18px; }
.wiki-main h1 > i { color: var(--gold); }
.wiki-badge { font-family: var(--font-body); font-size: .75rem; font-weight: 800; letter-spacing: .06em; padding: 4px 10px; border-radius: 99px; background: var(--gold); color: #1a1408; }
.wiki-crumbs { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wiki-crumbs i { font-size: .6rem; }
.wiki-body { line-height: 1.65; }
.wiki-body h2 { margin: 30px 0 12px; font-size: 1.35rem; }
.wiki-body ul, .wiki-body ol { padding-left: 22px; }
.wiki-body li { margin: 6px 0; }
.wiki-lead { font-size: 1.08rem; color: var(--text); }
.wiki-steps li { margin: 10px 0; }
.wiki-tbl { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--border); border-radius: 12px; }
.wiki-tbl table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.wiki-tbl th { text-align: left; padding: 10px 12px; background: var(--panel-2); color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.wiki-tbl td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.wiki-tbl tr:hover td { background: rgba(255,255,255,.02); }
.wiki-it { display: inline-flex; align-items: center; gap: 6px; margin: 2px 8px 2px 0; white-space: nowrap; }
.wiki-it .gimg { width: 28px; height: 28px; object-fit: contain; font-size: .75rem; flex: 0 0 28px; }
.wiki-it b { color: var(--gold-2); }
.wiki-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; margin: 16px 0; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); }
.wiki-note > i { margin-top: 4px; color: #6fb3ef; }
.wiki-n-tip > i { color: var(--gold); }
.wiki-n-soon { border-color: var(--gold); }
.wiki-n-soon > i { color: var(--gold); }
.wiki-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.wiki-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); text-decoration: none !important; font-weight: 700; }
.wiki-card i { color: var(--gold); }
.wiki-card:hover { border-color: var(--gold); }
.wiki-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.wiki-pn a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none !important; }
.wiki-pn a:hover { border-color: var(--gold); }
.wiki-pn a small { color: var(--muted); }
.wiki-pn a.next { text-align: right; grid-column: 2; }
.warn-txt { color: #e8c468; }
.rar-txt { font-weight: 700; }
.rar-txt.rar-comun { color: #c9c9c9; } .rar-txt.rar-pococomun { color: #5fcf8a; } .rar-txt.rar-rara { color: #5aa8ef; }
.rar-txt.rar-epica { color: #b47cf0; } .rar-txt.rar-legendaria { color: #f0a03c; }
@media (max-width: 900px) {
  .wiki { grid-template-columns: 1fr; gap: 14px; padding-top: 16px; }
  .wiki-menu-btn { display: inline-flex; justify-self: start; }
  .wiki-side { display: none; position: static; max-height: none; }
  .wiki-side.open { display: block; }
}

/* ---------- Granja ---------- */
.farm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 14px 0; }
.farm-bar > span { display: inline-flex; align-items: center; gap: 6px; }
.farm-bar .gimg { width: 26px; height: 26px; object-fit: contain; font-size: .8rem; }
.farm-bar i { color: var(--gold); }
.farm-collect { margin-left: auto; }
.farm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.farm-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 16px 12px; }
.farm-card.is-full { border-color: var(--gold); }
.farm-pic { width: 84px; height: 84px; display: grid; place-items: center; }
.farm-pic .gimg { width: 84px; height: 84px; object-fit: contain; font-size: 1.6rem; }
.farm-prod { display: inline-flex; align-items: center; gap: 6px; font-size: 1.05rem; }
.farm-prod .gimg { width: 28px; height: 28px; object-fit: contain; font-size: .8rem; }
.farm-prod b { color: var(--gold-2); }
.farm-card .bar { width: 100%; }
.farm-empty { justify-content: center; border-style: dashed; color: var(--muted); text-decoration: none !important; min-height: 190px; }
.farm-empty i { font-size: 1.6rem; color: var(--gold); }
.farm-empty:hover { border-color: var(--gold); }
.farm-expand, .farm-soon { margin-bottom: 16px; }
.farm-expand h2, .farm-soon h2 { font-size: 1.1rem; margin: 0 0 10px; }
.farm-expand .mis-rew .gimg { width: 24px; height: 24px; object-fit: contain; font-size: .7rem; }
.farm-expand form { margin-top: 12px; }
.farm-soon ul { margin: 0; padding-left: 20px; }
@media (max-width: 600px) { .farm-collect { margin-left: 0; width: 100%; } .farm-collect .btn { width: 100%; } .farm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Admin · Objetos ---------- */
.tabs-wrap { flex-wrap: wrap; overflow: visible; }
.adm-obj-search { display: flex; gap: 8px; margin: 10px 0 14px; max-width: 520px; }
.adm-obj-search input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; }
.adm-mod { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--gold); color: #1a1408; font-size: .72rem; font-weight: 800; }
.adm-obj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.adm-obj { display: flex; flex-direction: column; gap: 12px; padding: 16px; scroll-margin-top: 80px; }
.adm-obj.is-mod { border-color: var(--gold); }
.adm-obj-head { display: flex; gap: 12px; align-items: center; }
.adm-obj-head > div:last-child { flex: 1; min-width: 0; }
.adm-obj-pic { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--border); display: grid; place-items: center; background: var(--panel-2); overflow: hidden; }
.adm-obj-pic .gimg { width: 100%; height: 100%; object-fit: contain; }
.adm-obj-name { width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: 700 1rem var(--font-body); margin-bottom: 3px; }
.adm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.adm-fields label, .adm-in { display: flex; flex-direction: column; gap: 3px; font-size: .78rem; color: var(--muted); }
.adm-fields input, .adm-fields select, .adm-in input, .adm-in select, .adm-prompt textarea {
  width: 100%; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: 600 .92rem var(--font-body); }
.adm-info { grid-column: 1 / -1; }
.adm-set { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 0; }
.adm-set legend { padding: 0 6px; font-size: .8rem; font-weight: 800; color: var(--gold-2); }
.adm-chk { display: inline-flex; align-items: center; gap: 5px; margin: 2px 10px 2px 0; font-size: .85rem; }
.adm-inputs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.adm-in { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: .88rem; }
.adm-in .gimg { width: 24px; height: 24px; object-fit: contain; font-size: .7rem; flex: 0 0 24px; }
.adm-in input { width: 78px; flex: 0 0 78px; margin-left: auto; }
.adm-in-new select { flex: 1; }
.adm-prompt summary { cursor: pointer; font-size: .82rem; color: var(--muted); }
.adm-prompt textarea { margin-top: 6px; resize: vertical; font-weight: 400; }
.adm-obj-actions { display: flex; gap: 8px; margin-top: auto; }
@media (max-width: 420px) { .adm-obj-grid { grid-template-columns: 1fr; } }

/* ---------- Recompensa diaria ---------- */
@keyframes dailyGlow { 0%,100% { box-shadow: 0 0 0 rgba(242,203,90,0); } 50% { box-shadow: 0 0 14px rgba(242,203,90,.75), inset 0 0 8px rgba(242,203,90,.25); } }
.gside-link.daily-ready { color: var(--gold-2); border-radius: 8px; animation: dailyGlow 1.8s ease-in-out infinite; }
.gside-link.daily-ready i { color: var(--gold-2); }
.nav-toggle.daily-dot { position: relative; }
.nav-toggle.daily-dot::after { content: ""; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 8px var(--gold-2); animation: dailyGlow 1.8s ease-in-out infinite; }
body.modal-on { overflow: hidden; }
.daily-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,7,12,.75); }
.daily-modal[hidden] { display: none; }
.daily-box { position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 22px 18px 18px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: gainIn .25s ease-out; }
.daily-box h2 { margin: 0 0 6px; font-family: var(--font-title); font-size: 1.25rem; color: var(--gold-2); }
.daily-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.daily-close:hover { color: var(--text); background: var(--panel-2); }
.daily-chest { display: block; margin: 6px auto 0; padding: 0; border: 0; background: none; cursor: pointer; width: 190px; height: 190px; }
.daily-chest:disabled { cursor: default; }
.daily-chest .gimg { width: 190px; height: 190px; object-fit: contain; display: flex; align-items: center; justify-content: center; font-size: 5rem; color: var(--gold); }
.daily-chest:not(.opened) .dc-closed .gimg { filter: drop-shadow(0 0 12px rgba(242,203,90,.55)); }
.daily-chest .dc-open, .daily-chest.opened .dc-closed { display: none; }
.daily-chest.opened .dc-open { display: block; }
.daily-chest.opened .dc-open .gimg { animation: dailyPop .35s ease-out; }
.daily-chest:not(.opened):hover .gimg { transform: scale(1.04); transition: transform .15s; }
.daily-chest.shaking .gimg { animation: dailyShake .35s ease-in-out infinite; }
@keyframes dailyShake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
@keyframes dailyPop { from { transform: scale(.85); } to { transform: scale(1); } }
.daily-hint { margin: 4px 0 10px; color: var(--muted); }
.daily-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.daily-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; opacity: 0; animation: dailyItem .4s ease-out forwards; font-size: .85rem; line-height: 1.25; }
.daily-item b { color: var(--gold-2); font-size: 1rem; }
.daily-item .gain-img, .daily-item .gain-img .gimg { width: 48px; height: 48px; flex-basis: 48px; object-fit: contain; }
.daily-item .gimg-ph { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
@keyframes dailyItem { from { opacity: 0; transform: translateY(14px) scale(.8); } to { opacity: 1; transform: none; } }

/* ---------- Popups genéricos (data-modal) y cambio de equipo ---------- */
.gmodal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,7,12,.75); }
.gmodal[hidden] { display: none; }
.gmodal-box { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 20px 16px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: gainIn .25s ease-out; }
.gmodal-box h2 { margin: 0 36px 6px 0; font-family: var(--font-title); font-size: 1.2rem; color: var(--gold-2); }
.gmodal-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.gmodal-close:hover { color: var(--text); background: var(--panel-2); }
.slot { min-width: 0; }
.slot-btns { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: auto; }
.slot-btns > * { flex: 1 1 90px; min-width: 0; }
.slot-btns .btn { white-space: nowrap; padding-left: 6px; padding-right: 6px; }
.eq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.eq-opt { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; width: 100%; }
.eq-opt.locked { opacity: .6; }
.eq-opt-img .gimg { width: 56px; height: 56px; object-fit: contain; font-size: 1.4rem; }
.eq-opt-body { flex: 1; min-width: 0; line-height: 1.3; }
.eq-opt-body .inv-stats { justify-content: flex-start; flex-wrap: wrap; margin-top: 4px; }
.eq-opt .btn { flex: 0 0 auto; }

/* ---------- Avisos en el móvil (Perfil) ---------- */
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.push-actions [hidden] { display: none; }
.push-prefs { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.push-prefs[hidden] { display: none; }
.push-prefs .check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.push-prefs .check input { width: 18px; height: 18px; accent-color: var(--gold); }
.push-prefs .btn { align-self: flex-start; }
.mis-card.is-done { opacity: .55; }
.page-intro { margin: 0 0 14px; color: var(--muted); font-size: 1.02rem; line-height: 1.5; text-align: center; font-style: italic; }
.mis-intro { margin-bottom: 14px; }

/* ---------- Desplegable de categorías (Inventario y Mercado) ---------- */
.cat-select { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.cat-select label { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.cat-select select { flex: 1; max-width: 340px; min-height: 42px; padding: 8px 36px 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d4a843' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--text); font: inherit; font-weight: 600; appearance: none; -webkit-appearance: none; cursor: pointer; }
.cat-select select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.cat-select option { background: var(--panel); color: var(--text); }
.cat-select-row { flex-wrap: nowrap; gap: 14px; margin-top: 14px; }
.cat-select-item { display: flex; align-items: center; gap: 8px; flex: 0 1 380px; min-width: 0; }
.cat-select-row select { width: 100%; min-width: 0; }
@media (max-width: 600px) {
  .cat-select-row { gap: 8px; }
  .cat-select-item { flex: 1 1 0; }
  .cat-select-row label { font-size: 0; gap: 0; }
  .cat-select-row label i { font-size: 1rem; }
  .cat-select-row select { padding-left: 8px; padding-right: 28px; background-position: right 8px center; font-size: .9rem; }
}

/* ---------- Botón de salir (formulario) ---------- */
.gbar-user-form { margin: 0; display: flex; }
button.gbar-user { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Admin: gráfica de seguridad (intentos fallidos y bloqueos) ---------- */
.sec-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; margin: 6px 0 10px; }
.sec-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sec-fail { background: #d9a441; }
.sec-block { background: #d05252; }
.sec-reg { background: #4a8fd9; }
.sec-chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-top: 16px; border-bottom: 1px solid var(--border); }
.sec-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; position: relative; }
.sec-col > span { display: block; min-height: 0; }
.sec-col > span:first-of-type { border-radius: 3px 3px 0 0; }
.sec-col:hover { background: rgba(255,255,255,.05); }
.sec-col em { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .7rem; color: var(--muted); }
.sec-axis { display: flex; gap: 2px; font-size: .68rem; color: var(--muted); margin-top: 4px; }
.sec-axis span { flex: 1; min-width: 0; text-align: center; overflow: hidden; white-space: nowrap; }
.sec-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 6px; }
.sec-table th, .sec-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.sec-table th { color: var(--muted); font-weight: 600; }
.sec-table td.n { text-align: right; font-variant-numeric: tabular-nums; }
.sec-table th.n { text-align: right; }

/* ---------- reCAPTCHA y verificación del email ---------- */
.grecaptcha-badge { z-index: 50; }
.verify-ico { font-size: 3rem; margin: 0 0 4px; }

/* ---------- Popup de resultados ("Mientras estabas fuera") ---------- */
.rep-modal .gmodal-box { max-width: 480px; }
.rep-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin: 10px 0; }
.rep-card.is-win { border-color: rgba(217,165,33,.45); }
.rep-card.is-lose { border-color: rgba(220,80,80,.45); }
.rep-head { display: flex; align-items: center; gap: 10px; }
.rep-head h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.rep-head p { margin: 2px 0 0; }
.rep-card.is-win h3 { color: var(--gold-2); }
.rep-card.is-lose h3 { color: #e07a7a; }
.rep-face { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--panel); display: flex; align-items: center; justify-content: center; }
.rep-face .gimg { width: 52px; height: 52px; object-fit: cover; font-size: 1.5rem; }
.rep-ico { font-size: 1.5rem; color: var(--gold-2); }
.rep-gains { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; }
.rep-gains .rep-up { flex-basis: 100%; color: #7fd48a; font-weight: 700; }
.rep-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 10px; }
.rep-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; font-size: .78rem; line-height: 1.2; text-align: center; }
.rep-item b { color: var(--gold-2); font-size: .95rem; }
.rep-img .gimg { width: 42px; height: 42px; object-fit: contain; font-size: 1.3rem; }
.rep-modal .btn-block { margin-top: 6px; }

/* ---------- Registro del Perfil ---------- */
.rec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rec-box { padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; }
.rec-box h3 { margin: 0 0 8px; font-size: 1rem; color: var(--gold-2); }
.rec-box dl { margin: 0; }
.rec-box dl div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--border); font-size: .92rem; }
.rec-box dl div:first-child { border-top: 0; }
.rec-box dt { color: var(--muted); }
.rec-box dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .rec-grid { grid-template-columns: 1fr; } }

/* ---------- Confirmación dentro del popup del inventario (Despiezar) ---------- */
.im-actions[hidden], .im-confirm[hidden] { display: none; }
.im-confirm { display: flex; flex-direction: column; gap: 10px; margin: 0; animation: imIn .18s ease; }
.im-confirm h3 { margin: 0; font-size: 1.05rem; color: var(--gold-2); }
.im-confirm p { margin: 0; }
.im-mats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.im-mats li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--bg-2); border: 1px solid var(--border); border-left: 3px solid var(--rar, var(--border)); border-radius: 10px; }
.im-mat-img .gimg { width: 40px; height: 40px; object-fit: contain; font-size: 1.2rem; }
.im-mat-name { flex: 1; min-width: 0; }
.im-mats b { color: var(--gold-2); font-size: 1.05rem; white-space: nowrap; }
.im-confirm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- Granja: poner, quitar y cambiar animales ---------- */
.farm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin-top: auto; }
.farm-btns .btn { padding-left: 6px; padding-right: 6px; }
button.farm-empty { width: 100%; font: inherit; cursor: pointer; background: var(--panel); }
.farm-rm-pic { display: flex; justify-content: center; margin: 4px 0 10px; }
.farm-rm-pic .gimg { width: 96px; height: 96px; object-fit: contain; font-size: 2.4rem; }
.gmodal .im-confirm-btns { margin-top: 14px; }
.gmodal .im-alert { margin-top: 10px; }

/* ---------- Ajustes para móvil: granja y panel de administración ---------- */
@media (max-width: 600px) {
  .farm-btns { grid-template-columns: 1fr; }
}
.adm-inv { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.adm-row { min-width: 0; }
.adm-row .adm-name { flex: 1; min-width: 0; }
.adm-row .adm-name b, .adm-row .adm-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-row .adm-thumb { flex: 0 0 auto; }
@media (max-width: 420px) {
  .adm-row { gap: 6px; padding: 6px 8px; }
  .adm-row .in-sm { width: 58px; }
  .adm-row .btn-sm { padding-left: 8px; padding-right: 8px; }
}

/* Panel admin en móvil: tablas de IP con scroll propio, botones que bajan de línea */
.sec-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sec-scroll .sec-table { min-width: 420px; }
.sec-scroll .sec-table td, .sec-scroll .sec-table th { white-space: nowrap; }
.card > .btn { margin-bottom: 6px; white-space: normal; }
.card p, .card code { overflow-wrap: anywhere; }

/* ---------- Santuario de Morthak ---------- */
.san-favor { border-color: var(--mood); }
.san-mood { display: flex; align-items: center; gap: 12px; }
.san-mood > i { font-size: 2.4rem; color: var(--mood); }
.san-mood b { display: block; font-size: 1.4rem; color: var(--mood); font-family: var(--font-title, inherit); }
.san-num { margin-left: auto; font-size: 1.8rem; font-weight: 800; color: var(--mood); font-variant-numeric: tabular-nums; }
.san-num small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.san-bar { position: relative; height: 14px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 99px; margin: 14px 0 10px; overflow: hidden; }
.san-bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #e05555, #e08a3c 30%, #6fcf7c 60%, #e3b341); border-radius: 99px; }
.san-bar i { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(0,0,0,.55); }
.san-effect { margin: 0 0 6px; font-weight: 700; }
.san-offer .im-mats li.is-short { border-color: rgba(224,85,85,.6); }
.san-offer .im-mats li.is-short b { color: #e07a7a; }
.san-coin { font-size: 1.6rem; width: 40px; text-align: center; display: inline-block; }
.san-extra { margin: 8px 0 0; }
.san-moods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 8px; }
.san-moodrow { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid var(--mood); border-radius: 10px; background: var(--bg-2); }
.san-moodrow > i { font-size: 1.5rem; color: var(--mood); margin-top: 2px; }
.san-moodrow p { margin: 4px 0 0; }
.san-moodrow.is-now { box-shadow: 0 0 0 1px var(--mood) inset; }
.san-punish { margin: 6px 0 0; padding-left: 18px; }
.san-punish li { margin: 4px 0; }
.rep-bolt { color: #f0c24a; }
.ok-txt { color: #7fd48a; }

/* Banners: en pantallas grandes se ven enteros (las imágenes son 3:1); en móvil se mantiene la altura fija */
@media (min-width: 601px) {
  .oficio-banner { height: auto; aspect-ratio: 3 / 1; }
}
.rec-box dt i { width: 18px; text-align: center; color: var(--gold-2); margin-right: 4px; }

/* ---------- Taberna: dados ---------- */
.tapete {
  position: relative; display: grid; gap: 10px; padding: 18px 14px; border-radius: 22px; margin-bottom: 14px;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.10), transparent 60%),
    repeating-linear-gradient(45deg, rgba(0,0,0,.035) 0 2px, transparent 2px 5px),
    radial-gradient(ellipse at center, #1f7a46 0%, #145c33 60%, #0d4325 100%);
  border: 12px solid #5b3920;
  box-shadow: inset 0 0 0 2px #c79a4b, inset 0 0 40px rgba(0,0,0,.55), 0 8px 24px rgba(0,0,0,.45);
  background-clip: padding-box;
}
.tapete::before { /* veta de la madera del borde */
  content: ""; position: absolute; inset: -12px; border-radius: 22px; pointer-events: none; z-index: -1;
  background: repeating-linear-gradient(100deg, #6b4426 0 6px, #573620 6px 11px, #7a4f2d 11px 14px);
}
.dice-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dice-who { font-size: .85rem; color: rgba(255,255,255,.85); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.dice-pair { display: flex; gap: 26px; min-height: 76px; align-items: center; }
.dice-sum { font-size: 1.6rem; color: #fff; min-width: 2ch; text-align: center; text-shadow: 0 2px 4px rgba(0,0,0,.7); }
.dice-side.is-win .dice-sum { color: #ffd76a; }
.dice-msg { text-align: center; font-weight: 800; font-size: 1.05rem; color: #fff; padding: 8px 10px; border-top: 1px dashed rgba(255,255,255,.25); border-bottom: 1px dashed rgba(255,255,255,.25); text-shadow: 0 1px 3px rgba(0,0,0,.7); min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
.dice-msg.win { color: #ffd76a; }
.dice-msg.lose { color: #ffb0b0; }
/* Dado 3D */
.dice-game { max-width: 620px; margin-left: auto; margin-right: auto; }
/* Dado 3D: .die-wrap (perspectiva + lanzamiento 2D) > .die-tilt (inclinación fija para verlo en 3D) > .die (giro) > caras + núcleo */
.die-wrap { --s: 58px; --z: 29px; width: var(--s); height: var(--s); perspective: 520px; perspective-origin: 50% 40%; }
.die-wrap.rolling { animation: diceToss 1.25s cubic-bezier(.25,.8,.3,1) both; }
.die-tilt { width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(-16deg) rotateY(-20deg); }
.die { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(0deg) rotateY(0deg); transition: transform 1.25s cubic-bezier(.2,.75,.25,1); will-change: transform; }
.die-face {
  position: absolute; inset: 0; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 16%; gap: 2px;
  background: radial-gradient(circle at 50% 50%, #fffdf6 60%, #f1e9d8 100%); border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(140,120,85,.45), inset 0 0 6px rgba(120,100,60,.18);   /* arista fina: cubo perfecto */
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
/* Núcleo: tres planos interiores del mismo marfil que tapan los huecos de las esquinas redondeadas */
.die-core { position: absolute; inset: 1px; background: #e6dcc6; }
.die-core.c2 { transform: rotateY(90deg); }
.die-core.c3 { transform: rotateX(90deg); }
.die-face i, .die-face b { display: block; border-radius: 50%; margin: 1px; }
.die-face i { background: radial-gradient(circle at 35% 35%, #555, #111); box-shadow: inset 0 1px 1px rgba(0,0,0,.4); }
.die-face.f1 i { background: radial-gradient(circle at 35% 35%, #e04848, #8a0f0f); transform: scale(1.25); }
.die-face.f1 { transform: rotateY(0deg) translateZ(var(--z)); }
.die-face.f6 { transform: rotateY(180deg) translateZ(var(--z)); }
.die-face.f2 { transform: rotateY(90deg) translateZ(var(--z)); }
.die-face.f5 { transform: rotateY(-90deg) translateZ(var(--z)); }
.die-face.f3 { transform: rotateX(90deg) translateZ(var(--z)); }
.die-face.f4 { transform: rotateX(-90deg) translateZ(var(--z)); }
@keyframes diceToss {
  0%   { transform: translate(-70px, -26px) rotate(-25deg); }
  35%  { transform: translate(-18px, 8px) rotate(8deg); }
  55%  { transform: translate(8px, -10px) rotate(-4deg); }
  75%  { transform: translate(2px, 3px) rotate(2deg); }
  100% { transform: translate(0, 0) rotate(0); }
}
.dice-side[data-side="house"] .die-wrap.rolling { animation-name: diceTossR; }
@keyframes diceTossR {
  0%   { transform: translate(70px, -26px) rotate(25deg); }
  35%  { transform: translate(18px, 8px) rotate(-8deg); }
  55%  { transform: translate(-8px, -10px) rotate(4deg); }
  75%  { transform: translate(-2px, 3px) rotate(-2deg); }
  100% { transform: translate(0, 0) rotate(0); }
}
.dice-bet-row { display: flex; align-items: center; gap: 10px; }
.dice-bet-row label { font-weight: 700; white-space: nowrap; }
.dice-bet-row input { flex: 1; min-width: 0; font-size: 1.15rem; font-weight: 700; text-align: center; }
.dice-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 6px; }
.dice-go { font-size: 1.1rem; padding-top: 12px; padding-bottom: 12px; }
.dice-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.dice-log li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--bg-2); border-left: 3px solid var(--border); }
.dice-log li.win { border-left-color: #6fcf7c; }
.dice-log li.lose { border-left-color: #e05555; }
.dice-log li b.win { color: #6fcf7c; } .dice-log li b.lose { color: #e07a7a; }
@media (min-width: 700px) {
  .die-wrap { --s: 70px; --z: 35px; }
  .dice-pair { min-height: 90px; gap: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .die-wrap.rolling { animation: none; }
  .die { transition-duration: .2s; }
}

/* Clases aún no disponibles al crear personaje */
.class-card.is-soon { cursor: not-allowed; }
.class-card.is-soon .class-in { position: relative; }
.class-card.is-soon .class-in > :not(.class-soon) { filter: grayscale(.9); opacity: .45; }
.class-card.is-soon:hover .class-in { border-color: var(--border); }
.class-soon { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg); padding: 5px 8px; background: rgba(10,12,18,.88); border: 2px solid var(--gold); color: var(--gold-2); font-weight: 800; font-size: clamp(.62rem, 2.6vw, .9rem); letter-spacing: .05em; border-radius: 8px; white-space: nowrap; max-width: 92%; overflow: hidden; }

/* ---------- Tutorial y logros ---------- */
.tut-modal .gmodal-box { max-width: 560px; }
.tut-lead { margin: 4px 0 12px; color: var(--text); line-height: 1.45; }
.tut-kicker { margin: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.tut-medal { position: relative; flex: 0 0 auto; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f6d873, #b8860b 70%); box-shadow: 0 0 0 3px rgba(224,176,48,.25), 0 6px 16px rgba(0,0,0,.4); }
.tut-medal > i { font-size: 1.6rem; color: #5a3d00; }
.tut-medal .gimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tut-medal .gimg-ph { display: none; }
.tut-logro { display: flex; gap: 14px; align-items: flex-start; padding: 12px; margin-bottom: 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(224,176,48,.16), rgba(224,176,48,.04)); border: 1px solid rgba(224,176,48,.45); animation: gainIn .4s ease-out; }
.tut-logro .tut-medal { width: 76px; height: 76px; animation: tutShine 1.6s ease-in-out 2; }
.tut-logro h3 { margin: 2px 0 6px; font-family: var(--font-title); color: var(--gold-2); font-size: 1.15rem; }
.tut-logro > div { flex: 1; min-width: 0; }
@keyframes tutShine { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.08) rotate(-6deg); } }
.tut-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.tut-head h2 { margin: 2px 0 0 !important; }
.tut-event { margin: 6px 0 12px; padding: 10px 12px; border-radius: 10px; background: rgba(201,74,74,.14); border: 1px solid rgba(201,74,74,.45); line-height: 1.45; }
.tut-event i { color: var(--red); }
.tut-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tut-step { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.tut-step p { margin: 3px 0 0; }
.tut-step-body { flex: 1; min-width: 0; }
.tut-dot { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); color: var(--muted); font-size: .8rem; }
.tut-step.is-done { opacity: .7; }
.tut-step.is-done .tut-dot { background: var(--green); color: #fff; }
.tut-step.is-done p { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.3); }
.tut-step.is-now { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(224,176,48,.3); }
.tut-step.is-now .tut-dot { background: var(--gold); color: #2a1d00; }
.tut-step.is-next { opacity: .5; }
.tut-goals { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tut-goal { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); min-width: 0; }
.tut-goal.ok { border-color: var(--green); }
.tut-goal-img { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; }
.tut-goal-img .gimg { width: 40px; height: 40px; object-fit: contain; }
.tut-goal-txt { display: flex; flex-direction: column; font-size: .8rem; line-height: 1.25; color: var(--text); }
.tut-goal-txt b { color: var(--gold-2); font-size: .9rem; }
.tut-goal.ok .tut-goal-txt b { color: var(--green); }
.tut-go { margin-top: 2px; }
.tut-reward { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); font-size: .85rem; }
.tut-rw-item { display: inline-flex; align-items: center; gap: 4px; }
.tut-rw-item .gimg { width: 24px; height: 24px; object-fit: contain; }
.tut-skip { margin-top: 12px; font-size: .85rem; color: var(--muted); }
.tut-skip summary { cursor: pointer; }
.tut-skip form { margin-top: 6px; }
.tut-ok { width: 100%; margin-top: 14px; }
.tut-modal .btn { text-decoration: none; }
.tut-pill { position: fixed; left: 16px; bottom: 16px; z-index: 74; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
  border-radius: 999px; border: 1px solid var(--gold); background: var(--panel); color: var(--gold-2); font-weight: 700; font-size: .85rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.45); cursor: pointer; animation: gainIn .3s ease-out; }
.tut-pill:hover { background: var(--panel-2); }
.tut-pill.tut-glow { background: rgba(224,176,48,.18); animation: dailyGlow 1.8s ease-in-out infinite; }
@media (min-width: 901px) { .tut-pill { left: auto; right: 16px; bottom: 16px; } }
@media (max-width: 900px) { .tut-pill { bottom: calc(var(--bnav-h, 64px) + 12px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 600px) {
  .tut-logro { flex-direction: column; align-items: center; text-align: center; }
  .tut-logro .rep-gains { justify-content: center; }
  .tut-goal { flex: 1 1 140px; }
}
@media (min-width: 901px) { body:has(.tut-pill) .gain-pops { bottom: 70px; } }
.tut-goal-img .gimg-ph { width: 40px; height: 40px; font-size: 1.1rem; }
.tut-rw-item .gimg-ph { width: 24px; height: 24px; font-size: .8rem; }
.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 260; pointer-events: none; }
.tut-final { text-align: center; margin-bottom: 14px; }
.tut-final-icon { margin: 0; font-size: 2.6rem; color: var(--gold-2); animation: tutShine 1.6s ease-in-out 2; }
.tut-final h2 { margin: 6px 0 4px !important; }
.tut-next { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.tut-next li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); }
.tut-next li > i { width: 18px; text-align: center; color: var(--muted); }
.tut-next li.ok { border-color: var(--green); }
.tut-next li.ok > i { color: var(--green); }

/* ---------- Huerto ---------- */
.garden-crops { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.garden-crop { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border); }
.garden-crop.is-locked { opacity: .55; }
.garden-crop-img { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; }
.garden-crop-img .gimg { width: 44px; height: 44px; object-fit: contain; }
.garden-plant-btns { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Logros ---------- */
.lg-medal { position: relative; flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4a4a52, #26262c 70%); color: #77777f; box-shadow: 0 0 0 2px rgba(255,255,255,.06); }
.lg-medal i { font-size: 1.2rem; }
.lg-medal.big { width: 58px; height: 58px; }
.lg-medal.big i { font-size: 1.45rem; }
.lg-medal.t1 { background: radial-gradient(circle at 35% 30%, #f0b27a, #a0522d 70%); color: #4a2408; box-shadow: 0 0 0 3px rgba(205,127,50,.3), 0 4px 10px rgba(0,0,0,.35); }
.lg-medal.t2 { background: radial-gradient(circle at 35% 30%, #ffffff, #9ea7b0 70%); color: #3b434b; box-shadow: 0 0 0 3px rgba(192,192,192,.3), 0 4px 10px rgba(0,0,0,.35); }
.lg-medal.t3 { background: radial-gradient(circle at 35% 30%, #f6d873, #b8860b 70%); color: #5a3d00; box-shadow: 0 0 0 3px rgba(224,176,48,.35), 0 4px 12px rgba(0,0,0,.4); }
.lg-tier { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.lg-tier.t1 { background: rgba(205,127,50,.2); color: #e6a066; }
.lg-tier.t2 { background: rgba(192,192,192,.18); color: #d6dbe0; }
.lg-tier.t3 { background: rgba(224,176,48,.2); color: var(--gold-2); }
.lg-summary { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.lg-summary-medals { display: flex; gap: 14px; }
.lg-summary-medals span { display: inline-flex; align-items: center; gap: 6px; font-size: 1.1rem; }
.lg-summary-medals .lg-medal { width: 38px; height: 38px; }
.lg-summary-medals .lg-medal i { font-size: 1rem; }
.lg-summary-bar { flex: 1 1 220px; min-width: 0; }
.lg-group { margin-top: 18px; }
.lg-group h2 { font-size: 1.1rem; margin: 0 0 10px; }
.lg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.lg-card { display: flex; gap: 12px; align-items: center; padding: 12px; margin: 0; }
.lg-card:not(.is-done) { opacity: .75; }
.lg-card .tut-medal { width: 48px; height: 48px; }
.lg-card .tut-medal > i { font-size: 1.2rem; }
.lg-card .tut-medal.is-off { background: radial-gradient(circle at 35% 30%, #4a4a52, #26262c 70%); box-shadow: none; }
.lg-card .tut-medal.is-off > i { color: #77777f; }
.lg-body { flex: 1; min-width: 0; }
.lg-body .bar { margin: 6px 0 2px; }
.lg-pips { display: flex; flex-direction: column; gap: 3px; font-size: .55rem; }
.lg-pips i { color: rgba(255,255,255,.12); }
.lg-pips i.on.t1 { color: #cd7f32; }
.lg-pips i.on.t2 { color: #c0c0c0; }
.lg-pips i.on.t3 { color: var(--gold); }
.lg-modal .gmodal-box { max-width: 480px; }
.lg-new { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lg-new li { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; animation: gainIn .4s ease-out both;
  background: linear-gradient(135deg, rgba(224,176,48,.14), rgba(224,176,48,.03)); border: 1px solid rgba(224,176,48,.35); }
.lg-new li:nth-child(2) { animation-delay: .1s; } .lg-new li:nth-child(3) { animation-delay: .2s; } .lg-new li:nth-child(4) { animation-delay: .3s; }
.lg-new li > div { flex: 1; min-width: 0; }

/* ---------- Modo mantenimiento ---------- */
.maint-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; border-color: var(--gold); }
.maint-box > i { font-size: 1.8rem; color: var(--gold-2); margin-top: 2px; }
.maint-box p { margin: 4px 0 0; }
.maint-admin { margin-bottom: 16px; }
.maint-admin.is-on { border-color: var(--red); box-shadow: 0 0 0 1px rgba(201,74,74,.35); }
.maint-admin h2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.maint-state { font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: var(--bg-2); color: var(--muted); }
.maint-admin.is-on .maint-state { background: rgba(201,74,74,.2); color: #ff8a8a; }
.maint-admin textarea { width: 100%; margin: 4px 0 10px; }
.gbar-maint { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(201,74,74,.2); color: #ff8a8a; font-size: .8rem; font-weight: 700; text-decoration: none; }
.alert.alert-warn { background: rgba(224,176,48,.12); border-color: rgba(224,176,48,.5); color: var(--gold-2); }
.maint-admin textarea { display: block; background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; resize: vertical; }
.garden-yield { color: var(--gold-2); font-weight: 700; }

/* Recaudador de impuestos */
.tax-modal .gmodal-box { max-width: 440px; text-align: center; }
.tax-pic { width: 150px; height: 150px; margin: 0 auto 6px; }
.tax-pic img, .tax-pic .gimg { width: 100%; height: 100%; object-fit: contain; }
.tax-pic .gimg-ph { display: flex; align-items: center; justify-content: center; font-size: 56px; border-radius: 50%; }
.tax-modal h2 { margin: 4px 0 8px; font-size: 1.25rem; }
.tax-modal .im-confirm-btns { justify-content: center; display: flex; }
.tax-paid { font-size: 1.6rem; font-weight: 700; color: #e05a4a; margin: 10px 0 4px; animation: gainIn .4s ease-out both; }
.tax-thanks { font-style: italic; color: var(--gold, #e0b030); margin: 12px 0; }

/* Efectos activos (pociones, lucky mojo) */
.buff-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.buff-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .85rem;
  background: rgba(224,176,48,.12); border: 1px solid rgba(224,176,48,.35); color: var(--gold, #e0b030); }
.buff-chip.buff-mojo { background: rgba(80,190,110,.12); border-color: rgba(80,190,110,.4); color: #6fd38a; }
.im-note { margin: 6px 0 0; color: var(--muted, #9aa); line-height: 1.35; }
/* Popup de premios (tesoro, cofre sorpresa) */
.prize-modal .gmodal-box { max-width: 440px; text-align: center; }
.prize-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; text-align: left; }
.prize-list li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.04); animation: gainIn .35s ease-out both; }
.prize-list li > .gimg, .prize-list li > img { width: 36px !important; height: 36px !important; min-width: 36px; object-fit: contain; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 18px !important; border-radius: 8px; }
.prize-list li > .gimg i { font-size: 18px !important; }
.prize-list li span { flex: 1; }
.prize-list li b { color: var(--gold, #e0b030); }
.prize-modal .im-confirm-btns { display: flex; justify-content: center; }

/* Santuario: trueque de maná */
.san-mana { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.san-mana-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: rgba(255,255,255,.05); }
.san-mana-chip img, .san-mana-chip .gimg { width: 26px; height: 26px; object-fit: contain; font-size: 14px; }

/* Perfil › Opciones */
.opt-list { display: grid; gap: 4px; }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border, rgba(255,255,255,.08)); cursor: pointer; }
.opt-row:last-of-type { border-bottom: 0; }
.opt-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(224,176,48,.12); color: var(--gold, #e0b030); flex: none; }
.opt-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.switch { position: relative; display: inline-block; vertical-align: middle; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.15); transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--gold, #e0b030); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--gold, #e0b030); outline-offset: 2px; }

/* Menú lateral: personaje con círculo de progreso del nivel */
.gside-hero { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 14px; margin: 0 0 4px; border-radius: 12px; color: var(--text); text-decoration: none !important; border-bottom: 1px solid var(--border); }
.gside-hero:hover { background: var(--panel); }
.gside-hero.active { background: var(--panel-2); }
.hero-ring { flex: none; width: 112px; height: 112px; margin-bottom: 12px; }
.hero-ring .ring-fg { stroke-dasharray: 276.46; transition: stroke-dashoffset .6s ease; }
.hero-face { inset: 12px; }
.gside-hero .hero-face .gimg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(3); transform-origin: 50% 2%; }
.hero-lvl { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); min-width: 30px; height: 26px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center; font: 700 .85rem var(--font-body); background: var(--gold); color: #1a1408; border: 3px solid var(--bg-2); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.hero-name { font-weight: 700; }
.hero-sub { font-size: .75rem; color: var(--muted); }

/* Perfil › Cuenta */
.acc-block { border-bottom: 1px solid var(--border, rgba(255,255,255,.08)); padding: 12px 4px; }
.acc-block:last-child { border-bottom: 0; }
.acc-block > summary, .acc-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; list-style: none; cursor: pointer; }
.acc-row { cursor: default; }
.acc-block > summary::-webkit-details-marker { display: none; }
.acc-block > summary .btn { flex: none; pointer-events: none; }
.acc-txt { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.acc-txt small b { word-break: break-all; }
.acc-form { display: grid; gap: 10px; margin-top: 12px; max-width: 420px; }
.acc-form label { display: grid; gap: 4px; font-size: .9rem; }
.acc-form input { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: 1rem var(--font-body); }
.acc-form .btn { justify-self: start; }
.acc-danger summary b { color: #e66; }
.code-input { text-align: center; font-size: 1.6rem; letter-spacing: .35em; }
.linkish { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; cursor: pointer; font: inherit; }
@media (max-width: 600px) { .acc-block > summary, .acc-row { flex-direction: column; align-items: flex-start; } }

/* Traducción automática (Google): sin barra superior, sin resaltados ni globos */
body { top: 0 !important; }
iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font { background: none !important; box-shadow: none !important; }
#gt-el { display: none !important; }
.opt-lang select { flex: none; max-width: 210px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: 1rem var(--font-body); }
.lang-ai { margin-top: 2px; }
@media (max-width: 600px) { .opt-lang { flex-wrap: wrap; } .opt-lang select { max-width: none; width: 100%; } }
.opt-lang { border-top: 1px solid var(--border, rgba(255,255,255,.08)); }

/* ---------- Jefes mundiales ---------- */
.wb-card { display: flex; gap: 20px; align-items: flex-start; border-color: var(--gold); }
.wb-card.is-fighting { box-shadow: 0 0 0 1px var(--gold), 0 0 24px rgba(224, 176, 48, .25); }
.wb-pic { flex: 0 0 180px; width: 180px; height: 180px; display: grid; place-items: center; border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, var(--panel-2), var(--bg-2)); font-size: 64px; color: var(--gold); overflow: hidden; }
.wb-pic .gimg { width: 100%; height: 100%; object-fit: contain; }
.wb-body { flex: 1; min-width: 0; }
.wb-body h2 { margin: 4px 0 6px; }
.wb-state { display: inline-flex; gap: 6px; align-items: center; color: var(--gold-2); font-weight: 600; font-size: .9rem; }
.wb-times { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0; }
.wb-times i { color: var(--gold); }
.wb-rew { margin: 8px 0 14px; }
.wb-players { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; }
.wb-players li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--panel-2); }
.wb-face { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--bg-2); border: 2px solid var(--border); display: grid; place-items: center; }
.wb-players li.me .wb-face { border-color: var(--gold); }
.wb-face .gimg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(3); transform-origin: 50% 2%; }
.wb-face .gimg-ph { transform: none; font-size: 16px; }
.wb-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.wb-players li.me { box-shadow: inset 3px 0 0 var(--gold); }
.wb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.wb-mini { display: flex; gap: 12px; align-items: center; padding: 12px; }
.wb-mini > div:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wb-mini.is-locked { opacity: .55; }
.wb-mini-pic { flex: 0 0 52px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--panel-2); color: var(--gold); font-size: 22px; overflow: hidden; }
.wb-mini-pic .gimg { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 640px) {
  .wb-card { flex-direction: column; align-items: center; text-align: center; }
  .wb-times, .wb-rew { justify-content: center; }
}

.wb-admin { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.wb-admin label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.wb-admin select { flex: 1; max-width: 340px; min-height: 42px; padding: 8px 36px 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d4a843' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--text); font: inherit; font-weight: 600; appearance: none; -webkit-appearance: none; cursor: pointer; min-width: 260px; }

/* ---------- Durabilidad del equipo ---------- */
.slot-img, .eq-opt-img { position: relative; }
.dur-bubble { position: absolute; top: -7px; right: -7px; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  font-size: .72rem; font-weight: 700; line-height: 1; color: #fff; border: 2px solid var(--bg); z-index: 2; }
.dur-bubble.dur-ok { background: #2f9e55; }
.dur-bubble.dur-mid { background: #d4a106; color: #1b1406; }
.dur-bubble.dur-low { background: #c8322f; }
.repair-list .dur-bubble, .eq-repair .dur-bubble { position: static; display: inline-grid; vertical-align: middle; margin-left: 4px; }
.eq-repair { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; }
.eq-repair > span:first-child { flex: 1 1 320px; color: var(--muted); font-size: .9rem; }
.eq-repair > span:first-child i { color: var(--gold); }
.repair-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.repair-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--panel-2); }
.repair-total { font-size: 1.05rem; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.im-dur { margin: 6px 0 0; }
.dur-txt-ok i { color: #2f9e55; } .dur-txt-mid i { color: #d4a106; } .dur-txt-low { color: #e0605c; }
.dur-bubble i { font-size: .62rem; margin-right: 2px; }
.dur-bubble { grid-auto-flow: column; gap: 1px; }
.inv-tile .dur-bubble { top: auto; bottom: -7px; right: -7px; }
.adm-log-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.adm-log-head h2 { margin: 0; }

/* ---------- Avisos (flash) en popup ---------- */
.flash-modal .gmodal-box { max-width: 420px; text-align: center; padding-top: 24px; }
.flash-modal h2 { margin: 6px 0 8px; }
.fm-icon { font-size: 2.6rem; line-height: 1; }
.flash-modal-ok .fm-icon { color: #4caf6a; }
.flash-modal-warn .fm-icon { color: var(--gold); }
.flash-modal-error .fm-icon { color: #e0605c; }
.fm-list { list-style: none; margin: 6px 0 16px; padding: 0; display: grid; gap: 8px; font-size: 1rem; }
.fm-list li { display: flex; gap: 8px; justify-content: center; align-items: baseline; }
.fm-list li.fm-ok i { color: #4caf6a; } .fm-list li.fm-warn i { color: var(--gold); } .fm-list li.fm-error i { color: #e0605c; }

/* Logo de créditos al final de la barra lateral (abre #credits-modal) */
.gside-credits { display: block; width: 100%; margin: 18px 0 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--border); background: transparent; cursor: pointer; text-align: center; }
.gside-credits img { width: 120px; height: 120px; border-radius: 12px; opacity: .8; transition: opacity .2s, transform .2s; }
.gside-credits:hover img, .gside-credits:focus-visible img { opacity: 1; transform: scale(1.04); }
.credits-modal .gmodal-box { max-width: 420px; text-align: center; }
.credits-modal .gmodal-box h2 { margin: 6px 0 8px; }
.credits-modal .credits-logo { width: 160px; height: 160px; border-radius: 14px; }
.credits-modal p { margin: 0 0 16px; line-height: 1.5; }

/* ==========================================================
   Portada de Damned Crown (App/pages/home.php) · prefijo dc-
   ========================================================== */
.brand-logo img { height: 52px; width: auto; border-radius: 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.dc-eyebrow { margin: 0 0 8px; font: 700 .78rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

.dc-hero { position: relative; background: #07080c; border-bottom: 1px solid var(--border); }
.dc-hero-art { position: relative; max-width: 1800px; margin: 0 auto; }
.dc-hero-art img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; }
.dc-hero-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 35%; background: linear-gradient(180deg, transparent, #07080c); pointer-events: none; }
.dc-hero-art .gimg { display: block; width: min(320px, 70%); margin: 30px auto; }
.dc-hero-panel { position: relative; z-index: 2; margin: -70px auto 0; max-width: 900px; text-align: center; padding: 30px 28px 26px;
  background: linear-gradient(180deg, rgba(28,33,44,.96), rgba(22,26,35,.98)); border: 1px solid rgba(224,176,48,.45); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(242,203,90,.15); }
.dc-hero-panel h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); margin-bottom: .4em; background: linear-gradient(180deg, #fff3c4, var(--gold-2) 55%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dc-hero-panel .lead { max-width: 720px; margin-inline: auto; }
.dc-hero-panel .hero-cta, .dc-hero-panel .hero-points { justify-content: center; }
.dc-hero-panel .maint-box { text-align: left; }
.dc-hero + .section { padding-top: 64px; }

.dc-lore { background:
    radial-gradient(900px 420px at 15% 20%, rgba(201,74,74,.12), transparent 60%),
    radial-gradient(900px 420px at 90% 80%, rgba(59,111,182,.14), transparent 60%), var(--bg); }
.dc-lore-in { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.dc-lore-text p { color: #d6d0c1; font-size: 1.05rem; }
.dc-lore-text b { color: #f4ecd6; }
.dc-lore-end { font-family: var(--font-title); color: var(--gold-2) !important; font-size: 1.15rem !important; margin-top: 1.4em; }
.dc-oath { text-align: center; padding: 34px 26px; border-radius: 18px; border: 1px solid rgba(224,176,48,.4);
  background: linear-gradient(180deg, rgba(59,111,182,.18), rgba(28,33,44,.9)); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.dc-oath > i { font-size: 2.2rem; color: var(--gold-2); margin-bottom: 14px; }
.dc-oath blockquote { margin: 0 0 14px; font: 400 1.2rem/1.5 var(--font-title); color: #f4ecd6; }
.dc-oath p { margin: 0; color: var(--muted); font-size: .9rem; }

.dc-classes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 26px; }
.dc-class { display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.dc-class:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 14px 34px rgba(0,0,0,.45); }
.dc-class-img { aspect-ratio: 4 / 5; background: radial-gradient(circle at 50% 35%, rgba(224,176,48,.22), transparent 65%), var(--bg-2); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.dc-class-img .gimg { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.dc-class-img .gimg-ph { display: grid; place-items: center; font-size: 4rem; color: var(--muted); }
.dc-class-body { padding: 14px 14px 16px; display: flex; flex-direction: column; flex: 1; }
.dc-class-body h3 { margin: 0 0 2px; }
.dc-class-body h3 i { color: var(--gold); font-size: .95em; }
.dc-class-title { margin: 0 0 8px; color: var(--gold-2); font-size: .82rem; font-style: italic; }
.dc-class-body p:not(.dc-class-title) { color: var(--muted); font-size: .92rem; margin: 0 0 12px; }
.dc-class-bonus { margin-top: auto; align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--gold-2); background: rgba(224,176,48,.12); border: 1px solid rgba(224,176,48,.4); }
.dc-more { margin: 22px 0 0; }
.dc-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dc-boss-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.dc-boss { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--red); }
.dc-boss > i { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; color: #ffd9d9; background: rgba(201,74,74,.2); border: 1px solid rgba(201,74,74,.5); }
.dc-boss h3 { margin: 0 0 4px; font-size: 1rem; }
.dc-boss h3 span { font: 700 .75rem var(--font-body); color: var(--gold-2); margin-left: 6px; white-space: nowrap; }
.dc-boss p { margin: 0; color: var(--muted); font-size: .92rem; }

.dc-cta { padding: 64px 0 72px; }
.dc-cta-logo { display: block; width: min(460px, 90%); margin: 0 auto 18px; filter: drop-shadow(0 10px 24px rgba(0,0,0,.6)); }

@media (max-width: 1000px) {
  .dc-classes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dc-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-lore-in { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .brand-logo img { height: 42px; }
  .dc-hero-art img { aspect-ratio: 16 / 9; }      /* en el móvil se recortan los lados y se ve el título */
  .dc-hero-panel { margin-top: -30px; padding: 22px 16px 20px; }
  .dc-classes { grid-template-columns: 1fr; }
  .dc-class { flex-direction: row; }
  .dc-class-img { flex: 0 0 120px; aspect-ratio: auto; }
  .dc-features { grid-template-columns: 1fr; }
  .dc-boss-grid { grid-template-columns: 1fr; }
}

/* Selector de idioma de la cabecera pública (App/idioma.php · lang_picker_html) */
.topbar-in > .brand { margin-right: auto; }
.topbar-in > .pubnav { order: 2; }
.lang-pick { order: 3; position: relative; display: flex; align-items: center; margin: 0; }
.lang-pick > i { position: absolute; left: 11px; color: var(--gold); pointer-events: none; font-size: .95rem; }
.lang-pick select { appearance: none; -webkit-appearance: none; height: 40px; padding: 0 30px 0 32px; border-radius: 10px; cursor: pointer;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239aa3b2'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--text); border: 1px solid var(--border); font: 700 .9rem var(--font-body); }
.lang-pick select:hover, .lang-pick select:focus { border-color: var(--gold); outline: none; }
.lang-pick select option { background: var(--panel); color: var(--text); }
@media (max-width: 760px) {
  .topbar-in > .nav-toggle { order: 4; }
  .lang-pick select { height: 42px; max-width: 132px; }
}
