/* Portada: el reto del día en una tira arriba, los dos juegos en grande con su animación, y abajo tu nivel y la tabla de
   hoy. También el botón de ideas en la barra de arriba, tu nivel junto a tu monito y la pantalla de «subiste de nivel». */
.daily-strip{display:flex;align-items:center;gap:18px;flex-wrap:wrap;background:var(--purple);color:#ffffff;border:2px solid #a77bff;
 border-radius:4px;box-shadow:4px 4px 0 #2a0f5c;padding:10px 12px 10px 18px;margin-bottom:28px}
.daily-badge{font:800 11px/1 monospace;letter-spacing:.08em;white-space:nowrap}
.daily-badge span{opacity:.7;margin-left:6px}
.daily-goal{margin:0;flex:1;min-width:220px;font-size:15px;line-height:1.35}
.daily-goal strong{font-size:18px}
.daily-goal #attemptsLabel{display:inline-block;font-size:12px;opacity:.75;margin-left:4px}
.daily-strip-actions{display:flex;align-items:center;gap:16px}
.daily-strip .button{padding:10px 16px;gap:10px}
.daily-strip .text-button{color:#ffffff;padding:8px 0;white-space:nowrap}

.game-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.game-card{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:4px;overflow:hidden;box-shadow:5px 5px 0 #0f0e1a}
.game-art{display:block;width:100%;aspect-ratio:384/240;border-bottom:1px solid var(--line);background:#30253f;overflow:hidden}
.game-art canvas{display:block;width:100%;height:100%;image-rendering:pixelated}
.game-info .zone-top{display:flex;justify-content:space-between;gap:10px}
.game-info h2{font-size:30px;letter-spacing:-.04em;margin:10px 0 6px}
.game-info p{margin:0 0 14px;color:var(--muted);font-size:14px;line-height:1.45}
.game-tags{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:16px}
.game-tags span{border:1px solid var(--line);border-radius:30px;padding:4px 10px;font-size:11px;font-weight:700;color:var(--muted)}
.game-actions{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-top:auto}
.game-actions .button{padding:12px 20px}
.game-actions .text-button{color:var(--green);border:0;width:auto;padding:10px 0}

.home-bottom{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:22px;margin-top:26px}
.level-card{padding:22px;border:1px solid var(--line);border-radius:4px;background:var(--panel)}
.level-card .section-heading{margin:0 0 14px}
.level-card .section-heading span{font-size:12px;color:var(--muted)}
.level-now,.profile-level{display:flex;align-items:center;gap:14px}
.level-now .medal,.profile-level .medal{font-size:40px;line-height:1}
.level-now b{font-size:21px;letter-spacing:-.02em}
.level-now small{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.level-bar{height:10px;background:#15141f;border:1px solid var(--line);border-radius:2px;overflow:hidden;margin:14px 0 8px}
.level-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--purple),var(--green))}
.level-next{margin:0 0 14px;font-size:14px;color:var(--muted)}
.level-next b{color:var(--text)}
.prize-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.prize-row span{display:grid;place-items:center;width:34px;height:34px;font-size:19px;border:1px solid var(--line);border-radius:4px;filter:grayscale(1);opacity:.35}
.prize-row span.got{filter:none;opacity:1;background:#2c2250;border-color:#7d5bc4}
.level-card .fine{color:var(--muted);font-size:12px;line-height:1.45;margin:0 0 6px}
.level-card .text-button{color:var(--green);border-top:1px solid var(--line);width:100%;text-align:left;padding-top:14px;margin-top:6px}
.home-bottom .ranking-panel{background:var(--panel)}
.home-bottom .personal-best{padding:14px 0 4px}
.rank-title{display:block;font-size:11px;color:var(--muted);font-weight:400;margin-top:2px}

/* Top bar: only «Entrar» without a session, your monito with one. */
.topbar .profile[hidden],.topbar .account-button[hidden]{display:none!important}
/* Top bar: ideas always at hand, and your level next to your monito. The name is one line now, centered on the mark. */
.brand{align-items:center}
/* The mark is Dali's face (the same pixel art as the browser icon). */
.brand-face{flex:none;padding:0;overflow:hidden}
.brand-face img,.brand-face canvas{display:block;width:100%;height:100%;image-rendering:pixelated}
.topbar .idea-button{margin-left:auto;display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:700;color:var(--text);background:#2c2250;
 border:1px solid var(--line);border-radius:30px;padding:8px 14px;white-space:nowrap}
.topbar .idea-button:hover,.topbar .idea-button:focus-visible{border-color:var(--green);color:var(--green)}
.topbar .idea-button~.account-button,.topbar .idea-button~.profile{margin-left:0}
.level-chip{font:800 11px/1 monospace;background:#15141f;border:1px solid var(--line);border-radius:20px;padding:4px 7px;white-space:nowrap}
.playing .topbar .idea-button span{display:none}
.playing .topbar .idea-button{padding:6px 10px}

/* Profile: level summary and prizes. */
.profile-level{background:#1b1a2a;border:1px solid var(--line);border-radius:4px;padding:10px 12px;margin:0 0 16px;font-size:14px}
.profile-level>div{flex:1;min-width:0}
.profile-level .level-bar{margin:8px 0 5px}
.profile-level small{color:var(--muted);font-size:11px}
.accessory-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(62px,1fr));gap:6px}
.accessory-choice{display:flex;flex-direction:column;align-items:center;gap:3px;padding:5px 3px;border:1px solid var(--line);border-radius:4px;background:#1b1a2a;font-size:10px;line-height:1.15;color:var(--text);text-align:center}
.accessory-choice canvas{width:40px;height:40px;image-rendering:pixelated}
.accessory-choice.selected{border-color:var(--purple-soft);background:#3b1f73}
.accessory-choice:disabled{opacity:.45;cursor:not-allowed}
.accessory-choice:disabled canvas{filter:grayscale(1)}
#accessoryHint{margin:8px 0 0;color:var(--muted)}

/* Touch screens: holding a finger down never selects text, opens the copy menu or the magnifier, anywhere in the page.
   Fields to type in and the temporary password (to copy it) keep working. */
@media (pointer:coarse){
 html,body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
 :is(input,textarea,[contenteditable]){-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
 .temp-box code{-webkit-user-select:all;user-select:all;-webkit-touch-callout:default}
 img,canvas{-webkit-user-drag:none}
}
/* Tutorial: the «?» buttons, the card that walks through the page and the glow on what it points at. */
.help-button{display:inline-grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;background:#2c2250;border:1px solid var(--line);color:var(--text);font-weight:800;font-size:15px}
.help-button:hover,.help-button:focus-visible{border-color:var(--green);color:var(--green)}
dialog.tour{position:fixed;inset:auto 0 16px 0;margin:0 auto;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;z-index:1000;
 padding:18px 20px;border:1px solid var(--purple-soft);background:var(--panel);color:var(--text);box-shadow:0 12px 40px #000c}
dialog.tour.tour-top{inset:16px 0 auto 0}
dialog.tour.tour-modal{inset:0;margin:auto;height:fit-content}
dialog.tour::backdrop{background:#0009}
.tour .eyebrow{color:var(--green);margin-bottom:6px}
.tour-icon{font-size:34px;line-height:1.1;margin:6px 0 2px;font-weight:800}
.tour h2{font-size:22px;margin:4px 0 6px}
.tour p{color:var(--muted);line-height:1.5;margin:0 0 12px}
.tour p b{color:var(--text)}
.tour-dots{display:flex;gap:5px;margin-bottom:12px}
.tour-dots i{width:7px;height:7px;border-radius:50%;background:var(--line)}
.tour-dots i.on{background:var(--green)}
.tour-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}
.tour-actions .button{padding:10px 16px}
.tour-lit{outline:3px solid var(--green)!important;outline-offset:4px;border-radius:6px;position:relative;z-index:5;animation:tour-glow 1.2s ease-in-out infinite}
@keyframes tour-glow{50%{outline-color:var(--purple-soft)}}
@media (prefers-reduced-motion:reduce){.tour-lit{animation:none}}
.playing .topbar .help-button{width:30px;height:30px}
/* ¡Subiste de nivel! */
.level-up{text-align:center;max-width:360px}
.level-up .eyebrow{justify-content:center;color:var(--green)}
.level-up-medal{font-size:64px;line-height:1;margin:6px 0 4px;animation:medal-pop .6s ease-out}
.level-up h2{font-size:34px;margin:6px 0}
.level-up p{color:var(--muted);line-height:1.45}
.level-up p b{color:var(--text)}
.level-up canvas{width:96px;height:96px;image-rendering:pixelated;margin:4px auto 10px;display:block;border-radius:4px}
.level-up .result-actions{justify-content:center}
/* Reglas del reto del día, antes de empezar. */
.daily-rules{max-width:420px}
.daily-rules h2{font-size:26px;margin:6px 0 12px}
.rules-list{margin:0 0 18px;padding-left:18px;line-height:1.5;color:var(--muted)}
.rules-list li{margin:6px 0}
.rules-list b{color:var(--text)}
@keyframes medal-pop{0%{transform:scale(.2) rotate(-25deg);opacity:0}70%{transform:scale(1.18) rotate(6deg);opacity:1}100%{transform:none}}
@media (prefers-reduced-motion:reduce){.level-up-medal{animation:none}}

@media(max-width:1100px){.topbar .idea-button span{display:none}.topbar .idea-button{padding:8px 11px}}
@media(max-width:860px){.game-cards,.home-bottom{grid-template-columns:1fr}}
@media(max-width:600px){
 .daily-strip{flex-direction:column;align-items:stretch;gap:10px;padding:12px 14px}
 .daily-strip-actions{justify-content:space-between}
 .daily-strip .button{flex:1}
 .game-info{padding:16px}
 .game-info h2{font-size:26px}
 .game-actions .button{flex:1}
 .topbar .idea-button{order:1;margin-left:auto}
 .page-heading h1{font-size:32px}
}
