/* Shared touch layout; desktop keeps its existing composition. */
@media (max-width: 700px) {
  html {
    scroll-padding-top: calc(var(--header-height, 120px) + 16px);
  }
  body {
    -webkit-text-size-adjust: 100%;
  }
  button, a, label, summary {
    touch-action: manipulation;
  }
  button, .btn, .product-link, .detail-back, .google-login,
  .import-button, .breadcrumb-trail a, summary {
    min-height: 44px;
  }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea, select {
    font-size: 16px !important;
    min-height: 48px;
    max-width: 100%;
  }
  textarea {
    min-height: 112px;
  }
  input[type="file"] {
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .container {
    padding-inline: 16px;
  }
  .header .nav {
    gap: 8px;
    padding-block: 10px;
  }
  .header .brand {
    min-width: 0;
    min-height: 44px;
    font-size: clamp(14px, 4vw, 22px);
    gap: 6px;
  }
  .header .brand-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .header .actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .header .actions .icon-btn,
  .header .actions .auth-account-link {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    position: relative;
  }
  .header .actions .auth-account-link {
    width: auto;
    max-width: 88px;
    font-size: 12px;
    padding: 9px 8px;
    line-height: 22px;
  }
  .header #cart-count {
    position: absolute;
    top: -7px;
    right: -6px;
    margin: 0;
  }
  .header .actions .auth-account-link[data-signed-in="true"] {
    display: block;
    width: auto;
    max-width: 72px;
    padding: 9px 6px;
    font-size: 12px;
    line-height: 22px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header .actions .auth-account-link:not([data-signed-in="true"])::before {
    left: calc(50% - 5px);
    top: 8px;
  }
  .header .actions .auth-account-link:not([data-signed-in="true"])::after {
    left: calc(50% - 9px);
    bottom: 8px;
  }
  .header .links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 5px;
    order: 3;
  }
  .header .links a,
  .header .links a[aria-current="page"] {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    padding: 7px 3px;
    font-size: 12px;
  }
  .hero {
    gap: 22px;
    padding-block: 28px;
  }
  .hero-copy h1 {
    font-size: clamp(30px, 8.7vw, 48px);
    line-height: 1.3;
    letter-spacing: -1.3px;
  }
  .hero-copy .intro {
    font-size: 15px;
    line-height: 1.75;
  }
  .hero-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .hero-copy .hero-buttons .btn {
    min-width: 0;
    min-height: 48px;
    font-size: 12px;
    padding: 12px 10px;
    gap: 8px;
    justify-content: space-between;
  }
  .hero-art {
    margin-top: 0;
    aspect-ratio: 1.55;
  }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding: 4px 5px 10px;
    gap: 8px;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
  }
  .filters button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 13px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .card-body {
    padding: 12px 10px;
    gap: 10px;
  }
  .card h3 {
    font-size: 16px;
    line-height: 1.45;
  }
  .card p {
    font-size: 13px;
    line-height: 1.6;
    min-height: 0;
  }
  .card .product-link {
    font-size: 12px;
    padding: 10px 8px;
  }
  .pagination button, .qty button, .close {
    min-width: 44px;
    min-height: 44px;
  }
  dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 32px);
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    overflow-y: auto;
  }
  .qty {
    flex-wrap: wrap;
    gap: 10px;
  }
  .detail-panel, .commerce-panel, .order-card, .admin-panel, .auth-panel {
    padding: 18px 16px;
  }
  .detail-page .breadcrumb-trail a,
  .breadcrumb-trail [aria-current="page"] {
    min-height: 44px;
    font-size: 11px;
  }
  .plan-option {
    min-height: 64px;
    padding: 14px;
    line-height: 1.6;
  }
  .commerce-nav, .account-nav {
    gap: 6px 12px;
  }
  .commerce-nav a, .account-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 13px;
  }
  .order-filters, .form-pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-actions > *, .order-actions > * {
    flex: 1 1 130px;
    min-width: 0;
    white-space: normal;
  }
  .ui-admin-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 8px 0 14px;
    overflow: visible;
    padding: 4px 4px 8px 0;
  }
  .ui-admin-nav a {
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    line-height: 1.5;
    font-size: 11px;
    padding: 7px 5px;
    justify-content: center;
  }
  .admin-products {
    max-height: 264px;
    overscroll-behavior: contain;
  }
  .admin-products button {
    min-height: 48px;
    line-height: 1.5;
  }
  .shop-footer a, .ui-utility-footer nav a {
    min-height: 44px;
    align-content: center;
  }
  .sound-preference {
    min-height: 44px;
  }
}
@media (max-width: 480px) {
  .header .actions .auth-account-link:not([data-signed-in="true"]) {
    width: 44px;
    padding: 0;
    font-size: 0;
  }
}
@media (max-width: 360px) {
  .container {
    padding-inline: 12px;
  }
  .header .nav, .header .actions {
    gap: 4px;
  }
  .header .brand {
    font-size: 13px;
    gap: 5px;
  }
  .header .brand-avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
  .header .actions .auth-account-link[data-signed-in="true"] {
    max-width: 48px;
  }
  .header .links a, .header .links a[aria-current="page"] {
    font-size: 11px;
  }
  .grid {
    gap: 12px;
  }
  .product-art {
    height: 118px;
  }
  .card-body {
    padding: 12px 8px;
  }
}
@media (hover: none) and (pointer: coarse) {
  .card:hover, .card.ui-tilt {
    transform: none;
  }
}
