/* The toy shop (toys.html, toy-shop.mjs): every toy for anyone to look at, the toys free with every pet, and the
   three packs, each opening the next. Telepawt's own look (brand.css): outlined cards with a navy foot, Lilita
   lettering, the logo's beans for the packs' colours. Room round everything (Owen: "you always cramp everything up"). */

/* As wide as the home page's toys (flow.css keeps other pages to a 620 px column). */
/* Every column as wide as the page and no wider, whatever is inside it. */
.flow-main.toys-main { width: min(1180px, calc(100% - 40px)); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(56px, 8vw, 104px); }
@media (max-width: 600px) { .flow-main.toys-main { width: calc(100% - 32px); } }
.toys-hero { display: grid; justify-items: center; gap: 18px; text-align: center; }
.toys-hero .lead { max-width: 34ch; }
.toys-section { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 14px; text-align: center; }
.toys-heading { font-size: clamp(34px, 4.4vw, 52px); }
.toys-sub { margin-top: -4px; font-size: 18px; font-weight: 700; color: var(--ink-soft); }

/* What happened (back from paying, a pack bought): a white card with a green edge, or red for a problem. */
.toys-notice { justify-self: center; max-width: 560px; padding: 16px 22px; border: 3px solid var(--ink); border-radius: 18px; background: #fff;
  box-shadow: 0 5px 0 var(--ink); font-weight: 700; line-height: 1.45; text-align: center; }
.toys-notice[data-tone="done"] { background: #e9fbd9; }
.toys-notice[data-tone="problem"] { background: var(--danger-soft); color: var(--danger); }

/* A toy: its picture and name on a small outlined card that lifts on hover and opens its preview. */
.toys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; width: 100%; margin-top: 18px; }
.toys-grid--free { grid-template-columns: repeat(auto-fit, minmax(0, 168px)); justify-content: center; }
.toys-tile { position: relative; display: grid; justify-items: center; gap: 6px; width: 100%; height: 100%; padding: 10px 10px 14px; border: 3px solid var(--ink);
  border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: 0 5px 0 var(--ink); cursor: pointer; text-align: center;
  transition: translate .18s var(--click), box-shadow .18s var(--click); }
.toys-tile:hover { translate: 0 -4px; box-shadow: 0 9px 0 var(--ink); }
.toys-tile:active { translate: 0 2px; box-shadow: 0 3px 0 var(--ink); }
.toys-tile:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.toys-tile img { width: min(100%, 112px); height: auto; aspect-ratio: 1; object-fit: contain; }
.toys-tile b { font: 400 18px/1.1 var(--display); letter-spacing: .01em; }
.toys-grid--free .toys-tile { background: #fff7d6; }
/* A toy the visitor already has: a small green tick on its corner. */
.toys-tile-owned { position: absolute; top: -9px; right: -9px; width: 28px; height: 28px; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 2px 0 var(--ink);
  background: var(--go) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-8.5' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* The packs, one under another: a card in its own colour, its name and price tag, its line, its toys, and one thing to do. */
.toys-packs { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 44px); width: 100%; margin-top: 22px; padding: 0; list-style: none; }
.toys-pack { --pack: var(--pink); position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: clamp(26px, 4.4vw, 52px) clamp(18px, 3.4vw, 44px) clamp(28px, 4.4vw, 52px); border: 3px solid var(--ink); border-radius: 28px;
  background: var(--pack); box-shadow: 0 7px 0 var(--ink), 0 24px 48px rgb(18 34 110 / .2); justify-items: center; text-align: center; }
.toys-pack:nth-child(3n+2) { --pack: var(--mint); }
.toys-pack:nth-child(3n+3) { --pack: var(--yellow); }
.toys-pack-head { display: flex; align-items: center; justify-content: center; gap: 14px 22px; flex-wrap: wrap; }
.toys-pack-name { font: 400 clamp(32px, 4vw, 46px)/1 var(--display); color: #fff; -webkit-text-stroke: .11em var(--ink); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--ink); }
/* The price: the site's yellow tag, tipped a little. */
.toys-pack-price { padding: 8px 18px 10px; border: 3px solid var(--ink); border-radius: 16px; rotate: -3deg; box-shadow: 0 4px 0 var(--ink);
  background: radial-gradient(circle at 30% 26%, #fff1b8 0 16%, var(--yellow) 17%); font: 400 30px/1 var(--display); color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.toys-pack:nth-child(3n+3) .toys-pack-price { background: #fff; color: var(--ink); -webkit-text-stroke: 0; }
.toys-pack-line { max-width: 52ch; font-size: 18px; font-weight: 700; line-height: 1.45; text-wrap: balance; }
.toys-pack .toy-rows { margin: clamp(16px, 2.6vw, 30px) 0 clamp(10px, 2vw, 22px); }
.toys-pack-foot { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.toys-pack-buy { min-width: 220px; }
/* Yours: a white pill with a green tick. */
.toys-pack-owned, .toys-pack-lock { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 18px 6px 8px; border: 3px solid var(--ink); border-radius: 999px;
  background: #fff; box-shadow: 0 4px 0 var(--ink); font: 400 19px/1 var(--display); letter-spacing: .01em; }
.toys-pack-owned::before, .toys-pack-lock::before { content: ""; width: 30px; height: 30px; border: 2.5px solid var(--ink); border-radius: 50%; }
.toys-pack-owned::before { background: var(--go) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-8.5' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
/* Not yet: the card fades to grey and says which pack opens it. Its toys can still be looked at. */
.toys-pack[data-state="locked"] { background: #dfe6f2; }
.toys-pack[data-state="locked"] .toys-pack-name { color: #eef2f9; }
.toys-pack[data-state="locked"] .toys-pack-price { filter: grayscale(1); opacity: .7; }
/* (Its toys keep their colours: still things to want, only not yet.) */
.toys-pack-lock { color: var(--ink-soft); }
.toys-pack-lock::before { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='11' width='12' height='9' rx='2' fill='%2312226e'/%3E%3Cpath d='M8.5 11V8.5a3.5 3.5 0 0 1 7 0V11' fill='none' stroke='%2312226e' stroke-width='2.4'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* A toy up close: the toy turning on a white card, what it is, and what dogs and cats do with it. */
.toy-look { width: min(440px, calc(100% - 32px)); padding: clamp(20px, 4vw, 32px); border: 3px solid var(--ink); border-radius: 28px; background: var(--card); color: var(--ink);
  box-shadow: 0 7px 0 var(--ink), 0 30px 80px rgb(18 34 110 / .35); text-align: center; }
.toy-look[open] { display: grid; justify-items: center; gap: 12px; }
.toy-look::backdrop { background: rgb(11 21 70 / .45); }
.toy-look-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 50%; background: #fff;
  box-shadow: 0 3px 0 var(--ink); font: 700 26px/1 var(--font); color: var(--ink); cursor: pointer; }
.toy-look-stage { width: min(100%, 280px); height: auto; aspect-ratio: 1; border-radius: 22px; background: radial-gradient(circle at 50% 40%, #fff, var(--card-soft) 70%); }
.toy-look-name { font: 400 34px/1.05 var(--display); }
.toy-look-line { max-width: 32ch; font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--ink-soft); }
.toy-look-play { display: grid; gap: 8px; width: 100%; margin: 4px 0 0; text-align: left; }
.toy-look-play div { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--card-soft); }
.toy-look-play dt { font: 400 17px/1.3 var(--display); }
.toy-look-play dd { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; }
.toy-look-where { font-size: 15px; font-weight: 800; }

/* Every line on the page in even lines (Owen, 21 Nov 2026: "Use text-balance everywhere"). */
.toys-sub, .toys-notice, .toys-tile b, .toy-look-line, .toy-look-where, .toy-look-play dd { text-wrap: balance; }

@media (max-width: 600px) {
  .toys-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .toys-grid--free { grid-template-columns: repeat(2, minmax(0, 160px)); }
  .toys-tile b { font-size: 15px; }
  .toys-pack-buy { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .toys-tile { transition: none; } }
