:root {
  --ink: #162830;
  --muted: #617986;
  --paper: rgba(255, 255, 255, 0.88);
  --paper-2: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.95);
  --mint: #12b39a;
  --mint-2: #0d9782;
  --sky: #4db7df;
  --warm: #ff7a59;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.22, 1.45, 0.36, 1);
  --font: "Outfit", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: #b9e0da;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { appearance: none; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.hidden { display: none !important; }

.bg { position: fixed; inset: 0; z-index: 0; background: #8ecfc7; }
.bg-layer {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  filter: saturate(1.12) brightness(1.1);
  transition: opacity 2.3s var(--ease), transform 22s linear;
}
.bg-layer.on { opacity: 1; transform: scale(1); }
.bg-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(255,255,255,0.45), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.2), rgba(210,240,235,0.42));
}

.shell {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 1rem));
  margin: 0 auto;
  padding: 0.9rem 0 5.5rem;
}

.view.is-out { animation: out 0.35s var(--ease) both; }
.view.is-in { animation: in 0.55s var(--ease) both; }
@keyframes out {
  to { opacity: 0; transform: translateY(18px) scale(0.985); filter: blur(5px); }
}
@keyframes in {
  from { opacity: 0; transform: translateY(24px) scale(0.98); filter: blur(7px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes eq {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1.25); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes shine {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* gate */
.gate {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: 1rem;
  background: rgba(18, 40, 48, 0.35);
  backdrop-filter: blur(14px);
}
.gate-card {
  position: relative;
  width: min(420px, 100%);
  border-radius: 28px;
  padding: 1.6rem 1.35rem 1.35rem;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 30px 70px -28px rgba(20,50,60,0.55);
  overflow: hidden;
  animation: pop 0.55s var(--ease) both;
}
.gate-orb {
  position: absolute;
  width: 180px; height: 180px;
  right: -40px; top: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18,179,154,0.28), transparent 70%);
  pointer-events: none;
}
.gate-kicker {
  margin: 0;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--mint-2);
}
.gate-card h2 {
  margin: 0.35rem 0 0;
  font-family: var(--font);
  font-size: 1.7rem;
  font-weight: 800;
}
.gate-desc {
  margin: 0.4rem 0 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}
#card-input {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(18,179,154,0.25);
  background: #f4fbf9;
  padding: 0 0.95rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  outline: none;
}
#card-input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(18,179,154,0.12);
}
.gate-err {
  min-height: 1.2em;
  margin: 0.45rem 0 0.7rem;
  color: #e11d48;
  font-size: 0.82rem;
  font-weight: 700;
}
.gate-btn {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(120deg, var(--mint-2), var(--mint) 40%, var(--sky));
  box-shadow: 0 14px 30px -14px rgba(18,179,154,0.65);
}
.gate-qq {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  height: 42px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--mint-2);
  background: rgba(18,179,154,0.1);
}
.gate-dismiss {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  height: 40px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
}
.gate-dismiss:hover { color: var(--ink); }

/* music */
.music-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 60;
  width: 54px; height: 54px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: #fff;
  border: 1px solid rgba(18,179,154,0.18);
  color: var(--mint);
  box-shadow: 0 14px 30px -14px rgba(18,179,154,0.45);
  transition: transform 0.5s var(--spring);
}
.music-fab:hover { transform: translateY(-5px) scale(1.05); }
.music-fab.on {
  background: linear-gradient(145deg, var(--mint), var(--sky));
  color: #fff;
  border-color: transparent;
}
.music-eq { display: flex; align-items: flex-end; gap: 3px; height: 15px; }
.music-eq i {
  width: 3px; height: 13px; border-radius: 2px;
  background: currentColor; display: block;
  transform-origin: bottom; transform: scaleY(0.4);
}
.music-fab.on .music-eq i { animation: eq 0.75s ease-in-out infinite; }
.music-fab.on .music-eq i:nth-child(2) { animation-delay: 0.12s; }
.music-fab.on .music-eq i:nth-child(3) { animation-delay: 0.24s; }

/* nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px -26px rgba(20,55,65,0.35);
  animation: rise 0.7s var(--ease) both;
}
.brand { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.brand img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; border: 2px solid #fff;
}
.brand strong {
  display: block;
  font-family: var(--font);
  font-weight: 800;
}
.brand small { color: var(--muted); font-size: 0.68rem; }
.nav-right {
  display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end;
}
.nav-right a, .linkish {
  height: 32px; padding: 0 0.7rem;
  border-radius: 999px;
  display: inline-flex; align-items: center;
  font-size: 0.74rem; font-weight: 700;
  background: #fff;
  border: 1px solid rgba(18,179,154,0.14);
  transition: transform 0.4s var(--spring);
}
.nav-right a:hover, .linkish:hover { transform: translateY(-2px); }
.linkish { color: var(--warm); border-color: rgba(255,122,89,0.25); }

/* hero */
.hero {
  margin-top: 0.9rem;
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -28px rgba(20,55,65,0.35);
  animation: rise 0.8s var(--ease) 0.05s both;
}
.hero-visual { display: grid; place-items: center; }
.avatar-glow {
  width: 118px; height: 118px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(145deg, #fff, rgba(77,183,223,0.35));
  animation: floaty 5.5s ease-in-out infinite;
  box-shadow: 0 18px 40px -18px rgba(18,179,154,0.5);
}
.avatar-glow img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.hero-body { text-align: center; }
.eyebrow {
  margin: 0;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--mint-2);
}
.hero-body h1 {
  margin: 0.3rem 0 0;
  font-family: var(--font);
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
#hero-desc {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.stats {
  margin: 1rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  max-width: 360px;
}
.stat {
  padding: 0.8rem 0.6rem;
  border-radius: 18px;
  background: #f3faf8;
  border: 1px solid rgba(18,179,154,0.12);
}
.stat b {
  display: block;
  font-family: var(--font);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--mint-2);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat.warm b { color: var(--warm); }
.stat span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}
.stats-mini { margin: 0; max-width: none; }
.stats-mini .stat { padding: 0.5rem; }
.stats-mini .stat b { font-size: 1.05rem; }

.cta {
  margin-top: 1rem;
  width: min(100%, 360px);
  height: 52px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(120deg, var(--mint-2), var(--mint) 42%, var(--sky));
  background-size: 180% 180%;
  animation: shine 5s ease infinite alternate;
  box-shadow: 0 16px 34px -14px rgba(18,179,154,0.6);
  transition: transform 0.5s var(--spring);
}
.cta:hover { transform: translateY(-3px) scale(1.02); }

.notice {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: rise 0.85s var(--ease) 0.1s both;
}
.notice > span {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(120deg, var(--mint), var(--sky));
}
.notice-track { flex: 1; overflow: hidden; }
.notice-track p {
  margin: 0;
  white-space: nowrap;
  display: inline-block;
  min-width: 100%;
  font-size: 0.8rem;
  color: var(--muted);
  animation: marquee 18s linear infinite;
}

.section {
  margin-top: 0.9rem;
  padding: 1.05rem;
  border-radius: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -28px rgba(20,55,65,0.3);
  animation: rise 0.9s var(--ease) 0.14s both;
}
.section.soft { background: var(--paper-2); }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}
.section-head h2, .section > h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 800;
}
.section-head span { font-size: 0.72rem; color: var(--muted); }
.section ol {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.75;
}

.acc { display: grid; gap: 0.6rem; }
.acc-item {
  border-radius: 18px;
  background: #f6fbfa;
  border: 1px solid rgba(18,179,154,0.12);
  overflow: hidden;
  transition: transform 0.45s var(--spring), box-shadow 0.35s, border-color 0.3s;
  animation: rise 0.6s var(--ease) both;
}
.acc-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -20px rgba(18,179,154,0.35);
}
.acc-item.open {
  border-color: rgba(18,179,154,0.4);
  background: #fff;
}
.acc-head {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  text-align: left;
}
.acc-ico {
  width: 56px; height: 56px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  display: grid; place-items: center;
  font-size: 1.45rem;
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.45s var(--spring);
}
.acc-item.open .acc-ico,
.acc-head:hover .acc-ico { transform: scale(1.06) rotate(-3deg); }
.acc-ico img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
  display: block;
}
.acc-name {
  display: block;
  font-family: var(--font);
  font-weight: 800;
  font-size: 1rem;
  word-break: break-word;
}
.acc-sub {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.7rem;
  color: var(--muted);
}
.acc-chev {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(18,179,154,0.12);
  color: var(--mint-2);
  transition: transform 0.45s var(--spring);
}
.acc-item.open .acc-chev { transform: rotate(90deg); }
.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-panel-inner { overflow: hidden; min-height: 0; }
.acc-body {
  margin: 0 0.7rem 0.7rem;
  padding: 0.25rem;
  border-radius: 14px;
  background: #f3faf8;
  border: 1px solid rgba(18,179,154,0.1);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.5s var(--spring);
}
.acc-item.open .acc-body { opacity: 1; transform: none; }

.row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.7rem;
  border-radius: 12px;
  text-align: left;
  transition: background 0.3s, transform 0.4s var(--spring);
}
.row:hover { background: #fff; transform: translateX(4px); }
.row-main { display: flex; align-items: flex-start; gap: 0.5rem; min-width: 0; }
.row-ico {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
  background: #e6f8f4;
  margin-top: 1px;
}
.row.is-link .row-ico { background: #e8f4fc; }
.row-title {
  font-weight: 700; font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.row-meta {
  font-size: 0.68rem; color: var(--muted);
  padding-left: 2.1rem;
}
.acc-empty, .empty-state {
  padding: 1.1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.foot {
  margin-top: 0.95rem;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(22,40,48,0.6);
}

.browse-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  margin-bottom: 0.75rem;
}
.ghost {
  height: 36px;
  padding: 0 0.75rem;
  border-radius: 12px;
  font-weight: 800;
  background: #fff;
  border: 1px solid rgba(18,179,154,0.16);
  color: var(--mint-2);
  white-space: nowrap;
}
.crumbs {
  min-width: 0;
  display: flex; flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  font-size: 0.74rem;
  color: var(--muted);
  padding-top: 0.35rem;
}
.crumbs button { font-weight: 700; color: var(--ink); }
.crumbs .sep { opacity: 0.4; }
.browse-panel {
  padding: 1rem;
  border-radius: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.browse-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.browse-panel h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 800;
  word-break: break-word;
}
.browse-panel p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.sheet {
  border-radius: 16px;
  overflow: hidden;
  background: #f6fbfa;
  border: 1px solid rgba(18,179,154,0.12);
}
.sheet-head { display: none; }
.file-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.9rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(22,40,48,0.07);
  transition: background 0.3s, transform 0.4s var(--spring);
}
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #fff; transform: translateX(4px); }
.file-name {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}
.file-ico {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; flex-shrink: 0;
  background: #e6f8f4;
  margin-top: 1px;
}
.file-row.is-link .file-ico { background: #e8f4fc; }
.file-title {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}
.file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding-left: 2.5rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.file-row > .file-size,
.file-row > .file-time { display: none; }
.file-empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }

@media (min-width: 860px) {
  .shell { width: min(980px, calc(100% - 2.5rem)); padding-top: 1.35rem; }
  .hero {
    grid-template-columns: 160px 1fr;
    align-items: center;
    text-align: left;
    padding: 1.45rem 1.5rem;
  }
  .hero-body { text-align: left; }
  .stats { margin-left: 0; }
  .cta { display: block; }
  .section ol { columns: 2; column-gap: 1.4rem; }

  .browse-bar { display: flex; align-items: center; }
  .sheet-head {
    display: grid;
    grid-template-columns: minmax(0,1fr) 5.5rem 10rem;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--muted);
    background: rgba(18,179,154,0.08);
  }
  .file-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) 5.5rem 10rem;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 1rem;
  }
  .file-meta { display: none; }
  .file-row > .file-size,
  .file-row > .file-time {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    text-align: right;
    white-space: nowrap;
  }
  .file-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
  }
}

@media (max-width: 480px) {
  .shell { width: calc(100% - 0.75rem); }
  .brand small { display: none; }
  .browse-head-row { flex-direction: column; }
  .stats-mini { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .notice-track p, .avatar-glow { animation: none; }
}
