/* Mobile collection and mint layouts follow hoodhallz-mobile-commerce-v1.png.
   This layer is deliberately inactive at desktop widths. */
@media (max-width: 767px) {
  .collection-page,
  .mint-page {
    --mobile-page-gutter: 16px;
  }

  .collection-page .page-shell,
  .mint-container {
    width: calc(100% - var(--mobile-page-gutter) * 2);
    max-width: 600px;
  }

  .collection-page :is(h1, h2, h3, p, strong, small, a, button),
  .mint-page :is(h1, h2, h3, p, strong, small, a, button) {
    overflow-wrap: break-word;
  }

  .collection-world {
    min-height: 0;
    padding-top: 20px;
    overflow: visible;
    background: var(--paper);
  }

  .collection-world::after {
    display: none;
  }

  .collection-world .collection-scenery {
    position: relative;
    inset: auto;
    z-index: 0;
    width: calc(100% - var(--mobile-page-gutter) * 2);
    max-width: 600px;
    height: clamp(156px, 44vw, 226px);
    margin-inline: auto;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #d9e4ca url('/assets/canopy.webp') center 35% / cover no-repeat;
    box-shadow: inset 0 1px 0 #ffffff50;
  }

  .collection-world.world-moonfolk .collection-scenery {
    background-image: url('/assets/moonfolk.webp');
    background-position: center 31%;
  }

  .collection-world.world-circuit .collection-scenery {
    background-image: url('/assets/circuit.webp');
    background-position: center 36%;
  }

  .collection-intro {
    padding-block: 14px 22px;
  }

  .collection-intro .page-breadcrumb {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  .collection-intro .page-breadcrumb > a {
    min-height: 44px;
    font-size: 12px;
  }

  .collection-intro .page-pill {
    padding: 7px 9px;
    font-size: 11px;
    white-space: normal;
  }

  .collection-identity {
    gap: 9px;
  }

  .collection-identity .collection-sigil {
    width: 36px;
    height: 36px;
  }

  .collection-identity .collection-sigil svg {
    width: 24px;
    height: 24px;
  }

  .collection-identity .page-eyebrow {
    font-size: 10px;
    letter-spacing: .1em;
  }

  .collection-identity p {
    margin-top: 2px;
    font-size: 13px;
  }

  .collection-intro h1 {
    margin-top: 13px;
    font-size: clamp(35px, 9.4vw, 48px);
    line-height: 1.08;
  }

  .collection-tagline {
    margin-top: 9px;
    max-width: none;
    font-size: 17px;
    line-height: 1.45;
  }

  .collection-intro-text {
    max-width: none;
    margin-top: 9px;
    font-size: 14px;
    line-height: 1.6;
  }

  .collection-primary-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px 48px;
    gap: 8px;
    margin-top: 18px;
  }

  .collection-primary-actions > .button {
    min-height: 48px;
    margin: 0;
    padding: 11px 14px;
    gap: 10px;
    justify-content: space-between;
    white-space: normal;
    font-size: 14px;
  }

  .collection-primary-actions > .round-button {
    width: 48px;
    height: 48px;
  }

  .collection-chain {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    font-size: 11px;
    line-height: 1.5;
  }

  .collection-art-caption {
    display: none;
  }

  .collection-page .collection-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .collection-summary .collection-stat {
    min-width: 0;
    padding: 14px 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffffdb, #edf3e9c9);
    box-shadow: inset 0 1px 0 #fff;
  }

  .collection-stat > span {
    font-size: 12px;
    line-height: 1.45;
  }

  .collection-stat > strong {
    font-size: clamp(20px, 5.6vw, 26px);
    line-height: 1.2;
    margin-top: 6px;
    letter-spacing: -.03em;
  }

  .collection-stat small {
    font-size: 11px;
    line-height: 1.45;
    margin-top: 6px;
  }

  .collection-stat em {
    font-size: 12px;
  }

  .collection-progress > span {
    gap: 5px;
    flex-wrap: wrap;
  }

  .collection-progress progress {
    height: 6px;
    margin-top: 8px;
  }

  .collection-body {
    padding-top: 20px;
  }

  .collection-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 5px;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--page-panel);
  }

  .collection-tabs a {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 9px 7px;
    gap: 5px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
  }

  .collection-tabs a.active {
    color: #24412b;
    background: #dceccd;
  }

  .collection-tabs a.active::after {
    display: none;
  }

  .collection-body section {
    scroll-margin-top: 24px;
  }

  .collection-story {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-block: 30px;
  }

  .story-copy h2,
  .access-intro h2 {
    font-size: clamp(29px, 7.5vw, 37px);
    line-height: 1.13;
    margin-block: 10px 16px;
  }

  .story-copy > p:not(.page-eyebrow),
  .access-intro > p:not(.page-eyebrow) {
    max-width: none;
    font-size: 14px;
    line-height: 1.7;
  }

  .story-art {
    height: clamp(236px, 67vw, 345px);
    border-radius: 20px;
  }

  .story-art figcaption {
    inset: auto 20px 20px;
  }

  .story-signature,
  .story-signature strong {
    font-size: 12px;
  }

  .collection-items,
  .collection-phases,
  .collection-access,
  .collection-details {
    padding-block: 30px;
  }

  .collection-page .page-section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
  }

  .collection-page .page-section-heading h2 {
    font-size: clamp(27px, 7vw, 35px);
    line-height: 1.15;
  }

  .collection-page .page-eyebrow {
    font-size: 10px;
    letter-spacing: .13em;
  }

  .collection-item-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .collection-item-tools .page-search {
    grid-column: 1 / -1;
    min-height: 48px;
    border-radius: 13px;
  }

  .collection-item-tools .page-search input,
  .collection-item-tools .page-select select {
    font-size: 16px;
  }

  .collection-item-tools .page-select {
    min-width: 0;
  }

  .collection-item-tools .page-select select {
    min-width: 0;
    min-height: 48px;
    padding-inline: 10px;
  }

  .collection-item-tools .page-filter {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
    font-size: 13px;
  }

  .collection-results {
    flex-wrap: wrap;
    gap: 5px;
    margin-block: 15px;
    font-size: 12px;
    line-height: 1.5;
  }

  .collection-results > span:last-child {
    display: block;
    width: 100%;
  }

  .collection-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .collection-item {
    min-width: 0;
    border-radius: 16px;
  }

  .collection-item-art {
    aspect-ratio: 1;
  }

  .item-trait {
    left: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    padding: 5px 7px;
    font-size: 10px;
    line-height: 1.35;
  }

  .collection-item-info {
    padding: 10px;
  }

  .collection-item-info > p {
    font-size: 11px;
    line-height: 1.5;
  }

  .collection-item-info h3 {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.35;
  }

  .collection-item-info h3 button {
    min-height: 44px;
    text-align: left;
  }

  .collection-item-info > div {
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
  }

  .collection-item-info .round-button {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .collection-phase-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .collection-phase-card {
    padding: 20px;
    border-radius: 18px;
  }

  .collection-phase-card h3 {
    margin-top: 17px;
    font-size: 20px;
  }

  .collection-phase-card > p {
    margin-block: 9px 18px;
    font-size: 14px;
    line-height: 1.6;
  }

  .phase-card-top,
  .phase-card-bottom {
    gap: 8px;
    flex-wrap: wrap;
  }

  .phase-card-bottom {
    flex-direction: row;
    align-items: center;
  }

  .phase-card-bottom > span,
  .phase-card-link {
    font-size: 12px;
  }

  .phase-card-link {
    min-height: 48px;
    line-height: 1.5;
  }

  .collection-access {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .access-intro > .text-link {
    min-height: 44px;
    font-size: 13px;
    margin-top: 14px;
  }

  .collection-access-card {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 18px;
    gap: 12px;
    border-radius: 18px;
  }

  .collection-access-card h3 {
    font-size: 20px;
  }

  .collection-access-card p,
  .collection-access-card small {
    font-size: 13px;
    line-height: 1.6;
  }

  .collection-access-card > .button {
    grid-column: 1 / -1;
    justify-self: stretch;
    min-height: 48px;
    padding: 11px 14px;
    font-size: 13px;
    white-space: normal;
  }

  .access-flow {
    gap: 7px;
    padding-inline: 0;
  }

  .access-flow > span {
    min-width: 0;
    font-size: 11px;
    line-height: 1.5;
  }

  .access-flow b {
    font-size: 12px;
  }

  .access-flow svg {
    flex-shrink: 0;
    width: 12px;
  }

  .collection-faq summary {
    gap: 14px;
    min-height: 48px;
    padding-block: 18px;
    font-size: 15px;
    line-height: 1.5;
  }

  .collection-faq summary svg {
    flex-shrink: 0;
  }

  .collection-faq details > p {
    font-size: 14px;
    line-height: 1.7;
  }

  .collection-endcap {
    padding-block: 26px 38px;
  }

  .collection-endcap > .button {
    min-height: 48px;
    font-size: 14px;
  }

  .mint-page {
    padding-top: 20px;
    overflow: visible;
  }

  .mint-breadcrumb {
    min-height: 44px;
    margin-bottom: 12px;
    gap: 9px;
    font-size: 12px;
  }

  .mint-breadcrumb a {
    min-height: 44px;
  }

  .mint-heading {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 18px;
  }

  .mint-kicker {
    font-size: 10px;
    letter-spacing: .13em;
  }

  .mint-heading h1 {
    margin-top: 5px;
    font-size: clamp(35px, 9.4vw, 48px);
    line-height: 1.1;
  }

  .mint-intro {
    max-width: none;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.55;
  }

  .mint-heading .mint-backlink {
    max-width: none;
    min-height: 44px;
    margin-top: 0;
    font-size: 13px;
  }

  .mint-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .mint-art-column {
    display: contents;
  }

  .mint-artwork {
    order: 0;
    height: clamp(156px, 42vw, 220px);
    aspect-ratio: auto;
    border-radius: 20px;
  }

  .mint-artwork > img {
    object-position: 50% 33%;
  }

  .mint-art-top {
    inset: 13px 14px auto;
  }

  .mint-art-label {
    padding: 7px 9px;
    font-size: 9px;
    letter-spacing: .07em;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #163427b8;
  }

  .mint-art-emblem {
    width: 34px;
    height: 34px;
  }

  .mint-art-emblem svg {
    width: 22px;
    height: 22px;
  }

  .mint-artwork figcaption {
    inset: auto 18px 15px;
  }

  .mint-artwork figcaption > span:first-child {
    margin-bottom: 5px;
    font-size: 9px;
    letter-spacing: .1em;
  }

  .mint-artwork figcaption strong {
    font-size: clamp(24px, 6.6vw, 31px);
    line-height: 1.05;
  }

  .mint-artwork figcaption strong br {
    display: none;
  }

  .mint-art-signature {
    margin-top: 5px;
    font-size: 10px;
  }

  .mint-art-meta {
    display: flex;
    order: 1;
    flex-wrap: wrap;
    gap: 5px 12px;
    padding: 0 2px 12px;
    margin-top: -5px;
    font-size: 11px;
    line-height: 1.5;
  }

  .mint-panel {
    order: 2;
    padding: 20px 16px 0;
    border-radius: 22px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .mint-panel-top {
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
  }

  .mint-preview-badge {
    font-size: 10px;
    padding: 6px 8px;
    white-space: normal;
  }

  .mint-panel h2 {
    font-size: 29px;
    line-height: 1.1;
  }

  .mint-panel-intro {
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.6;
  }

  .mint-supply {
    margin-top: 18px;
  }

  .mint-supply > div:first-child {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
  }

  .mint-supply small {
    display: inline;
    font-size: 10px;
  }

  .mint-supply strong {
    font-size: 12px;
  }

  .mint-progress {
    height: 6px;
  }

  .mint-phases {
    margin-top: 22px;
  }

  .mint-phases legend {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  .mint-phase-options {
    gap: 9px;
  }

  .mint-phase-option {
    grid-template-columns: 23px minmax(0, 1fr);
    align-items: start;
    gap: 7px 9px;
    min-height: 84px;
    padding: 13px 12px;
    border-radius: 15px;
  }

  .mint-phase-index {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 23px;
    height: 23px;
    font-size: 11px;
  }

  .mint-phase-copy {
    grid-column: 2;
    gap: 4px;
  }

  .mint-phase-copy strong {
    font-size: 14px;
    line-height: 1.4;
  }

  .mint-phase-copy > span {
    font-size: 12px;
    line-height: 1.5;
  }

  .mint-phase-aside {
    grid-column: 2;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 12px;
    text-align: left;
  }

  .mint-phase-aside strong {
    font-size: 14px;
    line-height: 1.4;
  }

  .mint-phase-aside > span {
    font-size: 11px;
    line-height: 1.5;
    white-space: normal;
  }

  .mint-preview-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 20px;
    padding-top: 18px;
  }

  .mint-preview-controls > label {
    font-size: 13px;
  }

  .mint-preview-controls select {
    min-height: 48px;
    padding: 11px 30px 11px 12px;
    font-size: 16px;
    border-radius: 12px;
  }

  .mint-preview-controls > p {
    font-size: 11px;
    line-height: 1.6;
  }

  .mint-access-status {
    padding: 13px;
    border-radius: 14px;
    gap: 10px;
  }

  .mint-access-icon {
    width: 28px;
    height: 28px;
  }

  .mint-access-status strong {
    font-size: 13px;
  }

  .mint-access-status p {
    font-size: 12px;
    line-height: 1.55;
  }

  .mint-quantity-row {
    gap: 10px;
    padding-top: 20px;
  }

  .mint-quantity-row > div:first-child {
    min-width: 0;
  }

  .mint-quantity-row label {
    font-size: 14px;
  }

  .mint-quantity-row p {
    font-size: 11px;
    line-height: 1.5;
  }

  .mint-stepper {
    padding: 3px;
    border-radius: 15px;
  }

  .mint-stepper button {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }

  .mint-stepper output {
    width: 30px;
    font-size: 15px;
  }

  .mint-cost > div {
    font-size: 13px;
    line-height: 1.5;
  }

  .mint-total dt {
    font-size: 14px;
  }

  .mint-total dd {
    font-size: 26px;
  }

  .mint-cost-note,
  .mint-submit-note {
    font-size: 11px;
    line-height: 1.6;
  }

  .mint-submit {
    min-height: 54px;
    margin-top: 18px;
    padding: 12px 17px;
    font-size: 14px;
    line-height: 1.4;
    gap: 10px;
    white-space: normal;
  }

  .mint-submit svg {
    flex-shrink: 0;
  }

  .mint-submit-note {
    padding: 0 0 20px;
  }

  .mint-panel-footer {
    margin-inline: -16px;
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 7px 12px;
    font-size: 11px;
    line-height: 1.5;
  }

  .mint-receipt > p:not(.mint-kicker),
  .mint-receipt dl > div {
    font-size: 13px;
  }

  .mint-receipt-actions {
    flex-direction: column;
  }

  .mint-receipt-actions .button {
    min-height: 48px;
    font-size: 13px;
    white-space: normal;
  }

  .mint-access-story {
    order: 3;
    padding: 12px 2px 0;
  }

  .mint-access-story h2 {
    font-size: 28px;
    line-height: 1.15;
  }

  .mint-access-story > p:not(.mint-kicker) {
    font-size: 14px;
    line-height: 1.7;
  }

  .mint-inline-link {
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
  }

  .mint-inline-link svg {
    flex-shrink: 0;
  }

  .mint-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 28px;
    padding-block: 28px 36px;
  }

  .mint-details h2 {
    font-size: 30px;
  }

  .mint-details h2 br,
  .mint-details > div > p:last-child br {
    display: none;
  }

  .mint-details > div > p:last-child {
    font-size: 14px;
  }

  .mint-faq-list summary {
    min-height: 48px;
    font-size: 15px;
    line-height: 1.5;
  }

  .mint-faq-list details > p {
    padding-right: 0;
    font-size: 14px;
    line-height: 1.7;
  }

  html[data-theme=dark] .collection-world {
    background: var(--paper);
  }

  html[data-theme=dark] .collection-world .collection-scenery {
    background-image: url('/assets/canopy.webp');
    border-color: #d1efca26;
    box-shadow: inset 0 1px 0 #ffffff21;
  }

  html[data-theme=dark] .collection-world.world-moonfolk .collection-scenery {
    background-image: url('/assets/moonfolk.webp');
  }

  html[data-theme=dark] .collection-world.world-circuit .collection-scenery {
    background-image: url('/assets/circuit.webp');
  }

  html[data-theme=dark] .collection-page .collection-summary {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html[data-theme=dark] .collection-summary .collection-stat {
    background: linear-gradient(145deg, #22312b, #111c19);
    border-color: #d1efca24;
    box-shadow: inset 0 1px 0 #e5ffe41c;
  }

  html[data-theme=dark] .collection-tabs a.active {
    background: #b1d89122;
    color: #d1edb3;
    box-shadow: inset 0 0 0 1px #b3dd9633;
  }

  html[data-theme=dark] .mint-panel {
    background: linear-gradient(140deg, #1d2a26, #101a18 65%, #1b2824);
    border-color: #bddad634;
    box-shadow: inset 0 1px 0 #efffeb24, 0 12px 32px #0002;
  }

  html[data-theme=dark] .mint-phase-option.is-selected {
    border-color: #c1e5a791;
    background: linear-gradient(120deg, #36593a80, #1b302466);
    box-shadow: inset 0 1px 0 #deffd526, 0 0 0 1px #a7d4860d;
  }
}

@media (max-width: 359px) {
  .collection-page,
  .mint-page {
    --mobile-page-gutter: 12px;
  }

  .collection-primary-actions {
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: 6px;
  }

  .collection-primary-actions > .round-button {
    width: 44px;
    height: 48px;
  }

  .collection-summary .collection-stat {
    padding: 12px;
  }

  .collection-item-info > div {
    font-size: 11px;
  }

  .mint-panel {
    padding-inline: 14px;
  }

  .mint-panel-footer {
    margin-inline: -14px;
    padding-inline: 14px;
  }

  .mint-artwork figcaption strong {
    max-width: 230px;
  }
}
