/* ⚠ ساخته می‌شود: python tools/build_game.py  (جلوه‌ها و زوم: game.extra.css) */
#game *{box-sizing:border-box}#game button{font:inherit;color:inherit;border:0;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}#game button:disabled{cursor:default}#game h1,#game h2,#game h3,#game p{margin:0}#game h2{font-size:34px}#game button:focus-visible{outline:4px solid var(--focus,#1266D9);outline-offset:2px}#game button:active:not(:disabled){filter:brightness(.94)}#game [hidden]{display:none!important}#game .skin{background-color:transparent;background-image:var(--image);background-size:100% 100%;background-repeat:no-repeat}#game .skin:active:not(:disabled){background-image:var(--pressed,var(--image))}#game .skin:focus-visible{background-image:var(--focused,var(--image))}#game .skin:disabled{background-image:var(--disabled,var(--image));color:#596776}#game #gameRoot{position:absolute;top:0;left:50%;width:853px;height:var(--canvas-h,1844px);transform:translateX(-50%) scale(var(--scale,1));transform-origin:center top;display:flex;flex-direction:column;gap:8px;padding:12px 24px;background:#FAF7EE url(../assets/ui/game/game-bg.webp) center/100% 100% no-repeat;--touch:88px;font-size:28px;line-height:1.5}#game #score{display:grid;grid-template-columns:repeat(var(--players,3),minmax(0,1fr));gap:8px;height:156px;flex:none}#game .player{position:relative;padding:13px 14px 8px;min-width:0;display:grid;grid-template-columns:82px 1fr;grid-template-rows:42px 35px 38px 18px;gap:0 12px}#game .player-avatar{width:82px;height:82px;border-radius:50%;background:#DBEAF1 url(../assets/ui/game/avatars/avatar-frame-normal.webp) center/100% 100%;display:grid;place-items:center;position:relative;grid-row:1/3;grid-column:1;font-size:30px;font-weight:700}#game .player-avatar>img{width:74px;height:74px;object-fit:cover;border-radius:50%}#game .player-avatar.turn{background-image:var(--turn-ring);box-shadow:0 0 10px var(--ring-soft,#1782EA33)}#game .player-name{font-size:29px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#game .player-bio{font-size:19px;color:#63798B;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#game .player-points{grid-column:2;font-size:40px;font-weight:700;line-height:1}#game .player-bottom{grid-column:1/3;display:flex;gap:10px;align-items:center;margin-top:1px}#game .progress{height:13px;flex:1;border-radius:9px;background:url(../assets/ui/game/surfaces/progress-rail-normal.webp) center/100% 100%;overflow:hidden;direction:ltr}#game .progress i{display:block;height:100%;width:var(--progress);border-radius:9px;background:var(--player-color,#278ED5)}#game .poem-count{font-size:19px;font-weight:700;white-space:nowrap}#game .badge{position:absolute;top:11px;left:11px;width:29px;height:29px;display:grid;place-items:center;border-radius:8px;background:#FFF0BE}#game .badge img{width:23px;height:23px}#game .badge.skip{background:#FCE0E9;left:45px}#game .thinking{position:absolute;bottom:0;display:flex;gap:5px;padding:4px;background:#fffdf5;border-radius:9px}#game .thinking i{width:8px;height:8px;background:#63798B;border-radius:50%;animation:g-think 1s infinite}#game .thinking i:nth-child(2){animation-delay:.15s}#game .thinking i:nth-child(3){animation-delay:.3s}#game #infoBar{height:88px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}#game #iRound{font-size:31px;white-space:nowrap}#game #lastRound{padding:8px 14px;background:#FFF0BE;border-radius:20px;font-size:23px;white-space:nowrap}#game .toolbar{display:flex;gap:3px;direction:ltr}#game .round{width:var(--touch);height:var(--touch);min-width:var(--touch);padding:21px;display:grid;place-items:center}#game .round img{width:100%;height:100%}#game #themeBar{height:56px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 20px;flex:none}#game #themeBar>div{display:flex;align-items:center;gap:10px}#game #themeBar img{height:40px;width:40px}#game #themeBar span{font-size:24px}#game .multiplier{background:#FFF0BE;border-radius:22px;padding:3px 14px;font-weight:700;white-space:nowrap}#game #msg{height:48px;display:flex;align-items:center;justify-content:center;flex:none;padding:0 18px;background:url(../assets/ui/game/surfaces/message-normal.webp) center/100% 100%;font-size:27px;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#game #msg[data-kind=success]{background-image:url(../assets/ui/game/surfaces/message-success.webp)}#game #msg[data-kind=error]{background-image:url(../assets/ui/game/surfaces/message-error.webp)}#game #boardViewport{position:relative;width:100%;max-height:792px;flex:1;min-height:200px;overflow:hidden;touch-action:none;direction:ltr;border-radius:24px}#game #board{position:absolute;width:792px;height:792px;left:6px;top:0;display:grid;grid-template-columns:repeat(9,88px);grid-template-rows:repeat(9,88px);transform-origin:0 0;touch-action:none;will-change:transform}#game .cell{position:relative;width:88px;height:88px;display:grid;place-items:center;padding:4px;background:url(../assets/ui/game/surfaces/cell-empty.webp) center/100% 100%;touch-action:none}#game .cell.legal{background-image:url(../assets/ui/game/surfaces/cell-legal.webp)}#game .cell.path{background-image:url(../assets/ui/game/surfaces/cell-path.webp)}#game .cell.selected{background-image:url(../assets/ui/game/surfaces/cell-selected.webp)}#game .cell.lock-self{box-shadow:inset 0 0 0 3px #B58929;background-image:url(../assets/ui/game/surfaces/cell-lock-self.webp)}#game .cell.lock-opponent{outline:2px dashed #D65D91;outline-offset:-3px}#game .cell>.lock-icon{position:absolute;right:1px;top:0;width:24px;height:24px;z-index:4}#game .ownership{position:absolute;bottom:4px;left:8px;right:8px;height:8px;background:var(--owner);border-radius:6px;z-index:0}#game .cell .card{width:77px;height:80px;pointer-events:none}#game .cell .letter{font-size:55px}#game .cell .corner-letter{font-size:13px;top:5px;right:8px}#game .cell .abjad{font-size:14px;top:5px;left:7px}#game .cell .mark{width:24px;height:24px;bottom:7px;left:8px}#game #bBoardReset{position:absolute;bottom:9px;right:9px;z-index:6;width:88px;height:88px;padding:24px}#game #scoreFloat{position:absolute;left:42%;top:42%;padding:8px 18px;background:url(../assets/ui/game/surfaces/score-bubble-normal.webp) center/100% 100%;color:#fff;font-size:42px;font-weight:700;z-index:20;animation:g-float 1.5s ease-out forwards}#game #handTray{height:228px;flex:none;padding:10px 15px}#game #handTray header{height:37px;display:flex;align-items:center;justify-content:space-between;padding:0 10px 5px}#game #handTray h2{font-size:32px}#game #handCount{font-size:25px;color:#63798B;font-weight:700}#game #handLine{display:flex;align-items:center;gap:16px;height:174px}#game #hand{display:flex;gap:7px;flex:1;align-items:center;justify-content:space-between;min-width:0}#game .card{position:relative;padding:0;width:112px;height:164px;flex:none;background-color:transparent;background-repeat:no-repeat;background-size:100% 100%;transition:transform .14s;display:grid;place-items:center}#game .card.selected{transform:translateY(-9px)}#game .letter{font-size:110px;font-weight:700;line-height:1;color:#11100E}#game .corner-letter{position:absolute;right:11px;top:7px;font-size:22px;color:#11100E;font-weight:700}#game .abjad{position:absolute;left:11px;top:7px;font-size:20px;color:#11100E;font-weight:700}#game .mark{position:absolute;left:9px;bottom:11px;width:42px;height:42px;object-fit:contain}#game .order{position:absolute;top:-12px;right:-6px;width:35px;height:35px;background:url(../assets/ui/game/surfaces/hand-order-normal.webp) center/100% 100%;color:#fff;font-size:22px;display:grid;place-items:center;font-weight:700;z-index:5}#game #bSpecial{width:118px;height:174px;flex:none;border-right:1px solid #CDD3D2;background-image:url(../assets/ui/game/cards/special-normal.webp);padding:10px 8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}#game .special-label{font-size:19px;font-weight:700}#game .special>img{width:60px;height:60px}#game .special>strong{font-size:20px;line-height:1.3}#game .special #specialCount{position:absolute;top:4px;left:4px;background:#fffdf5;padding:0 4px;border-radius:6px;font-size:17px}#game .special:disabled{background-image:url(../assets/ui/game/cards/special-spent.webp);filter:grayscale(1);opacity:.5}#game #steps{height:64px;flex:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}#game .step{display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;font-size:23px;font-weight:700;background-size:100% 100%;color:#63798B}#game .step.active{color:var(--accent-text)}#game .step img{width:27px;height:27px}#game .step.active img{filter:brightness(0) invert(1)}#game #preview{height:100px;flex:none;padding:6px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px}#game #preview>div{display:flex;flex-direction:column}#game #preview small{font-size:20px;color:#63798B}#game #wordText{font-size:52px;line-height:1.2}#game #wordPoints{font-size:30px;padding:4px 16px;align-self:flex-end;background:#DDEFF9;border-radius:19px}#game #wordExplanation{margin-top:4px;white-space:nowrap}#game #actions{height:124px;display:flex;gap:9px;flex:none}#game #actions button{flex:1;min-width:0;min-height:var(--touch);font-size:30px;font-weight:700;padding:8px 13px;display:flex;align-items:center;justify-content:center;gap:10px}#game #actions button.primary{flex:1.12;font-size:44px}#game #actions img{width:43px;height:43px}#game .primary{color:var(--accent-text)}#game .primary[data-color=blue] img{filter:brightness(0) invert(1)}#game .primary:disabled{color:#596776}#game .modal{width:720px;max-width:none;max-height:calc(100% - 48px);overflow:auto;padding:42px 32px 32px;border:0;border-radius:34px;color:#102E50;background:#FFFCF4 url(../assets/ui/game/surfaces/modal-normal.webp) center/100% 100%;font:28px/1.65 Vazirmatn,sans-serif;box-shadow:0 18px 70px #102E5044;position:absolute;margin:auto;inset:0}#game .modal::backdrop{background:#102E5073}#game .modal h2{font-size:36px}#game .modal h3{font-size:35px;margin:16px 0}#game .modal p{color:#63798B;margin:12px 0}#game .modal-close{position:absolute;top:6px;left:6px}#game .sp-header{text-align:center}#game .special-art{margin:0 auto 10px;width:144px;height:188px;background:url(../assets/ui/game/cards/special-normal.webp) center/100% 100%;display:grid;place-items:center}#game .special-art img{width:102px;height:102px}#game #spQuestion{text-align:center;font-size:42px}#game #spDescription{text-align:center;font-size:25px}#game .modal-actions{display:flex;gap:12px;margin-top:24px}#game .modal-actions button{flex:1;min-width:0;height:112px;font-size:31px;font-weight:700}#game .modal-actions .primary{background-size:100% 100%}#game #spBody{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}#game .option{min-height:88px;min-width:140px;padding:10px 18px;font-size:28px;background:url(../assets/ui/game/surfaces/modal-option-normal.webp) center/100% 100%}#game .option.selected{background-image:url(../assets/ui/game/surfaces/modal-option-selected.webp)}#game .opponent-card{width:96px;height:132px;background:url(../assets/ui/game/cards/opponent-hidden-normal.webp) center/100% 100%;display:grid;place-items:center}#game .opponent-card.selected{outline:4px solid #329CDD;border-radius:10px}#game .modal table{width:100%;border-collapse:collapse;font-size:26px}#game .modal th,#game .modal td{padding:9px;border-bottom:1px solid #CDD5D5;text-align:center}#game #handWordCards{display:flex;gap:9px;justify-content:center;margin:20px 0}#game #handWordCards .card{width:100px;height:140px}#game #handWordCards .letter{font-size:80px}#game #handWordPreview{display:block;text-align:center;font-size:38px}#game #handWordWarning{padding:12px;background:#FFF0BE;border-radius:18px;font-size:25px}#game .compact #score{height:164px}#game .compact .player{grid-template-columns:68px 1fr;padding:12px 9px;gap:0 5px}#game .compact .player-avatar{width:68px;height:68px}#game .compact .player-avatar>img{width:60px;height:60px}#game .compact .player-name{font-size:27px}#game .compact .player-bio{font-size:19px}#game .compact #actions button{font-size:28px}#game .compact #actions button.primary{font-size:38px}#game .compact .modal{width:calc(100% - 40px)}#game #gameRoot[data-players="4"] .player{grid-template-columns:58px 1fr;gap:0 5px;padding:12px 10px}#game #gameRoot[data-players="4"] .player-avatar{width:58px;height:58px;font-size:24px}#game #gameRoot[data-players="4"] .player-avatar>img{width:50px;height:50px}#game #gameRoot[data-players="4"] .player-name{font-size:25px}#game #gameRoot[data-players="4"] .player-bio{font-size:17px}#game #gameRoot[data-players="4"] .player-points{font-size:36px}#game #gameRoot[data-players="4"] .badge{width:22px;height:22px;top:6px;left:4px}#game #gameRoot[data-players="4"] .badge img{width:18px;height:18px}#game #gameRoot[data-players="4"] .badge.skip{left:28px}#game .modal{inset:auto;left:50%;top:50%;margin:0;transform:translate(-50%,-50%) scale(var(--scale,1));transform-origin:center;max-height:calc(var(--canvas-h,1844px) - 48px)}#game #hand>.card{flex:1;min-width:var(--touch);max-width:112px}#game #bSpecial{min-width:var(--touch)}#game .modal-actions button,#game .option{min-height:var(--touch)}#game .opponent-card{min-width:var(--touch);min-height:var(--touch)}#game .compact #handWordCards{flex-wrap:wrap}#game .compact #handWordCards .card{min-width:var(--touch)}#game #bBoardReset{width:var(--touch);height:var(--touch)}#game .letter{font-size:96px}#game .letter[data-letter="س"],#game .letter[data-letter="ش"]{font-size:76px}#game .cell .letter[data-letter]{font-size:52px}#game #handWordCards .letter[data-letter="س"],#game #handWordCards .letter[data-letter="ش"]{font-size:68px}#game .compact .modal{width:720px}#game #actions{margin-top:auto}

@keyframes g-think{50%{opacity:.25;transform:translateY(-3px)}}
@keyframes g-float{to{transform:translateY(-85px);opacity:0}}
/* ===== افزوده‌ها: قابِ صفحه، زوم، حالت‌های واژه، جلوه‌ها ===== */
#game{position:fixed;inset:0;overflow:hidden;background:#F6F0E6;color:#102E50;font-family:Vazirmatn,sans-serif;-webkit-user-select:none;user-select:none}
#game #gameRoot{overflow:hidden}
#game .zoom-ctl{position:absolute;right:9px;bottom:106px;display:flex;flex-direction:column;gap:6px;z-index:6}
#game .zoom-ctl .round{width:var(--touch);height:var(--touch);padding:24px}
#game .zoom-ctl svg{width:100%;height:100%;fill:none;stroke:#102E50;stroke-width:2.6;stroke-linecap:round}
#game #board.animating{transition:transform .28s cubic-bezier(.2,.9,.3,1)}
#game .cell{transition:transform .12s}
#game .cell:active:not(.card-on){transform:scale(.94)}

/* خانه‌های واژه: درست/نادرست، راهنما، آخرین حرف */
#game .cell.valid .card{filter:drop-shadow(0 0 7px #2FA36BCC)}
#game .cell.invalid .card{filter:drop-shadow(0 0 7px #D45A6DCC)}
#game .cell.hint .card{animation:g-hint .9s ease-in-out infinite alternate}
#game .cell.last .card{animation:g-last 1.4s ease-out 1}
#game .cell.legal{animation:g-legal 2.4s ease-in-out infinite}
#game .cell .card{transition:filter .2s}
#game .cell.glow .card{animation:g-wave .5s ease-out}
#game .lock-icon{animation:g-lockpop .55s cubic-bezier(.2,1.6,.4,1)}

/* کارت‌های دست */
#game .card{transition:transform .2s cubic-bezier(.3,1.7,.5,1),filter .2s}
#game #hand>.card:not(:disabled):hover{transform:translateY(-4px)}
#game #hand>.card.selected{transform:translateY(-14px) scale(1.04)}
#game #hand>.card:active:not(:disabled){transform:translateY(-2px) scale(.97)}
#game #bSpecial:not(:disabled){animation:g-special 2.6s ease-in-out infinite}

/* دکمه‌ها */
#game button.skin{transition:transform .14s cubic-bezier(.3,1.6,.5,1),filter .14s}
#game button.skin:active:not(:disabled){transform:scale(.965)}
#game button.skin.primary:not(:disabled){animation:g-claim 2.2s ease-in-out infinite}
#game .round:active:not(:disabled){transform:scale(.9) rotate(-4deg)}

/* بازیکن نوبت‌دار و امتیاز */
#game .player-avatar.turn{animation:g-ring 1.8s ease-in-out infinite}
#game .player.bump{animation:g-bump .55s cubic-bezier(.2,1.6,.4,1)}
#game .player-points.tick{animation:g-tick .5s cubic-bezier(.2,1.8,.4,1)}
#game #msg.pop{animation:g-msg .38s cubic-bezier(.2,1.7,.4,1)}
#game #msg.shake,#game #boardViewport.shake{animation:g-shake .38s}

/* اعلانِ حرکتِ ربات */
.bot-banner{position:fixed;left:50%;top:27%;z-index:8000;display:flex;align-items:center;gap:12px;padding:12px 20px;border-radius:26px;background:#FFFCF4;color:#102E50;font:700 16px/1.6 Vazirmatn,sans-serif;box-shadow:0 14px 40px #102E5055,0 0 0 3px #F5D879;pointer-events:none;max-width:92vw}
.bot-banner img{width:54px;height:54px;flex:none}
.bot-banner b{color:#1167cf}
#game .cell.bot-target{animation:g-legal 1s ease-in-out infinite}
/* لایه‌ی جلوه‌ها */
.fxLayer{position:fixed;inset:0;pointer-events:none;z-index:9000;overflow:hidden}
.fxLayer .fx{position:absolute;pointer-events:none;will-change:transform,opacity}
.fxLayer .fx-spark{width:10px;height:10px;border-radius:50%}
.fxLayer .fx-star{width:16px;height:16px;clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%)}
.fxLayer .fx-ring{border:4px solid #1782EA;border-radius:50%;width:30px;height:30px}
.fxLayer .fx-score{direction:ltr;unicode-bidi:isolate;font:700 40px Vazirmatn,sans-serif;color:#fff;padding:6px 20px;border-radius:26px;background:linear-gradient(180deg,#2d94f2,#1167cf);box-shadow:0 8px 22px #0b4a9a66;white-space:nowrap}
.fxLayer .fx-score.big{font-size:54px}
.fxLayer .fx-conf{width:11px;height:18px;border-radius:2px}

@keyframes g-hint{from{filter:drop-shadow(0 0 2px #F5B93A)}to{filter:drop-shadow(0 0 12px #F5B93A)}}
@keyframes g-last{0%{filter:drop-shadow(0 0 0 #1782EA)}25%{filter:drop-shadow(0 0 14px #1782EA)}100%{filter:drop-shadow(0 0 0 #1782EA00)}}
@keyframes g-legal{50%{transform:scale(1.045)}}
@keyframes g-wave{0%{transform:scale(1)}40%{transform:scale(1.16) rotate(-2deg);filter:drop-shadow(0 0 14px #FFD35A)}100%{transform:scale(1)}}
@keyframes g-lockpop{0%{transform:scale(0) rotate(-40deg)}100%{transform:scale(1) rotate(0)}}
@keyframes g-special{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px) rotate(-1.5deg)}}
@keyframes g-claim{0%,100%{filter:brightness(1)}50%{filter:brightness(1.07) saturate(1.1)}}
@keyframes g-ring{0%,100%{box-shadow:0 0 0 0 #1782EA55}50%{box-shadow:0 0 0 12px #1782EA00}}
@keyframes g-bump{0%{transform:scale(1)}30%{transform:scale(1.07)}100%{transform:scale(1)}}
@keyframes g-tick{0%{transform:scale(1)}40%{transform:scale(1.5);color:#1167cf}100%{transform:scale(1)}}
@keyframes g-msg{0%{transform:scale(.92);opacity:.4}100%{transform:scale(1);opacity:1}}
@keyframes g-shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-14px)}40%{transform:translateX(11px)}60%{transform:translateX(-8px)}80%{transform:translateX(5px)}}
@keyframes g-modal{from{opacity:0;scale:.88}to{opacity:1;scale:1}}
@keyframes g-back{from{opacity:0}to{opacity:1}}
#game .modal[open]{animation:g-modal .3s cubic-bezier(.2,1.25,.3,1)}
#game .modal[open]::backdrop{animation:g-back .25s ease-out}
#game .modal-actions button,#game .option{transition:transform .14s cubic-bezier(.3,1.6,.5,1)}
#game .option:active{transform:scale(.95)}
#game .option.selected{animation:g-bump .4s}
#game .poem-word.found{animation:g-bump .6s}

@media(prefers-reduced-motion:reduce){#game *,.fxLayer *{animation:none!important;transition:none!important}}

/* ===== چیدمانِ فشرده: زمین ≥ دو سومِ صفحه؛ دکمه‌ها کوچک‌تر و زیرِ زمین ===== */
#game #gameRoot{gap:6px;padding:8px 20px}
#game #score{height:112px}
#game .player{padding:8px 12px 5px;grid-template-columns:62px 1fr;grid-template-rows:30px 26px 30px 14px;gap:0 10px}
#game .player-avatar{width:62px;height:62px}#game .player-avatar>img{width:56px;height:56px}
#game .player-name{font-size:25px}#game .player-bio{font-size:17px}#game .player-points{font-size:34px}
#game .progress{height:11px}#game .poem-count{font-size:17px}
#game .badge{width:24px;height:24px;top:8px;left:8px}#game .badge img{width:19px;height:19px}#game .badge.skip{left:38px}
#game #infoBar{height:74px}#game #iRound{font-size:27px}
#game .round{width:72px;height:72px;min-width:72px;padding:17px}
#game #themeBar{height:38px;padding:3px 16px}#game #themeBar img{height:30px;width:30px}#game #themeBar span{font-size:21px}
#game .multiplier{padding:1px 12px}
#game #msg{height:40px;font-size:24px}
#game #boardViewport{max-height:none;min-height:420px}
#game #handTray{height:176px;padding:6px 12px}
#game #handTray header{height:28px;padding:0 8px 2px}#game #handTray h2{font-size:26px}#game #handCount{font-size:21px}
#game #handLine{height:134px;gap:10px}
#game .card{width:92px;height:134px}
#game #hand>.card{max-width:92px}
#game .letter{font-size:76px}#game .letter[data-letter="س"],#game .letter[data-letter="ش"]{font-size:60px}
#game .corner-letter{font-size:18px;right:9px;top:5px}#game .abjad{font-size:16px;left:9px;top:5px}
#game .mark{width:34px;height:34px;left:7px;bottom:9px}
#game #bSpecial{width:98px;height:140px;padding:6px 5px}
#game .special-label{font-size:16px}#game .special>img{width:46px;height:46px}#game .special>strong{font-size:16px}
#game #steps{height:44px}#game .step{font-size:20px;gap:5px}#game .step img{width:22px;height:22px}
#game #preview{height:64px;padding:2px 20px}#game #wordText{font-size:38px}#game #wordPoints{font-size:25px;padding:2px 14px}#game #preview small{font-size:17px}
#game #actions{height:78px;gap:8px}
#game #actions button{min-height:0;height:78px;font-size:25px;padding:4px 10px}
#game #actions button.primary{font-size:33px}#game #actions img{width:34px;height:34px}
#game .compact #actions button,#game.compact #actions button{font-size:23px}

/* ===== کارت‌های تازه (از طرحِ تأییدشده‌ی خانه) و زمینِ قشنگ‌تر ===== */
#game .card{width:104px;height:136px;background-size:100% 100%;background-repeat:no-repeat;filter:drop-shadow(0 4px 5px #2b1d0a33)}
#game #hand>.card{max-width:104px}
#game .card.selected{filter:drop-shadow(0 0 7px #1782EA) drop-shadow(0 6px 8px #1782EA66)}
#game .card:disabled{filter:grayscale(.55) opacity(.7) drop-shadow(0 2px 3px #2b1d0a22)}
#game .card.empty{filter:none}
#game .letter{font-size:84px;text-shadow:0 2px 0 #ffffff88}
#game .letter[data-letter="س"],#game .letter[data-letter="ش"]{font-size:66px}
#game .corner-letter{right:16px;top:14px;font-size:17px;color:#2a2418}
#game .abjad{left:16px;top:14px;font-size:15px;color:#2a2418}
#game .mark{width:36px;height:36px;left:14px;bottom:15px}
#game #handTray{height:188px}#game #handLine{height:142px}
#game #bSpecial{width:104px;height:142px}
#game .order{top:-10px;right:-4px}

#game .cell{width:88px;height:104px;padding:0;background:none!important;box-shadow:none!important;outline:none!important;transition:transform .12s}
#game .cell::before{content:"";position:absolute;inset:3px;border-radius:15px;background:linear-gradient(180deg,#fffdf8,#f6efe1);box-shadow:inset 0 0 0 1.5px #e8dcc3,inset 0 -5px 9px #6b4a1a0f,0 1px 0 #ffffffaa;transition:box-shadow .2s,background .2s}
#game .cell>*{position:relative}
#game .cell.legal::before{background:radial-gradient(circle at 50% 50%,#9fd0f6 0 9px,transparent 10px),linear-gradient(180deg,#fffdf8,#f6efe1)}
#game .cell.path::before{background:linear-gradient(180deg,#eaf4fe,#d7eafc);box-shadow:inset 0 0 0 3px #1782EA,0 0 12px #1782EA66}
#game .cell.selected::before{background:linear-gradient(180deg,#fff6d6,#ffe9a8);box-shadow:inset 0 0 0 3px #F5B93A,0 0 12px #F5B93A66}
#game .cell.lock-self::before{box-shadow:inset 0 0 0 3px #B58929,0 0 10px #B5892966}
#game .cell.lock-opponent::before{box-shadow:inset 0 0 0 3px #D65D91;background:linear-gradient(180deg,#fff5f9,#fde6ef)}
#game .cell .card{width:80px;height:102px;position:absolute;left:4px;top:1px;filter:drop-shadow(0 3px 4px #2b1d0a40)}
#game .cell .letter{font-size:60px}
#game .cell .letter[data-letter="س"],#game .cell .letter[data-letter="ش"]{font-size:48px}
#game .cell .corner-letter{font-size:13px;right:12px;top:11px}
#game .cell .abjad{font-size:12px;left:12px;top:11px}
#game .cell .mark{width:26px;height:26px;left:10px;bottom:11px}
#game .ownership{bottom:3px;left:14px;right:14px;height:7px}
#game .cell>.lock-icon{right:2px;top:2px;width:28px;height:28px;z-index:4}
#game #boardViewport{background-image:radial-gradient(circle at 6% 4%,#a8d2f55c 0,transparent 34%),radial-gradient(circle at 96% 38%,#f7b6cf48 0,transparent 30%),radial-gradient(circle at 12% 96%,#f6dc8a50 0,transparent 32%),linear-gradient(180deg,#fbf6ea,#f2eadb)!important;border-radius:26px;box-shadow:inset 0 0 0 3px #e2d5b9,inset 0 8px 22px #5a3d1a18,0 8px 20px #2b1d0a22}

/* ===== اصلاحات: پیش‌نمایشِ واژه، نشانِ بزرگ، قفلِ بزرگ ===== */
#game #preview{padding:2px 22px;gap:14px}
#game #preview>div:first-child{min-width:0;flex:1;align-items:flex-start;text-align:right}
#game #wordText{font-size:34px;line-height:1.25;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game #wordText.placeholder{font-size:20px;font-weight:500;color:#8a95a0}
#game #wordPoints{font-size:23px;padding:2px 12px;white-space:nowrap}
#game #wordExplanation{font-size:16px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
#game #preview>div:last-child{flex:none;align-items:flex-end;max-width:46%}
/* نشان: بالا-چپِ کارت، بزرگ و کامل */
#game .mark{left:9px;top:8px;bottom:auto;width:48px;height:48px;filter:drop-shadow(0 2px 2px #0003)}
#game .cell .mark{left:7px;top:6px;bottom:auto;width:38px;height:38px}
#game .abjad{left:50%;transform:translateX(-50%);top:auto;bottom:9px;font-size:16px;font-weight:700}
#game .cell .abjad{left:50%;top:auto;bottom:8px;font-size:13px}
#game .card.marked{filter:drop-shadow(0 0 7px #F5B93A) drop-shadow(0 3px 4px #2b1d0a40)}
#game .card.marked.selected{filter:drop-shadow(0 0 8px #1782EA) drop-shadow(0 0 5px #F5B93A)}
/* قفلِ روی خانه */
#game .cell>.lock-icon{right:-3px;top:-5px;width:46px;height:46px;padding:6px;border-radius:50%;background:#fffdf8;box-shadow:0 2px 7px #0000004d,inset 0 0 0 2px #e8dcc3;z-index:6;animation:g-lockpop .55s cubic-bezier(.2,1.6,.4,1)}
#game .cell.lock-self>.lock-icon{box-shadow:0 2px 7px #0000004d,inset 0 0 0 3px #B58929}
#game .cell.lock-opponent>.lock-icon{box-shadow:0 2px 7px #0000004d,inset 0 0 0 3px #D65D91}
#game .player .badge{width:30px;height:30px}#game .player .badge img{width:24px;height:24px}

/* ===== واژه‌های ساخته‌شده‌ی هر بازیکن (نگه‌داشتن روی کارتِ بازیکن) ===== */
.words-pop{position:fixed;z-index:7000;max-width:min(92vw,420px);padding:12px 14px;border-radius:20px;background:#FFFCF4;color:#102E50;font:700 14px/1.5 Vazirmatn,sans-serif;box-shadow:0 14px 36px #102E5055,0 0 0 2px #e8dcc3;pointer-events:none;animation:g-modal .22s cubic-bezier(.2,1.25,.3,1)}
.words-pop h3{margin:0 0 8px;font-size:15px}.words-pop h3 small{font-weight:500;color:#63798B;font-size:12px;margin-right:6px}
.words-pop p{margin:0;color:#63798B;font-weight:500}
.wp-list{display:flex;flex-wrap:wrap;gap:6px;max-height:220px;overflow:hidden}
.wp-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:14px;background:#EAF4FE;box-shadow:inset 0 0 0 1px #c9def2}
.wp-chip b{font-size:12px;color:#1167cf}.wp-chip.hand{background:#FFF0BE;box-shadow:inset 0 0 0 1px #ecd890}
#game .player:focus-visible{outline:3px solid var(--focus,#1266D9);outline-offset:2px}

/* ===== نوارِ تم / پیشرفت، روبانِ شعر، پروازِ نمادها (بدونِ نوارِ مراحل) ===== */
#game #steps{display:none}
#game #infoBar{height:68px;gap:8px;align-items:center}
#game #themeBar{position:relative;flex:1;min-width:0;height:60px;padding:4px 16px;border-radius:22px;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;isolation:isolate;box-shadow:0 3px 8px #5b43182b}
#game #themeFill{position:absolute;z-index:-1;right:5px;top:5px;bottom:5px;width:var(--p,0%);max-width:calc(100% - 10px);border-radius:17px;background:#BFD9F4 url(../assets/ui/result/surfaces/progress-fill-blue.webp) center/100% 100% no-repeat;opacity:.62;transition:width .9s cubic-bezier(.3,.9,.3,1)}
#game #gameRoot[data-accent=pink] #themeFill{background-image:url(../assets/ui/result/surfaces/progress-fill-pink.webp);background-color:#F6CFDD}
#game #gameRoot[data-accent=yellow] #themeFill{background-image:url(../assets/ui/result/surfaces/progress-fill-yellow.webp);background-color:#F7E4A0}
#game #themeFill::after{content:"";position:absolute;left:0;top:0;bottom:0;width:26px;border-radius:17px;background:linear-gradient(90deg,#fff9,#fff0);animation:g-shimmer 2.6s ease-in-out infinite}
@keyframes g-shimmer{0%,100%{opacity:.35}50%{opacity:1}}
#game .tb-main{display:flex;align-items:center;gap:10px;min-width:0}
#game #themeIcon{width:34px;height:34px;flex:none}
#game .tb-text{font-size:26px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;text-shadow:0 1px 0 #fff8}
#game .tb-text strong{font-weight:700;color:#0F5FB8}
#game .tb-count{flex:none;display:flex;align-items:center;gap:6px;padding:2px 14px;border-radius:20px;background:#FFF0BEdd;box-shadow:inset 0 0 0 1.5px #E7CB7A;font-size:22px;font-weight:700;white-space:nowrap}
#game .tb-count img{width:21px;height:21px}
#game .tb-count b{font-size:27px}
#game .theme-pop{position:absolute;max-width:min(88%,560px)}
#game .theme-pop .tp-meta{margin-top:6px;font-size:13px;color:#102E50}
#game #bGameMenu,#game #bHelp{flex:none}
.fxLayer .fx-poem-token{display:flex;align-items:center;justify-content:center;gap:6px;min-width:150px;height:64px;padding:0 20px 0 16px;background:url(../assets/ui/dialogs/parts/poem-token.webp) center/100% 100% no-repeat;font:700 26px Vazirmatn,sans-serif;color:#102E50;white-space:nowrap}
.fxLayer .fx-poem-token i{width:28px;height:28px;background:url(../assets/ui/dialogs/icons/quill.svg) center/contain no-repeat}
.fxLayer .fx-quill-trail{width:112px;height:56px;object-fit:contain;display:block}
.fxLayer .fx-lconf{width:44px;height:60px;background-size:100% 100%;font:700 26px Vazirmatn,sans-serif;color:#102E50;display:grid;place-items:center;padding-top:6px}
.fxLayer .fx-mark{width:60px;height:60px;object-fit:contain;display:block}
@media (prefers-reduced-motion:reduce){#game #themeFill::after{animation:none}}

/* ===== خطِ مسیرِ واژه (کشیدنِ انگشت روی حروف) ===== */
#game #pathLine{--line:#1782EA}
#game #gameRoot[data-accent=pink] #pathLine{--line:#E0659A}
#game #gameRoot[data-accent=yellow] #pathLine{--line:#E0A21B}
#game #pathLine .pl-glow,#game #pathLine .pl-core{fill:none;stroke-linecap:round;stroke-linejoin:round}
#game #pathLine .pl-glow{stroke:var(--line);stroke-width:30;opacity:.26}
#game #pathLine .pl-core{stroke:var(--line);stroke-width:10;opacity:.92;filter:drop-shadow(0 0 5px var(--line))}
#game #pathLine .pl-start{fill:#fff;stroke:var(--line);stroke-width:5}
#game #pathLine .pl-end{fill:var(--line);stroke:#fff;stroke-width:4}
#game #pathLine[data-state=valid]{--line:#2EA66B}
#game #pathLine[data-state=invalid]{--line:#D8574E}
#game #pathLine[data-state=valid] .pl-core{animation:g-pathglow 1.1s ease-in-out infinite alternate}
@keyframes g-pathglow{from{stroke-width:9}to{stroke-width:14}}
@media (prefers-reduced-motion:reduce){#game #pathLine .pl-core{animation:none!important}}

/* ===== خانه‌های ویژه و شعله‌ی زنجیره ===== */
/* آواتارِ هم‌بازی = استیکرِ ۹حالته: بدونِ بریدنِ گرد، از قابِ حلقه کمی بیرون می‌زند */
#game .player-avatar>img.mood{width:76px;height:76px;max-width:none;margin-top:-8px;object-fit:contain;border-radius:0;pointer-events:none;filter:drop-shadow(0 2px 2px #10305022)}
#game #gameRoot[data-players="4"] .player-avatar>img.mood{width:64px;height:64px;margin-top:-7px}
#game .player-avatar>img.mood-pop{animation:g-mood .55s cubic-bezier(.3,1.6,.5,1)}
@keyframes g-mood{0%{transform:scale(.55) rotate(-9deg);opacity:.15}100%{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){#game .player-avatar>img.mood-pop{animation:none}}
/* خانه‌های ویژه و زنجیره: هنرِ کیتِ ChatGPT (js/board-art.js، css/online.css)؛ خودِ برچسب‌ها اینجا جدا از تصویر نوشته می‌شوند */
#game .cell .vzSpecialArt{z-index:3}
#game .cell .vzSpecialArt>.vzHouseLabel{font-size:26px}
#game .cell .vzSpecialArt.covered>.vzHouseLabel{font-size:11px}
#game .player-avatar .vzChainArt{width:38px;height:38px;right:-9px;bottom:-9px}
#game .player-avatar .vzChainArt b{width:15px;height:15px;font-size:9px}
#game #gameRoot[data-players="4"] .player-avatar .vzChainArt{width:32px;height:32px;right:-8px;bottom:-8px}
#game #bSound{width:78px;height:78px;min-width:78px;flex:none}
.vzChainFloat.fx-chain{position:fixed;z-index:99999;pointer-events:none;transform:translate(-50%,-50%);min-width:190px}
