/* V2 account presentation. Original forms, status nodes and desktop DOM survive. */
body.tgy-mobile-ui-v2 .tgy-account-shell--dashboard > .woocommerce-MyAccount-navigation {
  display: none;
}

@media (max-width: 343px) {
  /* The provider's standard challenge is 300px wide. Give it real space rather
     than scaling the security control or letting it push the form off-screen. */
  body.tgy-mobile-ui-v2 .tgy-account-page:has(.tgy-account-access--standalone) {
    width: calc(100% - 8px);
  }

  body.tgy-mobile-ui-v2 .tgy-account-access--standalone .tgy-account-card {
    padding-inline: 4px;
  }
}

@media (max-width: 1023px) {
  body.tgy-mobile-ui-v2.woocommerce-account > main {
    background: var(--tgy-surface-soft);
  }

  body.tgy-mobile-ui-v2.woocommerce-account > main:has(.tgy-account-access--standalone) {
    display: flex;
    flex-direction: column;
  }

  body.tgy-mobile-ui-v2.woocommerce-account:has(.tgy-account-access--standalone) > .tgy-site-footer {
    margin-top: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-account-page {
    display: block;
    width: calc(100% - 24px);
    max-width: 720px;
    margin-inline: auto;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-account-main, .tgy-account-access, .tgy-account-recovery, .tgy-account-card) {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
  }

  body.tgy-mobile-ui-v2 .tgy-account-card {
    padding: 12px;
    box-shadow: none;
  }

  body.tgy-mobile-ui-v2 .tgy-account-band:has(.tgy-account-access--standalone) {
    /* Auto margins center short forms, but become zero when the form needs
       to scroll. Keep notices and expanded security checks in normal flow. */
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    margin-block: auto;
    padding-block: 24px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-tools {
    display: none;
  }

  body.tgy-mobile-ui-v2 .tgy-account-dashboard > .tgy-account-recent {
    display: none;
  }

  body.tgy-mobile-ui-v2 .tgy-account-shell--endpoint {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-shell > .woocommerce-MyAccount-navigation[data-tgy-mobile-account-ready] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0 0 12px;
    border: 0;
    border-bottom: 1px solid var(--tgy-border);
    border-radius: 0;
    background: transparent;
    padding: 0 0 12px;
    box-shadow: none;
  }

  body.tgy-mobile-ui-v2 .tgy-account-shell--endpoint > .woocommerce-MyAccount-navigation[data-tgy-mobile-account-ready] {
    justify-content: flex-end;
    margin-bottom: 0;
    border: 0;
    padding-bottom: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-account-shell--endpoint > .woocommerce-MyAccount-navigation[data-tgy-mobile-account-docked] {
    display: none;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-back > .tgy-mobile-account-settings {
    margin-left: auto;
    white-space: nowrap;
  }

  body.tgy-mobile-ui-v2 .tgy-account-shell--endpoint [data-tgy-mobile-account-ready] .tgy-account-nav-user {
    display: none;
  }

  body.tgy-mobile-ui-v2:has(.tgy-mobile-back) :is(.tgy-order-detail-back, .tgy-refund-page__back) {
    display: none;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-ready] .tgy-account-nav-user {
    display: flex;
    min-width: 0;
    min-height: 44px;
    gap: 12px;
    border: 0;
    background: transparent;
    padding: 0;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-ready] .tgy-account-nav-user strong {
    font-size: 16px;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-mobile-account-settings, .tgy-mobile-account-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    border: 1px solid var(--tgy-border-strong);
    border-radius: 8px;
    background: var(--tgy-canvas);
    padding: 8px 12px;
    color: var(--tgy-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
    cursor: pointer;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-menu] {
    display: grid;
    gap: 4px;
    width: 100%;
    margin: 0;
    overflow: visible;
    padding: 0;
    list-style: none;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-menu] li {
    margin: 0;
    border-bottom: 1px solid var(--tgy-border);
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-menu] a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    border-radius: 8px;
    padding: 12px;
    color: var(--tgy-ink);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-menu] a[aria-current] {
    background: var(--tgy-surface-mint);
    color: var(--tgy-green);
  }

  body.tgy-mobile-ui-v2 .tgy-account-shell:has([data-tgy-mobile-account-ready]) .tgy-account-dashboard-head {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-account-dashboard, .tgy-mobile-account-tasks) {
    display: grid;
    gap: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-section-title {
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-section-title h2 {
    font-size: 18px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-account-task-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-account-task-links a {
    display: grid;
    align-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 56px;
    box-sizing: border-box;
    border: 1px solid var(--tgy-border);
    border-radius: 8px;
    background: var(--tgy-canvas);
    padding: 6px 4px;
    color: var(--tgy-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-account-task-links strong {
    color: var(--tgy-green);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
  }

  body.tgy-mobile-ui-v2 .tgy-account-action-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border: 1px solid var(--tgy-border);
    border-radius: 8px;
    overflow: hidden;
  }

  body.tgy-mobile-ui-v2 .tgy-account-action-card {
    min-height: 56px;
    border: 0;
    border-bottom: 1px solid var(--tgy-border);
    border-radius: 0;
    padding: 8px 12px;
    box-shadow: none;
  }

  body.tgy-mobile-ui-v2 .tgy-account-action-card:last-child {
    border-bottom: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-account-action-copy > :is(span, small) {
    display: none;
  }

  body.tgy-mobile-ui-v2 .tgy-account-order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-order-row > span:nth-child(3) {
    grid-column: 2;
    text-align: end;
  }

  body.tgy-mobile-ui-v2 .tgy-account-order-row .tgy-account-order-status {
    grid-column: 1;
    grid-row: 1;
    width: fit-content;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-status-tabs {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    border: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-status-tabs a {
    justify-content: center;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
    gap: 4px;
    border: 1px solid var(--tgy-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-status-tabs a.is-active {
    border-color: var(--tgy-green);
    background: var(--tgy-surface-mint);
    color: var(--tgy-green);
  }

  body.tgy-mobile-ui-v2 .tgy-orders-status-tabs a::after {
    content: none;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-orders-search {
    border-block: 1px solid var(--tgy-border);
    padding: 0 4px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-orders-search > summary {
    min-height: 44px;
    padding: 12px 0;
    color: var(--tgy-green);
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0 16px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-card-head {
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    min-height: 36px;
    padding: 2px 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-card-reference {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    gap: 0 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-order-number {
    order: -1;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-card-reference time {
    min-height: 28px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 8px 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-card-body > * {
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-orders-stage, .tgy-orders-price) {
    align-items: start;
    text-align: start;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-stage p {
    grid-column: 1 / -1;
    margin-bottom: 0;
    font-size: 16px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 8px;
    border: 0;
    padding: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-stage > .tgy-orders-status {
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 24px;
    padding: 4px 9px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: start;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-card-actions a {
    flex: 1 1 120px;
    min-height: 44px;
    white-space: normal;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-products-summary .tgy-orders-refund-action {
    min-height: 32px;
    padding: 4px 8px;
    font-size: 11px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-price {
    display: grid;
    gap: 2px;
    border: 0;
    padding: 0;
    text-align: end;
    max-width: 140px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-product {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-product + .tgy-orders-product {
    padding-top: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-product-copy {
    gap: 2px;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-product-media {
    width: 64px;
    height: 64px;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-edit-account-form, .tgy-password-security-panel, .tgy-address-form) {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    box-shadow: none;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-profile-grid, .tgy-address-form-grid, .tgy-address-name-fields, .tgy-address-list) {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-address-locality-combobox {
    position: relative;
    max-width: 100%;
  }

  body.tgy-mobile-ui-v2 .tgy-address-locality-trigger {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
    border-radius: 8px;
    padding: 10px 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-address-locality-trigger-value {
    font-size: 16px;
    font-weight: 400;
    white-space: normal;
  }

  body.tgy-mobile-ui-v2 .tgy-address-locality-option {
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 4px 8px;
    padding: 10px 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-address-locality-option-label {
    grid-column: 1;
  }

  body.tgy-mobile-ui-v2 .tgy-address-locality-option-price {
    grid-column: 1;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-address-locality-option-selected {
    grid-column: 2;
    grid-row: 1;
  }

  body.tgy-mobile-ui-v2 .tgy-address-locality-group-label {
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-password-security-form {
    border-top: 1px solid var(--tgy-border);
    border-left: 0;
    padding: 12px 0 0;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-address-card, .tgy-address-details, .tgy-order-delivery-list) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-address-card-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-page :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
    min-width: 0;
    min-height: 44px;
    max-width: 100%;
    font-size: 16px;
    box-sizing: border-box;
  }

  body.tgy-mobile-ui-v2 .tgy-account-page :is(button, .button, .tgy-account-link, .tgy-account-back, .tgy-address-card-actions a) {
    min-height: 44px;
  }
  body.tgy-mobile-ui-v2 .tgy-account-page :is(button[type="submit"], [data-tgy-refund-request-submit], .tgy-mobile-refund-next) {
    --tgy-touch-target: 48px;
    min-height: 48px;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-account-submit-row, .tgy-profile-submit-row, .tgy-address-form-actions) .button,
  body.tgy-mobile-ui-v2 :is(.tgy-address-form-actions button, .tgy-password-security-submit) {
    width: 100%;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content > :is(.woocommerce-order-details, .woocommerce-customer-details, .tgy-order-terms, .tgy-refund-request, .tgy-order-progress, .tgy-order-updates) {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--tgy-border);
    border-radius: 8px;
    padding: 12px;
    background: var(--tgy-canvas);
    box-shadow: none;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content > .tgy-order-terms:has(> .tgy-payment-confirmed) {
    padding-block: 10px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content > .tgy-order-terms:has(> .tgy-payment-confirmed) > h2 {
    margin-bottom: 6px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content > .tgy-order-terms > .tgy-payment-confirmed > p {
    margin: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-title-row {
    --tgy-order-heading-size: 24px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-number-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-number-row > .tgy-orders-status {
    grid-row: 1;
    width: fit-content;
    text-align: start;
  }

  body.tgy-mobile-ui-v2 .tgy-order-updates .woocommerce-OrderUpdate {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail table.order_details {
    width: 100%;
    table-layout: fixed;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail table.order_details :is(th, td) {
    min-width: 0;
    padding: 12px 8px;
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail table.order_details .woocommerce-Price-amount {
    white-space: normal;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content > :is(.woocommerce-order-details, .woocommerce-customer-details) {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-entry-copy {
    grid-template-columns: minmax(0, 1fr) fit-content(45%);
    align-items: center;
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-request-entry-copy > h3 {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-request-entry-copy > .tgy-refund-request-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    text-align: end;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-request-entry-copy > p:not(.tgy-refund-request-status) {
    grid-column: 1 / -1;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail .woocommerce-table--order-details .product-name:has(> .tgy-order-product-line) {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    gap: 6px 10px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail .tgy-order-product-line {
    display: contents;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail .tgy-order-product-media {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 72px;
    height: 72px;
    box-shadow: none;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail .tgy-order-product-copy {
    display: block;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail .tgy-order-product-quantity {
    margin-top: 0;
    margin-inline-start: 4px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail .product-name > :not(.tgy-order-product-line) {
    grid-column: 2;
    min-width: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .woocommerce-table--order-details .wc-item-meta {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .woocommerce-table--order-details .wc-item-meta li {
    display: grid;
    flex: 0 1 auto;
    max-width: 100%;
    gap: 3px;
    border: 1px solid var(--tgy-border);
    border-radius: 6px;
    padding: 6px 8px;
    background: var(--tgy-canvas);
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content [data-tgy-refund-request-form] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-progress li {
    display: none;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--tgy-border);
    padding-bottom: 8px;
    color: var(--tgy-muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-progress li::before {
    content: attr(data-step);
    flex: 0 0 auto;
    font-size: 14px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-progress [aria-current] {
    display: flex;
    border-color: var(--tgy-green);
    color: var(--tgy-green);
  }

  body.tgy-mobile-ui-v2 :is(.tgy-mobile-refund-step, .tgy-mobile-refund-review, .tgy-mobile-refund-review dl) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-step > :is(h4, p, label) {
    margin: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-step > :is(label, h4),
  body.tgy-mobile-ui-v2 [data-tgy-refund-other-details] > label {
    color: var(--tgy-ink);
    font-size: 16px;
    font-weight: 750;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-step > :is(select, textarea),
  body.tgy-mobile-ui-v2 [data-tgy-refund-other-details] > textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--tgy-border-strong);
    border-radius: 8px;
    background: var(--tgy-canvas);
    padding: 12px;
    color: var(--tgy-ink);
    font: inherit;
    font-size: 16px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-step > select {
    padding-right: 32px;
    text-overflow: ellipsis;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-mobile-refund-review dd, .tgy-mobile-refund-review dl) {
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-review dt {
    margin-bottom: 4px;
    color: var(--tgy-muted);
    font-size: 14px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-review-items {
    display: grid;
    gap: 8px;
    margin: 0;
    border-block: 1px solid var(--tgy-border);
    padding: 12px 0;
    list-style: none;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-controls {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-controls > button {
    flex: 1 1 0;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-controls > [data-tgy-refund-request-submit] {
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    white-space: normal;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-controls > [data-tgy-refund-request-submit][hidden] {
    display: none;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-account-button.is-primary {
    border-color: var(--tgy-green);
    background: var(--tgy-green);
    color: var(--tgy-on-brand);
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-step > [data-tgy-refund-request-submit] {
    width: 100%;
    min-height: 48px;
    white-space: normal;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-refund-error {
    margin: 0;
    color: var(--tgy-error, #9f2525);
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-items {
    display: grid;
    gap: 8px;
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-item {
    display: grid;
    grid-template-columns: 44px 56px minmax(0, 1fr);
    gap: 4px 8px;
    min-width: 0;
    border: 1px solid var(--tgy-border);
    border-radius: 8px;
    padding: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-item > * {
    grid-column: 1 / -1;
    grid-row: auto;
    min-width: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-select-wrap {
    display: contents;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-select {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    margin: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-select-wrap > label {
    display: block;
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    min-height: 0;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-item > .tgy-refund-request-item-image {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    width: 56px;
    height: 56px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-item > .wc-item-meta {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    gap: 2px;
    margin: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-item-stats {
    margin: 2px 0;
    font-size: 12px;
    line-height: 1.35;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-quantity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 4px 8px;
    align-items: center;
    padding-top: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-request-quantity > small {
    grid-column: 1 / -1;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-content .tgy-refund-request-quantity input {
    width: 100%;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-refund-request-case, .tgy-refund-request-details) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: none;
    align-items: start;
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending > * {
    grid-area: auto;
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending > h3 {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    font-size: 16px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending > .tgy-refund-request-status {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    max-width: 40vw;
    text-align: right;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending > .tgy-refund-request-status > strong {
    min-height: 26px;
    padding: 3px 8px;
    box-sizing: border-box;
    line-height: 1.3;
    text-align: center;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending > .tgy-refund-request-details {
    gap: 6px;
    padding-top: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending > .tgy-refund-request-details > div {
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
    padding: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending > .tgy-refund-request-case {
    gap: 6px;
    padding: 8px 10px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending > h4 {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.4;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending .tgy-refund-request-product-list {
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending .tgy-refund-request-product-list > li {
    gap: 8px;
    padding: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending .tgy-refund-request-product-copy {
    gap: 4px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--pending .tgy-refund-request-scope-money {
    gap: 4px;
    margin-top: 4px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page {
    gap: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page__header .tgy-account-kicker {
    display: none;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page__header h1 {
    font-size: 24px;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page__order {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 10px 12px;
    box-shadow: none;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page__order > div {
    grid-column: auto;
    gap: 3px;
    border: 0;
    padding: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page__order > div:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page__order > div:last-child {
    grid-column: 2;
    grid-row: 1;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page__order a {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-mobile-refund-history, .tgy-mobile-return-history) {
    min-width: 0;
    border-block: 1px solid var(--tgy-border);
  }

  body.tgy-mobile-ui-v2 :is(.tgy-mobile-refund-history, .tgy-mobile-return-history) > summary {
    min-height: 44px;
    box-sizing: border-box;
    padding: 12px;
    color: var(--tgy-green);
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-mobile-account-settings, .tgy-mobile-account-button, [data-tgy-mobile-account-menu] a, .tgy-mobile-account-task-links a, .tgy-mobile-refund-step > select, .tgy-mobile-refund-step > textarea):focus-visible {
    outline: 3px solid var(--tgy-focus-ring);
    outline-offset: 3px;
  }

  /* Keep the first action and six status entries in the account's first view. */
  body.tgy-mobile-ui-v2 .tgy-account-order-row > span:first-child {
    grid-column: 1;
    grid-row: 2;
    font-size: 14px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-order-row > .tgy-account-order-total {
    grid-column: 2;
    grid-row: 1;
    text-align: end;
  }

  body.tgy-mobile-ui-v2 .tgy-account-order-row > .tgy-account-order-arrow {
    display: none;
  }

  body.tgy-mobile-ui-v2 .tgy-account-recent .tgy-account-order-row > span:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 3;
    text-align: start;
    font-size: 16px;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-account-order-list, .tgy-orders-page, .tgy-orders-list, .tgy-order-detail, .tgy-order-detail-content, .tgy-profile-section, .tgy-profile-grid, .tgy-address-book) {
    gap: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-section-title a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-account-disclosure {
    min-width: 0;
    grid-column: 1 / -1;
    border-block: 1px solid var(--tgy-border);
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-account-disclosure > summary {
    min-height: 44px;
    box-sizing: border-box;
    padding: 12px 0;
    color: var(--tgy-green);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.4;
    cursor: pointer;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-account-disclosure > summary:focus-visible {
    outline: 3px solid var(--tgy-focus-ring);
    outline-offset: 2px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-account-disclosure > summary > h2 {
    display: inline;
    margin: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
  }

  body.tgy-mobile-ui-v2 .tgy-orders-products {
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-order-tracking {
    border-top: 1px solid var(--tgy-border);
    padding-top: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-order-tracking p {
    margin: 0;
    color: var(--tgy-ink);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-order-section > section {
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0 0 12px;
    background: transparent;
    box-shadow: none;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-order-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-order-detail-actions > :is(a, .order-again) {
    flex: 1 1 120px;
    min-width: 0;
    margin: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-order-detail-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    font-size: 16px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-empty-actions-row][hidden] {
    display: none !important;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-optional-fields > :not(summary) {
    margin: 0 0 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-mobile-optional-fields .tgy-profile-section-head {
    display: none;
  }

  body.tgy-mobile-ui-v2 :is(.tgy-account-form-head, .tgy-profile-submit-row) {
    padding-block: 0 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-profile-submit-row {
    padding-block: 12px 0;
  }

  body.tgy-mobile-ui-v2 .tgy-account-card-head {
    margin-bottom: 12px;
  }

  /* The forms already name this task. Keep its heading for assistive technology,
     but reserve the small-screen space for the actual sign-in controls. */
  body.tgy-mobile-ui-v2 .tgy-account-access--standalone .tgy-account-card-head {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.tgy-mobile-ui-v2 .tgy-account-access--standalone .tgy-account-access-intro {
    display: none;
  }

  body.tgy-mobile-ui-v2 .tgy-account-access :is(.tgy-account-google--primary, .tgy-account-divider, .tgy-account-mode-tabs) {
    margin-bottom: 8px;
  }

  /* Keep Google in the thumb-reachable action area, outside both email forms.
     The unenhanced and checkout layouts retain their original presentation. */
  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-access-ready] .tgy-account-divider {
    height: auto;
    gap: 10px;
    margin: 12px 0 10px;
    background: none;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-access-ready] .tgy-account-divider-email {
    display: none;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-access-ready] .tgy-account-divider-alternative {
    display: block;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-access-ready] .tgy-account-google--primary {
    margin: 0;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-access-ready] .tgy-google-button {
    min-height: 44px;
    border-color: var(--tgy-border-strong);
    border-radius: 10px;
    background: var(--tgy-canvas);
    padding: 8px 14px;
    color: var(--tgy-ink);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.4;
    box-shadow: 0 2px 8px var(--tgy-shadow-color-soft);
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-access-ready] .tgy-account-submit-row .button {
    border: 1px solid var(--tgy-brand);
    background: var(--tgy-canvas);
    color: var(--tgy-brand);
    box-shadow: none;
  }

  body.tgy-mobile-ui-v2 [data-tgy-mobile-account-access-ready] .tgy-account-submit-row .button:hover {
    background: var(--tgy-surface-mint);
  }

  body.tgy-mobile-ui-v2 .tgy-account-access--standalone .woocommerce-form-login .tgy-account-submit-row .button {
    --tgy-touch-target: 34px;

    min-height: 34px;
    padding-block: 6px;
    line-height: 20px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-card-head :is(h1, h2) {
    font-size: 24px;
  }

  body.tgy-mobile-ui-v2 .woocommerce .tgy-account-form {
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .woocommerce .tgy-account-form .form-row {
    margin: 0;
    padding: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-account-form label {
    margin-bottom: 4px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-access .tgy-captcha-field {
    position: relative;
    gap: 0;
    margin: 0;
  }

  /* Turnstile carries its own visible instructions; do not shrink or hide it. */
  body.tgy-mobile-ui-v2 .tgy-account-access .tgy-captcha-field > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.tgy-mobile-ui-v2 .tgy-account-access .tgy-consent-row label {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.4;
  }

  body.tgy-mobile-ui-v2 .tgy-account-access--standalone .tgy-consent-row label {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
  }

  body.tgy-mobile-ui-v2 .tgy-account-access--standalone .tgy-consent-row a {
    font-size: inherit;
    font-weight: 600;
  }

  body.tgy-mobile-ui-v2 .tgy-account-access .tgy-consent-row a {
    padding-block: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-account-access .tgy-account-form-actions {
    gap: 8px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-head {
    gap: 8px;
    padding-bottom: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-title-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 35%);
    gap: 8px;
    align-items: center;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-number-row {
    display: contents;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-number-row > h1 {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
    font-size: 20px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-number-row > .tgy-orders-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    max-width: 100%;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 14px;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-total {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    flex-direction: column;
    align-items: end;
    gap: 2px;
    min-width: 0;
    margin: 0;
    text-align: end;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-total > :is(span, strong) {
    max-width: 100%;
  }

  body.tgy-mobile-ui-v2 .tgy-order-detail-total bdi {
    display: inline-flex;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  body.tgy-mobile-ui-v2 .tgy-order-created-at {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    flex-direction: column;
    align-items: start;
    min-width: 0;
    margin: 0;
    gap: 2px;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  body.tgy-mobile-ui-v2 .tgy-order-created-at small {
    border-left: 0;
    padding-left: 0;
  }

  /* The route header supplies these titles visually; original headings and
     refund step legends remain available to assistive technology and focus. */
  body.tgy-mobile-ui-v2:has(.tgy-mobile-back) :is(.tgy-orders-head h1, .tgy-account-form-head h1, .tgy-address-book-head h1, .tgy-refund-page__header h1),
  body.tgy-mobile-ui-v2 :is(.tgy-order-detail-title-copy > .tgy-account-kicker, .tgy-account-recovery .tgy-account-kicker, .tgy-refund-page .tgy-refund-request--form > h3, .tgy-mobile-refund-step > h4, .tgy-refund-page .tgy-refund-request-items > legend),
  body.tgy-mobile-ui-v2 .tgy-order-detail-content > :is(.woocommerce-order-details, .woocommerce-customer-details) > h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.tgy-mobile-ui-v2:has(.tgy-mobile-back) .tgy-account-form-head {
    border: 0;
    padding: 0;
  }

  body.tgy-mobile-ui-v2 .tgy-refund-page .tgy-refund-request--form {
    gap: 12px;
    border: 0;
    padding: 0;
    background: transparent;
  }

  /* Keep form and help copy readable; compact order cards have their own scale. */
  body.tgy-mobile-ui-v2 .tgy-account-page :is(.tgy-account-empty-orders-copy p, .tgy-orders-empty-copy p, .tgy-account-card-head p, .tgy-refund-request-help, .tgy-refund-request-review, .tgy-mobile-refund-review dd) {
    font-size: 16px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-page :is(small, dt, .tgy-field-note, .tgy-account-kicker, .tgy-account-order-status, .tgy-orders-card-reference time, .tgy-orders-order-number, .tgy-orders-product-copy, .tgy-orders-product-name span, .tgy-orders-refund-badge, .tgy-orders-price > span, .tgy-orders-status, .tgy-orders-detail-link, .tgy-profile-field label, .tgy-profile-section-head > span, .tgy-profile-privacy-note, .tgy-order-created-at small, .tgy-orders-filter label span, .tgy-orders-filter-date-range legend) {
    font-size: 14px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-page .tgy-orders-product-name {
    font-size: 14px;
    line-height: 1.35;
  }

  body.tgy-mobile-ui-v2 .tgy-account-page .tgy-orders-page :is(.tgy-orders-card-reference time, .tgy-orders-order-number, .tgy-orders-product-copy, .tgy-orders-product-name span, .tgy-orders-product-count) {
    font-size: 13px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-page .tgy-orders-page :is(.tgy-orders-price > span, .tgy-orders-status) {
    font-size: 12px;
  }

  body.tgy-mobile-ui-v2 .tgy-account-page .tgy-orders-price strong {
    font-size: 15px;
  }

  body.tgy-mobile-ui-v2 :is([data-tgy-mobile-account-menu], [data-tgy-mobile-account-settings], [data-tgy-mobile-account-tasks], [data-tgy-mobile-account-actions], .tgy-account-order-row, .tgy-account-recent, .tgy-mobile-refund-step, .tgy-refund-request-items, .tgy-mobile-account-button, .tgy-mobile-refund-error)[hidden] {
    display: none !important;
  }
}
