@media (max-width: 1180px) {
  :root { --outline-w: 0px; }
  .app-header { grid-template-columns: var(--sidebar-w) minmax(0,1fr); }
  .header-right { position:absolute; right:12px; }
  .header-center { padding-right:390px; }
  .page-outline { display:none; }
  .app-footer { margin-right:0; }
}

@media (max-width: 1050px) {
  .header-link { display:none; }
  .header-center { padding-right:245px; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .workspace { grid-template-columns:minmax(0,1fr); width:100%; }
  .app-header { grid-template-columns:minmax(0,1fr); padding:0 12px; }
  .header-left { border-right:0; padding:0; gap:8px; }
  .icon-btn.mobile-menu-btn { display:grid; }
  .header-center { position:absolute; left:205px; right:190px; padding:0; }
  .header-right { right:12px; }
  .product-switcher { display:none; }
  .header-link { display:none; }
  .language-name { display:none; }
  .language-short { display:inline; }
  .search-trigger { min-width:0; width:100%; }
  .search-trigger kbd { display:none; }
  .sidebar { z-index:70; width:284px; transform:translateX(-102%); transition:transform var(--ease); box-shadow:var(--shadow-lg); }
  body.sidebar-open .sidebar { transform:translateX(0); }
  .main-content { grid-column:1 / -1; width:100%; min-width:0; padding:38px clamp(20px,5vw,48px) 70px; }
  .content-container { width:100%; max-width:var(--content-max); min-width:0; }
  .app-footer { margin-left:0; }
  .footer-inner { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .footer-brand { grid-column:1/-1; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .app-header {
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    column-gap:8px;
    padding:0 10px;
  }
  .header-left, .header-center, .header-right {
    position:static;
    inset:auto;
    width:auto;
    min-width:0;
    height:100%;
    padding:0;
  }
  .header-left { grid-column:1; gap:7px; border-right:0; }
  .header-center { grid-column:2; display:flex; }
  .header-right { grid-column:3; gap:6px; justify-content:flex-end; }
  .brand-title { display:none; }
  .brand-mark { width:30px; height:30px; }
  .icon-btn.mobile-menu-btn, .header-right .icon-btn, .signin-btn { width:36px; height:36px; flex:0 0 36px; }
  .theme-toggle { display:none; }
  .signin-btn { padding:0; justify-content:center; }
  .signin-btn span { display:none; }
  .language-trigger { width:38px; height:36px; min-width:38px; justify-content:center; padding:0; }
  .language-name, .language-short, .language-chevron { display:none; }
  .language-menu { position:fixed; top:calc(var(--header-h) + 8px); right:10px; left:auto; width:min(220px, calc(100vw - 20px)); }
  .language-menu::before { right:55px; }
  .search-trigger { width:100%; min-width:0; height:38px; padding:0 10px; gap:8px; }
  .search-trigger span { min-width:0; font-size:14px; }
  .main-content { padding:28px 18px 58px; }
  .breadcrumbs { margin-bottom:16px; flex-wrap:nowrap; overflow-x:auto; white-space:nowrap; scrollbar-width:none; -ms-overflow-style:none; }
  .breadcrumbs::-webkit-scrollbar { display:none; }
  .page-title { font-size:36px; }
  .article-title { font-size:32px; }
  .page-lead { font-size:16px; }
  .hero-search { padding:12px; }
  .hero-search .search-cta { display:none; }
  .section { margin-top:42px; }
  .section-title { font-size:22px; }
  .section-head { align-items:flex-start; }
  .section-link { display:none; }
  .product-grid, .quick-grid, .article-cards, .article-nav { grid-template-columns:1fr; }
  .product-card { min-height:0; }
  .quick-grid { gap:9px; }
  .update-row { grid-template-columns:1fr auto; }
  .update-type { grid-column:1/-1; }
  .wiki-title-row { flex-direction:column; align-items:flex-start; gap:14px; }
  .wiki-title-row > div { width:100%; }
  .wiki-logo { width:48px; height:48px; border-radius:14px; }
  .wiki-title-row h1 { font-size:29px; line-height:1.08; }
  .wiki-title-row p { max-width:none; }
  .page-meta { gap:8px; }
  .meta-pill { font-size:11px; }
  .wiki-tabs { margin-left:-4px; margin-right:-4px; }
  .feedback-box { align-items:flex-start; flex-direction:column; }
  .footer-inner { width:calc(100% - 36px); grid-template-columns:1fr 1fr; gap:26px 20px; }
  .footer-bottom { width:calc(100% - 36px); align-items:flex-start; flex-direction:column; }
  .search-overlay { padding:calc(var(--header-h) + 10px) 10px 12px; }
  .search-dialog { max-height:calc(100dvh - var(--header-h) - 22px); }
  .search-results { max-height:calc(100dvh - var(--header-h) - 150px); }
}

@media (max-width: 480px) {
  .app-header { column-gap:6px; padding:0 8px; }
  .header-left { gap:5px; }
  .icon-btn.mobile-menu-btn, .header-right .icon-btn, .signin-btn { width:34px; height:34px; flex-basis:34px; }
  .brand-mark { width:29px; height:29px; border-radius:8px; }
  .language-trigger { width:36px; min-width:36px; height:34px; }
  .language-flag { width:19px; height:13px; }
  .search-trigger { height:36px; padding:0 8px; }
  .search-trigger span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
  .search-result { grid-template-columns:36px minmax(0,1fr); gap:10px; padding:10px; }
  .search-result kbd { display:none; }
  .article-body h2 { font-size:24px; }
  .code-head { padding:10px 12px; }
  .code-copy { font-size:10px; }
}

@media (max-width: 360px) {
  .app-header { column-gap:5px; padding:0 6px; }
  .header-left { gap:4px; }
  .icon-btn.mobile-menu-btn, .signin-btn { width:32px; height:32px; flex-basis:32px; }
  .brand-mark { width:27px; height:27px; font-size:12px; }
  .language-trigger { width:34px; min-width:34px; height:32px; }
  .search-trigger { height:34px; padding:0 7px; gap:6px; }
  .search-trigger svg { width:15px; height:15px; }
  .search-trigger span { font-size:12px; }
}

@media (max-width: 640px) {
  .feedback-box { align-items:stretch; flex-direction:column; padding:15px; }
  .feedback-controls { align-items:stretch; justify-content:flex-start; }
  .feedback-actions--article { width:100%; }
  .feedback-actions--article .feedback-choice { flex:1; }
  .feedback-detail-button--inline { width:100%; border-color:var(--border); background:var(--surface-solid); }
  .feedback-overlay { place-items:end center; padding:0; }
  .feedback-dialog {
    width:100%;
    max-height:calc(100dvh - 18px);
    border-right:0;
    border-bottom:0;
    border-left:0;
    border-radius:20px 20px 0 0;
  }
  .feedback-dialog-header { padding:17px 17px 14px; }
  .feedback-dialog-body { padding:17px; }
  .feedback-dialog-footer { padding:12px 17px calc(12px + env(safe-area-inset-bottom)); }
  .feedback-dialog-rating { grid-template-columns:1fr; }
  .feedback-comment-meta { align-items:flex-start; flex-direction:column; gap:3px; }
}

@media (max-width: 380px) {
  .feedback-choice { min-width:0; padding:0 9px; }
  .feedback-dialog-header h2 { font-size:19px; }
  .feedback-reasons { display:grid; grid-template-columns:1fr; }
  .feedback-reason { border-radius:9px; text-align:left; }
  .feedback-dialog-footer { display:grid; grid-template-columns:1fr 1fr; }
  .feedback-secondary-button, .feedback-primary-button { padding:0 10px; }
}
