*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    background: #dfe4ee;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: calc(var(--vh) * 100);
    display: grid;
    place-items: center;
}

button, input, textarea {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    object-fit: cover;
}

.phone-shell {
    position: relative;
    width: min(100vw, 430px);
    height: min(calc(var(--vh) * 100), 932px);
    background: var(--bg);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(31, 41, 55, .25);
}

container {
    display: block;
    width: 100%;
    height: 100%;
    overflow: scroll;
}

container > * {
    display: none;
}

container > *[current] {
    display: block;
}

.tabbar {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12px max(8px, var(--safe-bottom));
    background: rgba(255,255,255,.88);
    border-top: 1px solid rgba(218, 223, 232, .8);
    backdrop-filter: blur(18px);
}

.bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
}

.iconbtn {
    display: grid;
    place-items: center;
    gap: 2px;
    min-height: 52px;
    border-radius: 14px;
    color: #72798a;
}

.iconbtn ui-icon {
    width: 23px;
    height: 23px;
}

.iconbtn small {
    font-size: 11px;
}

.iconbtn[active] {
    color: var(--brand);
    background: #eef0ff;
}

ui-icon {
    display: inline-grid;
    place-items: center;
    width: 1.2em;
    height: 1.2em;
    color: currentColor;
}

ui-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

screen {
    display: block;
    height: 100%;
    overflow: auto;
    padding: 14px 16px 92px;
    scrollbar-width: none;
}

screen::-webkit-scrollbar {
    display: none;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    margin-bottom: 12px;
}

.tabs {
    display: flex;
    gap: 18px;
    align-items: center;
}

.tabs button {
    background: transparent;
    color: #8a91a0;
    padding: 8px 0;
    font-size: 18px;
    font-weight: 700;
    position: relative;
}

.tabs button[current] {
    color: var(--text);
}

.tabs button[current]::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 22px;
    height: 3px;
    border-radius: 4px;
    background: var(--brand);
    transform: translateX(-50%);
}

.tool {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #596174;
    background: #fff;
    box-shadow: 0 8px 22px rgba(31, 41, 55, .08);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 99px;
    background: #f0f2f7;
    color: #697184;
    font-size: 13px;
    white-space: nowrap;
}

.primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 14px 28px rgba(79, 70, 229, .25);
}

.ghost {
    background: #fff;
    color: #4b5264;
    border: 1px solid var(--line);
}

.fade-in {
    animation: fade-in .3s ease both;
}

.fade-out {
    animation: fade-out .2s ease both;
}
