:root {
  --tint: #b3a2fc;
  --app-bg: #17132a;
  --app-top: #1c172de6;
  --accent-faint: #473569;
  --stroke: #aa96ed35;
  --canvas: #211a34;
}
html[data-theme=light] {
  --tint: #5337b7;
  --app-bg: #f3f3fa;
  --app-top: #f7f6fbdc;
  --accent-faint: #ece7fb;
  --stroke: #50388927;
  --canvas: #fcfbff;
}
html, body, html[data-theme=light], html[data-theme=light] body { background: var(--app-bg); }
.glow { opacity: .27; }
.top, html[data-theme=light] .top.scrolled, .top.scrolled {
  background: var(--app-top);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(21px) saturate(1.25);
  -webkit-backdrop-filter: blur(21px) saturate(1.25);
}
.top-bar { max-width: 990px; height: 66px; padding-inline: clamp(16px, 3.3vw, 29px); }
.app-brand { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 720; white-space: nowrap; }
.app-brand img { width: 33px; height: 33px; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.top-actions { gap: 8px; }
.round, html[data-theme=light] .round {
  width: 43px;
  height: 43px;
  background: var(--canvas);
  border: 1px solid var(--stroke);
}
.round#addBtn, html[data-theme=light] .round#addBtn { background: #5640ad; border-color: transparent; color: #fff; }
.round#addBtn:active { background: #483298; }
.menu:not(.ctx-menu) { top: calc(env(safe-area-inset-top) + 68px); right: max(16px,calc(50% - 467px)); max-height: min(75dvh,600px); overflow: auto; }
.add-menu:not(.ctx-menu) { right: max(16px,calc(50% - 413px)); }
main { max-width: 920px; }
.hello { padding: 37px clamp(18px,4vw,30px) 0; position: relative; }
.large { font-size: clamp(2.25rem,5vw,3.45rem); letter-spacing: -.07em; font-weight: 780; }
.summary { margin-top: 8px; min-height: 22px; }
.sample-link { display: inline-flex; margin-top: 14px; min-height: 38px; padding: 5px 14px; color: var(--tint); background: var(--accent-faint); border-radius: 999px; font-size: .91rem; font-weight: 630; align-items: center; }
.sample-link[hidden] { display: none; }
.wcard { border-radius: 28px; }
.wcard:not(.ghost) { box-shadow: 0 15px 45px -15px color-mix(in srgb,var(--c) 50%,transparent),0 0 0 1px #ffffff2e inset; }
.wcard:not(.ghost)::after { content: ""; pointer-events: none; position: absolute; z-index: -1; width: 88%; height: 110%; right: -43%; bottom: -57%; border: 1px solid #ffffff4d; border-radius: 35%; transform: rotate(-32deg); box-shadow: 19px -12px 0 -18px #ffffff3d; }
.wcard.ghost.first, html[data-theme=light] .wcard.ghost.first { background: var(--canvas); border: 1px solid var(--stroke); box-shadow: 0 15px 36px -27px #50388966; }
.wcard.ghost.first img { width: 44px; height: 44px; }
.wcard.ghost.first em, html[data-theme=light] .wcard.ghost.first em { background: var(--accent-faint); color: var(--tint); }
.panel, html[data-theme=light] .panel { background: var(--canvas); border: 1px solid var(--stroke); box-shadow: 0 10px 28px -25px #50388966; }
.pill-btn, html[data-theme=light] .pill-btn { color: var(--tint); background: var(--accent-faint); }
.fav.letter { background: linear-gradient(150deg,color-mix(in srgb,var(--lc2) 19%,#fff),color-mix(in srgb,var(--lc2) 36%,#fff)); color: #252039; border: 1px solid #392b6925; }
.block { padding-inline: clamp(18px,4vw,30px); }
.block-head h2 { letter-spacing: -.04em; }
.tabbar, html[data-theme=light] .tabbar {
  --tw:82px;
  background: var(--app-top);
  border: 1px solid var(--stroke);
  border-radius: 26px;
  box-shadow: 0 12px 39px #21193928;
}
.tabbar button { height: 51px; display: grid; justify-items: center; align-content: center; gap: 2px; }
.tabbar button span { font-size: .77rem; font-weight: 660; line-height: 1.14; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.active { color: var(--tint); }
.tabbar .tab-thumb, html[data-theme=light] .tabbar .tab-thumb { background: var(--accent-faint); }
.app-source { display: inline-block; margin: 8px 20px 0; font-size: .82rem; color: var(--tint); }
.footnote, html[data-theme=light] .footnote { color: var(--secondary); }
@media (min-width: 820px) {
  .wallet { --card-size: 396px; }
  .wallet::before, .wallet::after { flex-basis: calc(50% - var(--card-size) / 2); }
  .wallet .wcard { flex-basis: var(--card-size); }
  .hello { padding-top: 44px; }
}
@media (max-width: 390px) {
  .round, html[data-theme=light] .round { width: 39px; height: 39px; }
  .top-actions { gap: 5px; }
  .tabbar, html[data-theme=light] .tabbar { --tw: 73px; }
}

.demo-banner[hidden], .menu button[hidden] { display: none; }
.demo-banner {
  margin: 15px clamp(18px,4vw,30px) 0;
  padding: 13px 15px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: var(--accent-faint);
  color: var(--label);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
}
.demo-banner strong { font-size: 1rem; }
.demo-banner p { margin-top: 3px; color: var(--secondary); font-size: .9rem; }
.demo-banner a {
  padding: 7px 12px;
  background: var(--canvas);
  color: var(--tint);
  font-size: .9rem;
  font-weight: 650;
  border-radius: 999px;
  white-space: nowrap;
}
