/* Shared responsive layer; desktop artwork and layouts keep their original styles. */
.cn-menu { display: none; }
.cn-dialog-close { min-width: 44px !important; min-height: 44px !important; text-align: center !important; }
:where(button, a, input):focus-visible { outline: 3px solid #d8452f !important; outline-offset: 3px !important; }
html { scroll-padding-top: 76px; }
@media (max-width: 760px) { html { scroll-padding-top: 120px; } }
.cn-art-scroll { min-width: 0; }
@media (max-width: 760px) {
  .cn-nav { padding: 8px 16px !important; gap: 8px !important; justify-content: space-between; }
  .cn-nav > a { font-size: 25px !important; }
  .cn-menu { display: block; appearance: none; border: 2px solid #f2d33c; border-radius: 0; background: transparent; color: #f2d33c; font: 700 11px 'IBM Plex Mono', monospace; min-height: 44px; padding: 0 12px; cursor: pointer; }
  .cn-nav nav { display: none !important; }
  .cn-nav .cn-wallet { display: block !important; flex: 0 0 100% !important; width: 100% !important; min-height: 44px !important; padding: 8px 12px !important; box-sizing: border-box !important; text-align: center !important; margin-bottom: 4px !important; }
  .cn-nav-open nav { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 0 0 100% !important; gap: 4px !important; }
  .cn-nav-open nav a { display: flex; align-items: center; min-height: 44px; box-sizing: border-box; }
  .cn-nav nav { order: 3; }
  .cn-page { padding: 24px 16px 48px !important; }
  .cn-page button, .cn-dialog button, .cn-filters button { min-height: 44px !important; box-sizing: border-box !important; }
  .cn-home-section { padding-left: 16px !important; padding-right: 16px !important; }
  #mint { padding-top: 24px !important; padding-bottom: 40px !important; }
  .cn-stamp { position: relative !important; top: auto !important; right: auto !important; display: inline-block; font-size: 18px !important; border-width: 2px !important; padding: 3px 8px !important; margin: 0 8px 24px 0; }
  .cn-quote { box-sizing: border-box; max-width: 100% !important; }
  .cn-gallery { height: auto !important; display: grid; grid-template-columns: repeat(auto-fit, 136px); justify-content: center; align-items: start; gap: 16px; }
  .cn-gallery-tile { position: relative !important; transform: none !important; opacity: 1 !important; cursor: pointer !important; will-change: auto !important; pointer-events: auto !important; }
  .cn-gallery-tile[data-hidden="true"] { display: none !important; }
  .cn-gallery-tile[data-wide="true"] { grid-column: span 2; width: 284px !important; }
  .cn-filters { position: relative !important; width: 100% !important; top: auto !important; transform: none !important; grid-column: 1 / -1; display: none !important; }
  .cn-filters[data-open="true"] { display: flex !important; }
  .cn-filters input { font-size: 16px !important; min-height: 44px; }
  .cn-sensible { position: relative !important; grid-column: 1 / -1; width: 100% !important; height: auto !important; left: auto !important; top: auto !important; transform: none !important; display: none !important; }
  .cn-sensible[data-open="true"] { display: flex !important; }
  .cn-overlay { padding: 12px 16px 20px 12px !important; overscroll-behavior: contain; }
  .cn-dialog { padding: 48px 16px 20px !important; gap: 16px !important; box-shadow: 5px 5px 0 #d8452f !important; }
  .cn-dialog-close { top: 0 !important; right: 0 !important; }
  .cn-dialog > div { min-width: 0; max-width: 100%; }
  .cn-dialog a { box-sizing: border-box; max-width: 100%; }
  .cn-reveal { grid-template-columns: repeat(3, 72px) !important; gap: 12px !important; }
  .cn-reveal[data-count="1"] { grid-template-columns: 240px !important; }
  .cn-reveal[data-count="2"], .cn-reveal[data-count="3"], .cn-reveal[data-count="4"] { grid-template-columns: repeat(2, 110px) !important; }
  .cn-share-preview { width: min(288px, 100%) !important; height: auto !important; aspect-ratio: 4 / 5; box-sizing: border-box; margin: 0 auto; }
  .cn-viewer-row { flex-direction: column !important; width: 100%; min-width: 0; align-items: center !important; }
  .cn-zoom { position: static !important; flex-direction: row !important; width: max-content; max-width: 100%; }
  .cn-zoom button { flex: 1; text-align: center; min-width: 44px; }
  .cn-art-scroll { max-width: 100%; overflow-x: auto; padding: 0 0 4px; box-sizing: border-box; }
  .cn-art-scroll > div { width: max-content; }
  .cn-character > div:first-child a { display: inline-flex; align-items: center; min-height: 44px; box-sizing: border-box; }
  .cn-character > div:first-child > div { flex-wrap: wrap; }
  .cn-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .cn-stats > div { min-width: 0; padding: 10px !important; }
  .cn-stats > div > :first-child { font-size: 9px !important; letter-spacing: 0 !important; }
  .cn-trait { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) 64px !important; gap: 8px !important; padding: 10px !important; font-size: 11px !important; overflow-wrap: anywhere; }
  .cn-trait > span { min-width: 0; }
  .cn-trait > span:last-child > span:last-child { flex-shrink: 0; }
  .cn-office { gap: 24px !important; }
  .cn-office > div { flex: 1 1 100% !important; max-width: 100% !important; min-width: 0; }
  .cn-office-heading { padding: 16px !important; }
  .cn-office-heading > div:first-child { font-size: 9px !important; letter-spacing: .04em !important; margin-bottom: 14px; }
  .cn-serving { position: static !important; display: inline-block; font-size: 18px !important; border-width: 2px !important; transform: rotate(-3deg) !important; margin-top: 16px; }
  .cn-face-strip { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: 52px; overflow-x: auto; padding: 4px 6px 10px 2px; scrollbar-width: thin; }
  .cn-face-strip button { min-width: 48px; }
  .cn-office .cn-viewer-row + div { flex-wrap: wrap; justify-content: center; }
  .cn-order > div:nth-child(2) { padding: 12px !important; box-shadow: 5px 5px 0 #161412 !important; }
  .cn-order > div:nth-child(2) > div:first-child { gap: 12px; flex-wrap: wrap; }
  .cn-order > div:nth-child(2) > div:first-child > div:first-child { font-size: 44px !important; }
  .cn-order > div:nth-child(2) > div:nth-child(5) { gap: 8px; flex-wrap: wrap; }
  .cn-height-column { min-width: 0; }
  .cn-height-row { grid-template-columns: 24px 40px minmax(0, 1fr) auto !important; gap: 8px !important; }
  .cn-height-row > span:last-child { font-size: 20px !important; }
  footer { padding-left: 16px !important; padding-right: 16px !important; }
}
@media (max-width: 340px) {
  .cn-reveal { grid-template-columns: repeat(2, 72px) !important; }
  .cn-reveal[data-count="1"] { grid-template-columns: 216px !important; }
  .cn-reveal[data-count="1"] > a > div { width: 216px !important; height: 216px !important; }
  .cn-reveal[data-count="1"] > a > div > div { width: 216px !important; max-height: 216px; background-size: 216px 216px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .cn-reveal * { transition: none !important; }
}

@media (max-width: 760px) {
  .cn-costs > div { display: grid !important; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; }
  .cn-costs > div > span:last-child { text-align: right; }
}

.cn-mobile-neck { display: none; }
@media (max-width: 760px) {
  .cn-desktop-neck { display: none; }
  .cn-mobile-neck { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
  .cn-mobile-neck > div { top: 90px !important; right: 12px !important; }
  [data-headline] > div:first-child { font-size: 48px !important; }
  [data-headline] > div:nth-child(2) { font-size: 50px !important; margin-left: 0 !important; max-width: calc(100% - 72px); }
  [data-headline] > div:nth-child(3) { font-size: 30px !important; }
}

@media (max-width: 760px) {
  .cn-session-stamp { position: static !important; display: inline-block; margin-top: 20px; transform: rotate(-3deg) !important; font-size: 20px !important; }
  .cn-committee > div:first-child > div:first-child { font-size: clamp(48px, 10vw, 64px) !important; }
  .cn-whale-notice { left: 16px !important; right: 16px !important; width: auto !important; box-sizing: border-box; transform: none !important; }
}

@media (max-width: 760px) {
  .cn-specimen { width: 100%; box-sizing: border-box; padding: 12px; background: #f2d33c; border: 3px solid #161412; box-shadow: 4px 4px 0 #161412; align-items: center !important; }
  .cn-specimen > div:first-child { flex: 0 0 96px; width: 96px !important; height: 96px !important; }
  .cn-specimen > div:last-child { min-width: 0; }
}
@media (max-width: 760px) {
  #mint > div:last-child { background: #f2d33c; padding: 8px 0; transform: none !important; }
}

/* Shared status, navigation and accessibility polish. */
.cn-message { max-width: 760px; margin: 24px auto; padding: 20px; background: #efede8; color: #161412; border: 3px solid #161412; font: 14px/1.6 'IBM Plex Mono', monospace; box-sizing: border-box; }
.cn-message h1 { font-family: 'Anton', sans-serif; font-weight: 400; line-height: 1; }
.cn-retry { padding: 12px 18px; background: #161412; color: #f2d33c; border: 0; font: 700 14px 'IBM Plex Mono', monospace; cursor: pointer; }
.cn-rarity-note { font-size: 11px; line-height: 1.5; padding: 0 14px; color: #57524b; }
.cn-preview-note { margin: 0; font: 10px/1.5 'IBM Plex Mono', monospace; }
.cn-skip { position: fixed; top: 8px; left: 8px; z-index: 1000; transform: translateY(-200%); padding: 12px; background: #f2d33c; color: #161412; font: 700 14px monospace; }
.cn-skip:focus { transform: none; }
button:disabled { cursor: not-allowed !important; }
.cn-dialog [role="alert"] { font-size: 12px; line-height: 1.5; }
.cn-filters[inert] { visibility: hidden; }
@media (min-width: 761px) and (max-width: 1050px) {
  .cn-nav { gap: 12px !important; }
  .cn-nav nav { order: 3; flex: 1 0 100% !important; }
  .cn-nav .cn-wallet { margin-left: auto !important; }
  .cn-character .cn-trait { grid-template-columns: 90px minmax(0, 1fr) 90px !important; }
  .cn-order { flex-basis: 100% !important; max-width: 100% !important; }
  .cn-session-stamp { position: static !important; display: inline-block; margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.cn-dialog[aria-label="Mint faces"] { max-width: 480px !important; }
@media (min-width: 761px) and (max-width: 1050px) {
  .cn-desktop-neck { display: none; }
  .cn-mobile-neck { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
  .cn-mobile-neck > div { top: 100px !important; right: 24px !important; }
  .cn-stamp { position: relative !important; top: auto !important; right: auto !important; display: inline-block; font-size: 24px !important; margin: 0 16px 24px 0; }
  [data-headline] { max-width: calc(100% - 140px) !important; }
  .cn-specimen { max-width: 340px; padding: 12px; box-sizing: border-box; background: #f2d33c; border: 3px solid #161412; }
  .cn-specimen > div:first-child { flex: 0 0 96px; width: 96px !important; height: 96px !important; }
  #mint > div:last-child { width: max-content; max-width: 100%; background: #f2d33c; padding: 8px 0; transform: none !important; }
}
.cn-whale-back { max-width: calc(100vw - 40px); box-sizing: border-box; }
@media (max-width: 760px) { .cn-whale-back { font-size: 20px !important; } }
