/* V92: presentation only. Engine, rewards, online and Fate artwork are unchanged. */
#game .hallBackdrop,#daily .hallBackdrop,#result .hallBackdrop{background-size:cover;background-position:center}
/* A frame's transparent corners must stay transparent. */
.modalCard.rulesModal,.modalCard.settingsModal,.modalCard.onlineModal,#result .resultPerson,#result #resultStats,#daily .monthlyCard{
 border-image-source:url('./ornate-frame.svg');border-image-slice:30;border-image-width:18px;border-image-outset:0;
 background:radial-gradient(ellipse at 30% 20%,#122134,#030b16 80%) padding-box;
 box-shadow:none;border-radius:0;
}
/* Playing surface: square, broad, with a joined score banner and wooden rack. */
#game .gameLayout{--board-size:min(96vw,calc((var(--view-h,100svh) - var(--safeT) - var(--safeB) - 40px)*.61),660px);padding-left:2%;padding-right:2%;grid-template-rows:minmax(0,.9fr) minmax(0,.9fr) var(--board-size) minmax(0,.9fr) minmax(0,1fr)}
#game .scoreStrip{gap:0;width:min(78%,calc(var(--board-size)*.83));background:linear-gradient(100deg,#081321,#040a12);border:2px ridge #d7ac57;box-shadow:0 0 0 1px #624015;height:76%;max-height:70px}
#game .scoreCard{border:0;box-shadow:none;background:transparent;min-width:0;flex:1}
#game .scoreStrip:has(.scoreCard:nth-child(2)):after{content:'✦';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#f5cd77;font-size:22px;text-shadow:0 0 7px #ffac39;pointer-events:none}
#game .scoreCard .avatar{left:-29px}#game .scoreStrip .scoreCard:nth-child(2) .avatar{right:-29px}
#game .scoreCard.turnActive{box-shadow:inset 0 -2px #f3cb69}
#game .rackFrame{width:min(91%,calc(var(--board-size)*.94));max-height:76px;height:83%}
#game .rackTile{font-weight:700;border-radius:4px;background:linear-gradient(115deg,#f7d797,#e9be7d 65%,#d69e51)}
#game .rackTile small{font-size:10px}
#game .gameBottom{gap:5px;max-height:100px;padding-bottom:23px}
#game .roundAction{max-width:65px}#game .roundAction small{font-size:10px;top:calc(100% + 5px)}
#game .bagCounter{max-height:74px}#game .bagCounter small{font-size:8px}
/* Daily: one explicit stretch column at every nested grid level. */
#daily .dailyLayout{width:min(100%,620px);padding-left:clamp(12px,7vw,42px);padding-right:clamp(12px,7vw,42px);grid-template-rows:minmax(0,1.25fr) minmax(0,3.3fr) minmax(0,2.1fr) minmax(0,.7fr);gap:10px}
#daily .dailyLayout>*{min-width:0;width:100%;justify-self:stretch}
#daily .dailyBrand{display:block;min-width:0}
#daily .dailyBrand>div{display:flex;flex-direction:column;align-items:center;width:100%;min-width:0}
#daily .dailyBrand h1{width:100%;max-width:100%;margin:0}
#daily .dailyBrand>.roundIconBtn{left:calc(-7vw + 8px)}
#daily .dailyQuestCard{width:100%;min-width:0;padding:6% 8%;border-radius:0}
#daily .dailyQuestCard>*{min-width:0;max-width:100%}
#daily .dailyQuestCard p{font-size:clamp(12px,3.3vw,18px);line-height:1.18}
#daily .dailyDate{font-size:clamp(17px,4.8vw,26px)}
#daily .dailyLetters{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%;gap:7px;justify-content:stretch;justify-items:stretch;min-width:0;height:90%}
#daily .dailyLetter{width:100%;min-width:0;max-width:100%;max-height:65px;height:auto;aspect-ratio:1;align-self:center;display:grid;place-items:center;font-size:clamp(25px,8vw,44px)}
#daily .dailyStart{width:100%;max-width:100%;min-width:0;padding:5px 8%;justify-content:center;font-size:clamp(15px,4vw,23px)}
#daily .monthlyCard{grid-template-columns:minmax(0,1fr);justify-items:stretch;width:100%;min-width:0;padding:6px 5px;border-width:12px}
#daily .monthlyCard>*{width:100%;min-width:0;max-width:100%;justify-self:stretch}
#daily .monthProgress{grid-template-columns:repeat(10,minmax(0,1fr));align-content:stretch}
#daily .dayTick{min-width:0;width:100%}#daily .dayTick small{font-size:9px}#daily .dayTick span{font-size:19px}
#daily #monthProgressText{font-size:11px;white-space:normal;text-align:center}
#daily .dailyQuote{width:88%;justify-self:center;margin:0;font-size:clamp(12px,3.3vw,17px);padding:8px 16px}
#daily .dailyQuote small{font-size:8px}
/* Rules and settings: framed navy panels with readable text and scroll fallback. */
.modal:has(.rulesModal),.modal:has(.settingsModal){padding:calc(var(--safeT) + 10px) 5% calc(var(--safeB) + 10px)}
.rulesModal,.settingsModal{width:min(100%,470px);max-height:100%;border-width:14px;padding:10px 9px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#ad8745 #08111d}
.rulesModal{display:block}
.rulesModal .modalBrand,.settingsModal .modalBrand{height:clamp(56px,9svh,86px);margin:0 17px 3px}
.rulesModal h2,.settingsModal h2{font-size:28px;margin:2px 0 12px;text-align:center}
.rulesList{display:grid;gap:3px}
.rulesList>div{grid-template-columns:34px 21px minmax(0,1fr);min-height:43px;padding:5px 4px;gap:5px}
.rulesList p b{font-size:14px;line-height:1.15}.rulesList p small{font-size:11px;line-height:1.18}
.ruleIcon svg{width:30px;height:30px}.rulesList i{width:20px;height:20px;font-size:12px}
.rulesModal .bonusTitle{font-size:23px;margin:10px 0 7px}.rulesBonus>div{min-height:54px}.rulesBonus b{font-size:20px}.rulesBonus small{font-size:10px}
.rulesActions{height:47px;margin-top:9px}
.settingsBlock{padding:9px 0}.sectionTitle{grid-template-columns:35px minmax(0,1fr)}.sectionTitle b,.settingRow b{font-size:15px}.sectionTitle small,.settingRow small{font-size:11px;line-height:1.2}
.settingsRows .settingRow{grid-template-columns:35px minmax(0,1fr) 39px;padding:7px 0}.sectionTitle svg,.settingRow svg{width:30px;height:30px}
.dictionaryTabs button{min-height:36px;font-size:15px}.settingsModal .bonusLegend>div{min-height:55px}.settingsModal .bonusLegend b{font-size:20px}.settingsModal .bonusLegend small{font-size:10px}
.cloudActions button{min-height:36px;font-size:12px}.settingsModal .settingsSave{min-height:42px;font-size:17px}
/* Results keep EVERY V91 statistic. Extra rows grow naturally instead of clipping. */
#result{overflow-y:auto;overscroll-behavior:contain}
#result .hallBackdrop{position:fixed;pointer-events:none}
#result .resultLayout{width:min(100%,620px);height:auto;min-height:100%;overflow:visible;grid-template-columns:minmax(0,1fr);grid-template-rows:clamp(130px,calc(var(--vh,1svh)*20),200px) auto auto 56px 47px;gap:10px;padding:calc(var(--safeT) + 10px) clamp(16px,9vw,56px) calc(var(--safeB) + 16px);align-content:center;justify-items:stretch}
#result .resultLayout>*{min-width:0;max-width:100%;justify-self:stretch}
#result .resultBrand h1{width:100%;max-width:100%;height:52%;flex-basis:52%;margin:0}
#result .resultBrand h2{font-size:clamp(42px,13vw,70px)}
#result .resultPlayers{grid-template-columns:minmax(0,1fr);grid-template-rows:130px 76px;justify-content:stretch;justify-items:stretch;align-items:stretch;width:100%;height:auto;min-width:0;margin:0;padding:62px 4% 0;gap:12px}
#result.ref-solo .resultPlayers,#result .resultPlayers:not(:has(.runner)){grid-template-rows:140px;padding-top:62px}
#result .resultPerson{width:100%;min-width:0;max-width:100%;height:100%;border:12px solid transparent;border-image:url('./ornate-frame.svg') 30 / 18px / 0 stretch;background:radial-gradient(at 30% 20%,#102033,#030b15) padding-box;padding:4px 7px}
#result .resultPerson.winner{padding:30px 5px 5px;justify-content:center}
#result .resultPerson.winner .avatar{width:90px;top:0;transform:translate(-50%,-68%)}
#result .resultPortraitCrown{top:-78px;font-size:33px}
#result .winner .resultRank{font-size:19px}#result .winner .resultName{font-size:23px}#result .winner .resultScore{font-size:40px}
#result .resultPerson.runner{grid-template-columns:49px minmax(0,1fr);padding:0 5px;column-gap:10px}
#result .runner .avatar{width:48px;height:48px}#result .runner .resultRank{font-size:12px}#result .runner .resultName{font-size:17px}#result .runner .resultScore{font-size:23px}
#result #resultStats{margin:0;width:100%;height:auto;min-height:0;overflow:visible;display:block;padding:2px 8px;border-width:12px}
#result .resultStatRow{display:grid;grid-template-columns:21px minmax(0,1fr) minmax(0,1.1fr);gap:6px;min-height:27px;padding:5px 0;align-items:center}
#result .resultStatRow small{font-size:12px;white-space:normal;overflow-wrap:anywhere;line-height:1.2;margin:0}
#result .resultStatRow b{font-size:12px;font-weight:400;line-height:1.2;overflow-wrap:anywhere;white-space:normal;text-align:right}
#result .statIcon{font-size:19px}#result .playAgainButton{font-size:27px}#result .resultActions{margin:0;width:100%;gap:8px}
#result .resultActions button{font-size:17px}
/* Online Fate: decorative perimeter only. All internal art, controls and animation keep V91 geometry. */
.fateLobby.show:after{content:'';position:fixed;inset:calc(env(safe-area-inset-top,0px) + 5px) 3px calc(env(safe-area-inset-bottom,0px) + 3px);border:12px solid transparent;border-image:url('./ornate-frame.svg') 30 / 18px / 0 stretch;z-index:50;pointer-events:none;background:none}
@media(min-height:900px) and (orientation:portrait){#result .resultPlayers{grid-template-rows:150px 82px}#result.ref-solo .resultPlayers{grid-template-rows:160px}.rulesList>div{min-height:49px}.rulesModal,.settingsModal{padding-top:16px;padding-bottom:16px}}
@media(orientation:landscape){
 #game .gameLayout{--board-size:min(calc(var(--view-h,100svh) - var(--safeT) - var(--safeB) - 30px),53vw);grid-template-columns:var(--board-size) minmax(0,360px);grid-template-rows:1fr 1fr 1fr 1.2fr;padding:calc(var(--safeT) + 15px) 4% calc(var(--safeB) + 15px);gap:8px 24px}
 #daily{overflow-y:auto}#daily .dailyLayout{width:min(100%,1000px);height:auto;min-height:100%;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:95px 155px 75px;padding:calc(var(--safeT) + 12px) 7% calc(var(--safeB) + 12px)}
 #daily .dailyBrand>.roundIconBtn{left:-35px}
 #result .resultLayout{width:min(100%,960px);grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:145px auto 52px 44px;padding:calc(var(--safeT) + 12px) 7% calc(var(--safeB) + 12px)}
 #result .resultBrand{grid-column:1;grid-row:1}#result .resultPlayers{grid-column:2;grid-row:1/5;align-content:center}#result #resultStats{grid-column:1;grid-row:2}#result .playAgainButton{grid-column:1;grid-row:3}#result .resultActions{grid-column:1;grid-row:4}
}
/* Fit action circles to the available row on short phones. */
#game .roundAction{width:auto;height:min(100%,65px);max-height:100%;max-width:100%;aspect-ratio:1;justify-self:center}
.onlineModal .fateMenuCard:after{content:'';position:absolute;inset:0;border:10px solid transparent;border-image:url('./ornate-frame.svg') 30 / 15px / 0 stretch;pointer-events:none;background:none}

#result .resultPlayers:has(.runner){grid-template-rows:130px 76px;grid-auto-rows:76px;padding-top:62px}
#result .winner:not(:has(.resultPortraitCrown)):before{content:"♛";position:absolute;top:-78px;left:50%;transform:translateX(-50%);font-size:33px;line-height:1;color:#f6c352;z-index:2}

/* Remove obsolete narrow outer wrappers; V91 interior dimensions remain untouched. */
.fateLobby.choose .fateLobbyPanel,.fateLobby.waiting .fateLobbyPanel,.fateLobby.choose .fateLobbyContent,.fateLobby.waiting .fateLobbyContent{width:100vw!important;max-width:none!important}
