/* pages-games.css: Codex approved scoped page styles (pages-css-v1-*, approved by Claude 2026-10-21/22), merged 2026-10-22.
   One block per page, every rule scoped to that page's own panel id (no collisions between blocks or with pages-tens-intro.css).
   Change vs Codex: the onion-hero hide rule is scoped to the panel being shown, so the hero still shows during gameplay. NOT here: memory-intro, parent page (rejected). */

/* ---- tens-result (#tens-result) */
#screen-tens:has(#tens-result:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="tens"]:has(#tens-result:not([hidden]))>.onion-hero{display:none!important}
#tens-result:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#tens-result button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#tens-result button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#tens-result .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#tens-result .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#tens-result .tens-levels button{width:100%;font-size:12px;padding:4px}
#tens-result .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#tens-result .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#tens-result>button.big-btn{flex:0 0 25%}
#tens-result .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#tens-result .pop-medal img{width:70px;height:70px;object-fit:contain}
#tens-result .score{flex:0 0 26%;margin:0;font-size:14px}
#tens-result .score b{font-size:34px;color:#bc8650}
#tens-result .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#tens-result .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#tens-result .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#tens-result .stats dt{font-size:12px;color:#80718a}#tens-result .stats dd{font-size:19px;margin:0;color:#4b506d}
#tens-result .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#tens-result .actions button{min-width:130px}
#tens-result [hidden]{display:none!important}
@media(max-width:700px){#tens-result:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#tens-result .pop-how{font-size:12px;line-height:1.45}#tens-result .tens-levels{flex-basis:34%}#tens-result .pop-title{font-size:21px}#tens-result .pop-best{font-size:11px}}

#tens-result .pop-title,#tens-result .chip{color:#574f6b}

/* ---- pop-intro (#pop-setup) */
#screen-pop:has(#pop-setup:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="pop"]:has(#pop-setup:not([hidden]))>.onion-hero{display:none!important}
#pop-setup:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#pop-setup button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#pop-setup button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#pop-setup .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#pop-setup .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#pop-setup .tens-levels button{width:100%;font-size:12px;padding:4px}
#pop-setup .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#pop-setup .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#pop-setup>button.big-btn{flex:0 0 25%}
#pop-setup .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#pop-setup .pop-medal img{width:70px;height:70px;object-fit:contain}
#pop-setup .score{flex:0 0 26%;margin:0;font-size:14px}
#pop-setup .score b{font-size:34px;color:#bc8650}
#pop-setup .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#pop-setup .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#pop-setup .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#pop-setup .stats dt{font-size:12px;color:#80718a}#pop-setup .stats dd{font-size:19px;margin:0;color:#4b506d}
#pop-setup .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#pop-setup .actions button{min-width:130px}
#pop-setup [hidden]{display:none!important}
@media(max-width:700px){#pop-setup:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#pop-setup .pop-how{font-size:12px;line-height:1.45}#pop-setup .tens-levels{flex-basis:34%}#pop-setup .pop-title{font-size:21px}#pop-setup .pop-best{font-size:11px}}

#pop-setup .pop-title,#pop-setup .chip{color:#574f6b}

/* ---- pop-result (#pop-result) */
#screen-pop:has(#pop-result:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="pop"]:has(#pop-result:not([hidden]))>.onion-hero{display:none!important}
#pop-result:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#pop-result button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#pop-result button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#pop-result .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#pop-result .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#pop-result .tens-levels button{width:100%;font-size:12px;padding:4px}
#pop-result .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#pop-result .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#pop-result>button.big-btn{flex:0 0 25%}
#pop-result .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#pop-result .pop-medal img{width:70px;height:70px;object-fit:contain}
#pop-result .score{flex:0 0 26%;margin:0;font-size:14px}
#pop-result .score b{font-size:34px;color:#bc8650}
#pop-result .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#pop-result .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#pop-result .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#pop-result .stats dt{font-size:12px;color:#80718a}#pop-result .stats dd{font-size:19px;margin:0;color:#4b506d}
#pop-result .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#pop-result .actions button{min-width:130px}
#pop-result [hidden]{display:none!important}
@media(max-width:700px){#pop-result:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#pop-result .pop-how{font-size:12px;line-height:1.45}#pop-result .tens-levels{flex-basis:34%}#pop-result .pop-title{font-size:21px}#pop-result .pop-best{font-size:11px}}

#pop-result .pop-title,#pop-result .chip{color:#574f6b}

/* ---- memory-result (#mem-result) */
#screen-memory:has(#mem-result:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="memory"]:has(#mem-result:not([hidden]))>.onion-hero{display:none!important}
#mem-result:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#mem-result button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#mem-result button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#mem-result .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#mem-result .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#mem-result .tens-levels button{width:100%;font-size:12px;padding:4px}
#mem-result .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#mem-result .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#mem-result>button.big-btn{flex:0 0 25%}
#mem-result .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#mem-result .pop-medal img{width:70px;height:70px;object-fit:contain}
#mem-result .score{flex:0 0 26%;margin:0;font-size:14px}
#mem-result .score b{font-size:34px;color:#bc8650}
#mem-result .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#mem-result .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#mem-result .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#mem-result .stats dt{font-size:12px;color:#80718a}#mem-result .stats dd{font-size:19px;margin:0;color:#4b506d}
#mem-result .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#mem-result .actions button{min-width:130px}
#mem-result [hidden]{display:none!important}
@media(max-width:700px){#mem-result:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#mem-result .pop-how{font-size:12px;line-height:1.45}#mem-result .tens-levels{flex-basis:34%}#mem-result .pop-title{font-size:21px}#mem-result .pop-best{font-size:11px}}

#mem-result .pop-title,#mem-result .chip{color:#574f6b}

/* ---- space-intro (#sp-setup) */
#screen-space:has(#sp-setup:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="space"]:has(#sp-setup:not([hidden]))>.onion-hero{display:none!important}
#sp-setup:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#sp-setup button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#sp-setup button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#sp-setup .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#sp-setup .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#sp-setup .tens-levels button{width:100%;font-size:12px;padding:4px}
#sp-setup .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#sp-setup .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#sp-setup>button.big-btn{flex:0 0 25%}
#sp-setup .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#sp-setup .pop-medal img{width:70px;height:70px;object-fit:contain}
#sp-setup .score{flex:0 0 26%;margin:0;font-size:14px}
#sp-setup .score b{font-size:34px;color:#bc8650}
#sp-setup .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#sp-setup .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#sp-setup .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#sp-setup .stats dt{font-size:12px;color:#80718a}#sp-setup .stats dd{font-size:19px;margin:0;color:#4b506d}
#sp-setup .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#sp-setup .actions button{min-width:130px}
#sp-setup [hidden]{display:none!important}
@media(max-width:700px){#sp-setup:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#sp-setup .pop-how{font-size:12px;line-height:1.45}#sp-setup .tens-levels{flex-basis:34%}#sp-setup .pop-title{font-size:21px}#sp-setup .pop-best{font-size:11px}}

#sp-setup .pop-title,#sp-setup .chip{color:#574f6b}

/* ---- space-result (#sp-result) */
#screen-space:has(#sp-result:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="space"]:has(#sp-result:not([hidden]))>.onion-hero{display:none!important}
#sp-result:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#sp-result button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#sp-result button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#sp-result .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#sp-result .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#sp-result .tens-levels button{width:100%;font-size:12px;padding:4px}
#sp-result .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#sp-result .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#sp-result>button.big-btn{flex:0 0 25%}
#sp-result .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#sp-result .pop-medal img{width:70px;height:70px;object-fit:contain}
#sp-result .score{flex:0 0 26%;margin:0;font-size:14px}
#sp-result .score b{font-size:34px;color:#bc8650}
#sp-result .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#sp-result .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#sp-result .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#sp-result .stats dt{font-size:12px;color:#80718a}#sp-result .stats dd{font-size:19px;margin:0;color:#4b506d}
#sp-result .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#sp-result .actions button{min-width:130px}
#sp-result [hidden]{display:none!important}
@media(max-width:700px){#sp-result:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#sp-result .pop-how{font-size:12px;line-height:1.45}#sp-result .tens-levels{flex-basis:34%}#sp-result .pop-title{font-size:21px}#sp-result .pop-best{font-size:11px}}

#sp-result .pop-title,#sp-result .chip{color:#574f6b}

/* ---- fish-intro (#fi-setup) */
#screen-fish:has(#fi-setup:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="fish"]:has(#fi-setup:not([hidden]))>.onion-hero{display:none!important}
#fi-setup:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#fi-setup button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#fi-setup button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#fi-setup .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#fi-setup .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#fi-setup .tens-levels button{width:100%;font-size:12px;padding:4px}
#fi-setup .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#fi-setup .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#fi-setup>button.big-btn{flex:0 0 25%}
#fi-setup .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#fi-setup .pop-medal img{width:70px;height:70px;object-fit:contain}
#fi-setup .score{flex:0 0 26%;margin:0;font-size:14px}
#fi-setup .score b{font-size:34px;color:#bc8650}
#fi-setup .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#fi-setup .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#fi-setup .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#fi-setup .stats dt{font-size:12px;color:#80718a}#fi-setup .stats dd{font-size:19px;margin:0;color:#4b506d}
#fi-setup .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#fi-setup .actions button{min-width:130px}
#fi-setup [hidden]{display:none!important}
@media(max-width:700px){#fi-setup:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#fi-setup .pop-how{font-size:12px;line-height:1.45}#fi-setup .tens-levels{flex-basis:34%}#fi-setup .pop-title{font-size:21px}#fi-setup .pop-best{font-size:11px}}

#fi-setup .pop-title,#fi-setup .chip{color:#574f6b}

/* ---- fish-result (#fi-result) */
#screen-fish:has(#fi-result:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="fish"]:has(#fi-result:not([hidden]))>.onion-hero{display:none!important}
#fi-result:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#fi-result button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#fi-result button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#fi-result .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#fi-result .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#fi-result .tens-levels button{width:100%;font-size:12px;padding:4px}
#fi-result .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#fi-result .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#fi-result>button.big-btn{flex:0 0 25%}
#fi-result .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#fi-result .pop-medal img{width:70px;height:70px;object-fit:contain}
#fi-result .score{flex:0 0 26%;margin:0;font-size:14px}
#fi-result .score b{font-size:34px;color:#bc8650}
#fi-result .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#fi-result .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#fi-result .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#fi-result .stats dt{font-size:12px;color:#80718a}#fi-result .stats dd{font-size:19px;margin:0;color:#4b506d}
#fi-result .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#fi-result .actions button{min-width:130px}
#fi-result [hidden]{display:none!important}
@media(max-width:700px){#fi-result:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#fi-result .pop-how{font-size:12px;line-height:1.45}#fi-result .tens-levels{flex-basis:34%}#fi-result .pop-title{font-size:21px}#fi-result .pop-best{font-size:11px}}

#fi-result .pop-title,#fi-result .chip{color:#574f6b}

/* ---- mole-intro (#mo-setup) */
#screen-mole:has(#mo-setup:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="mole"]:has(#mo-setup:not([hidden]))>.onion-hero{display:none!important}
#mo-setup:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#mo-setup button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#mo-setup button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#mo-setup .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#mo-setup .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#mo-setup .tens-levels button{width:100%;font-size:12px;padding:4px}
#mo-setup .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#mo-setup .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#mo-setup>button.big-btn{flex:0 0 25%}
#mo-setup .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#mo-setup .pop-medal img{width:70px;height:70px;object-fit:contain}
#mo-setup .score{flex:0 0 26%;margin:0;font-size:14px}
#mo-setup .score b{font-size:34px;color:#bc8650}
#mo-setup .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#mo-setup .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#mo-setup .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#mo-setup .stats dt{font-size:12px;color:#80718a}#mo-setup .stats dd{font-size:19px;margin:0;color:#4b506d}
#mo-setup .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#mo-setup .actions button{min-width:130px}
#mo-setup [hidden]{display:none!important}
@media(max-width:700px){#mo-setup:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#mo-setup .pop-how{font-size:12px;line-height:1.45}#mo-setup .tens-levels{flex-basis:34%}#mo-setup .pop-title{font-size:21px}#mo-setup .pop-best{font-size:11px}}

#mo-setup .pop-title,#mo-setup .chip{color:#574f6b}

/* ---- mole-result (#mo-result) */
#screen-mole:has(#mo-result:not([hidden])){background:#e7efe6;font-family:var(--round);color:#343653;overflow:hidden}
body[data-screen="mole"]:has(#mo-result:not([hidden]))>.onion-hero{display:none!important}
#mo-result:not([hidden]){box-sizing:border-box;position:absolute;inset:65px 18px 12px;width:auto;max-width:none;margin:0;padding:14px 20px;border:1.3px solid #c5b39d;border-radius:24px;background:#fff5df;box-shadow:0 4px 0 #d9cdb9;overflow:hidden;display:flex;flex-flow:row wrap;align-content:space-between;align-items:center;justify-content:center;gap:6px 18px}
#mo-result button{box-sizing:border-box;min-height:44px;min-width:44px;border:1.3px solid #9e8d84;border-image:none;border-radius:18px;box-shadow:0 3px 0 #d8c8b1;background:#fffaf0;color:#4b4664;font-size:15px;padding:5px 14px}
#mo-result button.big-btn{background:#efbc65;border-color:#997557;box-shadow:0 3px 0 #bf8b47;color:#343653}
#mo-result .pop-title{width:100%;font-size:23px;margin:0;background:none;border:0;box-shadow:none;text-align:center}
#mo-result .tens-levels{flex:0 0 30%;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:0;max-height:none}
#mo-result .tens-levels button{width:100%;font-size:12px;padding:4px}
#mo-result .pop-how{flex:1 1 55%;margin:0;padding-left:22px;font-size:14px;line-height:1.6;text-align:left}
#mo-result .pop-best{font-size:12px;line-height:1.25;margin:0;flex:1 1 65%;color:#80718a}
#mo-result>button.big-btn{flex:0 0 25%}
#mo-result .pop-medal{flex:0 0 15%;height:74px;margin:0;display:grid;place-items:center}
#mo-result .pop-medal img{width:70px;height:70px;object-fit:contain}
#mo-result .score{flex:0 0 26%;margin:0;font-size:14px}
#mo-result .score b{font-size:34px;color:#bc8650}
#mo-result .chip{font-size:17px;background:none;border:0;border-image:none;box-shadow:none;padding:0;margin:0;flex:0 0 34%}
#mo-result .stats{display:flex;justify-content:space-around;gap:8px;margin:0;flex:1 1 65%;font-size:13px}
#mo-result .stats div{min-width:60px;padding:6px;border-radius:12px;background:#e5eddd}
#mo-result .stats dt{font-size:12px;color:#80718a}#mo-result .stats dd{font-size:19px;margin:0;color:#4b506d}
#mo-result .actions{flex:0 0 100%;display:flex;gap:12px;justify-content:center;margin:0}#mo-result .actions button{min-width:130px}
#mo-result [hidden]{display:none!important}
@media(max-width:700px){#mo-result:not([hidden]){inset:62px 12px 10px;padding:10px 14px;gap:5px 10px}#mo-result .pop-how{font-size:12px;line-height:1.45}#mo-result .tens-levels{flex-basis:34%}#mo-result .pop-title{font-size:21px}#mo-result .pop-best{font-size:11px}}

#mo-result .pop-title,#mo-result .chip{color:#574f6b}

/* ---- toasts + update pill (pages-css-v1-toasts-update-fix1): only the #toast / #update-pill rules; its copy of the shop / bag layout rules is
   left out (the shop and the bag keep the category rail, see below). */
#toast{background:#fff5df;border:1.3px solid #b8a58e;border-radius:17px;color:#49445f;font:600 14px/1.4 'Noto Sans TC',sans-serif;padding:10px 16px;box-shadow:0 3px 0 #d8c8b1;max-width:calc(100vw - 36px);box-sizing:border-box}
#update-pill{min-height:44px!important;min-width:44px!important;border:1.3px solid #a98562!important;border-radius:22px!important;background:#efbc65!important;color:#343653!important;font:700 14px/1.3 'Noto Sans TC',sans-serif!important;padding:8px 18px!important;box-shadow:0 3px 0 #d0a15f!important}

/* ---- shop panel (pages-css-v1-shop-panel-fix2) reconciled with the category RAIL (style.css 'category RAIL'): the rail, the grid areas, the 12-a-page
   pager and the close button's corner stay as they are; Codex's colours, card shape and 44 px buttons are applied. Its 6-column top tab row is NOT used. */
#shop{font-family:var(--round)}
#shop .modal-card{background:#fff5df;border:1.3px solid #b8a58e;border-image:none;border-radius:24px;padding:10px 14px}
#shop#shop #shop-title{background:none;border:0;border-image:none;box-shadow:none;margin:0;padding:0;font-size:20px;color:#574f6b}
#shop .shop-coins{color:#49445f;padding-right:54px}
#shop .shop-item,#shop .shop-item.v2{background:#e7efdf;border:1.3px solid #d1bea4!important;border-image:none;border-radius:14px;padding:4px}
#shop#shop .shop-btn,#shop#shop .shop-item.v2 .shop-ib:not(.shop-sell){box-sizing:border-box;height:44px;min-height:44px;min-width:44px;border:1.3px solid #b8a58e!important;border-image:none;border-radius:13px;background:#fffaf0;color:#49445f;font-size:14px}
#shop#shop .shop-btn.can,#shop#shop .shop-item.v2 .shop-ib.can{background:#efbc65;color:#343653}
#shop#shop .shop-item.v2 .shop-ib.done{background:#e5eddd;color:#4b6d50}
#shop#shop .shop-item.v2 .shop-ico{height:52px}#shop#shop .shop-item.v2 .shop-ico .art{max-height:50px}
#shop#shop .shop-ico{height:36px}#shop#shop .shop-ico .art{height:34px}
#shop#shop #shop-close{top:8px;right:10px;width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;background:#efbc65;border:1.3px solid #a98562!important;border-image:none;border-radius:15px;box-shadow:none;color:#343653}
#shop#shop .shop-pg{height:44px;width:56px;border:1.3px solid #b8a58e;border-radius:15px;background:#fffaf0;color:#49445f}
#shop#shop .shop-pg-n{color:#49445f}

/* ---- bag panel top bar (pages-css-v1-bag-topbar-fix2) reconciled with the category RAIL: the rail stays (icon tabs down the left edge, the
   selected tab's name chip); Codex's panel colours / border / corner, the sell zone colours and a 44 px amber tick are applied. Its 3x3 text tab grid is NOT used. */
#build-bar{font-family:var(--round);color:#49445f}
@media (orientation: landscape){
  #build-bar.build-bar{background:#fff5df;border:1.3px solid #b8a58e;border-right:0;border-radius:20px 0 0 20px;grid-template-rows:44px minmax(0,1fr)}
  #build-bar #build-done{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px;background:#efbc65;border:1.3px solid #b8a58e;border-radius:14px;display:grid;place-items:center;padding:0}
  #build-bar #build-done img{width:34px;height:34px}
}
#build-bar .sell-zone{background:#e7efdf;border:1px solid #c6b59d;border-radius:14px}

/* ---- pet-room top bar pictures (approved Codex room-topbar-buttons-v1 + fix1, owner item 0z, 2026-10-22): back button, coin pill, shop bag
   button and the four need icons (art.js need.* / topbar.*) are the new pictures; sizes and places stay as before (back 44 px, shop 40 px, icons 18 px). */
.pet-home #open-landing{background:transparent!important;border:0!important;border-image:none!important;padding:0;display:grid;place-items:center}
.pet-home #open-landing .topbar-pic{width:44px;height:44px;display:block;pointer-events:none}
.pet-home #pet-coins{height:30px;box-sizing:border-box;padding:0 14px 0 32px;line-height:30px;background:transparent;border:0;border-radius:0;border-image:url(art/ui3/topbar/coin-pill.png) 0 80 0 160 fill / 0 15px 0 30px stretch;color:#1b1d4d}
.pet-home #pet-coins .ico,.pet-home #pet-coins img{display:none}
/* Append after pages-games.css. Only seven result containers and their descendants. */
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result):not([hidden]){box-sizing:border-box!important;position:absolute!important;inset:64px auto 16px 50%!important;transform:translateX(-50%)!important;width:min(700px,calc(100% - 40px))!important;max-width:none!important;max-height:none!important;margin:0!important;padding:16px!important;border:1.3px solid #c5b39d!important;border-image:none!important;border-radius:24px!important;background:#fff5df!important;box-shadow:0 4px 0 #d9cdb9!important;display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;justify-content:center!important;align-items:center!important;align-content:normal!important;gap:7px!important;overflow:hidden!important;text-align:center!important;color:#4b4664!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)[hidden],:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) [hidden]{display:none!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>*{position:static!important;grid-column:auto!important;grid-row:auto!important;flex:0 0 auto!important;margin:0!important;max-width:100%!important;transform:none!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal{order:0!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;height:48px!important;width:auto!important;font-size:0!important;line-height:1!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal:empty{display:none!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal .medal-img,:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal img,:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal svg{width:48px!important;height:48px!important;object-fit:contain!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>.chip{order:1!important;border:0!important;border-image:none!important;box-shadow:none!important;background:none!important;padding:0!important;width:auto!important;font-size:20px!important;font-weight:900!important;line-height:24px!important;color:#574f6b!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>.chip:empty,:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>.pop-best:empty{display:none!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>.pop-best{order:2!important;font-size:12px!important;line-height:16px!important;max-width:calc(100% - 16px)!important;color:#80718a!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>.score{order:3!important;display:flex!important;align-items:baseline!important;justify-content:center!important;gap:7px!important;width:auto!important;height:36px!important;line-height:36px!important;white-space:nowrap!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>.score b{font-size:30px!important;font-weight:900!important;line-height:36px!important;color:#bc8650!important;text-shadow:none!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>.score span{font-size:15px!important;line-height:22px!important;margin:0!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>dl.stats{order:4!important;display:flex!important;flex:0 0 auto!important;align-self:center!important;flex-wrap:nowrap!important;justify-content:center!important;align-items:stretch!important;gap:12px!important;width:auto!important;padding:0!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>dl.stats>div{box-sizing:border-box!important;flex:0 0 92px!important;width:92px!important;min-width:92px!important;max-width:92px!important;padding:6px 8px!important;border:1.3px solid #c5b6a6!important;border-radius:12px!important;background:#e9eedf!important;text-align:center!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) dl.stats dt{margin:0!important;font-size:12px!important;line-height:17px!important;color:#80718a!important;opacity:1!important;white-space:nowrap!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) dl.stats dd{margin:2px 0 0!important;font-size:20px!important;line-height:24px!important;font-weight:900!important;color:#4b506d!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result)>.actions{order:5!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:12px!important;width:auto!important;padding-top:3px!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) button{box-sizing:border-box!important;min-width:130px!important;min-height:44px!important;height:44px!important;padding:6px 18px!important;margin:0!important;border:1.3px solid #9e8d84!important;border-image:none!important;border-radius:17px!important;box-shadow:0 3px 0 #d8c8b1!important;background:#fffaf0!important;color:#4b4664!important;font-size:15px!important;line-height:20px!important;white-space:nowrap!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) button.big-btn{background:#efbc65!important;border-color:#997557!important;box-shadow:0 3px 0 #bf8b47!important;color:#343653!important}
:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-progress{display:none!important}
#tens-result>.collect-btn{order:5!important;align-self:center!important;flex:none!important;min-width:184px!important}
#tens-result>.collect-btn .ico{width:22px!important;height:22px!important;vertical-align:middle!important}
/* Existing factor markup has no medal node; reuse the approved star as decoration. */
#fc-result:not([hidden])::before{content:"";order:0;flex:none;width:48px;height:48px;background:url("art/medal/star.svg") center/contain no-repeat}
/* Pop has no title node. Localized decorative title; no DOM/handler changes. */
#pop-result:not([hidden])::before{content:"挑戰完成！";order:1;font-size:20px;font-weight:900;line-height:24px;color:#574f6b}
html[lang="zh-Hans"] #pop-result:not([hidden])::before{content:"挑战完成！"}
html[lang^="en"] #pop-result:not([hidden])::before{content:"Challenge complete!"}
@media(max-height:380px){:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result):not([hidden]){inset:60px auto 12px 50%!important;gap:6px!important}:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal,:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal .medal-img,:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal img,:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal svg{height:44px!important}:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal .medal-img,:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal img,:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) .pop-medal svg{width:44px!important}#fc-result:not([hidden])::before{width:44px;height:44px}}

:is(#pop-result,#mem-result,#sp-result,#fi-result,#tens-result,#mo-result,#fc-result) [hidden]{display:none!important}
/* factor catch intro (owner 2026-10-26): the ladder is one small row of 9 chips (the lit one is being practised, a tick = passed; best scores are on the parent page) */
#fc-setup .tens-levels{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:4px;margin:0;padding:0;max-height:none;width:100%}
#fc-setup .tens-lv{min-width:0;min-height:0;height:auto;padding:3px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}
#fc-setup .tens-lv b{font-size:14px;line-height:1.1}
#fc-setup .tens-lv small{font-size:10px;line-height:1.1;min-height:11px}
#fc-setup #fc-setup-rule{margin:0;font-weight:700}
