
/* ranking-table-fullscreen:start */
html.is-table-fullscreen,
body.is-table-fullscreen {
  overflow: hidden !important;
}

body.is-table-fullscreen .result-card {
  position: fixed !important;
  inset: 0 !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding:
    max(58px, calc(env(safe-area-inset-top) + 46px))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .92), transparent 38%),
    linear-gradient(180deg, rgba(244, 245, 247, .98), rgba(248, 250, 252, .96));
  box-shadow: none;
}

body.is-table-fullscreen .table-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding-bottom: 8px;
}

body.is-table-fullscreen .table-toolbar .result-controls {
  width: auto;
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 0 auto;
  order: 2;
}

body.is-table-fullscreen .table-toolbar .sort-control {
  width: 176px;
  min-width: 0;
  max-width: 176px;
}

body.is-table-fullscreen .table-toolbar .sort-control,
body.is-table-fullscreen .table-toolbar .glass-select,
body.is-table-fullscreen .table-fullscreen-button {
  width: 176px;
  min-width: 0;
  flex: 0 0 176px;
}

body.is-table-fullscreen .glass-select-button,
body.is-table-fullscreen .table-fullscreen-button {
  min-width: 0;
  padding-left: 30px;
  padding-right: 12px;
}

body.is-table-fullscreen .table-fullscreen-button {
  padding-left: 10px;
}

body.is-table-fullscreen .glass-select-text,
body.is-table-fullscreen .table-fullscreen-button b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-table-fullscreen .glass-select-menu {
  left: 0;
  right: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body.is-table-fullscreen .table-toolbar .source-tabs {
  width: auto;
  flex: 0 1 auto;
  max-width: min(100%, calc(100% - 560px));
  order: 1;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

body.is-table-fullscreen .table-toolbar .source-tabs::-webkit-scrollbar {
  display: none;
}

body.is-table-fullscreen .result-card .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  display: block !important;
  border-radius: 14px !important;
}

body.is-table-fullscreen .bottom-nav,
body.is-table-fullscreen .page-top-button,
body.is-table-fullscreen .aw-waker-widget,
body.is-table-fullscreen .controls-bar {
  display: none !important;
}

body.is-table-fullscreen .table-fullscreen-button {
  background:
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, .92), rgba(219, 234, 254, .46) 54%, transparent 82%),
    linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(239, 246, 255, .68));
  color: #1d4ed8;
}

@media (max-width: 640px) {
  body.is-table-fullscreen .result-card {
    inset: 0;
    padding:
      max(62px, calc(env(safe-area-inset-top) + 54px))
      max(8px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
  }

  body.is-table-fullscreen .table-toolbar {
    gap: 7px;
    padding-bottom: 7px;
  }

  body.is-table-fullscreen .table-toolbar .result-controls {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px;
    gap: 6px;
    margin-left: 0;
    order: 1;
  }

  body.is-table-fullscreen .table-toolbar .source-tabs {
    width: 100%;
    max-width: 100%;
    order: 2;
  }

  body.is-table-fullscreen .table-toolbar .sort-control,
  body.is-table-fullscreen .table-toolbar .glass-select,
  body.is-table-fullscreen .table-fullscreen-button {
    width: 100%;
    max-width: none;
    flex: initial;
  }

  body.is-table-fullscreen .table-fullscreen-button {
    min-width: 0;
    width: 96px !important;
    min-width: 96px !important;
    padding-inline: 8px;
  }

  body.is-table-fullscreen .source-tabs button {
    border-radius: 12px 12px 0 0;
  }

  .table-fullscreen-exit {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    min-height: 44px;
    padding: 0 16px;
  }
}
/* ranking-table-fullscreen:end */

/* fullscreen-table-surface:start */
body.is-table-fullscreen::before {
  content: none !important;
  display: none !important;
}

body.is-table-fullscreen .result-card {
  background: #f4f5f7 !important;
}

body.is-table-fullscreen .table-toolbar {
  position: relative;
  z-index: 6;
  padding-bottom: 0 !important;
  background: #f4f5f7;
}

body.is-table-fullscreen .table-toolbar .source-tabs,
body.is-table-fullscreen .result-card .source-tabs {
  margin: 0 0 -1px;
  background: #f4f5f7 !important;
  background-color: #f4f5f7 !important;
}

body.is-table-fullscreen .source-tabs button {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
  border-bottom-color: #d5dce7 !important;
  background: #eef2f7 !important;
}

body.is-table-fullscreen .source-tabs button.is-active {
  z-index: 4;
  border-bottom-color: #fff !important;
  background: #fff !important;
  transform: none;
}

body.is-table-fullscreen .source-tabs button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .26);
  outline-offset: -2px;
}

body.is-table-fullscreen .result-card .table-wrap {
  margin-top: 0 !important;
  border-top-color: #d5dce7;
  border-radius: 0 0 14px 14px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .12);
}

body.is-table-fullscreen .table-wrap table,
body.is-table-fullscreen .table-wrap thead,
body.is-table-fullscreen .table-wrap tbody {
  background: #fff;
}

body.is-table-fullscreen .table-wrap th {
  background: #f8fafc;
}

@media (max-width: 640px) {
  body.is-table-fullscreen .table-toolbar {
    gap: 6px;
    padding-bottom: 0 !important;
  }

  body.is-table-fullscreen .table-toolbar .source-tabs {
    gap: 4px;
    margin-bottom: -1px;
  }

  body.is-table-fullscreen .source-tabs button {
    min-height: 42px;
    border-radius: 12px 12px 0 0;
  }

  body.is-table-fullscreen .result-card .table-wrap {
    border-radius: 0 0 13px 13px !important;
  }
}
/* fullscreen-table-surface:end */

/* ranking-toolbar-sticky:start */
@media (max-width: 640px) {
  .result-card .table-toolbar {
    position: sticky;
    top: 62px;
    z-index: 46;
    row-gap: 10px;
    padding: 8px 0 0;
    margin-top: -2px;
    background:
      linear-gradient(180deg, rgba(244, 245, 247, .98) 0%, rgba(244, 245, 247, .94) 74%, rgba(244, 245, 247, .78) 100%);
    backdrop-filter: blur(14px) saturate(1.08);
    -webkit-backdrop-filter: blur(14px) saturate(1.08);
  }

  .result-card .table-toolbar::after {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    bottom: -10px;
    height: 10px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(244, 245, 247, .78), rgba(244, 245, 247, 0));
  }

  .table-toolbar .result-controls {
    position: relative;
    z-index: 70;
    align-items: stretch;
  }

  .table-toolbar .sort-control {
    isolation: isolate;
  }

  .table-toolbar .sort-control-icon {
    display: none;
  }

  .glass-select {
    z-index: 80;
  }

  .glass-select.is-open {
    z-index: 140;
  }

  .glass-select-button {
    grid-template-columns: minmax(0, 1fr) 10px;
    gap: 6px;
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  .glass-select-text {
    width: 100%;
    text-align: center;
    font-size: 10.75px;
  }

  .glass-select-arrow {
    width: 6px;
    height: 6px;
  }

  .glass-select-menu {
    top: calc(100% + 7px);
    z-index: 150;
    overflow: hidden;
    border-color: rgba(148, 163, 184, .42);
    background:
      radial-gradient(circle at 22% 0%, rgba(255, 255, 255, .96), rgba(255, 255, 255, .8) 54%, transparent 82%),
      linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(241, 245, 249, .94));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .94),
      0 18px 34px rgba(15, 23, 42, .18);
  }

  .glass-select-menu button {
    min-height: 39px;
    padding: 0 10px;
  }

  .glass-select-menu button span {
    font-size: 11px;
  }

  .table-fullscreen-button {
    min-width: 0;
    justify-content: center;
    gap: 5px;
    padding-inline: 9px;
  }

  .table-fullscreen-button b {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .table-toolbar .source-tabs {
    position: relative;
    z-index: 30;
  }

  body.is-table-fullscreen .result-card .table-toolbar {
    position: sticky;
    top: 0;
    z-index: 60;
    padding-top: 0;
    margin-top: 0;
  }
}
/* ranking-toolbar-sticky:end */

/* mobile-sticky-cover:start */
@media (max-width: 640px) {
  .controls-bar {
    z-index: 90;
    background:
      linear-gradient(180deg, rgba(244, 245, 247, 1) 0%, rgba(244, 245, 247, .98) 78%, rgba(244, 245, 247, .88) 100%);
    backdrop-filter: blur(16px) saturate(1.06);
    -webkit-backdrop-filter: blur(16px) saturate(1.06);
  }

  .controls-bar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -14px;
    height: 14px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(244, 245, 247, .88), rgba(244, 245, 247, 0));
  }

  .result-card .table-toolbar::before {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: -12px;
    height: 12px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(244, 245, 247, .96), rgba(244, 245, 247, .90));
  }

  .result-card .table-toolbar {
    box-shadow: 0 -10px 0 rgba(244, 245, 247, .94);
  }
}
/* mobile-sticky-cover:end */
