/* VEAK responsive pass — static HTML pages
   Breakpoints: 1200 / 900 / 600. Uses !important where the page has inline styles. */

/* ---------------- 1536: stack the view toolbar above the category tabs ----------------
   Below ~1536px the 8 tabs (704px) would run into the 12 view buttons, so the
   original site moves the tabs to their own row under the icon row. */
@media (max-width: 1536px) {
  .toolbar { bottom: 120px !important; left: 0 !important; right: 0 !important; justify-content: flex-end !important; padding: 0 !important; overflow-x: auto !important; }
}

/* ---------------- 1200: compact desktop ---------------- */
@media (max-width: 1200px) {
  .topbar { padding: 0 24px !important; }
  .topbar-left, .topbar-right { min-width: 0 !important; }
  .topbar-nav { width: auto !important; flex: 1 1 auto !important; gap: 28px !important; }
  .nav-link { font-size: 17px !important; }
  .logo { height: 34px !important; }

  .controls { width: 250px !important; }

  .toolbar-left {
    left: 0 !important; right: 0 !important; bottom: 156px !important;
    padding: 0 !important; overflow-x: auto !important; justify-content: flex-start !important;
  }
  .toolbar {
    left: 0 !important; right: 0 !important; bottom: 120px !important;
    padding: 0 !important; overflow-x: auto !important; justify-content: flex-start !important;
  }
  .toolbar-btn { flex: 0 0 88px !important; }
  .design-footer { overflow-x: auto !important; }
  .part-grid { flex-wrap: nowrap !important; min-width: max-content !important; }
}

/* ---------------- 900: tablet ---------------- */
@media (max-width: 900px) {
  .topbar {
    height: auto !important; min-height: 58px !important; padding: 6px 14px !important;
    flex-wrap: wrap !important; align-items: center !important;
    flex: 0 0 auto !important; row-gap: 2px !important;
  }
  .topbar-left { order: 1 !important; }
  .topbar-right { order: 2 !important; margin-left: auto !important; }
  .topbar-nav {
    order: 3 !important; flex: 0 0 100% !important; width: 100% !important; height: 38px !important;
    justify-content: flex-start !important; gap: 24px !important;
    margin: 0 -14px !important; padding: 0 14px !important;
    overflow-x: auto !important; overflow-y: hidden !important;
  }
  .nav-link { flex: 0 0 auto !important; font-size: 15px !important; line-height: 38px !important; }
  .logo { height: 30px !important; }
  .login-btn { width: auto !important; min-width: 96px !important; height: 34px !important; line-height: 34px !important; padding: 0 14px !important; font-size: 13.5px !important; margin-right: 2px !important; }
  .lang-btn { height: 34px !important; padding: 0 6px !important; font-size: 13.5px !important; margin-left: 0 !important; min-width: 58px !important; }

  .layout-main { overflow-y: auto !important; overflow-x: hidden !important; }
  .design { height: auto !important; min-height: 100% !important; }
  .cv { flex-direction: column !important; }

  .controls { width: 100% !important; flex: 0 0 auto !important; box-shadow: none !important; border-bottom: 1px solid #eee !important; }
  .size-content { padding: 8px 12px 10px !important; flex: 0 0 auto !important; overflow: visible !important; }
  .panel-header { margin-bottom: 6px !important; }
  .panel-title { font-size: 1rem !important; }
  .slider-list {
    flex-direction: row !important; justify-content: flex-start !important; gap: 12px !important;
    overflow-x: auto !important; overflow-y: hidden !important; padding-bottom: 4px !important;
  }
  .slider-label { flex: 0 0 auto !important; min-width: 158px !important; margin-top: 0 !important; }
  .slider-label-content { font-size: 12px !important; margin-bottom: 4px !important; }
  .size-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 4px !important; }
  .size-btn { height: 28px !important; line-height: 28px !important; font-size: 11px !important; }

  .menu-footer { flex: 0 0 auto !important; }
  .menu-footer__body {
    height: auto !important; padding: 8px 12px !important;
    flex-direction: row !important; align-items: center !important; gap: 8px !important;
  }
  .menu-footer__title, .menu-footer__subtitle { display: none !important; }
  .bill-head, .bill-lines, .bill-no { display: none !important; }
  .bill-total__label { display: none !important; }
  .bill-total { border-top: 0 !important; padding-top: 0 !important; margin-top: 0 !important; justify-content: flex-start !important; }
  .menu-footer__size { display: block !important; order: 1 !important; flex: 1 1 auto !important; text-align: left !important; font-size: 10px !important; line-height: 1.4 !important; }
  .menu-footer__price { order: 2 !important; height: auto !important; align-items: baseline !important; }
  .price-label { font-size: 12px !important; }
  .price-value { font-size: 20px !important; line-height: 1 !important; }
  .menu-footer__actions { order: 3 !important; height: auto !important; margin: 0 !important; border: 0 !important; padding-top: 0 !important; }
  .menu-footer__action_contact { width: 84px !important; height: 32px !important; line-height: 32px !important; font-size: 12px !important; }
  .menu-footer__action_cart { width: 96px !important; height: 32px !important; line-height: 32px !important; font-size: 12px !important; margin-left: 0 !important; }

  .right { flex: 1 1 auto !important; height: auto !important; min-height: 320px !important; }
  .canvas { flex: 1 1 auto !important; min-height: 0 !important; }

  .design-footer {
    flex: 0 0 96px !important; height: 96px !important; padding: 0 8px !important;
    overflow-x: auto !important; overflow-y: hidden !important;
  }
  .df-title { font-size: 14px !important; white-space: nowrap !important; flex: 0 0 auto !important; }
  .part-grid { flex-wrap: nowrap !important; gap: 8px !important; min-width: max-content !important; }
  .part-item { flex: 0 0 64px !important; width: 64px !important; height: 64px !important; }
  .part-item .ui-ico { width: 18px !important; height: 18px !important; }

  .toolbar { bottom: 96px !important; height: 34px !important; }
  .toolbar-left { bottom: 130px !important; height: 38px !important; }
  .view-btn { width: 32px !important; height: 32px !important; }
  .view-btn img { width: 18px !important; height: 18px !important; }

  /* user centre */
  .ud { padding: 16px !important; height: auto !important; min-height: 100% !important; overflow: visible !important; display: block !important; }
  .ud-body { flex-direction: column !important; gap: 16px !important; height: auto !important; max-width: 100% !important; }
  .ud .side { flex: 0 0 auto !important; width: 100% !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; padding: 12px !important; }
  .ud .hi { width: 100% !important; text-align: left !important; font-size: 20px !important; margin: 0 0 8px !important; padding: 0 !important; }
  .ud .menu { flex: 1 1 100% !important; flex-direction: row !important; overflow-x: auto !important; }
  .ud .menu-item { flex: 0 0 auto !important; padding: 8px 12px !important; font-size: 12px !important; border-top: none !important; border-right: 1px solid #eee !important; }
  .ud .menu-item .tri { display: none !important; }
  .ud .logout-btn { margin: 8px 0 0 auto !important; align-self: flex-end !important; }
  .ud .main { width: 100% !important; min-width: 0 !important; }
  .ud .main-top { flex-direction: column !important; }
  .ud .main-right { width: 100% !important; }
  .ud .profile-body { flex-wrap: wrap !important; }
  .ud .cart { width: 100% !important; }
  .ud .cart-scroll { overflow-x: auto !important; }

  /* forum */
  .fv-hero img { height: 300px !important; object-fit: cover !important; }
  .fv-strip { height: 82px !important; }
  .fv-strip .strip-title { font-size: 28px !important; }
  .fv-inner { padding: 0 16px 40px !important; }
  .creator-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .creator-img { height: 150px !important; }
  .m-grid { flex-direction: column !important; gap: 16px !important; }
  .m-col { width: 100% !important; }
  .sec-head { flex-wrap: wrap !important; gap: 8px !important; }

  /* changeModel */
  .cm { height: auto !important; min-height: 100% !important; overflow: auto !important; }
  .ed-head { flex-wrap: wrap !important; height: auto !important; padding: 10px 12px !important; gap: 8px !important; }
  .ed-title { width: 100% !important; white-space: normal !important; }
  .ed-sub { white-space: normal !important; }
  .ed-actions { width: 100% !important; flex-wrap: wrap !important; gap: 8px !important; }

  /* auth */
  .login-page, .regist-page { padding: 16px !important; }
  .login-card, .regist-card { width: 100% !important; max-width: 420px !important; padding: 22px !important; }

  /* admin */
  .admin-table { padding: 8px !important; }
  .at-query { padding: 10px 12px 0 !important; }
  .at-query .el-form-item { width: 100% !important; margin-right: 0 !important; }
  .at-query .el-input, .at-query .el-select { width: 100% !important; max-width: 100% !important; }
  .at-query__actions .el-form-item__content { flex-wrap: wrap !important; gap: 6px !important; }

  /* board manage */
  .board-page { padding: 8px !important; }
  .card-head { flex-wrap: wrap !important; gap: 8px !important; }
  .card-head__main { width: 100% !important; flex-wrap: wrap !important; }
  .card-search { width: 100% !important; flex-wrap: wrap !important; }
  .card-search__input, .card-search__input--type { width: 100% !important; }
  .board-tabs .el-tabs__nav-wrap { overflow-x: auto !important; }
  .board-tabs .el-tabs__item { white-space: nowrap !important; }

  /* cases / about */
  .hero { padding: 56px 20px !important; }
  .hero h1 { font-size: 34px !important; }
  .hero__lead { font-size: 14px !important; }
  .hero__art { display: none !important; }
  .stats { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  .sec { padding: 36px 20px !important; }
  .sec__head { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }
  .case-filters__row { flex-wrap: wrap !important; gap: 6px !important; }
  .case-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; }
  .pg-foot { flex-direction: column !important; gap: 12px !important; }

  /* hole preview */
  .hp-body { flex-direction: column !important; }
  .hp-left { width: 100% !important; height: 40vh !important; }
  .hp-right { min-height: 50vh !important; }
}

/* ---------------- 600: phone ---------------- */
@media (max-width: 600px) {
  .topbar { padding: 6px 10px !important; }
  .logo { height: 26px !important; }
  .login-btn { min-width: 78px !important; height: 32px !important; line-height: 32px !important; padding: 0 10px !important; font-size: 13px !important; }
  .lang-btn { font-size: 13px !important; padding: 0 6px !important; }
  .topbar-nav { gap: 18px !important; }
  .nav-link { font-size: 14px !important; }

  .size-content { padding: 6px 10px 8px !important; }
  .slider-label { min-width: 112px !important; }
  .size-btn { height: 26px !important; line-height: 26px !important; font-size: 10px !important; }
  .right { height: 48vh !important; min-height: 300px !important; }
  .menu-footer__size { display: none !important; }
  .price-value { font-size: 18px !important; }
  .menu-footer__action_cart { width: 86px !important; height: 30px !important; line-height: 30px !important; font-size: 11px !important; }

  .design-footer { flex-basis: 88px !important; height: 88px !important; }
  .part-item { flex: 0 0 58px !important; width: 58px !important; height: 58px !important; }
  .toolbar { bottom: 88px !important; }
  .toolbar-left { bottom: 122px !important; }
  .toolbar-btn { flex-basis: 82px !important; font-size: 11px !important; }
  .df-title { font-size: 13px !important; }

  .creator-grid { grid-template-columns: 1fr !important; }
  .fv-hero img { height: 240px !important; }
  .fv-strip { height: 70px !important; }
  .fv-strip .strip-title { font-size: 24px !important; }
  .ed-sub { display: none !important; }

  .ud .side { padding: 10px !important; }
  .ud .hi { font-size: 18px !important; }

  .hero h1 { font-size: 28px !important; }
  .hero { padding: 44px 16px !important; }
  .sec { padding: 30px 16px !important; }
  .case-grid { grid-template-columns: 1fr !important; }
  .stats { grid-template-columns: 1fr 1fr !important; }
}

/* forum dialogs / filter panel on small screens */
@media (max-width: 900px) {
  .pub-overlay { padding: 12px !important; align-items: flex-start !important; overflow-y: auto !important; }
  .pub-dialog { width: calc(100vw - 24px) !important; max-width: none !important; max-height: none !important; margin: 12px auto !important; padding: 18px !important; }
  .filter-panel { position: static !important; width: auto !important; max-width: none !important; max-height: 72vh !important; overflow: auto !important; margin: 12px !important; }
}

@media (max-width: 900px) {
  .slider-label { min-width: 112px !important; }
}

/* profile form */
@media (max-width: 900px) {
  .pi { flex-direction: column !important; gap: 16px !important; height: auto !important; }
  .pi-form { width: 100% !important; padding: 16px !important; overflow: visible !important; }
  .pi-right { flex: 0 0 auto !important; width: 100% !important; gap: 16px !important; }
  .pi-top { flex-direction: column !important; gap: 20px !important; }
  .pi-avatar { flex: 0 0 auto !important; align-self: center !important; }
  .pi-fields { width: 100% !important; }
  .pi-row { flex-wrap: wrap !important; row-gap: 6px !important; }
  .pi-row > span { flex: 0 0 70px !important; }
  .pi-row input, .pi-row select.pi-select, .pi-row .pi-gender, .pi-date { flex: 1 1 100% !important; width: 100% !important; }
  .pi-footer { flex-wrap: wrap !important; gap: 10px !important; }
  .pi-save { width: 100% !important; min-width: 0 !important; }
}

@media (max-width: 600px) {
  .slider-list { flex-direction: column !important; overflow: visible !important; }
  .slider-label { width: 100% !important; min-width: 0 !important; }
}

@media (max-width: 600px) {
  .slider-list { flex-direction: row !important; overflow-x: auto !important; }
  .slider-label { min-width: 112px !important; width: auto !important; }
  .size-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 3px !important; }
  .size-btn { min-width: 0 !important; width: auto !important; padding: 0 2px !important; }
}

/* phone: stack size groups instead of horizontal clipping */
@media (max-width: 600px) {
  .slider-list { flex-direction: column !important; overflow: visible !important; }
  .slider-label { width: 100% !important; min-width: 0 !important; }
}

/* colour palettes: three labelled rows, each scrolls horizontally on phones */
@media (max-width: 900px) {
  .design-footer.is-color { overflow-x: hidden !important; }
  .color-grid { gap: 6px !important; }
  .color-row { grid-template-columns: 40px minmax(0, 1fr) !important; gap: 8px !important; }
  .color-row__label { font-size: 9px !important; }
  .color-row__items { grid-auto-columns: 92px !important; gap: 6px !important; }
  .color-item { font-size: 10.5px !important; }
}

@media (max-width: 1200px) {
  .login-btn, .lang-btn, .nav-link { white-space: nowrap !important; }
}

@media (max-width: 1200px) {
  .login-btn, .lang-btn { flex: 0 0 auto !important; }
  .lang-btn { min-width: 64px !important; padding: 5px 8px !important; }
}

@media (max-width: 1200px) {
  .topbar-right { flex: 0 0 auto !important; min-width: max-content !important; }
}

@media (max-width: 1200px) {
  .lang-btn { width: 72px !important; min-width: 72px !important; }
}

@media (max-width: 1200px) {
  .lang-btn { font-size: 14px !important; }
  .lang-btn span { display: inline-block !important; white-space: nowrap !important; }
}

/* never wrap the login / language controls */
.login-btn, .lang-btn { white-space: nowrap !important; }
.lang-btn { min-width: 64px !important; width: auto !important; }
.topbar-right { flex: 0 0 auto !important; min-width: max-content !important; }

/* ---------------- short viewports (desktop): keep the size panel fully visible ---------------- */
@media (max-height: 860px) and (min-width: 901px) {
  .size-content { padding: 8px 18px !important; }
  .slider-list { gap: 8px !important; }
  .slider-label-content { margin-bottom: 2px !important; }
  .size-grid { gap: 4px !important; }
  .size-btn { height: 24px !important; line-height: 24px !important; font-size: 12px !important; }
  .size-pro { height: 28px !important; margin-top: 4px !important; }
  .pro-toggle { height: 30px !important; margin: 2px 0 6px !important; font-size: 11px !important; }
  .size-tip { display: none !important; }
  .menu-footer__body { height: 210px !important; padding: 10px 22px !important; }
  .menu-footer__title { font-size: 1.1rem !important; }
  .price-value { font-size: 1.5rem !important; }
  .bill-lines, .bill-no { display: none !important; }
  .bill-total__label { display: none !important; }
  .menu-footer__size { display: block !important; }
  .bill-total { border-top: 0 !important; padding-top: 0 !important; margin-top: 0 !important; justify-content: flex-end !important; }
  .menu-footer__actions { gap: 6px !important; padding-top: 0 !important; }
  .menu-footer__action_contact,
  .menu-footer__action_cart { height: 36px !important; line-height: 36px !important; font-size: 12px !important; }
}

/* ---------------- cart table: stacked rows on phones ---------------- */
@media (max-width: 600px) {
  .cart-scroll { overflow: visible !important; }
  .cart-table { display: block !important; width: 100% !important; }
  .cart-table thead { display: none !important; }
  .cart-table tbody { display: block !important; }
  .cart-table tr {
    display: grid !important; grid-template-columns: 20px minmax(0, 1fr) auto;
    column-gap: 10px; row-gap: 4px; padding: 14px 0;
    border-bottom: 1px solid #eee;
  }
  .cart-table tr:last-child { border-bottom: 0 !important; }
  .cart-table td { display: block !important; border: 0 !important; padding: 0 !important; text-align: left !important; }
  .cart-table td.col-check { grid-area: 1 / 1 / 2 / 2; align-self: start; padding-top: 24px !important; }
  .cart-table td.col-goods { grid-area: 1 / 2 / 3 / 3; min-width: 0 !important; }
  .cart-table td.col-goods .goods { min-width: 0 !important; }
  .cart-table td:nth-child(3) { grid-area: 3 / 2 / 4 / 4; font-size: 12px !important; color: #999 !important; }
  .cart-table td:nth-child(4) { display: none !important; }
  .cart-table td:nth-child(5) { grid-area: 4 / 2 / 5 / 3; font-size: 12px !important; color: #666 !important; }
  .cart-table td:nth-child(5)::before { content: "数量 ×"; }
  .cart-table td:nth-child(6) { grid-area: 1 / 3 / 2 / 4; text-align: right !important; font-weight: 700 !important; color: #d3541e !important; }
  .cart-table td:nth-child(7) { grid-area: 4 / 3 / 5 / 4; text-align: right !important; }
  .cart-table .goods-img { flex: 0 0 56px !important; height: 56px !important; }
  .cart-table .goods-name { font-size: 14px !important; }
  .cart-footer { flex-wrap: wrap !important; gap: 10px !important; }
  .cart-footer .footer-right { flex: 1 1 100% !important; margin-left: 0 !important; justify-content: space-between !important; }
  .cart-footer .sum { font-size: 20px !important; }
}

/* ---------------- order table: stacked rows on phones ---------------- */
@media (max-width: 600px) {
  .od-table { display: block !important; width: 100% !important; font-size: 13px !important; }
  .od-table thead { display: none !important; }
  .od-table tbody { display: block !important; }
  .od-table tr {
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 10px; row-gap: 4px; padding: 14px 0; border-bottom: 1px solid #eee;
  }
  .od-table tr:last-child { border-bottom: 0 !important; }
  .od-table td { display: block !important; border: 0 !important; padding: 0 !important; text-align: left !important; }
  .od-table td:nth-child(1) { grid-area: 1 / 1 / 2 / 3; font-size: 11px !important; color: #999 !important; letter-spacing: .01em; }
  .od-table td:nth-child(2) { grid-area: 2 / 1 / 3 / 2; font-weight: 600 !important; color: #1a1a1a !important; }
  .od-table td:nth-child(3) { grid-area: 3 / 1 / 4 / 2; font-size: 12px !important; color: #999 !important; }
  .od-table td:nth-child(4) { grid-area: 2 / 2 / 3 / 3; text-align: right !important; font-weight: 700 !important; white-space: nowrap; }
  .od-table td:nth-child(5) { grid-area: 3 / 2 / 4 / 3; text-align: right !important; }
  .od-table td:nth-child(6) { grid-area: 4 / 1 / 5 / 3; text-align: right !important; }
}

/* ---------------- address page: stack the form above the address list ---------------- */
@media (max-width: 1200px) {
  .ad { flex-direction: column !important; gap: 16px !important; }
  .ad-form, .ad-manage { flex: 0 0 auto !important; width: 100% !important; overflow: visible !important; }
}
@media (max-width: 600px) {
  .ad-form, .ad-manage { padding: 18px 16px !important; }
  .ad .el-form-item { margin-bottom: 18px !important; }
  .ad .el-form-item__label { width: 84px !important; white-space: nowrap !important; }
  .ad .el-form-item__content { min-width: 0 !important; }
  .ad .el-input, .ad .el-select, .ad .el-textarea { width: 100% !important; max-width: 100% !important; }
  .ad-phone { flex-wrap: nowrap !important; gap: 6px !important; }
  .ad-phone .ad-code { flex: 0 0 64px !important; }
  .ad-footer { flex-wrap: wrap !important; gap: 10px !important; padding-top: 14px !important; }
  .ad-submit { width: 100% !important; margin-left: 0 !important; }
  .addr-item { flex-wrap: wrap !important; gap: 10px !important; padding: 14px 16px !important; }
  .addr-info { flex: 1 1 160px !important; }
  .addr-ops { width: 100% !important; justify-content: flex-end !important; }
}

/* ---------------- shares grid: fewer columns, floating tools out of the way ---------------- */
@media (max-width: 900px) {
  .sh { padding: 18px 16px 26px !important; }
  .sh-head { flex-wrap: wrap !important; row-gap: 10px !important; }
  .sh-title { font-size: 20px !important; }
  .sh-actions { flex-wrap: wrap !important; gap: 8px !important; }
  .sh-profile { gap: 18px !important; margin: 18px 0 22px !important; }
  .sh-avatar { width: 84px !important; height: 84px !important; flex: 0 0 84px !important; clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px) !important; }
  .sh-name { font-size: 20px !important; }
  .sh-stats { gap: 22px !important; font-size: 13px !important; }
  .sh-grid { gap: 14px !important; }
  .sh-col { gap: 14px !important; }
  .note-title { font-size: 13px !important; }
  .sh-float { top: auto !important; bottom: 16px !important; right: 16px !important; flex-direction: row !important; gap: 10px !important; }
}
@media (max-width: 600px) {
  .sh-grid { flex-direction: column !important; }
  .note-img { height: auto !important; aspect-ratio: 4 / 3; }
  .sh-float { top: auto !important; bottom: 14px !important; right: 14px !important; flex-direction: row !important; gap: 10px !important; }
  .float-box { width: 44px !important; height: 44px !important; }
}

/* float tools sit at the top-right; keep the header actions clear of them */
@media (min-width: 901px) and (max-width: 1600px) {
  .sh-actions { margin-right: 84px !important; }
}

/* order table: keep status/action labels on one line on narrow desktops */
@media (max-width: 1200px) and (min-width: 601px) {
  .od-table th { white-space: nowrap !important; }
  .od-table td:nth-child(5), .od-table td:nth-child(6) { white-space: nowrap !important; }
}

/* tablet: let the right column scroll instead of clipping tall cards */
@media (max-width: 1200px) {
  .ud .main { overflow-y: auto !important; min-height: 0 !important; }
  .ud .cart { flex: 0 0 auto !important; }
  .ud .cart-scroll { overflow: visible !important; }
}

/* colour palette: let the 8 columns shrink on narrow desktops instead of overflowing */
@media (min-width: 901px) and (max-width: 1300px) {
  .color-grid { min-width: 0 !important; }
  .color-item { font-size: 10px !important; padding-right: 4px !important; }
}

/* the expanded HUD item already goes full width on tablet/phone */
@media (max-width: 900px) {
}

/* profile: keep the birthday picker readable on narrower desktops */
@media (min-width: 901px) and (max-width: 1600px) {
  .pi-row { gap: 12px !important; }
  .pi-date { min-width: 120px !important; }
  .pi-row .pi-gender { min-width: 80px !important; }
}

/* profile page: stack form and side cards on narrow desktops */
@media (max-width: 1200px) {
  .pi { flex-direction: column !important; height: auto !important; min-height: 0 !important; }
  .pi-form { flex: 0 0 auto !important; width: 100% !important; overflow: visible !important; }
  .pi-right { flex: 0 0 auto !important; width: 100% !important; }
  .pi-top { flex-wrap: wrap !important; align-items: flex-start !important; }
  .pi-avatar { margin-left: auto !important; }
}

@media (max-width: 900px) {
  .pi-avatar { order: -1 !important; margin: 0 auto 4px !important; }
}

/* ================= landscape phones (height-limited) ================= */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 560px) {
  /* top bar: single compact row */
  .topbar {
    height: 44px !important; min-height: 44px !important; flex: 0 0 44px !important;
    padding: 0 14px !important; flex-wrap: nowrap !important; justify-content: space-between !important;
  }
  .topbar-left { order: 0 !important; }
  .topbar-right { order: 2 !important; margin-left: 0 !important; }
  .logo { height: 20px !important; }
  .topbar-left, .topbar-right { min-width: 0 !important; }
  .topbar-nav {
    order: 1 !important; flex: 1 1 auto !important; width: auto !important; height: auto !important;
    margin: 0 16px !important; padding: 0 !important; gap: 20px !important;
    justify-content: center !important; overflow: visible !important;
  }
  .nav-link { font-size: 13px !important; line-height: 44px !important; flex: 0 0 auto !important; }
  .nav-link.active::after { bottom: 9px !important; }
  .login-btn { min-width: 76px !important; height: 28px !important; line-height: 28px !important; font-size: 12px !important; padding: 0 10px !important; margin-right: 8px !important; }
  .lang-btn { height: 28px !important; font-size: 12px !important; padding: 0 6px !important; min-width: 52px !important; }

  /* home: back to two columns, compact panel + canvas */
  .layout-main { overflow: hidden !important; }
  .design { height: 100% !important; min-height: 0 !important; }
  .cv { flex-direction: row !important; min-height: 0 !important; }
  .controls { width: 214px !important; flex: 0 0 214px !important; }
  .size-content { padding: 6px 10px !important; flex: 1 1 auto !important; overflow-y: auto !important; }
  .panel-header { margin-bottom: 2px !important; }
  .panel-title { font-size: 14px !important; }
  .slider-list { flex-direction: column !important; gap: 6px !important; overflow: visible !important; }
  .slider-label { min-width: 0 !important; width: 100% !important; }
  .slider-label-content { font-size: 11px !important; margin-bottom: 3px !important; }
  .size-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 3px !important; }
  .size-grid--2 { grid-template-columns: 1fr 1fr !important; }
  .size-btn { height: 19px !important; line-height: 19px !important; font-size: 9px !important; padding: 0 1px !important; }
  .size-tip { display: none !important; }
  .menu-footer__body {
    height: auto !important; padding: 6px 10px !important;
    flex-direction: column !important; align-items: stretch !important; gap: 2px !important;
  }
  .menu-footer__title, .menu-footer__subtitle { display: none !important; }
  .menu-footer__size { order: 0 !important; font-size: 9px !important; line-height: 1.4 !important; text-align: left !important; }
  .menu-footer__price { order: 1 !important; justify-content: flex-end !important; }
  .price-value { font-size: 16px !important; }
  .menu-footer__actions { order: 2 !important; border-top: 0 !important; padding-top: 2px !important; justify-content: space-between !important; gap: 6px !important; }
  .menu-footer__action_contact { width: 88px !important; height: 26px !important; line-height: 26px !important; font-size: 10px !important; }
  .menu-footer__action_cart { width: 92px !important; height: 26px !important; line-height: 26px !important; font-size: 10px !important; }

  .right { flex: 1 1 auto !important; height: auto !important; min-height: 0 !important; }
  .canvas { flex: 1 1 auto !important; min-height: 0 !important; }
  .canvas__placeholder { font-size: 12px !important; gap: 4px !important; }
  .canvas__placeholder b { font-size: 13px !important; }
  .canvas__placeholder small { font-size: 10px !important; }

  .design-footer { flex: 0 0 70px !important; height: 70px !important; padding: 0 8px !important; }
  .df-title { font-size: 12px !important; }
  .part-grid { gap: 6px !important; }
  .part-item { flex: 0 0 48px !important; width: 48px !important; height: 48px !important; font-size: 9px !important; }
  .part-item .ui-ico { width: 15px !important; height: 15px !important; }
  .color-grid { grid-template-rows: repeat(2, 24px) !important; }
  .color-grid.active { grid-auto-rows: 24px !important; grid-template-rows: repeat(2, 24px) !important; }
  .color-item { font-size: 9px !important; }

  .toolbar { bottom: 70px !important; height: 28px !important; }
  .toolbar-left { bottom: 98px !important; height: 28px !important; }
  .toolbar-btn { flex: 0 0 78px !important; height: 28px !important; line-height: 28px !important; font-size: 10px !important; }
  .view-btn { width: 26px !important; height: 26px !important; }
  .view-btn img { width: 16px !important; height: 16px !important; }
}

/* landscape phones: user centre keeps its left rail so cards get the height */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 560px) {
  .ud { padding: 8px 12px !important; height: 100% !important; min-height: 0 !important; overflow: hidden !important; }
  .ud-body { flex-direction: row !important; gap: 14px !important; height: 100% !important; max-width: none !important; }
  .ud .side { flex: 0 0 168px !important; width: 168px !important; flex-direction: column !important; padding: 8px 0 !important; }
  .ud .hi { width: auto !important; font-size: 16px !important; text-align: left !important; margin: 0 0 6px !important; padding: 0 14px !important; }
  .ud .menu { flex-direction: column !important; flex: 0 0 auto !important; overflow: visible !important; }
  .ud .menu-item { border-top: 1px solid #eee !important; border-right: 0 !important; padding: 6px 14px !important; font-size: 12px !important; }
  .ud .menu-item .tri { display: none !important; }
  .ud .logout-btn { margin: auto 10px 0 !important; }
  .ud .main { height: 100% !important; overflow-y: auto !important; }
  .ud .main-top { flex-direction: row !important; }
  .ud .main-right { width: 232px !important; }
  .ud .profile-body { flex-wrap: nowrap !important; }
  .ud .cart { flex: 0 0 auto !important; }
  .ud .cart-scroll { overflow: visible !important; }
  .ud .card { padding: 14px 16px !important; }
  .ud .hi { font-size: 15px !important; }
}

/* marketing / forum pages on landscape phones */
@media (orientation: landscape) and (max-height: 520px) {
  .fv-hero img { height: 150px !important; }
  .hero { padding: 26px 20px !important; }
  .hero h1 { font-size: 26px !important; }
  .hero__lead { font-size: 13px !important; }
  .sec { padding: 26px 20px !important; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .pi-top { flex-direction: row !important; flex-wrap: nowrap !important; align-items: flex-start !important; }
  .pi-avatar { order: 0 !important; margin: 0 0 0 auto !important; }
  .pi-form { padding: 12px 18px !important; }
  .pi-right { gap: 12px !important; }
  .pi-save { height: 36px !important; }
}

/* very short landscape phones (<=400px tall) */
@media (orientation: landscape) and (max-height: 400px) {
  .size-btn { height: 17px !important; line-height: 17px !important; font-size: 8.5px !important; }
  .size-grid { gap: 2px !important; }
  .slider-list { gap: 4px !important; }
  .slider-label-content { margin-bottom: 2px !important; }
  .size-content { padding: 4px 8px !important; }
  .panel-title { font-size: 13px !important; }
  .design-footer { flex: 0 0 62px !important; height: 62px !important; }
  .toolbar { bottom: 62px !important; }
  .toolbar-left { bottom: 90px !important; }
  .part-item { flex: 0 0 44px !important; width: 44px !important; height: 44px !important; }
}

/* landscape phones <=740px wide: user centre main column stacks */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 740px) {
  .ud .main-top { flex-direction: column !important; }
  .ud .main-right { width: 100% !important; }
  .ud .side { flex: 0 0 148px !important; width: 148px !important; }
  .ud .menu-item { padding: 5px 12px !important; font-size: 11px !important; }
  .ud .hi { font-size: 14px !important; }
}

/* short desktop windows: let the user-centre column scroll instead of squeezing the cart */
@media (max-height: 820px) and (min-width: 1201px) {
  .ud .main { overflow-y: auto !important; }
  .ud .cart { flex: 0 0 auto !important; }
  .ud .cart-scroll { overflow: visible !important; }
}

/* profile: narrow desktop leaves too little room for the two-column fields row */
@media (min-width: 1201px) and (max-width: 1400px) {
  .pi-top { flex-wrap: wrap !important; }
  .pi-fields { flex: 1 1 100% !important; }
  .pi-avatar { margin: 6px 0 0 auto !important; }
}

/* forum hero on 901-1200px wide screens */
@media (min-width: 901px) and (max-width: 1200px) {
  .fv-hero img { height: 340px !important; object-fit: cover !important; }
}

/* short windows: login / register cards align to the top and scroll */
@media (max-height: 640px) {
  .login-page, .regist-page { align-items: flex-start !important; }
  .login-card, .regist-card { margin: 16px auto !important; flex-shrink: 0 !important; }
}

/* ---------- home: PRO mode + canvas edit group on smaller screens ---------- */
@media (max-width: 480px) {
  .size-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .size-grid--2 { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 600px) {
  .part-item .ui-ico { width: 18px !important; height: 18px !important; margin-bottom: 3px !important; }
  .canvas-actions { top: 6px !important; right: 6px !important; }
  .canvas-actions .view-btn { width: 26px !important; height: 26px !important; }
  .canvas-actions .view-btn img { width: 16px !important; height: 16px !important; }
  .size-pro { height: 30px !important; }
  .size-pro__input { font-size: 11px !important; padding-right: 26px !important; }
  .pro-toggle { height: 32px !important; font-size: 11px !important; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .canvas-actions { top: 4px !important; right: 4px !important; padding: 1px !important; gap: 1px !important; }
  .canvas-actions .view-btn { width: 24px !important; height: 24px !important; }
  .canvas-actions .view-btn img { width: 15px !important; height: 15px !important; }
  .canvas-actions__sep { height: 14px !important; margin: 0 1px !important; }
  .size-pro { height: 19px !important; }
  .size-pro__input { font-size: 9px !important; padding: 0 22px 0 5px !important; }
  .size-pro__unit { font-size: 8px !important; right: 4px !important; }
  .size-pro__badge { top: -6px !important; font-size: 6px !important; height: 10px !important; line-height: 10px !important; }
  .pro-toggle { height: 17px !important; padding: 0 5px !important; font-size: 8px !important; }
}

@media (orientation: landscape) and (max-height: 400px) {
  .size-pro { height: 17px !important; }
  .canvas-actions .view-btn { width: 22px !important; height: 22px !important; }
  .canvas-actions .view-btn img { width: 14px !important; height: 14px !important; }
}

/* measured fallback: when icons + tabs do not fit in one row, turn the view rail vertical */
.toolbar-left.is-rail {
  left: auto !important; right: 10px !important; top: 50% !important; bottom: auto !important;
  transform: translateY(-50%);
  flex-direction: column !important; align-items: stretch !important;
  gap: 6px !important; overflow: visible !important; height: auto !important; padding: 0 !important;
}
.toolbar-left.is-rail .view-group { flex-direction: column !important; }
.toolbar-left.is-rail .view-group .view-btn { width: 38px !important; height: 38px !important; border: 0 !important; }
.toolbar-left.is-rail .view-group .view-btn + .view-btn { border-left: 0 !important; border-top: 1px solid #e6e6e6 !important; }
.toolbar-left.is-rail > .view-btn { width: 38px !important; height: 38px !important; }

/* category tabs: always one row, right-aligned; shrink instead of wrapping */
@media (min-width: 901px) and (max-width: 1409px) {
  .toolbar {
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    overflow: visible !important;
  }
  .toolbar .toolbar-btn {
    flex: 0 1 8.5rem !important;
    min-width: 0 !important;
  }
}

/* ============================================================================
   home / tablet portrait: keep the workbench as two columns
   (narrow size panel on the left, viewport on the right, no page scroll)
   ========================================================================== */
@media (min-width: 601px) and (max-width: 900px) and (min-height: 521px) {
  .layout-main { overflow: hidden !important; }
  .design { height: 100% !important; min-height: 0 !important; }
  .cv { flex-direction: row !important; min-height: 0 !important; }

  .controls {
    width: clamp(228px, 34vw, 250px) !important;
    flex: 0 0 clamp(228px, 34vw, 250px) !important;
    border-bottom: 0 !important;
    border-right: 1px solid #e8e8e8 !important;
    box-shadow: none !important;
  }
  .size-content { padding: 14px 14px 10px !important; flex: 1 1 auto !important; overflow-y: auto !important; }
  .panel-header { margin-bottom: 8px !important; }
  .panel-title { font-size: 15px !important; }
  .slider-list { flex-direction: column !important; flex: 1 1 auto !important; justify-content: flex-start !important; gap: 14px !important; overflow: visible !important; padding-bottom: 0 !important; }
  .slider-label { flex: 0 0 auto !important; width: 100% !important; min-width: 0 !important; }
  .slider-label-content { font-size: 12px !important; margin-bottom: 4px !important; }
  .size-grid { grid-template-columns: 1fr 1fr !important; gap: 4px !important; }
  .size-btn { height: 24px !important; line-height: 24px !important; font-size: 10px !important; padding: 0 2px !important; }
  .size-pro { height: 26px !important; margin-top: 4px !important; }
  .size-pro__input { font-size: 10px !important; padding-right: 24px !important; }
  .size-pro__unit { font-size: 9px !important; right: 4px !important; }

  .menu-footer__body {
    height: auto !important; padding: 10px 14px 14px !important;
    flex-direction: column !important; align-items: stretch !important; gap: 3px !important;
  }
  .menu-footer__title { display: block !important; font-size: 15px !important; margin: 0 !important; }
  .menu-footer__subtitle { display: block !important; font-size: 11px !important; }
  .menu-footer__size { display: block !important; order: 0 !important; text-align: left !important; font-size: 10px !important; margin-top: 2px !important; }
  .menu-footer__price { order: 1 !important; justify-content: space-between !important; }
  .bill-total { border-top: var(--veak-border, 1px) solid #000 !important; padding-top: 6px !important; margin-top: 4px !important; justify-content: space-between !important; }
  .bill-total__label { display: block !important; }
  .price-value { font-size: 19px !important; }
  .menu-footer__actions { order: 2 !important; flex-direction: column !important; align-items: stretch !important; gap: 6px !important; margin-top: 6px !important; }
  .menu-footer__action_contact,
  .menu-footer__action_cart { width: 100% !important; height: 34px !important; line-height: 34px !important; font-size: 12px !important; }

  .right { flex: 1 1 auto !important; height: auto !important; min-height: 0 !important; }
  .canvas { flex: 1 1 auto !important; min-height: 0 !important; }
  .right .canvas-actions { top: 8px !important; right: 8px !important; left: auto !important; }
  .right .quote-entry { top: 46px !important; right: 8px !important; left: auto !important; }

  /* PRO depth pad dock: narrow sidebar version */
  .pro-pad-dock { padding: 8px 0 4px !important; margin-bottom: 0 !important; gap: 6px !important; }
  .pro-pad { width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; max-width: 104px !important; }
  .pro-pad__btn svg { width: 13px !important; height: 13px !important; }
  .pro-pad-dock__hint { font-size: 9px !important; line-height: 1.4 !important; }
  .pro-pad-dock__modes { display: flex !important; gap: 8px !important; }
  .pro-pad-dock__modes .size-btn { font-size: 10.5px !important; }

  /* tabs scroll in one row just above the option strip */
  .toolbar {
    position: static !important; bottom: auto !important; right: auto !important; left: auto !important;
    display: flex !important; align-items: center !important; justify-content: flex-start !important;
    width: 100% !important; height: auto !important; gap: 6px !important;
    padding: 6px 0 !important; background: #f2f2f2;
    border-top: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
    overflow-x: auto !important; overflow-y: hidden !important;
    transform: none !important;
  }
  .toolbar .toolbar-btn {
    flex: 0 0 auto !important; width: auto !important;
    height: 34px !important; line-height: 34px !important;
    padding: 0 14px !important; font-size: 12px !important;
  }

  .design-footer { flex: 0 0 92px !important; height: 92px !important; }
  .part-item { flex: 0 0 72px !important; width: 72px !important; height: 72px !important; }
  .toolbar-left { bottom: 139px !important; }
}

/* ============================================================================
   home / phone portrait: canvas-first app layout
   viewport on top, control strips under it, dimensions below,
   price + actions pinned to the bottom edge
   ========================================================================== */
@media (max-width: 600px) and (orientation: portrait) {
  .layout-main { overflow-y: auto !important; overflow-x: hidden !important; }
  .cv { flex-direction: column !important; }
  .right { order: 1 !important; height: auto !important; min-height: 0 !important; }
  .controls { order: 2 !important; padding-bottom: 78px !important; border-bottom: 0 !important; box-shadow: none !important; }

  /* --- viewport: 6 : 4 model / controls --- */
  .canvas { flex: 0 0 auto !important; height: max(300px, 56vh) !important; min-height: 0 !important; }
  .quote-entry { top: 8px !important; left: 8px !important; right: auto !important; width: 32px !important; height: 32px !important; padding: 0 !important; font-size: 11.5px !important; }
  .right .quote-entry { top: 8px !important; left: 8px !important; right: auto !important; }
  .canvas-actions { top: 8px !important; right: 8px !important; left: auto !important; }
  .right .canvas-actions { top: 8px !important; right: 8px !important; left: auto !important; }
  .canvas-actions .view-btn { width: 28px !important; height: 28px !important; }
  .canvas-actions .view-btn img { width: 17px !important; height: 17px !important; }

  /* view tools stay over the bottom edge of the viewport */
  .toolbar-left {
    top: auto !important;
    bottom: 8px !important; left: 8px !important; right: 8px !important;
    height: auto !important; gap: 0 !important;
    overflow-x: auto !important; overflow-y: hidden !important;
  }
  .view-btn { width: 32px !important; height: 32px !important; }
  .view-btn img { width: 20px !important; height: 20px !important; }
  .view-group { flex: 0 0 auto !important; }
  .view-group .view-btn { width: 32px !important; height: 32px !important; }

  /* --- category tabs --- */
  .toolbar {
    position: static !important; bottom: auto !important; right: auto !important; left: auto !important;
    display: flex !important; align-items: center !important; justify-content: flex-start !important;
    width: 100% !important; height: auto !important; gap: 6px !important;
    padding: 8px 0 !important; background: #f2f2f2;
    border-top: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
    overflow-x: auto !important; overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
  }
  .toolbar .toolbar-btn {
    flex: 0 0 auto !important; width: auto !important;
    height: 32px !important; line-height: 32px !important;
    padding: 0 14px !important; font-size: 12px !important;
  }

  /* --- option tiles --- */
  .design-footer {
    flex: 0 0 auto !important; height: auto !important; min-height: 104px !important;
    padding: 8px !important; border-top: 0 !important;
    gap: 10px !important;
  }
  .df-title { display: none !important; }
  .part-item { flex: 0 0 72px !important; width: 72px !important; height: 72px !important; font-size: 11px !important; }

  /* --- dimensions: one tap-to-open card per group --- */
  .size-content { padding: 16px 12px 10px !important; }
  .panel-header { margin-bottom: 10px !important; }
  .slider-list { flex-direction: column !important; gap: 8px !important; }
  .size-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 4px !important; }
  .size-btn { height: 30px !important; line-height: 30px !important; font-size: 11px !important; }

  .slider-label {
    width: 100% !important; min-width: 0 !important; margin: 0 !important;
    border: 1px solid #e4e4e4; background: #fff;
  }
  .slider-label-content {
    position: relative; margin: 0 !important;
    padding: 13px 34px 13px 12px !important;
    font-size: 13px !important; cursor: pointer; user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .slider-label-content::after {
    content: ""; position: absolute; right: 15px; top: 50%;
    width: 7px; height: 7px; margin-top: -5px;
    border-right: 1.5px solid #767676; border-bottom: 1.5px solid #767676;
    transform: rotate(45deg); transition: transform .22s ease, margin .22s ease;
  }
  .slider-label.is-open .slider-label-content::after { transform: rotate(225deg); margin-top: -2px; }
  .slider-value { display: block !important; font-size: 12px; font-weight: 600; color: #111; font-variant-numeric: tabular-nums; }
  .slider-label > .size-grid,
  .slider-label > .size-pro { display: none !important; }
  .slider-label.is-open > .size-grid { display: grid !important; margin: 0 10px 8px !important; }
  .slider-label.is-open > .size-pro { display: flex !important; margin: 0 10px 10px !important; }
  .slider-label.is-open { border-color: #cfcfcf; box-shadow: none; }

  /* 手机端尺寸区：不要描边、不要框中框、不要投影 */
  .controls { box-shadow: none !important; }
  .slider-label,
  .slider-label.is-open {
    border: 0 !important; background: transparent !important; box-shadow: none !important;
  }
  .size-btn {
    border: var(--veak-border, 1px) solid #000 !important; background: #fff !important; color: #000 !important;
  }
  .size-btn:hover { background: #f5f5f5 !important; }
  .size-btn.active { background: #000 !important; color: #fff !important; }
  .size-btn:disabled { background: #ededed !important; border-color: #cfcfcf !important; color: #b0b0b0 !important; }
  .size-pro { border: var(--veak-border, 1px) solid #000 !important; background: #fff !important; }
  .size-pro.active { background: #000 !important; }
  .slider-label.is-open > .size-grid { margin: 4px 0 8px !important; }
  .slider-label.is-open > .size-pro { margin: 0 0 10px !important; }

  /* --- PRO depth pad dock: buttons stacked left, pad right, 50 / 50 --- */
  .pro-pad-dock { padding: 14px 14px 16px !important; gap: 0 !important; margin-bottom: 10px; }
  .pro-pad-dock__head { margin-bottom: 12px; }
  .pro-pad-dock__row {
    display: flex !important; flex-direction: column !important;
    align-items: stretch !important; gap: 10px !important;
  }
  .pro-pad-dock__meta { width: 100% !important; }
  .pro-pad-dock__modes { display: flex !important; gap: 8px !important; }
  .pro-pad-dock__modes .size-btn {
    flex: 1 1 0; width: auto !important; font-size: 12.5px !important;
    height: 40px !important; line-height: 40px !important; white-space: nowrap !important;
  }
  .pro-pad {
    width: 100% !important; height: auto !important; aspect-ratio: 1 / 1;
    max-width: 124px !important; justify-self: center !important;
  }
  .pro-pad__btn svg { width: 18px !important; height: 18px !important; }
  .pro-pad-dock__title { font-size: 13px !important; }
  .pro-pad-dock__hint { display: none !important; }

  /* --- pinned action bar --- */
  .menu-footer {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    z-index: 90 !important; background: #fff !important;
    border-top: 1px solid #000 !important;
  }
  .menu-footer__body {
    height: auto !important;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom)) !important;
    flex-direction: row !important; align-items: center !important; gap: 10px !important;
  }
  .menu-footer__title,
  .menu-footer__subtitle,
  .menu-footer__size { display: none !important; }
  .menu-footer__price { order: 1 !important; flex: 1 1 auto !important; justify-content: flex-start !important; height: auto !important; }
  .price-value { font-size: 20px !important; }
  .bill-total { border-top: 0 !important; padding-top: 0 !important; margin: 0 !important; }
  .menu-footer__actions { order: 2 !important; flex-direction: row !important; align-items: center !important; gap: 8px !important; margin: 0 !important; padding: 0 !important; }
  .menu-footer__action_contact,
  .menu-footer__action_cart { width: 96px !important; height: 36px !important; line-height: 36px !important; font-size: 12px !important; }
}

/* ============================================================================
   shared top bar / phone + tablet: nav collapses into a dropdown at the
   top-right (hamburger). Injected by js/nav.js on every page.
   ========================================================================== */
.nav-toggle {
  display: none;
  flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; width: 40px; height: 34px; margin-left: 8px; padding: 0;
  background: transparent; border: 0; cursor: pointer;
}
.nav-toggle i {
  display: block; width: 19px; height: 2px; background: #fff;
  transition: transform .24s ease, opacity .18s ease;
}
.topbar.nav-open .nav-toggle i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.nav-open .nav-toggle i:nth-child(2) { opacity: 0; }
.topbar.nav-open .nav-toggle i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .topbar {
    position: relative !important; z-index: 80 !important;
    flex-wrap: nowrap !important;
    height: 54px !important; min-height: 54px !important; flex: 0 0 54px !important;
    padding: 0 14px !important; align-items: center !important;
  }
  .topbar-left { order: 1 !important; flex: 0 0 auto !important; }
  .topbar-right { order: 2 !important; margin-left: auto !important; flex: 0 0 auto !important; min-width: 0 !important; gap: 10px !important; }
  .topbar-right .login-btn { margin-right: 0 !important; }
  .topbar-right .lang-btn { margin-left: 0 !important; }
  .topbar-right .nav-toggle { margin-left: 0 !important; }
  .logo { height: 26px !important; }

  .topbar-nav {
    position: absolute !important;
    top: 100% !important; left: 0 !important; right: 0 !important;
    width: auto !important; height: auto !important;
    margin: 0 !important; padding: 4px 10px 8px !important;
    display: none !important; flex-direction: column !important; align-items: stretch !important;
    gap: 0 !important; overflow: visible !important;
    background: #141414 !important; border: 0 !important;
    box-shadow: none !important;
  }
  .topbar.nav-open .topbar-nav { display: flex !important; }
  .topbar-nav .nav-link {
    display: block !important; width: 100% !important;
    padding: 0 12px !important; line-height: 44px !important;
    font-size: 15px !important; text-align: left !important; white-space: nowrap !important;
  }
  .topbar-nav .nav-link.active { background: #ffffff10 !important; }
  .topbar-nav .nav-link.active::after { display: none !important; }
  .nav-toggle { display: inline-flex !important; }
}

@media (max-width: 600px) {
  .topbar { height: 50px !important; min-height: 50px !important; flex: 0 0 50px !important; padding: 0 10px !important; }
  .logo { height: 24px !important; }
  .login-btn { min-width: 92px !important; height: 30px !important; line-height: 30px !important; padding: 0 12px !important; font-size: 13px !important; margin-right: 0 !important; }
  .lang-btn { height: 30px !important; font-size: 13px !important; padding: 0 6px !important; margin-left: 0 !important; min-width: 54px !important; }
  .nav-toggle { width: 34px; height: 30px; margin-left: 4px; }
}

/* ============================================================================
   home / landscape phone: keep every overlay off the model, compact panels
   ========================================================================== */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 560px) {
  .topbar { height: 46px !important; min-height: 46px !important; flex: 0 0 46px !important; padding: 0 12px !important; }
  .logo { height: 22px !important; }
  .login-btn { height: 28px !important; line-height: 28px !important; font-size: 12px !important; min-width: 70px !important; }
  .lang-btn { height: 28px !important; font-size: 12px !important; }
  .right .canvas-actions { top: 4px !important; right: 4px !important; left: auto !important; }
  .right .quote-entry { top: 40px !important; right: 4px !important; left: auto !important; width: 30px !important; height: 30px !important; padding: 0 !important; font-size: 11px !important; }
  .quote-entry img { width: 13px !important; height: 13px !important; }

  .toolbar .toolbar-btn {
    flex: 0 0 auto !important; width: auto !important;
    height: 28px !important; line-height: 28px !important;
    padding: 0 12px !important; font-size: 10.5px !important;
  }

  /* two size groups per row so all four fit in a 390px-tall viewport */
  .controls { width: 264px !important; flex: 0 0 264px !important; }
  .size-content { padding: 6px 10px !important; }
  .panel-title { font-size: 13px !important; }
  .slider-list {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    gap: 6px 8px !important; align-items: start !important;
  }
  .slider-label { width: auto !important; min-width: 0 !important; margin: 0 !important; }
  .slider-label-content { font-size: 10px !important; margin-bottom: 3px !important; }
  .size-grid { grid-template-columns: 1fr 1fr !important; gap: 3px !important; }
  .size-btn { height: 20px !important; line-height: 20px !important; font-size: 9px !important; padding: 0 1px !important; }
  .size-pro { height: 20px !important; margin-top: 3px !important; }
  .size-pro__input { font-size: 9px !important; padding: 0 20px 0 4px !important; }
  .size-pro__unit { font-size: 8px !important; right: 3px !important; }
  .size-pro__badge { font-size: 6px !important; height: 9px !important; line-height: 9px !important; top: -5px !important; }

  /* PRO 深度微调键 spans the two size columns, compact so the panel still fits */
  .pro-pad-dock { padding: 6px 10px 8px !important; gap: 4px !important; }
  .pro-pad { width: 84px !important; height: 84px !important; padding: 5px !important; gap: 2px !important; }
  .pro-pad__btn svg { width: 11px !important; height: 11px !important; }
  .pro-pad-dock__hint { display: none !important; }
  .pro-pad-dock__modes { display: flex !important; gap: 8px !important; }
  .pro-pad-dock__modes .size-btn { font-size: 9.5px !important; height: 18px !important; line-height: 18px !important; }
  .pro-pad__tag { font-size: 7px !important; padding: 2px 4px !important; }

  /* footer: price over a single row of actions, so the size panel keeps its height */
  .menu-footer__body {
    flex-direction: column !important; align-items: stretch !important;
    gap: 3px !important; padding: 6px 10px !important;
  }
  .menu-footer__size { display: none !important; }
  .menu-footer__price { order: 1 !important; justify-content: flex-start !important; }
  .bill-total__label { display: none !important; }
  .price-value { font-size: 17px !important; }
  .menu-footer__actions {
    order: 2 !important; flex-direction: row !important; align-items: stretch !important;
    gap: 6px !important; margin: 0 !important; padding: 0 !important;
  }
  .menu-footer__action_contact,
  .menu-footer__action_cart { flex: 1 1 0 !important; width: auto !important; height: 26px !important; line-height: 26px !important; font-size: 10px !important; }
  .bill-total { border-top: 0 !important; padding-top: 0 !important; margin: 0 !important; }
}

/* ============================================================================
   home / tablet + phone: category tabs become an even, full-width segmented row
   (no chip background, orange underline marks the active tab)
   ========================================================================== */
@media (max-width: 900px) and (min-height: 521px) {
  .toolbar {
    background: transparent !important;
    border-top: 0 !important;
    border-bottom: 1px solid #ececec !important;
    padding: 0 6px !important;
    gap: 0 !important;
    overflow: hidden !important;
  }
  .toolbar .toolbar-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    height: 46px !important;
    line-height: 46px !important;
    padding: 0 2px !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid transparent !important;
    clip-path: none !important;
    color: #8b8b8b !important;
    font-size: 12px !important;
    font-weight: 500 !important;
  }
  .toolbar .toolbar-btn.active {
    color: #111 !important;
    font-weight: 700 !important;
    border-bottom-color: var(--veak-orange) !important;
  }
}

/* home / phone: floating support button sits above the pinned action bar */
@media (max-width: 600px) and (orientation: portrait) {
  .cs-fab {
    right: 14px !important;
    bottom: 18px !important;
    width: 44px !important; height: 44px !important; padding: 0 !important;
    justify-content: center !important; border-radius: 2px !important;
    clip-path: none !important;
  }
  .cs-fab span { display: none !important; }
  .cs-fab svg { width: 18px !important; height: 18px !important; }
}

/* ============================================================================
   scrollbars: hidden site-wide and taking no layout space
   ========================================================================== */
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* ---------------- 移动端「我的」：按原生 App 的信息结构重排 ---------------- */
@media (max-width: 900px) {
  .ud { padding: 0 !important; background: #f2f2f2 !important; min-height: 100% !important; overflow-y: auto !important; display: block !important; }
  .ud-app { display: block; padding: 12px 12px 28px; }
  .ud-body { display: none !important; }

  .ud-app__hero {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 16px; background: #fff; border-radius: 0;
  }
  .ud-app__ava {
    width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%;
    background: #f0ece4; display: flex; align-items: center; justify-content: center;
  }
  .ud-app__ava svg { width: 30px; height: 30px; fill: none; stroke: #1a1a1a; stroke-width: 1.4; }
  .ud-app__who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .ud-app__who b { font-size: 19px; line-height: 1.2; color: #111; }
  .ud-app__who span { font-size: 11px; color: #8d8d8d; letter-spacing: .02em; }
  .ud-app__who em {
    align-self: flex-start; margin-top: 2px; padding: 2px 7px;
    background: #f6ede8; color: #c24a16; border-radius: 20px;
    font-style: normal; font-size: 10px;
  }
  .ud-app__gear {
    flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 0;
    background: transparent; color: #999; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .ud-app__gear svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

  .ud-app__stats {
    margin-top: 10px; background: #fff; border-radius: 0;
    display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 0;
  }
  .ud-app__stats a {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 0; text-decoration: none;
  }
  .ud-app__stats b { font-size: 19px; line-height: 1; color: #111; font-variant-numeric: tabular-nums; }
  .ud-app__stats span { font-size: 10.5px; color: #8a8a8a; }

  .ud-app__menu {
    margin-top: 10px; background: #fff; border-radius: 0; overflow: hidden;
  }
  .ud-app__menu a {
    display: flex; align-items: center; gap: 12px; min-height: 52px;
    padding: 0 16px; text-decoration: none; color: #1a1a1a;
    border-bottom: 1px solid #f1f1f1; font-size: 14px;
  }
  .ud-app__menu a:last-child { border-bottom: 0; }
  .ud-app__menu a:active { background: #fafafa; }
  .ud-app__menu svg {
    width: 19px; height: 19px; flex: 0 0 19px;
    fill: none; stroke: #666; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  }
  .ud-app__menu span { flex: 1 1 auto; }
  .ud-app__menu i { font-style: normal; color: #c4c4c4; font-size: 18px; line-height: 1; }

  .ud-app__logout {
    width: 100%; height: 48px; margin-top: 12px;
    border: 0; border-radius: 0; background: #fff;
    color: #c0392b; font-size: 14px; font-weight: 500; cursor: pointer;
  }
  .ud-app__logout:active { background: #fdf3f2; }
}

/* ---------------- 用户中心子页：移动端 App 化（页签 + 卡片流） ---------------- */
@media (max-width: 900px) {
  .ud { padding: 0 !important; background: #f2f2f2 !important; height: auto !important; min-height: 100% !important; overflow-y: auto !important; display: block !important; }
  .ud-body { display: block !important; height: auto !important; max-width: 100% !important; }
  .ud .side { display: none !important; }
  .ud .main { width: 100% !important; padding: 10px 12px 24px !important; height: auto !important; overflow: visible !important; }
  .ud .main-top, .ud .main-right { display: block !important; width: 100% !important; }
  .ud .card { padding: 16px !important; border-radius: 0 !important; margin-bottom: 10px; }
  .ud .card-title { font-size: 16px !important; }

  .ud-tabs {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    padding: 12px 12px 4px; background: #f2f2f2; position: sticky; top: 0; z-index: 6;
  }
  .ud-tabs::-webkit-scrollbar { display: none; }
  .ud-tabs a {
    flex: 1 1 0; min-width: 0; height: 46px; padding: 0 6px; border-radius: 0;
    background: #fff; color: #555; font-size: 11.5px; line-height: 1.2;
    text-decoration: none; border: 1px solid #eee;
    display: flex; align-items: center; justify-content: center; text-align: center;
  }
  .ud-tabs a.is-active { background: #111; border-color: #111; color: #fff; font-weight: 600; }

  /* 表单：标签上移、控件占满 */
  .ud .form-row { flex-direction: column !important; align-items: stretch !important; gap: 6px !important; margin-bottom: 16px !important; }
  .ud .form-label { flex: none !important; text-align: left !important; margin: 0 !important; font-size: 12px !important; color: #777 !important; }
  .ud .form-input, .ud .form-select, .ud .form-textarea { width: 100% !important; }
  .ud .form-actions, .ud .profile-actions { justify-content: stretch !important; }
  .ud .form-actions > *, .ud .profile-actions > * { flex: 1 1 0; }

  /* 表格 / 列表：横向可滑，不撑破卡片 */
  .ud .scroll-x, .ud .table-wrap, .ud .cart-scroll { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }

  /* 订单状态那一排数字卡：两列 */
  .ud .goods-meta { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
  .ud .od-stats { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; flex-wrap: unset !important; }
}

/* 顶栏全站置顶，不随内容滚动 */
.topbar { position: sticky !important; top: 0 !important; z-index: 120 !important; }

/* sticky 生效所需的滚动容器：横向裁切放在 html，body 不再成为滚动容器 */
html { overflow-x: clip !important; overflow-y: auto !important; height: auto !important; }
body { overflow: visible !important; height: auto !important; }

/* 深度调节：统一两列布局（见 index 内联样式） */



/* 订单状态：移动端一行四个（购物 App 习惯），不再挤压表格 */
@media (max-width: 768px) {
  .ud .od-stats { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 4px !important; }
  .ud .od-stats .stat-wrap { transform: scale(.8); transform-origin: top center; }
  .ud .od-stats span { font-size: 10px !important; }
}

/* 视图工具条：所有尺寸保持横排 */


@media (max-width: 900px) {
  .ud--app .ud-body { display: none !important; }
}

/* 手机端底部属性栏与页面同底色，不再单独一块灰 */
@media (max-width: 600px) {
  .design-footer { background: #fff !important; border-top-color: #ececec !important; }
}

/* 手机端：Panels 属性板排在尺寸/深度之后 */
@media (max-width: 600px) and (orientation: portrait) {
  .cv > .toolbar { order: 3 !important; }
  .cv > .design-footer {
    order: 4 !important; flex: 0 0 auto !important;
    height: auto !important; min-height: 198px !important;
    margin-top: 0 !important; padding-bottom: 78px !important;
  }
  .cv > .design-footer .part-grid,
  .cv > .design-footer .color-cats { margin-bottom: 0 !important; }
  .controls { padding-bottom: 0 !important; }
}

/* 订单状态：图标与文字一起缩放，不换行 */
@media (max-width: 768px) {
  .ud .od-stats { gap: 2px !important; }
  .ud .od-stat { gap: 6px !important; min-width: 0 !important; }
  .ud .od-stat .stat-wrap { transform: scale(.76); transform-origin: top center; margin-bottom: -12px; }
  .ud .od-stat .stat-label { white-space: nowrap !important; font-size: 10px !important; letter-spacing: -.01em; }
}

/* 分类选项：3D 缩略图随按钮尺寸缩放 */
@media (max-width: 900px) { .part-item .part-ico { width: 36px !important; height: 36px !important; } }
@media (max-width: 600px) { .part-item .part-ico { width: 30px !important; height: 30px !important; } }
@media (orientation: landscape) and (max-height: 520px) { .part-item .part-ico { width: 24px !important; height: 24px !important; } }


/* Account mobile: same gray surface as desktop, white cards on top */
@media (max-width: 900px) {
  .ud { background: #f2f2f2 !important; }
  .ud-tabs { background: #f2f2f2 !important; }
}


/* account tablet: same app column as mobile, centered */
@media (min-width: 769px) and (max-width: 900px) {
  .ud-app { max-width: 720px; margin: 0 auto; padding: 18px 20px 32px; }
  .ud-tabs { max-width: 720px; margin: 0 auto; }
  .ud .main { max-width: 720px; margin: 0 auto; }
  .ud .card { margin-bottom: 12px; }
}


/* account sub-pages: clear back bar instead of a row of tabs */
.ud-backbar { display: none; }
@media (max-width: 1200px) {
  .ud-backbar {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    height: 50px; padding: 0 12px; background: #fff; border-bottom: 1px solid #ececec;
    position: sticky; top: 0; z-index: 6;
  }
  .ud-backbar__back {
    justify-self: start; display: inline-flex; align-items: center; gap: 2px;
    color: #111; text-decoration: none; font-size: 13px;
  }
  .ud-backbar__back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .ud-backbar b { grid-column: 2; font-size: 14px; font-weight: 700; color: #111; }
}
@media (min-width: 769px) and (max-width: 1200px) {
  .ud-backbar { max-width: 720px; margin: 0 auto; width: 100%; box-sizing: border-box; }
}


/* phone: depth dock second-level accordion + tighter size rows */
@media (max-width: 600px) and (orientation: portrait) {
  .slider-list { gap: 4px !important; }
  .slider-label-content { padding: 10px 34px 10px 12px !important; border-bottom: var(--veak-border, 1px) solid #e6e6e6; }
  .slider-label.is-open .slider-label-content { border-bottom: 0; }
  .cv > .design-footer { padding-bottom: 66px !important; min-height: 186px !important; }
  .pro-pad-dock { padding: 0 0 4px !important; margin-bottom: 0 !important; gap: 6px !important; }
  .pro-pad-dock__head { margin-bottom: 0 !important; padding: 10px 15px 10px 12px !important; border-bottom: var(--veak-border, 1px) solid #e6e6e6; }
  .pro-pad-dock.is-open .pro-pad-dock__head { border-bottom: 0; }
}


/* phone: viewport stays fixed while parameters scroll underneath */
@media (max-width: 600px) and (orientation: portrait) {
  .brand-bar { position: sticky !important; top: 50px !important; z-index: 121 !important; }
  .right {
    position: fixed !important; top: 56px !important; left: 0 !important; right: 0 !important;
    height: max(230px, 42vh) !important; z-index: 30 !important; background: #e8ebf0 !important;
  }
  .right .canvas { height: 100% !important; }
  .cv { padding-top: max(230px, 42vh) !important; }
}


/* phone: unify size-panel type with the Panels strip */
@media (max-width: 600px) and (orientation: portrait) {
  .panel-title { font-size: 13px !important; }
  .slider-label-content { font-size: 12px !important; }
  .slider-value { font-size: 11px !important; }
  .panel-size-summary { font-size: 9px !important; }
}


/* phone: lighter size-row type */
@media (max-width: 600px) and (orientation: portrait) {
  .slider-label-content { font-size: 11px !important; font-weight: 500 !important; }
  .slider-value { font-size: 10.5px !important; font-weight: 500 !important; }
  .pro-pad-dock__title { font-size: 11px !important; font-weight: 500 !important; }
}


/* fluid top bar: size follows the viewport width */
@media (min-width: 601px) {
  .topbar {
    height: clamp(56px, 4.8vw + 26px, 70px) !important;
    flex: 0 0 clamp(56px, 4.8vw + 26px, 70px) !important;
    padding: 0 clamp(20px, 6.5vw, 108px) !important;
  }
  .logo { height: clamp(24px, 2vw, 30px) !important; }
  .nav-link { font-size: clamp(14px, 1.1vw, 16px) !important; }
  .login-btn, .lang-btn {
    height: clamp(30px, 2.2vw + 16px, 34px) !important;
    line-height: clamp(30px, 2.2vw + 16px, 34px) !important;
    font-size: clamp(12px, .85vw, 13px) !important;
  }
  .topbar-right { gap: 10px !important; }
  .login-btn { min-width: 0 !important; padding: 0 14px !important; margin-right: 0 !important; }
  .lang-btn { margin-left: 0 !important; min-width: 52px !important; padding: 0 8px !important; }
  .nav-toggle { margin-left: 0 !important; }
}

/* phone: a touch more air under the Depth face title + reveal animation */
@media (max-width: 600px) and (orientation: portrait) {
  .pro-pad-dock__chev { display: inline-block; }
  .pro-pad-dock__head { cursor: pointer; }
  .pro-pad-dock__row { display: none !important; }
  .pro-pad-dock.is-open .pro-pad-dock__row { display: flex !important; margin-top: 4px; }
  .pro-pad-dock.is-open .pro-pad-dock__row { animation: proReveal .24s ease both; }
}
@keyframes proReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}


@media (max-width: 600px) and (orientation: portrait) {
  .login-btn { min-width: 0 !important; height: 30px !important; line-height: 30px !important; padding: 0 12px !important; font-size: 12px !important; }
  .lang-btn { min-width: 48px !important; height: 30px !important; line-height: 30px !important; font-size: 12px !important; padding: 0 6px !important; }
}


@media (max-width: 600px) and (orientation: portrait) {
  .slider-label[data-size-group="depth"] .size-pro { margin-bottom: 4px !important; }
}


/* phone: cart as stacked cards + readable qty stepper */
@media (max-width: 768px) {
  .ud .cart-table { display: block; width: 100% !important; font-size: 12px; }
  .ud .cart-table thead { display: none; }
  .ud .cart-table tbody { display: block; }
  .ud .cart-table tr {
    position: relative; display: block !important; padding: 14px 0 14px 26px !important;
    border-bottom: 1px solid #eee;
  }
  .ud .cart-table tr:last-child { border-bottom: 0; }
  .ud .cart-table td { display: block !important; border: 0 !important; padding: 0 !important; text-align: left !important; }
  .ud .cart-table td.col-check { position: absolute; left: 0; top: 20px; width: auto; }
  .ud .cart-table td.col-goods { padding-right: 84px !important; }
  .ud .cart-table .goods-pic { width: 52px !important; height: 52px !important; }
  .ud .cart-table td:nth-child(3) { margin: 6px 0 0 60px; font-size: 11px; color: #8a8a8a; }
  .ud .cart-table td:nth-child(4) { display: none !important; }
  .ud .cart-table td:nth-child(5) { margin: 8px 0 0 60px; }
  .ud .cart-table td:nth-child(6) { position: absolute; right: 0; top: 16px; font-size: 14px; font-weight: 700; }
  .ud .cart-table td:nth-child(7) { position: absolute; right: 0; bottom: 14px; }
  .ud .cart-table td:nth-child(7) a { font-size: 12px; }
  .acc-qty { height: 30px; white-space: nowrap; }
  .acc-qty button { flex: 0 0 28px; width: 28px; height: 28px; font-size: 16px; }
  .acc-qty b { flex: 0 0 28px; min-width: 28px; line-height: 28px; }
  .cart-footer { display: flex !important; flex-wrap: wrap !important; gap: 8px 10px !important; align-items: center; }
  .cart-footer .footer-right { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .cart-footer .sum-label { font-size: 11px; }
  .cart-footer .sum { font-size: 18px; }
  .cart-footer .nb-primary { height: 38px; padding: 0 14px; }
}

/* Account interactions (modal / toast / forms / qty) */
/* ============================================================================
   Account interactions (modal / toast / forms / qty)
   ========================================================================== */
.acc-modal { position: fixed; inset: 0; z-index: 1400; display: flex; align-items: center; justify-content: center; padding: 20px; }
.acc-modal__backdrop { position: absolute; inset: 0; background: rgba(10,10,10,.5); backdrop-filter: blur(2px); }
.acc-modal__box {
  position: relative; width: min(420px, 100%); max-height: min(80vh, 640px); overflow: auto;
  background: #fff; border-top: 1px solid #d04d1d; padding: 24px 22px 18px;
  box-shadow: none; animation: accIn .22s ease both;
}
@keyframes accIn { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.acc-modal__title { margin: 0 0 12px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: #111; }
.acc-modal__x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; background: none; font-size: 22px; line-height: 1; color: #777; cursor: pointer; }
.acc-modal__x:hover { color: #111; }
.acc-modal__body { font-size: 13px; line-height: 1.7; color: #333; }
.acc-modal__actions { display: flex; gap: 10px; margin-top: 18px; }
.acc-modal__actions .acc-btn { flex: 1 1 0; }
.acc-btn { height: 42px; padding: 0 16px; border: 1px solid #d8d8d8; background: #fff; color: #111; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.acc-btn:hover { border-color: #111; }
.acc-btn--primary { background: #111; border-color: #111; color: #fff; }
.acc-btn--primary:hover { background: #d04d1d; border-color: #d04d1d; }

.acc-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px);
  z-index: 1500; padding: 10px 16px; background: #111; color: #fff; font-size: 12.5px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.acc-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

.acc-p { margin: 0; color: #666; }
.acc-order p, .acc-checkout .acc-row { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 9px 0; border-bottom: 1px solid #efefef; font-size: 12.5px; }
.acc-order p:last-child, .acc-checkout .acc-row:last-child { border-bottom: 0; }
.acc-order p span, .acc-checkout .acc-row span { color: #888; flex: 0 0 auto; }
.acc-order p b, .acc-checkout .acc-row b { font-weight: 600; text-align: right; word-break: break-all; }
.acc-checkout .acc-addr { display: block; padding: 0 0 12px; margin-bottom: 4px; border-bottom: 1px solid #111; }
.acc-checkout .acc-addr b { display: block; text-align: left; font-size: 13px; }
.acc-checkout .acc-addr span { display: block; text-align: left; margin-top: 4px; color: #666; }
.acc-checkout .acc-row--total { border-top: 1px solid #111; margin-top: 6px; padding-top: 12px; }
.acc-checkout .acc-row--total b { color: #d04d1d; font-size: 17px; }

.acc-coupons { display: grid; gap: 10px; }
.acc-coupon { display: grid; grid-template-columns: 74px 1fr; gap: 4px 12px; align-items: center; border: 1px solid #d04d1d; padding: 10px 12px; }
.acc-coupon b { grid-row: 1 / span 2; font-size: 24px; color: #d04d1d; letter-spacing: -.03em; }
.acc-coupon span { font-size: 12px; color: #333; }
.acc-coupon em { font-style: normal; font-size: 10.5px; color: #999; }

.acc-form label { display: block; margin-bottom: 12px; font-size: 12px; color: #777; }
.acc-form input[type="text"], .acc-form input[type="tel"], .acc-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 11px; border: 1px solid #ddd;
  background: #fff; font: inherit; font-size: 13px; color: #111; outline: none; border-radius: 0;
}
.acc-form input:focus, .acc-form textarea:focus { border-color: #111; }
.acc-form .acc-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #333; }
.acc-form .acc-check input { width: auto; margin: 0; }

.acc-qty { display: inline-flex; align-items: center; border: 1px solid #ddd; }
.acc-qty button { width: 26px; height: 26px; padding: 0; border: 0; background: #fff; color: #111; font-size: 15px; line-height: 1; cursor: pointer; }
.acc-qty button:hover { background: #f2f2f2; }
.acc-qty b { min-width: 30px; text-align: center; font-size: 12px; font-weight: 600; }

@media (max-width: 1200px) {
  .ud-app__ava { border-radius: 0 !important; clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px); }
  .ud-app__gear { color: #999; text-decoration: none; }
  .acc-toast { bottom: 150px; }
}


@media (max-width: 600px) and (orientation: portrait) {
  .slider-label:not(.is-open) .pro-pad-dock { display: none !important; }
}


/* phone: restore the hairline under the size panel */
@media (max-width: 600px) and (orientation: portrait) {
  .controls { border-bottom: 1px solid #000 !important; }
}
