:root {
  --pink: #ff4fa3;
  --violet: #a855f7;
  --bg: #fff5fb;
  --bg-soft: #fff7fc;
  --card: #ffffff;
  --text: #222222;
  --muted: #777777;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --line: #ffd3e8;
  --shadow: 0 8px 24px rgba(255, 79, 163, 0.12);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  letter-spacing: 0;
  padding-bottom: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
main { width: min(1180px, calc(100% - 24px)); margin: 0 auto; padding: 18px 0 42px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(12px, env(safe-area-inset-left)) 10px max(12px, env(safe-area-inset-right));
  background: rgba(255, 247, 252, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; white-space: nowrap; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  font-weight: 800;
  box-shadow: var(--shadow);
}
.top-nav { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.top-nav a { flex: 0 0 auto; padding: 8px 10px; color: #4b4b4b; font-size: 14px; border-radius: 999px; }
.top-nav .return-link { color: #fff; background: linear-gradient(135deg, var(--pink), var(--violet)); }

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  min-height: 360px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 79, 163, 0.18), rgba(168, 85, 247, 0.12)),
    url("../img/pink-play-bg.png");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.hero-copy { align-self: center; max-width: 620px; }
.eyebrow { margin: 0 0 8px; color: var(--pink); font-weight: 800; font-size: 13px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { margin-bottom: 12px; font-size: 42px; line-height: 1.12; }
.hero-copy p:not(.eyebrow) { color: #5c4b58; font-size: 17px; line-height: 1.7; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: var(--shadow); }
.btn-secondary { color: var(--pink); background: #fff; border: 1px solid var(--line); }
.btn-muted { color: #999; background: #f3f4f6; cursor: not-allowed; }

.hero-showcase { display: grid; gap: 12px; align-content: center; }
.hero-tile {
  min-height: 84px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}
.hero-tile span { display: block; font-size: 18px; font-weight: 900; }
.hero-tile small { color: var(--muted); }

.notice-strip {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.notice-strip strong { color: var(--pink); }
.notice-strip div { display: flex; gap: 20px; color: #555; white-space: nowrap; overflow: hidden; }

.banner-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.banner-item { min-height: 110px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.banner-item img { width: 100%; height: 100%; object-fit: cover; }

.section-head, .page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}
.section-head h2, .page-title h1 { margin: 0; }
.section-head a { color: var(--pink); font-weight: 800; }
.page-title { display: block; }
.page-title p { color: var(--muted); }

.sticky-search {
  position: sticky;
  top: 59px;
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 0;
  background: rgba(255, 245, 251, 0.94);
  backdrop-filter: blur(10px);
}
input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; }
.category-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.category-scroll a {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #5b5560;
}
.category-scroll a.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--pink), var(--violet)); }

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.game-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.08);
  overflow: hidden;
}
.game-card-main { display: block; }
.game-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.74;
  background: linear-gradient(135deg, #ff7abf, #a855f7 62%, #22c5c5);
  overflow: hidden;
}
.game-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.game-art-fallback { color: rgba(255, 255, 255, 0.9); font-size: 30px; font-weight: 900; }
.badge-hot, .badge-maint, .badge-rec {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: var(--pink);
}
.badge-rec { left: 8px; right: auto; background: var(--violet); }
.badge-maint { top: auto; bottom: 8px; left: 8px; right: auto; background: var(--warning); }
.game-card-body { display: grid; gap: 6px; padding: 10px; }
.game-card h3 { margin: 0; font-size: 15px; line-height: 1.35; word-break: break-word; }
.game-card p { margin: 0; color: var(--muted); font-size: 12px; min-height: 32px; word-break: break-word; }
.game-card-copy { display: grid; gap: 5px; padding: 10px 10px 0; min-height: 116px; }
.game-card-copy strong { font-size: 15px; line-height: 1.35; word-break: break-word; }
.game-card-copy small { color: var(--muted); min-height: 32px; word-break: break-word; }
.game-id { color: #8f5d79; font-size: 12px; }
.card-tags, .detail-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.card-tags em, .detail-tags span {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--tag-color, var(--pink));
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}
.trial-count { color: var(--muted); font-size: 12px; text-align: center; }
.game-card .btn { width: 100%; min-height: 34px; font-size: 13px; }
.game-card.is-disabled { filter: grayscale(0.35); opacity: 0.78; }

.detail-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.detail-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.78;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff7abf, #a855f7 62%, #22c5c5);
  color: #fff;
  font-size: 52px;
  font-weight: 900;
  overflow: hidden;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { align-self: center; }
.detail-info h1 { margin-bottom: 8px; font-size: 34px; }
.muted { color: var(--muted); }

.loading-page, .mock-game, .maintenance-page, .error-page, .about-panel {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 58vh;
  text-align: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.loading-mark {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 5px solid #ffe1f0;
  border-top-color: var(--pink);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.slow-tip { display: none; color: var(--warning); }
.slow-tip.show { display: block; }
.launch-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: min(760px, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
}
.launch-steps li {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #ffd0e7;
  border-radius: 8px;
  background: #fff7fc;
  color: #8b275b;
  font-weight: 800;
}
.launch-actions, .frame-toolbar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.play-launch { place-items: center; }
.play-error h1, .play-launch h1 { margin-bottom: 6px; }
.game-frame { width: 100%; min-height: 72vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mock-screen {
  display: grid;
  place-items: center;
  gap: 8px;
  width: min(520px, 100%);
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #ff4fa3, #a855f7 52%, #22c55e);
}
.mock-screen strong { font-size: 22px; }
.category-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.category-tiles a {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(168,85,247,.08);
}
.category-tiles span { color: var(--muted); font-size: 12px; }
.tag-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 12px;
  scrollbar-width: none;
}
.tag-scroll a {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--tag-color, var(--pink)) 35%, white);
  border-radius: 999px;
  color: var(--tag-color, var(--pink));
  background: #fff;
  font-weight: 800;
}
.tag-scroll a.active {
  color: #fff;
  border-color: transparent;
  background: var(--tag-color, var(--pink));
}
.lobby-filters { grid-template-columns: minmax(180px, 1fr) 150px 150px 150px auto; }
.service-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.home-about { align-items: center; margin-top: 22px; min-height: auto; }
.home-about p { max-width: 760px; line-height: 1.8; }
.notice-list { display: grid; gap: 12px; }
.notice-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.notice-card time { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; margin-right: 8px; padding: 3px 8px; border-radius: 999px; color: #fff; background: var(--pink); font-size: 12px; }
.empty-state { padding: 28px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; color: var(--muted); text-align: center; }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.pagination a { padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pagination a.active { color: #fff; background: var(--pink); }
.site-footer { padding: 24px max(12px, env(safe-area-inset-left)) calc(24px + env(safe-area-inset-bottom)); color: var(--muted); text-align: center; }
.site-footer p { margin: 6px 0; font-size: 13px; }
.mobile-bottom-nav, .mobile-service-float { display: none; }

@media (min-width: 720px) {
  .game-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .game-grid-wide { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .top-nav { width: 100%; }
  .hero-band { grid-template-columns: 1fr; min-height: auto; padding: 22px; }
  .hero-copy h1 { font-size: 30px; }
  .hero-showcase { grid-template-columns: 1fr; }
  .banner-grid { grid-template-columns: 1fr; }
  .category-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby-filters { grid-template-columns: 1fr 1fr; }
  .lobby-filters input { grid-column: 1 / -1; }
  .lobby-filters .btn { grid-column: 1 / -1; }
  .detail-layout { grid-template-columns: 1fr; padding: 14px; }
  .sticky-search { top: 98px; }
  body { padding-bottom: 70px; }
  main { width: min(100% - 16px, 1180px); padding-top: 12px; }
  .game-grid { gap: 10px; }
  .game-card-copy { min-height: 126px; }
  .game-art-fallback { font-size: 20px; }
  .service-band { align-items: stretch; flex-direction: column; }
  .launch-steps { grid-template-columns: 1fr 1fr; }
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px max(8px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(14px);
  }
  .mobile-bottom-nav a {
    display: grid;
    place-items: center;
    min-height: 38px;
    color: #5b5560;
    font-size: 13px;
    font-weight: 800;
  }
  .mobile-service-float {
    position: fixed;
    right: 12px;
    bottom: 74px;
    z-index: 29;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--violet));
    box-shadow: var(--shadow);
    font-weight: 800;
  }
}

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