.hats-collection{padding-top:38px;padding-bottom:20px;overflow:hidden;border-top:1px solid #ffe43020}
.hats-collection-heading{display:flex;align-items:center;justify-content:space-between;gap:28px;margin-bottom:34px}
.hats-collection-heading .eyebrow{font-size:12px;letter-spacing:.14em;color:#b8b99e;margin-bottom:12px}
.hats-collection-heading h2{font-size:clamp(38px,4.5vw,68px);line-height:1.05;margin:0}
.hats-collection-heading h2 span{color:#ffe430}
.hats-collection-description{font-size:16px;line-height:1.6;color:#b8b9ac;margin:14px 0 0}
.hats-collection-link{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:46px;border:1px solid #ffe43080;border-radius:999px;padding:12px 22px;color:#ffe430;font-size:14px;font-weight:600}
.hats-collection-link:hover,.hats-collection-link:focus-visible{background:#ffe430;color:#111}
.hats-gallery-window{padding:16px 4px 28px}
.hats-gallery{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:24px 22px;list-style:none;margin:0;padding:0}
.hats-gallery-card{min-width:0;animation:hats-gallery-float 6s ease-in-out infinite;animation-delay:var(--delay);animation-play-state:paused}
.hats-collection.is-visible .hats-gallery-card{animation-play-state:running}
.hats-gallery-card:nth-child(even){padding-top:22px}
.hats-gallery figure{margin:0;position:relative;background:transparent;text-align:center;transition:transform .25s ease}
.hats-gallery img{display:block;box-sizing:border-box;width:100%;height:auto;aspect-ratio:1;object-fit:contain;padding:7%;border-radius:50%;background:#ffe430;border:1px solid #ffe43088;box-shadow:0 8px 24px #0005;transition:box-shadow .25s ease}
.hats-gallery figcaption{position:static;color:#e5e6dc;padding:14px 6px 0;font-size:14px;line-height:1.4;min-height:70px}
.hats-gallery figcaption span{display:block;color:#ffe430;font-size:12px;margin-bottom:4px}
.hats-gallery-card:hover figure{transform:translateY(-5px) scale(1.025)}
.hats-gallery-card:hover img{box-shadow:0 0 28px #ffe43055}
.hats-gallery-card:hover figcaption{opacity:1}
.hats-gallery-hint{display:none}
.hats-collection a:focus-visible,.hats-gallery-card>figure:focus-visible{outline:2px solid #ffe430;outline-offset:5px}
.hats-gallery-card>figure:focus-visible>figcaption{opacity:1}
@keyframes hats-gallery-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@media(max-width:700px){
.hats-collection{padding-top:32px;padding-bottom:20px}
.hats-collection-heading{display:block;margin-bottom:18px}
.hats-collection-link{margin-top:20px}
.hats-gallery-window{overflow-x:auto;scroll-snap-type:x mandatory;padding:8px 3px 18px;scrollbar-width:thin;scrollbar-color:#ffe43066 transparent}
.hats-gallery{display:flex;gap:16px}
.hats-gallery-card{flex:0 0 72%;max-width:300px;scroll-snap-align:start;animation:none!important}
.hats-gallery-card:nth-child(even){padding-top:0}
.hats-gallery figcaption{padding:14px 8px 0;min-height:65px}
.hats-gallery-hint{display:block;font-size:13px;color:#b8b9ac;margin:6px 0 0}
}
@media(prefers-reduced-motion:reduce){.hats-gallery-card{animation:none!important}.hats-gallery figure,.hats-gallery img{transition:none}}

/* Wide tapered gallery: six, five, four, then three portraits. */
.hats-gallery{grid-template-columns:repeat(12,minmax(0,1fr));gap:12px 18px;max-width:1440px;margin-inline:auto;align-items:start}
.hats-gallery-card{grid-column:span 2;width:clamp(100px,10vw,160px);justify-self:center;position:relative}
.hats-gallery-card:nth-child(even){padding-top:0;margin-top:22px}
.hats-gallery-card:nth-child(7){grid-column:2/span 2}
.hats-gallery-card:nth-child(12){grid-column:3/span 2}
.hats-gallery-card:nth-child(16){grid-column:4/span 2}
.hats-gallery img{padding:0;border:0;background:transparent;object-fit:cover;box-shadow:none}
.hats-gallery figcaption{position:absolute;top:100%;left:50%;width:200px;max-width:220%;transform:translateX(-50%);padding:7px 4px 0;min-height:0;font-size:13px;opacity:0;pointer-events:none;z-index:3;text-shadow:0 1px 5px #000}
.hats-gallery-card:hover{z-index:5}
.hats-gallery-card:hover img{box-shadow:0 0 18px #ffe43025}
.hats-gallery-window{padding-bottom:58px}
@media(max-width:700px){
.hats-gallery-window{overflow:visible;padding:10px 0 30px}
.hats-gallery{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:14px 8px;max-width:540px}
.hats-gallery-card{width:clamp(58px,18vw,104px);max-width:none;grid-column:span 2!important;margin-top:0!important}
.hats-gallery-card:nth-child(even){margin-top:15px!important}
.hats-gallery-card:nth-child(17){grid-column:3/span 2!important}
.hats-gallery figcaption{display:none}
.hats-gallery-hint{display:none}
}
@media(hover:none) and (min-width:701px){.hats-gallery figcaption{position:static;transform:none;width:auto;max-width:none;opacity:1;font-size:12px}}

.hats-collection-motto{display:block;color:#ffe430;font-size:18px;font-weight:600;margin-bottom:4px}

.hats-collection-heading{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:18px}
.hats-collection-heading .hats-collection-link{margin-top:0}
@media(max-width:700px){.hats-collection-heading{display:flex}}

/* Desktop connects the Hatverse game with its collectible collection. */
@media(min-width:1024px){
 .hats-collection-heading{display:grid;grid-template-columns:max-content minmax(240px,300px);justify-content:start;column-gap:28px;row-gap:18px;align-items:center}
 .hats-collection-heading>div{grid-column:1;grid-row:1;align-self:end}
 .hats-collection-heading>.hats-collection-link{grid-column:1;grid-row:2;justify-self:start;align-self:start}
 .hats-collection-heading>.hatverse-teaser{grid-column:2;grid-row:1 / 3;width:100%;align-self:center}
 .countdown-game-row>.arcade-teaser{grid-column:1;grid-row:1}
 .countdown-game-row>.mystery-clock{grid-column:2;grid-row:1;max-width:660px;justify-self:center}
 .countdown-game-row:has(.mystery-clock[hidden]){grid-template-columns:minmax(210px,300px);justify-content:start}
}
@media(min-width:1024px){.hats-collection-heading .countdown-tile-copy h2{font-size:clamp(25px,2.6vw,36px);line-height:1.05;margin:5px 0 9px}}

/* Keep the supplied cabinet artwork intact, including its title and controls. */
.countdown-game-tile.arcade-teaser{position:relative;overflow:hidden;isolation:isolate;aspect-ratio:1;align-self:center}
.countdown-game-tile.arcade-teaser:after{display:none}
.countdown-game-tile.arcade-teaser>.countdown-tile-art{display:block;position:static;inset:auto;aspect-ratio:1;width:100%;height:auto;max-width:100%;object-fit:contain}

@media(min-width:1024px){.arcade-mobile-copy{display:none}}
@media(max-width:1023px){
 .countdown-game-tile.arcade-teaser{aspect-ratio:auto;align-self:stretch}
 .countdown-game-tile.arcade-teaser>.countdown-tile-art{aspect-ratio:4/3;object-fit:cover;object-position:center top}
 .arcade-teaser>.arcade-mobile-copy{position:static;display:flex;flex-direction:column;flex:1;padding:12px;gap:6px;min-width:0}
}

@media(min-width:1024px){
 .hero-introduction{position:relative}
 .hero-introduction>.mystery-clock{position:absolute;right:calc(100% + 20px);top:0;bottom:auto;width:210px;box-sizing:border-box;margin:0;padding:8px;gap:3px}
 .hero-introduction .clock-unit{padding:2px 0}
 .hero-introduction .clock-unit>span{font-size:30px;line-height:1.05}
 .hero-introduction .clock-unit>small{font-size:10px;margin-top:4px;letter-spacing:.02em}
 .hero-introduction .clock-teaser{gap:3px;margin:4px 0 0;padding:0;font-size:12px;line-height:1.3}
 .hero-introduction .clock-date{font-size:10px}
}

/* A desktop marquee beside the existing cabinet tile. */
.arcade-marquee{display:none}
@media(min-width:1024px){
 .arcade-marquee{grid-column:2 / 4;grid-row:1;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;position:relative;isolation:isolate;overflow:hidden;box-sizing:border-box;min-width:0;align-self:stretch;padding:clamp(24px,3vw,44px);border:1px solid #ffe43070;border-radius:16px;background:radial-gradient(ellipse at 100% 0%,#ffe43016,transparent 65%),#0c0e0b;box-shadow:inset 0 0 0 6px #ffe43006,0 0 25px #ffe43008;color:#fff;text-decoration:none;transition:border-color .2s,box-shadow .2s}
 .arcade-marquee:before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:repeating-linear-gradient(0deg,transparent 0 3px,#0004 3px 4px);opacity:.4}
 .marquee-kicker{font-size:12px;letter-spacing:.22em;font-weight:700;color:#ffe430;margin-bottom:18px}
 .marquee-headline{font-family:'Barlow Condensed',Arial,sans-serif;font-size:clamp(27px,2.7vw,42px);line-height:1.12;letter-spacing:-.02em;font-weight:800}
 .marquee-headline em{font-style:normal;color:#ffe430;text-shadow:0 0 22px #ffe43025}
 .marquee-note{font-size:14px;line-height:1.5;color:#c5c7bd;margin-top:16px}
 .marquee-cta{display:inline-flex;align-items:center;gap:18px;margin-top:22px;border-bottom:1px solid #ffe43060;padding-bottom:5px;color:#ffe430;font-size:15px;font-weight:600}
 .marquee-label{position:absolute;right:22px;top:22px;font-family:monospace;font-size:10px;letter-spacing:.12em;color:#ffe43080}
 .arcade-marquee:hover{border-color:#ffe430;box-shadow:inset 0 0 0 6px #ffe43009,0 0 30px #ffe43018}
 .arcade-marquee:focus-visible{outline:3px solid #ffe430;outline-offset:5px}
}

/* One centered desktop entrance: message left, cabinet artwork right. */
@media(min-width:1024px){
 .countdown-game-row,.countdown-game-row:has(.mystery-clock[hidden]){grid-template-columns:minmax(0,1fr);max-width:1000px;justify-content:center}
 .countdown-game-row>.arcade-teaser{display:none}
 .countdown-game-row>.arcade-marquee{grid-column:1;grid-row:1;display:grid;grid-template-columns:minmax(0,max-content) clamp(280px,30.6vw,340px);padding:0;gap:0;align-items:stretch;width:max-content;max-width:100%;justify-self:center}
 .marquee-copy{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:clamp(28px,3.2vw,48px);min-width:0}
 .marquee-art{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;align-self:center;border-left:0;box-sizing:border-box}
 .marquee-headline{font-size:clamp(26px,2.6vw,38px)}
 .marquee-label{display:none}
}

@media(max-width:1023px){
 .hero-contract>.hero-introduction{width:100%;max-width:100%;margin:16px 0 20px;position:relative}
 .home-page .hero-bottom:not(:has(.hero-introduction)){display:none}
}

/* Tighten stacked section spacing while preserving bubble caption clearance. */
.home-page .hats-collection + .showcase{padding-top:32px}
@media(max-width:700px){.home-page .hats-collection + .showcase{padding-top:28px}}

/* Official catalog access, alongside the existing marketplace link. */
.hats-collection-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.hats-collection-actions .hats-collection-link{margin:0}
.hats-collection-actions .hats-catalog-link{background:#ffe430;color:#151515;border-color:#ffe430;transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.hats-collection-actions .hats-catalog-link:focus-visible{background:#fff16a;border-color:#fff16a;box-shadow:0 6px 20px #ffe43040;transform:translateY(-2px)}
@media(hover:hover) and (pointer:fine){.hats-collection-actions .hats-catalog-link:hover{background:#fff16a;border-color:#fff16a;box-shadow:0 6px 20px #ffe43040;transform:translateY(-2px)}}
@media(prefers-reduced-motion:reduce){.hats-collection-actions .hats-catalog-link{transition:none;transform:none!important}}
@media(max-width:700px){.hats-collection-actions{width:100%;flex-direction:column;align-items:stretch}.hats-collection-actions .hats-collection-link{text-align:center;justify-content:center;white-space:normal}}

/* Desktop bubbles roam inside the existing grid's footprint. Transforms leave
   the original grid, section height and caption clearance untouched. */
.hats-gallery.is-measuring .hats-gallery-card{animation:none!important;transform:none!important}
@media(min-width:1024px) and (hover:hover) and (pointer:fine){
 .hats-gallery.has-bubble-motion .hats-gallery-card{animation:none;will-change:transform}
}
@media(prefers-reduced-motion:reduce){
 .hats-gallery.has-bubble-motion:not(.has-touch-physics) .hats-gallery-card{transform:none!important;will-change:auto}
}
/* This wrapper is the action row, not the heading's descriptive grid cell. */
.hats-collection-heading>.hats-collection-actions{grid-column:1;grid-row:2;align-self:start;justify-content:flex-start}

/* Only the artwork catches a finger. Gaps and the rest of the page still scroll.
   Keep cards in their original grid cells to preserve the exact gallery zone. */
@media(max-width:1023px) and (pointer:coarse){
 .hats-gallery.has-touch-physics .hats-gallery-card{animation:none!important;will-change:transform}
 .hats-gallery.has-touch-physics .hats-gallery-card figure{transform:none!important;transition:none}
 .hats-gallery.has-touch-physics .hats-gallery-card img{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-user-drag:none}
 .hats-gallery.has-touch-physics .hats-gallery-card.is-dragging{z-index:6}
}

/* HATS: keyboard focus identifies just one collectible. Pointer/touch focus
   never reveals its label; all physics and hit areas stay unchanged. */
.hats-gallery-card:has(>figure:focus-visible){z-index:7}
@media(max-width:700px),(max-width:1023px) and (pointer:coarse){
 .hats-gallery figcaption{display:none;position:absolute;top:100%;left:50%;width:200px;max-width:220%;transform:translateX(-50%);font-size:13px}
 .hats-gallery-hint{display:block;font-size:13px;color:#b8b9ac;margin:6px 0 0}
 .hats-gallery-card>figure:focus-visible>figcaption{display:block;opacity:1}
}
