/* El rastreador es una pieza de interfaz: carcasa, cristal y foto son capas independientes. */
.db-oculto-page { max-width: 920px; padding-top: 28px; }
.db-oculto-page .db-title { margin-bottom: 20px; }
.db-oculto-page .db-title h1 { font-size: clamp(2.6rem, 6vw, 3.5rem); }
.db-oculto-page .db-title > p { font-size: 13px; margin: 8px auto 0; max-width: 480px; }
.db-oculto-game { max-width: 680px; margin: auto; padding: 24px 26px 18px; color: var(--db-text); background: var(--db-surface); border: 2px solid #132f50; border-top: 5px solid var(--db-orange); border-radius: 12px; box-shadow: var(--db-shadow); }
.db-scouter { position: relative; isolation: isolate; width: min(100%, 460px); margin: 0 auto; filter: drop-shadow(3px 5px 0 #0b263b) drop-shadow(7px 10px 8px #0c294838); }
.db-scouter-casing { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; pointer-events: none; }
.db-scouter-color { position: absolute; z-index: 2; top: 33.276%; right: .893%; width: 8.929%; height: 32.935%; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #172f40; cursor: pointer; }
.db-scouter-color-slot { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.db-scouter-color-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 5px 2px 17px; border-radius: inherit; background: url('../img/scouter-color-button.svg') center / 100% 100% no-repeat; pointer-events: none; }
/* The transparent hit area extends beyond the narrow physical switch on mobile. */
.db-scouter-color::before { content: ''; position: absolute; inset: 0 -10px; }
.db-scouter-color:hover:not(:disabled) .db-scouter-color-face { filter: brightness(1.06); }
.db-scouter-color:disabled { cursor: default; }
.db-scouter-color:disabled .db-scouter-color-label, .db-scouter-color:disabled .bi { opacity: .6; }
.db-scouter-color-face > i { font-size: 17px; line-height: 1; text-shadow: 0 1px #ffd494; }
.db-scouter-color-label { writing-mode: vertical-rl; color: #102a3b; font: 900 13px/1 Nunito, sans-serif; text-transform: uppercase; letter-spacing: .7px; }
.db-scouter-color-led { width: 7px; height: 7px; flex-shrink: 0; border: 1px solid #70320f; border-radius: 50%; background: #8e4d1b; box-shadow: inset 0 1px 2px #4b250e80, 0 1px #ffc779; }
.db-scouter-color[aria-pressed='true'] .db-scouter-color-led { background: #d7ff9b; border-color: #5e872f; box-shadow: 0 0 6px #c6ff8f, inset 0 1px #f4ffd7; }
.db-oculto-page .db-scouter-color:focus-visible { outline: 3px solid #183f68; outline-offset: 3px; }
.db-scouter-shell { position: relative; padding: 8.1% 12.3% 9% 6.4%; }
.db-scouter-rim { padding: 6px; background: linear-gradient(135deg, #1e3033 0%, #4b6555 18%, #0b2823 24%, #122f2a 78%, #687866 100%); border: 2px solid #142f34; border-radius: 34px 30px 30px 34px; clip-path: polygon(10% 0, 92% 0, 100% 8%, 100% 91%, 91% 100%, 9% 100%, 0 92%, 0 9%); box-shadow: 0 0 0 2px #a29379, 0 0 0 4px #fff9e4, inset 0 0 0 2px #82957b; }
.db-scouter-screen { position: relative; overflow: hidden; border: 2px solid #498b55; border-radius: 24px 22px 22px 24px; clip-path: polygon(9% 0, 92% 0, 100% 8%, 100% 92%, 92% 100%, 9% 100%, 0 92%, 0 9%); background: radial-gradient(ellipse at 50% 0, #27583870, transparent 75%), #092c22; color: #b3ff9e; box-shadow: inset 0 0 0 2px #132b20, inset 0 0 17px #020d0b; }
.db-scouter-top, .db-scouter-bottom { display: flex; align-items: center; justify-content: center; gap: 15px; min-height: 44px; padding: 8px 13px; font: 700 clamp(15px, 2.8vw, 21px)/1.1 'Chakra Petch', 'Consolas', monospace; text-align: center; text-transform: uppercase; letter-spacing: .7px; text-shadow: 0 0 9px #91ee6f80; }
.db-scouter-top { position: relative; border-bottom: 1px solid #629e5f45; background: linear-gradient(#173f2e70, #071e1850); }
.db-scouter-top::after { content: ''; position: absolute; left: 17%; right: 17%; bottom: 0; height: 1px; background: #b4ee7d35; box-shadow: 0 1px 5px #98ff6f40; }
.db-scouter-top i { height: 3px; width: 32px; flex-shrink: 0; background: #99f080; box-shadow: 0 0 3px #92ff78, 0 0 8px #7bf38b65; }
.db-scouter-photo { position: relative; isolation: isolate; aspect-ratio: 1; overflow: hidden; margin: 0 13px; background: #c6d5c8; border: 1px solid #74bf7f80; box-shadow: 0 0 0 2px #081e17, 0 0 12px #7de48115; }
.db-scouter-photo img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; filter: blur(var(--scan-blur, 10px)) grayscale(var(--scan-gray, 1)); transform: scale(1.07); transition: filter .45s ease; }
.db-scouter-photo img[hidden] { display: none; }
.db-scouter-photo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(130deg, #d8ffd512, transparent 40%, #0323190d), repeating-linear-gradient(transparent 0 3px, #041e160e 3px 4px); box-shadow: inset 0 0 24px #0b4c3438; }
.db-scouter-reticle { position: absolute; inset: 9px; pointer-events: none; z-index: 1; }
.db-scouter-reticle i { position: absolute; width: 31px; height: 31px; border: solid #a1ffa1; filter: drop-shadow(0 0 3px #72ef9460); }
.db-scouter-reticle i:nth-child(1) { top: 0; left: 0; border-width: 6px 0 0 6px; }
.db-scouter-reticle i:nth-child(2) { top: 0; right: 0; border-width: 6px 6px 0 0; }
.db-scouter-reticle i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 6px 6px; }
.db-scouter-reticle i:nth-child(4) { bottom: 0; right: 0; border-width: 0 6px 6px 0; }
.db-scouter-bottom { min-height: 40px; font-size: 15px; overflow-wrap: anywhere; padding-bottom: 10px; }
.db-scouter-bottom::after { content: ''; height: 3px; width: 24px; flex-shrink: 0; background: #a2f087; box-shadow: 0 0 6px #79d97850; }
.db-scouter-led { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: #a4f69a; box-shadow: 0 0 8px #a4f69a; }
.db-scouter-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: #163e2e; color: #81b778; font-size: 72px; }
.db-scouter-placeholder[hidden] { display: none; }
.db-oculto-caption { color: var(--db-muted); font-size: 12px; text-align: center; margin: 19px 0 0; }
.db-oculto-search { position: relative; z-index: 5; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid #d5be98; }
.db-oculto-page .db-search-input { background: #fff; border: 2px solid #142f50; height: 50px; font-size: 14px; }
.db-oculto-page .db-guess-btn { background: #ff902d; border: 2px solid #683b22; color: #173b64; font-size: 15px; min-width: 100px; box-shadow: inset 0 2px #ffc36d, 0 3px #142f50; }
.db-oculto-page .db-guess-btn:hover:not(:disabled) { background: #ffad4c; }
.db-oculto-page .db-surrender-btn { background: #da3633; color: #fff; border: 2px solid #da3633; }
.db-oculto-page .db-surrender-btn:hover:not(:disabled) { filter: brightness(.85); }
.db-oculto-counter { color: var(--db-muted); text-align: right; font-size: 12px; font-weight: 800; margin: 10px 0 0; }
.db-oculto-error { padding: 10px 12px; margin: 10px 0 0; background: #fff1d2; border: 1px solid #b95b3e; border-radius: 6px; color: #8d301c; font-size: 13px; }
.db-oculto-retry { display: block; margin: 10px auto; padding: 7px 16px; border: 1px solid #dfb879; border-radius: 5px; background: #fff1d2; color: #173b64; font-weight: 800; }
.db-oculto-page [hidden] { display: none !important; }
.db-oculto-attempts { margin-top: 20px; padding-top: 18px; color: #173b64; border-top: 1px solid #d5be98; }
.db-oculto-attempts h2 { font: 900 13px Nunito, sans-serif; margin: 0 0 10px; }
.db-oculto-attempts ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.db-oculto-attempts li { display: flex; align-items: center; gap: 10px; min-height: 45px; background: #f2dfc5; border: 1px solid #bf9d7a; border-left: 4px solid #a7462b; border-radius: 5px; padding: 5px 10px 5px 6px; font-size: 13px; font-weight: 800; }
.db-oculto-attempts li.is-correct { background: #dce9c7; border-left-color: #377248; }
.db-oculto-attempts li img { width: 34px; height: 37px; object-fit: contain; border-radius: 3px; background: #fff5df; }
.db-oculto-attempts li b { margin-left: auto; font-size: 20px; }
.db-oculto-attempts li small { font-weight: 700; color: #68716c; }
.db-oculto-page .db-result { width: 100%; max-width: 680px; margin: 20px auto; }
.db-oculto-page .db-yesterday { margin: 22px auto; }
.db-oculto-tut-demo { font-size: 32px; color: #427147; }
.db-oculto-page button:focus-visible { outline: 3px solid #ffce70; outline-offset: 4px; }
.db-scouter.is-finished .db-scouter-photo img { transform: none; }
.db-scouter.is-loss .db-scouter-screen { color: #f1d49c; }
@media (max-width: 540px) {
    .db-oculto-page { padding: 20px 12px 30px; }
    .db-oculto-page .db-title h1 { font-size: 2.55rem; }
    .db-oculto-page .db-title > p { max-width: 300px; font-size: 12px; }
    .db-oculto-game { padding: 15px 10px 13px; }
    .db-scouter { width: 100%; max-width: 390px; }
    .db-scouter-color-face { gap: 4px; padding: 4px 2px 12px; }
    .db-scouter-color-face > i { font-size: 15px; }
    .db-scouter-color-label { font-size: 12px; letter-spacing: .3px; }
    .db-scouter-rim { padding: 4px; }
    .db-scouter-top { font-size: 15px; min-height: 37px; gap: 9px; }
    .db-scouter-top i { width: 19px; }
    .db-scouter-bottom { font-size: 12px; min-height: 35px; gap: 9px; }
    .db-scouter-bottom::after { width: 15px; }
    .db-scouter-photo { margin: 0 10px; }
    .db-scouter-reticle { inset: 7px; }
    .db-scouter-reticle i { width: 24px; height: 24px; }
    .db-oculto-search { margin-top: 19px; }
    .db-oculto-page .db-controls { gap: 6px; }
    .db-oculto-page .db-search-input { font-size: 16px; height: 47px; padding-right: 6px; }
    .db-oculto-page .db-guess-btn { min-width: 75px; padding: 0 9px; font-size: 13px; }
    .db-oculto-page .db-surrender-btn { width: 37px; flex-shrink: 0; }
    .db-oculto-page .db-autocomplete { min-width: min(280px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) { .db-scouter-photo img { transition: none; } }
html[data-motion='reduce'] .db-scouter-photo img { transition: none; }
