.avatar { position: relative; }
.avatar img.pf-flag, .pf-flag { position: absolute; right: -4px; bottom: -3px; left: auto; top: auto; width: 17px; height: 12px; max-width: none; border-radius: 3px; object-fit: cover; display: block; background: #18181b; box-shadow: 0 0 0 1.5px #0b0b0d, 0 1px 4px rgba(0,0,0,.5); pointer-events: none; z-index: 1; }
.profile-menu-header .avatar img.pf-flag { width: 19px; height: 13px; right: -5px; bottom: -3px; }
.profile-menu-header .profile-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-header .profile-handle { font-variant-numeric: tabular-nums; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-item[hidden] { display: none; }
.profile-item.pf-danger:hover { color: #f87171; }
.profile-sep { height: 1px; margin: 6px 4px; background: #27272a; }
.profile-item .pf-lock { margin-left: auto; width: 14px; height: 14px; fill: none; stroke: #71717a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pf-overlay { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); overflow-y: auto; }
.pf-overlay.open { display: flex; animation: pfFade .18s ease-out both; }
@keyframes pfFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pfRise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.pf-card { position: relative; width: min(440px, 100%); margin: auto; padding: 26px; border-radius: 22px; border: 1px solid rgba(255,255,255,.14); background: rgba(14,14,18,.78); box-shadow: 0 24px 70px rgba(0,0,0,.6); -webkit-backdrop-filter: blur(8px) saturate(115%); backdrop-filter: blur(8px) saturate(115%); color: #fafafa; font-family: 'Inter', system-ui, sans-serif; text-align: left; animation: pfRise .26s cubic-bezier(.22,1,.36,1) both; }
.pf-card svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.pf-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #a1a1aa; font-size: 16px; cursor: pointer; transition: background .2s, color .2s; }
.pf-close:hover { background: rgba(255,255,255,.1); color: #fafafa; }
.pf-title { margin: 0 0 6px; font: 700 24px/1.15 'Outfit', 'Inter', system-ui, sans-serif; letter-spacing: -.02em; }
.pf-sub { margin: 0 0 20px; color: #a1a1aa; font-size: 13.5px; line-height: 1.55; }
.pf-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 0; border: 0; background: none; color: #a1a1aa; font: 500 13px 'Inter', system-ui, sans-serif; cursor: pointer; transition: color .2s; }
.pf-back:hover { color: #fff; }

.pf-field { position: relative; margin-bottom: 14px; }
.pf-label { display: block; margin: 0 0 8px 2px; font-size: 13px; font-weight: 500; color: #a1a1aa; }
.pf-input { width: 100%; height: 46px; padding: 0 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.04); color: #fafafa; font: 14px 'Inter', system-ui, sans-serif; transition: border-color .2s, background .2s; }
.pf-input::placeholder { color: #71717a; }
.pf-input:focus { outline: none; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.07); }
.pf-input.search { padding-left: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 15px 50%; background-size: 16px; }
.pf-btn { width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; background: #fafafa; color: #09090b; font: 600 14px 'Inter', system-ui, sans-serif; cursor: pointer; transition: opacity .2s, transform .2s, background .2s; }
.pf-btn:hover:not(:disabled) { background: #e4e4e7; transform: translateY(-1px); }
.pf-btn:disabled { opacity: .4; cursor: not-allowed; }
.pf-btn.ghost { background: rgba(255,255,255,.05); color: #fafafa; border: 1px solid rgba(255,255,255,.14); }
.pf-btn.ghost:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.pf-link { display: block; margin: 14px auto 0; padding: 0; border: 0; background: none; color: #a1a1aa; font: 12px 'Inter', system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: color .2s; }
.pf-link:hover { color: #fff; }
.pf-status { min-height: 0; margin-top: 12px; font-size: 12.5px; text-align: center; color: #a1a1aa; }
.pf-status:empty { margin-top: 0; }
.pf-status.err { color: #f87171; }
.pf-status.ok { color: #4ade80; }
.pf-hint { margin: 0 0 12px; font-size: 12.5px; color: #a1a1aa; line-height: 1.55; }
.pf-hint b { color: #fafafa; }

.pf-list { margin: 8px 0 0; padding: 6px; list-style: none; max-height: 264px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(255,255,255,.03); }
.pf-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: 11px; align-items: center; padding: 8px 10px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.pf-list li:hover, .pf-list li.active { background: rgba(255,255,255,.07); }
.pf-list li img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.1); }
.pf-list li img.flag { width: 24px; height: 17px; border-radius: 2px; margin: 0 3px; }
.pf-list .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; color: #d4d4d8; }
.pf-list .sb { font-size: 11.5px; color: #71717a; font-variant-numeric: tabular-nums; }
.pf-list li:hover .nm, .pf-list li.active .nm { color: #fff; }
.pf-list .empty { display: block; cursor: default; text-align: center; color: #a1a1aa; font-size: 13px; padding: 14px 10px; }
.pf-list .empty:hover { background: none; }

.pf-chip { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 8px 0 8px; border: 1px solid rgba(255,255,255,.22); border-radius: 14px; background: rgba(255,255,255,.04); }
.pf-chip img.av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.1); flex: none; }
.pf-chip img.flag { width: 28px; height: 20px; border-radius: 2px; object-fit: fill; margin-left: 4px; flex: none; }
.pf-chip .tx { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.pf-chip .tx b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-chip .tx span { font-size: 11px; color: #71717a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-chip button { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #a1a1aa; font-size: 15px; cursor: pointer; transition: background .2s, color .2s; }
.pf-chip button:hover { background: rgba(255,255,255,.09); color: #fff; }

.pf-claim { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 18px; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: rgba(255,255,255,.025); text-align: center; }
.pf-claim p { margin: 0; font-size: 13px; line-height: 1.55; color: #a1a1aa; }
.pf-claim p b { color: #fafafa; }
.pf-claim-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; width: 100%; }
.pf-code { margin: 0; padding: 12px 18px; border: 1px dashed rgba(255,255,255,.35); border-radius: 14px; background: rgba(255,255,255,.05); font: 18px ui-monospace, Consolas, monospace; letter-spacing: 1px; user-select: all; }
.pf-copy { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; background: rgba(255,255,255,.045); color: #d4d4d8; font: 500 12px 'Inter', system-ui, sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.pf-copy:hover { background: rgba(255,255,255,.1); color: #fff; }
.pf-wait { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #a1a1aa; }
.pf-dot { width: 7px; height: 7px; border-radius: 50%; background: #fafafa; animation: pfPulse 1.4s ease-in-out infinite; }
@keyframes pfPulse { 50% { opacity: .25; } }

.pf-me { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.pf-me .av { position: relative; width: 56px; height: 56px; flex: none; }
.pf-me .av img.p { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,.18); background: #18181b; }
.pf-me .av .pf-flag { width: 22px; height: 15px; right: -5px; bottom: -3px; }
.pf-me b { display: block; font: 700 17px/1.2 'Outfit', 'Inter', system-ui, sans-serif; }
.pf-me span { display: block; margin-top: 2px; font-size: 12px; color: #71717a; word-break: break-all; }
.pf-row { display: flex; gap: 8px; margin-top: 4px; }

.pf-dock { position: fixed; right: clamp(14px, 2vw, 28px); top: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + 16px); z-index: 15; width: 290px; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.pf-dock > * { pointer-events: auto; }
.pf-panel { border-radius: 18px; border: 1px solid rgba(255,255,255,.14); background: rgba(12,12,15,.82); -webkit-backdrop-filter: blur(8px) saturate(115%); backdrop-filter: blur(8px) saturate(115%); box-shadow: 0 16px 44px rgba(0,0,0,.4); animation: pfRise .3s cubic-bezier(.22,1,.36,1) both; text-align: left; color: #fafafa; font-family: 'Inter', system-ui, sans-serif; }
.pf-panel[hidden] { display: none; }
.pf-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 12px 16px; }
.pf-pt { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #d4d4d8; }
.pf-pa { display: flex; gap: 2px; }
.pf-pb { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #a1a1aa; cursor: pointer; transition: background .2s, color .2s; }
.pf-pb:hover { background: rgba(255,255,255,.1); color: #fafafa; }
.pf-pb svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pf-body { padding: 14px 16px 16px; border-top: 1px solid rgba(255,255,255,.1); }
.pf-panel.min .pf-body { display: none; }
.pf-who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-width: 0; }
.pf-who img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #18181b; border: 1px solid rgba(255,255,255,.14); flex: none; }
.pf-who b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-num { width: 100%; display: flex; justify-content: center; overflow: hidden; }
.pf-num .zodo { font: 700 34px/1.25 'Outfit', 'Inter', system-ui, sans-serif; color: #fff; }
.pf-num .zodo .c { color: #fff; }
.pf-cap { margin-top: 4px; text-align: center; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8b8b95; }
.pf-gains { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.pf-gain { padding: 10px 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); text-align: center; }
.pf-gain .t { margin-bottom: 6px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #a1a1aa; }
.pf-gain .v { font: 700 17px/1 'Outfit', 'Inter', system-ui, sans-serif; white-space: nowrap; }
.pf-pos { color: #4ade80 !important; }
.pf-neg { color: #f87171 !important; }
.pf-note { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; color: #71717a; text-align: center; }
.pf-msg { font-size: 13px; color: #a1a1aa; text-align: center; padding: 6px 0; }

@media (max-width: 767px) { .pf-dock { left: 12px; right: 12px; width: auto; } }
@media (max-width: 520px) { .pf-card { padding: 22px 16px; border-radius: 20px; } .pf-claim { padding: 16px 12px; } }
@media (prefers-reduced-motion: reduce) { .pf-overlay.open, .pf-card, .pf-panel, .pf-dot { animation: none; } }

@media (max-width: 767px) {
  .pf-close { top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 12px; font-size: 18px; background: rgba(255,255,255,.06); }
  .pf-card .pf-title { padding-right: 44px; }
}

/* "Log in to get started" guide under the profile button (shown while nobody is logged in) */
.pf-guide { position: absolute; z-index: 60; top: calc(100% + 14px); right: 0; width: min(270px, calc(100vw - 24px)); padding: 16px 16px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.16); background: rgba(18,18,22,.96); box-shadow: 0 18px 50px rgba(0,0,0,.55); color: #fafafa; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.pf-guide.show { opacity: 1; transform: none; pointer-events: auto; }
.pf-guide::before { content: ""; position: absolute; top: -7px; right: 22px; width: 12px; height: 12px; background: inherit; border-left: 1px solid rgba(255,255,255,.16); border-top: 1px solid rgba(255,255,255,.16); transform: rotate(45deg); }
.pf-guide-t { font: 700 14px/1.2 'Inter', system-ui, sans-serif; margin-bottom: 6px; padding-right: 22px; }
.pf-guide-p { margin: 0 0 12px; font: 400 13px/1.45 'Inter', system-ui, sans-serif; color: #a1a1aa; }
.pf-guide-btn { width: 100%; height: 36px; border: 0; border-radius: 10px; background: #fafafa; color: #09090b; font: 600 13px/1 'Inter', system-ui, sans-serif; cursor: pointer; transition: opacity .15s; }
.pf-guide-btn:hover { opacity: .88; }
.pf-guide-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #a1a1aa; cursor: pointer; }
.pf-guide-x:hover { background: rgba(255,255,255,.1); color: #fafafa; }
.pf-guide-x .i { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .pf-guide { transition: none; } }

.pf-count { margin: 6px 0 0 2px; font-size: 12px; color: #a1a1aa; }
.pf-count.near { color: #fbbf24; }
.pf-count.over { color: #f87171; }

/* phones: smaller login bubble, roomier touch targets in the profile menu and popups */
@media (max-width: 767px) {
  .pf-guide { width: min(236px, calc(100vw - 24px)); padding: 12px 12px 11px; border-radius: 12px; }
  .pf-guide-t { font-size: 13px; }
  .pf-guide-p { font-size: 12px; margin-bottom: 9px; }
  .pf-guide-btn { height: 40px; }
  .pf-guide-x { width: 32px; height: 32px; top: 4px; right: 4px; }
  .pf-overlay { padding: 14px; align-items: flex-end; }
  .pf-card { width: 100%; margin: 0 auto; max-height: calc(100dvh - 28px); overflow-y: auto; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .pf-input, .pf-btn { height: 50px; }
  .pf-list li { padding: 11px 10px; }
  .pf-pb { width: 36px; height: 36px; }
  .profile-item { height: 46px; }
}

/* keep the +/- sign the same colour as the number in My growth */
.pf-num .zodo.pf-pos .c, .pf-num .zodo.pf-pos .c.s { color: #4ade80; }
.pf-num .zodo.pf-neg .c, .pf-num .zodo.pf-neg .c.s { color: #f87171; }

/* direction-of-change flash in My growth: red when growth went down, green when it went up (beats the sign colour) */
.pf-fup { color: #4ade80 !important; }
.pf-fdn { color: #f87171 !important; }
.pf-num .zodo.pf-fup .c, .pf-num .zodo.pf-fup .c.s { color: #4ade80; }
.pf-num .zodo.pf-fdn .c, .pf-num .zodo.pf-fdn .c.s { color: #f87171; }

/* country list: keep the scrollbar inside the rounded corners (the global thin-scrollbar rule makes Chrome ignore the track margin) */
.pf-list { scrollbar-width: auto; scrollbar-color: auto; clip-path: inset(0 round 16px); }
.pf-list::-webkit-scrollbar { width: 8px; }
.pf-list::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.pf-list::-webkit-scrollbar-corner { background: transparent; }
.pf-list::-webkit-scrollbar-track { background: transparent; margin: 14px 0; }
.pf-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.pf-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.34); background-clip: padding-box; }
@supports not selector(::-webkit-scrollbar) { .pf-list { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; } }
.pf-chip button.pf-chg { width: auto; height: 32px; padding: 0 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.06); color: #e4e4e7; font: 600 12px/1 'Inter', system-ui, sans-serif; }
.pf-chip button.pf-chg:hover { background: rgba(255,255,255,.14); color: #fff; }
