/* Friends on the open Duo (friends.js), scoped to .dw-friends. Sizes and colours from the stage app: DuoFriends.swift
   (the parchment card, the request row, the friend's head, figures and event cards), FriendsView.swift shelves, the tokens
   in Inks.swift (gold F2B33D, parchment F3E6C8, ground 121829, ink F2EEE4, hair = gold 22 %) and DuoMeFace.swift DuoMeWood. */
.dw-friends { --ink: #F2EEE4; --mute: #A9B0C6; --hair: rgba(242,179,61,.22); --parch: #F3E6C8; --ground: #121829; color: var(--ink); }
.dw-friends button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.dw-friends .lp-in, .dw-friends .rp-in { padding: 22px 12px 20px; }
.dw-friends .lp-in { padding-left: 0; } /* DuoStage.swift:156 the list leads 20, as Home and the Event */
.dw-friends .rp-in { display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; } /* the app's ScrollView */
.dw-friends .num { font-variant-numeric: tabular-nums; }

/* DuoMeHead */
.fr-h { display: flex; align-items: flex-start; gap: 12px; }
.fr-h > div { flex: 1; min-width: 0; }
.fr-h h1 { font: 600 26px/1.25 Prompt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-h p { margin-top: 2px; font-size: 13px; color: var(--mute); }
.dw-friends .fr-add { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; font: 600 15px Prompt;
  box-shadow: inset 0 0 0 1.5px rgba(242,179,61,.45); }
.dw-friends .fr-add.on { color: var(--gold); background: rgba(242,179,61,.16); box-shadow: inset 0 0 0 1.5px var(--gold); }

/* a request waiting for me */
.fr-req { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(rgba(242,179,61,.10), rgba(242,179,61,.10)), var(--ground); box-shadow: inset 0 0 0 1px var(--hair); }
.fr-req > .face { flex: none; }
.fr-req span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-req span b { font: 600 15px/1.3 Prompt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-req span small { font-size: 12px; color: var(--mute); }
.dw-friends .fr-k { min-height: 44px; padding: 0 12px; border-radius: 10px; font: 600 15px Prompt; color: #F2EEE4;
  background: linear-gradient(rgba(255,255,255,.05), rgba(255,255,255,.05)), var(--ground); box-shadow: inset 0 0 0 1.5px var(--hair); }
.dw-friends .fr-k.main { color: var(--gold); background: none; box-shadow: inset 0 0 0 1.5px var(--gold); }

/* DuoMeSection + the parchment cards, four across */
.fr-sec { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.fr-sec h3 { flex: 1; font: 600 17px/1.3 Prompt; color: var(--gold); }
.fr-sec small { font-size: 13px; color: var(--mute); }
.fr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 10px; align-items: start; }
.dw-friends .fr-c { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 4px 12px; border-radius: 12px;
  background: var(--parch); box-shadow: inset 0 0 0 2px var(--gold), 0 6px 14px rgba(0,0,0,.3); }
.dw-friends .fr-c.on { box-shadow: inset 0 0 0 3px var(--gold), 0 0 0 3px rgba(242,179,61,.4), 0 6px 14px rgba(0,0,0,.3); }
.fr-c .fr-nm { max-width: 100%; justify-content: center; color: #2A2216; }
.fr-c b { font: 600 15px/1.3 Prompt; }
.fr-c .st-tx { font-size: 12px; }
.fr-c small { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; line-height: 1.3; color: #6A5B40; }
.fr-c small.in { font-weight: 600; color: #2F7A3A; }
.fr-sun { margin: 14px auto 0; width: 60%; text-align: center; }
.fr-sun img { width: 100%; border-radius: 10px; }
.fr-sun b { display: block; margin-top: 8px; font: 600 17px Prompt; }

/* the sent / blocked shelves on parchment */
.fr-shelves { margin-top: 22px; padding: 0 14px; border-radius: 12px; background: var(--parch); color: #18213D; }
.dw-friends .fr-shelf { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; text-align: left; }
.fr-shelf + .fr-shelf { border-top: 1px solid rgba(24,33,61,.15); }
.fr-shelf b { flex: 1; font: 600 16.5px Prompt; }
.fr-shelf small { font: 600 15px Prompt; color: #4D5570; }

/* right: the picked friend (DuoFriendsPage) */
.fr-me { display: flex; align-items: center; gap: 14px; }
.fr-me > .face { flex: none; box-shadow: 0 0 0 2px var(--gold); }
.fr-me > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fr-nm, .st-me-nm { display: flex; min-width: 0; }
:is(.fr-nm, .st-me-nm) > b { min-width: 0; overflow-wrap: anywhere; }
.fr-me .fr-nm b { font: 600 26px/1.2 Prompt; }
.fr-me small { font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-friends .fr-more { width: 44px; height: 44px; flex: none; display: grid; place-items: center; }
.fr-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.fr-figs div { min-width: 0; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); }
.fr-figs small { display: block; font-size: 12px; color: var(--mute); }
.fr-figs b { display: block; font: 600 17px/1.35 Prompt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-grid.evs { gap: 12px; }
.fr-ev { min-width: 0; border-radius: 12px; overflow: hidden; background: linear-gradient(#1C2647, #141C38); box-shadow: inset 0 0 0 1px var(--hair); }
.fr-ev img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; }
.fr-ev b { display: block; min-height: calc(2 * 1.35em + 18px); padding: 8px 10px 10px; font: 600 13px/1.35 Prompt; }
.fr-foot { position: sticky; bottom: 0; margin-top: auto; padding-top: 16px; } /* safeAreaInset(edge: .bottom): pinned at the foot */
.fr-foot .hm-btn { width: 100%; }

/* the invite picker (DuoInvitePage) */
.fr-inv { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.dw-friends .fr-ir { min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; text-align: left;
  background: linear-gradient(#1C2647, #141C38); box-shadow: inset 0 0 0 1px var(--hair); }
.fr-ir img { width: 52px; height: 40px; flex: none; border-radius: 6px; object-fit: cover; object-position: top; }
.fr-ir span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-ir b { font: 600 15px/1.3 Prompt; }
.fr-ir small { font-size: 12px; color: var(--mute); }
.dw-friends .fr-ir:disabled { cursor: default; }
.fr-none { margin-top: 16px; font-size: 15px; color: var(--mute); }

/* Add Friend: my code card, then scan and share */
.fr-code { margin-top: 16px; padding: 16px; border-radius: 14px; text-align: center; color: #18213D; background: var(--parch);
  box-shadow: inset 0 0 0 2px var(--gold); }
.fr-code small { font-size: 14px; color: #4D5570; }
.fr-qr { width: 180px; margin: 10px auto 0; padding: 10px; border-radius: 10px; background: #fff; }
.fr-qr svg { display: block; width: 100%; height: auto; }
.fr-code > b { display: block; margin-top: 8px; font: 600 26px/1.3 Prompt; letter-spacing: .08em; }
.fr-link { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(24,33,61,.06); text-align: left; }
.fr-link span { min-width: 0; font: 600 14px Prompt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-friends .fr-copy { width: 100%; min-height: 48px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; font: 600 17px Prompt; color: #18213D; box-shadow: inset 0 0 0 1.5px #18213D; }
.dw-friends .fr-way { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 8px 16px 8px 8px;
  border-radius: 12px; text-align: left; background: linear-gradient(#1C2647, #141C38); box-shadow: inset 0 0 0 1.5px var(--gold); }
.dw-friends .fr-way.main { color: #18213D; background: var(--gold); }
.fr-way i { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 10px; color: #18213D; background: var(--parch); }
.fr-way.main i { color: var(--gold); background: #18213D; }
.fr-way b { flex: 1; font: 600 17px Prompt; }
/* Settings on the open Duo (settings.js), scoped to .dw-set: DuoMeSettings.swift person, DuoMeRow (DuoMeFace.swift:127-157:
   56 min, 12 radius, rowTop 1C2647 to rowFoot 141C38, hair or a 2 gold rim when picked), rose F08A7E (DuoMeSettings.swift:198) */
.dw-set .lp-in { overflow-y: auto; scrollbar-width: none; }
.dw-set .rp-in { overflow: hidden; } .dw-set .rp-in > .st-scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; scrollbar-width: none; } /* DuoMeFoot sits under the ScrollView */
.st-me { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.st-me > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st-me b { font: 600 20px/1.3 Prompt; }
.st-me small { font-size: 12px; color: var(--mute); }
.st-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dw-set .st-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 12px; text-align: left;
  background: linear-gradient(#1C2647, #141C38); box-shadow: inset 0 0 0 1px var(--hair); }
.dw-set .st-row i { flex: none; width: 28px; display: grid; place-items: center; color: var(--gold); }
.dw-set .st-row b { flex: 1; min-width: 0; font: 600 15px Prompt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-set .st-row small { flex: none; max-width: 50%; font: 500 12px Prompt; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-set .st-row.flat small { font: 700 15px Prompt; color: var(--ink); }
.dw-set .st-row.on { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 3px rgba(242,179,61,.18); }
.dw-set .st-row.on > svg { color: var(--gold); }
.dw-set .st-row.out, .dw-set .st-row.out i { color: #F08A7E; }
.dw-set .st-row.quiet, .dw-set .st-row.quiet i { color: var(--mute); }
.st-bills { margin-top: 14px; }
.dw-set .st-tog { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; margin-top: 14px; padding: 0 12px; border-radius: 12px; text-align: left;
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--hair); }
.dw-set .st-tog b { flex: 1; min-width: 0; font: 600 15px/1.3 Prompt; }
/* Safety.swift:558-560 the switch: 46 x 28, a 1.5 pt rule ring on and off */
.st-tog em { flex: none; width: 46px; height: 28px; border-radius: 14px; background: rgba(120,120,128,.32); box-shadow: inset 0 0 0 1.5px rgba(242,179,61,.45); position: relative; transition: background .2s; }
.st-tog em::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 1.5px rgba(0,0,0,.35); transition: transform .2s; }
.st-tog em.on { background: #34C759; } .st-tog em.on::after { transform: translateX(18px); }
.dw-set .st-plate { width: 100%; margin-top: 14px; padding: 14px; border-radius: 12px; text-align: left;
  background: linear-gradient(#1C2647, #141C38); box-shadow: inset 0 0 0 1px var(--hair); }
.st-xp { display: flex; align-items: center; gap: 10px; } .st-xp i { font: 700 22px Prompt; font-style: normal; }
.st-xp > svg { flex: none; color: var(--gold); }
.st-xp > span { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.10); overflow: hidden; }
.st-xp em { display: block; height: 100%; background: var(--gold); } .st-xp small { font-size: 12px; color: var(--mute); }
.st-state { display: block; text-align: center; font: 600 15px Prompt; color: var(--mute); }
