@font-face {
  font-family: "Comic TN";
  src: url("/img/ui/comic.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #a8a8a8;
  --btn: #1c1c1c;
  --btn-hover: #2e2e2e;
  --line: #333;
  --accent: #ff2fb0;
  --ok: #7dff9a;
  --err: #ff5a5a;
  --font: "Comic TN", "Comic Sans MS", "Comic Neue", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  overflow-x: hidden;
}
a { color: var(--fg); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
[hidden] { display: none !important; }

/* ---------- header ---------- */

.announce {
  background: var(--fg);
  color: var(--bg);
  overflow: hidden;
  white-space: nowrap;
  font-size: 15px;
  padding: 4px 0;
}
.announce-track { display: inline-flex; animation: marquee 22s linear infinite; }
.announce-track span { padding-right: 4em; }
@keyframes marquee { to { transform: translateX(-50%); } }

.site-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px 16px 0;
  min-height: 150px;
}
.logo img { width: min(695px, 70vw); height: auto; }
.kotori {
  position: absolute;
  right: 12px;
  bottom: -6px;
  width: min(300px, 26vw);
  height: auto;
  pointer-events: none;
}
.divider {
  height: 20px;
  background: url("/img/ui/divider.png") repeat-x center / auto 20px;
}

.icons {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 6vw, 72px);
  padding: 22px 16px 26px;
}
.icon {
  position: relative;
  display: block;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform .12s;
}
.icon img { width: 44px; height: 44px; image-rendering: pixelated; }
.icon:hover { transform: translateY(-2px) rotate(-4deg); }
.icon:active { transform: scale(.94); }
.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
}

.search { display: flex; justify-content: center; padding: 0 16px 24px; }
.search input {
  width: min(420px, 100%);
  background: #111;
  border: 2px solid var(--fg);
  padding: 10px 14px;
  outline: none;
}

/* ---------- product grid ---------- */

main { max-width: 1320px; margin: 0 auto; padding: 0 16px 40px; }
section + section { margin-top: 56px; }

.section-title {
  font-weight: 400;
  font-size: clamp(28px, 5vw, 54px);
  text-align: center;
  margin: 0 0 28px;
  line-height: 1.15;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 26px 22px;
}
.card { width: calc((100% - 4 * 22px) / 5); max-width: 240px; min-width: 150px; }
.card-link { display: block; text-decoration: none; text-align: center; }
.card-img {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  overflow: hidden;
}
.card-img > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}
.card-link:hover .card-img > img:first-child { transform: scale(1.04); }
.card h3 {
  font-weight: 400;
  font-size: 17px;
  margin: 12px 4px 4px;
  text-transform: uppercase;
  line-height: 1.3;
}
.price { margin: 0; font-size: 15px; }
.price s { color: var(--muted); }
.empty { text-align: center; color: var(--muted); }

/* The sold / @handle overlay sits centered over the photo like on the old site. */
.tag-img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.tag-sold { width: 62%; }
.tag-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  font-size: clamp(22px, 3.2vw, 38px);
  font-weight: 700;
  pointer-events: none;
  word-break: break-all;
  -webkit-text-stroke: 1px rgba(0,0,0,.4);
}

/* Glitter text for typed @ tags, in the spirit of the cooltext gifs. */
.glitter {
  background:
    radial-gradient(circle at 20% 30%, #fff 0 1.5px, transparent 2px) 0 0 / 11px 9px,
    radial-gradient(circle at 70% 60%, #fff 0 1px, transparent 1.5px) 0 0 / 7px 13px,
    linear-gradient(100deg, #ff2fb0, #ffd400, #3cf, #b04dff, #ff2fb0) 0 0 / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: glitter 1.6s steps(6) infinite, shimmer 6s linear infinite;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, .5));
}
@keyframes glitter {
  50% { background-position: 5px 3px, -4px 6px, 0 0; }
}
@keyframes shimmer {
  to { background-position: 11px 9px, 7px 13px, 300% 0; }
}

/* ---------- product page ---------- */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}
.gallery-main {
  position: relative;
  background: #fff;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery-main::-webkit-scrollbar { display: none; }
.gallery-main > img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  scroll-snap-align: start;
}
.gallery-main .tag-img, .gallery-main .tag-text { position: absolute; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  background: #fff;
  cursor: pointer;
}
.thumbs button[aria-current="true"] { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.details h1 {
  font-weight: 400;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.price.big { font-size: 26px; margin-bottom: 14px; }
.note { color: var(--accent); margin: 0 0 14px; }
.desc { color: #ddd; margin-bottom: 18px; }
.small { color: var(--muted); font-size: 14px; margin-top: 22px; }
.soldout { font-size: 26px; }

.sizes { border: 0; padding: 0; margin: 0 0 18px; }
.sizes legend { margin-bottom: 8px; color: var(--muted); }
.size { display: inline-block; margin: 0 8px 8px 0; }
.size input { position: absolute; opacity: 0; pointer-events: none; }
.size span {
  display: inline-block;
  min-width: 52px;
  padding: 9px 12px;
  border: 2px solid var(--fg);
  text-align: center;
  cursor: pointer;
}
.size input:checked + span { background: var(--fg); color: var(--bg); }
.size input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.size.out span { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.buy-msg { min-height: 1.4em; margin: 10px 0 0; }
.buy-msg.err { color: var(--err); }

/* ---------- buttons, pages ---------- */

.btn {
  display: inline-block;
  background: var(--btn);
  color: var(--fg);
  border: 0;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  font-size: 15px;
}
.btn:hover { background: var(--btn-hover); }
.btn.big { width: 100%; padding: 14px 18px; font-size: 19px; background: var(--fg); color: var(--bg); }
.btn.big:hover { background: var(--accent); color: #fff; }
.btn:disabled { opacity: .5; cursor: wait; }

.page { max-width: 720px; margin: 0 auto; }
.page h1 { font-weight: 400; font-size: clamp(30px, 5vw, 46px); margin: 0 0 18px; }
.page p + h1 { margin-top: 34px; }
.page h2 { font-weight: 400; font-size: 26px; margin: 34px 0 10px; }
.page.center { text-align: center; }
.terms { font-size: 15px; color: #ddd; }
.terms h2 { color: var(--fg); }
.ok { color: var(--ok); }
.err { color: var(--err); }

.contact label { display: block; margin-bottom: 14px; }
.contact input, .contact textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  background: #111;
  border: 2px solid #444;
  padding: 10px 12px;
}
.contact input:focus, .contact textarea:focus { border-color: var(--fg); outline: none; }
.contact .hp { position: absolute; left: -9999px; }

/* ---------- footer ---------- */

.site-footer { text-align: center; padding: 30px 16px 40px; }
.socials { display: flex; justify-content: center; gap: 80px; margin-bottom: 20px; }
.socials img { width: 44px; height: 44px; }
.fine { color: var(--muted); font-size: 13px; margin: 4px 0; }
.fine a { color: var(--muted); }

/* ---------- cart drawer ---------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, .6);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 18px 20px 20px 40px;
  animation: slide .2s ease-out;
}
/* The chain from the old site's cart drawer. */
.drawer-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: url("/img/ui/vdivider.png") repeat-y center / 20px auto;
}
@keyframes slide { from { transform: translateX(100%); } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2 { font-weight: 400; margin: 0; font-size: 28px; }
.x { background: none; border: 0; font-size: 34px; line-height: 1; cursor: pointer; padding: 0 4px; }
.cart-items { list-style: none; margin: 16px 0; padding: 0; overflow-y: auto; flex: 1; }
.cart-items li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cart-items img { width: 64px; height: 64px; object-fit: cover; background: #fff; }
.cart-items .name { font-size: 15px; text-transform: uppercase; line-height: 1.25; }
.cart-items .meta { color: var(--muted); font-size: 14px; }
.cart-items .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; text-decoration: underline; }
.cart-empty { color: var(--muted); }
.cart-foot { border-top: 2px solid var(--fg); padding-top: 14px; }
.ship-to { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.ship-to select { background: #111; border: 1px solid #555; padding: 6px; max-width: 70%; }
.cart-total { display: flex; justify-content: space-between; font-size: 20px; margin: 8px 0 12px; }
.agree { display: block; font-size: 14px; margin-bottom: 12px; color: #ddd; }
.agree input { accent-color: var(--accent); }
.cart-error { color: var(--err); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }

/* ---------- small screens ---------- */

@media (max-width: 1100px) {
  .card { width: calc((100% - 3 * 22px) / 4); }
}
@media (max-width: 820px) {
  .card { width: calc((100% - 2 * 16px) / 3); min-width: 0; }
  .grid { gap: 22px 16px; }
  .product { grid-template-columns: 1fr; gap: 22px; }
  .site-header { min-height: 0; padding-top: 18px; flex-direction: column; }
  .logo img { width: min(560px, 92vw); }
  .kotori { position: static; width: 190px; margin-top: 6px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .card { width: calc((100% - 14px) / 2); }
  .grid { gap: 20px 14px; }
  .card h3 { font-size: 14px; }
  .icons { gap: 26px; }
  .socials { gap: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
