/* Profil screen (profile work package). Loaded after app.css; every rule is scoped to .pf / .r-profil.
   Structure: quiet blue identity band, the loyalty card overlapping it (the one bold element),
   a three-figure ledger, then hairline-divided settings groups. No nested cards. */

.r-profil ::selection { background: var(--lime-l); color: var(--ink); }

/* ---------- identity band ---------- */
.pf-band { padding: 18px 18px 86px; gap: 16px; }
.pf-id { display: flex; align-items: center; gap: 14px; }
.pf-av { width: 64px; height: 64px; flex: none; border-radius: 50%; background: #fff; color: var(--blue-d); display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 25px; letter-spacing: .02em; box-shadow: 0 0 0 4px rgba(255, 255, 255, .22); }
.pf-name { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; letter-spacing: -.005em; }
.pf-since { font-size: 19px; font-weight: 700; margin-top: 5px; }
.pf-band .band-store { gap: 5px; padding: 6px 12px 6px 8px; font-size: 14.5px; background: rgba(11, 29, 43, .34); }
.pf-band .band-store .ic { width: 17px; height: 17px; }

/* ---------- the card, tucked into the band ---------- */
.pf-cardwrap { margin-top: -70px; position: relative; z-index: 1; }
.pf-card { display: flex; flex-direction: column; width: 100%; text-align: left; border: 0; background: #fff; color: var(--ink); border-radius: 22px;
  padding: 16px 18px 14px; box-shadow: 0 14px 34px rgba(11, 29, 43, .2), 0 2px 6px rgba(11, 29, 43, .08);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease); animation: pfCardIn .7s .05s var(--ease) both; }
.pf-card:active { transform: scale(.985); box-shadow: 0 8px 20px rgba(11, 29, 43, .2); }
.pf-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pf-card-top img { width: 128px; height: auto; }
.pf-card-top span { font-weight: 700; font-size: 13.5px; color: var(--muted); }
.pf-card .barcode { height: 54px; }
.pf-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.pf-card-n { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.pf-card-go { display: inline-flex; align-items: center; gap: 2px; color: var(--blue-d); font-weight: 800; font-size: 14px; white-space: nowrap; }
.pf-card-go .ic { width: 18px; height: 18px; }
@keyframes pfCardIn { from { transform: translateY(26px); box-shadow: 0 2px 6px rgba(11, 29, 43, .08); } }

/* ---------- three-figure ledger ---------- */
.pf-stats { display: grid; grid-template-columns: 1.35fr 1fr 1fr; margin-top: 18px; }
.pf-stats button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 64px; border: 0; background: none; text-align: left;
  padding: 6px 10px 6px 14px; border-left: 1px solid var(--line); border-radius: 0; }
.pf-stats button:first-child { border-left: 0; padding-left: 0; }
.pf-stats button:focus-visible { border-radius: 8px; }
.pf-st-v { height: 30px; display: flex; align-items: center; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.pf-st-v .amt { font-size: 24px; }
.pf-val .amt { background: var(--lime); color: var(--ink); padding: 4px 7px 2px; border-radius: 6px; display: inline-block; margin-left: -1px; }
.pf-val .amt-u { font-size: 11px; }
.pf-st-l { font-size: 13px; line-height: 1.25; color: var(--muted); font-weight: 600; }

/* ---------- grouped hairline lists ---------- */
.pf .sec > .h2 { margin-bottom: 4px; }
.pf .sec-s { margin-top: 4px; margin-bottom: 4px; text-wrap: pretty; }
.pf-trust p, .pf-more p, .pf-cf-box p { text-wrap: pretty; }
.pf-count { font-size: 14px; color: var(--muted); font-weight: 600; }
.pf-list > li, .pf-list > .pf-sw { border-bottom: 1px solid var(--line); }
.pf-list > li:last-child, .pf-list > .pf-sw:last-child { border-bottom: 0; }
.pf-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 0; border: 0; background: none; text-align: left; color: var(--ink); }
summary.pf-row { list-style: none; cursor: pointer; }
summary.pf-row::-webkit-details-marker { display: none; }
.pf-row > .ic { color: var(--muted); width: 20px; height: 20px; transition: transform .2s var(--ease); }
.pf-dt[open] > summary > .ic, .pf-row[aria-expanded="true"] > .ic { transform: rotate(90deg); }
.pf-row:active { background: linear-gradient(90deg, transparent, var(--surface) 12%, var(--surface) 88%, transparent); }
.pf-i { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--blue-l); color: var(--blue-d); display: grid; place-items: center; }
.pf-i .ic { width: 21px; height: 21px; }
.pf-t { flex: 1; min-width: 0; }
.pf-t b { display: block; font-size: 16px; font-weight: 750; line-height: 1.25; }
.pf-t small { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.pf-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #B3BFC9; }
.pf-dot.on { background: #2E9E5B; box-shadow: 0 0 0 3px rgba(46, 158, 91, .18); }
.pf-goal .bar { display: block; margin: 9px 0 7px; height: 8px; }

/* expandable content under a row */
.pf-more, .pf-cf-box { padding: 0 0 16px 54px; font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.pf-more > p + *, .pf-more > * + p { margin-top: 10px; }
.pf-more .btn { margin-top: 12px; }
.pf-hours { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.pf-hours dt { color: var(--muted); }
.pf-hours dd { margin: 0; font-weight: 700; }
.pf-what li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.pf-what .ic { width: 18px; height: 18px; color: var(--blue-d); margin-top: 2px; }
.pf-cf-box:focus { outline: none; }
.pf-cf-b { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pf-ok { display: flex; gap: 10px; align-items: flex-start; background: var(--blue-l); border-radius: 14px; padding: 12px 14px; }
.pf-ok .ic { width: 20px; height: 20px; color: var(--blue-d); flex: none; margin-top: 1px; }
.pf-del .pf-i { background: var(--red-l); color: #B5141A; }
.pf-del .pf-t b { color: #B5141A; }
.btn.pf-danger { background: #B5141A; color: #fff; }
.btn.pf-danger:active { background: #8F0F14; }

/* family */
.pf-mem { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; }
.pf-mav { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 16px; }
.pf-mav.me { background: var(--blue-d); color: #fff; }
.pf-mav.m { background: var(--ink); color: #fff; }
.pf-mav.k { background: var(--sky); color: var(--blue-d); }
.pf-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 8px 8px 8px 16px; border: 1.5px dashed #A9C9DE; border-radius: 14px; }
.pf-code b { font-family: var(--display); font-size: 22px; letter-spacing: .08em; }
.pf-code .btn.done { background: var(--lime-l); color: var(--ink); }

/* switches: native checkbox (role=switch) under a drawn track */
.pf-sw { position: relative; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 0; cursor: pointer; }
.pf-sw-t { flex: 1; min-width: 0; }
.pf-sw-t b { display: block; font-size: 16px; font-weight: 750; line-height: 1.25; }
.pf-sw-t small { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.pf-sw input { position: absolute; right: 0; top: 50%; width: 52px; height: 32px; margin: -16px 0 0; opacity: 0; cursor: pointer; }
.pf-track { position: relative; width: 52px; height: 32px; flex: none; border-radius: 16px; background: #8397A8; transition: background .2s var(--ease); }
.pf-track i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(11, 29, 43, .22); transition: transform .22s var(--ease); }
.pf-sw input:checked + .pf-track { background: var(--blue-d); }
.pf-sw input:checked + .pf-track i { transform: translateX(20px); }
.pf-sw input:focus-visible + .pf-track { outline: 2.5px solid var(--blue); outline-offset: 3px; }

/* privacy statement: the reason the app is the store's own */
.pf-trust { display: flex; gap: 14px; align-items: flex-start; background: var(--blue-l); border-radius: 20px; padding: 16px 16px 18px; margin: 12px 0 6px; }
.pf-trust-i { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--blue-d); color: #fff; display: grid; place-items: center; }
.pf-trust-i .ic { width: 22px; height: 22px; }
.pf-trust b { display: block; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.15; text-wrap: balance; }
.pf-trust p { font-size: 14.5px; line-height: 1.5; margin-top: 6px; color: #2B4458; }

/* footer + demo */
.pf-foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.pf-ver { font-size: 13px; color: var(--muted); }
.pf-demo { margin-top: 22px; border: 1.5px dashed #C5D1DA; border-radius: 16px; padding: 14px 16px 16px; }
.pf-demo h2 { font-size: 15px; font-weight: 800; }
.pf-demo p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.pf-demo .btn { margin-top: 12px; }

.pf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .pf-card { animation: none; }
  .pf-track, .pf-track i, .pf-row > .ic { transition: none; }
}
