/* Shared mobile and tablet adjustments. Keep desktop presentation intact. */
.submenu-toggle {
  display: none;
}

.nav-item > a::after {
  content: '▾';
  margin-left: 4px;
}

.page-layout > *,
.detail-intro > *,
.product-grid > *,
.use-cards > *,
.contact-grid > * {
  min-width: 0;
}

@media (max-width: 1100px) {
  html {
    scroll-padding-top: 88px;
  }

  .topbar,
  .header-actions .button {
    display: none;
  }

  .header-inner {
    height: 72px;
    gap: 12px;
  }

  .header-actions {
    gap: 8px;
  }

  .language,
  .menu,
  .submenu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .language {
    padding: 10px 4px;
    font-size: 12px;
    white-space: nowrap;
  }

  .menu {
    display: block;
    padding: 8px;
  }

  .nav {
    display: none;
    position: absolute;
    inset: 72px 0 auto;
    padding: 12px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px #102b4314;
    max-height: calc(100vh - 72px);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav.open,
  .en-mode .nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav > a,
  .nav-item > a,
  .dropdown a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
  }

  .nav-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    width: 100%;
  }

  .nav-item > a::after { content: none; }

  .submenu-toggle {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: var(--bg);
    color: var(--ink);
    font-size: 20px;
  }

  .submenu-toggle[aria-expanded="true"] {
    color: var(--blue);
  }

  .dropdown,
  .nav-item:hover .dropdown,
  .nav-item:focus-within .dropdown {
    display: none;
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    padding: 4px 0 4px 12px;
    border: 0;
    border-left: 2px solid var(--line);
    box-shadow: none;
  }

  .nav-item.expanded .dropdown {
    display: block;
  }

  .nav a,
  .button,
  .product-link,
  .text-button {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 1000px) {
  .page-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-image svg {
    display: block;
    max-height: 360px;
  }
}

@media (max-width: 800px) {
  .container {
    width: calc(100% - 40px);
    max-width: 680px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 40px 0 24px;
    gap: 20px;
  }

  .hero h1,
  .en-mode .hero h1 {
    font-size: clamp(32px, 6.5vw, 48px);
    line-height: 1.25;
    margin: 22px 0;
  }

  .hero h1 .zh {
    font-size: clamp(24px, 7.7vw, 46px);
    white-space: normal;
  }

  .hero p,
  .en-mode .hero p {
    max-width: 520px;
    font-size: 15px;
    line-height: 1.85;
  }

  .hero-footnote {
    margin-top: 24px;
    font-size: 10px;
    line-height: 1.8;
  }

  .device-stage {
    width: 100%;
    max-width: 520px;
    height: auto;
    aspect-ratio: 1.25;
    margin: 0 auto;
    transform: none;
  }

  .stage-disc {
    width: 78%;
    height: auto;
    aspect-ratio: 1;
    left: 18%;
    top: 3%;
  }

  .hero-screen { width: 90%; top: 10%; right: 1%; }
  .hero-laptop { width: 77%; top: 41%; left: -1%; }
  .hero-tablet { width: 49%; top: 39%; right: 0; }
  .device-label { top: 0; right: 0; font-size: 8px; letter-spacing: 1px; }
  .device-caption { bottom: 0; right: 0; font-size: 9px; }

  .section,
  .about,
  .contact-section {
    padding: 48px 0;
  }

  .section-head {
    flex-wrap: wrap;
    align-items: start;
    gap: 20px;
  }

  .section-head h2 {
    flex-basis: 100%;
  }

  .section-head p {
    flex-basis: 100%;
    max-width: none;
  }

  .section-head .button {
    margin-top: 16px;
  }

  .section-head p,
  .product p,
  .teaser p,
  .content-copy,
  .detail-intro p,
  .use-card p,
  .value p,
  .summary-card p,
  .faq details p,
  .contact-grid p,
  .page-hero p,
  .about p,
  .feature-copy > p,
  .feature-row p,
  .step p {
    font-size: 14px;
    line-height: 1.85;
  }

  .product-note,
  .contact-hint,
  .form-note,
  .status {
    font-size: 12px !important;
    line-height: 1.8;
  }

  .button,
  .filter,
  .product-link,
  .text-button,
  .summary-card a,
  .page-bottom-links a,
  .solution-nav a,
  .faq summary {
    min-height: 44px;
    font-size: 14px;
  }

  .summary-card a,
  .page-bottom-links a {
    display: inline-flex;
    align-items: center;
  }

  .faq summary {
    padding: 8px 0;
  }

  .filters {
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
  }

  .filter {
    padding: 10px 14px;
    white-space: normal;
    text-align: center;
  }

  .values,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-panel {
    flex-direction: column;
    align-items: start;
    gap: 20px;
  }

  .cta-panel .button {
    white-space: normal;
    margin-top: 0;
  }

  .spec-table {
    table-layout: fixed;
  }

  .spec-table th,
  .spec-table td {
    padding: 14px;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .spec-table th {
    width: 32%;
  }

  label {
    font-size: 14px;
  }

  input,
  select,
  textarea {
    /* 16px avoids automatic focus zoom in mobile Safari. */
    font-size: 16px;
    min-height: 48px;
    max-width: 100%;
  }

  textarea {
    min-height: 140px;
  }

  .footer-col a {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
  }

  .footer-brand p,
  .footer-bottom {
    font-size: 12px;
  }

  .footer-bottom > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

@media (max-width: 600px) {
  .product-grid,
  .use-cards,
  .values,
  .summary-grid,
  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-row { gap: 0; }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .form-actions .button,
  .form-actions .text-button {
    width: 100%;
  }

  .page-hero h1,
  .en-mode .page-hero h1 {
    font-size: clamp(28px, 7.2vw, 36px);
    overflow-wrap: anywhere;
  }

  .breadcrumbs {
    font-size: 12px;
    gap: 8px;
    line-height: 1.6;
  }

  .hero-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-buttons .button { width: 100%; }

  .hero-bottom .container {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-bottom a,
  .hero-bottom a:not(:first-child),
  .en-mode .hero-bottom a {
    border-right: 0;
    border-bottom: 1px solid #ccdae5;
    padding: 14px 0;
    min-height: 48px;
    font-size: 13px;
  }

  .hero-bottom a:last-child { border-bottom: 0; }
  .hero-bottom small { display: inline; font-size: 10px; }

  .email-link {
    max-width: 100%;
    font-size: clamp(22px, 6.5vw, 29px);
    overflow-wrap: anywhere;
  }

  .brief,
  .cta-panel {
    padding: 20px;
  }

  .cta-panel .button { width: 100%; }
  .cta-panel h3 { line-height: 1.5; }

  .space-copy h3 { font-size: 22px; }
  .space-copy p { font-size: 13px; }
  .space { min-height: 300px; }
  .product-en { font-size: 10px; line-height: 1.7; }
  .tags span { font-size: 11px; }
}

@media (max-width: 360px) {
  .container { width: calc(100% - 32px); }
  .brand-name { font-size: 17px; }
  .brand-symbol { width: 28px; height: 28px; }
  .header-actions { gap: 0; }
  .language { font-size: 11px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
