/* Game surfaces. Load after the individual game CSS and premium-theme.css. */
#match3-view,#quiz-view,#word-view{
 --pg-base:#f2efe9;
 --pg-card:#fbf8f1;
 --pg-ink:#373338;
 --pg-plum:#614657;
 --pg-muted:#74686e;
 --pg-gold:#b39159;
 --pg-line:#d7cdbf;
 --pg-green:#5f7866;
 --pg-yellow:#c4a873;
 color:var(--pg-ink);
 background:linear-gradient(155deg,#f8f5ef 0%,var(--pg-base) 62%,#eae4dc 100%);
}

/* Shared controls keep their original sizes and hit areas. */
#match3-view .spin-button,#quiz-view .spin-button,#word-view .word-next{
 color:#fffaf4;
 background:linear-gradient(115deg,#6b5061,var(--pg-plum) 76%);
 box-shadow:inset 0 1px 0 #ffffff24,inset 0 0 0 1px #b3915959,0 4px 12px #47353e17;
}
#match3-view .spin-button:hover:not(:disabled),#quiz-view .spin-button:hover:not(:disabled),#word-view .word-next:hover:not(:disabled){
 background:linear-gradient(115deg,#765a6c,#6a4d60 76%);
}
#match3-view .spin-button:disabled,#quiz-view .spin-button:disabled,#word-view .word-next:disabled{
 color:#857a7d;
 background:#e4ded6;
 box-shadow:inset 0 0 0 1px #d7cdbf;
}
#match3-view button:focus-visible,#quiz-view button:focus-visible,#word-view button:focus-visible{
 outline:2px solid var(--pg-plum);
 outline-offset:3px;
}

/* Match3: a warm, slightly deeper board beneath the original glossy pieces. */
#match3-view .m3-top h1{color:var(--pg-ink)}
#match3-view .m3-stat{
 background:linear-gradient(145deg,#fffdf8,var(--pg-card));
 box-shadow:inset 0 0 0 1px #d9cebd,0 2px 7px #55473808;
}
#match3-view .m3-stat span{color:var(--pg-muted)}
#match3-view .m3-stat strong{color:var(--pg-plum)}
#match3-view .m3-status{color:var(--pg-muted)}
#match3-view .m3-level{color:var(--pg-plum)}
#match3-view .m3-goal{
 background:#fffcf6;
 box-shadow:inset 0 0 0 1px #ded3c2;
}
#match3-view .m3-goal strong{color:var(--pg-plum)}
#match3-view .m3-goal.is-complete{background:#e9eee5;box-shadow:inset 0 0 0 1px #b8c6b5}
#match3-view .m3-goal.is-complete strong{color:#45644f}
#match3-view .m3-lives{color:#9a586b}
#match3-view .m3-daily:after{color:#8a7048}
#match3-view .m3-message{color:var(--pg-plum)}
#match3-view .m3-board{
 background-color:#e2dacf;
 background-image:linear-gradient(90deg,#a9957e3d 1px,transparent 1px),linear-gradient(#a9957e3d 1px,transparent 1px),linear-gradient(140deg,#eee7dd,#ded4c7);
 background-size:calc(100% / 7) calc(100% / 7),calc(100% / 7) calc(100% / 7),100% 100%;
 box-shadow:inset 0 1px 3px #fff8,inset 0 0 0 1px #fdf8ee91,0 0 0 1px #c3b39b,0 8px 20px #5f4d3510;
}
#match3-view .m3-board:after{
 background:linear-gradient(135deg,#fff8ed26 0%,#fff8ed00 36%,#fff8ed00 70%,#7e674c0b 100%);
 box-shadow:inset 0 0 0 1px #fff9;
}
#match3-view .m3-tile:before{
 background:radial-gradient(ellipse,#fffaf0c2,#d6bb8073 62%,#d6bb8000 85%);
 box-shadow:inset 0 0 0 1.5px #fff7df,0 0 8px #b3915940;
}
#match3-view .m3-tile:focus-visible{outline-color:var(--pg-plum);outline-offset:-3px}
#match3-view .m3-spark{background:linear-gradient(125deg,#fff7df,#bd9658)}
#match3-view .m3-spark:nth-child(even){background:#bda3b0}
#match3-view .m3-combo{color:var(--pg-plum);text-shadow:0 2px 0 #fffaf0,0 0 15px #fff9ed,0 4px 12px #b3915970}
#match3-view .m3-point{color:#614657;text-shadow:0 1px #fffaf0,0 0 7px #fffaf0}
#match3-view .m3-restart-cost{color:#f1e7d4;border-left-color:#e4d4ba66}
#match3-view .m3-result{
 background:radial-gradient(ellipse at 47% 36%,#fffdf7 0%,#f4eee3 58%,#e9e0d2 100%);
}
#match3-view .m3-result:before{
 content:"";position:absolute;inset:14px;pointer-events:none;border:1px solid #b391596b;border-radius:24px;
 box-shadow:inset 0 0 0 3px #fffaf04d;
}
#match3-view .m3-result>*{position:relative;z-index:1}
#match3-view .m3-result h1,#match3-view .m3-result h2,#match3-view .m3-result p{color:var(--pg-plum)}
#match3-view .m3-final-score{color:var(--pg-ink);text-shadow:0 2px 0 #fff9}

/* Quiz: neutral picture mounts, with no tint applied to product photography. */
#quiz-view .quiz-heading h1,#quiz-view .quiz-status h1{color:var(--pg-ink)}
#quiz-view .quiz-count,#quiz-view .quiz-question,#quiz-view .quiz-status{color:var(--pg-muted)}
#quiz-view .quiz-feedback{color:var(--pg-green)}
#quiz-view .quiz-progress{background:#d7cdbf80}
#quiz-view .quiz-progress>span{background:linear-gradient(90deg,#b39159,#614657)}
#quiz-view .quiz-card{
 border-color:#e2d9cd;
 background:#fffcf7;
 color:var(--pg-ink);
 box-shadow:0 3px 10px #5a4b3b08;
}
#quiz-view .quiz-card:not(:disabled):active{border-color:var(--pg-gold);background:#f8f1e5}
#quiz-view .quiz-photo-wrap{background:#efede8}
#quiz-view .quiz-photo{filter:none;mix-blend-mode:normal;opacity:1}
#quiz-view .quiz-name{color:#6d6268}
#quiz-view .quiz-price{color:var(--pg-plum)}
#quiz-view .quiz-card.is-correct{
 border-color:#718a73;
 background:#f2f6ef;
 box-shadow:0 0 0 1px #718a7326,0 4px 12px #4d66520b;
}
#quiz-view .quiz-card.is-correct .quiz-price{color:#45644f}
#quiz-view .quiz-card.is-correct:after{background:#5f7866;color:#fffdf7;box-shadow:0 2px 7px #405a461a}
#quiz-view .quiz-card.is-wrong{border-color:#ad7a80}
#quiz-view .quiz-snapshot{color:#786d73}
#quiz-view .quiz-result{
 position:relative;border-radius:22px;
 background:radial-gradient(ellipse at 47% 36%,#fffdf7 0%,#f4eee3 64%,#e9e0d2 100%);
 box-shadow:inset 0 0 0 1px #b391596b,inset 0 0 0 4px #fffaf04d;
}
#quiz-view .quiz-result h1,#quiz-view .quiz-earned{color:var(--pg-plum)}
#quiz-view .quiz-final-score{color:var(--pg-ink)}

/* Word game: semantic green and ochre stay distinct from unused keys. */
#word-view .word-top h1{color:var(--pg-ink)}
#word-view .word-tab{background:#e8e1d7;color:#6f626b;box-shadow:inset 0 0 0 1px #d7cdbf}
#word-view .word-tab[aria-pressed="true"]{background:#614657;color:#fffaf4;box-shadow:inset 0 0 0 1px #b3915980}
#word-view .word-tab[data-status="won"]:after{background:#5f7866;box-shadow:0 0 0 1.5px #f8f4eb}
#word-view .word-tab[data-status="lost"]:after{background:#82767e;box-shadow:0 0 0 1.5px #f8f4eb}
#word-view .word-message{color:var(--pg-muted)}
#word-view .word-cell{border-color:#cfc3b4;background:#fffdf7;color:var(--pg-ink)}
#word-view .word-cell[data-filled="true"]:not([data-result="correct"]):not([data-result="present"]):not([data-result="absent"]){border-color:#9b8592;background:#fffdf9}
#word-view .word-key{border-color:#d0c5b7;background:#e7dfd4;color:var(--pg-ink)}
#word-view .word-cell[data-result="correct"],#word-view .word-key[data-result="correct"]{background:var(--pg-green);border-color:var(--pg-green);color:#fffdf7}
#word-view .word-cell[data-result="present"],#word-view .word-key[data-result="present"]{background:var(--pg-yellow);border-color:var(--pg-yellow);color:var(--pg-ink)}
#word-view .word-cell[data-result="absent"],#word-view .word-key[data-result="absent"]{background:#776e73;border-color:#776e73;color:#fffdf7}
#word-view .word-key:active:not(:disabled){background:#d6c9b7}
#word-view .word-key[data-result="correct"]:active:not(:disabled){background:#536e5b}
#word-view .word-key[data-result="present"]:active:not(:disabled){background:#b99b61}
#word-view .word-key[data-result="absent"]:active:not(:disabled){background:#695f65}
#word-view .word-result{
 border-radius:17px;
 background:radial-gradient(ellipse at 50% 30%,#fffdf7,#f0e8da);
 box-shadow:inset 0 0 0 1px #b391596b;
}
#word-view .word-reward{color:var(--pg-plum)}
/* Keep the illustrated silk under the games as well. */
#match3-view,#quiz-view,#word-view{background:linear-gradient(155deg,#f8f5ef66,#f2efe933),var(--premium-background) center/cover no-repeat}

#quiz-view .quiz-result{background:linear-gradient(140deg,#fffdf72b,#f2eadb33);box-shadow:inset 0 0 0 1px #b391594a,inset 0 0 0 4px #fffaf025}
#match3-view .m3-result{background:linear-gradient(145deg,#fffdf780,#eee6d566),var(--premium-background) center/cover no-repeat}
