/* Dragon Ball: tinta azul, naranja del gi y papel de entrenamiento. */
:root {
    --db-bg: #173640;
    --db-bg-2: #142936;
    --db-surface: #fff5df;
    --db-paper: #f8e8c5;
    --db-border: #d8c5a1;
    --db-text: #203747;
    --db-muted: #626d70;
    --db-orange: #f58327;
    --db-orange-dark: #b64c12;
    --db-gold: #ffce62;
    --db-blue: #276399;
    --db-red: #bc3c2b;
    --db-correct: #38744e;
    --db-partial: #f0bc4c;
    --db-incorrect: #b94d40;
    --db-unknown: #6f7e86;
    --db-radius: 14px;
    --db-shadow: 0 5px 0 #142d36, 0 14px 34px #071c2a40;
}
/* Paleta opcional (Ajustes): azul / ámbar / teja en vez de verde / amarillo / rojo.
   El color nunca va solo: cada casilla lleva también ✓ ≈ × ?. */
html.accessible-palette {
    --db-correct: #005a9c;
    --db-partial: #f2a900;
    --db-incorrect: #9c3b00;
    --db-unknown: #4b5563;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 22px; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--db-bg); color: var(--db-text);
    font-family: 'Nunito', system-ui, sans-serif; font-size: 15px; line-height: 1.6;
    isolation: isolate;
}
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: url('../img/world-background.svg') center top / cover no-repeat; pointer-events: none; }
a { color: var(--db-blue); }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--db-orange); outline-offset: 5px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, .db-wordmark, .db-footer-brand { font-family: 'Bangers', Impact, sans-serif; font-weight: 400; letter-spacing: .025em; }
.db-skip-link { position: fixed; top: -100px; left: 16px; z-index: 300; padding: 10px 18px; background: var(--db-surface); color: var(--db-text); border-radius: 6px; }
.db-skip-link:focus { top: 12px; }
.db-header { position: relative; z-index: 50; background: linear-gradient(180deg, #1c3442, #112632); border-bottom: 3px solid var(--db-orange); box-shadow: 0 3px 16px #081d3650; }
.db-header::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(125deg, transparent 0 64px, #ffffff03 65px 66px); }
.db-header-inner { max-width: 1500px; min-height: 104px; margin: auto; padding: 10px 32px; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: 'nav logo .'; align-items: center; gap: 25px; position: relative; }
.db-brand { grid-area: logo; display: flex; align-items: center; justify-content: center; gap: 11px; text-decoration: none; }
.db-brand-logo { display: block; width: 320px; max-width: 100%; height: auto; }
.db-footer-brand .db-brand-logo { width: 240px; }
@media (max-width: 600px) { .db-brand .db-brand-logo { width: 270px; } }
.db-wordmark { display: flex; flex-direction: column; align-items: center; line-height: .95; transform: skew(-5deg); }
.db-wordmark > span { font-size: 37px; color: var(--db-gold); -webkit-text-stroke: 1px #f58226; text-shadow: 2px 3px 0 #8c3219; }
.db-wordmark strong { font-size: 26px; color: #fff3dd; font-weight: 400; letter-spacing: .14em; padding-left: .14em; margin-top: 4px; text-shadow: 2px 2px #091d29; }
.db-dragon-ball { display: inline-grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #ffe99a, #ffbd41 40%, #f48618 75%, #ba4e12); border: 1px solid #f1b044; box-shadow: inset -3px -4px 6px #a4481260, inset 2px 2px 4px #fff7c9b0, 0 0 16px #ffab2525; color: #b33c1f; }
.db-dragon-ball > span { font: 10px/1.15 Arial, sans-serif; text-align: center; }
.db-brand-ball { width: 53px; height: 53px; }
.db-brand-ball > span { font-size: 14px; }
.db-nav { grid-area: nav; display: flex; gap: 7px; }
.db-nav a { display: flex; align-items: center; gap: 7px; min-height: 39px; padding: 8px 13px; border: 1px solid #4b626c; border-radius: 7px; background: linear-gradient(#324957, #233b49); color: #e5e7df; text-decoration: none; font-size: 12px; font-weight: 900; box-shadow: 0 3px 0 #0b202d; white-space: nowrap; transition: background .15s, border-color .15s; }
.db-nav-icon { display: block; width: 24px; height: 24px; flex: 0 0 24px; }
.db-nav a { padding-top: 6px; padding-bottom: 6px; }
.db-nav a.active { border-color: var(--db-orange); background: linear-gradient(#8e4e27, #663c26); color: #fff7e6; }
.db-nav a:hover { border-color: #fac077; background: #3f5359; }
.db-utility-bar { width: min(1060px, calc(100% - 40px)); margin: 18px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #d6ded4; }
.db-lang { position: relative; z-index: 20; flex: 0 0 auto; }
.db-lang-btn, .db-network a { min-height: 38px; }
.db-lang-btn { display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px 7px; border: 1px solid #78918e60; border-radius: 30px; background: #112c37d9; box-shadow: 0 3px 10px #132f3520; color: #fff6e4; font: 800 11px/1.2 'Nunito', system-ui, sans-serif; cursor: pointer; }
.db-lang-btn:hover, .db-lang.is-open .db-lang-btn { border-color: #f6ca79; }
.db-lang-btn:focus-visible { outline: 2px solid #f6ca79; outline-offset: 2px; }
.db-lang-flag, .db-lang-option img { width: 28px; height: 19px; border-radius: 3px; object-fit: cover; box-shadow: 0 1px 2px #0000008c; }
.db-lang-arrow { font-size: 10px; color: #f6ca79; transition: transform .18s ease; }
.db-lang.is-open .db-lang-arrow { transform: rotate(180deg); }
.db-lang-list { position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px; margin: 0; padding: 6px; list-style: none; border: 1px solid #78918e60; border-radius: 14px; background: linear-gradient(180deg, #173640, #112c37); box-shadow: 0 12px 28px #071c2a80; }
.db-lang-list[hidden] { display: none; }
.db-lang-option { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: #e5e9dc; font-weight: 800; font-size: 13px; text-decoration: none; }
.db-lang-option:hover, .db-lang-option:focus-visible { color: #fff; background: #f5832729; outline: none; }
.db-lang-option.is-current { color: #f6ca79; background: #f583271a; }
.db-network { display: flex; align-items: center; gap: 7px; }
.db-network > span { font-size: 11px; margin-right: 5px; }
.db-network a { display: flex; align-items: center; gap: 7px; min-height: 38px; border: 1px solid #78918e50; padding: 3px 12px 3px 4px; border-radius: 30px; background: #112c37d9; color: #e5e9dc; font-size: 11px; text-decoration: none; font-weight: 800; transition: border-color .18s, color .18s, transform .18s; }
.db-network a:hover { border-color: #f6ca79; color: #f6ca79; transform: translateY(-1px); }
.db-network a img { display: block; width: 30px; height: 30px; border-radius: 9px; object-fit: cover; }
/* El hueco bajo el contenido (40px) es el mismo que deja «¿Quieres más?» antes del pie
   (.db-other-games): sin el margen del último bloque, que lo descuadraría según la página. */
.db-main { flex: 1; width: min(1060px, 100%); margin: 0 auto; padding: 25px 20px 40px; }
.db-main > :last-child { margin-bottom: 0; }
.db-hero { text-align: center; margin: 4px 0 30px; color: #fcf2da; }
.db-series { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 14px; color: #d9d9bd; font-weight: 900; font-size: 11px; }
.db-series::before, .db-series::after { content: ''; width: 36px; height: 1px; background: #d4bb7d70; }
.db-series span + span::before { content: '✦'; margin-right: 12px; color: var(--db-orange); font-size: 9px; }
.db-hero h1 { color: #ffce70; text-shadow: 2px 3px 0 #743818, 0 4px 16px #112c37; font-size: clamp(2.25rem, 4.5vw, 3.5rem); line-height: 1.1; margin: 0 0 13px; }
.db-hero > p { max-width: 720px; margin: 0 auto; color: #e0e5d9; font-size: 14px; line-height: 1.7; text-wrap: pretty; }
.countdown-timer { font-variant-numeric: tabular-nums; }
.db-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 17px; color: #f8ebcd; }
.db-section-heading h2 { font-size: 25px; margin: 0 0 1px; }
.db-section-heading p { font-size: 12px; margin: 0; color: #c3d0c6; }
.db-section-icon { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid #a1ac8350; border-radius: 10px; color: #f3c374; background: #24434d80; font-size: 21px; }
.db-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.db-mode-card { --card-accent: #ad5319; display: flex; flex-direction: column; align-items: center; width: 100%; padding: 20px 23px; font: inherit; text-align: center; color: var(--db-text); background: radial-gradient(ellipse at 50% 28%, #fffcf0, transparent 68%), var(--db-surface); border: 2px solid #243f49; border-top: 4px solid var(--card-accent); border-radius: 14px; box-shadow: var(--db-shadow); position: relative; transition: transform .18s, box-shadow .18s; }
a.db-mode-card { text-decoration: none; }
.db-mode-art { height: 132px; width: 100%; display: grid; place-items: center; position: relative; margin-bottom: 3px; }
.db-mode-title { font-family: 'Bangers', Impact, sans-serif; letter-spacing: .025em; font-size: 27px; line-height: 1.15; margin: 3px 0 9px; }
.db-mode-desc { color: var(--db-muted); font-size: 12px; line-height: 1.65; margin: 0 0 21px; flex: 1; text-wrap: pretty; }
.db-mode-card .db-card-play { align-self: stretch; }
.db-mode-card--soon { --card-accent: #7c8a8f; cursor: default; background: #efe4cb; border-style: dashed; border-top-style: solid; box-shadow: 0 5px 0 #142d3680, 0 14px 34px #071c2a30; }
.db-mode-card--soon .db-mode-art, .db-mode-card--soon .db-mode-title { opacity: .55; filter: grayscale(.85); }
.db-mode-card--soon .db-card-ball span { font-size: 34px; }
.db-mode-card--soon .db-card-play { background: #8e9a9d; box-shadow: 0 3px 0 #5d6a6e; }
.db-soon-badge { position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: 20px; background: var(--db-bg-2); color: var(--db-gold); font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
/* Prelaunch: tarjeta de algo aún sin publicar que este usuario sí puede jugar (inc/prelaunch.php). */
.db-soon-badge--tester { background: var(--db-orange); color: #fff; box-shadow: 0 2px 0 var(--db-orange-dark); }
@media (hover: hover) { .db-mode-card:not(.db-mode-card--soon):hover { transform: translateY(-5px); box-shadow: 0 8px 0 #142d36, 0 20px 40px #071c2a50; } }
.db-power-bars { display: flex; align-items: flex-end; gap: 3px; height: 15px; }
.db-power-bars i { width: 5px; height: 6px; border-radius: 1px; background: #ded9c8; }
.db-power-bars i:nth-child(2) { height: 10px; }
.db-power-bars i:nth-child(3) { height: 14px; }
.db-power-bars .filled { background: var(--card-accent); }
.db-orbit { width: 119px; height: 119px; border: 1px solid #cfbb8e65; border-radius: 50%; position: absolute; }
.db-orbit::before { content: ''; position: absolute; inset: 8px; border: 1px dashed #cfbb8e80; border-radius: 50%; }
.db-orbit::after { content: '✦'; position: absolute; right: -4px; top: 16px; background: #fff8e7; color: var(--card-accent); font-size: 16px; line-height: 1; }
.db-card-ball { width: 82px; height: 82px; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 0 3px; padding: 19px; border: 2px solid #d37b21; border-radius: 50%; background: radial-gradient(circle at 30% 24%, #fff1b5, #ffc04f 44%, #f3901f 74%, #d36713); box-shadow: inset -5px -6px 8px #bd4c1250, inset 3px 3px 8px #fff7c9, 0 10px 14px -9px #866023a0; transform: rotate(-8deg); position: relative; }
.db-card-ball::before { content: ''; width: 17px; height: 8px; border-radius: 50%; background: #fffbeaa0; position: absolute; left: 15px; top: 9px; transform: rotate(-30deg); }
.db-card-ball span { font: 17px/1.1 Arial, sans-serif; color: #be4324; text-shadow: 0 1px #ffdd6b; }
.db-card-play { display: flex; align-items: center; justify-content: center; gap: 13px; padding: 8px 16px; background: var(--card-accent); border: 1px solid #162e3d40; border-radius: 6px; color: #fff9eb; font-weight: 900; font-size: 13px; box-shadow: 0 3px 0 #152c3b; }
.db-other-games { width: min(480px, calc(100% - 40px)); margin: 0 auto 40px; }
.db-other-games-card { padding: 14px 24px 16px; text-align: center; border: 1px solid #9fae9345; border-radius: 14px; background: #142f3bcc; color: #f8edda; }
.db-other-games-card h2 { font-size: 22px; margin: 0 0 2px; color: var(--db-gold); }
.db-other-games-card > p { font-size: 12px; color: #c2cfc5; margin-bottom: 10px; }
.db-other-games-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 26px; }
.db-other-game { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 92px; color: #f8edda; text-decoration: none; transition: transform .18s; }
.db-other-game img { width: 46px; height: 46px; object-fit: contain; }
.db-other-game-name { font-weight: 900; font-size: 13px; line-height: 1.15; }
.db-other-game-sub { font-size: 11px; color: #a9bbb5; }
.db-other-game:hover { color: #fff; transform: translateY(-3px); }
.db-footer { padding: 34px 24px 0; background: #102a35f0; border-top: 3px solid var(--db-orange); color: #b4c6bf; }
.db-footer-grid { width: min(1060px, 100%); margin: auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px 40px; padding-bottom: 26px; }
.db-footer-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #f7d18b; font-size: 25px; margin-bottom: 10px; }
.db-footer-brand .db-dragon-ball { width: 31px; height: 31px; }
.db-footer-brand .db-dragon-ball > span { font-size: 8px; }
.db-footer-desc { font-size: 13px; color: #d6ded4; margin-bottom: 10px; }
.db-footer-disclaimer { font-size: 11px; line-height: 1.5; margin: 0 0 8px; max-width: 460px; }
.db-footer a:not(.db-footer-brand):not(.db-social-link) { color: #e5d3ad; }
.db-footer-heading { font-size: 18px; color: #f8edda; margin-bottom: 12px; }
.db-footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13px; }
.db-footer-links a { text-decoration: none; }
.db-footer .db-footer-links a:hover { color: var(--db-gold); text-decoration: underline; }
.db-footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.db-social-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #78918e60; background: #1a3a46; color: #f6ca79; font-size: 17px; text-decoration: none; transition: background .15s, color .15s; }
a.db-social-link:hover { background: var(--db-orange); color: #fff; }
.db-social-link.is-disabled { opacity: .45; cursor: default; }
.db-footer-playwire { display: inline-block; margin-top: 16px; padding: 10px 14px; border-radius: 8px; background: #fff; }
.db-footer-playwire img { display: block; width: 200px; max-width: 100%; height: auto; }
.db-footer-playwire p { margin: 6px 0 0; font-size: 12px; }
.db-footer .db-footer-playwire a { color: var(--db-blue); }
.db-footer-bottom { width: min(1060px, 100%); margin: auto; padding: 14px 0 18px; border-top: 1px solid #647f7850; text-align: center; }
.db-footer-bottom p { margin: 0; font-size: 11px; }
.db-modal { position: fixed; inset: 0; padding: 20px; z-index: 100; background: #071e2bd9; backdrop-filter: blur(5px); display: none; place-items: center; overflow-y: auto; }
.db-modal.active { display: grid; }
.db-modal-content { padding: 26px; width: 100%; max-width: 400px; border: 2px solid #203e4a; border-top: 4px solid var(--db-orange); border-radius: 14px; background: var(--db-surface); text-align: center; box-shadow: 0 16px 50px #00152570; position: relative; }
.db-modal-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 15px; background: #eed8ac; color: #a75727; font-size: 23px; border-radius: 50%; }
.db-modal-content h2 { font-size: 32px; margin-bottom: 10px; }
.db-modal-content p { color: var(--db-muted); font-size: 13px; }
.db-modal-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.db-modal-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--db-muted); font-size: 16px; }
.db-modal-close:hover { background: #e6ddc8; color: var(--db-text); }
.db-btn-secondary, .db-btn-danger { padding: 9px 14px; border-radius: 6px; border: 1px solid #c5b797; font-size: 12px; font-weight: 900; }
.db-btn-secondary { background: #e6ddc8; color: var(--db-text); }
.db-btn-primary { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--db-orange-dark); background: var(--db-orange); color: #fff9eb; font-size: 12px; font-weight: 900; box-shadow: 0 3px 0 #8c3a10; }
.db-btn-primary:hover { background: #e2711a; }
.db-btn-primary:disabled { opacity: .6; cursor: default; }
/* Piezas de las páginas sociales (amigos, ranking) */
.db-page-title { text-align: center; color: #f4ecd9; margin-bottom: 24px; }
.db-page-title h1 { font-size: clamp(2.1rem, 4vw, 3rem); color: #ffce70; text-shadow: 2px 3px 0 #743818, 0 4px 16px #112c37; margin: 0 0 8px; line-height: 1.15; }
.db-page-title > p { color: #d6e0d4; font-size: 12px; margin: 0 auto; max-width: 520px; }
.db-paper-card { max-width: 820px; margin: 0 auto 18px; padding: 20px 24px; border: 2px solid #233f4b; border-top: 4px solid var(--db-orange); border-radius: var(--db-radius); background: var(--db-surface); box-shadow: var(--db-shadow); }
.db-paper-card[hidden] { display: none; }
.db-card-title { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 23px; line-height: 1.2; color: var(--db-text); }
.db-card-title i { color: var(--db-orange-dark); font-size: 18px; }
.db-input { min-height: 42px; padding: 7px 12px; border: 1px solid #b7b7a4; border-radius: 8px; background: #fffdf5; color: var(--db-text); font-weight: 800; font-size: 14px; box-shadow: 0 2px 0 #d8c5a1; }
.db-input:focus { outline: 3px solid #f5832740; border-color: var(--db-orange); }
.db-btn-sm { padding: 6px 11px; font-size: 11px; }
.db-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid #c5b797; border-radius: 8px; background: #efe3c6; color: var(--db-orange-dark); font-size: 14px; }
.db-icon-btn:hover { background: var(--db-orange); border-color: var(--db-orange-dark); color: #fff; }
.db-icon-btn--danger { color: var(--db-red); }
.db-icon-btn--danger:hover { background: var(--db-red); border-color: #8f2d20; }
.db-tabs { display: flex; justify-content: center; gap: 8px; max-width: 820px; margin: 4px auto 14px; }
.db-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border: 1px solid #4b626c; border-radius: 8px; background: linear-gradient(#324957, #233b49); color: #e5e7df; font-size: 13px; font-weight: 900; box-shadow: 0 3px 0 #0b202d; }
.db-tab i { color: #f7bc70; }
.db-tab.is-active { border-color: var(--db-orange); background: linear-gradient(#8e4e27, #663c26); color: #fff7e6; }
.db-tab-count { opacity: .8; font-weight: 800; }
.db-level-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.db-level-tab { padding: 6px 16px; border: 2px solid var(--db-border); border-radius: 20px; background: #fffaf0; color: var(--db-text); font-size: 13px; font-weight: 900; }
.db-level-tab:hover { border-color: var(--db-orange); }
.db-level-tab.is-active { border-color: var(--db-orange-dark); background: var(--db-orange); color: #fff; }
.db-row-avatar { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 30% 24%, #fff1b5, #ffc04f 44%, #f3901f 80%); font-size: 20px; line-height: 1; }
.db-row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.db-row-avatar--lg { width: 64px; height: 64px; font-size: 34px; }
.db-you-badge { padding: 1px 7px; border-radius: 20px; background: var(--db-orange); color: #fff; font-size: 10px; font-weight: 900; vertical-align: 2px; }
.db-verified { color: var(--db-blue); }
/* Avatar desbloqueado / escudo de racha (account.js) */
.db-reward-modal { animation: db-pop-in .22s ease; }
.db-reward-face { --ring: #d37b21; display: grid; place-items: center; width: 104px; height: 104px; margin: 4px auto 14px; border: 4px solid var(--ring); border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 30% 24%, #fff1b5, #ffc04f 44%, #f3901f 80%); font-size: 52px; line-height: 1; box-shadow: 0 0 0 6px #fff5df, 0 0 26px 6px #ffc04f90; }
.db-reward-face img { width: 100%; height: 100%; object-fit: cover; }
.db-reward-face.db-rarity-rare { --ring: #3c7fc0; }
.db-reward-face.db-rarity-epic { --ring: #8a4fc4; }
.db-reward-face.db-rarity-legendary { --ring: #e2a21c; }
.db-reward-face.db-rarity-ultralegendary { --ring: #d6432c; }
.db-modal-content .db-reward-kicker { margin: 0; color: var(--db-orange-dark); font-weight: 900; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.db-reward-modal h2 { margin: 2px 0 2px; }
.db-modal-content .db-reward-rarity { margin: 0; font-weight: 800; }
.db-modal-content .db-reward-error { color: var(--db-red); font-weight: 800; }
.db-reward-list { list-style: none; margin: 0; padding: 0; font-weight: 900; font-size: 15px; }
/* Anuncio de la portada (modal-queue.js): texto plano con sus saltos de línea */
.db-mq-card { max-width: 440px; }
.db-mq-img { display: block; width: 100%; max-height: 240px; margin: 0 0 16px; object-fit: cover; border-radius: 9px; }
.db-mq-card h2 { overflow-wrap: anywhere; }
.db-modal-content .db-mq-body { margin: 0; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.db-mq-card .db-modal-actions { flex-wrap: wrap; }
.db-mq-card .db-btn-primary { text-decoration: none; }
.db-nav a { position: relative; }
.db-nav-badge { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; background: var(--db-red); color: #fff; font-size: 10px; font-weight: 900; line-height: 1; box-shadow: 0 0 0 2px #112632; }
.db-btn-danger { background: #ac432a; color: #fff5df; border-color: #943c26; }
.db-swatch { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 3px; }
.db-swatch.correct { background: var(--db-correct); }
.db-swatch.partial { background: var(--db-partial); }
.db-swatch.incorrect { background: var(--db-incorrect); }
.db-swatch.unknown { background: var(--db-unknown); }
.db-level-modal { max-width: 480px; max-height: 90vh; overflow-y: auto; padding: 32px 28px 28px; animation: db-pop-in .22s ease; }
@keyframes db-pop-in { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.db-level-modal h2 { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 30px; margin: 0 0 16px; color: var(--db-text); }
.db-level-modal h2 i { color: var(--db-orange-dark); font-size: 24px; }
.db-level-desc p { text-align: left; font-size: 13.5px; line-height: 1.6; margin: 0 0 8px; }
.db-level-hr { border: 0; border-top: 1px dashed #b98b5a80; margin: 16px 0 14px; opacity: 1; }
.db-level-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; list-style: none; padding: 0; margin: 0 0 4px; text-align: left; font-size: 13px; font-weight: 700; }
.db-level-legend li { display: flex; align-items: center; gap: 9px; }
.db-level-legend .db-swatch { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 -2px #0000002a; }
.db-modal-content .db-level-choose { font-size: 14px; font-weight: 900; color: var(--db-text); margin: 20px 0 12px; }
.db-level-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.db-level-btn { --card-accent: #38744e; display: inline-flex; align-items: center; gap: 7px; padding: 10px 24px; border: 2px solid var(--db-border); border-radius: 24px; background: #fffaf0; color: var(--db-text); font-size: 14px; font-weight: 900; text-decoration: none; box-shadow: 0 4px 0 #b98b5a59; transition: transform .2s, border-color .2s, box-shadow .2s; }
.db-level-btn--normal { --card-accent: #ad5319; }
.db-level-btn--hard { --card-accent: #bc3c2b; }
.db-level-btn i { color: var(--card-accent); font-size: 16px; }
.db-level-btn:hover { color: var(--db-text); border-color: var(--card-accent); transform: translateY(-2px); box-shadow: 0 6px 0 #b98b5a59; }
.db-level-btn:active { transform: translateY(2px); box-shadow: none; }
/* Navegación entre juegos dentro de cada juego (game_nav.php): las tarjetas de inicio en pequeño. */
.db-game-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 190px)); justify-content: center; gap: 15px; max-width: 700px; margin: 30px auto; }
.db-game-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 130px; padding: 12px 10px; position: relative; isolation: isolate; text-align: center; text-decoration: none; color: var(--db-text); background: var(--db-surface); border: 2px solid #132f50; border-top: 4px solid #ff912b; border-radius: 10px; box-shadow: var(--db-shadow); transition: transform .18s, border-color .15s; }
.db-game-link::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: repeating-conic-gradient(from -12deg at 50% 30%, #f28e2e24 0deg 1deg, transparent 1deg 18deg); mask-image: linear-gradient(#000, transparent 75%); pointer-events: none; z-index: -1; }
.db-game-link-emblem { width: 88px; height: 72px; overflow: visible; transition: transform .18s; }
.db-game-link-title { font-family: 'Bangers', Impact, sans-serif; font-size: 19px; letter-spacing: .025em; line-height: 1.1; color: var(--db-text); }
@media (hover: hover) {
    .db-game-link:hover { transform: translateY(-4px); border-color: #ffae47; color: var(--db-text); }
    .db-game-link:hover .db-game-link-emblem { transform: rotate(-5deg) scale(1.08); }
}
@media (max-width: 500px) {
    .db-game-links { grid-template-columns: repeat(auto-fit, minmax(130px, 170px)); gap: 10px; }
    .db-game-link { min-height: 110px; }
    .db-game-link-emblem { width: 76px; height: 62px; }
    .db-game-link-title { font-size: 16px; }
}
@media (max-width: 600px) {
    .db-level-modal { padding: 26px 18px 22px; }
    .db-level-modal h2 { font-size: 26px; }
    .db-level-btn { flex: 1 1 auto; justify-content: center; min-width: 80px; padding: 9px 14px; font-size: 13px; }
}
.db-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: calc(100% - 32px); background: var(--db-bg-2); color: #fff4db; border: 1px solid var(--db-gold); padding: 10px 18px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; box-shadow: 0 5px 20px #071c2a60; }
.db-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1360px) {
    .db-header-inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'logo' 'nav'; gap: 12px; padding: 12px 20px 15px; }
    .db-nav { justify-content: center; }
    .db-wordmark > span { font-size: 33px; }
    .db-wordmark strong { font-size: 23px; }
    .db-brand-ball { width: 45px; height: 45px; }
}
/* Match the compact desktop header height of Naru2day. */
@media (min-width: 761px) {
    .db-header-inner { min-height: 115px; padding: 8px 24px; gap: 4px 25px; }
    .db-brand .db-brand-logo { width: 240px; }
}
@media (min-width: 1361px) {
    .db-header-inner { min-height: 80px; }
}
@media (max-width: 900px) {
    .db-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .db-footer-grid { grid-template-columns: 1fr 1fr; }
    .db-footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .db-utility-bar { width: calc(100% - 30px); margin-top: 13px; gap: 8px; }
    .db-network > span { display: none; }
    .db-network { gap: 4px; }
    .db-lang-btn, .db-network a { min-height: 36px; }
    .db-network a { min-height: 36px; padding: 3px 10px 3px 4px; font-size: 10px; }
    .db-network a img { width: 28px; height: 28px; }
    .db-lang-btn { padding: 6px 9px 6px 6px; font-size: 10px; }
    .db-main { padding: 25px 18px 40px; }
    .db-hero { margin-bottom: 25px; }
}
@media (max-width: 580px) {
    body::before { background-position: 45% center; }
    .db-header-inner { gap: 12px; padding: 12px 12px 14px; }
    .db-wordmark > span { font-size: 30px; }
    .db-wordmark strong { font-size: 21px; }
    .db-brand-ball { width: 42px; height: 42px; }
    .db-brand-ball > span { font-size: 12px; }
    .db-nav { gap: 6px; }
    .db-nav a { padding: 7px 14px; min-height: 40px; }
    /* En móvil: Perfil, Amigos, Inicio, Ranking y Ajustes. */
    .db-nav a:first-child { order: 1; }
    .db-nav a:nth-child(n + 4) { order: 2; }
    .db-nav-label { display: none; }
    .db-modes { grid-template-columns: 1fr; gap: 14px; }
    .db-mode-card { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; padding: 16px 18px; text-align: left; align-items: center; }
    .db-mode-art { grid-row: 1 / 4; height: 96px; margin: 0; }
    .db-mode-art .db-orbit { width: 92px; height: 92px; }
    .db-mode-art .db-card-ball { width: 66px; height: 66px; padding: 14px; }
    .db-mode-title { font-size: 23px; margin: 0 0 4px; }
    .db-mode-desc { font-size: 11px; margin: 0 0 10px; }
    .db-mode-card .db-card-play { justify-self: start; padding: 6px 14px; font-size: 12px; }
    .db-soon-badge { top: 8px; right: 8px; font-size: 9px; }
    .db-other-games { width: calc(100% - 36px); }
    .db-other-games-card { padding: 14px; }
    .db-other-games-list { gap: 14px; }
    .db-footer { padding: 28px 18px 0; }
    .db-footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .db-footer-brand { display: flex; width: fit-content; max-width: 100%; margin-inline: auto; }
    .db-utility-bar { width: calc(100% - 24px); flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
    .db-network { gap: 4px; }
    .db-network a { gap: 4px; padding: 3px 4px; white-space: nowrap; }
    .db-network a img { width: 24px; height: 24px; flex-shrink: 0; }
    .db-lang-name { display: none; }
    .db-lang-btn { gap: 4px; padding: 6px; }
    .db-lang-flag { width: 24px; height: 16px; }
    .db-main { padding-top: 18px; }
    .db-hero h1 { max-width: 360px; margin: 0 auto 13px; }
    .db-hero > p { font-size: 12px; max-width: 335px; }
    .db-series { margin-bottom: 12px; }
    .db-section-heading h2 { font-size: 24px; }
}
@media (max-width: 360px) {
    .db-nav { gap: 4px; }
    .db-nav a { padding: 7px 11px; }
    .db-network { gap: 3px; }
    .db-network a { gap: 3px; padding: 3px; font-size: 9px; }
    .db-network a img { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Animaciones desactivadas desde Ajustes: lo mismo que el sistema. */
html.motion-reduce { scroll-behavior: auto; }
html.motion-reduce *, html.motion-reduce *::before, html.motion-reduce *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
