/*
 * Stylesheet: new/shared/mobile.css
 * Maintained from the SCSS source next to this file.
 * Comments are intentionally short and in English so future edits stay readable.
 */

@media (max-width: 1199.98px) {
  html,
  body {
    overflow-x: hidden;
  }

  body.login-mobile-shell,
  body.login-mobile-shell.app-embedded,
  body.app-embedded {
    transform: none !important;
    width: 100% !important;
  }

  body.login-mobile-shell {
    min-height: 100vh;
    padding: 0 0 28px;
  }

  body.login-mobile-shell .logo {
    position: static !important;
    display: flex;
    justify-content: center;
    padding: 20px 16px 8px;
  }

  body.login-mobile-shell .logo img {
    width: min(180px, 52vw) !important;
    max-width: 100%;
  }

  body.login-mobile-shell .language-selector {
    position: fixed !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 3900 !important;
    pointer-events: auto !important;
  }

  body.login-mobile-shell .language-selector > img,
  body.login-mobile-shell .language-dropdown img {
    pointer-events: auto !important;
  }

  body.login-mobile-shell .language-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    z-index: 3950 !important;
  }

  body.login-mobile-shell .container {
    width: min(100%, 100vw) !important;
    margin: 0 auto !important;
    padding: 12px 16px 0 !important;
  }

  body.login-mobile-shell .auth-card,
  body.login-mobile-shell form,
  body.login-mobile-shell .container > form {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 16px !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  }

  body.login-mobile-shell .btn,
  body.login-mobile-shell button[type="submit"] {
    width: 100%;
    min-height: 46px;
  }

  body.login-mobile-shell .btn-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
  }

  body.app-embedded .app-header {
    padding: 12px 14px 12px 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    position: relative !important;
    z-index: 3800 !important;
  }

  body.app-embedded .app-header .logo {
    position: static !important;
    margin: 0 !important;
    order: 1;
  }

  body.app-embedded .app-header .logo img {
    width: min(120px, 32vw) !important;
    max-height: none !important;
  }

  .mobile-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    border: 0;
    border-radius: 11px;
    background: #111827;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.2);
    cursor: pointer;
  }

  .mobile-nav-toggle {
    display: none !important;
  }

  body.app-embedded .language-selector {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin-left: auto !important;
    order: 3;
    flex: 0 0 auto;
    z-index: 2;
  }

  body.app-embedded .language-selector > img {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: contain;
  }

  body.app-embedded .navigation {
    display: none !important;
  }

  body.mobile-nav-open.app-embedded .navigation {
    display: none !important;
  }

  body.app-embedded .navigation .welcome-text {
    white-space: normal !important;
    text-align: left !important;
    font-size: 18px !important;
  }

  body.app-embedded .navigation .btn {
    width: 100%;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
    text-align: center !important;
  }

  body.app-embedded #btn-logout.header-logout {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: auto;
    flex: 0 0 auto;
    min-height: 30px;
    margin-left: 8px;
    padding: 5px 11px;
    border: 1px solid rgba(185, 28, 28, 0.22);
    border-radius: 999px;
    background: #fff1f2;
    color: #b91c1c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    order: 4;
    text-decoration: none;
    white-space: nowrap;
  }

  body.app-embedded #btn-logout.header-logout:hover,
  body.app-embedded #btn-logout.header-logout:focus {
    background: #ffe4e6;
    color: #991b1b;
    text-decoration: none;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 3400;
  }

  body.mobile-sidebar-open .mobile-overlay--sidebar {
    opacity: 1;
    pointer-events: auto;
  }

  body.mobile-nav-open .mobile-overlay--nav {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.app-embedded .container-fluid {
    padding: 90px 12px 18px !important;
  }

  body.app-embedded .row {
    display: block;
    margin: 0;
  }

  body.app-embedded .filter-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 360px) !important;
    max-width: 360px;
    margin: 0 !important;
    padding: 78px 16px 18px !important;
    border-radius: 0 20px 20px 0 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    overflow-y: auto;
    transform: translateX(-108%);
    transition: transform 0.24s ease;
    z-index: 3500;
  }

  body.mobile-sidebar-open.app-embedded .filter-sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-close {
    position: absolute;
    top: 16px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 11px;
    background: #eef2f7;
    color: #111827;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .mobile-filter-toggle {
    position: fixed;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    margin: 0;
    z-index: 4050;
  }

  body.app-embedded .col {
    width: 100%;
    padding: 0;
  }

  body.app-embedded .results-area {
    padding: 12px !important;
    border-radius: 18px !important;
  }

  body.app-embedded .results-area.mobile-results {
    overflow: visible;
  }

  body.app-embedded #loader {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    transform: none !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(5px);
    z-index: 5000 !important;
    text-align: center !important;
  }

  body.app-embedded #loader[style*="display: block"],
  body.app-embedded #loader[style*="display:block"] {
    display: flex !important;
  }

  body.app-embedded #loader .spinner-border {
    width: 3rem;
    height: 3rem;
  }

  .mobile-results-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    font-size: 13px;
  }

  .mobile-results-summary .btn {
    width: 100%;
  }

  .mobile-result-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-result-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(209, 213, 219, 0.9);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
  }

  .mobile-result-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 13px 8px;
  }

  .mobile-result-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
  }

  .mobile-result-card__subtitle {
    margin-top: 3px;
    font-size: 12px;
    color: #6b7280;
    word-break: break-word;
    line-height: 1.35;
  }

  .mobile-result-card__toggle {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
  }

  .mobile-result-card.is-open .mobile-result-card__toggle span {
    transform: rotate(45deg);
    display: inline-block;
  }

  .mobile-result-card__table,
  .mobile-result-card__detail-table {
    width: calc(100% - 24px);
    margin: 0 12px 10px;
    border-collapse: collapse;
    min-width: 0 !important;
    table-layout: fixed;
  }

  .mobile-result-card__table tr,
  .mobile-result-card__detail-table tr {
    display: grid;
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
  }

  .mobile-result-card__table th,
  .mobile-result-card__table td,
  .mobile-result-card__detail-table th,
  .mobile-result-card__detail-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    text-align: left;
    font-size: 12px;
    min-width: 0 !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  .mobile-result-card__table th,
  .mobile-result-card__detail-table th {
    color: #6b7280;
    font-weight: 600;
    background: #f8fafc;
  }

  .mobile-result-card__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0 10px 8px;
  }

  .mobile-result-card__fact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 7px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    min-width: 0;
  }

  .mobile-result-card__fact-label {
    font-size: 9px;
    line-height: 1.2;
    color: #6b7280;
  }

  .mobile-result-card__fact-value {
    font-size: 10px;
    line-height: 1.25;
    color: #111827;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .mobile-result-card__details {
    display: none;
    padding: 0 6px 6px;
  }

  .mobile-result-card.is-open .mobile-result-card__details {
    display: block;
  }

  .mobile-detail-shell {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mobile-detail-media {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .mobile-detail-photo {
    width: clamp(34px, 12vw, 48px);
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .mobile-detail-photo__img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  }

  .mobile-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
  }

  .mobile-detail-actions .btn {
    width: 100%;
    min-height: 24px;
    padding: 4px 5px;
    font-size: 7px;
    line-height: 1.2;
  }

  .mobile-detail-specs {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .mobile-detail-row {
    display: grid;
    grid-template-columns: minmax(62px, 38%) minmax(0, 1fr);
    gap: 6px;
    align-items: start;
    padding: 5px 6px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(229, 231, 235, 0.95);
  }

  .mobile-detail-label {
    font-size: 8px;
    line-height: 1.2;
    color: #6b7280;
  }

  .mobile-detail-value {
    min-width: 0;
    font-size: 9px;
    line-height: 1.2;
    color: #111827;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .mobile-detail-curves {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .mobile-detail-curves__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 5px;
    align-items: start;
  }

  .mobile-detail-curve-card {
    width: 100%;
    max-width: 92px;
    justify-self: center;
    padding: 3px;
    border-radius: 7px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
  }

  .mobile-detail-curve-label {
    margin-bottom: 3px;
    font-size: 7px;
    line-height: 1.2;
    color: #6b7280;
    text-align: center;
  }

  .mobile-curve-thumb {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 5px;
    object-fit: contain;
  }

  .mobile-curve-thumb.svg-clickable {
    cursor: crosshair;
  }

  .mobile-result-card__media {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
  }

  .mobile-result-card__media img,
  .mobile-result-card__block .thumbnail-preview {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 6px;
    border-radius: 12px;
  }

  .mobile-result-card__hero {
    width: min(24vw, 72px) !important;
    max-width: 72px !important;
    margin: 0 auto 2px !important;
    display: block;
  }

  .mobile-result-card__media--detail {
    width: min(100%, 70px);
    margin-left: auto;
    margin-right: auto;
  }

  .mobile-result-card__media--detail .mobile-result-card__hero,
  body.app-embedded .mobile-result-card__media--detail .mobile-result-card__hero.img-thumbnail {
    width: 56px !important;
    max-width: 56px !important;
    min-width: 0 !important;
    height: auto !important;
    flex: 0 0 auto;
  }

  .mobile-result-card__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    width: min(100%, 148px);
    margin: 0 auto 4px;
  }

  .mobile-result-card__actions .btn {
    width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .mobile-result-card__actions--detail {
    width: min(100%, 116px);
  }

  .mobile-result-card__actions--detail .btn {
    min-height: 26px;
    padding: 4px 5px;
    font-size: 8px;
  }

  .mobile-result-card__block {
    margin-top: 6px;
    padding: 5px;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(229, 231, 235, 0.95);
    overflow: hidden;
  }

  .mobile-result-card__block h6 {
    margin: 0 0 4px;
    font-size: 10px;
    font-weight: 700;
    color: #111827;
  }

  .mobile-result-card__block .table {
    min-width: 0 !important;
    width: 100% !important;
  }

  .mobile-result-card__detail-table.table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
  }

  .mobile-result-card__detail-table th,
  .mobile-result-card__detail-table td {
    padding: 6px 7px;
    font-size: 10px;
    line-height: 1.25;
  }

  .mobile-result-card__block .thumbnail-preview {
    display: block;
  }

  .mobile-curve-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: min(100%, 156px);
    margin: 0 auto;
  }

  .mobile-curve-card {
    padding: 4px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
  }

  .mobile-curve-card .thumbnail-preview {
    display: block;
    width: min(100%, 146px) !important;
    max-width: 146px !important;
    margin: 0 auto !important;
  }

  .mobile-result-card__block--curves {
    width: min(100%, 132px);
    margin-left: auto;
    margin-right: auto;
  }

  .mobile-result-card__block--curves .mobile-curve-stack {
    width: 100%;
  }

  .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
  body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview {
    width: 96px !important;
    max-width: 96px !important;
    min-width: 0 !important;
    height: auto !important;
  }

  body.app-embedded #image-viewer {
    width: calc(100vw - 20px) !important;
    height: min(78vh, 620px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px) !important;
    border-radius: 14px !important;
  }

  body.app-embedded #image-viewer .iv-header {
    padding: 6px 8px !important;
    font-size: 12px !important;
  }

  body.app-embedded #image-viewer .iv-actions {
    gap: 4px !important;
  }

  body.app-embedded #image-viewer .iv-actions button {
    min-width: 28px;
    min-height: 28px;
    padding: 2px 5px !important;
    font-size: 14px !important;
  }

  body.app-embedded #image-viewer .iv-body {
    padding: 6px !important;
  }

  body.app-embedded #image-viewer .iv-body img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
  }

  @media (max-width: 480px) {
    .mobile-results-summary {
      padding: 10px;
      font-size: 12px;
    }

    .mobile-result-card {
      border-radius: 14px;
    }

    .mobile-result-card__head {
      padding: 12px 12px 8px;
    }

    .mobile-result-card__title {
      font-size: 15px;
    }

    .mobile-result-card__hero {
      width: min(20vw, 58px) !important;
      max-width: 58px !important;
    }

    .mobile-result-card__media--detail {
      width: min(100%, 58px);
    }

    .mobile-result-card__media--detail .mobile-result-card__hero,
    body.app-embedded .mobile-result-card__media--detail .mobile-result-card__hero.img-thumbnail {
      width: 46px !important;
      max-width: 46px !important;
    }

    .mobile-result-card__table tr,
    .mobile-result-card__detail-table tr {
      grid-template-columns: minmax(84px, 40%) minmax(0, 1fr);
    }

    .mobile-result-card__facts {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 5px;
    }

    .mobile-detail-photo {
      width: clamp(34px, 14vw, 46px);
    }

    .mobile-detail-actions .btn {
      min-height: 24px;
      padding: 4px 5px;
      font-size: 7px;
    }

    .mobile-detail-row {
      grid-template-columns: minmax(64px, 40%) minmax(0, 1fr);
      padding: 5px 6px;
      gap: 6px;
    }

    .mobile-detail-label {
      font-size: 8px;
    }

    .mobile-detail-value {
      font-size: 9px;
    }

    .mobile-detail-curves__grid {
      grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
      gap: 5px;
    }

    .mobile-detail-curve-card {
      max-width: 92px;
      padding: 3px;
    }

    .mobile-result-card__actions {
      width: min(100%, 128px);
    }

    .mobile-result-card__actions--detail {
      width: min(100%, 104px);
    }

    .mobile-curve-stack {
      width: min(100%, 140px);
    }

    .mobile-curve-card .thumbnail-preview {
      width: min(100%, 128px) !important;
      max-width: 128px !important;
    }

    .mobile-result-card__block--curves {
      width: min(100%, 112px);
    }

    .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview {
      width: 82px !important;
      max-width: 82px !important;
    }

    body.app-embedded #image-viewer {
      width: calc(100vw - 16px) !important;
      height: min(74vh, 520px) !important;
    }

    body.app-embedded .mobile-result-card__hero.img-thumbnail,
    body.app-embedded .mobile-result-card__media .mobile-result-card__hero {
      width: min(26vw, 76px) !important;
      max-width: 76px !important;
    }

    body.app-embedded .mobile-result-card__media--detail .mobile-result-card__hero,
    body.app-embedded .mobile-result-card__media--detail .mobile-result-card__hero.img-thumbnail {
      width: clamp(40px, 14vw, 46px) !important;
      max-width: clamp(40px, 14vw, 46px) !important;
    }

    body.app-embedded .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block .mobile-curve-card .thumbnail-preview {
      width: min(100%, 128px) !important;
      max-width: 128px !important;
    }

    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview.svg-clickable {
      width: clamp(76px, 30vw, 104px) !important;
      max-width: clamp(76px, 30vw, 104px) !important;
    }
  }

  @media (max-width: 390px) {
    .mobile-results-summary {
      padding: 8px;
      font-size: 11px;
    }

    .mobile-result-card__head {
      padding: 10px 10px 6px;
      gap: 8px;
    }

    .mobile-result-card__title {
      font-size: 13px;
      line-height: 1.15;
    }

    .mobile-result-card__subtitle {
      font-size: 10px;
    }

    .mobile-result-card__facts {
      margin: 0 8px 6px;
      gap: 4px;
      grid-template-columns: 1fr;
    }

    .mobile-result-card__fact {
      padding: 5px 6px;
      border-radius: 7px;
    }

    .mobile-result-card__fact-label {
      font-size: 8px;
    }

    .mobile-result-card__fact-value {
      font-size: 9px;
    }

    .mobile-result-card__details {
      padding: 0 4px 4px;
    }

    .mobile-detail-photo {
      width: 36px;
    }

    .mobile-detail-row {
      grid-template-columns: minmax(58px, 42%) minmax(0, 1fr);
      gap: 5px;
      padding: 4px 5px;
    }

    .mobile-detail-label {
      font-size: 7px;
    }

    .mobile-detail-value {
      font-size: 8px;
    }

    .mobile-detail-curves__grid {
      grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
      gap: 4px;
    }

    .mobile-detail-curve-card {
      max-width: 78px;
      padding: 3px;
      border-radius: 6px;
    }

    .mobile-detail-curve-label {
      font-size: 7px;
      margin-bottom: 3px;
    }

    .mobile-result-card__media--detail {
      width: min(100%, 48px);
    }

    .mobile-result-card__media--detail .mobile-result-card__hero,
    body.app-embedded .mobile-result-card__media--detail .mobile-result-card__hero.img-thumbnail,
    body.app-embedded .mobile-result-card__hero.img-thumbnail,
    body.app-embedded .mobile-result-card__media .mobile-result-card__hero {
      width: 40px !important;
      max-width: 40px !important;
    }

    .mobile-result-card__actions {
      width: min(100%, 116px);
    }

    .mobile-result-card__actions--detail {
      width: min(100%, 92px);
    }

    .mobile-result-card__actions .btn,
    .mobile-result-card__actions--detail .btn {
      min-height: 24px;
      padding: 3px 4px;
      font-size: 7px;
    }

    .mobile-result-card__block {
      margin-top: 5px;
      padding: 4px;
      border-radius: 7px;
    }

    .mobile-result-card__block h6 {
      font-size: 9px;
      margin-bottom: 3px;
    }

    .mobile-result-card__detail-table th,
    .mobile-result-card__detail-table td {
      padding: 5px;
      font-size: 9px;
      line-height: 1.2;
    }

    .mobile-result-card__detail-table tr {
      grid-template-columns: minmax(68px, 42%) minmax(0, 1fr);
    }

    .mobile-curve-stack {
      width: min(100%, 104px);
      gap: 4px;
    }

    .mobile-result-card__block--curves {
      width: min(100%, 96px) !important;
    }

    .mobile-curve-card {
      padding: 3px;
      border-radius: 6px;
    }

    .mobile-curve-card .thumbnail-preview,
    .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview.svg-clickable {
      width: 72px !important;
      max-width: 72px !important;
    }
  }

  @media (max-width: 340px) {
    .mobile-result-card__facts {
      grid-template-columns: 1fr;
    }

    .mobile-detail-photo {
      width: 30px;
    }

    .mobile-detail-row {
      grid-template-columns: minmax(52px, 44%) minmax(0, 1fr);
      padding: 4px;
    }

    .mobile-detail-label {
      font-size: 7px;
    }

    .mobile-detail-value {
      font-size: 8px;
    }

    .mobile-detail-curves__grid {
      grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
      gap: 4px;
    }

    .mobile-detail-curve-card {
      max-width: 68px;
      padding: 2px;
    }

    .mobile-result-card__media--detail {
      width: min(100%, 42px);
    }

    .mobile-result-card__media--detail .mobile-result-card__hero,
    body.app-embedded .mobile-result-card__media--detail .mobile-result-card__hero.img-thumbnail,
    body.app-embedded .mobile-result-card__hero.img-thumbnail,
    body.app-embedded .mobile-result-card__media .mobile-result-card__hero {
      width: 34px !important;
      max-width: 34px !important;
    }

    .mobile-result-card__actions {
      width: min(100%, 104px);
    }

    .mobile-result-card__actions--detail {
      width: min(100%, 84px);
    }

    .mobile-result-card__block--curves {
      width: min(100%, 84px) !important;
    }

    .mobile-curve-card .thumbnail-preview,
    .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview.svg-clickable {
      width: 60px !important;
      max-width: 60px !important;
    }
  }

  @media (max-width: 300px) {
    .mobile-results-summary {
      padding: 6px;
      font-size: 10px;
    }

    .mobile-results-summary .btn {
      min-height: 26px;
      padding: 4px 6px;
      font-size: 10px;
    }

    .mobile-result-card__head {
      padding: 8px 8px 5px;
      gap: 6px;
    }

    .mobile-result-card__title {
      font-size: 12px;
    }

    .mobile-result-card__subtitle {
      font-size: 9px;
    }

    .mobile-result-card__toggle {
      width: 30px;
      height: 30px;
      font-size: 18px;
    }

    .mobile-result-card__facts {
      margin: 0 6px 5px;
      gap: 3px;
    }

    .mobile-result-card__fact {
      padding: 4px 5px;
      border-radius: 6px;
    }

    .mobile-result-card__fact-label {
      font-size: 7px;
    }

    .mobile-result-card__fact-value {
      font-size: 8px;
    }

    .mobile-detail-shell {
      gap: 4px;
    }

    .mobile-detail-media {
      grid-template-columns: 1fr;
      gap: 4px;
      justify-items: center;
    }

    .mobile-detail-photo {
      width: 26px;
    }

    .mobile-detail-actions {
      width: min(100%, 76px);
    }

    .mobile-detail-actions .btn {
      min-height: 22px;
      padding: 3px;
      font-size: 6px;
    }

    .mobile-detail-row {
      grid-template-columns: minmax(46px, 44%) minmax(0, 1fr);
      gap: 4px;
      padding: 3px 4px;
      border-radius: 6px;
    }

    .mobile-detail-label {
      font-size: 6px;
    }

    .mobile-detail-value {
      font-size: 7px;
    }

    .mobile-detail-curves__grid {
      grid-template-columns: 1fr;
      gap: 3px;
    }

    .mobile-detail-curve-card {
      max-width: 58px;
      padding: 2px;
      border-radius: 5px;
    }

    .mobile-detail-curve-label {
      font-size: 6px;
      margin-bottom: 2px;
    }

    .mobile-curve-thumb,
    .mobile-curve-card .thumbnail-preview,
    .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview.svg-clickable {
      width: 48px !important;
      max-width: 48px !important;
    }

    .mobile-result-card__block,
    .mobile-detail-curves,
    .mobile-detail-specs {
      padding: 3px;
      border-radius: 6px;
    }
  }

  @media (max-width: 260px) {
    .mobile-results-summary {
      padding: 5px;
      font-size: 9px;
    }

    .mobile-result-card__head {
      padding: 7px 7px 4px;
    }

    .mobile-result-card__title {
      font-size: 11px;
    }

    .mobile-result-card__toggle {
      width: 26px;
      height: 26px;
      font-size: 16px;
    }

    .mobile-detail-photo {
      width: 22px;
    }

    .mobile-detail-actions {
      width: min(100%, 68px);
    }

    .mobile-detail-actions .btn {
      min-height: 20px;
      font-size: 5px;
    }

    .mobile-detail-row {
      grid-template-columns: minmax(40px, 46%) minmax(0, 1fr);
      padding: 3px;
    }

    .mobile-detail-label {
      font-size: 6px;
    }

    .mobile-detail-value {
      font-size: 6px;
    }

    .mobile-detail-curve-card {
      max-width: 50px;
    }

    .mobile-curve-thumb,
    .mobile-curve-card .thumbnail-preview,
    .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
    body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview.svg-clickable {
      width: 40px !important;
      max-width: 40px !important;
    }
  }

  body.app-embedded .compare-view {
    margin-top: 12px;
  }

  body.app-embedded .compare-bar {
    top: auto !important;
    bottom: 0 !important;
    left: 0;
    right: 0;
    border-radius: 18px 18px 0 0 !important;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom)) !important;
  }

  body.app-embedded .compare-bar__left,
  body.app-embedded .compare-bar__right {
    width: 100%;
  }

  body.app-embedded .compare-bar {
    flex-direction: column;
    align-items: stretch;
  }

  body.app-embedded .compare-bar__right {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  body.app-embedded .thumbnail-preview,
  body.app-embedded .img-thumbnail {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  body.app-embedded .mobile-result-card__hero.img-thumbnail,
  body.app-embedded .mobile-result-card__media .mobile-result-card__hero {
    width: min(30vw, 92px) !important;
    max-width: 92px !important;
  }

  body.app-embedded .mobile-curve-card .thumbnail-preview,
  body.app-embedded .mobile-result-card__block .mobile-curve-card .thumbnail-preview {
    width: min(100%, 146px) !important;
    max-width: 146px !important;
  }

  body.app-embedded .mobile-result-card__media--detail .mobile-result-card__hero,
  body.app-embedded .mobile-result-card__media--detail .mobile-result-card__hero.img-thumbnail {
    width: clamp(44px, 16vw, 56px) !important;
    max-width: clamp(44px, 16vw, 56px) !important;
  }

  body.app-embedded .mobile-result-card__block--curves {
    width: 100% !important;
    max-width: 220px !important;
  }

  body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview,
  body.app-embedded .mobile-result-card__block--curves .mobile-curve-card .thumbnail-preview.svg-clickable {
    width: clamp(88px, 34vw, 132px) !important;
    max-width: clamp(88px, 34vw, 132px) !important;
  }

  body.app-embedded .table {
    min-width: 640px;
  }

  body.app-embedded .mobile-result-card__detail-table.table,
  body.app-embedded .mobile-result-card__facts,
  body.app-embedded .mobile-result-card__facts * {
    min-width: 0 !important;
  }

  body.app-embedded .mobile-result-card__detail-table.table {
    width: 100% !important;
    table-layout: fixed !important;
  }

  body.app-embedded #compare-window,
  body.app-embedded .compare-window {
    inset: auto 10px 10px 10px !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px) !important;
    min-width: 0 !important;
  }

  body.dsm-mobile-shell header,
  body.log-mobile-shell header {
    align-items: flex-start !important;
    gap: 12px !important;
    flex-direction: column !important;
  }

  body.dsm-mobile-shell .header-right,
  body.log-mobile-shell .header-right {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px !important;
  }

  body.dsm-mobile-shell .header-right .button,
  body.log-mobile-shell .header-right .button,
  body.log-mobile-shell .header-right .pill {
    width: 100%;
    text-align: center;
  }

  body.dsm-mobile-shell main,
  body.log-mobile-shell main {
    padding: 14px !important;
  }

  body.dsm-mobile-shell .tab-radio-group,
  body.dsm-mobile-shell .category-radio-group,
  body.log-mobile-shell .filters,
  body.log-mobile-shell .toolbar-top {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 6px !important;
    gap: 10px !important;
    -webkit-overflow-scrolling: touch;
  }

  body.dsm-mobile-shell .card,
  body.log-mobile-shell .card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  body.dsm-mobile-shell .toolbar,
  body.log-mobile-shell .filters {
    flex-direction: column;
    align-items: stretch !important;
  }

  body.dsm-mobile-shell .toolbar form,
  body.log-mobile-shell form {
    width: 100%;
  }

  body.dsm-mobile-shell .file-list-wrap ul,
  body.log-mobile-shell table {
    min-width: 680px;
  }
}

body.app-embedded #compare-fab,
body.app-embedded .compare-fab {
  display: none !important;
}

body.app-embedded .results-area {
  overflow-x: hidden;
}

body.app-embedded #result-area.legacy-results-adaptive {
  overflow-x: hidden;
  --dy-ui-font: clamp(10px, calc(var(--dy-font-size, 11px) + 0px), 13px);
  --dy-ui-font-small: clamp(9px, calc(var(--dy-font-size, 11px) - 1px), 12px);
  --dy-ui-font-title: clamp(12px, calc(var(--dy-font-size, 11px) + 2px), 16px);
}

body.app-embedded #result-area.legacy-results-adaptive > .mb-2.font-weight-bold {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--dy-gap, 10px);
}

body.app-embedded #result-area.legacy-results-adaptive > .mb-2.font-weight-bold,
body.app-embedded #result-area.legacy-results-adaptive > .mb-2.font-weight-bold > div {
  font-size: var(--dy-ui-font-title);
  line-height: 1.25;
}

body.app-embedded #result-area.legacy-results-adaptive > .mb-2.font-weight-bold > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

body.app-embedded #result-area.legacy-results-adaptive > .mb-2.font-weight-bold .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  white-space: normal;
  min-height: 40px;
  padding: 8px 16px;
  font-size: var(--dy-ui-font);
  line-height: 1.2;
  border-radius: 16px;
  font-weight: 600;
  border-width: 1.5px;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,245,245,0.94));
}

body.app-embedded #result-area.legacy-results-adaptive #restore-sort-btn {
  width: fit-content !important;
  flex: 0 0 auto;
  margin: 0 !important;
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive thead th,
body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive tbody > tr[data-toggle="collapse"] > td {
  min-width: 0 !important;
  padding: clamp(6px, 0.9vw, 12px) clamp(6px, 1vw, 14px);
  font-size: var(--dy-ui-font);
  line-height: 1.3;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive thead th:last-child,
body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive tbody > tr[data-toggle="collapse"] > td:last-child {
  width: clamp(120px, 18vw, 170px);
  text-align: center;
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive .bi {
  font-size: calc(var(--dy-font-size, 11px) + 2px);
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive tbody > tr[data-toggle="collapse"] > td:last-child {
  position: relative;
  white-space: nowrap;
  padding-right: 44px !important;
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive tbody > tr[data-toggle="collapse"] > td:last-child .compare-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  max-width: calc(100% - 38px);
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive tbody > tr[data-toggle="collapse"] > td:last-child > .bi {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  pointer-events: none;
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive .btn-compare-toggle .btn-label {
  display: inline-block;
  line-height: 1.2;
  white-space: nowrap;
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive .btn-compare-toggle,
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-content .btn-compare-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: clamp(94px, 12vw, 122px);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: var(--dy-ui-font);
  line-height: 1.2;
}

body.app-embedded #result-area.legacy-results-adaptive .results-table--legacy-responsive tbody > tr[data-toggle="collapse"] > td:last-child .btn-compare-toggle {
  min-width: 0;
  width: fit-content;
  max-width: calc(100% - 38px);
  min-height: 36px;
  min-width: 106px;
  padding: 6px 12px;
  font-size: var(--dy-ui-font-small);
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-shell {
  display: grid;
  grid-template-columns: minmax(132px, calc(var(--dy-media-size, 88px) + 24px)) minmax(0, 1fr);
  gap: var(--dy-gap, 10px);
  align-items: start;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--dy-gap, 10px);
  min-width: 0;
  width: min(100%, calc(var(--dy-media-size, 88px) + 24px));
  max-width: calc(var(--dy-media-size, 88px) + 24px);
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-photo,
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-photo.img-thumbnail {
  display: block;
  width: min(100%, var(--dy-media-size, 88px)) !important;
  max-width: var(--dy-media-size, 88px) !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border-radius: 10px !important;
  object-fit: contain;
  align-self: center;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-media .btn,
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-media .btn.btn-block {
  width: 100% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 10px;
  font-size: var(--dy-ui-font);
  font-weight: 600;
  line-height: 1.2;
  white-space: normal;
  border-radius: 12px;
  text-wrap: balance;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-content {
  display: flex;
  flex-direction: column;
  gap: var(--dy-gap, 10px);
  min-width: 0;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-content > .mb-2 {
  margin-bottom: 0 !important;
  align-self: flex-start;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-content > .mb-2,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-content > .mb-2 {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-content > .mb-2 .btn-compare-toggle,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-content > .mb-2 .btn-compare-toggle {
  min-height: 32px;
  min-width: 0;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: clamp(10px, 2.2vw, 12px);
  line-height: 1.15;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-spec {
  margin: 0;
  min-width: 0;
  font-size: var(--dy-ui-font);
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-spec strong {
  overflow-wrap: anywhere;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-technical {
  margin-top: 0 !important;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-technical h6,
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-technical h6 a {
  font-size: var(--dy-ui-font);
  line-height: 1.25;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-technical h6 a {
  display: inline-block;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-technical .table,
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-technical .table.table-sm.table-bordered,
body.app-embedded #result-area.legacy-results-adaptive .results-table__details-cell .table.table-sm.table-bordered {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  margin-bottom: 0;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-technical th,
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-technical td,
body.app-embedded #result-area.legacy-results-adaptive .results-table__details-cell .table.table-sm.table-bordered th,
body.app-embedded #result-area.legacy-results-adaptive .results-table__details-cell .table.table-sm.table-bordered td {
  min-width: 0 !important;
  padding: 6px 7px;
  font-size: var(--dy-ui-font-small);
  line-height: 1.25;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-technical th,
body.app-embedded #result-area.legacy-results-adaptive .results-table__details-cell .table.table-sm.table-bordered th {
  width: min(42%, var(--dy-label-width, 92px));
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-curves-heading {
  margin-bottom: 0;
  font-size: var(--dy-ui-font);
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-curves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--dy-curve-size, 220px)), 1fr));
  gap: var(--dy-gap, 10px);
  min-width: 0;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-curve-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 100%;
  padding: 10px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  overflow: visible;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-curve-card.curve-card--primary {
  margin-top: 0;
  padding-top: 44px;
}

body.app-embedded #result-area.legacy-results-adaptive .curve-zoom-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-curve-thumb,
body.app-embedded #result-area.legacy-results-adaptive .legacy-curve-thumb.thumbnail-preview,
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-curves .thumbnail-preview {
  display: block;
  width: 100% !important;
  max-width: min(100%, min(var(--dy-curve-size, 320px), 360px)) !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 auto !important;
  border-radius: 8px;
  object-fit: contain;
  justify-self: start;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-curve-card.is-zoomed {
  grid-column: 1 / -1;
  max-width: min(100%, calc(var(--dy-curve-size, 320px) * 1.45));
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-curve-card.is-zoomed .legacy-curve-thumb,
body.app-embedded #result-area.legacy-results-adaptive .legacy-curve-card.is-zoomed .thumbnail-preview {
  max-width: min(100%, calc(var(--dy-curve-size, 320px) * 1.35)) !important;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-curve-card .dp-badge,
body.app-embedded .mobile-detail-curve-card .dp-badge {
  top: 10px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  width: auto !important;
  max-width: calc(100% - 56px);
  padding: 4px 8px !important;
  font-size: var(--dy-ui-font-small) !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  text-align: center;
  border-radius: 10px !important;
  z-index: 4;
}

@media (max-width: 1199.98px) {
  body.app-embedded .adaptive-curve-card .dp-badge {
    top: 10px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: auto !important;
    max-width: calc(100% - 56px);
    padding: 4px 8px !important;
    font-size: var(--dy-ui-font-small) !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    text-align: center;
    border-radius: 10px !important;
    z-index: 4;
  }
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-spec [id^="airflow-"],
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-spec [id^="pressure-"],
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-spec [id^="pressureTotal-"] {
  white-space: nowrap;
}

body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-spec .dp-adjusted,
body.app-embedded #result-area.legacy-results-adaptive .legacy-detail-spec [data-duty-adjusted="true"] {
  display: inline-block;
  margin-top: 4px;
}

@media (min-width: 1200px) {
  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-shell {
    display: grid;
    grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin: 0;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-shell > [class*="col-"] {
    width: auto;
    max-width: none;
    flex: none;
    padding-left: 0;
    padding-right: 0;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-media {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 240px;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-photo,
  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-photo.img-thumbnail {
    display: block;
    width: min(100%, 220px) !important;
    max-width: 220px !important;
    height: auto !important;
    margin: 0 auto 2px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    object-fit: contain;
    align-self: center;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-media .btn,
  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-media .btn.btn-block {
    width: 100% !important;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 12px;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-content > .mb-2 {
    margin-bottom: 0 !important;
    display: flex;
    justify-content: flex-end;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-detail-curves {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    align-items: stretch;
    gap: 14px;
    margin-top: 10px;
    width: 100%;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-curve-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: none;
    min-height: 100%;
    padding: 12px 12px 14px;
    padding-top: 44px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    overflow: visible;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-curve-card.curve-card--primary {
    padding-top: 44px;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-curve-thumb,
  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-curve-thumb.thumbnail-preview {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 240px;
    height: auto !important;
    margin: 0 auto !important;
    border-radius: 10px;
    object-fit: contain;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-curve-thumb.svg-clickable {
    cursor: crosshair;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .curve-zoom-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-curve-card.is-zoomed {
    grid-column: 1 / -1;
    max-width: min(100%, 620px);
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-curve-card.is-zoomed .legacy-curve-thumb,
  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-curve-card.is-zoomed .thumbnail-preview {
    max-width: 100% !important;
    max-height: 300px;
  }

  body.app-embedded #result-area:not(.legacy-results-adaptive) .legacy-curve-card .dp-badge {
    top: 10px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: auto !important;
    max-width: calc(100% - 56px);
    padding: 4px 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    text-align: center;
    border-radius: 10px !important;
    z-index: 4;
  }
}

@media (min-width: 1200px) {
  body.app-embedded .adaptive-curve-card {
    position: relative !important;
    overflow: visible;
  }

  body.app-embedded .adaptive-curve-card .dp-badge {
    top: 10px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: auto !important;
    max-width: calc(100% - 24px);
    padding: 4px 12px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-align: center;
    border-radius: 10px !important;
    z-index: 4;
  }
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-tight .legacy-detail-shell {
  gap: max(4px, calc(var(--dy-gap, 8px) - 2px));
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-tight .legacy-detail-media .btn,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-tight .legacy-detail-media .btn.btn-block {
  min-height: 34px;
  padding: 5px 8px;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-tight .legacy-detail-curves {
  grid-template-columns: 1fr;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-tight .legacy-curve-card {
  max-width: min(100%, calc(var(--dy-curve-size, 320px) + 28px));
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-tight .legacy-detail-spec,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-tight .legacy-detail-technical th,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-tight .legacy-detail-technical td {
  font-size: var(--dy-ui-font-small);
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack > .mb-2.font-weight-bold {
  flex-direction: column;
  align-items: stretch;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack > .mb-2.font-weight-bold .btn {
  width: auto;
  max-width: 100%;
  align-self: center;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-shell {
  grid-template-columns: 1fr;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-media {
  width: min(100%, 248px);
  max-width: 248px;
  margin: 0 auto;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-photo,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-photo.img-thumbnail {
  width: min(100%, clamp(150px, 34vw, 230px)) !important;
  max-width: clamp(150px, 34vw, 230px) !important;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-media .btn,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-media .btn.btn-block {
  min-height: 36px;
  padding: 7px 10px;
  font-size: clamp(10px, 2.3vw, 12px);
  line-height: 1.25;
  text-align: center;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-content {
  width: 100%;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-curves {
  width: 100%;
  grid-template-columns: 1fr;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-curve-card {
  width: 100%;
  max-width: none;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-curve-thumb,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-curve-thumb.thumbnail-preview,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-stack .legacy-detail-curves .thumbnail-preview {
  width: 100% !important;
  max-width: 100% !important;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-shell {
  grid-template-columns: 1fr;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  width: min(100%, 220px);
  max-width: 220px;
  margin: 0 auto;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-photo,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-photo.img-thumbnail {
  width: min(100%, clamp(144px, 42vw, 200px)) !important;
  max-width: clamp(144px, 42vw, 200px) !important;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-media .btn,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-media .btn.btn-block {
  width: 100% !important;
  min-height: 34px;
  padding: 6px 9px;
  font-size: clamp(9px, 2.6vw, 11px);
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-curves {
  width: 100%;
  grid-template-columns: 1fr;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-curve-card {
  width: 100%;
  max-width: none;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-curve-thumb,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-curve-thumb.thumbnail-preview,
body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .legacy-detail-curves .thumbnail-preview {
  width: 100% !important;
  max-width: 100% !important;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .results-table--legacy-responsive tbody > tr[data-toggle="collapse"] > td:last-child {
  padding-right: 38px !important;
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .results-table--legacy-responsive tbody > tr[data-toggle="collapse"] > td:last-child .compare-slot {
  max-width: calc(100% - 32px);
}

body.app-embedded #result-area.legacy-results-adaptive.legacy-detail-ultra .results-table--legacy-responsive tbody > tr[data-toggle="collapse"] > td:last-child .btn-compare-toggle {
  min-height: 32px;
  min-width: 88px;
  padding: 5px 10px;
  font-size: 10px;
}

@media (max-width: 1199.98px) {
  body.app-embedded #compare-fab,
  body.app-embedded .compare-fab {
    right: 14px !important;
    top: auto !important;
    bottom: 18px !important;
    max-width: calc(100vw - 28px) !important;
    height: 38px;
    padding: 0 14px;
    font-size: 12px;
    line-height: 1.2;
  }
}

body.mobile-nav-open .mobile-overlay--nav {
  background: transparent !important;
  backdrop-filter: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.mobile-nav-open #compare-fab,
body.mobile-nav-open .compare-fab,
body.mobile-sidebar-open #compare-fab,
body.mobile-sidebar-open .compare-fab {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.app-embedded .results-table--adaptive {
  width: 100%;
  table-layout: fixed;
}

body.app-embedded .results-table--adaptive th,
body.app-embedded .results-table--adaptive td {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  vertical-align: top;
}

body.app-embedded .results-table__summary-row {
  cursor: pointer;
}

body.app-embedded .results-table__details-cell {
  padding: 14px !important;
  background: rgba(255, 255, 255, 0.82);
}

body.app-embedded .adaptive-detail-shell {
  display: grid;
  grid-template-columns: minmax(0, clamp(36px, 8vw, 120px)) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

body.app-embedded .adaptive-detail-media {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

body.app-embedded .adaptive-detail-photo {
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

body.app-embedded .adaptive-detail-photo__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

body.app-embedded .adaptive-detail-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

body.app-embedded .adaptive-detail-actions .btn {
  width: 100%;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.2;
}

body.app-embedded .adaptive-detail-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  min-width: 0;
}

body.app-embedded .adaptive-detail-row {
  display: grid;
  grid-template-columns: minmax(78px, 38%) minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(248, 250, 252, 0.92);
  min-width: 0;
}

body.app-embedded .adaptive-detail-label {
  font-size: 11px;
  line-height: 1.25;
  color: #6b7280;
}

body.app-embedded .adaptive-detail-value {
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  color: #111827;
  word-break: break-word;
  overflow-wrap: anywhere;
}

body.app-embedded .adaptive-detail-curves {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 78px), 1fr));
  gap: 8px;
  min-width: 0;
}

body.app-embedded .adaptive-curve-card {
  position: relative;
  max-width: 100%;
  width: 100%;
  justify-self: center;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(248, 250, 252, 0.92);
}

body.app-embedded .adaptive-curve-card__label {
  margin-bottom: 4px;
  font-size: 10px;
  line-height: 1.2;
  color: #6b7280;
  text-align: center;
}

body.app-embedded .adaptive-curve-thumb {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

body.app-embedded .adaptive-curve-thumb.svg-clickable {
  cursor: crosshair;
}

body.app-embedded .adaptive-curve-card.curve-card--primary,
body.app-embedded .mobile-detail-curve-card.curve-card--primary {
  position: relative;
  padding-top: 34px;
}

body.app-embedded .adaptive-curve-card .curve-zoom-toggle,
body.app-embedded .mobile-detail-curve-card .curve-zoom-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.18);
}

@media (max-width: 1599.98px) {
  body.app-embedded .adaptive-detail-shell {
    grid-template-columns: minmax(0, clamp(32px, 7vw, 96px)) minmax(0, 1fr);
    gap: 10px;
  }

  body.app-embedded .adaptive-detail-actions .btn {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 10px;
  }

  body.app-embedded .adaptive-detail-specs {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px;
  }

  body.app-embedded .adaptive-detail-row {
    grid-template-columns: minmax(68px, 38%) minmax(0, 1fr);
    padding: 7px 8px;
  }

  body.app-embedded .adaptive-detail-curves {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 70px), 1fr));
    gap: 6px;
  }

  body.app-embedded .adaptive-curve-card {
    padding: 5px;
  }
}

@media (max-width: 1399.98px) {
  body.app-embedded .adaptive-detail-shell {
    grid-template-columns: 1fr;
  }

  body.app-embedded .adaptive-detail-media {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    justify-content: start;
  }

  body.app-embedded .adaptive-detail-photo {
    width: 100%;
  }

  body.app-embedded .adaptive-detail-actions {
    min-width: 0;
  }

  body.app-embedded .adaptive-detail-actions .btn {
    min-height: 24px;
    font-size: 9px;
  }

  body.app-embedded .adaptive-detail-specs {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  body.app-embedded .adaptive-detail-row {
    grid-template-columns: minmax(60px, 40%) minmax(0, 1fr);
    gap: 6px;
    padding: 6px 7px;
  }

  body.app-embedded .adaptive-detail-label {
    font-size: 9px;
  }

  body.app-embedded .adaptive-detail-value {
    font-size: 10px;
  }

  body.app-embedded .adaptive-detail-curves {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 62px), 1fr));
  }

  body.app-embedded .adaptive-curve-card {
    padding: 4px;
  }
}

@media (min-width: 1200px) {
  .mobile-nav-toggle,
  .mobile-filter-toggle,
  .mobile-sidebar-close,
  .mobile-overlay {
    display: none !important;
  }
}
