/* app-polish.css - small fixes inside the app (all themes, seasonal or not).
   1. Chat send button: rounded, matching the message box (it had the old angled cut corners).
   2. Phone bottom menu: the selected item gets one soft rounded highlight with a coloured icon,
      instead of a solid coloured square behind the icon. --nav-on lets a seasonal theme recolour it.
   Loads after the other stylesheets. Rollback: remove the <link>. */

/* ---------- 1. chat composer ---------- */
.comp #sb, .dc-pane .comp #sb { clip-path: none !important; border-radius: 14px !important; }
.comp textarea { border-radius: 14px; }
@media (min-width: 900px) {
  .comp #sb { min-width: 84px; }
}

/* ---------- 2. phone bottom menu ---------- */
:root { --nav-on: var(--acc); }
@media (max-width: 899px) {
  nav#nav button { transition: color .2s, background-color .2s; }
  nav#nav button.on {
    background: color-mix(in srgb, var(--nav-on) 16%, transparent) !important;
    color: var(--t1) !important;
  }
  nav#nav button.on svg,
  nav#nav button.on:hover svg {
    background: none !important; box-shadow: none !important; border-radius: 0 !important;
    color: var(--nav-on) !important; transform: translateY(-1px) !important;
  }
  nav#nav button.on span { font-weight: 700; }
}

/* ---------- 3. no more cut corners on computers: rounded like the rest of the app ---------- */
@media (min-width: 900px) {
  .wrap:has(#nav) #view:has(.stage) .card .acts .btn,
  #view .pm-now .btn,
  #view .pm-card .btn { clip-path: none !important; border-radius: 14px !important; }
  .wrap:has(#nav) #view:has(.stage) .card .rk { clip-path: none !important; border-radius: 999px !important; }
}

/* ---------- 4. Premium: promo code box ---------- */
#view .promo { margin-top: 26px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--s1); }
#view .promo label { display: block; margin: 0 0 10px; font: 700 15px var(--font-d); color: var(--t1); text-transform: none; letter-spacing: 0; }
#view .promo .row { display: flex; gap: 10px; align-items: stretch; }
#view .promo input { flex: 1 1 auto; min-width: 0; min-height: 46px; border-radius: 12px !important; text-transform: uppercase; letter-spacing: .04em; }
#view .promo .btn { clip-path: none !important; border-radius: 12px !important; min-height: 46px; padding: 0 20px !important; width: auto !important; }
#view .promo .err:empty { display: none; }
#view .promo .err { margin-top: 8px; }

/* Premium cards: "Huadorr" small above the plan name, so every name fits on one line and the prices line up */
.pm-brand { margin: 0 0 2px; line-height: 1.2; font: 700 11px var(--font-b); letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.pm-card h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-card:has(.pm-rib) h3 { padding-right: 0; }
/* Black: a light button on the dark card (the grey one looked switched off) */
#view .pm-black .btn:not(:disabled):not(.ghost) { background: #FBF6EE !important; color: #1B1A2E !important; }
#view .pm-black .btn:not(:disabled):not(.ghost):hover { background: #fff !important; }
#view .pm-black .btn:disabled { background: #2B2840 !important; color: #9A96B0 !important; }
/* 6-month toggle: how much it saves */
.pm-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pm-save { padding: 2px 7px; border-radius: 999px; background: #1E8A57; color: #fff; font: 700 11px var(--font-b); white-space: nowrap; }

/* ---------- 5. open conversation on phones: only the chat on screen ----------
   Like a messaging app: the bottom menu, the seasonal snow / bats and the announcement card step aside
   while a conversation is open. Back (top left) returns to the chat list, where the menu comes back. */
@media (max-width: 640px) {
  body:has(.wrap .th) nav#nav,
  body:has(.wrap .th) .season-snow,
  body:has(.wrap .th) .ann { display: none !important; }
  .wrap:has(#nav):has(.th) { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important; }
  body:has(.wrap .th) .toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ---------- 6. open conversation on phones: pinned to the visible screen (chat-phone.js) ----------
   With the keyboard open the header stays at the top and the message box sits right above the keyboard. */
@media (max-width: 640px) {
  html.chat-open, html.chat-open body { overflow: hidden !important; overscroll-behavior: none; }
  html.chat-open .wrap:has(#nav):has(.th) {
    position: fixed !important; left: 0; right: 0; top: 0; margin: 0 auto !important;
    transform: translate3d(0, var(--vvt, 0px), 0); will-change: transform; transition: none !important;
    height: var(--vvh, 100dvh) !important; min-height: 0 !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important; box-sizing: border-box;
  }
  /* keyboard open: the home-indicator gap is under the keyboard, so less room is needed */
  html.chat-open.kb-open .wrap:has(#nav):has(.th) { padding-bottom: 8px !important; }
}

/* ---------- 7. the home page "Create account / Log in" bar never peeks out inside the app ---------- */
.m-cta:not(.on) { visibility: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s .35s; }
body:has(#nav) .m-cta { display: none !important; }

/* ---------- 8. every close / remove button: an X drawn exactly in the middle ----------
   The "×" letter sits off-centre in most fonts (and differently in Thai fonts), so it is hidden
   and the X is drawn with a mask in the button's own colour, centred in the circle. */
.modal-h .x, .slot .x, .banner .bx, .co-x, .bnp-x, .nt-x, .ob-x, .pk-x, #pk .pk-x {
  font-size: 0 !important; line-height: 0 !important;
}
.modal-h .x, .nt-x { position: relative; width: 36px; height: 36px; flex: none; }
.nt-x { width: 28px; height: 28px; }
.modal-h .x::before, .slot .x::before, .banner .bx::before, .co-x::before, .bnp-x::before,
.nt-x::before, .ob-x::before, .pk-x::before, #pk .pk-x::before {
  content: "" !important; position: absolute !important; inset: 0 !important; margin: auto !important;
  width: 42% !important; height: 42% !important; min-width: 8px; min-height: 8px; max-width: 18px; max-height: 18px;
  border-radius: 0 !important; transform: none !important; background: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5 5 19' stroke='%23000' stroke-width='3' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5l14 14M19 5 5 19' stroke='%23000' stroke-width='3' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
}
#pk .pk-x::after, .pk-x::after { content: none !important; }

/* ---------- 8. every button, phone and computer: the text in the exact middle ----------
   Many buttons have a fixed height (min-height) with little or no padding, so the words sat at the top.
   Flex centring fixes it everywhere; the gap keeps the space between a word and an icon or a price. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  text-align: center; vertical-align: middle; box-sizing: border-box; text-decoration: none;
}
.btn[hidden] { display: none !important; }

/* ---------- 9. Premium plan cards: the bottom buttons line up ----------
   "Below your plan" wraps to two lines on narrower screens and made its button taller than "Your plan".
   Every card button now has the same height, one line or two. The Reserve card has a 2 px border, so its
   inside space is 2 px less at the bottom and its button ends level with the others. */
#view .pm-card .btn { min-height: 56px; padding: 8px 14px !important; line-height: 1.2; }
#view .pm-card.pm-reserve { padding-bottom: 26px; }

/* ---------- 10. Premium "Monthly / 6 months" switch on phones ----------
   In Thai "6 เดือน" broke onto two lines next to the green badge. On phones the words stay on one line
   and the badge sits centred under them; both buttons keep the same height. */
@media (max-width: 640px) {
  .pm-seg button { flex-direction: column; gap: 3px !important; white-space: nowrap; line-height: 1.2; min-height: 52px; }
  .pm-seg .pm-save { margin: 0; font-size: 10.5px; padding: 1px 7px; }
}

/* ---------- 11. chat message box: no scroll bar (arrows on computers) ----------
   Long messages still scroll with the mouse wheel, the arrow keys or a finger. */
.comp #mi { scrollbar-width: none; -ms-overflow-style: none; }
.comp #mi::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ---------- 12. plan badges: a tiny member card, no words (tier-card.js) ----------
   Platinum (Signature), gold (Reserve), matte black with a gold edge (Black). The older pill styles in
   huadorr.css / style.css are switched off here; the plan name stays in the tooltip. */
.tier-badge.tier-card {
  display: inline-flex !important; align-items: center; justify-content: center; vertical-align: -3px;
  margin-left: 6px; padding: 0 !important; background: none !important; box-shadow: none !important; border: 0 !important;
  border-radius: 4px !important; line-height: 0; overflow: visible; clip-path: none !important; animation: none !important;
}
.tier-badge.tier-card::before, .tier-badge.tier-card::after { display: none !important; }
.tier-card-svg { display: block; filter: drop-shadow(0 1px 1.5px rgba(10, 8, 20, .28)); }
.tier-black .tier-card-svg { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)) drop-shadow(0 0 .5px rgba(201, 165, 78, .5)); }
/* a slow shine across the card when you point at it */
.tier-card-shine { transform: translateX(-2px); transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .6s; }
.tier-badge.tier-card:hover .tier-card-shine, .dv-card:hover .tier-card-shine, .dv-plan:hover .tier-card-shine { transform: translateX(16px); }
@media (prefers-reduced-motion: reduce) { .tier-card-shine { transition: none; } }
/* the "Your plan" row: the card instead of the word */
.dv-plan b.dv-card { padding: 0 !important; background: none !important; box-shadow: none !important; line-height: 0; display: inline-flex; }

/* ---------- 13. verified mark: the H-tick (app.js VCHK) ----------
   Our H on an ink tile with a gold edge; its coral crossbar bends up into a tick. Colours are set here (not in the
   SVG) so the older .vchk path rules in huadorr.css cannot repaint it. */
/* a fixed small size next to every name: a little smaller than the 26 x 17 plan card beside it */
.vchk.hv { width: 15px; height: 15px; margin-left: .3em; vertical-align: -.1em; display: inline-block; overflow: visible; flex: none;
  filter: drop-shadow(0 1px 1.5px rgba(10, 8, 20, .3)); }
.vchk.hv .hv-bg { fill: #1B1A2E; stroke: none; }
.vchk.hv .hv-rim { fill: none; stroke: #C9A54E; stroke-width: .9; }
.vchk.hv path.hv-st { fill: none; stroke: #F4EFE6; stroke-width: 2.2; stroke-linecap: round; }
.vchk.hv path.hv-tk { fill: none; stroke: #FF6B5E; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* the big one in the profile's "Verified" box */
.pf-vc .vchk.hv { width: 32px; height: 32px; margin: 0; filter: drop-shadow(0 3px 6px rgba(10, 8, 20, .28)); }

/* ---------- 14. Discover on phones: a Tinder-style card ----------
   The photo fills the whole card (cropped, never stretched), the name and details sit on a dark fade at the
   bottom of the photo, rank and distance float at the top, and Pass / Like are two round buttons over the
   card's bottom edge. The page is exactly one screen tall, so the card always ends just above the menu bar.
   Computers keep their own layout (desktop-v2.css). */
@media (max-width: 640px) {
  /* (while Filters is open the page scrolls as before, so the filters never squash the card) */
  .wrap:has(#nav):has(#view > .stage):not(:has(.fp.open)) {
    height: 100vh; height: 100dvh; min-height: 0 !important; box-sizing: border-box; overflow: hidden;
    padding-bottom: calc(var(--navh) + 12px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .wrap:has(#nav):has(#view > .stage):not(:has(.fp.open)) > #root { flex: 1 1 auto !important; min-height: 0; }
  .wrap:has(#nav):has(#view > .stage):not(:has(.fp.open)) #view { flex: 1 1 auto; min-height: 0; }
  .wrap:has(.fp.open) #view > .stage:not(:has(.empty)) { min-height: 520px !important; }
  #view > .stage:not(:has(.empty)) {
    flex: 1 1 auto; height: auto !important; min-height: 0 !important; max-height: none !important; margin: 14px 0 0;
  }
  #view > .stage .card {
    border-radius: 24px !important; clip-path: none !important; overflow: hidden; background: #15141E;
    box-shadow: 0 16px 34px -14px rgba(10, 8, 20, .55);
  }
  #view > .stage .card.nx { transform: scale(.95); opacity: .9; }
  /* the photo: the whole card */
  #view > .stage .card .pic {
    position: absolute; inset: 0; flex: none; max-height: none !important; min-height: 0 !important;
    aspect-ratio: auto !important; border-radius: 0 !important;
  }
  #view > .stage .card .pic .ph { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
  /* rank and distance: small glass chips at the top corners, under the photo dots */
  #view > .stage .card .rk, #view > .stage .card .dist {
    top: 18px !important; bottom: auto !important; padding: 6px 12px !important; border-radius: 999px !important;
    background: rgba(12, 11, 20, .55) !important; color: #fff !important; font-size: 12.5px !important;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  #view > .stage .card .rk { left: 14px !important; }
  #view > .stage .card .dist { right: 14px !important; }
  #view > .stage .card .dots { top: 8px; left: 14px; right: 14px; }
  /* name and details on a dark fade at the bottom of the photo, Tinder style:
     a big bold name with a lighter age, then short lines with small icons, soft tags, one line of bio */
  #view > .stage .card .body {
    position: absolute !important; left: 0; right: 0; bottom: 0; z-index: 2; flex: none;
    padding: 110px 18px 20px !important; color: #fff;
    background: linear-gradient(to top, rgba(8, 7, 14, .92) 0%, rgba(8, 7, 14, .72) 38%, rgba(8, 7, 14, 0) 100%);
  }
  #view > .stage .card .body h3 {
    margin: 0 0 8px; color: #fff; font: 800 30px/1.1 var(--font-b) !important; letter-spacing: -.01em;
    -webkit-text-stroke: 0 !important; -webkit-text-fill-color: #fff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35); display: flex; align-items: center; flex-wrap: wrap; gap: 0 2px;
  }
  #view > .stage .card .body h3 .cd-nm, #view > .stage .card .body h3 .ag { font: inherit; -webkit-text-stroke: 0; color: #fff; }
  #view > .stage .card .body h3 .ag { margin-left: 8px; font-weight: 500; opacity: .92; }
  #view > .stage .card .body h3 .cd-nm i { display: none; }
  #view > .stage .card .body h3 .vchk.hv { width: 16px; height: 16px; margin-left: 8px; }
  #view > .stage .card .body h3 .tier-badge.tier-card { margin-left: 5px; }
  #view > .stage .card .body h3 .hd-staff { margin-left: 5px; }
  #view > .stage .card .body h3 .hd-staff-svg { width: 34px; height: 14.5px; }
  /* "Fade main · Duelist · Bangkok": two short lines with icons (the dots and "main" are hidden) */
  #view > .stage .card .body .meta { font-size: 0 !important; margin: 0 0 10px; color: rgba(255, 255, 255, .9); line-height: 1; }
  #view > .stage .card .body .meta .nt { font-size: 15px; line-height: 1.5; display: inline-flex; align-items: center; }
  #view > .stage .card .body .meta .nt:nth-of-type(1)::before, #view > .stage .card .body .meta .nt:nth-of-type(3)::before {
    content: ""; width: 17px; height: 17px; margin-right: 7px; background: currentColor; flex: none;
    -webkit-mask: var(--mi) center / contain no-repeat; mask: var(--mi) center / contain no-repeat;
  }
  #view > .stage .card .body .meta .nt:nth-of-type(1)::before {
    --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9h12a3 3 0 0 1 3 3l.6 4.2a2.2 2.2 0 0 1-3.9 1.6L15.5 15h-7l-2.2 2.8a2.2 2.2 0 0 1-3.9-1.6L3 12a3 3 0 0 1 3-3z'/%3E%3Cpath d='M7.5 11.5v2M6.5 12.5h2M16 12h.01M17.5 13.5h.01'/%3E%3C/svg%3E");
  }
  #view > .stage .card .body .meta .nt:nth-of-type(2)::before { content: "·"; margin: 0 7px; opacity: .7; }
  #view > .stage .card .body .meta .nt:nth-of-type(3) { display: flex; margin-top: 2px; }
  #view > .stage .card .body .meta .nt:nth-of-type(3)::before {
    --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.3'/%3E%3C/svg%3E");
  }
  #view > .stage .card .body .chips { gap: 6px !important; margin: 0 0 10px !important; }
  #view > .stage .card .body .chip.tg {
    min-height: 0 !important; padding: 5px 11px !important; font: 600 12.5px/1.2 var(--font-b) !important;
    background: rgba(255, 255, 255, .18) !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .22) !important;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  #view > .stage .card .body .bio {
    color: rgba(255, 255, 255, .78); font-size: 14px; line-height: 1.45; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  }
  /* Report: a small round flag button at the right of the name (the word stays for screen readers) */
  #view > .stage .card .body .rpt {
    top: 104px; bottom: auto; right: 14px; width: 36px; height: 36px; border-radius: 50%; font-size: 0 !important;
    display: grid; place-items: center; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
    color: #fff; text-decoration: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  #view > .stage .card .body .rpt::before {
    content: ""; width: 17px; height: 17px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4M5 4h11l-2 4 2 4H5'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  #view > .stage .card .body h3 { padding-right: 44px; }
  /* Pass and Like buttons are not shown on phones (owner's choice): swipe the card left to pass, right to like.
     Computers keep their buttons. */
  #view > .stage + .acts { display: none !important; }
  #view > .stage ~ p.muted { margin: 10px 0 0 !important; text-align: center; }
  /* (kept in case the buttons come back on phones) */
  #view > .stage + .acts {
    position: relative; z-index: 6; justify-content: center; gap: 34px; width: auto; margin: 12px auto 4px !important;
  }
  #view > .stage + .acts .btn {
    flex: none; width: 62px; height: 62px; min-height: 0 !important; padding: 0 !important;
    border-radius: 50% !important; clip-path: none !important; font-size: 0 !important; gap: 0 !important;
    background: var(--s1) !important; border: 1.5px solid var(--c) !important; color: var(--c) !important;
    box-shadow: 0 8px 20px -10px var(--c), 0 2px 6px rgba(10, 8, 20, .12);
    transition: transform .18s cubic-bezier(.22, 1.2, .36, 1), background .2s, color .2s;
  }
  #view > .stage + .acts .btn:active { transform: scale(.88); background: var(--c) !important; color: #fff !important; }
  #view > .stage + .acts .btn svg { width: 28px; height: 28px; stroke-width: 3; }
  #view > .stage + .acts .btn.ghost { --c: #FF4D6A; }
  #view > .stage + .acts .btn:not(.ghost) { --c: var(--acc); }
  #view > .stage + .acts .btn:not(.ghost) svg { fill: currentColor; stroke: currentColor; stroke-width: 1.5; }
  #view > .stage + .acts .btn:not(.ghost):active svg { fill: #fff; stroke: #fff; }
  #view > .stage ~ .hint { display: none; }
  /* top area: a slimmer header; the Filters row moves into it as a round icon (desktop-v2.js headerFilter) */
  .wrap:has(#view > .stage) > header { padding: 12px 0 10px !important; min-height: 0; flex-wrap: nowrap !important; gap: 8px; }
  .wrap:has(#view > .stage) > header > div:last-child { flex-wrap: nowrap !important; gap: 6px !important; flex: none; }
  .wrap:has(#view > .stage) > header .brand { font-size: 25px !important; flex: 0 1 auto; min-width: 0; white-space: nowrap; }
  .wrap:has(#view > .stage) > header .theme-btn, .wrap:has(#view > .stage) > header #lb,
  .wrap:has(#view > .stage) > header .hd-filter { width: 38px !important; height: 38px !important; min-height: 0 !important; }
  /* Log out as a round icon here, so the bigger logo fits on one row (the word stays for screen readers) */
  .wrap:has(#view > .stage) > header #ha .btn {
    position: relative; width: 38px !important; height: 38px; min-height: 0 !important; padding: 0 !important;
    border-radius: 50% !important; font-size: 0 !important; color: var(--t1);
  }
  .wrap:has(#view > .stage) > header #ha .btn::before {
    content: ""; width: 19px; height: 19px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h3.5A2.5 2.5 0 0 1 20 6.5v11a2.5 2.5 0 0 1-2.5 2.5H14'/%3E%3Cpath d='M10 8l-4 4 4 4M6 12h9'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h3.5A2.5 2.5 0 0 1 20 6.5v11a2.5 2.5 0 0 1-2.5 2.5H14'/%3E%3Cpath d='M10 8l-4 4 4 4M6 12h9'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .wrap:has(#view > .stage) #view > .fbar { display: none !important; }
  #view > .stage ~ p.muted { margin: 0 0 4px !important; font-size: 12.5px; }
}

/* the round Filters button in the phone header (Discover) */
.hd-filter {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: var(--s2); color: var(--t1); cursor: pointer; transition: background .2s, color .2s;
}
.hd-filter svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hd-filter.on { background: var(--t1); color: var(--bg); }
@media (min-width: 641px) { .hd-filter { display: none; } }

/* ---------- 15. phones: Log out lives only on the Profile page ----------
   The header keeps the logo, filters, theme and language; Log out is a full-width button in Profile > Account.
   Computers keep Log out at the bottom of the sidebar. Signed-out pages keep their Log in / Sign up buttons. */
.pf-out { display: none; }
@media (max-width: 640px) {
  .wrap:has(#nav) > header #ha { display: none !important; }
  .pf-acct .pf-out {
    display: flex; width: 100%; min-height: 48px; margin: 2px 0 14px; border-radius: 14px !important;
    font: 700 15px var(--font-b); text-transform: none; letter-spacing: 0;
  }
}

/* ---------- 16. phone card: one piece of the profile per photo (app.js cardInfo sets data-show) ----------
   Photo 1: name and age. Photo 2: game and place. Photo 3: tags. Photo 4: bio. The last photo also shows what is
   left; a player with one photo shows everything at once. Tap left / right to move between photos. */
@media (max-width: 640px) {
  #view > .stage .card .body > .meta, #view > .stage .card .body > .chips, #view > .stage .card .body > .bio { display: none; }
  #view > .stage .card[data-show~="meta"] .body > .meta { display: block; }
  #view > .stage .card[data-show~="chips"] .body > .chips { display: flex; }
  #view > .stage .card[data-show~="bio"] .body > .bio { display: -webkit-box; -webkit-line-clamp: 3; }
  /* each new piece fades in when the photo changes */
  #view > .stage .card .body > .meta, #view > .stage .card .body > .chips, #view > .stage .card .body > .bio { animation: hdIn .3s ease both; }
  @keyframes hdIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* phone card: name, age and badges always on one line (a very long name ends with "…") */
@media (max-width: 640px) {
  #view > .stage .card .body h3 { flex-wrap: nowrap !important; font-size: 28px !important; }
  #view > .stage .card .body h3 .cd-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #view > .stage .card .body h3 .ag, #view > .stage .card .body h3 .vchk, #view > .stage .card .body h3 .tier-badge { flex: none; }
}

/* ---------- 17. phone Discover: the browser does not scroll or bounce while you swipe ----------
   On iPhone the page bounced up and down under a swipe (elastic scrolling joining in). The card now takes every
   finger movement itself (touch-action: none) and the page, which fits one screen, is locked. While Filters is
   open the page scrolls as before. */
@media (max-width: 640px) {
  html:has(#view > .stage #card):not(:has(.fp.open)),
  html:has(#view > .stage #card):not(:has(.fp.open)) body {
    overflow: hidden !important; overscroll-behavior: none; height: 100%;
  }
  .wrap:not(:has(.fp.open)) #view > .stage, .wrap:not(:has(.fp.open)) #view > .stage .card {
    touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  }
}

/* ---------- 18. HDRR plate for the Huadorr team (tier-card.js hdStaffBadge, app.js badges) ---------- */
.hd-staff { display: inline-flex; align-items: center; vertical-align: middle; margin-left: 6px; line-height: 0; flex: none; }
.hd-staff-svg { display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)) drop-shadow(0 0 .6px rgba(226, 182, 87, .55)); }
.hd-staff-shine { transform: translateX(-4px); transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.hd-staff:hover .hd-staff-shine { transform: translateX(30px); }
@media (prefers-reduced-motion: reduce) { .hd-staff-shine { transition: none; } }

/* ---------- 19. Discover filters: distance and age range sliders (tiers.js filtersHtml) ---------- */
.fp .hf { display: flex; flex-direction: column; gap: 18px; }
.hf-row { display: flex; flex-direction: column; gap: 10px; }
.hf-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 600 14px var(--font-b); color: var(--t1); }
.hf-v { font: 700 14px var(--font-b); color: var(--acc); font-variant-numeric: tabular-nums; }
.hf-lock { border: 0; background: none; padding: 0; cursor: pointer; color: var(--t3); }
.hf-n { margin: 0; font-size: 12.5px; color: var(--t3); }
.hf-track { position: relative; height: 28px; }
.hf-track > i { position: absolute; left: 11px; right: 11px; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: var(--s2);
  background-image: linear-gradient(var(--acc), var(--acc)); background-repeat: no-repeat;
  background-position: var(--a) 0; background-size: calc(var(--b) - var(--a)) 100%; }
.hf-track input[type=range] { position: absolute; inset: 0; width: 100%; height: 28px; margin: 0; padding: 0; background: none;
  -webkit-appearance: none; appearance: none; pointer-events: none; border: 0 !important; box-shadow: none !important; min-height: 0 !important; }
.hf-track input[type=range]::-webkit-slider-runnable-track { background: none; border: 0; height: 28px; }
.hf-track input[type=range]::-moz-range-track { background: none; border: 0; }
.hf-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; margin-top: 3px;
  border-radius: 50%; background: #fff; border: 2px solid var(--acc); box-shadow: 0 2px 8px rgba(10, 8, 20, .25); cursor: grab; }
.hf-track input[type=range]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 2px solid var(--acc); box-shadow: 0 2px 8px rgba(10, 8, 20, .25); cursor: grab; }
.hf-track input[type=range]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.1); }
.hf-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 3px solid color-mix(in srgb, var(--acc) 35%, transparent); }
.hf-km.locked .hf-track { opacity: .45; }
.hf-km.locked .hf-track input::-webkit-slider-thumb { cursor: not-allowed; border-color: var(--t3); }
.hf-km.locked .hf-track > i { background-image: none; }
/* phones: the header filter icon already says what this is, so no "Filters" title; a little room above the first slider */
@media (max-width: 640px) {
  .fp .hf .dv-ft { display: none; }
  .fp .hf { padding-top: 18px; }
}
/* the filters' Reset button: top right of the panel, only when something was changed (tiers.js) */
.fp .hf { position: relative; }
.hf-reset { position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; min-height: 0 !important;
  border: 0; border-radius: 999px; background: var(--s2); color: var(--t2); font: 600 12.5px var(--font-b); cursor: pointer; transition: background .2s, color .2s; }
.hf-reset:hover { background: var(--tint); color: var(--acc); }
.hf-reset svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) { .hf-reset { top: 12px; } .fp .hf:has(.hf-reset) .hf-km .hf-h { padding-right: 84px; } }
