.fs-only, [data-fs-clear] { display: none; }
.fs-shell [hidden], .fs-results [hidden], .fs-native [hidden] { display: none !important; }

@media (max-width: 767px) {
  .fs-shell, .fs-results, .fs-native, .fm-search {
    --fs-paper: #fffdf9;
    --fs-bg: #faf6ef;
    --fs-line: #e9ded3;
    --fs-ink: #2d231e;
    --fs-muted: #65554a;
    --fs-accent: #963b23;
    --fs-tint: #f5e7dc;
  }
  .fs-shell, .fs-native {
    box-sizing: border-box;
    width: 100%;
    min-height: 100svh;
    padding: 0 12px max(22px,env(safe-area-inset-bottom));
    color: var(--fs-ink);
    background: var(--fs-bg);
    font: 14px/1.5 system-ui,"PingFang SC","Microsoft YaHei",sans-serif;
  }
  .fs-shell .head-bar, .fs-native .head-bar, .fm-search .head-bar { background: #fffcf8; border-color: var(--fs-line); }
  .fs-shell .head-bar a, .fs-native .head-bar a { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
  .fm-search .head-bar-title .fs-home-link {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 35px;
    padding: 0 9px;
    border: 1px solid var(--fs-line);
    border-radius: 20px;
    color: var(--fs-muted);
    background: #fffdf9;
    font: 13px/1.35 system-ui,sans-serif;
    text-align: left;
    text-decoration: none;
  }
  .fs-home-link img { width: 15px; height: 15px; object-fit: contain; }

  :is(.fs-shell,.fs-results,.fs-native) :where(a,button,input,select,summary):focus-visible {
    outline: 2px solid var(--fs-accent);
    outline-offset: 2px;
  }
  .fs-results .fs-only { display: block; }
  .fs-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 10px 0;
    padding: 13px;
    border: 1px solid var(--fs-line);
    border-radius: 14px;
    color: var(--fs-ink);
    background: var(--fs-paper);
  }
  .fs-shell .fs-card { max-width: 550px; margin-inline: auto; }
  .fs-card h1 { margin: 0 0 8px; color: var(--fs-ink); font-size: 22px; line-height: 1.3; }
  .fs-card h2 { margin: 0 0 8px; color: var(--fs-ink); font-size: 16px; line-height: 1.35; }
  .fs-card p { margin: 0 0 9px; color: var(--fs-muted); }
  .fs-heading-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; }
  .fs-heading-row h2 { margin: 0; }
  .fs-form { margin: 0; min-width: 0; }
  .fs-fieldset, .fs-row { display: flex; gap: 6px; align-items: stretch; min-width: 0; }
  .fs-shell input:is([type=search],[type=number]), .fs-shell select, .fs-native input[type=search] {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    min-height: 46px;
    padding: 6px 9px;
    border: 1px solid var(--fs-line);
    border-radius: 8px;
    color: var(--fs-ink);
    background: #fbf6f0;
    font: 16px/1.4 system-ui,sans-serif;
  }
  .fs-row input { flex: 1; }
  .fs-row input::-webkit-search-cancel-button, .fs-results #fs-catalog-q::-webkit-search-cancel-button { appearance: none; }
  .fs-action, .fs-clear {
    box-sizing: border-box;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 5px 9px;
    border: 1px solid var(--fs-line);
    border-radius: 8px;
    color: var(--fs-ink);
    background: var(--fs-paper);
    font: 650 13px/1.3 system-ui,sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
  }
  .fs-clear { color: var(--fs-accent); background: #f6efe7; }
  .fs-action.fs-primary,
  :is(.fs-shell,.fs-native,.fs-results) .fs-action.fs-primary:is(:link,:visited,:hover) {
    border-color: var(--fs-accent);
    color: #fff;
    background: var(--fs-accent);
  }
  .fs-pills { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
  .fs-card .fs-pills { margin-top: 7px; }
  :is(.fs-shell,.fs-native,.fs-results) .fs-pills a,
  .fs-shell .ui-search-rec span {
    display: inline-flex;
    align-items: center;
    min-height: 43px;
    padding: 5px 10px;
    border: 1px solid var(--fs-line);
    border-radius: 9px;
    color: var(--fs-ink);
    background: #faf1e8;
    text-decoration: none;
    overflow-wrap: anywhere;
  }
  .fs-shell .fs-pills a[aria-current="page"] { color: #fff; border-color: var(--fs-accent); background: var(--fs-accent); }
  .fs-card summary { min-height: 40px; line-height: 40px; color: var(--fs-accent); font-weight: 700; cursor: pointer; }
  .fs-quick { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .fs-shell .fs-quick a, .fs-shell .fs-quick button { color: var(--fs-accent); }
  .fs-shell .fs-meta { color: var(--fs-muted); font-size: 12px; }
  .fs-shell .fs-advanced { display: grid; gap: 8px; margin-top: 9px; }
  .fs-shell .fs-price { display: grid; grid-template-columns: minmax(0,1fr) 18px minmax(0,1fr); align-items: center; gap: 5px; }
  .fs-shell .fs-price span { text-align: center; }
  .fs-shell .api-search-tips { margin: 6px 0 0; padding: 0; max-height: 240px; overflow-y: auto; }
  .fs-shell .api-search-tips li { box-sizing: border-box; padding: 6px 9px; min-height: 43px; border-bottom: 1px solid var(--fs-line); list-style: none; }
  .fs-shell .api-search-tips li span { float: right; color: var(--fs-muted); font-size: 12px; }
  .fs-shell .ui-search-rec p { display: flex; justify-content: space-between; margin: 6px 0; }
  .fs-shell .ui-search-rec span { margin: 3px 4px 3px 0; cursor: pointer; }
  .fs-shell .ui-search-rec .hot, .fs-shell .ui-search-rec .rec { font-weight: 700; }

  .fs-results .fs-query-heading { margin: 1px 0 9px; }
  .fs-results .fs-query-heading h1 { margin: 0; font-size: 22px; line-height: 1.25; color: var(--fs-ink); overflow-wrap: anywhere; }
  .fs-results .fs-query-heading p { margin: 3px 0 0; color: var(--fs-muted); }
  .fs-results.fs-has-query .catalog-heading { display: none; }
  .fs-results.fs-has-query .catalog-search { gap: 4px; }
  .fs-results.fs-has-query .catalog-search input[type=search] { border-radius: 8px; }
  .fs-results.fs-has-query .catalog-search .primary-button { border-radius: 8px; }
  .fs-results #fs-catalog-q { scroll-margin-top: 70px; }
  .fs-results .fs-active {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
  }
  .fs-results .fs-active > span {
    padding: 5px 8px;
    border-radius: 6px;
    color: var(--fs-accent);
    background: var(--fs-tint);
    overflow-wrap: anywhere;
  }
  .fs-results .fs-active .fs-action { min-height: 38px; }
  .fs-results.fs-has-query :is(.fz-category__query,.fz-category__empty) { display: none; }
  .fs-results .fs-zero h2, .fs-native .fs-zero h2 { margin: 0 0 6px; overflow-wrap: anywhere; }
  .fs-results .fs-zero p { margin-bottom: 9px; }
  .fs-results .fs-zero .fs-pills { margin-top: 12px; }
  .fs-results .fs-zero .fs-row { flex-wrap: wrap; }
  .fs-results.fs-has-query:has(.fs-zero) .catalog-pagination { display: none; }
  .fs-native .fs-filter-tools { padding: 9px 10px; }
  .fs-native #list .fs-zero { grid-column: 1/-1; }
  .fs-native .fs-zero .fs-row { flex-wrap: wrap; }
  .fs-native .fs-sort { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
  .fs-native .fs-sort button[aria-pressed="true"] { color: var(--fs-accent); background: var(--fs-tint); }
  .fs-native .fs-advanced-link { margin-top: 7px; color: var(--fs-accent); }
  .fs-native .fs-native-results { margin: 8px 0 0; color: var(--fs-muted); font-size: 13px; overflow-wrap: anywhere; }
}
