html.icons-3d {
  --icon-3d-face: #fff7e8;
  --icon-3d-edge: #c98f3f;
  --icon-3d-shadow: rgba(82, 62, 30, 0.22);
  --icon-3d-glow: rgba(255, 255, 255, 0.78);
}

.brand-wordmark-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.2rem;
  padding: 0.28rem 0.8rem 0.34rem;
  border-radius: 999px;
  color: #fff;
  font-family: "Lato", "Inter", "Segoe UI", Arial, sans-serif;
  font-size: clamp(1rem, 2.1vw, 1.34rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 22% 26%, rgba(255, 255, 255, 0.38), transparent 46%),
    linear-gradient(128deg, #172238 0%, #8f6b2d 48%, #caa85b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 8px 18px rgba(82, 62, 30, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.brand-wordmark-3d::before {
  content: "";
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 28%, transparent 29%),
    linear-gradient(145deg, #fff7e8 0%, #ffd48a 46%, #f59e0b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 2px 6px rgba(250, 190, 95, 0.45);
  flex: 0 0 auto;
}

a:hover .brand-wordmark-3d {
  transform: translateY(-1px) scale(1.015);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 10px 20px rgba(82, 62, 30, 0.26);
  filter: saturate(1.05);
}

.brand-header-row-3d {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  place-items: center !important;
  gap: 0.75rem !important;
  width: 100% !important;
}

.brand-header-row-3d > .brand-logo-link-3d {
  grid-column: 2 !important;
  justify-self: center !important;
  z-index: 1;
}

.brand-header-row-3d > .brand-logo-link-3d + div {
  grid-column: 3 !important;
  justify-self: end !important;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
}

.icon-3d-wrap,
.icon-3d-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transform: translateZ(0);
  filter:
    drop-shadow(0 8px 10px var(--icon-3d-shadow))
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.45));
}

.icon-3d-wrap {
  width: fit-content;
  height: fit-content;
  border-radius: 999px;
  perspective: 500px;
}

.icon-3d-wrap::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.12) 38%, rgba(202, 168, 91, 0.18)),
    linear-gradient(145deg, rgba(255, 216, 143, 0.52), rgba(154, 117, 49, 0.28));
  box-shadow:
    inset 0 1px 0 var(--icon-3d-glow),
    inset 0 -5px 8px rgba(82, 62, 30, 0.18),
    0 10px 20px rgba(82, 62, 30, 0.16);
  z-index: -1;
}

.icon-3d-wrap img,
html.icons-3d img[src*="/assets/icons/product-icons/"],
html.icons-3d img[class*="aspect-square"][class*="object-contain"][class*="mix-blend-multiply"],
html.icons-3d img[class*="aspect-square"][class*="object-cover"][class*="rounded-full"] {
  border-radius: 999px;
  background: linear-gradient(145deg, #fffaf0, #f1d3a6 58%, #c28f56);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.85),
    inset 0 -6px 10px rgba(82, 62, 30, 0.2),
    0 8px 16px rgba(82, 62, 30, 0.2);
  transform: rotateX(8deg) rotateY(-7deg);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

a:hover .icon-3d-wrap img,
a:hover img[src*="/assets/icons/product-icons/"],
a:hover img[class*="aspect-square"][class*="object-contain"][class*="mix-blend-multiply"],
a:hover img[class*="aspect-square"][class*="object-cover"][class*="rounded-full"] {
  transform: translateY(-2px) rotateX(6deg) rotateY(7deg) scale(1.05);
  filter: saturate(1.08) contrast(1.03);
}

html.icons-3d svg:not([data-no-3d]) {
  filter:
    drop-shadow(0 5px 0 rgba(154, 117, 49, 0.18))
    drop-shadow(0 10px 14px rgba(82, 62, 30, 0.18));
  transform: rotateX(8deg) rotateY(-6deg);
  transform-origin: center;
  transition: transform 160ms ease, filter 160ms ease;
}

a:hover svg:not([data-no-3d]),
button:hover svg:not([data-no-3d]) {
  transform: translateY(-1px) rotateX(5deg) rotateY(6deg) scale(1.04);
}

.icon-3d-symbol {
  min-width: 1.15em;
  color: var(--icon-3d-face);
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 1px 0 #ffe7b5,
    0 2px 0 #d79b42,
    0 3px 0 #a4672e,
    0 6px 8px rgba(82, 62, 30, 0.28);
}

.icon-3d-stars {
  display: inline-flex;
  gap: 0.06rem;
  color: #ffd166;
  vertical-align: -0.08em;
}

.icon-3d-bullet {
  color: #caa85b;
  font-size: 0.95em;
  margin-top: 0.08em;
}

.icon-3d-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.icon-3d-link::before {
  content: "";
  width: 0.78em;
  height: 0.78em;
  flex: 0 0 auto;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 22%, #ffffff 0 15%, transparent 16%),
    linear-gradient(145deg, #ffe5a3, #caa85b 58%, #9a7531);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -3px 4px rgba(82, 62, 30, 0.22),
    0 4px 0 rgba(82, 62, 30, 0.16),
    0 8px 12px rgba(82, 62, 30, 0.16);
}

.bg-paper .icon-3d-wrap,
.bg-paper .icon-3d-symbol {
  filter: none;
}

.bg-paper .icon-3d-wrap::before {
  box-shadow: inset 0 1px 0 var(--icon-3d-glow), 0 3px 8px rgba(82, 62, 30, 0.1);
}

.bg-paper .icon-3d-wrap img,
html.icons-3d .bg-paper img[src*="/assets/icons/product-icons/"],
html.icons-3d .bg-paper img[class*="aspect-square"][class*="object-contain"][class*="mix-blend-multiply"],
html.icons-3d .bg-paper img[class*="aspect-square"][class*="object-cover"][class*="rounded-full"] {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 3px 8px rgba(82, 62, 30, 0.12);
  transform: translateZ(0);
}


@media (max-width: 640px) {
  .icon-3d-wrap,
  .icon-3d-symbol,
  html.icons-3d svg:not([data-no-3d]) {
    filter: none;
  }

  .icon-3d-wrap::before {
    box-shadow: inset 0 1px 0 var(--icon-3d-glow), 0 3px 8px rgba(82, 62, 30, 0.1);
  }
}
html.icons-3d img.tarot-hero-3d {
  border-radius: 999px;
  padding: 0.35rem;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.24) 34%, transparent 35%),
    linear-gradient(145deg, #fffaf0, #f1d3a6 52%, #c28f56 72%, #a768d2 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.86),
    inset 0 -7px 12px rgba(82, 62, 30, 0.2),
    0 8px 0 rgba(120, 70, 148, 0.1),
    0 16px 24px rgba(82, 62, 30, 0.2);
  filter: saturate(1.08) contrast(1.04) drop-shadow(0 10px 14px rgba(74, 38, 106, 0.18));
  transform: perspective(520px) rotateX(8deg) rotateY(-7deg) translateY(-1px);
  transform-origin: center;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

html.icons-3d .text-center:hover > img.tarot-hero-3d,
html.icons-3d img.tarot-hero-3d:hover {
  transform: perspective(520px) rotateX(6deg) rotateY(7deg) translateY(-4px) scale(1.04);
  filter: saturate(1.14) contrast(1.06) drop-shadow(0 12px 18px rgba(74, 38, 106, 0.22));
}

@media (max-width: 640px) {
  html.icons-3d img.tarot-hero-3d {
    box-shadow:
      inset 0 2px 0 rgba(255, 255, 255, 0.78),
      inset 0 -5px 9px rgba(92, 48, 125, 0.18),
      0 10px 16px rgba(62, 31, 92, 0.16);
    transform: perspective(480px) rotateX(7deg) rotateY(-6deg);
  }
}

/* Minimal modern menu refresh */
header {
  background: #ffffff !important;
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid #e5e7eb !important;
}

header a[href^="/"] {
  color: #111111 !important;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 140ms ease, opacity 140ms ease;
}

header a[href^="/"]:hover {
  color: #000000 !important;
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

header a[href^="/"][aria-current="page"],
header a[href^="/"].active {
  color: #000000 !important;
}

header button,
header [role="button"] {
  color: #111111 !important;
}

.brand-wordmark-3d {
  color: #ffffff !important;
  background: #111111 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.18) !important;
}

.brand-wordmark-3d::before {
  background: #ffffff !important;
  box-shadow: none !important;
}
