.rmqr-game{
    max-width:760px;
    margin:24px auto;
    padding:24px;
    border:1px solid #d7c3a2;
    border-radius:22px;
    background:linear-gradient(180deg,#fffaf0 0%,#f7edd8 100%);
    box-shadow:0 10px 30px rgba(0,0,0,.10);
    font-family:inherit;
    position:relative;
    overflow:hidden;
}
.rmqr-game::before,
.rmqr-game::after{
    content:"✦";
    position:absolute;
    color:rgba(107,63,24,.15);
    font-size:42px;
    line-height:1;
    pointer-events:none;
}
.rmqr-game::before{top:14px;left:16px}
.rmqr-game::after{right:16px;bottom:10px}

.rmqr-header{text-align:center;position:relative;z-index:1}
.rmqr-header h2{margin-bottom:10px;color:#5b3514}
.rmqr-cover{max-width:100%;border-radius:16px;margin-bottom:16px;box-shadow:0 8px 18px rgba(0,0,0,.08)}
.rmqr-intro{font-size:1.05rem}
.rmqr-intro p:last-child{margin-bottom:0}

.rmqr-login,
.rmqr-final,
.rmqr-success-panel,
.rmqr-screen{
    position:relative;
    background:rgba(255,255,255,.82);
    border:1px solid #dcc6a0;
    border-radius:20px;
    padding:18px;
    box-shadow:0 8px 22px rgba(84,54,22,.08);
    overflow:hidden;
}
.rmqr-login::before,
.rmqr-final::before,
.rmqr-success-panel::before,
.rmqr-screen::before,
.rmqr-clue::before{
    content:"✦";
    position:absolute;
    top:10px;
    right:14px;
    color:rgba(139,90,43,.22);
    font-size:22px;
}
.rmqr-login::after,
.rmqr-final::after,
.rmqr-success-panel::after,
.rmqr-screen::after,
.rmqr-clue::after{
    content:"❖";
    position:absolute;
    bottom:10px;
    left:14px;
    color:rgba(139,90,43,.22);
    font-size:18px;
}

.rmqr-login label{display:block;font-weight:700;margin-top:14px;color:#5c3513}
.rmqr-login input[type=email],
#rmqr-manual-token{
    width:100%;
    padding:12px;
    border:1px solid #b89969;
    border-radius:12px;
    font-size:1rem;
    background:white;
    box-sizing:border-box;
}
.rmqr-privacy{font-weight:400!important;font-size:.95rem}
.rmqr-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    background:#6b3f18;
    color:#fff;
    border:0;
    border-radius:14px;
    padding:12px 18px;
    font-weight:700;
    cursor:pointer;
    margin-top:12px;
    text-align:center;
    text-decoration:none;
}
.rmqr-button:hover{background:#4f2d10}
.rmqr-note{font-size:.9rem;opacity:.85}
.rmqr-message{display:none;margin:16px 0;padding:12px 14px;border-radius:14px}
.rmqr-message.ok{background:#eef8e8;border:1px solid #9ac482}
.rmqr-message.error{background:#fff1f1;border:1px solid #d98c8c}
.rmqr-progress{
    display:inline-block;
    background:#e8d6b7;
    border:1px solid #d2b88d;
    color:#5b3514;
    border-radius:999px;
    padding:6px 12px;
    font-weight:700;
    margin-bottom:12px;
}

.rmqr-step-shell{display:block}
.rmqr-screen{
    display:none;
    min-height:360px;
}
.rmqr-screen.active{display:block}
.rmqr-screen-title{
    margin:2px 0 12px;
    color:#5c3513;
    font-size:1.35rem;
}
.rmqr-screen-subtitle{
    margin:0 0 14px;
    color:#7a5733;
    font-weight:600;
}
.rmqr-screen-figure{margin:12px 0 0}
.rmqr-step-image{
    width:100%;
    max-height:420px;
    object-fit:contain;
    background:#fff;
    border:1px solid #eadac0;
    border-radius:16px;
    margin:10px 0 0;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.8);
}
.rmqr-image-caption{margin:12px 0 0;color:#72512f;font-size:.98rem}

.rmqr-clue{
    position:relative;
    background:linear-gradient(180deg,#fffdf8 0%,#f8efdd 100%);
    border:1px solid #d8be93;
    padding:18px;
    border-radius:16px;
    margin:12px 0;
}
.rmqr-clue p:last-child{margin-bottom:0}
.rmqr-clue-label,
.rmqr-panel-title,
.rmqr-ornament-title{
    display:flex;
    align-items:center;
    gap:10px;
    color:#6b3f18;
    font-weight:800;
    letter-spacing:.02em;
    margin-bottom:10px;
}
.rmqr-clue-label::before,
.rmqr-panel-title::before,
.rmqr-panel-title::after,
.rmqr-ornament-title::before,
.rmqr-ornament-title::after{
    content:"✦";
    color:#b1844e;
}
.rmqr-scene-note{
    margin-top:10px;
    padding:12px 14px;
    background:rgba(232,214,183,.35);
    border-radius:14px;
    color:#6c4a28;
}

.rmqr-nav-buttons,
.rmqr-actions-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:18px;
}
.rmqr-button.rmqr-secondary{background:#8f7b5f;margin-left:0}
.rmqr-button.rmqr-secondary:hover{background:#6c5a42}
.rmqr-button.rmqr-ghost{
    background:transparent;
    color:#6b3f18;
    border:1px solid #b89969;
}
.rmqr-button.rmqr-ghost:hover{background:rgba(232,214,183,.45)}

.rmqr-actions{
    margin-top:8px;
    padding:16px;
    border:1px dashed #caa977;
    border-radius:16px;
    background:rgba(255,250,240,.8);
}
.rmqr-scanner-box{margin-top:14px;padding:12px;border:1px dashed #b89969;border-radius:14px;background:#fff}
#rmqr-reader{width:100%;max-width:420px;margin:0 auto}
#rmqr-video{width:100%;max-width:420px;display:block;margin:0 auto;border-radius:12px;background:#000}
.rmqr-camera-status{text-align:center;font-size:.95rem;margin:10px 0 0}
.rmqr-manual{margin-top:14px}
.rmqr-manual summary{cursor:pointer;font-weight:700;color:#6b3f18;margin-bottom:10px}
.rmqr-manual[open] summary{margin-bottom:12px}

.rmqr-final{background:#eef8e8;border:1px solid #9ac482;padding:20px;text-align:center}
.rmqr-box{padding:16px;border:1px solid #ddd;background:#fff}
.rmqr-success-panel{background:#eef8e8;border:1px solid #9ac482;padding:20px;text-align:center}
.rmqr-success-panel h3{margin-top:0;color:#325d18}
.rmqr-success-message{margin:12px 0 4px}

@media(max-width:600px){
    .rmqr-game{margin:12px auto;padding:14px;border-radius:18px}
    .rmqr-screen,
    .rmqr-login,
    .rmqr-final,
    .rmqr-success-panel{padding:16px;border-radius:18px}
    .rmqr-screen{min-height:calc(100vh - 180px)}
    .rmqr-screen-title{font-size:1.2rem}
    .rmqr-nav-buttons,
    .rmqr-actions-row{flex-direction:column}
    .rmqr-button{width:100%;margin-left:0}
}


/* Versión móvil por pantallas: al jugar se oculta la portada para que no empuje la visualización */
.rmqr-game.rmqr-is-playing{
    padding-top:16px;
}
.rmqr-game.rmqr-is-playing .rmqr-header{
    display:none;
}
.rmqr-game.rmqr-is-playing .rmqr-message{
    margin:12px 0 0;
}

/* Decoración medieval más visible */
.rmqr-medieval-banner{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    margin:-2px 0 14px;
    padding:9px 12px;
    border:1px solid #b98a4b;
    border-radius:999px;
    background:linear-gradient(90deg,#6b3f18 0%,#9a6830 50%,#6b3f18 100%);
    color:#fff7df;
    box-shadow:0 4px 10px rgba(70,40,15,.18);
    text-transform:uppercase;
    letter-spacing:.04em;
    font-size:.88rem;
}
.rmqr-medieval-banner span{
    font-size:1.15rem;
    line-height:1;
}
.rmqr-screen,
.rmqr-clue,
.rmqr-actions,
.rmqr-success-panel,
.rmqr-final{
    border-width:2px;
    border-color:#b98a4b;
}
.rmqr-screen::before,
.rmqr-screen::after,
.rmqr-clue::before,
.rmqr-clue::after,
.rmqr-actions::before,
.rmqr-actions::after{
    font-size:24px;
    opacity:1;
}
.rmqr-screen::before{content:"⚜";top:10px;right:14px;color:rgba(107,63,24,.38)}
.rmqr-screen::after{content:"⚜";bottom:10px;left:14px;color:rgba(107,63,24,.38)}
.rmqr-clue::before{content:"✦";top:12px;right:16px;color:rgba(107,63,24,.45)}
.rmqr-clue::after{content:"🗝️";bottom:10px;left:14px;color:rgba(107,63,24,.65)}
.rmqr-actions{position:relative;overflow:hidden}
.rmqr-actions::before{content:"🛡️";position:absolute;top:10px;right:14px;opacity:.42}
.rmqr-actions::after{content:"⚔";position:absolute;bottom:10px;left:14px;opacity:.42}
.rmqr-clue-label,
.rmqr-panel-title{
    font-size:1.02rem;
    padding-bottom:8px;
    border-bottom:1px dashed rgba(107,63,24,.28);
}
.rmqr-step-image{
    border:2px solid #b98a4b;
    padding:6px;
    background:#fffaf0;
}
.rmqr-button::after{
    content:"›";
    font-size:1.25rem;
    line-height:1;
}
#rmqr-close-camera::after,
.rmqr-button.rmqr-ghost::after{
    content:"";
}

@media(max-width:600px){
    .rmqr-game.rmqr-is-playing{margin-top:6px}
    .rmqr-game.rmqr-is-playing .rmqr-message{font-size:.92rem}
    .rmqr-medieval-banner{font-size:.78rem;padding:8px 10px;margin-bottom:12px}
    .rmqr-screen{min-height:auto}
    .rmqr-step-image{max-height:48vh}
}
