/* Cardboard buttons: square, die-cut board with real fiber grain and a pressed edge.
   Every button sits raised on its own board thickness; hovering presses it deep into the page. */
:root{
  --cb-fibers:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.035 .55' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.32  0 0 0 0 0.23  0 0 0 0 0.13  0 0 0 0.28 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E");
  --cb-speck:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.28  0 0 0 0 0.19  0 0 0 0 0.1  0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E");
  --cb-fibers-lite:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.035 .55' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 0.93  0 0 0 0 0.8  0 0 0 0.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E");
  --cb-speck-lite:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 0.94  0 0 0 0 0.84  0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E");
  --cb-depth:7px;
}
/* no round edges anywhere */
*,*::before,*::after{border-radius:0!important}

/* the board */
.btn,.cta,.epbtn,
.chips button,.sizes button,.filters button,
.ep-lang>button{
  position:relative;
  border-radius:0!important;
  border:1px solid rgba(0,0,0,.55)!important;
  background-color:#dccba6!important;
  background-image:
    linear-gradient(180deg,rgba(255,255,255,.28),rgba(255,255,255,0) 40%,rgba(0,0,0,.08)),
    var(--cb-speck),var(--cb-fibers)!important;
  background-size:100% 100%,220px 220px,220px 220px!important;
  background-blend-mode:normal,multiply,multiply;
  color:#14100b!important;
  text-shadow:0 1px 0 rgba(255,255,255,.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -2px 0 rgba(0,0,0,.12),
    0 1px 0 #b39c6c,0 2px 0 #a68f61,0 3px 0 #998357,0 4px 0 #8c774d,0 5px 0 #7f6b44,0 6px 0 #725f3b,0 7px 0 #645232,
    0 9px 14px rgba(0,0,0,.55),0 18px 30px rgba(0,0,0,.35)!important;
  transform:translateY(0) scale(1);
  transition:transform .14s cubic-bezier(.3,.7,.4,1),box-shadow .14s cubic-bezier(.3,.7,.4,1),filter .14s!important;
  will-change:transform;
}
/* gold board for the big En Passant mode button */
.epbtn{background-color:#d1ae5c!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),inset 0 -2px 0 rgba(0,0,0,.15),
    0 1px 0 #a98a3f,0 2px 0 #9e803a,0 3px 0 #937535,0 4px 0 #886b30,0 5px 0 #7d612b,0 6px 0 #725726,0 7px 0 #654c20,
    0 9px 14px rgba(0,0,0,.55),0 18px 30px rgba(0,0,0,.35)!important}
/* dark chipboard for secondary buttons */
.btn.ghost,.chips button,.sizes button,.filters button,.ep-lang>button{
  background-color:#2a241c!important;
  background-image:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,0) 45%,rgba(0,0,0,.2)),var(--cb-speck-lite),var(--cb-fibers-lite)!important;
  background-blend-mode:normal,screen,screen;
  color:#e9e2d4!important;text-shadow:0 -1px 0 rgba(0,0,0,.6);
  border-color:rgba(0,0,0,.8)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14),inset 0 -2px 0 rgba(0,0,0,.3),
    0 1px 0 #1c1813,0 2px 0 #19150f,0 3px 0 #16120d,0 4px 0 #130f0a,0 5px 0 #100c08,0 6px 0 #0c0906,0 7px 0 #080604,
    0 9px 14px rgba(0,0,0,.6),0 18px 30px rgba(0,0,0,.4)!important;
}
.chips button[aria-pressed=true],.sizes button[aria-pressed=true],.filters button[aria-pressed=true]{color:#c9a24b!important;outline:1px solid #c9a24b;outline-offset:-4px}

/* pressed deep into the screen */
.btn:hover,.cta:hover,.epbtn:hover,
.chips button:hover,.sizes button:hover,.filters button:hover,
.ep-lang>button:hover,.ep-lang>button[aria-expanded=true],
.chips button[aria-pressed=true],.sizes button[aria-pressed=true],.filters button[aria-pressed=true],
.epbtn[aria-pressed=true]{
  transform:translateY(var(--cb-depth)) scale(.975)!important;
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,.45),inset 0 10px 18px rgba(0,0,0,.22),inset 0 -1px 0 rgba(255,255,255,.18),
    0 0 0 rgba(0,0,0,0),0 1px 2px rgba(0,0,0,.5)!important;
  filter:brightness(.9) saturate(1.05);
  animation:none!important;
}
.btn:active,.cta:active,.epbtn:active,.chips button:active,.sizes button:active,.filters button:active,.ep-lang>button:active{
  transform:translateY(calc(var(--cb-depth) + 2px)) scale(.96)!important;
  box-shadow:inset 0 5px 10px rgba(0,0,0,.6),inset 0 14px 24px rgba(0,0,0,.3)!important;
  filter:brightness(.82);
}
.btn:disabled,.btn[disabled]{opacity:.45;transform:none!important;filter:grayscale(.4)}
/* keep a little room for the board's thickness */
.btn,.cta,.epbtn{margin-bottom:var(--cb-depth)}
@media (prefers-reduced-motion:reduce){
  .btn,.cta,.epbtn,.chips button,.sizes button,.filters button,.ep-lang>button{transition:none!important}
}
