/* 小魔女学院官网。配色取自游戏：奶油、蜂蜜黄、蜜桃、樱花粉、淡紫、薄荷，字是暖棕色；收藏卡那一段换成夜空，卡片带镭射。 */
:root {
  --ink: #68462a; --ink-soft: #9a7b5c; --cream: #fffaee; --honey: #ffe6a8; --honey-d: #ffd27a; --peach: #ffdfc2; --pink: #ffd6dd; --pink-d: #ffb9c6;
  --lav: #e6dcfb; --lav-d: #cfbff5; --mint: #cff3e5; --mint-d: #a6e5cf; --sky: #d5e8fb; --orange: #f7933a; --teal: #2bb89f; --plum: #4a2f7a; --night: #2a1a55; --gold: #ffd978;
  --round: "Yuanti SC", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", "Nunito", "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
section[id] { scroll-margin-top: 84px; }   /* 点顶栏跳过来的时候，标题不会钻到顶栏底下 */
/* 手机上整页不许左右滑：iOS 只在 body 上写 overflow-x:hidden 不管用，html 也要写；每一段再各自裁一次（预告片后面那圈彩色光晕、发光的阴影都会伸到屏幕外面） */
html { overflow-x: hidden; overflow-x: clip; max-width: 100%; }
main > section, .foot { overflow-x: hidden; overflow-x: clip; }
body { position: relative; width: 100%; max-width: 100%; margin: 0; font-family: var(--round); color: var(--ink); background: var(--cream); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- 顶栏 ---------- */
.nav { position: fixed; z-index: 30; top: 12px; left: 50%; transform: translateX(-50%); width: min(1120px, calc(100% - 24px)); display: flex; align-items: center; gap: 18px; padding: 8px 14px 8px 10px;
  background: rgba(255, 250, 238, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 999px; box-shadow: 0 6px 24px rgba(104, 70, 42, .14), inset 0 0 0 2px rgba(255, 255, 255, .7); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; white-space: nowrap; }
.brand { min-width: 0; } .brand span { overflow: hidden; text-overflow: ellipsis; } .lang { flex: none; }
.brand img { flex: none; border-radius: 11px; box-shadow: 0 2px 6px rgba(104, 70, 42, .25); }
.links { display: flex; gap: 6px; margin-left: auto; }
.links a { text-decoration: none; font-weight: 700; font-size: 15px; padding: 7px 14px; border-radius: 999px; transition: background .2s, transform .2s; }
.links a:hover { background: var(--honey); transform: translateY(-1px); }
.lang { position: relative; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 6px 10px 6px 12px; box-shadow: inset 0 0 0 2px var(--honey-d); }
.lang select { appearance: none; border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); padding-right: 14px; cursor: pointer; outline: none; }
.lang::after { content: ""; position: absolute; right: 11px; top: 50%; width: 7px; height: 7px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.globe { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink); background: linear-gradient(90deg, transparent 44%, var(--ink) 44% 56%, transparent 56%), linear-gradient(0deg, transparent 44%, var(--ink) 44% 56%, transparent 56%); opacity: .75; }

/* ---------- 首屏 ---------- */
/* 首屏的高度只跟着内容走，最多撑到一屏高；内容用 margin:auto 居中（放不下的时候它会贴着上沿排，不会像 align-items:center 那样往上顶出去、被顶栏盖住又滑不到）。
   塔莉娅那一块的高度按宽度算，不用 vh：窗口又宽又矮、或者被别的面板挡住一截的时候，它不会变得比窗口还高。 */
.hero { position: relative; min-height: min(100svh, 880px); padding: 118px 24px 120px; display: flex; overflow: hidden; }
.sky { position: absolute; inset: 0; background: linear-gradient(170deg, #fff1c7 0%, var(--honey) 34%, var(--peach) 68%, var(--pink) 100%); }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .75; animation: drift 16s ease-in-out infinite alternate; }
.o1 { width: 46vw; height: 46vw; left: -12vw; top: -10vw; background: #fff6d8; }
.o2 { width: 38vw; height: 38vw; right: -8vw; top: 8vw; background: var(--lav); animation-duration: 21s; }
.o3 { width: 34vw; height: 34vw; left: 30vw; bottom: -18vw; background: #ffc9d6; animation-duration: 25s; }
@keyframes drift { to { transform: translate(4vw, 3vw) scale(1.12); } }
.hats { position: absolute; inset: 0; background: url(img/pattern_hats.webp) 0 0 / 260px; opacity: .28; mix-blend-mode: soft-light; animation: slide 60s linear infinite; }
@keyframes slide { to { background-position: 260px 260px; } }
#sparkles i, #stars i { position: absolute; background: url(img/sparkle_a.webp) center / contain no-repeat; animation: twinkle 3.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.6) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(20deg); } }
.hero-in { position: relative; z-index: 2; width: min(1180px, 100%); margin: auto; display: grid; grid-template-columns: 1.02fr .98fr; gap: 28px; align-items: center; }
.title { margin: 0 0 6px; }
.title img { width: min(560px, 100%); filter: drop-shadow(0 8px 0 rgba(255, 255, 255, .55)) drop-shadow(0 16px 24px rgba(104, 70, 42, .18)); animation: pop .9s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.94); } }
.pill { display: inline-block; margin: 14px 0 0; padding: 9px 26px; border-radius: 999px; color: #fff; font-weight: 800; font-size: clamp(17px, 2vw, 22px); background: linear-gradient(180deg, #ffa551, var(--orange)); box-shadow: 0 5px 0 #d9762a, 0 12px 22px rgba(247, 147, 58, .35); }
.intro { margin: 26px 0 0; max-width: 34em; font-size: clamp(16px, 1.45vw, 19px); font-weight: 600; color: #7a5636; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font: inherit; font-weight: 800; font-size: 17px; border: 0; cursor: pointer; text-decoration: none; overflow: hidden; transition: transform .18s; }
.btn:hover { transform: translateY(-3px); }
.btn.store { background: linear-gradient(180deg, #5a3d94, var(--plum)); color: #fff; box-shadow: 0 6px 0 #33205a, 0 16px 28px rgba(74, 47, 122, .35); cursor: default; }
.btn.store::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .5) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.6s ease-in-out infinite; }
@keyframes shine { 55%, 100% { transform: translateX(120%); } }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 6px 0 var(--honey-d), 0 14px 24px rgba(104, 70, 42, .16); }
.spark { width: 24px; height: 24px; background: url(img/sparkle_a.webp) center / contain no-repeat; }
.play { width: 0; height: 0; border-left: 14px solid var(--orange); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.free { margin: 18px 0 0; font-size: 13.500px; color: var(--ink-soft); font-weight: 600; }
.hero-art { position: relative; height: clamp(440px, 46vw, 640px); }
.halo { position: absolute; left: 50%; top: 4%; width: 84%; aspect-ratio: 1; transform: translateX(-46%); border-radius: 50%; background: radial-gradient(circle, #fffdf2 0%, #fff6d6 55%, rgba(255, 246, 214, 0) 72%); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateX(-46%) scale(1.06); } }
.talia { position: absolute; right: 2%; bottom: 0; height: 100%; width: auto; filter: drop-shadow(0 22px 26px rgba(74, 47, 122, .3)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }
.board { position: absolute; left: -2%; bottom: 3%; width: 54%; border: 8px solid var(--cream); border-radius: 34px; box-shadow: 0 18px 0 rgba(255, 210, 122, .6), 0 30px 46px rgba(104, 70, 42, .28); transform: rotate(-4deg); animation: float 8s ease-in-out -2s infinite; }
.scallop { position: absolute; left: 0; right: 0; bottom: -1px; height: 46px; background: radial-gradient(circle at 23px 46px, var(--cream) 23px, transparent 24px) 0 0 / 46px 46px repeat-x; z-index: 3; }
.scallop.dark { background-image: radial-gradient(circle at 23px 46px, var(--cream) 23px, transparent 24px); }
.scallop.top { bottom: auto; top: -45px; background-image: radial-gradient(circle at 23px 46px, var(--honey) 23px, transparent 24px); }

/* ---------- 通用标题 ---------- */
section { position: relative; padding: 92px 24px; }
.h2 { margin: 0 auto 10px; text-align: center; font-size: clamp(30px, 4.4vw, 50px); font-weight: 900; letter-spacing: .02em; }
.h2::after { content: ""; display: block; width: 86px; height: 10px; margin: 14px auto 0; border-radius: 999px; background: repeating-linear-gradient(90deg, var(--orange) 0 14px, transparent 14px 24px); }
.h2.light { color: #fff7e0; text-shadow: 0 4px 0 rgba(0, 0, 0, .25); } .h2.light::after { background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 24px); }
.sub { text-align: center; margin: 8px 0 0; font-weight: 700; font-size: clamp(16px, 1.8vw, 20px); } .sub.light { color: #e7dcff; }
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s, transform .8s cubic-bezier(.2, .9, .3, 1); } .reveal.in { opacity: 1; transform: none; }

/* ---------- 三步破案 ---------- */
.how { background: var(--cream); }
.steps { width: min(1120px, 100%); margin: 46px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { position: relative; border-radius: 36px; padding: 26px 22px 0; text-align: center; overflow: hidden; box-shadow: 0 10px 0 rgba(104, 70, 42, .08), 0 22px 40px rgba(104, 70, 42, .12); transition: transform .3s; }
.step:hover { transform: translateY(-8px) rotate(-.6deg); }
.step:nth-child(1) { background: var(--lav); } .step:nth-child(2) { background: var(--mint); } .step:nth-child(3) { background: #e3f4c6; }
.step .no { position: absolute; left: 18px; top: 16px; width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 900; font-size: 22px; box-shadow: 0 4px 0 rgba(104, 70, 42, .15); }
.step h3 { margin: 6px 0 2px; font-size: clamp(21px, 2.3vw, 27px); font-weight: 900; }
.step p { margin: 0 0 18px; font-weight: 700; color: #7a5636; }
.step img { width: 86%; margin: 0 auto -8%; border-radius: 26px 26px 0 0; box-shadow: 0 0 0 5px rgba(255, 255, 255, .8), 0 -6px 26px rgba(104, 70, 42, .2); }
.points { list-style: none; width: min(1120px, 100%); margin: 44px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.points li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px; padding: 11px 24px 11px 14px; font-weight: 800; box-shadow: inset 0 0 0 3px var(--honey), 0 6px 14px rgba(104, 70, 42, .08); }
.points li::before { content: ""; width: 26px; height: 26px; background: url(img/star_big_on.webp) center / contain no-repeat; }

/* ---------- 预告片 ---------- */
.trailer { background: linear-gradient(180deg, var(--cream), var(--sky) 60%, var(--lav)); text-align: center; }
.phone { position: relative; width: min(330px, 78vw); margin: 44px auto 0; aspect-ratio: 886 / 1920; border-radius: 44px; padding: 10px; background: var(--cream); box-shadow: 0 0 0 4px #fff, 0 16px 0 rgba(179, 212, 246, .8), 0 40px 70px rgba(74, 47, 122, .3); }
.phone::before { content: ""; position: absolute; inset: -28px; z-index: -1; border-radius: 80px; background: conic-gradient(from 0deg, #ffd6dd, #ffe6a8, #cff3e5, #d5e8fb, #e6dcfb, #ffd6dd); filter: blur(42px); opacity: .9; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 34px; background: #000; display: block; }
.credit { margin: 30px 0 0; font-size: 13px; color: var(--ink-soft); font-weight: 600; }

/* ---------- 收藏卡（夜空） ---------- */
.cards { background: radial-gradient(120% 90% at 50% 0%, #5b3d9e 0%, #37226d 46%, var(--night) 100%); padding: 110px 0 150px; overflow: hidden; }
.cards::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 46px; background: radial-gradient(circle at 23px 0, var(--lav) 23px, transparent 24px) 0 0 / 46px 46px repeat-x; }
.night { position: absolute; inset: 0; background: radial-gradient(60% 50% at 20% 30%, rgba(255, 185, 198, .22), transparent 70%), radial-gradient(50% 40% at 82% 60%, rgba(166, 229, 207, .18), transparent 70%); }
.deck { position: relative; display: flex; gap: 26px; padding: 56px 8vw 30px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; perspective: 1400px; }
.deck::-webkit-scrollbar { display: none; }
.deck, .strip { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }   /* 卡片和截图那两排自己能左右滑，滑到头不带着整页动 */
.card { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; --glow: 0; flex: none; position: relative; width: clamp(210px, 23vw, 290px); aspect-ratio: 600 / 839; border-radius: 22px; scroll-snap-align: center; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .35s cubic-bezier(.2, .9, .3, 1); transform-style: preserve-3d;
  box-shadow: 0 0 0 5px #fff8e0, 0 0 0 8px var(--gold), 0 22px 44px rgba(0, 0, 0, .5), 0 0 calc(var(--glow) * 60px) rgba(255, 217, 120, calc(var(--glow) * .8)); }
.card:nth-child(odd) { margin-top: 34px; }
.card img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: 22px; z-index: 2; pointer-events: none; mix-blend-mode: color-dodge; opacity: calc(.18 + var(--glow) * .5);
  background: linear-gradient(115deg, transparent 20%, rgba(255, 110, 180, .55) 36%, rgba(255, 230, 120, .55) 46%, rgba(120, 255, 210, .55) 56%, rgba(120, 170, 255, .55) 66%, transparent 82%); background-size: 260% 260%; background-position: var(--mx) var(--my); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: 22px; z-index: 3; pointer-events: none; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .55), transparent 42%); opacity: var(--glow); mix-blend-mode: soft-light; }
.card .rare { position: absolute; z-index: 4; left: 12px; top: 12px; padding: 3px 12px; border-radius: 999px; font-weight: 900; font-size: 14px; color: #6a3b00; background: linear-gradient(120deg, #fff3b8, #ffd978 40%, #ffb9c6 70%, #c9e9ff); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.cards .scallop.dark { bottom: -1px; }

/* ---------- 游戏画面 ---------- */
.gallery { background: var(--cream); padding-left: 0; padding-right: 0; }
.strip { display: flex; gap: 22px; padding: 44px 6vw 26px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--honey-d) transparent; }
.strip img { flex: none; width: clamp(200px, 21vw, 258px); border-radius: 26px; scroll-snap-align: center; box-shadow: 0 0 0 5px #fff, 0 14px 30px rgba(104, 70, 42, .2); transition: transform .3s; cursor: zoom-in; }
.strip img:hover { transform: translateY(-10px) scale(1.03); }

/* ---------- 最新消息 ---------- */
.news { background: linear-gradient(180deg, var(--cream), var(--honey)); padding-bottom: 140px; }
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 30px 0 26px; }
.tabs button { font: inherit; font-weight: 800; font-size: 15px; border: 0; cursor: pointer; padding: 8px 20px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 3px var(--honey-d); transition: transform .15s; }
.tabs button:hover { transform: translateY(-2px); } .tabs button.on { background: var(--orange); color: #fff; box-shadow: 0 4px 0 #d9762a; }
.posts { width: min(860px, 100%); margin: 0 auto; display: grid; gap: 18px; }
.post { background: #fff; border-radius: 28px; padding: 22px 26px; box-shadow: 0 8px 0 rgba(255, 210, 122, .55), 0 18px 30px rgba(104, 70, 42, .1); }
.post .meta { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.post .tag { padding: 2px 14px; border-radius: 999px; color: #fff; font-weight: 800; } .tag.notice { background: var(--teal); } .tag.event { background: #f2718f; } .tag.update { background: #8c7ae6; }
.post h3 { margin: 8px 0 6px; font-size: clamp(19px, 2.200vw, 24px); font-weight: 900; }
.post p { margin: 0; white-space: pre-line; font-weight: 600; color: #7a5636; }
.post img { margin-top: 14px; border-radius: 18px; }
.empty { text-align: center; font-weight: 700; color: var(--ink-soft); }

/* ---------- 页脚 ---------- */
.foot { position: relative; background: var(--honey); text-align: center; padding: 56px 24px 46px; }
.foot .scallop.top { top: -45px; }
.foot img { margin: 0 auto 10px; border-radius: 16px; box-shadow: 0 4px 12px rgba(104, 70, 42, .25); }
.fname { margin: 0; font-weight: 900; font-size: 19px; }
.flinks { margin: 14px 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; }
.flinks a { text-decoration: none; border-bottom: 3px dotted rgba(104, 70, 42, .4); } .flinks a:hover { border-bottom-style: solid; }
.copy { margin: 18px 0 0; font-size: 12.500px; color: #8a6a48; }

/* ---------- 弹出的预告片 / 大图 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(42, 26, 85, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal .phone.big { margin: 0; width: min(380px, 80vw, 42vh); }
.modal img.zoom { max-height: 92vh; width: auto; border-radius: 28px; box-shadow: 0 0 0 6px #fff, 0 30px 60px rgba(0, 0, 0, .5); }
.close { position: absolute; right: 18px; top: 18px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 30px; line-height: 1; cursor: pointer; box-shadow: 0 4px 0 var(--honey-d); }

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .links { display: none; } .lang { margin-left: auto; }
  .hero { padding-top: 96px; } .hero-in { grid-template-columns: 1fr; text-align: center; } .intro { margin-left: auto; margin-right: auto; } .cta { justify-content: center; }
  .title img { margin: 0 auto; } .hero-art { height: 92vw; max-height: 560px; margin-top: 10px; } .talia { right: 6%; } .board { left: 2%; width: 50%; }
  .steps { grid-template-columns: 1fr; max-width: 420px; } section { padding: 70px 18px; } .cards { padding: 90px 0 120px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }
