:root {
  --sky-a: #7ec8ff;
  --sky-b: #b8e4ff;
  --sky-c: #ffe4f0;
  --ink: #3d2a36;
  --muted: #7a5a68;
  --cream: #fff7fb;
  --coral: #ff6b9d;
  --mint: #6fd6b0;
  --lemon: #ffe27a;
  --slot: rgba(255, 255, 255, 0.72);
  --shadow: rgba(61, 42, 54, 0.12);
  --wood: #f3c9a8;
  --wood-deep: #e8a97a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Jua", system-ui, sans-serif;
  color: var(--ink);
  background: var(--sky-a);
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  overflow-x: hidden;
}

.visit-inline {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  min-width: 72px;
}

.visit-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.visit-count {
  font-size: 18px;
  line-height: 1.1;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(255, 255, 255, 0.55), transparent 55%),
    radial-gradient(ellipse 70% 45% at 90% 20%, rgba(255, 200, 220, 0.45), transparent 50%),
    linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 42%, var(--sky-c) 100%);
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: drift 12s ease-in-out infinite;
}

.blob-a {
  width: 180px;
  height: 180px;
  left: -40px;
  top: 18%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 226, 122, 0.5) 60%, transparent 70%);
}

.blob-b {
  width: 220px;
  height: 220px;
  right: -60px;
  top: 40%;
  background: radial-gradient(circle, #fff 0%, rgba(111, 214, 176, 0.45) 55%, transparent 70%);
  animation-delay: -4s;
}

.blob-c {
  width: 140px;
  height: 140px;
  left: 35%;
  bottom: 8%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 107, 157, 0.35) 55%, transparent 70%);
  animation-delay: -7s;
}

.sparkles {
  position: absolute;
  inset: 0;
}

.sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  animation: twinkle 2.8s ease-in-out infinite;
}

.page {
  position: relative;
  z-index: 1;
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 12px max(40px, env(safe-area-inset-bottom));
}

.hub-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "hero"
    "shelf"
    "archive";
  gap: 14px;
  align-items: start;
  max-width: 920px;
  margin: 0 auto;
}

.hub-layout.hub-simple {
  max-width: 920px;
}

.hero {
  grid-area: hero;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 4px 0 0;
  min-height: 0;
  animation: rise-in 0.7s ease-out both;
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.hero-links {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: #3a8fd4;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 3px 0 rgba(58, 143, 212, 0.25);
}

.hero-link-fame {
  color: #c47800;
  box-shadow: 0 3px 0 rgba(196, 120, 0, 0.28);
}

.shelf {
  grid-area: shelf;
  animation: rise-in 0.8s ease-out 0.12s both;
}

.foot {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 40;
  margin: 0;
  padding: 6px 10px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(61, 42, 54, 0.08);
}

.archive-rail {
  grid-area: archive;
  padding: 12px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 35%),
    linear-gradient(160deg, #2a3144 0%, #1a2030 100%);
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 14px 32px rgba(20, 24, 40, 0.28);
  color: #f4f0ea;
}

.scoreboard {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  top: auto;
  z-index: 6;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 247, 251, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 14px 32px rgba(61, 42, 54, 0.12);
  backdrop-filter: blur(12px);
  animation: none;
}

.scoreboard-week {
  position: relative;
  top: 0;
  flex: 1;
  background: rgba(240, 248, 255, 0.94);
}

.scoreboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.scoreboard-title {
  margin: 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: 22px;
  color: #ff4f8b;
  text-shadow: 0 2px 0 #fff;
  line-height: 1.15;
}

.scoreboard-title.week {
  color: #3a8fd4;
}

.archive-rail-head {
  margin-bottom: 10px;
}

.archive-rail-title {
  margin: 0 0 4px;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: 20px;
  color: #ffe6a8;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.archive-rail-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(244, 240, 234, 0.72);
  letter-spacing: 0.02em;
}

.archive-rail-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

/* 고전 게임: 큰 썸네일 + 이름 보이게 */
.archive-rail .slot-compact {
  flex-direction: column;
  align-items: stretch;
  border-radius: 16px;
  min-height: 0;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.archive-rail .slot-compact .slot-art {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: 1 / 1;
  border-radius: 16px 16px 0 0;
}

.archive-rail .slot-compact.has-photo .slot-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  filter: none;
  animation: none;
}

.archive-rail .slot-compact .slot-meta {
  flex: 1;
  min-width: 0;
  padding: 10px 10px 12px;
  justify-content: flex-start;
  gap: 4px;
  background: rgba(12, 16, 28, 0.45);
  border-radius: 0 0 16px 16px;
}

.archive-rail .slot-compact .slot-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff8e8;
  line-height: 1.25;
  word-break: keep-all;
}

.archive-rail .slot-compact .slot-tag,
.archive-rail .slot-compact .slot-ext {
  font-size: 11px;
  color: rgba(244, 240, 234, 0.72);
}

.archive-rail .slot-compact:hover,
.archive-rail .slot-compact:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.slot-compact {
  flex-direction: row;
  align-items: stretch;
  border-radius: 12px;
  min-height: 72px;
}

.slot-compact .slot-art {
  flex: 0 0 72px;
  width: 72px;
  min-height: 72px;
  max-height: 72px;
  aspect-ratio: 1 / 1;
  border-radius: 12px 0 0 12px;
}

.slot-compact.has-photo .slot-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
}

.slot-compact .slot-meta {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  justify-content: center;
}

.slot-compact .slot-name {
  font-size: 14px;
}

.slot-compact .slot-tag,
.slot-compact .slot-ext {
  font-size: 10px;
}

.slot-compact:hover,
.slot-compact:focus-visible {
  transform: translateY(-1px);
}

.slot-ext {
  display: inline-block;
  margin-top: 2px;
  font-size: 10px;
  color: #c9b896;
}

.slot-external {
  background: rgba(255, 255, 255, 0.08);
  color: #f4f0ea;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.slot-external .slot-name {
  color: #fff8e8;
}

.slot-external .slot-tag {
  color: rgba(244, 240, 234, 0.65);
}

.period-tabs {
  display: none;
}

.score-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.score-tab {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 8px 10px;
  font: inherit;
  flex: 1 1 calc(33% - 6px);
  min-width: 88px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(200, 120, 150, 0.18);
}

.score-tab.on {
  color: #fff;
  background: linear-gradient(180deg, #ff9ec4, var(--coral));
  box-shadow: 0 3px 0 #e03f74;
}

.score-note {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.score-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.score-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  color: var(--ink);
}

.score-list .rank {
  font-weight: 700;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}

.score-list .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-list .pts {
  font-variant-numeric: tabular-nums;
  color: #5b7fd4;
  font-weight: 700;
}

.score-empty {
  display: block !important;
  text-align: center;
  color: var(--muted);
  padding: 16px 10px;
}

@media (max-width: 1100px) {
  .hub-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "shelf"
      "archive";
    align-items: start;
  }

  .archive-rail {
    position: relative;
    top: 0;
    height: auto;
  }

  .score-list {
    max-height: none;
  }

  .archive-rail-list {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    max-height: none;
    overflow: visible;
  }
}

.date-chip {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 14px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(180deg, #ff8ab5, var(--coral));
  border-radius: 999px;
  box-shadow: 0 4px 0 #e03f74;
}

.brand {
  margin: 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: clamp(48px, 14vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #ff4f8b;
  text-shadow:
    0 4px 0 #fff,
    0 10px 24px rgba(255, 107, 157, 0.35);
  animation: soft-bounce 2.8s ease-in-out infinite;
}

.tagline {
  margin: 10px 0 14px;
  font-size: 16px;
  color: var(--muted);
}

.challenge {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 16px 16px 14px;
  border-radius: 24px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 251, 0.55)),
    linear-gradient(135deg, #ffe3ef 0%, #d9f0ff 55%, #fff6d8 100%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(61, 42, 54, 0.12);
  animation: rise-in 0.75s ease-out 0.06s both;
}

.challenge-eyebrow {
  margin: 0 0 10px;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-size: 22px;
  color: #ff4f8b;
  text-shadow: 0 2px 0 #fff;
  text-align: center;
}

.challenge-body {
  display: grid;
  gap: 12px;
  flex: 1;
}

.challenge-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
}

.challenge-game {
  margin: 4px 0 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: clamp(28px, 8vw, 36px);
  line-height: 1.1;
  color: var(--ink);
  text-align: center;
}

.challenge-rank-box {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 79, 139, 0.16);
}

.challenge-rank-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.challenge-rank-value {
  margin: 4px 0 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-size: 28px;
  line-height: 1.1;
  color: #ff4f8b;
  font-variant-numeric: tabular-nums;
}

.challenge-remain {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #3a8fd4;
  font-variant-numeric: tabular-nums;
}

.challenge-challengers {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #ff4f8b;
  font-variant-numeric: tabular-nums;
}

.challenge-best-box {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 79, 139, 0.16);
}

.challenge-share-btn {
  appearance: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #7ec8ff, #3a8fd4);
  box-shadow: 0 5px 0 #2a6fa8;
}

.challenge-share-btn:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #2a6fa8;
}

.challenge-share-btn[hidden] {
  display: none;
}

.challenge-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.challenge-stats div {
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.challenge-stat-best {
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 79, 139, 0.18);
}

.challenge-stats dt {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.challenge-stats dd {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
  line-height: 1.25;
}

.challenge-best-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #ff4f8b;
  margin-bottom: 2px;
}

.challenge-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #ff8ab5, var(--coral));
  box-shadow: 0 5px 0 #e03f74;
}

.challenge-btn:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #e03f74;
}

.challenge-top {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(61, 42, 54, 0.08);
}

.challenge-top-title {
  margin: 0 0 10px;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: 18px;
  color: #ff4f8b;
  text-align: center;
  text-shadow: 0 1px 0 #fff;
}

.challenge-top-list {
  max-height: none;
  flex: none;
}

.challenge-top-list .pts {
  color: #ff4f8b;
}

.rankings-page {
  max-width: 720px;
  margin: 0 auto;
}

.rankings-hero {
  text-align: center;
  padding: 8px 0 18px;
}

.rankings-back {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.rankings-title {
  margin: 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: clamp(32px, 8vw, 48px);
  color: #ff4f8b;
  text-shadow: 0 3px 0 #fff;
}

.rankings-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.period-switch {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.period-btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(200, 120, 150, 0.18);
}

.period-btn.on {
  color: #fff;
  background: linear-gradient(180deg, #7ec8ff, #3a8fd4);
  box-shadow: 0 3px 0 #2a6fa8;
}

.rankings-tabs {
  margin-bottom: 12px;
}

.rankings-board {
  height: auto;
  max-height: none;
}

.rankings-board .score-list {
  max-height: min(70dvh, 560px);
}

/* 명예의 전당 */
.fame-page {
  max-width: 860px;
  margin: 0 auto;
}

.fame-hero {
  text-align: center;
  padding: 8px 0 18px;
}

.fame-title {
  margin: 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: clamp(32px, 8vw, 48px);
  color: #c47800;
  text-shadow: 0 3px 0 #fff;
}

.fame-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.fame-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 14px;
}

.fame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding-bottom: 28px;
}

.fame-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.78);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 22px rgba(61, 42, 54, 0.1);
  transition: transform 0.15s ease;
}

.fame-card:active {
  transform: translateY(1px);
}

.fame-card-crown {
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.fame-card-game {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
}

.fame-card-name {
  margin: 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-size: 20px;
  line-height: 1.15;
  color: #c47800;
  text-align: center;
  word-break: keep-all;
}

.fame-card-score {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.fame-card.empty .fame-card-name {
  color: var(--muted);
  font-size: 16px;
}

.fame-status {
  margin: 0 0 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* 공용 게임 랭킹 폼 (TodayGameRank) */
.rank-form,
.today-rank-form {
  width: min(280px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.rank-form label,
.today-rank-form label {
  font-size: 13px;
  color: var(--muted, #7a6a72);
}

.rank-form input,
.today-rank-form input {
  appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink, #3d2a36);
}

.rank-msg {
  min-height: 1.2em;
  margin: 0;
  font-size: 13px;
  color: #2f7a45;
}

.btn.soft {
  color: #fff;
  background: linear-gradient(180deg, #ff9ec4, var(--coral, #ff6b9d));
  box-shadow: 0 6px 0 #d93f74;
}

.btn.soft:active {
  box-shadow: 0 3px 0 #d93f74;
}

@media (max-width: 520px) {
  .challenge-stats {
    grid-template-columns: 1fr;
  }

  .challenge-stats div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 10px 12px;
  }

  .challenge-stats dd {
    margin: 0;
  }
}

.shelf-title {
  margin: 0;
  font-size: 22px;
  color: var(--ink);
}

.shelf-desc {
  margin: 4px 0 14px;
  font-size: 14px;
  color: var(--muted);
}

.cat-nav {
  position: sticky;
  top: 8px;
  z-index: 8;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 4px;
  margin: 0 -4px 12px;
  border-radius: 18px;
  background: rgba(255, 247, 251, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(61, 42, 54, 0.08);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cat-nav::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(61, 42, 54, 0.06);
  white-space: nowrap;
}

.cat-chip.on,
.cat-chip:hover,
.cat-chip:focus-visible {
  background: linear-gradient(180deg, #ff9ec4, var(--coral));
  color: #fff;
  border-color: transparent;
  outline: none;
}

/* 5종류 한 줄 — 고전은 오른쪽 레일로 분리 */
.catalog {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 2px 0 12px;
  margin: 0;
}

.cat-shelf {
  min-width: 0;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 64px;
}

.cat-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0 2px 8px;
  min-height: 2.4em;
}

.cat-title {
  margin: 0;
  font-size: clamp(11px, 1.35vw, 16px);
  color: var(--ink);
  line-height: 1.2;
  word-break: keep-all;
}

.cat-desc,
.cat-count {
  display: none;
}

.game-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%),
    linear-gradient(180deg, #ffd7b8 0%, var(--wood) 18%, var(--wood-deep) 100%);
  border-radius: 18px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    0 12px 28px var(--shadow);
  border: 3px solid rgba(255, 255, 255, 0.45);
}

.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
  min-height: 0;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.85),
    0 8px 16px var(--shadow);
  text-decoration: none;
  color: inherit;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: pop-in 0.45s ease-out both;
}

.slot:hover,
.slot:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.95),
    0 12px 22px rgba(61, 42, 54, 0.16);
  outline: none;
  z-index: 1;
}

.slot:active {
  transform: translateY(1px) scale(0.98);
}

.slot-art {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.7), transparent 60%),
    linear-gradient(160deg, #c8e9ff, #ffe8f0 70%);
}

.slot-art img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(61, 42, 54, 0.18));
  animation: floaty 3s ease-in-out infinite;
}

.slot.has-photo .slot-art {
  padding: 0;
  overflow: hidden;
}

.slot.has-photo .slot-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  animation: none;
  transition: transform 0.35s ease;
}

.slot.has-photo:hover .slot-art img,
.slot.has-photo:focus-visible .slot-art img {
  transform: scale(1.06);
}

.slot-emoji {
  font-size: 40px;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(61, 42, 54, 0.12));
  animation: floaty 3s ease-in-out infinite;
}

.slot-meta {
  flex: 0 0 auto;
  width: 100%;
  min-height: 2.6em;
  padding: 8px 6px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  background: #fff7fb;
  border-radius: 0 0 12px 12px;
}

.slot-name {
  margin: 0;
  font-size: clamp(11px, 1.15vw, 14px);
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink);
  white-space: normal;
  overflow: visible;
  word-break: keep-all;
}

.slot-tag,
.slot-play {
  display: none;
}

.slot.empty {
  cursor: default;
  background: rgba(255, 255, 255, 0.38);
  box-shadow:
    inset 0 0 0 2px dashed rgba(255, 255, 255, 0.7),
    inset 0 8px 18px rgba(61, 42, 54, 0.04);
}

.slot.empty:hover,
.slot.empty:focus-visible {
  transform: none;
  box-shadow:
    inset 0 0 0 2px dashed rgba(255, 255, 255, 0.7),
    inset 0 8px 18px rgba(61, 42, 54, 0.04);
}

.slot.empty .slot-art {
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.2) 8px,
    rgba(255, 240, 246, 0.35) 8px,
    rgba(255, 240, 246, 0.35) 16px
  );
}

.empty-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 3px dashed rgba(122, 90, 104, 0.35);
  display: grid;
  place-items: center;
  color: rgba(122, 90, 104, 0.45);
  font-size: 24px;
  line-height: 1;
}

.slot.empty .slot-meta {
  background: transparent;
}

.slot.empty .slot-name {
  color: var(--muted);
  font-size: 14px;
}

.foot p {
  margin: 0;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(18px, -14px) scale(1.06);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes soft-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 720px) {
  .page {
    padding-left: 8px;
    padding-right: 8px;
  }

  .catalog {
    gap: 5px;
  }

  .game-grid {
    padding: 6px;
    gap: 6px;
    border-radius: 14px;
  }

  .slot-meta {
    padding: 6px 4px 8px;
    min-height: 2.8em;
  }

  .slot-name {
    font-size: 10px;
    line-height: 1.3;
  }

  .cat-title {
    font-size: 10px;
  }
}

@media (min-width: 1100px) {
  .catalog {
    gap: 12px;
  }

  .game-grid {
    padding: 10px;
    gap: 10px;
  }

  .slot-name {
    font-size: 14px;
  }

  .cat-title {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob,
  .sparkle,
  .brand,
  .slot-art img,
  .hero,
  .shelf,
  .foot,
  .slot,
  .cat-chip {
    animation: none;
  }
}
