/* 题小小官网：窄屏导航与版面。菜单项多，768 才折叠会叠在 logo 上，所以 1199 起改汉堡菜单。 */

html, body {
  overflow-x: hidden;
}

@media (max-width: 1199px) {
  #navigation.navbar {
    min-height: 56px;
  }

  #navigation .navbar-header {
    float: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  #navigation .brand {
    float: none;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 56px);
    line-height: 56px;
  }

  #navigation .brand img {
    height: 32px;
    width: 32px;
    flex: 0 0 32px;
  }

  #navigation .brand text {
    font-size: 17px !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #navigation .navbar-toggle {
    display: block !important;
    float: none;
    margin: 10px 0 10px 12px;
    border-color: #cbd5e1;
    background: #fff;
  }

  #navigation .navbar-toggle .icon-bar {
    background: #334155;
  }

  #navigation .navbar-toggle:hover,
  #navigation .navbar-toggle:focus {
    border-color: #2563eb;
    background: #eff6ff;
  }

  #navigation .navbar-toggle:hover .icon-bar,
  #navigation .navbar-toggle:focus .icon-bar {
    background: #2563eb;
  }

  #navigation .navbar-collapse {
    width: 100%;
    border-top: 1px solid #e2e8f0;
    box-shadow: none;
    background: #fff;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #navigation .navbar-collapse.collapse {
    display: none !important;
    height: auto !important;
    padding-bottom: 8px;
  }

  #navigation .navbar-collapse.collapse.in,
  #navigation .navbar-collapse.collapsing {
    display: block !important;
  }

  #navigation .navbar-nav,
  #navigation .navbar-nav.navbar-right {
    float: none !important;
    margin: 8px 0 12px;
  }

  #navigation .navbar-nav > li {
    float: none;
  }

  #navigation .navbar-nav > li > a,
  #navigation.affix .nav li a {
    margin: 0 !important;
    padding: 12px 4px !important;
    line-height: 1.4;
    border-radius: 8px;
    text-transform: none;
  }

  .header {
    height: auto;
    min-height: 56px;
  }
}

@media (max-width: 767px) {
  #navigation .brand text {
    font-size: 16px !important;
  }

  .sb-hero .row {
    display: block !important;
  }

  .sb-hero .col-md-6 {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .sb-hero-img {
    margin-top: 28px;
  }

  .sb-vs-col {
    flex: 1 1 100%;
    padding: 20px 16px;
  }

  .sb-toc ul {
    justify-content: flex-start;
  }

  .sb-toc li a {
    padding: 7px 12px;
    font-size: 13px;
  }

  .sb-hero-meta {
    gap: 12px 16px;
  }

  /* 工作台介绍：手机里当 H5 用 */
  .sb-hero {
    padding: 88px 0 40px;
  }

  .sb-hero h1 {
    font-size: 28px !important;
    margin-bottom: 12px;
  }

  .sb-hero p.sb-sub {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .sb-section {
    padding: 40px 0;
  }

  .sb-h2 {
    font-size: 22px;
  }

  .sb-lead {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .sb-feat-grid,
  .sb-feat-grid[style] {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .sb-feat-card {
    padding: 18px;
  }

  .sb-feat-card h3 {
    font-size: 17px;
  }

  .sb-dl-phone .sb-btn {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin: 0 0 12px;
  }

  .sb-dl-phone .sb-btn + .sb-btn {
    margin-left: 0;
  }

  .sb-dl-tip {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    text-align: center;
  }

  .sb-cta {
    padding: 40px 0;
  }

  .sb-cta h2 {
    font-size: 22px;
  }

  .sb-faq-item summary {
    padding: 16px 18px;
  }

  .sb-shot-card p {
    font-size: 14px;
  }
}

.sb-dl-phone {
  display: none;
}

@media (max-width: 767px) {
  .sb-dl-desktop {
    display: none;
  }

  .sb-dl-phone {
    display: block;
  }
}

button.sb-btn {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
}

html.from-app .header,
html.from-app .footer {
  display: none !important;
}

html.from-app .sb-dl-desktop {
  display: none !important;
}

html.from-app .sb-dl-phone {
  display: block !important;
}

html.from-app .sb-hero {
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
}

html.from-app body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.sb-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity .2s ease, transform .2s ease;
}

.sb-copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
