:root {
  --page: #ffe3ee;
  --text: #101820;
  --muted: rgba(42, 53, 68, 0.58);
  --glass: rgba(255, 255, 255, 0.2);
  --glass-line: rgba(255, 255, 255, 0.46);
  --shadow: rgba(112, 47, 74, 0.22);
  --active: #101820;
  --active-fill: rgba(255, 255, 255, 0.26);
  --accent: #22c7ba;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 22% 78%, rgba(255, 255, 255, 0.32), transparent 26%),
    radial-gradient(circle at 82% 88%, rgba(255, 182, 214, 0.44), transparent 24%),
    var(--page);
}

.app-canvas {
  min-height: 100vh;
}

.glass-tabs-wrap {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 0 16px max(14px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.glass-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(100%, 398px);
  min-height: 72px;
  padding: 8px;
  border: 1px solid var(--glass-line);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 0%, rgba(255, 255, 255, 0.52), transparent 34%),
    radial-gradient(circle at 78% 105%, rgba(255, 138, 187, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)),
    var(--glass);
  box-shadow:
    0 18px 44px var(--shadow),
    0 2px 8px rgba(255, 255, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(34px) saturate(1.9) brightness(1.04);
  -webkit-backdrop-filter: blur(34px) saturate(1.9) brightness(1.04);
  pointer-events: auto;
}

.glass-tabs::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 27px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.42), transparent 31%),
    linear-gradient(285deg, rgba(255, 255, 255, 0.16), transparent 38%);
  pointer-events: none;
}

.glass-tabs::after {
  content: "";
  position: absolute;
  right: 18px;
  left: 18px;
  top: 8px;
  height: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  pointer-events: none;
}

.tab-button {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 56px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border-radius: 22px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  transition:
    color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.tab-button:active {
  transform: scale(0.96);
}

.tab-button.active {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background:
    radial-gradient(circle at 35% 0%, rgba(255, 255, 255, 0.54), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12)),
    var(--active-fill);
  color: var(--active);
  backdrop-filter: blur(18px) saturate(1.7);
  -webkit-backdrop-filter: blur(18px) saturate(1.7);
  box-shadow:
    0 8px 18px rgba(98, 44, 66, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

.tab-button.active::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 20px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 199, 186, 0.14);
}

.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.tab-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-tabs {
    background: rgba(255, 255, 255, 0.36);
  }
}
