/* Mobile account presentation. The existing desktop page and form layout remain in use. */
.account-mobile-refinement :is(.account-mobile-masthead, .account-mobile-only) {
  display: none;
}
.collector-login .account-password-row {
  display: contents;
}
.collector-form:has(#collector-title) .account-password-row > label {
  grid-column: 1 / -1;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) and (max-width: 950px) and (max-height: 500px) {
  body.csm-account-page.account-mobile-refinement,
  body.csm-account-page.account-mobile-refinement.collector-login:has(#collector-title) {
    --account-paper: #fbfaf7;
    --account-surface: #fff;
    --account-tint: #f2efe8;
    --account-ink: #252a27;
    --account-muted: #565d56;
    --account-line: #ddd9cf;
    --account-field: #9e9a90;
    --account-clay: #933c29;
    --account-clay-hover: #752e21;
    min-height: 100vh;
    padding-top: 0 !important;
    background: var(--account-paper);
    color: var(--account-ink);
    color-scheme: light;
  }
  .account-mobile-refinement .account-mobile-only { display: inline; }
  .account-mobile-refinement .account-desktop-label,
  .account-mobile-refinement .csm-floating-header,
  .account-mobile-refinement #shop-backdrop,
  .account-mobile-refinement:has(.account-mobile-masthead) .account-top {
    display: none !important;
  }
  .account-mobile-refinement :is(.account-mobile-masthead, .account-top) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: min(calc(100% - 32px), 520px);
    min-height: 58px;
    margin: 0 auto;
    padding: 4px 0;
    border-bottom: 1px solid var(--account-line);
    background: var(--account-paper);
  }
  .account-mobile-refinement :is(.account-mobile-masthead, .account-top) a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--account-clay);
    font-size: .875rem;
    font-weight: 650;
    text-decoration: none;
  }
  .account-mobile-refinement :is(.account-mobile-masthead, .account-top) .account-brand {
    gap: 8px;
    color: var(--account-ink);
    font-family: var(--studio-font, system-ui, sans-serif);
    font-size: .86rem;
    line-height: 1.15;
  }
  .account-mobile-refinement :is(.account-mobile-masthead, .account-top) .account-brand img {
    display: block;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 7px;
    object-fit: contain;
  }
  .account-mobile-refinement .account-brand span { max-width: 8rem; }
  .account-mobile-refinement .account-mobile-masthead .account-mobile-settings {
    justify-content: center;
    width: 44px;
    color: var(--account-ink);
  }
  .account-mobile-refinement .account-skip {
    z-index: 4;
    background: var(--account-surface);
    color: var(--account-clay);
  }
  body.account-mobile-refinement .account-main,
  body.account-mobile-refinement.collector-login:has(#collector-title) .account-main {
    width: min(100%, 552px);
    max-width: none;
    margin: 0 auto;
    padding: 16px 16px 28px;
  }
  .account-mobile-refinement .account-main :is(h1, h2, h3) { color: var(--account-ink); }
  .account-mobile-refinement .account-main h1 {
    margin: 0 0 7px;
    font-size: clamp(1.75rem, 8vw, 2.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.045em;
  }
  .account-mobile-refinement .account-main h2 {
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -.025em;
  }
  .account-mobile-refinement .account-main :is(p, small) { color: var(--account-muted); }
  .account-mobile-refinement .account-main p { margin-block: 0 12px; }
  .account-mobile-refinement .account-main a { color: var(--account-clay); }
  .account-mobile-refinement .account-main label {
    gap: 4px;
    color: var(--account-ink);
    font-size: .875rem;
    font-weight: 650;
  }
  html body.account-mobile-refinement .account-main :is(input:not([type=hidden]):not([type=checkbox]), select) {
    min-height: 48px !important;
    border: 1px solid var(--account-field);
    border-radius: 9px;
    background: var(--account-surface);
    color: var(--account-ink);
    font-size: 16px !important;
  }
  html body.account-mobile-refinement :is(input, select, textarea, summary, button, a):focus-visible {
    outline: 2px solid var(--account-clay) !important;
    outline-offset: 2px !important;
  }
  .account-mobile-refinement .account-main :is(button[type=submit], a.account-button) {
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 9px;
    background: var(--account-clay);
    color: var(--account-surface);
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.36;
  }
  .account-mobile-refinement .account-main button[type=submit]:hover { background: var(--account-clay-hover); }
  .account-mobile-refinement .account-main .account-message {
    padding: 9px 11px;
    border-left: 3px solid #3d775b;
    border-radius: 5px;
    background: #e8f1e9;
    color: #244435;
  }
  .account-mobile-refinement .account-main .account-error {
    border-color: #a24435;
    background: #faeae5;
    color: #762b22;
  }

  body.account-mobile-refinement.collector-login .collector-shell,
  body.account-mobile-refinement.collector-login .collector-shell:has(#collector-title) {
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: none;
  }
  body.account-mobile-refinement .collector-shell .collector-art,
  body.account-mobile-refinement .collector-shell:has(#collector-title) .collector-art {
    display: block;
    min-height: 0;
    height: clamp(92px, 27vw, 112px);
    margin-bottom: 17px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--account-tint);
  }
  .account-mobile-refinement .collector-art strong,
  .account-mobile-refinement .collector-art::after { display: none; }
  body.account-mobile-refinement .collector-art img { object-position: 50% 44%; }
  body.account-mobile-refinement .collector-shell .collector-form,
  body.account-mobile-refinement .collector-shell:has(#collector-title) .collector-form {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  body.account-mobile-refinement .collector-form #collector-title {
    color: var(--account-ink);
    font: 700 clamp(1.75rem, 8vw, 2.2rem)/1.1 var(--studio-font, system-ui, sans-serif);
    letter-spacing: -.045em;
  }
  body.account-mobile-refinement .collector-form .bench-intro,
  body.account-mobile-refinement .collector-form:has(#collector-title) .bench-intro {
    margin: 0 0 14px;
    color: var(--account-muted);
    font-size: .94rem;
  }
  .account-mobile-refinement .collector-form .bench-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: var(--account-tint);
  }
  body.account-mobile-refinement .collector-form form,
  body.account-mobile-refinement .collector-form:has(#collector-title) form {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  body.account-mobile-refinement .collector-form:has(#collector-title) form > * { grid-column: 1; }
  body.account-mobile-refinement .collector-form label { margin: 0; }
  body.account-mobile-refinement .collector-form label input { margin: 0; }
  .account-mobile-refinement .collector-form .account-password-row {
    display: block;
    position: relative;
  }
  html body.account-mobile-refinement .account-password-row:has(.bench-password) input:not([type=hidden]) {
    padding-inline-end: 49px !important;
  }
  body.account-mobile-refinement .collector-form .account-password-row .bench-password {
    position: absolute;
    inset: auto 2px 2px auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    box-shadow: none;
    border-radius: 7px;
    background: transparent;
    color: var(--account-muted);
  }
  .account-mobile-refinement .bench-password::before {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 17px;
    height: 11px;
    border: 1.4px solid currentColor;
    border-radius: 65%;
  }
  .account-mobile-refinement .bench-password::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: 4px;
    height: 4px;
    transform: translate(-50%, -50%);
    border: 1px solid currentColor;
    border-radius: 50%;
  }
  .account-mobile-refinement .bench-password.is-revealed::after {
    width: 18px;
    height: 0;
    border: 0;
    border-top: 1.5px solid currentColor;
    border-radius: 0;
    transform: translate(-50%, -50%) rotate(-39deg);
  }
  .account-mobile-refinement .bench-password-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  body.account-mobile-refinement .collector-form .collector-reset,
  body.account-mobile-refinement .collector-form:has(#collector-title) .collector-reset {
    grid-column: 1;
    justify-self: end;
    min-height: 44px;
    margin: -6px 0 -4px;
    color: var(--account-clay);
    font-size: .86rem;
    font-weight: 650;
  }
  body.account-mobile-refinement .collector-form button[type=submit],
  body.account-mobile-refinement .collector-form:has(#collector-title) button[type=submit] {
    width: 100%;
    min-height: 44px;
    background: var(--account-clay);
    color: var(--account-surface);
    font-size: .9rem;
  }
  body.account-mobile-refinement .collector-form .collector-links,
  body.account-mobile-refinement .collector-form:has(#collector-title) .collector-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0 14px;
    margin-top: 15px;
    padding-top: 5px;
    border-color: var(--account-line);
  }
  body.account-mobile-refinement .collector-form .collector-links a,
  body.account-mobile-refinement .collector-form:has(#collector-title) .collector-links a,
  body.account-mobile-refinement .collector-form > p:not(.account-message) a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--account-clay);
    font-size: .86rem;
    font-weight: 650;
    text-underline-offset: .22em;
  }
  .account-mobile-refinement .collector-links span {
    flex-basis: 100%;
    color: var(--account-muted);
    font-size: .85rem;
  }
  .account-mobile-refinement .collector-form form .account-small {
    margin-block: 0;
    color: var(--account-muted);
    font-size: .85rem;
  }

  .account-mobile-refinement .account-main :is(.account-card, .account-feature, .bear-panel) {
    padding: 13px 14px;
    border: 1px solid var(--account-line);
    border-radius: 11px;
    background: var(--account-surface);
  }
  .account-mobile-refinement .account-narrow { margin: 0; }
  .account-mobile-refinement .account-narrow form { margin-bottom: 14px; }
  .account-mobile-refinement .account-narrow h2 { margin-top: 16px; }
  .account-mobile-refinement .account-narrow :is(a, summary) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .account-mobile-refinement .account-narrow canvas {
    display: block;
    width: min(100%, 220px);
    height: auto;
    margin: 12px 0;
    background: white;
  }

  .account-mobile-refinement .bear-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    margin: 0 0 6px;
  }
  .account-mobile-refinement .bear-identity {
    grid-column: 1 / -1;
    flex-direction: row-reverse;
    justify-content: space-between;
    gap: 10px;
  }
  .account-mobile-refinement .bear-portrait { width: 48px; height: 48px; }
  .account-mobile-refinement .bear-identity h1 { margin: 0 0 5px; }
  .account-mobile-refinement .bear-identity p {
    margin: 0;
    font: inherit;
    font-size: .92rem;
  }
  .account-mobile-refinement .bear-identity strong { color: var(--account-muted); font-size: .82rem; }
  .account-mobile-refinement .bear-levels > summary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0;
    color: var(--account-clay);
  }
  .account-mobile-refinement .bear-levels > summary::after {
    content: "⌄";
    margin-inline-start: 5px;
  }
  .account-mobile-refinement .bear-levels[open] > summary::after { content: "⌃"; }
  .account-mobile-refinement .bear-panel ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-mobile-refinement .bear-panel li { overflow-wrap: anywhere; }
  .account-mobile-refinement .bear-levels { grid-column: 1; grid-row: 2; }
  .account-mobile-refinement .bear-levels[open] { grid-column: 1 / -1; grid-row: 3; }
  .account-mobile-refinement .bear-actions { grid-column: 2; grid-row: 2; justify-self: end; }
  .account-mobile-refinement .bear-actions:has(.bh-spin-account) { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
  .account-mobile-refinement .bear-actions > a { display: none; }
  .account-mobile-refinement .bear-actions form button[type=submit] {
    min-height: 44px;
    padding-inline: 0;
    border: 0;
    background: transparent;
    color: var(--account-clay);
    text-decoration: underline;
  }
  .account-mobile-refinement .bear-actions form button[type=submit]:hover {
    background: transparent;
    color: var(--account-clay-hover);
  }
  .account-mobile-refinement .bench-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 13px;
    margin: 0 0 14px;
    border-block: 1px solid var(--account-line);
  }
  .account-mobile-refinement .bench-quick-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 1px;
    font-size: .875rem;
    font-weight: 650;
    text-decoration: none;
  }
  .account-mobile-refinement .account-main :is(#watchlist, #pickups, #alerts, #account-settings) {
    scroll-margin-top: 14px;
  }
  .account-mobile-refinement .account-feature {
    grid-template-columns: minmax(0, 92px) minmax(0, 1fr);
    gap: 11px;
    margin-bottom: 14px;
  }
  .account-mobile-refinement .account-feature.text-only { grid-template-columns: minmax(0, 1fr); }
  .account-mobile-refinement .account-feature picture {
    align-self: start;
    height: auto;
    aspect-ratio: 1;
    background: var(--account-tint);
  }
  .account-mobile-refinement .account-feature h2 { margin-block: 6px 7px; }
  .account-mobile-refinement .update-label {
    padding: 2px 6px;
    background: var(--account-tint);
    color: var(--account-muted);
    font-size: .8rem;
  }
  .account-mobile-refinement .watch-shelf {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
  }
  .account-mobile-refinement .watch-shelf h2 { margin: 0 0 6px; }
  .account-mobile-refinement .watch-shelf > ul {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
  }
  .account-mobile-refinement .watch-shelf li[data-stock] {
    padding: 10px 0;
    border-bottom: 1px solid var(--account-line);
  }
  .account-mobile-refinement .shelf-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
    align-items: center;
  }
  .account-mobile-refinement .shelf-product:has(.shelf-photo) {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .account-mobile-refinement .shelf-photo {
    width: 48px;
    height: 48px;
    aspect-ratio: 1;
    background: var(--account-tint);
  }
  .account-mobile-refinement .shelf-product > div {
    min-width: 0;
    padding: 0;
    overflow-wrap: anywhere;
  }
  .account-mobile-refinement .shelf-product a:not(.shelf-photo) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--account-ink);
    font: 650 .93rem/1.3 var(--studio-font, system-ui, sans-serif);
  }
  .account-mobile-refinement .watch-shelf li summary {
    min-height: 44px;
    align-content: center;
    margin: 0;
    color: var(--account-clay);
  }
  .account-mobile-refinement .watch-shelf li details form {
    margin: 5px 0;
  }
  .account-mobile-refinement .bench-filters {
    justify-content: space-between;
    gap: 0 10px;
    margin: 0 0 4px;
  }
  .account-mobile-refinement .bench-filters label { min-height: 44px; }
  html body.account-mobile-refinement .bench-filters select { width: auto; min-height: 44px !important; }
  .account-mobile-refinement :is(.account-card, .service-grid) > :last-child { margin-bottom: 0; }
  .account-mobile-refinement .service-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 12px;
  }
  .account-mobile-refinement .service-grid .account-card { margin: 0; }
  .account-mobile-refinement #alerts .account-items li { border-color: var(--account-line); }
  .account-mobile-refinement .account-main form:has(input[name="action"]:is([value="unsave"], [value="unfollow"])) button[type=submit] {
    border: 1px solid var(--account-line);
    background: var(--account-surface);
    color: var(--account-clay);
  }
  .account-mobile-refinement .account-main form:has(input[name="action"]:is([value="unsave"], [value="unfollow"])) button[type=submit]:hover {
    background: var(--account-tint);
  }
  .account-mobile-refinement :is(.watch-shelf, #alerts, #pickups, #account-settings, .account-actions) a:not(.shelf-photo) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  @media (max-height: 500px) {
    body.account-mobile-refinement .collector-shell .collector-art,
    body.account-mobile-refinement .collector-shell:has(#collector-title) .collector-art {
      height: 67px;
      margin-bottom: 11px;
    }
  }
}

@media (forced-colors: active) {
  .account-mobile-refinement .bench-password::after {
    forced-color-adjust: none;
    border-color: ButtonText;
  }
}
