/* Anime Arcade — soft pastel / sakura / night-city look */
@import url("https://fonts.googleapis.com/css2?family=Mochiy+Pop+One&family=Zen+Maru+Gothic:wght@400;500;700&display=swap");

:root {
  --bg: #140a18;
  --text: #fff5fb;
  --muted: #d4b8d0;
  --accent: #ff7ab6;
  --accent2: #8ec5ff;
  --accent3: #c9a0ff;
  --good: #7dffc0;
  --danger: #ff6b8a;
  --warn: #ffd166;
  --border: rgba(255, 180, 220, 0.18);
  --card: rgba(36, 18, 42, 0.72);
  --font: "Zen Maru Gothic", "Segoe UI", system-ui, sans-serif;
  --font-display: "Mochiy Pop One", "Zen Maru Gothic", system-ui, sans-serif;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Custom cursors from local cursor pack (apple default, Ryuk pointer) */
html, body, .wrap, .panel, .card, button, a, input, textarea, select {
  cursor: url("/assets/cursors/cursor-default.png") 16 4, auto;
}
a, a *, button, button *, .card, .choice, .pad, .hole, .cell, .lvl, [role="button"] {
  cursor: url("/assets/cursors/cursor-pointer.png") 20 8, pointer !important;
}
input[type="text"], textarea, [contenteditable="true"] {
  cursor: url("/assets/cursors/cursor-text.png") 16 8, text !important;
}
body.loading, body.loading * {
  cursor: url("/assets/cursors/cursor-wait.png") 20 16, wait !important;
}
.btn:active, .card:active, .choice:active {
  cursor: url("/assets/cursors/cursor-grab.png") 20 16, grabbing !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: #140a18;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Free anime landscape wallpaper + soft vignette for readability */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    url("/assets/bg/anime-wallpaper.jpg") center center / cover no-repeat fixed;
  transform: scale(1.02);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 8, 28, 0.72) 0%, rgba(18, 8, 26, 0.55) 40%, rgba(12, 6, 22, 0.82) 100%),
    radial-gradient(ellipse 90% 55% at 10% 0%, rgba(255, 122, 182, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 15%, rgba(142, 197, 255, 0.12), transparent 50%);
}

/* soft sakura sparkle overlay */
.bg-sparkle {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 182, 210, 0.2) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 20%, rgba(255, 182, 210, 0.14) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 80%, rgba(200, 180, 255, 0.14) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 70%, rgba(255, 182, 210, 0.12) 0 1.5px, transparent 3px);
  background-size: 180px 180px, 220px 220px, 160px 160px, 200px 200px;
  animation: drift 40s linear infinite;
}
@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 180px 120px, -100px 80px, 60px -90px, -80px 100px; }
}

.bg-float {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-float span {
  position: absolute;
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  opacity: 0.14;
  animation: bob 12s ease-in-out infinite;
}
.bg-float span:nth-child(1) { top: 10%; left: 6%; }
.bg-float span:nth-child(2) { top: 18%; right: 8%; animation-delay: -2s; }
.bg-float span:nth-child(3) { top: 45%; left: 4%; animation-delay: -4s; }
.bg-float span:nth-child(4) { top: 60%; right: 6%; animation-delay: -1s; }
.bg-float span:nth-child(5) { bottom: 15%; left: 15%; animation-delay: -3s; }
.bg-float span:nth-child(6) { bottom: 10%; right: 18%; animation-delay: -5s; }
.bg-float span:nth-child(7) { top: 30%; left: 40%; animation-delay: -6s; opacity: 0.1; }
.bg-float span:nth-child(8) { top: 70%; left: 50%; animation-delay: -2.5s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-16px) rotate(6deg); }
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-t)) 16px calc(28px + var(--safe-b));
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(30, 14, 36, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.logo span {
  color: var(--accent);
  text-shadow: 0 0 16px rgba(255, 122, 182, 0.5);
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.84rem; font-weight: 700; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.nav a:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 122, 182, 0.12);
  border: 1px solid rgba(255, 122, 182, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 12px;
}
.hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  line-height: 1.2;
  background: linear-gradient(120deg, #fff 0%, #ffb3d9 40%, #a8d4ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 54ch;
  font-size: 1.02rem;
}
.hero p strong { color: var(--text); }

.disclaimer {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 180, 220, 0.2);
  background: rgba(255, 122, 182, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.section-label {
  margin: 24px 0 12px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--accent2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 160px;
  padding: 16px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  background: linear-gradient(155deg, rgba(50, 22, 58, 0.85), rgba(20, 12, 32, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255, 122, 182, 0.15), transparent 45%);
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
}
a.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 122, 182, 0.45);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 122, 182, 0.12);
  text-decoration: none;
}
a.card:hover::before { opacity: 1; }
.card .emoji {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
.card h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.4; flex: 1; }
.card .meta {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent3);
}
.card .play-hint {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0;
  transition: 0.15s;
}
a.card:hover .play-hint { opacity: 1; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  margin-top: 12px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  min-height: 46px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  touch-action: manipulation;
  background: linear-gradient(135deg, #ff8fc4, #ff5ea8);
  color: #3a0a22;
  box-shadow: 0 10px 28px rgba(255, 94, 168, 0.28);
}
.btn:active { filter: brightness(0.95); }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.muted { color: var(--muted); }
.status-line { margin: 10px 0 0; font-weight: 800; }

.opts { display: grid; gap: 8px; margin-top: 10px; }
.opts button {
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 8, 20, 0.65);
  color: var(--text);
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.opts button.sel { border-color: var(--accent); background: rgba(255, 122, 182, 0.12); }
.opts button.good { border-color: var(--good); background: rgba(125, 255, 192, 0.12); }
.opts button.bad { border-color: var(--danger); background: rgba(255, 107, 138, 0.12); }
.q { font-size: 1.08rem; font-weight: 800; line-height: 1.4; margin: 0 0 8px; }
.progress { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; font-weight: 700; }

.toast {
  position: fixed;
  top: calc(14px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #222;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 40;
  box-shadow: var(--shadow);
  max-width: 90vw;
}
.toast.hidden { display: none; }

.site-footer {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
}

.wrap > h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  margin: 0 0 8px;
}

@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { min-height: 148px; padding: 12px; }
  .card h2 { font-size: 0.92rem; }
  .card p { font-size: 0.78rem; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  body::after, .bg-float span { animation: none; }
}
