.site-header { position: sticky; top: 0; z-index: 100; width: 100%; background: rgba(255, 250, 246, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); box-shadow: 0 2px 16px rgba(173, 61, 97, 0.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 72px; padding-block: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; flex-shrink: 0; }
.brand-logo { width: 36px; height: 36px; display: block; flex-shrink: 0; border-radius: 10px; box-shadow: 0 2px 8px rgba(173, 61, 97, 0.14); transition: transform .2s ease; }
.brand:hover .brand-logo { transform: scale(1.08) rotate(4deg); }
.brand-name { font-size: 1.7rem; font-weight: 800; letter-spacing: .04em; white-space: nowrap; color: var(--text); }
.brand-note { color: var(--muted); font-size: 1rem; margin-left: .4rem; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.nav a { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: .35rem 1.15rem; border-radius: 999px; font-size: 1.25rem; font-weight: 700; white-space: nowrap; color: var(--text); transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--accent); background: #ffe5ec; }
.nav a[aria-current="page"] { color: var(--accent); background: #ffd8e2; font-weight: 800; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3.5rem; align-items: center; padding: 65px 0 60px; }
.hero-link { display: inline-flex; gap: 1.8rem; align-items: center; min-height: 54px; padding: .65rem 1.4rem; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 1.15rem; box-shadow: 0 6px 0 #f2cccf; transition: transform .2s, background .2s; }
.hero-link:hover { background: #96304f; transform: translateY(-2px); }
.note { position: relative; padding: 2.2rem; border: 1px solid #efc7ce; border-radius: 26px 26px 65px 26px; background: #fffdf9ec; box-shadow: 0 12px 40px #b9747910; transform: rotate(2deg); }
.note-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 1rem; color: var(--accent); }
.note-symbol { font-size: 2.2rem; line-height: 1; }
.note h2 { margin: 1.3rem 0 1rem; font-size: 1.7rem; line-height: 1.5; }
.note p { color: var(--muted); margin: 0; font-size: 1.1rem; }
.note-bottom { border-top: 1px dashed #e6c4c4; margin-top: 1.5rem; padding-top: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; color: #697345; font-size: 1rem; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .4rem; }
.section-title { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.section-title h2 { margin: 0; font-size: 1.8rem; }
.section-index { color: #886e68; font-size: 1rem; }
.learning-section { margin-bottom: 3rem; padding: 1.8rem; border: 1px solid var(--line); border-radius: 26px; background: #fff6f4; }
.learning-intro { margin: .5rem 0 1.4rem; color: var(--muted); font-size: 1rem; }
.learning-subjects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.subject-card { display: flex; flex-direction: column; padding: 1.4rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: transform .2s, box-shadow .2s; }
.subject-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px #a7617218; }
.subject-icon { font-size: 2rem; }
.subject-card h3 { margin: .6rem 0; font-size: 1.35rem; }
.subject-description { margin: 0 0 1rem; color: var(--muted); font-size: 1rem; }
.subject-action { display: flex; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .8rem; border-top: 1px dashed var(--line); color: #a43759; font-size: 1rem; font-weight: 700; }
.all-games { display: inline-flex; align-items: center; min-height: 48px; gap: .5rem; color: var(--accent); font-size: 1.15rem; font-weight: 650; }
.game-hint { margin: 0 0 1rem; color: var(--muted); font-size: 1rem; }
.games { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2.5rem) / 3); gap: 1.25rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-color: #d898ab #f4e6e3; scrollbar-width: thin; padding: 10px 5px 20px; scroll-padding-inline: 5px; }
.game-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); scroll-snap-align: start; transition: transform .2s, box-shadow .2s; }
.game-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px #a7617218; }
.game-cover { position: relative; display: flex; align-items: center; justify-content: center; min-height: 164px; border-bottom: 1px solid var(--line); overflow: hidden; }
.cover-duck { background: #f7ecc4; }
.cover-computer { background: #f9dce5; }
.cover-room { background: #e6efd5; }
.game-cover::before { content: ""; position: absolute; width: 118px; height: 118px; border: 1px solid #ffffffa6; border-radius: 50%; box-shadow: 0 0 0 22px #ffffff30, 0 0 0 44px #ffffff18; }
.game-emoji { position: relative; font-size: 4.2rem; line-height: 1.3; }
.cover-number { position: absolute; left: 1rem; top: .7rem; color: #7d6457; font-size: .875rem; }
.game-body { display: flex; flex-direction: column; flex: 1; padding: 1.2rem 1.35rem; }
.game-category { margin: 0 0 .4rem; color: var(--muted); font-size: 1rem; }
.game-body h3 { margin: 0; font-size: 1.4rem; }
.game-description { color: var(--muted); font-size: 1.05rem; margin: .6rem 0 1.2rem; }
.game-action { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; margin-top: auto; color: var(--accent); font-size: 1.15rem; font-weight: 700; }
.game-arrow { font-size: 1.35rem; }
.game-controls { display: flex; justify-content: flex-end; gap: .75rem; margin-top: .6rem; }
.game-controls button { border: 1px solid #d7b1b7; border-radius: 999px; min-height: 48px; padding: .3rem 1rem; background: #fffaf6; color: var(--accent); font-size: 1.1rem; }
.next-section { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; padding: 2rem 0; margin-top: 2.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next-section h2 { margin: .4rem 0; font-size: 1.5rem; }
.next-section p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.future-note { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; justify-content: flex-end; }
.future-note span { padding: .35rem .7rem; border: 1px dashed #b5c393; border-radius: 9px; color: #5c6b43; font-size: 1rem; }
.future-note .future-label { border: 0; padding-left: 0; }
.flower-toggle { background: transparent; border: 0; padding: .2rem .4rem; color: #9c8582; font-size: .92rem; cursor: pointer; border-radius: 4px; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
.flower-toggle:hover { color: var(--accent); text-decoration-style: solid; }
.flower-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.spring-branches { position: absolute; right: 0; top: 100px; width: min(580px, 62vw); height: 330px; background: url('./peach-branch.svg') right top / contain no-repeat; pointer-events: none; opacity: .85; }
.grass { height: 95px; background: url('./grass.svg') center bottom / 700px 95px repeat-x; pointer-events: none; }
.petals { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
.petal { position: absolute; top: -40px; left: var(--left); width: var(--size); height: calc(var(--size) * .7); background: var(--pink); border-radius: 80% 10% 70% 25%; opacity: .7; animation: falling var(--duration) linear var(--delay) infinite; }
.petals.paused .petal { animation-play-state: paused; }
@keyframes falling { 0% { transform: translate3d(0, -40px, 0) rotate(0); } 45% { transform: translate3d(35px, 48vh, 0) rotate(155deg); } 100% { transform: translate3d(-35px, 108vh, 0) rotate(330deg); } }
.game-player { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #fffaf6; color: var(--text); }
.game-player[open] { display: flex; flex-direction: column; }
.game-player iframe { display: block; width: 100%; flex: 1; min-height: 0; border: 0; background: #fffaf6; }
html.playing { overflow: hidden; }
html.playing .petal { animation-play-state: paused; }
@media (min-width: 641px) and (max-width: 1100px) {
  .header-inner { flex-wrap: wrap; gap: .4rem 1rem; }
  .nav { gap: .3rem; }
  .nav a { padding-inline: .8rem; font-size: 1.1rem; }
}
@media (max-width: 900px) {
  .hero { gap: 2rem; padding: 48px 0; }
  .note { padding: 1.5rem; transform: none; }
  .games { grid-auto-columns: calc((100% - 1.25rem) / 2); }
}
@media (max-width: 900px) {
  /* 平板及手机端：定住（吸顶）时，导航旁边去掉“我的世界”与副标题 */
  .site-header.is-stuck .brand-name,
  .site-header.is-stuck .brand-note {
    display: none !important;
  }
}
@media (max-width: 640px) {

  /* 未固定时：展示与 PC 端一致的完整元素（包含副标题），采用优雅的两行布局 */
  .site-header:not(.is-stuck) .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
    padding-block: .85rem .65rem;
    min-height: auto;
  }
  .site-header:not(.is-stuck) .brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
  }
  .site-header:not(.is-stuck) .brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    display: inline-block;
  }
  .site-header:not(.is-stuck) .brand-note {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--muted);
    margin-left: .25rem;
  }
  .site-header:not(.is-stuck) .nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: .3rem;
  }
  .site-header:not(.is-stuck) .nav a {
    min-height: 44px;
    padding: .3rem .4rem;
    font-size: clamp(.9rem, 3.7vw, 1.15rem);
  }

  /* 定住（吸顶）时：导航旁边去掉“我的世界”，只保留“花瓣”和导航，单行紧凑 */
  .site-header.is-stuck .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
    min-height: 54px;
    padding-block: .35rem;
  }
  .site-header.is-stuck .brand {
    display: inline-flex;
    align-items: center;
  }
  .site-header.is-stuck .brand-logo {
    width: 32px;
    height: 32px;
  }
  .site-header.is-stuck .nav {
    display: flex;
    align-items: center;
    gap: .15rem;
  }
  .site-header.is-stuck .nav a {
    min-height: 40px;
    padding: .25rem .2rem;
    font-size: clamp(.8rem, 3.4vw, 1.05rem);
  }

  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 30px 0; }
  .note { transform: none; padding: 1.4rem; }
  .note h2 { margin: .7rem 0; font-size: 1.5rem; }
  .note-bottom { margin-top: 1rem; }
  .section-title { gap: .5rem; }
  .section-title h2 { font-size: 1.6rem; }
  .learning-section { padding: 1.1rem; margin-bottom: 2rem; }
  .learning-subjects { grid-template-columns: 1fr; }
  .subject-card { padding: 1.1rem; }
  .games { grid-auto-columns: 88%; gap: 1rem; }
  .game-body { padding: 1.1rem; }
  .next-section { grid-template-columns: 1fr; gap: 1.2rem; margin-top: 2rem; padding-block: 1.5rem; }
  .future-note { justify-content: flex-start; }
  .spring-branches { top: 76px; width: 60vw; opacity: .4; }
}
@media (max-width: 360px) {
  .site-header:not(.is-stuck) .brand-name { font-size: 1.25rem; }
  .site-header:not(.is-stuck) .brand-note { font-size: 0.85rem; }
  .nav a { padding: .2rem .45rem; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .petals { display: none; }
}
