/* Original client area: the map and minigames begin directly below the 30px title bar. */
.match-surround, .native-match-deck, .battle-extra-menu { display:none; }
body.native-ui:has(#match.native-match:not([hidden])) { overflow:hidden; background:#111; }
body.native-ui:has(#match.native-match:not([hidden])) > .bar { display:none; }
body.native-ui #game-app #match.native-match:not([hidden]) {
  position:fixed; inset:var(--stage-top) auto auto var(--stage-left); display:block;
  width:1024px; height:738px; min-height:0; max-height:none; overflow:hidden;
  margin:0; padding:0; transform:scale(var(--stage-scale)); transform-origin:top left;
  background:#182321; color:#fff; font:14px/16px SimSun,'宋体',serif;
}
#match.native-match :is(.match-grid,.game-tray,.match-side,.match-heading,.camera-controls,#item-panel,#match-controls) {
  display:contents; position:static; container-type:normal;
}
#match.native-match :is(#match-panels,#turn-dock,#roster-dock,.match-heading>div:first-child,#match-state,#roll-shortcut,
  #item-panel>h2,#match-controls>h2,#match-remaining,#action-title,#classic-chat,#classic-log) { display:none; }
#match.native-match .camera-controls > button:not(#match-details-toggle,#minimap-toggle) { display:none; }
#match.native-match .board-frame {
  display:block; position:absolute; inset:30px 0 auto; width:1024px; height:708px; min-height:0;
  margin:0; padding:0; border:0; border-radius:0; box-shadow:none; overflow:hidden;
}
#match.native-match #board { position:absolute; inset:0; width:1024px; height:708px; max-height:none; margin:0; border:0; }
#match.native-match .match-surround, #match.native-match .native-match-deck {
  display:block; position:absolute; width:1024px; height:738px; pointer-events:none;
}
#match.native-match .match-surround { z-index:12; }
#match.native-match .native-match-deck { z-index:2; }
#match.native-match :is(.match-surround,.native-match-deck) button { pointer-events:auto; }
#match.native-match .match-surround .native-titlebar { width:1024px; height:30px; }
#match.native-match .match-room-name, #match.native-match .match-days { color:#fff; font:14px/16px SimSun,serif; }
#match.native-match .match-days { width:633px; text-align:right; }
#match.native-match .battle-notices { display:grid; justify-items:center; gap:2px; width:1024px; pointer-events:none; }
#match.native-match .battle-notices div { width:max-content; padding:4px 12px; color:#fff1b7; background:#181205a8; font:16px/24px SimSun,serif; }
#match.native-match .battle-room-number { font:12px/15px SimSun,serif; color:#fff; }
#match.native-match .battle-chat-channel { color:#fff2cd; font:14px/16px SimSun,serif; }
#match.native-match #match-hud { position:absolute; inset:0; width:1024px; height:62px; padding:0; pointer-events:none; z-index:1; }
#match.native-match #match-wallet { position:absolute; left:0; top:0; width:330px; height:62px; }
#match.native-match #match-calendar { position:absolute; left:800px; top:2px; width:229px; height:35px; }
#match.native-match :is(#match-wallet-art,#match-date-art) { width:auto; height:auto; max-width:none; }
#match.native-match #roll-panel { position:absolute; inset:270px auto auto 670px; width:112px; height:122px; transform:none; }
#match.native-match #roll-managed { position:absolute; inset:520px auto auto 835px; width:162px; height:49px; }
#match.native-match #round-clock { position:absolute; inset:568px auto auto 389px; width:466px; height:5px; margin:0; padding:0; z-index:3; pointer-events:none; }
#match.native-match #round-clock-meter { width:466px; height:5px; padding:0; border:0; background:transparent; }
#match.native-match #round-clock-seconds { display:none; }

#match.native-match #match-roster { display:block; position:absolute; inset:553px auto auto 12px; width:376px; height:178px; max-height:none; overflow:visible; background:none; border:0; padding:0; z-index:3; pointer-events:none; }
#match.native-match #match-roster h2 { display:none; }
#match.native-match #match-players { display:flex; flex-flow:row nowrap; width:376px; height:100%; gap:0; padding:0; margin:0; }
#match.native-match #match-players .player { position:relative; display:block; flex:0 0 94px; padding:0; margin:0; min-width:0; border:0; background:transparent; overflow:visible; }
#match.native-match .player-portrait { position:absolute; inset:0 auto auto 0; width:94px; height:119px; overflow:visible; background:none; }
#match.native-match .player .player-head { position:absolute; inset:var(--face-y,0px) auto auto var(--face-x,0px); width:auto; height:auto; max-width:none; max-height:none; transform:none; }
#match.native-match .player-team { position:absolute; inset:auto auto 0 0; }
#match.native-match .player-ledger.original-ledger {
  position:absolute; inset:119px auto auto 0; width:93px; height:55px; min-height:0; display:block;
  padding:0; border:0; border-radius:0; outline:none; background:var(--player-frame) 0 0 / 93px 55px no-repeat;
  font:14px/15px SimSun,serif; color:#fff; text-shadow:1px 1px #171314;
}
#match.native-match .player-ledger :is(.player-cash,.player-gems,.player-name,strong) {
  position:absolute; padding:0; margin:0; color:#fff; font:14px/15px SimSun,serif; white-space:nowrap; overflow:hidden; text-overflow:clip;
}
#match.native-match .player-ledger .player-cash { left:30px; top:0; }
#match.native-match .player-ledger .player-gems { left:30px; top:17px; }
#match.native-match .player-ledger strong { inset:36px 3px auto; text-align:center; color:#120d0b; text-shadow:none; }
#match.native-match .player .detail-state, #match.native-match .player-ledger .pet-state { display:none; }
#match.native-match .player-badges { position:absolute; right:4px; bottom:13px; }

#match.native-match #item-bar { display:block; position:absolute; inset:607px auto auto 394px; width:464px; height:101px; margin:0; padding:0; background:none; z-index:4; }
#match.native-match .item-bar-tabs { display:flex; gap:0; padding:0; height:18px; }
#match.native-match .item-bar-tabs button { flex:0 0 63px; width:63px; height:18px; min-height:0; border:0; margin:0; padding:0; background-size:auto; }
#match.native-match #item-bar [role=tabpanel] { position:absolute; left:-5px; top:19px; padding:0; }
#match.native-match .item-slots { display:flex; gap:0; margin:0; padding:0; }
#match.native-match .item-slot, #match.native-match .item-cell { flex:0 0 58px; width:58px; height:81px; min-width:0; min-height:0; padding:0; margin:0; border:0; border-radius:0; }
#match.native-match .item-cell { position:relative; display:block; background:transparent; overflow:visible; filter:none; }
#match.native-match .item-cell:is(.empty,:disabled) { opacity:1; }
#match.native-match .item-cell img, #match.native-match .item-cell canvas { position:absolute; left:var(--icon-x,5px); top:var(--icon-y,9px); width:auto; height:auto; max-width:none; max-height:none; transform:none; }
#match.native-match .item-cell-name { display:block; position:absolute; inset:60px 0 auto; padding:0; color:#eee; text-align:center; font:12px/15px SimSun,serif; }
#match.native-match .item-cell-count { right:4px; bottom:21px; }
#match.native-match .item-cell[aria-pressed=true] { outline:1px solid #f5c773; outline-offset:-3px; }
#match.native-match #item-pet-pagination { width:57px; height:76px; }
#match.native-match .item-pet-tools { position:absolute; left:201px; top:-19px; margin:0; }
#match.native-match #manage-pets { margin:0; min-height:0; padding:0 6px; font:12px/16px SimSun,serif; }
#match.native-match #item-pet-status { display:none; }
#match.native-match :is(#market-actions,#match-actions,#item-actions) { display:contents; position:static; }
#match.native-match [data-market] { position:absolute; left:var(--control-x); top:var(--control-y); z-index:5; }
#match:not(.native-match) #match-tool-shop[data-solo=false] { display:none; }

#shop-dialog.battle-shop {
  position:fixed; z-index:16; inset:auto; width:467px; height:504px; min-width:0; max-width:none; max-height:none;
  margin:0; padding:0; border:0; border-radius:0; overflow:visible; transform:scale(var(--shop-scale,1));
  transform-origin:0 0; background:transparent; box-shadow:none; color:white; font:12px/14px SimSun,'宋体',serif;
}
#shop-dialog.battle-shop::backdrop { background:transparent; }
.battle-shop #shop-panel { margin:0; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
.battle-shop #shop-stage { position:relative; width:467px; height:504px; background:var(--shop-background) no-repeat; }
.battle-shop #shop-header { position:absolute; inset:0; display:block; margin:0; pointer-events:none; }
.battle-shop #shop-header::before { content:""; position:absolute; left:8px; top:4px; width:411px; height:42px; pointer-events:auto; cursor:grab; touch-action:none; }
.battle-shop #shop-title { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.battle-shop #shop-header #close-shop { position:absolute; left:297px; top:450px; pointer-events:auto; }
.battle-shop #shop-recharge { position:absolute; left:187px; top:450px; }
.battle-shop #shop-balance { position:absolute; left:232px; top:68px; margin:0; color:white; white-space:pre; font:12px/14px SimSun,'宋体',serif; }
.battle-shop #shop-tabs, .battle-shop #shop-pages { position:absolute; display:flex; flex-wrap:nowrap; margin:0; padding:0; gap:0; }
.battle-shop #shop-tabs { left:150px; top:95px; }
.battle-shop #shop-pages { left:290px; top:418px; gap:1px; }
.battle-shop #shop-goods { position:absolute; left:165px; top:132px; display:grid; grid-template-columns:repeat(4,65px); grid-auto-rows:97px; gap:0; }
.battle-shop .shop-product {
  display:block; position:relative; width:56px; height:86px; margin:0; padding:0; min-height:0;
  border:0; border-radius:0; background:none; box-shadow:none; color:white; text-align:center;
  font:12px/14px SimSun,'宋体',serif; text-shadow:none;
}
.battle-shop .shop-product > span, .battle-shop .shop-product > small {
  position:absolute; left:-3px; width:60px; top:55px; white-space:nowrap; font:inherit; color:inherit;
}
.battle-shop .shop-product > small { top:71px; }
.battle-shop .shop-product:is(:hover,:focus-visible)::after {
  content:""; position:absolute; left:-2px; top:-4px; width:58px; height:90px; background:var(--shop-selection) no-repeat; pointer-events:none;
}
.battle-shop .shop-product:disabled { opacity:1; }
.battle-shop .shop-product:disabled i.tcp { filter:grayscale(1) !important; }
#match.native-match #match-actions button { position:absolute; z-index:5; min-height:0; margin:0; border:0; padding:0; }
#match.native-match [data-command=set_autoplay] { left:870px; top:690px; width:32px; height:33px; }
#match.native-match :is(.match-action-icon,#minimap-toggle).tcp::before { display:none; }
#match.native-match [data-command=vote_pause] { left:162px; top:579px; width:66px; height:25px; }
#match.native-match [data-command=surrender] { left:233px; top:579px; width:66px; height:25px; }
#match.native-match [data-command=peace] { left:304px; top:579px; width:66px; height:25px; }
#match.native-match #match-actions .match-votes { position:absolute; left:162px; top:555px; z-index:6; }
#match.native-match #match-details-toggle { position:absolute; left:59px; top:581px; z-index:7; }
#match.native-match #minimap-toggle { position:absolute; left:920px; top:690px; z-index:6; }
#match.native-match #minimap-panel { inset:auto 10px 143px auto; width:var(--minimap-width); max-width:340px; z-index:8; }
#match.native-match #item-actions:has(>button:not([data-market])),
#match.native-match #item-feedback:not([hidden]), #match.native-match #junction-actions:not([hidden]) {
  position:absolute; display:flex; flex-wrap:wrap; width:max-content; max-width:520px; left:394px; bottom:145px;
  z-index:8; gap:4px; padding:6px 8px; background:#181d19ed; border:1px solid #988664; color:white;
}
#match.native-match #item-feedback:not([hidden]) { bottom:186px; }
#match.native-match #junction-actions:not([hidden]) { left:335px; }
#match.native-match .battle-extra-menu { z-index:8; background:#242623; border:1px solid #958369; padding:6px; width:214px; }
#match.native-match.match-menu-open .battle-extra-menu { display:grid; gap:2px; }
#match.native-match .battle-extra-menu button { color:#fff6e0; font:14px/19px SimSun,serif; border:0; padding:2px 8px; background:var(--choice-background) center / 100% 100%; }

#match.native-match #match-chat-slot { display:block; position:absolute; inset:480px auto auto 4px; z-index:4; width:376px; height:125px; pointer-events:none; overflow:visible; }
#match.native-match #match-chat-slot .chat-panel { display:contents; }
#match.native-match #match-chat-slot .heading { display:none; }
#match.native-match #match-chat-slot .chat-log { position:absolute; inset:24px 5px auto 19px; height:73px; padding:0; min-height:0; margin:0; border:0; background:none; box-shadow:none; font:12px/17px SimSun,serif; pointer-events:auto; }
#match.native-match #match-chat-slot .chat-compose { position:absolute; display:block; inset:230px auto auto 386px; width:462px; height:22px; padding:0; margin:0; background:none; pointer-events:none; }
#match.native-match #match-chat-slot .chat-compose input { position:absolute; inset:0 auto auto 83px; width:293px; height:21px; min-height:0; margin:0; padding:1px 3px; border:0; border-radius:0; background:transparent; color:#fff; font:14px SimSun,serif; }
#match.native-match #match-chat-slot .chat-compose input::placeholder { color:transparent; }
#match.native-match #match-chat-slot .chat-compose input { pointer-events:auto; }
#match.native-match #match-chat-slot .chat-compose button { display:none; }
#match.native-match #match-chat-slot .chat-pickers { position:absolute; left:392px; bottom:-95px; width:355px; pointer-events:auto; }
#match.native-match #match-chat-slot .chat-feedback { position:absolute; left:390px; top:208px; color:#ffe9ae; }
#match.native-match #match-events { display:none; }
#match.native-match.show-battle-log #match-events { display:block; position:absolute; z-index:8; inset:323px auto auto 7px; width:370px; max-height:155px; overflow:auto; background:#18231eeb; }
#match.native-match.battle-chat-folded :is(.battle-chat-background,.battle-room-number,.chat-log) { visibility:hidden; }
#match.native-match .minigame-window { inset:0; transform:none; width:1024px; height:708px; padding:0; aspect-ratio:auto; }
#match.native-match .mini-scene { width:1024px; height:708px; }
#match.native-match .mini-inputs { display:contents; }
#match.native-match .mini-outcome {
  display:block; position:absolute; inset:280px auto auto 330px; width:420px; height:180px;
  padding:0; border:0; transform:none; background-color:transparent; overflow:visible;
}
#match.native-match .mini-result-badge { inset:-202px auto auto 4px; width:141px; height:207px; }
#match.native-match .mini-outcome h3 { position:absolute; top:37px; left:30px; color:#ffeb42; font:16px/20px SimSun,serif; }
#match.native-match .mini-outcome .mini-results { position:absolute; left:35px; top:59px; display:grid; gap:0; width:345px; }
#match.native-match .mini-outcome .mini-results li {
  display:grid; grid-template-columns:1fr auto 57px; align-items:start; height:25px; padding:0 19px;
  color:#fff5d4; background:transparent; font:14px/18px SimSun,serif;
}
#match.native-match .mini-outcome .mini-results li.own-result { background:var(--result-highlight) left top / auto no-repeat; }
#match.native-match .mini-outcome .mini-results :is(b,strong) { font-weight:normal; }
#match.native-match .mini-outcome .mini-results strong { color:#ffb8ae; text-align:right; }
#match.native-match .mini-outcome .tcp { position:absolute; right:12px; bottom:2px; }
#match.native-match .mini-hud { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
#match.native-match .mini-hud.mini-wait {
  inset:12px auto auto 50%; width:max-content; height:auto; clip-path:none; transform:translateX(-50%);
  padding:3px 16px; background:linear-gradient(90deg,transparent,#231d16d9 14%,#231d16d9 86%,transparent);
}
#match.native-match .mini-wait .heading { display:none; }
#match.native-match .mini-wait .mini-status { margin:0; font:15px/20px SimSun,serif; color:#ffebaf; }
#match.native-match:has(#minigame:not([hidden])) :is(.native-match-deck,#match-hud,#round-clock,#match-roster,#item-bar,#match-chat-slot,#match-events,#match-actions,#market-actions,#item-actions,#match-details-toggle,#minimap-toggle,.battle-extra-menu) { display:none!important; }
#match.native-match :is(#minigame,#construction,#item-rebuild,#tile-details,#match-pause-shade):not([hidden]) { z-index:10; }
