.mobile-context-rail,.mobile-room-icon,.rule-ball-icon,.mobile-short-copy,.mobile-status-info{display:none}
.mobile-rule-more{display:contents}.mobile-rule-more>summary{display:none}.mobile-rule-extra{display:contents}
body[data-mobile-match-ui] .game-layout[data-mobile-toolbar=true]{padding-top:42px;position:relative}
body[data-mobile-match-ui] .arena{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto auto!important}
body[data-mobile-match-ui] .arena>.table-view{grid-row:1;grid-column:1}
body[data-mobile-match-ui] .arena>.shot-controls,body[data-mobile-match-ui] .arena>.camera-walk-controls{grid-row:3;grid-column:1}
body[data-mobile-match-ui] .mobile-context-rail:not([hidden]){grid-row:2;grid-column:1;display:flex;flex-direction:column;gap:3px;min-width:0;background:#071916}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock:not([hidden]){display:flex;min-width:0;max-width:100%}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock>.pool-controls{position:static!important;inset:auto!important;transform:none!important;translate:none!important;margin:0!important;width:100%;max-width:100%;display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;gap:5px;overflow-x:auto;overscroll-behavior-x:contain;padding:2px}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock>.pool-controls[hidden]{display:none}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock button,body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock select{flex:0 0 auto;min-height:38px;max-width:150px;margin:0;padding:5px 9px;font-size:12px;border-radius:8px}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock select{min-width:0;flex:1 1 110px;max-width:160px;background:#17332b;color:#f4e4bd;border:1px solid #7b8f78}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock .pool-nine-target{flex:0 0 auto;margin:0;padding:3px 5px;max-width:210px;font-size:11px}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock .pool-call-toggle{max-width:none;flex:1 0 auto;gap:8px}
body:is([data-mobile-match-ui],[data-native-match-compact]) [data-rule-ball] .rule-ball-copy{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body:is([data-mobile-match-ui],[data-native-match-compact]) .rule-ball-icon{position:relative;display:grid;width:29px;height:29px;place-items:center;border-radius:50%;background:radial-gradient(circle at 30% 22%,#ffffff7a,transparent 48%),var(--rule-ball-color);box-shadow:inset -2px -3px 5px #0005,0 1px 3px #0007;border:1px solid #ffffff45}
body:is([data-mobile-match-ui],[data-native-match-compact]) .rule-ball-icon[data-striped=true]{background:radial-gradient(circle at 30% 22%,#ffffff7a,transparent 48%),linear-gradient(#eee9db 0 22%,var(--rule-ball-color) 22% 78%,#eee9db 78%)}
body:is([data-mobile-match-ui],[data-native-match-compact]) .rule-ball-icon b:not(:empty){display:grid;place-items:center;width:15px;height:15px;border-radius:50%;background:#f5efe0;color:#14201b;font-size:11px;font-style:normal}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-more{display:block;flex:0 0 auto;margin-left:auto}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-more>summary{display:grid;place-items:center;width:38px;height:38px;border:1px solid #647b6c;border-radius:8px;color:#edcc89;cursor:pointer;list-style:none}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-more>summary::-webkit-details-marker{display:none}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-extra{position:fixed;z-index:50;display:flex;flex-direction:column;gap:10px;overflow:auto;background:#102b25;border:1px solid #8c9c7a;border-radius:12px;padding:12px;box-shadow:0 8px 30px #0008}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-more:not([open])>.mobile-rule-extra{display:none}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-extra>header{font-size:12px;color:#c5d4c8}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-extra .pool-nine-target{max-width:none;white-space:normal}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-extra .snooker-concede{width:100%;max-width:none;min-height:44px}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-full-copy{display:none}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-short-copy{display:inline}
body[data-mobile-match-ui] .floating-status{position:static;display:block;max-width:100%;pointer-events:auto}
body[data-mobile-match-ui] .game-message{position:relative;display:flex;flex-wrap:nowrap;align-items:center;gap:6px;width:100%;min-height:29px;max-width:100%;margin:0;padding:2px 34px 2px 4px;border-radius:6px;font-size:11px;line-height:18px;box-shadow:none}
body[data-mobile-match-ui] .game-message[hidden],body[data-mobile-match-ui] .floating-status:has(.game-message[hidden]){display:none}
body[data-mobile-match-ui] .status-kicker,body[data-mobile-match-ui] .shot-counter{display:none}
body[data-mobile-match-ui] #statusText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body[data-mobile-match-ui] .game-message.mobile-status-expanded #statusText{white-space:normal;max-height:90px;overflow:auto}
body[data-mobile-match-ui] .mobile-status-info{display:block;flex:0 0 27px;min-width:27px;min-height:27px;padding:0;background:transparent;color:#edcc89;font-size:20px}
body[data-mobile-match-ui] .message-dismiss{width:28px;min-height:27px;height:27px;top:1px;right:2px;padding:0;transform:none}
body[data-mobile-match-ui] .room-social:not([hidden]){display:contents}
body[data-mobile-match-ui] .room-social-buttons{position:fixed;z-index:8;top:var(--match-toolbar-top);left:max(6px,env(safe-area-inset-left));right:120px;height:38px;gap:4px;align-items:center;justify-content:flex-start}
body[data-mobile-match-ui] .room-social-buttons button{display:grid;place-items:center;flex:0 0 clamp(34px,10vw,40px);width:clamp(34px,10vw,40px);height:38px;min-height:38px;padding:0;font-size:0;border-radius:8px;background:#143029;border-color:#5e7865;backdrop-filter:none}
body[data-mobile-match-ui] .room-social-buttons button[hidden]{display:none}
body[data-mobile-match-ui] .mobile-room-icon{display:block;width:21px;height:21px;pointer-events:none}
.mobile-room-icon svg{display:block;width:100%;height:100%}
body[data-mobile-match-ui] .room-chat-unread{position:absolute;right:-3px;top:-3px;margin:0;font-size:10px}
body[data-mobile-match-ui] #ruleHelpButton{position:fixed;z-index:8;top:var(--match-toolbar-top);left:auto;right:82px;width:34px;height:38px;border-radius:8px;padding:6px;background:#143029;box-shadow:none}
body[data-mobile-match-ui] #onlineBadge{position:fixed;z-index:8;top:var(--match-toolbar-top);right:max(6px,env(safe-area-inset-right));left:auto;width:72px;height:38px;padding:3px 5px;display:flex;align-items:center;justify-content:center;gap:3px;border-radius:8px;font-size:11px;line-height:13px;background:#143029;text-align:center}
body[data-mobile-match-ui] #onlineBadge[hidden]{display:none}
body[data-mobile-match-ui] #onlineIndicator{max-width:38px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body[data-mobile-match-ui] #onlineClock{font-size:13px;white-space:nowrap;color:#edcc89}
body[data-mobile-match-ui] #onlineRetry:not([hidden]){position:absolute;top:40px;right:0;min-height:34px;font-size:11px;padding:4px 8px;white-space:nowrap}
body[data-mobile-match-ui] :is(.camera-panel,.player-balls,#roomChatPanel,#roomCallPanel,#roomCallInvite,#ruleHelpPanel){position:fixed!important;right:auto!important;bottom:auto!important;transform:none!important;translate:none!important;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;z-index:45}
body[data-mobile-match-ui] .topbar:has(.hud-disclosure[open]){z-index:45}
body[data-mobile-match-ui] .room-chat-drag-handle small{display:none}
body[data-mobile-match-ui] #roomCallPanel{max-width:calc(100vw - 16px)}
body[data-mobile-match-ui] #roomCallPanel iframe{max-height:40dvh}
body[data-mobile-match-ui] .room-social-buttons button:focus-visible,body[data-mobile-match-ui] .mobile-rule-more>summary:focus-visible{outline:2px solid #f0ca76;outline-offset:2px}

.mobile-ball-select{display:contents}.mobile-ball-select>[data-rule-ball]{display:none}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-ball-select{position:relative;display:grid;place-items:center;flex:0 0 48px;height:38px;border:1px solid #8b9c83;border-radius:8px;background:#17332b}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-ball-select>[data-rule-ball]{display:block;pointer-events:none;padding-right:8px}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-ball-select::after{content:'⌄';position:absolute;right:3px;color:#f0ca76;font-size:13px;pointer-events:none}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-ball-select>select{position:absolute;inset:0;width:100%;height:100%;min-width:0;max-width:none;opacity:0;cursor:pointer;font-size:16px}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-ball-select:focus-within{outline:2px solid #f0ca76;outline-offset:2px}
body[data-mobile-match-ui] #onlineBadge{flex-direction:column;gap:0}
body[data-mobile-match-ui] #onlineIndicator{display:block;max-width:100%;width:100%;white-space:nowrap;text-overflow:ellipsis;font-size:10px}

body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock [data-rule-ball]{display:flex;flex-direction:column;align-items:center;gap:1px}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-rule-dock [data-rule-ball]::after{content:attr(data-ball-caption);font-size:8px;line-height:9px;color:#c7d6c8;white-space:nowrap}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-ball-select{height:46px}
body:is([data-mobile-match-ui],[data-native-match-compact]) .mobile-ball-select>[data-rule-ball]{padding-right:6px}

/* Compact landscape HUD for the Android and iOS clients. */
html.sinuca-native body[data-native-match-compact] .topbar {
  height:44px;flex-basis:44px;flex-wrap:nowrap;gap:4px;padding-inline:4px;
}
html.sinuca-native body[data-native-match-compact] .topbar > .brand-symbol {
  display:block!important;flex:0 0 30px;width:30px;height:30px;
}
body[data-native-match-compact] .topbar .view-controls { order:0;margin-left:0;gap:3px }
body[data-native-match-compact] .topbar .scoreboard { order:0;flex:1 1 0;gap:4px;margin:0 }
body[data-native-match-compact] .topbar .player-heading { padding-inline:6px;gap:5px }
body[data-native-match-compact] .topbar .player-info { flex-direction:column;align-items:flex-start;gap:0 }
body[data-native-match-compact] .topbar .player-name { max-width:100%;font-size:12px;line-height:15px }
body[data-native-match-compact] .topbar .player-group {
  max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:10px;line-height:13px;
}
body[data-native-match-compact] .topbar .game-account-avatar { flex-basis:24px;width:24px;height:24px }
body[data-native-match-compact] .topbar .player-score { font-size:15px }
body[data-native-match-compact] .topbar .player-score small { display:inline;font-size:9px }
body[data-native-match-compact] .topbar .player-heading::after { display:none }
body[data-native-match-compact] .topbar .view-switch { gap:0;padding:0 }
body[data-native-match-compact] .topbar .view-switch button { min-width:38px;min-height:42px;padding:0 6px }
body[data-native-match-compact] .topbar :is(.icon-button,.music-toggle) { width:44px;min-width:44px;height:44px }
body[data-native-match-compact] .topbar:has(.hud-disclosure[open]) { z-index:45 }
body[data-native-match-compact] :is(.camera-panel,.player-balls) {
  position:fixed;right:auto;bottom:auto;overflow:auto;overscroll-behavior:contain;
}
body[data-native-match-compact] .player-balls .ball-row { flex-wrap:wrap }

html.sinuca-native body[data-native-match-compact] .game-layout > .arena:has(> #tableView) {
  grid-template-columns:48px minmax(0,1fr) 50px;
  grid-template-rows:minmax(0,1fr) auto;
}
html.sinuca-native body[data-native-match-compact] #actionBar { width:50px;max-width:50px }
body[data-native-match-compact] #nativeAccessoryBar > .fine-controls { max-width:100% }
body[data-native-match-compact] #nativeAccessoryBar #fineWheel { width:44px }
body[data-native-match-compact] #powerPull { max-width:46px }
body[data-native-match-compact] #secondaryActionBar>.mobile-rule-dock[hidden] { display:none }

html.sinuca-native body[data-native-match-compact] #secondaryActionBar {
  display:flex;height:auto;min-width:0;align-items:center;gap:5px;padding:0;
}
body[data-native-match-compact] #secondaryActionBar > :is(.native-match-tools,#secondaryStatus,#secondaryActionCommands):not(:has(> :not([hidden]))) { display:none }
body[data-native-match-compact] #secondaryStatus:has(#gameMessage[hidden]):not(:has(#rotationTableDock:not([hidden]))) { display:none }
body[data-native-match-compact] #secondaryStatus { flex:1 1 150px;min-width:0 }
body[data-native-match-compact] #secondaryActionCommands { flex:1 1 auto }
body[data-native-match-compact] #secondaryActionBar > .mobile-rule-dock {
  flex:1 1 auto;align-items:center;justify-content:center;min-width:0;
}
body[data-native-match-compact] .native-match-tools { display:flex;align-items:center;gap:4px;flex:none }
body[data-native-match-compact] .native-match-tools > [hidden] { display:none }
body[data-native-match-compact] .native-match-tools > :is(.rule-help-button,.native-room-tools) {
  position:relative;inset:auto;flex:0 0 44px;width:44px;height:44px;border-radius:8px;
  background:#142b26;border-color:#5c766780;color:#f0cc86;
}
body[data-native-match-compact] .native-room-tools[aria-expanded=true] { background:#29443a;border-color:#dbb975 }
body[data-native-match-compact] .native-room-unread:not([hidden]) {
  position:absolute;right:2px;top:2px;min-width:15px;padding:1px 2px;border-radius:8px;
  background:#e9c87c;color:#132820;font-weight:700;font-size:9px;line-height:13px;
}
body[data-native-match-compact] .native-match-tools > :is(.online-badge,.series-badge) {
  position:relative;inset:auto;transform:none;z-index:auto;min-height:32px;gap:4px;padding:4px 6px;
  border-radius:7px;background:#10241f;box-shadow:none;backdrop-filter:none;
}
body[data-native-match-compact] #onlineIndicator { max-width:110px;font-size:11px;line-height:13px }
body[data-native-match-compact] #onlineClock { white-space:nowrap;font-size:13px }
body[data-native-match-compact] #onlineRetry:not([hidden]) { min-height:40px;font-size:11px;padding:0 4px }
body[data-native-match-compact] .series-badge strong { font-size:12px;white-space:nowrap }
body[data-native-match-compact] .series-badge small { display:none }
body[data-native-match-compact] .series-badge span { font-size:10px;letter-spacing:0 }

body[data-native-match-compact] #roomSocial:not(.native-room-open) .room-social-buttons { display:none }
body[data-native-match-compact] #roomSocial.native-room-open { z-index:16 }
body[data-native-match-compact] #roomSocial.native-room-open .room-social-buttons {
  position:fixed;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;overflow:auto;
  background:#102b25;border:1px solid #7e957f;border-radius:10px;padding:6px;max-width:272px;
  box-shadow:0 8px 24px #0007;
}
body[data-native-match-compact] #roomSocial .room-social-buttons button {
  min-width:0;min-height:44px;padding:4px 7px;font-size:12px;white-space:normal;border-radius:7px;
}
body[data-native-match-compact] #roomSocial .room-social-buttons button[hidden] { display:none }
body[data-native-match-compact] .room-chat-panel { max-height:min(240px,calc(100dvh - 116px)) }

body[data-native-match-compact] .mobile-rule-dock > .pool-controls {
  width:auto;max-width:100%;min-width:0;min-height:44px;padding:0;gap:4px;
}
body[data-native-match-compact] :is(.mobile-rule-dock,#decisionActions) .pool-controls > :is(button,select),
body[data-native-match-compact] .mobile-rule-more > summary { min-height:44px }
body[data-native-match-compact] .pool-controls > .mobile-rule-more { margin-left:0 }
body[data-native-match-compact] .mobile-rule-more > summary { width:44px }
body[data-native-match-compact] #decisionActions .pool-controls { gap:4px }
html.sinuca-native body[data-native-match-compact] #secondaryStatus .game-message {
  display:flex;flex-wrap:nowrap;align-items:center;min-height:40px;max-height:44px;
  background:#10241f;padding:2px 40px 2px 6px;backdrop-filter:none;
}
body[data-native-match-compact] .game-message .status-kicker,
body[data-native-match-compact] .game-message .shot-counter { display:none }
body[data-native-match-compact] .game-message #statusText {
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
body[data-native-match-compact] .game-message.mobile-status-expanded #statusText {
  position:absolute;z-index:10;bottom:calc(100% + 6px);left:0;display:block;
  width:min(300px,calc(100vw - 24px));max-height:110px;overflow:auto;padding:10px;
  border:1px solid #6d8a79;border-radius:8px;background:#102b25;
}
body[data-native-match-compact] .mobile-status-info {
  display:grid;place-items:center;flex:0 0 24px;padding:0;background:transparent;color:#edcc89;font-size:18px;
}
html.sinuca-native body[data-native-match-compact] #secondaryStatus .message-dismiss { width:40px;height:40px }

@media(max-width:720px){
  body[data-native-match-compact] .topbar .player-heading { gap:4px;padding-inline:5px }
  body[data-native-match-compact] #onlineIndicator { max-width:82px }
  body[data-native-match-compact] #secondaryStatus { flex-basis:84px }
}
