@font-face {
  font-family: Paperlogy;
  src: url('./assets/paperlogy-bold.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page: #fff;
  --surface: #faf9fd;
  --ink: #19172a;
  --muted: #565466;
  --line: #e8e5ee;
  --accent: #5141b9;
  --accent-hover: #40309f;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --heading: Paperlogy, 'Malgun Gothic', system-ui, sans-serif;
  --body: 'Malgun Gothic', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.55 var(--body); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button, input { font: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.shell { width: min(1256px, calc(100% - 96px)); margin-inline: auto; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 10;
  transform: translateY(-160%); background: var(--ink); color: white; padding: 12px;
}
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: block; }
.brand img { width: 138px; height: auto; }
.store-link {
  display: inline-flex; min-height: 42px; align-items: center; justify-content: center;
  padding: 8px 16px;
  border: 1px solid #dedbe7;
  border-radius: 999px;
  font: 700 14px/1.5 var(--heading);
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.store-link:hover { border-color: #c2b8e9; color: var(--accent); background: #f6f2ff; }
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 47% 53%;
  align-items: center;
  min-height: 360px;
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid #e7e0f2;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 96% 1%, #fff2eb, transparent 42%),
    radial-gradient(ellipse at 76% 94%, #e1d7fc, transparent 55%),
    linear-gradient(121deg, #fff 11%, #fbf9ff 48%, #f1ecfc 100%);
  box-shadow: 0 16px 38px -25px #46336d36, inset 0 1px #fff;
}
.hero-copy { position: relative; z-index: 2; padding: 32px 0 34px clamp(30px, 4.6vw, 64px); }
.hero-title {
  font: 700 clamp(42px, 4.8vw, 68px)/1.06 var(--heading);
  letter-spacing: -.08em;
}
.hero-brand {
  display: block;
  margin-bottom: .25em;
  font-size: .48em;
  line-height: 1.05;
  letter-spacing: -.055em;
}
.hero-name { display: block; color: var(--accent); }
@supports (background-clip: text) {
  .hero-name {
    width: fit-content;
    background: linear-gradient(112deg, #30246c, #5741b5 78%);
    background-clip: text;
    color: transparent;
  }
}
@media (forced-colors: active) {
  .hero-name { color: CanvasText; }
}
.hero-description { margin: 16px 0 20px; color: #514c64; letter-spacing: -.035em; }
.hero-action {
  display: inline-flex;
  min-height: 44px;
  padding: 9px 17px;
  align-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  font: 700 15px/1.4 var(--heading);
  box-shadow: 0 6px 14px #22174524;
  transition: background 140ms ease, transform 140ms var(--ease-out);
}
.hero-action:focus-visible { background: var(--accent-hover); }
.hero-art {
  position: absolute;
  z-index: 1;
  inset: 2% 6.8% 2% 46.8%;
  display: grid;
  place-items: center;
}
.hero-art::before, .hero-art::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.hero-art::before {
  inset: 1% 3% 3%;
  background:
    radial-gradient(ellipse at 49% 38%, #fff 0%, #ffffff29 54%, transparent 73%),
    radial-gradient(ellipse at 55% 83%, #9484d86b 0%, transparent 50%);
}
.hero-art::after {
  width: 80%;
  height: 13%;
  left: 12%;
  bottom: 3%;
  border-radius: 50%;
  background: #7866ac28;
  filter: blur(14px);
}
.card-orbit {
  position: absolute;
  width: 86%;
  height: 63%;
  transform: translate(2%, -2%) rotate(-16deg);
  border: 1px solid #fffffff5;
  border-radius: 50%;
  box-shadow: 0 0 0 9px #ffffff78, 0 0 0 25px #ffffff39, 0 0 0 43px #fff2;
}
.card-orbit::before, .card-orbit::after {
  content: '';
  position: absolute;
  width: 27px;
  aspect-ratio: 1;
  background: #fff;
  clip-path: polygon(50% 0, 60% 39%, 100% 50%, 60% 61%, 50% 100%, 40% 61%, 0 50%, 40% 39%);
}
.card-orbit::before { top: 4%; right: 6%; }
.card-orbit::after { bottom: 17%; left: 0; width: 17px; }
.hero-gallery {
  position: absolute;
  z-index: 1;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-card {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: min(20%, 114px);
  aspect-ratio: 63 / 88;
  margin: 0;
  border: 1px solid #fff;
  border-radius: 6.2% / 4.4%;
  overflow: hidden;
  background: #f6f3fc;
  box-shadow: 0 12px 23px #2e215635, 0 2px 6px #281e4b29;
  transform: translate(-50%, -50%) rotate(var(--tilt));
}
.hero-card img { width: 100%; height: 100%; object-fit: contain; }
.hero-card-nikke { --entry-offset: 26%; --entry-delay: 288ms; --x: 15.5%; --y: 38%; --tilt: -19deg; }
.hero-card-pokemon { --entry-offset: 16%; --entry-delay: 192ms; --x: 36.7%; --y: 29%; --tilt: -8deg; }
.hero-card-rezero { --entry-offset: -16%; --entry-delay: 240ms; --x: 60.3%; --y: 29%; --tilt: 7deg; }
.hero-card-conan { --entry-offset: -26%; --entry-delay: 336ms; --x: 82%; --y: 37%; --tilt: 18deg; }
.hero-card-naruto, .hero-card-onepiece, .hero-card-dragonball {
  width: min(23%, 130px);
  z-index: 1;
  box-shadow: 0 17px 28px #36255e43, 0 3px 8px #2a1a5832;
}
.hero-card-naruto { --entry-offset: 24%; --entry-delay: 96ms; --x: 26.7%; --y: 67%; --tilt: -13deg; }
.hero-card-onepiece { --entry-offset: 0%; --entry-delay: 48ms; --x: 49.7%; --y: 64%; --tilt: -2deg; z-index: 2; width: min(25%, 137px); }
.hero-card-dragonball { --entry-offset: -24%; --entry-delay: 144ms; --x: 73.4%; --y: 67%; --tilt: 12deg; }

@media (prefers-reduced-motion: no-preference) {
  .hero-card { animation: deal-card 560ms var(--ease-out) var(--entry-delay) backwards; }

  .hero-card-onepiece::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(111deg, transparent 33%, #ffeaf660 46%, #fff9 50%, #d8dcff60 54%, transparent 67%);
    opacity: 0;
    animation: foil-sheen 680ms var(--ease-out) 650ms;
  }

  @keyframes deal-card {
    from {
      opacity: 0;
      transform: translate(calc(-50% + var(--entry-offset)), -30%) rotate(calc(var(--tilt) * .48)) scale(.96);
    }
  }

  @keyframes foil-sheen {
    from { transform: translateX(-108%); opacity: 0; }
    22% { opacity: .64; }
    to { transform: translateX(108%); opacity: 0; }
  }
}
.catalog { padding: 46px 0 57px; scroll-margin-top: 24px; }
.catalog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.catalog-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
h2 { font: 700 clamp(28px, 3vw, 39px)/1.2 var(--heading); letter-spacing: -.07em; }
.result-count { color: var(--accent); font: 700 14px/1.4 var(--heading); }
.search { position: relative; width: min(100%, 294px); }
.search input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 40px;
  border: 1px solid #dfdbe8;
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
}
.search input::placeholder { color: #625c71; opacity: 1; }
.search-icon {
  position: absolute;
  width: 14px;
  height: 14px;
  left: 14px;
  top: 14px;
  border: 1.7px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
}
.search-icon::after {
  content: ''; position: absolute; width: 7px; height: 1.7px;
  top: 11px; left: 9px; background: var(--accent); transform: rotate(45deg);
}
.catalog-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px;
}
.catalog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 4px 12px #2418350b;
  transition: border-color 180ms ease, transform 180ms var(--ease-out);
}
.catalog-card:focus-visible { border-color: #b9abe7; }
.catalog-media { width: 100%; aspect-ratio: 1.58; overflow: hidden; background: #f2eef9; }
.catalog-art {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 41%;
  transition: transform 220ms var(--ease-out);
}
.catalog-pokemon .catalog-art { object-position: 51% 43%; }
.catalog-onepiece .catalog-art { object-position: 51% 44%; }
.catalog-nikke .catalog-art { object-position: 50% 32%; }
.catalog-dragonball .catalog-art { object-position: 50% 39%; }
.catalog-naruto .catalog-art { object-position: 50% 34%; }
.catalog-rezero .catalog-art { object-position: 50% 42%; }
.catalog-conan .catalog-art { object-position: 50% 35%; }
.catalog-card-copy { display: flex; flex: 1; flex-direction: column; padding: 14px 15px 13px; }
h3 { margin-bottom: 3px; font: 700 clamp(21px, 2vw, 27px)/1.16 var(--heading); letter-spacing: -.06em; }
.catalog-english { color: var(--muted); font-size: 13px; line-height: 1.3; }
.catalog-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 11px; }
.catalog-details { color: var(--muted); font-size: 14px; line-height: 1.35; letter-spacing: -.045em; }
.card-action {
  flex: none; padding: 4px 8px; border-radius: 6px;
  color: var(--accent); background: #f0ebff; font: 700 13px/1.25 var(--heading);
}
@media (hover: hover) and (pointer: fine) {
  .hero-action:hover { background: var(--accent-hover); }
  .catalog-card:hover { border-color: #b9abe7; }
  .catalog-card:hover .card-action { color: white; background: var(--accent); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-action:hover { transform: translateY(-2px); }
  .catalog-card:hover { transform: translateY(-3px); }
  .catalog-card:hover .catalog-art { transform: scale(1.035); }
}
.empty { border: 1px solid var(--line); border-radius: 17px; padding: 48px 16px; text-align: center; color: var(--muted); }
.empty button {
  margin-top: 14px; background: #f0ebff; color: var(--accent);
  border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer;
}
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 5px 20px; justify-content: space-between;
  align-items: center; min-height: 68px; padding-block: 16px; color: var(--muted); font-size: 13px;
}
.footer-inner span { color: var(--ink); font: 700 14px/1.45 var(--heading); }
@media (max-width: 1050px) {
  .shell { width: calc(100% - 56px); }
  .hero { min-height: 316px; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 62px; }
  .brand img { width: 116px; }
  .store-link { min-height: 38px; padding: 7px 11px; }
  .hero { display: block; margin-top: 13px; min-height: 0; border-radius: 21px; }
  .hero-copy { padding: 20px 20px 0; }
  .hero-title { font-size: clamp(36px, 7.8vw, 54px); }
  .hero-description { margin: 12px 0 15px; font-size: 15px; }
  .hero-action { min-height: 44px; padding-inline: 15px; }
  .hero-art { position: relative; inset: auto; height: clamp(198px, 49vw, 340px); margin: 4px 8% 0; }
  .card-orbit { width: 82%; height: 62%; }
  .card-orbit::before { width: 22px; }
  .card-orbit::after { width: 13px; }
  .catalog { padding-top: 32px; }
  .catalog-header { gap: 10px; margin-bottom: 14px; }
  .catalog-heading { gap: 3px 7px; }
  .search { width: min(50%, 250px); }
  .search input { height: 43px; font-size: 14px; }
  .search-icon { top: 13px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .catalog-card { border-radius: 13px; }
  .catalog-card-copy { padding: 10px 10px 11px; }
  .catalog-english, .catalog-details { font-size: 13px; }
  .catalog-card-meta { padding-top: 7px; }
  .card-action { display: none; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 24px); }
  .hero-copy { padding-inline: 16px; }
  .hero-art { height: 182px; }
  .hero-title { font-size: clamp(30px, 10vw, 36px); }
  h2 { font-size: 25px; }
  .catalog-english { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-card { animation: fade-card 160ms ease backwards; }
}

@keyframes fade-card { from { opacity: 0; } }
