/* Pausorama: shared design system, discovery surfaces and play comfort. */
.result .collection-entry{text-decoration:none;margin:6px;min-height:44px}
@font-face{font-family:'Bricolage';src:url('/assets/fonts/bricolage-bold.woff2') format('woff2');font-style:normal;font-weight:700;font-display:swap}
:root{--display:'Bricolage','Trebuchet MS',sans-serif;--radius:16px;--space-xs:8px;--space-sm:12px;--space-md:20px;--space-lg:32px;--space-xl:48px;--motion-fast:140ms;--motion-ui:220ms;--ease:cubic-bezier(.16,1,.3,1)}
::selection{background:var(--accent);color:var(--ink)}
input{caret-color:var(--ink)}
input::placeholder{color:var(--muted);opacity:1}
:focus-visible{scroll-margin-block:16px}
h1,h2,h3{font-family:var(--display);font-weight:700;letter-spacing:-.035em}
h1{font-size:clamp(2.5rem,4.4vw,4rem);line-height:1.05;text-wrap:balance;overflow-wrap:normal}
h2{font-size:clamp(1.7rem,2.3vw,2.125rem);line-height:1.15}
h3{letter-spacing:-.02em}
.stats,.record-value,.record-caption{font-variant-numeric:tabular-nums}
.wrap{padding-inline:clamp(20px,4vw,64px)}
#main{min-height:calc(100vh - 115px);min-height:calc(100svh - 115px)}
.header{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,340px) 46px;gap:6px 20px;padding-top:14px;padding-bottom:0;min-height:0}
.header .brand{grid-row:1;grid-column:1;justify-self:start}
.header .search{grid-row:1;grid-column:2;width:100%;max-width:none;margin:0;min-width:0;min-height:46px;border-color:var(--control-border);background:#fffcf8}
.header .search input{font-size:15px}
.header .search input::placeholder{color:var(--muted);opacity:1}
.header .icon-button{grid-row:1;grid-column:3;width:46px;height:46px}
.header nav{grid-row:2;grid-column:1/-1;justify-self:start;display:flex;gap:6px 10px;margin:0;min-width:0;padding-top:4px}
.header nav a{min-height:44px;padding:10px 16px;font-size:14px;border-radius:8px 8px 0 0}
.header nav a.selected{background:var(--soft-surface)}
.header nav a.selected:after{height:2px;border-radius:0;left:16px;right:16px}
.nav-short{display:none}
.text-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:14px;line-height:1.4;font-weight:700;text-decoration:underline;text-underline-offset:5px}
.text-link>span:last-child{display:flex;flex-shrink:0}
.text-link svg{width:18px;height:18px}
.text-link:hover{text-decoration-thickness:2px}
.primary,.secondary,.danger{min-height:48px;border-radius:10px;font-size:15px;padding:12px 20px;transition:background var(--motion-fast),transform var(--motion-fast) var(--ease)}
.primary{border:1px solid var(--ink)}
.primary:focus-visible{outline-offset:4px}
.primary>span:last-child{display:flex}
.icon-button{border-color:var(--control-border);border-radius:12px}
.intro{padding-top:36px;margin-bottom:32px}
.intro p{font-size:17px;line-height:1.6;max-width:65ch;margin-top:16px}
.intro h1{letter-spacing:-.04em}
.intro-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;margin-top:24px}
.remembered-space {
 display:grid;
 grid-template-columns:56px minmax(0,1fr) 20px;
 align-items:center;
 gap:12px;
 max-width:360px;
 min-height:64px;
 margin-top:16px;
 padding:10px 14px;
 border-radius:var(--radius);
 font-family:var(--display);
 font-size:clamp(15px,1.6vw,18px);
 line-height:1.2;
}
.remembered-space:hover>span:nth-child(2) {text-decoration:underline;text-underline-offset:4px}
.remembered-space svg {display:block}
.remembered-space>span:last-child svg {width:20px;height:20px}
.remembered-space.space-arcade>span:last-child {color:var(--accent)}
.remembered-space-preview {display:block;min-width:0}
.remembered-space-preview .thumb {aspect-ratio:7/5;border-radius:8px}
.remembered-space-preview .thumb>svg {padding:4px}
.remembered-space-preview .thumb>div {transform:scale(.32)}
.home-opening{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.65fr);gap:44px;align-items:center;padding-block:40px;border-bottom:1px solid var(--line);margin-bottom:28px}
.home-opening:not(:has(>.game-shelf)){grid-template-columns:1fr}
.home-opening:not(:has(>.game-shelf)) .intro h1{max-width:18ch}
.home-opening .intro{margin:0;padding:0}
.home-opening .intro h1{font-size:clamp(3rem,4.8vw,4.5rem);max-width:12ch;line-height:1.02;letter-spacing:-.04em;text-wrap:balance}
.home-opening .intro p{max-width:31ch;font-size:17px;margin-top:20px}
.home-opening .intro-actions .primary{padding-inline:17px}
.home-opening>.game-shelf{margin:0;min-width:0}
.game-card .card-copy .card-description{font-size:14px;line-height:1.5;color:var(--ink);margin-top:8px}
.home-view [aria-labelledby="featured-heading"] .catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr));content-visibility:visible}
.home-activity{min-width:0}
.home-activity>summary{cursor:pointer;min-height:44px;padding-block:12px;font-family:var(--display);font-size:18px;font-weight:700}
.home-activity .journey-history{margin-top:12px}
.space-entries{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0}
.space-entry{display:flex;flex-direction:column;justify-content:space-between;min-width:0;min-height:360px;padding:26px;border-radius:var(--radius);overflow:hidden}
.space-logic{background:var(--soft-surface);border:1px solid var(--warm-line)}
.space-arcade{background:var(--ink);color:var(--on-dark)}
.space-copy{position:relative;z-index:1;min-width:0}
.space-copy h2{font-size:30px;line-height:1.08;max-width:15ch;letter-spacing:-.035em;text-wrap:balance}
.space-copy p{font-size:15px;line-height:1.5;color:var(--muted);margin-top:12px;max-width:29ch}
.space-arcade .space-copy p{color:#e0e8f5}
.space-action{display:inline-flex;align-items:center;gap:12px;min-height:44px;margin-top:12px;font-size:14px;font-weight:700;text-decoration:underline;text-underline-offset:5px}
.space-action svg{width:19px;height:19px}
.space-arcade .space-action{color:var(--accent)}
.space-art{position:relative;flex-shrink:0;width:100%;height:134px;margin-top:20px;pointer-events:none}
.space-preview{position:absolute;width:65%;top:0;left:0;transform:rotate(-5deg)}
.space-preview:nth-child(2){top:auto;bottom:0;left:auto;right:0;transform:rotate(5deg)}
.space-preview .thumb{aspect-ratio:16/10;border:1px solid #98a5b7;border-radius:10px}
.space-preview .thumb>div{transform:scale(.65)}
.space-preview .thumb>svg{padding:6px}
.space-intro{display:grid;grid-template-columns:minmax(0,1fr) 260px;align-items:center;gap:32px;padding:34px 36px;margin-top:32px;background:var(--soft-surface);border-radius:var(--radius)}
.space-intro .space-art{height:154px;width:100%;margin:0}
.space-intro p{max-width:58ch;font-size:17px}
.space-intro h1{font-size:clamp(2.5rem,4vw,3.75rem)}
.space-intro .space-switch{margin-top:14px}
.arcade-view .space-intro{background:var(--ink);color:var(--on-dark)}
.arcade-view .space-intro p{color:#e0e8f5}
.arcade-view .space-switch{color:var(--accent)}
.arcade-view .space-switch:focus-visible{outline-color:var(--accent)}
.game-shelf{margin-block:36px}
.section-head{align-items:flex-end;gap:12px 24px;margin-bottom:20px}
.section-head h2{font-size:clamp(1.7rem,2.3vw,2.125rem)}
.game-shelf .section-head{flex-wrap:wrap}
.game-shelf .section-head h2{max-width:35ch}
.game-shelf .catalog-count-note{margin:14px 0 0}
.catalog-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 20px;contain-intrinsic-size:auto 1200px}
.game-item{position:relative;min-width:0}
.game-card{height:100%;border-radius:12px}
.catalog .game-card:focus-visible{outline-offset:-3px}
.thumb{aspect-ratio:16/10;border-radius:12px;transition:transform var(--motion-ui) var(--ease),box-shadow var(--motion-ui)}
.thumb>div{transform:scale(1.08)}
.card-arrow{width:32px;height:32px;right:10px;bottom:10px;box-shadow:none}
.game-item .card-copy{padding-right:42px;margin-top:12px;min-height:66px}
.game-card h3{font-size:20px;line-height:1.25;overflow-wrap:anywhere}
.game-card p{font-size:13px;margin-top:5px;line-height:1.5}
.record-caption{font-size:13px;margin-top:4px;max-width:calc(100% - 46px)}
.card-favorite{position:absolute;right:0;bottom:12px;width:44px;height:44px;display:grid;place-items:center;background:#fff;border:1px solid var(--line);border-radius:50%;color:var(--muted);transition:background var(--motion-fast),border-color var(--motion-fast)}
.card-favorite svg{width:19px;height:19px}
.card-favorite.active{background:var(--accent);border-color:var(--ink);color:var(--ink)}
.card-favorite.active svg{fill:var(--ink)}
.card-favorite:hover{border-color:var(--ink);color:var(--ink);background:var(--soft-surface)}
.daily-strip{display:grid;grid-template-columns:124px minmax(0,1fr) auto;align-items:center;gap:24px;padding:20px 28px;background:var(--soft-surface);border:1px solid var(--warm-line);border-radius:var(--radius);margin-block:40px}
.daily-strip>img{width:124px;height:104px;object-fit:contain}
.daily-strip h2{font-size:28px}
.daily-strip p{color:var(--muted);font-size:15px;max-width:62ch;margin-top:8px;line-height:1.55}
.daily-strip .daily-complete{font-weight:700;color:var(--ink)}
.daily-strip .secondary{white-space:nowrap;background:var(--accent);border-color:var(--ink)}
.catalog{margin-top:32px}
.catalog-view>.intro{padding-block:36px 28px;border-bottom:1px solid var(--line)}
.catalog-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 175px;gap:14px 24px;align-items:start;margin-bottom:26px}
.tabs{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
.tab{min-height:44px;padding:10px 16px;font-size:14px;border:1px solid var(--control-border);border-radius:9px;background:#fff;line-height:1.4}
.tab.active{background:var(--accent);border-color:var(--ink);font-weight:700}
.sort{min-height:44px;max-width:100%;min-width:0;width:100%;border-color:var(--control-border);border-radius:9px}
.reset-filters{grid-column:1/-1;justify-self:start;font-size:13px}
.game-count{font-size:14px}
.empty-state{padding:52px 24px;border:1px solid var(--warm-line);background:var(--soft-surface);border-radius:var(--radius)}
.empty-state h3{font-size:30px;line-height:1.15;max-width:23ch}
.empty-state p{font-size:16px;max-width:44ch;line-height:1.6}
.empty-state>svg{width:36px;height:36px;color:var(--ink)}
.footer{margin-top:56px;padding-block:26px;gap:16px 28px}
.footer .text-button{font-size:13px}
.back-link{margin-top:12px;margin-bottom:10px;min-height:44px}
.game-heading{align-items:flex-end;margin-bottom:24px;gap:20px}
.game-heading h1{font-size:clamp(2.25rem,3.3vw,3rem)}
.game-heading p{font-size:16px;line-height:1.5;margin-top:10px}
.game-heading .game-category{font-size:14px;margin-bottom:4px}
.game-layout{grid-template-columns:minmax(0,2.4fr) minmax(280px,1fr);gap:24px;align-items:start}
.game-surface{padding:24px;background:var(--soft-surface);border:1px solid var(--warm-line);border-radius:var(--radius);min-height:0}
.scoreboard{gap:16px;padding-bottom:18px;margin-bottom:24px;min-height:0}
.stats{gap:24px}
.stat{min-width:64px}
.stat+.stat{padding-left:24px}
.stat strong{font-size:25px;font-family:var(--display);font-weight:700}
.stat-label{font-size:11px;letter-spacing:.03em;line-height:1.4}
.restart{min-height:44px;padding:10px 14px;background:#fff;border:1px solid var(--control-border);border-radius:9px;font-size:13px;gap:8px}
.restart:hover{background:var(--soft-surface)}
.restart svg{width:18px;height:18px}
.quick-help{display:none}
.game-mount{min-height:300px}
.game-message{font-size:14px;line-height:1.6;margin-top:18px}
.instructions,.personal-record{padding:26px;border-radius:var(--radius);border-color:var(--line);background:#fff}
.game-aside h2{font-size:27px;margin-bottom:16px}
.game-aside p{font-size:15px;line-height:1.65;max-width:65ch}
.control-hint p{font-size:14px}
.favorite-game{margin-top:24px;min-height:48px}
.personal-record{min-height:0}
.personal-record .record-value{font-family:var(--display);font-size:38px;font-weight:700;letter-spacing:-.03em}
.personal-record .record-description{font-size:14px;margin-top:12px}
.local-note{background:transparent;border-bottom:1px solid var(--line);border-radius:0;padding:16px 0;font-size:13px;line-height:1.6;margin-top:8px}
.related{margin-top:36px}
.related h2{font-size:30px;margin-bottom:12px}
.related .related-note{font-size:14px;color:var(--muted);margin-bottom:20px}
.related .compact{padding:14px;gap:14px;border:1px solid var(--warm-line);background:var(--soft-surface)}
.related h3{font-size:20px}
.related p{font-size:14px;line-height:1.5}
.related>.text-link{margin-top:16px}
.result{border:1px solid var(--warm-line);border-radius:12px;background:#fff;padding:26px;margin-top:24px}
.result h3{font-size:30px;line-height:1.15}
.result p{font-size:16px;line-height:1.55}
.result-score{font-family:var(--display);font-size:32px;font-weight:700}
.game-loading:before{content:'';display:block;width:28px;height:28px;margin:0 auto 16px;border:3px solid var(--line);border-top-color:var(--ink);border-radius:50%;animation:loading-turn 800ms linear infinite}
.game-error{font-size:16px;line-height:1.6}
dialog{padding:40px;border:1px solid var(--control-border);border-radius:var(--radius);max-width:580px;box-shadow:0 24px 80px #1b294030}
dialog::backdrop{background:#1b294099;backdrop-filter:none}
dialog h2{font-size:34px;line-height:1.12;margin-bottom:22px}
dialog p{font-size:16px;line-height:1.65}
dialog .dialog-close{top:14px;right:14px}
#toast{font-size:15px;padding:14px 22px;box-shadow:0 8px 30px #1b294026;bottom:max(24px,env(safe-area-inset-bottom));transition:opacity var(--motion-fast),transform var(--motion-ui) var(--ease)}
@keyframes loading-turn{to{transform:rotate(1turn)}}
@media(hover:hover) and (pointer:fine){.space-entry:hover .space-action{text-decoration-thickness:2px}.game-card:hover h3{text-decoration:underline;text-underline-offset:4px}.game-card:hover .thumb{transform:translateY(-3px);box-shadow:0 8px 24px #1b294012}}
@media(max-width:1200px){.home-opening{gap:28px;grid-template-columns:minmax(0,.85fr) minmax(0,1.65fr)}.space-entry{padding:22px;min-height:350px}.space-copy h2{font-size:28px}.space-art{height:124px}.space-preview .thumb>div{transform:scale(.55)}.space-copy p{font-size:14px}.home-opening .intro-actions{gap:6px}.home-opening .intro-actions .primary{padding-inline:14px;font-size:14px}}
@media(max-width:1100px){.catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.game-layout{grid-template-columns:minmax(0,2.1fr) minmax(255px,1fr)}.instructions,.personal-record{padding:22px}.space-intro{grid-template-columns:minmax(0,1fr) 200px}.home-opening{grid-template-columns:1fr;gap:28px;padding-block:36px}.home-opening .intro{max-width:720px}.home-opening .intro h1{max-width:18ch;font-size:58px}.home-opening .intro p{max-width:50ch}.home-opening .intro-actions{gap:10px 20px}.space-entry{min-height:220px;flex-direction:row;align-items:center;gap:24px}.space-copy{flex:1}.space-entry .space-art{width:150px;height:150px;margin:0}.space-entry .space-preview{width:130px}.space-preview .thumb>div{transform:scale(.55)}}
@media(max-width:900px){.game-layout{grid-template-columns:1fr}.game-aside{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}.game-aside .full-help{display:none}.instructions{padding:0;border:0;background:transparent}.favorite-game{margin:0}.quick-help{display:block;margin-bottom:16px;padding-bottom:8px;border-bottom:1px solid var(--warm-line)}.quick-help summary{cursor:pointer;min-height:44px;padding-block:10px;font-size:14px;font-weight:700}.quick-help p{font-size:15px;line-height:1.6;margin:10px 0}.game-surface{padding:22px}.related .compact{flex-direction:row;align-items:center}.related-grid{grid-template-columns:1fr}.related .thumb{width:100px;min-width:100px;height:82px}.related .thumb>div{transform:scale(.65)}.daily-strip{grid-template-columns:90px minmax(0,1fr);gap:14px 20px}.daily-strip>img{width:90px;height:76px;grid-row:1/3}.daily-strip>.secondary{grid-column:2;justify-self:start}.header nav{gap:0}.header nav a{padding-inline:12px}}
@media(max-width:700px){.catalog-toolbar{grid-template-columns:1fr}.catalog-toolbar .tabs{display:flex;flex-wrap:wrap;overflow:visible;padding:0;gap:8px;max-width:100%;width:100%}.catalog-toolbar .tab{flex-shrink:1;white-space:normal}.sort{width:auto;min-width:170px;justify-self:end;margin:0}.space-intro{grid-template-columns:1fr}.space-intro>.space-art{display:none}.reset-filters{grid-row:2;grid-column:1;justify-self:start;max-width:calc(100% - 182px)}.reset-filters+.sort{grid-row:2}}
@media(max-width:640px){
 .wrap{padding-inline:20px}
 .header{grid-template-columns:minmax(0,1fr) 46px;gap:6px 12px;padding-top:12px}
 .header .brand{grid-column:1/-1;grid-row:1}
 .header .brand img{width:156px}
 .memory-mark{width:28px;height:28px}
 .header .search{grid-column:1;grid-row:2;margin:2px 0 0;min-height:44px}
 .header .search input{font-size:16px;min-height:42px}
 .header .icon-button{grid-column:2;grid-row:2;width:46px;height:46px}
 .header nav{grid-column:1/-1;grid-row:3;display:flex;justify-self:stretch;justify-content:space-between;gap:0;padding-top:0;width:100%}
 .header nav a{font-size:14px;min-height:44px;line-height:1.3;padding:10px 9px;white-space:nowrap;justify-content:center}
 .header nav a.selected:after{left:9px;right:9px}
 .nav-long{display:none}.nav-short{display:inline}
 .intro{padding-top:28px;margin-bottom:28px}
 .intro h1{font-size:40px;max-width:20ch;line-height:1.06}
 .intro p{font-size:16px;line-height:1.6;margin-top:14px}
 .text-link{font-size:14px}
 .home-opening{padding-block:24px;gap:24px;margin-bottom:24px}
 .home-opening .intro h1{font-size:44px;max-width:14ch;line-height:1.02}
 .home-opening .intro p{font-size:16px;margin-top:16px;max-width:38ch}
 .home-opening .intro-actions{margin-top:18px;gap:6px 14px}
 .home-opening .intro-actions .primary{font-size:14px;padding-inline:16px}
 .space-entries{grid-template-columns:1fr;gap:12px}
 .space-entry{min-height:174px;padding:20px;gap:14px}
 .space-copy h2{font-size:27px;max-width:15ch;line-height:1.08;text-wrap:initial}
 .space-copy p{font-size:14px;line-height:1.45;margin-top:10px;max-width:26ch}
 .space-action{font-size:14px;margin-top:8px;min-height:38px;gap:10px}
 .space-entry .space-art{width:104px;height:128px}
 .space-entry .space-preview{width:104px}
 .space-preview .thumb>div{transform:scale(.45)}
 .space-intro{padding:24px;margin-top:24px;margin-bottom:28px}
 .space-intro h1{font-size:38px;max-width:16ch}
 .space-intro p{font-size:16px;margin-top:14px}
 .game-shelf{margin-block:30px}
 .section-head{margin-bottom:16px;gap:4px 14px}
 .section-head h2{font-size:28px;line-height:1.15}
 .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}
 .game-item .card-copy{padding-right:0;min-height:88px;margin-top:10px;padding-bottom:30px}
 .game-card h3{font-size:18px;line-height:1.25}
 .game-card p{font-size:13px;line-height:1.45;padding-right:32px;margin-top:5px}
 .card-favorite{bottom:0;width:44px;height:44px}
 .thumb{aspect-ratio:16/10;border-radius:10px}
 .thumb>div{transform:scale(.78)}
 .card-arrow{width:28px;height:28px;right:7px;bottom:7px}
 .card-arrow svg{width:16px;height:16px}
 .record-caption{font-size:12px;max-width:calc(100% - 44px);margin-top:-22px;padding-bottom:6px}
 .daily-strip{padding:20px;grid-template-columns:58px minmax(0,1fr);gap:12px 14px;margin-block:32px}
 .daily-strip>img{width:58px;height:70px;grid-row:1}
 .daily-strip h2{font-size:24px;line-height:1.15}
 .daily-strip p{font-size:14px;line-height:1.5}
 .daily-strip>.secondary{grid-column:1/-1;justify-self:start}
 .catalog-view>.intro{padding-block:28px 24px;margin-bottom:28px}
 .catalog{margin-top:28px}
 .catalog-toolbar{gap:14px;margin-bottom:24px}
 .tab{font-size:14px;padding:10px 13px;min-height:44px}
 .sort{font-size:14px}
 .game-count{font-size:14px}
 .empty-state{padding:38px 22px}
 .empty-state h3{font-size:28px}
 .empty-state p{font-size:16px}
 .footer{margin-top:40px;padding-block:24px;gap:16px}
 .footer>div{gap:8px 20px}
 .footer .text-button{font-size:13px}
 .back-link{font-size:14px;margin-top:8px;margin-bottom:6px}
 .game-heading{margin-bottom:20px}
 .game-heading h1{font-size:36px;line-height:1.08}
 .game-heading p{font-size:15px;line-height:1.5;margin-top:8px}
 .game-heading .game-category{font-size:13px;margin-top:8px}
 .game-surface{padding:16px 12px;border-radius:14px}
 .scoreboard{gap:10px;margin-bottom:18px;padding-bottom:14px;flex-wrap:wrap}
 .stats{gap:14px;flex-wrap:wrap}
 .stat{min-width:0}.stat+.stat{padding-left:14px}
 .stat-label{font-size:10px;letter-spacing:.02em}
 .stat strong{font-size:22px}
 .restart{padding:10px 12px;font-size:13px;gap:7px}
 .restart svg{display:block;width:17px;height:17px}
 .game-mount{min-height:260px;gap:16px}
 .quick-help{margin-bottom:12px;padding-bottom:6px}
 .quick-help p{font-size:15px}
 .game-message{font-size:13px;line-height:1.6;margin-top:16px}
 .game-aside{grid-template-columns:1fr;gap:14px}
 .game-aside h2{font-size:24px;margin:0}
 .personal-record{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 16px;padding:20px}
 .personal-record .record-value{font-size:30px;line-height:1.2}
 .personal-record .record-description{grid-column:1/-1;font-size:14px;margin:0}
 .local-note{font-size:13px}
 .related h2{font-size:28px}
 .related h3{font-size:20px}
 .related p{font-size:14px}
 .related .compact{padding:12px;gap:12px}
 .related .thumb{width:88px;min-width:88px;height:80px}
 .result{padding:22px 14px}.result h3{font-size:27px}.result p{font-size:15px}.result button{width:100%;margin:5px 0}
 dialog{padding:44px 24px 24px;width:calc(100% - 28px);max-height:calc(100dvh - 28px)}
 dialog h2{font-size:30px}dialog p{font-size:16px;line-height:1.6}
 #toast{font-size:14px;bottom:max(16px,env(safe-area-inset-bottom));padding:14px 18px}
}
@media(max-width:360px){.wrap{padding-inline:16px}.header nav a{font-size:13px;padding-inline:7px}.header nav a.selected:after{left:7px;right:7px}.home-opening .intro h1{font-size:40px}.home-opening .intro-actions{gap:8px}.home-opening .intro-actions .primary{font-size:14px;padding-inline:12px}.space-entry{padding:18px;gap:10px}.space-copy h2{font-size:25px}.space-entry .space-art{width:80px;height:120px}.space-entry .space-preview{width:88px}.space-preview .thumb>div{transform:scale(.38)}.catalog-grid{gap:24px 12px}.thumb>div{transform:scale(.66)}.game-card h3{font-size:17px}.game-card p{font-size:13px}.space-intro{padding:22px}.space-intro h1{font-size:34px}.stat strong{font-size:21px}.stats{gap:10px}.stat+.stat{padding-left:10px}}
@media(max-height:520px) and (orientation:landscape){.header{padding-top:8px}.game-heading h1{font-size:32px}.home-opening{padding-block:24px}.game-mount{min-height:0}.game-surface{padding:16px}.space-intro{margin-top:24px;padding:24px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.game-card:hover .thumb{transform:none}}

/* The same category controls disclose on phones; focus/state survive filtering. */
.category-filter{min-width:0}
.category-filter>summary{cursor:pointer;min-height:44px;padding:11px 14px;border:1px solid var(--control-border);border-radius:9px;font-size:14px;font-weight:700;line-height:1.4}
.category-filter>.tabs{margin-top:12px}
@media(min-width:701px){.category-filter[open]>summary{display:none}.category-filter>.tabs{margin-top:0}}
@media(max-width:700px){.catalog-toolbar{grid-template-columns:minmax(0,1fr) 170px}.catalog-toolbar>.category-filter{grid-column:1/-1}.catalog-toolbar .sort{grid-column:2;grid-row:2;width:100%;justify-self:end}.catalog-toolbar .reset-filters{grid-column:1;grid-row:2;max-width:none;align-self:center}}

/* Labels remain reachable when text is enlarged. */
.header nav{flex-wrap:wrap}
/* Real content and enlarged text may wrap without widening the page. */
h1,h2,h3{overflow-wrap:anywhere}
.home-opening>.intro,.section-head h2,.personal-record,.record-value{min-width:0}
.personal-record{max-width:100%}
.record-value{overflow-wrap:anywhere}
@media(max-width:640px){.personal-record.record-long{grid-template-columns:minmax(0,1fr)}}

/* Original games: consistent tabletop materials and readable final states. */
.game-mount [hidden]{display:none!important}
.game-mount:not(.xp) .tile{border-radius:10px;font-family:var(--display);font-weight:700}
.game-mount:not(.xp) .tile:disabled{opacity:1;cursor:default}
.merge-board{max-width:410px;padding:10px;background:#cbdac5;border:1px solid #98ad91}
.merge-tile{font-family:var(--display);font-size:clamp(22px,3.5vw,36px);font-weight:700;line-height:1.1}
.memory-board{max-width:440px;gap:10px}
.memory-tile{background:var(--ink);border-color:var(--ink);box-shadow:none}
.memory-tile.flipped{background:#fff;border-color:var(--control-border);color:#a54822}
.memory-tile.matched{background:var(--accent);border-color:var(--ink);color:var(--ink)}
.snake-area{max-width:430px}
.snake-canvas{border:1px solid #91aa87;border-radius:12px;background:#f8fbf4}
.mines-board{max-width:420px;gap:3px}
.mines-board .tile{background:#e1ebdc;border:1px solid #95aa8d;box-shadow:none;border-radius:4px;font-family:Arial,sans-serif;font-weight:700}
.mines-board .tile.revealed{background:#fff;border-color:#d4dfcd;box-shadow:none}
.lights-board{max-width:390px;background:#fff;padding:10px;border:1px solid #bdcfb4;border-radius:12px;gap:8px}
.lights-board .tile{background:#d1ddcb;border:1px solid #a5b99a;box-shadow:none}
.lights-board .tile.lit{background:var(--accent);border-color:#54733c;box-shadow:none}
.tic-board{max-width:350px;background:#8ea58a;border-radius:12px;overflow:hidden;border:1px solid #8ea58a}
.game-mount .tic-board .tile{border-radius:0;background:#fff;font-size:clamp(44px,8vw,76px)}
.game-mount .tic-board .tile.tic-winning{background:#d4fb50;box-shadow:inset 0 0 0 3px #25483a;opacity:1}
.game-mount .fifteen-board .tile.fifteen-movable{box-shadow:inset 0 0 0 3px #35634f}
.game-mount .game-options input[type="number"]{min-height:44px;width:100%;max-width:130px;border:1px solid #7b9373;border-radius:9px;padding:8px}
.game-options{display:flex;flex-wrap:wrap;gap:10px;align-items:center;max-width:100%}
.game-options select{min-height:44px;border:1px solid #7b9373;background:#fff;border-radius:9px;padding:10px 12px;font-size:14px}
.game-options select:disabled{opacity:1;color:var(--muted);background:var(--soft-surface)}
.connect-board{max-width:440px;background:var(--ink);padding:10px;gap:7px;border:1px solid var(--ink);border-radius:14px}
.game-mount .connect-board .tile{border-radius:50%;border-color:#688363;background:#f8fbf4}
.connect-board .tile[data-player="1"]{background:#fa9866}
.connect-board .tile[data-player="2"]{background:#d4fb50}
.connect-board[aria-busy="true"],.tic-board[aria-busy="true"]{cursor:progress}
.fifteen-board{max-width:390px;background:#cbdac5;padding:9px;gap:7px;border:1px solid #98ad91}
.fifteen-board .tile{background:#fff;border:1px solid #a7b99e;font-size:clamp(22px,4vw,32px);box-shadow:none}
.fifteen-board .tile.empty{background:#b5c6ad;border-color:transparent}
.color-board{max-width:390px;padding:8px;background:#fff;border:1px solid #bdcfb4;border-radius:12px}
.color-board .tile{border:1px solid #1b294020}
.reaction-target{border:1px solid #7b9373;border-radius:12px;background:#e5eee0;color:var(--ink);font-family:var(--display);font-weight:700;line-height:1.3;font-size:clamp(24px,4vw,34px);max-width:480px}
.reaction-target[data-state="waiting"]{background:#ffe1d1;color:#763426}
.reaction-target[data-state="green"]{background:#d4fb50;color:#153c27}
.reaction-target[data-state="early"]{background:#f7e9bf;color:#674722}
.reaction-target:disabled{background:#e5eee0;color:var(--ink);opacity:1}
.simon-board{max-width:370px;background:#fff;border:1px solid #bdcfb4;border-radius:12px;padding:10px;gap:12px}
.simon-board .tile{font-family:var(--display);font-size:40px;border:1px solid #5a7650;box-shadow:none;min-height:0;opacity:1}
.simon-board .tile.flash{outline:3px solid var(--ink);outline-offset:2px;box-shadow:none;filter:brightness(1.12)}
.game-surface[data-game="secuencia"] .game-mount>.primary{margin:0 0 12px}
.sudoku-board{max-width:390px;border-radius:0;overflow:hidden;border:2px solid #526e47}
.game-mount .sudoku-board .tile{border-radius:0;font-size:clamp(23px,4vw,34px);font-family:var(--display)}
.sudoku-board .tile.given{background:#e5eee0;color:var(--ink)}
.sudoku-board .tile.chosen{background:#e4f6b8;box-shadow:inset 0 0 0 3px #4a7951}
.sudoku-board .tile.conflict{background:#ffe6dc;color:#9f2826;text-decoration:underline wavy;text-underline-offset:5px}
.game-mount:not(.xp)>.primary:disabled{background:var(--soft-surface);color:var(--muted);border-color:var(--control-border);opacity:1}
@media(max-width:640px){.memory-board{gap:7px}.mines-board{gap:2px}.mines-board .tile{font-size:15px}.connect-board{gap:4px;padding:7px}.merge-board{padding:8px}.fifteen-board{gap:5px;padding:8px}.lights-board{gap:6px;padding:8px}.simon-board{gap:10px;padding:9px}.direction-pad,.number-pad{gap:9px}}

/* Hitori: the stacked aside first appears at its final position after loading. */
@media(max-width:900px){.hitori-layout:has(>.game-surface[aria-busy="true"])>.game-aside{visibility:hidden}}

/* Return visits: saved games, a daily selection and meaningful personal progress. */
.home-view>.space-entries{margin-block:28px 36px}
.home-view>.space-entries .space-entry{flex-direction:row;align-items:center;min-height:0;padding:20px;gap:16px}
.home-view .space-copy h2{font-size:clamp(22px,2.4vw,30px)}
.home-view .space-copy p{margin-top:8px}
.home-view .space-action{margin-top:4px}
.home-view .space-entry .space-art{width:clamp(104px,16vw,200px);height:100px;margin:0}
.thumb .n8{color:var(--ink)}
@media(max-width:1100px){
 .home-view .space-entry .space-art{width:100px;height:86px}
 .home-view .space-preview{width:74px}
 .home-view .space-preview .thumb>div{transform:scale(.38)}
}
@media(max-width:760px){
 .home-view>.space-entries{grid-template-columns:1fr}
 .home-view>.space-entries .space-entry{padding:14px 16px}
 .home-view .space-entry .space-art{width:88px;height:76px}
 .home-view .space-preview{width:64px}
 .home-view .space-preview .thumb>div{transform:scale(.32)}
}
@media(max-width:640px){
 .home-view [aria-labelledby="featured-heading"] .section-head{margin-bottom:8px}
 .home-view [aria-labelledby="featured-heading"] .catalog-grid{grid-template-columns:1fr;gap:0}
 .home-view [aria-labelledby="featured-heading"] .game-item+.game-item{border-top:1px solid var(--line)}
 .home-view [aria-labelledby="featured-heading"] .game-card{display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center;column-gap:12px;padding:10px 48px 10px 0}
 .home-view [aria-labelledby="featured-heading"] .thumb{grid-row:1/span 2;aspect-ratio:1}
 .home-view [aria-labelledby="featured-heading"] .thumb>div{transform:scale(.42)}
 .home-view [aria-labelledby="featured-heading"] .card-arrow{width:22px;height:22px;right:4px;bottom:4px}
 .home-view [aria-labelledby="featured-heading"] .card-arrow svg{width:14px;height:14px}
 .home-view [aria-labelledby="featured-heading"] .card-copy{margin:0;min-height:0;padding:0}
 .home-view [aria-labelledby="featured-heading"] .card-copy p{padding-right:0}
 .home-view [aria-labelledby="featured-heading"] .card-description{margin-top:4px;font-size:13px}
 .home-view [aria-labelledby="featured-heading"] .card-favorite{top:50%;bottom:auto;transform:translateY(-50%)}
 .home-view [aria-labelledby="featured-heading"] .record-caption{grid-column:2;max-width:none;margin:4px 0 0;padding:0}
}
@media(min-width:380px) and (max-width:640px){
 .header:has(+main.game-view){grid-template-columns:104px minmax(0,1fr) 46px;align-items:center;gap:6px 8px}
 .header:has(+main.game-view) .brand{grid-column:1;grid-row:1;min-height:44px}
 .header:has(+main.game-view) .brand img{width:104px}
 .header:has(+main.game-view) .search{grid-column:2;grid-row:1;margin:0}
 .header:has(+main.game-view) .search input{padding-right:4px}
 .header:has(+main.game-view) .icon-button{grid-column:3;grid-row:1}
 .header:has(+main.game-view) nav{grid-row:2}
}
.home-journey{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:28px;margin:24px 0 40px;align-items:start}
.daily-routine{min-width:0;background:#fffaf5;border:1px solid var(--control-border);border-radius:16px;padding:24px}
.routine-heading,.journey-history-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
.routine-heading h2,.journey-history-head h3{margin:0}
.routine-heading h2{font-size:clamp(26px,2.6vw,34px)}
.routine-count,.journey-history-head p{font-size:13px;color:var(--muted);margin:0}
.routine-intro{font-size:15px;line-height:1.55;margin:10px 0 22px;max-width:65ch}
.routine-list{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:16px 24px}
.routine-list article{min-width:0}
.routine-main{grid-row:span 2;display:flex;gap:18px;align-items:center}
.routine-preview{width:104px;min-width:104px;height:130px;overflow:hidden;border-radius:12px}
.routine-preview .thumb{width:100%;height:100%;border-radius:0}
.routine-preview .thumb>div{transform:scale(.55)}
.routine-copy{min-width:0}
.routine-copy h3{font-size:24px;line-height:1.15;margin:0 0 8px;overflow-wrap:anywhere}
.routine-copy p{margin:6px 0;font-size:14px;line-height:1.5}
.routine-copy .routine-state{font-size:12px;color:var(--muted)}
.routine-copy .routine-state.is-done{color:var(--ink);font-weight:700}
.routine-copy .primary{margin-top:10px;font-size:14px;min-height:44px;padding:11px 15px;text-decoration:none}
.routine-alternative{padding-bottom:12px;border-bottom:1px solid var(--control-border)}
.routine-alternative h3{font-size:19px}
.routine-alternative .text-link{font-size:13px;min-height:44px;padding:6px 0}
.routine-renewal{margin:22px 0 0;padding-top:16px;border-top:1px solid var(--control-border);color:var(--muted);font-size:13px;line-height:1.6;max-width:75ch}
.journey-history{min-width:0;padding:18px 0}
.journey-history-head h3{font-size:20px;line-height:1.25}
.journey-week{list-style:none;padding:0;margin:20px 0 14px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;max-width:490px}
.journey-week li{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
.journey-week time{font-size:12px;color:var(--muted);text-transform:capitalize}
.week-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#f2ece4;color:var(--ink);font-size:13px;font-variant-numeric:tabular-nums}
.week-mark svg{width:20px;height:20px}
.is-played .week-mark{background:var(--accent)}
.is-today .week-mark{outline:2px solid var(--ink);outline-offset:2px}
.journey-small{font-size:13px;line-height:1.6;color:var(--muted);max-width:70ch;margin:12px 0}
.journey-achievements{margin-top:18px;border-top:1px solid var(--control-border)}
.journey-achievements summary{cursor:pointer;min-height:44px;padding:14px 0;font-size:14px;font-weight:700;line-height:1.5}
.journey-achievements ul{list-style:none;padding:0;margin:4px 0}
.journey-achievements li{display:grid;grid-template-columns:20px minmax(0,1fr);gap:5px 8px;margin:12px 0;font-size:13px;line-height:1.45}
.achievement-mark{width:18px;height:18px;border:1px solid var(--control-border);border-radius:4px}
.achievement-mark svg{width:16px;height:16px}
.is-earned .achievement-mark{background:var(--accent);border-color:var(--accent)}
.achievement-state{grid-column:2;font-size:12px;color:var(--muted)}
.continue-section{margin:28px 0}
.continue-section h2{font-size:25px;margin:0 0 16px}
.continue-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.continue-list .game-card.compact{display:flex;gap:12px;align-items:center;min-height:100px;padding:12px}
.continue-list .thumb{width:66px;min-width:66px;height:76px;overflow:hidden}
.continue-list .thumb>div{transform:scale(.45)}
.continue-list .card-copy{min-width:0;flex:1}
.continue-list .card-copy h3{font-size:18px;margin:0 0 6px}
.continue-list .card-copy p{font-size:12px;line-height:1.45;margin:0}
.continue-action{font-size:13px;font-weight:700;text-decoration:underline;text-underline-offset:4px}
.home-routes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;margin-top:40px}
.journey-route{margin:32px 0;padding-top:24px;border-top:1px solid var(--control-border);min-width:0}
.journey-route h2{font-size:27px;margin:0 0 12px}
.journey-route>p{max-width:65ch;line-height:1.6}
.journey-steps{display:flex;flex-wrap:wrap;gap:12px 38px;padding-left:22px;margin:18px 0}
.journey-steps li{min-width:110px;flex:1;padding-left:3px}
.journey-steps li::marker{font-weight:700;color:var(--muted)}
.journey-steps .text-link{font-size:15px;min-height:44px}
.journey-steps .is-current>span{display:block;padding:11px 0;font-weight:700}
.journey-steps small{display:block;color:var(--muted);font-size:12px;line-height:1.5}
.home-routes .journey-route{margin:0}
.personal-goal{padding:26px;background:#fffaf5;border:1px solid var(--control-border);border-radius:16px}
.personal-goal h2{margin:0 0 16px;font-size:25px}
.personal-goal p{font-size:14px;line-height:1.6;margin:10px 0}
.personal-goal .goal-title{font-size:18px;line-height:1.35;font-weight:700}
.merge-feedback{display:grid;gap:4px;justify-items:center;text-align:center}
.merge-save-note{font-size:13px;line-height:1.5;margin:0;max-width:55ch;color:var(--ink)}
@media(max-width:640px){
 .game-surface:has(.merge-board)>.quick-help{margin-bottom:8px;padding-bottom:0}
 .game-surface:has(.merge-board)>.scoreboard{margin-bottom:12px;padding-bottom:10px}
}
.result-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:14px 0 8px}
.result .result-actions button,.result .result-actions a{margin:0;min-height:44px}
.result .result-next-reason,.result .result-tomorrow{font-size:13px;line-height:1.6;max-width:65ch;margin:10px auto;color:var(--ink)}
.result .result-tomorrow{margin-top:18px;color:var(--muted)}
.restart-question{padding:14px;margin:8px 0 16px;background:#fff4e7;border:1px solid var(--control-border);border-radius:12px;line-height:1.5}
.restart-question p{margin:0 0 10px;font-size:14px}
.restart-question button{margin:4px;min-height:44px}
@media(max-width:1100px){.home-journey{grid-template-columns:minmax(0,1fr)}.journey-history{padding:0}.journey-history-head{justify-content:flex-start}.journey-week{margin-block:16px}.journey-achievements{max-width:600px}}
@media(max-width:900px){.continue-list{grid-template-columns:1fr}.personal-goal{grid-column:1/-1}.home-routes{grid-template-columns:1fr;gap:28px}.routine-list{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}}
@media(max-width:640px){.home-journey{gap:24px;margin:20px 0 30px}.daily-routine{padding:18px}.routine-list{grid-template-columns:1fr;gap:16px}.routine-main{grid-row:auto;align-items:flex-start;gap:16px;padding-bottom:18px;border-bottom:1px solid var(--control-border)}.routine-preview{width:82px;min-width:82px;height:108px}.routine-preview .thumb>div{transform:scale(.46)}.routine-copy h3{font-size:23px}.routine-copy p{font-size:13px}.routine-copy .primary{padding:10px 12px;font-size:13px}.routine-alternative h3{font-size:20px}.routine-alternative .routine-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px}.routine-alternative h3,.routine-alternative p{grid-column:1}.routine-alternative .text-link{grid-column:2;grid-row:1/4;align-self:center;max-width:95px}.routine-renewal{margin-top:16px;padding-top:12px}.routine-count{font-size:12px}.journey-week{gap:5px}.continue-list .game-card.compact{padding:10px;gap:10px}.continue-action{font-size:12px}.continue-section h2{font-size:24px}.personal-goal{padding:22px}.journey-route h2{font-size:25px}.journey-steps{display:block;margin:12px 0}.journey-steps li{padding-block:4px}.result-actions{flex-direction:column}.result .result-actions button,.result .result-actions a{width:100%;justify-content:center}.home-routes{margin-top:30px}}
@media(max-width:360px){.daily-routine{padding:14px}.routine-main{gap:12px}.routine-preview{width:68px;min-width:68px;height:96px}.routine-preview .thumb>div{transform:scale(.38)}.routine-copy .primary{padding:10px;font-size:12px}.routine-copy h3{font-size:21px}.routine-alternative .text-link{max-width:76px}.week-mark{width:29px;height:29px}}

/* Continuity: fixed weekly boards, optional practice and player choice. */
.play-hub{margin:38px 0;padding:28px 0;border-block:1px solid var(--control-border);scroll-margin-top:24px;min-width:0}.play-hub h2{font-size:30px;margin:0 0 14px}.hub-intro{max-width:70ch;line-height:1.65;margin:0 0 26px}.adventure-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 24px;align-items:center}.adventure-summary h3{font-size:24px;margin:0}.adventure-summary p{margin:0;font-size:14px}.adventure-summary progress{width:100%;height:9px;accent-color:var(--ink);grid-column:1}.adventure-summary .primary{grid-column:2;grid-row:1/4;min-height:44px;white-space:normal;text-align:center}
.play-hub>details{border-top:1px solid var(--control-border);margin-top:24px;padding-top:4px}.play-hub summary,.mobile-return summary{cursor:pointer;min-height:48px;padding:15px 0;font-weight:700;font-size:18px;line-height:1.4}.adventure-map{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:24px;padding:0;list-style-position:inside;margin:20px 0}.adventure-map>li{min-width:0;padding-top:14px;border-top:2px solid var(--ink)}.adventure-map>li::marker{font-weight:700}.adventure-map h4{font-size:20px;line-height:1.3;margin:12px 0}.adventure-map p{font-size:13px;line-height:1.65}.adventure-map>li.is-locked{border-top-color:var(--control-border)}.adventure-map ol{padding-left:18px;margin:14px 0}.adventure-map ol li{padding:4px 0}.adventure-map a,.circuit-list a{min-height:44px;font-size:14px}.adventure-map ol span,.circuit-list span{display:block;font-size:12px;line-height:1.6;color:var(--muted)}
.circuit-details>h3{font-size:23px;margin:14px 0}.circuit-details>p,.mastery-details>p{max-width:70ch;line-height:1.65}.circuit-choices{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.circuit-choices button{min-height:44px;white-space:normal}.circuit-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:22px;padding-left:20px}.circuit-list li{padding:4px 0;min-width:0}.circuit-details>div:last-child p{line-height:1.6}.circuit-details>div:last-child button{min-height:44px;margin:4px 8px 4px 0;white-space:normal}
.mastery-list{list-style:none;padding:0;margin:20px 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 32px}.mastery-list li{padding-top:20px;border-top:1px solid var(--control-border);min-width:0}.mastery-list h3{font-size:22px;margin:0 0 12px}.mastery-list p{font-size:13px;line-height:1.65;margin:8px 0}.mastery-rank{font-size:14px}.mastery-list a{font-size:14px;min-height:44px}.player-journey{padding:22px 0;border-top:1px solid var(--control-border)}.player-journey h3{font-size:20px;margin:0 0 12px}.player-journey h3:not(:first-child){margin-top:22px}.player-journey p{font-size:13px;line-height:1.65}.player-journey a{font-size:14px;min-height:44px;display:flex}
.journey-next{padding:22px 0;border-top:1px solid var(--control-border);margin:20px 0;max-width:640px}.journey-next h4{font-size:23px;margin:0 0 12px}.journey-next p{font-size:14px;line-height:1.6}.journey-next .primary{min-height:44px;white-space:normal;text-align:center}.friend-duel{padding:20px 0;margin:12px 0;border-block:1px solid var(--control-border)}.friend-duel h3{font-size:22px;margin:0 0 12px}.friend-duel p{font-size:14px;line-height:1.65}.duel-result{font-size:18px;display:block;line-height:1.4}.friend-duel[hidden],.player-journey[hidden],.journey-next[hidden],.mobile-return [hidden]{display:none!important}.mistake-review:empty{display:none}.mistake-review{padding:20px 0;margin:16px 0;border-top:1px solid var(--control-border)}.mistake-review h4{font-size:21px;margin:0 0 12px}.mistake-review p{font-size:14px;line-height:1.65;max-width:65ch}.mistake-review button{min-height:44px;white-space:normal}.pa-actions .challenge-share{flex-basis:100%;margin:10px 0}
.mobile-return{margin:34px 0;padding:26px 0;border-top:1px solid var(--control-border);max-width:850px;scroll-margin-top:24px}.mobile-return h2{font-size:27px;margin:0 0 14px}.mobile-return p,.mobile-return li{font-size:14px;line-height:1.65}.mobile-return>p{max-width:70ch}.mobile-return li{margin:10px 0}.mobile-return>details{border-bottom:1px solid var(--control-border);padding:4px 0 12px}.mobile-return button,.mobile-return a{min-height:44px;white-space:normal}.reminder-time{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:18px 0;font-size:14px;font-weight:700}.reminder-time input{min-height:44px;padding:8px 12px;font:inherit;color:var(--ink);background:#fffaf5;border:1px solid var(--control-border);border-radius:8px}.return-status:empty{display:none}.return-status{font-size:13px}.result .friend-duel{text-align:left}
@media(max-width:1100px){.adventure-map{grid-template-columns:repeat(3,minmax(0,1fr))}.circuit-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.game-play-progress{grid-column:1/-1}.mastery-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.play-hub{margin:28px 0;padding:24px 0}.play-hub h2{font-size:27px}.adventure-summary{display:block}.adventure-summary h3{font-size:22px}.adventure-summary p{margin:12px 0}.adventure-summary progress{display:block;margin:12px 0 18px}.adventure-summary .primary{width:100%;justify-content:center}.adventure-map,.mastery-list,.circuit-list{grid-template-columns:1fr;gap:18px}.adventure-map{margin-block:8px}.adventure-map>li{padding-top:12px}.adventure-map h4{display:inline;font-size:21px;margin:0 0 0 8px}.adventure-map ol li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}.circuit-list li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}.circuit-choices{flex-direction:column}.circuit-choices button{width:100%}.play-hub summary,.mobile-return summary{font-size:17px}.mastery-list h3{font-size:21px}.mobile-return h2{font-size:25px}}
.weekly-selection{margin:38px 0 48px;padding:28px 0;border-block:1px solid var(--control-border);min-width:0;scroll-margin-top:140px}
.weekly-header{display:flex;justify-content:space-between;gap:28px;align-items:start}
.weekly-header>div:first-child{max-width:66ch;min-width:0}
.weekly-header h2{font-size:18px;margin:0 0 12px}
.weekly-header h3{font-size:32px;margin:0 0 12px}
.weekly-header p{line-height:1.65;margin:8px 0}
.weekly-dates,.weekly-chapter-date,.weekly-note,.weekly-task-detail{font-size:13px;color:var(--muted);line-height:1.6}
.weekly-progress{min-width:190px;font-size:14px;font-weight:700}
.weekly-progress progress{width:100%;height:9px;accent-color:var(--ink)}
.weekly-next{margin:10px 0 18px;max-width:100%;white-space:normal;text-align:center}
.weekly-chapters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px;margin-top:20px}
.weekly-chapter{min-width:0}.weekly-chapter h3{font-size:23px;margin:0 0 10px}
.weekly-chapter>p{line-height:1.6}.weekly-chapter ol{padding-left:22px;margin:12px 0}
.weekly-chapter li{padding:8px 0 12px 4px;border-bottom:1px solid var(--control-border)}
.weekly-chapter li>a{font-size:17px;min-height:44px}.weekly-task-detail,.weekly-task-state{display:block}
.weekly-task-state{font-size:12px;font-weight:700;margin-top:4px}.weekly-chapter .is-done .weekly-task-state{color:#315842}
.weekly-note{margin:22px 0 0;max-width:80ch}.weekly-upcoming{margin-top:24px}.weekly-upcoming h3{font-size:18px;margin:0 0 6px}.weekly-upcoming p{font-size:14px;line-height:1.6;margin:0}
.weekly-archive-label{display:flex;gap:12px;flex-wrap:wrap;align-items:center;font-size:14px;margin-top:24px}.weekly-archive-label select{max-width:100%;min-height:44px;padding:10px;background:var(--paper);color:var(--ink);border:1px solid var(--control-border);border-radius:8px;font:inherit}
.weekly-compact{padding:22px 0;border-top:1px solid var(--control-border);min-width:0}.weekly-compact h3{font-size:20px;margin:0 0 12px}.weekly-compact p{font-size:13px;line-height:1.6;margin:8px 0}.weekly-compact .weekly-title{font-weight:700;font-size:16px}.weekly-compact .text-link{display:flex;font-size:14px;min-height:44px}
.discovery-intent{border:0;padding:0;margin:20px 0;min-inline-size:0}.discovery-intent legend{font-size:16px;font-weight:700;padding:0;margin-bottom:10px}.intent-choices{display:flex;flex-wrap:wrap;gap:8px}.intent-choices button{min-height:44px;white-space:normal}.intent-choices [aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:#fffaf5}.intent-description{font-size:13px;line-height:1.6;margin:10px 0;color:var(--muted)}
.result{scroll-margin-top:140px}.result .discovery-intent{max-width:640px;margin:22px auto}.result .intent-choices{justify-content:center}.result .intent-description{font-size:13px}
.after-play{margin:24px auto 12px;padding-top:24px;border-top:1px solid var(--control-border);max-width:640px;text-align:left}.after-play h4{font-size:21px;margin:0 0 12px}.after-play .after-play-count{font-size:14px;margin:10px 0}.after-play>.secondary{margin:6px 0;min-height:44px;white-space:normal}.after-play-list summary,.continue-more summary{cursor:pointer;min-height:44px;padding:14px 0;font-size:14px;font-weight:700}.after-play-list ul{padding-left:20px}.after-play-list li{padding:5px 0}.after-play-list a{min-height:44px;font-size:14px}.after-play-list span{display:block;font-size:12px;color:var(--muted)}.after-play .weekly-compact{margin-top:16px}
.challenge-share{margin:16px 0}.challenge-share>.secondary{min-height:44px;white-space:normal}.share-status:empty,.share-manual:empty{display:none}.share-status{font-size:13px;line-height:1.6}.share-manual textarea{width:100%;max-width:100%;min-height:120px;padding:12px;font:inherit;font-size:13px;line-height:1.6;border:1px solid var(--control-border);border-radius:8px;background:#fffaf5;color:var(--ink)}.share-manual{max-width:640px;margin:12px auto}.share-manual button{min-height:44px}
.continue-more{margin-top:12px}.guide-launch{margin:0 0 16px;min-height:44px;white-space:normal}.guided-play-slot{padding:20px 0;scroll-margin-top:140px}.guided-play-slot[hidden],.game-surface[data-learning="1"]>.scoreboard,.game-surface[data-learning="1"]>.game-mount,.game-surface[data-learning="1"]>.game-message,.game-surface[data-learning="1"]>.result{display:none!important}
.guided-play-slot h3{font-size:25px;line-height:1.25;margin:0 0 14px}.lesson-intro,.lesson-instruction,.lesson-feedback{font-size:14px;line-height:1.65;max-width:65ch}.lesson-step{font-size:13px;font-weight:700;margin:20px 0 10px}.lesson-feedback{min-height:24px}.lesson-actions,.lesson-modes{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.lesson-actions button,.lesson-modes button{min-height:44px;white-space:normal}.lesson-modes [aria-pressed="true"]{background:var(--ink);color:#fffaf5;border-color:var(--ink)}
.lesson-hitori{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;max-width:270px;margin:20px 0;border:2px solid var(--ink);background:var(--ink)}.lesson-cell{position:relative;aspect-ratio:1;min-width:44px;min-height:44px;border:0;border-radius:0;background:#fffaf5;color:var(--ink);font-size:25px;font-weight:700}.lesson-cell.is-black{background:var(--ink);color:#fffaf5;text-decoration:line-through}.lesson-cell.is-white{outline:3px solid #496f55;outline-offset:-8px}
.lesson-kakuro{border-collapse:collapse;max-width:340px;width:100%;margin:20px 0}.lesson-kakuro caption{font-size:13px;line-height:1.6;text-align:left;margin-bottom:12px}.lesson-kakuro th{font-size:13px;padding:8px 5px;line-height:1.4;font-weight:700}.lesson-kakuro td{border:1px solid var(--control-border);text-align:center;width:31%;height:72px;background:#fffaf5}.lesson-kakuro input{width:80%;height:54px;min-width:44px;text-align:center;font:inherit;font-size:24px;border:1px solid var(--control-border);border-radius:4px;background:white;color:var(--ink)}.lesson-kakuro input.is-current{border:2px solid var(--ink)}.lesson-given{font-size:24px;font-weight:700}.card-save-note{font-size:13px;line-height:1.6;margin:18px 0 0}
@media(max-width:900px){.game-weekly{grid-column:1/-1}.weekly-header{flex-direction:column;gap:12px}.weekly-progress{width:min(100%,320px)}}
@media(max-width:640px){.weekly-selection{margin:28px 0 36px;padding:24px 0}.weekly-header h3{font-size:28px}.weekly-chapters{grid-template-columns:1fr;gap:26px}.weekly-chapter h3{font-size:22px}.weekly-next{width:100%}.weekly-archive-label{display:block}.weekly-archive-label select{display:block;width:100%;margin-top:10px}.intent-choices{gap:8px}.intent-choices button{font-size:13px;padding:10px 12px}.after-play>.secondary{width:100%;justify-content:center}.guided-play-slot h3{font-size:23px}}

/* Portada: selección semanal, aventura y recorridos. */
.home-view .weekly-selection {
 margin-block:clamp(52px,7vw,96px) 0;
 padding:0;
 border:0;
 scroll-margin-top:24px;
}
.weekly-heading,.home-view .play-hub>h2 {
 font-size:clamp(28px,3.5vw,48px);
 letter-spacing:-.035em;
 margin:0 0 20px;
 text-wrap:balance;
}
.home-view .weekly-header {
 display:grid;
 grid-template-columns:minmax(0,1fr) minmax(0,.85fr);
 gap:clamp(20px,5vw,72px);
 align-items:center;
 padding:clamp(22px,4.5vw,64px);
 border-radius:var(--radius);
 background:var(--ink);
 color:var(--on-dark);
}
.weekly-cover-copy h3 {
 font-size:clamp(32px,4.6vw,64px);
 line-height:1.02;
 letter-spacing:-.035em;
 text-wrap:balance;
}
.weekly-cover-copy .weekly-dates,.weekly-cover-copy .weekly-description {
 color:var(--on-dark);
}
.weekly-cover-copy .weekly-description {max-width:40ch}
.weekly-cover-copy .weekly-progress {width:min(100%,340px);min-width:0;margin:20px 0 8px}
.weekly-cover-copy progress {display:block;accent-color:var(--accent);color-scheme:dark}
.weekly-cover-copy .weekly-next {margin:16px 0 0;width:fit-content;text-align:left}
.weekly-cover-copy .weekly-next:focus-visible {outline-color:var(--accent)}
.weekly-art {position:relative;width:100%;height:clamp(140px,21vw,280px);isolation:isolate}
.weekly-art-tile {position:absolute;width:48%;transform:rotate(-9deg);top:10%;left:2%}
.weekly-art-tile:nth-child(2) {left:auto;right:0;top:5%;transform:rotate(9deg)}
.weekly-art-tile:nth-child(3) {left:27%;top:auto;bottom:2%;transform:rotate(-2deg)}
.weekly-art-tile .thumb {aspect-ratio:8/5;border:1px solid var(--paper)}
.weekly-art-tile .thumb>svg {padding:12px}
.home-view .weekly-chapters {gap:16px;margin-top:16px}
.home-view .weekly-chapter {padding:clamp(18px,3vw,36px);border-radius:var(--radius);background:var(--soft-surface)}
.home-view .weekly-chapter-pending {align-self:start;background:var(--paper);border:1px dashed var(--control-border)}
.weekly-chapter-pending .weekly-chapter-date {font-weight:700;margin-bottom:12px}
.home-view .weekly-chapter ol {margin:12px 0 0}
.home-view .weekly-chapter li {
 padding:10px 0 10px 8px;
 border-color:var(--warm-line);
}
.home-view .weekly-chapter li::marker {font-weight:700;color:var(--muted)}
.home-view .weekly-chapter li:last-child {border-bottom:0;padding-bottom:0}
.weekly-task-copy a {font-size:17px;min-height:44px;text-decoration:none}
.weekly-task-copy a:hover {text-decoration:underline}
.weekly-task-copy .weekly-task-detail {margin-top:-2px}
.home-view .weekly-task-state {margin-top:6px;color:var(--muted)}
.home-view .weekly-chapter .is-done .weekly-task-state {color:#315842}
.weekly-editions {
 display:flex;
 justify-content:space-between;
 align-items:center;
 flex-wrap:wrap;
 gap:16px 24px;
 border-block:1px solid var(--line);
 margin-top:24px;
 padding-block:16px;
}
.weekly-editions .weekly-upcoming,.weekly-editions .weekly-archive-label {margin:0}
.weekly-editions .weekly-archive-label {font-weight:700}

.home-view .play-hub {margin:clamp(56px,7vw,100px) 0 0;padding:0;border:0}
.home-view .hub-intro {margin-bottom:20px}
.adventure-board {
 background:var(--soft-surface);
 border-radius:var(--radius);
 padding:clamp(18px,3.5vw,46px);
}
.adventure-board .adventure-summary h3 {font-size:clamp(23px,3vw,36px)}
.adventure-board .adventure-summary progress {max-width:420px}
.adventure-track {
 display:grid;
 grid-template-columns:repeat(5,minmax(0,1fr));
 margin:28px 0 0;
 padding:0;
 list-style:none;
}
.adventure-track li {position:relative;display:grid;place-items:center}
.adventure-track li:not(:first-child)::before {
 content:'';
 position:absolute;
 height:2px;
 width:100%;
 right:50%;
 background:var(--control-border);
}
.adventure-track span {
 position:relative;
 z-index:1;
 display:grid;
 place-items:center;
 width:clamp(34px,5vw,54px);
 aspect-ratio:1;
 border-radius:50%;
 border:1px solid var(--control-border);
 background:var(--paper);
 font-family:var(--display);
 font-size:clamp(16px,2vw,24px);
}
.adventure-track .is-open span {background:var(--accent);border-color:var(--ink)}
.adventure-track .is-complete span {background:var(--ink);border-color:var(--ink);color:var(--on-dark)}
.home-view .play-hub>details {margin-top:0;padding:0;border:0;border-bottom:1px solid var(--line)}
.home-view .play-hub>details:first-of-type {margin-top:12px}
.home-view .play-hub>details[open] {padding-bottom:16px}
.home-view .play-hub summary,.home-view .return-options summary {
 position:relative;
 display:block;
 list-style:none;
 padding:16px 32px 16px 0;
 font-family:var(--display);
 font-size:clamp(16px,2vw,21px);
}
.home-view .play-hub summary::-webkit-details-marker,.home-view .return-options summary::-webkit-details-marker {display:none}
.home-view .play-hub summary::after,.home-view .return-options summary::after {
 content:'';
 position:absolute;
 right:8px;
 top:22px;
 width:9px;
 height:9px;
 border-right:2px solid currentColor;
 border-bottom:2px solid currentColor;
 transform:rotate(45deg);
}
.home-view .play-hub details[open]>summary::after,.home-view .return-options details[open]>summary::after {transform:rotate(225deg)}
.home-view .play-hub summary:hover,.home-view .return-options summary:hover {text-decoration:underline;text-underline-offset:4px}
.home-view .adventure-map>li.is-open {border-top-color:var(--ink)}
.home-view .adventure-map>li.is-locked {border-top-style:dashed}
.home-view .local-note {margin-top:16px}

.home-view .mobile-return {
 display:grid;
 grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);
 align-items:start;
 gap:12px clamp(24px,5vw,72px);
 max-width:none;
 margin:clamp(56px,7vw,96px) 0 0;
 padding:clamp(20px,4vw,52px);
 border:0;
 border-radius:var(--radius);
 background:var(--soft-surface);
}
.home-view .mobile-return h2 {font-size:clamp(25px,3.3vw,44px);text-wrap:balance}
.return-copy p {max-width:42ch}
.return-options>details {border-bottom:1px solid var(--control-border)}
.return-options>details[open] {padding-bottom:12px}
.return-options>details:last-child {border-bottom:0}
.return-options :is(button,a) {text-align:left}
.home-view .home-routes {gap:16px;margin-top:24px}
.home-view .journey-route {
 padding:clamp(18px,3vw,36px);
 border:1px solid var(--line);
 border-radius:var(--radius);
}
.home-view .journey-route h2 {font-size:clamp(24px,2.8vw,36px);text-wrap:balance}
.home-view .journey-steps {display:block;margin:18px 0;padding-left:20px}
.home-view .journey-steps li {min-width:0;padding:0 0 0 6px;border-bottom:1px solid var(--line)}
.home-view .journey-steps li:last-child {border-bottom:0}
.home-view .journey-steps .text-link {display:flex;justify-content:space-between;text-decoration:none}
.home-view .journey-steps .text-link:hover {text-decoration:underline}
.home-view + .footer {border-top-color:var(--warm-line);padding-block:28px;background:var(--soft-surface)}
.home-view + .footer .text-button {min-height:44px}

@media(max-width:760px) {
 .home-view .weekly-header,.home-view .mobile-return {grid-template-columns:minmax(0,1fr)}
 .weekly-art {max-width:360px;height:clamp(112px,33vw,180px);justify-self:center}
 .weekly-art-tile {width:44%;top:2%;left:4%}
 .weekly-art-tile:nth-child(2) {right:4%;top:2%}
 .weekly-art-tile:nth-child(3) {width:43%;left:29%;bottom:1%}
 .weekly-art-tile .thumb>svg {padding:6px}
 .home-view .weekly-chapters {grid-template-columns:minmax(0,1fr)}
}

/* Primer lote de mejoras de juego */
.merge-layout { display:grid; width:min(100%, 410px); gap:12px; }
.merge-board { position:relative; }
.merge-milestone { margin:0; color:var(--ink); font-weight:700; }
.merge-board .merge-origin { box-shadow:inset 0 0 0 2px var(--ink); }
.merge-board .merge-joined { outline:3px solid var(--ink); outline-offset:-4px; }
.merge-ghost { position:absolute; display:grid; place-items:center; z-index:2; border:2px solid var(--ink); border-radius:10px; color:var(--ink); background:#ffbc79; font-weight:800; pointer-events:none; }
.memory-tile.matched { border:3px double #1b2940; outline:2px solid #1b2940; outline-offset:-6px; }
.mine-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; }
.mine-mode { width:100%; text-align:center; color:var(--ink); font-weight:700; }
.mine-tools [aria-pressed="true"] { background:#ffbc79; color:#1b2940; border-color:#1b2940; }
.mines-board .mine-flag { border:2px dashed #573013; background:#ffe2c4; color:#573013; }
.mines-board .mine-hit { border-radius:50%; color:#952a32; }
.mine-example,.classic-review,.tic-modes-menu,.fifteen-row-example { width:min(100%, 440px); }
.mine-example summary,.classic-review summary,.tic-modes-menu summary,.fifteen-row-example summary { cursor:pointer; padding:10px 4px; font-weight:700; }
.mine-demo,.fifteen-row-demo,.tic-review-board { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); width:min(100%, 170px); gap:3px; margin-block:8px; }
.fifteen-row-demo { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.mine-demo span,.fifteen-row-demo span,.tic-review-board span { display:grid; place-items:center; aspect-ratio:1; border:1px solid #78829a; border-radius:5px; background:#fffaf4; color:#1b2940; }
.mine-demo span:nth-child(5),.tic-review-board .tic-block-spot { background:#ffbc79; border:2px solid #1b2940; }
.lights-board .lights-changed { outline:2px dashed #1b2940; outline-offset:-6px; }
.tt-stage { width:min(100%, 440px); margin-inline:auto; }
.classic-turn { width:100%; color:#1b2940; font-weight:800; text-align:center; margin:4px 0 8px; }
.tic-board { margin-inline:auto; }
.connect-board .tile.connect-win { outline:3px solid #1b2940; outline-offset:-5px; }
.connect-board .tile.connect-last { border:2px solid #1b2940; }
.connect-board .tile.connect-column-focus { outline:2px solid #ffbc79; outline-offset:1px; }
.connect-board .tile.connect-last:not(:disabled), .connect-board .tile.connect-dropping { animation:connect-drop 230ms ease-out; }
@keyframes connect-drop { from { transform:translateY(var(--connect-drop, -40px)); opacity:.55; } to { transform:translateY(0); opacity:1; } }
.sl-cell[data-sl-piece="1"] .sl-value,.sl-cell[data-sl-goal="1"] .sl-target-tag { border:2px solid currentColor; border-radius:6px; padding-inline:3px; }
.sl-cell[data-sl-piece="2"] .sl-value,.sl-cell[data-sl-goal="2"] .sl-target-tag { border:2px dashed currentColor; border-radius:6px; padding-inline:3px; }
.sl-cell[data-sl-piece="3"] .sl-value,.sl-cell[data-sl-goal="3"] .sl-target-tag { border:3px double currentColor; border-radius:6px; padding-inline:3px; }
.intruder-demo,.intruder-demo-pair { display:flex; justify-content:center; align-items:center; gap:8px; }
.intruder-demo[hidden] { display:none; }
.intruder-demo-pair > span { display:grid; place-items:center; width:32px; height:32px; background:#fffaf4; border:1px solid #1b2940; border-radius:6px; color:#1b2940; font-weight:750; }
.reaction-game .reaction-target { block-size:clamp(210px, 32vh, 275px); }
.rl-lab .rl-cue { block-size:clamp(185px, 28vh, 238px); }
.rl-lab .rl-responses { min-block-size:48px; align-items:stretch; }
.rl-lab .rl-status { min-block-size:4.5em; }
@media (prefers-reduced-motion:reduce) {
 .connect-board .tile.connect-last,.connect-board .tile.connect-dropping { animation:none; }
}

.mines-board .mine-doubt { border:2px dotted #573013; color:#573013; font-weight:800; }
.adventure-context{display:flex;align-items:center;flex-wrap:wrap;gap:6px 20px;padding:12px 0;margin-bottom:16px;border-top:1px solid var(--line)}.adventure-context h2{font-size:18px}.adventure-context p{font-size:13px}.adventure-context a{margin-left:auto;min-height:44px;display:inline-flex;align-items:center;font-size:14px}
.game-surface>.guide-launch{margin:0 0 14px}@media(max-width:640px){.hitori-layout .scoreboard,.game-surface:has([data-logic-game="kakuro-pequeno"]) .scoreboard{margin-bottom:12px;padding-bottom:10px}.adventure-context{gap:3px 12px;margin-bottom:10px;padding:8px 0}.adventure-context h2{font-size:16px}.adventure-context a{margin-left:0}}
.first-steps{padding-left:22px;margin:12px 0;line-height:1.55}.first-steps li+li{margin-top:8px}.first-controls{margin-block:12px;font-size:14px;line-height:1.5}.advanced-help>summary{cursor:pointer;min-height:44px;padding-block:12px;font-weight:700}.advanced-help p{margin:12px 0;line-height:1.6}
.game-check-message{min-height:0;margin:4px 0 0;padding:8px 10px;border:1px solid var(--control-border);border-radius:8px;background:#fffaf5;color:var(--ink);text-align:left;font-size:14px;font-weight:700;line-height:1.4}
.game-check-message:empty{padding:0;margin:0;border:0}
.game-check-message+.lb-tools>button:first-child{scroll-margin-block:8px}
.game-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0 10px}
.game-top .back-link{margin:0;min-width:0}
.game-top .favorite-game{width:auto;margin:0;min-height:44px;flex-shrink:0}
.empty-actions{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px}
.missing-header{padding-block:22px;border-bottom:1px solid var(--line)}
.missing-header .brand{display:inline-flex}
.missing-header img{width:min(180px,100%);height:auto}
.missing-page{max-width:690px;margin:clamp(28px,7vw,90px) 0;padding:clamp(20px,5vw,48px);border-radius:var(--radius);background:var(--soft-surface)}
.missing-page h1{font-size:clamp(2rem,5vw,3.25rem);line-height:1.1}
.missing-page p{margin:14px 0 20px;max-width:52ch;color:var(--muted)}
.missing-actions{display:flex;flex-wrap:wrap;gap:10px}
@media(max-width:900px){.game-aside .instructions{display:none}}
@media(max-width:640px){
 .game-top .favorite-game{padding:8px 10px;font-size:12px;white-space:normal;max-width:48%;flex-shrink:0}
 .game-surface[data-game="carrera-de-peones"] .scoreboard{flex-wrap:nowrap;gap:8px;margin-bottom:6px;padding-bottom:8px;min-height:0}
 .game-surface[data-game="carrera-de-peones"] .stats{gap:7px}
 .game-surface[data-game="carrera-de-peones"] .stat{min-width:0}
 .game-surface[data-game="carrera-de-peones"] .stat+.stat{padding-left:7px}
 .game-surface[data-game="carrera-de-peones"] .stat-label{font-size:10px}
}
@media(max-width:360px){
 .game-view:has([data-game="carrera-de-peones"]) .game-heading h1{font-size:30px}
 .game-view:has([data-game="carrera-de-peones"],[data-game="brisca"],[data-game="cuatro-rasgos"],[data-game="domino"],[data-game="retrato-robot"]) .game-heading{margin-bottom:12px}
 .game-surface:is([data-game="brisca"],[data-game="cuatro-rasgos"],[data-game="domino"],[data-game="retrato-robot"]) .scoreboard{margin-bottom:8px;padding-bottom:8px}
}
.result-more{margin-top:16px;text-align:left}.result-more>summary{min-height:44px;padding:12px 8px;cursor:pointer;text-align:center;font-weight:700}.result-more[open]{border-top:1px solid var(--line)}.result-more .collection-entry{display:inline-flex;margin-block:12px}
.search-suggestions{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin:16px 0}.search-suggestions a{max-width:100%;white-space:normal}
@media(max-width:640px){.catalog[data-favorites="true"] .catalog-grid>.game-item:only-child{grid-column:1/-1}}

.game-heading-actions {
 display:flex;
 flex:0 1 auto;
 align-items:center;
 justify-content:flex-end;
 flex-wrap:wrap;
 gap:6px 12px;
}
.game-heading .game-heading-actions .game-category {
 flex:1 1 11rem;
 margin:0;
}
.game-fullscreen-button {
 gap:6px;
 min-height:44px;
 min-width:44px;
 padding:7px 11px;
 font-size:.875rem;
 line-height:1.3;
 white-space:normal;
}
.game-fullscreen-button svg {
 flex:none;
 width:18px;
 height:18px;
}
.game-fullscreen-bar[hidden] { display: none; }

.game-surface[data-fullscreen] {
 --fullscreen-gutter: clamp(12px, 2.5vw, 40px);
 --fullscreen-width: 1580px;
 --fullscreen-board: clamp(190px, calc(100dvh - 216px), 880px);
 --fullscreen-field: min(1240px, calc(var(--fullscreen-board) * 10 / 7));
 width: 100%;
 height: 100dvh;
 max-width: none;
 max-height: none;
 border: 0;
 border-radius: 0;
 padding: 0 max(var(--fullscreen-gutter), env(safe-area-inset-right))
  max(12px, env(safe-area-inset-bottom)) max(var(--fullscreen-gutter), env(safe-area-inset-left));
 overflow: auto;
 overscroll-behavior: contain;
 scroll-padding-block-start: calc(64px + env(safe-area-inset-top));
}
html:has(.game-surface[data-fullscreen="expanded"]) { overflow: hidden; }
.game-surface[data-fullscreen="expanded"] {
 position: fixed;
 inset: 0;
 z-index: 110;
}
.game-surface[data-fullscreen] > * {
 max-width: var(--fullscreen-width);
 margin-inline: auto;
}
.game-fullscreen-bar {
 display: flex;
 position: sticky;
 z-index: 10;
 top: 0;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 padding-block: max(6px, env(safe-area-inset-top)) 6px;
 border-bottom: 1px solid var(--warm-line);
 background: var(--soft-surface);
}
.game-fullscreen-title {
 min-width: 0;
 font: 700 clamp(1rem, 2vw, 1.35rem)/1.2 var(--display);
 overflow-wrap: anywhere;
}
.game-fullscreen-actions {
 display: flex;
 flex: none;
 gap: 6px;
}
.game-fullscreen-actions button[aria-expanded="true"] { background: var(--accent); }
.game-surface[data-fullscreen]:not([data-fullscreen-options]) > .game-support { display: none; }
.game-surface[data-fullscreen] > .game-level-objective {
 margin-block: 8px 0;
 font-size: .875rem;
 line-height: 1.4;
}
.game-surface[data-fullscreen] > .scoreboard {
 min-height: 0;
 align-items: center;
 gap: 8px 16px;
 margin-block: 8px 12px;
 padding-bottom: 7px;
}
.game-surface[data-fullscreen] > .game-mount {
 width: 100%;
 min-height: 0;
 gap: clamp(8px, 1.5dvh, 16px);
}
.game-surface[data-fullscreen] > .game-message { min-height: 0; margin-top: 8px; }
.game-surface[data-fullscreen] > .game-message:empty { margin-top: 0; }
.game-surface[data-fullscreen] > .result { scroll-margin-top: 68px; }
.game-surface[data-fullscreen] :is(.merge-layout, .snake-area) { width: min(100%, var(--fullscreen-board)); max-width: none; }
.game-surface[data-fullscreen] .game-mount > .board,
.game-surface[data-fullscreen] .game-mount :is(.merge-board, .xp-grid) { max-width: var(--fullscreen-board); }
.game-surface[data-fullscreen] .merge-board:not([data-level-size="5"]) .merge-tile { font-size: clamp(1.125rem, 4.6vmin, 3rem); }
.game-surface[data-fullscreen] .memory-board .memory-mark { width: min(48%, 58px); height: auto; }
.game-surface[data-fullscreen] .xp.ac .ac-canvas:not(.ac-drawing-zoom) {
 max-width: min(100%, var(--fullscreen-field));
 margin-block: 0;
}
.game-surface[data-fullscreen] .xp.ac > :is(.ac-tools,.ac-controls,.ac-note) { margin-block: 0; }
.game-surface[data-fullscreen] .xp .ca-shell { max-width: 1120px; margin-inline: auto; }
.game-surface[data-fullscreen] .xp .ca-golf-table { max-width: 1080px; }
.game-surface[data-fullscreen] .xp.pp .pp-scene {
 max-width: min(100%, 980px);
 margin-inline: auto;
}
.game-surface[data-fullscreen] .xp .wd-wordle-game .wd-form { margin-block: 0 8px; }
.game-surface[data-fullscreen] .xp .wd-wordle-game .wd-keyboard { margin-block: 8px; }
.game-surface[data-fullscreen] .xp .wd-wordle-game .xp-tools { margin-block: 0; }

@media (min-width: 720px) and (orientation: landscape) {
 .game-surface[data-fullscreen] {
  --fullscreen-board: clamp(180px, calc(100dvh - 174px), 880px);
  --fullscreen-dock: clamp(212px, 20vw, 320px);
  --fullscreen-group-gap: clamp(14px, 2vw, 32px);
 }
 .game-surface[data-fullscreen] .game-mount .memory-board {
  --memory-ratio: 1;
  max-width: min(100%, 1260px, calc(var(--fullscreen-board) * var(--memory-ratio)));
 }
 .game-surface[data-fullscreen] .memory-board[data-level-pairs="6"] { --memory-ratio: 1.333; }
 .game-surface[data-fullscreen] .memory-board[data-level-pairs="10"] { --memory-ratio: 1.25; }
 .game-surface[data-fullscreen] .memory-board[data-level-pairs="12"] { --memory-ratio: 1.5; }
 .game-surface[data-fullscreen] .memory-board[data-level-pairs="14"] { --memory-ratio: 1.75; }
 .game-surface[data-fullscreen] .memory-board[data-level-pairs="16"] { --memory-ratio: 2; }
 .game-surface[data-fullscreen] .xp.ac:has(> .ac-canvas):not(:has(> .ac-drawing-zoom)),
 .game-surface[data-fullscreen] .game-mount:has(> .snake-area) {
  display: grid;
  grid-template-columns: minmax(0,var(--fullscreen-field)) minmax(0,var(--fullscreen-dock));
  grid-template-rows: min-content min-content minmax(min-content, 1fr);
  justify-content: center;
  align-items: start;
  gap: 10px var(--fullscreen-group-gap);
  width: 100%;
 }
 .game-surface[data-fullscreen] .game-mount:has(> .snake-area) {
  grid-template-columns: minmax(0,var(--fullscreen-board)) minmax(0,var(--fullscreen-dock));
 }
 .game-surface[data-fullscreen] .xp.ac:has(> .ac-canvas):not(:has(> .ac-drawing-zoom)) > :not(.ac-canvas,.ac-tools,.ac-controls,.ac-note) {
  grid-column: 1 / -1;
 }
 .game-surface[data-fullscreen] .xp.ac:has(> .ac-canvas):not(:has(> .ac-drawing-zoom)) > .ac-canvas,
 .game-surface[data-fullscreen] .game-mount > .snake-area { grid-column: 1; grid-row: 1 / 4; }
 .game-surface[data-fullscreen] .xp.ac:has(> .ac-canvas):not(:has(> .ac-drawing-zoom)) > .ac-tools,
 .game-surface[data-fullscreen] .game-mount:has(> .snake-area) > .primary { grid-column: 2; grid-row: 1; }
 .game-surface[data-fullscreen] .xp.ac:has(> .ac-canvas):not(:has(> .ac-drawing-zoom)) > .ac-controls,
 .game-surface[data-fullscreen] .game-mount:has(> .snake-area) > .direction-pad { grid-column: 2; grid-row: 2; }
 .game-surface[data-fullscreen] .xp.ac:has(> .ac-canvas):not(:has(> .ac-drawing-zoom)) > .ac-note,
 .game-surface[data-fullscreen] .game-mount:has(> .snake-area) > .secondary { grid-column: 2; grid-row: 3; }
 .game-surface[data-fullscreen] .game-mount:has(> .snake-area) > :is(.primary,.secondary) { justify-self: center; }
 .game-surface[data-fullscreen] .game-mount:has(> .merge-layout) {
  display: grid;
  grid-template-columns: minmax(0,var(--fullscreen-board)) minmax(0,var(--fullscreen-dock));
  grid-template-rows: repeat(2, minmax(min-content,1fr));
  justify-content: center;
  justify-items: center;
  gap: var(--fullscreen-group-gap);
 }
 .game-surface[data-fullscreen] .merge-layout { display: contents; }
 .game-surface[data-fullscreen] .merge-layout > .merge-board { grid-column: 1; grid-row: 1 / 3; }
 .game-surface[data-fullscreen] .merge-layout > .direction-pad { grid-column: 2; grid-row: 1; align-self: end; }
 .game-surface[data-fullscreen] .game-mount > .merge-feedback { grid-column: 2; grid-row: 2; align-self: start; }
 .game-surface[data-fullscreen] .merge-layout .direction-pad,
 .game-surface[data-fullscreen] .game-mount:has(> .snake-area) > .direction-pad {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  gap: 6px;
 }
 .game-surface[data-fullscreen] :is(.merge-layout,.game-mount:has(> .snake-area)) > .direction-pad > :first-child { grid-column: 2; }
 .game-surface[data-fullscreen] :is(.merge-layout,.game-mount:has(> .snake-area)) > .direction-pad > :nth-child(n+2) { grid-row: 2; }
 .game-surface[data-fullscreen] .xp .wd-wordle-game {
  display: grid;
  grid-template-columns: minmax(0, clamp(150px, calc((100dvh - 160px) * 5 / 7), 480px)) minmax(0, 520px);
  grid-template-rows: repeat(4, min-content) minmax(min-content,1fr);
  max-width: 1050px;
  align-items: start;
  justify-content: center;
  gap: 8px var(--fullscreen-group-gap);
 }
 .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-wordle {
  grid-column: 1;
  grid-row: 1 / 6;
  width: 100%;
  max-width: 100%;
  margin: 0;
 }
 .game-surface[data-fullscreen] .xp .wd-wordle-game > :not(.wd-wordle) { grid-column: 2; }
 .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-form { grid-row: 1; }
 .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-message { grid-row: 2; }
 .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-keyboard { grid-row: 3; }
 .game-surface[data-fullscreen] .xp .wd-wordle-game .xp-tools { grid-row: 4; }
 .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-help { grid-row: 5; margin-block: 4px; }
 .game-surface[data-fullscreen] .pp-search:has(.pp-body > .pp-scene) {
  display: grid;
  grid-template-columns: minmax(0,var(--fullscreen-field)) minmax(0,var(--fullscreen-dock));
  grid-template-rows: repeat(7, min-content) minmax(0,1fr);
  justify-content: center;
  align-items: start;
  gap: 8px var(--fullscreen-group-gap);
 }
 .game-surface[data-fullscreen] .pp-search:has(.pp-body > .pp-scene) > .pp-body { display: contents; }
 .game-surface[data-fullscreen] .pp-search:has(.pp-body > .pp-scene) > :not(.pp-body),
 .game-surface[data-fullscreen] .pp-search .pp-body:has(> .pp-scene) > :not(.pp-scene) { grid-column: 2; }
 .game-surface[data-fullscreen] .pp-search .pp-body > .pp-scene {
  grid-column: 1;
  grid-row: 1 / 9;
  min-height: 0;
  max-width: none;
 }
 .game-surface[data-fullscreen] .pp-search:has(.pp-body > .pp-scene) > :is(.pp-hint,.pp-tools),
 .game-surface[data-fullscreen] .pp-search .pp-body:has(> .pp-scene) > :not(.pp-scene) { margin-block: 0; }
 .game-surface[data-fullscreen] .pp-search .pp-body:has(> .pp-scene) > .pp-search-targets { position: static; }
}
@media (min-width: 720px) and (max-height: 520px) and (orientation: landscape) {
 .game-surface[data-fullscreen] { --fullscreen-dock: clamp(260px, 34vw, 330px); }
 .game-surface[data-fullscreen] > .scoreboard { margin-block: 4px 8px; }
 .game-surface[data-fullscreen] .stat strong { font-size: 1.2rem; }
 .game-surface[data-fullscreen] .xp.ac .ac-tools { gap: 6px; }
 .game-surface[data-fullscreen] .xp.ac .ac-controls { gap: 6px; }
 .game-surface[data-fullscreen] .xp.ac .ac-note { font-size: .8rem; }
 .game-surface[data-fullscreen][data-game="minigolf-de-bolsillo"] .xp.ac .ac-btn { padding-inline: 10px; }
 .game-surface[data-fullscreen] .pp-search:has(.pp-body > .pp-scene) { gap: 6px var(--fullscreen-group-gap); }
 .game-surface[data-fullscreen] .pp-search:has(.pp-body > .pp-scene) > .pp-hint { grid-row: 7; text-align: left; }
 .game-surface[data-fullscreen] .pp-search .pp-body:has(> .pp-scene) > .pp-title { font-size: 1.125rem; }
 .game-surface[data-fullscreen] .pp-search .pp-body:has(> .pp-scene) > .pp-search-targets { gap: 4px; padding: 0; }
 .game-surface[data-fullscreen] .pp-search-targets .pp-chip { min-height: 36px; padding: 4px 6px; }
 .game-surface[data-fullscreen] .pp-search-targets .pp-chip svg { width: 24px; height: 24px; }
 .game-surface[data-fullscreen] .xp .wd-wordle { gap: 4px; }
 .game-surface[data-fullscreen] .xp .wd-wordle-row { gap: 4px; }
 .game-surface[data-fullscreen] .xp .wd-letter { font-size: 1.1rem; }
}

@media(max-width:640px) {
 .game-heading-actions {
  justify-content:space-between;
  flex-wrap:nowrap;
  margin-top:8px;
 }
 .game-heading .game-heading-actions .game-category {
  flex-basis:auto;
  min-width:0;
 }
 .game-heading-actions .game-fullscreen-button {flex:none}
}
@media(max-width:360px) {
 .game-heading-actions .game-fullscreen-button {max-width:48%}
}
.game-levels {
 margin-block: 0 12px;
 background: #fffaf3;
 border: 1px solid #d8cbbb;
 border-radius: 16px;
}
.level-menu-trigger {
 display: grid;
 grid-template-columns: minmax(0,1fr) auto 14px;
 align-items: center;
 gap: 14px;
 padding: 12px 16px;
 cursor: pointer;
 list-style: none;
 border-radius: 15px;
 color: #fff8ee;
 background: var(--ink);
}
.game-levels[open] .level-menu-trigger { border-end-start-radius: 0; border-end-end-radius: 0; }
.level-menu-trigger::-webkit-details-marker { display: none; }
.level-menu-trigger:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: inherit; }
.level-menu-heading, .level-menu-total { display: grid; align-content: center; }
.level-menu-heading strong { font-family: var(--display); font-size: 1.125rem; line-height: 1.2; }
.level-menu-current, .level-menu-count-label { color: #d7dfec; font-size: .8125rem; line-height: 1.35; }
.level-menu-current { margin-top: 4px; }
.level-menu-total { padding-inline-start: 14px; border-inline-start: 1px solid #68758a; text-align: center; }
.level-menu-total strong { color: #ffd29f; font-variant-numeric: tabular-nums; line-height: 1.2; }
.level-menu-marks { display: flex; justify-content: center; gap: 3px; margin-top: 6px; }
.level-menu-marks span { width: 8px; height: 3px; border-radius: 2px; background: #647289; }
.level-menu-marks .complete { background: var(--accent); }
.level-menu-chevron {
 width: 9px; height: 9px;
 border-block-end: 2px solid currentColor;
 border-inline-end: 2px solid currentColor;
 transform: translateY(-2px) rotate(45deg);
}
.game-levels[open] .level-menu-chevron { transform: translateY(2px) rotate(225deg); }
.level-menu-panel { padding: 12px 14px 14px; }
.level-menu-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.level-menu-option {
 display: grid;
 grid-template-columns: 36px minmax(0,1fr) auto 8px;
 align-items: center;
 gap: 12px;
 width: 100%;
 min-height: 62px;
 padding: 9px 12px;
 text-align: start;
 color: var(--ink);
 border: 1px solid #e2d9cf;
 border-radius: 11px;
 background: #fff;
}
.level-menu-option:hover { border-color: var(--control-border); background: #f8f6f1; }
.level-menu-option[aria-current="true"] { border-color: #986237; background: #ffedda; }
.level-menu-number {
 display: grid;
 place-items: center;
 width: 34px;
 height: 34px;
 border-radius: 7px;
 background: #eeeef0;
 font-family: var(--display);
 font-size: .875rem;
 font-variant-numeric: tabular-nums;
}
.level-menu-option[aria-current="true"] .level-menu-number { background: var(--ink); color: #fff; }
.level-menu-copy { display: grid; gap: 2px; min-width: 0; }
.level-menu-copy strong { font-size: .9375rem; line-height: 1.25; }
.level-menu-copy > span { color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.level-menu-status { color: #63411e; font-size: .75rem; font-weight: 700; }
.level-menu-option[data-completed="true"]:not([aria-current="true"]) .level-menu-status { color: #1f6549; }
.level-menu-play {
 grid-column: 4;
 width: 7px;
 height: 7px;
 border-block-end: 2px solid currentColor;
 border-inline-end: 2px solid currentColor;
 transform: rotate(-45deg);
}
.level-menu-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 2px 0; }
.level-menu-footer p { flex: 1 1 290px; color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.level-menu-footer button { min-height: 44px; font-size: .875rem; }
.level-menu-footer [hidden], .level-menu-status[hidden] { display: none; }
.game-level-objective { margin: 0 0 12px; font-size: .875rem; line-height: 1.5; }
.game-levels[open] + .game-level-objective { display: none; }
.merge-board[data-level-size="5"] .merge-tile { font-size: clamp(16px, 4.8vw, 27px); }
.merge-tile[data-value="stone"] { background: #29384d; color: #fff2e1; box-shadow: inset 0 0 0 3px #536276; }
.merge-tile[data-value="stone"]::after { content: '×'; font-size: 1.6rem; line-height: 1; }
@media(max-width: 600px) {
 .memory-board:is([data-level-pairs="14"],[data-level-pairs="16"]) { grid-template-columns: repeat(6, minmax(0,1fr)); }
 .level-menu-trigger { gap: 10px; }
 .level-menu-heading strong { font-size: 1rem; }
 .level-menu-option { grid-template-columns: 34px minmax(0,1fr) 8px; gap: 3px 9px; }
 .level-menu-status { grid-row: 2; grid-column: 2; }
 .level-menu-play { grid-row: 1; grid-column: 3; }
}
@media(min-width: 361px) and (max-width: 600px) {
 .memory-board[data-level-pairs="14"] .memory-tile:nth-child(25) { grid-column-start: 2; }
 .memory-board[data-level-pairs="16"] .memory-tile:nth-child(31) { grid-column-start: 3; }
}
@media(max-width: 360px) {
 .memory-board[data-level-pairs] { grid-template-columns: repeat(4, minmax(0,1fr)); }
 .level-menu-trigger { gap: 9px; padding-inline: 12px; }
 .level-menu-total { padding-inline-start: 8px; }
 .level-menu-panel { padding-inline: 9px; }
}

/* Gameplay and supporting information for the ten level series. */
.level-games-view {
 --play-gap: clamp(10px, 1.3vw, 16px);
 --play-padding: clamp(12px, 2vw, 24px);
 max-width: 1240px;
}
.level-games-view .game-layout { gap: clamp(14px, 2vw, 24px); }
.level-games-view .game-surface:not([data-fullscreen]) { padding: var(--play-padding); }
.level-games-view .game-surface:not([data-fullscreen]) > .scoreboard {
 align-items: center;
 margin-bottom: var(--play-gap);
 padding-bottom: 12px;
}
.level-games-view .game-surface:not([data-fullscreen]) > .quick-help { margin-bottom: 8px; padding-bottom: 2px; }
.level-games-view .game-surface:not([data-fullscreen]) > .game-mount { min-height: 0; gap: var(--play-gap); }
.level-games-view .game-surface[aria-busy="true"] > .game-mount { min-height: 160px; }
.level-games-view .game-message { min-height: 0; margin-top: 10px; }
.level-games-view .game-message:empty { margin-top: 0; }
.level-games-view .game-surface:has(:is(.wd-wordle-game,.wd-hang-level) > .wd-message) > .game-message { display: none; }
.level-games-view .game-aside { min-width: 0; gap: 14px; }
.level-games-view .game-play-progress:has(> [hidden]),
.level-games-view .game-weekly:has(> :empty) { display: none; }
.level-games-view .game-aside h2 { margin: 0; font-size: 1.25rem; line-height: 1.2; }
.level-games-view .game-aside p { font-size: .875rem; line-height: 1.55; }
.level-games-view .full-help > h2 { margin-bottom: 10px; }
.level-games-view .full-help > h3 { margin: 12px 0 4px; font-size: .9375rem; }
.level-games-view .personal-record {
 display: grid;
 grid-template-columns: minmax(0,1fr) auto;
 align-items: baseline;
 gap: 6px 12px;
 padding: 16px;
}
.level-games-view .personal-record.record-long { grid-template-columns: minmax(0,1fr); }
.level-games-view .personal-record .record-value { margin: 0; font-size: 1.25rem; line-height: 1.2; text-align: end; }
.level-games-view .personal-record.record-long .record-value { text-align: start; overflow-wrap: anywhere; }
.level-games-view .personal-record .record-description { grid-column: 1 / -1; margin: 0; }
.level-games-view .weekly-compact { padding-block: 12px 0; }
.level-games-view .weekly-compact h3 { margin-bottom: 6px; }
.level-games-view .weekly-compact p { margin-block: 4px; }
.level-games-view .weekly-compact a { margin-block: 0; }

.level-games-view .game-surface:not([data-fullscreen]) .snake-area { max-width: 384px; }
.level-games-view .game-surface:not([data-fullscreen]) .xp.ac > .ac-canvas { margin-bottom: 0; }
.level-games-view .game-surface:not([data-fullscreen]) .xp.ac > :is(.ac-tools,.ac-controls,.ac-note) { margin-block: 0; }
.level-games-view .game-surface:not([data-fullscreen]) .xp.ac > .ac-tools { row-gap: 6px; }
.level-games-view .game-surface:not([data-fullscreen]) .xp .ca-shell { max-width: 700px; margin-inline: auto; }
.level-games-view .game-surface:not([data-fullscreen]) .xp :is(.ca-shell,.ca-body) { gap: var(--play-gap); }
.level-games-view .game-surface:not([data-fullscreen]) .ca-shell > .xp-tools:empty { display: none; }
.level-games-view .game-surface:not([data-fullscreen]) .ca-golf-table[data-columns="5"]::after { content: none; }
.level-games-view .game-surface:not([data-fullscreen]) .wd-wordle-game { max-width: 520px; }
.level-games-view .game-surface:not([data-fullscreen]) .wd-wordle-game .wd-form { margin-block: 0 10px; }
.level-games-view .game-surface:not([data-fullscreen]) .wd-wordle-game .wd-wordle { max-width: 300px; margin-block: 10px 0; }
.level-games-view .game-surface:not([data-fullscreen]) .wd-wordle-game .wd-keyboard { margin-block: 12px 0; }
.level-games-view .game-surface:not([data-fullscreen]) .wd-wordle-game .xp-tools { margin-block: 10px 0; }
.level-games-view .game-surface:not([data-fullscreen]) .wd-wordle-game .wd-help { margin-block: 8px 0; }
.level-games-view .game-surface:not([data-fullscreen]) .pp-search > :is(.pp-hint,.pp-tools) { margin-block: 0; }
.level-games-view .game-surface:not([data-fullscreen]) .pp-search .pp-body { width: min(100%, 620px); }
.level-games-view .game-surface:not([data-fullscreen]) .pp-search .pp-title { margin-bottom: 8px; }

@media(min-width: 901px) {
 .level-games-view .game-layout { grid-template-columns: minmax(0,1fr) minmax(250px, 28%); }
 .level-games-view .game-aside .instructions { padding: 16px; }
 .level-games-view .game-surface:not([data-fullscreen]) .memory-board {
  --card-size: 78px;
  max-width: min(100%, calc(var(--cols) * (var(--card-size) + 10px) - 10px));
 }
 .level-games-view .game-surface:not([data-fullscreen]) .memory-board:is([data-level-pairs="14"],[data-level-pairs="16"]) { --card-size: 68px; }
}
@media(min-width: 1000px) {
 .level-games-view .game-surface:not([data-fullscreen]) .merge-layout {
  width: min(100%, 544px);
  grid-template-columns: minmax(0, 396px) auto;
  align-items: center;
  gap: 18px;
 }
 .level-games-view .game-surface:not([data-fullscreen]) .merge-layout .direction-pad {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 6px;
 }
 .level-games-view .game-surface:not([data-fullscreen]) .merge-layout .direction-pad > :first-child { grid-column: 2; }
 .level-games-view .game-surface:not([data-fullscreen]) .merge-layout .direction-pad > :nth-child(n+2) { grid-row: 2; }
 .level-games-view .game-surface:not([data-fullscreen]) .merge-layout .control-button { min-width: 44px; }
}
@media(min-width: 641px) and (max-width: 900px) {
 .level-games-view .game-aside:has(> .personal-goal[hidden]) > .game-weekly { grid-column: auto; }
}
@media(min-width: 390px) {
 .level-games-view .game-surface:not([data-fullscreen]) .ca-golf-table::after { content: none; }
}
@media(max-width: 640px) {
 .level-games-view .game-surface:not([data-fullscreen]) > .scoreboard { padding-bottom: 10px; }
 .level-games-view .game-surface:not([data-fullscreen]) .ca-golf-table { column-gap: 2px; padding-inline: 2px; }
}

.level-games-view .game-mount > .mines-board { max-width: 480px; }
.level-games-view .game-mount .mines-board .tile {
 padding: 0;
 min-height: 0;
 border-radius: 4px;
 line-height: 1;
}
.level-games-view .game-mount > .connect-board { max-width: 520px; }
.level-games-view .game-mount > :is(.sudoku-board,.fifteen-board,.simon-board) { max-width: 410px; }
.level-games-view .game-mount > .game-options:empty,
.level-games-view .lights-game > :is(.game-options,.lights-outcome):empty,
.level-games-view .wd-hang-level > .wd-hang-hint:empty,
.level-games-view .intruder-level > .intruder-summary:empty,
.level-games-view .la-arithmetic-level > .xp-tools:empty { display: none; }
.level-games-view .game-mount .lights-game { max-width: 480px; }
.level-games-view .lights-game .lights-board { margin-inline: auto; }
.level-games-view .lights-game > :is(.game-options,.lights-title,.lights-preview-note,.lights-outcome) { margin-block: 8px; }
.level-games-view .lights-preview-note { min-height: 0; }
.level-games-view .game-mount .intruder-level > :is(.game-options,.intruder-notice) { margin-block: 6px; }
.level-games-view .intruder-level .intruder-notice { min-height: 0; }
.level-games-view .xp .wd-hang-level { max-width: 600px; }
.level-games-view .wd-hang-level .wd-puzzle-name { margin-block: 8px 0; font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
.level-games-view .wd-hang-level .wd-hang { height: auto; max-width: 172px; margin-block: 6px; }
.level-games-view .wd-hang-level :is(.wd-slots,.wd-keyboard,.wd-hang-tools,.wd-message) { margin-block: 8px; }
.level-games-view .wd-hang-level .wd-slot { min-width: 22px; }
.level-games-view .wd-hang-level .wd-hang-tools:not(:has(> button:not([hidden]))) { display: none; }
.level-games-view .la-arithmetic-level > .xp-note { display: none; }
.level-games-view .la-arithmetic-level .la-cards { margin-block: 12px; }
.level-games-view .la-arithmetic-level .la-body .xp-tools { margin-block: 8px; }

.level-games-view .game-surface[data-fullscreen] .game-mount > :is(.mines-board,.sudoku-board,.fifteen-board,.simon-board),
.game-surface[data-fullscreen] .game-mount .lights-board,
.game-surface[data-fullscreen] .intruder-level .color-board { max-width: var(--fullscreen-board); }
.level-games-view .game-surface[data-fullscreen] .game-mount > .connect-board { max-width: min(920px, calc(var(--fullscreen-board) * var(--connect-ratio, 1.17))); }
.game-surface[data-fullscreen] .game-mount > .fifteen-board .tile { font-size: clamp(1.25rem, 5vmin, 3rem); }

@media (min-width: 720px) and (orientation: landscape) {
 .game-surface[data-fullscreen] .game-mount:has(> :is(.mines-board,.sudoku-board,.simon-board)),
 .level-games-view .game-surface[data-fullscreen] .game-mount :is(.lights-game,.intruder-level) {
  display: grid;
  grid-template-columns: minmax(0, var(--fullscreen-board)) minmax(0, var(--fullscreen-dock));
  gap: 8px var(--fullscreen-group-gap);
  align-content: start;
  align-items: start;
  justify-content: center;
  max-width: none;
 }
 .game-surface[data-fullscreen] .game-mount:has(> :is(.mines-board,.sudoku-board,.simon-board)) > .board,
 .game-surface[data-fullscreen] .lights-game > .lights-stage,
 .game-surface[data-fullscreen] .intruder-level > .color-board { grid-column: 1; grid-row: 1 / 6; }
 .game-surface[data-fullscreen] .game-mount:has(> :is(.mines-board,.sudoku-board,.simon-board)) > :not(.board),
 .level-games-view .game-surface[data-fullscreen] .lights-game > :not(.lights-stage),
 .level-games-view .game-surface[data-fullscreen] .intruder-level > :not(.color-board) { grid-column: 2; margin-block: 0; }
 .game-surface[data-fullscreen] .game-mount > .mine-tools { grid-row: 1; }
 .game-surface[data-fullscreen] .game-mount > .mine-example { grid-row: 2; }
 .game-surface[data-fullscreen] .game-mount > .number-pad { grid-row: 2; }
 .game-surface[data-fullscreen] .game-mount > :is(.sequence-start,.sequence-resume) { justify-self: start; }
 .game-surface[data-fullscreen] .xp .wd-hang-level {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-rows: repeat(3, min-content) minmax(0,1fr);
  max-width: 960px;
  width: 100%;
  column-gap: var(--fullscreen-group-gap);
  align-items: start;
 }
 .game-surface[data-fullscreen] .xp .wd-hang-level > .wd-hang-board { grid-column: 1; grid-row: 1 / 4; }
 .game-surface[data-fullscreen] .xp .wd-hang-level > :not(.wd-hang-board) { grid-column: 2; }
 .game-surface[data-fullscreen] .xp .wd-hang-level > .wd-puzzle-name { grid-row: 1; }
 .game-surface[data-fullscreen] .xp .wd-hang-level > .wd-keyboard { grid-row: 2; }
 .game-surface[data-fullscreen] .xp .wd-hang-level > .wd-hang-tools { grid-row: 3; }
 .game-surface[data-fullscreen] .xp.la.la-arithmetic-level .la-body { max-width: 820px; }
}
@media (min-width: 720px) and (max-height: 520px) and (orientation: landscape) {
 .game-surface[data-fullscreen] .intruder-level .color-board .tile { min-height: 0; }
 .game-surface[data-fullscreen] .xp .wd-hang-level {
  grid-template-columns: minmax(0, 260px) minmax(0, 440px);
  justify-content: center;
 }
 .game-surface[data-fullscreen] .xp .wd-hang-level .wd-hang { max-width: 148px; }
 .game-surface[data-fullscreen] .xp .wd-hang-level .wd-keyboard { gap: 4px; }
 .game-surface[data-fullscreen] .xp .wd-hang-level .wd-slot { min-height: 36px; }
}

.level-games-view .game-mount > .tic-board { max-width: 380px; }
.level-games-view .game-surface[data-fullscreen] .game-mount > .tic-board { max-width: min(620px, var(--fullscreen-board)); }
.game-surface[data-fullscreen] .game-mount > .tic-board .tile {
 font-size: clamp(1.75rem,10vmin,4.5rem);
 min-height: 0;
 padding: 0;
 line-height: 1;
}
.level-games-view .game-mount .reaction-level { max-width: 680px; }
.level-games-view .reaction-level .reaction-target { margin: 0; }
.level-games-view .reaction-level .reaction-status { min-height: 0; }
.level-games-view .reaction-level :is(.reaction-samples,.reaction-comparison):empty { display: none; }
.level-games-view .xp :is(.wd-level-anagrams,.wd-level-soup,.wd-level-connections) { max-width: 640px; }
.level-games-view .xp :is(.wd-level-anagrams,.wd-level-soup,.wd-level-connections) .wd-message { min-height: 0; margin: 0 0 8px; }
.level-games-view .wd-level-anagrams :is(.wd-rack,.wd-form,.wd-anagram-remaining,.xp-tools) { margin-block: 8px; }
.level-games-view .wd-level-anagrams .wd-found:empty,
.level-games-view .wd-level-connections :is(.wd-connect,.wd-connection-solved):empty,
.level-games-view .pp-shadow-level :is(.pp-shadow-example,.pp-feedback,.pp-tools):empty,
.level-games-view .la-level-jugs .la-body > .xp-note:empty { display: none; }
.level-games-view .xp .wd-level-connections .wd-connect { margin: 8px 0; }
.level-games-view .xp .wd-level-connections .wd-connect button { min-height: 48px; padding: 6px 4px; }
.level-games-view .xp .wd-level-connections .wd-connection-actions { margin-block: 8px; }
.level-games-view .xp .wd-level-soup .wd-soup-sticky { position: static; }
.level-games-view .xp .wd-level-soup .wd-soup.wd-compact button { min-height: 0; }
.level-games-view .wd-level-soup .wd-soup.wd-compact { gap: 3px; padding: 2px; }
.level-games-view .game-surface:has(:is(.wd-level-anagrams,.wd-level-soup,.wd-level-connections,.wd-ladder-level) .wd-message) > .game-message { display: none; }
.level-games-view .game-mount:is(.la-level-jugs,.la-level-robot) > .xp-note { display: none; }
.level-games-view .game-mount.la-level-jugs .la-jugs { margin: 12px 0; gap: clamp(8px, 4vw, 32px); }
.level-games-view .game-mount.la-level-robot .la-robot-viewport .la-board .xp-cell {
 min-height: 0;
 min-width: 0;
 padding: 0;
}
.level-games-view .game-mount.la-level-robot .la-robot-viewport .la-board { max-width: 420px; }
.level-games-view .game-mount.la-level-robot .la-robot-program:empty { display: none; }
.level-games-view .game-mount.pp-shadow-level .pp-shadow-model { margin-block: 8px; }
.level-games-view .game-mount.pp-shadow-level .pp-feedback { min-height: 0; }
.level-games-view .game-mount.pp-shadow-level .pp-shadow-source { margin: 6px 0; line-height: 1.4; }
.level-games-view .game-mount.ac-level-rebound .ac-rebound-hits { margin: 0; min-height: 0; }

@media (min-width: 720px) and (orientation: landscape) {
 .game-surface[data-fullscreen] :is(.reaction-level,.wd-level-connections,.wd-level-anagrams,.wd-level-soup .wd-soup-content) {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, min(55%,620px)) minmax(0,var(--fullscreen-dock));
  grid-template-rows: min-content min-content minmax(0,1fr);
  gap: 8px var(--fullscreen-group-gap);
  justify-content: center;
  align-items: start;
 }
 .game-surface[data-fullscreen] .reaction-level .reaction-target { grid-column: 1; grid-row: 1 / 4; block-size: min(var(--fullscreen-board),370px); min-block-size: 0; }
 .game-surface[data-fullscreen] .reaction-level > :not(.reaction-target) { grid-column: 2; margin-block: 0; }
 .game-surface[data-fullscreen] .reaction-level .reaction-samples { max-height: min(40dvh,320px); overflow: auto; }
 .game-surface[data-fullscreen] .xp .wd-level-connections .wd-connect { grid-column: 1; grid-row: 1 / 4; margin: 0; }
 .game-surface[data-fullscreen] .wd-level-connections > :not(.wd-connect) { grid-column: 2; }
 .game-surface[data-fullscreen] .wd-level-connections > .wd-connection-actions { grid-row: 1; margin: 0; }
 .game-surface[data-fullscreen] .wd-level-connections > .wd-message { grid-row: 2; }
 .game-surface[data-fullscreen] .wd-level-anagrams > :is(.xp-tools,.wd-found,.wd-anagram-result) { grid-column: 2; }
 .game-surface[data-fullscreen] .wd-level-anagrams > .xp-tools { grid-row: 1; }
 .game-surface[data-fullscreen] .wd-level-anagrams > .wd-found { grid-row: 2 / 6; margin: 0; }
 .game-surface[data-fullscreen] .wd-level-anagrams > :is(.wd-message,.wd-rack,.wd-anagram-remaining,.wd-form) { grid-column: 1; }
 .game-surface[data-fullscreen] .wd-level-anagrams > .wd-rack { grid-row: 1; }
 .game-surface[data-fullscreen] .wd-level-anagrams > .wd-form { grid-row: 2; }
 .game-surface[data-fullscreen] .xp .wd-level-soup { max-width: 1080px; width: 100%; }
 .game-surface[data-fullscreen] .wd-level-soup .wd-soup-content { grid-template-columns: minmax(0,var(--fullscreen-board)) minmax(0,var(--fullscreen-dock)); }
 .game-surface[data-fullscreen] .wd-level-soup .wd-board-viewport {
  grid-column: 1; grid-row: 1 / 4; max-height: var(--fullscreen-board); overflow: auto; padding: 0;
 }
 .game-surface[data-fullscreen] .wd-level-soup .wd-soup-sticky { grid-column: 2; grid-row: 1; }
 .game-surface[data-fullscreen] .wd-level-soup .wd-soup-result { grid-column: 2; grid-row: 2; }
 .game-surface[data-fullscreen] .game-mount:is(.la-level-jugs,.la-level-robot) {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0,min(50%,var(--fullscreen-field))) minmax(0,440px);
  grid-template-rows: min-content min-content minmax(0,1fr);
  gap: 8px var(--fullscreen-group-gap);
  justify-content: center;
  align-items: start;
 }
 .game-surface[data-fullscreen] .game-mount:is(.la-level-jugs,.la-level-robot) .la-body { display: contents; }
 .game-surface[data-fullscreen] .la-level-jugs .la-jugs { grid-column: 1; grid-row: 1 / 4; margin: 0; }
 .game-surface[data-fullscreen] .la-level-robot .la-robot-viewport { grid-column: 1; grid-row: 1 / 4; }
 .game-surface[data-fullscreen] .game-mount.la-level-robot .la-robot-viewport .la-board {
  margin: 0 auto; max-width: min(540px,calc(var(--fullscreen-board) * var(--robot-ratio,1)));
 }
 .game-surface[data-fullscreen] .game-mount.la-level-robot .la-robot-viewport .la-board .xp-cell {
  font-size: clamp(.8rem,3.9vmin,1.6rem);
 }
 .game-surface[data-fullscreen] :is(.la-level-jugs,.la-level-robot) > .xp-tools,
 .game-surface[data-fullscreen] .la-level-jugs .la-body > .xp-note,
 .game-surface[data-fullscreen] .la-level-robot .la-robot-editor { grid-column: 2; margin-block: 0; }
 .game-surface[data-fullscreen] :is(.la-level-jugs,.la-level-robot) > .xp-tools { grid-row: 2; }
 .game-surface[data-fullscreen] .la-level-robot .la-robot-editor { grid-row: 1; }
 .game-surface[data-fullscreen] .la-level-robot .la-body > .xp-note { display: none; }
 .game-surface[data-fullscreen] .game-mount.pp-shadow-level .pp-body {
  display: grid;
  grid-template-columns: minmax(0,min(48%,var(--fullscreen-field))) minmax(0,475px);
  grid-template-rows: repeat(4,min-content) minmax(0,1fr);
  gap: 6px var(--fullscreen-group-gap);
  justify-content: center;
  align-items: start;
 }
 .game-surface[data-fullscreen] .game-mount.pp-shadow-level .pp-shadow-model { grid-column: 1; grid-row: 1 / 6; margin: 0; gap: 8px; }
 .game-surface[data-fullscreen] .pp-shadow-level .pp-shadow-model > svg { max-height: var(--fullscreen-board); }
 .game-surface[data-fullscreen] .pp-shadow-level .pp-body > :not(.pp-shadow-model) { grid-column: 2; margin-block: 0; }
 .game-surface[data-fullscreen] .pp-shadow-level .pp-shadow-demo-tools { gap: 5px; }
}

@media (min-width: 720px) and (max-height: 520px) and (orientation: landscape) {
 .game-surface[data-fullscreen] .xp .wd-level-connections .wd-connect { gap: 5px; }
 .game-surface[data-fullscreen] .xp .wd-level-connections .wd-connect button { min-height: 44px; }
 .game-surface[data-fullscreen] .wd-level-soup .wd-soup-sticky { padding: 6px; }
 .game-surface[data-fullscreen] .wd-level-soup .wd-soup-sticky .xp-tools { justify-content: start; gap: 4px; }
 .game-surface[data-fullscreen] .wd-level-soup .wd-soup-sticky .xp-btn { padding-inline: 8px; font-size: .8rem; }
 .game-surface[data-fullscreen] .xp.la.la-level-jugs .la-vessel { height: 146px; }
 .game-surface[data-fullscreen] .la-level-robot .la-robot-editor h3 { margin-bottom: 2px; }
 .game-surface[data-fullscreen] .la-level-robot .la-robot-program { margin-block: 4px; }
 .game-surface[data-fullscreen] .la-level-robot .la-robot-write { padding-top: 4px; }
 .game-surface[data-fullscreen] .la-level-robot .la-robot-write .xp-btn { padding-inline: 8px; }
 .game-surface[data-fullscreen] .pp-shadow-level .pp-title { font-size: 1.1rem; }
 .game-surface[data-fullscreen] .pp-shadow-level .pp-height-cell { min-height: 28px; }
 .game-surface[data-fullscreen] .pp-shadow-level .pp-shadow-choice { min-height: 44px; padding: 4px; }
 .game-surface[data-fullscreen] .pp-shadow-level .pp-shadow-choice svg { max-height: 64px; }
 .game-surface[data-fullscreen] .ac-level-rebound .ac-btn { padding-inline: 10px; }
}

/* Shared selector, compact play areas for the fourth group. */
.game-mount.la-selectable-level > .xp-note,
.game-mount.la-selectable-level :is(.la-route-feedback,.la-beam-feedback,.la-soko-feedback):empty,
.game-mount.lb-level-flood .lb-flood-feedback:empty,
.game-mount.pp-changes-level .pp-tools:empty,
.game-mount.pp-precision-level .pp-precision-summary:empty { display: none; }
.game-mount.la-selectable-level :is(.la-body > .xp-note,.la-route-status,.la-beam-feedback),
.game-mount.lb-level-flood .lb-stage > .xp-note { margin-block: 4px; }
.game-mount.la-selectable-level .la-route-board { min-width: 0 !important; }
.game-mount.la-selectable-level .la-nonogram {
 grid-template-columns: clamp(28px,7vw,44px) repeat(var(--level-size),minmax(0,1fr)) !important;
 width: min(100%,calc(44px * (var(--level-size) + 1) + 12px)) !important;
 min-width: 0 !important;
 max-width: 580px;
 margin: 8px auto;
 padding: 4px;
 gap: 2px;
}
.game-mount.xp.la-selectable-level .la-nonogram > * { min-height: 0; }
.game-mount.xp.la-selectable-level .la-nonogram .xp-cell {
 min-width: 0;
 min-height: 0;
 padding: 0;
 font-size: clamp(.8rem,3.4vw,1.4rem);
 line-height: 1;
}
.game-mount.la-selectable-level .la-nono-clue { font-size: clamp(.64rem,2.5vw,1rem); line-height: 1.15; padding: 4px 1px; }
.game-mount.la-selectable-level .la-soko-input .la-board { min-width: 0 !important; }
.game-mount.la-selectable-level .la-soko-input .xp-cell { padding: 0; }
.game-mount.la-selectable-level .la-mirror-board .xp-cell:disabled { opacity: 1; }
.game-mount.la-selectable-level .la-mirror-board .la-beam-entry { box-shadow: inset 3px 0 #35634f; }
.game-mount.la-selectable-level .la-mirror-board .la-beam-exit { outline: 3px dashed #946136; outline-offset: -5px; }
.game-mount.la-selectable-level .la-attempts:empty { display: none; }
.game-mount.lb-level-flood .lb-flood-grid { margin: 8px auto; }
.game-mount.lb-level-flood .lb-flood-grid .xp-cell { min-height: 0; padding: 0; aspect-ratio: 1; }
.game-mount .wd-ladder-level { width: min(100%,640px); }
.game-mount .wd-ladder-level :is(.wd-message,.wd-chain) { margin-block: 8px; min-height: 0; }
.game-mount.pp-changes-level :is(.pp-title,.pp-change-bar,.pp-hint),
.game-mount.pp-precision-level :is(.pp-adjustments,.pp-feedback,.pp-hint) { margin-block: 6px; }
.game-mount.pp-changes-level .pp-change-bar > .pp-label { display: none; }
.game-mount.pp-precision-level .pp-body { width: min(100%,620px); margin-inline: auto; }
.game-mount.xp.ac.ac-lunar-level .ac-lunar-controls .ac-btn:last-child { grid-column: auto; }

@media (max-width: 480px) {
 .game-mount.la-selectable-level .la-nonogram { padding: 2px; }
 .game-mount.la-selectable-level .la-code-palette { gap: 4px; }
 .game-mount .wd-ladder-level .wd-chain li { padding: 6px 8px; }
 .game-mount.pp-changes-level .pp-change-detail { width: 16px; height: 16px; font-size: .7rem; }
}
@media (min-width: 720px) and (orientation: landscape) {
 .game-surface[data-fullscreen] .game-mount.la-selectable-level,
 .game-surface[data-fullscreen] .lb-level-flood .lb-stage,
 .game-surface[data-fullscreen] .game-mount.pp-precision-level {
  display: grid;
  grid-template-columns: minmax(0,min(54%,var(--fullscreen-board))) minmax(0,var(--fullscreen-dock));
  grid-template-rows: repeat(7,min-content) minmax(0,1fr);
  align-items: start;
  justify-content: center;
  gap: 8px var(--fullscreen-group-gap);
 }
 .game-surface[data-fullscreen] .game-mount:is(.la-selectable-level,.pp-precision-level) > :is(.la-body,.pp-body) { display: contents; }
 .game-surface[data-fullscreen] .la-selectable-level .la-body > *,
 .game-surface[data-fullscreen] .la-selectable-level > .xp-tools,
 .game-surface[data-fullscreen] .lb-level-flood .lb-stage > *,
 .game-surface[data-fullscreen] .pp-precision-level .pp-body > *,
 .game-surface[data-fullscreen] .pp-precision-level > :is(.pp-tools,.pp-hint) {
  grid-column: 2;
  margin-block: 0;
 }
 .game-surface[data-fullscreen] .la-selectable-level .la-body > :is(.la-route-viewport,.la-nono-viewport,.la-soko-input,.la-mirror-board),
 .game-surface[data-fullscreen] .lb-level-flood .lb-stage > .lb-flood-grid,
 .game-surface[data-fullscreen] .pp-precision-level .pp-body > .pp-precision-art {
  grid-column: 1;
  grid-row: 1 / 9;
  align-self: start;
  max-width: 100%;
  margin: 0 auto;
 }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level[data-logic-game="codigo-secreto"] {
  grid-template-columns: repeat(2,minmax(0,var(--fullscreen-dock)));
 }
 .game-surface[data-fullscreen] .la-selectable-level .la-body > :is(.la-code,.la-code-active,.la-code-palette) { grid-column: 1; }
 .game-surface[data-fullscreen] .la-selectable-level .la-code { grid-row: 1; }
 .game-surface[data-fullscreen] .la-selectable-level .la-code-palette { grid-row: 2; }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="codigo-secreto"] > .xp-tools { grid-row: 1; }
 .game-surface[data-fullscreen] .la-selectable-level .la-attempts { width: 100%; max-height: var(--fullscreen-board); overflow: auto; }
 .game-surface[data-fullscreen] .la-selectable-level .la-mirror-board { width: 100%; }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="rutas-de-colores"] > .xp-tools {
  grid-row: 1;
  justify-content: start;
 }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="rutas-de-colores"] .la-route-palette { grid-row: 2; }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="nonogramas-mini"] > .xp-tools { grid-row: 2; }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="nonogramas-mini"] .la-modes { grid-row: 1; }
 .game-surface[data-fullscreen] .la-selectable-level .la-route-board { max-width: none; margin-block: 0; }
 .game-surface[data-fullscreen] .la-selectable-level .la-soko-pad { margin: 0; }
 .game-surface[data-fullscreen] .la-selectable-level .la-nonogram { width: 100% !important; margin-block: 0; }
 .game-surface[data-fullscreen] .la-selectable-level .la-soko-input .xp-cell,
 .game-surface[data-fullscreen] .lb-level-flood .lb-flood-grid .xp-cell { min-height: 0; font-size: clamp(.85rem,3.8vmin,1.6rem); }
 .game-surface[data-fullscreen] .game-mount.pp-precision-level {
  grid-template-columns: minmax(0,min(53%,var(--fullscreen-field))) minmax(0,var(--fullscreen-dock));
 }
 .game-surface[data-fullscreen] .pp-precision-level .pp-adjustments { gap: 8px; }
 .game-surface[data-fullscreen] .pp-precision-level .pp-feedback { min-height: 0; }
 .game-surface[data-fullscreen] .pp-precision-level > .pp-tools { grid-row: 1; }
 .game-surface[data-fullscreen] .pp-precision-level .pp-adjustments { grid-row: 2; }
 .game-surface[data-fullscreen] .pp-changes-level .pp-change-pair {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,min(48%,640px,calc((100dvh - 168px) * 10 / 7))));
  gap: clamp(8px,2vw,18px);
  justify-content: center;
 }
 .game-surface[data-fullscreen] .game-mount.pp-changes-level .pp-change-inactive { display: block; }
 .game-surface[data-fullscreen] .pp-changes-level .pp-change-card .pp-scene { min-height: 0; }
 .game-surface[data-fullscreen] .pp-changes-level .pp-title { text-align: center; }
 .game-surface[data-fullscreen] .pp-changes-level .pp-change-detail { width: 18px; height: 18px; font-size: .75rem; }
 .game-surface[data-fullscreen] .wd-ladder-level {
  display: grid;
  grid-template-columns: minmax(0,480px) minmax(0,var(--fullscreen-dock));
  width: 100%;
  gap: 8px var(--fullscreen-group-gap);
  justify-content: center;
  align-items: start;
 }
 .game-surface[data-fullscreen] .wd-ladder-level > * { grid-column: 2; margin-block: 0; }
 .game-surface[data-fullscreen] .wd-ladder-level > .wd-ladder-route { grid-column: 1; grid-row: 1; }
 .game-surface[data-fullscreen] .wd-ladder-level > .wd-ladder-trail { grid-column: 1; grid-row: 2 / 8; }
 .game-surface[data-fullscreen] .wd-ladder-level > .wd-ladder-entry { grid-row: 1; }
}
@media (min-width: 720px) and (max-height: 520px) and (orientation: landscape) {
 .game-surface[data-fullscreen] :is(.la-selectable-level,.lb-level-flood) .xp-btn { padding-inline: 9px; }
 .game-surface[data-fullscreen] .la-selectable-level .la-body > .xp-note,
 .game-surface[data-fullscreen] .lb-level-flood .lb-stage > .xp-note { font-size: .82rem; line-height: 1.35; }
 .game-surface[data-fullscreen] .la-selectable-level .la-nono-clue { font-size: .62rem; padding: 2px 1px; }
 .game-surface[data-fullscreen] .la-selectable-level .la-nonogram .xp-cell { font-size: .72rem; }
 .game-surface[data-fullscreen] .la-selectable-level .la-nonogram { gap: 1px; }
 .game-surface[data-fullscreen] .game-mount.pp-precision-level .xp-row { gap: 5px; margin-block: 0; }
 .game-surface[data-fullscreen] .game-mount.pp-precision-level .pp-slider input { min-height: 32px; }
 .game-surface[data-fullscreen] .game-mount.pp-precision-level .pp-slider { gap: 2px; }
 .game-surface[data-fullscreen] .pp-precision-level .pp-precision-control {
  display: grid;
  grid-template-columns: minmax(0,1fr) 3ch;
  align-items: end;
 }
 .game-surface[data-fullscreen] .pp-precision-level .pp-precision-control label { gap: 0; }
 .game-surface[data-fullscreen] .pp-precision-level .pp-precision-control .pp-current-value { padding-bottom: 7px; }
 .game-surface[data-fullscreen] .pp-precision-level .pp-precision-control .xp-row { grid-column: 1 / -1; }
 .game-surface[data-fullscreen] .pp-precision-level .pp-precision-control .pp-btn { min-height: 36px; padding: 5px 8px; }
 .game-surface[data-fullscreen] .game-mount.pp-precision-level > .pp-hint { display: none; }
 .game-surface[data-fullscreen] .game-mount.pp-changes-level > .pp-hint { display: none; }
 .game-surface[data-fullscreen] .game-mount.pp-changes-level {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(148px,23%);
  align-items: start;
 }
 .game-surface[data-fullscreen] .pp-changes-level > .pp-body { grid-column: 1; grid-row: 1; }
 .game-surface[data-fullscreen] .pp-changes-level .pp-change-pair {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
 }
 .game-surface[data-fullscreen] .pp-changes-level .pp-change-bar {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  align-content: start;
 }
 .game-surface[data-fullscreen] .pp-changes-level .pp-change-bar .pp-btn { width: 100%; }
 .game-surface[data-fullscreen] .pp-changes-level .pp-title { display: none; }
 .game-surface[data-fullscreen] .ac-lunar-level .ac-instruments { gap: 4px; }
}

/* Fifth group boards reuse the shared selector and fullscreen shell. */
.game-mount.lb-selectable-level .lb-stage {
 display: grid;
 gap: 10px;
 width: min(100%,720px);
 margin-inline: auto;
}
.game-mount.lb-selectable-level .lb-stage > * { margin-block: 0; min-width: 0; }
.game-mount.lb-selectable-level :is(.lb-binary-position,.lb-board-feedback,.lb-vehicle-status):empty,
.game-mount.pp-memory-level .pp-tools:empty,
.game-mount .wd-linked-level :is(.wd-found,.wd-message,.wd-linked-feedback):empty { display: none; }
.game-mount.xp.lb-selectable-level :is(.lb-binary-grid,.lb-paper-viewport .lb-grid,.lb-vehicle-board) { min-width: 0 !important; }
.game-mount.xp.lb-selectable-level :is(.lb-binary-grid,.lb-paper-viewport .lb-grid) .lb-cell { min-height: 0; padding: 0; }
.game-mount.xp.lb-selectable-level .lb-paper-viewport .lb-grid { max-width: 430px; }
.game-mount.xp.lb-selectable-level .lb-domino-inventory { justify-self: center; grid-template-columns: repeat(3,minmax(0,1fr)); }
.game-mount.xp.lb-selectable-level .lb-domino-inventory li { min-height: 32px; padding: 4px 6px; line-height: 1.25; }
.game-mount.xp.lb-selectable-level .lb-folded { grid-template-columns: repeat(var(--cols),minmax(0,34px)); }
.game-mount.xp.lb-selectable-level .lb-fold-cell { min-width: 0; width: 100%; height: auto; aspect-ratio: 1; }
.game-mount .wd-linked-level { width: min(100%,720px); }
.game-mount .wd-linked-level :is(.wd-path,.wd-message,.wd-help,.wd-linked-feedback) { min-height: 0; margin-block: 4px; }
.game-mount.xp:is(.pp-memory-level,.pp-shelf-level) { gap: 8px; }
.game-mount:is(.pp-memory-level,.pp-shelf-level) :is(.pp-body,.pp-hint,.pp-title,.pp-tools) { margin-block: 4px; }
.game-mount:is(.pp-memory-level,.pp-shelf-level) :is(.pp-memory-grid,.pp-shelf-grid) { margin: 8px auto; }
.game-mount.xp.pp-shelf-level :is(.pp-shelf-slot,.pp-tray .pp-object):has(.ss-grip) {
 min-height: 44px;
 padding: 3px 12px 7px 3px;
}
.game-mount.pp-shelf-level .ss-grip {
 width: 20px;
 height: 20px;
 border-radius: 5px;
 font-size: .78rem;
}

@media (max-width: 480px) {
 .game-mount.xp.lb-selectable-level .lb-domino-inventory li { font-size: .72rem; }
 .game-mount:is(.pp-memory-level,.pp-shelf-level) :is(.pp-memory-grid,.pp-shelf-grid) { gap: 6px; }
 .game-mount:is(.pp-memory-level,.pp-shelf-level) :is(.pp-memory-cell,.pp-shelf-slot) { min-width: 0; }
 .game-mount.pp-shelf-level .pp-tray { padding: 6px; }
 .game-mount.pp-shelf-level .pp-tray .pp-object { width: 44px; height: 44px; }
}

@media (min-width: 720px) and (orientation: landscape) {
 .game-surface[data-fullscreen] .la-selectable-level .la-body > .la-network,
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="rectangulos"] .la-body > .la-board {
  grid-column: 1;
  grid-row: 1 / 9;
  width: 100%;
  margin: 0 auto;
 }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="puentes"] .la-bridge-modes { grid-row: 1; }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="rectangulos"] > .xp-tools { grid-row: 1; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level .lb-stage,
 .game-surface[data-fullscreen] .game-mount :is(.wd-linked-level),
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level):has(:is(.pp-memory-grid,.pp-shelf-grid)) {
  display: grid;
  grid-template-columns: minmax(0,min(54%,var(--fullscreen-board))) minmax(0,var(--fullscreen-dock));
  grid-template-rows: repeat(6,min-content) minmax(0,1fr);
  align-items: start;
  justify-content: center;
  gap: 7px var(--fullscreen-group-gap);
  max-width: none;
  width: 100%;
 }
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level):has(:is(.pp-memory-grid,.pp-shelf-grid)) > .pp-body { display: contents; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > *,
 .game-surface[data-fullscreen] .wd-linked-level > *,
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level):has(:is(.pp-memory-grid,.pp-shelf-grid)) > :is(.pp-hint,.pp-tools),
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level):has(:is(.pp-memory-grid,.pp-shelf-grid)) .pp-body > * {
  grid-column: 2;
  margin-block: 0;
 }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > :is(.lb-binary-viewport,.lb-vehicle-viewport,.lb-paper-viewport,.lb-grid),
 .game-surface[data-fullscreen] .wd-linked-level > .wd-linked-grid,
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level) .pp-body > :is(.pp-memory-grid,.pp-shelf-grid) {
  grid-column: 1;
  grid-row: 1 / 8;
  width: 100%;
  max-width: var(--fullscreen-board);
  margin: 0 auto;
 }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > .lb-level-actions,
 .game-surface[data-fullscreen] .wd-linked-level > .xp-tools,
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level):has(:is(.pp-memory-grid,.pp-shelf-grid)) > .pp-tools { grid-row: 1; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="saca-el-vehiculo"] .lb-stage > .lb-movement { grid-row: 1; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="saca-el-vehiculo"] .lb-stage > .lb-level-actions { grid-row: 2; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-fold-caption { grid-row: 2; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-folded { grid-row: 3; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-fold-steps {
  grid-row: 4;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 2px 20px;
  margin-block: 0;
  padding-inline-start: 22px;
  line-height: 1.35;
 }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-paper-demo { grid-row: 6; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-paper-viewport { padding: 0; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="dominos-ocultos"] .lb-stage > .lb-grid {
  width: min(100%,calc(var(--fullscreen-board) * var(--domino-ratio,1)));
 }
 .game-surface[data-fullscreen] .wd-linked-level > .wd-path { grid-row: 2; }
 .game-surface[data-fullscreen] .pp-shelf-level .pp-tray { grid-row: 2; }
}

@media (min-width: 720px) and (max-height: 520px) and (orientation: landscape) {
 .game-surface[data-fullscreen] .la-selectable-level :is(.la-network,.la-body > .la-board) .xp-cell,
 .game-surface[data-fullscreen] .lb-selectable-level .lb-grid .lb-cell { min-height: 0; padding: 0; font-size: clamp(.78rem,3.7vmin,1.2rem); }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-grid { gap: 2px; padding: 3px; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-vehicle-board .lb-grid { gap: 0; padding: 0; }
 .game-surface[data-fullscreen] .lb-selectable-level :is(.lb-palette,.lb-tools,.lb-movement) { gap: 4px; }
 .game-surface[data-fullscreen] .lb-selectable-level .xp-btn { padding-inline: 8px; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level .lb-domino-inventory { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
 .game-surface[data-fullscreen] .lb-selectable-level :is(.lb-fold-steps,.lb-stage > .xp-label) { font-size: .78rem; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level .lb-folded {
  grid-template-columns: repeat(var(--cols),minmax(0,26px));
 }
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level):has(:is(.pp-memory-grid,.pp-shelf-grid)) > .pp-hint { display: none; }
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level) .pp-title { font-size: 1rem; }
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level) :is(.pp-memory-grid,.pp-shelf-grid) { gap: 4px; }
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level) :is(.pp-memory-cell,.pp-shelf-slot) {
  min-height: 0;
  min-width: 0;
  padding: 3px;
 }
 .game-surface[data-fullscreen] .game-mount:is(.pp-memory-level,.pp-shelf-level) :is(.pp-memory-cell,.pp-shelf-slot) svg { max-width: 32px; max-height: 32px; }
 .game-surface[data-fullscreen] .game-mount.pp-shelf-level .pp-tray { gap: 4px; min-height: 0; padding: 6px; }
 .game-surface[data-fullscreen] .game-mount.pp-shelf-level .pp-tray .pp-object { width: 42px; height: 42px; min-width: 0; min-height: 0; }
 .game-surface[data-fullscreen] .game-mount.pp-shelf-level :is(.pp-shelf-preview,.pp-shelf-selection) { font-size: .8rem; }
 .game-surface[data-fullscreen] .game-mount.ac-shield-level .ac-shield-report:empty { display: none; }
}

/* Sixth group boards, tools and reading areas. */
.game-mount.la.la-selectable-level .la-untangle-viewport { overflow: visible; }
.game-mount.la.la-selectable-level .la-untangle-board { min-width: 0; max-width: none; }
.game-mount.la.la-selectable-level .la-untangle-board .la-board .xp-cell { min-width: 0; min-height: 0; padding: 0; }
.game-mount.la.la-selectable-level .la-loop-scroll { padding: 0; overflow: visible; }
.game-mount.la.la-selectable-level .la-loop {
 width: 100%;
 min-width: 0;
 grid-template-columns: repeat(var(--loop-tracks),minmax(0,1fr));
}
.game-mount.la.la-selectable-level .la-loop > * {
 min-height: 0;
 aspect-ratio: 1;
 line-height: 1;
}
.game-mount.la.la-selectable-level .la-loop .la-edge { font-size: clamp(.75rem,3.5vmin,1.45rem); }
.game-mount.la.la-selectable-level .la-counted-board { width: 100%; }
.game-mount.la.la-selectable-level .la-counted-board .xp-cell { min-height: 0; padding: 0; aspect-ratio: 1; }
.game-mount.la.la-selectable-level .la-akari-feedback { margin-block: 6px; min-height: 0; }
.game-mount.xp.wd-crypto-level .wd-wrap { width: 100%; }
.game-mount.wd-crypto-level .wd-crypto-given .wd-symbol-letter { background: #f5e4c9; color: #513821; }
.game-mount.wd-crypto-level .wd-message:empty { display: none; }
.game-mount.ca-quarto-level .ca-quarto-panel { min-width: 0; display: grid; gap: 8px; justify-items: start; }
.game-mount.ca-quarto-level .ca-quarto-panel :is(.ca-heading,.xp-note) { margin: 0; }
.game-mount.ca-quarto-level .ca-quarto-preview { display: grid; place-items: center; padding: 8px 14px; border: 1px solid #91a69a; border-radius: 10px; color: #132d29; background: #fff; }
.game-mount.ca-quarto-level .ca-body { gap: 12px; }
.game-mount.ca-quarto-level .ca-shell > .xp-note:empty { display: none; }
.game-mount.xp.pp.pp-recognition-level .pp-recognition-art { min-height: 0; }
.game-mount.xp.pp.pp-recognition-level .pp-recognition-art svg { width: min(64%,220px); height: auto; aspect-ratio: 1; }
.game-mount.pp-recognition-level .pp-tools .pp-btn { flex: 1 1 112px; }
.game-mount.ac-orbit-level .ac-orbit-report { margin-block: 0; min-height: 0; }

@media (max-width: 600px) {
 .game-mount.la.la-selectable-level .la-loop-clue { font-size: .68rem; }
 .game-mount.la.la-selectable-level .la-loop .la-dot { font-size: .68rem; }
 .game-mount.la.la-selectable-level .la-count-label { font-size: .75rem; }
 .game-mount.xp.lb-selectable-level .lb-node { width: clamp(32px,10vw,42px); height: clamp(32px,10vw,42px); }
 .game-mount.xp.lb-selectable-level .lb-stick-editor { width: min(44vw,175px); }
 .game-mount.xp.wd-crypto-level .wd-crypto { max-height: min(45dvh,330px); }
 .game-mount.xp.ca-quarto-level .ca-token { gap: 3px; }
}

@media (min-width: 720px) and (orientation: landscape) {
 .game-surface[data-fullscreen] .la-selectable-level .la-body > :is(.la-untangle-viewport,.la-loop-scroll,.la-counted-board),
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="bombillas"] .la-body > .la-board,
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > :is(.lb-trace,.lb-stick-editor) {
  grid-column: 1;
  grid-row: 1 / 9;
  width: min(100%,var(--fullscreen-board));
  max-width: none;
  justify-self: center;
  align-self: start;
  margin: 0;
 }
 .game-surface[data-fullscreen] .la-selectable-level .la-body > .la-modes { grid-row: 1; }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="desenreda"] > .xp-tools { grid-row: 1; }
 .game-surface[data-fullscreen] .la-selectable-level:is([data-logic-game="circuito-cerrado"],[data-logic-game="bombillas"],[data-logic-game="tiendas-y-arboles"]) > .xp-tools { grid-row: 2; }
 .game-surface[data-fullscreen] .game-mount.la.la-selectable-level .la-counted-board .la-board { max-width: none; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level[data-logic-game="palillos"] .lb-stage {
  grid-template-columns: minmax(0,min(42%,var(--fullscreen-board))) minmax(0,min(52%,440px));
 }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > .lb-stick-editor {
  width: min(100%,calc((var(--fullscreen-board) - 30px) * 7 / 11),310px);
 }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stick-editor .xp-label { margin: 0; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > .lb-equation { grid-row: 1; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="palillos"] .lb-stage > .lb-level-actions { grid-row: 2; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="palillos"] .lb-digit { width: min(24%,84px); max-height: 96px; }
 .game-surface[data-fullscreen] .xp.wd-crypto-level .wd-wrap { max-width: 1050px; }
 .game-surface[data-fullscreen] .xp.wd-crypto-level .wd-crypto-stage {
  display: grid;
  grid-template-columns: minmax(0,1.08fr) minmax(0,1fr);
  gap: 8px var(--fullscreen-group-gap);
  width: min(100%,1050px);
  margin-inline: auto;
  align-items: start;
 }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto-layout { display: contents; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto {
  grid-column: 1;
  grid-row: 1 / 4;
  margin: 0;
  max-height: var(--fullscreen-board);
 }
 .game-surface[data-fullscreen] .xp.wd-crypto-level .wd-crypto-stage > :is(.xp-tools,.wd-mapping) { grid-column: 2; margin: 0; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto-panel { grid-column: 2; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto-stage > .xp-tools { justify-content: flex-start; }
 .game-surface[data-fullscreen] .xp.ca-quarto-level .ca-body,
 .game-surface[data-fullscreen] .xp.pp-recognition-level {
  display: grid;
  grid-template-columns: minmax(0,min(55%,var(--fullscreen-board))) minmax(0,var(--fullscreen-dock));
  gap: 8px var(--fullscreen-group-gap);
  justify-content: center;
  align-items: start;
 }
 .game-surface[data-fullscreen] .ca-quarto-level .ca-board { width: 100%; padding: 5px; align-self: start; }
 .game-surface[data-fullscreen] .pp-recognition-level > .pp-body { display: contents; }
 .game-surface[data-fullscreen] .xp.pp-recognition-level :is(.pp-change-config,.pp-hint,.pp-feedback,.pp-label,.pp-tools) { grid-column: 2; margin: 0; }
 .game-surface[data-fullscreen] .xp.pp-recognition-level .pp-feedback { min-height: 0; }
 .game-surface[data-fullscreen] .xp.pp-recognition-level .pp-hint { grid-row: 5; }
 .game-surface[data-fullscreen] .pp-recognition-level .pp-recognition-art {
  grid-column: 1;
  grid-row: 1 / span 6;
  width: 100%;
  aspect-ratio: 1;
  padding: 12px;
 }
 .game-surface[data-fullscreen] .pp-recognition-level > .pp-tools { grid-row: 1; }
 .game-surface[data-fullscreen][data-game="cambio-de-orbita"] .xp.ac.ac-orbit-level > .ac-orbit-report { grid-column: 2; grid-row: 3; margin: 0; }
 .game-surface[data-fullscreen][data-game="cambio-de-orbita"] .xp.ac.ac-orbit-level > .ac-note { grid-column: 2; grid-row: 4; }
 .game-surface[data-fullscreen][data-game="cambio-de-orbita"] .xp.ac.ac-orbit-level > .ac-canvas { grid-row: 1 / 5; }
}

@media (min-width: 720px) and (max-height: 520px) and (orientation: landscape) {
 .game-surface[data-fullscreen] .la-selectable-level :is(.la-loop-clue,.la-dot,.la-count-label) { font-size: .74rem; min-height: 0; }
 .game-surface[data-fullscreen] .la-selectable-level .la-counted-board { padding: 4px; grid-template-columns: 19px minmax(0,1fr); }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level .lb-node { width: 30px; height: 30px; font-size: .8rem; padding: 0; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="palillos"] .lb-digit { min-height: 56px; max-height: 59px; padding: 4px; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="palillos"] .lb-stage > .xp-note { font-size: .82rem; line-height: 1.3; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="palillos"] .lb-stage > .xp-row { margin: 0; }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="bombillas"] .la-akari-feedback { margin: 0; font-size: .84rem; line-height: 1.38; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="palillos"] .lb-digit svg { height: 46px; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stick-fallback { font-size: .82rem; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto { gap: 3px 5px; padding: 5px; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-symbol { --wd-symbol-width: 25px; min-width: 23px; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-symbol-letter { height: 20px; font-size: .88rem; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-symbol small { padding: 2px 0; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto-panel .wd-keyboard { grid-template-columns: repeat(10,minmax(0,1fr)); }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto-panel .wd-key { min-height: 30px; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto-selection { margin-block: 0 4px; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto-keybar .xp-btn { min-height: 30px; }
 .game-surface[data-fullscreen] .xp.wd-crypto-level .wd-crypto-panel { padding: 5px; }
 .game-surface[data-fullscreen] .xp.wd-crypto-level .wd-crypto-stage > .xp-tools { gap: 4px; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto-stage > .xp-tools > button { min-height: 38px; padding-inline: 8px; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto { grid-row: 1; max-height: calc(var(--fullscreen-board) - 38px); }
 .game-surface[data-fullscreen] .xp.wd-crypto-level .wd-crypto-stage > .wd-mapping { grid-column: 1; grid-row: 2; font-size: .82rem; }
 .game-surface[data-fullscreen] .xp.wd-crypto-level .wd-mapping summary { min-height: 34px; padding-block: 4px; }
 .game-surface[data-fullscreen] .wd-crypto-level .wd-crypto-stage > .xp-tools { grid-row: 2; }
 .game-surface[data-fullscreen] .xp.wd-crypto-level .wd-crypto-selection { font-size: .85rem; }
 .game-surface[data-fullscreen] .xp.wd-crypto-level .wd-crypto-keybar .xp-btn { padding-block: 4px; }
 .game-surface[data-fullscreen] .ca-quarto-level .ca-board .ca-cell { min-height: 0; padding: 0; }
 .game-surface[data-fullscreen] .xp.ca-quarto-level .ca-quarto-panel { gap: 5px; }
 .game-surface[data-fullscreen] .xp.ca-quarto-level .ca-cards {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 5px;
  width: 100%;
 }
 .game-surface[data-fullscreen] .xp.ca-quarto-level .ca-piece { min-height: 44px; min-width: 0; padding: 5px; }
 .game-surface[data-fullscreen] .xp.ca-quarto-level .ca-quarto-panel .xp-note { font-size: .85rem; }
 .game-surface[data-fullscreen] .ca-quarto-level .ca-token { min-height: 0; gap: 2px; }
 .game-surface[data-fullscreen] .ca-quarto-level .ca-token-shape { width: 15px; height: 15px; }
 .game-surface[data-fullscreen] .ca-quarto-level .ca-token-large .ca-token-shape { width: 22px; height: 22px; }
 .game-surface[data-fullscreen] .ca-quarto-level .ca-token-size { font-size: .67rem; }
 .game-surface[data-fullscreen] .pp-recognition-level > .pp-hint { display: none; }
 .game-surface[data-fullscreen] .xp.pp-recognition-level > .pp-tools .pp-btn { padding-inline: 8px; font-size: .9rem; }
 .game-surface[data-fullscreen] .xp.pp-recognition-level .pp-change-config {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  padding: 4px 6px;
  gap: 6px;
 }
 .game-surface[data-fullscreen] .ac-orbit-level > .ac-note { display: none; }
}

/* Seventh group boards and their controls. */
.game-mount.la-selectable-level .la-peg-goal {
 outline: 2px dashed #8e592c;
 outline-offset: -3px;
}
.game-mount.xp.la.la-selectable-level .la-peg-holder .xp-cell { min-height: 0; aspect-ratio: 1; padding: 0; }
.game-mount.la-selectable-level .la-peg-viewport + .xp-note:empty,
.game-mount.lb-selectable-level :is(.lb-fleet-feedback,.lb-fleet-proposal):empty,
.game-mount.wd-crossword-level .wd-message:empty,
.game-mount.ca-poker-level .ca-shell > :is(.xp-note,.xp-tools):empty,
.game-mount.lb-selectable-level .lb-cube-layers > .xp-note:empty { display: none; }
.game-mount.lb-selectable-level .lb-fleet-viewport { width: min(100%,470px); }
.game-mount.xp.lb.lb-selectable-level .lb-fleet-viewport .lb-cell { min-height: 0; aspect-ratio: 1; padding: 0; }
.game-mount.xp.lb.lb-selectable-level .lb-fleet-viewport .lb-count { padding: 0; min-width: 0; min-height: 0; aspect-ratio: 1; }
.game-mount.lb-selectable-level .lb-cube-layers { gap: 6px 10px; }
.game-mount.lb-selectable-level .lb-cube-layers .xp-note { margin: 0; }
.game-mount.lb-selectable-level .lb-cube-layers .lb-height-map { margin: 6px auto; }
.game-mount.lb-selectable-level .lb-cube-empty { opacity: .8; background: #e8e8e8; color: #454b53; }
.game-mount.wd-crossword-level .wd-active-clue { min-height: 0; }
.game-mount.xp.ca-poker-level .ca-poker-board { width: min(100%,440px); margin: 0; }
.game-mount.xp.ca-poker-level .ca-poker-board .ca-cell { min-height: 0; }
.game-mount.xp.ca-poker-level .ca-poker-next { gap: 8px; }
.game-mount.pp-map-level .pp-map-cell { min-height: 0; }
.game-mount.xp.pp.pp-map-level .pp-map-player { font-size: clamp(.8rem,2.6vmin,1.4rem); line-height: 1; }

@media (max-width:600px) {
 .game-mount.xp.lb-selectable-level[data-logic-game="giro-mental"] .lb-choices { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
 .game-mount.xp.lb-selectable-level[data-logic-game="giro-mental"] .lb-choice { padding: 5px 4px; min-width: 0; min-height: 0; gap: 5px; }
 .game-mount.xp.lb-selectable-level[data-logic-game="giro-mental"] .lb-choice .xp-label { font-size: .76rem; }
 .game-mount.xp.lb-selectable-level .lb-fleet-viewport .lb-count { font-size: .72rem; }
 .game-mount.xp.wd-crossword-level .wd-crossword { gap: 2px; }
 .game-mount.xp.wd-crossword-level .wd-crosscell span { left: 2px; top: 0; font-size: .57rem; }
 .game-mount.xp.wd-crossword-level .wd-crosscell input { padding-top: 5px; }
}

@media (min-width:720px) and (orientation:landscape) {
 .game-surface[data-fullscreen] .la-selectable-level .la-body > .la-peg-viewport,
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > :is(.lb-fleet-viewport,.lb-model),
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-scene > .lb-cube-art {
  grid-column: 1;
  grid-row: 1 / 9;
  width: min(100%,var(--fullscreen-board));
  max-width: none;
  justify-self: center;
  align-self: start;
  margin: 0;
 }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="solitario-de-clavijas"] > .xp-tools { grid-row: 1; }
 .game-surface[data-fullscreen] .la-selectable-level .la-peg-zoom { grid-row: 2; }
 .game-surface[data-fullscreen] .game-mount.xp.la-selectable-level .la-peg-holder .la-board { margin: 0; }
 .game-surface[data-fullscreen]:not([data-fullscreen-options])[data-game="hitori"]:has(.lb-selectable-level) > .guide-launch { display: none; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level[data-logic-game="hitori"] .lb-stage {
  grid-template-columns: minmax(0,min(54%,var(--fullscreen-board))) minmax(0,min(44%,330px));
 }
 .game-surface[data-fullscreen] .lb-selectable-level:is([data-logic-game="hitori"],[data-logic-game="flota-logica"],[data-logic-game="islas-y-mar"]) .lb-stage > .lb-palette { grid-row: 1; }
 .game-surface[data-fullscreen] .lb-selectable-level:is([data-logic-game="hitori"],[data-logic-game="flota-logica"],[data-logic-game="islas-y-mar"]) .lb-stage > .lb-level-actions { grid-row: 2; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="flota-logica"] .lb-stage > .lb-intro { grid-row: 3; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level[data-logic-game="giro-mental"] .lb-stage {
  grid-template-columns: minmax(0,min(40%,var(--fullscreen-board))) minmax(0,min(56%,480px));
 }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-model .lb-shape {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin-inline: auto;
 }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-model .xp-label { margin: 0 0 6px; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > .lb-choices {
  grid-row: 1;
  grid-template-columns: repeat(3,minmax(0,1fr));
  width: 100%;
 }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-scene { display: contents; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > .lb-cube-answer { grid-row: 1; margin: 0; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage:has(> .lb-cube-answer) > .lb-level-actions { grid-row: 2; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-layers { grid-column: 2; grid-row: 3; min-width: 0; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > .lb-cube-total { grid-row: 2; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > .lb-cube-views { grid-row: 3; gap: 8px; }
 .game-surface[data-fullscreen] .game-mount.wd-crossword-level .wd-wrap { max-width: 1080px; margin: 0 auto; }
 .game-surface[data-fullscreen] .wd-crossword-level-layout,
 .game-surface[data-fullscreen] .game-mount.xp.ca-poker-level .ca-body,
 .game-surface[data-fullscreen] .game-mount.xp.pp-map-level {
  display: grid;
  grid-template-columns: minmax(0,min(54%,var(--fullscreen-board))) minmax(0,var(--fullscreen-dock));
  gap: 7px var(--fullscreen-group-gap);
  align-items: start;
  justify-content: center;
 }
 .game-surface[data-fullscreen] .wd-crossword-level-layout {
  grid-template-columns: minmax(0,min(54%,calc(var(--fullscreen-board) * var(--crossword-ratio)))) minmax(0,min(44%,410px));
 }
 .game-surface[data-fullscreen] .wd-crossword-level-layout > .wd-board-viewport,
 .game-surface[data-fullscreen] .ca-poker-level .ca-body > .ca-poker-board,
 .game-surface[data-fullscreen] .pp-map-level .pp-map-grid {
  grid-column: 1;
  grid-row: 1 / 7;
  margin: 0;
  width: 100%;
  max-width: none;
  align-self: start;
 }
 .game-surface[data-fullscreen] .wd-crossword-level-layout > .wd-board-viewport { padding: 0; overflow: visible; }
 .game-surface[data-fullscreen] .wd-crossword-level .wd-crossword { margin: 0; max-width: none; }
 .game-surface[data-fullscreen] .wd-crossword-level .wd-crossword-level-layout > :not(.wd-board-viewport),
 .game-surface[data-fullscreen] .ca-poker-level .ca-body > :not(.ca-poker-board),
 .game-surface[data-fullscreen] .pp-map-level :is(.pp-tools,.pp-hint,.pp-map-goals,.pp-title,.pp-label) { grid-column: 2; margin: 0; }
 .game-surface[data-fullscreen] .xp.wd-crossword-level .wd-crossword-level-layout > .xp-tools { margin: 0; justify-content: flex-start; }
 .game-surface[data-fullscreen] .wd-crossword-level .wd-active-clue { width: 100%; }
 .game-surface[data-fullscreen] .ca-poker-level .ca-body > .ca-poker-next { grid-row: 1; }
 .game-surface[data-fullscreen] .ca-poker-level .ca-body > .ca-poker-info { min-height: 0; }
 .game-surface[data-fullscreen] .pp-map-level > .pp-body { display: contents; }
 .game-surface[data-fullscreen] .pp-map-level > .pp-tools { grid-row: 1; }
 .game-surface[data-fullscreen] .pp-map-level .pp-map-goals { grid-row: 2; }
}

@media (min-width:720px) and (max-height:520px) and (orientation:landscape) {
 .game-surface[data-fullscreen] .game-mount.xp.la-selectable-level .la-peg-holder .la-board { padding: 4px; gap: 3px; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-fleet-viewport .lb-sum-grid { padding: 3px; gap: 2px; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-fleet-viewport :is(.lb-cell,.lb-count) { font-size: .72rem; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-model .lb-shape { width: min(100%,calc(var(--fullscreen-board) - 28px)); }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level .lb-choices .lb-choice { padding: 5px 4px; min-width: 0; min-height: 0; gap: 4px; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level .lb-choice .lb-shape { width: min(100%,70px); padding: 4px; gap: 1px; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-choices .xp-label { margin: 0; font-size: .73rem; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-layers { display: grid; grid-template-columns: 92px minmax(0,1fr); align-items: start; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-layers > .xp-note { grid-column: 1 / -1; font-size: .84rem; line-height: 1.3; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-layers .lb-height-map { width: 100%; padding: 2px; gap: 2px; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-layers .lb-height-cell { min-height: 0; font-size: .7rem; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-layers > .xp-row { margin: 0; gap: 4px; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-layers .xp-btn { min-height: 36px; padding: 4px 8px; }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-cube-views svg { width: min(95px,100%); max-height: 105px; }
 .game-surface[data-fullscreen] .wd-crossword-level .wd-crossword { gap: 2px; }
 .game-surface[data-fullscreen] .wd-crossword-level .wd-crosscell span { left: 2px; top: 0; font-size: .53rem; }
 .game-surface[data-fullscreen] .wd-crossword-level .wd-crosscell input { padding-top: 5px; font-size: .85rem; }
 .game-surface[data-fullscreen] .wd-crossword-level .wd-active-clue { padding: 6px 8px; font-size: .87rem; }
 .game-surface[data-fullscreen] .game-mount.ca-poker-level .ca-poker-board .ca-cell { padding: 0; font-size: .76rem; }
 .game-surface[data-fullscreen] .game-mount.ca-poker-level .ca-poker-board { gap: 3px; padding: 4px; }
 .game-surface[data-fullscreen] .game-mount.ca-poker-level .ca-poker-next .ca-card { min-height: 44px; padding: 4px 8px; }
 .game-surface[data-fullscreen] .game-mount.ca-poker-level .ca-poker-info { font-size: .8rem; line-height: 1.35; padding: 5px 7px; }
 .game-surface[data-fullscreen] .game-mount.pp-map-level > .pp-hint { display: none; }
 .game-surface[data-fullscreen] .game-mount.pp-map-level .pp-map-grid { gap: 2px; padding: 4px; }
 .game-surface[data-fullscreen] .game-mount.pp-map-level .pp-map-goals { margin: 0; }
 .game-surface[data-fullscreen] .game-mount.pp-map-level .pp-title { font-size: .97rem; }
 .game-surface[data-fullscreen] .game-mount.pp-map-level .pp-chip { min-height: 30px; padding: 3px 6px; }
 .game-surface[data-fullscreen] .game-mount.pp-map-level .pp-chip svg { width: 20px; height: 20px; }
 .game-surface[data-fullscreen] .game-mount.ac-bubble-level > .ac-note { display: none; }
}

/* Eighth batch game areas. */
.game-mount.xp :is(.ca-escoba-level,.pp-rhythm-level,.pp-robot-level,.cw-level) { width: 100%; min-width: 0; }
.game-mount.xp :is(.ca-escoba-level > .xp-note,.ca-escoba-level > .xp-tools,.cw-journal,.pp-rhythm-results):empty,
.game-mount.xp:has(.pp-rhythm-level,.pp-robot-level) > :is(.pp-hint,.pp-tools):empty { display: none; }
.game-mount.xp :is(.pp-rhythm-level-dock,.pp-robot-panel,.cw-level-panel,.ca-escoba-board,.ca-escoba-panel,.ca-pyramid-dock) {
 display: grid;
 align-content: start;
 gap: 8px;
 min-width: 0;
}
.game-mount.xp :is(.pp-rhythm-level,.pp-robot-level,.cw-level) { display: grid; gap: 12px; }
.game-mount.xp :is(.pp-rhythm-level,.pp-robot-level,.cw-level,.ca-escoba-level,.ca-pyramid-level) :is(.xp-tools,.pp-feedback,.pp-portrait-art,.cw-targets,.cw-controls,.cw-readout,.ca-cards) { margin-block: 0; }
.game-mount.xp :is(.pp-rhythm-level .pp-feedback,.cw-level .cw-readout) { min-height: 0; }
.game-mount.xp .pp-robot-level .pp-portrait-art { width: 100%; min-height: 140px; }
.game-mount.xp .pp-robot-level .pp-portrait-art svg { width: min(100%,230px); }
.game-mount.xp .pp-robot-ready { margin: 0; color: #1b2940; }
.game-mount.xp .pp-robot-level .pp-traits { gap: 3px; }
.game-mount.xp .pp-robot-level .pp-trait {
 grid-template-columns: minmax(63px,.85fr) 44px minmax(0,1.15fr) 44px;
 gap: 5px;
 padding: 2px 0;
}
.game-mount.xp .pp-robot-level .pp-trait-name { grid-column: auto; }
.game-mount.xp :is(.cw-level-panel > p,.pp-robot-panel > p,.ca-escoba-panel > p,.ca-escoba-group > h3) { margin: 0; }
.game-mount.xp :is(.cw-level-options,.ta-coordinates) summary { cursor: pointer; min-height: 36px; align-content: center; }
.game-mount.xp .cw-level .cw-target-label input[type=number] { color: #1b2940; background: #fff; }
.game-mount.xp .cw-level .cw-target-label input[type=range] { min-width: 0; }
.game-mount.xp .ca-escoba-group { display: grid; gap: 5px; }
.game-mount.xp .ca-escoba-group h3 { font-size: .94rem; }
.game-mount.xp .ca-escoba-group .ca-card { min-width: min(100%,68px); }
.game-mount.xp .ca-escoba-panel .ca-primary { justify-self: start; }
.game-mount.xp .ca-pyramid-level .ca-pyramid { max-width: 640px; margin-inline: auto; }
.game-mount.xp .ca-pyramid-level .ca-pyramid :is(.ca-card,.ca-card-slot) { min-height: 43px; }
.game-mount.xp .ca-pyramid-level .ca-pyramid .ca-card:disabled { opacity: .72; }
.game-mount.xp .ca-pyramid-level .ca-pyramid-waste { gap: 6px; }
.game-mount.xp .ca-pyramid-level .ca-pyramid-waste .ca-card-slot { min-height: 44px; }
.game-mount.xp.lb-selectable-level .lb-kakuro-viewport { width: min(100%,490px); margin-inline: auto; }
.game-mount.xp.lb-selectable-level .lb-kakuro-viewport .lb-sum-grid { width: 100%; margin: 0; }
.game-mount.xp.lb-selectable-level .lb-kakuro-viewport :is(.lb-cell,.lb-count),
.game-mount.xp.lb-selectable-level .lb-arrow-board .lb-cell {
 min-width: 0;
 min-height: 0;
 aspect-ratio: 1;
 padding: 0;
}
.game-mount.xp.lb-selectable-level .lb-kakuro-viewport .lb-kakuro-block { font-size: clamp(.63rem,2.5vmin,.97rem); line-height: 1.15; }
.game-mount.xp.lb-selectable-level .lb-kakuro-viewport .lb-kakuro-notes { font-size: clamp(.57rem,2vmin,.8rem); }
.game-mount.xp.lb-selectable-level .lb-arrow-viewport { width: min(100%,505px); margin-inline: auto; }
.game-mount.xp.lb-selectable-level .lb-arrow-board { width: 100%; }
.game-mount.xp.lb-selectable-level .lb-arrow-board .lb-grid { width: 100%; max-width: none; margin: 0; }
.game-mount.xp.lb-selectable-level .lb-galaxy-wrap { width: min(100%,460px); margin-inline: auto; }
.game-mount.xp.lb-selectable-level .lb-galaxy-wrap .lb-grid { width: 100%; max-width: none; }
.game-mount.xp.lb-selectable-level .lb-region-board { width: min(100%,460px); margin-inline: auto; }
.game-mount.xp.lb-selectable-level :is(.lb-galaxy-wrap,.lb-region-board) .lb-cell { min-height: 0; aspect-ratio: 1; padding: 0; }
.game-mount.xp.lb-selectable-level[data-logic-game="kakuro-pequeno"] .lb-palette {
 display: grid;
 grid-template-columns: repeat(5,minmax(0,1fr));
 gap: 4px;
}
.game-mount.xp.lb-selectable-level[data-logic-game="kakuro-pequeno"] .lb-palette .xp-btn { min-width: 0; padding-inline: 0; }
.game-mount.la-selectable-level .ta-view { min-width: 0; max-width: 100%; overflow: auto; overscroll-behavior: contain; }
.game-mount.la-selectable-level .ta-view.ta-enlarged .la-tangram { width: 650px; max-width: none; }
.game-mount.la-selectable-level .ta-number { font-size: 22px; font-weight: 700; fill: #1b2940; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.game-mount.la-selectable-level .ta-pose-state { margin: 0; font-size: .88rem; line-height: 1.35; }
.game-mount.la-selectable-level .ta-coordinates form { display: flex; flex-wrap: wrap; align-items: end; gap: 6px; }
.game-mount.la-selectable-level .ta-coordinates label { display: grid; gap: 3px; }
.game-mount.la-selectable-level .ta-coordinates input { width: 80px; min-height: 40px; }
.game-mount.la-selectable-level .ta-alignment { display: flex; min-height: 34px; align-items: center; gap: 6px; }
.game-mount.la-selectable-level .la-tangram-picker { flex-wrap: wrap; }
.game-mount.la-selectable-level .la-tangram-picks { flex: 1; min-width: 0; }
.game-mount.la-selectable-level .la-tangram-picks .xp-btn { min-width: 0; padding-inline: 8px; }

@media (max-width:420px) {
 .game-mount.xp.lb-selectable-level :is(.lb-kakuro-viewport .lb-sum-grid,.lb-arrow-board .lb-grid) { gap: 2px; padding: 3px; }
 .game-mount.xp .ca-pyramid-level .ca-pyramid .ca-card { font-size: clamp(.72rem,3.1vw,.9rem); }
 .game-mount.xp .ca-escoba-group .ca-card { min-width: 58px; min-height: 46px; }
 .game-mount.xp .pp-robot-level .pp-portrait-art svg { width: min(100%,155px); }
}
@media (min-width:1100px) {
 .game-surface[data-fullscreen] .game-mount.la-selectable-level[data-logic-game="tangram-expres"] {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
  align-items: start;
 }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level[data-logic-game="tangram-expres"] > .la-body { display: contents; }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level[data-logic-game="tangram-expres"] .la-body > * { grid-column: 2; }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level[data-logic-game="tangram-expres"] .la-body > .ta-view { grid-column: 1; grid-row: 1 / 8; }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level[data-logic-game="tangram-expres"] .la-tangram-picker { grid-row: 1; }
 .game-mount.la-selectable-level[data-logic-game="tangram-expres"] > .xp-tools { grid-column: 2; grid-row: 2; justify-content: flex-start; }
 .game-mount.xp :is(.pp-rhythm-level,.pp-robot-level,.cw-level,.ca-escoba-level .ca-body,.ca-pyramid-level .ca-body) {
  display: grid;
  grid-template-columns: minmax(0,1.6fr) minmax(0,1fr);
  gap: 16px;
  align-items: start;
 }
}
@media (min-width:720px) and (orientation:landscape) {
 .game-surface[data-fullscreen]:not([data-fullscreen-options]):is([data-game="kakuro-pequeno"],[data-game="tangram-expres"]):has(:is(.lb-selectable-level,.la-selectable-level)) > .guide-launch { display: none; }
 .game-surface[data-fullscreen] .game-mount.xp :is(.pp-rhythm-level,.pp-robot-level,.cw-level,.ca-escoba-level .ca-body,.ca-pyramid-level .ca-body) {
  display: grid;
  grid-template-columns: minmax(0,min(59%,var(--fullscreen-field))) minmax(0,min(40%,460px));
  align-items: start;
  justify-content: center;
  gap: var(--fullscreen-group-gap);
 }
 .game-surface[data-fullscreen] .game-mount.xp .pp-robot-level {
  grid-template-columns: minmax(0,min(52%,var(--fullscreen-board))) minmax(0,min(45%,470px));
 }
 .game-surface[data-fullscreen] .pp-robot-level .pp-portrait-art svg { width: min(100%,calc(var(--fullscreen-board) * .75)); }
 .game-surface[data-fullscreen] .game-mount.xp .pp-rhythm-level .pp-rhythm-canvas { width: 100%; height: auto; max-width: none; max-height: none; margin: 0; }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level[data-logic-game="tangram-expres"] {
  grid-template-columns: minmax(0,min(53%,calc(var(--fullscreen-board) * 13 / 12))) minmax(0,min(45%,480px));
 }
 .game-surface[data-fullscreen] .la-selectable-level .la-body > .ta-view {
  grid-column: 1;
  grid-row: 1 / 8;
  width: 100%;
  max-height: var(--fullscreen-board);
 }
 .game-surface[data-fullscreen] .la-selectable-level .ta-view .la-tangram { width: 100%; }
 .game-surface[data-fullscreen] .la-selectable-level .ta-view.ta-enlarged .la-tangram { width: 650px; }
 .game-surface[data-fullscreen] .la-selectable-level .la-tangram-picker { grid-row: 1; }
 .game-surface[data-fullscreen] .la-selectable-level[data-logic-game="tangram-expres"] > .xp-tools { grid-row: 2; justify-content: flex-start; }
 .game-surface[data-fullscreen] .la-selectable-level .ta-pose-state { grid-row: 3; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level:is([data-logic-game="kakuro-pequeno"],[data-logic-game="regiones-numericas"],[data-logic-game="galaxias"],[data-logic-game="flechas-de-salida"]) .lb-stage {
  grid-template-columns: minmax(0,min(55%,var(--fullscreen-board))) minmax(0,min(43%,385px));
 }
 .game-surface[data-fullscreen] .lb-selectable-level .lb-stage > :is(.lb-kakuro-viewport,.lb-galaxy-wrap,.lb-arrow-viewport) {
  grid-column: 1;
  grid-row: 1 / 10;
  width: 100%;
  margin: 0;
  align-self: start;
 }
 .game-surface[data-fullscreen] .lb-selectable-level:is([data-logic-game="kakuro-pequeno"],[data-logic-game="regiones-numericas"],[data-logic-game="galaxias"]) .lb-stage > .lb-palette { grid-row: 1; }
 .game-surface[data-fullscreen] .lb-selectable-level:is([data-logic-game="kakuro-pequeno"],[data-logic-game="regiones-numericas"],[data-logic-game="galaxias"]) .lb-stage > .lb-level-actions { grid-row: 2; }
 .game-surface[data-fullscreen] .lb-selectable-level[data-logic-game="flechas-de-salida"] .lb-stage > .an-entry-mode { grid-row: 2; }
}
@media (min-width:720px) and (max-height:520px) and (orientation:landscape) {
 .game-surface[data-fullscreen] .game-mount.xp :is(.cw-level,.pp-rhythm-level,.ca-escoba-level .ca-body,.ca-pyramid-level .ca-body) {
  grid-template-columns: minmax(0,min(59%,calc(var(--fullscreen-board) * 1.9))) minmax(0,min(43%,395px));
 }
 .game-surface[data-fullscreen] .game-mount.xp.ac .cw-level { grid-template-columns: minmax(0,min(57%,var(--fullscreen-field))) minmax(0,min(46%,360px)); }
 .game-surface[data-fullscreen] .game-mount.xp .cw-level :is(.cw-controls,.cw-targets) { gap: 4px; }
 .game-surface[data-fullscreen] .game-mount.xp .cw-level .cw-target-label input { min-height: 29px; padding-block: 3px; }
 .game-surface[data-fullscreen] .cw-level .cw-target-label { gap: 2px; }
 .game-surface[data-fullscreen] .game-mount.xp .cw-level-panel { gap: 4px; }
 .game-surface[data-fullscreen] .game-mount.xp .cw-level-panel > button { justify-self: start; }
 .game-surface[data-fullscreen] .game-mount.xp .cw-level .cw-controls button { min-height: 38px; padding-block: 4px; }
 .game-surface[data-fullscreen] .game-mount.xp .pp-robot-panel { gap: 5px; }
 .game-surface[data-fullscreen] .game-mount.xp .pp-robot-level .pp-trait { padding-block: 1px; }
 .game-surface[data-fullscreen] .cw-level .cw-readout { font-size: .79rem; line-height: 1.35; }
 .game-surface[data-fullscreen] .game-mount.xp .pp-robot-level .pp-trait .pp-btn { min-height: 31px; padding: 0 5px; }
 .game-surface[data-fullscreen] .game-mount.xp .pp-robot-level .pp-portrait-art { padding: 6px; }
 .game-surface[data-fullscreen] .game-mount.xp .pp-robot-level .pp-portrait-art svg { width: min(100%,calc(var(--fullscreen-board) * .68)); }
 .game-surface[data-fullscreen] .game-mount.xp .ca-pyramid-level .ca-pyramid { gap: 3px; padding: 1px 0; }
 .game-surface[data-fullscreen] .game-mount.xp .ca-pyramid-level .ca-pyramid :is(.ca-card,.ca-card-slot) { min-height: 0; height: clamp(25px,calc(var(--fullscreen-board) / 8),44px); padding: 0 2px; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level :is(.lb-kakuro-viewport .lb-sum-grid,.lb-arrow-board .lb-grid,.lb-region-board,.lb-galaxy-wrap .lb-grid) { gap: 2px; padding: 3px; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level :is(.lb-kakuro-viewport .lb-cell,.lb-kakuro-viewport .lb-count,.lb-arrow-board .lb-cell,.lb-region-board .lb-cell,.lb-galaxy-wrap .lb-cell) { font-size: .84rem; }
 .game-surface[data-fullscreen] .game-mount.xp.lb-selectable-level .lb-kakuro-viewport .lb-kakuro-block { font-size: .66rem; }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level[data-logic-game="tangram-expres"] > .xp-tools { gap: 4px; }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level .la-tangram-picker { margin-block: 0; }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level .la-tangram-picks { margin-block: 0; }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level .la-tangram-picks .xp-btn { min-height: 32px; padding: 3px 7px; }
 .game-surface[data-fullscreen] .game-mount.la-selectable-level[data-logic-game="tangram-expres"] > .xp-tools .xp-btn { min-height: 34px; padding-block: 3px; }
}

/* Ninth batch boards, drawing area and controls. */
.game-mount.xp .ca-tactical-level > .xp-note,
.game-mount.xp .ca-tactical-level > .xp-tools:empty { display: none; }
.game-mount.xp .ca-tactical-level :is(.ca-body,.xp-tools) { gap: 8px; margin-block: 0; }
.game-mount.xp .ca-tactical-level :is(.ca-board,.ca-boxboard,.ca-pawn-viewport) { min-width: 0; margin-inline: auto; }
.game-mount.xp .ca-tactical-level .ca-board .ca-cell { min-height: 0; padding: 0; line-height: 1; }
.game-mount.xp .ca-tactical-level .ca-level-status,
.game-mount.xp .ca-tactical-level :is(.ca-dots-last,.ca-kalah-last,.ca-kalah-prediction,.ca-pawn-status,.ca-naval-fleet) {
 margin: 0;
 text-align: start;
 line-height: 1.5;
}
.game-mount.xp .ca-tactical-level .ca-dots-board {
 grid-template-columns: repeat(7,minmax(0,1fr));
 grid-auto-rows: minmax(0,1fr);
 aspect-ratio: 1;
 padding: 4px;
}
.game-mount.xp .ca-tactical-level .ca-dots-board .ca-edge { min-width: 0; min-height: 0; font-weight: 750; }
.game-mount.xp .ca-tactical-level .ca-dots-board .ca-edge.ca-drawn { background: #d9e3dc; color: #1b2940; }
.game-mount.xp .ca-tactical-level .ca-dots-board :is(.ca-edge,.ca-dot,.ca-box) { font-size: clamp(.9rem,3.8vmin,1.4rem); line-height: 1; }
.game-mount.xp .ca-tactical-level .ca-kalah { width: 100%; margin: 0 auto; }
.game-mount.xp .ca-tactical-level .ca-pawn-legend { margin: 0; }
.game-mount.xp .ca-tactical-level .ca-walls .ca-wall-route:not(.ca-legal) { background: #ffedd7; }
.game-mount.xp .ca-naval-level .ca-naval-chart {
 gap: 3px;
 padding: 4px;
 background: #e1e8ef;
 border-color: #9caec0;
}
.game-mount.xp .ca-naval-level .ca-naval-chart .ca-cell {
 border-color: #9caec0;
 color: #1b2940;
 border-radius: 4px;
 font-size: clamp(.74rem,2.8vmin,1.15rem);
}
.game-mount.xp .ca-naval-level .ca-naval-chart .ca-sunk { background: #1b2940; color: #fff; }
.game-mount.xp .ca-naval-level .ca-naval-chart .ca-naval-marked { background: #eef2f7; outline: 1px dashed #61758a; outline-offset: -3px; }
.game-mount.xp .ca-naval-scan {
 display: grid;
 place-items: center;
 aspect-ratio: 1;
 font-size: clamp(.72rem,2.5vmin,1.1rem);
 font-weight: 750;
 color: #1b2940;
}
.game-mount.xp .ca-naval-dock { display: grid; align-content: start; gap: 8px; }
.game-mount.xp .ca-naval-dock .xp-tools { justify-content: flex-start; }
.game-mount.xp .ca-naval-dock .xp-note { text-align: start; margin: 0; }
.game-mount.xp .ca-naval-mode-active { background: #1b2940; color: #fff8ee; border-color: #1b2940; }
.game-mount.xp .ca-naval-mode-active:hover { background: #304564; color: #fff; }
.game-mount.xp.ac-tanda9-drawing .ac-drawing-level-options { min-width: 0; flex-basis: 100%; }
.game-mount.xp.ac-tanda9-drawing .ac-drawing-level-options summary { min-height: 40px; align-content: center; cursor: pointer; font-weight: 700; }
.game-mount.xp.ac-tanda9-drawing .ac-drawing-level-options .xp-tools { justify-content: flex-start; margin-block: 4px; }
.game-mount.xp.pp-tanda9-travel .pp-travel-dock { display: grid; gap: 8px; align-content: start; }
.game-mount.xp.pp-tanda9-travel .pp-travel-dock :is(.pp-tools,.pp-label) { margin: 0; }
.game-mount.xp.pp-tanda9-travel .pp-travel-dock .pp-tools { justify-content: flex-start; }
.game-mount.xp.pp-tanda9-travel .pp-travel-stage { height: clamp(230px,65vw,310px); }
.game-mount.xp.pp-tanda9-travel .pp-traveler { width: clamp(44px,9vw,58px); height: clamp(56px,13vw,76px); }

@media (max-width:420px) {
 .game-mount.xp .ca-tactical-level .ca-board { gap: 3px; padding: 4px; }
 .game-mount.xp .ca-naval-level .ca-naval-chart { gap: 2px; padding: 3px; }
 .game-mount.xp .ca-tactical-level .ca-board .ca-cell { font-size: clamp(.82rem,4vw,1.1rem); border-radius: 6px; }
 .game-mount.xp .ca-naval-level .ca-naval-chart .ca-cell { border-radius: 3px; }
}

@media (min-width:1100px), (min-width:720px) and (orientation:landscape) {
 .level-games-view .game-surface:not([data-fullscreen]) .game-mount.xp .ca-tactical-level,
 .level-games-view .game-surface:not([data-fullscreen]) .game-mount.xp.pp-tanda9-travel .pp-body,
 .game-surface[data-fullscreen] .game-mount.xp .ca-tactical-level,
 .game-surface[data-fullscreen] .game-mount.xp.pp-tanda9-travel .pp-body {
  display: grid;
  grid-template-columns: minmax(0,min(57%,420px)) minmax(0,min(41%,400px));
  grid-auto-rows: min-content;
  justify-content: center;
  align-items: start;
  gap: 8px 16px;
 }
 .game-surface .game-mount.xp .ca-tactical-level .ca-body { display: contents; }
 .game-mount.xp .ca-tactical-level > .xp-tools {
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-start;
 }
 .game-surface .game-mount.xp .ca-tactical-level .ca-body > * { grid-column: 2; min-width: 0; }
 .game-surface .game-mount.xp .ca-tactical-level .ca-body > :is(.ca-board,.ca-boxboard,.ca-pawn-viewport) {
  grid-column: 1;
  grid-row: 1 / span 8;
  width: 100%;
  max-width: none;
  align-self: start;
  margin: 0;
 }
 .game-mount.xp .ca-tactical-level .ca-pawn-viewport > .ca-board { width: 100%; margin: 0; }
 .game-mount.xp .ca-tactical-level .ca-kalah-totals { grid-column: 2; grid-row: 1; flex-wrap: wrap; }
 .game-surface[data-fullscreen] .game-mount.xp .ca-tactical-level {
  grid-template-columns: minmax(0,min(55%,var(--fullscreen-board))) minmax(0,min(43%,410px));
  gap: 8px var(--fullscreen-group-gap);
 }
 .game-surface[data-fullscreen] .game-mount.xp :is(.ca-naval-level,.ca-kalah-shell.ca-tactical-level) {
  grid-template-columns: minmax(0,min(55%,calc(var(--fullscreen-board) + 8px))) minmax(0,min(43%,410px));
 }
 .game-surface[data-fullscreen] .game-mount.xp .ca-kalah-shell.ca-tactical-level { grid-template-columns: minmax(0,min(56%,calc(var(--fullscreen-board) * 1.95))) minmax(0,min(42%,365px)); }
 .game-surface[data-fullscreen] .game-mount.xp.pp-tanda9-travel .pp-body {
  grid-template-columns: minmax(0,min(60%,var(--fullscreen-field))) minmax(0,min(38%,360px));
  gap: var(--fullscreen-group-gap);
 }
 .game-surface[data-fullscreen] .game-mount.xp.pp-tanda9-travel .pp-travel-stage { height: min(var(--fullscreen-board),420px); }
 .game-surface[data-fullscreen] .game-mount.xp.ac.ac-tanda9-drawing,
 .game-surface[data-fullscreen] .game-mount.xp.ac.ac-tanda9-pendulum {
  display: grid;
  grid-template-columns: minmax(0,min(61%,var(--fullscreen-field))) minmax(0,min(37%,380px));
  grid-auto-rows: min-content;
  justify-content: center;
  align-items: start;
  gap: 8px var(--fullscreen-group-gap);
 }
 .game-surface[data-fullscreen] .game-mount.xp.ac:is(.ac-tanda9-drawing,.ac-tanda9-pendulum) > :is(.ac-canvas,.ac-drawing-viewport) {
  grid-column: 1;
  grid-row: 1 / span 5;
  align-self: start;
  margin: 0;
 }
 .game-surface[data-fullscreen] .game-mount.xp.ac:is(.ac-tanda9-drawing,.ac-tanda9-pendulum) > :is(.ac-tools,.ac-controls) {
  grid-column: 2;
  justify-content: flex-start;
  margin: 0;
 }
 .game-surface[data-fullscreen] .game-mount.xp.ac.ac-tanda9-drawing .ac-canvas:not(.ac-drawing-zoom) { width: 100%; max-width: 100%; margin: 0; }
}

@media (min-width:720px) and (max-height:520px) and (orientation:landscape) {
 .game-surface[data-fullscreen] .game-mount.xp .ca-tactical-level .ca-board { gap: 3px; padding: 4px; }
 .game-surface[data-fullscreen] .game-mount.xp .ca-naval-level .ca-naval-chart { gap: 2px; padding: 3px; }
 .game-surface[data-fullscreen] .game-mount.xp .ca-tactical-level .ca-board .ca-cell { font-size: .86rem; border-radius: 6px; }
 .game-surface[data-fullscreen] .game-mount.xp .ca-naval-level .ca-naval-chart .ca-cell { border-radius: 3px; }
 .game-surface[data-fullscreen] .game-mount.xp.pp-tanda9-travel .pp-traveler { width: 44px; height: 56px; }
 .game-surface[data-fullscreen] .game-mount.xp.pp-tanda9-travel .pp-travel-stage::before { inset: 28px 14px; }
 .game-surface[data-fullscreen] .game-mount.xp.ac:is(.ac-tanda9-pendulum,.ac-tanda9-drawing) .ac-status { min-height: 0; }
}

/* Tenth batch card tables and hands. */
.game-mount.xp .ca-hand-level > :is(.xp-note,.xp-tools) { display: none; }
.game-mount.xp .ca-hand-level .ca-body { display: grid; align-items: start; gap: 12px; }
.game-mount.xp .ca-hand-level :is(.ca-level-field,.ca-level-hand) { display: grid; gap: 7px; min-width: 0; }
.game-mount.xp .ca-hand-level .ca-level-field {
 background: #fffaf3;
 border: 1px solid #d8c3ad;
 border-radius: 12px;
 padding: 10px;
}
.game-mount.xp .ca-hand-level .ca-heading { margin: 0; font-size: 1rem; color: #1b2940; }
.game-mount.xp .ca-hand-level .ca-level-turn {
 margin: 0;
 color: #334e43;
 font-size: .875rem;
 line-height: 1.4;
}
.game-mount.xp .ca-hand-level .ca-level-hand > .ca-cards {
 display: grid;
 grid-template-columns: repeat(4,minmax(0,90px));
 gap: 6px;
 width: 100%;
}
.game-mount.xp .ca-brisca-level .ca-level-hand > .ca-cards { grid-template-columns: repeat(3,minmax(0,96px)); }
.game-mount.xp .ca-hand-level .ca-card.ca-tactical-card {
 width: 100%;
 min-width: 0;
 max-width: none;
 min-height: 72px;
 padding: 5px 4px;
 display: grid;
 justify-items: center;
 align-content: center;
 gap: 1px;
 text-align: center;
 font-size: .85rem;
 line-height: 1.15;
 border-radius: 8px;
}
.game-mount.xp .ca-hand-level .ca-tactical-rank { font-size: clamp(.92rem,2.8vmin,1.25rem); }
.game-mount.xp .ca-hand-level .ca-tactical-suit { font-size: .77rem; text-transform: capitalize; }
.game-mount.xp .ca-hand-level .ca-tactical-advice { font-size: .65rem; line-height: 1.15; color: #694a31; }
.game-mount.xp .ca-hand-level .ca-tactical-guide:not(:disabled) { background: #fff1df; border-color: #aa622e; }
.game-mount.xp .ca-hand-level .ca-tactical-card:not(:disabled):hover { background: #ffe4c7; border-color: #a86838; }
.game-mount.xp .ca-brisca-level .ca-brisca-trump {
 display: flex;
 flex-wrap: wrap;
 align-items: baseline;
 gap: 3px 10px;
 margin: 0;
 padding: 7px 9px;
 border-radius: 7px;
 background: #1b2940;
 color: #fff8ee;
 font-size: .81rem;
 line-height: 1.3;
}
.game-mount.xp .ca-brisca-level .ca-brisca-trump span { color: #e6ebf5; }
.game-mount.xp .ca-brisca-level .ca-trick {
 gap: 8px;
 min-height: 66px;
 padding: 5px;
 border-color: #c4d0c8;
 background: #edf3ed;
}
.game-mount.xp .ca-brisca-level .ca-trick .xp-note { margin: 0 5px; text-align: start; }
.game-mount.xp .ca-brisca-level .ca-trick .ca-column { width: min(43%,94px); gap: 4px; }
.game-mount.xp .ca-brisca-level .ca-trick .ca-column .xp-label { font-size: .75rem; }
.game-mount.xp .ca-brisca-level .ca-trick .ca-tactical-card { min-height: 50px; box-shadow: none; }
@media (max-width:600px) {
 .game-surface:has(.ca-hand-level):not([data-fullscreen]) > .scoreboard { flex-wrap: nowrap; gap: 8px; }
 .game-surface:has(.ca-hand-level):not([data-fullscreen]) > .scoreboard .stats { min-width: 0; flex-wrap: nowrap; gap: 7px; }
 .game-surface:has(.ca-hand-level):not([data-fullscreen]) > .scoreboard .stat { min-width: 0; }
 .game-surface:has(.ca-hand-level):not([data-fullscreen]) > .scoreboard .stat + .stat { padding-inline-start: 7px; }
 .game-surface:has(.ca-hand-level):not([data-fullscreen]) > .scoreboard .stat-label { white-space: normal; line-height: 1.2; }
 .game-surface:has(.ca-hand-level):not([data-fullscreen]) > .scoreboard .restart { flex: none; }
}

@media (min-width:720px) and (orientation:landscape) {
 .game-surface[data-fullscreen] .game-mount.xp .ca-hand-level .ca-body {
  grid-template-columns: minmax(0,min(47%,460px)) minmax(0,min(50%,430px));
  justify-content: center;
  gap: var(--fullscreen-group-gap);
 }
}
@media (min-width:720px) and (max-height:520px) and (orientation:landscape) {
 .game-surface[data-fullscreen] .game-mount.xp .ca-hand-level .ca-level-field { padding: 7px; }
 .game-surface[data-fullscreen] .game-mount.xp .ca-hand-level .ca-card.ca-tactical-card { min-height: 62px; }
 .game-surface[data-fullscreen] .game-mount.xp .ca-brisca-level .ca-trick .ca-tactical-card { min-height: 46px; }
}

/* Catalog uses one visible heading and keeps its tools beside the list. */
.catalog-view > .catalog > .section-head {
 justify-content: flex-end;
 margin-bottom: 10px;
}
.catalog-view > .catalog { margin-top: 16px; }
@media (max-width:700px) {
 .catalog-view > .intro { padding-block: 16px 12px; margin-bottom: 0; }
 .catalog-view > .intro h1 { max-width: none; font-size: clamp(2rem,8.5vw,2.5rem); }
 .catalog-view > .intro p { margin-top: 6px; font-size: .9375rem; line-height: 1.45; }
 .catalog-view > .catalog { margin-top: 12px; }
 .catalog-view .catalog-toolbar { grid-template-columns: minmax(0,1fr) minmax(0,128px); gap: 8px; margin-bottom: 14px; }
 .catalog-view .catalog-toolbar > .category-filter:not([open]) { grid-column: 1; }
 .catalog-view .catalog-toolbar > .category-filter:not([open]) ~ .sort { grid-row: 1; }
 .catalog-view .catalog-toolbar > .reset-filters { grid-column: 1 / -1; grid-row: auto; }
 .catalog-view .category-filter > summary { padding-inline: 8px; font-size: .8125rem; }
 .catalog-view .sort { min-width: 0; padding-inline: 9px 25px; font-size: .8125rem; }
}

/* Cinquillo keeps the objective and play controls in the first view. */
.cinquillo-view .game-surface:not([data-fullscreen]) {
 display: grid;
 grid-template-columns: minmax(0,max-content) minmax(0,1fr);
 align-items: start;
 gap: 8px;
}
.cinquillo-view .game-surface:not([data-fullscreen]) > * { grid-column: 1 / -1; }
.cinquillo-view .game-surface:not([data-fullscreen]) > .quick-help:not([open]) { grid-column: 1; }
.cinquillo-view .game-surface:not([data-fullscreen]) > .game-levels:not([open]) { grid-column: 2; }
.cinquillo-view .game-surface:not([data-fullscreen]) > :is(.quick-help,.game-levels) { min-width: 0; margin: 0; }
.cinquillo-view .game-surface:not([data-fullscreen]) > .quick-help {
 display: block;
 padding: 0;
 background: #fffaf3;
 border: 1px solid var(--control-border);
 border-radius: 10px;
}
.cinquillo-view .quick-help summary {
 cursor: pointer;
 min-height: 44px;
 padding: 12px 9px;
 font-size: .8125rem;
 font-weight: 700;
}
.cinquillo-view .quick-help[open] > :not(summary) { margin-inline: 12px; }
.cinquillo-view .game-aside > .instructions { display: none; }
.cinquillo-view .game-levels { border-radius: 11px; }
.cinquillo-view .level-menu-trigger {
 min-height: 44px;
 gap: 7px;
 padding: 6px 9px;
 grid-template-columns: minmax(0,1fr) auto 9px;
 border-radius: 10px;
}
.cinquillo-view .level-menu-heading strong { font-size: .875rem; }
.cinquillo-view .level-menu-marks,
.cinquillo-view:has(.game-level-objective:not([hidden])) .level-menu-trigger .level-menu-current { display: none; }
.cinquillo-view .level-menu-total { padding-inline-start: 7px; }
.cinquillo-view .level-menu-total strong { font-size: .875rem; }
.cinquillo-view .level-menu-count-label { font-size: .6875rem; }
.cinquillo-view .game-level-objective { margin: 0; line-height: 1.4; }
.cinquillo-view .game-level-objective > * { display: block; }
.cinquillo-view .game-level-objective strong { color: var(--ink); }
.cinquillo-view .game-surface:not([data-fullscreen]) > .scoreboard {
 align-items: center;
 margin: 0;
 padding: 0;
 border: 0;
}
.cinquillo-view .game-surface:not([data-fullscreen]) > .result { margin-block: 4px 0; }
.cinquillo-view .result-level-progress { color: var(--ink); font-weight: 700; }
.cinquillo-view .result-actions .back-link { text-align: center; }

.game-mount.xp .ca-cinquillo {
 --cq-felt: #123f3b;
 --cq-suit: #1d5149;
 --cq-edge: #6f9786;
 --cq-light: #fff7ea;
 --cq-muted: #e0eee3;
}
.game-mount.xp .ca-cinquillo-level,
.game-mount.xp .ca-cinquillo:not(.ca-cinquillo-level) .ca-cq-table {
 background: var(--cq-felt);
 color: var(--cq-light);
 border-radius: 14px;
 padding: 12px;
}
.game-mount.xp .ca-cinquillo .ca-cq-table {
 grid-template-columns: repeat(2,minmax(0,1fr));
 gap: 6px;
}
.game-mount.xp .ca-cinquillo .ca-cq-suit {
 grid-template-columns: minmax(0,1fr) auto;
 align-items: center;
 gap: 2px 5px;
 min-height: 44px;
 padding: 5px 6px;
 border-color: var(--cq-edge);
 border-radius: 8px;
 background: var(--cq-suit);
 color: var(--cq-light);
}
.game-mount.xp .ca-cinquillo .ca-cq-suit[data-recent] { border-color: var(--accent); }
.game-mount.xp .ca-cinquillo .ca-cq-range {
 background: var(--cq-light);
 color: var(--ink);
 border-radius: 4px;
 padding: 1px 4px;
 font-size: .8125rem;
 line-height: 1.25;
 white-space: nowrap;
 font-variant-numeric: tabular-nums;
}
.game-mount.xp .ca-cinquillo .ca-cq-next {
 grid-column: 1 / -1;
 color: var(--cq-muted);
 font-size: .75rem;
 line-height: 1.25;
}
.ca-cq-suit-label {
 display: flex;
 align-items: center;
 gap: 4px;
 font-size: .875rem;
 line-height: 1.15;
 overflow-wrap: anywhere;
}
.ca-cq-mark {
 display: inline-block;
 flex: none;
 position: relative;
 width: 13px;
 height: 13px;
 color: #ffd5aa;
}
.ca-cq-mark::before,.ca-cq-mark::after { content: ""; position: absolute; }
.ca-cq-mark[data-suit="0"]::before { inset: 1px; border: 1.5px solid currentColor; border-radius: 50%; }
.ca-cq-mark[data-suit="0"]::after { inset: 5px; border-radius: 50%; background: currentColor; }
.ca-cq-mark[data-suit="1"]::before { inset: 1px 2px 5px; border: 1.5px solid currentColor; border-radius: 1px 1px 5px 5px; }
.ca-cq-mark[data-suit="1"]::after { bottom: 0; left: 3px; width: 7px; height: 5px; border-bottom: 1.5px solid currentColor; background: linear-gradient(currentColor,currentColor) center / 1.5px 100% no-repeat; }
.ca-cq-mark[data-suit="2"] { transform: rotate(32deg); }
.ca-cq-mark[data-suit="2"]::before { inset: 0 5px 0; background: currentColor; border-radius: 80% 80% 1px 1px; }
.ca-cq-mark[data-suit="2"]::after { left: 2px; right: 2px; bottom: 4px; border-top: 1.5px solid currentColor; }
.ca-cq-mark[data-suit="3"] { transform: rotate(34deg); }
.ca-cq-mark[data-suit="3"]::before { inset: 0 4px 0; background: currentColor; border-radius: 70% 70% 45% 45%; }
.ca-cq-mark[data-suit="3"]::after { left: 5px; top: 2px; width: 3px; border-top: 1px solid var(--cq-suit); }
.game-mount.xp .ca-cinquillo-level { gap: 8px; }
.game-mount.xp .ca-cinquillo-level .ca-body { gap: 9px; }
.game-mount.xp .ca-cinquillo-level .ca-level-field {
 padding: 0;
 border: 0;
 background: transparent;
}
.game-mount.xp .ca-cinquillo-level .ca-heading { color: var(--cq-light); }
.ca-cq-table-heading {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 gap: 8px;
}
.ca-cq-table-heading .ca-heading { flex: none; }
.game-mount.xp .ca-cinquillo-level .ca-level-hand > .ca-cards { display: flex; align-items: stretch; }
.game-mount.xp .ca-cinquillo-level .ca-level-hand > .xp-btn { justify-self: start; }
.game-mount.xp .ca-cinquillo-level .ca-card.ca-cq-card {
 position: relative;
 align-content: center;
 padding-block: 12px 6px;
 flex: 0 0 clamp(66px,20vw,86px);
 min-height: 74px;
 border-color: #bdad94;
 border-radius: 9px;
 background: var(--cq-light);
 color: var(--ink);
 box-shadow: 0 2px 5px #081f1b55;
}
.ca-cq-card .ca-cq-mark { position: absolute; top: 5px; right: 5px; color: #78401e; }
.ca-cq-card .ca-cq-mark[data-suit="3"]::after { border-color: var(--cq-light); }
.game-mount.xp .ca-cinquillo-level .ca-cq-card .ca-tactical-rank { font-size: 1.125rem; }
.game-mount.xp .ca-cinquillo-level .ca-cq-card .ca-tactical-advice {
 background: var(--accent);
 color: var(--ink);
 border-radius: 4px;
 padding: 2px 4px;
 margin-top: 2px;
 font-weight: 700;
}
.game-mount.xp .ca-cinquillo-level .ca-cq-card.ca-tactical-guide:not(:disabled) { border: 2px solid var(--accent); }
.game-mount.xp .ca-cinquillo-level .ca-cq-card:not(:disabled):hover { background: #ffead1; }
.game-mount.xp .ca-cinquillo-level .ca-cq-card:disabled { background: #dce4dc; color: #2e4842; }
.game-mount.xp .ca-cinquillo-level .ca-cq-card:focus-visible {
 outline: 3px solid #fff5df;
 outline-offset: 3px;
}
.game-mount.xp .ca-cinquillo-level .ca-cq-status {
 margin: 0;
 color: var(--cq-muted);
 font-size: .8125rem;
 line-height: 1.35;
 text-align: end;
}

@media (max-width:640px) {
 .header:has(+main:is(.cinquillo-view,.classic-board-view,.word-puzzle-view,.board-first-view)) {
  grid-template-columns: clamp(86px,26vw,104px) minmax(0,1fr) 44px;
  gap: 4px 7px;
  align-items: center;
  padding-top: 8px;
 }
 .header:has(+main:is(.cinquillo-view,.classic-board-view,.word-puzzle-view,.board-first-view)) .brand { grid-column: 1; grid-row: 1; min-height: 44px; }
 .header:has(+main:is(.cinquillo-view,.classic-board-view,.word-puzzle-view,.board-first-view)) .brand img { width: 100%; }
 .header:has(+main:is(.cinquillo-view,.classic-board-view,.word-puzzle-view,.board-first-view)) .search { grid-column: 2; grid-row: 1; margin: 0; }
 .header:has(+main:is(.cinquillo-view,.classic-board-view,.word-puzzle-view,.board-first-view)) .search input { padding-inline: 0 4px; font-size: .875rem; }
 .header:has(+main:is(.cinquillo-view,.classic-board-view,.word-puzzle-view,.board-first-view)) .search-submit { width: 44px; }
 .header:has(+main:is(.cinquillo-view,.classic-board-view,.word-puzzle-view,.board-first-view)) .icon-button { grid-column: 3; grid-row: 1; }
 .header:has(+main:is(.cinquillo-view,.classic-board-view,.word-puzzle-view,.board-first-view)) nav { grid-row: 2; }
 .cinquillo-view .game-top { gap: 7px; margin: 0; }
 .cinquillo-view .game-top .back-link { margin-block: 0; }
 .cinquillo-view .game-top .favorite-game { padding-inline: 8px; font-size: .75rem; max-width: 52%; }
 .cinquillo-view .game-heading { margin-bottom: 8px; }
 .cinquillo-view .game-heading h1 { font-size: clamp(1.75rem,8vw,2.25rem); }
 .cinquillo-view:has(.game-level-objective:not([hidden])) .game-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
 }
 .cinquillo-view:has(.game-level-objective:not([hidden])) .game-heading p { display: none; }
 .cinquillo-view:has(.game-level-objective:not([hidden])) .game-heading-actions { margin-top: 0; }
 .cinquillo-view .game-heading .game-fullscreen-button {
  max-width: none;
  white-space: nowrap;
  padding-inline: 8px;
  font-size: .75rem;
 }
 .cinquillo-view .game-surface:not([data-fullscreen]) { gap: 6px; padding: 8px; }
 .cinquillo-view .game-level-objective { padding-inline: 3px; font-size: .84375rem; }
 .cinquillo-view .scoreboard .restart { padding-inline: 8px; }
 .cinquillo-view .scoreboard .stats { padding-inline-start: 3px; }
 .cinquillo-view .scoreboard .stat strong { font-size: 1.15rem; }
 .cinquillo-view .scoreboard .stat-label { font-size: .625rem; letter-spacing: 0; }
 .game-mount.xp .ca-cinquillo-level { padding: 8px; gap: 6px; }
 .game-mount.xp .ca-cinquillo-level .ca-body { gap: 6px; }
 .game-mount.xp .ca-cinquillo-level :is(.ca-level-field,.ca-level-hand) { gap: 4px; }
 .game-mount.xp .ca-cinquillo .ca-cq-suit { column-gap: 3px; padding-inline: 4px; }
 .game-mount.xp .ca-cinquillo .ca-cq-range { padding-inline: 2px; font-size: .75rem; }
 .game-mount.xp .ca-cinquillo-level .ca-card.ca-cq-card { padding-block: 9px 4px; }
 .ca-cq-suit-label { font-size: .75rem; column-gap: 2px; }
 .ca-cq-suit-label > span:not(.ca-cq-mark,.sr-only) { white-space: nowrap; }
}
@media (max-width:360px) {
 .ca-cq-suit-label > .ca-cq-mark { display: none; }
}

/* Classic games with a board and a directional pad. */
.classic-board-view .classic-objective {
 margin: 0;
 color: var(--ink);
 font-size: .9375rem;
 line-height: 1.4;
}
.classic-board-view .game-surface:not([data-fullscreen]) > .scoreboard {
 margin-block: 8px 10px;
 padding: 0 0 6px;
 align-items: center;
}
.classic-board-view .game-surface:not([data-fullscreen]) > .quick-help {
 display: block;
 margin: 12px 0 8px;
 padding: 0;
 border-bottom: 1px solid var(--warm-line);
}
.classic-board-view .quick-help summary { min-height: 44px; padding-block: 11px; cursor: pointer; font-weight: 700; }
.classic-board-view .quick-help > p { margin-bottom: 10px; }
.classic-board-view .game-aside > .instructions { display: none; }
.classic-board-view .game-message:empty { display: none; }
.classic-board-view .game-surface:not([data-fullscreen]) > .game-mount { gap: 8px; }
.classic-board-view .control-button {
 min-width: 44px;
 min-height: 44px;
 padding: 0;
 color: var(--ink);
 background: #fffcf7;
 border-color: var(--control-border);
 font-size: 1.375rem;
 line-height: 1;
 touch-action: manipulation;
}
.classic-board-view .control-button:is(:active,:hover) { background: var(--accent); }
.classic-board-view :is(.control-button,.snake-canvas,.merge-board):focus-visible {
 outline: 3px solid #1b2940;
 outline-offset: 3px;
}

/* Serpiente. The field is drawn at its native 20 by 20 grid. */
.snake-classic .snake-canvas { background: #142336; border-color: #2a3b50; }
.snake-classic .snake-canvas[data-state="Pausa"] { border-color: #9c5930; }
.classic-board-view .game-surface:not([data-fullscreen]) > .snake-classic {
 display: grid;
 grid-template-columns: minmax(0,1fr) auto;
 width: min(100%,384px);
 margin-inline: auto;
 gap: 8px;
 align-items: center;
}
.classic-board-view .game-surface:not([data-fullscreen]) .snake-classic > .snake-area { grid-column: 1 / -1; }
.classic-board-view .game-surface:not([data-fullscreen]) .snake-classic > .primary {
 min-height: 44px;
 padding: 6px 4px;
 font-size: .8125rem;
 touch-action: manipulation;
}
.classic-board-view .game-surface:not([data-fullscreen]) .snake-classic > .direction-pad {
 display: grid;
 grid-template-columns: repeat(4,44px);
 gap: 4px;
}
.classic-board-view .game-surface:not([data-fullscreen]) .snake-classic > .secondary {
 grid-column: 1 / -1;
 justify-self: start;
 font-size: .875rem;
}

/* 2048. The table and all values use a warm palette with dark figures. */
.merge-classic > .merge-move {
 margin: 0;
 color: #603b28;
 font-size: .875rem;
 font-weight: 700;
 line-height: 1.4;
}
.merge-layout .merge-board {
 container-type: inline-size;
 background: #84684f;
 border-color: #725640;
 border-radius: 12px;
 padding: 6px;
 gap: 5px;
}
.merge-layout .merge-tile:not([data-value="stone"]) {
 min-width: 0;
 border-radius: 6px;
 background: #f4c38b;
 color: #3b281f;
 font-size: clamp(.5rem,min(10cqi,calc(28cqi / var(--digits,1))),2.75rem);
 font-variant-numeric: tabular-nums;
 line-height: 1;
}
.merge-layout .merge-tile[data-value="0"] { background: #aa9077; }
.merge-layout .merge-tile[data-value="2"] { background: #fff9ec; }
.merge-layout .merge-tile[data-value="4"] { background: #f7e6cb; }
.merge-layout .merge-tile[data-value="8"] { background: #ffdaa7; }
.merge-layout .merge-tile[data-value="16"] { background: #ffd19b; }
.merge-layout .merge-tile[data-value="32"] { background: #f7bda0; }
.merge-layout .merge-tile[data-value="64"] { background: #eeaa86; }
.merge-layout .merge-tile[data-value="128"] { background: #fbd28f; }
.merge-layout .merge-tile[data-value="256"] { background: #f5c47a; }
.merge-layout .merge-tile[data-value="512"] { background: #efb569; }
.merge-layout .merge-tile[data-value="1024"] { background: #f6d673; }
.merge-layout .merge-tile[data-value="2048"] { background: #ffca62; }
.merge-layout .merge-tile[data-value="4096"] { background: #eda575; }
.merge-layout .merge-tile[data-value="8192"] { background: #e9a482; }
.merge-layout .merge-joined { outline-color: #5b361e; }
.classic-board-view .game-surface:not([data-fullscreen]) .merge-layout.merge-classic {
 width: min(100%,384px);
 grid-template-columns: minmax(0,1fr);
 gap: 8px;
}
.classic-board-view .game-surface:not([data-fullscreen]) .merge-classic .direction-pad {
 display: grid;
 grid-template-columns: repeat(4,minmax(44px,1fr));
 gap: 6px;
}

/* Parejas uses the same four-by-four tray for the daily and classic decks. */
.memory-view .game-heading .memory-date { margin: 4px 0 0; color: var(--muted); font-weight: 700; }
.memory-view .game-surface > .game-message {
 margin: 0 0 6px;
 color: var(--ink);
 font-size: .875rem;
 line-height: 1.4;
 text-align: start;
 font-weight: 700;
}
.memory-view .memory-save-note { margin: 8px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.memory-board.memory-showcase {
 container-type: inline-size;
 width: 100%;
 padding: clamp(7px, 1.2vw, 13px);
 gap: clamp(6px, .7vw, 10px);
 background: #f3e6d5;
 border: 1px solid #cbb299;
 border-radius: 12px;
}
.level-games-view .game-surface:not([data-fullscreen]) .memory-board.memory-showcase { max-width: 420px; }
.memory-showcase .memory-tile {
 position: relative;
 padding: 0;
 border: 1px solid var(--ink);
 border-radius: 8px;
 color: var(--accent);
 background: var(--ink);
 box-shadow: 0 2px 4px #1b294026;
 font: 700 clamp(1.5rem, 10cqi, 2.75rem)/1 'Segoe UI Symbol', Arial, sans-serif;
 touch-action: manipulation;
}
.memory-showcase .memory-tile:not(.flipped)::before {
 position: absolute;
 inset: 4px;
 border: 1px solid #718199;
 border-radius: 5px;
 content: '';
 pointer-events: none;
}
.memory-showcase .memory-mark { width: 49%; height: auto; max-width: 37px; }
.memory-showcase .memory-tile.flipped { background: #fffaf3; border-color: #92795f; color: var(--ink); }
.memory-showcase .memory-tile.memory-picked { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.memory-showcase .memory-tile.memory-picked::after {
 position: absolute;
 inset: 6px 6px auto auto;
 width: 6px;
 height: 6px;
 border-radius: 50%;
 background: var(--ink);
 content: '';
}
.memory-showcase .memory-tile.memory-miss { border-color: var(--danger); border-style: dashed; }
.memory-showcase .memory-tile.matched {
 border: 1px solid #456954;
 background: #e3ede5;
 color: #294536;
 box-shadow: inset 0 0 0 1px #456954;
 outline: 0;
}
.memory-showcase .memory-tile.matched::after {
 position: absolute;
 inset: 6px 8px auto auto;
 width: 6px;
 height: 10px;
 border: solid currentColor;
 border-width: 0 2px 2px 0;
 transform: rotate(42deg);
 content: '';
}
.memory-showcase .memory-tile:focus-visible {
 z-index: 1;
 outline: 3px solid var(--focus);
 outline-offset: 2px;
}
.memory-showcase .memory-tile:hover:not(:disabled) { transform: none; }
.result-actions > .result-catalog-return { margin: 0; text-align: center; }
@media (prefers-reduced-motion: reduce) {
 .memory-showcase .memory-tile { transition: none; }
}

@media (max-width:640px) {
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-top { gap: 7px; margin: 0; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-top .back-link { margin: 0; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-top .favorite-game { max-width: 52%; padding-inline: 8px; font-size: .75rem; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-heading h1 { font-size: clamp(1.75rem,8vw,2.25rem); }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-heading p { display: none; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-heading-actions { margin: 0; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-heading .game-fullscreen-button { max-width: none; white-space: nowrap; padding-inline: 8px; font-size: .75rem; }
 .word-puzzle-view .game-heading-actions { flex: none; }
 .word-puzzle-view .game-heading .game-fullscreen-button { max-width: 7.25rem; white-space: normal; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-surface:not([data-fullscreen]) { padding: 8px; }
 .word-puzzle-view .game-surface:not([data-fullscreen]) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 6px;
 }
 .word-puzzle-view .game-surface:not([data-fullscreen]) > * { grid-column: 1 / -1; }
 .word-puzzle-view .game-surface:not([data-fullscreen],:has(> details[open])) > .quick-help { grid-column: 1; }
 .word-puzzle-view .game-surface:not([data-fullscreen],:has(> details[open])) > .game-levels { grid-column: 2; }
 .word-puzzle-view .game-surface:not([data-fullscreen]) > :is(.quick-help,.game-levels) { min-width: 0; margin: 0; }
 .word-puzzle-view .game-surface:not([data-fullscreen]) > .quick-help {
  padding: 0;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: #fffaf3;
 }
 .word-puzzle-view .quick-help summary { padding: 11px 8px; font-size: .8125rem; }
 .word-puzzle-view .quick-help[open] > :not(summary) { margin-inline: 10px; }
 .word-puzzle-view .level-menu-trigger { min-height: 44px; gap: 6px; padding: 5px 7px; grid-template-columns: minmax(0, 1fr) auto 8px; }
 .word-puzzle-view .level-menu-heading strong { font-size: .8125rem; }
 .word-puzzle-view .level-menu-current { font-size: .6875rem; }
 .word-puzzle-view .level-menu-marks { display: none; }
 .word-puzzle-view .level-menu-total { padding-inline-start: 6px; }
 .word-puzzle-view .level-menu-count-label { font-size: .625rem; }
 .word-puzzle-view .game-level-objective { margin: 0 2px; line-height: 1.4; }
 .memory-view .game-heading-actions { flex: none; }
 .memory-view .game-heading .game-fullscreen-button { max-width: 7.25rem; white-space: normal; }
 .memory-view .game-heading .memory-date { display: block; font-size: .8125rem; line-height: 1.3; }
 .memory-view .scoreboard { column-gap: 8px; }
 .classic-board-view .classic-objective { font-size: .8375rem; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .game-surface:not([data-fullscreen]) > .scoreboard { margin-block: 5px 6px; padding-bottom: 4px; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .scoreboard .stat { min-width: 0; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .scoreboard .stat strong { font-size: 1.125rem; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .scoreboard .stat-label { font-size: .625rem; }
 :is(.classic-board-view,.word-puzzle-view,.board-first-view) .scoreboard .restart { padding-inline: 8px; }
}
@media (max-width:300px) {
 .classic-board-view .game-surface:not([data-fullscreen]) :is(.snake-classic > .primary,.snake-classic > .direction-pad) { grid-column: 1 / -1; }
}
@media (min-width:720px) and (orientation:landscape) {
 .game-surface[data-fullscreen] .merge-classic > .merge-move { grid-column: 2; grid-row: 3; align-self: start; }
}
@media (prefers-reduced-motion:reduce) {
 .merge-classic .merge-tile { transition: none; }
}

/* Shared reading order and focus for the four logic boards. */
.board-first-view .board-objective { margin: 0; color: var(--ink); font-size: .9375rem; line-height: 1.4; }
.board-first-view .game-surface > .game-message { margin: 0 0 8px; color: var(--ink); text-align: start; font-weight: 700; }
.board-first-view .game-surface > .game-message:empty { margin: 0; min-height: 0; }
.board-first-view .game-mount :is(.mines-board,.lights-board,.tic-design,.connect-board,.fifteen-board,.sudoku-board,.color-board,.simon-board) .tile {
 position: relative;
 touch-action: manipulation;
}
.board-first-view .game-mount :is(.mines-board,.lights-board,.tic-design,.connect-board,.fifteen-board,.sudoku-board,.color-board,.simon-board) .tile:focus-visible {
 z-index: 2;
 outline: 3px solid var(--focus);
 outline-offset: -4px;
}
.board-first-view .game-mount :is(.mines-board,.lights-board,.tic-design,.connect-board,.fifteen-board,.sudoku-board,.color-board,.simon-board) .tile:hover:not(:disabled) { transform: none; }
.board-first-view :is(.mine-example,.tic-modes-menu) summary { min-height: 44px; }

/* Numbered 2048 and Snake keep their boards and touch controls together. */
@media (max-width: 430px) {
 .board-first-view .game-surface[data-game="serpiente"]:not([data-level="0"],[data-fullscreen]) > .game-mount {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  width: min(100%,300px);
  margin-inline: auto;
  gap: 8px;
 }
 .board-first-view .game-surface[data-game="serpiente"]:not([data-level="0"],[data-fullscreen]) .snake-area {
  grid-column: 1 / -1;
 }
 .board-first-view .game-surface:is([data-game="2048"],[data-game="serpiente"]):not([data-level="0"],[data-fullscreen])
   :is(.merge-layout,.game-mount) > .direction-pad {
  display: grid;
  grid-template-columns: repeat(4,44px);
  justify-content: center;
  gap: 5px;
 }
 .board-first-view .game-surface:is([data-game="2048"],[data-game="serpiente"]):not([data-level="0"],[data-fullscreen])
   .direction-pad > .control-button {
  grid-column: auto;
  grid-row: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  color: var(--ink);
  background: #fffcf7;
  border-color: var(--control-border);
  touch-action: manipulation;
 }
 .board-first-view .game-surface[data-game="serpiente"]:not([data-level="0"],[data-fullscreen]) .snake-area {
  width: min(100%,300px,max(210px,calc(100dvh - 386px)));
  margin-inline: auto;
 }
 .board-first-view .game-surface[data-game="2048"]:not([data-level="0"],[data-fullscreen]) .merge-layout {
  width: min(100%,300px,max(210px,calc(100dvh - 402px)));
  margin-inline: auto;
 }
 .board-first-view .game-surface[data-game="serpiente"]:not([data-level="0"],[data-fullscreen]) .game-mount > .primary {
  min-height: 44px;
  padding: 6px 4px;
  margin-block: 0;
  font-size: .8125rem;
 }
}

/* Buscaminas. The covered field has raised squares and the clues sit flat. */
.board-first-view .mine-tools { display: grid; width: min(100%, 440px); grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.board-first-view .mine-mode { grid-column: 1 / -1; text-align: start; font-size: .875rem; }
.board-first-view .mine-tools .secondary { min-height: 44px; padding: 5px 4px; font-size: .8125rem; line-height: 1.25; }
.board-first-view .game-surface:not([data-fullscreen]) .mines-board { max-width: 440px; }
.board-first-view .mines-board {
 container-type: inline-size;
 padding: 4px;
 gap: 2px;
 border: 1px solid #a88768;
 border-radius: 8px;
 background: #ead7c1;
}
.board-first-view .game-mount .mines-board .tile {
 border: 1px solid #9c7b5e;
 border-radius: 3px;
 background: #ead0ae;
 box-shadow: inset 0 -2px 0 #b99572;
 color: var(--ink);
 font: 700 clamp(.9375rem, calc(46cqi / var(--cols)), 1.55rem)/1 'Segoe UI Symbol', Arial, sans-serif;
}
.board-first-view .game-mount .mines-board .tile.revealed { background: #fffaf3; border-color: #d8c2ad; box-shadow: none; }
.board-first-view .game-mount .mines-board .tile[data-number="1"] { color: #254a6e; }
.board-first-view .game-mount .mines-board .tile[data-number="2"] { color: #2a5d48; }
.board-first-view .game-mount .mines-board .tile[data-number="3"] { color: #8b392b; }
.board-first-view .game-mount .mines-board .tile.mine-flag { background: #ffdfbf; border: 2px dashed #713b21; color: #713b21; box-shadow: none; }
.board-first-view .game-mount .mines-board .tile.mine-doubt { background: #fff4de; border: 2px dotted #713b21; color: #713b21; box-shadow: none; }
.board-first-view .game-mount .mines-board .tile.mine-hit { background: #f9e1d8; border-color: #bd8172; color: #802f2c; }
.board-first-view .game-mount .mines-board .tile.mine-detonated { background: #842f2b; border-color: #842f2b; color: #fff7ea; box-shadow: inset 0 0 0 2px #fff7ea; }

/* Luces fuera. Lit switches have a filled centre. Unlit ones show a dash. */
.board-first-view .lights-board { background: #31464c; border-color: #31464c; padding: 7px; gap: 6px; }
.board-first-view .game-mount .lights-board .tile { background: #eff3ef; border: 1px solid #6f8182; box-shadow: none; }
.board-first-view .game-mount .lights-board .tile.lit { background: #ffe1aa; border-color: #755130; }
.board-first-view .lights-board .tile::before {
 content: '';
 position: absolute;
 inset: 27%;
 border: 2px solid #52686b;
 border-radius: 50%;
}
.board-first-view .lights-board .tile.lit::before { background: #f8c776; border-color: #68401f; box-shadow: inset 0 0 0 2px #fff4df; }
.board-first-view .lights-board .tile::after { content: ''; width: 16%; height: 2px; border-radius: 1px; background: #395054; z-index: 1; }
.board-first-view .lights-board .tile.lit::after { width: 14%; height: 14%; border-radius: 50%; background: #68401f; }
.board-first-view .lights-board .tile:focus-visible { outline-color: #16343a; }

/* Tres en raya. In a continuous grid the winning stroke meets each centre. */
.board-first-view .tic-design {
 position: relative;
 gap: 0;
 border: 1px solid #ad8c73;
 border-radius: 10px;
 background: #e8d2be;
}
.board-first-view .game-mount .tic-design .tile {
 padding: 0;
 border: 0;
 border-inline-end: 1px solid #bd9e84;
 border-block-end: 1px solid #bd9e84;
 border-radius: 0;
 background: #fffaf2;
 color: var(--ink);
 box-shadow: none;
 font-family: 'Segoe UI Symbol', Arial, sans-serif;
}
.board-first-view .game-mount .tic-design .tile:nth-child(3n) { border-inline-end: 0; }
.board-first-view .game-mount .tic-design .tile:nth-last-child(-n+3) { border-block-end: 0; }
.board-first-view .game-mount .tic-design .tile[data-player="2"] { color: #903e24; }
.board-first-view .game-mount .tic-design .tile.tic-winning { background: #ffdfb7; box-shadow: none; }
.board-first-view .tic-design.tic-line::after {
 position: absolute;
 top: var(--tic-line-y);
 left: var(--tic-line-x);
 width: var(--tic-line-length);
 height: 3px;
 border-radius: 2px;
 background: #843d20;
 transform-origin: left center;
 transform: translateY(-50%) rotate(var(--tic-line-angle));
 z-index: 1;
 pointer-events: none;
 content: '';
}
.board-first-view .tic-design.tic-losing-line::after { background: var(--danger); }

/* Cuatro en línea. The top chevrons and dashed landing rings mark legal columns. */
.board-first-view .connect-board { background: #254440; border-color: #254440; }
.board-first-view .game-mount .connect-board .tile { background: #142f2c; border: 1px solid #688d81; color: #f8fffa; box-shadow: none; }
.board-first-view .game-mount .connect-board .tile[data-player="1"] { background: #ffc590; border-color: #7a472c; color: #59331e; }
.board-first-view .game-mount .connect-board .tile[data-player="2"] { background: #e1edb5; border-color: #587248; color: #314624; }
.board-first-view .connect-board .tile:is([data-player="1"],[data-player="2"],.connect-entry)::after { width: 21%; height: 21%; content: ''; }
.board-first-view .connect-board .tile[data-player="1"]::after { border-radius: 50%; background: currentColor; }
.board-first-view .connect-board .tile[data-player="2"]::after { border: 2px solid currentColor; border-radius: 1px; transform: rotate(45deg); }
.board-first-view .connect-board .tile.connect-entry::after { border: solid #ddf3e6; border-width: 0 2px 2px 0; transform: translateY(-18%) rotate(45deg); }
.board-first-view .connect-board .tile.connect-column-focus { outline: none; border-color: #b3cec4; }
.board-first-view .connect-board .tile.connect-landing { outline: 2px dashed #bdddcf; outline-offset: -4px; }
.board-first-view .connect-board .tile.connect-last { box-shadow: inset 0 0 0 2px currentColor; }
.board-first-view .connect-board .tile.connect-win { outline: 3px double currentColor; outline-offset: -5px; }
.board-first-view .game-mount .connect-board .tile:focus-visible { outline-color: #fff4e3; outline-offset: 1px; }

.memory-result-totals { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin: 12px 0; }
.result .memory-result-totals .result-score { margin: 0; font-size: clamp(1.125rem, 4.8vw, 1.5rem); }
.memory-result-moves { color: var(--ink); font-size: .9375rem; }

@media (max-width:640px) {
 .board-first-view .game-heading-actions { flex: none; }
 .board-first-view .game-heading .game-fullscreen-button { max-width: 7.25rem; white-space: normal; }
 .board-first-view .game-surface:not([data-fullscreen]) > .quick-help { margin-block: 6px; }
 .board-first-view .game-level-objective { margin-block: 0 6px; }
 .board-first-view .board-objective { font-size: .875rem; }
 .board-first-view .game-surface > .game-message { font-size: .875rem; }
 .board-first-view .scoreboard { gap: 6px; }
 .board-first-view .scoreboard .stats { gap: 7px; }
 .board-first-view .scoreboard .stat + .stat { padding-inline-start: 7px; }
}

/* Quince. The tray makes space for the gap and a dot indicates a legal slide. */
.board-first-view .fifteen-guide { width: 100%; margin: 0 0 5px; text-align: center; font-size: .875rem; color: var(--ink); }
.board-first-view .fifteen-board { background: #dbc0a1; border: 1px solid #9d7959; padding: 7px; gap: 5px; border-radius: 12px; }
.board-first-view .game-mount .fifteen-board .tile {
 border: 1px solid #aa896c;
 border-radius: 6px;
 background: #fff5e7;
 box-shadow: inset 0 -2px 0 #ddc8b3;
 color: var(--ink);
 opacity: 1;
 font: 750 clamp(1.35rem, 6vw, 2rem)/1 var(--display, sans-serif);
 font-variant-numeric: tabular-nums;
}
.board-first-view .game-mount .fifteen-board .tile.empty { background: #ad8563; border: 1px dashed #604936; box-shadow: inset 0 2px 4px #60493655; }
.board-first-view .game-mount .fifteen-board .tile.fifteen-movable:not(:disabled) { border-color: #755538; }
.board-first-view .fifteen-board .fifteen-movable:not(:disabled)::after { content: ''; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: #70492b; }

/* Mini sudoku. Printed clues, entries and wavy conflict marks. */
.board-first-view .sudoku-board { border: 2px solid #6a5546; background: #e8d7c7; border-radius: 8px; }
.board-first-view .game-surface:not([data-fullscreen]) .sudoku-board { max-width: 384px; }
.board-first-view .game-surface:not([data-fullscreen]) .game-mount:has(> .sudoku-board) { gap: 5px; }
.board-first-view .game-mount .sudoku-board .tile {
 border: 0;
 border-inline-end: 1px solid #ccb49d;
 border-block-end: 1px solid #ccb49d;
 background: #fffaf1;
 color: #1e4961;
 font-size: clamp(1.5rem, 7vw, 2.25rem);
 font-variant-numeric: tabular-nums;
}
.board-first-view .game-mount .sudoku-board .tile:nth-child(4n+2) { border-inline-end: 2px solid #6a5546; }
.board-first-view .game-mount .sudoku-board .tile:nth-child(n+5):nth-child(-n+8) { border-block-end: 2px solid #6a5546; }
.board-first-view .game-mount .sudoku-board .tile.given { background: #efdfcf; color: var(--ink); }
.board-first-view .game-mount .sudoku-board .tile:not(.given):not(:empty) { text-decoration: underline; text-underline-offset: .14em; }
.board-first-view .game-mount .sudoku-board .tile.chosen { background: #ffead3; box-shadow: inset 0 0 0 2px #765033; }
.board-first-view .game-mount .sudoku-board .tile.conflict { background: #fae0d9; color: #882e2a; text-decoration: underline wavy; }
.board-first-view .game-mount .sudoku-board .tile.chosen:focus-visible { outline-offset: -6px; }
.board-first-view .number-pad { width: 100%; margin: 4px 0; gap: 5px; }
.board-first-view .number-pad > :is(button,.secondary) { min-height: 44px; min-width: 44px; }
.board-first-view .number-pad > .secondary { padding-inline: 9px; }

/* Color intruso. The previous choice is shown separately from the samples. */
.board-first-view .game-surface:not([data-fullscreen]) .intruder-game { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.board-first-view .game-surface:not([data-fullscreen]) .intruder-game > * { grid-column: 1 / -1; }
.board-first-view .game-surface:not([data-fullscreen]) .intruder-game > .intruder-feedback { grid-column: 1; }
.board-first-view .game-surface:not([data-fullscreen]) .intruder-game > .intruder-controls { grid-column: 2; align-self: center; margin: 0; }
.board-first-view .intruder-controls:not(:has(button:not([hidden]))) { display: none; }
.board-first-view .intruder-controls .primary { min-height: 44px; padding-inline: 10px; }
.board-first-view .intruder-feedback { display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; padding: 5px 7px; border: 1px solid transparent; border-radius: 7px; }
.board-first-view .intruder-feedback[data-answer="correct"] { border-color: #467363; background: #e9f1e9; }
.board-first-view .intruder-feedback[data-answer="wrong"] { border-color: #99584b; background: #ffede3; }
.board-first-view .intruder-feedback .intruder-notice { min-height: 0; margin: 0; font-size: .875rem; line-height: 1.35; color: var(--ink); text-align: start; }
.board-first-view .intruder-choice { flex: 0 0 25px; height: 25px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 4px; background: #fffaf1; font-weight: 700; }
.board-first-view .color-board { padding: 6px; gap: 5px; border: 1px solid #aa8e75; background: #fff7ec; }
.board-first-view .game-mount .color-board .tile { min-height: 0; padding: 0; border: 1px solid #1b294039; border-radius: 5px; box-shadow: none; }
.board-first-view .color-board .tile:has(.intruder-penalty) { outline: 2px solid #fff9f0; outline-offset: -5px; }
.board-first-view .color-board .intruder-penalty { border-radius: inherit; font-size: clamp(.8125rem, 4vw, 1rem); white-space: nowrap; }
.board-first-view .color-board.paused { opacity: .55; }

/* Reflejos. The button keeps its footprint while the signal changes. */
.board-first-view .reaction-game .reaction-target {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 13px;
 min-height: 0;
 block-size: clamp(168px, 29dvh, 236px);
 margin: 0 auto;
 padding: 12px;
 border: 1px solid #76604c;
 background: #fff4e5;
 color: var(--ink);
}
.board-first-view .reaction-game .reaction-target::before { content: ''; flex: none; width: 20px; height: 20px; border: 2px solid currentColor; border-radius: 50%; }
.board-first-view .reaction-game .reaction-target[data-state="waiting"] { background: #f6debf; color: #5e3e25; }
.board-first-view .reaction-game .reaction-target[data-state="waiting"]::before { width: 13px; border-block: 0; border-inline-width: 3px; border-radius: 0; }
.board-first-view .reaction-game .reaction-target[data-state="green"] { background: #dcedd9; color: #214937; }
.board-first-view .reaction-game .reaction-target[data-state="green"]::before { background: currentColor; }
.board-first-view .reaction-game .reaction-target[data-state="early"] { background: #fae4d9; color: #7e302a; }
.board-first-view .reaction-game .reaction-target[data-state="early"]::before { border-radius: 3px; border-style: dashed; transform: rotate(45deg); }
.board-first-view .reaction-target:focus-visible,
.board-first-view .simon-board:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Secuencia. The four numbered pads keep their size during presentation and input. */
.board-first-view .simon-board { padding: 8px; gap: 7px; border: 1px solid #304357; background: #21344a; }
.board-first-view .game-mount .simon-board .tile {
 aspect-ratio: 1.55;
 color: #1b2940;
 border: 1px solid #17283d;
 border-radius: 7px;
 box-shadow: inset 0 -2px 0 #1b294030;
 font-size: clamp(1.65rem, 7vw, 2.5rem);
 font-variant-numeric: tabular-nums;
 opacity: 1;
}
.board-first-view .game-mount .simon-board .tile.flash { outline: 3px solid #fff4df; outline-offset: 1px; box-shadow: inset 0 0 0 3px #1b2940; transform: none; filter: none; }
.board-first-view .simon-board .tile.flash::after { content: ''; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: #1b2940; }
.board-first-view .game-surface[data-game="secuencia"] > .game-message { min-height: 2.2em; padding: 5px 8px; border: 1px solid #dbc1a8; border-radius: 6px; background: #fff7ed; }
.board-first-view .game-surface[data-game="secuencia"]:has(.simon-board[data-phase="input"]) > .game-message { background: #ffe4c8; border-color: #966b4c; }
.board-first-view :is(.sequence-start,.sequence-resume) { min-height: 44px; }

@media (max-width:480px) {
 .board-first-view .game-surface:is([data-game="reflejos"],[data-game="color-intruso"],[data-game="cuatro-en-linea"][data-level="5"]) > .scoreboard .stats { display: grid; flex: 1; grid-template-columns: repeat(3,minmax(0,1fr)); }
 .board-first-view .game-surface:is([data-game="reflejos"],[data-game="color-intruso"],[data-game="cuatro-en-linea"][data-level="5"]) > .scoreboard .stat strong { font-size: 1rem; white-space: nowrap; }
 .board-first-view .game-surface:is([data-game="reflejos"],[data-game="color-intruso"],[data-game="cuatro-en-linea"][data-level="5"]) > .scoreboard .restart { flex: none; padding-inline: 6px; }
}
@media (max-width:360px) {
 .board-first-view .fifteen-guide { margin-bottom: 0; }
 .board-first-view .game-surface:not([data-fullscreen]) .sudoku-board { max-width: 246px; }
 .board-first-view .game-surface:not([data-fullscreen]) .color-board { max-width: 258px; }
}

/* Word games use the same entry and return patterns as the smaller puzzle boards. */
.word-family-view .game-surface:has(.wd-message) > .game-message { display: none; }
.word-family-view .game-mount :is(.wd-input,.wd-tile,.wd-key,.xp-btn,.wd-symbol,.wd-crosscell input):focus-visible {
 outline: 3px solid var(--ink);
 outline-offset: 2px;
}
.word-family-view .game-mount :is(.wd-input,.xp-btn) { min-height: 44px; }
.word-family-view .xp .wd-crossword-game .wd-primary {
 background: #ffbc79;
 border-color: var(--ink);
 color: var(--ink);
}
.word-family-view .xp .wd-crossword-game .wd-primary:hover:not(:disabled) { background: #ffcd9e; }
.word-family-view .game-mount :is(.wd-message,.wd-linked-feedback):empty { display: none; }
.word-family-view .game-heading .game-fullscreen-button { font-size: .8125rem; }
.word-family-view .game-mount { min-width: 0; }
.word-family-view .game-mount .wd-wrap { min-width: 0; }
.word-family-view .game-mount .wd-linked-grid {
 --linked-gap: 7px;
 gap: var(--linked-gap);
 width: min(100%, 328px);
 margin-inline: auto;
 padding: 7px;
 border: 1px solid #a17e62;
 border-radius: 12px;
 background: #e8d6c1;
}
.word-family-view .game-mount .wd-linked-grid .wd-tile {
 position: relative;
 overflow: visible;
 min-width: 0;
 min-height: 44px;
 padding: 0;
 border: 1px solid #a17e62;
 border-radius: 7px;
 background: #fff8ed;
 color: var(--ink);
 box-shadow: inset 0 -2px #dbc0a4;
}
.word-family-view .game-mount .wd-linked-grid .wd-tile.wd-selected {
 background: #ffddb4;
 border-color: #664125;
 box-shadow: inset 0 0 0 1px #664125;
}
.word-family-view .game-mount .wd-linked-grid .wd-tile.wd-linked-star { border: 2px dashed #664125; }
.word-family-view .wd-linked-grid .wd-tile span { position: relative; z-index: 2; }
.word-family-view .wd-linked-grid .wd-selected span { padding-inline: 4px; border-radius: 3px; background: #ffddb4; }
.word-family-view .wd-linked-grid .wd-tile small {
 position: absolute;
 z-index: 2;
 inset: 3px auto auto 3px;
 min-width: 16px;
 padding: 1px 3px;
 border-radius: 3px;
 background: var(--ink);
 color: #fffaf1;
 line-height: 1.2;
 font-size: .6875rem;
}
.word-family-view .wd-linked-grid .wd-tile small:empty { display: none; }
.word-family-view .wd-linked-edge {
 position: absolute;
 z-index: 1;
 inset: calc(50% - 1px) auto auto 50%;
 width: calc((100% + var(--linked-gap) + 2px) * var(--trail-distance));
 height: 2px;
 background: #895734;
 transform: rotate(var(--trail-angle));
 transform-origin: left center;
 pointer-events: none;
}
.word-family-view .game-mount .wd-linked .wd-path {
 width: 100%;
 margin: 0 0 6px;
 min-height: 2rem;
 padding: 4px 8px;
 background: #fff9ef;
 border: 1px solid #b79578;
 border-radius: 7px;
 color: var(--ink);
 font-size: 1rem;
 line-height: 1.4;
 letter-spacing: .025em;
}
.word-family-view .game-mount .wd-linked .wd-path[data-word-state="valid"] { border: 2px solid #476951; background: #edf4e7; }
.word-family-view .wd-linked-feedback { color: #314454; font-size: .875rem; }
@media(max-width:640px) {
 .word-family-view .game-surface:not([data-fullscreen]) > .quick-help { margin: 0; }
 .word-family-view .game-mount .wd-wrap { max-width: 100%; }
 .word-family-view .game-heading .game-fullscreen-button { max-width: 6.6rem; }
}
/* Game-specific word family boards */
/* Palabra oculta */
.word-family-view .xp .wd-wordle-game {
 --wd-ink: var(--ink);
 --wd-line: #a48468;
}
.word-family-view .xp .wd-wordle-game :is(.wd-wordle, .wd-wordle-current) {
 max-width: 22rem;
 width: 100%;
 margin: 0 auto;
}
.word-family-view .xp .wd-wordle-game .wd-wordle:empty { display: none; }
.word-family-view .xp .wd-wordle-game :is(.wd-wordle-row,.wd-wordle) { gap: 4px; }
.word-family-view .xp .wd-wordle-game .wd-wordle-current {
 display: grid;
 grid-template-columns: repeat(5,minmax(0,1fr));
 gap: 4px;
 padding: 6px;
 background: #e6d1bb;
 border: 1px solid #ba9779;
 border-radius: 10px;
}
.word-family-view .xp .wd-wordle-game .wd-wordle-current[hidden] { display: none; }
.word-family-view .xp .wd-wordle-game .wd-letter {
 position: relative;
 aspect-ratio: 1.3;
 border: 1px solid #96795f;
 border-radius: 5px;
 background: #fffaf2;
 color: var(--ink);
 font: 750 clamp(1.2rem, 5vw, 1.75rem)/1 var(--display);
}
.word-family-view .xp .wd-wordle-game .wd-next {
 border: 2px solid #815535;
 background: #ffe6cc;
}
.word-family-view .xp .wd-wordle-game .wd-next::after {
 position: absolute;
 inset: auto 25% 6px;
 border-block-end: 2px solid #815535;
 content: '';
}
.word-family-view .xp .wd-wordle-game .wd-wordle .wd-letter { padding-bottom: 4px; }
.word-family-view .xp .wd-wordle-game .wd-wordle-legend {
 display: flex;
 justify-content: center;
 flex-wrap: wrap;
 gap: 4px 12px;
 list-style: none;
 padding: 0;
 margin: 6px 0;
 color: var(--ink);
 font-size: .8125rem;
}
.word-family-view .xp .wd-wordle-game .wd-wordle-legend[hidden] { display: none; }
.word-family-view .xp .wd-wordle-legend li { position: relative; padding-inline-start: 14px; }
.word-family-view .xp .wd-wordle-game :is(.wd-key,.wd-letter).wd-hit {
 background: #235249; color: #fffaf1; border-color: #235249;
}
.word-family-view .xp .wd-wordle-game :is(.wd-key,.wd-letter).wd-present {
 background: #ffda9b; color: #573919; border-color: #a17137;
}
.word-family-view .xp .wd-wordle-game :is(.wd-key,.wd-letter).wd-absent {
 background: #e9dfd1; color: #594b40; border-color: #a18b76;
}
.word-family-view .xp .wd-wordle-game .wd-key { position: relative; min-height: 44px; }
.word-family-view .xp .wd-wordle-game :is(.wd-key,.wd-letter,.wd-wordle-legend li):is(.wd-hit,.wd-present,.wd-absent)::after {
 position: absolute;
 box-sizing: border-box;
 inset: 4px 4px auto auto;
 width: 7px;
 height: 7px;
 color: currentColor;
 content: '';
}
.word-family-view .xp .wd-wordle-game .wd-wordle-legend li:is(.wd-hit,.wd-present,.wd-absent)::after {
 inset: 50% auto auto 2px;
 margin-top: -3px;
}
.word-family-view .xp .wd-wordle-game :is(.wd-key,.wd-letter,.wd-wordle-legend li).wd-hit::after {
 border: solid currentColor;
 border-width: 0 2px 2px 0;
 width: 5px;
 transform: rotate(38deg);
}
.word-family-view .xp .wd-wordle-game :is(.wd-key,.wd-letter,.wd-wordle-legend li).wd-present::after {
 border: 1.5px solid currentColor;
 border-radius: 50%;
}
.word-family-view .xp .wd-wordle-game :is(.wd-key,.wd-letter,.wd-wordle-legend li).wd-absent::after { border-bottom: 2px solid currentColor; }

/* Anagrama exprés */
.word-family-view .xp .wd-anagrams .wd-anagram-start { margin: 0 0 6px; }
.word-family-view .xp .wd-anagrams .wd-rack {
 display: grid;
 grid-template-columns: repeat(var(--wd-rack-size,7), minmax(0,1fr));
 gap: 4px;
 max-width: 34rem;
 padding: 6px;
 border: 1px solid #9d7959;
 border-radius: 10px;
 background: #dbbe9d;
 margin: 0 auto;
}
.word-family-view .xp .wd-anagrams .wd-rack button,
.word-family-view .xp .wd-anagrams .wd-rack button:not(:disabled) {
 width: 100%;
 min-width: 44px;
 min-height: 44px;
 padding: 2px;
 border: 1px solid #936e4f;
 border-radius: 5px;
 background: #fff8ec;
 color: var(--ink);
 box-shadow: inset 0 -2px #e4cbb2;
 font: 750 clamp(1.25rem, 5vw, 1.65rem)/1 var(--display);
}
.word-family-view .xp .wd-anagrams .wd-rack button.wd-anagram-used {
 border-style: dashed;
 background: #ede1d0;
 color: #594538;
 box-shadow: none;
 text-decoration-thickness: 2px;
}
.word-family-view .xp .wd-anagrams .wd-found { margin: 6px 0; }
.word-family-view .xp .wd-anagrams .wd-found:empty { display: none; }
.word-family-view .xp .wd-anagrams .wd-found li {
 background: #e5eee6;
 color: #22463a;
 border: 1px solid #94ac97;
 overflow-wrap: anywhere;
}
.word-family-view .xp .wd-anagrams .wd-anagram-remaining { margin: 8px 0; }
.word-family-view .xp .wd-anagrams .xp-tools { margin: 8px 0; }

.word-family-view .xp :is(.wd-wordle-game,.wd-anagrams) .wd-form {
 display: grid;
 grid-template-columns: minmax(0,1fr) auto;
 gap: 4px;
 margin: 6px 0;
}
.word-family-view .xp .wd-anagrams .wd-form { grid-template-columns: minmax(0,1fr) auto auto; }
.word-family-view .xp :is(.wd-wordle-game,.wd-anagrams) .wd-input {
 min-height: 44px;
 min-width: 0;
 width: 100%;
 padding: 6px 8px;
 background: #fffaf2;
 color: var(--ink);
}
.word-family-view .xp :is(.wd-wordle-game,.wd-anagrams) .wd-input::placeholder { font-size: .875rem; }
.word-family-view .xp :is(.wd-wordle-game,.wd-anagrams) .wd-form .xp-btn {
 min-height: 44px;
 padding: 6px 8px;
 background: var(--accent);
 color: var(--ink);
}
.word-family-view .xp .wd-anagrams .wd-form .wd-anagram-erase { background: #fffaf2; }
.word-family-view .xp :is(.wd-wordle-game,.wd-anagrams) .wd-message {
 min-height: 0;
 font-size: .875rem;
 margin: 4px 0;
}
.word-family-view .xp :is(.wd-wordle-game,.wd-anagrams) .wd-message:empty { margin: 0; }
.word-family-view .xp :is(.wd-wordle-game,.wd-anagrams) :is(button,input):focus-visible {
 outline: 3px solid var(--focus,var(--ink));
 outline-offset: 2px;
}

@media (max-width:440px) {
 .word-family-view .xp .wd-anagrams .wd-rack { grid-template-columns: repeat(4,minmax(44px,1fr)); }
 .word-family-view .xp .wd-anagrams .wd-rack[data-size="6"] { grid-template-columns: repeat(6,minmax(44px,1fr)); }
}
@media (max-width:359px) {
 .word-family-view .xp .wd-anagrams .wd-rack[data-size="6"] { grid-template-columns: repeat(3,minmax(44px,1fr)); }
}
@media (min-width:720px) and (orientation:landscape) {
 .word-family-view .game-surface[data-fullscreen] .xp .wd-wordle-game {
  grid-template-columns: minmax(0,22rem) minmax(0,32rem);
  grid-template-rows: repeat(5,min-content);
 }
 .word-family-view .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-wordle-current { grid-area: 1 / 1; }
 .word-family-view .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-wordle { grid-area: 2 / 1 / 6; }
 .word-family-view .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-wordle-legend { grid-area: 3 / 2; }
 .word-family-view .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-keyboard { grid-area: 4 / 2; }
 .word-family-view .game-surface[data-fullscreen] .xp .wd-wordle-game .xp-tools { grid-area: 5 / 2; }
 .word-family-view .game-surface[data-fullscreen] .xp .wd-wordle-game .wd-help { grid-area: 6 / 2; }
 .word-family-view .game-surface[data-fullscreen] .xp .wd-level-anagrams > .wd-anagram-start { grid-area: 1 / 2; }
 .word-family-view .game-surface[data-fullscreen] .xp .wd-level-anagrams > .xp-tools { grid-area: 2 / 2; }
 .word-family-view .game-surface[data-fullscreen] .xp .wd-level-anagrams > .wd-found { grid-area: 3 / 2 / 6; }
}

/* Crucigrama. The clue strip and the printed grid share an edge. */
.word-family-view .xp .wd-crossword-game { --cross-ink: #25364d; --cross-paper: #fffcf4; --cross-track: #e8c39e; }
.word-family-view .xp .wd-active-clue {
 width: 100%;
 max-width: 420px;
 min-height: 0;
 margin: 0 auto 5px;
 padding: 8px 11px;
 border: 1px solid var(--cross-ink);
 border-radius: 8px 8px 3px 3px;
 background: var(--cross-ink);
 color: #fff8ef;
 font-size: .875rem;
 line-height: 1.35;
 font-weight: 500;
}
.word-family-view .wd-clue-direction { color: #ffd3a5; margin-inline-end: 4px; white-space: nowrap; }
.word-family-view .xp .wd-crossword-game .wd-board-viewport { padding: 0 0 3px; }
.word-family-view .xp .wd-crossword-game .wd-crossword {
 max-width: 420px;
 gap: 2px;
 margin: 0 auto;
 padding: 2px;
 border-radius: 3px 3px 8px 8px;
 background: var(--cross-ink);
}
.word-family-view .xp .wd-crossword-game .wd-crosscell {
 border: 1px solid transparent;
 border-radius: 1px;
 background: var(--cross-paper);
 color: #1b2940;
}
.word-family-view .xp .wd-crossword-game .wd-block { background: var(--cross-ink); }
.word-family-view .xp .wd-crossword-game .wd-crosscell span {
 top: 0;
 left: 3px;
 font-weight: 700;
 line-height: 1.2;
}
.word-family-view .xp .wd-crossword-game .wd-crosscell input {
 color: #1b2940;
 font-family: var(--display,sans-serif);
 font-size: clamp(1rem, 4.8vw, 1.5rem);
}
.word-family-view .xp .wd-crossword-game .wd-in-word:not(.wd-error,.wd-correct) {
 border-color: transparent;
 background: #ffebd2;
 box-shadow: inset 0 -3px var(--cross-track);
}
.word-family-view .xp .wd-crossword-game [data-direction="down"] .wd-in-word:not(.wd-error,.wd-correct) { box-shadow: inset 3px 0 var(--cross-track); }
.word-family-view .xp .wd-crossword-game .wd-active-cell:not(.wd-error,.wd-correct) {
 outline: 2px solid var(--cross-ink);
 outline-offset: -4px;
 background: #ffd09d;
}
.word-family-view .xp .wd-crossword-game .wd-crosscell:focus-within { z-index: 1; }
.word-family-view .xp .wd-crossword-game .wd-crosscell input:focus-visible {
 outline: 2px dashed var(--cross-ink);
 outline-offset: -6px;
}
.word-family-view .xp .wd-crossword-game .wd-crosscell.wd-error { background: #ffe3dc; border: 2px dashed #923a35; }
.word-family-view .xp .wd-crossword-game .wd-crosscell.wd-correct { background: #e8f1e6; }
.word-family-view .xp .wd-crossword-game .wd-puzzle-name { margin: 12px 0 4px; font-size: 1rem; }
.word-family-view .xp .wd-crossword-game .wd-clue-list { padding-block: 2px; }
.word-family-view .xp .wd-crossword-game .wd-clue-list summary { min-height: 44px; padding-block: 10px; }
.word-family-view .xp .wd-crossword-game .wd-clue-button { min-height: 44px; overflow-wrap: anywhere; }
.word-family-view .xp .pa .cw-cell { background: #fffcf4; }
.word-family-view .xp .pa .cw-block { background: #25364d; }
.word-family-view .xp .pa .cw-in-word { box-shadow: inset 0 -3px #e8c39e; background: #ffebd2; }
.word-family-view .xp .pa .cw-cell:has(input[tabindex="0"]) {
 outline: 2px solid #25364d;
 outline-offset: -4px;
 background: #ffd09d;
}
.word-family-view .xp .pa .cw-cell input:focus-visible { outline: 2px dashed #25364d; outline-offset: -6px; }
.word-family-view .xp .pa .cw-error { background: #ffe3dc; }
.word-family-view .xp .pa .cw-correct { background: #e8f1e6; }

/* Ahorcado. A clue card sits above the drawing and the word. */
.word-family-view .xp .wd-hangman { max-width: 600px; }
.word-family-view .xp .wd-hangman > .wd-puzzle-name {
 margin: 0 0 6px;
 padding: 9px 11px;
 border-radius: 8px 8px 3px 3px;
 background: #25364d;
 color: #fff8ef;
 font-family: var(--display,sans-serif);
 font-size: clamp(.9375rem, 3.8vw, 1.15rem);
 line-height: 1.35;
}
.word-family-view .xp :is(.wd-hang-board,.hm-hang-board) {
 display: grid;
 grid-template-columns: minmax(70px,27%) minmax(0,1fr);
 gap: 7px;
 align-items: center;
 padding: 5px 8px;
 border: 1px solid #b6967b;
 border-radius: 3px 3px 8px 8px;
 background: #f8ecdb;
}
.word-family-view .xp :is(.wd-hang-board,.hm-hang-board) .wd-hang {
 display: block;
 width: 100%;
 height: auto;
 max-width: 115px;
 max-height: 106px;
 margin: 0 auto;
 color: #25364d;
}
.word-family-view .xp .wd-hang-part { stroke: #8d3d25; }
.word-family-view .xp .wd-hang-length { margin: 0 0 4px; text-align: center; font-size: .8125rem; color: #4e3d2f; }
.word-family-view .xp .wd-hangman .wd-slots {
 display: grid;
 grid-template-columns: repeat(var(--hang-length,1),minmax(0,1fr));
 gap: 3px;
 margin: 0;
}
.word-family-view .xp .wd-hangman .wd-slot {
 min-width: 0;
 min-height: 35px;
 border-bottom: 2px solid #6c5746;
 color: #6c5746;
 font: 700 clamp(.78rem,4.2vw,1.45rem)/1 var(--display,sans-serif);
}
.word-family-view .xp .wd-hangman .wd-slot-revealed {
 border-color: #8e522b;
 background: #ffd9ac;
 color: #1b2940;
}
.word-family-view .xp .wd-hangman .wd-message {
 margin: 7px 0;
 min-height: 1.4em;
 color: #1b2940;
 font-size: .875rem;
 line-height: 1.35;
}
.word-family-view .xp .wd-hangman .wd-keyboard {
 display: grid;
 grid-template-columns: repeat(auto-fit,minmax(40px,1fr));
 gap: 4px;
 max-width: none;
 margin: 7px 0 10px;
}
.word-family-view .xp .wd-hangman .wd-key {
 position: relative;
 min-width: 0;
 min-height: 44px;
 padding: 4px 2px;
 border: 1px solid #a78e76;
 border-radius: 5px;
 background: #fffcf6;
 color: #1b2940;
 font: 700 1rem var(--display,sans-serif);
}
.word-family-view .xp .wd-hangman .wd-key.wd-hit { background: #e5efe1; border-color: #567154; color: #263e29; }
.word-family-view .xp .wd-hangman .wd-key.wd-hit::after,
.word-family-view .xp .pa .hm-key.hm-hit::after {
 content: '';
 position: absolute;
 right: 4px;
 top: 3px;
 width: 8px;
 height: 5px;
 border: solid currentColor;
 border-width: 0 0 2px 2px;
 transform: rotate(-45deg);
}
.word-family-view .xp .wd-hangman .wd-key.wd-absent {
 border-style: dashed;
 background: #f1e6db;
 color: #59483b;
 text-decoration: line-through;
 text-decoration-thickness: 2px;
}
.word-family-view .xp .wd-hangman .wd-key:focus-visible { outline: 3px solid #25364d; outline-offset: 1px; z-index: 1; }
.word-family-view .xp .wd-hang-options .wd-help { margin-top: 8px; }
.word-family-view .xp .wd-hang-options > [aria-pressed="true"] { border-color: #25364d; background: #ffd09d; color: #1b2940; }
.word-family-view .xp .pa .hm-hang-board { grid-template-columns: minmax(60px,22%) minmax(0,1fr); }
.word-family-view .xp .pa .hm-key { position: relative; }
.word-family-view .xp .pa .hm-hang-board .hm-slots { margin: 0; }
.word-family-view .xp .pa .hm-hang-board .hm-slot { min-height: 35px; font-size: clamp(.65rem,3.6vw,1.35rem); }

@media (max-width: 380px) {
 .word-family-view .xp .wd-hangman .wd-keyboard { grid-template-columns: repeat(6,minmax(0,1fr)); }
}

/* Conexiones: las palabras permanecen enteras y los grupos resueltos tienen su propia línea de lectura. */
.word-family-view .wd-wrap.wd-connections .wd-message {
 min-height: 0;
 margin: 4px 0 8px;
 text-align: start;
}
.word-family-view .wd-wrap.wd-connections .wd-message:empty,
.word-family-view .wd-connection-solved:empty { display: none; }
.word-family-view .wd-wrap.wd-connections .wd-connection-actions {
 gap: 6px;
 margin: 0 0 8px;
}
.word-family-view .wd-wrap.wd-connections .wd-connection-actions .xp-btn { min-height: 44px; padding-inline: 9px; }
.word-family-view .wd-wrap.wd-connections .wd-connect {
 gap: 6px;
 margin: 0 0 12px;
}
.word-family-view .wd-wrap.wd-connections .wd-connect button {
 min-height: 48px;
 min-width: 0;
 padding: 6px;
 border: 1px solid #ae8e73;
 border-radius: 7px;
 background: #fffaf3;
 color: #1b2940;
 font: inherit;
 font-size: clamp(.8rem,3.8vw,.9375rem);
 font-weight: 700;
 line-height: 1.2;
}
.word-family-view .wd-wrap.wd-connections .wd-connect button[aria-pressed="true"] {
 background: #ffe4c8;
 color: #432a1a;
 border-color: #795031;
 box-shadow: inset 0 0 0 1px #795031;
 text-decoration: underline 2px;
 text-underline-offset: 3px;
}
@media (hover:hover) {
 .word-family-view .wd-wrap.wd-connections .wd-connect button:not([aria-pressed="true"],:disabled):hover {
  border-color: #795031;
  background: #faecdd;
 }
}
.word-family-view .wd-wrap.wd-connections .wd-group {
 margin: 0 0 8px;
 padding: 8px 10px 9px;
 border-color: #718a77;
 border-radius: 7px;
 background: #edf2e7;
}
.word-family-view .wd-wrap.wd-connections .wd-group > strong {
 margin: 0 0 2px;
 font-size: .95rem;
 line-height: 1.35;
}
.word-family-view .wd-wrap.wd-connections .wd-group:not(.wd-group-revealed) > strong::before {
 display: inline-block;
 width: .66em;
 height: .36em;
 margin: 0 .55em .18em .12em;
 border-inline-start: 2px solid #315d48;
 border-block-end: 2px solid #315d48;
 transform: rotate(-45deg);
 content: '';
}
.word-family-view .wd-wrap.wd-connections .wd-group.wd-group-revealed {
 border-style: dashed;
 border-color: #917459;
 background: #fff6e9;
}

/* Criptograma: espacio de escritura sobre una clave impresa y contornos distintos para la relación y el foco. */
.word-family-view .wd-wrap.wd-crypto-game .wd-crypto {
 justify-content: flex-start;
 gap: 5px 7px;
 margin: 0;
 padding: 6px;
 border-color: #b59379;
 border-radius: 8px;
 background: #fffaf2;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-cryptoword {
 flex-wrap: wrap;
 gap: 2px;
 padding: 3px;
 border-radius: 6px;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-current-word {
 border-color: #a17d60;
 background: #f7eadb;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol {
 --wd-symbol-width: clamp(28px,8.8vw,39px);
 min-height: 44px;
 border-color: #ac8d72;
 border-radius: 4px;
 color: #1b2940;
 background: #fff;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol-letter {
 height: 25px;
 font: 700 1.125rem/1 var(--display,system-ui,sans-serif);
 text-decoration: underline 1px;
 text-underline-offset: 3px;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol-code {
 padding: 3px 0;
 border-block-start: 1px solid #ccb097;
 background: #efe0d1;
 color: #513821;
 font-size: .75rem;
 font-weight: 700;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol.wd-same-code {
 border: 1px dashed #875736;
 background: #fff4df;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol.wd-same-code .wd-symbol-code {
 background: #ffdfbd;
 color: #432a1a;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol.wd-crypto-active {
 border: 1px solid #1b2940;
 box-shadow: inset 0 0 0 2px #1b2940;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol.wd-crypto-active .wd-symbol-code {
 border-color: #1b2940;
 background: #1b2940;
 color: #fff;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol.wd-crypto-given .wd-symbol-letter {
 background: #f3e8dc;
 color: #513821;
 text-decoration: none;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol.wd-error .wd-symbol-letter {
 background: #fae1d9;
 color: #7e2c24;
 text-decoration: underline wavy;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol.wd-correct:not(.wd-crypto-given) .wd-symbol-letter {
 background: #e6efe3;
 color: #214d37;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-symbol:focus-visible { outline-offset: -4px; }
.word-family-view .wd-wrap.wd-crypto-game .wd-crypto-panel {
 padding: 6px;
 border-color: #b59379;
 background: #fff8ef;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-crypto-selection {
 margin: 0 0 6px;
 padding: 3px 1px;
 font-size: .875rem;
 line-height: 1.35;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-crypto-panel .wd-key {
 min-height: 44px;
 background: #fffaf3;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-crypto-stage .wd-primary {
 border-color: #1b2940;
 background: #ffbc79;
 color: #1b2940;
}
.word-family-view .wd-wrap.wd-crypto-game .wd-crypto-stage .xp-btn { min-height: 44px; }
.word-family-view .wd-wrap.wd-crypto-game > .wd-message:empty,
.word-family-view .wd-wrap.wd-crypto-game:has(.wd-confirm-row:not([hidden])) > .wd-message { display: none; }
.word-family-view .wd-wrap.wd-crypto-game .wd-crypto-note {
 color: #513821;
 font-weight: 650;
}
.word-family-view .wd-crypto-archive-stage .ca-mini-cell.ca-same-code { border-style: dashed; }
.word-family-view .wd-crypto-archive-stage :is(.ca-symbol,.ca-mini-cell) small {
 background: #efe0d1;
 color: #513821;
 font-weight: 700;
}
.word-family-view .wd-crypto-archive-stage .ca-symbol.ca-active small { background: #1b2940; color: #fff; }
.word-family-view .game-surface:not([data-fullscreen]) .wd-wrap.wd-crypto-game .wd-crypto {
 max-height: none;
 overflow: visible;
 margin-block-end: 6px;
}

/* Logic A shares the surface, controls and keyboard focus across boards. */
.logic-a-view .game-mount { min-width: 0; }
.logic-a-view .game-mount .la-mode-stage { min-width: 0; }
.logic-a-view .game-mount .la-mode-stage > .xp-note:first-child { display: none; }
.logic-a-view .xp.la :is(.la-modes,.la-mode-options) { gap: 5px; }
.logic-a-view .xp.la .xp-btn {
 min-height: 44px;
 color: var(--ink);
 border-color: #9e7e63;
}
.logic-a-view .xp.la .xp-btn:is(.la-check,[aria-pressed="true"]):not(:disabled) {
 background: #ffbc79 !important;
 border-color: #735036;
 color: var(--ink);
}
.logic-a-view .xp.la .xp-btn:is(.la-check,[aria-pressed="true"]):hover:not(:disabled) { background: #ffcc9b !important; }
.logic-a-view .xp.la .la-board {
 --logic-line: #b79d83;
 --logic-paper: #fff9ef;
 gap: 3px;
 padding: 5px;
 border: 1px solid var(--logic-line);
 border-radius: 9px;
 background: #e6d1bc;
}
.logic-a-view .xp.la .la-board .xp-cell {
 border-color: var(--logic-line);
 background: var(--logic-paper);
 color: var(--ink);
}
.logic-a-view .xp.la :is(.xp-btn,.xp-cell,.la-edge,.la-route-viewport,.la-untangle-viewport,.la-loop-scroll,.la-network):focus-visible {
 outline: 2px solid var(--ink);
 outline-offset: -3px;
}
.logic-a-view .xp.la .xp-btn:focus-visible { outline-offset: 2px; }
.logic-a-view .xp.la :is(.la-route-viewport,.la-untangle-viewport,.la-loop-scroll,.la-network) { max-inline-size: 100%; }
@media (max-width:640px) {
 .logic-a-view .game-heading .game-fullscreen-button { max-width: 6.6rem; }
 .logic-a-view .game-surface:not([data-fullscreen]) > .quick-help { margin-block: 7px 0; }
 .logic-a-view .xp.la .xp-btn { padding-inline: 8px; }
 .logic-a-view .xp.la .xp-note { margin-block: 6px; }
}

.logic-a-view .xp.la .la-akari-board {
 --logic-paper: #f6eddf;
 max-width: 315px;
}
.logic-a-view .xp.la .la-akari-board .la-akari-wall {
 background: #263850;
 border-color: #263850;
 color: #fff6e9;
 font-size: clamp(.75rem,4vw,1.125rem);
 font-variant-numeric: tabular-nums;
 opacity: 1;
}
.logic-a-view .xp.la .la-akari-board .la-akari-wall.la-akari-over { border: 2px dashed #ff9d80; }
.logic-a-view .xp.la .la-akari-board :is(.la-lit,.la-akari-bulb) { background: #ffebbb !important; }
.logic-a-view .xp.la .la-akari-board :is(.la-akari-bulb,.la-akari-lit) {
 position: relative;
 font-size: 0;
}
.logic-a-view .la-akari-board .la-akari-lit::after {
 position: absolute;
 inset: 39.5%;
 border: 1px solid #8c6738;
 border-radius: 50%;
 content: '';
}
.logic-a-view .la-akari-board .la-akari-bulb::before {
 position: absolute;
 inset: 24% 32% 41%;
 border: 2px solid #654513;
 border-radius: 50% 50% 43% 43%;
 background: #ffca67;
 content: '';
}
.logic-a-view .la-akari-board .la-akari-bulb::after {
 position: absolute;
 inset: 62% 40% 26%;
 border-block: 2px solid #654513;
 content: '';
}
.logic-a-view .xp.la .la-akari-board .la-akari-conflict {
 background: #ffe2dc !important;
 border: 3px double #943d31;
}
.logic-a-view .xp.la .la-akari-board .la-akari-conflict::before { background: #ffb3a0; border-color: #943d31; }
.logic-a-view .xp.la .la-akari-feedback { min-height: 0; margin-block: 7px; }

.logic-a-view .xp.la .la-counted-board:has(.la-camp-legend) {
 --camp-gap: 3px;
 grid-template-columns: minmax(1.75rem,auto) minmax(0,1fr);
 gap: var(--camp-gap);
 max-width: 355px;
 margin-block: 7px;
 padding: 5px;
 border-color: #a88e72;
 border-radius: 8px;
 background: #e8dbc7;
}
.logic-a-view .xp.la .la-counted-board:has(.la-camp-legend) :is(.la-count-top,.la-count-left,.la-board) { gap: var(--camp-gap); }
.logic-a-view .xp.la .la-counted-board:has(.la-camp-legend) .la-board { padding: 0; border: 0; border-radius: 3px; }
.logic-a-view .xp.la .la-counted-board:has(.la-camp-legend) .la-count-label {
 min-height: 0;
 color: #1b2940;
 font-size: clamp(.8125rem,3.3vw,.975rem);
 font-variant-numeric: tabular-nums;
}
.logic-a-view .xp.la .la-counted-board:has(.la-camp-legend) .la-count-met { background: #e5eedf; text-decoration: underline; text-underline-offset: 3px; }
.logic-a-view .xp.la .la-counted-board:has(.la-camp-legend) .la-count-over { text-decoration: underline wavy; }
.logic-a-view .xp.la .la-counted-board .xp-cell:is(.la-tree,.la-camp-tent) {
 position: relative;
 font-size: 0;
 opacity: 1;
}
.logic-a-view .xp.la .la-counted-board .la-tree { background: #dbe9d8; }
.logic-a-view .xp.la .la-counted-board .la-camp-tent { background: #ffdbaf !important; }
.logic-a-view .xp.la .la-counted-board .la-camp-mark { border-style: dashed; background: #eee5d8; color: #614a38; }
.logic-a-view .la-counted-board :is(.la-tree,.la-camp-tent)::before {
 position: absolute;
 inset: 21% 27% 26%;
 content: '';
}
.logic-a-view .la-counted-board .la-tree::before {
 background: #28513b;
 clip-path: polygon(50% 0,75% 35%,65% 35%,92% 70%,60% 70%,60% 100%,40% 100%,40% 70%,8% 70%,35% 35%,25% 35%);
}
.logic-a-view .la-counted-board .la-camp-tent::before {
 background: #9b522d;
 clip-path: polygon(50% 0,100% 100%,62% 100%,50% 55%,38% 100%,0 100%);
}
.logic-a-view .xp.la .la-counted-board .la-tent-conflict { border: 3px double #943d31; background: #ffe2dc !important; }

.logic-a-view .xp.la .la-peg-viewport { max-width: 370px; }
.logic-a-view .xp.la .la-peg-holder .la-board { margin: 6px 0; padding: 5px; }
.logic-a-view .xp.la .la-peg-holder .xp-cell {
 position: relative;
 display: grid;
 min-width: 0;
 min-height: 0;
 padding: 0;
 aspect-ratio: 1;
 border-radius: 5px;
 font-size: 0;
}
.logic-a-view .xp.la .la-peg-holder .la-empty { background: #e6d1bc; border-color: transparent; }
.logic-a-view .xp.la .la-peg-holder .xp-cell:is(.la-peg,.la-hole)::before {
 position: absolute;
 inset: 25%;
 border-radius: 50%;
 content: '';
 pointer-events: none;
}
.logic-a-view .xp.la .la-peg-holder .la-hole::before {
 inset: 34%;
 border: 2px solid #83644d;
 background: #ecdecc;
}
.logic-a-view .xp.la .la-peg-holder .la-peg::before {
 background: #24504b;
 border: 1px solid #173832;
 box-shadow: inset 0 -2px #173832;
}
.logic-a-view .xp.la .la-peg-holder .la-peg::after {
 position: absolute;
 inset: 36% 49% 49% 36%;
 border-radius: 50%;
 background: #9ac5b4;
 content: '';
}
.logic-a-view .xp.la .la-peg-holder .la-peg.xp-selected {
 background: #ffcf9e !important;
 border-color: #744729;
 box-shadow: inset 0 0 0 2px #744729;
}
.logic-a-view .xp.la .la-peg-holder .la-peg-destination::before {
 inset: 36%;
 border-color: #5d402c;
 border-radius: 1px;
 background: #ffd7a8;
 transform: rotate(45deg);
}
.logic-a-view .xp.la .la-peg-holder .la-peg-goal:not(.la-peg-destination)::before { outline: 2px solid #755538; outline-offset: 2px; }
.logic-a-view .xp.la .la-peg-feedback {
 margin: 4px auto;
 padding: 5px 8px;
 max-width: 370px;
 border: 1px solid #b98c75;
 border-radius: 6px;
 background: #fff6eb;
 color: #593626;
 font-size: .875rem;
 line-height: 1.35;
}
.logic-a-view .la-peg-feedback:empty,
.logic-a-view .game-surface:has(.la-peg-feedback:not(:empty)) > .game-message:not([hidden]) { display: none; }

.logic-a-view .game-surface:not([data-fullscreen]) .xp.la .la-jugs {
 display: grid;
 grid-template-columns: repeat(2,minmax(0,1fr));
 gap: 8px;
 width: min(100%,350px);
 margin: 6px auto;
}
.logic-a-view .xp.la .la-jug-button {
 display: grid;
 justify-items: center;
 align-content: center;
 gap: 3px;
 min-width: 0;
 padding: 6px 4px 28px;
 border: 1px solid #95806b;
 border-radius: 8px;
 color: var(--ink);
 background: #fff9ef;
}
.logic-a-view .xp.la .la-jug-button.xp-selected { background: #ffdfbb !important; border-color: #745032; }
.logic-a-view .xp.la .la-jug-button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.logic-a-view .xp.la .la-jug-button .la-vessel {
 width: clamp(52px,20vw,82px);
 height: clamp(78px,16dvh,135px);
 margin: 0;
 border: 2px solid #31525c;
 border-top: 0;
 border-radius: 0 0 10px 10px;
 background: #eef5f2;
 overflow: visible;
}
.logic-a-view .xp.la .la-jug-button .la-water { background: #94cdd0; border-color: #28626a; border-radius: 0 0 8px 8px; }
.logic-a-view .xp.la .la-jug-button .la-water[style*="height: 0%"] { border-top: 0; }
.logic-a-view .xp.la .la-jug-tick { position: absolute; right: 0; width: 15%; border-top: 1px solid #31525c; }
.logic-a-view .xp.la .la-jug-button .la-jug-value {
 inset: calc(100% + 3px) 0 auto;
 color: var(--ink);
 white-space: nowrap;
 font-size: 1rem;
 line-height: 1.3;
 font-weight: 700;
 font-variant-numeric: tabular-nums;
}
.logic-a-view .xp.la .la-jug-preview {
 min-height: 0;
 max-width: 350px;
 margin: 4px auto;
 color: var(--ink);
 font-size: .875rem;
 line-height: 1.35;
}
.logic-a-view .game-mount[data-logic-game="jarras-exactas"] .xp-note:empty { display: none; }
@media(max-width:390px) {
 .logic-a-view .xp.la .la-jug-button .la-vessel { height: 82px; }
 .logic-a-view .la-body:has(.la-jugs) + .xp-tools {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  width: min(100%,350px);
  margin: 5px auto;
  gap: 5px;
 }
}
/* Logic A game boards */
/* Rutas de colores · extremos con letra y trazos en tinta */
.logic-a-view .xp.la :is(.la-route-board,.la-untangle-board) .la-board {
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.logic-a-view .xp.la .la-route-viewport {
  padding: 3px;
  scrollbar-color: #564333 #f0dfce;
}
.logic-a-view .xp.la .la-route-board {
  width: min(100%,390px);
  margin: 3px auto;
  border-color: #a18670;
  border-radius: 10px;
}
.logic-a-view .game-mount.xp.la[data-logic-game="rutas-de-colores"] .la-route-wide .la-route-board {
  min-width: var(--route-min) !important;
}
.logic-a-view .xp.la .la-route-board .xp-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-inline-end: 1px solid #b6a28f;
  border-block-end: 1px solid #b6a28f;
  border-radius: 0;
  background: #fff9ef;
  color: #1b2940;
}
.logic-a-view .xp.la .la-route-board .xp-cell:hover:not(:disabled) { background-color: #ffecd6; }
.logic-a-view .xp.la .la-route-board .la-route-selected { outline: 0; }
.logic-a-view .xp.la .la-route-board .la-route-letter:not(.la-route-end) { display: none; }
.logic-a-view .xp.la .la-route-board .la-route-end {
  width: 62%;
  max-width: 2.35rem;
  min-width: 0;
  aspect-ratio: 1;
  min-height: 0;
  border: 2px solid #1b2940;
  border-radius: 50%;
  background: #fff9ef;
  font-size: clamp(.9rem,4.2vw,1.25rem);
  font-weight: 750;
}
.logic-a-view .xp.la .la-route-board .la-route-selected .la-route-end {
  background: #ffccb0;
  box-shadow: 0 0 0 2px #fff9ef;
}
.logic-a-view .xp.la .la-route-board .la-route-tip::after {
  position: absolute;
  z-index: 3;
  inset: 50% auto auto 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%,-50%);
  border: 2px solid #1b2940;
  border-radius: 50%;
  background: #fff9ef;
  content: "";
}
.logic-a-view .xp.la .la-route-board .la-route-hint { outline: 3px dashed #1b2940; outline-offset: -4px; }
.logic-a-view .xp.la .la-route-board .xp-cell:focus-visible { outline: 3px solid #1b2940; outline-offset: -4px; }
.logic-a-view .game-surface:has(.la-route-feedback:not(:empty)) > .game-message { display: none; }
.logic-a-view .xp.la .la-route-status,
.logic-a-view .xp.la .la-untangle-status {
  color: #1b2940;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.4;
  margin: 3px auto 7px;
  text-align: center;
}
.logic-a-view .xp.la .la-route-palette { margin-block: 7px; }
.logic-a-view .xp.la .la-route-palette .xp-selected {
  color: #1b2940;
  border-color: #1b2940;
  background: #ffbc79 !important;
}
.logic-a-view .xp.la .la-route-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px auto;
  color: #443b33;
  font-size: .8rem;
  line-height: 1.2;
}
.logic-a-view .xp.la .la-route-navigation button { min-height: 44px; flex: 0 0 auto; }

/* Desenreda · los nodos tapan las líneas y el patrón marca los cruces */
.logic-a-view .xp.la .la-untangle-viewport {
  width: 100%;
  max-width: 389px;
  margin: 3px auto;
  overflow: visible;
}
.logic-a-view .xp.la .la-untangle-board {
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  border: 1px solid #a18670;
  border-radius: 10px;
  background: #fff9ef;
}
.logic-a-view .xp.la[data-logic-game="desenreda"] .la-untangle-board .la-board .xp-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent !important;
  box-shadow: none;
  color: #1b2940;
}
.logic-a-view .xp.la .la-untangle-board .la-location .la-untangle-dot {
  font-size: .875rem;
  color: #665343;
}
.logic-a-view .xp.la .la-untangle-board .la-location:hover .la-untangle-dot {
  color: #1b2940;
  outline: 1px dashed #665343;
  outline-offset: 5px;
}
.logic-a-view .xp.la .la-untangle-board .la-point .la-untangle-dot {
  display: grid;
  place-items: center;
  width: 76%;
  aspect-ratio: 1;
  border: 2px solid #1b2940;
  border-radius: 50%;
  background: #fff9ef;
  font-size: clamp(.85rem,3.8vw,1.125rem);
}
.logic-a-view .xp.la .la-untangle-board .la-point.xp-selected .la-untangle-dot {
  background: #ffbc79;
  box-shadow: 0 0 0 2px #fff9ef, 0 0 0 3px #1b2940;
}
.logic-a-view .xp.la[data-logic-game="desenreda"] .la-untangle-board svg line { stroke: #54685d; stroke-width: 5; }
.logic-a-view .xp.la[data-logic-game="desenreda"] .la-untangle-board svg line.la-untangle-incident:not(.la-untangle-conflict) {
  stroke: #233c35;
  stroke-width: 7;
}
.logic-a-view .xp.la[data-logic-game="desenreda"] .la-untangle-board svg line.la-untangle-conflict {
  stroke: #8a3027;
  stroke-width: 7;
  stroke-dasharray: 11 8;
}
.logic-a-view .xp.la[data-logic-game="desenreda"] .la-untangle-board .xp-cell:focus-visible {
  outline: 3px solid #1b2940;
  outline-offset: -3px;
}
.logic-a-view .xp.la .la-untangle-status[data-clear="true"] { color: #28523e; }
.logic-a-view .xp.la .la-untangle-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 389px;
  margin: 7px auto;
  color: #443b33;
  font-size: .84rem;
  line-height: 1.35;
}
.logic-a-view .xp.la .la-untangle-legend::before {
  flex: 0 0 21px;
  border-block-start: 2px dashed #8a3027;
  content: "";
}

.logic-a-view .game-mount.xp .la-nono-viewport {
 margin: 8px auto;
 padding: 3px;
 scrollbar-color: #6f6254 #f9f0e4;
 scroll-padding-inline-start: calc(var(--nono-rail) + 6px);
}
.logic-a-view .game-mount.xp .la-nonogram {
 grid-template-columns: var(--nono-rail) repeat(var(--level-size),minmax(0,1fr)) !important;
 width: min(100%,calc(var(--level-size) * 56px + var(--nono-rail) + 16px)) !important;
 min-width: 0 !important;
 gap: 2px;
 margin: 0 auto;
 padding: 5px;
 border: 1px solid #aa937c;
 border-radius: 9px;
 background: #dfd0be;
}
.logic-a-view .game-mount.xp .la-nono-wide .la-nonogram {
 grid-template-columns: var(--nono-rail) repeat(var(--level-size),minmax(44px,1fr)) !important;
 width: 100% !important;
 min-width: calc(var(--level-size) * 46px + var(--nono-rail) + 12px) !important;
 max-width: none;
}
.logic-a-view .game-mount.xp .la-nono-clue {
 min-height: 28px;
 padding: 4px 2px;
 border-radius: 3px;
 color: #243348;
 background: #f3e5d5;
 font-size: clamp(.8rem,2.45vw,.95rem);
 font-variant-numeric: tabular-nums;
 white-space: pre-line;
}
.logic-a-view .game-mount.xp .la-nono-column { align-items: flex-end; }
.logic-a-view .game-mount.xp .la-nono-row { left: 5px; }
.logic-a-view .game-mount.xp .la-nono-active {
 background: #f9d5b1;
 box-shadow: inset 0 0 0 1px #a17249;
}
.logic-a-view .game-mount.xp .la-nonogram .xp-cell {
 min-width: 0;
 min-height: 0;
 padding: 0;
 border: 1px solid #b29e89;
 border-radius: 3px;
 background: #fffaf2;
 color: #64544a;
 line-height: 1;
 font-size: clamp(1rem,3.5vw,1.5rem);
}
.logic-a-view .game-mount.xp .la-nono-wide .la-nonogram .xp-cell {
 min-width: 44px;
 min-height: 44px;
}
.logic-a-view .game-mount.xp .la-nonogram .la-nono-line:not(.xp-good) { background: #fff2e2; }
.logic-a-view .game-mount.xp .la-nonogram .xp-good {
 border-color: #243348;
 background: #243348 !important;
 color: #fff4e6;
}
.logic-a-view .game-mount.xp .la-nonogram .la-nono-excluded {
 border-color: #ae8869;
 color: #8b462c;
}
.logic-a-view .game-mount.xp .la-nonogram .xp-cell:focus-visible {
 outline: 2px solid #243348;
 outline-offset: 1px;
 box-shadow: inset 0 0 0 2px #ffbc79;
 position: relative;
 z-index: 1;
}
.logic-a-view .game-mount.xp .la-nono-scroll-note { margin: 0 auto 5px; font-size: .82rem; }
.logic-a-view .game-mount.xp .la-nono-viewport + .xp-note { margin-block: 3px; }

.logic-a-view .game-mount.xp .la-rect-grid {
 max-width: 392px;
 gap: 0;
 margin: 7px auto;
 padding: 4px;
 border: 1px solid #aa937c;
 border-radius: 8px;
 background: #dfd0be;
}
.logic-a-view .game-mount.xp .la-rect-grid .xp-cell {
 position: relative;
 isolation: isolate;
 min-height: 0;
 padding: 0;
 border: 1px solid #cfbaa6;
 border-radius: 0;
 color: #6e5d50;
 background: #fffaf2;
 font-size: clamp(.875rem,4vw,1.2rem);
 font-variant-numeric: tabular-nums;
}
.logic-a-view .game-mount.xp .la-rect-grid .la-rect-clue { color: #243348; }
.logic-a-view .game-mount.xp .la-rect-grid .la-rect-clue::after {
 content: '';
 position: absolute;
 inset: 50% auto auto 50%;
 z-index: -1;
 width: min(1.62em,90%);
 aspect-ratio: 1;
 transform: translate(-50%,-50%);
 border: 1px solid #86664c;
 border-radius: 50%;
 background: #fffaf2;
 pointer-events: none;
}
.logic-a-view .game-mount.xp .la-rect-grid .la-rect-placed::before {
 content: '';
 position: absolute;
 inset: -1px;
 border: 0 solid #334159;
 pointer-events: none;
}
.logic-a-view .game-mount.xp .la-rect-grid .la-rect-top::before { border-top-width: 2px; }
.logic-a-view .game-mount.xp .la-rect-grid .la-rect-right::before { border-right-width: 2px; }
.logic-a-view .game-mount.xp .la-rect-grid .la-rect-bottom::before { border-bottom-width: 2px; }
.logic-a-view .game-mount.xp .la-rect-grid .la-rect-left::before { border-left-width: 2px; }
.logic-a-view .game-mount.xp .la-rect-grid .la-rectangle-preview {
 outline: 2px dashed #774e32;
 outline-offset: -4px;
}
.logic-a-view .game-mount.xp .la-rect-grid .xp-cell:focus-visible {
 outline: 2px solid #243348;
 outline-offset: 0;
 z-index: 2;
}
.logic-a-view .game-mount.xp .la-rectangle-feedback {
 min-height: 0;
 margin: 7px auto;
 padding: 6px 9px;
 border: 1px solid #c6aa8e;
 border-radius: 6px;
 background: #fff5e7;
 color: #243348;
 font-size: .84rem;
 line-height: 1.4;
}
.logic-a-view .game-mount.xp[data-logic-game="rectangulos"] .pa-cell-clue:not(:empty) {
 border: 1px solid #86664c;
 border-radius: 50%;
 background: #fffaf2;
 padding: .3em;
 min-width: 1.65em;
}
.logic-a-view .game-mount.xp .la-rect-confirm:not(:disabled) {
 background: var(--accent,#ffbc79);
 color: #243348;
}

/* Puentes uses a surveyed map, with the count printed inside each island. */
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-board {
 width: min(100%, 410px);
 margin: 6px auto 10px;
 border: 1px solid #889b94;
 border-radius: 10px;
 background: #e6ede6;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-board .la-board {
 max-width: none;
 width: 100%;
 gap: 0;
 padding: 0;
 border: 0;
 background: transparent;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-legend {
 margin: 0 0 4px;
 color: #344d4c;
 font-size: .82rem;
 font-weight: 650;
 text-align: center;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-board line {
 stroke: #245348;
 stroke-width: 6;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-board .la-empty {
 background: transparent;
 border-color: transparent;
 opacity: 1;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-board .la-empty::before {
 content: "";
 width: 3px;
 height: 3px;
 border-radius: 50%;
 background: #859b8e;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-board .la-island {
 padding: 0;
 border: 2px solid #38534c;
 background: #fffbf2;
 color: var(--ink, #1b2940);
 font-size: clamp(.85rem, 4vw, 1.2rem);
 font-variant-numeric: tabular-nums;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-board .la-island-complete {
 background: #dce9d7;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-island-complete::after {
 position: absolute;
 top: 14%;
 left: 46%;
 width: 6px;
 height: 4px;
 border-left: 2px solid #38534c;
 border-bottom: 2px solid #38534c;
 content: "";
 transform: rotate(-45deg);
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-board .la-bridge-candidate {
 border-style: dashed;
 outline: 0;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-board .la-bridge-candidate:focus-visible {
 outline: 3px solid var(--ink, #1b2940);
 outline-offset: 2px;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-modes {
 gap: 4px;
 margin: 0 0 4px;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-modes[role="group"] .xp-btn {
 min-height: 44px;
 padding: 5px 8px;
 font-size: .8125rem;
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-modes .xp-btn[aria-pressed="true"] {
 background: var(--accent, #ffbc79) !important;
 box-shadow: inset 0 0 0 1px var(--ink, #1b2940);
}
.logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-hint-note:empty { display: none; }

/* Circuito cerrado keeps the stroke on a single axis between the vertices. */
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop-scroll {
 --loop-ink: #254e46;
 width: 100%;
 max-width: 420px;
 margin: 6px auto 0;
 padding: 0;
 overflow: auto;
 overscroll-behavior-x: contain;
 scrollbar-color: #526960 #f5eadc;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop-scroll .la-loop {
 grid-template-columns: repeat(var(--loop-tracks), minmax(0, 1fr));
 grid-auto-rows: 1fr;
 aspect-ratio: 1;
 width: 100%;
 min-width: calc(34px * var(--loop-tracks) + 2px);
 max-width: none;
 gap: 0;
 padding: 0;
 border: 1px solid #968976;
 border-radius: 9px;
 background: #f7ede1;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .pa .la-loop-scroll .la-loop {
 min-width: var(--loop-min);
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop > * {
 min-height: 0;
 aspect-ratio: auto;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-edge {
 position: relative;
 overflow: visible;
 border-radius: 4px;
 border: 1px solid #e2d3c3;
 background: #fffbf5;
 color: #68564b;
 line-height: 1;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-edge:hover:not(:disabled),
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-edge-active {
 border-color: #9b7452;
 background: #ffe2c3;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-edge-line {
 color: transparent;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-edge-line::before {
 position: absolute;
 z-index: 1;
 background: var(--loop-ink);
 pointer-events: none;
 content: "";
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-edge-horizontal.la-edge-line::before {
 inset: calc(50% - 2px) calc(-50% - 1px) auto;
 height: 4px;
 transform: none;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-edge-vertical.la-edge-line::before {
 inset: calc(-50% - 1px) auto calc(-50% - 1px) calc(50% - 2px);
 width: 4px;
 transform: none;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-edge-discarded { color: #773f35; }
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-edge:focus-visible {
 z-index: 2;
 outline: 3px solid var(--ink, #1b2940);
 outline-offset: -3px;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-dot {
 position: relative;
 z-index: 2;
 font-size: 0;
 color: transparent;
 pointer-events: none;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-dot::before {
 width: 5px;
 height: 5px;
 border: 1px solid transparent;
 border-radius: 50%;
 background: #788478;
 content: "";
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop-joined::before { background: var(--loop-ink); }
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop-open::before,
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop-legend::before {
 width: 9px;
 height: 9px;
 border: 2px solid #254e46;
 border-radius: 50%;
 background: #fffaf2;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop-branch::before {
 width: 10px;
 height: 10px;
 border: 2px dashed #863e35;
 border-radius: 2px;
 background: #fffaf2;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-loop-clue {
 font-size: clamp(.8rem, 3.4vw, 1.1rem);
 font-variant-numeric: tabular-nums;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-loop-related { background: #ffebd5; }
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop .la-loop-exceeded {
 background: #f8e0db;
 text-decoration: underline wavy;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] :is(.la-loop-legend,.la-loop-pan-caption) {
 margin: 5px auto 2px;
 color: #344d4c;
 font-size: .8125rem;
 text-align: center;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop-legend {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 6px;
}
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop-legend::before { content: ""; }
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-loop-panning { margin-block: 4px; }
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] :is(.la-loop-pan-caption,.la-loop-panning)[hidden] { display: none; }
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-modes { margin: 0 0 4px; }
.logic-a-view .game-mount[data-logic-game="circuito-cerrado"] .la-modes .xp-btn {
 min-height: 44px;
 padding: 5px 10px;
}

@media (max-width: 640px) {
 .logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-modes[role="group"] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
 }
 .logic-a-view .game-mount[data-logic-game="puentes"] .la-bridge-modes[role="group"] .xp-btn {
  font-size: .75rem;
  line-height: 1.25;
  padding: 4px 2px;
 }
}
/* Remaining Logic A boards */
.logic-a-view .xp.la .la-soko-pad {
 width: 100%;
 max-width: 340px;
 grid-template-columns: repeat(4,minmax(44px,1fr));
 gap: 5px;
}
.logic-a-view .xp.la .la-soko-pad .xp-btn { min-height: 44px; padding: 0; font-size: 1.25rem; }
.logic-a-view .xp.la .la-soko-input .la-board {
 max-width: 360px;
 margin: 8px auto;
 padding: 4px;
 gap: 2px;
 border: 1px solid #9c816a;
 border-radius: 6px;
 background: #c8ae94;
}
.logic-a-view .xp.la .la-soko-input .la-board.sa-cropped { border: 4px solid #273b52; }
.logic-a-view .xp.la .la-soko-input .la-board .xp-cell {
 position: relative;
 min-height: 0;
 padding: 0;
 border: 1px solid #cbb096;
 border-radius: 2px;
 background: #fff8ed;
 color: transparent;
}
.logic-a-view .xp.la .la-soko-input .la-board .la-wall {
 border-color: #273b52;
 background-color: #273b52;
 background-image: linear-gradient(#9cacc133 1px,transparent 1px),linear-gradient(90deg,#9cacc133 1px,transparent 1px);
 background-size: 66% 34%;
 color: transparent;
}
.logic-a-view .la-soko-input :is(.la-player,.la-crate,.la-goal)::before,
.logic-a-view .la-soko-input :is(.la-player,.la-crate-home)::after {
 position: absolute;
 content: '';
}
.logic-a-view .la-soko-input .la-player::before {
 inset: 15% 35% 54%;
 border-radius: 50%;
 background: #273b52;
}
.logic-a-view .la-soko-input .la-player::after {
 inset: 49% 25% 18%;
 border-radius: 48% 48% 27% 27%;
 background: #273b52;
}
.logic-a-view .la-soko-input .la-crate::before {
 inset: 12%;
 border: 2px solid #724622;
 border-radius: 3px;
 background: linear-gradient(45deg,transparent 44%,#905625 46% 51%,transparent 53%),linear-gradient(-45deg,transparent 44%,#905625 46% 51%,transparent 53%),#ffd4a7;
}
.logic-a-view .la-soko-input .la-goal::before {
 inset: 20%;
 border: 2px dashed #496759;
 border-radius: 50%;
}
.logic-a-view .xp.la .la-soko-input .la-board .la-crate-home { background: #ecf4e9 !important; }
.logic-a-view .la-soko-input .la-crate-home::before { border-color: #356451; background: #c7e2cb; }
.logic-a-view .la-soko-input .la-crate-home::after {
 inset: 33% 29% 37% 28%;
 transform: rotate(-45deg);
 border: solid #234e39;
 border-width: 0 0 3px 3px;
}
.logic-a-view .la-soko-input:focus-visible { outline: 2px solid #1b2940; outline-offset: 2px; border-radius: 5px; }

.logic-a-view .xp.la[data-logic-game="tangram-expres"] .la-tangram-picker {
 display: grid;
 gap: 5px;
 margin: 0 0 6px;
 min-width: 0;
}
.logic-a-view .xp.la .la-tangram-picker .la-tangram-picks {
 display: grid;
 grid-template-columns: repeat(7,minmax(0,1fr));
 gap: 3px;
 margin: 0;
}
.logic-a-view .xp.la .la-tangram-picker .la-tangram-picks .xp-btn {
 position: relative;
 min-width: 0;
 min-height: 44px;
 padding: 0;
 border-color: #a48768;
 font-size: 0;
}
.logic-a-view .la-tangram-picker .la-tangram-picks .xp-btn::before {
 content: attr(data-piece-number);
 font-size: .95rem;
 font-weight: 750;
}
.logic-a-view .xp.la .la-tangram-picker .la-tangram-picks .xp-btn[data-piece-state="fitted"] { background: #e1eee4; }
.logic-a-view .xp.la .la-tangram-picker .la-tangram-picks .xp-btn[data-piece-state="placed"] { border-style: dashed; }
.logic-a-view .la-tangram-picker .la-tangram-picks .xp-btn[data-piece-state="fitted"]::after {
 position: absolute;
 right: 3px;
 top: 4px;
 content: '✓';
 color: #245938;
 font-size: .65rem;
}
.logic-a-view .xp.la .ta-orientation-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.logic-a-view .xp.la .ta-orientation-tools .xp-btn { min-height: 44px; padding-inline: 8px; }
.logic-a-view .xp.la .ta-orientation-tools .la-tangram-pose { width: 34px; height: 34px; }
.logic-a-view .xp.la .ta-placement-tip { flex: 1; min-width: 5rem; color: #3b4656; font-size: .75rem; line-height: 1.25; }
.logic-a-view .xp.la[data-logic-game="tangram-expres"] .la-tangram {
 margin-inline: auto;
 border-radius: 7px;
 border-color: #a98f73;
 background: #fffaf0;
}
.logic-a-view .xp.la .la-tangram-tray { fill: #f3e6d7; stroke: #ac9175; }
.logic-a-view .la-tangram .ta-number {
 font-size: 22px;
 font-weight: 750;
 fill: #1b2940;
 text-anchor: middle;
 dominant-baseline: central;
 pointer-events: none;
}
.logic-a-view .la-tangram-piece[data-state="placed"] { stroke-dasharray: 6 3; }
.logic-a-view .la-tangram:focus-visible, .logic-a-view .ta-view:focus-visible { outline: 2px solid #1b2940; outline-offset: 2px; }
.logic-a-view .xp.la[data-logic-game="tangram-expres"] .ta-view:not(.ta-enlarged) { max-width: 100%; }
.logic-a-view .xp.la[data-logic-game="tangram-expres"] .ta-coordinates summary { min-height: 44px; align-content: center; }
@media (max-width: 480px) {
 .logic-a-view .xp.la .la-soko-input .la-board { max-width: clamp(210px,66vw,285px); }
 .logic-a-view .xp.la[data-logic-game="tangram-expres"] :is(.la-body > .la-tangram,.ta-view:not(.ta-enlarged) .la-tangram) { width: min(100%,clamp(210px,calc(90vw - 78px),305px)); }
 .logic-a-view .la-tangram .ta-number { font-size: 27px; }
}

/* Code breaker: a writable row above the filed attempts. */
.logic-a-view .xp.la[data-logic-game="codigo-secreto"] :is(.la-code-proposal,.la-code-log,.la-code-examples) {
 width: min(100%, 420px);
 margin-inline: auto;
}
.logic-a-view .xp.la .la-code-proposal {
 display: grid;
 gap: 5px;
 padding: 8px;
 border: 1px solid #ac8867;
 border-radius: 10px;
 background: #f4e5d5;
}
.logic-a-view .xp.la :is(.la-code-title,.la-arithmetic-title) {
 color: var(--ink);
 font-size: .875rem;
 text-align: left;
}
.logic-a-view .xp.la .la-code-proposal :is(.la-code,.la-code-palette) {
 gap: 4px;
 width: 100%;
 max-width: none;
 margin: 0;
}
.logic-a-view .xp.la .la-code-proposal .la-code .xp-cell {
 position: relative;
 min-width: 0;
 min-height: 48px;
 padding: 7px 2px 2px;
 border: 1px solid #a78a6f;
 border-radius: 6px;
 background: #fff9ef;
 color: var(--ink);
 font-size: clamp(1.15rem, 5vw, 1.6rem);
}
.logic-a-view .xp.la .la-code-proposal .la-code .xp-cell::before {
 position: absolute;
 inset: 2px auto auto 4px;
 color: #634833;
 content: attr(data-number);
 font-size: .65rem;
 font-weight: 700;
}
.logic-a-view .xp.la .la-code-proposal .la-code .xp-cell[aria-pressed="true"] {
 border-color: #704623;
 background: #ffd5ae !important;
 box-shadow: inset 0 0 0 1px #704623;
}
.logic-a-view .xp.la .la-code-proposal .la-code-active {
 margin: 0;
 color: #60462f;
 font-size: .8125rem;
 text-align: left;
}
.logic-a-view .xp.la .la-code-proposal .la-code-palette { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.logic-a-view .xp.la .la-code-palette .xp-btn { min-height: 44px; padding: 2px 0; }
.logic-a-view .xp.la .la-code-proposal .la-code-actions { gap: 4px; margin: 0; }
.logic-a-view .xp.la .la-code-proposal .la-code-actions .xp-btn { min-width: 0; padding: 4px 7px; }
.logic-a-view .xp.la .la-code-proposal .la-code-submit:not(:disabled) { background: #ffbc79; border-color: #735036; }
.logic-a-view .xp.la .la-code-proposal .la-code-submit:hover:not(:disabled) { background: #ffcc9b; }
.logic-a-view .xp.la .la-code-proposal > .xp-btn { justify-self: start; }
.logic-a-view .xp.la .la-code-log { margin-block: 12px 0; }
.logic-a-view .xp.la .la-code-empty { margin: 3px 0 5px; color: #60462f; font-size: .8125rem; }
.logic-a-view .xp.la .la-attempts {
 width: 100%;
 max-height: 15rem;
 margin: 3px 0 0;
 border: 1px solid #c9ac90;
 border-radius: 8px;
 background: #fff9ef;
 scrollbar-color: #9e7e63 #f4e5d5;
}
.logic-a-view .xp.la .la-attempts li { padding: 6px 8px; border-color: #d8bea4; }
.logic-a-view .xp.la .la-attempts li:nth-child(odd) { background: #fcf0e2; }
.logic-a-view .xp.la .la-attempts li:last-child { border-bottom: 0; }
.logic-a-view .xp.la .la-code-history,
.logic-a-view .xp.la .la-code-result { display: flex; flex-wrap: wrap; gap: 4px; }
.logic-a-view .xp.la .la-code-history-token {
 padding-inline: 4px;
 border: 1px solid #d2b9a0;
 border-radius: 4px;
 background: #fffaf3;
 color: var(--ink);
 font-size: .875rem;
 white-space: nowrap;
}
.logic-a-view .xp.la .la-code-result { margin-block-start: 4px; }
.logic-a-view .xp.la .la-code-clue {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 1px 6px;
 border-radius: 5px;
 font-size: .8125rem;
 font-weight: 700;
 line-height: 1.6;
}
.logic-a-view .xp.la .la-code-exact { color: #254c3c; background: #e2eee5; }
.logic-a-view .xp.la .la-code-misplaced { color: #694229; background: #f6e2cd; }
.logic-a-view .xp.la .la-code-clue::before {
 width: 9px;
 height: 9px;
 border: 2px solid currentColor;
 content: "";
}
.logic-a-view .xp.la .la-code-exact::before { border-radius: 50%; background: currentColor; }
.logic-a-view .xp.la .la-code-misplaced::before { transform: rotate(45deg); }
.logic-a-view .xp.la .la-code-rules { margin-block: 6px; color: var(--ink); font-size: .8125rem; }
.logic-a-view .xp.la :is(.la-code-examples,.la-code-challenge) summary { min-height: 44px; padding: 10px 0; color: var(--ink); }
@media (min-width: 720px) and (orientation: landscape) {
 .logic-a-view .game-surface[data-fullscreen] .la-selectable-level .la-body > .la-code-proposal { grid-column: 1; grid-row: 1 / span 3; }
}

/* Arithmetic: the working tiles, equation and spent originals. */
.logic-a-view .xp.la[data-logic-game="objetivo-24"] .la-arithmetic-work {
 display: grid;
 gap: 6px;
 width: min(100%, 440px);
 margin-inline: auto;
 padding: 8px;
 border: 1px solid #ac8867;
 border-radius: 10px;
 background: #f4e5d5;
}
.logic-a-view .xp.la .la-arithmetic-goal {
 color: var(--ink);
 font-size: 1rem;
 font-weight: 800;
 text-align: left;
}
.logic-a-view .xp.la .la-arithmetic-work .la-cards { justify-content: start; gap: 4px; max-width: none; margin: 0; }
.logic-a-view .xp.la .la-arithmetic-work .la-number-card {
 min-height: 52px;
 border-color: #a78a6f;
 border-radius: 6px;
 background: #fff9ef;
 color: var(--ink);
}
.logic-a-view .xp.la .la-arithmetic-work .la-number-card.la-number-result {
 border-style: double;
 border-width: 3px;
 background: #fff0d8;
}
.logic-a-view .xp.la .la-arithmetic-work .la-number-card[aria-pressed="true"] {
 background: #ffbc79 !important;
 border-color: #735036;
 box-shadow: inset 0 0 0 1px #735036;
}
.logic-a-view .xp.la .la-arithmetic-selection {
 margin: 0;
 color: #60462f;
 font-size: .835rem;
 line-height: 1.35;
 text-align: left;
}
.logic-a-view .xp.la .la-arithmetic-work .la-arithmetic-ops {
 display: grid;
 grid-template-columns: repeat(4, minmax(0, 1fr));
 gap: 4px;
 margin: 0;
}
.logic-a-view .xp.la .la-arithmetic-ops .xp-btn { grid-column: span 2; min-width: 0; padding: 4px 6px; }
.logic-a-view .xp.la .la-arithmetic-ops .la-arithmetic-symbol {
 grid-column: span 1;
 background: #ffdcba;
 font-size: 1.25rem;
}
.logic-a-view .xp.la .la-arithmetic-ops .la-arithmetic-symbol:hover:not(:disabled) { background: #ffbc79; }
.logic-a-view .xp.la :is(.la-arithmetic-operation,.la-arithmetic-text-result) {
 padding: 5px 9px;
 border: 1px solid #c8a784;
 border-radius: 5px;
 background: #fffaf2;
 color: var(--ink);
 font-weight: 800;
 font-variant-numeric: tabular-nums;
 overflow-wrap: anywhere;
 text-align: left;
}
.logic-a-view .xp.la .la-arithmetic-spent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; }
.logic-a-view .xp.la .la-arithmetic-used {
 display: flex;
 flex-wrap: wrap;
 gap: 4px;
 margin: 0;
 padding: 0;
 list-style: none;
}
.logic-a-view .xp.la .la-arithmetic-used li {
 min-width: 27px;
 padding: 1px 4px;
 border: 1px dashed #9c8064;
 border-radius: 4px;
 color: #60462f;
 font-weight: 700;
 text-align: center;
 text-decoration: line-through;
}
.logic-a-view .xp.la :is(.la-arithmetic-text,.la-arithmetic-history) {
 width: min(100%, 440px);
 border-color: #c8a784;
 background: #fffaf2;
 color: var(--ink);
}
.logic-a-view .xp.la .la-arithmetic-history { padding: 0 12px; border: 1px solid #c8a784; border-radius: 10px; }
.logic-a-view .xp.la .la-arithmetic-text .la-expression {
 min-height: 44px;
 margin-block: 0 8px;
 padding: 7px 8px;
 border-color: #a78a6f;
 color: var(--ink);
 font-size: 1rem;
}
.logic-a-view .xp.la :is(.la-arithmetic-operation,.la-arithmetic-spent)[hidden],
.logic-a-view .xp.la .la-arithmetic-text-result:empty { display: none; }

/* Programa el robot */
.logic-a-view .game-mount[data-logic-game="programa-el-robot"] .la-robot-direction {
 margin: 0 0 5px;
 color: #233954;
 font-size: .875rem;
 font-weight: 700;
 text-align: center;
}
.logic-a-view .xp.la .la-robot-viewport .la-board {
 margin: 0 auto;
 background: #d3b79e;
 gap: 2px;
 padding: 3px;
}
.logic-a-view .xp.la .la-robot-viewport .xp-cell {
 min-width: 0;
 min-height: 0;
 padding: 0;
 aspect-ratio: 1;
 font-size: clamp(.9rem,4vw,1.4rem);
 line-height: 1;
 opacity: 1;
}
.logic-a-view .xp.la .la-robot-viewport .xp-cell.la-wall {
 background: #dec5ae;
 border-color: #ab8b6f;
 font-size: 0;
}
.logic-a-view .xp.la .la-robot-viewport .xp-cell.la-robot-unit {
 border: 2px solid #233954;
 border-radius: 50%;
 background: #233954;
 color: #fff6e5;
 font-weight: 800;
 box-shadow: inset 0 0 0 1px #8da0b6;
}
.logic-a-view .xp.la .la-robot-viewport .xp-cell.la-robot-goal {
 border-color: #a77741;
 background: #ffdeb0;
 color: #6e421f;
}
.logic-a-view .xp.la .la-robot-viewport .xp-cell.la-robot-origin {
 border: 1px dashed #76624f;
}
.logic-a-view .xp.la .la-robot-editor {
 width: min(100%,620px);
 margin: 0 auto;
}
.logic-a-view .xp.la .la-robot-editor h3 { margin: 10px 0 4px; }
.logic-a-view .xp.la :is(.la-robot-status,.la-robot-program) { margin: 4px 0; }
.logic-a-view .xp.la .la-robot-write {
 display: grid;
 grid-template-columns: repeat(3,minmax(0,1fr));
 gap: 5px;
 margin: 0;
 padding: 0;
 border: 0;
}
.logic-a-view .xp.la .la-robot-write .xp-btn { padding-inline: 4px; }
.logic-a-view .xp.la .la-robot-write .xp-btn:nth-child(n+4) { grid-column: 1 / -1; }
.logic-a-view .xp.la .la-robot-program .la-robot-card {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 min-height: 44px;
 padding: 5px 7px;
 background: #fff9ef;
}
.logic-a-view .xp.la .la-robot-card-number {
 display: inline-grid;
 min-width: 1.25rem;
 height: 1.25rem;
 padding-inline: 2px;
 place-items: center;
 border: 1px solid #9b7f64;
 border-radius: 4px;
 background: #fff9ef;
 color: #233954;
 font-variant-numeric: tabular-nums;
}
.logic-a-view .xp.la .la-robot-program .la-robot-current {
 border-style: dashed;
 border-color: #765231;
 box-shadow: none;
}
.logic-a-view .xp.la .la-robot-run {
 display: grid;
 grid-template-columns: minmax(3rem,1fr) minmax(0,2fr);
 gap: 6px;
 margin: 6px 0 0;
}
.logic-a-view .xp.la .la-robot-run .xp-btn:last-child:enabled {
 background: #ffbc79;
 color: #233954;
}

/* Espejos y rayos */
.logic-a-view .game-mount[data-logic-game="espejos-y-rayos"] .la-modes {
 display: grid;
 grid-template-columns: repeat(3,minmax(0,1fr));
 gap: 5px;
 margin: 0 auto 8px;
 width: min(100%,360px);
}
.logic-a-view .game-mount[data-logic-game="espejos-y-rayos"] .la-modes button {
 min-width: 0;
 padding: 3px;
 line-height: 1.2;
}
.logic-a-view .xp.la .la-mirror-board {
 margin: 0 auto;
 border-color: #a88b70;
 background: #fff9ef;
}
.logic-a-view .xp.la .la-mirror-board .la-board {
 gap: 0;
 padding: 0;
 border: 0;
}
.logic-a-view .xp.la .la-mirror-board .xp-cell {
 position: relative;
 padding: 0;
 border-color: #c7af96;
 border-radius: 0;
 font-size: clamp(.9rem,4vw,1.45rem);
 opacity: 1;
}
.logic-a-view .xp.la .la-mirror-board .xp-cell.la-wall {
 border-color: #62778b;
 background: #233954;
 color: #fff6e5;
}
.logic-a-view .xp.la .la-mirror-board .la-beam-symbol {
 position: relative;
 z-index: 2;
 display: inline-grid;
 width: 1.35em;
 height: 1.35em;
 align-content: center;
 border-radius: 4px;
 line-height: 1;
}
.logic-a-view .xp.la .la-mirror-board .la-beam-mirror .la-beam-symbol {
 border: 1px solid #8593a5;
 background: #e3e9ee;
 color: #233954;
 font-weight: 800;
}
.logic-a-view .xp.la .la-mirror-board .la-beam-entry .la-beam-symbol { background: #e4ebe7; }
.logic-a-view .xp.la .la-mirror-board .la-beam-entry.la-beam-mirror .la-beam-symbol { background: #e3e9ee; }
.logic-a-view .xp.la .la-mirror-board .la-lit:not(.la-beam-mirror,.la-beam-entry,.la-wall) .la-beam-symbol { color: transparent; }
.logic-a-view .xp.la .la-mirror-board .la-beam-active { outline-color: #233954; }
.logic-a-view .xp.la .la-mirror-board .la-beam-exit:after,
.logic-a-view .xp.la .la-mirror-board .la-beam-entry:before {
 position: absolute;
 z-index: 3;
 display: grid;
 width: 1.2em;
 height: 1.2em;
 place-items: center;
 color: #233954;
 border: 1px solid #6e5742;
 background: #ffdcad;
 font-size: .72rem;
 line-height: 1;
 font-weight: 800;
 pointer-events: none;
}
.logic-a-view .xp.la .la-mirror-board .la-beam-entry:before { content: "E"; top: 2px; left: 2px; border-radius: 50%; }
.logic-a-view .xp.la .la-mirror-board .la-beam-exit:after { content: "S"; bottom: 2px; right: 2px; border-radius: 2px; }
.logic-a-view .xp.la .la-beam-preview { stroke: #73563c; stroke-width: .055; opacity: 1; }
.logic-a-view .xp.la .la-beam-fired { stroke: #8e421d; stroke-width: .09; }
.logic-a-view .xp.la .la-beam-turn { stroke: #8e421d; stroke-width: .045; }
.logic-a-view .xp.la .la-beam-ports {
 display: flex;
 gap: 14px;
 justify-content: center;
 margin: 6px 0 3px;
 color: #233954;
 font-size: .82rem;
 font-weight: 700;
}
.logic-a-view .xp.la .la-beam-feedback { min-height: 0; margin-block: 6px; }

@media (max-width: 640px) {
 .logic-a-view .game-surface[data-game="espejos-y-rayos"] .scoreboard { flex-wrap: nowrap; }
 .logic-a-view .game-surface[data-game="espejos-y-rayos"] .scoreboard .stats {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(auto-fit,minmax(45px,1fr));
  gap: 6px;
 }
 .logic-a-view .game-surface[data-game="espejos-y-rayos"] .scoreboard .stat { min-width: 0; }
 .logic-a-view .game-surface[data-game="espejos-y-rayos"] .scoreboard .stat + .stat { padding-inline-start: 6px; }
 .logic-a-view .game-surface[data-game="espejos-y-rayos"] .scoreboard .restart { flex: none; padding-inline: 6px; }
 .logic-a-view .game-surface:not([data-fullscreen]) .xp.la .la-robot-viewport .la-board {
  width: min(100%,calc(216px * var(--robot-ratio,1)));
 }
 .logic-a-view .game-surface:not([data-fullscreen]) .xp.la .la-mirror-board { max-width: 268px; }
}
@media (max-width: 360px) {
 .logic-a-view .game-surface:not([data-fullscreen]) .xp.la .la-mirror-board { max-width: 244px; }
}

/* Lógica B · superficie de juego y vocabulario de cada tablero */
.logic-b-view .game-surface:not([data-fullscreen]) .game-mount.logic-b-board {
  align-items: stretch;
  gap: 12px;
}
.logic-b-view .game-surface > .guide-launch { margin-block: 4px 8px; }
.logic-b-view .game-mount.logic-b-board .lb-stage { gap: 9px; }
.logic-b-view .game-mount.logic-b-board .lb-intro:empty,
.logic-b-view .game-mount.logic-b-board .lb-fleet-feedback:empty,
.logic-b-view .game-mount.logic-b-board .lb-fleet-proposal:empty,
.logic-b-view .game-mount.logic-b-board .lb-binary-feedback:empty { display: none; }
.logic-b-view .game-mount.logic-b-board :is(.lb-kakuro-feedback,.lb-binary-feedback,.lb-board-feedback) {
  min-height: 0;
  margin-block: 2px;
}
.logic-b-view .game-mount.logic-b-board .lb-intro { color: #4c493f; }
.logic-b-view .game-mount.logic-b-board .lb-board-options { margin-block: 0; }
.logic-b-view .game-mount.logic-b-board [hidden] { display: none; }

.logic-b-view .game-mount.logic-b-board .lb-visible-board {
  width: 100%;
  max-width: min(100%, calc(var(--lb-tracks) * 58px + 2px));
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border-radius: 6px;
  scroll-padding-inline: 3px;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board > :is(.lb-grid,.lb-sum-grid,.lb-galaxy-wrap) {
  width: 100%;
  min-width: calc(var(--lb-tracks) * 44px + 2px) !important;
  max-width: none;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board :is(.lb-grid,.lb-sum-grid) {
  gap: 0;
  padding: 0;
  margin: 0;
  border: 1px solid #696153;
  border-radius: 0;
  background: #efe4d5;
  align-items: stretch;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board :is(.lb-cell,.lb-count) {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #b7a99a;
  border-radius: 0;
  padding: 0;
  color: #1b2940;
  background: #fffaf3;
  font-size: clamp(17px, 4.9vw, 23px);
  box-shadow: none;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-count {
  color: #fff9ed;
  background: #283745;
  border-color: #66717a;
  font-size: .875rem;
  line-height: 1.15;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-fixed {
  color: #1b2940;
  background: #e8dece;
  text-decoration: underline 2px;
  text-underline-offset: .2em;
  font-weight: 800;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-cell:focus-visible {
  z-index: 1;
  outline: 3px solid #25496b;
  outline-offset: -5px;
  box-shadow: inset 0 0 0 5px #fffaf3;
}
.logic-b-view .game-mount.logic-b-board .xp-btn {
  color: #1b2940;
  background: #fffaf3;
  border-color: #8a7461;
  min-height: 44px;
}
.logic-b-view .game-mount.logic-b-board .xp-btn[aria-pressed="true"],
.logic-b-view .game-mount.logic-b-board .lb-check:not(:disabled) {
  background: #ffc38f !important;
  border-color: #735138;
  color: #1b2940;
}
.logic-b-view .game-mount.logic-b-board :is(button,summary):focus-visible {
  outline: 3px solid #25496b;
  outline-offset: 2px;
}
.logic-b-view .game-mount.logic-b-board .lb-palette {
  width: 100%;
  gap: 4px;
  margin: 0;
}
.logic-b-view .game-mount.logic-b-board .lb-pan-note {
  margin: 0;
  color: #4c493f;
  font-size: .81rem;
  line-height: 1.35;
}
.logic-b-view .game-mount.logic-b-board .lb-board-warning { color: #8b2c32; border-color: #8b2c32; }

/* Hitori y Binario · tachaduras y conflicto con signo de aviso */
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-hitori-line:not(.lb-black) { background: #f7ead8; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-black {
  background: #223244;
  color: #fffaf3;
  text-decoration: line-through 2px;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-black:focus-visible {
  outline-color: #ffcf9e;
  box-shadow: inset 0 0 0 5px #223244;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board :is(.lb-hitori-conflict,.lb-binary-conflict) {
  border: 2px dashed #a5383c;
  color: #82282e;
  background: #fbe6de;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-hitori-conflict.lb-black {
  background: #223244;
  color: #fffaf3;
  border-color: #f1a2a6;
}
.logic-b-view .game-mount.logic-b-board :is(.lb-hitori-conflict,.lb-binary-conflict)::after {
  content: "!";
  position: absolute;
  top: 1px;
  right: 2px;
  color: #862e34;
  background: #fff1eb;
  border-radius: 3px;
  padding: 0 2px;
  font: 800 11px/1.2 system-ui, sans-serif;
  text-decoration: none;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-entered {
  background: #edf1ee;
  color: #22483f;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-binary-selected {
  border-color: #735138;
  box-shadow: inset 0 0 0 2px #735138;
}
.logic-b-view .game-mount.logic-b-board .lb-binary-position { margin: 0; color: #4c493f; }

/* Kakuro · pistas por eje y cruce activo */
.logic-b-view .game-mount.logic-b-board .lb-kakuro-viewport .lb-kakuro-block {
  min-height: 44px;
  color: #fffaef;
  background: #283745;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
.logic-b-view .game-mount.logic-b-board .lb-kakuro-block span { min-width: 38px; font-size: .8125rem; }
.logic-b-view .game-mount.logic-b-board .lb-kakuro-viewport .lb-active-clue {
  background: #ffca9b;
  color: #1b2940;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-kakuro-line:not(.lb-fixed) { background: #ffeeda; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-kakuro-selected {
  box-shadow: inset 0 0 0 2px #845233;
  outline: 0;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-kakuro-selected:focus-visible {
  outline: 3px solid #25496b;
  outline-offset: -6px;
}
.logic-b-view .game-mount.logic-b-board[data-logic-game="kakuro-pequeno"] .lb-palette {
  max-width: 400px;
  display: grid;
  grid-template-columns: repeat(5,minmax(44px,1fr));
}
.logic-b-view .game-mount.logic-b-board .lb-kakuro-viewport .lb-kakuro-notes { font-size: .75rem; }

/* Islas y Flota · el símbolo se mantiene al cambiar de tono */
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-land { background: #e5eed9; color: #294739; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-sea { background: #e1edf1; color: #25475b; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-ship { background: #d1e0d8; color: #163f38; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-island-active { box-shadow: inset 0 0 0 2px #50704a; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-island-bad { border: 2px dashed #9e3539; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-fleet-selected,
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-domino-selected { box-shadow: inset 0 0 0 2px #825132; }
.logic-b-view .game-mount.logic-b-board .lb-fleet-viewport { scroll-padding-inline-start: 48px; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-fleet-row {
  position: sticky;
  left: 0;
  z-index: 2;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-fleet-col { padding: 1px; }
.logic-b-view .game-mount.logic-b-board[data-logic-game="flota-logica"] .lb-intro {
  align-self: center;
  margin: 0;
}

/* Regiones y Galaxias · un contorno por grupo y centros con capa propia */
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-edge-top { border-top: 2px solid #354758; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-edge-right { border-right: 2px solid #354758; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-edge-bottom { border-bottom: 2px solid #354758; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-edge-left { border-left: 2px solid #354758; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-region-board .lb-fixed { background: #e9dece !important; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-galaxy-wrap .lb-grid { max-width: none; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-galaxy-centers { inset: 1px; z-index: 3; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-center {
  width: 22px;
  height: 22px;
  border-color: #fff7e9;
  background: #213a4b !important;
  color: #fff !important;
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-center-active { box-shadow: 0 0 0 2px #b15c32; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-galaxy-fixed { text-decoration: underline; text-underline-offset: .15em; }

/* Dominós · borde sólido en el perímetro, unión discontinua */
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-paired {
  border: 2px solid #3e4650;
  font-size: clamp(15px, 4.2vw, 20px);
}
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-domino-right { border-right: 1px dashed #3e4650; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-domino-left { border-left: 1px dashed #3e4650; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-domino-down { border-bottom: 1px dashed #3e4650; }
.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-domino-up { border-top: 1px dashed #3e4650; }
.logic-b-view .game-mount.logic-b-board .lb-domino-inventory { margin-block: 2px; }
.logic-b-view .game-mount.logic-b-board .lb-domino-used { color: #284737; }
@media (max-width: 440px) {
  .logic-b-view .game-surface:not([data-fullscreen]) .game-mount.logic-b-board { gap: 8px; }
  .logic-b-view .game-mount.logic-b-board .lb-stage { gap: 7px; }
  .logic-b-view .game-mount.logic-b-board .lb-palette .xp-btn { padding-inline: 6px; }
}

.logic-b-view .game-mount.logic-b-board .lb-visible-board .lb-entered.lb-binary-conflict {
  background: #fbe6de;
  color: #82282e;
}
.logic-b-view .game-mount.logic-b-board[data-logic-game="flota-logica"] .lb-visible-board .lb-count {
  font-size: clamp(.75rem, 3.5vw, .875rem);
}

.logic-b-view .game-mount.logic-b-board.lb-selectable-level .lb-kakuro-viewport { touch-action: pan-x pan-y; }
@media (min-width: 720px) and (orientation: landscape) {
  .logic-b-view .game-surface[data-fullscreen] .game-mount.logic-b-board.lb-selectable-level .lb-stage > .lb-board-scroll {
    grid-column: 1;
    grid-row: 1 / span 9;
    align-self: start;
    justify-self: center;
  }
}

/* Lógica B · Un solo trazo */
.xp.lb .lb-trace line { stroke: #82776a; stroke-width: 1.4; stroke-linecap: round; }
.xp.lb .lb-trace line.lb-trace-open { stroke: #85502f; stroke-width: 2; stroke-dasharray: 3 2; }
.xp.lb .lb-trace line.lb-trace-visited { stroke: #245b4d; stroke-width: 3.2; }
.logic-b-view .game-mount.logic-b-board .lb-trace {
  width: min(100%, 326px);
  border: 1px solid #ab9882;
  border-radius: 8px;
  background: #fffbf4;
}
.logic-b-view .game-mount.logic-b-board .lb-node {
  width: 44px;
  height: 44px;
  border-color: #263747;
  color: #1b2940;
  background: #fffaf3;
  font-variant-numeric: tabular-nums;
}
.logic-b-view .game-mount.logic-b-board .lb-node.xp-selected { background: #ffca98 !important; border-width: 3px; }
.logic-b-view .game-mount.logic-b-board .lb-node.lb-trace-free { outline: 2px dashed #85502f; outline-offset: 2px; }
.logic-b-view .game-mount.logic-b-board .lb-node:focus-visible {
  z-index: 2;
  outline: 3px solid #25496b;
  outline-offset: 3px;
  box-shadow: inset 0 0 0 2px #fffaf3;
}
.logic-b-view .game-mount.logic-b-board .lb-trace-status {
  width: min(100%, 326px);
  min-height: 0;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #d6c1ac;
  border-radius: 6px;
  background: #fffaf3;
  color: #1b2940;
}


/* Lógica B · selección, destinos y comparaciones */
.logic-b-view .game-mount.logic-b-board :is(.lb-choice,.lb-direction,.lb-digit,.lb-color,.lb-number,.lb-cell):focus-visible {
  position: relative;
  z-index: 2;
  outline: 3px solid #25496b;
  outline-offset: -4px;
}
.logic-b-view .game-mount.logic-b-board :is(.lb-vehicle-feedback,.lb-arrow-feedback):empty { display: none; }
.logic-b-view .game-mount.logic-b-board :is(.lb-vehicle-status,.lb-stick-status,.lb-flood-feedback,.lb-arrow-feedback,.lb-vehicle-feedback) {
  min-height: 0;
  margin: 0;
  color: #1b2940;
}
.logic-b-view .game-mount.logic-b-board .lb-vehicle-board,
.logic-b-view .game-mount.logic-b-board .lb-arrow-board {
  border: 1px solid #8a7968;
  border-radius: 6px;
  background: #f0e4d6;
}
.logic-b-view .game-mount.logic-b-board .lb-vehicle-viewport { max-width: 355px; }
.logic-b-view .game-mount.logic-b-board .lb-vehicle-board .lb-parking {
  background: #f6eee2;
  color: #54493e;
  border: 1px solid #cabcad;
}
.logic-b-view .game-mount.logic-b-board .lb-vehicle-board .lb-car {
  color: #1b2940 !important;
  border-color: #6e776c;
}
.logic-b-view .game-mount.logic-b-board .lb-vehicle-board .lb-car[aria-pressed="true"] {
  background: #ffcd9f !important;
  border-color: #67412f;
}
.logic-b-view .game-mount.logic-b-board .lb-vehicle-board .lb-vehicle-target {
  background: #f8e7d2;
  outline: 2px dashed #775137;
  outline-offset: -5px;
}
.logic-b-view .game-mount.logic-b-board .lb-vehicle-board .lb-vehicle-exit:not(.lb-car) {
  color: #1b2940;
  background: #e5ebe3;
  box-shadow: inset -3px 0 #3d5e58;
  font-size: 22px;
}
.logic-b-view .game-mount.logic-b-board .lb-vehicle-board .lb-vehicle-blocker {
  outline: 2px dashed #942f35;
  outline-offset: -4px;
}
.logic-b-view .game-mount.logic-b-board .lb-movement { gap: 5px; margin: 0; }
.logic-b-view .game-mount.logic-b-board .lb-movement .lb-direction { font-size: 19px; padding: 4px 9px; }

.logic-b-view .game-mount.logic-b-board .lb-equation { gap: clamp(5px,2vw,10px); }
.logic-b-view .game-mount.logic-b-board .lb-digit {
  background: #fffaf3;
  border-color: #8a7461;
  min-height: 78px;
  width: clamp(52px,18vw,78px);
  padding: 4px 7px;
}
.logic-b-view .game-mount.logic-b-board .lb-digit svg { height: 66px; }
.logic-b-view .game-mount.logic-b-board .lb-digit[aria-pressed="true"] {
  background: #ffdbb6;
  box-shadow: inset 0 0 0 2px #735138;
}
.logic-b-view .game-mount.logic-b-board .lb-stick-editor {
  width: min(56vw, 190px);
  padding: 6px 10px;
  background: #fffaf3;
  border: 1px solid #ae9b87;
  border-radius: 6px;
}
.logic-b-view .game-mount.logic-b-board .lb-stick-editor .xp-label { margin: 0 0 4px; }
.logic-b-view .game-mount.logic-b-board .lb-stick-present { stroke: #233a47; }
.logic-b-view .game-mount.logic-b-board .lb-stick-inactive { stroke: #c0b3a5; stroke-dasharray: 2 4; }
.logic-b-view .game-mount.logic-b-board .lb-stick-slot { stroke: #725032; stroke-dasharray: 2 3; }
.logic-b-view .game-mount.logic-b-board :is(.lb-stick-slot,.lb-stick-inactive,.lb-stick-lifted) { stroke-linecap: butt; }
.logic-b-view .game-mount.logic-b-board .lb-stick-lifted { stroke: #8a492b; stroke-width: 5; stroke-dasharray: 5 4; }
.logic-b-view .game-mount.logic-b-board .lb-stick-editor [role="button"]:focus-visible .lb-stick-hit {
  fill: #ffbc7945;
  stroke: #25496b;
  stroke-width: 1.5;
}

.logic-b-view .game-mount.logic-b-board .lb-choices {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 5px;
}
.logic-b-view .game-mount.logic-b-board .lb-choice {
  min-height: 104px;
  padding: 5px;
  gap: 4px;
  background: #fffaf3;
  border: 1px solid #8a7461;
  border-radius: 6px;
}
.logic-b-view .game-mount.logic-b-board .lb-model .lb-shape { width: 112px; height: 112px; background: #efdcc8; }
.logic-b-view .game-mount.logic-b-board .lb-model .xp-label,
.logic-b-view .game-mount.logic-b-board .lb-choice .xp-label { margin: 0; color: #1b2940; }
.logic-b-view .game-mount.logic-b-board .lb-choice .lb-shape { background: #eee4d8; padding: 5px; }
.logic-b-view .game-mount.logic-b-board .lb-shape-block { background: #294950; }
.logic-b-view .game-mount.logic-b-board .lb-choice.lb-wrong {
  opacity: 1;
  background: #f8e6de;
  border: 2px dashed #893239;
}
.logic-b-view .game-mount.logic-b-board .lb-choice.lb-rotation-match {
  opacity: 1;
  background: #e4ede1;
  border: 2px solid #345b49;
}

.logic-b-view .game-mount.logic-b-board .lb-fold-steps {
  width: auto;
  padding-inline-start: 22px;
  align-self: center;
  color: #4c4034;
}
.logic-b-view .game-mount.logic-b-board .lb-fold-caption { margin: 0; color: #1b2940; }
.logic-b-view .game-mount.logic-b-board .lb-folded {
  grid-template-columns: repeat(var(--cols), minmax(0,30px));
  gap: 1px;
  padding: 2px;
  background: #94826d;
  border-radius: 3px;
}
.logic-b-view .game-mount.logic-b-board .lb-folded .lb-fold-cell {
  width: 30px;
  height: 26px;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #efe3d3;
  color: #1b2940;
}
.logic-b-view .game-mount.logic-b-board .lb-paper-viewport .lb-grid {
  gap: 0;
  padding: 0;
  margin: 0;
  background: #d8c8b6;
  border: 1px solid #88745e;
  border-radius: 0;
}
.logic-b-view .game-mount.logic-b-board .lb-paper-viewport .lb-cell {
  border-radius: 0;
  border: 1px solid #c1ae9b;
  background: #fffaf3;
  color: #1b2940;
}
.logic-b-view .game-mount.logic-b-board .lb-paper-viewport .lb-cell.lb-hole { background: #ffdbb6; color: #563923; }
.logic-b-view .game-mount.logic-b-board .lb-paper-viewport .lb-cell.lb-crease-col { border-left: 2px dashed #8e6142; }
.logic-b-view .game-mount.logic-b-board .lb-paper-viewport .lb-cell.lb-crease-row { border-top: 2px dashed #8e6142; }
@media (max-width: 350px) {
  .logic-b-view .game-mount.logic-b-board .lb-paper-viewport .lb-grid { width: min(100%, 220px); margin-inline: auto; }
}

.logic-b-view .game-mount.logic-b-board .lb-cube-art { background: #fffaf3; border: 1px solid #ad9b89; border-radius: 6px; }
.logic-b-view .game-mount.logic-b-board .lb-cube-art [data-cube-face="top"] { fill: #e0ebe2; }
.logic-b-view .game-mount.logic-b-board .lb-cube-art [data-cube-face="side"] { fill: #a5c4b1; }
.logic-b-view .game-mount.logic-b-board .lb-cube-art [data-cube-face="front"] { fill: #668c7e; }
.logic-b-view .game-mount.logic-b-board .lb-cube-art .lb-cube-active-layer {
  stroke: #693d28;
  stroke-width: 2;
}
.logic-b-view .game-mount.logic-b-board .lb-cube-art [data-cube-face="top"].lb-cube-active-layer { fill: #ffe0bd; }
.logic-b-view .game-mount.logic-b-board .lb-cube-art [data-cube-face="side"].lb-cube-active-layer { fill: #f4bb8f; }
.logic-b-view .game-mount.logic-b-board .lb-cube-art [data-cube-face="front"].lb-cube-active-layer { fill: #c88966; }
.logic-b-view .game-mount.logic-b-board .lb-cube-scene .lb-height-cell {
  background: #fffaf3;
  border: 1px solid #a08b77;
  color: #1b2940;
}
.logic-b-view .game-mount.logic-b-board .lb-cube-scene .lb-cube-filled {
  background: #f8d9b8;
  color: #593d2e;
  border: 2px solid #835d43;
}
.logic-b-view .game-mount.logic-b-board .lb-cube-layers { width: 100%; }
.logic-b-view .game-mount.logic-b-board .lb-cube-layers .xp-row { gap: 4px; margin: 2px 0; }
.logic-b-view .game-mount.logic-b-board .lb-cube-layers .xp-btn { padding: 6px 8px; }
@media (max-width: 600px) {
  .logic-b-view .game-surface:not([data-fullscreen]) .game-mount.logic-b-board .lb-cube-scene:has(.lb-cube-layers) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
    align-items: start;
    gap: 6px;
  }
  .logic-b-view .game-surface:not([data-fullscreen]) .game-mount.logic-b-board .lb-cube-layers .lb-height-map {
    grid-template-columns: repeat(var(--cols),minmax(18px,30px));
  }
  .logic-b-view .game-surface:not([data-fullscreen]) .game-mount.logic-b-board .lb-cube-layers .lb-height-cell {
    width: 100%;
    height: 30px;
    min-height: 0;
  }
}

.logic-b-view .game-mount.logic-b-board .lb-flood-grid {
  gap: 0;
  padding: 0;
  border: 1px solid #8d9c93;
  border-radius: 4px;
  background: #f4e6d7;
}
.logic-b-view .game-mount.logic-b-board .lb-flood-grid .lb-cell {
  border: 1px solid #a7a397;
  border-radius: 0;
  box-shadow: none;
}
.logic-b-view .game-mount.logic-b-board .lb-flood-grid .lb-edge-top { border-top: 3px solid #233b43; }
.logic-b-view .game-mount.logic-b-board .lb-flood-grid .lb-edge-right { border-right: 3px solid #233b43; }
.logic-b-view .game-mount.logic-b-board .lb-flood-grid .lb-edge-bottom { border-bottom: 3px solid #233b43; }
.logic-b-view .game-mount.logic-b-board .lb-flood-grid .lb-edge-left { border-left: 3px solid #233b43; }
.logic-b-view .game-mount.logic-b-board .lb-flood-grid .lb-flood-gain { outline: 2px dashed #735035; outline-offset: -5px; }
.logic-b-view .game-mount.logic-b-board .lb-flood-controls .lb-color {
  min-height: 54px;
  border-color: #7b725e;
}
.logic-b-view .game-mount.logic-b-board .lb-flood-controls .lb-flood-current { box-shadow: inset 0 0 0 2px #1b2940; }
.logic-b-view .game-mount.logic-b-board .lb-flood-controls .lb-color:focus-visible { outline-offset: 2px; }

.logic-b-view .game-mount.logic-b-board .lb-arrow-viewport { max-width: 340px; }
.logic-b-view .game-mount.logic-b-board .lb-arrow-board .lb-cell {
  position: relative;
  background: #fffbf4;
  color: #1b2940;
  border-radius: 0;
  border: 1px solid #bcae9f;
}
.logic-b-view .game-mount.logic-b-board .lb-arrow-board .lb-empty {
  opacity: 1;
  background: #eae3d8;
  color: #5a554d;
}
.logic-b-view .game-mount.logic-b-board .lb-arrow-board .lb-arrow-ray { background: #fbe7ce; }
.logic-b-view .game-mount.logic-b-board .lb-arrow-board .lb-arrow-origin { box-shadow: inset 0 0 0 2px #754e38; }
.logic-b-view .game-mount.logic-b-board .lb-arrow-board .lb-arrow-blocker {
  border: 2px dashed #962f37;
  outline: none;
}
.logic-b-view .game-mount.logic-b-board .lb-arrow-board .lb-arrow-blocker::after {
  content: "!";
  position: absolute;
  top: 4px;
  right: 6px;
  color: #842c31;
  font-size: .75rem;
  line-height: 1;
}
.logic-b-view .game-mount.logic-b-board .lb-arrow-ray-line { stroke: #865637; }


/* Cartas y estrategia · tapete y cartas de Pausorama */
.card-table-view {
  --table-felt: #123c38;
  --table-edge: #37675c;
  --table-paper: #fff8ec;
  --table-rail: #d9bfa5;
  --table-ink: #1b2940;
  --table-warm: #ffcf9f;
}
.card-table-view .game-mount.xp .ca-shell,
.card-table-view .game-mount.xp .ca-body { gap: 9px; }
.card-table-view .game-mount.xp .ca-shell { --ca-ink: var(--table-ink); }
.card-table-view .game-mount.xp .ca-shell > .xp-note:empty,
.card-table-view .game-mount.xp .ca-shell > .xp-tools:empty { display: none; }
.card-table-view .game-mount.xp .ca-shell > .xp-note { color: #4a544f; }
.card-table-view .game-mount.xp .ca-heading { margin: 0; font-size: 1rem; line-height: 1.25; }
.card-table-view .game-mount.xp .ca-felt {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--table-edge);
  border-radius: 12px;
  background: var(--table-felt);
  color: var(--table-paper);
}
.card-table-view .game-mount.xp .ca-felt :is(.ca-heading,.xp-label,.xp-note) { color: var(--table-paper); }
.card-table-view .game-mount.xp .ca-felt-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 3px 10px;
  color: #f4e4d1;
  font-size: .82rem;
}
.card-table-view .game-mount.xp .ca-paper-card {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1px;
  padding: 5px 4px;
  border: 1px solid var(--table-rail);
  border-radius: 6px;
  background: var(--table-paper);
  color: var(--table-ink);
  box-shadow: none;
  line-height: 1.1;
  overflow-wrap: normal;
}
.card-table-view .game-mount.xp .ca-paper-card:not(.ca-spanish):is([data-suit="0"],[data-suit="1"]) > .ca-face-suit { color: #8b342b; }
.card-table-view .game-mount.xp .ca-face-rank { font-size: 1.17rem; font-variant-numeric: tabular-nums; }
.card-table-view .game-mount.xp .ca-face-suit { font-size: .85rem; white-space: nowrap; }
.card-table-view .game-mount.xp .ca-spanish .ca-face-suit { font-size: .73rem; text-transform: capitalize; }
.card-table-view .game-mount.xp .ca-paper-card > .ca-cq-mark {
  position: absolute;
  inset: 4px 4px auto auto;
  color: #7c4630;
}
.card-table-view .game-mount.xp .ca-paper-card > .ca-cq-mark[data-suit="3"]::after { border-color: var(--table-paper); }
.card-table-view .game-mount.xp .ca-felt .xp-btn {
  min-height: 44px;
  color: var(--table-ink);
  background: var(--table-paper);
  border-color: var(--table-rail);
}
.card-table-view .game-mount.xp .ca-felt .xp-btn:not(:disabled):is(.ca-primary,.ca-golf-draw) { background: var(--table-warm); }
.card-table-view .game-mount.xp :is(.ca-paper-card,.ca-piece,.ca-domino).xp-selected {
  background: var(--table-warm);
  border-color: #683f2b;
  box-shadow: inset 0 0 0 2px #683f2b;
  outline: none;
}
.card-table-view .game-mount.xp .ca-shell :is(button,summary,select,[data-ca-scroll],.ca-golf-table):focus-visible {
  z-index: 3;
  outline: 3px solid #2c5a8d;
  outline-offset: -4px;
  box-shadow: inset 0 0 0 4px #fff8ec;
}
.card-table-view .game-mount.xp .ca-felt :is(button,[data-ca-scroll],.ca-golf-table):focus-visible { outline-color: #254d79; }
.card-table-view .game-mount.xp .ca-felt .ca-golf-table:focus-visible { outline-color: #ffcd9f; box-shadow: none; }

.card-table-view .game-mount.xp .ca-golf-field { display: grid; gap: 8px; }
.card-table-view .game-mount.xp .ca-golf-dock {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: end;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #538477;
}
.card-table-view .game-mount.xp .ca-golf-dock :is(.ca-golf-active,.ca-golf-reserve) { display: grid; gap: 5px; min-width: 0; }
.card-table-view .game-mount.xp .ca-golf-active .ca-paper-card {
  width: 77px;
  min-height: 56px;
  border: 2px solid #ffbf84;
}
.card-table-view .game-mount.xp .ca-golf-reserve .xp-tools {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
}
.card-table-view .game-mount.xp .ca-golf-reserve .xp-tools .xp-btn { flex: 0 1 auto; padding-inline: 8px; }
.card-table-view .game-mount.xp .ca-golf-reserve .ca-golf-draw:not(:disabled) {
  color: var(--table-ink);
  background: var(--table-warm);
  border-color: #eeb578;
}
.card-table-view .game-mount.xp .ca-golf-table {
  grid-template-columns: repeat(var(--golf-columns),minmax(0,1fr));
  gap: 4px;
  padding: 3px 1px 2px;
  margin: 0;
  background: transparent;
}
.card-table-view .game-mount.xp .ca-golf-table::after { content: none; }
.card-table-view .game-mount.xp .ca-golf-table .ca-column { min-width: 0; gap: 3px; }
.card-table-view .game-mount.xp .ca-golf-count {
  align-self: start;
  padding-inline: 2px;
  color: #f1dfc8;
  font-size: clamp(.63rem,2.5vw,.79rem);
  white-space: nowrap;
}
.card-table-view .game-mount.xp .ca-golf-table :is(.ca-paper-card,.ca-empty) {
  min-width: 0;
  min-height: 56px;
  width: 100%;
  border-radius: 5px;
}
.card-table-view .game-mount.xp .ca-golf-table .ca-empty { height: 56px; color: #f4e4d1; }
.card-table-view .game-mount.xp .ca-golf-table .ca-paper-card.ca-golf-link {
  border: 2px solid #ad6739;
  background: #ffddba;
}
.card-table-view .game-mount.xp .ca-golf-table .ca-paper-card.ca-golf-link::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border: 1px solid #8f4c33;
  border-radius: 50%;
}
@media (max-width: 360px) {
  .card-table-view .game-mount.xp .ca-felt { padding: 7px; }
  .card-table-view .game-mount.xp .ca-golf-table { gap: 3px; }
  .card-table-view .game-mount.xp .ca-golf-table:not([data-columns="5"]) .ca-face-rank { font-size: 1rem; }
}


/* Pirámide · cada fila descubierta mantiene su cara completa. */
.card-table-view .game-mount.xp .ca-pyramid-field { display: grid; gap: 5px; }
.card-table-view .game-mount.xp .ca-pyramid {
  --pyramid-gap: 2px;
  --pyramid-width: min(54px,calc((100% - (var(--pyramid-columns) - 1) * var(--pyramid-gap)) / var(--pyramid-columns)));
  max-width: 460px;
  margin-inline: auto;
  gap: 3px;
  padding: 2px 0;
}
.card-table-view .game-mount.xp .ca-pyramid-row { position: relative; gap: var(--pyramid-gap); }
.card-table-view .game-mount.xp .ca-pyramid-row + .ca-pyramid-row { margin-top: -15px; }
.card-table-view .game-mount.xp .ca-pyramid-row:has(.ca-pyramid-free) + .ca-pyramid-row { margin-top: 0; }
.card-table-view .game-mount.xp .ca-pyramid :is(.ca-paper-card,.ca-card-slot) {
  flex: 0 0 var(--pyramid-width);
  width: var(--pyramid-width);
  max-width: none;
  min-width: 0;
  min-height: 45px;
  height: 45px;
  padding: 3px 1px;
}
.card-table-view .game-mount.xp .ca-pyramid .ca-paper-card { gap: 0; }
.card-table-view .game-mount.xp .ca-pyramid .ca-face-rank { font-size: 1rem; }
.card-table-view .game-mount.xp .ca-pyramid .ca-face-suit { font-size: .83rem; }
.card-table-view .game-mount.xp .ca-pyramid .ca-pyramid-covered {
  opacity: 1;
  place-content: start center;
  border: 1px dashed #849e91;
  background: #d3ded3;
  color: #263d39;
}
.card-table-view .game-mount.xp .ca-pyramid .ca-pyramid-covered .ca-face-rank { font-size: .85rem; }
.card-table-view .game-mount.xp .ca-pyramid .ca-pyramid-covered .ca-face-suit { font-size: .68rem; }
.card-table-view .game-mount.xp .ca-pyramid .ca-pyramid-free { border-color: #fbd0a5; }
.card-table-view .game-mount.xp .ca-pyramid .ca-pyramid-revealed { border: 2px solid #bf713f; background: #ffe2c3; }
.card-table-view .game-mount.xp .ca-pyramid .ca-pyramid-revealed::after {
  content: "+";
  position: absolute;
  inset: 1px 3px auto auto;
  color: #753e22;
  font-size: .7rem;
  line-height: 1;
}
.card-table-view .game-mount.xp .ca-pyramid .ca-card-slot {
  border: 1px dashed #64897d;
  border-radius: 5px;
  color: #d1e3d7;
}
.card-table-view .game-mount.xp .ca-pyramid-dock {
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
}
.card-table-view .game-mount.xp .ca-pyramid-waste {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin: 0;
}
.card-table-view .game-mount.xp .ca-pyramid-waste :is(.ca-paper-card,.ca-card-slot) { min-height: 46px; height: auto; }
.card-table-view .game-mount.xp .ca-pyramid-dock .xp-tools { margin: 0; }
.card-table-view .game-mount.xp .ca-pyramid-dock .xp-btn:not(:disabled):first-child { background: var(--table-warm); border-color: #886344; }
.card-table-view .game-mount.xp .ca-pyramid-level .ca-pyramid-row + .ca-pyramid-row { margin-top: -7px; }
.card-table-view .game-mount.xp .ca-pyramid-level .ca-pyramid-row:has(.ca-pyramid-free) + .ca-pyramid-row { margin-top: 0; }

/* Póquer · una guía breve para la carta siguiente y las dos líneas que cruza. */
.card-table-view .game-mount.xp .ca-poker-field { display: grid; gap: 6px; }
.card-table-view .game-mount.xp .ca-poker-next {
  justify-content: space-between;
  min-height: 44px;
  border-bottom: 1px solid #538477;
  padding-bottom: 5px;
}
.card-table-view .game-mount.xp .ca-poker-next .ca-card {
  width: 58px;
  min-height: 46px;
  border: 2px solid #ffbf84;
}
.card-table-view .game-mount.xp .ca-poker-board {
  width: 100%;
  max-width: 440px;
  gap: 3px;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}
.card-table-view .game-mount.xp .ca-poker-board .ca-cell {
  min-height: 44px;
  aspect-ratio: auto;
  border-radius: 4px;
  padding: 2px;
}
.card-table-view .game-mount.xp .ca-poker-board .ca-face-rank { font-size: 1.03rem; }
.card-table-view .game-mount.xp .ca-poker-board .ca-face-suit { font-size: .74rem; }
.card-table-view .game-mount.xp .ca-poker-board .ca-poker-open {
  border: 1px dashed #8eb0a2;
  background: #214e47;
  color: #ffe8cc;
}
.card-table-view .game-mount.xp .ca-poker-board .ca-poker-open:focus-visible {
  outline-color: #ffd4a9;
  box-shadow: none;
}
.card-table-view .game-mount.xp .ca-poker-board .ca-poker-line {
  box-shadow: inset 0 0 0 2px #bd814f;
  outline: none;
}
.card-table-view .game-mount.xp .ca-poker-board .ca-poker-selected {
  color: var(--table-ink);
  background: var(--table-warm);
  border: 2px solid #70442a;
}
.card-table-view .game-mount.xp .ca-poker-info {
  min-height: 0;
  margin: 0;
  padding: 7px 9px;
  font-size: .85rem;
  border: 1px solid #d1bda8;
  border-radius: 6px;
  background: #fffaf2;
}
.card-table-view .ca-poker-result {
  padding: 10px;
  border: 1px solid #d0bda9;
  border-radius: 8px;
  background: #fff9ee;
  color: var(--table-ink);
}
.card-table-view .ca-poker-result :is(h3,h4,p) { margin: 0 0 6px; }
.card-table-view .ca-poker-axes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.card-table-view .ca-poker-axis {
  display: grid;
  align-content: start;
  gap: 4px;
  border-top: 1px solid #d1bda8;
  padding-top: 5px;
  font-size: .8rem;
  line-height: 1.35;
}
.card-table-view .ca-poker-axis h4 { font-size: .9rem; }

/* Escoba · mesa, mano y total elegido. */
.card-table-view .game-mount.xp .ca-escoba-board { gap: 7px; align-content: start; }
.card-table-view .game-mount.xp .ca-escoba-group .ca-cards { gap: 5px; min-height: 0; }
.card-table-view .game-mount.xp .ca-escoba-group > :is(.ca-heading,h3) { color: var(--table-paper); margin: 0; font-size: .94rem; }
.card-table-view .game-mount.xp .ca-escoba-hand {
  border-top: 1px solid #538477;
  padding-top: 6px;
}
.card-table-view .game-mount.xp .ca-escoba-group .ca-paper-card {
  min-width: 58px;
  min-height: 57px;
  max-width: none;
  padding: 10px 5px 4px;
}
.card-table-view .game-mount.xp .ca-escoba-group .ca-face-rank { font-size: clamp(.9rem,4vw,1.08rem); }
.card-table-view .game-mount.xp .ca-escoba .ca-capture-table {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.card-table-view .game-mount.xp .ca-escoba .ca-capture-table .ca-card { width: auto; }
.card-table-view .game-mount.xp .ca-escoba-panel { gap: 6px; grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.card-table-view .game-mount.xp .ca-escoba-goal { grid-column: 1 / -1; font-size: .85rem; color: #4d4b41; }
.card-table-view .game-mount.xp .ca-escoba-tally {
  justify-self: start;
  padding: 7px 8px;
  color: var(--table-ink);
  border: 1px solid #b69c83;
  border-radius: 6px;
  background: #fff8ec;
  font-weight: 800;
  white-space: nowrap;
}
.card-table-view .game-mount.xp .ca-escoba-tally.ca-sum-ready,
.card-table-view .game-mount.xp .ca-escoba-sum.ca-sum-ready { border: 2px solid #5d734f; background: #e7ecd8; }
.card-table-view .game-mount.xp .ca-escoba-panel .ca-primary { min-height: 44px; padding-inline: 8px; }
.card-table-view .game-mount.xp .ca-escoba-sum { padding: 8px; min-height: 0; }

/* Brisca · triunfo y turno junto a la baza. */
.card-table-view .game-mount.xp .ca-brisca-level .ca-body {
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--table-edge);
  border-radius: 12px;
  background: var(--table-felt);
}
.card-table-view .game-mount.xp .ca-brisca-level :is(.ca-level-field,.ca-level-hand) {
  gap: 5px;
  align-content: start;
  border: 0;
  padding: 0;
  background: transparent;
}
.card-table-view .game-mount.xp .ca-brisca-level .ca-level-hand .ca-heading { color: var(--table-paper); }
.card-table-view .game-mount.xp .ca-brisca-level .ca-level-field > .ca-heading { color: var(--table-paper); }
.card-table-view .game-mount.xp .ca-brisca-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; }
.card-table-view .game-mount.xp .ca-brisca-meta .ca-brisca-trump {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 3px 7px;
  border: 1px solid #e6b284;
  border-radius: 5px;
  background: #ffe5c7;
  color: #433026;
  font-size: .8rem;
}
.card-table-view .game-mount.xp .ca-brisca-trump > .ca-cq-mark { color: #7c4630; }
.card-table-view .game-mount.xp .ca-brisca-turn { margin: 0; color: #ffe6bd; font-size: .81rem; font-weight: 750; }
.card-table-view .game-mount.xp .ca-brisca-level .ca-trick {
  justify-content: flex-start;
  align-items: start;
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid #5b8072;
  border-radius: 6px;
  background: #204e46;
}
.card-table-view .game-mount.xp .ca-brisca-level :is(.ca-trick .xp-note,.ca-trick .xp-label,.ca-level-turn) { color: var(--table-paper); }
.card-table-view .game-mount.xp .ca-brisca-level .ca-level-turn { min-height: 0; margin: 0; font-size: .8rem; }
.card-table-view .game-mount.xp .ca-brisca-level .ca-tactical-card {
  position: relative;
  padding: 8px 5px 5px;
  min-height: 56px;
  background: var(--table-paper);
  color: var(--table-ink);
  border-color: var(--table-rail);
}
.card-table-view .game-mount.xp .ca-brisca-level .ca-tactical-card > .ca-cq-mark { position: absolute; top: 2px; right: 3px; color: #7c4630; }
.card-table-view .game-mount.xp .ca-brisca-level .ca-tactical-card > .ca-cq-mark[data-suit="3"]::after { border-color: var(--table-paper); }
.card-table-view .game-mount.xp .ca-brisca-level .ca-tactical-guide:not(:disabled),
.card-table-view .game-mount.xp .ca-brisca-level .ca-trick-winner:disabled { border: 2px solid #b8693c; background: #ffe0ba; }
.card-table-view .game-mount.xp .ca-brisca-level .ca-tactical-advice { color: #5a3926; font-size: .7rem; }
.card-table-view .game-mount.xp .ca-brisca-level .ca-level-hand > .ca-cards { gap: 5px; }

/* Cuatro rasgos · silueta, tamaño y raya sobre fichas claras. */
.card-table-view .game-mount.xp .ca-quarto-panel {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid #cbaa8c;
  border-radius: 9px;
  min-width: 0;
  background: #fff1dc;
}
.card-table-view .game-mount.xp .ca-quarto-panel:has(.ca-quarto-preview) {
  grid-template-columns: 58px minmax(0,1fr);
  align-items: center;
}
.card-table-view .game-mount.xp .ca-quarto-panel > :is(h3,p) { margin: 0; }
.card-table-view .game-mount.xp .ca-quarto-panel:has(.ca-quarto-preview) > :is(h3,.ca-quarto-traits) { grid-column: 2; }
.card-table-view .game-mount.xp .ca-quarto-panel .ca-quarto-preview {
  display: grid;
  place-items: center;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: stretch;
  min-height: 53px;
  padding: 3px;
  color: #203e40;
  border: 2px solid #8b5233;
  border-radius: 6px;
  background: #ffdbb4;
}
.card-table-view .game-mount.xp .ca-quarto-traits,
.card-table-view .game-mount.xp .ca-quarto-hint { font-size: .79rem; line-height: 1.35; color: #3e3932; }
.card-table-view .game-mount.xp .ca-quarto-panel > :is(.ca-quarto-hint,.xp-btn) { grid-column: 1 / -1; }
.card-table-view .game-mount.xp .ca-quarto-grid {
  width: min(100%,360px);
  margin: 0 auto;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--table-edge);
  border-radius: 10px;
  background: var(--table-felt);
}
.card-table-view .game-mount.xp .ca-quarto-grid .ca-cell {
  min-height: 45px;
  position: relative;
  border: 1px dashed #91aa9a;
  border-radius: 6px;
  background: #204c45;
  color: #ffead0;
}
.card-table-view .game-mount.xp .ca-quarto-grid .ca-filled,
.card-table-view .game-mount.xp .ca-quarto-grid :is(.xp-good,.ca-quarto-tried) { background: #fff5e6; color: #1e393c; border: 1px solid #d2b696; }
.card-table-view .game-mount.xp .ca-quarto-grid .xp-good { box-shadow: inset 0 0 0 2px #517552; background: #e4ecda; }
.card-table-view .game-mount.xp .ca-quarto-tried { border: 2px dashed #942e39 !important; }
.card-table-view .game-mount.xp .ca-quarto-tried::after {
  content: "×";
  position: absolute;
  inset: 0 3px auto auto;
  color: #862d33;
  font-weight: 800;
}
.card-table-view .game-mount.xp .ca-quarto-grid .ca-cell:focus-visible { outline-color: #ffcf9f; box-shadow: none; }
.card-table-view .game-mount.xp .ca-quarto-stock,
.card-table-view .game-mount.xp .ca-quarto-panel .ca-cards {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,62px));
  gap: 5px;
}
.card-table-view .game-mount.xp .ca-piece {
  min-width: 0;
  min-height: 48px;
  padding: 3px;
  border: 1px solid #ac927b;
  border-radius: 6px;
  color: #1d3a3b;
  background: #fff8ec;
}
.card-table-view .game-mount.xp .ca-token { min-height: 31px; gap: 3px; }
.card-table-view .game-mount.xp .ca-token-shape { width: 19px; height: 19px; background: #fff8ec; }
.card-table-view .game-mount.xp .ca-token-large .ca-token-shape { width: 27px; height: 27px; }
.card-table-view .game-mount.xp .ca-token-filled { background: #203e40; }

/* Dominó · extremos visibles aunque la cadena se desplace. */
.card-table-view .game-mount.xp .ca-domino-field { display: grid; gap: 6px; overflow: hidden; }
.card-table-view .game-mount.xp .ca-chain-ends {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.card-table-view .game-mount.xp .ca-domino-end {
  padding: 3px 5px;
  color: #402c21;
  background: #ffe0bf;
  border-radius: 4px;
  font-size: .75rem;
}
.card-table-view .game-mount.xp .ca-chain {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  min-height: 50px;
  width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid #709185;
  border-radius: 5px;
  background: #214f47;
  scrollbar-width: thin;
  scrollbar-color: #d0ad88 #214f47;
}
.card-table-view .game-mount.xp .ca-chain:focus-visible { outline-color: #ffc993; box-shadow: none; }
.card-table-view .game-mount.xp .ca-domino {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: stretch;
  align-content: stretch;
  justify-items: stretch;
  flex: 0 0 auto;
  min-width: 56px;
  min-height: 44px;
  padding: 0;
  border: 1px solid #d3b594;
  border-radius: 6px;
  color: #1c3042;
  background: #fff8ec;
  box-shadow: none;
}
.card-table-view .game-mount.xp .ca-domino-half { display: grid; place-items: center; padding-inline: 4px; }
.card-table-view .game-mount.xp .ca-domino-half:last-child { border-inline-start: 1px solid #a68c72; }
.card-table-view .game-mount.xp .ca-domino:disabled { color: #4b5852; background: #d9e0d4; border-style: dashed; }
.card-table-view .game-mount.xp .ca-domino:is(.ca-chain-left,.ca-chain-right) { border: 2px solid #e2ab78; }
.card-table-view .game-mount.xp .ca-chain-left .ca-domino-half:first-child,
.card-table-view .game-mount.xp .ca-chain-right .ca-domino-half:last-child { background: #ffe0bb; }
.card-table-view .game-mount.xp .ca-domino-hand { gap: 5px; align-items: start; }
.card-table-view .game-mount.xp .ca-domino-field .xp-tools { gap: 4px; margin: 1px 0 0; }
.card-table-view .game-mount.xp .ca-domino-field .xp-tools .xp-btn { padding-inline: 8px; }
.card-table-view .game-mount.xp :is(.ca-chain-cue,.ca-domino-move) { margin: 0; color: #fff1db; font-size: .81rem; line-height: 1.35; }
.card-table-view .game-mount.xp .ca-chain-cue { color: #e1d8c5; font-size: .74rem; }


/* En móvil los toques sucesivos siguen siendo acciones de juego. */
.card-table-view .game-mount.xp .ca-shell button,
.card-table-view .result-actions :is(button,a) { touch-action: manipulation; }
.card-table-view .game-mount.xp .ca-domino-field { grid-template-columns: minmax(0,1fr); }
.card-table-view .game-mount.xp .ca-domino-field .ca-chain { touch-action: pan-x pan-y; }
.card-table-view .game-mount.xp .ca-brisca-level .ca-trick .ca-card.ca-tactical-card {
  min-height: 45px;
  padding-block: 5px 3px;
}
@media (max-width: 360px) {
  .card-table-view .game-mount.xp .ca-brisca-level .ca-level-hand .ca-tactical-advice {
    max-width: none;
    font-size: .65rem;
    white-space: nowrap;
  }
  .card-table-view .game-mount.xp .ca-poker-field { gap: 4px; }
  .card-table-view .game-mount.xp .ca-poker-board { gap: 2px; }
  .card-table-view .game-mount.xp .ca-poker-next .ca-card { min-height: 44px; height: 44px; padding-block: 2px; }
  .card-table-view .game-surface[data-game="cuatro-rasgos"]:not([data-fullscreen]) .game-level-objective {
    font-size: .82rem;
    line-height: 1.35;
  }
  .card-table-view .game-mount.xp .ca-quarto-panel { padding: 6px; gap: 3px 6px; }
  .card-table-view .game-mount.xp .ca-quarto-panel .ca-quarto-preview { min-height: 47px; }
  .card-table-view .game-mount.xp .ca-quarto-grid { gap: 3px; }
  .card-table-view .game-mount.xp .ca-quarto-grid .ca-cell { min-height: 46px; height: 46px; aspect-ratio: auto; }
}

.card-table-view .game-mount.xp .ca-table-rule {
  margin: 0;
  color: var(--table-paper);
  font-size: .875rem;
  line-height: 1.35;
}
.card-table-view .game-mount.xp .ca-brisca-level .ca-brisca-status {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--table-rail);
  border-radius: 8px;
  background: var(--table-paper);
  color: var(--table-ink);
  font-size: .875rem;
  line-height: 1.4;
}

.card-table-view .game-mount.xp .ca-strategy-shell > .xp-note { text-align: start; }
.card-table-view .game-mount.xp .ca-strategy-shell .ca-body { min-width: 0; gap: 6px; }
.card-table-view .game-mount.xp .ca-strategy-shell :is(.ca-board,.ca-boxboard) {
  width: min(100%, 372px);
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  border-radius: 10px;
}
.card-table-view .game-mount.xp .ca-strategy-shell :is(.ca-cell,.ca-edge):focus-visible {
  outline: 3px solid var(--table-ink);
  outline-offset: -3px;
  box-shadow: inset 0 0 0 5px #fff8ec;
}
.card-table-view .game-mount.xp .ca-strategy-shell :is(.ca-level-status,.ca-dots-last,.ca-kalah-last,.ca-pawn-status) {
  margin: 0;
  color: var(--table-ink);
  font-size: .875rem;
  line-height: 1.35;
}

/* Reversi · disco sólido y disco de doble anillo sobre el tapete. */
.card-table-view .game-mount.xp .ca-reversi {
  padding: 5px;
  gap: 3px;
  border-color: var(--table-edge);
  background: var(--table-felt);
}
.card-table-view .game-mount.xp .ca-reversi .ca-cell {
  position: relative;
  padding: 0;
  border: 1px solid #617b70;
  border-radius: 5px;
  color: #173a34;
  background: #cbd9c9;
}
.card-table-view .game-mount.xp .ca-reversi .ca-cell.ca-legal {
  border: 2px dashed #5f402c;
  background: #ffdfb6;
  font-variant-numeric: tabular-nums;
}
.card-table-view .game-mount.xp .ca-reversi :is(.ca-black,.ca-white)::after {
  width: 68%;
  border-width: 2px;
  box-shadow: 0 2px 2px #20352c55;
}
.card-table-view .game-mount.xp .ca-reversi .ca-black::after { border-color: #162436; background: #24344b; }
.card-table-view .game-mount.xp .ca-reversi .ca-white::after {
  border-color: #556253;
  background: #fff8ec;
  box-shadow: inset 0 0 0 3px #e1d8c2, 0 2px 2px #20352c55;
}
.card-table-view .game-mount.xp .ca-reversi .ca-reversi-flipped {
  border: 2px dashed #653b26;
  background: #ffe0b9;
}

/* Puntos y cajas · el trazo continuo une los puntos; el libre es discontinuo. */
.card-table-view .game-mount.xp .ca-strategy-shell .ca-dots-board {
  grid-template-columns: repeat(7,minmax(0,1fr));
  grid-auto-rows: minmax(0,1fr);
  aspect-ratio: 1;
  gap: 0;
  padding: 4px;
  border: 1px solid #ccb69d;
  background: #fff4e4;
}
.card-table-view .game-mount.xp .ca-dots-board :is(.ca-dot,.ca-box,.ca-edge) {
  display: grid;
  position: relative;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
}
.card-table-view .game-mount.xp .ca-dots-board .ca-edge {
  border: 1px solid transparent;
  background: transparent;
  color: #3f5550;
}
.card-table-view .game-mount.xp .ca-dots-board .ca-dot::before {
  content: '';
  z-index: 1;
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #233b39;
}
.card-table-view .game-mount.xp .ca-dots-board .ca-edge::before {
  content: '';
  width: 82%;
  border-top: 2px dashed currentColor;
  pointer-events: none;
}
.card-table-view .game-mount.xp .ca-dots-board .ca-dots-vertical::before {
  width: 0;
  height: 82%;
  border: 0;
  border-left: 2px dashed currentColor;
}
.card-table-view .game-mount.xp .ca-dots-board .ca-edge.ca-drawn { color: #1d393b; background: transparent; }
.card-table-view .game-mount.xp .ca-dots-board .ca-edge.ca-drawn::before { border-style: solid; border-width: 3px; }
.card-table-view .game-mount.xp .ca-dots-board .ca-dots-horizontal.ca-drawn::before { width: calc(200% + 4px); }
.card-table-view .game-mount.xp .ca-dots-board .ca-dots-vertical.ca-drawn::before {
  position: absolute; height: calc(200% + 4px);
}
.card-table-view .game-mount.xp .ca-dots-board .ca-dots-selected {
  border: 2px solid #744523;
  background: #ffcf9f;
  color: #3b291e;
}
.card-table-view .game-mount.xp .ca-dots-board .ca-box.ca-human { background: #25534b; color: #fff8ec; }
.card-table-view .game-mount.xp .ca-dots-board .ca-box.ca-cpu {
  background: #efd5b4;
  color: #452d22;
  border: 1px dashed #795736;
}

/* Mancala · el número da el total y la marca indica el fin de la siembra. */
.card-table-view .game-mount.xp .ca-kalah-totals {
  display: grid;
  width: min(100%, 372px);
  margin-inline: auto;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
}
.card-table-view .game-mount.xp .ca-kalah-reserve {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 4px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid #ab8062;
  border-radius: 10px;
  color: #402c21;
  background: #f0dfc7;
  font-size: .8rem;
}
.card-table-view .game-mount.xp .ca-kalah-reserve strong { font-size: 1.25rem; line-height: 1; }
.card-table-view .game-mount.xp .ca-kalah-landing { grid-column: 1 / -1; font-size: .75rem; }
.card-table-view .game-mount.xp .ca-board.ca-kalah {
  gap: 3px;
  padding: 5px;
  border-color: #9d7453;
  background: #ab7957;
}
.card-table-view .game-mount.xp .ca-kalah-row {
  width: min(100%, 372px);
  margin: 0 auto;
  color: #563b28;
  font-size: .75rem;
  font-weight: 700;
}
.card-table-view .game-mount.xp .ca-kalah .ca-cell {
  position: relative;
  min-height: 44px;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 2px;
  border-radius: 10px;
  border: 1px solid #806044;
  color: #3d2a1e;
  background: #fff2dc;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}
.card-table-view .game-mount.xp .ca-kalah .ca-cell.ca-cpu { background: #ead3b9; }
.card-table-view .game-mount.xp .ca-kalah .ca-cell.xp-selected { background: #ffcf9f; border: 2px solid #533820; }
.card-table-view .game-mount.xp .ca-kalah-seeds {
  display: grid;
  grid-template-columns: repeat(3,4px);
  grid-auto-rows: 4px;
  gap: 2px;
  min-height: 10px;
}
.card-table-view .game-mount.xp .ca-kalah-seeds i { border-radius: 50%; background: #8c5532; }
.card-table-view .game-mount.xp .ca-kalah-shell .ca-kalah-destination {
  position: relative;
  outline: 2px dashed #673817;
  outline-offset: -4px;
  background: #ffdfac;
}
.card-table-view .game-mount.xp .ca-kalah .ca-kalah-destination::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: #663b23;
  transform: rotate(45deg);
}
.card-table-view .game-mount.xp .ca-kalah-prediction { padding: 6px; border: 1px solid #b78c68; border-radius: 6px; }

/* Peones · meta en damero y anillo independiente del foco. */
.card-table-view .game-mount.xp .ca-pawns .ca-pawn-viewport { width: min(100%, 372px); padding: 0; }
.card-table-view .game-mount.xp .ca-pawn-goal-label {
  margin: 0;
  padding: 3px 8px;
  border-radius: 6px 6px 0 0;
  color: #fff8ec;
  background: #254941;
  font-size: .8rem;
  font-weight: 750;
}
.card-table-view .game-mount.xp .ca-pawns .ca-board {
  border-radius: 0 0 9px 9px;
  border-color: #40655b;
  background: #365b52;
  gap: 3px;
  padding: 4px;
}
.card-table-view .game-mount.xp .ca-pawns .ca-cell { background: #eeebd9; border-color: #a4a68e; }
.card-table-view .game-mount.xp .ca-pawns .ca-pawn-goal {
  background: repeating-linear-gradient(135deg,#fae7c3 0 5px,#fff7e6 5px 10px);
  border-color: #98754c;
}
.card-table-view .game-mount.xp .ca-pawns .ca-pawn-advance { border: 2px dashed #3b4e47; }
.card-table-view .game-mount.xp .ca-pawns .ca-pawn-capture { border: 2px solid #953f2c; background: #ffe0ce; }
.card-table-view .game-mount.xp .ca-pawns .ca-cell.xp-selected { background: #ffcf9f; }
.card-table-view .game-mount.xp .ca-pawns .ca-cell.xp-selected::after {
  outline: 2px dashed #4e311c;
  outline-offset: 3px;
}
.card-table-view .game-mount.xp .ca-pawns .ca-pawn-last-to { box-shadow: inset 0 0 0 2px #1d3a3b; }
.card-table-view .game-mount.xp .ca-pawn-legend { color: #4b5c51; line-height: 1.35; }

/* Muros · los cantos gruesos ocupan la frontera que bloquean. */
.card-table-view .game-mount.xp .ca-walls {
  gap: 1px;
  padding: 4px;
  border-color: #746650;
  background: #ba9f7f;
}
.card-table-view .game-mount.xp .ca-walls .ca-cell {
  border-radius: 3px;
  border-color: #baaa90;
  color: #2c423c;
  background: #f5eddc;
}
.card-table-view .game-mount.xp .ca-walls .ca-wall-goal { background: #f4dfba; }
.card-table-view .game-mount.xp .ca-walls .ca-cell.ca-legal { background: #e1e9da; text-decoration: underline dotted; }
.card-table-view .game-mount.xp .ca-walls .ca-cell.xp-selected {
  background: #ffcf9f;
  box-shadow: inset 0 0 0 2px #563a24;
}
.card-table-view .game-mount.xp .ca-walls :is(.ca-wall-you,.ca-wall-rival) { position: relative; color: transparent; }
.card-table-view .game-mount.xp .ca-walls .ca-wall-you::before,
.card-table-view .game-mount.xp .ca-walls .ca-wall-rival::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(14px,5.2vw,22px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
.card-table-view .game-mount.xp .ca-walls .ca-wall-you::before { border-radius: 4px; background: #1b2940; }
.card-table-view .game-mount.xp .ca-walls .ca-wall-rival::after { border: 2px solid #784726; border-radius: 50%; background: #fff8ec; }
.card-table-view .game-mount.xp .ca-walls .ca-wall-you.ca-wall-rival::before { left: 30%; }
.card-table-view .game-mount.xp .ca-walls .ca-wall-you.ca-wall-rival::after { left: 70%; }
.card-table-view .game-mount.xp .ca-wall-actions { justify-content: center; margin: 0; gap: 5px; }
.card-table-view .game-mount.xp .ca-wall-actions button[aria-pressed="true"] {
  border-color: #715137;
  color: #402c21;
  background: #ffcf9f;
}

/* Torres · altura escrita, plataforma por pisos y dos siluetas de trabajador. */
.card-table-view .game-mount.xp .ca-towers { background: #4d625e; border-color: #344843; gap: 4px; padding: 5px; }
.card-table-view .game-mount.xp .ca-towers .ca-cell {
  --tower-base: #e7e2d3;
  position: relative;
  align-content: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #918c7e;
  border-radius: 6px;
  background: var(--tower-base);
  color: #273735;
  box-shadow: none;
}
.card-table-view .game-mount.xp .ca-towers .ca-height-1 { --tower-base: #f3ead9; box-shadow: inset 0 -4px #b6a080; }
.card-table-view .game-mount.xp .ca-towers .ca-height-2 {
  --tower-base: #f2e6ce;
  box-shadow: inset 0 -4px #a58c65, inset 0 -8px #d0b997;
}
.card-table-view .game-mount.xp .ca-towers .ca-height-3 {
  --tower-base: #ffe7b9;
  box-shadow: inset 0 -4px #8b704c, inset 0 -8px #af9166, inset 0 -12px #d7bd96;
}
.card-table-view .game-mount.xp .ca-towers .ca-height-4 { --tower-base: #56534c; color: #fff8ec; }
.card-table-view .game-mount.xp .ca-tower-token { width: 25%; min-width: 12px; aspect-ratio: 1; }
.card-table-view .game-mount.xp .ca-towers .ca-human .ca-tower-token { background: #20364c; border-radius: 3px 3px 5px 5px; }
.card-table-view .game-mount.xp .ca-towers .ca-cpu .ca-tower-token { border: 2px solid #733f24; border-radius: 50%; background: #fff8ec; }
.card-table-view .game-mount.xp .ca-towers .ca-cell.ca-legal { --tower-base: #e1ead8; border: 2px dashed #35584c; }
.card-table-view .game-mount.xp .ca-towers .ca-cell.ca-tower-build { --tower-base: #ffedcd; border-color: #805331; }
.card-table-view .game-mount.xp .ca-towers .ca-cell.xp-selected { --tower-base: #ffcf9f; border: 2px solid #805331; }
.card-table-view .game-mount.xp .ca-towers .ca-cell.xp-selected .ca-tower-token { outline: 2px dashed #69401f; outline-offset: 3px; }

/* Naval · lectura de sonar en el margen y formas propias para cada disparo. */
.card-table-view .game-mount.xp .ca-naval-radar { min-width: 0; }
.card-table-view .game-mount.xp .ca-naval-legend {
  width: min(100%, 372px);
  margin: 0 auto 4px;
  color: #24485a;
  font-size: .875rem;
  font-weight: 750;
}
.card-table-view .game-mount.xp .ca-strategy-shell .ca-naval-chart {
  padding: 4px;
  gap: 3px;
  border-color: #376779;
  background: #274c5d;
}
.card-table-view .game-mount.xp .ca-naval-level .ca-naval-chart {
  grid-template-columns: clamp(19px,6vw,32px) repeat(calc(var(--cols) - 1),minmax(0,1fr));
}
.card-table-view .game-mount.xp .ca-naval-scan { aspect-ratio: auto; min-height: 22px; color: #fff6e6; }
.card-table-view .game-mount.xp .ca-naval-chart .ca-cell {
  border-radius: 4px;
  border-color: #98aeb7;
  color: #24374a;
  background: #dceaf0;
}
.card-table-view .game-mount.xp .ca-naval-chart .ca-naval-water { color: #2c5669; background: #f2f7f7; }
.card-table-view .game-mount.xp .ca-naval-chart .ca-naval-hit { color: #732b22; background: #ffd7be; }
.card-table-view .game-mount.xp .ca-naval-chart :is(.ca-sunk,.ca-naval-ship) { color: #fff8ec; background: #21384e; }
.card-table-view .game-mount.xp .ca-naval-chart .ca-naval-marked { border: 2px dashed #365669; }
.card-table-view .game-mount.xp .ca-naval-controls { margin: 0; justify-content: center; }
.card-table-view .game-mount.xp .ca-naval-controls .ca-naval-start { background: #ffcf9f; border-color: #956f4d; }
@media (max-width: 360px) {
  .card-table-view .game-surface:not([data-fullscreen]) .game-mount.xp .ca-walls { max-width: 236px; }
}

/* Arcade: zona de juego, pausa y mandos comparten una columna en vertical. */
.arcade-board-view .xp.ac.ac-designed {
  --ac-ink: #1b2940;
  --ac-lime: #ffcf9f;
  --ac-mint: #fff3e3;
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-items: start;
  gap: 6px;
  width: min(100%, 620px);
  min-width: 0;
  margin-inline: auto;
}
.arcade-board-view .xp.ac.ac-designed > .ac-canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  border: 1px solid #506881;
  border-radius: 11px;
}
.arcade-board-view .xp.ac.ac-designed .ac-transport {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px 8px;
  padding: 4px;
  border: 1px solid #d5bfa7;
  border-radius: 9px;
  background: #fff8ec;
}
.arcade-board-view .xp.ac.ac-designed .ac-status {
  color: #344252;
  font-size: .8rem;
  font-weight: 700;
  flex: 1 1 auto;
}
.arcade-board-view .xp.ac.ac-designed .ac-status::before { background: #78644f; }
.arcade-board-view .xp.ac.ac-designed .ac-status[data-state="running"]::before {
  background: #2e6454;
  box-shadow: none;
}
.arcade-board-view .xp.ac.ac-designed .ac-status[data-state="paused"] { color: #673817; }
.arcade-board-view .xp.ac.ac-designed .ac-status[data-state="paused"]::before {
  width: 8px;
  height: 10px;
  border-radius: 0;
  background: linear-gradient(to right,#673817 0 2px,transparent 2px 6px,#673817 6px 8px);
}
.arcade-board-view .xp.ac.ac-designed :is(.ac-tools,.ac-controls) {
  min-width: 0;
  margin: 0;
  gap: 5px;
  align-items: center;
}
.arcade-board-view .xp.ac.ac-designed > :is(.ac-tools,.ac-controls):empty { display: none; }
.arcade-board-view .xp.ac.ac-designed :is(.ac-btn,.ac-play) {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #6c7b8b;
  border-radius: 8px;
  color: #1b2940;
  background: #fffdf7;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.2;
}
.arcade-board-view .xp.ac.ac-designed .ac-play { flex: 0 0 auto; }
.arcade-board-view .xp.ac.ac-designed .ac-play:not(:disabled):not([aria-pressed="true"]),
.arcade-board-view .xp.ac.ac-designed .ac-btn:is(.ac-action,.ac-attempt):not(:disabled,[aria-disabled="true"]) {
  border-color: #896346;
  background: #ffcf9f;
}
.arcade-board-view .xp.ac.ac-designed :is(.ac-btn,.ac-play):is(:disabled,[aria-disabled="true"]) {
  color: #53616b;
  border-color: #a8afb6;
  background: #f0eee9;
  opacity: 1;
}
.arcade-board-view .xp.ac.ac-designed :is(.ac-btn,.ac-play,.ac-canvas,.ac-range input):focus-visible {
  outline: 3px solid #253c54;
  outline-offset: 2px;
}
.arcade-board-view .xp.ac.ac-designed .ac-note,
.arcade-board-view .xp.ac.ac-designed > :is(.ac-rebound-hits,.ac-orbit-report) {
  min-width: 0;
  min-height: 0;
  margin: 0;
  color: #3c4d57;
  text-align: start;
  font-size: .875rem;
  line-height: 1.36;
}
.arcade-board-view .xp.ac.ac-designed :is(.ac-aim-angle,.ac-orbit-ring,.ac-gravity-direction,.ac-slalom-next,.ac-shield-signal) {
  padding: 4px 5px;
  border-radius: 4px;
  background: #efe4d7;
  color: #382e29;
  white-space: nowrap;
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.arcade-board-view .xp.ac.ac-designed.ac-lunar .ac-lunar-controls {
  grid-template-columns: minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr);
  align-items: stretch;
  justify-self: center;
}
.arcade-board-view .xp.ac.ac-designed.ac-lunar .ac-lunar-instruments {
  justify-content: center;
  gap: 3px 14px;
  margin: 0;
  padding: 2px 6px;
  font-size: .8rem;
}
.arcade-board-view .rebound-mode-area { max-width: 100%; }
.arcade-board-view .xp.ac.ac-designed.ac-rebound .ac-controls { align-items: end; }
.arcade-board-view .xp.ac.ac-designed .ac-adjust-group {
  display: grid;
  grid-template-columns: repeat(2,44px);
  gap: 2px 3px;
}
.arcade-board-view .xp.ac.ac-designed .ac-adjust-group span {
  grid-column: 1 / -1;
  color: #3c4d57;
  font-size: .8125rem;
  font-weight: 700;
  text-align: center;
}
.arcade-board-view .xp.ac.ac-designed .ac-adjust-group .ac-btn {
  width: 44px;
  padding-inline: 4px;
  font-size: 1.175rem;
}
.arcade-board-view .xp.ac.ac-designed .ac-crane-mode select { min-width: 0; max-width: 100%; }

@media (max-width: 430px) {
  .arcade-board-view .game-surface:not([data-fullscreen]) :is(.board-objective,.game-level-objective) {
    font-size: .85rem;
    line-height: 1.35;
  }
  .arcade-board-view .xp.ac.ac-designed :is(.ac-btn,.ac-play) {
    padding-inline: 7px;
    font-size: .8125rem;
  }
}
@media (max-width: 360px) {
  .arcade-board-view .game-surface:not([data-fullscreen]) > .scoreboard { flex-wrap: nowrap; }
  .arcade-board-view .game-surface:not([data-fullscreen]) .scoreboard .stats { min-width: 0; flex-wrap: nowrap; gap: 4px; }
  .arcade-board-view .game-surface:not([data-fullscreen]) .scoreboard .stat + .stat { padding-inline-start: 4px; }
  .arcade-board-view .game-surface:not([data-fullscreen]) .scoreboard .stat-label { letter-spacing: 0; }
  .arcade-board-view .game-surface:not([data-fullscreen]) .scoreboard .restart { flex: none; }
  .arcade-board-view .xp.ac.ac-designed .ac-status { min-width: 0; overflow-wrap: anywhere; }
}
@media (min-width: 720px) and (orientation: landscape) {
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-designed {
    width: 100%;
    grid-template-columns: minmax(0,var(--fullscreen-field)) minmax(210px,var(--fullscreen-dock));
    grid-template-rows: repeat(5,min-content);
    justify-content: center;
    gap: 7px 14px;
  }
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-designed > .ac-canvas {
    grid-column: 1;
    grid-row: 1 / 6;
  }
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-designed > .ac-transport { grid-column: 2; grid-row: 1; }
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-designed > .ac-controls { grid-column: 2; grid-row: 2; }
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-designed > .ac-tools { grid-column: 2; grid-row: 3; }
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-designed > :is(.ac-rebound-hits,.ac-orbit-report) { grid-column: 2; grid-row: 4; }
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-designed > .ac-note { grid-column: 2; grid-row: 5; }
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-lunar > .ac-lunar-instruments { grid-column: 1; grid-row: 1; }
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-lunar > .ac-canvas { grid-row: 2 / 6; }
}

.arcade-board-view .xp.ac.ac-designed > .ac-drawing-viewport {
  justify-self: center;
  min-width: 0;
  margin: 0;
}
.arcade-board-view .xp.ac.ac-designed .ac-drawing-viewport:not(.is-zoom) > .ac-canvas {
  margin: 0;
  max-width: 100%;
  border-color: #506881;
  border-radius: 10px;
}
.arcade-board-view .xp.ac.ac-designed .ac-drawing-viewport.is-zoom { touch-action: pan-x pan-y; }
.arcade-board-view .xp.ac.ac-designed .ac-drawing-viewport canvas { touch-action: none; }
.arcade-board-view .xp.ac.ac-designed .ac-shield-report {
  min-height: 0;
  margin: 0;
  color: #3c4d57;
  text-align: start;
  font-size: .875rem;
}
.arcade-board-view .game-mount .cw-field {
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
  border: 1px solid #506881;
  border-radius: 10px;
}
.arcade-board-view .game-mount .cw-level-panel { min-width: 0; padding: 5px; gap: 6px; }
.arcade-board-view .game-mount .cw-controls button {
  min-height: 44px;
  min-width: 44px;
  border-radius: 8px;
  padding: 5px 9px;
}
.arcade-board-view .game-mount .cw-controls .pa-primary {
  border-color: #896346;
  background: #ffcf9f;
  color: #1b2940;
}
.arcade-board-view .game-mount .cw-field:focus-visible,
.arcade-board-view .game-mount .cw-controls button:focus-visible {
  outline: 3px solid #253c54;
  outline-offset: 2px;
}

.perception-board-view .game-mount.xp {
  --pp-ink: #1b2940;
  --pp-lime: #ffcf9f;
}
.perception-board-view .game-mount :where(.pp-btn,.pp-primary,.pp-rhythm-start):focus-visible {
  outline: 3px solid #253c54;
  outline-offset: 2px;
}
.perception-board-view .game-mount :where(.pp-object,.pp-traveler,.pp-shadow-choice):focus-visible {
  outline: 3px solid #253c54;
  outline-offset: -3px;
}
@media (min-width: 720px) and (max-height: 450px) and (orientation: landscape) {
  .perception-board-view .game-surface[data-fullscreen] .pp-changes-level .pp-change-pair {
    max-width: min(100%, clamp(448px, calc((100dvh - 224px) * 20 / 7 + 8px), 640px));
    margin-inline: auto;
  }
}
@media (max-width: 430px) {
  .perception-board-view .game-surface:not([data-fullscreen]) :is(.board-objective,.game-level-objective) {
    font-size: .85rem;
    line-height: 1.35;
  }
  .perception-board-view .game-surface:not([data-fullscreen]) .scoreboard .stats {
    min-width: 0;
    gap: 4px;
  }
  .perception-board-view .game-surface:not([data-fullscreen]) .scoreboard .stat + .stat { padding-inline-start: 4px; }
}
@media (min-width:720px) and (orientation:landscape) {
  .arcade-board-view .game-surface[data-fullscreen][data-game] .xp.ac.ac-designed > .ac-drawing-viewport { grid-column: 1; grid-row: 1 / 6; }
}

/* La ficha de juego tiene una cabecera breve y una sola columna. */
.header:has(+ .game-view > .game-top) { display: none; }
body:has(> .game-view > .game-top) { background: #101929; }
.game-view.wrap {
  max-width: 1040px;
  padding-inline: clamp(10px,2.4vw,36px);
}
.game-view.arcade-board-view.wrap { max-width: 1180px; }
.game-view > .game-top {
  display: grid;
  grid-template-columns: minmax(94px,1fr) minmax(0,auto) minmax(94px,1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-block: 9px;
  color: #fff5e7;
}
.game-view > .game-top .game-heading {
  display: block;
  min-width: 0;
  margin: 0;
  text-align: center;
}
.game-view > .game-top .game-heading h1 {
  color: inherit;
  font-size: clamp(1.35rem,3vw,2.35rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}
.game-view > .game-top .memory-date { color: #ccd5e2; margin: 3px 0 0; font-size: .8125rem; }
.game-view > .game-top .back-link { justify-self: start; color: inherit; margin: 0; }
.game-view > .game-top .game-heading-actions { justify-self: end; display: flex; gap: 6px; margin: 0; }
.game-view > .game-top .game-header-icon {
  width: 44px;
  min-width: 44px;
  max-width: none;
  min-height: 44px;
  padding: 0;
  color: #fff5e7;
  background: #172338;
  border: 1px solid #71819a;
  border-radius: 9px;
  justify-content: center;
}
.game-view > .game-top .game-header-icon svg { width: 20px; height: 20px; pointer-events: none; }
.game-view > .game-top .game-header-icon:is(:hover,.active) { background: #ffcf9f; color: #1b2940; }
.game-view > .game-top :focus-visible { outline: 2px solid #ffd1a4; outline-offset: 3px; }
.game-view > .game-layout { display: block; }
.game-view .game-surface:not([data-fullscreen]) {
  width: 100%;
  min-height: 0;
  padding: clamp(9px,1.3vw,18px);
  border-radius: 13px;
}
.game-view .game-surface:not([data-fullscreen]) > .scoreboard { margin-block: 4px 9px; padding-block-end: 7px; }
.game-view .game-surface:not([data-fullscreen]) > .game-mount { min-height: 0; }
.game-view .game-surface > .game-mount > .game-loading { padding-block: 72px; }
.game-view .game-surface > :is(.board-objective,.classic-objective,.game-level-objective) {
  width: 100%;
  text-align: center;
}
.game-view .game-surface > .board-objective:not([hidden]) { margin: 0 auto; font-size: .875rem; }
.game-view .game-surface .game-message:empty { display: none; }
.game-support {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 2px clamp(4px,1.4vw,20px);
  width: 100%;
  margin: 12px auto 0;
  padding-block-start: 4px;
  border-top: 1px solid var(--warm-line);
}
.game-surface > .game-support { grid-column: 1 / -1; }
.game-support > details {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.game-support > details[open] { flex: 1 1 100%; }
.game-support > details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  padding: 7px 6px;
  color: var(--ink);
  background: transparent;
  border-radius: 5px;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.2;
  list-style: none;
}
.game-support > details > summary::-webkit-details-marker { display: none; }
.game-support > details:not(.game-levels) > summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.game-support > details[open]:not(.game-levels) > summary::after { transform: translateY(2px) rotate(225deg); }
.game-support .level-menu-heading strong { font: inherit; }
.game-support .level-menu-chevron { width: 6px; height: 6px; border-width: 1.5px; }
.game-support .game-levels:not([open]) .level-menu-total,
.game-support .game-levels:not([open]) .level-menu-current { display: none; }
.game-support .game-levels[open] > summary { width: 100%; }
.game-support .level-menu-panel { padding-inline: 0; }
.game-support .level-menu-current, .game-support .level-menu-count-label { color: var(--muted); }
.game-support .level-menu-total strong { color: var(--ink); }
.game-support .quick-help > :not(summary) { max-width: 70ch; margin-inline: 6px; }
.game-support .quick-help p { margin-block: 4px 10px; }
.game-support .guide-launch { margin-block: 8px; }
.game-support .game-aside {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr));
  align-items: start;
  gap: 12px;
}
.game-view > :is(.related,.local-note,.daily-note) { color: #fff5e7; }
.game-view > .related { color: #fff5e7; padding-block-end: 10px; }
.game-view > .related :is(.related-grid a,.related-grid p) { color: var(--ink); }
.game-view > .related > a { color: #ffd1a4; }
.game-view + .footer { color: #d7dce5; }
.game-view + .footer :is(.text-button,.text-link) { color: #d7dce5; }
.game-view + .footer .brand img { filter: brightness(0) invert(.94); }
.game-view > .local-note:empty { display: none; }

.arcade-board-view .game-surface:not([data-fullscreen]) .xp.ac.ac-designed,
.arcade-board-view .game-surface:not([data-fullscreen]) .game-mount .cw-field {
  width: min(100%, 1020px, max(620px, calc((100svh - 300px) * 10 / 7)));
  max-width: 100%;
}
.arcade-board-view .game-surface:not([data-fullscreen]) .xp.ac.ac-designed > .ac-transport {
  width: fit-content;
  max-width: 100%;
  justify-self: center;
}
.arcade-board-view .game-surface:not([data-fullscreen]) .xp.ac.ac-designed > .ac-note { justify-self: center; }
.arcade-board-view .game-surface:not([data-fullscreen]) .xp.ac.ac-designed > .ac-canvas {
  max-width: 100%;
  justify-self: center;
}

.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) {
  background: #151f31;
  color: #fff5e7;
  border-color: #455672;
}
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) :is(.scoreboard,.game-support,.stat + .stat) { border-color: #455672; }
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) :is(
  .stat-label,.board-objective,.game-level-objective,.game-message,.ac-note,.ac-status,.ac-lunar-mode,.quick-help
) { color: #d5deec; }
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) :is(.ac-instrument,.game-support > details > summary) { color: #fff5e7; }
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) .ac-instrument.ac-unsafe { color: #ffc098; }
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) :is(.level-menu-current,.level-menu-count-label,.level-menu-total strong) { color: #d5deec; }
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) :is(.level-menu-footer,.game-aside) { color: var(--ink); }
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) .level-menu-footer { padding-inline: 8px; background: var(--soft-surface); border-radius: 8px; }
.arcade-board-view .game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) .ac-lunar .ac-transport { padding: 0; border: 0; background: transparent; }
.arcade-board-view .game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) .ac-lunar .ac-transport .ac-status { color: #d5deec; }
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) :is(.ac-hold:not(.ac-action,:disabled),.restart,.ac-play[aria-pressed="true"]) {
  color: #fff5e7;
  background: #1d2b42;
  border-color: #76869f;
}
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) :is(.ac-hold:not(:disabled),.restart):is(:hover,:active) {
  color: #1b2940;
  background: #ffcf9f;
}
.game-surface[data-game="aterrizaje-lunar"]:not([data-fullscreen]) :is(.game-support,.scoreboard,.game-mount) :focus-visible { outline-color: #ffd1a4; }

@media (min-width: 460px) {
  .arcade-board-view .game-surface:not([data-fullscreen]) .xp.ac.ac-designed.ac-lunar { grid-template-columns: 1fr auto auto 1fr; }
  .arcade-board-view .game-surface:not([data-fullscreen]) .ac-lunar > :is(.ac-lunar-instruments,.ac-canvas,.ac-tools,.ac-note) { grid-column: 1 / -1; }
  .arcade-board-view .game-surface:not([data-fullscreen]) .ac-lunar > .ac-transport { grid-area: 3 / 2; }
  .arcade-board-view .game-surface:not([data-fullscreen]) .ac-lunar > .ac-lunar-controls { grid-area: 3 / 3; }
}
@media (min-width: 740px) {
  .classic-board-view .game-surface:not([data-fullscreen]) .merge-layout.merge-classic { width: min(100%, 450px); }
  .classic-board-view .game-surface:not([data-fullscreen]) .merge-layout.merge-classic > .merge-board { max-width: 100%; }
}

@media (max-width: 640px) {
  .game-view > .game-top { grid-template-columns: 44px minmax(0,1fr) auto; gap: 4px; padding-block: 5px; }
  .game-view > .game-top .back-link { width: 44px; justify-content: center; }
  .game-view > .game-top .back-link span { display: none; }
  .game-view > .game-top .game-heading-actions { gap: 4px; }
  .game-view .game-surface:not([data-fullscreen]) > .scoreboard { gap: 4px 7px; }
  .game-support > details > summary { padding-inline: 3px; gap: 6px; font-size: .8125rem; }
}

/* La escena usa la altura disponible y reserva los laterales para información y acciones. */
html:has(body > .play-room-view),
body:has(> .play-room-view) { background: #101929; }
.header:has(+ .play-room-view),
.play-room-view + .footer { display: none; }
#main.play-room-view {
  --room-background: #101929;
  --room-panel: #111f31;
  --room-control: #1d2b42;
  --room-text: #fff4e3;
  --room-muted: #c9d4e4;
  --room-accent: #ffb774;
  --room-rail: #be895d;
  --room-line: #607087;
  max-width: none;
  min-height: 100dvh;
  padding: 0;
  color: var(--room-text);
}
.play-room-view > .intro { padding-inline: 16px; }
.play-room-view > .intro :is(h1,h2,p) { color: inherit; }
.play-room-view > .adventure-position { margin: 0 auto; padding: 8px; max-width: 800px; color: var(--ink); }
.game-view.play-room-view > .play-room {
  --room-gap: clamp(8px,1vw,18px);
  --room-drawer-width: clamp(274px,28vw,390px);
  --room-board: max(180px,calc(100dvh - 74px));
  display: grid;
  grid-template-columns: minmax(142px,1fr) minmax(0,4fr) minmax(142px,1fr);
  gap: var(--room-gap);
  align-items: stretch;
  min-height: 100dvh;
  padding: max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  background: var(--room-background);
  color: var(--room-text);
}
.play-room:fullscreen { overflow: auto; }
.play-room-side {
  min-width: 0;
  min-height: 0;
  padding: clamp(12px,1.35vw,22px);
  border: 1px solid var(--room-rail);
  border-radius: 16px;
  background: var(--room-panel);
}
.play-room-left,
.play-room-right {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px,3.8vh,38px);
}
.play-room-left .game-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 0;
}
.game-view .play-room-left .game-heading {
  order: 2;
  width: 100%;
  display: block;
  margin: 0;
}
.game-view .play-room-left .game-heading h1 {
  color: var(--room-accent);
  font-size: clamp(1.65rem,2.4vw,2.65rem);
  line-height: 1;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.play-room-left:has(+ [data-game="2048"]) .game-heading h1 { font-size: clamp(2.6rem,4.2vw,4.8rem); }
.play-room-left .memory-date { color: var(--room-muted); }
.game-view .play-room-left .back-link {
  margin: 0;
  color: var(--room-text);
}
.play-room-left .back-link span { display: none; }
.play-room-left .game-heading-actions { display: flex; gap: 4px; margin: 0; }
.play-room-left .game-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  max-width: none;
  min-height: 44px;
  margin: 0;
  padding: 0;
  color: var(--room-text);
  background: var(--room-control);
  border: 1px solid var(--room-line);
  border-radius: 9px;
}
.play-room-left .game-header-icon[hidden] { display: none; }
.play-room-left .game-header-icon svg { width: 18px; height: 18px; pointer-events: none; }
.play-room-left .game-header-icon:is(:hover,.active) { background: var(--room-accent); color: var(--ink); }
.play-room-left > .scoreboard {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.play-room-left > .scoreboard:has(.stats:empty) { display: none; }
.play-room-left .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,64px),1fr));
  gap: 9px 5px;
  width: 100%;
}
.play-room-left .stat {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.play-room-left :is(.stat-label,.personal-record h2) {
  margin: 0 0 3px;
  color: var(--room-muted);
  font-size: clamp(.73rem,1.1vw,.94rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
}
.play-room-left :is(.stat strong,.record-value) {
  color: var(--room-text);
  font-family: var(--display);
  font-size: clamp(1.25rem,2.4vw,2.6rem);
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#main.play-room-view .play-room-left .personal-record {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 14px 0 0;
  border: 0;
  border-radius: 0;
  border-block-start: 1px solid var(--room-rail);
  background: transparent;
}
.play-room-left .personal-record .record-value { margin: 0; text-align: inherit; }
.play-room-left .record-description { display: none; }
.game-view.play-room-view .play-room .game-surface {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--room-text);
}
.game-view.play-room-view .play-room .game-surface > .game-mount {
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  gap: 6px;
}
.play-room .game-surface > :is(.game-message,.save-behavior) {
  min-height: 0;
  margin: 0;
  color: var(--room-muted);
  text-align: center;
}
.play-room .game-surface :is(.merge-move,.merge-save-note,.merge-milestone,.ac-status,.ac-instrument) { color: var(--room-muted); }
.play-room .game-surface .ac-instrument.ac-unsafe { color: #ffc098; }
.play-room .game-surface :is(.merge-milestone,.merge-move[data-initial]) { display: none; }
.game-view.play-room-view .play-room .game-surface .merge-layout {
  width: min(100%,var(--room-board));
  margin: 0 auto;
  grid-template-columns: minmax(0,1fr);
  gap: 6px;
}
.game-view.play-room-view .play-room .game-surface .merge-board {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(6px,1vw,16px);
  gap: clamp(5px,.85vw,13px);
  border-radius: clamp(12px,1.45vw,22px);
  border-color: #9d7e67;
  background: #a48d7b;
}
.play-room .merge-board .merge-tile:not([data-value="stone"]) {
  border-radius: clamp(6px,1vw,14px);
  font-size: clamp(1rem,min(13cqi,calc(29cqi / var(--digits,1))),6rem);
}
.play-room .merge-board .merge-tile[data-value="0"] { background: #b7a596; }
.play-room .merge-layout > .merge-move { grid-row: 2; text-align: center; }
.game-view.play-room-view .play-room .game-surface[data-game="2048"] .direction-pad,
.game-view.play-room-view .play-room[data-input="keyboard"] .game-surface .direction-pad,
.game-view.play-room-view .play-room[data-input="keyboard"] .ac-lunar-controls,
.play-room[data-input="touch"] .ac-pencil-key { display: none; }
.game-view.play-room-view .play-room .game-surface .snake-area,
.game-view.play-room-view .play-room .game-surface .memory-board:not([data-level-pairs="14"],[data-level-pairs="16"]),
.game-view.play-room-view .play-room .game-surface :is(.sudoku-board,.connect-board) {
  width: min(100%,max(180px,calc(var(--room-board) - 48px)));
  max-width: 100%;
}
.game-view.play-room-view .play-room .game-surface .snake-area { margin-inline: auto; }
.game-view.play-room-view .play-room .game-surface[data-game="serpiente"] > .game-mount {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.play-room .game-surface[data-game="serpiente"] .snake-area { flex-shrink: 0; }
.play-room .game-mount.snake-classic > .primary { flex: 0 1 124px; }
.play-room .game-mount.snake-classic > .secondary { flex: 0 1 auto; }
.play-room .game-surface .snake-canvas { width: 100%; max-width: none; }
.play-room .memory-showcase .memory-mark { max-width: 64px; }
.play-room .game-surface .number-pad > .control-button {
  color: var(--ink);
  background: #fff5e7;
  border-color: #b7a99a;
}
.play-room .game-surface .number-pad > .control-button:hover { background: var(--room-accent); }
.play-room-left:has(+ [data-game="cuatro-en-linea"]) .stat strong { font-size: clamp(1.05rem,1.55vw,1.6rem); }
.game-view.play-room-view .play-room .game-surface :is(.ac-canvas:not(.ac-drawing-zoom),.ac-drawing-viewport) {
  width: min(100%,calc(var(--room-board) * 1.25));
  max-width: 100%;
  margin-inline: auto;
}
.game-view.play-room-view .play-room .game-surface .ca-cinquillo { max-width: none; }
.play-room .game-surface .ca-cinquillo:not(.ca-cinquillo-level) {
  padding: clamp(8px,1.3vw,16px);
  border-radius: 14px;
  background: #fff5e7;
  color: var(--ink);
}
.play-room .game-surface .lb-visible-board:has([data-hitori-cell]) {
  width: min(100%, max(170px,calc(var(--room-board) - 145px)));
  max-width: none;
  margin-inline: auto;
}
.play-room .game-surface .lb-visible-board:has([data-hitori-cell]) .lb-grid {
  width: 100%;
  grid-template-columns: repeat(var(--cols),minmax(44px,1fr));
}
.play-room .game-surface .lb-visible-board [data-hitori-cell] {
  height: auto;
  aspect-ratio: 1;
  font-size: clamp(1.1rem,3vw,2.5rem);
}
.play-room .game-surface .xp:is([data-logic-game="hitori"],.ac-drawing) :is(.xp-note,.lb-first-action,summary,.ac-note,.xp-label,label:not(.ca-card)) { color: var(--room-muted); }
.play-room .game-surface .xp.ac-drawing :is(.ac-status,.ac-transport button,select) { color: var(--ink); }
.play-room .game-surface .wd-soup-game > :is(.wd-message,.wd-help,.wd-soup-mode-info,.xp-note,.xp-label,.xp-row > label) { color: var(--room-muted); }
.play-room .game-surface .wd-soup-game > .xp-row .xp-label { color: var(--room-muted); }
.play-room .game-surface .wd-soup-game .wd-soup-sticky { position: static; }
.play-room .result { margin: 0; padding: 12px 14px; color: var(--ink); }
.play-room .game-surface:has(> .result:not([hidden])) :is(.merge-feedback,.merge-move) { display: none; }
.play-room-objective { color: var(--room-muted); text-align: center; }
.game-view .play-room-objective > p { margin: 0; color: inherit; font-size: .875rem; line-height: 1.4; }
.play-room-objective :is(strong,span) { display: block; }
.play-room-objective strong { color: var(--room-text); margin-bottom: 4px; }
.play-room-objective:not(:has(> :not([hidden]))) { display: none; }
.play-room-input {
  display: grid;
  justify-items: center;
  gap: 9px;
  text-align: center;
  color: var(--room-text);
}
.play-room-input-label { margin: 0; font-size: clamp(.9rem,1.55vw,1.55rem); font-weight: 700; line-height: 1.15; }
.play-room-input-icon,
.play-room-input-icon svg { width: 28px; height: 28px; }
.play-room-input-icon { color: var(--room-accent); }
.play-room-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.play-room-keys kbd {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  min-height: 27px;
  padding: 3px;
  border-radius: 5px;
  color: var(--ink);
  background: var(--room-text);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1;
}
.play-room :is(.play-room-keys,.play-room-input-icon)[hidden] { display: none; }
.play-room-actions { display: grid; gap: 8px; }
.play-room-actions > :is(.restart,.play-room-drawer-trigger) {
  justify-content: center;
  width: 100%;
  min-height: 44px;
  max-width: none;
  padding: 6px 9px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--room-text);
  border: 1px solid var(--room-accent);
  border-radius: 9px;
  background: transparent;
}
.play-room-actions > .restart,
.play-room-actions > :is(.restart,.play-room-drawer-trigger):hover {
  background: var(--room-accent);
  color: var(--ink);
}
.play-room-actions > .restart-question { color: var(--ink); }
.play-room-right > .game-support { margin: 0; padding: 0; border-top-color: var(--room-line); }
.play-room-right .game-support > details { flex: 1; }
.play-room-right .game-support > details > summary,
.play-room-right .quick-help p,
.play-room-right .quick-help > .text-link { color: var(--room-text); }
.play-room-right .quick-help .advanced-help { color: var(--ink); }
.play-room-right .quick-help .advanced-help p { color: inherit; }
.play-room-right .daily-note { margin: 0; padding: 8px; color: var(--ink); }
.play-room :is(.play-room-side button,.play-room-side a,summary,.merge-board,.snake-canvas):focus-visible {
  outline: 2px solid var(--room-accent);
  outline-offset: 3px;
}

.play-room .play-room-levels:not([open]) { display: none; }
.play-room .play-room-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: var(--room-drawer-width);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) 12px;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--room-text);
  background: #101b2b;
  border: 0;
  border-inline-start: 1px solid var(--room-rail);
  border-radius: 0;
}
.play-room .play-room-drawer::backdrop { background: #09111c26; }
.play-room-levels-header {
  display: grid;
  grid-template-columns: minmax(0,1fr) 44px;
  align-items: center;
  gap: 2px 6px;
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--room-line);
}
.play-room-levels-header h2 {
  margin: 0;
  color: var(--room-accent);
  font: 700 clamp(1.75rem,4vw,2.65rem)/1.05 var(--display);
  letter-spacing: -.025em;
}
.play-room-levels-count { grid-column: 1 / -1; margin: 0; color: var(--room-muted); font-weight: 700; }
.play-room-levels-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--room-text);
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
}
.play-room-levels-close svg { width: 24px; height: 24px; pointer-events: none; }
.play-room-levels .level-menu-panel { padding: 0; }
.play-room-levels .level-menu-option {
  grid-template-columns: 34px minmax(0,1fr) auto;
  gap: 5px 8px;
  min-height: 52px;
  padding: 7px;
  color: var(--room-text);
  border-color: var(--room-line);
  background: transparent;
}
.play-room-levels .level-menu-number { background: var(--room-text); color: var(--ink); }
.play-room-levels .level-menu-option:is([aria-current="true"],[data-highlight],:hover) {
  border-color: var(--room-accent);
  background: #1c293c;
}
.play-room-levels .level-menu-option:is([aria-current="true"],[data-highlight]) .level-menu-number {
  color: var(--ink);
  background: var(--room-accent);
}
.play-room-levels .level-menu-status:not([hidden]) {
  grid-column: 2;
  grid-row: 2;
  color: var(--room-accent);
}
.play-room-levels .level-menu-option[data-completed="true"]::after {
  grid-column: 3;
  grid-row: 1;
  width: 10px;
  height: 6px;
  border: solid var(--room-accent);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
  content: '';
}
.play-room-levels :is(.level-menu-copy > span,.level-menu-footer p) { color: var(--room-muted); }
.play-room-levels .level-menu-play { display: none; }

@media (min-width: 1020px) and (orientation: landscape) and (pointer: fine) {
  .game-view.play-room-view > .play-room:is([data-levels-open],[data-themes-open]) {
    --room-board: max(160px,calc(100dvh - 96px));
    grid-template-columns: minmax(150px,1fr) minmax(0,4fr);
    padding-inline-end: calc(var(--room-drawer-width) + var(--room-gap));
  }
  .play-room:is([data-levels-open],[data-themes-open]) > .play-room-right { display: none; }
  .play-room .game-surface .wd-soup-game {
    max-width: min(100%,max(300px,calc(100dvh - 68px)));
  }
  .play-room .game-surface .wd-soup-content {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(112px,24%);
    gap: 8px;
    align-items: start;
  }
  .play-room .game-surface .wd-soup-content > .wd-board-viewport { grid-area: 1 / 1; }
  .play-room .game-surface .wd-soup-content > .wd-soup-sticky { grid-area: 1 / 2; }
}
@media (max-width: 739px), (orientation: portrait) {
  .game-view.play-room-view > .play-room {
    --room-board: max(160px,min(100vw,calc(100dvh - 195px)));
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: auto auto auto minmax(min-content,1fr) auto minmax(min-content,1fr) auto;
    align-items: center;
    gap: 6px;
    max-width: 740px;
    margin-inline: auto;
  }
  .play-room-side { display: contents; }
  .play-room-left .game-top {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,5fr) auto;
    gap: 4px;
  }
  .game-view .play-room-left .game-heading {
    grid-column: 2;
    order: 0;
    text-align: center;
  }
  .game-view .play-room-left .game-heading h1 { font-size: clamp(1.55rem,7vw,2.5rem); }
  .play-room-left:has(+ [data-game="2048"]) .game-heading h1 { font-size: clamp(1.75rem,8vw,2.75rem); }
  .play-room-left .game-heading-actions { grid-column: 3; }
  .play-room-left > .scoreboard {
    grid-area: 2 / 1;
    margin-inline-end: 78px;
    min-width: 0;
  }
  .play-room-left .stats { gap: 3px 4px; }
  #main.play-room-view .play-room-left .personal-record {
    grid-area: 2 / 1;
    justify-self: end;
    max-width: 78px;
    padding: 0 0 0 8px;
    border: 0;
    border-inline-start: 1px solid var(--room-rail);
    text-align: end;
  }
  .play-room-objective { grid-area: 3 / 1; align-self: start; }
  .play-room-objective > p { font-size: .8125rem; }
  .play-room:has([data-game="2048"][data-level="0"]) .play-room-objective { display: none; }
  .play-room-input {
    grid-area: 4 / 1;
    align-self: end;
    grid-auto-flow: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  .play-room-input-icon,
  .play-room-input-icon svg { width: 23px; height: 23px; }
  .play-room-input-label { font-size: .9rem; }
  .play-room .game-surface { grid-area: 5 / 1; align-self: center; }
  .game-view.play-room-view .play-room .game-surface :is(.snake-area,.memory-board,.sudoku-board,.connect-board) {
    width: min(100%,var(--room-board));
  }
  .play-room .game-surface .wd-soup-game { display: flex; flex-direction: column; }
  .play-room .game-surface .wd-soup-content { order: -1; }
  .play-room .game-surface .lb-visible-board:has([data-hitori-cell]) { width: min(100%,var(--room-board)); }
  .play-room-actions { grid-area: 6 / 1; align-self: end; display: flex; flex-wrap: wrap; }
  .play-room:has([data-game="2048"]) .play-room-actions { align-self: start; }
  .play-room-actions > :is(.restart,.play-room-drawer-trigger) { flex: 1 1 110px; width: auto; }
  .play-room-actions > .restart-question { flex: 1 1 100%; }
  .play-room-right > .game-support { grid-area: 7 / 1; }
  .play-room-right > .daily-note { grid-area: 8 / 1; }
}
@media (max-width: 739px), (orientation: portrait), (pointer: coarse) {
  .play-room .play-room-drawer {
    inset: auto 0 0;
    width: min(100%,580px);
    height: auto;
    max-height: 76dvh;
    margin-inline: auto;
    border: 1px solid var(--room-line);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
  }
  .play-room .play-room-drawer::backdrop { background: #09111c80; }
}

.memory-board[data-memory-theme="bosque"] { --memory-board-color: #dac09b; --memory-back-color: #263b32; }
.memory-board[data-memory-theme="espacio"] { --memory-board-color: #a4aec8; --memory-back-color: #192f51; }
.memory-board[data-memory-theme="papel"] { --memory-board-color: #edac83; --memory-back-color: #1b2940; }
.memory-board[data-memory-theme="dulces"] { --memory-board-color: #eab9cc; --memory-back-color: #482742; }
.memory-board[data-memory-theme="mar"] { --memory-board-color: #92c7c2; --memory-back-color: #183c51; }
.memory-board[data-memory-theme="tesoros"] { --memory-board-color: #d3b279; --memory-back-color: #403226; }
.memory-board[data-memory-theme="juguetes"] { --memory-board-color: #dfb985; --memory-back-color: #293d5d; }
.play-room .memory-board[data-memory-theme]:not([data-memory-theme="clasico"]) {
  background-color: var(--memory-board-color);
  border-color: var(--memory-board-color);
}
.play-room .memory-board[data-memory-theme] .memory-tile:not(.flipped) {
  background-color: var(--memory-back-color,var(--ink));
}
.memory-card-art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background-size: 400% 400%;
  background-repeat: no-repeat;
  border-radius: 6px;
  pointer-events: none;
}
.memory-tile.flipped:has(.memory-card-art) {
  padding: 3px;
  background-color: #fff5e3;
}
.memory-tile.matched:has(.memory-card-art) { border-color: #456954; box-shadow: inset 0 0 0 1px #456954; }
.memory-tile.matched:has(.memory-card-art)::after { z-index: 1; }
.play-room .play-room-memory-themes[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.play-room-memory-themes > .play-room-levels-header { flex: none; }
.memory-theme-options {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--room-line) transparent;
  margin: -3px;
  padding: 3px;
}
.memory-theme-option {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr) 12px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 72px;
  padding: 7px;
  border: 1px solid var(--room-line);
  border-radius: 11px;
  background: transparent;
  color: var(--room-text);
  font: inherit;
  line-height: 1.25;
  text-align: start;
}
.memory-theme-option:is([aria-pressed="true"],:hover) { border-color: var(--room-accent); background: #1c293c; }
.memory-theme-option:focus-visible { outline: 2px solid var(--room-accent); outline-offset: 2px; }
.memory-theme-option[aria-pressed="true"]::after {
  width: 10px;
  height: 6px;
  border: solid var(--room-accent);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
  content: '';
}
.memory-theme-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 7px;
  background: #fff5e3;
  color: var(--ink);
  font-size: 1.8rem;
}
.memory-theme-preview img { width: 100%; height: auto; border-radius: inherit; }
.memory-theme-copy { display: grid; gap: 3px; }
.memory-theme-copy > span,.memory-theme-notice { color: var(--room-muted); font-size: .875rem; }
.memory-theme-notice { flex: none; margin: 10px 0 0; }
.memory-theme-notice:empty { display: none; }
@media (min-width: 1020px) and (orientation: landscape) {
  .play-room:has(> [data-game="parejas"]) .play-room-left .stat-label { font-size: clamp(.73rem,6.6cqi,.94rem); }
  .play-room:is([data-levels-open],[data-themes-open]):has(> [data-game="parejas"]) .play-room-left .stats { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 739px), (orientation: portrait) {
  .play-room-actions:has(> .memory-theme-trigger) {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 6px;
  }
  .play-room-actions:has(> .memory-theme-trigger) > :is(.restart,.play-room-drawer-trigger) { width: 100%; min-width: 0; padding-inline: 5px; }
  .play-room-actions:has(> .memory-theme-trigger) > .restart-question { grid-column: 1 / -1; }
}
@media (min-width: 740px) and (orientation: landscape) and (max-height: 560px) {
  .game-view.play-room-view > .play-room {
    height: 100dvh;
    min-height: 0;
    grid-template-rows: minmax(0,1fr);
  }
  .play-room .play-room-side,
  .game-view.play-room-view .play-room .game-surface {
    justify-content: start;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  .play-room .play-room-side { gap: 10px; padding: 8px; }
  .game-view.play-room-view .play-room .game-surface > .game-mount { flex: none; }
  .play-room .game-surface .wd-soup-content {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(118px,29%);
    gap: 6px;
    align-items: start;
  }
  .play-room .game-surface .wd-soup-content > .wd-board-viewport { grid-area: 1 / 1; }
  .play-room .game-surface .wd-soup-content > .wd-soup-sticky { grid-area: 1 / 2; }
}

/* La consola lunar coloca los giros y el impulso bajo pulgares distintos. */
.play-room-view .play-room[data-input="touch"] .game-surface[data-game="aterrizaje-lunar"] .game-mount.ac-lunar {
  grid-template-columns: minmax(0,1fr);
  row-gap: 6px;
}
.play-room-view .play-room[data-input="touch"] .game-surface[data-game="aterrizaje-lunar"]
  .ac-lunar > :is(.ac-lunar-instruments,.ac-canvas,.ac-transport,.ac-lunar-touch,.ac-tools) {
  grid-area: auto / 1;
}
.play-room-view .play-room[data-input="touch"] .game-mount.ac-lunar .ac-transport .ac-play[aria-pressed="true"] {
  color: #fff4e3;
  border-color: #7d91ab;
  background: #263b56;
}
.play-room-view .play-room[data-input="touch"] .game-mount.ac-lunar .ac-lunar-touch {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(102px,1fr);
  gap: clamp(12px,4vw,24px);
  width: min(100%,480px);
  max-width: 100%;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid #536780;
  border-radius: 14px;
  background: #162337;
}
.play-room[data-input="touch"] .ac-lunar-touch .ac-lunar-steering {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 6px;
}
.play-room[data-input="touch"] .ac-lunar-touch .ac-lunar-steering[hidden] { display: none; }
.play-room-view .play-room[data-input="touch"] .game-mount.ac-lunar .ac-lunar-touch.ac-lunar-thrust-only {
  grid-template-columns: minmax(0,1fr);
}
.play-room-view .play-room[data-input="touch"] .game-mount.ac-lunar .ac-lunar-touch .ac-hold {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
  min-height: 66px;
  padding: 5px 3px;
  border: 1px solid #7d91ab;
  border-radius: 9px;
  color: #fff4e3;
  background: #263b56;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.15;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.play-room[data-input="touch"] .ac-lunar-touch .ac-hold svg {
  width: 24px;
  height: 24px;
  pointer-events: none;
}
.play-room-view .play-room[data-input="touch"] .game-mount.ac-lunar .ac-lunar-touch .ac-action {
  color: var(--ink);
  border-color: #ffd3a4;
  background: #ffbc7a;
}
.play-room-view .play-room[data-input="touch"] .game-mount.ac-lunar .ac-lunar-touch .ac-hold[data-held="true"] {
  color: #fffaf4;
  border-color: #fff4e3;
  background: #3c5371;
  box-shadow: inset 0 0 0 2px #ffd3a4;
}
.play-room-view .play-room[data-input="touch"] .game-mount.ac-lunar .ac-lunar-touch .ac-action[data-held="true"] {
  color: var(--ink);
  border-color: #fff4e3;
  background: #ffd7a8;
  box-shadow: inset 0 0 0 2px #1b2940;
}
@media (orientation: landscape) and (max-height: 560px) {
  .play-room-view .play-room[data-input="touch"] .game-surface[data-game="aterrizaje-lunar"] .ac-lunar .ac-canvas {
    width: min(100%,max(170px,calc((100dvh - 184px) * 1.4286)));
  }
}

/* Los tableros mantienen su color. Los textos que los rodean pertenecen a la sala. */
#main .play-room .game-mount :is(
  .mine-mode,.lights-title,.intruder-notice,.intruder-help,.classic-turn,.fifteen-guide,.reaction-help,.reaction-status,
  .la-route-status,.la-untangle-status,.la-untangle-legend,.la-bridge-legend,.la-loop-legend,
  .la-beam-feedback,.la-robot-status,.la-robot-direction,.la-code-title,.la-code-empty,.ta-placement-tip,
  .lb-intro,.lb-binary-position,.lb-vehicle-status,.lb-operator,.lb-flood-count,.lb-first-action,.ta-pose-state,
  .wd-anagram-remaining,.wd-puzzle-name,.wd-ladder-label,.wd-connection-rules,.wd-hang-session,
  .ca-level-status,.ca-kalah-row,.ca-pawn-mode-note,.ca-pawn-legend,.ca-naval-legend,.ca-naval-fleet,.card-save-note,
  .ca-dots-mode,.ca-kalah-select,.ca-poker-mode,.ca-escoba-mode-note,.ca-escoba-goal,
  .ac-crane-mode,.ac-rebound-hits,.ac-range,.ac-orbit-report,
  .pp-title,.pp-hint,.pp-rhythm-tempo,.pp-rhythm-mark,.pp-change-select,.pp-map-position,.pp-recognition-breakdown,
  .cw-target-label,.cw-readout
),
#main .play-room .game-mount :is(
  .la-body,.ca-shell:not(.ca-felt),.ca-body,.ca-naval-dock,.lb-stage,.lb-model,.lb-cube-scene,.lb-cube-layers,
  .wd-anagrams,.wd-wordle-game,.wd-ladder-vocabulary,.pp-memory-history,
  .ac-adjust-group,.ac-crane-group,.la-beam-ports,.pp-rhythm-chooser,.pp-precision-control
) > :is(.xp-note,.xp-label,.wd-help,.pp-note,label,summary),
#main .play-room .game-mount :is(.wd-wrap,.wd-ladder-feedback,.wd-hang-options) > .wd-help,
#main .play-room .game-mount :is(.wd-crossword-game,.wd-crypto-game,.wd-hangman,.wd-wrap:has(.wd-ladder-preview)) > .wd-message,
#main .play-room .game-mount .wd-ladder-caption > p,
#main .play-room .game-mount .ca-body > .ca-heading,
#main .play-room .game-mount .ca-pyramid-waste > :is(.ca-card-slot,.xp-label),
#main .play-room .game-mount :is(.xp-label,.wd-linked-gesture,.pp-recognition-manual,.pp-check,.ca-poker-preview,.ca-kalah-preview,.ca-escoba-learning) > span,
#main .play-room .game-mount :is(.ca-pawn-options,.ca-escoba-options,.xp-row) > label.xp-label,
#main .play-room .game-mount :is(.ac-tools,.pp-rhythm-chooser) > :is(label,.ac-instrument),
#main .play-room .game-mount .la-robot-editor > h3,
#main .play-room .game-mount :is(
  .lb-paper-demo,.lb-trace-lesson,.lb-kakuro-demo,.lb-galaxy-positions,.lb-board-options,
  .lb-stick-fallback,.lb-binary-progress,.la-robot-options,.wd-linked-bank,.wd-connection-archive,
  .ta-view-options,.ta-coordinates,.cw-level-options
) > :is(p,summary),
#main .play-room :is(.game-mount.ac-designed,.game-mount .ac-designed) > .ac-note,
#main .play-room .game-mount .ta-coordinates label,
#main .play-room .game-mount .pp-note.pp-memory-novelty,
#main .play-room .game-mount .shelf-mode-area > .pp-note,
#main .play-room .game-mount :is(.ac-adjust-group > span,.ac-crane-group > strong,.la-beam-ports > span,.lb-fold-steps > li) {
  color: var(--room-muted);
}
#main .play-room .game-mount :is(
  .ca-cinquillo:not(.ca-cinquillo-level) > .xp-note,.la-code-proposal > .la-code-title,
  .lb-mode-menu > summary,.la-arithmetic-history,.la-rectangle-feedback,.lb-trace-status,
  .pp-rhythm-advanced .pp-check > span,.wd-soup-sticky > .wd-puzzle-name
) { color: var(--ink); }
.play-room .game-mount :is(.la-body,.lb-stage,.ca-shell,.pp-body,.wd-wrap) :focus-visible {
  outline-color: var(--room-accent);
}
@media (min-width: 740px) and (min-height: 580px) and (orientation: landscape) {
  .game-view.play-room-view .play-room .game-surface :is(.mines-board,.mine-tools) {
    width: min(100%,max(180px,calc(var(--room-board) - 145px)));
    max-width: none;
  }
  .game-view.play-room-view .play-room .game-surface :is(.la-route-board,.la-untangle-board):not(.la-route-wide *) {
    width: min(100%,max(180px,calc(var(--room-board) - 235px)));
    max-width: none;
  }
}
@media (min-width: 740px) and (orientation: landscape) {
  .play-room-left { container-type: inline-size; }
  .game-view .play-room-left .game-heading h1 { font-size: clamp(1.38rem,14cqi,2.65rem); }
  .game-view .play-room-left:has(+ [data-game="2048"]) .game-heading h1 { font-size: clamp(2.6rem,4.2vw,4.8rem); }
}
