/* =========================================================================
   TarnishedMC webstore theme
   Layered on top of Exo's shared.css. Loaded last (see head.twig).
   ========================================================================= */

/* ---- Seasonal swap: change these to re-skin a season without touching the rest ---- */
:root {
  --tmc-hero: none;
  --tmc-hero-position: center 60%;
  --tmc-accent: #D2B272;          /* highlight gold (current menu item, titles) */
}

/* ---- Brand + materials ---- */
:root {
  --tmc-green: #0E2A22;
  --tmc-gold: #AA8A4B;
  --tmc-ink: #ECE5D5;
  --tmc-ink-dim: #BDB5A4;
  --tmc-paper-ink: #2B2218;
  --tmc-paper-dim: #56472F;
  --tmc-tex-wall: none;     /* real URLs are set in head.twig */
  --tmc-tex-stone: none;
  --tmc-tex-sign: none;
  --tmc-tex-paper: none;
  --tmc-tex-iron: none;
  --tmc-tex-gmetal: none;
  --tmc-gold-grad: linear-gradient(180deg, #ecd59a 0%, #c4a160 38%, #9a7838 52%, #c9a764 100%);
  --tmc-green-grad: linear-gradient(180deg, rgba(70,140,112,.55), rgba(14,42,34,.35) 55%, rgba(40,95,75,.5));
  --tmc-ease: cubic-bezier(.2,.8,.2,1);

  /* Exo variables, retuned so Tebex's own UI (basket, popups, checkout) matches */
  --color-text: #ECE5D5;
  --color-text-darker: #DDD4C2;
  --color-text-secondary: #BDB5A4;
  --color-text-dark: #140f08;
  --color-bg: #0b120f;
  --color-brighter-bg: #121c18;
  --color-primary: #C9A764;
  --color-primary-hover: #E2C585;
  --color-primary-text: #1a1208;
  --color-primary-text-hover: #1a1208;
  --color-secondary: #3a5a4d;
  --color-secondary-hover: #4b7362;
  --color-secondary-text: #ECE5D5;
  --color-secondary-text-hover: #fff;
  --sidebar-width: 320px;
  --tebex-legal-footer-background-color: #070c0a;
  --tebex-legal-footer-border-color: #1d2a25;
  --tebex-legal-footer-text-color: #9aa49e;
}

html { scrollbar-color: #3b4a42 #0a1310; }
body {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--tmc-ink);
  background:
    linear-gradient(180deg, rgba(6,10,8,.72), rgba(8,14,11,.6) 600px, rgba(6,10,8,.78)),
    var(--tmc-tex-wall) center top / 560px auto,
    #0a1310;
}
body::before { display: none !important; }   /* the base theme's faded banner */
::selection { background: var(--tmc-gold); color: #140f08; }
:focus-visible { outline: 2px solid var(--tmc-accent); outline-offset: 3px; }

/* ===================== Header: hero ===================== */
.site-header.tmc-header { max-width: none; padding: 0; }
.tmc-hero {
  position: relative;
  background: var(--tmc-hero) var(--tmc-hero-position) / cover no-repeat, #0a1310;
}
.tmc-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(28% 55% at 12% 50%, rgba(6,14,11,.6), transparent 70%),
    radial-gradient(28% 55% at 88% 50%, rgba(6,14,11,.5), transparent 70%),
    linear-gradient(180deg, rgba(8,26,21,.25), rgba(8,26,21,0) 40%, rgba(8,20,16,.85) 100%);
}
.tmc-hero .site-header-inner { position: relative; z-index: 2; }
.tmc-hero .site-header-inner .info .title,
.tmc-hero .site-header-inner .log-in { font-family: Cinzel, serif; letter-spacing: .06em; }
.tmc-hero .site-header-inner .info { text-shadow: 0 1px 8px rgba(0,0,0,.9); color: var(--tmc-ink); }
.tmc-hero .site-header-inner .info .image { color: var(--tmc-ink); }
.tmc-hero .site-header-inner .info .action { color: var(--tmc-accent); }
.tmc-hero .site-header-inner .site-title img { filter: drop-shadow(0 8px 20px rgba(0,0,0,.6)); }

@media (width > 960px) {
  .tmc-hero .site-header-inner,
  body.is-navigation-horizontal .tmc-hero .site-header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    height: 330px;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
  }
  .tmc-hero .site-header-inner .actions { display: none; }
  .tmc-hero .site-header-inner .log-in,
  .tmc-hero .site-header-inner .user-actions { top: 18px; right: var(--content-padding); }
  .tmc-hero .site-header-inner .log-in {
    background: none; font-size: 13px; font-weight: 600; letter-spacing: .16em;
    text-transform: uppercase; color: var(--tmc-ink); text-shadow: 0 1px 6px #000;
  }
  .tmc-hero .site-header-inner .site-title {
    position: static; inset: auto; grid-column: 2; grid-row: 1;
    width: auto; height: auto; margin: 0; line-height: 1;
  }
  .tmc-hero .site-header-inner .site-title img { width: 390px; max-width: 100%; max-height: none; }
  .tmc-hero .site-header-inner .info {
    position: relative; inset: auto; grid-row: 1;
    max-width: none; height: auto; margin: 0;
    display: flex; flex-direction: column; justify-content: center;
    min-height: 40px; padding-left: 44px; width: auto;
  }
  .tmc-hero .site-header-inner .info.server { grid-column: 1; justify-self: start; }
  .tmc-hero .site-header-inner .info.discord { grid-column: 3; justify-self: end; padding: 0 44px 0 0; text-align: right; }
  .tmc-hero .site-header-inner .info .image { position: absolute; top: 0; bottom: 0; left: 0; margin: auto; width: 30px; height: 30px; }
  .tmc-hero .site-header-inner .info.server { padding-left: 44px; }
  .tmc-hero .site-header-inner .info.discord .image { left: auto; right: 0; }
  .tmc-hero .site-header-inner .info .title { font-size: 15px; line-height: 22px; font-weight: 600; }
  .tmc-hero .site-header-inner .info .action { font-size: 12.5px; line-height: 18px; background: none; padding: 0; text-align: inherit; }
}

/* ===================== Header: stone menu bar ===================== */
.tmc-beam {
  position: relative; z-index: 5;
  padding: 9px 0;
  box-shadow: 0 10px 18px rgba(0,0,0,.6);
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,0) 18%, rgba(0,0,0,0) 70%, rgba(0,0,0,.45)),
    linear-gradient(rgba(20,24,22,.42), rgba(20,24,22,.42)),
    var(--tmc-tex-stone) center / 300px auto;
}
/* green-metal bands edged in gold */
.tmc-beam::before, .tmc-beam::after {
  content: ""; position: absolute; left: 0; right: 0; height: 9px; z-index: 1;
  background:
    linear-gradient(180deg, #e2c585 0 1.5px, transparent 1.5px calc(100% - 1.5px), #8a6a32 calc(100% - 1.5px)),
    var(--tmc-green-grad),
    var(--tmc-tex-gmetal) center / 260px;
  box-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.tmc-beam::before { top: 0; }
.tmc-beam::after { bottom: 0; }
.tmc-beam .navigation-horizontal { border: 0; }
@media (width > 960px) {
  .tmc-beam .navigation-horizontal .menu {
    gap: 0 30px; padding: 0;
    background: radial-gradient(50% 120% at 50% 50%, rgba(8,10,9,.55), transparent 75%);
    font-family: Cinzel, serif; font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  }
  .tmc-beam .navigation-horizontal .menu > li > a {
    position: relative; padding: 16px 6px; max-width: none;
    color: #F6EEDA;
    text-shadow: 0 1px 1px #000, 0 0 8px rgba(0,0,0,.95), 0 0 2px #000;
  }
  .tmc-beam .navigation-horizontal .menu > li > a:hover { color: #fff; }
  .tmc-beam .navigation-horizontal .menu > li > a.link-active { color: var(--tmc-accent); }
  .tmc-beam .navigation-horizontal .menu > li > a.link-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 2px;
    background: var(--tmc-gold); box-shadow: 0 1px 0 #000;
  }
  .tmc-beam .navigation-horizontal .has-children > ul { background: rgba(12,18,15,.92); border: 1px solid #8a6a32; }
}

/* ===================== Hanging category signs (home) ===================== */
.site-home-categories.tmc-signs { position: relative; z-index: 4; margin-top: 0; }
@media (width > 960px) {
  .site-home-categories.tmc-signs {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px; padding: 0 calc(var(--content-padding) + 24px);
  }
}
.site-home-categories .category.tmc-sign {
  position: relative; display: block;
  padding: 52px 0 0; border: 0; background: none;
  text-align: center; color: inherit;
  transform-origin: 50% 0;
  transition: transform .9s cubic-bezier(.25,1.7,.45,1);
}
.tmc-sign:hover, .tmc-sign:focus-visible { transform: rotate(-3deg); }
.tmc-sign:nth-child(even):hover, .tmc-sign:nth-child(even):focus-visible { transform: rotate(3deg); }
.tmc-sign:focus-visible { outline: none; }
.tmc-sign:focus-visible .tmc-plank { outline: 2px solid var(--tmc-accent); }
.tmc-chain {
  position: absolute; top: 0; width: 3px; height: 56px;
  background: repeating-linear-gradient(180deg, #8a8a8a 0 5px, #2b2b2b 5px 7px);
  box-shadow: 1px 0 0 #000;
}
.tmc-chain.a { left: 24%; } .tmc-chain.b { right: 24%; }
.tmc-plank {
  position: relative; display: block;
  padding: 26px 18px 22px; border: 2px solid #150e07;
  background: linear-gradient(180deg, rgba(60,38,18,.35), rgba(20,12,5,.55)), var(--tmc-tex-sign) center / 300px auto;
  box-shadow:
    0 22px 26px -12px rgba(0,0,0,.85),
    inset 0 0 0 5px rgba(0,0,0,.2), inset 0 0 0 6px #b9975a,
    inset 0 0 0 8px var(--tmc-green), inset 0 0 0 9px rgba(210,178,114,.55);
}
/* metal corner brackets: gold L under, green-metal L on top */
.tmc-plank::before, .tmc-plank::after { content: ""; position: absolute; pointer-events: none; background-repeat: no-repeat; }
.tmc-plank::after {
  inset: -3px;
  --g: linear-gradient(#e2c585, #8a6a32);
  background-image: var(--g), var(--g), var(--g), var(--g), var(--g), var(--g), var(--g), var(--g);
  background-size: 34px 9px, 9px 34px, 34px 9px, 9px 34px, 34px 9px, 9px 34px, 34px 9px, 9px 34px;
  background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.7));
}
.tmc-plank::before {
  inset: -1px; z-index: 1;
  --gm: linear-gradient(180deg, #4f9a7e, #14392e 60%, #2a6450);
  background-image: var(--gm), var(--gm), var(--gm), var(--gm), var(--gm), var(--gm), var(--gm), var(--gm);
  background-size: 30px 5px, 5px 30px, 30px 5px, 5px 30px, 30px 5px, 5px 30px, 30px 5px, 5px 30px;
  background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%;
}
.tmc-plank .image { width: 128px; height: 128px; object-fit: contain; margin: 0 auto 10px; filter: drop-shadow(0 8px 8px rgba(0,0,0,.6)); }
.tmc-sign-name {
  display: block;
  font: 700 23px/1.2 Cinzel, serif; letter-spacing: .1em;
  color: var(--tmc-accent); text-shadow: 0 2px 0 rgba(0,0,0,.8);
}

/* ===================== Page body ===================== */
.site { row-gap: 0; }
.site-content.site-content-widgets { padding-top: 48px; padding-bottom: 90px; }
@media (width > 960px) {
  body.is-sidebar-right .site-content-widgets { gap: 52px; }
}

/* ---- Parchment ---- */
.tmc-paper.tmc-paper.tmc-paper,
.store-sidebar .widget.widget {
  position: relative;
  border-radius: 0;
  color: var(--tmc-paper-ink);
  border: 0; border-image: none;
  background:
    radial-gradient(140% 110% at 50% 45%, transparent 52%, rgba(90,60,25,.42) 100%),
    linear-gradient(rgba(240,226,192,.48), rgba(228,208,166,.5)),
    var(--tmc-tex-paper) center / 420px auto;
  box-shadow: 0 14px 24px -10px rgba(0,0,0,.75), 0 2px 3px rgba(0,0,0,.4);
}

/* ---- Hand-forged square nails (pseudo-elements, so no extra markup) ---- */
.tmc-paper::before,
.tmc-nails-2::after,
.store-sidebar .widget::before {
  content: ""; position: absolute; top: 10px; left: 50%; z-index: 3;
  width: 13px; height: 13px; margin-left: -6.5px;
  border-radius: 2px 3px 1px 3px;
  transform: rotate(var(--r, 7deg));
  background:
    radial-gradient(circle at 30% 25%, rgba(255,240,210,.35), transparent 45%),
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,0,0,.55)),
    linear-gradient(rgba(30,28,26,.45), rgba(30,28,26,.45)),
    var(--tmc-tex-iron) var(--np, 35% 40%) / 180px;
  box-shadow:
    inset 1px 1px 0 rgba(255,235,200,.28), inset -1px -1px 0 rgba(0,0,0,.65),
    0 3px 3px rgba(0,0,0,.7), 1px 5px 6px rgba(0,0,0,.35);
}
.tmc-nails-2::before { left: 20px; margin: 0; --r: -9deg; --np: 70% 20%; }
.tmc-nails-2::after  { left: auto; right: 20px; margin: 0; --r: 13deg; --np: 15% 80%; }
.tmc-item:nth-child(odd)::before { --r: -11deg; --np: 80% 50%; }
.tmc-item:nth-child(3n)::before  { --r: 4deg; --np: 40% 10%; }
.store-sidebar .widget:nth-child(2)::before { --r: -5deg; --np: 60% 60%; }
.store-sidebar .widget:nth-child(3)::before { --r: 16deg; --np: 20% 30%; }

/* ---- Text notices: welcome, about, category intro ---- */
.tmc-notice,
.store-text.tmc-notice,
.category-description.tmc-notice {
  padding: 46px 52px 40px;
  margin-bottom: 0;
  transform: rotate(-.4deg);
  color: #3c3123;
  font-size: 16px; line-height: 1.6;
}
.tmc-notice.text-content :is(h1, h2, h3, h4, h5, h6) { color: var(--tmc-paper-ink); font-family: Cinzel, serif; font-weight: 700; line-height: 1.2; }
.tmc-notice.text-content h1 { font-size: 32px; }
.tmc-notice.text-content h2 { font-size: 28px; }
.tmc-notice.text-content h3 { font-size: 18px; margin-top: 26px; }
.tmc-notice.text-content h4 { font-family: "Hanken Grotesk", sans-serif; font-weight: 400; font-size: 17px; color: var(--tmc-paper-dim); }
.tmc-notice.text-content :is(h1, h2, h3, h4) :is(em, strong, span) { font: inherit; color: inherit; }
.tmc-notice.text-content p { color: #3c3123; max-width: 72ch; }
.tmc-notice.text-content a { color: #6b4f1d; text-decoration: underline; text-underline-offset: 3px; }
.tmc-notice.text-content ul { padding-left: 20px; columns: 2; column-gap: 36px; color: #3c3123; }
.tmc-notice.text-content li { margin-bottom: 6px; break-inside: avoid; font-size: 15px; list-style: disc; }
.category-description.tmc-notice { margin-bottom: 0; }

/* ---- Screenshot prints pinned in the welcome notice ---- */
.tmc-prints { display: grid; grid-template-columns: 1fr 1fr; margin: 30px 6px 26px; }
.tmc-prints[hidden] { display: none; }
.tmc-print { position: relative; margin: 0; background: #e9e1cc; padding: 9px 9px 10px; box-shadow: 0 12px 18px -8px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.35); }
.tmc-print img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: sepia(.12) saturate(.92) contrast(1.03); }
.tmc-print:nth-child(1) { transform: rotate(-2.4deg) translateY(4px); z-index: 1; }
.tmc-print:nth-child(2) { transform: rotate(1.8deg) translate(-14px, -6px); z-index: 2; }
.tmc-print::before {
  content: ""; position: absolute; top: -5px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; z-index: 3;
  border-radius: 2px 3px 1px 3px; transform: rotate(var(--r, 8deg));
  background: radial-gradient(circle at 30% 25%, rgba(255,240,210,.35), transparent 45%), linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,0,0,.55)), linear-gradient(rgba(30,28,26,.45), rgba(30,28,26,.45)), var(--tmc-tex-iron) 30% 60% / 180px;
  box-shadow: inset 1px 1px 0 rgba(255,235,200,.28), inset -1px -1px 0 rgba(0,0,0,.65), 0 3px 3px rgba(0,0,0,.7);
}
.tmc-print:nth-child(2)::before { --r: -12deg; }

/* ---- Green wax seal on the Ranks intro ---- */
.tmc-sealed.tmc-notice { padding-right: 130px; }
.tmc-seal {
  position: absolute; top: 34px; right: 40px; z-index: 4;
  width: 66px; height: 66px;
  display: grid; place-items: center;
  border-radius: 47% 53% 50% 48% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 35% 30%, #5fa287 0, #2b6a54 28%, var(--tmc-green) 70%, #081a15 100%);
  box-shadow: inset 0 0 0 5px rgba(8,26,21,.55), inset 0 0 0 7px rgba(95,162,135,.35), inset 2px 3px 4px rgba(255,255,255,.15), 0 6px 10px rgba(0,0,0,.55);
  font: 700 30px Cinzel, serif; color: #c9a764;
  text-shadow: 0 1px 0 #061510, 0 -1px 0 rgba(255,230,180,.25);
  transform: rotate(-8deg);
}
.tmc-seal::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; border: 1.5px solid rgba(201,167,100,.55); }

/* ---- Section headings with a green-metal rule ---- */
.tmc-secthead {
  display: flex; align-items: center; gap: 14px;
  margin: 54px 0 18px;
  font: 700 22px Cinzel, serif; color: var(--tmc-ink);
  text-shadow: 0 2px 4px rgba(0,0,0,.6);
}
.tmc-secthead::after {
  content: ""; flex: 1; height: 6px;
  background: linear-gradient(180deg, #e2c585 0 1px, transparent 1px 5px, #8a6a32 5px), var(--tmc-green-grad), var(--tmc-tex-gmetal) center / 200px;
  -webkit-mask: linear-gradient(90deg, #000 60%, transparent);
          mask: linear-gradient(90deg, #000 60%, transparent);
}

/* ===================== Product notices ===================== */
.store-product.tmc-item {
  padding: 36px 18px 20px;
  border: 0; border-image: none;
  text-align: center; align-items: center;
  transition: opacity .3s, filter .3s, transform .4s var(--tmc-ease);
}
.tmc-item .image-link .image { width: 112px; height: 112px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(60,35,10,.4)); }
.tmc-item .product-title { font: 700 17px/1.25 Cinzel, serif; color: var(--tmc-paper-ink); min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
.tmc-item .product-title a:hover, .tmc-item .image-link:hover ~ .product-title a { color: #6b4f1d; }
.tmc-item .actions { width: 100%; justify-content: center; }
.tmc-item .price { color: var(--tmc-paper-ink); text-align: center; }
.tmc-item .price strong { font: 700 24px Cinzel, serif; font-variant-numeric: tabular-nums; }
.tmc-item .price .discount { color: #8f2a1d; }
.tmc-item .countdown { color: #8f2a1d; }

.tmc-grid.store-products-images { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 26px; margin-top: 40px; }
.tmc-grid.tmc-grid-two { grid-template-columns: repeat(2, minmax(0, 280px)); }
.store-products > .tmc-grid:first-child { margin-top: 8px; }
.tmc-grid .tmc-item:nth-child(3n+1) { transform: rotate(-.8deg); }
.tmc-grid .tmc-item:nth-child(3n+2) { transform: rotate(.6deg); }
.tmc-grid .tmc-item:nth-child(3n)   { transform: rotate(-.3deg); }

/* hover one, the rest step back */
.tmc-focusgroup:hover > .tmc-item,
.store-sidebar:hover > .widget { opacity: .6; filter: saturate(.7); }
.tmc-focusgroup > .tmc-item:hover,
.store-sidebar > .widget:hover { opacity: 1; filter: none; }
.tmc-grid > .tmc-item:hover { transform: translateY(-6px); }
.store-sidebar .widget { transition: opacity .3s, filter .3s, transform .4s var(--tmc-ease); }
.store-sidebar .widget:hover { transform: rotate(0) translateY(-4px); }

/* ---- Gold buttons (solid gold is reserved for buying) ---- */
.store-product .btn-primary,
.popup .btn-primary,
.site-header .btn-primary {
  position: relative; isolation: isolate;
  border: 1px solid #5e4620; border-radius: 0;
  background: var(--tmc-gold-grad);
  color: #1a1208;
  font-family: Cinzel, serif; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255,236,190,.45);
  box-shadow: inset 0 1px 0 rgba(255,240,200,.6), inset 0 -2px 0 rgba(0,0,0,.25), 0 2px 0 var(--tmc-green), 0 3px 0 #a5843f, 0 6px 8px -2px rgba(0,0,0,.5);
  transition: filter .2s;
}
.store-product .btn-primary::after,
.popup .btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--tmc-tex-iron) center / 220px; mix-blend-mode: multiply; opacity: .22;
}
.store-product .btn-primary:hover,
.popup .btn-primary:hover,
.site-header .btn-primary:hover { filter: brightness(1.1); background: var(--tmc-gold-grad); color: #1a1208; }
.tmc-item .btn-primary { white-space: nowrap; font-size: 12.5px; display: flex; align-items: center; justify-content: center; text-align: center; }
.tmc-item .quantity-field .open-basket { color: var(--tmc-paper-ink); font-weight: 700; }
.tmc-item .btn-tertiary { color: var(--tmc-paper-ink); }

/* ===================== Ranks: the noble line ===================== */
.tmc-ladder.store-products-images {
  position: relative;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px; align-items: end; padding-top: 20px;
}
.tmc-ladder .tmc-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tmc-ladder .tmc-links line { stroke: #8a8478; stroke-width: 4; stroke-dasharray: 7 4; stroke-linecap: round; transition: stroke .35s; }
.tmc-ladder .tmc-links line.lit { stroke: var(--tmc-accent); }
.tmc-ladder .tmc-item { padding: 34px 12px 16px; }
.tmc-ladder .tmc-item .image-link .image { width: 84px; height: 84px; }
.tmc-ladder .tmc-item .product-title { font-size: 15px; }
.tmc-ladder .tmc-item .price strong { font-size: 21px; }
.tmc-ladder .tmc-item .btn-primary { font-size: 11px; letter-spacing: .08em; padding-inline: 4px; }
/* the svg is the first child, so ranks start at nth-child(2) */
.tmc-ladder .tmc-item:nth-child(3) { margin-bottom: 26px; }
.tmc-ladder .tmc-item:nth-child(4) { margin-bottom: 52px; }
.tmc-ladder .tmc-item:nth-child(5) { margin-bottom: 78px; }
.tmc-ladder .tmc-item:nth-child(6) { margin-bottom: 104px; }
.tmc-ladder .tmc-item.lit {
  box-shadow: 0 14px 24px -10px rgba(0,0,0,.75), 0 0 0 2px var(--tmc-green), 0 0 0 4px #c9a764, 0 0 0 5px #6b5126;
  transform: translateY(-6px);
}

.tmc-supporters .tmc-item {
  flex-direction: row; flex-wrap: wrap; align-items: center; gap: 22px;
  max-width: 640px; padding: 30px 30px 24px; text-align: left;
  transform: rotate(-.4deg);
}
.tmc-supporters .tmc-item .image-link .image { width: 92px; height: 92px; }
.tmc-supporters .tmc-item .product-title { flex: 1; justify-content: flex-start; min-height: 0; }
.tmc-supporters .tmc-item .actions {
  width: auto; flex: 0 0 200px; flex-direction: column; align-items: stretch; overflow: visible;
}
.tmc-supporters .tmc-item .price { width: 100%; margin: 0; text-align: center; }

/* ===================== Sidebar widgets ===================== */
.store-sidebar { display: flex; flex-direction: column; gap: 30px; }
.store-sidebar .widget { padding: 40px 26px 24px; margin: 0; }
.store-sidebar .widget + .widget { margin-top: 0; }
.store-sidebar .widget:nth-child(1) { transform: rotate(1.1deg); }
.store-sidebar .widget:nth-child(2) { transform: rotate(-1deg); }
.store-sidebar .widget:nth-child(3) { transform: rotate(.6deg); }
.store-sidebar .widget-title {
  margin: 0 0 10px; padding: 0; background: none;
  font: 700 20px Cinzel, serif; color: var(--tmc-paper-ink); text-align: center;
}
.store-sidebar .widget-content { padding: 0; border: 0; color: #4a3d2c; font-size: 14px; }
.store-sidebar .widget-content p { color: #4a3d2c; }
.store-sidebar .empty { color: var(--tmc-paper-dim); font-style: italic; text-align: center; }
.store-sidebar .widget-community-goal .descr { text-align: center; margin-bottom: 16px; }
.store-sidebar .widget-community-goal .descr * { color: inherit; }
/* goal bar set in a green-metal frame with a gold rim */
.store-sidebar .progress {
  height: 16px; overflow: hidden; border-radius: 0; margin: 0 4px 10px;
  border: 1px solid #c9a764;
  background: linear-gradient(rgba(10,20,16,.75), rgba(10,20,16,.75)), var(--tmc-tex-gmetal) center / 200px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.7), 0 0 0 3px #123a2e, 0 0 0 4px #8a6a32;
}
.store-sidebar .progress-bar,
.store-sidebar .progress-bar.striped,
.store-sidebar .progress-bar.striped.animated {
  height: 100%; background: var(--tmc-gold-grad); background-size: auto; animation: none;
}
.store-sidebar .widget-community-goal p:last-child { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.store-sidebar .widget-recent .purchase { border-bottom: 1px dashed rgba(60,45,25,.35); padding: 8px 0; }
.store-sidebar .widget-recent .purchase:last-child { border: 0; }
.store-sidebar .widget-recent .username,
.store-sidebar .widget-top-donator .username { color: var(--tmc-paper-ink); font-weight: 600; }
.store-sidebar .avatar {
  image-rendering: pixelated;
  box-shadow: 0 0 0 1px #8a6a32, 0 0 0 2px var(--tmc-green);
}
.store-sidebar .widget-gift-card .gift-card-input { background: rgba(255,250,235,.6); border: 1px solid #8a6a32; color: var(--tmc-paper-ink); }

/* ===================== Popups, basket, checkout ===================== */
.popup-content {
  background: linear-gradient(rgba(14,22,19,.94), rgba(10,16,13,.96)), var(--tmc-tex-stone) center / 300px;
  border: 1px solid #8a6a32;
  box-shadow: 0 0 0 3px var(--tmc-green), 0 0 0 4px #c9a764, 0 30px 60px rgba(0,0,0,.6);
}
.popup .product-title, .store-product-full .product-title { font-family: Cinzel, serif; color: var(--tmc-ink); }
.store-product-full .actions { background-color: rgba(10,16,13,.8); }
.store-product-full .descr { color: var(--tmc-ink-dim); }

/* ===================== Footer ===================== */
.site-footer { background: #070c0a; border-top: 1px solid #1d2a25; }
.site-footer .copyright { color: #9aa49e; }

/* ===================== Smaller screens: keep it tidy ===================== */
@media (width <= 960px) {
  .tmc-hero .site-header-inner { padding-inline: var(--content-padding); }
  .site-home-categories.tmc-signs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 0 var(--content-padding); }
  .tmc-plank .image { width: 88px; height: 88px; }
  .tmc-sign-name { font-size: 18px; }
  .tmc-notice, .store-text.tmc-notice, .category-description.tmc-notice { padding: 40px 22px 26px; transform: none; }
  .tmc-notice.text-content ul { columns: 1; }
  .tmc-grid.store-products-images, .tmc-grid.tmc-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tmc-ladder.store-products-images { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .tmc-ladder .tmc-item:nth-child(n) { margin-bottom: 0; }
  .tmc-ladder .tmc-links { display: none; }
  .tmc-sealed { padding-right: 22px; }
  .tmc-seal { width: 52px; height: 52px; font-size: 24px; right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .tmc-sign, .tmc-item, .store-sidebar .widget { transition: none; }
}
