:root {
  --bg: #f4f9fe;
  --ink: #17324d;
  --phone: 440px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #d5e2ee;
}

button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 3px solid #3aa0f0;
  outline-offset: 2px;
}

img { max-width: 100%; }

.stage {
  width: 100%;
  min-height: 100%;
  display: flex;
  justify-content: center;
}

.app {
  width: min(100%, var(--phone));
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 120, 160, 0.35) transparent;
}

.brand {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 8px 72px 4px;
  background: rgba(244, 249, 254, 0.94);
  backdrop-filter: blur(10px);
}

.brand[hidden] { display: none; }

.logo {
  display: block;
  width: min(220px, 100%);
  height: auto;
}

.back {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(23, 50, 77, 0.12);
  cursor: pointer;
}

.chev {
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-right: 2px;
}

.hero {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.slides {
  display: flex;
  transition: transform 0.45s ease;
}

.slides img {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  max-width: none;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.dot.on {
  width: 18px;
  background: #fff;
}

.entry-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
  padding: 0 6px;
}

.entry,
.scan,
.play-grid button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.entry {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(40, 70, 100, 0.12);
}

.entry:active,
.scan:active,
.play-grid button:active { transform: scale(0.98); }

.entry img,
.scan img,
.play-grid img,
.foot img,
.poster-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.scan {
  display: block;
  width: calc(100% - 24px);
  margin: 12px 12px 0;
}

.fun-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 8px;
}

.fun-head h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #1b3f66;
}

.bars {
  width: 7px;
  height: 16px;
  margin-right: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #5ef0d2, #2bb8e6);
  transform: skewX(-16deg);
  box-shadow: 5px 0 0 #b7f3ea;
}

.marks {
  color: #3ec6ea;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.en {
  padding-bottom: 2px;
  color: #c5d0dc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.play-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 12px 4px;
}

.notice {
  margin: 32px 12px 0;
}

.notice img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(40, 70, 100, 0.1);
}

.foot {
  padding: 2px 6px calc(16px + env(safe-area-inset-bottom));
}

.detail { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }

.detail-head {
  padding: 2px 18px 0;
}

.detail-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
}

.poster-frame {
  margin: 12px 14px 8px;
  padding: 8px;
  border-radius: 20px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(145deg, #9ad8ff, #d7fff4 50%, #ffe08a) border-box;
  border: 3px solid transparent;
  box-shadow: 0 10px 24px rgba(36, 72, 120, 0.1);
}

.poster-frame img {
  border-radius: 14px;
  background: #f7f1e6;
}

.back-bottom {
  display: block;
  width: calc(100% - 48px);
  margin: 8px auto 0;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #49c4ff, #1f8fe8);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(31, 143, 232, 0.28);
}

.back-bottom:active { transform: scale(0.98); }

@media (min-width: 520px) {
  .stage {
    align-items: center;
    padding: 24px 0;
  }

  .app {
    height: min(940px, calc(100dvh - 48px));
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(20, 40, 70, 0.28);
  }
}
