*{box-sizing:border-box;-webkit-tap-highlight-color:transparent  renderGuideLang();
  localizeMenuSelects();
}
:root{--g:#d8a33a;--g2:#ffe08a;--bg:#050301;--red:#d92e2e;--blue:#1f74b7;--yel:#ffda4a;--green:#32d95a}
html,body{margin:0;background:var(--bg);color:#f7e6b2;font-family:Georgia,serif;overflow-x:hidden}
button,input,select{font:inherit}button{touch-action:manipulation;cursor:pointer}
.screen{display:none;min-height:100vh}.screen.active{display:block}
.btn{border:2px solid var(--g);border-radius:12px;background:linear-gradient(#2d1705,#070301);color:#fff0bd;font-weight:900;min-height:48px;padding:10px}
.btn.on{background:linear-gradient(#ffd44d,#b77817);color:#160900}.primary{grid-column:1/-1;background:linear-gradient(#ffde64,#bd7c18 55%,#2e1601);color:#160900;font-size:21px}
.card,.side,.box{background:rgba(8,4,1,.94);border:3px solid var(--g);border-radius:20px;padding:16px;box-shadow:0 0 25px #000}
#menu{background:radial-gradient(circle at 15% 20%,#57340c,#090401 55%,#000);display:none}
#menu.active{display:block}.menuPage{min-height:100vh;display:flex;align-items:center;justify-content:flex-end;padding:18px}
.menuCard{width:min(600px,96vw)}h1{font-size:clamp(40px,9vw,78px);margin:0;text-align:center;color:var(--g2);letter-spacing:5px;text-shadow:0 3px #684007}.sub{text-align:center;color:#9bd0bd;font-weight:900;letter-spacing:3px;font-size:clamp(17px,4vw,28px)}.quote{text-align:center;color:#ffe8ad}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}input,select{width:100%;min-height:48px;border:2px solid #8d6322;border-radius:10px;background:#050200;color:#fff0bd;padding:11px}.note,.copy{text-align:center;color:#d7bd7c;font-size:13px;margin-top:10px}
.top{position:sticky;top:0;z-index:20;background:linear-gradient(90deg,#050200,#170b03,#050200);border-bottom:2px solid var(--g);display:flex;gap:8px;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:8px}.brand{font-size:clamp(20px,4vw,30px);font-weight:900;color:var(--g2);letter-spacing:3px}.clock{font-family:monospace;font-size:22px;background:#000;border:2px solid var(--g);border-radius:10px;color:#60ff8b;padding:8px 12px}
.layout{display:grid;grid-template-columns:225px minmax(0,1fr) 225px;gap:10px;max-width:1280px;margin:10px auto;padding:0 8px}.side h3{margin:0 0 10px;color:var(--g2)}.row{display:flex;justify-content:space-between;border-bottom:1px solid rgba(216,163,58,.25);padding:6px 0}
.status{background:#0a0501;border:2px solid var(--g);border-radius:12px;text-align:center;padding:9px;margin-bottom:6px;color:#ffe4a1;font-weight:900}
.boardShell{width:min(760px,calc(100vw - 480px));margin:auto}.coord{display:grid;grid-template-columns:26px repeat(15,1fr);color:#d8a33a;text-align:center;font-weight:900;font-size:13px}
.board{display:grid;grid-template-columns:26px repeat(15,1fr);grid-template-rows:repeat(15,1fr);width:100%;aspect-ratio:16/15;border:3px solid #b77b21;background:#000;overflow:hidden}
.rank{display:flex;align-items:center;justify-content:center;background:#050200;color:#d8a33a;font-size:12px}.cell{position:relative;display:flex;align-items:center;justify-content:center;border:1px solid rgba(74,38,10,.55);background:#d2933b;overflow:hidden}.cell.dark{background:#95591f}.west{background:var(--blue)!important}.east{background:#9e1d1d!important}.tengri{background:var(--yel)!important}.kur:after{content:"";position:absolute;inset:0;border:3px solid var(--red);pointer-events:none}.legal{outline:3px solid var(--green);outline-offset:-5px}.selected{box-shadow:inset 0 0 0 4px #fff}
.piece{width:82%;height:82%;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;border:2px solid #222;box-shadow:0 2px 7px #000b;line-height:1;font-weight:900;z-index:1}.white{background:radial-gradient(circle at 35% 25%,#fff,#f1ce79 58%,#90600d);color:#111}.black{background:radial-gradient(circle at 35% 25%,#888,#191919 58%,#000);color:#fff;border-color:#aaa}.ico{font-size:clamp(12px,2vw,22px)}.pid{font-size:clamp(6px,1vw,10px);text-shadow:0 1px 2px #000}
.controls{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:8px auto;max-width:760px}.eventsBox{max-width:1280px;margin:8px auto;background:#0a0501;border:2px solid var(--g);border-radius:14px;padding:10px;display:grid;grid-template-columns:1fr 1fr;gap:10px}.events,.log{height:132px;overflow:auto;background:#050200;border:1px solid rgba(216,163,58,.45);border-radius:10px;padding:8px;font-size:13px;line-height:1.35}
.replayBar{max-width:1280px;margin:8px auto;background:#0a0501;border:2px solid var(--g);border-radius:14px;padding:10px;display:none;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap}.replayBar.active{display:flex}.replayBar input{width:min(420px,80vw)}
.guideWrap{max-width:1100px;margin:0 auto;padding:12px}.ruleGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.rule{background:#fff8e8;color:#111;border-left:8px solid #163d75;border-radius:10px;padding:10px}
#end{background:radial-gradient(circle at center,#5d3409,#050301 60%,#000)}.endPage{min-height:100vh;display:flex;align-items:flex-end;justify-content:center;padding:24px}.endCard{width:min(780px,94vw);background:rgba(10,5,1,.9);border:3px solid var(--g);border-radius:18px;padding:18px;text-align:center;margin-bottom:6vh}
.toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:#120800;border:2px solid var(--g2);color:#fff5c8;border-radius:14px;padding:12px 16px;z-index:99;display:none;max-width:92%;box-shadow:0 0 25px #000;font-weight:900}
@media(max-width:900px){.menuPage{justify-content:center;padding:10px}.layout{grid-template-columns:1fr}.boardShell{width:96vw}.controls{grid-template-columns:repeat(2,1fr)}.eventsBox{grid-template-columns:1fr;margin:8px}.ruleGrid{grid-template-columns:1fr}.primary{font-size:18px}}

/* 7.14.2 Touch Piece Preview: pressed piece enlarges only while touch/pointer is held. */
#board .piece{
  transform-origin:center center;
  transition:transform .11s ease, filter .11s ease, box-shadow .11s ease;
  touch-action:manipulation;
  will-change:transform;
}
#board .piece.touch-preview{
  transform:scale(1.34);
  z-index:30;
  filter:brightness(1.14) saturate(1.08);
  box-shadow:0 4px 14px #000d,0 0 0 3px #fff9,0 0 18px #ffd54acc;
}
@media (max-width:700px){#board .piece.touch-preview{transform:scale(1.42)}}
@media (prefers-reduced-motion:reduce){#board .piece{transition:none}}



/* ---- extracted style block ---- */

#intro{background:linear-gradient(rgba(0,0,0,.00),rgba(0,0,0,.18)),url('../assets/tanhu-mete-horse-archers-intro-6312.jpg?v=8.1.5') center/cover no-repeat;
  min-height:82vh;
  box-shadow:0 0 35px #000,inset 0 0 35px #000;
  position:relative;
  overflow:hidden;
}
.posterPanel:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to bottom,rgba(0,0,0,0) 55%,rgba(0,0,0,.72));
}
.posterText{
  position:absolute;
  z-index:2;
  left:16px;right:16px;bottom:18px;
  text-align:center;
  color:#ffe3a1;
  text-shadow:0 2px 6px #000;
  font-weight:900;
}
.menuCard{
  width:100%!important;
  align-self:center;
  background:rgba(6,4,2,.95)!important;
  border-radius:12px!important;
}
.profileRankPanel{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:12px;
}
.profileHero,.rankHero{
  background:rgba(6,4,2,.94);
  border:3px solid var(--g);
  border-radius:12px;
  padding:14px;
  box-shadow:0 0 25px #000;
}
.profileHeader{
  display:flex;
  gap:14px;
  align-items:center;
}
.profileHeader .avatar{width:80px;height:80px;font-size:42px}
.profileActions{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:8px;
  margin-top:12px;
}
.quickRules{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
  margin-top:10px;
}
.quickRule{
  background:rgba(5,5,4,.92);
  border:1px solid rgba(216,165,56,.45);
  border-radius:10px;
  padding:10px;
  min-height:92px;
  color:#fff0bd;
}
.quickRule b{color:var(--g2)}
.generatedPreview{
  grid-column:1/-1;
  background:url('../assets/game/tanhu-mete/embedded-1.png?v=8.1.5') center/cover no-repeat;
  min-height:210px;
  border:2px solid var(--g);
  border-radius:12px;
  box-shadow:inset 0 0 40px #000;
  display:none;
}
#end{
  background:linear-gradient(rgba(0,0,0,.18),rgba(0,0,0,.72)),url('../assets/game/tanhu-mete/embedded-1.jpg?v=8.1.5')!important;
  background-size:cover!important;
  background-position:center!important;
}
.guidePoster{content:url('../assets/game/tanhu-mete/embedded-2.jpg?v=8.1.5');}
@media(max-width:1100px){
  .menuPage{grid-template-columns:1fr;align-items:start}
  .posterPanel{min-height:58vh}
  .profileRankPanel{grid-template-rows:auto auto}
  .quickRules{grid-template-columns:1fr}
}


/* ---- extracted style block ---- */

.langRow{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:center;border:1px solid rgba(216,163,58,.45);border-radius:12px;padding:10px;background:rgba(0,0,0,.35)}
.langRow label{font-weight:900;color:var(--g2)}
#langSelect{min-height:46px}
.fxLayer{position:fixed;inset:0;pointer-events:none;z-index:9999;overflow:hidden}
.dustFx{position:absolute;width:110px;height:110px;border-radius:50%;background:radial-gradient(circle,rgba(226,196,137,.9),rgba(152,98,44,.55) 45%,rgba(80,46,20,0) 72%);filter:blur(2px);animation:dustPop .7s ease-out forwards;transform:translate(-50%,-50%) scale(.25)}
.lightningFx{position:absolute;width:150px;height:150px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.98),rgba(255,226,64,.75) 30%,rgba(100,180,255,.45) 55%,rgba(255,255,255,0) 78%);box-shadow:0 0 35px #fff,0 0 70px #ffe44a;animation:flashPop .9s ease-out forwards;transform:translate(-50%,-50%) scale(.2)}
.starFx{position:absolute;font-size:62px;color:#ffe76a;text-shadow:0 0 10px #fff,0 0 28px #ffc400;animation:starRise 1s ease-out forwards;transform:translate(-50%,-50%) scale(.3)}
@keyframes dustPop{0%{opacity:0;transform:translate(-50%,-50%) scale(.15)}35%{opacity:1;transform:translate(-50%,-50%) scale(1.15)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.8)}}
@keyframes flashPop{0%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(0)}20%{opacity:1;transform:translate(-50%,-50%) scale(1.25) rotate(10deg)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.9) rotate(-8deg)}}
@keyframes starRise{0%{opacity:0;transform:translate(-50%,-50%) scale(.3) rotate(0)}30%{opacity:1;transform:translate(-50%,-70%) scale(1.1) rotate(15deg)}100%{opacity:0;transform:translate(-50%,-160%) scale(.75) rotate(45deg)}}


/* ---- extracted style block ---- */

.intGuideWrap{margin-top:14px;background:#06120f;color:#f8e7b6;border:3px solid #d8a33a;border-radius:14px;padding:12px;box-shadow:0 0 25px #000}
.intGuideTop{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;border-bottom:2px solid #d8a33a;padding-bottom:10px;margin-bottom:10px}
.intGuideTitle{font-size:clamp(30px,5vw,58px);font-weight:900;color:#ffe08a;letter-spacing:4px;text-shadow:0 3px #5b3205}
.intGuideSub{font-size:clamp(16px,2.5vw,28px);font-weight:900;color:#e9eee7;letter-spacing:2px}
#intGuideSelect{max-width:370px;background:#050200!important;color:#fff0bd!important}
.intPoster{display:grid;grid-template-columns:1.15fr .72fr .95fr;gap:8px}
.intPanel{border:2px solid #9e6d24;border-radius:9px;background:linear-gradient(180deg,#0b1f23,#07100d);padding:10px;min-height:88px}
.intPanel h3{margin:0 0 8px;color:#ffe08a;font-size:18px;border-bottom:1px solid rgba(216,163,58,.45);padding-bottom:5px}
.intPanel p,.intPanel li{font-size:13px;line-height:1.35;margin:4px 0}
.intBoard{display:grid;grid-template-columns:repeat(15,1fr);aspect-ratio:1/1;border:2px solid #111;background:#c69049;margin:5px 0}
.intCell{border:1px solid rgba(0,0,0,.3);background:#d3a15a}.intCell:nth-child(odd){background:#b97a38}.intCell.blue{background:#1f74b7}.intCell.red{background:#9e1d1d}.intCell.yellow{background:#ffd944}.intCell.kur{outline:2px solid #d92e2e;outline-offset:-2px}
.intRanks{display:grid;grid-template-columns:1fr auto;gap:6px}.rankName{display:flex;align-items:center;gap:8px;border-bottom:1px solid rgba(216,163,58,.25);padding:5px 0}.rankIcon{font-size:28px}.rankCount{padding:5px 0;color:#ffe08a;font-weight:900}
.intMove{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;border-bottom:1px solid rgba(216,163,58,.25);padding:6px 0}
.bigKusatma{font-size:clamp(25px,4vw,46px);font-weight:900;color:#ffe08a;text-align:center;text-shadow:0 0 12px #000}
.validBox{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.validBox div{background:#e6cf9a;color:#111;border-radius:6px;padding:6px;text-align:center;font-size:12px}
.invalidBox{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.invalidBox div{background:#f0d2c6;color:#111;border-radius:6px;padding:6px;text-align:center;font-size:12px}
.intBottom{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:8px}
.check{color:#3ee05d;font-weight:900}.cross{color:#ff5d5d;font-weight:900}.goldText{color:#ffe08a;font-weight:900}
@media(max-width:900px){.intPoster{grid-template-columns:1fr}.intBottom{grid-template-columns:1fr}.validBox,.invalidBox{grid-template-columns:1fr 1fr}.intGuideTop{align-items:flex-start}}


/* ---- extracted style block ---- */

.ceoManual{margin-top:18px;background:#06110f;color:#f6e2ad;border:3px solid #d8a33a;border-radius:16px;padding:14px;box-shadow:0 0 28px #000}
.ceoManualHead{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap;border-bottom:2px solid #d8a33a;padding-bottom:10px;margin-bottom:12px}
.ceoManualTitle{font-size:clamp(26px,4.5vw,52px);font-weight:900;color:#ffe08a;letter-spacing:3px;text-shadow:0 3px #5b3205}
.ceoManualSub{color:#e8dec0;font-weight:900;letter-spacing:1px}
#ceoManualLang{max-width:380px;background:#050200!important;color:#fff0bd!important}
.ceoManualGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.ceoSec{border:2px solid #9e6d24;border-radius:10px;background:linear-gradient(180deg,#092026,#07100d);padding:10px;min-height:120px}
.ceoSec h3{margin:0 0 8px;color:#ffe08a;font-size:17px;border-bottom:1px solid rgba(216,163,58,.42);padding-bottom:5px}
.ceoSec p,.ceoSec li{font-size:13px;line-height:1.38;margin:4px 0}
.ceoSec ul{padding-left:18px;margin:6px 0}.ceoManual[dir="rtl"] .ceoSec ul{padding-right:18px;padding-left:0}
.ceoBoardMini{display:grid;grid-template-columns:repeat(15,1fr);aspect-ratio:1/1;border:2px solid #111;margin:6px 0;background:#c69049}
.ceoCell{border:1px solid rgba(0,0,0,.28);background:#d3a15a}.ceoCell:nth-child(odd){background:#b97a38}.ceoBlue{background:#1f74b7!important}.ceoRed{background:#9e1d1d!important}.ceoYellow{background:#ffd944!important}.ceoKur{outline:2px solid #d92e2e;outline-offset:-2px}
.ceoRankRow{display:grid;grid-template-columns:40px 1fr 40px;gap:6px;align-items:center;border-bottom:1px solid rgba(216,163,58,.25);padding:5px 0}
.ceoIcon{font-size:27px;text-align:center}.ceoCount{color:#ffe08a;font-weight:900;text-align:right}
.ceoBadge{display:inline-block;border-radius:12px;padding:2px 7px;margin:2px;background:#112a32;border:1px solid rgba(216,163,58,.5);color:#ffe08a}
.ceoGood{color:#46e566;font-weight:900}.ceoBad{color:#ff6666;font-weight:900}.ceoGold{color:#ffe08a;font-weight:900}.ceoHuge{font-size:clamp(28px,5vw,54px);color:#ffe08a;font-weight:900;text-align:center;text-shadow:0 0 15px #000}
@media(max-width:1050px){.ceoManualGrid{grid-template-columns:1fr}.ceoSec{min-height:auto}}


/* ---- extracted style block ---- */

/* V30: V20 ana gövde/oynanış sabit.
   Poster artık orijinal resmi kırpmaz: Mete'nin kılıcı ve at başı görünür.
   Ana menüde kalan küçük Türkçe metinler de seçilen dile göre çevrilir. */
#menu{
  background:radial-gradient(circle at 20% 20%,#5b3810,#0a0501 52%,#000 100%) !important;
  background-image:none !important;
}
.posterPanel{
  background-image:url('../assets/game/tanhu-mete/embedded-2.png?v=8.1.5') !important;
  background-size:contain !important;
  background-position:center center !important;
  background-repeat:no-repeat !important;
  background-color:#050301 !important;
  border:3px solid var(--g) !important;
  border-radius:12px !important;
  min-height:86vh !important;
  box-shadow:0 0 35px #000,inset 0 0 35px #000 !important;
}
.posterPanel:after,.posterText{display:none !important;}
.menuCard{background:rgba(6,4,2,.95) !important;}
.quickRule b{display:block;margin-bottom:4px;}
@media(max-width:1100px){
  .posterPanel{min-height:76vh !important;background-size:contain !important;background-position:center center !important;}
}
@media(max-width:700px){
  .posterPanel{min-height:70vh !important;background-size:contain !important;}
}


/* ---- extracted style block ---- */

/* V36: target visual composition — layout only, game engine untouched */
#menu{background:#020202!important;overflow-x:hidden}
#menu .menuPage{
  width:100%;max-width:1920px;margin:0 auto;min-height:100vh;
  display:grid!important;grid-template-columns:minmax(330px,31fr) minmax(440px,37fr) minmax(360px,32fr)!important;
  grid-template-rows:auto auto auto;gap:12px!important;align-items:stretch!important;
  padding:10px!important;
}
#menu .posterPanel,#menu .menuCard,#menu .profileHero,#menu .rankHero{
  border:2px solid #b47a16!important;border-radius:10px!important;
  box-shadow:inset 0 0 0 1px rgba(255,214,106,.15),0 3px 16px #000!important;
  background-color:#050403!important;
}
#menu .posterPanel{
  grid-column:1;grid-row:1;min-height:710px!important;height:auto!important;
  background-size:cover!important;background-position:center center!important;position:relative!important;overflow:hidden!important;
}
#menu .posterPanel:before{content:"";position:absolute;left:0;right:0;top:0;height:135px;background:linear-gradient(#171006 0%,rgba(12,8,3,.92) 65%,transparent);z-index:2;pointer-events:none}
#menu .posterOverlayTitle{position:absolute;z-index:4;top:22px;left:18px;right:18px;text-align:center;color:#e8bd61;text-shadow:0 3px 5px #000;font-family:Georgia,serif;font-weight:900;letter-spacing:2px;line-height:1.08}
#menu .posterOverlayTitle strong{display:block;font-size:clamp(28px,2.8vw,46px)}
#menu .posterOverlayTitle span{display:block;font-size:clamp(15px,1.45vw,25px);margin-top:6px}
#menu .posterText{display:block!important;left:16px!important;right:16px!important;bottom:12px!important;z-index:5!important;padding:9px 12px!important;border:1px solid #b47a16!important;border-radius:7px!important;background:rgba(0,0,0,.82)!important;line-height:1.14!important}
#menu .posterText>div:nth-child(1){font-size:clamp(13px,1.12vw,19px)!important}
#menu .posterText>div:nth-child(2){font-size:clamp(14px,1.25vw,21px)!important}
#menu .posterText>div:nth-child(3){font-size:clamp(9px,.75vw,12px)!important;margin-top:7px!important}
#menu .menuCard{grid-column:2;grid-row:1;width:100%!important;align-self:stretch!important;padding:12px!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important}
#menu .menuCard>h1{font-size:clamp(29px,3.1vw,54px)!important;line-height:1!important;letter-spacing:2px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;margin:4px 0 5px!important}
#menu .menuCard .sub{font-size:clamp(19px,1.6vw,29px)!important;line-height:1.15!important}
#menu .menuCard .quote{font-size:clamp(13px,.95vw,17px)!important;margin:8px 5px 11px!important;min-height:38px;display:flex;align-items:center;justify-content:center}
#menu .grid{gap:8px!important}
#menu .btn,#menu input,#menu select{min-height:40px!important;border-radius:8px!important}
#menu .mode{font-size:clamp(13px,1.05vw,18px)!important;padding:7px 5px!important}
#menu .langRow{padding:7px!important;min-height:50px!important}
#menu .profileBox{grid-column:1/-1!important;gap:10px!important;padding:8px!important}
#menu .profile{min-width:0!important;gap:7px!important}
#menu .profile .avatar{width:52px!important;height:52px!important;min-width:52px!important;font-size:28px!important}
#menu .profile>div:last-child{min-width:0!important;flex:1!important}
#menu .profile input:not([type=file]){min-height:38px!important;padding:7px!important;font-size:15px!important}
#menu input.fileMini[type=file]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
#menu .tanhuFilePicker{display:grid!important;grid-template-columns:minmax(102px,auto) minmax(0,1fr)!important;gap:5px!important;align-items:center!important;margin-top:4px!important;max-width:100%!important}
#menu .tanhuFileButton{min-height:30px!important;padding:4px 8px!important;border:1px solid #d19b29!important;border-radius:6px!important;background:linear-gradient(#ffd76a,#c98716)!important;color:#160b00!important;font:700 11px Georgia,serif!important;white-space:nowrap!important;cursor:pointer!important}
#menu .tanhuFileName{font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-width:0!important;color:#ddc68f!important}
#menu .statsMini{font-size:11px!important;margin-top:3px!important}
#menu #startBtn{grid-column:1/-1!important;font-size:clamp(16px,1.3vw,22px)!important}
#menu #leaderBtn{grid-column:2!important}

#menu .note{font-size:11px!important;margin-top:8px!important}
#menu .profileRankPanel{grid-column:3;grid-row:1;display:grid!important;grid-template-rows:auto 1fr!important;gap:12px!important}
#menu .profileHero,#menu .rankHero{padding:12px!important}
#menu .profileHero h2,#menu .rankHero h2{font-size:clamp(18px,1.55vw,27px)!important}
#menu .profileHeader .avatar{width:62px!important;height:62px!important;font-size:34px!important}
#menu .profileHeader>div:last-child>div:first-child{font-size:clamp(18px,1.45vw,25px)!important}
#menu .profileActions{gap:7px!important;margin-top:9px!important}
#menu .profileActions .btn{font-size:12px!important;padding:5px!important}
#menu .rankTabs{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:7px!important}
#menu .rankTabs .btn{font-size:11px!important;padding:4px 2px!important}
#menu .rankList{min-height:145px!important}
#menu .quickRules{grid-column:1/-1!important;grid-row:2!important;display:grid!important;grid-template-columns:repeat(5,1fr)!important;gap:8px!important;margin:0!important}
#menu .quickRule{min-height:62px!important;padding:8px!important;border-radius:8px!important;font-size:12px!important;line-height:1.25!important}
#menu .quickRule b{font-size:14px!important;margin-bottom:4px!important}
#tanhuCopyright{grid-column:1/-1!important;grid-row:3!important;width:100%!important;max-width:none!important;margin:0 0 12px!important;padding:11px 18px!important;border:2px solid #b47a16!important;border-radius:10px!important;display:grid!important;grid-template-columns:150px 1fr 280px!important;grid-template-rows:auto auto!important;column-gap:18px!important;align-items:center!important;background:linear-gradient(100deg,#080806,#07120f 70%,#030403)!important}
#tanhuCopyright:before{content:"";grid-column:1;grid-row:1/3;width:112px;height:112px;margin:auto;display:block;background:url("../assets/tanhu-games-official-logo-6316.png?v=8.1.5") center/contain no-repeat;filter:drop-shadow(0 0 10px rgba(47,198,255,.38));}
#tanhuCopyright h2{grid-column:2;grid-row:1;font-size:clamp(20px,2vw,31px)!important;margin:0!important;line-height:1!important}
#tanhuCopyright .copyrightSeal{grid-column:2;grid-row:2;font-size:clamp(14px,1.25vw,20px)!important;margin:3px 0!important}
#tanhuCopyright p{grid-column:2;margin:2px 0!important;font-size:11px!important;line-height:1.25!important;text-align:center}
#tanhuCopyright p:nth-of-type(3){grid-column:3;grid-row:1;text-align:center!important;font-size:13px!important}
#tanhuCopyright .rights{grid-column:3;grid-row:2;border:0!important;padding:0!important;margin:0!important;font-size:15px!important}
@media(max-width:1150px){
 #menu .menuPage{grid-template-columns:1fr 1fr!important}
 #menu .posterPanel{grid-column:1;grid-row:1}.menuCard{grid-column:2!important;grid-row:1!important}
 #menu .profileRankPanel{grid-column:1/-1!important;grid-row:2!important;grid-template-columns:1fr 1fr!important;grid-template-rows:auto!important}
 #menu .quickRules{grid-row:3!important;grid-template-columns:repeat(3,1fr)!important}
 #tanhuCopyright{grid-row:4!important;grid-template-columns:120px 1fr 220px!important}
}
@media(max-width:760px){
 #menu .menuPage{display:block!important;padding:7px!important}
 #menu .posterPanel{min-height:72vh!important;margin-bottom:9px}.menuCard,.profileRankPanel,.quickRules,#tanhuCopyright{margin-bottom:9px!important}
 #menu .profileRankPanel{display:block!important}.profileHero{margin-bottom:9px!important}
 #menu .quickRules{display:grid!important;grid-template-columns:1fr!important}
 #tanhuCopyright{display:block!important;text-align:center!important}
 #tanhuCopyright:before{width:96px!important;height:96px!important;margin:0 auto 10px!important}
 #tanhuCopyright p{text-align:left!important}
}


/* ---- extracted style block ---- */

.tanhu-home-fixed{position:fixed;right:12px;top:12px;z-index:2147483646;display:inline-flex;align-items:center;gap:8px;padding:11px 15px;border:2px solid #d9a441;border-radius:14px;background:rgba(9,8,7,.94);color:#ffe3a0!important;font:700 15px/1.1 Arial,sans-serif;text-decoration:none!important;box-shadow:0 8px 28px rgba(0,0,0,.45);backdrop-filter:blur(8px)}
.tanhu-home-fixed:active{transform:translateY(1px)}
@media(max-width:700px){.tanhu-home-fixed{top:10px;right:10px;bottom:auto;padding:10px 12px;font-size:0;border-radius:50%;width:46px;height:46px;justify-content:center}.tanhu-home-fixed::before{content:"⌂";font-size:23px}}


/* ---- extracted style block ---- */

/* 6.3.13 final visual override: old embedded poster is fully superseded. */
#menu .posterPanel{
  background-image:url('../assets/mete-horse-archers-6313.jpg?v=8.1.5') !important;
  background-size:cover !important;
  background-position:center 24% !important;
  background-repeat:no-repeat !important;
  filter:none !important;
}
#menu .posterPanel::before{background:linear-gradient(to bottom,rgba(0,0,0,.12),transparent 24%,transparent 70%,rgba(0,0,0,.28)) !important;}
#menu .posterPanel::after{display:none !important;}
@media(max-width:700px){#menu .posterPanel{background-position:center 18% !important;min-height:72vh !important;}}


/* ---- extracted style block ---- */

.tanhu-learning-dock{position:fixed;left:12px;bottom:12px;z-index:1000;display:flex;gap:8px;flex-wrap:wrap;max-width:min(72vw,680px)}
.tanhu-learning-dock a{display:inline-flex;align-items:center;min-height:42px;padding:9px 12px;border:1px solid #d7a93f;border-radius:11px;background:rgba(10,20,36,.96);color:#fff;text-decoration:none;font-weight:800;box-shadow:0 6px 20px #0008}
#tanhuCopyright{margin-bottom:78px!important}
@media(max-width:700px){.tanhu-learning-dock{position:static;margin:16px auto 8px;justify-content:center;max-width:96%;padding:0 8px}.tanhu-learning-dock a{flex:1 1 190px;justify-content:center}.tanhu-home-fixed{bottom:12px!important}#tanhuCopyright{margin-bottom:76px!important}}


/* ---- extracted style block ---- */

/* 6.8.9 responsive layout hotfix: no floating panels over game content */
.tanhu-home-fixed{display:none!important}
.layout{align-items:start!important}
.layout>.side{align-self:start!important;height:auto!important;min-height:0!important}
.events,.log{height:auto!important;min-height:92px;max-height:180px;overflow:auto}
@media (min-width:701px) and (max-width:1200px){
  #tanhuCoachPanel{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;width:auto!important;max-width:none!important;max-height:none!important;margin:12px!important;z-index:8!important;box-shadow:none!important}
  #mentor670{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;width:auto!important;max-width:none!important;max-height:none!important;margin:12px!important;z-index:8!important;box-shadow:none!important}
  #mentor670.m670collapsed{max-height:58px!important;overflow:hidden!important}
  #tanhuAssistantBtn,.assistant-fab,.audio-fab,[data-floating-audio]{bottom:calc(12px + env(safe-area-inset-bottom))!important;right:12px!important;transform:scale(.88);transform-origin:bottom right}
  body{padding-bottom:calc(88px + env(safe-area-inset-bottom))!important}
}


/* ---- extracted style block ---- */

/* 6.8.4: tablet controls must never cover Academy or underlying buttons */
@media (min-width:701px) and (max-width:1200px){
  #game.active #tanhuCoachPanel{position:static!important;inset:auto!important;float:none!important;display:block!important;width:calc(100% - 24px)!important;max-width:none!important;margin:14px auto 116px!important;clear:both!important;transform:none!important;}
  body:has(#game.active) #tanhuAssistantBtn,
  body:has(#game.active) .assistant-fab,
  body:has(#game.active) .audio-fab,
  body:has(#game.active) [data-floating-audio]{display:none!important;}
  #game.active .eventsBox{margin-bottom:14px!important;}
}


/* ---- extracted style block ---- */

@media(max-width:700px){
  #tanhuCoachPanel,#mentor670{position:static!important;inset:auto!important;float:none!important;clear:both!important;transform:none!important}
  #tanhuCoachPanel{order:20!important}
  #mentor670{order:21!important}
  #game.active~#tanhuCoachPanel,#game.active~#mentor670{display:block}
  .tanhu-home-fixed{display:none!important}
}


/* ---- extracted style block ---- */

/* 6.8.9: Hata Analizi gösterimi ve oyun içi ses düğmesi çakışma düzeltmesi */
body:has(#game.active) #soundBtn{display:none!important}
#game.active #m670ReviewBanner{display:block!important}
@media(max-width:1200px){body:has(#game.active) #soundBtn{display:none!important}#m670Lab .m670btn{min-width:120px!important;position:relative!important;z-index:2!important}}


/* ---- extracted style block ---- */

/* 7.14.2: turn clarity, last-move memory and high-visibility new game */
#startBtn,#newBtn,#againBtn{background:linear-gradient(180deg,#e53935,#9d1111)!important;color:#fff!important;border-color:#ff8a80!important;text-shadow:0 1px 2px #000;box-shadow:0 0 0 2px rgba(255,255,255,.08),0 6px 18px rgba(180,0,0,.38)!important}
#startBtn:hover,#newBtn:hover,#againBtn:hover{filter:brightness(1.14)}
.side{transition:box-shadow .25s ease,border-color .25s ease,filter .25s ease}
.side.active-turn{border-color:#fff176!important;box-shadow:0 0 0 3px rgba(255,241,118,.85),0 0 28px 10px rgba(255,193,7,.72),inset 0 0 18px rgba(255,213,79,.24)!important;animation:tanhuTurnGlow 1.05s ease-in-out infinite alternate;filter:brightness(1.12)}
.side.waiting-turn{filter:brightness(.78) saturate(.78)}
.cell.last-moved-square{z-index:5;box-shadow:inset 0 0 0 5px #fff176,0 0 20px 8px rgba(255,235,59,.92)!important;animation:tanhuLastMoveFlash .82s ease-in-out infinite alternate}
.cell.last-moved-square .piece{animation:tanhuMovedPieceFlash .82s ease-in-out infinite alternate}
@keyframes tanhuTurnGlow{from{box-shadow:0 0 0 2px rgba(255,241,118,.65),0 0 16px 5px rgba(255,193,7,.46),inset 0 0 10px rgba(255,213,79,.16)}to{box-shadow:0 0 0 4px rgba(255,255,180,.95),0 0 34px 12px rgba(255,193,7,.8),inset 0 0 22px rgba(255,213,79,.32)}}
@keyframes tanhuLastMoveFlash{from{filter:brightness(1)}to{filter:brightness(1.55)}}
@keyframes tanhuMovedPieceFlash{from{transform:scale(1);filter:brightness(1)}to{transform:scale(1.09);filter:brightness(1.55)}}
@media (prefers-reduced-motion:reduce){.side.active-turn,.cell.last-moved-square,.cell.last-moved-square .piece{animation:none!important}}


/* ---- extracted style block ---- */

#tanhuCopyright{margin-bottom:10px!important;padding-bottom:14px!important}
#tanhuCopyright+*{margin-top:10px!important}
#academyPanel,#tanhuAcademy,.tanhu-academy{margin-top:10px!important;margin-bottom:10px!important}
#tanhuCopyright p{margin:.35rem 0!important}
#tanhuCopyright .rights{margin-top:.4rem!important}
@media(min-width:900px){#tanhuCopyright{min-height:0!important}}


/* ---- extracted style block ---- */

#menu .playerSetupTitle{grid-column:1/-1;margin:10px 0 2px;padding:10px 14px;border-top:1px solid rgba(216,163,58,.45);border-bottom:1px solid rgba(216,163,58,.25);color:#ffe08a;text-align:left;font-size:clamp(17px,2vw,22px);letter-spacing:.5px}
#menu #soundBtn{display:flex;align-items:center;justify-content:center;gap:.45rem;min-height:48px;font-weight:900}
#menu #tanhuCopyright{margin-top:12px!important;margin-bottom:12px!important}
#menu #tanhuAcademy,#menu .tanhu-academy,#menu #academyPanel{margin-top:12px!important;margin-bottom:12px!important}
#menu #mentor670{margin-top:12px!important}
@media(max-width:700px){#menu .playerSetupTitle{text-align:center;margin-top:8px}#menu #tanhuCopyright{margin-bottom:10px!important}}


/* ---- extracted style block ---- */

#tanhuCopyright{margin:18px auto 28px;max-width:1120px;padding:18px;border:3px solid #d8a33a;border-radius:18px;background:linear-gradient(145deg,#160b02,#071712 70%,#020403);color:#fff0bd;box-shadow:0 0 30px rgba(216,163,58,.28),inset 0 0 25px rgba(0,0,0,.65);line-height:1.65}
#tanhuCopyright h2{margin:0 0 10px;text-align:center;color:#ffe08a;letter-spacing:2px;text-shadow:0 2px 0 #5b3205;font-size:clamp(22px,4vw,38px)}
#tanhuCopyright .copyrightSeal{text-align:center;font-weight:1000;font-size:clamp(17px,2.6vw,23px);color:#fff;margin-bottom:10px}
#tanhuCopyright p{margin:8px 0}#tanhuCopyright a{color:#69d3bd;font-weight:900;word-break:break-all}
#tanhuCopyright .rights{text-align:center;color:#ffe08a;font-weight:1000;font-size:18px;border-top:1px solid rgba(216,163,58,.5);padding-top:10px;margin-top:12px}


/* ---- extracted style block ---- */

/* V37: Görsele gömülü eski Türkçe alt yazıyı tamamen örter; yalnız seçilen dil görünür. */
#menu .posterPanel{isolation:isolate!important}
#menu .posterText{
  left:0!important;right:0!important;bottom:0!important;
  min-height:142px!important;
  padding:20px 22px 14px!important;
  border:0!important;border-top:2px solid #b47a16!important;
  border-radius:0!important;
  background:linear-gradient(180deg,rgba(0,0,0,.98),#050301 72%,#000)!important;
  box-shadow:0 -24px 28px 12px rgba(0,0,0,.96),inset 0 1px 0 rgba(255,215,110,.25)!important;
  display:flex!important;flex-direction:column!important;justify-content:center!important;
  overflow:hidden!important;text-align:center!important;
  z-index:20!important;
}
#menu .posterText::before{
  content:"";position:absolute;left:0;right:0;bottom:100%;height:42px;
  background:linear-gradient(to top,rgba(0,0,0,.98),rgba(0,0,0,0));pointer-events:none;
}
#menu .posterText>div{position:relative;z-index:2;max-width:100%;overflow-wrap:anywhere}
#menu .posterText>div:nth-child(1){font-size:clamp(14px,1.1vw,19px)!important;line-height:1.22!important}
#menu .posterText>div:nth-child(2){font-size:clamp(15px,1.25vw,21px)!important;line-height:1.22!important;margin-top:2px!important}
#menu .posterText>div:nth-child(3){font-size:clamp(9px,.72vw,12px)!important;line-height:1.25!important;margin-top:10px!important;color:#e7c77d!important}
@media(max-width:700px){#menu .posterText{min-height:126px!important;padding:16px 12px 11px!important}}


/* ---- extracted style block ---- */

#menu .tanhuFilePicker{display:grid!important;grid-template-columns:minmax(92px,auto) minmax(0,1fr)!important;gap:6px!important;align-items:center!important;width:100%!important;max-width:100%!important}
#menu .tanhuFileButton{min-width:0!important;max-width:100%!important;padding:7px 9px!important;font-size:clamp(10px,.75vw,12px)!important;line-height:1.05!important;white-space:normal!important;overflow-wrap:anywhere!important}
#menu .tanhuFileName{min-width:0!important;max-width:100%!important;font-size:clamp(9px,.68vw,11px)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
#menu .profile>div:last-child{min-width:0!important;width:100%!important}
#menu .statsMini [data-i18n="whitePlayer"],#menu .statsMini [data-i18n="blackPlayer"]{display:block!important;margin-top:4px!important}

/* 6.8.9 — Çavuş Oku ready reminder; normal flow, no overlay */
#arrowBtn.tanhu-arrow-ready{animation:tanhuArrowPulse .85s ease-in-out infinite;box-shadow:0 0 0 3px rgba(255,210,70,.42),0 0 24px rgba(255,180,0,.85);background:linear-gradient(180deg,#7b4b08,#3b2100)!important;color:#fff6bd!important}
#tanhuArrowReminder{display:none;margin:10px 0 12px;padding:12px 14px;border:2px solid #f0bd4a;border-radius:14px;background:linear-gradient(135deg,#3b2400,#120b00);color:#fff3c4;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;box-shadow:0 0 22px rgba(240,189,74,.28)}
#tanhuArrowReminder.active{display:flex;animation:tanhuReminderPulse 1.15s ease-in-out infinite}
#tanhuArrowReminder .tanhu-arrow-copy{font-weight:800;font-size:clamp(16px,2.2vw,22px);line-height:1.35}
#tanhuArrowReminder .tanhu-arrow-copy small{display:block;font-weight:500;opacity:.9;margin-top:3px}
#tanhuArrowReminder .tanhu-arrow-use{width:auto;min-width:190px}
@keyframes tanhuArrowPulse{50%{transform:scale(1.045);filter:brightness(1.25)}}
@keyframes tanhuReminderPulse{50%{border-color:#fff09a;box-shadow:0 0 30px rgba(255,220,90,.5)}}
@media (prefers-reduced-motion:reduce){#arrowBtn.tanhu-arrow-ready,#tanhuArrowReminder.active{animation:none}}

/* 6.8.10 TANHU Aura — visible, non-blocking board guidance */
#board .tanhu-aura-cell{position:relative;box-shadow:inset 0 0 0 3px rgba(255,210,73,.56),inset 0 0 18px rgba(255,190,30,.32);animation:tanhuAuraGlow 1.6s ease-in-out infinite alternate}
#board .tanhu-aura-cell:after{content:'';position:absolute;inset:5px;border:1px solid rgba(255,232,145,.55);border-radius:8px;pointer-events:none}
#board .tanhu-aura-piece{filter:drop-shadow(0 0 8px #ffd34d) brightness(1.08)}
#board .tanhu-aura-source{filter:drop-shadow(0 0 13px #ffd34d) brightness(1.13)}
@keyframes tanhuAuraGlow{from{box-shadow:inset 0 0 0 2px rgba(255,210,73,.42),inset 0 0 10px rgba(255,190,30,.18)}to{box-shadow:inset 0 0 0 4px rgba(255,224,112,.82),inset 0 0 24px rgba(255,190,30,.46)}}
@media(prefers-reduced-motion:reduce){#board .tanhu-aura-cell{animation:none}}


/* ---- extracted style block ---- */

/* Remove novice-zone pictograms that cover pieces or flicker on mobile. */
#board .tanhu-zone-badge,#board .zone-badge,#board .novice-zone-icon,#board .debug-marker,#board .effect-marker{display:none!important;animation:none!important}
/* Keep information in the square border/background, never above the piece artwork. */
#board .cell::before{pointer-events:none}
#board .piece{position:relative;z-index:6}
#board .last-move,#board .last-moved{box-shadow:inset 0 0 0 3px rgba(255,245,110,.95),0 0 12px rgba(255,230,70,.65)!important}
@media(max-width:700px){#board .cell{overflow:visible}#board .piece{z-index:8}}


/* ---- extracted style block ---- */

/* 7.15.3: restore square board geometry and keep every piece inside its cell on phones. */
html,body{max-width:100%;overflow-x:hidden}
#board.board{grid-template-columns:26px repeat(15,minmax(0,1fr))!important;grid-template-rows:repeat(15,minmax(0,1fr))!important;aspect-ratio:16/15!important;width:100%!important;max-width:100%!important;overflow:hidden!important;contain:layout paint!important}
#board .cell{min-width:0!important;min-height:0!important;overflow:hidden!important;isolation:isolate!important}
#board .piece{width:78%!important;height:78%!important;max-width:78%!important;max-height:78%!important;flex:0 0 auto!important;z-index:4!important;transform:none}
#board .piece .ico{line-height:1!important}
#board .piece .pid{line-height:1!important;white-space:nowrap!important;max-width:100%!important;overflow:hidden!important}
#board .piece.touch-preview{transform:scale(1.16)!important;z-index:10!important}
.boardShell{max-width:760px!important;width:min(760px,100%)!important;padding:0 2px!important;overflow:hidden!important}
/* The global floating speaker duplicated the in-game Sound button and covered controls. */
#tanhuAudioControl,.ta-start,[data-floating-audio]{display:none!important}
@media(max-width:700px){
  .boardShell{width:100%!important;margin-inline:auto!important}
  #board.board{border-width:2px!important}
  #board .cell{border-width:1px!important;overflow:hidden!important}
  #board .piece{width:76%!important;height:76%!important;max-width:76%!important;max-height:76%!important}
  #board .piece.touch-preview{transform:scale(1.14)!important}
  #board .cell.last-moved-square .piece{animation:none!important}
}


/* ---- extracted style block ---- */

/* Mobile board: fit all A-O columns inside the visual viewport without clipping. */
#game.active .layout,#game .layout{width:100%!important;max-width:100%!important;box-sizing:border-box!important;overflow:visible!important;padding-left:4px!important;padding-right:4px!important}
#game .layout>main{min-width:0!important;width:100%!important;max-width:100%!important;overflow:visible!important}
#game .boardShell{box-sizing:border-box!important;width:100%!important;max-width:760px!important;margin-left:auto!important;margin-right:auto!important;padding:0!important;overflow:visible!important}
#game .coord,#game #board{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important}
#game .coord{grid-template-columns:22px repeat(15,minmax(0,1fr))!important}
#game #board.board{grid-template-columns:22px repeat(15,minmax(0,1fr))!important;aspect-ratio:16/15!important}
#game #board .cell{box-sizing:border-box!important;min-width:0!important;max-width:none!important}
#game #board .piece{box-sizing:border-box!important;width:72%!important;height:72%!important;max-width:72%!important;max-height:72%!important}
/* This game already has its own sound button. Never show the global floating audio control here. */
body #tanhuAudioControl,body .ta-start,body [data-floating-audio]{display:none!important;visibility:hidden!important;pointer-events:none!important}
@media(max-width:700px){
  #game .layout{display:block!important;margin:6px 0!important;padding:0 4px!important}
  #game .layout>main{width:100%!important}
  #game .boardShell{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}
  #game .coord,#game #board{width:100%!important}
  #game #board.board{border-width:2px!important}
  #game #board .piece{width:70%!important;height:70%!important;max-width:70%!important;max-height:70%!important}
  #game #board .piece.touch-preview{transform:scale(1.12)!important}
}

/* 8.3.2 mobile input recovery */
.tm-cinematic-lock #board{pointer-events:auto!important}
#board{touch-action:manipulation}

/* 8.3.2 mobile input recovery */
.tm-cinematic-lock #board{pointer-events:auto!important}
#board{touch-action:manipulation}
