/* Palette only: layout and behavior come from gallery-light.css. */
:root:has(body.gallery-dark){
  color-scheme:dark;
  --gallery-242521:#ededed;
  --gallery-253021:#ededed;
  --gallery-445440:#444444;
  --gallery-536047:#b5b5b5;
  --gallery-596250:#b5b5b5;
  --gallery-606854:#b5b5b5;
  --gallery-697064:#b5b5b5;
  --gallery-faf9f5:#111111;
  --gallery-fffefa:#111111;
  --gallery-f4f3eb:#111111;
  --gallery-e5e6df:#191919;
  --gallery-e5eadf:#191919;
  --gallery-e9ecdf:#191919;
  --gallery-e4e8dd:#191919;
  --gallery-d8dbd0:#191919;
  --gallery-d7d8cf:#383838;
  --gallery-cdd0c4:#383838;
  --gallery-cdd1c4:#383838;
  --gallery-cdd2c3:#383838;
  --gallery-d2d5c9:#383838;
  --gallery-d4d8cc:#383838;
  --gallery-c7cebc:#383838;
  --gallery-cbd0bf:#383838;
  --gallery-b8bbae:#383838;
  --gallery-bfc3b5:#383838;
  --gallery-a5af90:#383838;
  --gallery-929a82:#383838;
  --gallery-56674b:#444444;
  --gallery-8b987d:#707070;
  --gallery-9aa18e:#707070;
  --gallery-eeece6:#080808;
  --gallery-34372f:#ededed;
  --gallery-34422f:#ededed;
  --gallery-595c54:#b5b5b5;
  --gallery-66695f:#b5b5b5;
  --gallery-69715f:#b5b5b5;
  --gallery-55604c:#b5b5b5;
  --gallery-515a48:#b5b5b5;
  --gallery-7a8372:#b5b5b5;
  --gallery-bac5a6:#b5b5b5;
  --gallery-e2e8d3:#d4d4d4;
  --gallery-faf9f5f2:#111111f2;
  --gallery-171b17b8:#000000c9;
}
html body.gallery-dark #sizeTracker{--tracker-surface:#111;--tracker-border:#383838;--tracker-ink:#ededed;--tracker-muted:#b5b5b5;--tracker-track:#333;--tracker-accent:#aaa}
html body.gallery-dark :is(button,a,input,select,.card):focus-visible{outline-color:#ddd!important}
html body.gallery-dark .filter-pill:not(.active){color:#ccc!important}
html body.gallery-dark .footer-bottom-link{color:#ccc!important}
html body.gallery-dark .logo{background:none!important;color:#ededed!important;-webkit-text-fill-color:#ededed!important}
html body.gallery-dark .popup-raid-title{color:#ccc!important}
html body.gallery-dark #popup :is(#flipButton,#flipBackButton){color:#171717!important}

/* Obsidian surfaces, warm ivory type and restrained champagne accents.
   Geometry remains shared with Light; only finishes change here. */
:root:has(body.gallery-dark){
  --gallery-eeece6:#090909;
  --gallery-faf9f5:#121211;
  --gallery-fffefa:#0d0d0c;
  --gallery-f4f3eb:#121211;
  --gallery-242521:#f0ebe2;
  --gallery-34372f:#e8e2d8;
  --gallery-34422f:#e8e2d8;
  --gallery-66695f:#aaa59b;
  --gallery-69715f:#aaa59b;
  --gallery-55604c:#aaa59b;
  --gallery-d7d8cf:#30302b;
  --gallery-cdd0c4:#30302b;
  --gallery-d2d5c9:#3b3932;
  --gallery-e5eadf:#22211c;
  --gallery-e4e8dd:#22211c;
  --gallery-e2e8d3:#d5c19a;
  --dark-gold:#d5c19a;
  --dark-line:rgba(235,232,224,.13);
}
html body.gallery-dark{background:radial-gradient(ellipse 90% 500px at 50% 0,rgba(213,193,154,.045),transparent 85%),#090909!important}
html body.gallery-dark :is(header,.header){background:linear-gradient(180deg,#171715,#10100f)!important;border-bottom-color:var(--dark-line)!important;box-shadow:0 1px 0 #ffffff03!important}
html body.gallery-dark :is(.gallery-hero-title,.section-title,.hero-title){color:#f0ebe2!important;-webkit-text-fill-color:#f0ebe2!important}
html body.gallery-dark .controls{background:linear-gradient(135deg,#191917,#111110)!important;border-color:var(--dark-line)!important;box-shadow:inset 0 1px 0 #ffffff06,0 12px 32px #0002!important}
html body.gallery-dark :is(.controls input,.controls select,.fdd-btn,.sort-btn){background:#10100f!important;border-color:#33322d!important}
html body.gallery-dark :is(.fdd-panel,.mobile-filter-sheet){background:#171715!important;border-color:#3b3932!important;box-shadow:0 18px 45px #0006!important}
html body.gallery-dark :is(.sort-btn.active,.filter-pill.active){background:linear-gradient(135deg,#ddcdaa,#bca57b)!important;border-color:#d5c19a!important;color:#181611!important;box-shadow:inset 0 1px 0 #ffffff35!important}
html body.gallery-dark :is(.banners-link,.mobile-toggle,.nav-links a,.filter-pill){background:linear-gradient(180deg,#1c1c19,#121211)!important;border-color:#39372f!important;box-shadow:inset 0 1px 0 #ffffff04!important}
html body.gallery-dark :is(button,a,input,select,.card,.thumbnail-card):focus-visible{outline:2px solid #d8d5ce!important;outline-offset:4px!important}
html body.gallery-dark #cardGallery .card-info{border-bottom-color:var(--dark-line)!important}
html body.gallery-dark #cardGallery .card-name{color:#f4f0e8!important;font-weight:600!important;letter-spacing:.01em!important}
html body.gallery-dark #cardGallery :is(.card-gen,.card-code,.collection-card-tags){color:#aaa59b!important;font-weight:400!important}
html body.gallery-dark #hero{background:radial-gradient(ellipse at 75% 40%,#1b1a162b,transparent 65%),#090909!important;border-bottom-color:var(--dark-line)!important}
html body.gallery-dark #hero .hero-content{border-color:#3a3935!important}
html body.gallery-dark #hero .hero-badge{color:#aaa59b!important}
html body.gallery-dark #hero .banner-pagination .hero-nav{background:linear-gradient(145deg,#1d1d19,#111110)!important;border-color:#3a3935!important;color:#e8e2d8!important}
html body.gallery-dark #hero .banner-up-next{border-color:var(--dark-line)!important}
html body.gallery-dark .banner-up-next-copy>span:first-child{color:#aaa59b!important}
html body.gallery-dark #popup .popup-back{background:linear-gradient(145deg,#1b1b18,#10100f 65%)!important;border-color:#514a3c!important;box-shadow:0 28px 90px #0009,inset 0 1px 0 #ffffff08!important}
html body.gallery-dark #popup .popup-front-overlay{background:linear-gradient(135deg,#1b1b18,#10100f)!important;border-color:#514a3c!important}
html body.gallery-dark #popup .popup-back-kicker{color:#aaa59b!important;border-color:var(--dark-line)!important}
html body.gallery-dark #popup .popup-row{border-bottom-color:var(--dark-line)!important}
html body.gallery-dark #popup :is(#flipButton,#flipBackButton){background:linear-gradient(135deg,#ddcdaa,#bca57b)!important;border-color:#d5c19a!important;color:#181611!important}
html body.gallery-dark .footer{background:linear-gradient(180deg,#131310,#090909)!important;border-color:var(--dark-line)!important}
html body.gallery-dark #sizeTracker{--tracker-surface:#151512;--tracker-border:#39372f;--tracker-ink:#eae5dc;--tracker-muted:#aaa59b;--tracker-track:#302d26;--tracker-accent:#b5b2aa}

/* Hover highlights use existing edges, preserving artwork and card geometry. */
html body.gallery-dark #cardGallery .card-info{transition:border-color .18s ease!important}
html body.gallery-dark :is(.banners-link,.mobile-toggle,.nav-links a,.fdd-btn,.sort-btn,.filter-pill,.case-copy){transition:border-color .18s ease,background-color .18s ease!important}
html body.gallery-dark #cardGallery .card:focus-visible .card-info{border-bottom-color:#a6a299!important}
@media(hover:hover){
  html body.gallery-dark :is(.banners-link,.mobile-toggle,.nav-links a,.fdd-btn,.sort-btn,.filter-pill,.case-copy):hover{border-color:#88847b!important}
  html body.gallery-dark #cardGallery .card:hover .card-info{border-bottom-color:#88847b!important}
  html body.gallery-dark .thumbnail-card:hover .thumbnail-info{border-bottom-color:#88847b!important}
  html body.gallery-dark #hero .banner-pagination .hero-nav:hover{border-color:#88847b!important}
}
html body.gallery-dark :is(.sort-btn.active,.filter-pill.active):hover{border-color:var(--dark-gold)!important}
@media(prefers-reduced-motion:reduce){
  html body.gallery-dark #cardGallery .card-info,
  html body.gallery-dark :is(.banners-link,.mobile-toggle,.nav-links a,.fdd-btn,.sort-btn,.filter-pill,.case-copy){transition:none!important}
}
