:root {
    --member-frame: 480px;
    --member-gutter: 15px;
    --member-radius: 11px;
    --member-nav-height: 65px;
    --member-bg: #f3f4f6;
    --member-surface: #fff;
    --member-ink: #191c23;
    --member-muted: #636a75;
    --member-line: #edf0f3;
    --member-blue: #486ff1;
    --member-blue-strong: #2858ed;
    --member-blue-soft: #e1e9ff;
    --member-rose: #d92f51;
    background: #e7edf5;
    color: var(--member-ink);
    font: 14px/1.45 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 2px solid var(--member-blue-strong); outline-offset: 2px; }
.member-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.member-shell { width: min(100%, var(--member-frame)); margin-inline: auto; background: var(--member-bg); min-height: 100dvh; }
.member-view { min-height: 100dvh; padding-bottom: calc(var(--member-nav-height) + env(safe-area-inset-bottom) + 12px); }
.member-team, .member-queue, .member-subpage { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.member-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}
.member-content { padding-inline: var(--member-gutter); }
.member-panel { padding: 15px; border-radius: var(--member-radius); background: var(--member-surface); }
.member-panel h2 { font-size: 17px; }
.member-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 38px;
    padding: 5px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--member-blue);
    color: #fff;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}
.member-primary:active:not(:disabled) { background: var(--member-blue-strong); }
.member-full { width: 100%; }
.member-text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: #2d59ce;
}
.member-text-button .member-icon { width: 14px; height: 14px; }
.member-icon-button, .member-back {
    display: inline-grid;
    align-items: center;
    justify-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
}
.member-loading { padding: 20px 12px; text-align: center; color: var(--member-muted); }
.member-empty { display: grid; justify-items: center; gap: 10px; padding: 36px 8px 20px; text-align: center; color: var(--member-muted); }
.member-empty img { display: block; width: min(205px, 76%); height: auto; }
.member-empty .member-primary { margin-top: 4px; }

.member-nav {
    position: fixed;
    z-index: 3;
    inset: auto auto 0 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: min(100%, var(--member-frame));
    min-height: var(--member-nav-height);
    padding: 7px 0 max(9px, env(safe-area-inset-bottom));
    border-radius: 12px 12px 0 0;
    background: #fff;
    box-shadow: 0 -2px 13px #13275d10;
}
.member-nav a { display: grid; justify-items: center; align-content: center; gap: 2px; color: #343840; font-size: 12px; }
.member-nav .member-icon { width: 28px; height: 28px; stroke-width: 1.9; }
.member-nav [aria-current="page"] { --icon-fill: #a6c4ff; color: #345de2; font-weight: 750; }
.member-shell:has(:is(.member-team, .member-queue, .member-subpage):not([hidden])) .member-nav { display: none; }

.member-home, .member-merchants {
    padding-inline: var(--member-gutter);
    background:
        radial-gradient(ellipse at 75% -60px, #a6b9ff 0, #a6b9ff00 270px),
        radial-gradient(ellipse at 18% 134px, #d8f4ff 0, #c2effc00 310px),
        linear-gradient(180deg, #35bbf7 0, #a3e5fa 170px, var(--member-bg) 340px);
}
.member-home-searchbar {
    position: sticky;
    z-index: 2;
    top: 0;
    margin-inline: calc(-1 * var(--member-gutter));
    padding: 0 var(--member-gutter) 4px;
    background: linear-gradient(117deg, #50c8f6, #9bcaff);
}
.member-home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    min-height: 61px;
    padding-top: env(safe-area-inset-top);
}
.member-location { display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 38px; padding: 0; border: 0; background: transparent; font-size: 17px; }
.member-location strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-location .member-icon { width: 17px; height: 17px; }
.member-refresh {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 3px;
    padding: 5px 8px;
    border: 0;
    border-radius: 6px;
    background: var(--member-blue);
    color: #fff;
    font-size: 12px;
}
.member-refresh .member-icon { width: 13px; height: 13px; }
.member-search { display: flex; align-items: stretch; width: 100%; padding: 2px; min-height: 40px; border-radius: 999px; background: #fff; }
.member-search input { flex: 1 1 auto; min-width: 0; width: 100%; border: 0; padding: 0 11px; border-radius: 999px; background: transparent; font-size: 15px; }
.member-search input::placeholder { color: #686f7a; }
.member-search button { min-width: 56px; border: 0; border-radius: 999px; padding: 4px 12px; background: var(--member-blue); color: #fff; font-size: 15px; font-weight: 700; }
.member-home-categories {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-items: center;
    align-items: center;
    row-gap: 6px;
    min-height: 102px;
    margin-top: 6px;
    padding: 10px 6px 7px;
    border-radius: 13px;
    background: #fff;
}
.member-home-categories button, .member-promo-pair button, .member-bean-products button, .member-more-zones button {
    display: grid;
    justify-items: center;
    width: 100%;
    min-width: 0;
    gap: 3px;
    padding: 0;
    border: 0;
    background: none;
    text-align: center;
}
.member-home-categories button { font-size: 12px; white-space: nowrap; }
.member-home-categories svg { display: block; width: min(57px, 87%); height: auto; }
.member-category-indicator { grid-column: 1 / -1; width: 12px; height: 3px; border-radius: 5px; background: var(--member-blue); }
.member-promo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(99px, 1fr)); gap: 7px; margin-top: 9px; }
.member-promo { overflow: hidden; border-radius: 11px; padding: 7px; background: #fff; }
.member-promo header, .member-bean-zone header { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.member-promo h2 { min-width: 0; white-space: nowrap; font-size: clamp(13px, 3.75vw, 17px); font-weight: 800; }
.member-promo header small { flex: 0 0 auto; padding: 1px 5px; border-radius: 12px; color: #504c9a; background: #eee8ff; font-size: 10px; }
.member-promo-red { grid-row: span 2; display: flex; flex-direction: column; gap: 5px; background: linear-gradient(155deg, #ffedf0, #f4f1f8); }
.member-promo-red h2 span { color: #d51e43; }
.member-promo-red header small { color: #9d3046; background: #ffe4ea; }
.member-promo-envelope {
    display: grid;
    flex: 1;
    justify-items: center;
    align-content: center;
    gap: 0;
    width: 100%;
    min-height: 0;
    padding: 5px 3px;
    border: 0;
    border-radius: 8px;
    background:
        repeating-conic-gradient(from 12deg at 50% 62%, #effdff26 0deg 14deg, #effdff00 14deg 31deg),
        radial-gradient(ellipse at 50% 60%, #b4faff, #5ba7fa 62%, #3f72ec);
    color: #172a70;
    font-size: 11px;
    font-weight: 700;
}
.member-promo-envelope img { display: block; width: min(114px, 91%); height: auto; }
.member-promo-envelope b { min-width: min(112px, 100%); padding: 2px 7px; border-radius: 999px; color: #b33621; background: #ffe353; font-size: 12px; }
.member-promo-featured { background: linear-gradient(150deg, #f1e9ff, #fff 54%); }
.member-promo-owned { background: linear-gradient(150deg, #fff8dd, #fff 53%); }
.member-promo-owned header small { color: #795304; background: #ffe7a2; }
.member-promo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; margin-top: 5px; }
.member-promo-pair svg { display: block; width: min(46px, 84%); height: auto; }
.member-promo-pair span { width: 100%; overflow: hidden; text-overflow: ellipsis; color: #435bb4; font-size: 11px; font-weight: 700; white-space: nowrap; }
.member-promo-owned .member-promo-pair span { color: #966617; }
.member-bean-zone { margin-top: 9px; padding: 9px 10px 11px; border-radius: 11px; background: linear-gradient(#e6f5ff, #fff 40%); }
.member-bean-zone h2 { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 800; }
.member-bean-zone header .member-text-button { color: #ad2a48; font-size: 12px; font-weight: 700; }
.member-bean-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
.member-bean-products svg { display: block; width: 100%; height: auto; }
.member-bean-products strong { justify-self: start; color: #bf2142; font-size: 14px; white-space: nowrap; }
.member-bean-products span { justify-self: start; padding: 1px 5px; border-radius: 10px; color: #a35517; background: #fff2e4; font-size: 10px; white-space: nowrap; }
.member-more-zones { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 7px; margin-top: 9px; }
.member-more-zones button { align-content: center; min-height: 110px; padding: 5px; border-radius: 10px; background: #fff; }
.member-more-zones strong { font-size: clamp(12px, 3.7vw, 16px); white-space: nowrap; }
.member-more-zones svg { display: block; width: min(53px, 70%); height: auto; }
.member-more-zones span { color: var(--member-muted); font-size: 11px; }
.member-segments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    min-height: 41px;
    margin: 10px 0;
    padding: 2px;
    border-radius: 11px;
    background: #fff;
}
.member-segments button { border: 0; border-radius: 9px; background: transparent; color: #30343a; font-size: 14px; white-space: nowrap; }
.member-segments button[aria-pressed="true"] { background: var(--member-blue); color: #fff; font-weight: 700; }
.member-card-list { display: grid; gap: 10px; }

.member-merchants { padding-top: max(13px, env(safe-area-inset-top)); }
.member-beans-card, .member-check-in { margin-top: 10px; border-radius: var(--member-radius); background: #fff; }
.member-beans-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 75px;
    align-items: center;
    gap: 6px;
    min-height: 96px;
    padding: 10px 13px;
    overflow: hidden;
    background: linear-gradient(119deg, #fff, #f1fbff 58%, #e8f1ff);
    border: 1px solid #fff;
}
.member-beans-heading { display: flex; align-items: center; gap: 6px; }
.member-beans-heading h2, .member-check-in h2, .member-store-toolbar h2 { font-size: 15px; }
.member-beans-card strong { display: block; margin: 5px 0 0; font-size: 23px; font-variant-numeric: tabular-nums; }
.member-envelope { width: 100%; height: auto; }
.member-check-in { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 61px; padding: 9px 12px; }
.member-check-in p { font-size: 12px; color: var(--member-muted); }
.member-check-in .member-primary { min-height: 33px; font-size: 12px; }
.member-store-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 13px 0 7px; }
.member-store-toolbar select { min-height: 28px; padding: 0 3px 0 7px; border: 1px solid #dce4f0; border-radius: 5px; background: #fff; font-size: 12px; }
.member-directory { display: grid; grid-template-columns: minmax(69px, .32fr) minmax(0, 1fr); align-items: start; gap: 8px; }
.member-categories { display: grid; gap: 2px; padding: 4px; border-radius: 9px; background: #fff; }
.member-categories button { padding: 5px 3px; min-height: 34px; border: 0; border-radius: 6px; background: none; font-size: 12px; }
.member-categories button[aria-pressed="true"] { background: #e8efff; color: #2a56ce; font-weight: 700; }

.member-profile {
    padding-inline: var(--member-gutter);
    background:
        radial-gradient(ellipse at 0 0, #e6d7ff, #e6d7ff00 210px),
        radial-gradient(ellipse at 87% 12px, #a8d4f8, #a8d4f800 270px),
        linear-gradient(180deg, #cfe2fd, #e4f1fa 205px, var(--member-bg) 324px);
}
.member-profile-top { display: flex; gap: 1px; padding-top: max(8px, env(safe-area-inset-top)); margin-left: -7px; }
.member-profile-top .member-icon { width: 23px; height: 23px; stroke-width: 2; }
.member-identity { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 84px; padding: 7px 0 10px; }
.member-identity img { display: block; width: 59px; height: 59px; flex: 0 0 auto; }
.member-identity > div { min-width: 0; }
.member-identity strong { font-size: 17px; font-weight: 550; overflow-wrap: anywhere; }
.member-level { display: inline-block; margin-inline-start: 2px; padding: 1px 6px; border-radius: 12px; background: #e8650f; color: #fff; font-size: 10px; vertical-align: 2px; white-space: nowrap; }
.member-identity .member-text-button { margin-left: auto; white-space: nowrap; font-size: 11px; }
.member-wallet-card { padding: 14px 12px 15px; border: 1px solid #fff; border-radius: var(--member-radius); background: linear-gradient(105deg, #fff, #d9e9fb); }
.member-wallet-card header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.member-wallet-card h2 { display: flex; align-items: center; gap: 7px; font-size: 17px; white-space: nowrap; }
.member-wallet-card h2 .member-icon { width: 26px; height: 26px; }
.member-wallet-card header .member-text-button { color: var(--member-ink); font-size: 12px; }
.member-wallet-card dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 3px; margin-top: 12px; }
.member-wallet-card dt { font-size: 11px; color: var(--member-muted); white-space: nowrap; }
.member-wallet-card dd { margin-top: 5px; font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.member-profile-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 10px 0; padding: 8px 3px; border-radius: var(--member-radius); background: #fff; }
.member-profile-links button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 58px; padding: 3px 1px; border: 0; border-radius: 6px; background: transparent; font-size: 12px; white-space: nowrap; }
.member-profile-links .member-icon { width: 28px; height: 28px; }
.member-secondary-links .member-icon { width: 24px; height: 24px; color: #59606b; }
.member-color-blue { color: #268cf8; }
.member-color-mint { color: #0daba0; }
.member-color-red { color: #f45166; }
.member-profile-stack { margin-top: 10px; border-radius: var(--member-radius); overflow: hidden; background: #fff; }
.member-profile-row { display: grid; align-items: center; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; width: 100%; min-height: 72px; padding: 11px 12px; border: 0; background: none; text-align: left; }
.member-profile-row > .member-icon { width: 36px; height: 36px; }
.member-profile-row strong { display: block; font-size: 15px; }
.member-profile-row small { display: block; margin-top: 1px; font-size: 11px; color: var(--member-muted); }
.member-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; min-height: 30px; padding: 4px 7px; border-radius: 999px; background: #e0e8ff; color: #2a58cf; font-size: 12px; font-weight: 700; white-space: nowrap; }
.member-chip.member-primary { background: var(--member-blue); color: #fff; }

.member-header { position: relative; display: grid; place-items: center; min-height: calc(59px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 48px 0; background: #fff; text-align: center; }
.member-header h1 { font-size: 17px; font-weight: 750; }
.member-back { position: absolute; inset: max(8px, env(safe-area-inset-top)) auto auto 5px; }
.member-back .member-icon { width: 20px; height: 20px; stroke-width: 2.1; }
.member-team {
    background:
        radial-gradient(ellipse at 96% 174px, #a7e9f3 0, #a7e9f300 240px),
        radial-gradient(ellipse at 2% 360px, #fbe0f0 0, #fbe0f000 230px),
        linear-gradient(180deg, #a3d7fa 0, #ddf3fb 180px, var(--member-bg) 510px);
}
.member-team .member-header { background: transparent; }
.member-team-panels { display: grid; gap: 10px; }
.member-referrer { display: grid; align-content: center; justify-items: center; min-height: 87px; background: linear-gradient(180deg, #e3effc, #fff); }
.member-referrer p { color: #69727f; font-size: 13px; }
.member-referrer .member-text-button { margin-top: 2px; font-size: 15px; font-weight: 700; }
.member-team-overview header { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.member-team-overview header span, .member-team-total span { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.member-team-overview header .member-icon { color: var(--member-blue); }
.member-team-total { display: grid; justify-items: center; gap: 3px; margin: 16px 0 12px; }
.member-team-total strong { font-size: 28px; line-height: 1.1; color: #d42a43; }
.member-team-numbers, .member-team-distribution { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.member-team-numbers { margin: 0 0 13px; }
.member-team-numbers div + div { border-left: 1px solid var(--member-line); padding-left: 10px; }
.member-team-numbers dt, .member-team-distribution dt { color: var(--member-muted); font-size: 12px; }
.member-team-numbers dd, .member-team-distribution dd { margin-top: 3px; font-size: 17px; font-variant-numeric: tabular-nums; }
.member-team-distribution { text-align: center; border-top: 1px solid var(--member-line); margin-top: 10px; padding-top: 8px; }
.member-team-distribution dd { margin: 0 0 3px; font-weight: 700; }
.member-team-legend { display: flex; justify-content: space-between; gap: 5px; margin-top: 9px; font-size: 12px; }
.member-team-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--member-blue); vertical-align: 1px; }
.member-team-trends .member-empty { padding-top: 24px; }
.member-queue-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 53px; background: #fff; }
.member-queue-tabs button { position: relative; border: 0; background: none; font-size: 14px; color: #4e535d; }
.member-queue-tabs button[aria-pressed="true"] { color: #20232b; }
.member-queue-tabs button[aria-pressed="true"]::after { position: absolute; content: ""; width: 23px; height: 2px; border-radius: 2px; background: var(--member-blue); inset: auto auto 9px 50%; transform: translateX(-50%); }
.member-queue-search { min-height: 37px; margin-top: 10px; border-radius: 10px; }
.member-queue-search input { padding-inline: 9px; font-size: 12px; }
.member-queue-search button { min-width: 55px; border-radius: 9px; font-size: 14px; }
.member-queue .member-empty { padding-top: clamp(86px, 17dvh, 154px); }
.member-order-list { display: grid; gap: 8px; }

.member-dialog { width: min(380px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 36px); border: 0; border-radius: 13px; padding: 16px; background: #fff; color: var(--member-ink); }
.member-dialog::backdrop { background: #17274373; }
.member-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.member-dialog p { color: var(--member-muted); }
.member-dialog label { display: block; margin: 12px 0 4px; }
.member-dialog input { width: 100%; min-height: 40px; padding: 5px 9px; border: 1px solid #dce3ee; border-radius: 7px; background: #fff; font-size: 16px; }
.member-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 13px; }
.member-toast { position: fixed; z-index: 5; inset: auto auto calc(var(--member-nav-height) + 11px) 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); padding: 8px 13px; border-radius: 8px; color: #fff; background: #233047; text-align: center; }

@media (max-width: 350px) {
    :root { --member-gutter: 11px; }
    .member-segments button, .member-profile-links button { font-size: 11px; }
    .member-home-categories button { font-size: 10px; }
    .member-promo header small { font-size: 9px; padding-inline: 3px; }
    .member-profile-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 6px; padding-inline: 8px; }
    .member-profile-row > .member-icon { width: 30px; height: 30px; }
    .member-chip { min-width: 64px; }
}
@media (min-width: 481px) { .member-shell { box-shadow: 0 0 32px #2b416514; } }
