/* ZooLands store. The site's own blocks, with what only the store needs: the name field,
   the package cards and the sold tint on a colour swatch. Nothing here restyles the site. */

/* ─── The name, asked once ──────────────────────────────────────────────────── */

.who-block {
  margin-top: 2rem; padding: 1.25rem 1.5rem; position: relative; overflow: hidden;
  background: var(--block-color); border: var(--block-border-width) solid var(--block-border);
  border-radius: var(--border-radius); box-shadow: var(--box-shadow);
}
.who-line { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.who-line > i { color: var(--primary-color); }
.who-label { color: var(--text-secondary); font-weight: 600; }
.who-input {
  flex: 1 1 220px; min-width: 0; padding: 0.7rem 0.9rem; font: inherit; font-size: 1rem;
  color: var(--text-primary); background: var(--block-light, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--block-border); border-radius: calc(var(--border-radius) / 2);
}
.who-input::placeholder { color: var(--text-muted); }
.who-input:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 1px; }
.who-button {
  padding: 0.7rem 1.4rem; font: inherit; font-weight: 700; cursor: pointer;
  color: var(--icon-primary, #1a1a1a); background: var(--primary-color);
  border: none; border-radius: calc(var(--border-radius) / 2);
  transition: filter 0.2s ease;
}
.who-button:hover { filter: brightness(1.08); }
.who-button[disabled] { opacity: 0.6; cursor: default; }
.who-note { margin: 0.7rem 0 0; font-size: 0.9rem; }
.who-note.good { color: #7ED957; }
.who-note.bad { color: #FF7A7A; }

/* ─── A group of packages ───────────────────────────────────────────────────── */

.store-group { margin-top: 2.5rem; }
.store-group-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.store-group-head h2 { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); }
.store-group-head p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1.5rem; }
.store-grid.colours { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }

.pack {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 0.7rem;
  padding: 1.5rem; height: 100%;
  background: var(--block-color); border: var(--block-border-width) solid var(--block-border);
  border-radius: var(--border-radius); box-shadow: var(--box-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pack:hover { transform: translateY(-3px); }
.pack .accent { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 70px; height: 8px; border-radius: 0 0 6px 6px; }
.pack .eclipse { position: absolute; right: -90px; top: -90px; width: 220px; height: 220px; border-radius: 50%; background: var(--block-light); pointer-events: none; }
.pack > * { position: relative; }

.pack-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.pack-name { font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; gap: 0.6rem; }
.pack-name i { font-size: 1rem; }
.pack-price { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--primary-color); white-space: nowrap; }
.pack-tagline { color: var(--text-secondary); margin: 0; }
.pack-perks { margin: 0.2rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.pack-perks li { color: var(--text-secondary); font-size: 0.92rem; display: flex; gap: 0.55rem; align-items: flex-start; }
.pack-perks li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--primary-color); font-size: 0.75rem; line-height: 1.5; }
.pack-buy {
  margin-top: auto; padding: 0.75rem 1rem; font: inherit; font-weight: 700; cursor: pointer;
  color: var(--icon-primary, #1a1a1a); background: var(--primary-color);
  border: none; border-radius: calc(var(--border-radius) / 2);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: filter 0.2s ease;
}
.pack-buy:hover { filter: brightness(1.08); }
.pack-buy[disabled] { opacity: 0.55; cursor: default; }

/* A colour card is mostly the colour itself. */
.pack.colour { gap: 0.55rem; padding: 1.25rem; }
.pack.colour .swatch {
  border-radius: calc(var(--border-radius) / 2); padding: 0.6rem 0.8rem; font-weight: 700;
  background: rgba(0, 0, 0, 0.35); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pack.colour .pack-name { font-size: 1.05rem; }

@media (max-width: 700px) {
  .who-line { gap: 0.6rem; }
  .who-label { flex-basis: 100%; }
}

/* ─── The shop: a rail of categories, the chosen one beside it ───────────────── */

.shop { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; align-items: start; }
.store-shelf > :first-child { margin-top: 0; }
/* The rail is as wide as its longest name asks; two-line tabs stay one line where they fit. */
.rail-tab span:not(.rail-count) { line-height: 1.25; }

.store-rail {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 0.8rem;
  background: var(--block-color); border: var(--block-border-width) solid var(--block-border);
  border-radius: var(--border-radius); box-shadow: var(--box-shadow);
  position: sticky; top: 1rem;
}
.rail-tab {
  display: flex; align-items: center; gap: 0.7rem; width: 100%; text-align: left;
  padding: 0.75rem 0.9rem; font: inherit; font-weight: 600; cursor: pointer;
  color: var(--text-secondary); background: transparent; border: none;
  border-radius: calc(var(--border-radius) / 2); transition: background 0.2s ease, color 0.2s ease;
}
.rail-tab i { width: 1.1rem; text-align: center; color: var(--text-muted); transition: color 0.2s ease; }
.rail-tab:hover { background: var(--block-light); color: var(--text-primary); }
.rail-tab.on { background: var(--primary-color); color: var(--icon-primary, #1a1a1a); }
.rail-tab.on i { color: inherit; }
.rail-count {
  margin-left: auto; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 0.1rem 0.45rem; border-radius: 999px; background: rgba(0, 0, 0, 0.25);
}
.rail-tab.on .rail-count { background: rgba(0, 0, 0, 0.18); }

.shelf-head { margin-bottom: 1.2rem; }
.shelf-head h2 { font-size: 1.7rem; font-weight: 800; color: var(--text-primary); }
.shelf-head p { margin: 0.3rem 0 0; color: var(--text-muted); }

.pack-note { margin: 0.1rem 0 0; font-size: 0.85rem; color: var(--text-muted); }

@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; }
  .store-rail { position: static; flex-direction: row; flex-wrap: wrap; }
  .rail-tab { width: auto; }
}

/* ─── Cards: the thing's own picture, its name, its price, two buttons ───────── */

.store-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.store-grid.colours { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.pack { flex-direction: row; align-items: center; gap: 1.2rem; padding: 1.25rem; }
.pack-art {
  flex: 0 0 auto; width: 110px; height: 110px; display: grid; place-items: center;
  background: var(--block-light, rgba(255, 255, 255, 0.04));
  border-radius: calc(var(--border-radius) / 1.5); overflow: hidden;
}
.pack-art img { max-width: 82%; max-height: 82%; image-rendering: pixelated; }
.pack-art i { font-size: 2.4rem; }
.pack-art.swatch { position: relative; }
.pack-art.swatch .swatch-word {
  font-size: 2.6rem; font-weight: 900; color: rgba(0, 0, 0, 0.55); line-height: 1;
}
.pack-words { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; flex: 1 1 auto; }
.pack-name { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); margin: 0; }
.pack-price { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.pack-buttons { display: flex; gap: 0.6rem; margin-top: 0.2rem; }
.pack-info, .pack-add {
  flex: 1 1 0; padding: 0.6rem 0.9rem; font: inherit; font-size: 1rem; cursor: pointer;
  border: none; border-radius: calc(var(--border-radius) / 2);
  display: inline-flex; align-items: center; justify-content: center;
  transition: filter 0.2s ease;
}
.pack-info { background: var(--block-light, rgba(255, 255, 255, 0.07)); color: var(--text-secondary); }
.pack-info:hover { filter: brightness(1.25); color: var(--text-primary); }
.pack-add { background: var(--primary-color); color: var(--icon-primary, #1a1a1a); }
.pack-add:hover { filter: brightness(1.08); }

/* ─── The name, wanted before anything else ─────────────────────────────────── */

.who-block.needed { border-color: var(--primary-color); }
#who-pill.set i { color: #7ED957; }
.cart-count {
  margin-left: 0.5rem; min-width: 1.4rem; padding: 0.05rem 0.4rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 800; font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.25);
}
.cart-count.some { background: #FF4B4B; color: #fff; }

/* ─── The basket ────────────────────────────────────────────────────────────── */

.cart {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); z-index: 60;
  display: flex; flex-direction: column;
  background: var(--block-color); border-left: var(--block-border-width) solid var(--block-border);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.45);
  transform: translateX(100%); transition: transform 0.25s ease; visibility: hidden;
}
.cart.open { transform: none; visibility: visible; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.3rem; border-bottom: 1px solid var(--block-border); }
.cart-head h2 { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); }
.cart-x { background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 0.3rem; }
.cart-x:hover { color: var(--text-primary); }
.cart-lines { flex: 1 1 auto; overflow-y: auto; padding: 1rem 1.3rem; display: flex; flex-direction: column; gap: 0.8rem; }
.cart-empty { color: var(--text-muted); }
.cart-line { display: flex; align-items: center; gap: 0.8rem; }
.cart-art { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.cart-dot { width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto; }
.cart-words { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.cart-name { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-price { color: var(--text-muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.cart-drop { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 0.3rem; }
.cart-drop:hover { color: #FF7A7A; }
.cart-foot { padding: 1.1rem 1.3rem; border-top: 1px solid var(--block-border); display: flex; flex-direction: column; gap: 0.8rem; }
.cart-sum { display: flex; justify-content: space-between; align-items: baseline; color: var(--text-secondary); }
.cart-sum strong { font-size: 1.3rem; color: var(--primary-color); font-variant-numeric: tabular-nums; }
.cart-note { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.cart .pack-buy { margin-top: 0; }

/* ─── What a package gives ──────────────────────────────────────────────────── */

.sheet {
  position: fixed; inset: 0; z-index: 70; display: none; place-items: center; padding: 1.5rem;
  background: rgba(0, 0, 0, 0.6);
}
.sheet.open { display: grid; }
.sheet-box {
  position: relative; width: min(460px, 100%); max-height: 84vh; overflow-y: auto; padding: 1.6rem;
  background: var(--block-color); border: var(--block-border-width) solid var(--block-border);
  border-radius: var(--border-radius); box-shadow: var(--box-shadow);
}
.sheet-box .cart-x { position: absolute; top: 0.9rem; right: 1rem; }
.sheet-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.8rem; }
.sheet-art { width: 84px; height: 84px; object-fit: contain; image-rendering: pixelated; }
.sheet-head h3 { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); }
.sheet-price { margin: 0.2rem 0 0; font-weight: 800; color: var(--primary-color); }
.sheet-tagline { color: var(--text-secondary); margin: 0 0 0.8rem; }
.sheet-box .pack-buy { width: 100%; margin-top: 1.2rem; }

@media (max-width: 520px) {
  .pack { flex-direction: column; align-items: stretch; text-align: center; }
  .pack-art { width: 100%; height: 130px; }
}

/* The player's own face, once the server has confirmed the name. */
.pill-head { width: 22px; height: 22px; image-rendering: pixelated; border-radius: 5px; }
.who-head { width: 34px; height: 34px; image-rendering: pixelated; border-radius: 7px; flex: 0 0 auto; }
#who-pill.set { background: #7ED957; color: #14301c; }

/* ─── One package, on its own page ──────────────────────────────────────────── */

.product { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; margin-top: 2rem; }
.product-art {
  display: grid; place-items: center; padding: 2rem; min-height: 240px;
  background: var(--block-color); border: var(--block-border-width) solid var(--block-border);
  border-radius: var(--border-radius); box-shadow: var(--box-shadow);
}
.product-art img { max-width: 100%; max-height: 200px; image-rendering: pixelated; }
.product-art.swatch .swatch-word { font-size: 5rem; font-weight: 900; color: rgba(0, 0, 0, 0.55); line-height: 1; }
.product-words {
  padding: 1.8rem; background: var(--block-color);
  border: var(--block-border-width) solid var(--block-border);
  border-radius: var(--border-radius); box-shadow: var(--box-shadow);
}
.product-price { margin: 0 0 1.2rem; font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.product-heading { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin: 0 0 0.6rem; }
.product-words .pack-buy { width: 100%; margin-top: 1.4rem; }
.product-back { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.5rem; color: var(--text-muted); font-weight: 600; }
.product-back:hover { color: var(--primary-color); }

@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; }
}

/* Blocks never share an edge, and the gap is always on the outside of the shop rather than
   on something inside it: a margin on the shelf's first block pushed the shelf down while
   the rail beside it stayed put, and the two columns no longer started level (the owner,
   2026-09-22: "make it all aligned, now the category thing is a bit above"). */
.who-block { margin-bottom: 2rem; }
.who-block[hidden] { display: none; }
.shop, #product { margin-top: 2rem; }
.shop > *, #product > .category-page-block:first-child { margin-top: 0; }

/* ─── The shop window: who bought what, lately ──────────────────────────────── */

.recent-block { margin-top: 2rem; }
.recent { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 0.9rem; position: relative; z-index: 2; }
.recent-line {
  display: flex; align-items: center; gap: 0.75rem; min-width: 0;
  padding: 0.7rem 0.9rem; background: var(--block-dark);
  border-radius: calc(var(--border-radius) / 1.5);
}
.recent-head { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 7px; image-rendering: pixelated; }
.recent-words { min-width: 0; }
.recent-what { margin: 0; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.35; }
.recent-what strong { color: var(--text-primary); }
/* A long package name wraps rather than pushing the block wider than the phone. */
.recent-name { font-weight: 700; overflow-wrap: anywhere; }
.recent-when { margin: 0.1rem 0 0; color: var(--text-muted); font-size: 0.8rem; }
.recent-none { margin: 0; color: var(--text-muted); }

/* ─── Phones ────────────────────────────────────────────────────────────────── */

/* The rail wrapped into four lines of tabs and pushed the shop itself below the fold.
   One line that slides sideways instead, the way a shop app does it, with the chosen tab
   scrolled into view by the page. */
@media (max-width: 900px) {
  .store-rail {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .store-rail::-webkit-scrollbar { display: none; }
  .rail-tab { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
}

/* A finger is about nine millimetres. Everything that can be tapped is given a target it
   can actually hit, which the two buttons on a card and the basket cross were not. */
@media (max-width: 620px), (hover: none) {
  .pack-info, .pack-add, .who-button, .pack-buy { min-height: 44px; }
  .who-input { min-height: 44px; }
  .cart-x, .cart-drop { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .rail-tab { min-height: 44px; }
  .product-back { padding: 0.5rem 0; min-height: 44px; }
}

/* A card is a column at this width, so its words line up with its picture rather than
   sitting centred over a left-aligned name. */
@media (max-width: 520px) {
  .pack { text-align: left; }
  .pack-art { height: 120px; }
  .pack-buttons { gap: 0.5rem; }
}
