
:root {
  --max-width: 430px;
  --nav-height: 82px;
  --ink: #181b20;
  --muted: #8c939d;
  --card: rgba(255,255,255,.80);
  --shadow: 0 10px 28px rgba(88,98,121,.08);
  --accent: #8e61ff;
  --red: #df252b;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #eef1f2;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC","Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif;
  background: #eef1f2;
}

button, input, a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.mobile-page {
  width: min(100%, var(--max-width));
  min-height: 100svh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 7% 47%, rgba(218,251,226,.95), transparent 56%),
    radial-gradient(circle at 94% 58%, rgba(233,227,255,.95), transparent 55%),
    linear-gradient(90deg,#f4fff7,#fbfbff);
}

.page-content {
  min-height: 100svh;
  padding:
    max(14px, env(safe-area-inset-top))
    16px
    max(28px, env(safe-area-inset-bottom));
}

.has-bottom-nav .page-content {
  padding-bottom: calc(var(--nav-height) + 28px + env(safe-area-inset-bottom));
}

.topbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin:
    calc(-1 * max(14px, env(safe-area-inset-top)))
    -16px
    22px;
  padding:
    max(10px, env(safe-area-inset-top))
    12px
    8px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  text-align: center;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 800;
}

.topbar-back {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #17191d;
  font-size: 36px;
  line-height: 1;
}

.card {
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: min(100%, var(--max-width));
  min-height: var(--nav-height);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3,1fr);
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97);
  border-top: 1px solid rgba(0,0,0,.04);
  box-shadow: 0 -8px 22px rgba(0,0,0,.08);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
}

.bottom-nav a {
  min-height: 62px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  color: #7d828c;
  font-size: 15px;
  font-weight: 600;
}

.bottom-nav a.active { color: #17191d; }

.bottom-nav svg {
  width: 28px;
  height: 28px;
}

.black-button {
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #060607;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(0,0,0,.14);
}

.full-button {
  width: 100%;
}

.gradient-underline {
  display: block;
  width: 44px;
  height: 5px;
  margin-top: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg,#1fd3c2,#47bce9,#9a65e9);
}

.notice-yellow {
  min-height: 50px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  color: #df8730;
  background: rgba(255,244,193,.92);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}

.menu-list {
  display: grid;
  gap: 12px;
}

.menu-item {
  min-height: 72px;
  padding: 0 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
}

.menu-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
}

.menu-icon {
  width: 22px;
  color: #6f7d91;
  text-align: center;
  font-size: 20px;
}

.menu-arrow {
  font-size: 29px;
  line-height: 1;
}

.layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}

.layer-mask {
  position: absolute;
  inset: 0;
  background: rgba(27,29,32,.62);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.dialog-layer {
  display: none;
  place-items: center;
  padding: 22px;
}

.dialog-layer.open {
  display: grid;
}

.dialog-box {
  position: relative;
  width: min(100%,360px);
  padding: 30px 26px 26px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0,0,0,.30);
}

.dialog-title {
  margin: 0 0 26px;
  text-align: center;
  font-size: 23px;
  line-height: 1.45;
  font-weight: 600;
}

.sheet-layer {
  align-items: end;
}

.sheet-layer.open {
  display: grid;
}

.bottom-sheet {
  position: relative;
  width: min(100%,var(--max-width));
  max-height: 78svh;
  overflow: auto;
  padding: 25px 24px calc(24px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -12px 32px rgba(0,0,0,.18);
}

.bottom-sheet h2 {
  margin: 0 48px 24px;
  text-align: center;
  font-size: 23px;
  font-weight: 800;
}

.close-button {
  position: absolute;
  right: 15px;
  top: 13px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #686b71;
  font-size: 38px;
  line-height: 1;
}

.loading-box {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  min-height: 150px;
  transform: translate(-50%,-50%);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border-radius: 14px;
  color: #fff;
  background: rgba(42,38,42,.80);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.spinner {
  width: 46px;
  height: 46px;
  border: 5px solid rgba(255,255,255,.22);
  border-top-color: #fff;
  border-right-color: rgba(255,255,255,.82);
  border-radius: 50%;
  animation: spin .85s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  z-index: 130;
  transform: translate(-50%,16px);
  max-width: calc(100vw - 40px);
  padding: 11px 17px;
  border-radius: 999px;
  color: #fff;
  background: rgba(43,46,53,.94);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%,0);
}

@media (min-width: 431px) {
  body { padding: 18px 0; }
  .mobile-page {
    border-radius: 28px;
    box-shadow: 0 0 30px rgba(0,0,0,.07);
  }
  .bottom-nav { border-radius: 0 0 28px 28px; }
}
